@formio/js 5.1.0-dev.6039.a838d78 → 5.1.0-dev.6042.18ef5d3

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.
Files changed (144) hide show
  1. package/Changelog.md +140 -6
  2. package/dist/formio.form.js +587 -576
  3. package/dist/formio.form.min.js +1 -1
  4. package/dist/formio.full.js +609 -598
  5. package/dist/formio.full.min.js +1 -1
  6. package/dist/formio.js +45 -12
  7. package/dist/formio.min.js +1 -1
  8. package/dist/formio.utils.js +46 -13
  9. package/dist/formio.utils.min.js +1 -1
  10. package/lib/cjs/Element.d.ts +2 -1
  11. package/lib/cjs/Element.js +6 -4
  12. package/lib/cjs/Webform.d.ts +2 -2
  13. package/lib/cjs/Webform.js +6 -8
  14. package/lib/cjs/WebformBuilder.js +4 -0
  15. package/lib/cjs/Wizard.d.ts +1 -0
  16. package/lib/cjs/Wizard.js +23 -3
  17. package/lib/cjs/components/_classes/component/Component.d.ts +27 -17
  18. package/lib/cjs/components/_classes/component/Component.js +124 -70
  19. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
  20. package/lib/cjs/components/_classes/component/editForm/utils.js +1 -1
  21. package/lib/cjs/components/_classes/list/ListComponent.js +2 -2
  22. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +0 -1
  23. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +13 -0
  24. package/lib/cjs/components/_classes/nested/NestedComponent.js +10 -18
  25. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
  26. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
  27. package/lib/cjs/components/address/Address.d.ts +9 -0
  28. package/lib/cjs/components/address/Address.js +31 -8
  29. package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +4 -0
  30. package/lib/cjs/components/address/editForm/Address.edit.display.js +1 -0
  31. package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -8
  32. package/lib/cjs/components/content/editForm/Content.edit.display.js +8 -0
  33. package/lib/cjs/components/currency/editForm/Currency.edit.display.js +12 -0
  34. package/lib/cjs/components/datagrid/DataGrid.js +0 -3
  35. package/lib/cjs/components/datamap/DataMap.js +2 -6
  36. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
  37. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
  38. package/lib/cjs/components/day/editForm/Day.edit.display.js +8 -0
  39. package/lib/cjs/components/editgrid/EditGrid.js +3 -13
  40. package/lib/cjs/components/email/editForm/Email.edit.display.js +12 -0
  41. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
  42. package/lib/cjs/components/file/File.js +7 -2
  43. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +13 -0
  44. package/lib/cjs/components/file/editForm/File.edit.file.js +1 -0
  45. package/lib/cjs/components/form/Form.js +11 -11
  46. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
  47. package/lib/cjs/components/html/HTML.js +1 -2
  48. package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
  49. package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
  50. package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
  51. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
  52. package/lib/cjs/components/radio/Radio.js +1 -1
  53. package/lib/cjs/components/select/Select.js +1 -1
  54. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +68 -110
  55. package/lib/cjs/components/select/editForm/Select.edit.data.js +2 -37
  56. package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -0
  57. package/lib/cjs/components/survey/Survey.js +1 -1
  58. package/lib/cjs/components/tabs/Tabs.js +1 -0
  59. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
  60. package/lib/cjs/components/textarea/TextArea.js +9 -1
  61. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
  62. package/lib/cjs/components/unknown/Unknown.form.d.ts +2 -1
  63. package/lib/cjs/components/unknown/Unknown.form.js +13 -9
  64. package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
  65. package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
  66. package/lib/cjs/formio.form.js +2 -2
  67. package/lib/cjs/providers/storage/uploadAdapter.js +5 -3
  68. package/lib/cjs/translations/en.d.ts +1 -234
  69. package/lib/cjs/translations/en.js +4 -2
  70. package/lib/cjs/utils/formUtils.d.ts +2 -2
  71. package/lib/cjs/utils/utils.d.ts +0 -8
  72. package/lib/cjs/utils/utils.js +3 -23
  73. package/lib/mjs/Element.d.ts +2 -1
  74. package/lib/mjs/Element.js +6 -4
  75. package/lib/mjs/Webform.d.ts +2 -2
  76. package/lib/mjs/Webform.js +6 -8
  77. package/lib/mjs/WebformBuilder.js +4 -0
  78. package/lib/mjs/Wizard.d.ts +1 -0
  79. package/lib/mjs/Wizard.js +22 -2
  80. package/lib/mjs/components/_classes/component/Component.d.ts +27 -17
  81. package/lib/mjs/components/_classes/component/Component.js +125 -71
  82. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
  83. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  84. package/lib/mjs/components/_classes/list/ListComponent.js +2 -2
  85. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +0 -1
  86. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
  87. package/lib/mjs/components/_classes/nested/NestedComponent.js +10 -18
  88. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
  89. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
  90. package/lib/mjs/components/address/Address.d.ts +9 -0
  91. package/lib/mjs/components/address/Address.js +31 -8
  92. package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +4 -0
  93. package/lib/mjs/components/address/editForm/Address.edit.display.js +1 -0
  94. package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
  95. package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
  96. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
  97. package/lib/mjs/components/datagrid/DataGrid.js +0 -3
  98. package/lib/mjs/components/datamap/DataMap.js +2 -6
  99. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
  100. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
  101. package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
  102. package/lib/mjs/components/editgrid/EditGrid.js +3 -12
  103. package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
  104. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
  105. package/lib/mjs/components/file/File.js +7 -2
  106. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +13 -0
  107. package/lib/mjs/components/file/editForm/File.edit.file.js +1 -0
  108. package/lib/mjs/components/form/Form.js +11 -11
  109. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
  110. package/lib/mjs/components/html/HTML.js +1 -2
  111. package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
  112. package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
  113. package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
  114. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
  115. package/lib/mjs/components/radio/Radio.js +1 -1
  116. package/lib/mjs/components/select/Select.js +1 -1
  117. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +68 -110
  118. package/lib/mjs/components/select/editForm/Select.edit.data.js +2 -37
  119. package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -0
  120. package/lib/mjs/components/survey/Survey.js +1 -1
  121. package/lib/mjs/components/tabs/Tabs.js +1 -0
  122. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
  123. package/lib/mjs/components/textarea/TextArea.js +9 -1
  124. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
  125. package/lib/mjs/components/unknown/Unknown.form.d.ts +2 -1
  126. package/lib/mjs/components/unknown/Unknown.form.js +13 -9
  127. package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
  128. package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
  129. package/lib/mjs/formio.form.js +1 -1
  130. package/lib/mjs/providers/storage/uploadAdapter.js +5 -3
  131. package/lib/mjs/translations/en.d.ts +1 -234
  132. package/lib/mjs/translations/en.js +3 -47
  133. package/lib/mjs/utils/formUtils.d.ts +2 -2
  134. package/lib/mjs/utils/utils.d.ts +0 -8
  135. package/lib/mjs/utils/utils.js +2 -21
  136. package/package.json +2 -2
  137. package/lib/cjs/i18n.d.ts +0 -13
  138. package/lib/cjs/i18n.js +0 -19
  139. package/lib/cjs/utils/i18n.d.ts +0 -19
  140. package/lib/cjs/utils/i18n.js +0 -120
  141. package/lib/mjs/i18n.d.ts +0 -13
  142. package/lib/mjs/i18n.js +0 -14
  143. package/lib/mjs/utils/i18n.d.ts +0 -19
  144. package/lib/mjs/utils/i18n.js +0 -112
@@ -81,6 +81,25 @@ exports.default = [
81
81
  }
82
82
  ]
83
83
  },
84
+ {
85
+ name: 'hide',
86
+ trigger: {
87
+ type: 'javascript',
88
+ javascript: 'result = instance.root.options.editJson === false;'
89
+ },
90
+ actions: [
91
+ {
92
+ name: 'hide',
93
+ type: 'property',
94
+ property: {
95
+ label: 'Hidden',
96
+ value: 'hidden',
97
+ type: 'boolean'
98
+ },
99
+ state: true
100
+ }
101
+ ]
102
+ },
84
103
  {
85
104
  name: 'disabledToolTip',
86
105
  trigger: {
@@ -11,7 +11,7 @@ const EditFormUtils = {
11
11
  },
12
12
  unifyComponents(objValue, srcValue) {
13
13
  if (objValue.key && srcValue.key) {
14
- if (objValue.skipMerge || srcValue.skipMerge) {
14
+ if ((objValue.skipMerge || srcValue.skipMerge) && !objValue.ignore) {
15
15
  return false;
16
16
  }
17
17
  if (objValue.key === srcValue.key) {
@@ -29,9 +29,9 @@ class ListComponent extends Field_1.default {
29
29
  get dataReady() {
30
30
  // If the root submission has been set, and we are still not attached, then assume
31
31
  // that our data is ready.
32
- if (this.root &&
32
+ if ((this.root &&
33
33
  this.root.submissionSet &&
34
- !this.attached) {
34
+ !this.attached) || !this.visible) {
35
35
  return Promise.resolve();
36
36
  }
37
37
  return this.itemsLoaded;
@@ -181,7 +181,6 @@ export default class NestedComponent extends Field {
181
181
  checkData(data: any, flags: any, row: any, components: any): true | undefined;
182
182
  checkConditions(data: any, flags: any, row: any): boolean;
183
183
  clearOnHide(show: any): void;
184
- restoreComponentsContext(): void;
185
184
  /**
186
185
  * Allow components to hook into the next page trigger to perform their own logic.
187
186
  * @param {Function} next - The callback to continue to the next page.
@@ -11,6 +11,19 @@ const Components_1 = __importDefault(require("../../Components"));
11
11
  */
12
12
  function default_1(...extend) {
13
13
  return Components_1.default.baseEditForm([
14
+ {
15
+ key: 'display',
16
+ components: [
17
+ {
18
+ key: 'labelWidth',
19
+ ignore: true
20
+ },
21
+ {
22
+ key: 'labelMargin',
23
+ ignore: true
24
+ }
25
+ ]
26
+ },
14
27
  {
15
28
  key: 'data',
16
29
  ignore: true
@@ -85,18 +85,15 @@ class NestedComponent extends Field_1.default {
85
85
  const visibilityChanged = this._visible !== value;
86
86
  this._visible = value;
87
87
  const isVisible = this.visible;
88
- const isConditionallyHidden = this.checkConditionallyHidden();
89
88
  const forceShow = this.shouldForceShow();
90
89
  const forceHide = this.shouldForceHide();
91
90
  this.components.forEach((component) => {
92
91
  // Set the parent visibility first since we may have nested components within nested components
93
92
  // and they need to be able to determine their visibility based on the parent visibility.
94
93
  component.parentVisible = isVisible;
95
- component._parentConditionallyHidden = isConditionallyHidden;
96
94
  let visible;
97
95
  if (component.hasCondition()) {
98
- component._conditionallyHidden = component.checkConditionallyHidden() || component._parentConditionallyHidden;
99
- visible = !component.conditionallyHidden;
96
+ visible = !component.conditionallyHidden();
100
97
  }
101
98
  else {
102
99
  visible = !component.component.hidden;
@@ -377,7 +374,6 @@ class NestedComponent extends Field_1.default {
377
374
  data = data || this.data;
378
375
  options.parent = this;
379
376
  options.parentVisible = this.visible;
380
- options.parentConditionallyHidden = this.conditionallyHidden;
381
377
  options.root = (options === null || options === void 0 ? void 0 : options.root) || this.root || this;
382
378
  options.localRoot = this.localRoot;
383
379
  options.skipInit = true;
@@ -635,19 +631,8 @@ class NestedComponent extends Field_1.default {
635
631
  }
636
632
  clearOnHide(show) {
637
633
  super.clearOnHide(show);
638
- if (this.component.clearOnHide) {
639
- if (this.allowData && !this.hasValue() && !this.conditionallyHidden) {
640
- this.dataValue = this.defaultValue;
641
- }
642
- if (this.hasValue()) {
643
- this.restoreComponentsContext();
644
- }
645
- }
646
634
  this.getComponents().forEach(component => component.clearOnHide(show));
647
635
  }
648
- restoreComponentsContext() {
649
- this.getComponents().forEach((component) => component.data = this.dataValue);
650
- }
651
636
  /**
652
637
  * Allow components to hook into the next page trigger to perform their own logic.
653
638
  * @param {Function} next - The callback to continue to the next page.
@@ -665,7 +650,7 @@ class NestedComponent extends Field_1.default {
665
650
  }
666
651
  calculateValue(data, flags, row) {
667
652
  // Do not iterate into children and calculateValues if this nested component is conditionally hidden.
668
- if (this.conditionallyHidden) {
653
+ if (this.conditionallyHidden()) {
669
654
  return false;
670
655
  }
671
656
  return this.getComponents().reduce((changed, comp) => comp.calculateValue(data, flags, row) || changed, super.calculateValue(data, flags, row));
@@ -836,7 +821,7 @@ class NestedComponent extends Field_1.default {
836
821
  else if (value && component.hasValue(value)) {
837
822
  return component.setValue(lodash_1.default.get(value, component.key), flags);
838
823
  }
839
- else if ((!this.rootPristine || component.visible) && component.shouldAddDefaultValue) {
824
+ else if ((!this.rootPristine || component.visible) && (flags.resetValue || component.shouldAddDefaultValue)) {
840
825
  flags.noValidate = !flags.dirty;
841
826
  flags.resetValue = true;
842
827
  return component.setValue(component.defaultValue, flags);
@@ -846,6 +831,13 @@ class NestedComponent extends Field_1.default {
846
831
  if (!value) {
847
832
  return false;
848
833
  }
834
+ // If the value is equal to the empty value, then this means we need to reset the values.
835
+ if (lodash_1.default.isEqual(value, this.emptyValue)) {
836
+ // TO-DO: For a future major release, we need to investigate removing the need for the
837
+ // "resetValue" flag. This seems like a hack that is no longer necessary and the renderer
838
+ // may behave more deterministically without it.
839
+ flags.resetValue = true;
840
+ }
849
841
  return this.getComponents().reduce((changed, component) => {
850
842
  return this.setNestedValue(component, value, flags, changed) || changed;
851
843
  }, false);
@@ -3,11 +3,9 @@ export default class NestedDataComponent extends NestedComponent {
3
3
  hasChanged(newValue: any, oldValue: any): boolean;
4
4
  get allowData(): boolean;
5
5
  get emptyValue(): {};
6
- get shouldAddDefaultValue(): boolean;
7
6
  componentContext(): any;
8
7
  getValueAsString(value: any, options: any): string;
9
8
  getDataValueAsTable(value: any, options: any): string;
10
- everyComponent(fn: any, options?: {}): void;
11
9
  /**
12
10
  * Get the value of this component.
13
11
  * @returns {any} - Return the value of this component.
@@ -88,17 +88,6 @@ class NestedDataComponent extends NestedComponent_1.default {
88
88
  `);
89
89
  return result;
90
90
  }
91
- everyComponent(fn, options = {}) {
92
- if (options === null || options === void 0 ? void 0 : options.email) {
93
- if (options.fromRoot) {
94
- delete options.fromRoot;
95
- }
96
- else {
97
- return;
98
- }
99
- }
100
- return super.everyComponent(fn, options);
101
- }
102
91
  /**
103
92
  * Get the value of this component.
104
93
  * @returns {any} - Return the value of this component.
@@ -36,12 +36,21 @@ export default class AddressComponent extends ContainerComponent {
36
36
  get autocompleteMode(): boolean;
37
37
  get manualMode(): boolean;
38
38
  get manualModeEnabled(): boolean;
39
+ restoreComponentsContext(): void;
39
40
  get isMultiple(): boolean;
40
41
  set address(value: any);
41
42
  get address(): any;
42
43
  isValueInLegacyFormat(value: any): any;
43
44
  normalizeValue(value: any): any;
44
45
  get modeSwitcher(): any;
46
+ get providerOptions(): {
47
+ params: any;
48
+ url: any;
49
+ queryProperty: any;
50
+ responseProperty: any;
51
+ displayValueProperty: any;
52
+ autocompleteOptions: any;
53
+ };
45
54
  get removeValueIcon(): any;
46
55
  get searchInput(): any;
47
56
  get addRowButton(): any;
@@ -26,7 +26,6 @@ class AddressComponent extends Container_1.default {
26
26
  key: 'address',
27
27
  switchToManualModeLabel: 'Can\'t find address? Switch to manual mode.',
28
28
  provider: '',
29
- providerOptions: {},
30
29
  manualModeViewString: '',
31
30
  hideLabel: false,
32
31
  disableClearIcon: false,
@@ -116,20 +115,33 @@ class AddressComponent extends Container_1.default {
116
115
  NestedComponent_1.default.prototype.addComponents.call(this, this.manualMode ? this.address : {});
117
116
  }
118
117
  Field_1.default.prototype.init.call(this);
118
+ // Added for backwards compatibility
119
+ if (this.component.providerOptions) {
120
+ const { params, url, queryProperty, responseProperty, displayValueProperty } = this.component.providerOptions;
121
+ const key = params === null || params === void 0 ? void 0 : params.key;
122
+ const autocompleteOptions = params === null || params === void 0 ? void 0 : params.autocompleteOptions;
123
+ delete this.component.providerOptions;
124
+ this.component.url = url;
125
+ this.component.queryProperty = queryProperty;
126
+ this.component.responseProperty = responseProperty;
127
+ this.component.displayValueProperty = displayValueProperty;
128
+ this.component.apiKey = key;
129
+ this.component.autocompleteOptions = autocompleteOptions;
130
+ }
131
+ let provider = this.component.provider;
132
+ const providerOptions = this.providerOptions;
133
+ const map = this.component.map;
119
134
  if (!this.builderMode) {
120
- if (this.component.provider) {
121
- const { provider, providerOptions, } = this.component;
135
+ if (provider) {
122
136
  if (lodash_1.default.get(providerOptions, 'params.subscriptionKey')) {
123
137
  lodash_1.default.set(providerOptions, "params['subscription-key']", lodash_1.default.get(providerOptions, 'params.subscriptionKey'));
124
138
  lodash_1.default.unset(providerOptions, 'params.subscriptionKey');
125
139
  }
126
140
  this.provider = this.initializeProvider(provider, providerOptions);
127
141
  }
128
- else if (this.component.map) {
142
+ else if (map) {
129
143
  // Fallback to legacy version where Google Maps was the only provider.
130
- this.component.provider = GoogleAddressProvider_1.GoogleAddressProvider.name;
131
- this.component.providerOptions = this.component.providerOptions || {};
132
- const { map, provider, providerOptions, } = this.component;
144
+ provider = this.component.provider = GoogleAddressProvider_1.GoogleAddressProvider.name;
133
145
  const { key, region, } = map;
134
146
  if (key) {
135
147
  lodash_1.default.set(providerOptions, 'params.key', key);
@@ -262,6 +274,16 @@ class AddressComponent extends Container_1.default {
262
274
  ? (this.refs[AddressComponent.modeSwitcherRef] || null)
263
275
  : null;
264
276
  }
277
+ get providerOptions() {
278
+ return {
279
+ params: Object.assign({ subscriptionKey: this.component.subscriptionKey, key: this.component.apiKey }, this.component.params),
280
+ url: this.component.url,
281
+ queryProperty: this.component.queryProperty,
282
+ responseProperty: this.component.responseProperty,
283
+ displayValueProperty: this.component.displayValueProperty,
284
+ autocompleteOptions: this.component.autocompleteOptions
285
+ };
286
+ }
265
287
  get removeValueIcon() {
266
288
  return this.refs
267
289
  ? (this.refs[AddressComponent.removeValueIconRef] || null)
@@ -375,7 +397,8 @@ class AddressComponent extends Container_1.default {
375
397
  const result = ((this.builderMode || this.manualMode) ? super.attach : Field_1.default.prototype.attach).call(this, element);
376
398
  if (!this.builderMode) {
377
399
  if (!this.provider && this.component.provider) {
378
- const { provider, providerOptions, } = this.component;
400
+ const provider = this.component.provider;
401
+ const providerOptions = this.providerOptions;
379
402
  this.provider = this.initializeProvider(provider, providerOptions);
380
403
  }
381
404
  }
@@ -8,6 +8,7 @@ declare const _default: ({
8
8
  customConditional: ({ data }: {
9
9
  data: any;
10
10
  }) => boolean;
11
+ defaultValue?: undefined;
11
12
  placeholder?: undefined;
12
13
  validate?: undefined;
13
14
  } | {
@@ -15,6 +16,7 @@ declare const _default: ({
15
16
  type: string;
16
17
  input: boolean;
17
18
  key: string;
19
+ defaultValue: string;
18
20
  label: string;
19
21
  placeholder: string;
20
22
  tooltip: string;
@@ -32,6 +34,7 @@ declare const _default: ({
32
34
  label: string;
33
35
  tooltip: string;
34
36
  customConditional?: undefined;
37
+ defaultValue?: undefined;
35
38
  placeholder?: undefined;
36
39
  validate?: undefined;
37
40
  } | {
@@ -45,6 +48,7 @@ declare const _default: ({
45
48
  customConditional: ({ data }: {
46
49
  data: any;
47
50
  }) => any;
51
+ defaultValue?: undefined;
48
52
  validate?: undefined;
49
53
  })[];
50
54
  export default _default;
@@ -15,6 +15,7 @@ exports.default = [
15
15
  type: 'textfield',
16
16
  input: true,
17
17
  key: 'switchToManualModeLabel',
18
+ defaultValue: 'Can\'t find address? Switch to manual mode.',
18
19
  label: 'Switch To Manual Mode Label',
19
20
  placeholder: 'Switch To Manual Mode Label',
20
21
  tooltip: 'The label for the checkbox used to switch to manual mode.',
@@ -31,7 +31,7 @@ exports.default = [
31
31
  {
32
32
  type: 'textfield',
33
33
  input: true,
34
- key: "providerOptions.params.subscriptionKey",
34
+ key: "subscriptionKey",
35
35
  label: 'Subscription Key',
36
36
  placeholder: 'Enter Subscription Key',
37
37
  weight: 10,
@@ -46,7 +46,7 @@ exports.default = [
46
46
  {
47
47
  type: 'textfield',
48
48
  input: true,
49
- key: 'providerOptions.url',
49
+ key: 'url',
50
50
  label: 'Url',
51
51
  placeholder: 'Enter Url',
52
52
  weight: 10,
@@ -61,7 +61,7 @@ exports.default = [
61
61
  {
62
62
  type: 'textfield',
63
63
  input: true,
64
- key: 'providerOptions.queryProperty',
64
+ key: 'queryProperty',
65
65
  label: 'Query Property',
66
66
  defaultValue: 'query',
67
67
  placeholder: 'Enter Query Property',
@@ -74,7 +74,7 @@ exports.default = [
74
74
  {
75
75
  type: 'textfield',
76
76
  input: true,
77
- key: 'providerOptions.responseProperty',
77
+ key: 'responseProperty',
78
78
  label: 'Response Property',
79
79
  placeholder: 'Enter Response Property',
80
80
  weight: 30,
@@ -86,7 +86,7 @@ exports.default = [
86
86
  {
87
87
  type: 'textfield',
88
88
  input: true,
89
- key: 'providerOptions.displayValueProperty',
89
+ key: 'displayValueProperty',
90
90
  label: 'Display Value Property',
91
91
  placeholder: 'Display Value Property',
92
92
  weight: 40,
@@ -98,7 +98,7 @@ exports.default = [
98
98
  {
99
99
  type: 'textarea',
100
100
  input: true,
101
- key: 'providerOptions.params',
101
+ key: 'params',
102
102
  label: 'Params',
103
103
  placeholder: '{ ... }',
104
104
  weight: 50,
@@ -113,7 +113,7 @@ exports.default = [
113
113
  {
114
114
  type: 'textfield',
115
115
  input: true,
116
- key: 'providerOptions.params.key',
116
+ key: 'apiKey',
117
117
  label: 'API Key',
118
118
  placeholder: 'Enter API Key',
119
119
  weight: 10,
@@ -128,7 +128,7 @@ exports.default = [
128
128
  {
129
129
  type: 'textarea',
130
130
  input: true,
131
- key: 'providerOptions.params.autocompleteOptions',
131
+ key: 'autocompleteOptions',
132
132
  label: 'Provider options',
133
133
  placeholder: 'Enter provider options as JSON object',
134
134
  defaultValue: {},
@@ -5,6 +5,14 @@ exports.default = [
5
5
  key: 'labelPosition',
6
6
  ignore: true
7
7
  },
8
+ {
9
+ key: 'labelWidth',
10
+ ignore: true
11
+ },
12
+ {
13
+ key: 'labelMargin',
14
+ ignore: true
15
+ },
8
16
  {
9
17
  key: 'placeholder',
10
18
  ignore: true
@@ -9,6 +9,18 @@ exports.default = [
9
9
  key: 'allowMultipleMasks',
10
10
  ignore: true
11
11
  },
12
+ {
13
+ key: 'inputMasks',
14
+ ignore: true
15
+ },
16
+ {
17
+ key: 'widget.type',
18
+ ignore: true
19
+ },
20
+ {
21
+ key: 'widget',
22
+ ignore: true
23
+ },
12
24
  {
13
25
  key: 'showWordCount',
14
26
  ignore: true
@@ -613,9 +613,6 @@ class DataGridComponent extends NestedArrayComponent_1.default {
613
613
  this.updateOnChange(flags, changed);
614
614
  return changed;
615
615
  }
616
- restoreComponentsContext() {
617
- this.rows.forEach((row, index) => lodash_1.default.forIn(row, (component) => component.data = this.dataValue[index]));
618
- }
619
616
  toggleGroup(element, index) {
620
617
  element.classList.toggle('collapsed');
621
618
  lodash_1.default.each(this.refs.chunks[index], row => {
@@ -73,14 +73,10 @@ class DataMapComponent extends DataGrid_1.default {
73
73
  return {};
74
74
  }
75
75
  get dataValue() {
76
- if (!this.key ||
77
- (this.conditionallyHidden && this.component.clearOnHide)) {
76
+ if (!this.key) {
78
77
  return this.emptyValue;
79
78
  }
80
- if (!this.hasValue() && this.shouldAddDefaultValue) {
81
- this.dataValue = this.emptyValue;
82
- }
83
- return lodash_1.default.get(this.data, this.key);
79
+ return lodash_1.default.get(this.data, this.key, this.emptyValue);
84
80
  }
85
81
  set dataValue(value) {
86
82
  super.dataValue = value;
@@ -6,36 +6,87 @@ declare const _default: ({
6
6
  persistent: boolean;
7
7
  weight: number;
8
8
  tooltip: string;
9
+ applyMaskOn?: undefined;
10
+ logic?: undefined;
9
11
  skipMerge?: undefined;
10
- customConditional?: undefined;
12
+ tableView?: undefined;
13
+ validateWhenHidden?: undefined;
11
14
  enableTime?: undefined;
12
15
  } | {
16
+ label: string;
17
+ tooltip: string;
18
+ applyMaskOn: string;
19
+ key: string;
20
+ logic: ({
21
+ name: string;
22
+ trigger: {
23
+ type: string;
24
+ javascript: string;
25
+ event?: undefined;
26
+ };
27
+ actions: {
28
+ name: string;
29
+ type: string;
30
+ schemaDefinition: string;
31
+ }[];
32
+ } | {
33
+ name: string;
34
+ trigger: {
35
+ type: string;
36
+ event: string;
37
+ javascript?: undefined;
38
+ };
39
+ actions: {
40
+ name: string;
41
+ type: string;
42
+ customAction: string;
43
+ }[];
44
+ })[];
13
45
  type: string;
14
46
  input: boolean;
15
- key: string;
16
- label: string;
17
47
  skipMerge: boolean;
18
48
  weight: number;
19
- tooltip: string;
20
- customConditional({ data, component }: {
21
- data: any;
22
- component: any;
23
- }): boolean;
24
49
  persistent?: undefined;
50
+ tableView?: undefined;
51
+ validateWhenHidden?: undefined;
25
52
  enableTime?: undefined;
26
53
  } | {
54
+ label: string;
55
+ tooltip: string;
56
+ applyMaskOn: string;
57
+ tableView: boolean;
58
+ validateWhenHidden: boolean;
59
+ key: string;
60
+ logic: ({
61
+ name: string;
62
+ trigger: {
63
+ type: string;
64
+ javascript: string;
65
+ event?: undefined;
66
+ };
67
+ actions: {
68
+ name: string;
69
+ type: string;
70
+ schemaDefinition: string;
71
+ }[];
72
+ } | {
73
+ name: string;
74
+ trigger: {
75
+ type: string;
76
+ event: string;
77
+ javascript?: undefined;
78
+ };
79
+ actions: {
80
+ name: string;
81
+ type: string;
82
+ customAction: string;
83
+ }[];
84
+ })[];
27
85
  type: string;
28
86
  input: boolean;
29
87
  enableTime: boolean;
30
- key: string;
31
88
  skipMerge: boolean;
32
- label: string;
33
89
  weight: number;
34
- tooltip: string;
35
- customConditional({ data, component }: {
36
- data: any;
37
- component: any;
38
- }): any;
39
90
  persistent?: undefined;
40
91
  })[];
41
92
  export default _default;