1
1
/*!
2
2
* angular-schema-form-bootstrap
3
3
* @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
5
5
* @link https://github.com/json-schema-form/angular-schema-form-bootstrap
6
6
* @license MIT
7
7
* Copyright (c) 2014-2017 JSON Schema Form
@@ -434,24 +434,24 @@ function bootstrapDecoratorConfig(
434
434
var defaults = [ sfField , ngModel , ngModelOptions , condition ] ;
435
435
decoratorsProvider . defineDecorator ( 'bootstrapDecorator' , {
436
436
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 ] } ,
438
438
button : { template : __WEBPACK_IMPORTED_MODULE_12__bootstrap_submit_html___default . a , builder : defaults } ,
439
439
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 ] } ,
442
442
'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 ] } ,
444
444
help : { template : __WEBPACK_IMPORTED_MODULE_6__bootstrap_help_html___default . a , builder : defaults } ,
445
445
number : { template : __WEBPACK_IMPORTED_MODULE_4__bootstrap_default_html___default . a , builder : defaults . concat ( numeric ) } ,
446
446
password : { template : __WEBPACK_IMPORTED_MODULE_4__bootstrap_default_html___default . a , builder : defaults } ,
447
447
radios : { template : __WEBPACK_IMPORTED_MODULE_8__bootstrap_radios_html___default . a , builder : defaults } ,
448
448
'radios-inline' : { template : __WEBPACK_IMPORTED_MODULE_9__bootstrap_radios_inline_html___default . a , builder : defaults } ,
449
449
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 ) } ,
452
452
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 ] } ,
455
455
textarea : { template : __WEBPACK_IMPORTED_MODULE_15__bootstrap_textarea_html___default . a , builder : defaults } ,
456
456
} , [ ] ) ;
457
457
} ;
@@ -464,7 +464,7 @@ function bootstrapDecoratorConfig(
464
464
/* WEBPACK VAR INJECTION */ ( function ( setImmediate , clearImmediate ) { /*!
465
465
* angular-schema-form
466
466
* @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
468
468
* @link https://github.com/json-schema-form/angular-schema-form
469
469
* @license MIT
470
470
* Copyright (c) 2014-2017 JSON Schema Form
@@ -534,7 +534,7 @@ function bootstrapDecoratorConfig(
534
534
/******/ __webpack_require__ . p = "" ;
535
535
/******/
536
536
/******/ // Load entry module and return exports
537
- /******/ return __webpack_require__ ( __webpack_require__ . s = 19 ) ;
537
+ /******/ return __webpack_require__ ( __webpack_require__ . s = 21 ) ;
538
538
/******/ } )
539
539
/************************************************************************/
540
540
/******/ ( [
@@ -549,8 +549,8 @@ module.exports = angular;
549
549
550
550
/* WEBPACK VAR INJECTION */ ( function ( global , setImmediate ) { /*!
551
551
* 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
554
554
* @link https://github.com/json-schema-form/json-schema-form-core
555
555
* @license MIT
556
556
* Copyright (c) 2014-2017 JSON Schema Form
@@ -3059,7 +3059,7 @@ function validate(form, value) {
3059
3059
} ;
3060
3060
3061
3061
var valueWrap = { } ;
3062
- if ( ! ! value ) {
3062
+ if ( typeof value !== 'undefined' ) {
3063
3063
valueWrap [ propName ] = value ;
3064
3064
} ;
3065
3065
@@ -3192,7 +3192,7 @@ module.exports = __webpack_require__(4);
3192
3192
/***/ } )
3193
3193
/******/ ] ) ;
3194
3194
//# 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 ) )
3196
3196
3197
3197
/***/ } ) ,
3198
3198
/* 2 */
@@ -3222,7 +3222,8 @@ module.exports = g;
3222
3222
3223
3223
3224
3224
/***/ } ) ,
3225
- /* 3 */
3225
+ /* 3 */ ,
3226
+ /* 4 */
3226
3227
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
3227
3228
3228
3229
"use strict" ;
@@ -3231,18 +3232,18 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
3231
3232
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_json_schema_form_core___default = __webpack_require__ . n ( __WEBPACK_IMPORTED_MODULE_0_json_schema_form_core__ ) ;
3232
3233
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_angular__ = __webpack_require__ ( 0 ) ;
3233
3234
/* 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 ) ;
3246
3247
3247
3248
3248
3249
@@ -3296,7 +3297,7 @@ __WEBPACK_IMPORTED_MODULE_1_angular___default.a.module('schemaForm', deps)
3296
3297
. 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 */ ] ] ) ;
3297
3298
3298
3299
/***/ } ) ,
3299
- /* 4 */
3300
+ /* 5 */
3300
3301
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
3301
3302
3302
3303
"use strict" ;
@@ -3486,7 +3487,7 @@ __WEBPACK_IMPORTED_MODULE_1_angular___default.a.module('schemaForm', deps)
3486
3487
} ;
3487
3488
3488
3489
/***/ } ) ,
3489
- /* 5 */
3490
+ /* 6 */
3490
3491
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
3491
3492
3492
3493
"use strict" ;
@@ -3653,12 +3654,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3653
3654
} ) ;
3654
3655
}
3655
3656
}
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
- }
3661
3657
} 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
+ }
3662
3665
// No type? could still have defaults.
3663
3666
if ( ! scope . options || scope . options . setSchemaDefaults !== false ) {
3664
3667
empty = items [ 'default' ] || empty ;
@@ -3693,6 +3696,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3693
3696
}
3694
3697
} ;
3695
3698
} ;
3699
+
3696
3700
var formDefCache = { } ;
3697
3701
scope . copyWithIndex = function ( index ) {
3698
3702
var form = scope . form ;
@@ -3730,7 +3734,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3730
3734
} ;
3731
3735
3732
3736
/***/ } ) ,
3733
- /* 6 */
3737
+ /* 7 */
3734
3738
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
3735
3739
3736
3740
"use strict" ;
@@ -3776,7 +3780,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3776
3780
} ;
3777
3781
3778
3782
/***/ } ) ,
3779
- /* 7 */
3783
+ /* 8 */
3780
3784
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
3781
3785
3782
3786
"use strict" ;
@@ -4064,7 +4068,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4064
4068
var arrayIndex = typeof scope . arrayIndex == 'number' ? scope . arrayIndex + 1 : 0 ;
4065
4069
4066
4070
// 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 ) {
4068
4072
var destroyStrategy = form . destroyStrategy || scope . options && scope . options . destroyStrategy || 'remove' ;
4069
4073
// No key no model, and we might have strategy 'retain'
4070
4074
if ( key && destroyStrategy !== 'retain' ) {
@@ -4075,6 +4079,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4075
4079
obj = sfSelect ( key . slice ( 0 , key . length - 1 ) , obj ) ;
4076
4080
}
4077
4081
4082
+ if ( obj && scope . destroyed && obj . $$hashKey && obj . $$hashKey !== scope . destroyed ) {
4083
+ return ;
4084
+ }
4085
+
4078
4086
// We can get undefined here if the form hasn't been filled out entirely
4079
4087
if ( obj === undefined ) {
4080
4088
return ;
@@ -4106,7 +4114,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4106
4114
} ;
4107
4115
4108
4116
/***/ } ) ,
4109
- /* 8 */
4117
+ /* 9 */
4110
4118
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
4111
4119
4112
4120
"use strict" ;
@@ -4145,7 +4153,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4145
4153
} ; ;
4146
4154
4147
4155
/***/ } ) ,
4148
- /* 9 */
4156
+ /* 10 */
4149
4157
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
4150
4158
4151
4159
"use strict" ;
@@ -4249,7 +4257,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4249
4257
} ;
4250
4258
4251
4259
/***/ } ) ,
4252
- /* 10 */
4260
+ /* 11 */
4253
4261
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
4254
4262
4255
4263
"use strict" ;
@@ -4479,7 +4487,7 @@ FIXME: real documentation
4479
4487
} ;
4480
4488
4481
4489
/***/ } ) ,
4482
- /* 11 */
4490
+ /* 12 */
4483
4491
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
4484
4492
4485
4493
"use strict" ;
@@ -5022,7 +5030,7 @@ FIXME: real documentation
5022
5030
} ; ;
5023
5031
5024
5032
/***/ } ) ,
5025
- /* 12 */
5033
+ /* 13 */
5026
5034
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
5027
5035
5028
5036
"use strict" ;
@@ -5161,7 +5169,7 @@ FIXME: real documentation
5161
5169
} ;
5162
5170
5163
5171
/***/ } ) ,
5164
- /* 13 */
5172
+ /* 14 */
5165
5173
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
5166
5174
5167
5175
"use strict" ;
@@ -5489,7 +5497,7 @@ FIXME: real documentation
5489
5497
} ;
5490
5498
5491
5499
/***/ } ) ,
5492
- /* 14 */
5500
+ /* 15 */
5493
5501
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
5494
5502
5495
5503
"use strict" ;
@@ -5626,7 +5634,7 @@ FIXME: real documentation
5626
5634
} ;
5627
5635
5628
5636
/***/ } ) ,
5629
- /* 15 */
5637
+ /* 16 */
5630
5638
/***/ ( function ( module , __webpack_exports__ , __webpack_require__ ) {
5631
5639
5632
5640
"use strict" ;
@@ -5666,7 +5674,7 @@ var sfPathProviderClass = function () {
5666
5674
/* harmony default export */ __webpack_exports__ [ "a" ] = sfPathProviderClass ;
5667
5675
5668
5676
/***/ } ) ,
5669
- /* 16 */
5677
+ /* 17 */
5670
5678
/***/ ( function ( module , exports ) {
5671
5679
5672
5680
// shim for using process in browser
@@ -5852,7 +5860,7 @@ process.umask = function() { return 0; };
5852
5860
5853
5861
5854
5862
/***/ } ) ,
5855
- /* 17 */
5863
+ /* 18 */
5856
5864
/***/ ( function ( module , exports , __webpack_require__ ) {
5857
5865
5858
5866
/* WEBPACK VAR INJECTION */ ( function ( global , process ) { ( function ( global , undefined ) {
@@ -6042,10 +6050,10 @@ process.umask = function() { return 0; };
6042
6050
attachTo . clearImmediate = clearImmediate ;
6043
6051
} ( typeof self === "undefined" ? typeof global === "undefined" ? this : global : self ) ) ;
6044
6052
6045
- /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 2 ) , __webpack_require__ ( 16 ) ) )
6053
+ /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 2 ) , __webpack_require__ ( 17 ) ) )
6046
6054
6047
6055
/***/ } ) ,
6048
- /* 18 */
6056
+ /* 19 */
6049
6057
/***/ ( function ( module , exports , __webpack_require__ ) {
6050
6058
6051
6059
var apply = Function . prototype . apply ;
@@ -6098,17 +6106,18 @@ exports._unrefActive = exports.active = function(item) {
6098
6106
} ;
6099
6107
6100
6108
// setimmediate attaches itself to the global object
6101
- __webpack_require__ ( 17 ) ;
6109
+ __webpack_require__ ( 18 ) ;
6102
6110
exports . setImmediate = setImmediate ;
6103
6111
exports . clearImmediate = clearImmediate ;
6104
6112
6105
6113
6106
6114
/***/ } ) ,
6107
- /* 19 */
6115
+ /* 20 */ ,
6116
+ /* 21 */
6108
6117
/***/ ( function ( module , exports , __webpack_require__ ) {
6109
6118
6110
6119
__webpack_require__ ( 1 ) ;
6111
- module . exports = __webpack_require__ ( 3 ) ;
6120
+ module . exports = __webpack_require__ ( 4 ) ;
6112
6121
6113
6122
6114
6123
/***/ } )
0 commit comments