@globalpayments/vega 2.39.0 → 2.40.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.
- package/dist/cjs/{app-globals-dd3e7925.js → app-globals-cdd0972c.js} +12 -1
- package/dist/cjs/check-box-required-rule-1ee54b9a.js +70 -0
- package/dist/cjs/date-required-rule-4e1f84fd.js +92 -0
- package/dist/cjs/{element-appender-slimmer-c6e0f4ca.js → element-appender-slimmer-4f0dc8c6.js} +9 -5
- package/dist/cjs/file-uploader-required-rule-313ec9e3.js +21 -0
- package/dist/cjs/{form-field-controller-slimmer-48c0ad0b.js → form-field-controller-slimmer-d92e8212.js} +28 -1
- package/dist/cjs/index.cjs.js +22 -1
- package/dist/cjs/input-phone-number-required-rule-2668fdf1.js +65 -0
- package/dist/cjs/input-range-required-rule-5b9c2a95.js +63 -0
- package/dist/cjs/internal-form-field-validation-rule.abstract-07cdff46.js +15 -0
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{min-number-rule-115c5a3b.js → min-number-rule-5bcccc8f.js} +7 -4
- package/dist/cjs/{min-string-length-rule-75f24a48.js → min-string-length-rule-af215976.js} +8 -4
- package/dist/cjs/public-rules-90b972e5.js +42 -0
- package/dist/cjs/{required-field-rule-7f9945fa.js → required-field-rule-d73c1d8c.js} +6 -3
- package/dist/cjs/rich-text-editor-required-rule-cacc5fe0.js +64 -0
- package/dist/cjs/time-required-rule-ccf178e7.js +141 -0
- package/dist/cjs/toggle-switch-required-rule-88a51b36.js +66 -0
- package/dist/cjs/{valid-credit-card-number-rule-4a9ae5d9.js → valid-credit-card-number-rule-4a1b00b8.js} +3 -2
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -79
- package/dist/cjs/vega-color-picker.cjs.entry.js +3 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +3 -2
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +8 -90
- package/dist/cjs/vega-dialog_2.cjs.entry.js +29 -1
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +1 -1
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -19
- package/dist/cjs/vega-form.cjs.entry.js +2 -1
- package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -2
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +4 -3
- package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -2
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -63
- package/dist/cjs/vega-input-range.cjs.entry.js +6 -61
- package/dist/cjs/vega-input-select.cjs.entry.js +3 -2
- package/dist/cjs/vega-input.cjs.entry.js +7 -6
- package/dist/cjs/vega-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -2
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +4 -60
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -2
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -2
- package/dist/cjs/vega-signature-capture.cjs.entry.js +3 -2
- package/dist/cjs/vega-stepper.cjs.entry.js +3 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +4 -3
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -140
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +4 -63
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +53 -12
- package/dist/cjs/vega.cjs.js +3 -2
- package/dist/collection/components/vega-checkbox/vega-checkbox.css +82 -33
- package/dist/collection/components/vega-checkbox/vega-checkbox.js +8 -13
- package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +2 -2
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +9 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.js +16 -0
- package/dist/collection/components/vega-modal/vega-modal.js +6 -0
- package/dist/collection/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.js +45 -11
- package/dist/collection/components/vega-tooltip/vega-tooltip.js +12 -0
- package/dist/collection/global/scripts/before-vega-load.js +11 -0
- package/dist/collection/helpers/slimmers/element-appender-slimmer.js +8 -5
- package/dist/collection/helpers/slimmers/test/element-appender-slimmer.test.js +2 -0
- package/dist/collection/helpers/ui/element-appender.js +1 -0
- package/dist/collection/helpers/ui/test/element-appender.test.js +1 -0
- package/dist/collection/helpers/validator/form-field-controller.js +28 -1
- package/dist/collection/helpers/validator/public-rules.js +10 -0
- package/dist/collection/helpers/validator/rules/check-box-required-rule.js +4 -3
- package/dist/collection/helpers/validator/rules/date-range-rule.js +2 -1
- package/dist/collection/helpers/validator/rules/date-required-rule.js +5 -3
- package/dist/collection/helpers/validator/rules/email-field-rule.js +3 -2
- package/dist/collection/helpers/validator/rules/{object-array-required-rule.js → file-uploader-required-rule.js} +1 -1
- package/dist/collection/helpers/validator/rules/input-phone-number-required-rule.js +5 -3
- package/dist/collection/helpers/validator/rules/input-range-min-and-max-rule.js +3 -1
- package/dist/collection/helpers/validator/rules/input-range-required-rule.js +5 -4
- package/dist/collection/helpers/validator/rules/internal-form-field-validation-rule.abstract.js +11 -0
- package/dist/collection/helpers/validator/rules/max-number-rule.js +4 -2
- package/dist/collection/helpers/validator/rules/max-string-length-rule.js +4 -2
- package/dist/collection/helpers/validator/rules/min-and-max-date-rule.js +3 -1
- package/dist/collection/helpers/validator/rules/min-number-rule.js +4 -2
- package/dist/collection/helpers/validator/rules/min-string-length-rule.js +4 -2
- package/dist/collection/helpers/validator/rules/required-field-rule.js +5 -3
- package/dist/collection/helpers/validator/rules/rich-text-editor-required-rule.js +4 -3
- package/dist/collection/helpers/validator/rules/time-range-required-rule.js +5 -3
- package/dist/collection/helpers/validator/rules/time-range-rule.js +3 -1
- package/dist/collection/helpers/validator/rules/time-required-rule.js +5 -3
- package/dist/collection/helpers/validator/rules/toggle-switch-required-rule.js +4 -3
- package/dist/collection/helpers/validator/rules/valid-credit-card-number-rule.js +3 -2
- package/dist/collection/helpers/validator/rules/valid-phone-number-rule.js +4 -2
- package/dist/collection/helpers/validator/test/rules/file-uploader-required-rule.test.js +7 -0
- package/dist/collection/helpers/validator/test/rules/public-rules.test.js +80 -0
- package/dist/collection/index.js +1 -0
- package/dist/esm/{app-globals-c954167a.js → app-globals-88fa3549.js} +12 -1
- package/dist/esm/check-box-required-rule-cb0aa339.js +68 -0
- package/dist/esm/{date-732bc749.js → date-c55b97f0.js} +1 -1
- package/dist/esm/date-required-rule-8944f3bf.js +90 -0
- package/dist/esm/{element-appender-slimmer-f5e703f3.js → element-appender-slimmer-d9155ee0.js} +9 -5
- package/dist/esm/file-uploader-required-rule-ad886d01.js +19 -0
- package/dist/esm/{form-field-controller-slimmer-7a9f2b2e.js → form-field-controller-slimmer-bb64dec7.js} +28 -1
- package/dist/esm/index.js +12 -1
- package/dist/esm/input-phone-number-required-rule-be6a5572.js +63 -0
- package/dist/esm/input-range-required-rule-3ad74776.js +61 -0
- package/dist/esm/internal-form-field-validation-rule.abstract-f5b6bdbf.js +13 -0
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{min-number-rule-31d48b22.js → min-number-rule-a6082418.js} +7 -4
- package/dist/esm/{min-string-length-rule-c6a69eeb.js → min-string-length-rule-c31c89f4.js} +8 -4
- package/dist/esm/public-rules-413f6a17.js +27 -0
- package/dist/esm/{required-field-rule-368b31fa.js → required-field-rule-ab4bdc47.js} +6 -3
- package/dist/esm/rich-text-editor-required-rule-75cc2db0.js +62 -0
- package/dist/esm/time-required-rule-a01163b5.js +138 -0
- package/dist/esm/toggle-switch-required-rule-b3cf4302.js +64 -0
- package/dist/esm/{valid-credit-card-number-rule-2aef3ad5.js → valid-credit-card-number-rule-cc497bec.js} +3 -2
- package/dist/esm/vega-calendar_3.entry.js +1 -1
- package/dist/esm/vega-checkbox_2.entry.js +11 -79
- package/dist/esm/vega-color-picker.entry.js +3 -2
- package/dist/esm/vega-combo-box.entry.js +3 -2
- package/dist/esm/vega-date-picker_2.entry.js +8 -90
- package/dist/esm/vega-dialog_2.entry.js +29 -1
- package/dist/esm/vega-dropdown_5.entry.js +1 -1
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +5 -19
- package/dist/esm/vega-form.entry.js +2 -1
- package/dist/esm/vega-image-uploader.entry.js +3 -2
- package/dist/esm/vega-input-credit-card.entry.js +4 -3
- package/dist/esm/vega-input-numeric.entry.js +3 -2
- package/dist/esm/vega-input-phone-number.entry.js +6 -62
- package/dist/esm/vega-input-range.entry.js +5 -60
- package/dist/esm/vega-input-select.entry.js +3 -2
- package/dist/esm/vega-input.entry.js +7 -6
- package/dist/esm/vega-popover_2.entry.js +1 -1
- package/dist/esm/vega-radio_2.entry.js +3 -2
- package/dist/esm/vega-rich-text-editor_4.entry.js +3 -59
- package/dist/esm/vega-selection-chip_2.entry.js +3 -2
- package/dist/esm/vega-selection-tile_2.entry.js +3 -2
- package/dist/esm/vega-signature-capture.entry.js +3 -2
- package/dist/esm/vega-stepper.entry.js +3 -2
- package/dist/esm/vega-textarea.entry.js +4 -3
- package/dist/esm/vega-time-picker_2.entry.js +7 -136
- package/dist/esm/vega-toggle-switch.entry.js +3 -62
- package/dist/esm/vega-tooltip_2.entry.js +53 -12
- package/dist/esm/vega.js +3 -2
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +4 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.d.ts +5 -0
- package/dist/types/components/vega-modal/vega-modal.d.ts +1 -0
- package/dist/types/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.d.ts +18 -0
- package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +4 -0
- package/dist/types/helpers/slimmers/element-appender-slimmer.d.ts +1 -0
- package/dist/types/helpers/slimmers/form-field-controller-slimmer.d.ts +2 -1
- package/dist/types/helpers/validator/form-field-controller.d.ts +10 -0
- package/dist/types/helpers/validator/public-rules.d.ts +10 -0
- package/dist/types/helpers/validator/rules/check-box-required-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/date-range-rule.d.ts +3 -2
- package/dist/types/helpers/validator/rules/date-required-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/email-field-rule.d.ts +4 -3
- package/dist/types/helpers/validator/rules/{object-array-required-rule.d.ts → file-uploader-required-rule.d.ts} +1 -1
- package/dist/types/helpers/validator/rules/input-phone-number-required-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/input-range-min-and-max-rule.d.ts +3 -2
- package/dist/types/helpers/validator/rules/input-range-required-rule.d.ts +8 -7
- package/dist/types/helpers/validator/rules/internal-form-field-validation-rule.abstract.d.ts +19 -0
- package/dist/types/helpers/validator/rules/max-number-rule.d.ts +4 -3
- package/dist/types/helpers/validator/rules/max-string-length-rule.d.ts +4 -3
- package/dist/types/helpers/validator/rules/min-and-max-date-rule.d.ts +3 -2
- package/dist/types/helpers/validator/rules/min-number-rule.d.ts +4 -3
- package/dist/types/helpers/validator/rules/min-string-length-rule.d.ts +4 -3
- package/dist/types/helpers/validator/rules/required-field-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/rich-text-editor-required-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/time-range-required-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/time-range-rule.d.ts +3 -2
- package/dist/types/helpers/validator/rules/time-required-rule.d.ts +7 -6
- package/dist/types/helpers/validator/rules/toggle-switch-required-rule.d.ts +5 -4
- package/dist/types/helpers/validator/rules/valid-credit-card-number-rule.d.ts +4 -3
- package/dist/types/helpers/validator/rules/valid-phone-number-rule.d.ts +4 -3
- package/dist/types/helpers/validator/test/rules/public-rules.test.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/public-api.d.ts +1 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-04c72f30.entry.js +1 -0
- package/dist/vega/p-07c2725a.js +1 -0
- package/dist/vega/{p-b5990090.js → p-08835909.js} +1 -1
- package/dist/vega/p-0b6d4561.entry.js +1 -0
- package/dist/vega/p-0bb860cc.js +1 -0
- package/dist/vega/p-113cd659.entry.js +1 -0
- package/dist/vega/{p-64e49394.entry.js → p-154d262e.entry.js} +1 -1
- package/dist/vega/p-17598aac.entry.js +1 -0
- package/dist/vega/p-23130825.entry.js +1 -0
- package/dist/vega/p-280cbcdb.js +1 -0
- package/dist/vega/{p-4b19706c.entry.js → p-3299c30b.entry.js} +1 -1
- package/dist/vega/p-3fd9d39f.entry.js +1 -0
- package/dist/vega/p-42a949f5.entry.js +1 -0
- package/dist/vega/p-4bd1b877.entry.js +1 -0
- package/dist/vega/p-590fd123.js +1 -0
- package/dist/vega/{p-d2e6090a.js → p-5a7eabcc.js} +1 -1
- package/dist/vega/p-5e56f3bd.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-612c9374.entry.js +1 -0
- package/dist/vega/{p-9ee23f34.entry.js → p-6585bddc.entry.js} +2 -2
- package/dist/vega/p-6603081a.entry.js +1 -0
- package/dist/vega/p-6f90d444.js +1 -0
- package/dist/vega/p-7303fff2.entry.js +1 -0
- package/dist/vega/p-7b648a05.entry.js +1 -0
- package/dist/vega/p-7c0b4c36.js +1 -0
- package/dist/vega/p-81b21503.entry.js +1 -0
- package/dist/vega/p-8fae8f9e.js +1 -0
- package/dist/vega/p-924b4e24.js +1 -0
- package/dist/vega/{p-ea78ddfa.entry.js → p-94459733.entry.js} +1 -1
- package/dist/vega/p-a05ca459.entry.js +1 -0
- package/dist/vega/p-a3e80fb2.entry.js +1 -0
- package/dist/vega/p-a7a46358.entry.js +1 -0
- package/dist/vega/p-abd7aeaa.js +1 -0
- package/dist/vega/p-b24da503.entry.js +1 -0
- package/dist/vega/p-b44f3309.js +1 -0
- package/dist/vega/p-b9051ad2.js +1 -0
- package/dist/vega/{p-4ab0d645.js → p-c253d09c.js} +1 -1
- package/dist/vega/p-c56acdd5.entry.js +1 -0
- package/dist/vega/p-cdbbdcc2.js +1 -0
- package/dist/vega/p-d1a06058.entry.js +1 -0
- package/dist/vega/p-d51b04ce.entry.js +1 -0
- package/dist/vega/p-e0446879.js +1 -0
- package/dist/vega/p-e08b6542.entry.js +1 -0
- package/dist/vega/p-f396c69a.js +1 -0
- package/dist/vega/p-fda6c178.entry.js +1 -0
- package/dist/vega/p-ffac4b8c.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/helpers/validator/test/rules/object-array-required-rule.test.js +0 -7
- package/dist/vega/p-0b697841.entry.js +0 -1
- package/dist/vega/p-257b1bc2.entry.js +0 -1
- package/dist/vega/p-3152031c.js +0 -1
- package/dist/vega/p-3c85a11b.entry.js +0 -1
- package/dist/vega/p-49bf2b3a.js +0 -1
- package/dist/vega/p-4a8db510.entry.js +0 -1
- package/dist/vega/p-4e436842.entry.js +0 -1
- package/dist/vega/p-59834ea4.entry.js +0 -1
- package/dist/vega/p-59cfed37.entry.js +0 -1
- package/dist/vega/p-60e1ebe1.entry.js +0 -1
- package/dist/vega/p-629bd266.entry.js +0 -1
- package/dist/vega/p-64e0c944.entry.js +0 -1
- package/dist/vega/p-66b9e86d.entry.js +0 -1
- package/dist/vega/p-74958b1a.js +0 -1
- package/dist/vega/p-74ff73d6.entry.js +0 -1
- package/dist/vega/p-8120e7a1.entry.js +0 -1
- package/dist/vega/p-894c067a.entry.js +0 -1
- package/dist/vega/p-989b36a2.entry.js +0 -1
- package/dist/vega/p-a8a809e1.entry.js +0 -1
- package/dist/vega/p-b6bffdf3.entry.js +0 -1
- package/dist/vega/p-bf6d3c00.entry.js +0 -1
- package/dist/vega/p-c00fde35.entry.js +0 -1
- package/dist/vega/p-c2e96537.entry.js +0 -1
- package/dist/vega/p-ce94a9c5.entry.js +0 -1
- package/dist/vega/p-d03945cb.entry.js +0 -1
- package/dist/vega/p-f41102cd.js +0 -1
- package/dist/vega/p-f5b0ce61.js +0 -1
- package/dist/vega/p-fc49a98e.entry.js +0 -1
- /package/dist/types/helpers/validator/test/rules/{object-array-required-rule.test.d.ts → file-uploader-required-rule.test.d.ts} +0 -0
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { h, F as Fragment, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-187f71d1.js';
|
|
2
2
|
import { C as ComponentLoadRequired } from './component-load-required-ce710ef5.js';
|
|
3
|
-
import {
|
|
3
|
+
import { T as TimeRangeRequiredRule, a as TimeRequiredRule } from './time-required-rule-a01163b5.js';
|
|
4
4
|
import { s as sanitizeVegaComponent } from './component-cae24190.js';
|
|
5
5
|
import { c as MapToComponentField, V as VegaSlimmer, M as MapToComponentMethod, L as LogUtility, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
6
6
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
|
|
7
|
-
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-
|
|
7
|
+
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-bb64dec7.js';
|
|
8
8
|
import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-857c65fa.js';
|
|
9
9
|
import { f as VegaChange, z as VegaFocus, A as VegaBlur, a as VegaClick } from './dom-node-subject-factory-97deb349.js';
|
|
10
10
|
import { g as getDeviceType, D as DeviceType } from './ui-62e4be97.js';
|
|
11
11
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
|
|
12
|
+
import { a as isTimeStr, p as pad, e as convert12HourTo24HourFormat } from './date-c55b97f0.js';
|
|
12
13
|
import { i as isArrayEqual } from './array-b668466e.js';
|
|
13
14
|
import { b as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-8268945e.js';
|
|
14
15
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
15
|
-
import { E as ElementAppenderSlimmer } from './element-appender-slimmer-
|
|
16
|
+
import { E as ElementAppenderSlimmer } from './element-appender-slimmer-d9155ee0.js';
|
|
16
17
|
import { K as KeyboardManagerSlimmer } from './keyboard-manager-slimmer-f80d6835.js';
|
|
17
18
|
import { i as isNonNullable } from './type-guard-158f6d7a.js';
|
|
19
|
+
import { I as InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
|
|
18
20
|
import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-3220fa5b.js';
|
|
19
21
|
import { c as createEventEmitSlimmer } from './event-emit-slimmer-36cf4e39.js';
|
|
20
22
|
import { T as TranslationSlimmer } from './translation-slimmer-7974f30b.js';
|
|
@@ -43,71 +45,6 @@ import './feature-flag-controller-4b3fe6f8.js';
|
|
|
43
45
|
import './index-44c794b4.js';
|
|
44
46
|
import './_commonjsHelpers-9943807e.js';
|
|
45
47
|
|
|
46
|
-
/**
|
|
47
|
-
* A rule that checks if time is empty or not
|
|
48
|
-
*
|
|
49
|
-
* @implements {FormFieldValidationRule<string>}
|
|
50
|
-
*/
|
|
51
|
-
class TimeRequiredRule {
|
|
52
|
-
/**
|
|
53
|
-
* It creates a new instance of the class with the given config.
|
|
54
|
-
*
|
|
55
|
-
* @param {{ timeFormat: TimeFormat }} config - config including the timeFormat for time value
|
|
56
|
-
* @param {TimeFormat} config.timeFormat - The timeFormat for time value
|
|
57
|
-
*/
|
|
58
|
-
constructor(config) {
|
|
59
|
-
this.config = config;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* It checks if the input is a valid time string.
|
|
63
|
-
*
|
|
64
|
-
* @param {string} input - The value of the input field.
|
|
65
|
-
* @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
|
|
66
|
-
*/
|
|
67
|
-
evaluate(input) {
|
|
68
|
-
if (!this.isAcceptedInputType(input)) {
|
|
69
|
-
throw new Error(`Invalid time value ${input}`);
|
|
70
|
-
}
|
|
71
|
-
const isValid = isTimeStr(input, this.config.timeFormat);
|
|
72
|
-
return {
|
|
73
|
-
isValid,
|
|
74
|
-
message: isValid ? '' : 'This field is required',
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* If the input is accepted and the status is not disabled and visible, then return true
|
|
79
|
-
*
|
|
80
|
-
* @param {unknown} input - The input to be evaluated.
|
|
81
|
-
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
82
|
-
* @returns {boolean} A boolean value.
|
|
83
|
-
*/
|
|
84
|
-
canEvaluate(input, status) {
|
|
85
|
-
return status
|
|
86
|
-
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
87
|
-
: this.isAcceptedInputType(input);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
91
|
-
*
|
|
92
|
-
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
93
|
-
* @returns {boolean} A boolean value.
|
|
94
|
-
*/
|
|
95
|
-
shouldShowError(status) {
|
|
96
|
-
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* If the input is undefined or null, return true, otherwise return true if the input is a string.
|
|
100
|
-
*
|
|
101
|
-
* @param {unknown} input - The input value to be validated.
|
|
102
|
-
* @returns {boolean}A boolean.
|
|
103
|
-
*/
|
|
104
|
-
isAcceptedInputType(input) {
|
|
105
|
-
if (input === undefined || input === null)
|
|
106
|
-
return true;
|
|
107
|
-
return typeof input === 'string';
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
48
|
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
112
49
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
113
50
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1525,7 +1462,7 @@ __decorate$4([
|
|
|
1525
1462
|
/**
|
|
1526
1463
|
* A rule that checks if start time is before than end time
|
|
1527
1464
|
*/
|
|
1528
|
-
class TimeRangeRule {
|
|
1465
|
+
class TimeRangeRule extends InternalFormFieldValidationRule {
|
|
1529
1466
|
/**
|
|
1530
1467
|
* It creates a new instance of the class with the given config.
|
|
1531
1468
|
*
|
|
@@ -1533,6 +1470,7 @@ class TimeRangeRule {
|
|
|
1533
1470
|
* @param {TimeFormat} config.timeFormat - The timeFormat for time value
|
|
1534
1471
|
*/
|
|
1535
1472
|
constructor(config) {
|
|
1473
|
+
super();
|
|
1536
1474
|
this.config = config;
|
|
1537
1475
|
}
|
|
1538
1476
|
/**
|
|
@@ -1735,73 +1673,6 @@ __decorate$2([
|
|
|
1735
1673
|
MapToComponentMethod('watchDisabled')
|
|
1736
1674
|
], VegaTimePickerRangeDropdownController.prototype, "hideDropdownWhenDisabled", null);
|
|
1737
1675
|
|
|
1738
|
-
/**
|
|
1739
|
-
* A rule that checks if time is empty or not
|
|
1740
|
-
*
|
|
1741
|
-
* @implements {FormFieldValidationRule<string[]>}
|
|
1742
|
-
*/
|
|
1743
|
-
class TimeRangeRequiredRule {
|
|
1744
|
-
/**
|
|
1745
|
-
* It creates a new instance of the class with the given config.
|
|
1746
|
-
*
|
|
1747
|
-
* @param {{ timeFormat: TimeFormat }} config - config including the timeFormat for time value
|
|
1748
|
-
* @param {TimeFormat} config.timeFormat - The timeFormat for time value
|
|
1749
|
-
*/
|
|
1750
|
-
constructor(config) {
|
|
1751
|
-
this.config = config;
|
|
1752
|
-
}
|
|
1753
|
-
/**
|
|
1754
|
-
* It checks if the input is a valid time string.
|
|
1755
|
-
*
|
|
1756
|
-
* @param {string} input - The value of the input field.
|
|
1757
|
-
* @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
|
|
1758
|
-
*/
|
|
1759
|
-
evaluate(input) {
|
|
1760
|
-
if (!this.isAcceptedInputType(input)) {
|
|
1761
|
-
throw new Error(`Invalid time value ${input} for range mode`);
|
|
1762
|
-
}
|
|
1763
|
-
const isValid = Array.isArray(input) &&
|
|
1764
|
-
input.length === 2 &&
|
|
1765
|
-
input.every((item) => isTimeStr(item, this.config.timeFormat));
|
|
1766
|
-
return {
|
|
1767
|
-
isValid,
|
|
1768
|
-
message: isValid ? '' : 'This field is required',
|
|
1769
|
-
};
|
|
1770
|
-
}
|
|
1771
|
-
/**
|
|
1772
|
-
* If the input is accepted and the status is not disabled and visible, then return true
|
|
1773
|
-
*
|
|
1774
|
-
* @param {unknown} input - The input to be evaluated.
|
|
1775
|
-
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
1776
|
-
* @returns {boolean} A boolean value.
|
|
1777
|
-
*/
|
|
1778
|
-
canEvaluate(input, status) {
|
|
1779
|
-
return status
|
|
1780
|
-
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
1781
|
-
: this.isAcceptedInputType(input);
|
|
1782
|
-
}
|
|
1783
|
-
/**
|
|
1784
|
-
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
1785
|
-
*
|
|
1786
|
-
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
1787
|
-
* @returns {boolean} A boolean value.
|
|
1788
|
-
*/
|
|
1789
|
-
shouldShowError(status) {
|
|
1790
|
-
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
1791
|
-
}
|
|
1792
|
-
/**
|
|
1793
|
-
* If the input is undefined or null, return true, otherwise return true if the input is a string.
|
|
1794
|
-
*
|
|
1795
|
-
* @param {unknown} input - The input value to be validated.
|
|
1796
|
-
* @returns {boolean}A boolean.
|
|
1797
|
-
*/
|
|
1798
|
-
isAcceptedInputType(input) {
|
|
1799
|
-
if (input === undefined || input === null)
|
|
1800
|
-
return true;
|
|
1801
|
-
return Array.isArray(input);
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
1676
|
const VegaTimePickerRuntimeMetricsPayloadDefinition = [
|
|
1806
1677
|
{
|
|
1807
1678
|
payloadKey: 'AUTO_VALIDATION_IS_TRUE',
|
|
@@ -5,7 +5,8 @@ import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0f
|
|
|
5
5
|
import { s as sanitizeVegaComponent } from './component-cae24190.js';
|
|
6
6
|
import { I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
7
7
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
|
|
8
|
-
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-
|
|
8
|
+
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-bb64dec7.js';
|
|
9
|
+
import { T as ToggleSwitchRequiredRule } from './toggle-switch-required-rule-b3cf4302.js';
|
|
9
10
|
import { b as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-8268945e.js';
|
|
10
11
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
11
12
|
import './ui-62e4be97.js';
|
|
@@ -21,72 +22,12 @@ import './page-resize-observer-slimmer-beb7b0bd.js';
|
|
|
21
22
|
import './breakpoints-91116111.js';
|
|
22
23
|
import './ui-8424715a.js';
|
|
23
24
|
import './breakpoints-d9faf11c.js';
|
|
25
|
+
import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
|
|
24
26
|
import './mutation-observer-slimmer-6cef9549.js';
|
|
25
27
|
import './mutation-observer-filters-1035b064.js';
|
|
26
28
|
import './array-b668466e.js';
|
|
27
29
|
import './number-4398f2e1.js';
|
|
28
30
|
|
|
29
|
-
/**
|
|
30
|
-
* A rule that checks if toggle switch is required to switch on
|
|
31
|
-
*
|
|
32
|
-
* @implements {FormFieldValidationRule<boolean>}
|
|
33
|
-
*/
|
|
34
|
-
class ToggleSwitchRequiredRule {
|
|
35
|
-
/**
|
|
36
|
-
* If the input is a boolean, return a boolean. If the
|
|
37
|
-
* input is anything else, return false
|
|
38
|
-
*
|
|
39
|
-
* @param {unknown} input - The input to be evaluated.
|
|
40
|
-
* @returns {EvaluateResult} - An object with two properties: isValid and message.
|
|
41
|
-
*/
|
|
42
|
-
evaluate(input) {
|
|
43
|
-
if (typeof input === 'boolean') {
|
|
44
|
-
return {
|
|
45
|
-
isValid: input,
|
|
46
|
-
message: input ? '' : 'This field is required',
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return {
|
|
51
|
-
isValid: false,
|
|
52
|
-
message: 'This field is required',
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* If the input is accepted and the status is not disabled and visible, then return true
|
|
58
|
-
*
|
|
59
|
-
* @param {unknown} input - The input to be evaluated.
|
|
60
|
-
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
61
|
-
* @returns {boolean} The return value is a boolean that indicates whether the input can be evaluated.
|
|
62
|
-
*/
|
|
63
|
-
canEvaluate(input, status) {
|
|
64
|
-
return status
|
|
65
|
-
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
66
|
-
: this.isAcceptedInputType(input);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
70
|
-
*
|
|
71
|
-
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
72
|
-
* @returns {boolean} A boolean value.
|
|
73
|
-
*/
|
|
74
|
-
shouldShowError(status) {
|
|
75
|
-
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* If the input is undefined or null, return true, otherwise return true if the input is a boolean.
|
|
79
|
-
*
|
|
80
|
-
* @param {unknown} input - The input value to be validated.
|
|
81
|
-
* @returns {boolean} A boolean.
|
|
82
|
-
*/
|
|
83
|
-
isAcceptedInputType(input) {
|
|
84
|
-
if (input === undefined || input === null)
|
|
85
|
-
return true;
|
|
86
|
-
return typeof input === 'boolean';
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
31
|
const vegaToggleSwitchCss = ":host{display:inline-block}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}div.vega-container{display:flex;justify-content:flex-start;align-items:center;border-radius:9999px;position:relative;box-sizing:content-box;height:24px;width:48px;padding:4px;background-color:rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))}div.vega-container:hover{background-color:rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))}div.vega-container.vega-container-checked{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}div.vega-container.vega-container-checked:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}div.vega-container.vega-container-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}div.vega-container.vega-container-checked.vega-container-disabled{background-color:rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))}div.vega-container-small-size{box-sizing:border-box;height:20px;width:32px;padding:2px}div.vega-container>span{margin-left:0px;transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container:focus-within{box-shadow:0 0 0 4px rgba(var(--v-ring-action-focus, 19, 98, 226, 0.25))}div.vega-container-checked>span{margin-left:24px}div.vega-container-checked.vega-container-small-size>span{margin-left:12px}div.vega-container>input{position:absolute;cursor:pointer;opacity:0;left:0px;top:0px;width:100%;height:100%;margin:0px;-webkit-tap-highlight-color:transparent}div.vega-container input:disabled{cursor:default}div.vega-container>span{display:inline-block;border-radius:9999px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));width:24px;height:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container-small-size{height:20px}div.vega-container-small-size>span{width:16px;height:16px}div{align-self:center}";
|
|
91
32
|
|
|
92
33
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -3,7 +3,7 @@ import { s as sanitizeVegaComponent } from './component-cae24190.js';
|
|
|
3
3
|
import { I as InjectKeyboardManager } from './inject-keyboard-manager-b0135018.js';
|
|
4
4
|
import { c as MapToComponentField, M as MapToComponentMethod, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
5
5
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
|
|
6
|
-
import { E as ElementAppenderSlimmer } from './element-appender-slimmer-
|
|
6
|
+
import { E as ElementAppenderSlimmer } from './element-appender-slimmer-d9155ee0.js';
|
|
7
7
|
import { c as createDeprecatedPropertySlimmer } from './deprecated-property-slimmer-43d184b3.js';
|
|
8
8
|
import './keyboard-manager-4c898a0d.js';
|
|
9
9
|
import './ui-62e4be97.js';
|
|
@@ -38,17 +38,25 @@ class VegaTooltipElementAppenderController extends ElementAppenderSlimmer {
|
|
|
38
38
|
* This constructor of the tooltip element appender controller.
|
|
39
39
|
*/
|
|
40
40
|
constructor() {
|
|
41
|
-
super(() => (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
super(() => this.getShowConfig(), () => this.trigger, 'isTooltipShow', () => this.disableInteractive);
|
|
42
|
+
/**
|
|
43
|
+
* Generate the element appender show config object.
|
|
44
|
+
*
|
|
45
|
+
* @returns {ElementAppenderShowConfig} - Show config object.
|
|
46
|
+
*/
|
|
47
|
+
this.getShowConfig = () => {
|
|
48
|
+
return {
|
|
49
|
+
target: this.host,
|
|
50
|
+
appendableElement: this.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef(),
|
|
51
|
+
positionRelativeTo: this.positionRelativeTo,
|
|
52
|
+
matchTargetWidth: false,
|
|
53
|
+
size: this.size,
|
|
54
|
+
minWidth: this.minWidth,
|
|
55
|
+
maxWidth: this.maxWidth,
|
|
56
|
+
placement: this.placement,
|
|
57
|
+
alignment: this.alignment,
|
|
58
|
+
};
|
|
59
|
+
};
|
|
52
60
|
}
|
|
53
61
|
/**
|
|
54
62
|
* The `watchTrigger` function hides an element if the trigger is set to 'none'.
|
|
@@ -66,6 +74,26 @@ class VegaTooltipElementAppenderController extends ElementAppenderSlimmer {
|
|
|
66
74
|
this.show();
|
|
67
75
|
}
|
|
68
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Hide the tooltip if the content change to empty.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} newText - The property text or content new value.
|
|
81
|
+
* @param {string} oldText - The property text or content old value.
|
|
82
|
+
*/
|
|
83
|
+
watchTextChange(newText, oldText) {
|
|
84
|
+
if (!newText && oldText && this.isTooltipShow) {
|
|
85
|
+
this.hide();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Override the parent class `ElementAppenderSlimmer` show method to control the tooltip show according to the tooltip content.
|
|
90
|
+
*/
|
|
91
|
+
show() {
|
|
92
|
+
const text = this.deprecatedPropertySlimmer.getValue();
|
|
93
|
+
if (text) {
|
|
94
|
+
super.show();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
69
97
|
}
|
|
70
98
|
__decorate$3([
|
|
71
99
|
MapToComponentField()
|
|
@@ -94,6 +122,9 @@ __decorate$3([
|
|
|
94
122
|
__decorate$3([
|
|
95
123
|
MapToComponentField()
|
|
96
124
|
], VegaTooltipElementAppenderController.prototype, "disableInteractive", void 0);
|
|
125
|
+
__decorate$3([
|
|
126
|
+
MapToComponentField()
|
|
127
|
+
], VegaTooltipElementAppenderController.prototype, "deprecatedPropertySlimmer", void 0);
|
|
97
128
|
__decorate$3([
|
|
98
129
|
MapToComponentField({ writable: true })
|
|
99
130
|
], VegaTooltipElementAppenderController.prototype, "isTooltipShow", void 0);
|
|
@@ -106,6 +137,9 @@ __decorate$3([
|
|
|
106
137
|
__decorate$3([
|
|
107
138
|
MapToComponentMethod('watchToShowTooltip')
|
|
108
139
|
], VegaTooltipElementAppenderController.prototype, "watchToShowTooltip", null);
|
|
140
|
+
__decorate$3([
|
|
141
|
+
MapToComponentMethod('watchTextChange')
|
|
142
|
+
], VegaTooltipElementAppenderController.prototype, "watchTextChange", null);
|
|
109
143
|
|
|
110
144
|
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
111
145
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -212,6 +246,11 @@ const VegaTooltip = class {
|
|
|
212
246
|
}
|
|
213
247
|
watchTrigger() {
|
|
214
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Monitor the property text updates.
|
|
251
|
+
*/
|
|
252
|
+
watchTextChange() {
|
|
253
|
+
}
|
|
215
254
|
watchToShowTooltip() {
|
|
216
255
|
}
|
|
217
256
|
render() {
|
|
@@ -220,6 +259,8 @@ const VegaTooltip = class {
|
|
|
220
259
|
get host() { return getElement(this); }
|
|
221
260
|
static get watchers() { return {
|
|
222
261
|
"trigger": ["watchTrigger"],
|
|
262
|
+
"content": ["watchTextChange"],
|
|
263
|
+
"text": ["watchTextChange"],
|
|
223
264
|
"size": ["watchToShowTooltip"],
|
|
224
265
|
"placement": ["watchToShowTooltip"],
|
|
225
266
|
"alignment": ["watchToShowTooltip"]
|
package/dist/esm/vega.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as promiseResolve, b as bootstrapLazy } from './index-187f71d1.js';
|
|
2
|
-
import { g as globalScripts } from './app-globals-
|
|
2
|
+
import { g as globalScripts } from './app-globals-88fa3549.js';
|
|
3
3
|
import './feature-flag-controller-4b3fe6f8.js';
|
|
4
4
|
import './global-slimmer-registry-17c4efd4.js';
|
|
5
5
|
import './index-44c794b4.js';
|
|
@@ -29,7 +29,8 @@ import './vega-env-manager-8f8dc473.js';
|
|
|
29
29
|
import './icon-manager-b889176b.js';
|
|
30
30
|
import './index-d172bafa.js';
|
|
31
31
|
import './translation-c08f2274.js';
|
|
32
|
-
import './valid-credit-card-number-rule-
|
|
32
|
+
import './valid-credit-card-number-rule-cc497bec.js';
|
|
33
|
+
import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
|
|
33
34
|
|
|
34
35
|
/*
|
|
35
36
|
Stencil Client Patch Browser v2.17.4 | MIT Licensed | https://stenciljs.com
|
package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ export declare class VegaModalLayoutController extends VegaSlimmer {
|
|
|
19
19
|
* Listen watch size method to be called
|
|
20
20
|
*/
|
|
21
21
|
watchSize(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Listen watchContentMaxHeight method to be called
|
|
24
|
+
*/
|
|
25
|
+
watchContentMaxHeight(): void;
|
|
22
26
|
/**
|
|
23
27
|
* Set width of modal.
|
|
24
28
|
*
|
package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.d.ts
CHANGED
|
@@ -7,10 +7,15 @@ export declare class VegaModalScrollController extends VegaSlimmer {
|
|
|
7
7
|
host: VegaModal['host'];
|
|
8
8
|
contentMaxHeight: VegaModal['contentMaxHeight'];
|
|
9
9
|
renderer: VegaModal['renderer'];
|
|
10
|
+
private scrollEventListenerAdded;
|
|
10
11
|
/**
|
|
11
12
|
* Component lifecycle - [connectedCallback]
|
|
12
13
|
*/
|
|
13
14
|
componentDidLoad(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Listen watchContentMaxHeight method to be called
|
|
17
|
+
*/
|
|
18
|
+
watchContentMaxHeight(): void;
|
|
14
19
|
/**
|
|
15
20
|
* Is modal content scrollable.
|
|
16
21
|
*
|
|
@@ -139,6 +139,7 @@ export declare class VegaModal {
|
|
|
139
139
|
* @vegaVersion 1.4.0
|
|
140
140
|
*/
|
|
141
141
|
contentMaxHeight: ResponsiveType<number>;
|
|
142
|
+
watchContentMaxHeight(): void;
|
|
142
143
|
/**
|
|
143
144
|
* Provides a callback function that is triggered when a user clicks the
|
|
144
145
|
* close button located in the top right corner of the modal.
|
|
@@ -13,6 +13,7 @@ export declare class VegaTooltipElementAppenderController extends ElementAppende
|
|
|
13
13
|
alignment: VegaTooltip['alignment'];
|
|
14
14
|
trigger: VegaTooltip['trigger'];
|
|
15
15
|
disableInteractive: VegaTooltip['disableInteractive'];
|
|
16
|
+
deprecatedPropertySlimmer: VegaTooltip['deprecatedPropertySlimmer'];
|
|
16
17
|
isTooltipShow: VegaTooltip['isTooltipShow'];
|
|
17
18
|
vegaTooltipContentBoxRenderer: VegaTooltip['vegaTooltipContentBoxRenderer'];
|
|
18
19
|
/**
|
|
@@ -27,4 +28,21 @@ export declare class VegaTooltipElementAppenderController extends ElementAppende
|
|
|
27
28
|
* The function `watchToShowTooltip` checks if the tooltip should be shown and then displays it if necessary.
|
|
28
29
|
*/
|
|
29
30
|
watchToShowTooltip(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Hide the tooltip if the content change to empty.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} newText - The property text or content new value.
|
|
35
|
+
* @param {string} oldText - The property text or content old value.
|
|
36
|
+
*/
|
|
37
|
+
watchTextChange(newText: string, oldText: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Override the parent class `ElementAppenderSlimmer` show method to control the tooltip show according to the tooltip content.
|
|
40
|
+
*/
|
|
41
|
+
show(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Generate the element appender show config object.
|
|
44
|
+
*
|
|
45
|
+
* @returns {ElementAppenderShowConfig} - Show config object.
|
|
46
|
+
*/
|
|
47
|
+
private getShowConfig;
|
|
30
48
|
}
|
|
@@ -69,6 +69,10 @@ export declare class VegaTooltip {
|
|
|
69
69
|
* @vegaVersion 2.0.0
|
|
70
70
|
*/
|
|
71
71
|
text: string;
|
|
72
|
+
/**
|
|
73
|
+
* Monitor the property text updates.
|
|
74
|
+
*/
|
|
75
|
+
watchTextChange(): void;
|
|
72
76
|
/**
|
|
73
77
|
* Specifies the vertical positioning of the tooltip
|
|
74
78
|
* within its container or relative to a reference point.
|
|
@@ -33,6 +33,7 @@ export declare class ElementAppenderSlimmer extends VegaSlimmer {
|
|
|
33
33
|
hide(): void;
|
|
34
34
|
destroy(): void;
|
|
35
35
|
updateShowConfigFactory(showConfigFactory: ShowConfigFactoryType): void;
|
|
36
|
+
private destroyElementAppender;
|
|
36
37
|
private initElementAppender;
|
|
37
38
|
private setElementAppender;
|
|
38
39
|
private isShowing;
|
|
@@ -5,6 +5,7 @@ import { Nullable } from '../../types/general';
|
|
|
5
5
|
import { FieldErrorControllerSlimmer } from './field-error-controller-silmmer';
|
|
6
6
|
import { FormFieldValidInvokeSlimmer } from './form-field-valid-invoke-slimmer';
|
|
7
7
|
import { MutationObserverSlimmer } from './mutation-observer/mutation-observer-slimmer';
|
|
8
|
+
import { InternalFormFieldValidationRule } from '../validator/rules/internal-form-field-validation-rule.abstract';
|
|
8
9
|
export declare type FormFieldOptionForSlimmer<T> = {
|
|
9
10
|
propertyRules: PropertyRuleTypeForSlimmer<T>[];
|
|
10
11
|
validationRulesName?: string;
|
|
@@ -13,7 +14,7 @@ export declare type FormFieldOptionForSlimmer<T> = {
|
|
|
13
14
|
inputContainerGetter: () => Nullable<HTMLElement>;
|
|
14
15
|
touchableAreaGetter: () => HTMLElement[];
|
|
15
16
|
};
|
|
16
|
-
declare type RuleFactory<T> = (propValue: unknown, ...dependence: unknown[]) =>
|
|
17
|
+
declare type RuleFactory<T> = (propValue: unknown, ...dependence: unknown[]) => InternalFormFieldValidationRule<T> | null;
|
|
17
18
|
export declare type PropertyRuleTypeForSlimmer<T> = {
|
|
18
19
|
propertyName: string;
|
|
19
20
|
ruleFactory: RuleFactory<T>;
|
|
@@ -244,4 +244,14 @@ export declare class FormFieldController<T> implements Validator<T> {
|
|
|
244
244
|
* @returns {boolean} a boolean value.
|
|
245
245
|
*/
|
|
246
246
|
private canSubmitFormByEvent;
|
|
247
|
+
/**
|
|
248
|
+
* It overrides the default rule by checking if the additional rules contain a custom rule that overrides.
|
|
249
|
+
* If it does, it returns that additional rule, and the rule will be removed from the additional rules array.
|
|
250
|
+
* otherwise, it returns the default rule.
|
|
251
|
+
*
|
|
252
|
+
* @param {InternalFormFieldValidationRule} defaultRule - The rule to be overridden.
|
|
253
|
+
* @param {FormFieldValidationRule[]} additionalRules - The additional rules to be applied.
|
|
254
|
+
* @returns {FormFieldValidationRule} The overridden rule.
|
|
255
|
+
*/
|
|
256
|
+
private overrideDefaultRuleByAdditionalRule;
|
|
247
257
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { CheckBoxRequiredRule } from './rules/check-box-required-rule';
|
|
2
|
+
export { DateRequiredRule } from './rules/date-required-rule';
|
|
3
|
+
export { InputPhoneNumberRequiredRule } from './rules/input-phone-number-required-rule';
|
|
4
|
+
export { InputRangeRequiredRule } from './rules/input-range-required-rule';
|
|
5
|
+
export { RequiredFieldRule } from './rules/required-field-rule';
|
|
6
|
+
export { RichTextEditorRequiredRule } from './rules/rich-text-editor-required-rule';
|
|
7
|
+
export { TimeRangeRequiredRule } from './rules/time-range-required-rule';
|
|
8
|
+
export { TimeRequiredRule } from './rules/time-required-rule';
|
|
9
|
+
export { ToggleSwitchRequiredRule } from './rules/toggle-switch-required-rule';
|
|
10
|
+
export { FileUploaderRequiredRule } from './rules/file-uploader-required-rule';
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { Primitive } from '../../../types/general';
|
|
2
|
-
import { FormFieldStatusMeta
|
|
3
|
-
import {
|
|
2
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
3
|
+
import { EvaluateResult } from './validation-rule';
|
|
4
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
4
5
|
/**
|
|
5
6
|
* A rule that checks if a string is empty or not
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class CheckBoxRequiredRule
|
|
10
|
+
export declare class CheckBoxRequiredRule extends InternalFormFieldValidationRule<Primitive | Array<Primitive>> {
|
|
10
11
|
/**
|
|
11
12
|
* If the input is a boolean, return a boolean. If the input is a string, return a boolean. If the
|
|
12
13
|
* input is anything else, return false
|
|
13
14
|
*
|
|
14
15
|
* @param {string | boolean} input - The input to be evaluated.
|
|
15
|
-
* @returns {
|
|
16
|
+
* @returns {EvaluateResult} - An object with two properties: isValid and message.
|
|
16
17
|
*/
|
|
17
|
-
evaluate(input: string | boolean):
|
|
18
|
+
evaluate(input: string | boolean): EvaluateResult;
|
|
18
19
|
/**
|
|
19
20
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
20
21
|
*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
2
|
import { DatePickerModeType, DatePickerValueType } from '../../../components/vega-date-picker/types';
|
|
3
3
|
import { EvaluateResultTranslation } from './validation-rule';
|
|
4
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
4
5
|
/**
|
|
5
6
|
* A rule that checks if start date is before than end date
|
|
6
7
|
*/
|
|
7
|
-
export declare class DateRangeRule
|
|
8
|
+
export declare class DateRangeRule extends InternalFormFieldValidationRule<DatePickerValueType<DatePickerModeType>> {
|
|
8
9
|
/**
|
|
9
10
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
10
11
|
*
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
2
|
import { DatePickerModeType, DatePickerValueType } from '../../../components/vega-date-picker/types';
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluateResult } from './validation-rule';
|
|
4
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
4
5
|
/**
|
|
5
6
|
* A rule that checks if date is empty or not
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string | string[]>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class DateRequiredRule
|
|
10
|
+
export declare class DateRequiredRule extends InternalFormFieldValidationRule<DatePickerValueType<DatePickerModeType>> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -22,9 +23,9 @@ export declare class DateRequiredRule implements FormFieldValidationRule<DatePic
|
|
|
22
23
|
* Otherwise, return an object with a boolean indicating whether the input is valid and a message to display to the user
|
|
23
24
|
*
|
|
24
25
|
* @param {string | string[]} input - The value of the input field.
|
|
25
|
-
* @returns {
|
|
26
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
26
27
|
*/
|
|
27
|
-
evaluate(input: DatePickerValueType<DatePickerModeType>):
|
|
28
|
+
evaluate(input: DatePickerValueType<DatePickerModeType>): EvaluateResult;
|
|
28
29
|
/**
|
|
29
30
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
30
31
|
*
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
2
|
import { EvaluateResultTranslation } from './validation-rule';
|
|
3
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
3
4
|
/**
|
|
4
5
|
* This class is a rule that checks if the input is a valid email address
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
*/
|
|
8
|
-
export declare class EmailFieldRule
|
|
9
|
+
export declare class EmailFieldRule extends InternalFormFieldValidationRule<string> {
|
|
9
10
|
/**
|
|
10
11
|
* It checks if the input is a valid email address.
|
|
11
12
|
*
|
|
@@ -2,7 +2,7 @@ import { RequiredFieldRule } from './required-field-rule';
|
|
|
2
2
|
/**
|
|
3
3
|
* A rule that checks the value is empty or not which value type is object array
|
|
4
4
|
*/
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class FileUploaderRequiredRule extends RequiredFieldRule {
|
|
6
6
|
/**
|
|
7
7
|
* re-define the object array check item type method
|
|
8
8
|
*
|