@globalpayments/vega 2.39.0 → 2.41.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-7fecd3ff.js} +21 -10
- package/dist/cjs/check-box-required-rule-1ee54b9a.js +70 -0
- package/dist/cjs/{child-nodes-event-prevent-slimmer-af2addec.js → child-nodes-event-prevent-slimmer-4beb1fde.js} +2 -2
- package/dist/cjs/{child-nodes-notify-observer-slimmer-4e60a929.js → child-nodes-notify-observer-slimmer-be92f366.js} +2 -2
- package/dist/cjs/{content-state-c5b47ca1.js → content-state-582d8961.js} +2 -3
- package/dist/cjs/date-required-rule-4e1f84fd.js +92 -0
- package/dist/cjs/{design-token-36eb5def.js → design-token-4d94a23c.js} +1 -1
- package/dist/cjs/{dom-node-subject-factory-ce1777a9.js → dom-node-subject-factory-3ec114b8.js} +30 -0
- package/dist/cjs/{dom-node-subject-observer-factory-80b3ac6c.js → dom-node-subject-observer-factory-5f0eae19.js} +2 -3
- package/dist/cjs/{element-appender-slimmer-c6e0f4ca.js → element-appender-slimmer-88edb0d1.js} +19 -14
- package/dist/cjs/{event-emit-slimmer-208a19e4.js → event-emit-slimmer-9c223f73.js} +3 -3
- package/dist/cjs/{feature-flag-controller-7b22e598.js → feature-flag-controller-3c6666df.js} +6 -0
- package/dist/cjs/file-uploader-required-rule-313ec9e3.js +21 -0
- package/dist/cjs/{form-field-controller-slimmer-48c0ad0b.js → form-field-controller-slimmer-9f4d1fc3.js} +36 -10
- package/dist/cjs/{image-annotation-action-75b9c0d3.js → image-annotation-action-3247409b.js} +3 -3
- package/dist/cjs/index-453b89b9.js +42 -0
- package/dist/cjs/index.cjs.js +37 -18
- 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/{internal-vega-event-manager-981dfd1c.js → internal-vega-event-manager-e5e4bcf4.js} +1 -1
- package/dist/cjs/loader.cjs.js +12 -14
- 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/{page-resize-observer-slimmer-bb1eaebe.js → page-resize-observer-slimmer-bceeaabf.js} +53 -2
- package/dist/cjs/public-rules-ec626913.js +41 -0
- package/dist/cjs/{remote-invocation-registry-32aaf6c2.js → remote-invocation-registry-ff9af278.js} +3 -3
- package/dist/cjs/{required-field-rule-7f9945fa.js → required-field-rule-d73c1d8c.js} +6 -3
- package/dist/cjs/{responsive-format-facade-a1983026.js → responsive-format-facade-ad8ca2ab.js} +212 -9
- package/dist/cjs/rich-text-editor-required-rule-15d9dea1.js +64 -0
- package/dist/cjs/{string-input-formatter-slimmer-f45931fd.js → string-input-formatter-slimmer-83aa7e61.js} +2 -2
- package/dist/cjs/{style-formatter-d446562b.js → style-formatter-c1c9c121.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-b1f1e61a.js → sub-state-notify-slimmer-1a52271c.js} +2 -3
- package/dist/cjs/{sub-state-observer-slimmer-02634647.js → sub-state-observer-slimmer-91b89d4d.js} +2 -3
- 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-accordion.cjs.entry.js +21 -12
- package/dist/cjs/vega-app-header-button.cjs.entry.js +19 -14
- package/dist/cjs/vega-banner.cjs.entry.js +5 -6
- package/dist/cjs/vega-box.cjs.entry.js +135 -18
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +6 -7
- package/dist/cjs/vega-button-circle.cjs.entry.js +19 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -9
- package/dist/cjs/vega-button-link.cjs.entry.js +6 -7
- package/dist/cjs/vega-button.cjs.entry.js +18 -12
- package/dist/cjs/vega-calendar_3.cjs.entry.js +9 -11
- package/dist/cjs/vega-card.cjs.entry.js +20 -3
- package/dist/cjs/vega-carousel.cjs.entry.js +20 -9
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +21 -91
- package/dist/cjs/vega-chip.cjs.entry.js +22 -15
- package/dist/cjs/vega-color-picker.cjs.entry.js +8 -9
- package/dist/cjs/vega-combo-box.cjs.entry.js +10 -11
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +26 -111
- package/dist/cjs/vega-dialog_2.cjs.entry.js +62 -29
- package/dist/cjs/vega-divider.cjs.entry.js +22 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +28 -24
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +4 -5
- package/dist/cjs/vega-file-uploader.cjs.entry.js +10 -26
- package/dist/cjs/vega-flex.cjs.entry.js +19 -6
- package/dist/cjs/vega-font.cjs.entry.js +21 -5
- package/dist/cjs/vega-form.cjs.entry.js +14 -15
- package/dist/cjs/vega-grid.cjs.entry.js +20 -3
- package/dist/cjs/vega-icon.cjs.entry.js +18 -4
- package/dist/cjs/vega-image-uploader.cjs.entry.js +22 -20
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +11 -12
- package/dist/cjs/vega-input-numeric.cjs.entry.js +11 -12
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +15 -73
- package/dist/cjs/vega-input-range.cjs.entry.js +13 -70
- package/dist/cjs/vega-input-select.cjs.entry.js +19 -17
- package/dist/cjs/vega-input.cjs.entry.js +16 -16
- package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -5
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +25 -22
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +22 -7
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -3
- package/dist/cjs/vega-pagination.cjs.entry.js +6 -7
- package/dist/cjs/vega-popover_2.cjs.entry.js +20 -12
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +4 -5
- package/dist/cjs/vega-radio_2.cjs.entry.js +13 -14
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +7 -7
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +22 -81
- package/dist/cjs/vega-segment-control.cjs.entry.js +5 -7
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +22 -19
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +14 -15
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +24 -19
- package/dist/cjs/vega-signature-capture.cjs.entry.js +21 -15
- package/dist/cjs/{vega-skeleton-loader-controller-00dbdf29.js → vega-skeleton-loader-controller-381e90fe.js} +262 -11
- package/dist/cjs/vega-stepper.cjs.entry.js +10 -11
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +8 -10
- package/dist/cjs/vega-table_8.cjs.entry.js +40 -40
- package/dist/cjs/vega-text.cjs.entry.js +1 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +11 -12
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +27 -155
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +9 -70
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +70 -18
- package/dist/cjs/vega.cjs.js +12 -14
- package/dist/cjs/{index-0546e2ea.js → wait-for-vega-handler-46280dcf.js} +1 -39
- package/dist/collection/components/vega-box/slimmers/controllers/vega-box-responsive-style-controller.js +89 -0
- package/dist/collection/components/vega-box/vega-box.css +55 -7196
- package/dist/collection/components/vega-box/vega-box.js +23 -0
- 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-dialog/vega-dialog.js +4 -4
- 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-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.css +1 -1
- 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/components/vega-virtual-scroll/slimmers/controllers/vega-virtual-scroll-scrollable-controller.js +8 -5
- package/dist/collection/global/scripts/before-vega-load.js +11 -0
- package/dist/collection/helpers/dialog/test/vega-dialog-controller.test.js +19 -1
- package/dist/collection/helpers/dialog/vega-dialog-controller.js +2 -2
- package/dist/collection/helpers/feature-control/feature-flags-map.js +6 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsiv-border-radius-formatter.js +1 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-border-radius-style-formatter.js +63 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-css-text-formatter.js +45 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-format-facade.js +9 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.js +1 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-style-formatter.js +44 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-padding-formatter.js +1 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-padding-style-formatter.js +44 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.js +32 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.js +28 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.js +28 -0
- package/dist/collection/helpers/slimmers/element-appender-slimmer.js +9 -6
- package/dist/collection/helpers/slimmers/test/element-appender-slimmer.test.js +2 -0
- package/dist/collection/helpers/ui/element-appender.js +2 -0
- package/dist/collection/helpers/ui/test/element-appender.test.js +13 -12
- 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-9ad844bb.js} +18 -7
- package/dist/esm/check-box-required-rule-cb0aa339.js +68 -0
- package/dist/esm/{child-nodes-event-prevent-slimmer-3220fa5b.js → child-nodes-event-prevent-slimmer-851ad927.js} +2 -2
- package/dist/esm/{child-nodes-notify-observer-slimmer-36024b11.js → child-nodes-notify-observer-slimmer-289caacc.js} +1 -1
- package/dist/esm/{content-state-2edba4ec.js → content-state-5646be9f.js} +1 -2
- package/dist/esm/{date-732bc749.js → date-c55b97f0.js} +1 -1
- package/dist/esm/date-required-rule-8944f3bf.js +90 -0
- package/dist/esm/{design-token-e14b622b.js → design-token-a1bb9a99.js} +1 -1
- package/dist/esm/{dom-node-subject-factory-97deb349.js → dom-node-subject-factory-5831cdd4.js} +30 -1
- package/dist/esm/{dom-node-subject-observer-factory-857c65fa.js → dom-node-subject-observer-factory-dc486a8b.js} +1 -2
- package/dist/esm/{element-appender-slimmer-f5e703f3.js → element-appender-slimmer-dbe9f79e.js} +15 -10
- package/dist/esm/{event-emit-slimmer-36cf4e39.js → event-emit-slimmer-f285e3ac.js} +3 -3
- package/dist/esm/{feature-flag-controller-4b3fe6f8.js → feature-flag-controller-91e7eaa1.js} +6 -0
- package/dist/esm/file-uploader-required-rule-ad886d01.js +19 -0
- package/dist/esm/{form-field-controller-slimmer-7a9f2b2e.js → form-field-controller-slimmer-0da8c510.js} +31 -5
- package/dist/esm/{image-annotation-action-b6668f48.js → image-annotation-action-af91eb87.js} +3 -3
- package/dist/esm/index-88cfdf1a.js +39 -0
- package/dist/esm/index.js +23 -14
- 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/{internal-vega-event-manager-0a01ba12.js → internal-vega-event-manager-07e1b3d9.js} +1 -1
- package/dist/esm/loader.js +12 -14
- 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/{page-resize-observer-slimmer-beb7b0bd.js → page-resize-observer-slimmer-bf715d05.js} +51 -2
- package/dist/esm/public-rules-4a519276.js +26 -0
- package/dist/esm/{remote-invocation-registry-1682b34e.js → remote-invocation-registry-d97fa3bc.js} +1 -1
- package/dist/esm/{required-field-rule-368b31fa.js → required-field-rule-ab4bdc47.js} +6 -3
- package/dist/esm/{responsive-format-facade-661193d7.js → responsive-format-facade-b3bc4db6.js} +204 -1
- package/dist/esm/rich-text-editor-required-rule-7a402a9c.js +62 -0
- package/dist/esm/{string-input-formatter-slimmer-418b54f0.js → string-input-formatter-slimmer-1f74c6f3.js} +2 -2
- package/dist/esm/{style-formatter-4b857992.js → style-formatter-bdafdf22.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-b36fd081.js → sub-state-notify-slimmer-e9489326.js} +1 -2
- package/dist/esm/{sub-state-observer-slimmer-09452523.js → sub-state-observer-slimmer-7e99a677.js} +1 -2
- 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-accordion.entry.js +20 -11
- package/dist/esm/vega-app-header-button.entry.js +18 -13
- package/dist/esm/vega-banner.entry.js +5 -6
- package/dist/esm/vega-box.entry.js +135 -18
- package/dist/esm/vega-breadcrumb.entry.js +6 -7
- package/dist/esm/vega-button-circle.entry.js +19 -12
- package/dist/esm/vega-button-group_2.entry.js +8 -9
- package/dist/esm/vega-button-link.entry.js +6 -7
- package/dist/esm/vega-button.entry.js +17 -11
- package/dist/esm/vega-calendar_3.entry.js +10 -12
- package/dist/esm/vega-card.entry.js +20 -3
- package/dist/esm/vega-carousel.entry.js +20 -9
- package/dist/esm/vega-checkbox_2.entry.js +19 -89
- package/dist/esm/vega-chip.entry.js +21 -14
- package/dist/esm/vega-color-picker.entry.js +8 -9
- package/dist/esm/vega-combo-box.entry.js +10 -11
- package/dist/esm/vega-date-picker_2.entry.js +22 -107
- package/dist/esm/vega-dialog_2.entry.js +54 -21
- package/dist/esm/vega-divider.entry.js +21 -4
- package/dist/esm/vega-dropdown_5.entry.js +28 -24
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +4 -5
- package/dist/esm/vega-file-uploader.entry.js +10 -26
- package/dist/esm/vega-flex.entry.js +19 -6
- package/dist/esm/vega-font.entry.js +20 -4
- package/dist/esm/vega-form.entry.js +10 -11
- package/dist/esm/vega-grid.entry.js +20 -3
- package/dist/esm/vega-icon.entry.js +18 -4
- package/dist/esm/vega-image-uploader.entry.js +21 -19
- package/dist/esm/vega-input-credit-card.entry.js +11 -12
- package/dist/esm/vega-input-numeric.entry.js +11 -12
- package/dist/esm/vega-input-phone-number.entry.js +14 -72
- package/dist/esm/vega-input-range.entry.js +12 -69
- package/dist/esm/vega-input-select.entry.js +18 -16
- package/dist/esm/vega-input.entry.js +16 -16
- package/dist/esm/vega-item-toggle.entry.js +4 -5
- package/dist/esm/vega-left-nav_5.entry.js +18 -15
- package/dist/esm/vega-loader-wrapper_2.entry.js +19 -4
- package/dist/esm/vega-page-notification_2.entry.js +2 -3
- package/dist/esm/vega-pagination.entry.js +6 -7
- package/dist/esm/vega-popover_2.entry.js +20 -12
- package/dist/esm/vega-progress-tracker.entry.js +4 -5
- package/dist/esm/vega-radio_2.entry.js +11 -12
- package/dist/esm/vega-rich-text-content.entry.js +7 -7
- package/dist/esm/vega-rich-text-editor_4.entry.js +17 -76
- package/dist/esm/vega-segment-control.entry.js +5 -7
- package/dist/esm/vega-selection-chip_2.entry.js +20 -17
- package/dist/esm/vega-selection-tile_2.entry.js +13 -14
- package/dist/esm/vega-sidenav_3.entry.js +16 -11
- package/dist/esm/vega-signature-capture.entry.js +20 -14
- package/dist/esm/{vega-skeleton-loader-controller-5aea7aeb.js → vega-skeleton-loader-controller-964db62f.js} +261 -12
- package/dist/esm/vega-stepper.entry.js +10 -11
- package/dist/esm/vega-tab-group_2.entry.js +7 -9
- package/dist/esm/vega-table_8.entry.js +17 -17
- package/dist/esm/vega-text.entry.js +1 -2
- package/dist/esm/vega-textarea.entry.js +11 -12
- package/dist/esm/vega-time-picker_2.entry.js +23 -151
- package/dist/esm/vega-toggle-switch.entry.js +8 -69
- package/dist/esm/vega-tooltip_2.entry.js +70 -18
- package/dist/esm/vega.js +12 -14
- package/dist/esm/{index-d172bafa.js → wait-for-vega-handler-03a25866.js} +1 -38
- package/dist/types/components/vega-box/slimmers/controllers/vega-box-responsive-style-controller.d.ts +38 -0
- package/dist/types/components/vega-box/vega-box.d.ts +5 -0
- package/dist/types/components/vega-dialog/types.d.ts +1 -1
- 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/components/vega-virtual-scroll/slimmers/controllers/vega-virtual-scroll-scrollable-controller.d.ts +1 -1
- package/dist/types/helpers/dialog/vega-dialog-controller.d.ts +1 -1
- package/dist/types/helpers/feature-control/feature-flag.d.ts +6 -1
- package/dist/types/helpers/formatter/responsive-map-formatter/responsiv-border-radius-formatter.d.ts +1 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-border-radius-style-formatter.d.ts +26 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-css-text-formatter.d.ts +25 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.d.ts +1 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-margin-style-formatter.d.ts +16 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-padding-formatter.d.ts +1 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-padding-style-formatter.d.ts +16 -0
- package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.d.ts +1 -0
- package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.d.ts +1 -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/file-uploader-required-rule.test.d.ts +1 -0
- 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/types/types/ui.type.d.ts +6 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-04ca73d5.entry.js +1 -0
- package/dist/vega/p-07c2725a.js +1 -0
- package/dist/vega/p-07d5ebac.entry.js +1 -0
- package/dist/vega/{p-b5990090.js → p-08835909.js} +1 -1
- package/dist/vega/p-09c5de7f.entry.js +1 -0
- package/dist/vega/{p-1b860f90.js → p-0af4bda9.js} +1 -1
- package/dist/vega/p-0bb860cc.js +1 -0
- package/dist/vega/p-0ceb92d7.entry.js +1 -0
- package/dist/vega/p-14f85e30.entry.js +1 -0
- package/dist/vega/p-1727b651.entry.js +1 -0
- package/dist/vega/p-1d01b5ab.entry.js +1 -0
- package/dist/vega/p-1d62d89d.js +1 -0
- package/dist/vega/p-1db0a7a1.entry.js +1 -0
- package/dist/vega/{p-bd0116f9.js → p-1f9a66e6.js} +1 -1
- package/dist/vega/p-24da2ffd.entry.js +1 -0
- package/dist/vega/p-25228e15.entry.js +1 -0
- package/dist/vega/p-280cbcdb.js +1 -0
- package/dist/vega/p-29b09aad.js +1 -0
- package/dist/vega/p-2b8e9c64.entry.js +1 -0
- package/dist/vega/p-2f6890e8.entry.js +1 -0
- package/dist/vega/p-2f9f5995.entry.js +1 -0
- package/dist/vega/p-2fb4faf8.entry.js +1 -0
- package/dist/vega/p-30881e6c.entry.js +1 -0
- package/dist/vega/{p-9ee23f34.entry.js → p-349480f8.entry.js} +2 -2
- package/dist/vega/p-36cb03ec.js +1 -0
- package/dist/vega/{p-ac608edc.js → p-39dfa61b.js} +1 -1
- package/dist/vega/p-45dd4698.entry.js +1 -0
- package/dist/vega/{p-4ab0d645.js → p-45fccc2e.js} +1 -1
- package/dist/vega/p-499d9811.entry.js +1 -0
- package/dist/vega/{p-a190c86a.js → p-4b500240.js} +1 -1
- package/dist/vega/{p-666cd80f.js → p-53328c50.js} +1 -1
- package/dist/vega/p-54cb3c47.entry.js +1 -0
- package/dist/vega/p-5616294e.entry.js +1 -0
- package/dist/vega/p-590fd123.js +1 -0
- package/dist/vega/p-5986c439.entry.js +1 -0
- package/dist/vega/p-5d7ea126.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-5f5af9e8.entry.js +1 -0
- package/dist/vega/{p-6e5db02b.js → p-601fbb96.js} +1 -1
- package/dist/vega/p-611eba55.entry.js +1 -0
- package/dist/vega/p-61d8636c.js +1 -0
- package/dist/vega/p-62cae5ef.entry.js +1 -0
- package/dist/vega/p-66d871d6.js +1 -0
- package/dist/vega/p-6868a09d.entry.js +1 -0
- package/dist/vega/p-6a3989dd.js +1 -0
- package/dist/vega/p-6e921ac2.js +1 -0
- package/dist/vega/p-6f90d444.js +1 -0
- package/dist/vega/p-71791731.entry.js +1 -0
- package/dist/vega/{p-60fb1db7.js → p-72eee5e2.js} +1 -1
- package/dist/vega/p-74b6ce44.entry.js +1 -0
- package/dist/vega/p-7c0b4c36.js +1 -0
- package/dist/vega/p-831fbe52.entry.js +1 -0
- package/dist/vega/{p-0b697841.entry.js → p-83a06a40.entry.js} +1 -1
- package/dist/vega/p-87ee1dab.entry.js +1 -0
- package/dist/vega/p-88b5fcc3.entry.js +1 -0
- package/dist/vega/p-8bc7e1a7.entry.js +1 -0
- package/dist/vega/p-8be34d8e.entry.js +1 -0
- package/dist/vega/p-8ce6e672.entry.js +1 -0
- package/dist/vega/p-8fae8f9e.js +1 -0
- package/dist/vega/{p-ff4bafa3.js → p-922bb790.js} +1 -1
- package/dist/vega/p-924b4e24.js +1 -0
- package/dist/vega/p-92f9b9b5.entry.js +1 -0
- package/dist/vega/p-93421a1a.entry.js +1 -0
- package/dist/vega/p-99b7257b.entry.js +1 -0
- package/dist/vega/p-a57fc4df.entry.js +1 -0
- package/dist/vega/p-a7fea3c8.entry.js +1 -0
- package/dist/vega/p-aa1a5f2d.entry.js +1 -0
- package/dist/vega/p-ab0c8cf7.entry.js +1 -0
- package/dist/vega/p-abd7aeaa.js +1 -0
- package/dist/vega/p-aca02a0b.js +1 -0
- package/dist/vega/p-ad2e8e08.entry.js +1 -0
- package/dist/vega/p-b0926d1c.entry.js +1 -0
- package/dist/vega/p-b1eb225c.entry.js +1 -0
- package/dist/vega/p-b5944e86.entry.js +1 -0
- package/dist/vega/p-b6d62c44.js +1 -0
- package/dist/vega/p-b9051ad2.js +1 -0
- package/dist/vega/p-bbc4b90a.entry.js +1 -0
- package/dist/vega/p-c1a3e7f7.js +1 -0
- package/dist/vega/p-ca1fd7b2.js +1 -0
- package/dist/vega/p-cb8f8458.entry.js +1 -0
- package/dist/vega/p-cd1b4bd4.entry.js +1 -0
- package/dist/vega/p-cdbbdcc2.js +1 -0
- package/dist/vega/p-cf1001e6.js +1 -0
- package/dist/vega/p-d8e95692.js +1 -0
- package/dist/vega/p-da82e78c.entry.js +1 -0
- package/dist/vega/p-dd7ade28.js +1 -0
- package/dist/vega/{p-6408d3dc.entry.js → p-e43c18d4.entry.js} +1 -1
- package/dist/vega/{p-57669fd6.js → p-e8f540d8.js} +1 -1
- package/dist/vega/p-ebc73140.entry.js +1 -0
- package/dist/vega/p-ec2d3456.entry.js +1 -0
- package/dist/vega/p-edfedd8e.entry.js +1 -0
- package/dist/vega/p-f396c69a.js +1 -0
- package/dist/vega/p-f4a62fa7.entry.js +1 -0
- package/dist/vega/p-f50bd1d3.entry.js +1 -0
- package/dist/vega/p-f7d9c7d1.js +1 -0
- package/dist/vega/p-fdf812b0.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/breakpoints-17d6c4c7.js +0 -55
- package/dist/cjs/internal-vega-z-index-manager-f03ddb37.js +0 -180
- package/dist/cjs/observer-f49483e8.js +0 -32
- package/dist/cjs/vega-dialog-controller-fe610705.js +0 -81
- package/dist/collection/helpers/validator/test/rules/object-array-required-rule.test.js +0 -7
- package/dist/esm/breakpoints-91116111.js +0 -52
- package/dist/esm/internal-vega-z-index-manager-7d2b54c3.js +0 -178
- package/dist/esm/observer-3959f9dd.js +0 -30
- package/dist/esm/vega-dialog-controller-34eb8967.js +0 -79
- package/dist/vega/p-05f5e22b.entry.js +0 -1
- package/dist/vega/p-073beb31.entry.js +0 -1
- package/dist/vega/p-08bbc8e6.entry.js +0 -1
- package/dist/vega/p-0cc1ad76.js +0 -1
- package/dist/vega/p-149d2801.js +0 -1
- package/dist/vega/p-1d53d434.entry.js +0 -1
- package/dist/vega/p-1d5fbccc.entry.js +0 -1
- package/dist/vega/p-239bae84.js +0 -1
- package/dist/vega/p-24ac5151.entry.js +0 -1
- package/dist/vega/p-257b1bc2.entry.js +0 -1
- package/dist/vega/p-2f39ea18.entry.js +0 -1
- package/dist/vega/p-3152031c.js +0 -1
- package/dist/vega/p-331a62d5.js +0 -1
- package/dist/vega/p-3c85a11b.entry.js +0 -1
- package/dist/vega/p-4019a3ec.entry.js +0 -1
- package/dist/vega/p-46359293.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-4b19706c.entry.js +0 -1
- package/dist/vega/p-4bcd6612.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-59b0f3c5.entry.js +0 -1
- package/dist/vega/p-59cfed37.entry.js +0 -1
- package/dist/vega/p-5f589974.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-644d7300.entry.js +0 -1
- package/dist/vega/p-64e0c944.entry.js +0 -1
- package/dist/vega/p-64e49394.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-76a8ccbb.js +0 -1
- package/dist/vega/p-781fd6e0.js +0 -1
- package/dist/vega/p-7c37e5bb.js +0 -1
- package/dist/vega/p-7f2441d6.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-9b7f9c27.entry.js +0 -1
- package/dist/vega/p-9cfae00d.entry.js +0 -1
- package/dist/vega/p-9d19c126.entry.js +0 -1
- package/dist/vega/p-a247e23c.entry.js +0 -1
- package/dist/vega/p-a8a809e1.entry.js +0 -1
- package/dist/vega/p-a9e1123a.js +0 -1
- package/dist/vega/p-af7e6dfb.entry.js +0 -1
- package/dist/vega/p-b071be5c.entry.js +0 -1
- package/dist/vega/p-b6bffdf3.entry.js +0 -1
- package/dist/vega/p-b7e52da9.entry.js +0 -1
- package/dist/vega/p-b7ebb9fa.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-c1f7f37c.entry.js +0 -1
- package/dist/vega/p-c2e96537.entry.js +0 -1
- package/dist/vega/p-cc8ec82c.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-d2e6090a.js +0 -1
- package/dist/vega/p-d638f007.entry.js +0 -1
- package/dist/vega/p-d7219734.js +0 -1
- package/dist/vega/p-ddac683a.entry.js +0 -1
- package/dist/vega/p-e0d3ca2d.js +0 -1
- package/dist/vega/p-e4ca75a7.entry.js +0 -1
- package/dist/vega/p-e4ce559d.entry.js +0 -1
- package/dist/vega/p-e6fdc69f.entry.js +0 -1
- package/dist/vega/p-e95668f3.entry.js +0 -1
- package/dist/vega/p-ea78ddfa.entry.js +0 -1
- package/dist/vega/p-ebc062f6.entry.js +0 -1
- package/dist/vega/p-ec4de3ec.js +0 -1
- package/dist/vega/p-f1ebe86b.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 → formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.d.ts} +0 -0
package/dist/cjs/{responsive-format-facade-a1983026.js → responsive-format-facade-ad8ca2ab.js}
RENAMED
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
4
4
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
5
|
-
const
|
|
5
|
+
const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-bceeaabf.js');
|
|
6
6
|
const number = require('./number-4816603d.js');
|
|
7
7
|
const ui = require('./ui-32e69595.js');
|
|
8
8
|
const pixel = require('./pixel-98f2a10c.js');
|
|
9
|
+
const breakpoints = require('./breakpoints-ebde4837.js');
|
|
10
|
+
const array = require('./array-5adef7b2.js');
|
|
11
|
+
require('./vega-env-manager-23b8b23c.js');
|
|
12
|
+
require('./vega-skeleton-loader-controller-381e90fe.js');
|
|
13
|
+
const featureFlagController = require('./feature-flag-controller-3c6666df.js');
|
|
14
|
+
require('./content-state-582d8961.js');
|
|
15
|
+
require('./icon-manager-edc2400b.js');
|
|
16
|
+
require('./wait-for-vega-handler-46280dcf.js');
|
|
17
|
+
require('./ui-5fd9b267.js');
|
|
18
|
+
require('./translation-6848c389.js');
|
|
9
19
|
|
|
10
20
|
/**
|
|
11
21
|
* An abstract class for format {@link ManagedResponsiveScopeInput[Flag]} to CSS class string
|
|
@@ -45,6 +55,7 @@ const PADDING_DIRECTION_CLASS_PARTIAL_MAP = {
|
|
|
45
55
|
/**
|
|
46
56
|
* A class for format PaddingType with BreakpointsForPrefixType to CSS class string
|
|
47
57
|
*
|
|
58
|
+
* @deprecated Please use the `ResponsivePaddingStyleFormatter` instead.
|
|
48
59
|
* @augments ResponsiveClassStringFormatter
|
|
49
60
|
*/
|
|
50
61
|
class ResponsivePaddingFormatter extends ResponsiveClassStringFormatter {
|
|
@@ -86,6 +97,7 @@ const MARGIN_DIRECTION_CLASS_PARTIAL_MAP = {
|
|
|
86
97
|
/**
|
|
87
98
|
* A class for format MarginType with BreakpointsForPrefixType to CSS class string
|
|
88
99
|
*
|
|
100
|
+
* @deprecated Please use the `ResponsiveMarginStyleFormatter` instead.
|
|
89
101
|
* @augments ResponsiveClassStringFormatter
|
|
90
102
|
*/
|
|
91
103
|
class ResponsiveMarginFormatter extends ResponsiveClassStringFormatter {
|
|
@@ -275,7 +287,7 @@ class ResponsiveSizeFormatter {
|
|
|
275
287
|
* @returns {SizeType} - size.
|
|
276
288
|
*/
|
|
277
289
|
format(input) {
|
|
278
|
-
const breakpoint =
|
|
290
|
+
const breakpoint = pageResizeObserverSlimmer.getCurrentBreakpoint();
|
|
279
291
|
// string type assertion is needed here, cause if we have <vega-modal size=650/>, stencil is not able to parse it as number but string since the property is a union type of number and string
|
|
280
292
|
if ((typeof input === 'number' || typeof input === 'string') && !isNaN(input)) {
|
|
281
293
|
return Number(input);
|
|
@@ -284,7 +296,7 @@ class ResponsiveSizeFormatter {
|
|
|
284
296
|
return input;
|
|
285
297
|
}
|
|
286
298
|
else if (typeGuard.isResponsiveType(input)) {
|
|
287
|
-
input =
|
|
299
|
+
input = pageResizeObserverSlimmer.createCompleteResponsiveMap(input);
|
|
288
300
|
return input[breakpoint];
|
|
289
301
|
}
|
|
290
302
|
else {
|
|
@@ -311,8 +323,8 @@ class ResponsiveTranslocationFormatter {
|
|
|
311
323
|
return input;
|
|
312
324
|
}
|
|
313
325
|
else if (typeGuard.isResponsiveType(input)) {
|
|
314
|
-
const breakpoint =
|
|
315
|
-
input =
|
|
326
|
+
const breakpoint = pageResizeObserverSlimmer.getCurrentBreakpoint();
|
|
327
|
+
input = pageResizeObserverSlimmer.createCompleteResponsiveMap(input);
|
|
316
328
|
return input[breakpoint];
|
|
317
329
|
}
|
|
318
330
|
else {
|
|
@@ -498,9 +510,9 @@ class ResponsiveCustomFormatter {
|
|
|
498
510
|
* @returns {T} The value of the current breakpoint.
|
|
499
511
|
*/
|
|
500
512
|
format(input) {
|
|
501
|
-
const breakpoint =
|
|
513
|
+
const breakpoint = pageResizeObserverSlimmer.getCurrentBreakpoint();
|
|
502
514
|
if (typeGuard.isResponsiveType(input)) {
|
|
503
|
-
input =
|
|
515
|
+
input = pageResizeObserverSlimmer.createCompleteResponsiveMap(input);
|
|
504
516
|
return input[breakpoint];
|
|
505
517
|
}
|
|
506
518
|
else {
|
|
@@ -555,9 +567,9 @@ class ResponsiveWidthAndHeightFormatter {
|
|
|
555
567
|
* @returns {string} The `format` function returns a string value.
|
|
556
568
|
*/
|
|
557
569
|
format(input) {
|
|
558
|
-
const breakpoint =
|
|
570
|
+
const breakpoint = pageResizeObserverSlimmer.getCurrentBreakpoint();
|
|
559
571
|
if (typeGuard.isResponsiveType(input)) {
|
|
560
|
-
input =
|
|
572
|
+
input = pageResizeObserverSlimmer.createCompleteResponsiveMap(input);
|
|
561
573
|
return pixel.parseToPixelString(input[breakpoint]);
|
|
562
574
|
}
|
|
563
575
|
else {
|
|
@@ -580,6 +592,7 @@ const BORDER_RADIUS_DIRECTION_CLASS_PARTIAL_MAP = {
|
|
|
580
592
|
/**
|
|
581
593
|
* A class for format BorderRadiusType with BreakpointsForPrefixType to CSS class string
|
|
582
594
|
*
|
|
595
|
+
* @deprecated Please use the `ResponsiveBorderRadiusStyleStyleFormatter` instead.
|
|
583
596
|
* @augments ResponsiveClassStringFormatter
|
|
584
597
|
*/
|
|
585
598
|
class ResponsiveBorderRadiusFormatter extends ResponsiveClassStringFormatter {
|
|
@@ -646,6 +659,190 @@ class ResponsiveTextAlignFormatter extends ResponsiveClassStringFormatter {
|
|
|
646
659
|
}
|
|
647
660
|
const ResponsiveTextAlignFormatter$1 = new ResponsiveTextAlignFormatter();
|
|
648
661
|
|
|
662
|
+
/**
|
|
663
|
+
* Get the style text from the responsive property.
|
|
664
|
+
*/
|
|
665
|
+
class ResponsiveCSSTextFormatter {
|
|
666
|
+
/**
|
|
667
|
+
* > It takes a `ResponsiveType<ManagedResponsiveScopeInput[Flag]>` and returns a string
|
|
668
|
+
*
|
|
669
|
+
* @typedef Flag key of ManagedResponsiveScopeInput
|
|
670
|
+
* @param {ResponsiveType<ManagedResponsiveScopeInput[Flag]>} input - ManagedResponsiveScopeInput[Flag]
|
|
671
|
+
* @returns {string} - CSS text string.
|
|
672
|
+
*/
|
|
673
|
+
format(input) {
|
|
674
|
+
if (typeGuard.isResponsiveType(input)) {
|
|
675
|
+
return Object.keys(input)
|
|
676
|
+
.map((breakpoint) => {
|
|
677
|
+
const breakpointValue = input[breakpoint];
|
|
678
|
+
const breakPointFormatted = breakpoint !== 'default' ? breakpoint : undefined;
|
|
679
|
+
return this.generateCssText(this.formatToken(breakpointValue, breakPointFormatted), breakpoint);
|
|
680
|
+
})
|
|
681
|
+
.join(' ');
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
return this.generateCssText(this.formatToken(input));
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Create the complete style text with media query selector.
|
|
689
|
+
*
|
|
690
|
+
* @param {string} cssText - The style snippet.
|
|
691
|
+
* @param {BreakpointsTokenType} breakpoint - The screen breakpoint.
|
|
692
|
+
* @returns {string} - Style content with css selector.
|
|
693
|
+
*/
|
|
694
|
+
generateCssText(cssText, breakpoint) {
|
|
695
|
+
let result = '';
|
|
696
|
+
if (cssText) {
|
|
697
|
+
result =
|
|
698
|
+
breakpoint && breakpoint !== 'default'
|
|
699
|
+
? `@media (min-width:${breakpoints.Breakpoints[breakpoint]}px){:host{${cssText}}}`
|
|
700
|
+
: `:host{${cssText}}`;
|
|
701
|
+
}
|
|
702
|
+
return result;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
const PADDING_DIRECTION_STYLE_MAP = {
|
|
707
|
+
top: ['padding-top'],
|
|
708
|
+
bottom: ['padding-bottom'],
|
|
709
|
+
left: ['padding-left'],
|
|
710
|
+
right: ['padding-right'],
|
|
711
|
+
x: ['padding-left', 'padding-right'],
|
|
712
|
+
y: ['padding-top', 'padding-bottom'],
|
|
713
|
+
};
|
|
714
|
+
/**
|
|
715
|
+
* Get the padding style content.
|
|
716
|
+
*/
|
|
717
|
+
class ResponsivePaddingStyleFormatter extends ResponsiveCSSTextFormatter {
|
|
718
|
+
/**
|
|
719
|
+
* Given a padding type, return the corresponding string of CSS text.
|
|
720
|
+
*
|
|
721
|
+
* @param {PaddingType} input - PaddingType
|
|
722
|
+
* @returns {string} - CSS text.
|
|
723
|
+
*/
|
|
724
|
+
formatToken(input) {
|
|
725
|
+
if (typeGuard.isSpacingTokenType(input)) {
|
|
726
|
+
return `padding:${typeGuard.Spacing[input]}px`;
|
|
727
|
+
}
|
|
728
|
+
else if (typeGuard.isDirectionalSpacingType(input)) {
|
|
729
|
+
return Object.keys(input)
|
|
730
|
+
.map((direction) => {
|
|
731
|
+
return PADDING_DIRECTION_STYLE_MAP[direction]
|
|
732
|
+
.map((item) => {
|
|
733
|
+
return `${item}:${typeGuard.Spacing[input[direction]]}px`;
|
|
734
|
+
})
|
|
735
|
+
.join(';');
|
|
736
|
+
})
|
|
737
|
+
.join(';');
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
globalSlimmerRegistry.LogUtility.warn(`The padding value ${input} is invalid, it must be a value of: `, typeGuard.Spacing);
|
|
741
|
+
return '';
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
const responsivePaddingStyleFormatter = new ResponsivePaddingStyleFormatter();
|
|
746
|
+
|
|
747
|
+
const MARGIN_DIRECTION_STYLE_MAP = {
|
|
748
|
+
top: ['margin-top'],
|
|
749
|
+
bottom: ['margin-bottom'],
|
|
750
|
+
left: ['margin-left'],
|
|
751
|
+
right: ['margin-right'],
|
|
752
|
+
x: ['margin-left', 'margin-right'],
|
|
753
|
+
y: ['margin-top', 'margin-bottom'],
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* Get the padding style content.
|
|
757
|
+
*/
|
|
758
|
+
class ResponsiveMarginStyleFormatter extends ResponsiveCSSTextFormatter {
|
|
759
|
+
/**
|
|
760
|
+
* Given a margin type, return a string of style content that can be used to apply the margin to an element
|
|
761
|
+
*
|
|
762
|
+
* @param {MarginType} input - MarginType
|
|
763
|
+
* @returns {string} - A string of style content.
|
|
764
|
+
*/
|
|
765
|
+
formatToken(input) {
|
|
766
|
+
if (typeGuard.isSpacingTokenType(input)) {
|
|
767
|
+
return `margin:${typeGuard.Spacing[input]}px`;
|
|
768
|
+
}
|
|
769
|
+
else if (typeGuard.isDirectionalSpacingType(input)) {
|
|
770
|
+
return Object.keys(input)
|
|
771
|
+
.map((direction) => {
|
|
772
|
+
return MARGIN_DIRECTION_STYLE_MAP[direction]
|
|
773
|
+
.map((item) => {
|
|
774
|
+
return `${item}:${typeGuard.Spacing[input[direction]]}px`;
|
|
775
|
+
})
|
|
776
|
+
.join(';');
|
|
777
|
+
})
|
|
778
|
+
.join(';');
|
|
779
|
+
}
|
|
780
|
+
else {
|
|
781
|
+
globalSlimmerRegistry.LogUtility.warn(`The margin value ${input} is invalid, it must be a value of: `, typeGuard.Spacing);
|
|
782
|
+
return '';
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
const responsiveMarginStyleFormatter = new ResponsiveMarginStyleFormatter();
|
|
787
|
+
|
|
788
|
+
const BORDER_RADIUS_DIRECTION_STYLE_MAP = {
|
|
789
|
+
'top': ['border-top-left-radius', 'border-top-right-radius'],
|
|
790
|
+
'right': ['border-top-right-radius', 'border-bottom-right-radius'],
|
|
791
|
+
'bottom': ['border-bottom-left-radius', 'border-bottom-right-radius'],
|
|
792
|
+
'left': ['border-top-left-radius', 'border-bottom-left-radius'],
|
|
793
|
+
'top-left': ['border-top-left-radius'],
|
|
794
|
+
'top-right': ['border-top-right-radius'],
|
|
795
|
+
'bottom-left': ['border-bottom-left-radius'],
|
|
796
|
+
'bottom-right': ['border-bottom-right-radius'],
|
|
797
|
+
};
|
|
798
|
+
/**
|
|
799
|
+
* A class for format BorderRadiusType with BreakpointsForPrefixType to CSS text string
|
|
800
|
+
*
|
|
801
|
+
* @augments ResponsiveClassStringFormatter
|
|
802
|
+
*/
|
|
803
|
+
class ResponsiveBorderRadiusStyleFormatter extends ResponsiveCSSTextFormatter {
|
|
804
|
+
/**
|
|
805
|
+
* Given a border-radius type, return a string of CSS classes that can be used to apply the border-radius to an element
|
|
806
|
+
*
|
|
807
|
+
* @param {CornersType} input - CornersType
|
|
808
|
+
* @returns {string} - A string of CSS text.
|
|
809
|
+
*/
|
|
810
|
+
formatToken(input) {
|
|
811
|
+
if (typeGuard.isBorderRadiusTokenType(input)) {
|
|
812
|
+
return `border-radius:${typeGuard.BorderRadius[input]}px`;
|
|
813
|
+
}
|
|
814
|
+
else if (typeGuard.isDirectionalBorderRadiusType(input)) {
|
|
815
|
+
return this.getDirectionKeys(input)
|
|
816
|
+
.map((direction) => {
|
|
817
|
+
return BORDER_RADIUS_DIRECTION_STYLE_MAP[direction]
|
|
818
|
+
.map((item) => {
|
|
819
|
+
return `${item}:${typeGuard.BorderRadius[input[direction]]}px`;
|
|
820
|
+
})
|
|
821
|
+
.join(';');
|
|
822
|
+
})
|
|
823
|
+
.join(';');
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
globalSlimmerRegistry.LogUtility.warn(`The border radius value ${input} is invalid, it must be a value of: `, typeGuard.BorderRadius);
|
|
827
|
+
return '';
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Get the corners object keys. Order the keys as exist array if the feature flag enabled.
|
|
832
|
+
* The order affects the weight of the styles.
|
|
833
|
+
*
|
|
834
|
+
* @param {DirectionalBorderRadiusType} map - The corners input object.
|
|
835
|
+
* @returns {string[]} - The input object keys.
|
|
836
|
+
*/
|
|
837
|
+
getDirectionKeys(map) {
|
|
838
|
+
const directionKeys = Object.keys(map);
|
|
839
|
+
return featureFlagController.FeatureFlag.isEnabled('VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR')
|
|
840
|
+
? array.sortAsExistArray(directionKeys, (direction) => map[direction], undefined, Object.keys(typeGuard.BorderRadius))
|
|
841
|
+
: directionKeys;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
const responsiveBorderRadiusStyleFormatter = new ResponsiveBorderRadiusStyleFormatter();
|
|
845
|
+
|
|
649
846
|
/**
|
|
650
847
|
* A facade class for delegating format input with different responsive formatters given the flag:
|
|
651
848
|
*
|
|
@@ -698,6 +895,12 @@ class ResponsiveFormatFacade {
|
|
|
698
895
|
return ResponsiveBorderRadiusFormatter$1.format(input);
|
|
699
896
|
case 'textAlign':
|
|
700
897
|
return ResponsiveTextAlignFormatter$1.format(input);
|
|
898
|
+
case 'paddingStyle':
|
|
899
|
+
return responsivePaddingStyleFormatter.format(input);
|
|
900
|
+
case 'marginStyle':
|
|
901
|
+
return responsiveMarginStyleFormatter.format(input);
|
|
902
|
+
case 'cornersStyle':
|
|
903
|
+
return responsiveBorderRadiusStyleFormatter.format(input);
|
|
701
904
|
default:
|
|
702
905
|
throw new Error(`Invalid flag ${flag} passed into ResponsiveFormatFacade`);
|
|
703
906
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const contentState = require('./content-state-582d8961.js');
|
|
4
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A rule that checks if the input range is empty or not
|
|
8
|
+
*
|
|
9
|
+
* @augments {InternalFormFieldValidationRule<string[]>}
|
|
10
|
+
*/
|
|
11
|
+
class RichTextEditorRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
12
|
+
/**
|
|
13
|
+
* It checks if the input is a valid value.
|
|
14
|
+
*
|
|
15
|
+
* @param {string[]} input - The value of the input field.
|
|
16
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
17
|
+
*/
|
|
18
|
+
evaluate(input) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
if (!this.isAcceptedInputType(input)) {
|
|
21
|
+
throw new Error(`Invalid value ${input} for rich text editor`);
|
|
22
|
+
}
|
|
23
|
+
const isValid = ((_a = input === null || input === void 0 ? void 0 : input.blocks) === null || _a === void 0 ? void 0 : _a.length) > 1 || // isValid: true when the length is greater than 1 to keep the same behavior as vega-textarea
|
|
24
|
+
(((_b = input === null || input === void 0 ? void 0 : input.blocks) === null || _b === void 0 ? void 0 : _b.length) === 1 && input.blocks.some((block) => block.isNotEmpty()));
|
|
25
|
+
return {
|
|
26
|
+
isValid,
|
|
27
|
+
message: isValid ? '' : 'This field is required',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* If the input is accepted and the status is not disabled and visible, then return true
|
|
32
|
+
*
|
|
33
|
+
* @param {unknown} input - The input to be evaluated.
|
|
34
|
+
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
35
|
+
* @returns {boolean} A boolean value.
|
|
36
|
+
*/
|
|
37
|
+
canEvaluate(input, status) {
|
|
38
|
+
return status
|
|
39
|
+
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
40
|
+
: this.isAcceptedInputType(input);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
44
|
+
*
|
|
45
|
+
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
46
|
+
* @returns {boolean} A boolean value.
|
|
47
|
+
*/
|
|
48
|
+
shouldShowError(status) {
|
|
49
|
+
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* If the input is undefined or null, return true, otherwise return true if the input is a VegaRTEContent.
|
|
53
|
+
*
|
|
54
|
+
* @param {unknown} input - The input value to be validated.
|
|
55
|
+
* @returns {boolean} A boolean.
|
|
56
|
+
*/
|
|
57
|
+
isAcceptedInputType(input) {
|
|
58
|
+
if (input === undefined || input === null)
|
|
59
|
+
return true;
|
|
60
|
+
return input instanceof contentState.VegaRTEContent;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
exports.RichTextEditorRequiredRule = RichTextEditorRequiredRule;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
4
4
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
5
5
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
6
|
-
const domNodeSubjectFactory = require('./dom-node-subject-factory-
|
|
6
|
+
const domNodeSubjectFactory = require('./dom-node-subject-factory-3ec114b8.js');
|
|
7
7
|
const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-453b89b9.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* String format strategy abstract class
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
4
|
-
const responsiveFormatFacade = require('./responsive-format-facade-
|
|
4
|
+
const responsiveFormatFacade = require('./responsive-format-facade-ad8ca2ab.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Fomatter flex styles.
|
package/dist/cjs/{sub-state-notify-slimmer-b1f1e61a.js → sub-state-notify-slimmer-1a52271c.js}
RENAMED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
4
4
|
const dynamicSlimmer = require('./dynamic-slimmer-f31fdfd7.js');
|
|
5
5
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
6
|
-
const
|
|
6
|
+
const domNodeSubjectFactory = require('./dom-node-subject-factory-3ec114b8.js');
|
|
7
7
|
const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
|
|
8
|
-
const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Sub state notify slimmer
|
|
@@ -29,7 +28,7 @@ class SubStateNotifySlimmerBase extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
29
28
|
* Register the observer in connectedCallback
|
|
30
29
|
*/
|
|
31
30
|
connectedCallback() {
|
|
32
|
-
this.subStateObserver = new
|
|
31
|
+
this.subStateObserver = new domNodeSubjectFactory.Observer(this.isAcceptableObserverPayload.bind(this), (payload) => {
|
|
33
32
|
payload.callback(this.propValue);
|
|
34
33
|
});
|
|
35
34
|
changeManager.ChangeManager.register(domNodeSubjectFactory.domNodeSubjectFactory.getSubject(this.host, vegaInternalEventId.VegaInternalSubStatePull), this.subStateObserver);
|
package/dist/cjs/{sub-state-observer-slimmer-02634647.js → sub-state-observer-slimmer-91b89d4d.js}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
4
|
-
const
|
|
4
|
+
const domNodeSubjectFactory = require('./dom-node-subject-factory-3ec114b8.js');
|
|
5
5
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
6
6
|
const ui = require('./ui-5fd9b267.js');
|
|
7
|
-
const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
8
7
|
const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
|
|
9
8
|
|
|
10
9
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -41,7 +40,7 @@ class SubStateObserverSlimmer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
41
40
|
if (!this.parent)
|
|
42
41
|
return;
|
|
43
42
|
const { subStates } = this.observerEntry;
|
|
44
|
-
this.subStateObserver = new
|
|
43
|
+
this.subStateObserver = new domNodeSubjectFactory.Observer(this.isAcceptableObserverPayload, (payload) => {
|
|
45
44
|
const subState = subStates.find((subState) => subState.parentStateName === payload.stateName);
|
|
46
45
|
if (subState) {
|
|
47
46
|
this.updateState(subState, payload.value);
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const date = require('./date-0a6bb035.js');
|
|
4
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A rule that checks if time is empty or not
|
|
8
|
+
*
|
|
9
|
+
* @augments {InternalFormFieldValidationRule<string[]>}
|
|
10
|
+
*/
|
|
11
|
+
class TimeRangeRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
12
|
+
/**
|
|
13
|
+
* It creates a new instance of the class with the given config.
|
|
14
|
+
*
|
|
15
|
+
* @param {{ timeFormat: TimeFormat }} config - config including the timeFormat for time value
|
|
16
|
+
* @param {TimeFormat} config.timeFormat - The timeFormat for time value
|
|
17
|
+
*/
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super();
|
|
20
|
+
this.config = config;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* It checks if the input is a valid time string.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} input - The value of the input field.
|
|
26
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
27
|
+
*/
|
|
28
|
+
evaluate(input) {
|
|
29
|
+
if (!this.isAcceptedInputType(input)) {
|
|
30
|
+
throw new Error(`Invalid time value ${input} for range mode`);
|
|
31
|
+
}
|
|
32
|
+
const isValid = Array.isArray(input) &&
|
|
33
|
+
input.length === 2 &&
|
|
34
|
+
input.every((item) => date.isTimeStr(item, this.config.timeFormat));
|
|
35
|
+
return {
|
|
36
|
+
isValid,
|
|
37
|
+
message: isValid ? '' : 'This field is required',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* If the input is accepted and the status is not disabled and visible, then return true
|
|
42
|
+
*
|
|
43
|
+
* @param {unknown} input - The input to be evaluated.
|
|
44
|
+
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
45
|
+
* @returns {boolean} A boolean value.
|
|
46
|
+
*/
|
|
47
|
+
canEvaluate(input, status) {
|
|
48
|
+
return status
|
|
49
|
+
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
50
|
+
: this.isAcceptedInputType(input);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
54
|
+
*
|
|
55
|
+
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
56
|
+
* @returns {boolean} A boolean value.
|
|
57
|
+
*/
|
|
58
|
+
shouldShowError(status) {
|
|
59
|
+
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* If the input is undefined or null, return true, otherwise return true if the input is a string.
|
|
63
|
+
*
|
|
64
|
+
* @param {unknown} input - The input value to be validated.
|
|
65
|
+
* @returns {boolean}A boolean.
|
|
66
|
+
*/
|
|
67
|
+
isAcceptedInputType(input) {
|
|
68
|
+
if (input === undefined || input === null)
|
|
69
|
+
return true;
|
|
70
|
+
return Array.isArray(input);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A rule that checks if time is empty or not
|
|
76
|
+
*
|
|
77
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
78
|
+
*/
|
|
79
|
+
class TimeRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
80
|
+
/**
|
|
81
|
+
* It creates a new instance of the class with the given config.
|
|
82
|
+
*
|
|
83
|
+
* @param {{ timeFormat: TimeFormat }} config - config including the timeFormat for time value
|
|
84
|
+
* @param {TimeFormat} config.timeFormat - The timeFormat for time value
|
|
85
|
+
*/
|
|
86
|
+
constructor(config) {
|
|
87
|
+
super();
|
|
88
|
+
this.config = config;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* It checks if the input is a valid time string.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} input - The value of the input field.
|
|
94
|
+
* @returns {EvaluateResult} An object with two properties: isValid and message.
|
|
95
|
+
*/
|
|
96
|
+
evaluate(input) {
|
|
97
|
+
if (!this.isAcceptedInputType(input)) {
|
|
98
|
+
throw new Error(`Invalid time value ${input}`);
|
|
99
|
+
}
|
|
100
|
+
const isValid = date.isTimeStr(input, this.config.timeFormat);
|
|
101
|
+
return {
|
|
102
|
+
isValid,
|
|
103
|
+
message: isValid ? '' : 'This field is required',
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* If the input is accepted and the status is not disabled and visible, then return true
|
|
108
|
+
*
|
|
109
|
+
* @param {unknown} input - The input to be evaluated.
|
|
110
|
+
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
111
|
+
* @returns {boolean} A boolean value.
|
|
112
|
+
*/
|
|
113
|
+
canEvaluate(input, status) {
|
|
114
|
+
return status
|
|
115
|
+
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
116
|
+
: this.isAcceptedInputType(input);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
120
|
+
*
|
|
121
|
+
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
122
|
+
* @returns {boolean} A boolean value.
|
|
123
|
+
*/
|
|
124
|
+
shouldShowError(status) {
|
|
125
|
+
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* If the input is undefined or null, return true, otherwise return true if the input is a string.
|
|
129
|
+
*
|
|
130
|
+
* @param {unknown} input - The input value to be validated.
|
|
131
|
+
* @returns {boolean}A boolean.
|
|
132
|
+
*/
|
|
133
|
+
isAcceptedInputType(input) {
|
|
134
|
+
if (input === undefined || input === null)
|
|
135
|
+
return true;
|
|
136
|
+
return typeof input === 'string';
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
exports.TimeRangeRequiredRule = TimeRangeRequiredRule;
|
|
141
|
+
exports.TimeRequiredRule = TimeRequiredRule;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A rule that checks if the toggle switch is required to switch on
|
|
7
|
+
*
|
|
8
|
+
* @augments {InternalFormFieldValidationRule<boolean>}
|
|
9
|
+
*/
|
|
10
|
+
class ToggleSwitchRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
11
|
+
/**
|
|
12
|
+
* If the input is a boolean, return a boolean. If the
|
|
13
|
+
* input is anything else, return false
|
|
14
|
+
*
|
|
15
|
+
* @param {unknown} input - The input to be evaluated.
|
|
16
|
+
* @returns {EvaluateResult} - An object with two properties: isValid and message.
|
|
17
|
+
*/
|
|
18
|
+
evaluate(input) {
|
|
19
|
+
if (typeof input === 'boolean') {
|
|
20
|
+
return {
|
|
21
|
+
isValid: input,
|
|
22
|
+
message: input ? '' : 'This field is required',
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return {
|
|
27
|
+
isValid: false,
|
|
28
|
+
message: 'This field is required',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* If the input is accepted and the status is not disabled and visible, then return true
|
|
34
|
+
*
|
|
35
|
+
* @param {unknown} input - The input to be evaluated.
|
|
36
|
+
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
37
|
+
* @returns {boolean} The return value is a boolean that indicates whether the input can be evaluated.
|
|
38
|
+
*/
|
|
39
|
+
canEvaluate(input, status) {
|
|
40
|
+
return status
|
|
41
|
+
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
42
|
+
: this.isAcceptedInputType(input);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
46
|
+
*
|
|
47
|
+
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
48
|
+
* @returns {boolean} A boolean value.
|
|
49
|
+
*/
|
|
50
|
+
shouldShowError(status) {
|
|
51
|
+
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* If the input is undefined or null, return true, otherwise return true if the input is a boolean.
|
|
55
|
+
*
|
|
56
|
+
* @param {unknown} input - The input value to be validated.
|
|
57
|
+
* @returns {boolean} A boolean.
|
|
58
|
+
*/
|
|
59
|
+
isAcceptedInputType(input) {
|
|
60
|
+
if (input === undefined || input === null)
|
|
61
|
+
return true;
|
|
62
|
+
return typeof input === 'boolean';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.ToggleSwitchRequiredRule = ToggleSwitchRequiredRule;
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const regex = require('./regex-c1f70fd4.js');
|
|
4
4
|
const number = require('./number-4816603d.js');
|
|
5
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* A rule that checks if it's a valid credit card number
|
|
8
9
|
*
|
|
9
|
-
* @
|
|
10
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
10
11
|
*/
|
|
11
|
-
class ValidCreditCardNumberRule {
|
|
12
|
+
class ValidCreditCardNumberRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
12
13
|
/**
|
|
13
14
|
* It takes a string, maps it to an array of numbers, reverses the array, checks the length of the
|
|
14
15
|
* array, maps the even digits to a new array, sums the new array, and returns true if the sum is
|