Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dad0be4

Browse files
Fixes #41 thanks to @ramakrij
1 parent 34cfa6c commit dad0be4

5 files changed

+89
-80
lines changed

‎dist/angular-schema-form-bootstrap-bundled.js

Lines changed: 62 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-schema-form-bootstrap
33
* @version 1.0.0-alpha.4
4-
* @date Mon, 03 Apr 2017 13:11:24 GMT
4+
* @date Mon, 17 Apr 2017 08:57:43 GMT
55
* @link https://github.com/json-schema-form/angular-schema-form-bootstrap
66
* @license MIT
77
* Copyright (c) 2014-2017 JSON Schema Form
@@ -434,24 +434,24 @@ function bootstrapDecoratorConfig(
434434
var defaults = [sfField, ngModel, ngModelOptions, condition];
435435
decoratorsProvider.defineDecorator('bootstrapDecorator', {
436436
actions: {template: __WEBPACK_IMPORTED_MODULE_0__bootstrap_actions_html___default.a, builder: defaults},
437-
array: {template: __WEBPACK_IMPORTED_MODULE_1__bootstrap_array_html___default.a, builder: [sfField, ngModelOptions, ngModel, array, condition]},
437+
array: {template: __WEBPACK_IMPORTED_MODULE_1__bootstrap_array_html___default.a, builder: [sfField, ngModelOptions, ngModel, array, condition]},
438438
button: {template: __WEBPACK_IMPORTED_MODULE_12__bootstrap_submit_html___default.a, builder: defaults},
439439
checkbox: {template: __WEBPACK_IMPORTED_MODULE_2__bootstrap_checkbox_html___default.a, builder: defaults},
440-
checkboxes: {template: __WEBPACK_IMPORTED_MODULE_3__bootstrap_checkboxes_html___default.a, builder: [sfField, ngModelOptions, ngModel, array, condition]},
441-
conditional: {template: __WEBPACK_IMPORTED_MODULE_10__bootstrap_section_html___default.a, builder: [sfField, simpleTransclusion, condition]},
440+
checkboxes: {template: __WEBPACK_IMPORTED_MODULE_3__bootstrap_checkboxes_html___default.a, builder: [sfField, ngModelOptions, ngModel, array, condition]},
441+
conditional: {template: __WEBPACK_IMPORTED_MODULE_10__bootstrap_section_html___default.a, builder: [sfField, simpleTransclusion, condition]},
442442
'default': {template: __WEBPACK_IMPORTED_MODULE_4__bootstrap_default_html___default.a, builder: defaults},
443-
fieldset: {template: __WEBPACK_IMPORTED_MODULE_5__bootstrap_fieldset_html___default.a, builder: [sfField, simpleTransclusion, condition]},
443+
fieldset: {template: __WEBPACK_IMPORTED_MODULE_5__bootstrap_fieldset_html___default.a, builder: [sfField, simpleTransclusion, condition]},
444444
help: {template: __WEBPACK_IMPORTED_MODULE_6__bootstrap_help_html___default.a, builder: defaults},
445445
number: {template: __WEBPACK_IMPORTED_MODULE_4__bootstrap_default_html___default.a, builder: defaults.concat(numeric)},
446446
password: {template: __WEBPACK_IMPORTED_MODULE_4__bootstrap_default_html___default.a, builder: defaults},
447447
radios: {template: __WEBPACK_IMPORTED_MODULE_8__bootstrap_radios_html___default.a, builder: defaults},
448448
'radios-inline': {template: __WEBPACK_IMPORTED_MODULE_9__bootstrap_radios_inline_html___default.a, builder: defaults},
449449
radiobuttons: {template: __WEBPACK_IMPORTED_MODULE_7__bootstrap_radio_buttons_html___default.a, builder: defaults},
450-
section: {template: __WEBPACK_IMPORTED_MODULE_10__bootstrap_section_html___default.a, builder: [sfField, simpleTransclusion, condition]},
451-
select: {template: __WEBPACK_IMPORTED_MODULE_11__bootstrap_select_html___default.a, builder: defaults.concat(selectPlaceholder)},
450+
section: {template: __WEBPACK_IMPORTED_MODULE_10__bootstrap_section_html___default.a, builder: [sfField, simpleTransclusion, condition]},
451+
select: {template: __WEBPACK_IMPORTED_MODULE_11__bootstrap_select_html___default.a, builder: [selectPlaceholder].concat(defaults)},
452452
submit: {template: __WEBPACK_IMPORTED_MODULE_12__bootstrap_submit_html___default.a, builder: defaults},
453-
tabarray: {template: __WEBPACK_IMPORTED_MODULE_13__bootstrap_tabarray_html___default.a, builder: [sfField, ngModelOptions, ngModel, array, condition]},
454-
tabs: {template: __WEBPACK_IMPORTED_MODULE_14__bootstrap_tabs_html___default.a, builder: [sfField, ngModelOptions, tabs, condition]},
453+
tabarray: {template: __WEBPACK_IMPORTED_MODULE_13__bootstrap_tabarray_html___default.a, builder: [sfField, ngModelOptions, ngModel, array, condition]},
454+
tabs: {template: __WEBPACK_IMPORTED_MODULE_14__bootstrap_tabs_html___default.a, builder: [sfField, ngModelOptions, tabs, condition]},
455455
textarea: {template: __WEBPACK_IMPORTED_MODULE_15__bootstrap_textarea_html___default.a, builder: defaults},
456456
}, []);
457457
};
@@ -464,7 +464,7 @@ function bootstrapDecoratorConfig(
464464
/* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {/*!
465465
* angular-schema-form
466466
* @version 1.0.0-alpha.4
467-
* @date Mon, 03 Apr 2017 12:57:49 GMT
467+
* @date Mon, 17 Apr 2017 08:55:13 GMT
468468
* @link https://github.com/json-schema-form/angular-schema-form
469469
* @license MIT
470470
* Copyright (c) 2014-2017 JSON Schema Form
@@ -534,7 +534,7 @@ function bootstrapDecoratorConfig(
534534
/******/ __webpack_require__.p = "";
535535
/******/
536536
/******/ // Load entry module and return exports
537-
/******/ return __webpack_require__(__webpack_require__.s = 19);
537+
/******/ return __webpack_require__(__webpack_require__.s = 21);
538538
/******/ })
539539
/************************************************************************/
540540
/******/ ([
@@ -549,8 +549,8 @@ module.exports = angular;
549549

550550
/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*!
551551
* json-schema-form-core
552-
* @version 1.0.0-alpha.3
553-
* @date Mon, 27 Mar 2017 13:05:31 GMT
552+
* @version 1.0.0-alpha.4
553+
* @date Sat, 15 Apr 2017 08:25:55 GMT
554554
* @link https://github.com/json-schema-form/json-schema-form-core
555555
* @license MIT
556556
* Copyright (c) 2014-2017 JSON Schema Form
@@ -3059,7 +3059,7 @@ function validate(form, value) {
30593059
};
30603060

30613061
var valueWrap = {};
3062-
if (!!value) {
3062+
if (typeofvalue!=='undefined') {
30633063
valueWrap[propName] = value;
30643064
};
30653065

@@ -3192,7 +3192,7 @@ module.exports = __webpack_require__(4);
31923192
/***/ })
31933193
/******/ ]);
31943194
//# sourceMappingURL=json-schema-form-core.js.map
3195-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(18).setImmediate))
3195+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(19).setImmediate))
31963196

31973197
/***/ }),
31983198
/* 2 */
@@ -3222,7 +3222,8 @@ module.exports = g;
32223222

32233223

32243224
/***/ }),
3225-
/* 3 */
3225+
/* 3 */,
3226+
/* 4 */
32263227
/***/ (function(module, __webpack_exports__, __webpack_require__) {
32273228

32283229
"use strict";
@@ -3231,18 +3232,18 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
32313232
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_json_schema_form_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_json_schema_form_core__);
32323233
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_angular__ = __webpack_require__(0);
32333234
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_angular__);
3234-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_sf_builder_provider__ = __webpack_require__(13);
3235-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_schema_form_decorators_provider__ = __webpack_require__(11);
3236-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_schema_form_provider__ = __webpack_require__(12);
3237-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_sf_error_message_provider__ = __webpack_require__(14);
3238-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_sf_path_provider__ = __webpack_require__(15);
3239-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_sf_changed_directive__ = __webpack_require__(6);
3240-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_sf_field_directive__ = __webpack_require__(7);
3241-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_sf_message_directive__ = __webpack_require__(9);
3242-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_sf_array_directive__ = __webpack_require__(5);
3243-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_sf_key_directive__ = __webpack_require__(8);
3244-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_sf_schema_directive__ = __webpack_require__(10);
3245-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_schema_validate_directive__ = __webpack_require__(4);
3235+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_sf_builder_provider__ = __webpack_require__(14);
3236+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_schema_form_decorators_provider__ = __webpack_require__(12);
3237+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_schema_form_provider__ = __webpack_require__(13);
3238+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_sf_error_message_provider__ = __webpack_require__(15);
3239+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_sf_path_provider__ = __webpack_require__(16);
3240+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_sf_changed_directive__ = __webpack_require__(7);
3241+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_sf_field_directive__ = __webpack_require__(8);
3242+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_sf_message_directive__ = __webpack_require__(10);
3243+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_sf_array_directive__ = __webpack_require__(6);
3244+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_sf_key_directive__ = __webpack_require__(9);
3245+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_sf_schema_directive__ = __webpack_require__(11);
3246+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_schema_validate_directive__ = __webpack_require__(5);
32463247

32473248

32483249

@@ -3296,7 +3297,7 @@ __WEBPACK_IMPORTED_MODULE_1_angular___default.a.module('schemaForm', deps)
32963297
.directive('sfChanged', __WEBPACK_IMPORTED_MODULE_7_sf_changed_directive__["a" /* default */]).directive('sfField', ['$parse', '$compile', '$http', '$templateCache', '$interpolate', '$q', 'sfErrorMessage', 'sfPath', 'sfSelect', __WEBPACK_IMPORTED_MODULE_8_sf_field_directive__["a" /* default */]]).directive('sfMessage', ['$injector', 'sfErrorMessage', __WEBPACK_IMPORTED_MODULE_9_sf_message_directive__["a" /* default */]]).directive('sfNewArray', ['sfSelect', 'sfPath', 'schemaForm', __WEBPACK_IMPORTED_MODULE_10_sf_array_directive__["a" /* default */]]).directive('sfSchema', ['$compile', '$http', '$templateCache', '$q', 'schemaForm', 'schemaFormDecorators', 'sfSelect', 'sfPath', 'sfBuilder', __WEBPACK_IMPORTED_MODULE_12_sf_schema_directive__["a" /* default */]]).directive('schemaValidate', ['sfValidator', '$parse', 'sfSelect', __WEBPACK_IMPORTED_MODULE_13_schema_validate_directive__["a" /* default */]]).directive('sfKeyController', ['schemaForm', 'sfPath', __WEBPACK_IMPORTED_MODULE_11_sf_key_directive__["a" /* default */]]);
32973298

32983299
/***/ }),
3299-
/* 4 */
3300+
/* 5 */
33003301
/***/ (function(module, __webpack_exports__, __webpack_require__) {
33013302

33023303
"use strict";
@@ -3486,7 +3487,7 @@ __WEBPACK_IMPORTED_MODULE_1_angular___default.a.module('schemaForm', deps)
34863487
};
34873488

34883489
/***/ }),
3489-
/* 5 */
3490+
/* 6 */
34903491
/***/ (function(module, __webpack_exports__, __webpack_require__) {
34913492

34923493
"use strict";
@@ -3653,12 +3654,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
36533654
});
36543655
}
36553656
}
3656-
} else if (items.type && items.type.indexOf('array') !== -1) {
3657-
empty = [];
3658-
if (!scope.options || scope.options.setSchemaDefaults !== false) {
3659-
empty = items['default'] || empty;
3660-
}
36613657
} else {
3658+
if (items.type) {
3659+
if (items.type.indexOf('array') !== -1) {
3660+
empty = [];
3661+
} else if (items.type.indexOf('string') !== -1 || items.type.indexOf('number') !== -1) {
3662+
empty = '';
3663+
}
3664+
}
36623665
// No type? could still have defaults.
36633666
if (!scope.options || scope.options.setSchemaDefaults !== false) {
36643667
empty = items['default'] || empty;
@@ -3693,6 +3696,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
36933696
}
36943697
};
36953698
};
3699+
36963700
var formDefCache = {};
36973701
scope.copyWithIndex = function (index) {
36983702
var form = scope.form;
@@ -3730,7 +3734,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
37303734
};
37313735

37323736
/***/ }),
3733-
/* 6 */
3737+
/* 7 */
37343738
/***/ (function(module, __webpack_exports__, __webpack_require__) {
37353739

37363740
"use strict";
@@ -3776,7 +3780,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
37763780
};
37773781

37783782
/***/ }),
3779-
/* 7 */
3783+
/* 8 */
37803784
/***/ (function(module, __webpack_exports__, __webpack_require__) {
37813785

37823786
"use strict";
@@ -4064,7 +4068,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
40644068
var arrayIndex = typeof scope.arrayIndex == 'number' ? scope.arrayIndex + 1 : 0;
40654069

40664070
// If the entire schema form is destroyed we don't touch the model
4067-
if (!scope.externalDestructionInProgress&&(!scope.model.$$hashKey||scope.model.$$hashKey===scope.destroyed)) {
4071+
if (!scope.externalDestructionInProgress) {
40684072
var destroyStrategy = form.destroyStrategy || scope.options && scope.options.destroyStrategy || 'remove';
40694073
// No key no model, and we might have strategy 'retain'
40704074
if (key && destroyStrategy !== 'retain') {
@@ -4075,6 +4079,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
40754079
obj = sfSelect(key.slice(0, key.length - 1), obj);
40764080
}
40774081

4082+
if (obj && scope.destroyed && obj.$$hashKey && obj.$$hashKey !== scope.destroyed) {
4083+
return;
4084+
}
4085+
40784086
// We can get undefined here if the form hasn't been filled out entirely
40794087
if (obj === undefined) {
40804088
return;
@@ -4106,7 +4114,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
41064114
};
41074115

41084116
/***/ }),
4109-
/* 8 */
4117+
/* 9 */
41104118
/***/ (function(module, __webpack_exports__, __webpack_require__) {
41114119

41124120
"use strict";
@@ -4145,7 +4153,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
41454153
};;
41464154

41474155
/***/ }),
4148-
/* 9 */
4156+
/* 10 */
41494157
/***/ (function(module, __webpack_exports__, __webpack_require__) {
41504158

41514159
"use strict";
@@ -4249,7 +4257,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
42494257
};
42504258

42514259
/***/ }),
4252-
/* 10 */
4260+
/* 11 */
42534261
/***/ (function(module, __webpack_exports__, __webpack_require__) {
42544262

42554263
"use strict";
@@ -4479,7 +4487,7 @@ FIXME: real documentation
44794487
};
44804488

44814489
/***/ }),
4482-
/* 11 */
4490+
/* 12 */
44834491
/***/ (function(module, __webpack_exports__, __webpack_require__) {
44844492

44854493
"use strict";
@@ -5022,7 +5030,7 @@ FIXME: real documentation
50225030
};;
50235031

50245032
/***/ }),
5025-
/* 12 */
5033+
/* 13 */
50265034
/***/ (function(module, __webpack_exports__, __webpack_require__) {
50275035

50285036
"use strict";
@@ -5161,7 +5169,7 @@ FIXME: real documentation
51615169
};
51625170

51635171
/***/ }),
5164-
/* 13 */
5172+
/* 14 */
51655173
/***/ (function(module, __webpack_exports__, __webpack_require__) {
51665174

51675175
"use strict";
@@ -5489,7 +5497,7 @@ FIXME: real documentation
54895497
};
54905498

54915499
/***/ }),
5492-
/* 14 */
5500+
/* 15 */
54935501
/***/ (function(module, __webpack_exports__, __webpack_require__) {
54945502

54955503
"use strict";
@@ -5626,7 +5634,7 @@ FIXME: real documentation
56265634
};
56275635

56285636
/***/ }),
5629-
/* 15 */
5637+
/* 16 */
56305638
/***/ (function(module, __webpack_exports__, __webpack_require__) {
56315639

56325640
"use strict";
@@ -5666,7 +5674,7 @@ var sfPathProviderClass = function () {
56665674
/* harmony default export */ __webpack_exports__["a"] = sfPathProviderClass;
56675675

56685676
/***/ }),
5669-
/* 16 */
5677+
/* 17 */
56705678
/***/ (function(module, exports) {
56715679

56725680
// shim for using process in browser
@@ -5852,7 +5860,7 @@ process.umask = function() { return 0; };
58525860

58535861

58545862
/***/ }),
5855-
/* 17 */
5863+
/* 18 */
58565864
/***/ (function(module, exports, __webpack_require__) {
58575865

58585866
/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
@@ -6042,10 +6050,10 @@ process.umask = function() { return 0; };
60426050
attachTo.clearImmediate = clearImmediate;
60436051
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
60446052

6045-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(16)))
6053+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(17)))
60466054

60476055
/***/ }),
6048-
/* 18 */
6056+
/* 19 */
60496057
/***/ (function(module, exports, __webpack_require__) {
60506058

60516059
var apply = Function.prototype.apply;
@@ -6098,17 +6106,18 @@ exports._unrefActive = exports.active = function(item) {
60986106
};
60996107

61006108
// setimmediate attaches itself to the global object
6101-
__webpack_require__(17);
6109+
__webpack_require__(18);
61026110
exports.setImmediate = setImmediate;
61036111
exports.clearImmediate = clearImmediate;
61046112

61056113

61066114
/***/ }),
6107-
/* 19 */
6115+
/* 20 */,
6116+
/* 21 */
61086117
/***/ (function(module, exports, __webpack_require__) {
61096118

61106119
__webpack_require__(1);
6111-
module.exports = __webpack_require__(3);
6120+
module.exports = __webpack_require__(4);
61126121

61136122

61146123
/***/ })

‎dist/angular-schema-form-bootstrap-bundled.min.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /