@formio/js 5.1.0-dev.6040.debc859 → 5.1.0-dev.6042.6e62a7a

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 (150) hide show
  1. package/Changelog.md +140 -6
  2. package/dist/formio.form.js +591 -580
  3. package/dist/formio.form.min.js +1 -1
  4. package/dist/formio.full.js +613 -602
  5. package/dist/formio.full.min.js +1 -1
  6. package/dist/formio.js +47 -14
  7. package/dist/formio.min.js +1 -1
  8. package/dist/formio.utils.js +48 -15
  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 +9 -9
  14. package/lib/cjs/WebformBuilder.js +5 -1
  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 +50 -15
  18. package/lib/cjs/components/_classes/component/Component.js +153 -69
  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.d.ts +0 -1
  46. package/lib/cjs/components/form/Form.js +18 -22
  47. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
  48. package/lib/cjs/components/html/HTML.js +1 -2
  49. package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
  50. package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
  51. package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
  52. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
  53. package/lib/cjs/components/radio/Radio.js +1 -1
  54. package/lib/cjs/components/select/Select.js +1 -1
  55. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +68 -110
  56. package/lib/cjs/components/select/editForm/Select.edit.data.js +2 -37
  57. package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -0
  58. package/lib/cjs/components/survey/Survey.js +1 -1
  59. package/lib/cjs/components/tabs/Tabs.js +1 -0
  60. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
  61. package/lib/cjs/components/textarea/TextArea.js +9 -1
  62. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
  63. package/lib/cjs/components/textfield/TextField.js +2 -2
  64. package/lib/cjs/components/unknown/Unknown.form.d.ts +2 -1
  65. package/lib/cjs/components/unknown/Unknown.form.js +13 -9
  66. package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
  67. package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
  68. package/lib/cjs/formio.form.js +2 -2
  69. package/lib/cjs/providers/storage/uploadAdapter.js +5 -3
  70. package/lib/cjs/translations/en.d.ts +1 -234
  71. package/lib/cjs/translations/en.js +4 -2
  72. package/lib/cjs/utils/formUtils.d.ts +2 -2
  73. package/lib/cjs/utils/utils.d.ts +9 -8
  74. package/lib/cjs/utils/utils.js +18 -23
  75. package/lib/cjs/widgets/CalendarWidget.js +6 -1
  76. package/lib/mjs/Element.d.ts +2 -1
  77. package/lib/mjs/Element.js +6 -4
  78. package/lib/mjs/Webform.d.ts +2 -2
  79. package/lib/mjs/Webform.js +9 -9
  80. package/lib/mjs/WebformBuilder.js +5 -1
  81. package/lib/mjs/Wizard.d.ts +1 -0
  82. package/lib/mjs/Wizard.js +22 -2
  83. package/lib/mjs/components/_classes/component/Component.d.ts +50 -15
  84. package/lib/mjs/components/_classes/component/Component.js +154 -70
  85. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
  86. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  87. package/lib/mjs/components/_classes/list/ListComponent.js +2 -2
  88. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +0 -1
  89. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
  90. package/lib/mjs/components/_classes/nested/NestedComponent.js +10 -18
  91. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
  92. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
  93. package/lib/mjs/components/address/Address.d.ts +9 -0
  94. package/lib/mjs/components/address/Address.js +31 -8
  95. package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +4 -0
  96. package/lib/mjs/components/address/editForm/Address.edit.display.js +1 -0
  97. package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
  98. package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
  99. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
  100. package/lib/mjs/components/datagrid/DataGrid.js +0 -3
  101. package/lib/mjs/components/datamap/DataMap.js +2 -6
  102. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
  103. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
  104. package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
  105. package/lib/mjs/components/editgrid/EditGrid.js +3 -12
  106. package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
  107. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
  108. package/lib/mjs/components/file/File.js +7 -2
  109. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +13 -0
  110. package/lib/mjs/components/file/editForm/File.edit.file.js +1 -0
  111. package/lib/mjs/components/form/Form.d.ts +0 -1
  112. package/lib/mjs/components/form/Form.js +18 -22
  113. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
  114. package/lib/mjs/components/html/HTML.js +1 -2
  115. package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
  116. package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
  117. package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
  118. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
  119. package/lib/mjs/components/radio/Radio.js +1 -1
  120. package/lib/mjs/components/select/Select.js +1 -1
  121. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +68 -110
  122. package/lib/mjs/components/select/editForm/Select.edit.data.js +2 -37
  123. package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -0
  124. package/lib/mjs/components/survey/Survey.js +1 -1
  125. package/lib/mjs/components/tabs/Tabs.js +1 -0
  126. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
  127. package/lib/mjs/components/textarea/TextArea.js +9 -1
  128. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
  129. package/lib/mjs/components/textfield/TextField.js +2 -2
  130. package/lib/mjs/components/unknown/Unknown.form.d.ts +2 -1
  131. package/lib/mjs/components/unknown/Unknown.form.js +13 -9
  132. package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
  133. package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
  134. package/lib/mjs/formio.form.js +1 -1
  135. package/lib/mjs/providers/storage/uploadAdapter.js +5 -3
  136. package/lib/mjs/translations/en.d.ts +1 -234
  137. package/lib/mjs/translations/en.js +5 -47
  138. package/lib/mjs/utils/formUtils.d.ts +2 -2
  139. package/lib/mjs/utils/utils.d.ts +9 -8
  140. package/lib/mjs/utils/utils.js +16 -21
  141. package/lib/mjs/widgets/CalendarWidget.js +7 -2
  142. package/package.json +2 -2
  143. package/lib/cjs/i18n.d.ts +0 -13
  144. package/lib/cjs/i18n.js +0 -19
  145. package/lib/cjs/utils/i18n.d.ts +0 -19
  146. package/lib/cjs/utils/i18n.js +0 -120
  147. package/lib/mjs/i18n.d.ts +0 -13
  148. package/lib/mjs/i18n.js +0 -14
  149. package/lib/mjs/utils/i18n.d.ts +0 -19
  150. package/lib/mjs/utils/i18n.js +0 -112
@@ -170,10 +170,11 @@ export default class Element {
170
170
  /**
171
171
  * Translate a text using the i18n system.
172
172
  * @param {string|Array<string>} text - The i18n identifier.
173
+ * @param {any} data - contextual data object containing data, component, row, etc.
173
174
  * @param {...any} args - The arguments to pass to the i18n translation.
174
175
  * @returns {string} - The translated text.
175
176
  */
176
- t(text: string | Array<string>, ...args: any[]): string;
177
+ t(text: string | Array<string>, data: any, ...args: any[]): string;
177
178
  /**
178
179
  * Alias to create a text node.
179
180
  * @param {string} text - The text to create.
@@ -29,10 +29,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const EventEmitter_1 = __importDefault(require("./EventEmitter"));
30
30
  const Formio_1 = require("./Formio");
31
31
  const FormioUtils = __importStar(require("./utils/utils"));
32
- const i18n_1 = require("./utils/i18n");
32
+ const core_1 = require("@formio/core");
33
33
  const lodash_1 = __importDefault(require("lodash"));
34
34
  const moment_1 = __importDefault(require("moment"));
35
35
  const vanilla_text_mask_1 = __importDefault(require("@formio/vanilla-text-mask"));
36
+ const en_1 = __importDefault(require("./translations/en"));
36
37
  /**
37
38
  * The root component for all elements within the Form.io renderer.
38
39
  */
@@ -67,7 +68,7 @@ class Element {
67
68
  if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.language) {
68
69
  this.options.i18n.language = this.options.language;
69
70
  }
70
- this.options.i18next = this.i18next = this.options.i18next || i18n_1.I18n.init(this.options.i18n);
71
+ this.options.i18next = this.i18next = this.options.i18next || core_1.I18n.init(Object.assign({ en: en_1.default }, this.options.i18n));
71
72
  /**
72
73
  * An instance of the EventEmitter class to handle the emitting and registration of events.
73
74
  * @type {EventEmitter}
@@ -415,11 +416,12 @@ class Element {
415
416
  /**
416
417
  * Translate a text using the i18n system.
417
418
  * @param {string|Array<string>} text - The i18n identifier.
419
+ * @param {any} data - contextual data object containing data, component, row, etc.
418
420
  * @param {...any} args - The arguments to pass to the i18n translation.
419
421
  * @returns {string} - The translated text.
420
422
  */
421
- t(text, ...args) {
422
- return this.i18next ? this.i18next.t(text, ...args) : text;
423
+ t(text, data, ...args) {
424
+ return this.i18next ? this.i18next.t(text, data, ...args) : text;
423
425
  }
424
426
  /**
425
427
  * Alias to create a text node.
@@ -45,7 +45,7 @@
45
45
  * @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
46
46
  * @property {boolean} [readOnly] - Set this form to readOnly.
47
47
  * @property {boolean} [noAlerts] - Disable the alerts dialog.
48
- * @property {{[key: string]: string}} [i18n] - The translation file for this rendering.
48
+ * @property {{[key: string]: string}} [enTranslation] - The translation file for this rendering.
49
49
  * @property {string} [template] - Custom logic for creation of elements.
50
50
  * @property {boolean} [noDefaults] - Exclude default values from the settings.
51
51
  * @property {any} [fileService] - The file service for this form.
@@ -586,7 +586,7 @@ export type FormOptions = {
586
586
  /**
587
587
  * - The translation file for this rendering.
588
588
  */
589
- i18n?: {
589
+ enTranslation?: {
590
590
  [key: string]: string;
591
591
  } | undefined;
592
592
  /**
@@ -7,7 +7,7 @@ const lodash_1 = __importDefault(require("lodash"));
7
7
  const moment_1 = __importDefault(require("moment"));
8
8
  const compare_versions_1 = require("compare-versions");
9
9
  const EventEmitter_1 = __importDefault(require("./EventEmitter"));
10
- const i18n_1 = __importDefault(require("./i18n"));
10
+ const en_1 = __importDefault(require("./translations/en"));
11
11
  const Formio_1 = require("./Formio");
12
12
  const Components_1 = __importDefault(require("./components/Components"));
13
13
  const NestedDataComponent_1 = __importDefault(require("./components/_classes/nesteddata/NestedDataComponent"));
@@ -100,7 +100,7 @@ function getOptions(options) {
100
100
  * @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
101
101
  * @property {boolean} [readOnly] - Set this form to readOnly.
102
102
  * @property {boolean} [noAlerts] - Disable the alerts dialog.
103
- * @property {{[key: string]: string}} [i18n] - The translation file for this rendering.
103
+ * @property {{[key: string]: string}} [enTranslation] - The translation file for this rendering.
104
104
  * @property {string} [template] - Custom logic for creation of elements.
105
105
  * @property {boolean} [noDefaults] - Exclude default values from the settings.
106
106
  * @property {any} [fileService] - The file service for this form.
@@ -370,7 +370,7 @@ class Webform extends NestedDataComponent_1.default {
370
370
  */
371
371
  addLanguage(code, lang, active = false) {
372
372
  if (this.i18next) {
373
- var translations = lodash_1.default.assign((0, utils_1.fastCloneDeep)(i18n_1.default.resources.en.translation), lang);
373
+ var translations = lodash_1.default.assign((0, utils_1.fastCloneDeep)(en_1.default), lang);
374
374
  this.i18next.addResourceBundle(code, 'translation', translations, true, true);
375
375
  if (active) {
376
376
  this.language = code;
@@ -661,7 +661,9 @@ class Webform extends NestedDataComponent_1.default {
661
661
  const rebuild = this.rebuild() || Promise.resolve();
662
662
  return rebuild.then(() => {
663
663
  this.emit('formLoad', form);
664
- this.triggerCaptcha();
664
+ if (!this.options.server) {
665
+ this.triggerCaptcha();
666
+ }
665
667
  // Make sure to trigger onChange after a render event occurs to speed up form rendering.
666
668
  setTimeout(() => {
667
669
  this.onChange(flags);
@@ -1157,11 +1159,8 @@ class Webform extends NestedDataComponent_1.default {
1157
1159
  };
1158
1160
  errors.forEach(({ message, context, fromServer, component }, index) => {
1159
1161
  const text = !(component === null || component === void 0 ? void 0 : component.label) || (context === null || context === void 0 ? void 0 : context.hasLabel) || fromServer
1160
- ? this.t('alertMessage', { message: this.t(message) })
1161
- : this.t('alertMessageWithLabel', {
1162
- label: this.t(component === null || component === void 0 ? void 0 : component.label),
1163
- message: this.t(message),
1164
- });
1162
+ ? this.t(message)
1163
+ : `${this.t(component === null || component === void 0 ? void 0 : component.label)}: ${this.t(message)}`;
1165
1164
  displayedErrors.push(createListItem(text, index));
1166
1165
  });
1167
1166
  }
@@ -1322,6 +1321,7 @@ class Webform extends NestedDataComponent_1.default {
1322
1321
  userAgent: navigator.userAgent,
1323
1322
  pathName: window.location.pathname,
1324
1323
  onLine: navigator.onLine,
1324
+ language: this.language,
1325
1325
  });
1326
1326
  }
1327
1327
  submitForm(options = {}, local = false) {
@@ -1623,7 +1623,11 @@ class WebformBuilder extends Component_1.default {
1623
1623
  info.type);
1624
1624
  }
1625
1625
  hasEditTabs(type) {
1626
- const editTabs = (0, formUtils_1.getComponent)(Components_1.default.components[type].editForm().components, 'tabs', true).components;
1626
+ // If the component type does not exist then it has no edit tabs
1627
+ if (!Components_1.default.components[type === 'custom' ? 'unknown' : type]) {
1628
+ return false;
1629
+ }
1630
+ const editTabs = (0, formUtils_1.getComponent)(Components_1.default.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
1627
1631
  const hiddenEditTabs = lodash_1.default.filter(lodash_1.default.get(this.options, `editForm.${type}`, []), 'ignore');
1628
1632
  return lodash_1.default.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
1629
1633
  }
@@ -106,6 +106,7 @@ declare class Wizard extends Webform {
106
106
  onChange(flags: any, changed: any, modified: any, changes: any): void;
107
107
  checkValidity(data: any, dirty: any, row: any, currentPageOnly: any, childErrors?: any[]): any;
108
108
  focusOnComponent(key: any): void | Promise<void>;
109
+ triggerButtonCaptcha(page: any): void;
109
110
  }
110
111
  declare namespace Wizard {
111
112
  let setBaseUrl: any;
package/lib/cjs/Wizard.js CHANGED
@@ -602,7 +602,7 @@ class Wizard extends Webform_1.default {
602
602
  }
603
603
  this.redraw().then(() => {
604
604
  this.checkData(this.submission.data);
605
- this.triggerCaptcha(this.currentPanel.components);
605
+ this.triggerCaptcha(this.currentPage.components);
606
606
  const errors = this.submitted ? this.validate(this.localData, { dirty: true }) : this.validateCurrentPage();
607
607
  if (this.alert) {
608
608
  this.showErrors(errors, true, true);
@@ -670,6 +670,7 @@ class Wizard extends Webform_1.default {
670
670
  beforeSubmit() {
671
671
  const pages = this.getPages({ all: true });
672
672
  return Promise.all(pages.map((page) => {
673
+ this.triggerButtonCaptcha(page);
673
674
  page.options.beforeSubmit = true;
674
675
  return page.beforeSubmit();
675
676
  }));
@@ -726,10 +727,13 @@ class Wizard extends Webform_1.default {
726
727
  }
727
728
  }
728
729
  validateCurrentPage(flags = {}) {
729
- var _a, _b;
730
+ var _a, _b, _c, _d;
730
731
  const components = (_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.components.map((component) => component.component);
731
732
  // Accessing the parent ensures the right instance (whether it's the parent Wizard or a nested Wizard) performs its validation
732
- return (_b = this.currentPage) === null || _b === void 0 ? void 0 : _b.parent.validateComponents(components, this.root.data, flags);
733
+ if ((_b = this.currentPage) === null || _b === void 0 ? void 0 : _b.parent) {
734
+ return (_c = this.currentPage) === null || _c === void 0 ? void 0 : _c.parent.validateComponents(components, this.root.data, flags);
735
+ }
736
+ return (_d = this.currentPage) === null || _d === void 0 ? void 0 : _d.validateComponents(components, this.root ? this.root.data : this.data, flags);
733
737
  }
734
738
  emitPrevPage() {
735
739
  this.emit('prevPage', { page: this.page, submission: this.submission });
@@ -942,6 +946,22 @@ class Wizard extends Webform_1.default {
942
946
  }
943
947
  return super.focusOnComponent(key);
944
948
  }
949
+ triggerButtonCaptcha(page) {
950
+ if (!page.components) {
951
+ return;
952
+ }
953
+ let captchaComponent;
954
+ page.eachComponent((component) => {
955
+ if (/^(re)?captcha$/.test(component.component.type) &&
956
+ component.component.eventType === 'buttonClick' &&
957
+ component.component.buttonKey === 'submit') {
958
+ captchaComponent = component;
959
+ }
960
+ });
961
+ if (captchaComponent) {
962
+ captchaComponent.verify(`submitClick`);
963
+ }
964
+ }
945
965
  }
946
966
  exports.default = Wizard;
947
967
  Wizard.setBaseUrl = Formio_1.Formio.setBaseUrl;
@@ -119,13 +119,6 @@ declare class Component extends Element {
119
119
  */
120
120
  paths: import('@formio/core').ComponentPaths;
121
121
  _path: string;
122
- /**
123
- * Determines if this component is conditionally hidden. Should generally not be set outside of conditional logic pipeline.
124
- * This is necessary because of clearOnHide behavior that only clears when conditionally hidden - we need to track
125
- * conditionallyHidden separately from "regular" visibility.
126
- */
127
- _parentConditionallyHidden: any;
128
- _conditionallyHidden: any;
129
122
  /**
130
123
  * Determines if this component is visible, or not.
131
124
  */
@@ -170,6 +163,18 @@ declare class Component extends Element {
170
163
  */
171
164
  info: any;
172
165
  get componentsMap(): object;
166
+ /**
167
+ * Returns if the parent should conditionally clear.
168
+ *
169
+ * @returns {boolean} - If the parent should conditionally clear.
170
+ */
171
+ parentShouldConditionallyClear(): boolean;
172
+ parentConditionallyHidden(): boolean;
173
+ /**
174
+ * Returns true if any of the parents default their component "hidden" property to true.
175
+ * @returns {boolean} - If any parent defaults the hidden property to true.
176
+ */
177
+ anyParentDefaultsHidden(): boolean;
173
178
  set data(value: any);
174
179
  get data(): any;
175
180
  mergeSchema(component?: {}): any;
@@ -231,14 +236,25 @@ declare class Component extends Element {
231
236
  * @returns {boolean} - Whether the component is visible or not.
232
237
  */
233
238
  get visible(): boolean;
234
- get conditionallyHidden(): any;
239
+ get logicallyHidden(): any;
240
+ _logicallyHidden: any;
235
241
  /**
236
- * Evaluates whether the component is conditionally hidden (as opposed to intentionally hidden, e.g. via the `hidden` component schema property).
237
- * @param {object} data - The data object to evaluate the condition against.
238
- * @param {object} row - The row object to evaluate the condition against.
239
- * @returns {boolean} - Whether the component is conditionally hidden.
242
+ * Determines if the component should clear its value when the root form is pristine.
243
+ * @returns {boolean} - If the component should clear its value when the root form is pristine.
240
244
  */
241
- checkConditionallyHidden(data?: object, row?: object): boolean;
245
+ shouldConditionallyClearOnPristine(): boolean;
246
+ /**
247
+ * Returns if the component should clear its value when conditionally hidden.
248
+ * @returns {boolean} - If the component should clear its value when conditionally hidden.
249
+ */
250
+ shouldConditionallyClear(): boolean;
251
+ _conditionallyClear: boolean | undefined;
252
+ /**
253
+ * Returns if the component is conditionally hidden.
254
+ * @returns {boolean} - If the component is conditionally hidden.
255
+ */
256
+ conditionallyHidden(): boolean;
257
+ _conditionallyHidden: boolean | undefined;
242
258
  set currentForm(instance: any);
243
259
  get currentForm(): any;
244
260
  _currentForm: any;
@@ -789,6 +805,10 @@ declare class Component extends Element {
789
805
  * @returns {void}
790
806
  */
791
807
  setElementInvalid(element: HTMLElement, invalid: boolean): void;
808
+ /**
809
+ * Clear any conditionally hidden components for this component only.
810
+ */
811
+ clearComponentOnHide(): void;
792
812
  /**
793
813
  * Clears the components data if it is conditionally hidden AND clearOnHide is set to true for this component.
794
814
  */
@@ -893,7 +913,20 @@ declare class Component extends Element {
893
913
  */
894
914
  deleteValue(): void;
895
915
  getCustomDefaultValue(defaultValue: any): any;
896
- get shouldAddDefaultValue(): any;
916
+ /**
917
+ * Returns if a component has a default value set.
918
+ * @returns {boolean} - TRUE if a default value is set.
919
+ */
920
+ get hasDefaultValue(): boolean;
921
+ /**
922
+ * Determine if we should add a default value for this component.
923
+ * @returns {boolean} - TRUE if a default value should be set
924
+ */
925
+ get shouldAddDefaultValue(): boolean;
926
+ /**
927
+ * Get the default value of this component.
928
+ * @returns {*} - The default value for this component.
929
+ */
897
930
  get defaultValue(): any;
898
931
  /**
899
932
  * Get the input value of this component.
@@ -1003,9 +1036,10 @@ declare class Component extends Element {
1003
1036
  * @param {boolean} dirty - If the component is dirty.
1004
1037
  * @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
1005
1038
  * @param {*} row - Contextual row data for this component.
1039
+ * @param {*} options - Additional options for validation.
1006
1040
  * @returns {string} - The message to show when the component is invalid.
1007
1041
  */
1008
- invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
1042
+ invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any, options?: any): string;
1009
1043
  /**
1010
1044
  * Returns if the component is valid or not.
1011
1045
  * @param {*} data - The data to check if the component is valid.
@@ -1067,6 +1101,7 @@ declare class Component extends Element {
1067
1101
  * @returns {void|boolean} - TRUE if no check should be performed on the component.
1068
1102
  */
1069
1103
  checkData(data?: any, flags?: any, row?: any): void | boolean;
1104
+ checkingData: boolean | undefined;
1070
1105
  checkModal(errors?: any[], dirty?: boolean): void;
1071
1106
  get validationValue(): any;
1072
1107
  isEmpty(value?: any): any;