@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,21 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
2
|
-
import {
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
|
+
import { EvaluateResult } from './validation-rule';
|
|
3
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
3
4
|
/**
|
|
4
5
|
* A rule that checks if input phone number is empty or not
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
*/
|
|
8
|
-
export declare class InputPhoneNumberRequiredRule
|
|
9
|
+
export declare class InputPhoneNumberRequiredRule extends InternalFormFieldValidationRule<string> {
|
|
9
10
|
private readonly phoneNumberValueGetter;
|
|
10
11
|
constructor(phoneNumberValueGetter: () => string);
|
|
11
12
|
/**
|
|
12
13
|
* It checks if the input is a valid value.
|
|
13
14
|
*
|
|
14
15
|
* @param {unknown} input - The value of the input field.
|
|
15
|
-
* @returns {
|
|
16
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
16
17
|
*/
|
|
17
|
-
evaluate(input: unknown):
|
|
18
|
+
evaluate(input: unknown): EvaluateResult;
|
|
18
19
|
/**
|
|
19
20
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
20
21
|
*
|
|
@@ -1,9 +1,10 @@
|
|
|
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
|
* A rule that checks if number is in min and max range
|
|
5
6
|
*/
|
|
6
|
-
export declare class InputRangeMinAndMaxRule
|
|
7
|
+
export declare class InputRangeMinAndMaxRule extends InternalFormFieldValidationRule<[string, string]> {
|
|
7
8
|
private readonly minValue;
|
|
8
9
|
private readonly maxValue;
|
|
9
10
|
/**
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
2
|
-
import {
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
|
+
import { EvaluateResult } from './validation-rule';
|
|
3
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
3
4
|
/**
|
|
4
|
-
* A rule that checks if input range is empty or not
|
|
5
|
+
* A rule that checks if the input range is empty or not
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string[]>}
|
|
7
8
|
*/
|
|
8
|
-
export declare class InputRangeRequiredRule
|
|
9
|
+
export declare class InputRangeRequiredRule extends InternalFormFieldValidationRule<string[]> {
|
|
9
10
|
/**
|
|
10
11
|
* It checks if the input is a valid value.
|
|
11
12
|
*
|
|
12
13
|
* @param {string[]} input - The value of the input field.
|
|
13
|
-
* @returns {
|
|
14
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
14
15
|
*/
|
|
15
|
-
evaluate(input: unknown):
|
|
16
|
+
evaluate(input: unknown): EvaluateResult;
|
|
16
17
|
/**
|
|
17
18
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
18
19
|
*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FormFieldStatusMeta, FormFieldValidationRule } from './form-field-validation-rule';
|
|
2
|
+
import { EvaluateResult } from './validation-rule';
|
|
3
|
+
/**
|
|
4
|
+
* Abstract class for internal form field validation rules
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class InternalFormFieldValidationRule<T> implements FormFieldValidationRule<T> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to override the default validation rule.
|
|
9
|
+
*/
|
|
10
|
+
overrideDefault: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
abstract canEvaluate(input: unknown, status?: FormFieldStatusMeta, statusChanged?: (keyof FormFieldStatusMeta)[]): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
abstract evaluate(input: T): EvaluateResult | Promise<EvaluateResult>;
|
|
19
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
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
|
* A rule that checks if the input is less than or equal to a maximum value
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
* @property {{ maxValue: number }} config config including the maxValue limit for validation
|
|
8
9
|
*/
|
|
9
|
-
export declare class MaxNumberRule
|
|
10
|
+
export declare class MaxNumberRule extends InternalFormFieldValidationRule<unknown> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -1,12 +1,13 @@
|
|
|
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
|
* A rule that checks if the length of input is less than or equal to a maximum value
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
* @property {{ maxStrLength: number }} config config including the maxStrLength limit for validation
|
|
8
9
|
*/
|
|
9
|
-
export declare class MaxStringLengthRule
|
|
10
|
+
export declare class MaxStringLengthRule extends InternalFormFieldValidationRule<string> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -1,9 +1,10 @@
|
|
|
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
|
* A rule that checks if date is in minDate and maxDate range
|
|
5
6
|
*/
|
|
6
|
-
export declare class MinAndMaxDateRule
|
|
7
|
+
export declare class MinAndMaxDateRule extends InternalFormFieldValidationRule<string | [string, string]> {
|
|
7
8
|
private readonly config;
|
|
8
9
|
private readonly minDate;
|
|
9
10
|
private readonly maxDate;
|
|
@@ -1,12 +1,13 @@
|
|
|
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
|
* A rule that checks if the input is larger than or equal to a minimum value
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
* @property {{ minValue: number }} config config including the minValue limit for validation
|
|
8
9
|
*/
|
|
9
|
-
export declare class MinNumberRule
|
|
10
|
+
export declare class MinNumberRule extends InternalFormFieldValidationRule<unknown> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -1,12 +1,13 @@
|
|
|
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
|
* A rule that checks if the length of input is more than or equal to a minimum value
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
* @property {{ minStrLength: number }} config config including the minStrLength limit for validation
|
|
8
9
|
*/
|
|
9
|
-
export declare class MinStringLengthRule
|
|
10
|
+
export declare class MinStringLengthRule extends InternalFormFieldValidationRule<string> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { FormFieldStatusMeta,
|
|
2
|
-
import {
|
|
1
|
+
import { FormFieldStatusMeta, FormFieldValueType } from './form-field-validation-rule';
|
|
2
|
+
import { EvaluateResult } from './validation-rule';
|
|
3
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
3
4
|
/**
|
|
4
5
|
* A rule that checks if a string is empty or not
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
7
8
|
*/
|
|
8
|
-
export declare class RequiredFieldRule
|
|
9
|
+
export declare class RequiredFieldRule extends InternalFormFieldValidationRule<FormFieldValueType | Array<FormFieldValueType>> {
|
|
9
10
|
/**
|
|
10
11
|
* 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
|
|
11
12
|
*
|
|
12
13
|
* @param {FormFieldValueType | Array<FormFieldValueType>} input - The input to be evaluated.
|
|
13
|
-
* @returns {
|
|
14
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
14
15
|
*/
|
|
15
|
-
evaluate(input: FormFieldValueType | Array<FormFieldValueType>):
|
|
16
|
+
evaluate(input: FormFieldValueType | Array<FormFieldValueType>): EvaluateResult;
|
|
16
17
|
/**
|
|
17
18
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
18
19
|
*
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
2
|
-
import {
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
|
+
import { EvaluateResult } from './validation-rule';
|
|
3
3
|
import { VegaRTEContent } from '../../../components/vega-rich-text-editor/dto/content-state';
|
|
4
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
4
5
|
/**
|
|
5
6
|
* A rule that checks if the input range is empty or not
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string[]>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class RichTextEditorRequiredRule
|
|
10
|
+
export declare class RichTextEditorRequiredRule extends InternalFormFieldValidationRule<VegaRTEContent> {
|
|
10
11
|
/**
|
|
11
12
|
* It checks if the input is a valid value.
|
|
12
13
|
*
|
|
13
14
|
* @param {string[]} input - The value of the input field.
|
|
14
|
-
* @returns {
|
|
15
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
15
16
|
*/
|
|
16
|
-
evaluate(input: unknown):
|
|
17
|
+
evaluate(input: unknown): EvaluateResult;
|
|
17
18
|
/**
|
|
18
19
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
19
20
|
*
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
2
|
import { TimeFormat } from '../../../types/general';
|
|
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 time is empty or not
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string[]>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class TimeRangeRequiredRule
|
|
10
|
+
export declare class TimeRangeRequiredRule extends InternalFormFieldValidationRule<string[]> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -21,9 +22,9 @@ export declare class TimeRangeRequiredRule implements FormFieldValidationRule<st
|
|
|
21
22
|
* It checks if the input is a valid time string.
|
|
22
23
|
*
|
|
23
24
|
* @param {string} input - The value of the input field.
|
|
24
|
-
* @returns {
|
|
25
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
25
26
|
*/
|
|
26
|
-
evaluate(input: unknown):
|
|
27
|
+
evaluate(input: unknown): EvaluateResult;
|
|
27
28
|
/**
|
|
28
29
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
29
30
|
*
|
|
@@ -1,11 +1,12 @@
|
|
|
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 { TimeFormat } from '../../../types/general';
|
|
4
4
|
import { EvaluateResultTranslation } from './validation-rule';
|
|
5
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
5
6
|
/**
|
|
6
7
|
* A rule that checks if start time is before than end time
|
|
7
8
|
*/
|
|
8
|
-
export declare class TimeRangeRule
|
|
9
|
+
export declare class TimeRangeRule extends InternalFormFieldValidationRule<DatePickerValueType<DatePickerModeType>> {
|
|
9
10
|
private readonly config;
|
|
10
11
|
/**
|
|
11
12
|
* It creates a new instance of the class with the given config.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { FormFieldStatusMeta
|
|
1
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
2
|
import { TimeFormat } from '../../../types/general';
|
|
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 time is empty or not
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class TimeRequiredRule
|
|
10
|
+
export declare class TimeRequiredRule extends InternalFormFieldValidationRule<string> {
|
|
10
11
|
private readonly config;
|
|
11
12
|
/**
|
|
12
13
|
* It creates a new instance of the class with the given config.
|
|
@@ -21,9 +22,9 @@ export declare class TimeRequiredRule implements FormFieldValidationRule<string>
|
|
|
21
22
|
* It checks if the input is a valid time string.
|
|
22
23
|
*
|
|
23
24
|
* @param {string} input - The value of the input field.
|
|
24
|
-
* @returns {
|
|
25
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
25
26
|
*/
|
|
26
|
-
evaluate(input: unknown):
|
|
27
|
+
evaluate(input: unknown): EvaluateResult;
|
|
27
28
|
/**
|
|
28
29
|
* If the input is accepted and the status is not disabled and visible, then return true
|
|
29
30
|
*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { EvaluateResult, FormFieldStatusMeta
|
|
1
|
+
import { EvaluateResult, FormFieldStatusMeta } from './form-field-validation-rule';
|
|
2
|
+
import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
|
|
2
3
|
/**
|
|
3
|
-
* A rule that checks if toggle switch is required to switch on
|
|
4
|
+
* A rule that checks if the toggle switch is required to switch on
|
|
4
5
|
*
|
|
5
|
-
* @
|
|
6
|
+
* @augments {InternalFormFieldValidationRule<boolean>}
|
|
6
7
|
*/
|
|
7
|
-
export declare class ToggleSwitchRequiredRule
|
|
8
|
+
export declare class ToggleSwitchRequiredRule extends InternalFormFieldValidationRule<boolean> {
|
|
8
9
|
/**
|
|
9
10
|
* If the input is a boolean, return a boolean. If the
|
|
10
11
|
* input is anything else, return false
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Primitive } from '../../../types/general';
|
|
2
|
-
import { FormFieldStatusMeta
|
|
2
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
3
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 it's a valid credit card number
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class ValidCreditCardNumberRule
|
|
10
|
+
export declare class ValidCreditCardNumberRule extends InternalFormFieldValidationRule<Primitive | Array<Primitive>> {
|
|
10
11
|
/**
|
|
11
12
|
* It takes a string, maps it to an array of numbers, reverses the array, checks the length of the
|
|
12
13
|
* array, maps the even digits to a new array, sums the new array, and returns true if the sum is
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { VegaCountryCode } from '../../../components/vega-input-phone-number/types';
|
|
2
|
-
import { FormFieldStatusMeta
|
|
2
|
+
import { FormFieldStatusMeta } from './form-field-validation-rule';
|
|
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 it's a valid phone number
|
|
6
7
|
*
|
|
7
|
-
* @
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
8
9
|
*/
|
|
9
|
-
export declare class ValidPhoneNumberRule
|
|
10
|
+
export declare class ValidPhoneNumberRule extends InternalFormFieldValidationRule<string> {
|
|
10
11
|
private readonly countryCodeGetter;
|
|
11
12
|
private emptyValueEnabled;
|
|
12
13
|
constructor(countryCodeGetter: () => VegaCountryCode, emptyValueEnabled?: boolean);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './components.type';
|
|
|
2
2
|
export * from './vega-chart';
|
|
3
3
|
export * from '../components/vega-calendar/types';
|
|
4
4
|
export { VegaTableNode, VegaTableCellNode, VegaTableCreateElementFunction, VegaTableSorterType, VegaTableCellRenderFunction, VegaTableFormItemProps, VegaTableEditComponentProps, VegaTableCellFormItemRenderFunction, } from '../components/vega-table/interface';
|
|
5
|
-
export { EvaluateResult, FormFieldStatusMeta } from '../helpers/validator/rules/form-field-validation-rule';
|
|
5
|
+
export { EvaluateResult, FormFieldStatusMeta, FormFieldValueType, } from '../helpers/validator/rules/form-field-validation-rule';
|
|
6
6
|
export { VegaThemeOverrideColors } from '../helpers/theme/theme';
|
|
7
7
|
export { LogLevelType } from '../utils/log';
|
|
8
8
|
export { VegaDialogOption } from '../helpers/dialog/vega-dialog-controller';
|
package/dist/vega/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getCurrentBreakpoint}from"./p-4bcd6612.js";export{L as LogUtility,s as setVegaLogLevel}from"./p-6e1ab235.js";export{d as formatAndValidBackgroundColor,e as formatAndValidBorderColor,g as formatAndValidBorderRadius,c as formatAndValidBreakpointSize,a as formatAndValidGap,h as formatAndValidPadding,f as formatAndValidResponsiveToken,b as formatAndValidShadow,i as formatAndValidTextColor}from"./p-666cd80f.js";export{c as camelToDashCase}from"./p-0bb29d98.js";export{d as BackgroundColorMap,a as BackgroundColors,e as BorderColorMap,b as BorderColors,B as BorderRadius,C as Colors,F as FillBackgroundColors,g as ShadowMap,f as Shadows,h as Spacing,S as StrokeBackgroundColors,c as TextColorMap,T as TextColors}from"./p-b1f65b13.js";export{B as Breakpoints}from"./p-ed45b3b6.js";export{I as Icons,g as getIconFromToken}from"./p-16493e5b.js";export{b as Typography,a as TypographyKeys,T as TypographyUrls}from"./p-d884c644.js";export{e as BoxDisplay,B as BreakpointKeys,C as CssStates,F as FlexDirections}from"./p-74168615.js";export{F as FrameworkEnum,v as VegaEnvManager}from"./p-5f377954.js";export{b as VegaEventManager,V as VegaLoader,a as VegaNotify,d as VegaSkeletonLoader,c as VegaZIndexManager}from"./p-76a8ccbb.js";export{F as FeatureFlag}from"./p-ff4bafa3.js";export{M as ModifyContentAction,e as RTEBlock,b as RTEImageBlock,f as RTEImageNode,d as RTEListBlock,c as RTEListItemBlock,h as RTENode,R as RTETextBlock,g as RTETextNode,a as VegaRTEContent,V as VegaThemeManager}from"./p-e0d3ca2d.js";export{V as VegaDialog}from"./p-149d2801.js";export{B as VegaJQueryDelegatedEventStrategy}from"./p-1b860f90.js";export{V as VegaIconManager}from"./p-032df16f.js";export{V as ValidCreditCardNumberRule}from"./p-
|
|
1
|
+
export{g as getCurrentBreakpoint}from"./p-4bcd6612.js";export{L as LogUtility,s as setVegaLogLevel}from"./p-6e1ab235.js";export{d as formatAndValidBackgroundColor,e as formatAndValidBorderColor,g as formatAndValidBorderRadius,c as formatAndValidBreakpointSize,a as formatAndValidGap,h as formatAndValidPadding,f as formatAndValidResponsiveToken,b as formatAndValidShadow,i as formatAndValidTextColor}from"./p-666cd80f.js";export{c as camelToDashCase}from"./p-0bb29d98.js";export{d as BackgroundColorMap,a as BackgroundColors,e as BorderColorMap,b as BorderColors,B as BorderRadius,C as Colors,F as FillBackgroundColors,g as ShadowMap,f as Shadows,h as Spacing,S as StrokeBackgroundColors,c as TextColorMap,T as TextColors}from"./p-b1f65b13.js";export{B as Breakpoints}from"./p-ed45b3b6.js";export{I as Icons,g as getIconFromToken}from"./p-16493e5b.js";export{b as Typography,a as TypographyKeys,T as TypographyUrls}from"./p-d884c644.js";export{e as BoxDisplay,B as BreakpointKeys,C as CssStates,F as FlexDirections}from"./p-74168615.js";export{F as FrameworkEnum,v as VegaEnvManager}from"./p-5f377954.js";export{b as VegaEventManager,V as VegaLoader,a as VegaNotify,d as VegaSkeletonLoader,c as VegaZIndexManager}from"./p-76a8ccbb.js";export{F as FeatureFlag}from"./p-ff4bafa3.js";export{M as ModifyContentAction,e as RTEBlock,b as RTEImageBlock,f as RTEImageNode,d as RTEListBlock,c as RTEListItemBlock,h as RTENode,R as RTETextBlock,g as RTETextNode,a as VegaRTEContent,V as VegaThemeManager}from"./p-e0d3ca2d.js";export{V as VegaDialog}from"./p-149d2801.js";export{B as VegaJQueryDelegatedEventStrategy}from"./p-1b860f90.js";export{V as VegaIconManager}from"./p-032df16f.js";export{V as ValidCreditCardNumberRule}from"./p-6f90d444.js";export{w as waitForVega}from"./p-0cc1ad76.js";export{a as VegaTranslation,s as VegaTranslationResourceEN}from"./p-483c483a.js";export{G as GridColumns,a as GridRows}from"./p-7f2441d6.js";export{C as CheckBoxRequiredRule}from"./p-590fd123.js";export{D as DateRequiredRule}from"./p-8fae8f9e.js";export{I as InputPhoneNumberRequiredRule}from"./p-07c2725a.js";export{I as InputRangeRequiredRule}from"./p-f396c69a.js";export{R as RequiredFieldRule}from"./p-280cbcdb.js";export{R as RichTextEditorRequiredRule}from"./p-e0446879.js";export{T as TimeRangeRequiredRule,a as TimeRequiredRule}from"./p-924b4e24.js";export{T as ToggleSwitchRequiredRule}from"./p-7c0b4c36.js";export{F as FileUploaderRequiredRule}from"./p-0bb860cc.js";import"./p-2205ee4c.js";import"./p-3a0a4d15.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-79ec5d69.js";import"./p-781fd6e0.js";import"./p-262ec334.js";import"./p-5f589974.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-2d0d575f.js";import"./p-7c37e5bb.js";import"./p-d2ff56d8.js";import"./p-5dce8dfe.js";import"./p-331a62d5.js";import"./p-abd7aeaa.js";import"./p-0c667d6a.js";import"./p-08835909.js";const o=["ring-input-focus","dark-ring-input-focus","ring-input-danger-focus","dark-ring-input-danger-focus","ring-action-focus","dark-ring-action-focus","ring-action-danger-focus","dark-ring-action-danger-focus"];export{o as Rings}
|