@globalpayments/vega 2.38.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-7087f121.js → app-globals-cdd0972c.js} +14 -4
- package/dist/cjs/check-box-required-rule-1ee54b9a.js +70 -0
- package/dist/cjs/content-state-c5b47ca1.js +6644 -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/{image-annotation-action-7d82f7e1.js → image-annotation-action-75b9c0d3.js} +5 -6
- package/dist/cjs/index.cjs.js +35 -15
- 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 +10 -10
- 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 +9 -91
- 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 +38 -70
- 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 +15 -1
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -2
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +18 -19
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +79 -139
- 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 +10 -10
- 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-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +18 -2
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +7 -4
- 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-popover/slimmers/controllers/vega-popover-appender-controller.js +4 -0
- package/dist/collection/components/vega-popover/vega-popover.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +52 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +63 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.js +13 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +134 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +54 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +152 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +99 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +38 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +57 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.js +60 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +28 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +48 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +43 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +26 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.js +44 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.js +22 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +92 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +22 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +27 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +36 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +63 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.js +46 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/image-update-url-action.js +13 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +3 -215
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +31 -244
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +17 -155
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +33 -184
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +40 -352
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +13 -23
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +14 -6
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +23 -182
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +41 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +24 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.js +11 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.js +16 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +2 -2
- 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 +11 -4
- 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/helpers/validator/test/rules/valid-phone-number-rule.test.js +8 -0
- package/dist/collection/index.js +1 -0
- package/dist/esm/{app-globals-4cca4a96.js → app-globals-88fa3549.js} +14 -4
- package/dist/esm/check-box-required-rule-cb0aa339.js +68 -0
- package/dist/esm/content-state-2edba4ec.js +6600 -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-3535e76a.js → form-field-controller-slimmer-bb64dec7.js} +29 -2
- package/dist/esm/{image-annotation-action-3da42221.js → image-annotation-action-b6668f48.js} +1 -2
- package/dist/esm/{index-6e05b241.js → index-d172bafa.js} +1 -1
- package/dist/esm/index.js +17 -7
- 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 +11 -11
- 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/{string-input-formatter-slimmer-d4132497.js → string-input-formatter-slimmer-418b54f0.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-51151fc3.js → sub-state-notify-slimmer-b36fd081.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-d77a1c46.js → sub-state-observer-slimmer-09452523.js} +1 -1
- 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-button-group_2.entry.js +3 -3
- package/dist/esm/vega-calendar_3.entry.js +4 -4
- package/dist/esm/vega-checkbox_2.entry.js +12 -80
- package/dist/esm/vega-color-picker.entry.js +4 -3
- package/dist/esm/vega-combo-box.entry.js +4 -3
- package/dist/esm/vega-date-picker_2.entry.js +12 -94
- package/dist/esm/vega-dialog_2.entry.js +29 -1
- package/dist/esm/vega-dropdown_5.entry.js +4 -4
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +6 -20
- package/dist/esm/vega-form.entry.js +3 -2
- package/dist/esm/vega-image-uploader.entry.js +4 -3
- package/dist/esm/vega-input-credit-card.entry.js +5 -4
- package/dist/esm/vega-input-numeric.entry.js +5 -4
- package/dist/esm/vega-input-phone-number.entry.js +38 -70
- package/dist/esm/vega-input-range.entry.js +6 -61
- package/dist/esm/vega-input-select.entry.js +4 -3
- package/dist/esm/vega-input.entry.js +11 -10
- package/dist/esm/{vega-internal-event-id-d0690d0d.js → vega-internal-event-id-f269c42f.js} +1 -1
- package/dist/esm/vega-left-nav_5.entry.js +3 -3
- package/dist/esm/vega-popover_2.entry.js +16 -2
- package/dist/esm/vega-radio_2.entry.js +4 -3
- package/dist/esm/vega-rich-text-content.entry.js +6 -7
- package/dist/esm/vega-rich-text-editor_4.entry.js +23 -83
- package/dist/esm/vega-selection-chip_2.entry.js +6 -5
- package/dist/esm/vega-selection-tile_2.entry.js +6 -5
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +4 -3
- package/dist/esm/vega-stepper.entry.js +4 -3
- package/dist/esm/vega-table_8.entry.js +3 -3
- package/dist/esm/vega-textarea.entry.js +5 -4
- package/dist/esm/vega-time-picker_2.entry.js +8 -137
- package/dist/esm/vega-toggle-switch.entry.js +4 -63
- package/dist/esm/vega-tooltip_2.entry.js +53 -12
- package/dist/esm/vega.js +11 -11
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +7 -0
- 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-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
- package/dist/types/components/vega-popover/vega-popover.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.d.ts +37 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +66 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.d.ts +47 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +61 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.d.ts +23 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.d.ts +20 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.d.ts +24 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.d.ts +38 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.d.ts +20 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/image-update-url-action.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +1 -79
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +3 -77
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +0 -38
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +3 -58
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +5 -93
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +0 -43
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.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.d.ts +14 -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 +7 -4
- 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/vega/index.esm.js +1 -1
- package/dist/vega/p-04c72f30.entry.js +1 -0
- package/dist/vega/{p-ba077ca8.entry.js → p-073beb31.entry.js} +1 -1
- 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-0cc1ad76.js +1 -0
- package/dist/vega/p-113cd659.entry.js +1 -0
- package/dist/vega/{p-b9a0f136.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-29d6ec6c.js → p-239bae84.js} +1 -1
- package/dist/vega/{p-7198d675.entry.js → p-24ac5151.entry.js} +1 -1
- package/dist/vega/p-280cbcdb.js +1 -0
- package/dist/vega/p-3299c30b.entry.js +1 -0
- 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-5a7eabcc.js +1 -0
- 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-6408d3dc.entry.js +1 -0
- package/dist/vega/{p-a2a34239.entry.js → p-6585bddc.entry.js} +2 -2
- package/dist/vega/p-6603081a.entry.js +1 -0
- package/dist/vega/p-6e5db02b.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-ee2e4bff.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-34bd9204.js → p-a9e1123a.js} +1 -1
- package/dist/vega/p-abd7aeaa.js +1 -0
- package/dist/vega/{p-267cde46.entry.js → p-b071be5c.entry.js} +1 -1
- 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-20326c64.js → p-bd0116f9.js} +1 -1
- 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-348e95ba.js → p-d2ff56d8.js} +1 -1
- 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-e0d3ca2d.js +1 -0
- package/dist/vega/{p-e9a5bd12.entry.js → p-f1ebe86b.entry.js} +1 -1
- 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/cjs/content-state-f97d3278.js +0 -2990
- package/dist/cjs/node-annotation.abstract-4f6df9cf.js +0 -3223
- package/dist/collection/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.js +0 -12
- package/dist/collection/components/vega-rich-text-editor/dto/helper/block-base-operator.js +0 -47
- package/dist/collection/helpers/validator/test/rules/object-array-required-rule.test.js +0 -7
- package/dist/esm/content-state-ccf5f960.js +0 -2954
- package/dist/esm/node-annotation.abstract-b2e36bc4.js +0 -3214
- package/dist/types/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.d.ts +0 -9
- package/dist/types/components/vega-rich-text-editor/dto/helper/block-base-operator.d.ts +0 -24
- package/dist/vega/p-0461e318.js +0 -1
- package/dist/vega/p-12fe63c1.entry.js +0 -1
- package/dist/vega/p-1b67c443.entry.js +0 -1
- package/dist/vega/p-1d93b3a9.js +0 -1
- package/dist/vega/p-23fd9401.entry.js +0 -1
- package/dist/vega/p-2fecbcf9.entry.js +0 -1
- package/dist/vega/p-3152031c.js +0 -1
- package/dist/vega/p-3cb90bdf.entry.js +0 -1
- package/dist/vega/p-3e8f9fcf.entry.js +0 -1
- package/dist/vega/p-497f2f86.entry.js +0 -1
- package/dist/vega/p-50eabdca.entry.js +0 -1
- package/dist/vega/p-52a8a4f8.js +0 -1
- package/dist/vega/p-6419e13e.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-7baa4fae.entry.js +0 -1
- package/dist/vega/p-7edcb8d0.entry.js +0 -1
- package/dist/vega/p-904b489a.entry.js +0 -1
- package/dist/vega/p-9689ad99.entry.js +0 -1
- package/dist/vega/p-9728d571.entry.js +0 -1
- package/dist/vega/p-a7e078ac.entry.js +0 -1
- package/dist/vega/p-a7f40a65.entry.js +0 -1
- package/dist/vega/p-a8a809e1.entry.js +0 -1
- package/dist/vega/p-a8b16ff2.js +0 -1
- package/dist/vega/p-aed80794.entry.js +0 -1
- package/dist/vega/p-b517ed15.js +0 -1
- package/dist/vega/p-b809f3d7.entry.js +0 -1
- package/dist/vega/p-ba2833c0.entry.js +0 -1
- package/dist/vega/p-bf4996d5.entry.js +0 -1
- package/dist/vega/p-cb4fd6e1.entry.js +0 -1
- package/dist/vega/p-e9785742.entry.js +0 -1
- package/dist/vega/p-ecaf4cfa.entry.js +0 -1
- package/dist/vega/p-f41102cd.js +0 -1
- package/dist/vega/p-f5b0ce61.js +0 -1
- package/dist/vega/p-f86ec91b.js +0 -1
- /package/dist/types/{helpers/validator/test/rules/object-array-required-rule.test.d.ts → components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.d.ts} +0 -0
|
@@ -13,8 +13,10 @@ const remoteInvocationRegistry = require('./remote-invocation-registry-32aaf6c2.
|
|
|
13
13
|
const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
|
|
14
14
|
const staticSubjectTitle = require('./static-subject-title-c589a1bd.js');
|
|
15
15
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
16
|
-
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-
|
|
16
|
+
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
|
|
17
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
17
18
|
const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
|
|
19
|
+
const inputPhoneNumberRequiredRule = require('./input-phone-number-required-rule-2668fdf1.js');
|
|
18
20
|
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-af2addec.js');
|
|
19
21
|
require('./observer-f49483e8.js');
|
|
20
22
|
require('./ui-5fd9b267.js');
|
|
@@ -8741,7 +8743,13 @@ class VegaInputPhoneNumberValueController extends globalSlimmerRegistry.VegaSlim
|
|
|
8741
8743
|
var _a;
|
|
8742
8744
|
const formatter = new AsYouType(this.countryCode);
|
|
8743
8745
|
formatter.input(value);
|
|
8744
|
-
|
|
8746
|
+
//VD-5616
|
|
8747
|
+
//libphonenumber-js has an issue of defaulting to US when formatter.input(value) is called when number starts with +1, but there are other country codes starting with +1
|
|
8748
|
+
//Keep currently selected in such a situation
|
|
8749
|
+
let newCountry = (_a = formatter.country) !== null && _a !== void 0 ? _a : this.countryCode;
|
|
8750
|
+
if (newCountry === 'US' && this.getCountriesWithSameCode('US').includes(this.countryCode)) {
|
|
8751
|
+
newCountry = this.countryCode;
|
|
8752
|
+
}
|
|
8745
8753
|
this.countrySelectController.setCountryCode(newCountry);
|
|
8746
8754
|
return formatIncompletePhoneNumber(this.removeCallingCodePrefix(value, newCountry), newCountry);
|
|
8747
8755
|
};
|
|
@@ -8871,6 +8879,16 @@ class VegaInputPhoneNumberValueController extends globalSlimmerRegistry.VegaSlim
|
|
|
8871
8879
|
shouldSetEmptyValue(inputValue) {
|
|
8872
8880
|
return !inputValue && this.emptyValueEnabled;
|
|
8873
8881
|
}
|
|
8882
|
+
/**
|
|
8883
|
+
* Get list of country codes that have similar code prefix
|
|
8884
|
+
*
|
|
8885
|
+
* @param {VegaCountryCode} targetCountryCode - Target country code
|
|
8886
|
+
* @returns {string[]} - array of countries with similar codes
|
|
8887
|
+
*/
|
|
8888
|
+
getCountriesWithSameCode(targetCountryCode) {
|
|
8889
|
+
const targetCode = getCountryCallingCode(targetCountryCode);
|
|
8890
|
+
return getCountries().filter((country) => getCountryCallingCode(country) === targetCode);
|
|
8891
|
+
}
|
|
8874
8892
|
}
|
|
8875
8893
|
__decorate$1([
|
|
8876
8894
|
globalSlimmerRegistry.MapToComponentField()
|
|
@@ -8906,11 +8924,13 @@ __decorate$1([
|
|
|
8906
8924
|
/**
|
|
8907
8925
|
* A rule that checks if it's a valid phone number
|
|
8908
8926
|
*
|
|
8909
|
-
* @
|
|
8927
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
8910
8928
|
*/
|
|
8911
|
-
class ValidPhoneNumberRule {
|
|
8912
|
-
constructor(countryCodeGetter) {
|
|
8929
|
+
class ValidPhoneNumberRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
8930
|
+
constructor(countryCodeGetter, emptyValueEnabled = false) {
|
|
8931
|
+
super();
|
|
8913
8932
|
this.countryCodeGetter = countryCodeGetter;
|
|
8933
|
+
this.emptyValueEnabled = emptyValueEnabled;
|
|
8914
8934
|
/**
|
|
8915
8935
|
* Generate an invalid result
|
|
8916
8936
|
*
|
|
@@ -8970,9 +8990,13 @@ class ValidPhoneNumberRule {
|
|
|
8970
8990
|
* specific country calling code.
|
|
8971
8991
|
* @returns {boolean} a boolean value based on whether the input is a string and not equal to the country calling
|
|
8972
8992
|
* code with a plus sign appended to it.
|
|
8993
|
+
* The input is empty mean the component property `emptyValueEnabled` is true, we should not validate the input.
|
|
8973
8994
|
*/
|
|
8974
8995
|
isAcceptedInputType(input) {
|
|
8975
|
-
|
|
8996
|
+
const shouldSkipEmptyValueCheck = this.emptyValueEnabled && input === '';
|
|
8997
|
+
return (typeof input === 'string' &&
|
|
8998
|
+
input !== `+${getCountryCallingCode(this.countryCodeGetter())}` &&
|
|
8999
|
+
!shouldSkipEmptyValueCheck);
|
|
8976
9000
|
}
|
|
8977
9001
|
/**
|
|
8978
9002
|
* The function `isValidPhoneNumberForCountry` validates a phone number for a specific country code.
|
|
@@ -9014,65 +9038,6 @@ class ValidPhoneNumberRule {
|
|
|
9014
9038
|
}
|
|
9015
9039
|
}
|
|
9016
9040
|
|
|
9017
|
-
/**
|
|
9018
|
-
* A rule that checks if input phone number is empty or not
|
|
9019
|
-
*
|
|
9020
|
-
* @implements {FormFieldValidationRule<string>}
|
|
9021
|
-
*/
|
|
9022
|
-
class InputPhoneNumberRequiredRule {
|
|
9023
|
-
constructor(phoneNumberValueGetter) {
|
|
9024
|
-
this.phoneNumberValueGetter = phoneNumberValueGetter;
|
|
9025
|
-
}
|
|
9026
|
-
/**
|
|
9027
|
-
* It checks if the input is a valid value.
|
|
9028
|
-
*
|
|
9029
|
-
* @param {unknown} input - The value of the input field.
|
|
9030
|
-
* @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
|
|
9031
|
-
*/
|
|
9032
|
-
evaluate(input) {
|
|
9033
|
-
if (!this.isAcceptedInputType(input)) {
|
|
9034
|
-
throw new Error(`Invalid value ${input} for input phone number`);
|
|
9035
|
-
}
|
|
9036
|
-
const isValid = this.phoneNumberValueGetter() !== '';
|
|
9037
|
-
return {
|
|
9038
|
-
isValid,
|
|
9039
|
-
message: isValid ? '' : 'This field is required',
|
|
9040
|
-
};
|
|
9041
|
-
}
|
|
9042
|
-
/**
|
|
9043
|
-
* If the input is accepted and the status is not disabled and visible, then return true
|
|
9044
|
-
*
|
|
9045
|
-
* @param {unknown} input - The input to be evaluated.
|
|
9046
|
-
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
9047
|
-
* @returns {boolean} A boolean value.
|
|
9048
|
-
*/
|
|
9049
|
-
canEvaluate(input, status) {
|
|
9050
|
-
return status
|
|
9051
|
-
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
9052
|
-
: this.isAcceptedInputType(input);
|
|
9053
|
-
}
|
|
9054
|
-
/**
|
|
9055
|
-
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
9056
|
-
*
|
|
9057
|
-
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
9058
|
-
* @returns {boolean} A boolean value.
|
|
9059
|
-
*/
|
|
9060
|
-
shouldShowError(status) {
|
|
9061
|
-
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
9062
|
-
}
|
|
9063
|
-
/**
|
|
9064
|
-
* If the input is undefined or null, return true, otherwise return true if the input is a string.
|
|
9065
|
-
*
|
|
9066
|
-
* @param {unknown} input - The input value to be validated.
|
|
9067
|
-
* @returns {boolean}A boolean.
|
|
9068
|
-
*/
|
|
9069
|
-
isAcceptedInputType(input) {
|
|
9070
|
-
if (input === undefined || input === null)
|
|
9071
|
-
return true;
|
|
9072
|
-
return typeof input === 'string';
|
|
9073
|
-
}
|
|
9074
|
-
}
|
|
9075
|
-
|
|
9076
9041
|
const vegaInputPhoneNumberCss = ":host{display:inline-block;width:100%}:host .vega-input-phone-number-hint{display:inline-block;padding-top:12px;padding-left:8px;padding-right:8px}:host .vega-input-phone-number-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-phone-number-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-phone-number-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0}:host vega-field-label{margin-bottom:8px}:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}.vega-input-phone-number-dropdown-item{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}.vega-input-phone-number-dropdown-icon{text-align:center;font-size:0px}";
|
|
9077
9042
|
|
|
9078
9043
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -9107,16 +9072,19 @@ const VegaInputPhoneNumber = class {
|
|
|
9107
9072
|
{
|
|
9108
9073
|
propertyName: 'required',
|
|
9109
9074
|
ruleFactory: (isRequired) => isRequired
|
|
9110
|
-
? new InputPhoneNumberRequiredRule(() => this.phoneNumberInputRenderer.getInputRef().value)
|
|
9075
|
+
? new inputPhoneNumberRequiredRule.InputPhoneNumberRequiredRule(() => this.phoneNumberInputRenderer.getInputRef().value)
|
|
9111
9076
|
: null,
|
|
9112
9077
|
},
|
|
9113
9078
|
{
|
|
9114
|
-
propertyName: '',
|
|
9115
|
-
ruleFactory: () => new ValidPhoneNumberRule(() => this.countryCode),
|
|
9079
|
+
propertyName: 'countryCode',
|
|
9080
|
+
ruleFactory: (_countryCode, emptyValueEnabled) => new ValidPhoneNumberRule(() => this.countryCode, emptyValueEnabled),
|
|
9081
|
+
dependence: 'emptyValueEnabled',
|
|
9116
9082
|
},
|
|
9083
|
+
// TODO: These code should be optimized in VD-5889
|
|
9084
|
+
// The below rule is a hook to make sure the above validation rule could be sync up when the property `emptyValueEnabled` modified.
|
|
9117
9085
|
{
|
|
9118
|
-
propertyName: '
|
|
9119
|
-
ruleFactory: () =>
|
|
9086
|
+
propertyName: 'emptyValueEnabled',
|
|
9087
|
+
ruleFactory: () => null,
|
|
9120
9088
|
},
|
|
9121
9089
|
],
|
|
9122
9090
|
validationRulesName: 'validationRules',
|
|
@@ -8,13 +8,15 @@ const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
|
8
8
|
const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
|
|
9
9
|
const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
|
|
10
10
|
const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
11
|
-
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-
|
|
11
|
+
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
|
|
12
12
|
const array = require('./array-5adef7b2.js');
|
|
13
13
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
14
14
|
const staticSubjectTitle = require('./static-subject-title-c589a1bd.js');
|
|
15
15
|
const ui = require('./ui-5fd9b267.js');
|
|
16
16
|
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-80b3ac6c.js');
|
|
17
17
|
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-af2addec.js');
|
|
18
|
+
const inputRangeRequiredRule = require('./input-range-required-rule-5b9c2a95.js');
|
|
19
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
18
20
|
const accessibility = require('./accessibility-bfa227f6.js');
|
|
19
21
|
const translationSlimmer = require('./translation-slimmer-510906bc.js');
|
|
20
22
|
require('./dynamic-slimmer-f31fdfd7.js');
|
|
@@ -320,68 +322,10 @@ __decorate$2([
|
|
|
320
322
|
globalSlimmerRegistry.MapToComponentField()
|
|
321
323
|
], VegaInputRangeInputRenderer.prototype, "translationSlimmer", void 0);
|
|
322
324
|
|
|
323
|
-
/**
|
|
324
|
-
* A rule that checks if input range is empty or not
|
|
325
|
-
*
|
|
326
|
-
* @implements {FormFieldValidationRule<string[]>}
|
|
327
|
-
*/
|
|
328
|
-
class InputRangeRequiredRule {
|
|
329
|
-
/**
|
|
330
|
-
* It checks if the input is a valid value.
|
|
331
|
-
*
|
|
332
|
-
* @param {string[]} input - The value of the input field.
|
|
333
|
-
* @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
|
|
334
|
-
*/
|
|
335
|
-
evaluate(input) {
|
|
336
|
-
if (!this.isAcceptedInputType(input)) {
|
|
337
|
-
throw new Error(`Invalid value ${input} for input range`);
|
|
338
|
-
}
|
|
339
|
-
const isValid = Array.isArray(input) &&
|
|
340
|
-
input.length === 2 &&
|
|
341
|
-
input.every((item) => !!item || item == '0');
|
|
342
|
-
return {
|
|
343
|
-
isValid,
|
|
344
|
-
message: isValid ? '' : 'This field is required',
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* If the input is accepted and the status is not disabled and visible, then return true
|
|
349
|
-
*
|
|
350
|
-
* @param {unknown} input - The input to be evaluated.
|
|
351
|
-
* @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
|
|
352
|
-
* @returns {boolean} A boolean value.
|
|
353
|
-
*/
|
|
354
|
-
canEvaluate(input, status) {
|
|
355
|
-
return status
|
|
356
|
-
? this.isAcceptedInputType(input) && !status.disabled && status.visible
|
|
357
|
-
: this.isAcceptedInputType(input);
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* If the field is not disabled, visible, and has been touched or modified, then show the error
|
|
361
|
-
*
|
|
362
|
-
* @param {FormFieldStatusMeta} status - FormFieldStatusMeta
|
|
363
|
-
* @returns {boolean} A boolean value.
|
|
364
|
-
*/
|
|
365
|
-
shouldShowError(status) {
|
|
366
|
-
return !status.disabled && status.visible && (status.touched || status.modified);
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* If the input is undefined or null, return true, otherwise return true if the input is a string.
|
|
370
|
-
*
|
|
371
|
-
* @param {unknown} input - The input value to be validated.
|
|
372
|
-
* @returns {boolean}A boolean.
|
|
373
|
-
*/
|
|
374
|
-
isAcceptedInputType(input) {
|
|
375
|
-
if (input === undefined || input === null)
|
|
376
|
-
return true;
|
|
377
|
-
return Array.isArray(input);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
325
|
/**
|
|
382
326
|
* A rule that checks if number is in min and max range
|
|
383
327
|
*/
|
|
384
|
-
class InputRangeMinAndMaxRule {
|
|
328
|
+
class InputRangeMinAndMaxRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
385
329
|
/**
|
|
386
330
|
* It creates a new instance of the class with the given config.
|
|
387
331
|
*
|
|
@@ -390,6 +334,7 @@ class InputRangeMinAndMaxRule {
|
|
|
390
334
|
* @param {string} config.maxValue - The max number
|
|
391
335
|
*/
|
|
392
336
|
constructor(config) {
|
|
337
|
+
super();
|
|
393
338
|
/**
|
|
394
339
|
* Generate an invalid result
|
|
395
340
|
*
|
|
@@ -551,7 +496,7 @@ const VegaInputRange = class {
|
|
|
551
496
|
propertyRules: [
|
|
552
497
|
{
|
|
553
498
|
propertyName: 'required',
|
|
554
|
-
ruleFactory: (isRequired) => (isRequired ? new InputRangeRequiredRule() : null),
|
|
499
|
+
ruleFactory: (isRequired) => (isRequired ? new inputRangeRequiredRule.InputRangeRequiredRule() : null),
|
|
555
500
|
},
|
|
556
501
|
{
|
|
557
502
|
propertyName: 'min',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-09acd3c9.js');
|
|
6
|
-
const requiredFieldRule = require('./required-field-rule-
|
|
6
|
+
const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
|
|
7
7
|
const component = require('./component-73a88c4e.js');
|
|
8
8
|
const breakpoints = require('./breakpoints-17d6c4c7.js');
|
|
9
9
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
@@ -20,7 +20,7 @@ const accessibility = require('./accessibility-bfa227f6.js');
|
|
|
20
20
|
const chevronUp = require('./chevron-up-21465cf7.js');
|
|
21
21
|
const chevronDown = require('./chevron-down-9847bf78.js');
|
|
22
22
|
const internalIconManager = require('./internal-icon-manager-5ccb9443.js');
|
|
23
|
-
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-
|
|
23
|
+
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
|
|
24
24
|
const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-bb1eaebe.js');
|
|
25
25
|
const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
|
|
26
26
|
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-af2addec.js');
|
|
@@ -28,6 +28,7 @@ const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
|
28
28
|
const mutationObserverSlimmer = require('./mutation-observer-slimmer-895b3d3e.js');
|
|
29
29
|
const mutationObserverFilters = require('./mutation-observer-filters-e5a7f85a.js');
|
|
30
30
|
const translationSlimmer = require('./translation-slimmer-510906bc.js');
|
|
31
|
+
require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
31
32
|
require('./ui-32e69595.js');
|
|
32
33
|
require('./breakpoints-ebde4837.js');
|
|
33
34
|
require('./number-4816603d.js');
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-09acd3c9.js');
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
7
|
+
const minNumberRule = require('./min-number-rule-5bcccc8f.js');
|
|
8
|
+
const minStringLengthRule = require('./min-string-length-rule-af215976.js');
|
|
9
|
+
const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
|
|
9
10
|
const component = require('./component-73a88c4e.js');
|
|
10
11
|
const accessibility = require('./accessibility-bfa227f6.js');
|
|
11
12
|
const componentLoadRequired = require('./component-load-required-16d76afa.js');
|
|
12
13
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
13
14
|
const placeholder = require('./placeholder-cb6d37ad.js');
|
|
14
15
|
const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
|
|
15
|
-
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-
|
|
16
|
+
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
|
|
16
17
|
const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
|
|
17
18
|
const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
18
19
|
const staticSubjectTitle = require('./static-subject-title-c589a1bd.js');
|
|
@@ -52,9 +53,9 @@ const EMAIL_VALIDATION_REGEX =
|
|
|
52
53
|
/**
|
|
53
54
|
* This class is a rule that checks if the input is a valid email address
|
|
54
55
|
*
|
|
55
|
-
* @
|
|
56
|
+
* @augments {InternalFormFieldValidationRule<string>}
|
|
56
57
|
*/
|
|
57
|
-
class EmailFieldRule {
|
|
58
|
+
class EmailFieldRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
|
|
58
59
|
/**
|
|
59
60
|
* It checks if the input is a valid email address.
|
|
60
61
|
*
|
|
@@ -9,7 +9,7 @@ const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
|
9
9
|
const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
|
|
10
10
|
const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
|
|
11
11
|
const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
12
|
-
const elementAppenderSlimmer = require('./element-appender-slimmer-
|
|
12
|
+
const elementAppenderSlimmer = require('./element-appender-slimmer-4f0dc8c6.js');
|
|
13
13
|
const remoteInvocationRegistry = require('./remote-invocation-registry-32aaf6c2.js');
|
|
14
14
|
const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
|
|
15
15
|
require('./keyboard-manager-2df53b2f.js');
|
|
@@ -116,6 +116,7 @@ class VegaPopoverAppenderController extends elementAppenderSlimmer.ElementAppend
|
|
|
116
116
|
size: this.size,
|
|
117
117
|
placement: this.placement,
|
|
118
118
|
alignment: this.alignment,
|
|
119
|
+
isScreenPosition: this.isScreenPosition,
|
|
119
120
|
};
|
|
120
121
|
}
|
|
121
122
|
/**
|
|
@@ -146,6 +147,9 @@ __decorate$2([
|
|
|
146
147
|
__decorate$2([
|
|
147
148
|
globalSlimmerRegistry.MapToComponentField()
|
|
148
149
|
], VegaPopoverAppenderController.prototype, "size", void 0);
|
|
150
|
+
__decorate$2([
|
|
151
|
+
globalSlimmerRegistry.MapToComponentField()
|
|
152
|
+
], VegaPopoverAppenderController.prototype, "isScreenPosition", void 0);
|
|
149
153
|
__decorate$2([
|
|
150
154
|
globalSlimmerRegistry.MapToComponentField({ writable: true })
|
|
151
155
|
], VegaPopoverAppenderController.prototype, "isPopoverShow", void 0);
|
|
@@ -216,6 +220,16 @@ const VegaPopover = class {
|
|
|
216
220
|
* @vegaVersion 2.8.0
|
|
217
221
|
*/
|
|
218
222
|
this.showArrow = true;
|
|
223
|
+
/**
|
|
224
|
+
* Determines whether the popover's position is calculated relative to the screen.
|
|
225
|
+
*
|
|
226
|
+
* @VegaWarning When enabled (set to true), it overrides the positionRelativeTo property, making it ineffective.
|
|
227
|
+
*
|
|
228
|
+
* @VegaWarning Currently, when set to true, the position calculation may be inaccurate if the popover is placed inside a scrollable container within a shadowRoot (e.g., inside a vega-modal with scrollable content).
|
|
229
|
+
*
|
|
230
|
+
* @vegaVersion 2.39.0
|
|
231
|
+
*/
|
|
232
|
+
this.isScreenPosition = false;
|
|
219
233
|
/* istanbul ignore next */
|
|
220
234
|
this.showPopover = () => {
|
|
221
235
|
this.appenderController.show();
|
|
@@ -14,9 +14,9 @@ const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-
|
|
|
14
14
|
const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
|
|
15
15
|
const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
16
16
|
const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
|
|
17
|
-
const requiredFieldRule = require('./required-field-rule-
|
|
17
|
+
const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
|
|
18
18
|
const componentLoadRequired = require('./component-load-required-16d76afa.js');
|
|
19
|
-
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-
|
|
19
|
+
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
|
|
20
20
|
const childNodesNotifyObserverSlimmer = require('./child-nodes-notify-observer-slimmer-4e60a929.js');
|
|
21
21
|
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-af2addec.js');
|
|
22
22
|
const keyboardManagerSlimmer = require('./keyboard-manager-slimmer-feba3a83.js');
|
|
@@ -25,6 +25,7 @@ const mutationObserverFilters = require('./mutation-observer-filters-e5a7f85a.js
|
|
|
25
25
|
require('./dynamic-slimmer-f31fdfd7.js');
|
|
26
26
|
require('./dom-node-subject-observer-factory-80b3ac6c.js');
|
|
27
27
|
require('./internal-vega-event-manager-981dfd1c.js');
|
|
28
|
+
require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
28
29
|
require('./string-21427167.js');
|
|
29
30
|
require('./create-public-api-runtime-metrics-slimmer-54c3f73b.js');
|
|
30
31
|
require('./translation-6848c389.js');
|
|
@@ -6,9 +6,8 @@ const index = require('./index-09acd3c9.js');
|
|
|
6
6
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
7
7
|
const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
|
|
8
8
|
const component = require('./component-73a88c4e.js');
|
|
9
|
-
const
|
|
10
|
-
const imageAnnotationAction = require('./image-annotation-action-
|
|
11
|
-
const contentState = require('./content-state-f97d3278.js');
|
|
9
|
+
const contentState = require('./content-state-c5b47ca1.js');
|
|
10
|
+
const imageAnnotationAction = require('./image-annotation-action-75b9c0d3.js');
|
|
12
11
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
13
12
|
const createPublicApiRuntimeMetricsSlimmer = require('./create-public-api-runtime-metrics-slimmer-54c3f73b.js');
|
|
14
13
|
const accessibility = require('./accessibility-bfa227f6.js');
|
|
@@ -17,11 +16,11 @@ const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
|
|
|
17
16
|
const subStateObserverSlimmer = require('./sub-state-observer-slimmer-02634647.js');
|
|
18
17
|
const ui = require('./ui-5fd9b267.js');
|
|
19
18
|
const index$1 = require('./index-0546e2ea.js');
|
|
19
|
+
require('./change-manager-a297e4d2.js');
|
|
20
|
+
require('./vega-internal-event-id-bda63e14.js');
|
|
20
21
|
require('./_commonjsHelpers-537d719a.js');
|
|
21
22
|
require('./static-subject-title-c589a1bd.js');
|
|
22
|
-
require('./change-manager-a297e4d2.js');
|
|
23
23
|
require('./observer-f49483e8.js');
|
|
24
|
-
require('./vega-internal-event-id-bda63e14.js');
|
|
25
24
|
require('./internal-icon-manager-5ccb9443.js');
|
|
26
25
|
require('./icon-manager-edc2400b.js');
|
|
27
26
|
require('./breakpoints-ebde4837.js');
|
|
@@ -33,7 +32,7 @@ require('./dynamic-slimmer-f31fdfd7.js');
|
|
|
33
32
|
class RTEBlockRenderer {
|
|
34
33
|
registerRef(ref, block) {
|
|
35
34
|
if (ref) {
|
|
36
|
-
|
|
35
|
+
contentState.stateEntityRenderingRegistry.register(ref, block);
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
/**
|
|
@@ -44,7 +43,7 @@ class RTEBlockRenderer {
|
|
|
44
43
|
*/
|
|
45
44
|
getStyles(block) {
|
|
46
45
|
return Array.from(block.annotationMap.values())
|
|
47
|
-
.filter((annotation) => annotation instanceof
|
|
46
|
+
.filter((annotation) => annotation instanceof contentState.BlockAnnotation)
|
|
48
47
|
.map((annotation) => annotation.render())
|
|
49
48
|
.filter(typeGuard.isNonNullable)
|
|
50
49
|
.reduce((current, obj) => (Object.assign(Object.assign({}, current), obj)), {});
|
|
@@ -66,7 +65,7 @@ class RTEBlockRenderer {
|
|
|
66
65
|
class RTENodeRenderer {
|
|
67
66
|
registerRef(ref, node) {
|
|
68
67
|
if (ref) {
|
|
69
|
-
|
|
68
|
+
contentState.stateEntityRenderingRegistry.register(ref, node);
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
/**
|
|
@@ -77,7 +76,7 @@ class RTENodeRenderer {
|
|
|
77
76
|
*/
|
|
78
77
|
getStyles(node) {
|
|
79
78
|
return Array.from(node.annotationMap.values())
|
|
80
|
-
.filter((annotation) => annotation instanceof
|
|
79
|
+
.filter((annotation) => annotation instanceof contentState.NodeAnnotation)
|
|
81
80
|
.map((annotation) => annotation.render())
|
|
82
81
|
.filter(Boolean)
|
|
83
82
|
.reduce((current, obj) => (Object.assign(Object.assign({}, current), obj)), {});
|
|
@@ -90,7 +89,7 @@ class RTENodeRenderer {
|
|
|
90
89
|
*/
|
|
91
90
|
getClasses(node) {
|
|
92
91
|
return Array.from(node.annotationMap.values())
|
|
93
|
-
.filter((annotation) => annotation instanceof
|
|
92
|
+
.filter((annotation) => annotation instanceof contentState.NodeAnnotation)
|
|
94
93
|
.map((annotation) => { var _a; return (_a = annotation.renderClass) === null || _a === void 0 ? void 0 : _a.call(annotation); })
|
|
95
94
|
.filter(Boolean)
|
|
96
95
|
.reduce((pre, cur) => [pre, cur].join(' '), '');
|
|
@@ -99,7 +98,7 @@ class RTENodeRenderer {
|
|
|
99
98
|
|
|
100
99
|
class RTETextNodeRenderer extends RTENodeRenderer {
|
|
101
100
|
render(node) {
|
|
102
|
-
const codeAnnotation = node.annotationMap.get(
|
|
101
|
+
const codeAnnotation = node.annotationMap.get(contentState.NodeAnnotationTypeEnum.CODE);
|
|
103
102
|
if (codeAnnotation === null || codeAnnotation === void 0 ? void 0 : codeAnnotation.code) {
|
|
104
103
|
return (index.h("code", { style: super.getStyles(node), class: super.getClasses(node), ref: (ref) => this.registerRef(ref, node) }, node.text || contentState.ZERO_WIDTH_SPACE));
|
|
105
104
|
}
|
|
@@ -122,7 +121,7 @@ const RTETextNodeRenderer$1 = new RTETextNodeRenderer();
|
|
|
122
121
|
*/
|
|
123
122
|
class RTEBlockTextNodesRenderer extends RTEBlockRenderer {
|
|
124
123
|
renderNodes(block, renderContext) {
|
|
125
|
-
const linkGroupAnnotation = block.getAnnotationByType(
|
|
124
|
+
const linkGroupAnnotation = block.getAnnotationByType(contentState.InternalAnnotationTypeEnum.LINK_GROUP);
|
|
126
125
|
return linkGroupAnnotation
|
|
127
126
|
? this.renderLinkNodes(block.nodes, renderContext)
|
|
128
127
|
: block.nodes.map((node) => RTETextNodeRenderer$1.render(node));
|
|
@@ -131,7 +130,7 @@ class RTEBlockTextNodesRenderer extends RTEBlockRenderer {
|
|
|
131
130
|
const blockNodes = this.groupNodesByLink(nodes);
|
|
132
131
|
return blockNodes.flatMap((item) => {
|
|
133
132
|
if (this.isLinkGroup(item)) {
|
|
134
|
-
const linkAnnotation = item[0].getAnnotationByType(
|
|
133
|
+
const linkAnnotation = item[0].getAnnotationByType(contentState.NodeAnnotationTypeEnum.LINK);
|
|
135
134
|
return editable
|
|
136
135
|
? this.renderLinkEditorWrapper(item, linkAnnotation)
|
|
137
136
|
: this.renderLink(item, linkAnnotation);
|
|
@@ -141,12 +140,12 @@ class RTEBlockTextNodesRenderer extends RTEBlockRenderer {
|
|
|
141
140
|
}
|
|
142
141
|
groupNodesByLink(nodes) {
|
|
143
142
|
return nodes.reduce((acc, node) => {
|
|
144
|
-
const nodeLinkAnnotation = node.getAnnotationByType(
|
|
143
|
+
const nodeLinkAnnotation = node.getAnnotationByType(contentState.NodeAnnotationTypeEnum.LINK);
|
|
145
144
|
const lastGroup = acc[acc.length - 1];
|
|
146
145
|
if (typeGuard.isNonNullable(nodeLinkAnnotation)) {
|
|
147
146
|
if (lastGroup &&
|
|
148
147
|
this.isLinkGroup(lastGroup) &&
|
|
149
|
-
lastGroup[0].getAnnotationByType(
|
|
148
|
+
lastGroup[0].getAnnotationByType(contentState.NodeAnnotationTypeEnum.LINK).toEqual(nodeLinkAnnotation)) {
|
|
150
149
|
lastGroup.push(node);
|
|
151
150
|
}
|
|
152
151
|
else {
|
|
@@ -183,7 +182,7 @@ class RTEBlockTextNodesRenderer extends RTEBlockRenderer {
|
|
|
183
182
|
return;
|
|
184
183
|
}
|
|
185
184
|
case 'unlink': {
|
|
186
|
-
linkNodes.forEach((node) => node.deleteAnnotationByType(
|
|
185
|
+
linkNodes.forEach((node) => node.deleteAnnotationByType(contentState.NodeAnnotationTypeEnum.LINK));
|
|
187
186
|
return;
|
|
188
187
|
}
|
|
189
188
|
}
|
|
@@ -259,7 +258,7 @@ class RTEImageNodeRenderer extends RTENodeRenderer {
|
|
|
259
258
|
bubbles: true,
|
|
260
259
|
});
|
|
261
260
|
setTimeout(() => {
|
|
262
|
-
|
|
261
|
+
contentState.stateEntityRenderingRegistry.getDOMByEntity(node).dispatchEvent(event);
|
|
263
262
|
}, 50);
|
|
264
263
|
break;
|
|
265
264
|
}
|
|
@@ -267,7 +266,7 @@ class RTEImageNodeRenderer extends RTENodeRenderer {
|
|
|
267
266
|
};
|
|
268
267
|
}
|
|
269
268
|
render(node, renderContext) {
|
|
270
|
-
const imageAnnotation = node.getAnnotationByType(
|
|
269
|
+
const imageAnnotation = node.getAnnotationByType(contentState.NodeAnnotationTypeEnum.IMAGE);
|
|
271
270
|
const { size, alt } = imageAnnotation || new contentState.ImageAnnotation('md', '');
|
|
272
271
|
return renderContext.editable ? (index.h("vega-rich-text-image-editor", { style: super.getStyles(node), size: size, alt: alt, ref: (ref) => {
|
|
273
272
|
domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, domNodeSubjectFactory.VegaChange, (e) => this.handleChange(e, node));
|
|
@@ -328,7 +327,7 @@ class VegaRichTextContentRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
328
327
|
RTEImageBlockRenderer$1,
|
|
329
328
|
RTEListBlockRenderer$1,
|
|
330
329
|
];
|
|
331
|
-
|
|
330
|
+
contentState.VegaDarkModeStyleController.registerCustomDarkModeColor(imageAnnotationAction.TextColorToolbarButtonSlimmer.formatDarkModeColor());
|
|
332
331
|
}
|
|
333
332
|
componentWillLoad() {
|
|
334
333
|
this.setRTEContent();
|