ngx-smz-ui 3.4.14 → 3.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11765,6 +11765,29 @@
11765
11765
  _loop_5(i);
11766
11766
  }
11767
11767
  }
11768
+ // Apply templates if the options are available
11769
+ if (options != null && options.fieldsToOverwriteControl) {
11770
+ var groupIndex = 0;
11771
+ if (groups.length === 1) {
11772
+ groupIndex = 0;
11773
+ }
11774
+ else if (groups.length > 1 && groups[0].controls.length === 1 && groups[0].controls[0].propertyName === 'id') {
11775
+ groupIndex = 1;
11776
+ }
11777
+ else {
11778
+ throw new Error("Multiple groups are not supported with the reorder option");
11779
+ }
11780
+ var _loop_6 = function (i) {
11781
+ var item = form.groups[groupIndex].children.find(function (x) { return x.propertyName === options.fieldsToOverwriteControl[i].propertyName; });
11782
+ if (item == null) {
11783
+ throw new Error("Could not find control '" + options.fieldsToOverwriteControl[i].propertyName + "' for templating");
11784
+ }
11785
+ options.fieldsToOverwriteControl[i].callback(item);
11786
+ };
11787
+ for (var i = 0; i < options.fieldsToOverwriteControl.length; i++) {
11788
+ _loop_6(i);
11789
+ }
11790
+ }
11768
11791
  return smzFeature;
11769
11792
  }
11770
11793
  function convertInputs(inputs, store, options) {
@@ -11773,7 +11796,7 @@
11773
11796
  var results = [];
11774
11797
  if (inputs == null)
11775
11798
  throw new Error('Inputs could not be null');
11776
- var _loop_6 = function (config) {
11799
+ var _loop_7 = function (config) {
11777
11800
  if (rbkConfig.debugMode) {
11778
11801
  console.groupCollapsed(config.propertyName);
11779
11802
  console.log('config', config);
@@ -11860,7 +11883,7 @@
11860
11883
  try {
11861
11884
  for (var inputs_1 = __values(inputs), inputs_1_1 = inputs_1.next(); !inputs_1_1.done; inputs_1_1 = inputs_1.next()) {
11862
11885
  var config = inputs_1_1.value;
11863
- _loop_6(config);
11886
+ _loop_7(config);
11864
11887
  }
11865
11888
  }
11866
11889
  catch (e_5_1) { e_5 = { error: e_5_1 }; }