Skip to content

Commit ecb4f5b

Browse files
committed
Restore dist files
1 parent f2af3f8 commit ecb4f5b

File tree

2 files changed

+44
-33
lines changed

2 files changed

+44
-33
lines changed

dist/angular-schema-form-material.js

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ return /******/ (function(modules) { // webpackBootstrap
638638
/**
639639
* Evaluate an expression, i.e. scope.$eval
640640
* but do it in sfSchemas parent scope sf-schema directive is used
641+
*
641642
* @param {string} expression
642643
* @param {Object} locals (optional)
643644
* @return {Any} the result of the expression
@@ -654,6 +655,7 @@ return /******/ (function(modules) { // webpackBootstrap
654655
/**
655656
* Evaluate an expression, i.e. scope.$eval
656657
* in this decorators scope
658+
*
657659
* @param {string} expression
658660
* @param {Object} locals (optional)
659661
* @return {Any} the result of the expression
@@ -673,7 +675,7 @@ return /******/ (function(modules) { // webpackBootstrap
673675
* Use the Angular `{{ interpolation }}`
674676
* braces to access properties on `locals`.
675677
*
676-
* @param {string} content The string to interpolate.
678+
* @param {string} expression The string to interpolate.
677679
* @param {Object} locals (optional) Properties that may be accessed in the
678680
* `expression` string.
679681
* @return {Any} The result of the expression or `undefined`.
@@ -745,7 +747,7 @@ return /******/ (function(modules) { // webpackBootstrap
745747

746748
var evalExpr = 'evalExpr(form.condition,{ model: model, "arrayIndex": arrayIndex})';
747749
if (form.key) {
748-
evalExpr = 'evalExpr(form.condition,{ model: model, "arrayIndex": arrayIndex, "modelValue": model' + sfPath.stringify(form.key) + '})';
750+
evalExpr = 'evalExpr(form.condition, {' + 'model: model, "arrayIndex": arrayIndex, "modelValue": model' + sfPath.stringify(form.key) + '})';
749751
}
750752

751753
_angular2.default.forEach(element.children(), function (child) {
@@ -805,7 +807,8 @@ return /******/ (function(modules) { // webpackBootstrap
805807
});
806808

807809
// Clean up the model when the corresponding form field is $destroy-ed.
808-
// Default behavior can be supplied as a globalOption, and behavior can be overridden in the form definition.
810+
// Default behavior can be supplied as a globalOption, and behavior can be overridden
811+
// in the form definition.
809812
scope.$on('$destroy', function () {
810813
// If the entire schema form is destroyed we don't touch the model
811814
if (!scope.externalDestructionInProgress) {
@@ -982,6 +985,7 @@ return /******/ (function(modules) { // webpackBootstrap
982985
* DEPRECATED
983986
* Same as createDirective, but takes an object where key is 'type' and value is 'templateUrl'
984987
* Useful for batching.
988+
*
985989
* @param {Object} templates
986990
*/
987991
this.createDirectives = function (templates) {
@@ -992,6 +996,7 @@ return /******/ (function(modules) { // webpackBootstrap
992996

993997
/**
994998
* Getter for decorator settings
999+
*
9951000
* @param {string} name (optional) defaults to defaultDecorator
9961001
* @return {Object} rules and templates { rules: [],templates: {}}
9971002
*/
@@ -1003,6 +1008,7 @@ return /******/ (function(modules) { // webpackBootstrap
10031008
/**
10041009
* DEPRECATED use defineAddOn() instead.
10051010
* Adds a mapping to an existing decorator.
1011+
*
10061012
* @param {String} name Decorator name
10071013
* @param {String} type Form type for the mapping
10081014
* @param {String} url The template url
@@ -1021,6 +1027,7 @@ return /******/ (function(modules) { // webpackBootstrap
10211027

10221028
/**
10231029
* Adds an add-on to an existing decorator.
1030+
*
10241031
* @param {String} name Decorator name
10251032
* @param {String} type Form type for the mapping
10261033
* @param {String} url The template url
@@ -1056,6 +1063,8 @@ return /******/ (function(modules) { // webpackBootstrap
10561063

10571064
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10581065

1066+
;
1067+
10591068
/***/ },
10601069
/* 5 */
10611070
/***/ function(module, exports, __webpack_require__) {
@@ -1067,7 +1076,6 @@ return /******/ (function(modules) { // webpackBootstrap
10671076
});
10681077

10691078
exports.default = function () {
1070-
10711079
var postProcessFn = function postProcessFn(form) {
10721080
return form;
10731081
};
@@ -1194,7 +1202,7 @@ return /******/ (function(modules) { // webpackBootstrap
11941202

11951203
/*!
11961204
* json-schema-form
1197-
* @version 1.0.0-alpha.1
1205+
* @version 1.0.0-alpha.2
11981206
* @link https://github.com/json-schema-form/json-schema-form-core
11991207
* @license MIT
12001208
* Copyright (c) 2016 JSON Schema Form
@@ -2086,7 +2094,6 @@ return /******/ (function(modules) { // webpackBootstrap
20862094
});
20872095

20882096
exports.default = function () {
2089-
20902097
var validator = {};
20912098

20922099
/**
@@ -2096,30 +2103,30 @@ return /******/ (function(modules) { // webpackBootstrap
20962103
*
20972104
* @param {Object} form A merged form definition, i.e. one with a schema.
20982105
* @param {Any} value the value to validate.
2099-
* @return a tv4js result object.
2106+
* @return {Object} a tv4js result object.
21002107
*/
21012108
validator.validate = function (form, value) {
21022109
if (!form) {
21032110
return { valid: true };
2104-
}
2105-
var schema = form.schema;
2111+
};
21062112

2113+
var schema = form.schema;
21072114
if (!schema) {
21082115
return { valid: true };
2109-
}
2116+
};
21102117

21112118
// Input of type text and textareas will give us a viewValue of ''
21122119
// when empty, this is a valid value in a schema and does not count as something
21132120
// that breaks validation of 'required'. But for our own sanity an empty field should
21142121
// not validate if it's required.
21152122
if (value === '') {
21162123
value = undefined;
2117-
}
2124+
};
21182125

21192126
// Numbers fields will give a null value, which also means empty field
21202127
if (form.type === 'number' && value === null) {
21212128
value = undefined;
2122-
}
2129+
};
21232130

21242131
// Version 4 of JSON Schema has the required property not on the
21252132
// property itself but on the wrapping object. Since we like to test
@@ -2130,11 +2137,13 @@ return /******/ (function(modules) { // webpackBootstrap
21302137

21312138
if (form.required) {
21322139
wrap.required = [propName];
2133-
}
2140+
};
2141+
21342142
var valueWrap = {};
21352143
if (_angular2.default.isDefined(value)) {
21362144
valueWrap[propName] = value;
2137-
}
2145+
};
2146+
21382147
return _tv2.default.validateResult(valueWrap, wrap);
21392148
};
21402149

@@ -2243,6 +2252,7 @@ return /******/ (function(modules) { // webpackBootstrap
22432252
* Interpolate and return proper error for an eror code.
22442253
* Validation message on form trumps global error messages.
22452254
* and if the message is a function instead of a string that function will be called instead.
2255+
*
22462256
* @param {string} error the error code, i.e. tv4-xxx for tv4 errors, otherwise it's whats on
22472257
* ngModel.$error for custom errors.
22482258
* @param {Any} value the actual model value.
@@ -2311,7 +2321,6 @@ return /******/ (function(modules) { // webpackBootstrap
23112321
});
23122322

23132323
exports.default = function () {
2314-
23152324
// expose the methods in sfPathProvider
23162325
this.parse = _jsonSchemaFormCore.sfPath.parse;
23172326
this.stringify = _jsonSchemaFormCore.sfPath.stringify;
@@ -2364,15 +2373,15 @@ return /******/ (function(modules) { // webpackBootstrap
23642373
// most notably for errors.
23652374
// So we emit it up to the decorator directive so it can put it on scope.
23662375
scope.$emit('schemaFormPropagateNgModelController', ngModel);
2367-
}
2376+
};
23682377

23692378
// Watch for the form definition and then rewrite it.
23702379
// It's the (first) array part of the key, '[]' that needs a number
23712380
// corresponding to an index of the form.
23722381
var once = scope.$watch(attrs.sfArray, function (form) {
23732382
if (!form) {
23742383
return;
2375-
}
2384+
};
23762385

23772386
// An array model always needs a key so we know what part of the model
23782387
// to look at. This makes us a bit incompatible with JSON Form, on the
@@ -2732,6 +2741,7 @@ return /******/ (function(modules) { // webpackBootstrap
27322741
/**
27332742
* Evaluate an expression, i.e. scope.$eval
27342743
* in this decorators scope
2744+
*
27352745
* @param {string} expression
27362746
* @param {Object} locals (optional)
27372747
* @return {Any} the result of the expression
@@ -2751,7 +2761,7 @@ return /******/ (function(modules) { // webpackBootstrap
27512761
* Use the Angular `{{ interpolation }}`
27522762
* braces to access properties on `locals`.
27532763
*
2754-
* @param {string} content The string to interpolate.
2764+
* @param {string} expression The string to interpolate.
27552765
* @param {Object} locals (optional) Properties that may be accessed in the
27562766
* `expression` string.
27572767
* @return {Any} The result of the expression or `undefined`.
@@ -3138,8 +3148,13 @@ return /******/ (function(modules) { // webpackBootstrap
31383148

31393149
form.titleMap.forEach(function (item, index) {
31403150
var arrIndex = arr.indexOf(item.value);
3141-
if (arrIndex === -1 && vals[index]) arr.push(item.value);
3142-
if (arrIndex !== -1 && !vals[index]) arr.splice(arrIndex, 1);
3151+
if (arrIndex === -1 && vals[index]) {
3152+
arr.push(item.value);
3153+
};
3154+
3155+
if (arrIndex !== -1 && !vals[index]) {
3156+
arr.splice(arrIndex, 1);
3157+
};
31433158
});
31443159
// Time to validate the rebuilt array.
31453160
// validateField method is exported by schema-validate
@@ -3340,7 +3355,7 @@ return /******/ (function(modules) { // webpackBootstrap
33403355
});
33413356
} else {
33423357
internalRender(schema, form, merged);
3343-
}
3358+
};
33443359
};
33453360

33463361
var internalRender = function internalRender(schema, form, merged) {
@@ -3353,7 +3368,7 @@ return /******/ (function(modules) { // webpackBootstrap
33533368
scope.externalDestructionInProgress = true;
33543369
childScope.$destroy();
33553370
scope.externalDestructionInProgress = false;
3356-
}
3371+
};
33573372
childScope = scope.$new();
33583373

33593374
//make the form available to decorators
@@ -3519,7 +3534,7 @@ return /******/ (function(modules) { // webpackBootstrap
35193534
// Since we might have different tv4 errors we must clear all
35203535
// errors that start with tv4-
35213536
Object.keys(ngModel.$error).filter(function (k) {
3522-
return k.indexOf('tv4-') === 0;
3537+
return k.indexOf('tv4-') === 0 || k.indexOf('md-') === 0;
35233538
}).forEach(function (k) {
35243539
ngModel.$setValidity(k, true);
35253540
});
@@ -4071,11 +4086,7 @@ return /******/ (function(modules) { // webpackBootstrap
40714086
/* 7 */
40724087
/***/ function(module, exports) {
40734088

4074-
angular.module('schemaForm').directive('sfMaterialClass', sfMaterialClassDirective);
4075-
4076-
sfMaterialClassDirective.$inject = ['$compile', '$timeout'];
4077-
4078-
function sfMaterialClassDirective($compile, $timeout) {
4089+
angular.module('schemaForm').directive('sfMaterialClass', function ($compile, $timeout) {
40794090
return {
40804091
restrict: 'A',
40814092
scope: false,
@@ -4100,7 +4111,7 @@ return /******/ (function(modules) { // webpackBootstrap
41004111
}, 0);
41014112
}
41024113
};
4103-
}
4114+
});
41044115

41054116
/***/ }
41064117
/******/ ])

0 commit comments

Comments
 (0)