11/*!
2- * angular-formly JavaScript Library v8.3 .0
2+ * angular-formly JavaScript Library v8.4 .0
33*
44* @license MIT (http://license.angular-formly.com)
55*
@@ -157,7 +157,7 @@ return /******/ (function(modules) { // webpackBootstrap
157157
158158 ngModule . constant ( 'formlyApiCheck' , _providersFormlyApiCheck2 [ 'default' ] ) ;
159159 ngModule . constant ( 'formlyErrorAndWarningsUrlPrefix' , _otherDocsBaseUrl2 [ 'default' ] ) ;
160- ngModule . constant ( 'formlyVersion' , ( "8.3 .0" ) ) ; // <-- webpack variable
160+ ngModule . constant ( 'formlyVersion' , ( "8.4 .0" ) ) ; // <-- webpack variable
161161
162162 ngModule . provider ( 'formlyUsability' , _providersFormlyUsability2 [ 'default' ] ) ;
163163 ngModule . provider ( 'formlyConfig' , _providersFormlyConfig2 [ 'default' ] ) ;
@@ -367,6 +367,7 @@ return /******/ (function(modules) { // webpackBootstrap
367367 resetModel : apiCheck . func . optional ,
368368 updateInitialValue : apiCheck . func . optional ,
369369 removeChromeAutoComplete : apiCheck . bool . optional ,
370+ parseKeyArrays : apiCheck . bool . optional ,
370371 templateManipulators : templateManipulators . optional ,
371372 manualModelWatcher : apiCheck . oneOfType ( [ apiCheck . bool , apiCheck . func ] ) . optional ,
372373 watchAllExpressions : apiCheck . bool . optional ,
@@ -435,7 +436,7 @@ return /******/ (function(modules) { // webpackBootstrap
435436 Object . defineProperty ( exports , "__esModule" , {
436437 value : true
437438 } ) ;
438- exports [ "default" ] = "https://github.com/formly-js/angular-formly/blob/" + ( "8.3 .0" ) + "/other/ERRORS_AND_WARNINGS.md#" ;
439+ exports [ "default" ] = "https://github.com/formly-js/angular-formly/blob/" + ( "8.4 .0" ) + "/other/ERRORS_AND_WARNINGS.md#" ;
439440 module . exports = exports [ "default" ] ;
440441
441442/***/ } ,
@@ -564,6 +565,7 @@ return /******/ (function(modules) { // webpackBootstrap
564565 fieldTransform : [ ] ,
565566 ngModelAttrsManipulatorPreferUnbound : false ,
566567 removeChromeAutoComplete : false ,
568+ parseKeyArrays : false ,
567569 defaultHideDirective : 'ng-if' ,
568570 getFieldId : null
569571 } ,
@@ -1249,7 +1251,7 @@ return /******/ (function(modules) { // webpackBootstrap
12491251
12501252 // @ngInject
12511253 function FormlyFieldController ( $scope , $timeout , $parse , $controller , formlyValidationMessages ) {
1252- /* eslint max-statements:[2, 34 ] */
1254+ /* eslint max-statements:[2, 37 ] */
12531255 if ( $scope . options . fieldGroup ) {
12541256 setupFieldGroup ( ) ;
12551257 return ;
@@ -1324,6 +1326,25 @@ return /******/ (function(modules) { // webpackBootstrap
13241326 return _angularFix2 [ 'default' ] . isNumber ( key ) || ! formlyUtil . containsSelector ( key ) ;
13251327 }
13261328
1329+ function keyContainsArrays ( key ) {
1330+ return ( / \[ \d { 1 , } \] / . test ( key )
1331+ ) ;
1332+ }
1333+
1334+ function deepAssign ( obj , prop , value ) {
1335+ if ( _angularFix2 [ 'default' ] . isString ( prop ) ) {
1336+ prop = prop . replace ( / \[ ( \w + ) \] / g, '.$1' ) . split ( '.' ) ;
1337+ }
1338+
1339+ if ( prop . length > 1 ) {
1340+ var e = prop . shift ( ) ;
1341+ obj [ e ] = obj [ e ] || isNaN ( prop [ 0 ] ) ? { } : [ ] ;
1342+ deepAssign ( obj [ e ] , prop , value ) ;
1343+ } else {
1344+ obj [ prop [ 0 ] ] = value ;
1345+ }
1346+ }
1347+
13271348 function parseSet ( key , model , newVal ) {
13281349 // If either of these are null/undefined then just return undefined
13291350 if ( ! key && key !== 0 || ! model ) {
@@ -1333,6 +1354,8 @@ return /******/ (function(modules) { // webpackBootstrap
13331354 if ( shouldNotUseParseKey ( key ) ) {
13341355 // TODO: Fix this so we can get several levels instead of just one with properties that are numeric
13351356 model [ key ] = newVal ;
1357+ } else if ( formlyConfig . extras . parseKeyArrays && keyContainsArrays ( key ) ) {
1358+ deepAssign ( $scope . model , key , newVal ) ;
13361359 } else {
13371360 var setter = $parse ( $scope . options . key ) . assign ;
13381361 if ( setter ) {
0 commit comments