@heartlandone/vega 1.5.0 → 1.7.0

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 (138) hide show
  1. package/dist/cjs/{app-globals-2bf8bcb4.js → app-globals-f1e88d74.js} +1 -1
  2. package/dist/cjs/{array-414f6d01.js → array-a4f013ec.js} +15 -0
  3. package/dist/cjs/{featureFlagController-a3377c0c.js → featureFlagController-40d3aba1.js} +10 -0
  4. package/dist/cjs/formFieldController-ba03f040.js +471 -0
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +3 -3
  7. package/dist/cjs/{subject-fdccaa01.js → subject-8403dbf0.js} +2 -0
  8. package/dist/{esm/inputValidator-fe5c9453.js → cjs/validatorFacade-77aef92a.js} +148 -58
  9. package/dist/cjs/vega-accordion.cjs.entry.js +1 -1
  10. package/dist/cjs/vega-button_22.cjs.entry.js +341 -107
  11. package/dist/cjs/vega-checkbox-group.cjs.entry.js +70 -31
  12. package/dist/cjs/vega-form.cjs.entry.js +70 -39
  13. package/dist/cjs/vega-radio-group.cjs.entry.js +23 -7
  14. package/dist/cjs/vega-stepper.cjs.entry.js +28 -16
  15. package/dist/cjs/vega.cjs.js +3 -3
  16. package/dist/collection/components/vega-checkbox/vega-checkbox-group.js +100 -40
  17. package/dist/collection/components/vega-checkbox/vega-checkbox.js +17 -7
  18. package/dist/collection/components/vega-date-picker/vega-date-picker.js +27 -14
  19. package/dist/collection/components/vega-form/vega-form.js +73 -45
  20. package/dist/collection/components/vega-input/vega-input.js +50 -27
  21. package/dist/collection/components/vega-input-select/vega-input-select.js +50 -25
  22. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +3 -3
  23. package/dist/collection/components/vega-radio/vega-radio-group.js +26 -8
  24. package/dist/collection/components/vega-sidenav/vega-sidenav-link.js +20 -0
  25. package/dist/collection/components/vega-sidenav/vega-sidenav.js +19 -9
  26. package/dist/collection/components/vega-stepper/vega-stepper.js +36 -16
  27. package/dist/collection/components/vega-table/vega-table.js +28 -3
  28. package/dist/collection/constants/test/picture.js +9 -0
  29. package/dist/collection/helpers/feature-control/featureFlagsMap.js +10 -0
  30. package/dist/collection/helpers/observer/subject.js +1 -0
  31. package/dist/collection/helpers/validator/formFieldController.js +387 -0
  32. package/dist/collection/helpers/validator/inputValidator.js +8 -7
  33. package/dist/collection/helpers/validator/rules/dateRangeRule.js +26 -5
  34. package/dist/collection/helpers/validator/rules/dateRequiredRule.js +27 -5
  35. package/dist/collection/helpers/validator/rules/emailFieldRule.js +27 -7
  36. package/dist/collection/helpers/validator/rules/maxNumberRule.js +27 -6
  37. package/dist/collection/helpers/validator/rules/maxStringLengthRule.js +27 -6
  38. package/dist/collection/helpers/validator/rules/minAndMaxDateRule.js +27 -6
  39. package/dist/collection/helpers/validator/rules/minNumberRule.js +27 -6
  40. package/dist/collection/helpers/validator/rules/minStringLengthRule.js +26 -5
  41. package/dist/collection/helpers/validator/rules/requiredFieldRule.js +37 -6
  42. package/dist/collection/helpers/validator/test/rules/dateRangeRule.test.js +33 -0
  43. package/dist/collection/helpers/validator/test/rules/dateRequiredRule.test.js +33 -0
  44. package/dist/collection/helpers/validator/test/rules/emailFieldRule.test.js +34 -0
  45. package/dist/collection/helpers/validator/test/rules/maxNumberRule.test.js +34 -0
  46. package/dist/collection/helpers/validator/test/rules/maxStringLengthRule.test.js +34 -0
  47. package/dist/collection/helpers/validator/test/rules/minAndMaxDateRule.test.js +36 -0
  48. package/dist/collection/helpers/validator/test/rules/minNumberRule.test.js +34 -0
  49. package/dist/collection/helpers/validator/test/rules/minStringLengthRule.test.js +34 -0
  50. package/dist/collection/helpers/validator/test/rules/requiredFieldRule.test.js +62 -2
  51. package/dist/collection/helpers/validator/test/validator/formFieldController.test.js +50 -0
  52. package/dist/collection/helpers/validator/validatorFacade.js +135 -0
  53. package/dist/collection/utils/array.js +14 -0
  54. package/dist/collection/utils/misc.js +9 -0
  55. package/dist/collection/utils/test/array.test.js +15 -1
  56. package/dist/collection/utils/testUtils.js +35 -1
  57. package/dist/esm/{app-globals-b6c310ea.js → app-globals-7ea72e56.js} +1 -1
  58. package/dist/esm/{array-fb0b8d24.js → array-68c5fe34.js} +15 -1
  59. package/dist/esm/{featureFlagController-56eb18b9.js → featureFlagController-1f004218.js} +10 -0
  60. package/dist/esm/formFieldController-dc50809f.js +468 -0
  61. package/dist/esm/index.js +1 -1
  62. package/dist/esm/loader.js +3 -3
  63. package/dist/esm/{subject-ade7d101.js → subject-95efa790.js} +2 -1
  64. package/dist/{cjs/inputValidator-27df89b1.js → esm/validatorFacade-46c75f1e.js} +144 -59
  65. package/dist/esm/vega-accordion.entry.js +1 -1
  66. package/dist/esm/vega-button_22.entry.js +338 -104
  67. package/dist/esm/vega-checkbox-group.entry.js +69 -30
  68. package/dist/esm/vega-form.entry.js +70 -39
  69. package/dist/esm/vega-radio-group.entry.js +22 -6
  70. package/dist/esm/vega-stepper.entry.js +28 -16
  71. package/dist/esm/vega.js +3 -3
  72. package/dist/types/components/vega-checkbox/vega-checkbox-group.d.ts +17 -6
  73. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +2 -2
  74. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +10 -4
  75. package/dist/types/components/vega-form/vega-form.d.ts +5 -2
  76. package/dist/types/components/vega-input/vega-input.d.ts +12 -5
  77. package/dist/types/components/vega-input-select/vega-input-select.d.ts +16 -5
  78. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +1 -1
  79. package/dist/types/components/vega-radio/vega-radio-group.d.ts +9 -2
  80. package/dist/types/components/vega-sidenav/vega-sidenav-link.d.ts +2 -0
  81. package/dist/types/components/vega-sidenav/vega-sidenav.d.ts +8 -3
  82. package/dist/types/components/vega-stepper/vega-stepper.d.ts +11 -4
  83. package/dist/types/components/vega-table/vega-table.d.ts +3 -0
  84. package/dist/types/components.d.ts +67 -17
  85. package/dist/types/constants/test/picture.d.ts +3 -0
  86. package/dist/types/helpers/feature-control/featureFlag.d.ts +3 -1
  87. package/dist/types/helpers/observer/subject.d.ts +2 -1
  88. package/dist/types/helpers/validator/formFieldController.d.ts +219 -0
  89. package/dist/types/helpers/validator/formValidator.d.ts +8 -0
  90. package/dist/types/helpers/validator/inputValidator.d.ts +13 -12
  91. package/dist/types/helpers/validator/rules/dateRangeRule.d.ts +20 -5
  92. package/dist/types/helpers/validator/rules/dateRequiredRule.d.ts +22 -6
  93. package/dist/types/helpers/validator/rules/emailFieldRule.d.ts +22 -7
  94. package/dist/types/helpers/validator/rules/formFieldValidationRule.d.ts +22 -0
  95. package/dist/types/helpers/validator/rules/maxNumberRule.d.ts +22 -7
  96. package/dist/types/helpers/validator/rules/maxStringLengthRule.d.ts +22 -7
  97. package/dist/types/helpers/validator/rules/minAndMaxDateRule.d.ts +20 -5
  98. package/dist/types/helpers/validator/rules/minNumberRule.d.ts +22 -7
  99. package/dist/types/helpers/validator/rules/minStringLengthRule.d.ts +21 -6
  100. package/dist/types/helpers/validator/rules/requiredFieldRule.d.ts +30 -7
  101. package/dist/types/helpers/validator/test/validator/formFieldController.test.d.ts +1 -0
  102. package/dist/types/helpers/validator/validator.d.ts +3 -3
  103. package/dist/types/helpers/validator/validatorFacade.d.ts +72 -0
  104. package/dist/types/types/general.d.ts +1 -0
  105. package/dist/types/utils/array.d.ts +8 -0
  106. package/dist/types/utils/misc.d.ts +7 -0
  107. package/dist/types/utils/testUtils.d.ts +11 -3
  108. package/dist/vega/index.esm.js +1 -1
  109. package/dist/vega/p-104bb646.entry.js +1 -0
  110. package/dist/vega/p-31a33c59.entry.js +1 -0
  111. package/dist/vega/p-3f2d6b8d.js +1 -0
  112. package/dist/vega/p-3f9cc772.js +1 -0
  113. package/dist/vega/p-5e9304c7.js +1 -0
  114. package/dist/vega/p-636cd70e.entry.js +1 -0
  115. package/dist/vega/p-81e5232c.entry.js +13 -0
  116. package/dist/vega/p-862729c0.entry.js +1 -0
  117. package/dist/vega/{p-3a929703.js → p-92e3be74.js} +1 -1
  118. package/dist/vega/{p-03db1ce3.entry.js → p-9da905fe.entry.js} +1 -1
  119. package/dist/vega/p-b5a4ee96.js +1 -0
  120. package/dist/vega/{p-6715aa3b.js → p-dc20f620.js} +1 -1
  121. package/dist/vega/vega.css +1 -1
  122. package/dist/vega/vega.esm.js +1 -1
  123. package/package.json +1 -1
  124. package/readme.md +21 -0
  125. package/style/vega.css +1 -1
  126. package/style/vega_min.css +1 -1
  127. package/dist/collection/helpers/validator/rules/customFieldRule.js +0 -42
  128. package/dist/collection/helpers/validator/test/rules/customFieldRule.test.js +0 -48
  129. package/dist/types/helpers/validator/rules/customFieldRule.d.ts +0 -35
  130. package/dist/types/helpers/validator/test/rules/customFieldRule.test.d.ts +0 -1
  131. package/dist/vega/p-01f6afca.js +0 -1
  132. package/dist/vega/p-08b6766a.js +0 -1
  133. package/dist/vega/p-1563bdd6.entry.js +0 -1
  134. package/dist/vega/p-340ac655.js +0 -1
  135. package/dist/vega/p-35cb6bef.entry.js +0 -1
  136. package/dist/vega/p-b242c3b3.entry.js +0 -1
  137. package/dist/vega/p-b875dc2e.entry.js +0 -1
  138. package/dist/vega/p-e7839fab.entry.js +0 -13
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const featureFlagController = require('./featureFlagController-a3377c0c.js');
3
+ const featureFlagController = require('./featureFlagController-40d3aba1.js');
4
4
 
5
5
  /**
6
6
  * Default export function that will be used by stencil global script,
@@ -39,7 +39,22 @@ const isArrayEqual = (first, second) => {
39
39
  const isObjectArrayLike = (obj) => {
40
40
  return Object.keys(obj).every((key) => !isNaN(number.convertToNumber(key)));
41
41
  };
42
+ /**
43
+ * It takes an array and an item, and returns a new array with the item removed at the first occurrence.
44
+ *
45
+ * @param {T[]} arr - T[] - The array to remove the item from
46
+ * @param {T} item - The item to be deleted from the array.
47
+ * @returns {T[]} A function that takes two arguments, arr and item, and returns an array.
48
+ */
49
+ const deleteItemFromArray = (arr, item) => {
50
+ const index = arr.indexOf(item);
51
+ if (index > -1) {
52
+ arr.splice(index, 1);
53
+ }
54
+ return arr;
55
+ };
42
56
 
57
+ exports.deleteItemFromArray = deleteItemFromArray;
43
58
  exports.flattenChildren = flattenChildren;
44
59
  exports.isArrayEqual = isArrayEqual;
45
60
  exports.isObjectArrayLike = isObjectArrayLike;
@@ -19,6 +19,16 @@ const FeatureFlagsMap = {
19
19
  createdTimestamp: 1662508203840,
20
20
  createdAtVersion: '1.4.0',
21
21
  },
22
+ 'VEGA_CHECK_GROUP.VALUE_PROPERTY_TYPE_CHANGE_ARRAY': {
23
+ description: 'Feature flag to enable the change value property to array for the checkbox group component.',
24
+ createdTimestamp: 1661243219291,
25
+ createdAtVersion: '1.3.0',
26
+ },
27
+ 'VEGA_FORM.FORM_FIELD_CONTROLLER_VALIDATION': {
28
+ description: `Feature flag to enable the new form validation process for the form component.`,
29
+ createdTimestamp: 1660617211562,
30
+ createdAtVersion: '1.6.0',
31
+ },
22
32
  };
23
33
  const FeatureFlagsMap$1 = Object.freeze(FeatureFlagsMap);
24
34
 
@@ -0,0 +1,471 @@
1
+ 'use strict';
2
+
3
+ const subject = require('./subject-8403dbf0.js');
4
+ const observer = require('./observer-126f19d0.js');
5
+ const ui = require('./ui-1393500e.js');
6
+
7
+ /**
8
+ * A rule that checks if a string is empty or not
9
+ *
10
+ * @implements {FormFieldValidationRule<string>}
11
+ */
12
+ class RequiredFieldRule {
13
+ constructor() {
14
+ /**
15
+ * A function that checks if the item is a string, number, or boolean.
16
+ *
17
+ * @param {unknown} item - The item to be checked.
18
+ * @returns {boolean} The return value is a boolean that indicates whether the item is string, number or boolean.
19
+ */
20
+ this.checkArrayItemType = (item) => typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean';
21
+ }
22
+ /**
23
+ * If the input is a number or a boolean, return true. If the input is a string, return true if the string is not empty
24
+ *
25
+ * @param {Primitive | Array<Primitive>} input - The input to be evaluated.
26
+ * @returns {EvaluateResult} An object with two properties: isValid and message.
27
+ */
28
+ evaluate(input) {
29
+ if (!this.isAcceptedInputType(input)) {
30
+ throw new Error(`Unexpected type of input: ${typeof input}: ${input}`);
31
+ }
32
+ else if (typeof input === 'number' || typeof input === 'boolean') {
33
+ return {
34
+ isValid: true,
35
+ message: '',
36
+ };
37
+ }
38
+ else if (typeof input === 'string' || Array.isArray(input)) {
39
+ return {
40
+ isValid: input.length > 0,
41
+ message: input.length <= 0 ? 'This field is required' : '',
42
+ };
43
+ }
44
+ else if (input === null) {
45
+ return {
46
+ isValid: false,
47
+ message: 'This field is required',
48
+ };
49
+ }
50
+ }
51
+ /**
52
+ * If the input is accepted and the status is not disabled and visible, then return true
53
+ *
54
+ * @param {unknown} input - The input to be evaluated.
55
+ * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
56
+ * @returns {boolean} The return value is a boolean that indicates whether the input can be evaluated.
57
+ */
58
+ canEvaluate(input, status) {
59
+ return status
60
+ ? this.isAcceptedInputType(input) && !status.disabled && status.visible
61
+ : this.isAcceptedInputType(input);
62
+ }
63
+ /**
64
+ * If the field is not disabled, visible, and has been touched or modified, then show the error
65
+ *
66
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
67
+ * @returns {boolean} A boolean value.
68
+ */
69
+ shouldShowError(status) {
70
+ return !status.disabled && status.visible && (status.touched || status.modified);
71
+ }
72
+ /**
73
+ * If the input is a string, number, boolean, or null, return true, otherwise return false.
74
+ *
75
+ * @param {unknown} input - The input value to be validated.
76
+ * @returns {boolean} a boolean value.
77
+ */
78
+ isAcceptedInputType(input) {
79
+ return (typeof input === 'string' ||
80
+ typeof input === 'number' ||
81
+ typeof input === 'boolean' ||
82
+ (Array.isArray(input) && input.every(this.checkArrayItemType)) ||
83
+ input === null);
84
+ }
85
+ }
86
+
87
+ /**
88
+ * The FormFieldController class is a class that validates the value of an input elements
89
+ *
90
+ * @implements {Validator<number | string | boolean | null>}
91
+ * @property {FormFieldValidationRule<number | string | boolean>[] = []} defaultRules default rules used for validation
92
+ * @property {FormFieldValidationRule<number | string | boolean>[]} additionalRules additional rules used for validation
93
+ * @property {InputValidatorListener[]} listeners listeners monitoring on the validation result
94
+ * @property {string} inputContainerSelector container that holds the input value
95
+ * @property {unknown & { value?: number | string | boolean }} hostElement host element used to get the value for validation if input element is not present
96
+ * @property {boolean} isTouched true if an element is touched
97
+ * @property {boolean} isModified true if an element is modified
98
+ * @property {boolean} isVisible true if an element is visible
99
+ * @property {string} touchableArea define the area which listen to the blur event
100
+ * @property {MutationObserver} disabledAttrObserver reference to the MutationObserver
101
+ * @property {ResizeObserver} visibilityObserver reference to the ResizeObserver
102
+ * @property {Observer<boolean>} formResetTriggeredObserver reference to formResetTriggeredObserver
103
+ */
104
+ class FormFieldController {
105
+ /**
106
+ * This function is called when the component is created, and it sets up the observers that will be used to detect changes to the component's state.
107
+ * The first thing the constructor does is set the defaultRules, hostElement, inputContainerSelector, touchableArea, isTouched, isModified, and isDisabled properties
108
+ *
109
+ * @param {FormFieldValidationRule<number | string | boolean>[]} defaultRules - FormFieldValidationRule<T>[]
110
+ * @param {FormFieldElement<number | string | boolean>} hostElement - The form field element that this validation manager is attached to.
111
+ * @param {string} [inputContainer=.vega-input-container] - The selector for the element that contains the input element.
112
+ * @param {string} [touchableArea=input] - This is the element that will be used to determine if the user has touched the field.
113
+ */
114
+ constructor(defaultRules, hostElement, inputContainer = '.vega-input-container', touchableArea = 'input') {
115
+ var _a, _b;
116
+ this.defaultRules = [];
117
+ this.additionalRules = [];
118
+ this.listeners = [];
119
+ this.inputContainerSelector = '';
120
+ this.isTouched = false;
121
+ this.isModified = false;
122
+ this.isVisible = false;
123
+ this.isReset = false;
124
+ this.defaultRules = defaultRules;
125
+ this.hostElement = hostElement;
126
+ this.inputContainerSelector = inputContainer;
127
+ this.touchableArea = touchableArea;
128
+ this.initDisabledAttrObserver();
129
+ this.initResizeObserver();
130
+ this.initFormResetObserver();
131
+ (_b = (_a = this.hostElement).componentOnReady) === null || _b === void 0 ? void 0 : _b.call(_a).then(() => {
132
+ this.didRender();
133
+ });
134
+ }
135
+ /**
136
+ * Get the default value of the form field
137
+ *
138
+ * @param {HTMLElement} element Form field element
139
+ * @returns { '' | 0 | ['', ''] } The default value
140
+ */
141
+ static getFormFieldDefaultValue(element) {
142
+ const tagName = element.tagName;
143
+ if (tagName === 'VEGA-INPUT' ||
144
+ tagName === 'VEGA-INPUT-SELECT' ||
145
+ tagName === 'VEGA-CHECKBOX-GROUP' ||
146
+ tagName === 'VEGA-RADIO-GROUP')
147
+ return '';
148
+ if (tagName === 'VEGA-DATE-PICKER') {
149
+ if (element['mode'] === 'range') {
150
+ return ['', ''];
151
+ }
152
+ else {
153
+ return '';
154
+ }
155
+ }
156
+ if (tagName === 'VEGA-STEPPER') {
157
+ return 0;
158
+ }
159
+ }
160
+ /**
161
+ * It validates the input against the rules and returns a boolean indicating whether the input is valid or not
162
+ *
163
+ * @param {boolean} showError whether the validation result should be reflected in UI
164
+ * @returns {boolean} A boolean value.
165
+ */
166
+ validate(showError) {
167
+ return this.valid([], showError);
168
+ }
169
+ /**
170
+ * This function adds a listener to the listeners array.
171
+ *
172
+ * @param {InputValidatorListener} listener - The listener to add.
173
+ */
174
+ addListener(listener) {
175
+ this.listeners.push(listener);
176
+ }
177
+ /**
178
+ * It returns an array of all the validation rules for the field
179
+ *
180
+ * @returns {FormFieldValidationRule<number | string | boolean>[]} An array of FormFieldValidationRule<T>
181
+ */
182
+ getRules() {
183
+ return [...this.defaultRules, ...this.additionalRules];
184
+ }
185
+ /**
186
+ * Set the default rules for the form field.
187
+ *
188
+ * @param {FormFieldValidationRule<number | string | boolean>[]} rules - FormFieldValidationRule<T>[]
189
+ */
190
+ setDefaultRules(rules) {
191
+ this.defaultRules = rules;
192
+ }
193
+ /**
194
+ * This function sets the additional rules for the form field
195
+ *
196
+ * @param {FormFieldValidationRule<number | string | boolean>[]} rules - The rules that are required for the field to be valid.
197
+ */
198
+ setAdditionalRules(rules) {
199
+ this.additionalRules = rules;
200
+ }
201
+ /**
202
+ * Return true if any of the rules are an instance of the RequiredFieldRule class.
203
+ *
204
+ * @returns {boolean} A boolean value.
205
+ */
206
+ hasRequiredRule() {
207
+ return this.getRules().some((rule) => rule instanceof RequiredFieldRule);
208
+ }
209
+ /**
210
+ * The destroy function unregister the form reset observer
211
+ */
212
+ destroy() {
213
+ this.unregisterFormResetObserver();
214
+ }
215
+ /**
216
+ * valid function to validate the rules
217
+ */
218
+ valid(triggerStatus, showError = 'rule') {
219
+ const input = this.hostElement.value;
220
+ const firstInvalidResult = this.getFirstInvalidRuleResult(input, triggerStatus);
221
+ let isValid = true;
222
+ if (firstInvalidResult) {
223
+ if (showError === 'rule') {
224
+ firstInvalidResult.shouldShowError
225
+ ? this.applyInputInvalidUI(firstInvalidResult.message)
226
+ : this.resetInputInvalidUI();
227
+ }
228
+ else {
229
+ showError ? this.applyInputInvalidUI(firstInvalidResult.message) : this.resetInputInvalidUI();
230
+ }
231
+ isValid = false;
232
+ }
233
+ else {
234
+ this.resetInputInvalidUI();
235
+ }
236
+ this.invokeListeners(isValid);
237
+ return isValid;
238
+ }
239
+ /**
240
+ * It returns the first invalid rule result, or null if all rules are valid
241
+ *
242
+ * @param {number | string | boolean | string[] | null} input - The current value of the field
243
+ * @param {(keyof FormFieldStatusMeta)[]} statusChanged - (keyof FormFieldStatusMeta)[]
244
+ * @returns {ValidationResult | null} The first invalid rule result.
245
+ */
246
+ getFirstInvalidRuleResult(input, statusChanged) {
247
+ const status = this.getStatus();
248
+ for (const rule of this.getRules().filter((rule) => rule.canEvaluate(input, status, statusChanged))) {
249
+ const evaluateResult = rule.evaluate(input);
250
+ const shouldShowError = rule.shouldShowError
251
+ ? rule.shouldShowError(status, statusChanged)
252
+ : this.defaultShouldShowError(status);
253
+ const validationResult = Object.assign(Object.assign({}, evaluateResult), { shouldShowError });
254
+ if (!evaluateResult.isValid) {
255
+ return validationResult;
256
+ }
257
+ }
258
+ return null;
259
+ }
260
+ /**
261
+ * It takes an error message and displays it in the error container
262
+ *
263
+ * @param {string} errorMessage - The error message to display.
264
+ */
265
+ applyInputInvalidUI(errorMessage) {
266
+ if (errorMessage) {
267
+ const inputContainer = this.getInputElementContainer();
268
+ const errorContainer = this.getErrorContainer();
269
+ errorContainer.innerHTML = errorMessage;
270
+ errorContainer.classList.remove('vega-hidden');
271
+ inputContainer.classList.add('error');
272
+ }
273
+ }
274
+ /**
275
+ * Reset the input element's invalid UI
276
+ */
277
+ resetInputInvalidUI() {
278
+ const inputContainer = this.getInputElementContainer();
279
+ const errorContainer = this.getErrorContainer();
280
+ errorContainer.classList.add('vega-hidden');
281
+ inputContainer.classList.remove('error');
282
+ }
283
+ /**
284
+ * Get the input element container
285
+ *
286
+ * @returns {HTMLElement} The input element container.
287
+ */
288
+ getInputElementContainer() {
289
+ const inputContainer = this.hostElement.querySelector(this.inputContainerSelector);
290
+ if (!inputContainer) {
291
+ throw new Error(`Can't not find inputContainer with selector ${this.inputContainerSelector}`);
292
+ }
293
+ return inputContainer;
294
+ }
295
+ /**
296
+ * Get the error container, if it doesn't exist, create it
297
+ *
298
+ * @returns {HTMLElement} The error container.
299
+ */
300
+ getErrorContainer() {
301
+ var _a;
302
+ const inputContainer = this.getInputElementContainer();
303
+ let siblingContainer = inputContainer.nextSibling;
304
+ if (!siblingContainer || !((_a = siblingContainer.classList) === null || _a === void 0 ? void 0 : _a.contains('vega-error'))) {
305
+ siblingContainer = document.createElement('label');
306
+ siblingContainer.classList.add('vega-error');
307
+ inputContainer.after(siblingContainer);
308
+ }
309
+ return siblingContainer;
310
+ }
311
+ /**
312
+ * Invoke all listeners with the given isValid value
313
+ *
314
+ * @param {boolean} isValid - boolean
315
+ */
316
+ invokeListeners(isValid) {
317
+ this.listeners.forEach((listener) => listener.callback(isValid));
318
+ }
319
+ /**
320
+ * It returns an object with the current status of the form field
321
+ *
322
+ * @returns {FormFieldStatusMeta} The status of the form field.
323
+ */
324
+ getStatus() {
325
+ return {
326
+ touched: this.isTouched,
327
+ modified: this.isModified,
328
+ disabled: this.hostElement['disabled'],
329
+ visible: this.isVisible,
330
+ };
331
+ }
332
+ /**
333
+ * It updates the `isTouched` property and if auto validation is enabled, it validates the input
334
+ *
335
+ * @param {boolean} touched - boolean - whether the input is touched or not
336
+ */
337
+ updateIsTouched(touched) {
338
+ const prevIsTouched = this.isTouched;
339
+ this.isTouched = touched;
340
+ if (this.isAutoValidationEnabled()) {
341
+ this.valid(prevIsTouched === touched ? [] : ['touched']);
342
+ }
343
+ }
344
+ /**
345
+ * "If the value of the `isModified` property has changed, then update the `isModified` property and if auto-validation is enabled, then validate the control."
346
+ *
347
+ * @param {boolean} modified - boolean - whether the value has been modified or not
348
+ */
349
+ updateIsModified(modified) {
350
+ const prevIsModified = this.isModified;
351
+ this.isModified = modified;
352
+ if (this.isAutoValidationEnabled() && !this.isReset) {
353
+ this.valid(prevIsModified === modified ? [] : ['modified']);
354
+ }
355
+ this.isReset = false;
356
+ }
357
+ /**
358
+ * It creates a new MutationObserver that watches for changes to the disabled attribute of the host
359
+ * element, and when it detects a change, it validates the host element's value
360
+ */
361
+ initDisabledAttrObserver() {
362
+ this.disabledAttrObserver = new MutationObserver(() => {
363
+ if (this.isAutoValidationEnabled()) {
364
+ this.valid(['disabled']);
365
+ }
366
+ });
367
+ this.disabledAttrObserver.observe(this.hostElement, {
368
+ attributes: true,
369
+ attributeFilter: ['disabled'],
370
+ });
371
+ }
372
+ /**
373
+ * It creates an observer that will watch the host element and set the isVisible property to true if
374
+ * the element is visible.
375
+ */
376
+ initResizeObserver() {
377
+ this.resizeObserver = new ResizeObserver((entries) => {
378
+ const prevVisible = this.isVisible;
379
+ const currentVisible = entries[0].contentRect.height > 0;
380
+ this.isVisible = currentVisible;
381
+ if (this.isAutoValidationEnabled() && ui.findParent(this.hostElement, 'vega-form')) {
382
+ prevVisible !== currentVisible && this.valid(['visible']);
383
+ }
384
+ });
385
+ this.resizeObserver.observe(this.hostElement);
386
+ }
387
+ /**
388
+ * If the input form is a child of the current form, then the current form can accept the input form's reset operation
389
+ *
390
+ * @param {VegaForm} input - VegaForm - The form that is being reset.
391
+ * @returns {boolean} A boolean value.
392
+ */
393
+ canAcceptFormResetOperation(input) {
394
+ return ui.isParent(this.hostElement, input['host']);
395
+ }
396
+ /**
397
+ * Unregister the form reset observer.
398
+ */
399
+ unregisterFormResetObserver() {
400
+ subject.ChangeManager.unregister(subject.FORM_RESET_OPERATION_TRIGGERED, this.formResetTriggeredObserver);
401
+ }
402
+ /**
403
+ * It adds a blur event listener to all elements that match the selector in the touchableArea property
404
+ */
405
+ setupTouchedListener() {
406
+ this.hostElement.querySelectorAll(this.touchableArea).forEach((item) => item.addEventListener('blur', () => {
407
+ this.updateIsTouched(true);
408
+ }));
409
+ }
410
+ /**
411
+ * It adds an event listener to the host element that listens for a custom event called `vegaChange`.
412
+ * When that event is fired, the `updateIsModified` function is called with the argument `true`
413
+ */
414
+ setupModifiedListener() {
415
+ this.hostElement.addEventListener('vegaChange', () => {
416
+ this.updateIsModified(true);
417
+ });
418
+ }
419
+ /**
420
+ * It resets the form field's status and then validates the form field with the current value
421
+ */
422
+ reset(payload) {
423
+ const fieldName = this.hostElement.dataset['vegaForm'];
424
+ const defaultValue = payload.defaultValueMap[fieldName] === undefined || payload.defaultValueMap[fieldName] === null
425
+ ? FormFieldController.getFormFieldDefaultValue(this.hostElement)
426
+ : payload.defaultValueMap[fieldName];
427
+ this.isReset = true;
428
+ this.hostElement.value = defaultValue;
429
+ this.isTouched = false;
430
+ this.isModified = false;
431
+ this.hostElement.isValid = null;
432
+ this.resetInputInvalidUI();
433
+ }
434
+ /**
435
+ * This function is called after the component has been rendered. It re-attaches the invalid UI to
436
+ * the input element, and sets up the listeners for the `touched` and `modified` events
437
+ */
438
+ didRender() {
439
+ this.setupTouchedListener();
440
+ this.setupModifiedListener();
441
+ }
442
+ /**
443
+ * This function registers an observer with the ChangeManager that will be notified when a form
444
+ * reset operation is triggered
445
+ */
446
+ initFormResetObserver() {
447
+ this.formResetTriggeredObserver = new observer.Observer(this.canAcceptFormResetOperation.bind(this), this.reset.bind(this));
448
+ subject.ChangeManager.register(subject.FORM_RESET_OPERATION_TRIGGERED, this.formResetTriggeredObserver);
449
+ }
450
+ /**
451
+ * "If the host element's autoValidation property is not false, then return true."
452
+ * The host element is the element that the directive is attached to. In this case, the host element is the input element
453
+ *
454
+ * @returns {boolean} A boolean value.
455
+ */
456
+ isAutoValidationEnabled() {
457
+ return this.hostElement.autoValidation !== false;
458
+ }
459
+ /**
460
+ * If the field is not disabled, visible, and the field is touched or modified, then return true
461
+ *
462
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta - The status of the field.
463
+ * @returns {boolean} A function that takes in 3 parameters and returns a boolean.
464
+ */
465
+ defaultShouldShowError(status) {
466
+ return !status.disabled && status.visible && (status.touched || status.modified);
467
+ }
468
+ }
469
+
470
+ exports.FormFieldController = FormFieldController;
471
+ exports.RequiredFieldRule = RequiredFieldRule;
@@ -7,7 +7,7 @@ const log = require('./log-7b0974fb.js');
7
7
  const typeGuard = require('./typeGuard-7a5746f7.js');
8
8
  const icons = require('./icons-5a6aca4a.js');
9
9
  const ui = require('./ui-2ae913d5.js');
10
- const featureFlagController = require('./featureFlagController-a3377c0c.js');
10
+ const featureFlagController = require('./featureFlagController-40d3aba1.js');
11
11
  require('./number-2eb7b8f3.js');
12
12
 
13
13
  /* This file is generated by vega-design 2.0.64 */
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-c12bc235.js');
6
- const appGlobals = require('./app-globals-2bf8bcb4.js');
7
- require('./featureFlagController-a3377c0c.js');
6
+ const appGlobals = require('./app-globals-f1e88d74.js');
7
+ require('./featureFlagController-40d3aba1.js');
8
8
 
9
9
  /*
10
10
  Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
@@ -17,7 +17,7 @@ const defineCustomElements = (win, options) => {
17
17
  if (typeof window === 'undefined') return Promise.resolve();
18
18
  return patchEsm().then(() => {
19
19
  appGlobals.globalScripts();
20
- return index.bootstrapLazy([["vega-button_22.cjs",[[0,"vega-tab-group",{"selectedTabDataTarget":[1,"selected-tab-data-target"],"gap":[1],"showCloseButton":[4,"show-close-button"],"tabItems":[16],"positionRelativeTo":[1,"position-relative-to"],"tabPages":[32],"tabWidthArray":[32],"currentPageIndex":[32]},[[0,"vegaPageUpdate","onCarouselPageUpdate"]]],[4,"vega-table",{"columns":[16],"dataSource":[16],"rowSelection":[1040],"rowExpandable":[4,"row-expandable"],"rowClickable":[4,"row-clickable"],"rowDivider":[4,"row-divider"],"columnDivider":[4,"column-divider"],"striped":[4],"density":[1],"paddingX":[16],"showHeader":[4,"show-header"],"pagination":[16],"selectedRowKeySet":[32],"expandedRowKeySet":[32],"currentBreakpoint":[32],"sortersMap":[32],"currentData":[32],"currentClickedRowIndex":[32],"currentPage":[32],"openExpandRow":[64],"closeExpandRow":[64],"closeAllExpandRow":[64],"toggleExpandRow":[64],"clearSelection":[64],"getSelection":[64],"setSelection":[64]}],[0,"vega-date-picker",{"mode":[1],"value":[1537],"label":[1],"required":[4],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"format":[1],"size":[1],"formValidation":[2,"form-validation"],"validationRules":[16],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"placeholder":[1],"clearButton":[4,"clear-button"],"readOnly":[4,"read-only"],"allowRepick":[4,"allow-repick"],"dropdownConfig":[16],"disabled":[4],"valid":[64],"doClose":[64],"doOpen":[64]}],[0,"vega-input-select",{"label":[1],"required":[1028],"source":[1040],"value":[1537],"isValid":[1540,"is-valid"],"autoValidation":[4,"auto-validation"],"formValidation":[2,"form-validation"],"validationRules":[16],"prefixIcon":[1,"prefix-icon"],"disabled":[4],"placeholder":[1],"hint":[1],"vegaDropdownProps":[16],"isDropdownShow":[32],"showError":[32],"doClose":[64],"doOpen":[64],"doChange":[64],"valid":[64]}],[0,"vega-progress-tracker",{"direction":[1],"steps":[16],"completedStepArray":[16],"canClickStep":[4,"can-click-step"],"current":[32],"nextStep":[64],"prevStep":[64],"setCurrent":[64],"getCurrent":[64]},[[0,"vegaPageUpdate","onVegaPageUpdateHandler"]]],[4,"vega-sidenav",{"source":[16],"footnote":[1],"headerConfig":[16],"openByDefault":[1,"open-by-default"],"openState":[32],"toggle":[64]},[[0,"vegaClick","onVegaClickHandler"],[10,"click","collapseSidenavByBackDropClick"]]],[0,"vega-button",{"size":[1],"variant":[1],"icon":[1],"iconAlign":[1,"icon-align"],"label":[1025],"disabled":[4],"danger":[4],"block":[4]}],[4,"vega-footer",{"tosUrl":[1,"tos-url"],"privacyUrl":[1,"privacy-url"]}],[4,"vega-modal",{"backdrop":[1],"size":[8],"open":[1028],"animation":[4],"modalTitle":[1,"modal-title"],"backdropColor":[1,"backdrop-color"],"isVerticallyCenter":[4,"is-vertically-center"],"showCloseButton":[4,"show-close-button"],"padding":[1],"contentMaxHeight":[2,"content-max-height"],"modal":[64]},[[10,"click","listenDataTarget"],[0,"click","listenDataDismiss"]]],[0,"vega-pagination",{"current":[1538],"total":[2],"pageSize":[2,"page-size"]}],[0,"vega-button-link",{"link":[1],"size":[1],"icon":[513],"iconType":[1,"icon-type"],"iconAlign":[1,"icon-align"],"label":[1025],"disabled":[4],"danger":[4],"eventful":[4]}],[4,"vega-checkbox",{"value":[1],"checked":[1028],"disabled":[4],"size":[1]}],[4,"vega-sidenav-group",{"icon":[1],"label":[1]}],[4,"vega-sidenav-link",{"icon":[1],"selected":[1540],"url":[1]}],[4,"vega-dropdown",{"size":[8],"trigger":[1],"translocation":[16],"source":[1040],"positionRelativeTo":[1,"position-relative-to"],"selectType":[1,"select-type"],"selectedSourceKey":[1025,"selected-source-key"],"maxHeight":[2,"max-height"],"searchable":[4],"matchTargetWidth":[4,"match-target-width"],"matchContainerHeight":[4,"match-container-height"],"caseSensitive":[4,"case-sensitive"],"searchString":[32],"show":[64],"hide":[64]},[[1,"mouseenter","onMouseEnter"],[0,"click","onClick"],[9,"mousedown","onMouseDown"]]],[4,"vega-carousel",{"perPage":[8,"per-page"],"showSlider":[4,"show-slider"],"spacing":[1],"page":[32],"totalPages":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}],[4,"vega-grid",{"column":[2],"row":[2],"gap":[1]}],[0,"vega-input",{"inputId":[513,"id"],"label":[1],"value":[1537],"type":[1],"autocomplete":[1],"prefixIcon":[1,"prefix-icon"],"email":[4],"required":[1028],"min":[2],"max":[2],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"showClearIcon":[4,"show-clear-icon"],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"formValidation":[2,"form-validation"],"validationRules":[16],"size":[1],"placeholder":[1],"disabled":[4],"hint":[1],"maskConfig":[16],"valid":[64]},[[0,"input","handleValueInput"]]],[0,"vega-button-circle",{"size":[1],"variant":[1],"icon":[513],"label":[1],"disabled":[4],"danger":[4]}],[4,"vega-tooltip",{"size":[8],"trigger":[1],"content":[1],"placement":[1],"positionRelativeTo":[1,"position-relative-to"]},[[0,"click","onClick"],[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[8,"keyup","onKeyDown"],[9,"mousedown","onMouseDown"]]],[0,"vega-flex",{"gap":[1],"margin":[1],"breakpoint":[1],"direction":[1],"alignItem":[1,"align-item"],"justifyContent":[1,"justify-content"]}],[0,"vega-icon",{"icon":[513],"size":[1]}]]],["vega-accordion.cjs",[[4,"vega-accordion",{"drawsBackground":[4,"draws-background"],"prefixIcon":[1,"prefix-icon"],"accordionTitle":[1,"accordion-title"],"expandIconAlign":[1,"expand-icon-align"],"expand":[1028],"showExpandIcon":[4,"show-expand-icon"],"groupId":[1,"group-id"]}]]],["vega-stepper.cjs",[[0,"vega-stepper",{"stepperId":[513,"id"],"max":[2],"min":[2],"value":[1538],"label":[1],"disabled":[4],"required":[4],"isValid":[1028,"is-valid"],"formValidation":[2,"form-validation"],"valid":[64]},[[0,"vegaChange","handleValueChange"],[0,"vegaValidate","handleVegaInputValidate"]]]]],["vega-item-toggle.cjs",[[0,"vega-item-toggle",{"itemToggleStatusMap":[16],"isToggled":[1028,"is-toggled"],"isError":[4,"is-error"],"toggleStatus":[32]}]]],["vega-option.cjs",[[4,"vega-option",{"label":[1],"subLabel":[1,"sub-label"],"icon":[1]},[[2,"vegaFocus","handleFocus"],[2,"vegaBlur","handleBlur"],[3,"mousedown","handleMousedown"],[3,"mouseup","handleMouseup"],[3,"mouseout","handleMouseout"],[2,"click","handleClick"]]]]],["vega-checkbox-group.cjs",[[4,"vega-checkbox-group",{"label":[1],"value":[1025],"vegaFlexProp":[16],"disabled":[4],"required":[4],"hint":[1],"formValidation":[2,"form-validation"],"isValid":[1540,"is-valid"],"valid":[64]},[[0,"vegaChange","changeValue"]]]]],["vega-header.cjs",[[4,"vega-header",{"menuShown":[32]}]]],["vega-radio-group.cjs",[[4,"vega-radio-group",{"label":[1],"value":[1025],"name":[1],"vegaFlexProp":[16],"required":[4],"hint":[1],"formValidation":[2,"form-validation"],"isValid":[1540,"is-valid"],"valid":[64]},[[0,"vegaChange","changeValue"]]]]],["vega-toggle-switch.cjs",[[0,"vega-toggle-switch",{"checked":[1540],"size":[1],"label":[1],"disabled":[4]}]]],["vega-app-footer.cjs",[[0,"vega-app-footer",{"tosUrl":[1,"tos-url"],"privacyUrl":[1,"privacy-url"],"showDisclaimer":[4,"show-disclaimer"]}]]],["vega-badge.cjs",[[0,"vega-badge",{"bgColor":[1,"bg-color"],"textColor":[1,"text-color"],"text":[1],"size":[1]}]]],["vega-form.cjs",[[1,"vega-form",{"isValid":[1028,"is-valid"],"isTouched":[1028,"is-touched"],"valid":[64],"getValue":[64],"setValue":[64],"reset":[64]},[[0,"vegaValidate","updateInternalValidStatus"],[0,"vegaChange","updateInternalTouchedStatus"]]]]],["vega-radio.cjs",[[4,"vega-radio",{"value":[1025],"name":[1],"checked":[4],"disabled":[4]}]]],["vega-card.cjs",[[4,"vega-card",{"padding":[1],"margin":[1],"shadow":[1],"backgroundColor":[1,"background-color"]}]]]], options);
20
+ return index.bootstrapLazy([["vega-button_22.cjs",[[0,"vega-tab-group",{"selectedTabDataTarget":[1,"selected-tab-data-target"],"gap":[1],"showCloseButton":[4,"show-close-button"],"tabItems":[16],"positionRelativeTo":[1,"position-relative-to"],"tabPages":[32],"tabWidthArray":[32],"currentPageIndex":[32]},[[0,"vegaPageUpdate","onCarouselPageUpdate"]]],[4,"vega-table",{"columns":[16],"dataSource":[16],"rowSelection":[1040],"rowExpandable":[4,"row-expandable"],"rowClickable":[4,"row-clickable"],"rowDivider":[4,"row-divider"],"columnDivider":[4,"column-divider"],"striped":[4],"density":[1],"paddingX":[16],"showHeader":[4,"show-header"],"pagination":[16],"emptyDescription":[1,"empty-description"],"selectedRowKeySet":[32],"expandedRowKeySet":[32],"currentBreakpoint":[32],"sortersMap":[32],"currentData":[32],"currentClickedRowIndex":[32],"currentPage":[32],"openExpandRow":[64],"closeExpandRow":[64],"closeAllExpandRow":[64],"toggleExpandRow":[64],"clearSelection":[64],"getSelection":[64],"setSelection":[64]}],[0,"vega-date-picker",{"mode":[1],"value":[1537],"label":[1],"required":[4],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"format":[1],"size":[1],"formValidation":[2,"form-validation"],"validationRules":[16],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"placeholder":[1],"clearButton":[4,"clear-button"],"readOnly":[4,"read-only"],"allowRepick":[4,"allow-repick"],"dropdownConfig":[16],"disabled":[516],"valid":[64],"doClose":[64],"doOpen":[64]}],[0,"vega-input-select",{"label":[1],"required":[1028],"source":[1040],"value":[1537],"isValid":[1540,"is-valid"],"autoValidation":[4,"auto-validation"],"formValidation":[2,"form-validation"],"validationRules":[16],"prefixIcon":[1,"prefix-icon"],"disabled":[516],"placeholder":[1],"hint":[1],"vegaDropdownProps":[16],"isDropdownShow":[32],"doClose":[64],"doOpen":[64],"doChange":[64],"valid":[64]}],[0,"vega-progress-tracker",{"direction":[1],"steps":[16],"completedStepArray":[16],"canClickStep":[4,"can-click-step"],"current":[32],"nextStep":[64],"prevStep":[64],"setCurrent":[64],"getCurrent":[64]},[[0,"vegaPageUpdate","onVegaPageUpdateHandler"]]],[4,"vega-sidenav",{"source":[16],"footnote":[1],"headerConfig":[16],"openByDefault":[1,"open-by-default"],"openState":[32],"toggle":[64]},[[0,"vegaClick","onVegaClickHandler"],[10,"click","collapseSidenavByBackDropClick"]]],[0,"vega-button",{"size":[1],"variant":[1],"icon":[1],"iconAlign":[1,"icon-align"],"label":[1025],"disabled":[4],"danger":[4],"block":[4]}],[4,"vega-footer",{"tosUrl":[1,"tos-url"],"privacyUrl":[1,"privacy-url"]}],[4,"vega-modal",{"backdrop":[1],"size":[8],"open":[1028],"animation":[4],"modalTitle":[1,"modal-title"],"backdropColor":[1,"backdrop-color"],"isVerticallyCenter":[4,"is-vertically-center"],"showCloseButton":[4,"show-close-button"],"padding":[1],"contentMaxHeight":[2,"content-max-height"],"modal":[64]},[[10,"click","listenDataTarget"],[0,"click","listenDataDismiss"]]],[0,"vega-pagination",{"current":[1538],"total":[2],"pageSize":[2,"page-size"]}],[0,"vega-button-link",{"link":[1],"size":[1],"icon":[513],"iconType":[1,"icon-type"],"iconAlign":[1,"icon-align"],"label":[1025],"disabled":[4],"danger":[4],"eventful":[4]}],[4,"vega-checkbox",{"value":[1],"name":[1],"checked":[1028],"disabled":[4],"size":[1]}],[4,"vega-sidenav-group",{"icon":[1],"label":[1]}],[4,"vega-sidenav-link",{"icon":[1],"selected":[1540],"url":[1],"showSideBarOnClickLink":[4,"show-side-bar-on-click-link"]}],[4,"vega-dropdown",{"size":[8],"trigger":[1],"translocation":[16],"source":[1040],"positionRelativeTo":[1,"position-relative-to"],"selectType":[1,"select-type"],"selectedSourceKey":[1025,"selected-source-key"],"maxHeight":[2,"max-height"],"searchable":[4],"matchTargetWidth":[4,"match-target-width"],"matchContainerHeight":[4,"match-container-height"],"caseSensitive":[4,"case-sensitive"],"searchString":[32],"show":[64],"hide":[64]},[[1,"mouseenter","onMouseEnter"],[0,"click","onClick"],[9,"mousedown","onMouseDown"]]],[4,"vega-carousel",{"perPage":[8,"per-page"],"showSlider":[4,"show-slider"],"spacing":[1],"page":[32],"totalPages":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}],[4,"vega-grid",{"column":[2],"row":[2],"gap":[1]}],[0,"vega-input",{"inputId":[513,"id"],"label":[1],"value":[1537],"type":[1],"autocomplete":[1],"prefixIcon":[1,"prefix-icon"],"email":[4],"required":[1028],"min":[2],"max":[2],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"showClearIcon":[4,"show-clear-icon"],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"formValidation":[2,"form-validation"],"validationRules":[16],"size":[1],"placeholder":[1],"disabled":[516],"hint":[1],"maskConfig":[16],"valid":[64]},[[0,"input","handleValueInput"]]],[0,"vega-button-circle",{"size":[1],"variant":[1],"icon":[513],"label":[1],"disabled":[4],"danger":[4]}],[4,"vega-tooltip",{"size":[8],"trigger":[1],"content":[1],"placement":[1],"positionRelativeTo":[1,"position-relative-to"]},[[0,"click","onClick"],[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[8,"keyup","onKeyDown"],[9,"mousedown","onMouseDown"]]],[0,"vega-flex",{"gap":[1],"margin":[1],"breakpoint":[1],"direction":[1],"alignItem":[1,"align-item"],"justifyContent":[1,"justify-content"]}],[0,"vega-icon",{"icon":[513],"size":[1]}]]],["vega-accordion.cjs",[[4,"vega-accordion",{"drawsBackground":[4,"draws-background"],"prefixIcon":[1,"prefix-icon"],"accordionTitle":[1,"accordion-title"],"expandIconAlign":[1,"expand-icon-align"],"expand":[1028],"showExpandIcon":[4,"show-expand-icon"],"groupId":[1,"group-id"]}]]],["vega-stepper.cjs",[[0,"vega-stepper",{"stepperId":[513,"id"],"max":[2],"min":[2],"value":[1538],"label":[1],"disabled":[516],"required":[4],"isValid":[1028,"is-valid"],"formValidation":[2,"form-validation"],"valid":[64]},[[0,"vegaChange","handleValueChange"],[0,"vegaValidate","handleVegaInputValidate"]]]]],["vega-item-toggle.cjs",[[0,"vega-item-toggle",{"itemToggleStatusMap":[16],"isToggled":[1028,"is-toggled"],"isError":[4,"is-error"],"toggleStatus":[32]}]]],["vega-option.cjs",[[4,"vega-option",{"label":[1],"subLabel":[1,"sub-label"],"icon":[1]},[[2,"vegaFocus","handleFocus"],[2,"vegaBlur","handleBlur"],[3,"mousedown","handleMousedown"],[3,"mouseup","handleMouseup"],[3,"mouseout","handleMouseout"],[2,"click","handleClick"]]]]],["vega-checkbox-group.cjs",[[4,"vega-checkbox-group",{"label":[1],"value":[16],"name":[1],"vegaFlexProp":[16],"disabled":[516],"required":[4],"hint":[1],"formValidation":[2,"form-validation"],"isValid":[1028,"is-valid"],"valid":[64]},[[0,"vegaChange","changeValue"]]]]],["vega-header.cjs",[[4,"vega-header",{"menuShown":[32]}]]],["vega-radio-group.cjs",[[4,"vega-radio-group",{"label":[1],"value":[1025],"name":[1],"vegaFlexProp":[16],"required":[4],"hint":[1],"formValidation":[2,"form-validation"],"isValid":[1540,"is-valid"],"valid":[64]},[[0,"vegaChange","changeValue"]]]]],["vega-toggle-switch.cjs",[[0,"vega-toggle-switch",{"checked":[1540],"size":[1],"label":[1],"disabled":[4]}]]],["vega-app-footer.cjs",[[0,"vega-app-footer",{"tosUrl":[1,"tos-url"],"privacyUrl":[1,"privacy-url"],"showDisclaimer":[4,"show-disclaimer"]}]]],["vega-badge.cjs",[[0,"vega-badge",{"bgColor":[1,"bg-color"],"textColor":[1,"text-color"],"text":[1],"size":[1]}]]],["vega-form.cjs",[[1,"vega-form",{"isValid":[1028,"is-valid"],"isTouched":[1028,"is-touched"],"valid":[64],"getValue":[64],"setValue":[64],"reset":[64]},[[0,"vegaValidate","updateInternalValidStatus"],[0,"vegaChange","updateInternalTouchedStatus"]]]]],["vega-radio.cjs",[[4,"vega-radio",{"value":[1025],"name":[1],"checked":[4],"disabled":[4]}]]],["vega-card.cjs",[[4,"vega-card",{"padding":[1],"margin":[1],"shadow":[1],"backgroundColor":[1,"background-color"]}]]]], options);
21
21
  });
22
22
  };
23
23
 
@@ -91,8 +91,10 @@ class Subject {
91
91
  const SIDENAV_LINK_SELECTED_TOPIC = new Subject('SIDENAV_LINK_SELECTED_TOPIC');
92
92
  const ACCORDION_EXPAND_TOPIC = new Subject('ACCORDION_EXPAND_TOPIC');
93
93
  const FORM_CONTROLLED_FIELD_DISABLED_STATUS_CHANGE = new Subject('FORM_CONTROLLED_FIELD_DISABLED_STATUS_CHANGE');
94
+ const FORM_RESET_OPERATION_TRIGGERED = new Subject('FORM_RESET_OPERATION_TRIGGERED');
94
95
 
95
96
  exports.ACCORDION_EXPAND_TOPIC = ACCORDION_EXPAND_TOPIC;
96
97
  exports.ChangeManager = ChangeManager$1;
97
98
  exports.FORM_CONTROLLED_FIELD_DISABLED_STATUS_CHANGE = FORM_CONTROLLED_FIELD_DISABLED_STATUS_CHANGE;
99
+ exports.FORM_RESET_OPERATION_TRIGGERED = FORM_RESET_OPERATION_TRIGGERED;
98
100
  exports.SIDENAV_LINK_SELECTED_TOPIC = SIDENAV_LINK_SELECTED_TOPIC;