@heartlandone/vega 2.63.1 → 2.64.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-2d0b157e.js → app-globals-a190cd2d.js} +9 -9
- package/dist/cjs/{brand-switch-state-controller-slimmer-b83a4596.js → brand-switch-state-controller-slimmer-5efa1b24.js} +1 -1
- package/dist/cjs/{code-block-cc740807.js → code-block-417a131b.js} +11 -15
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-0bb81172.js → component-value-history-controller-slimmer.abstract-0c4d1453.js} +3 -3
- package/dist/cjs/{dark-mode-state-controller-slimmer-17022f93.js → dark-mode-state-controller-slimmer-add5d8a8.js} +1 -1
- package/dist/cjs/{dark-mode-style-controller-b1e9ec82.js → dark-mode-style-controller-41c94aac.js} +1 -1
- package/dist/cjs/{design-token-bf913c86.js → design-token-ae0de304.js} +1 -1
- package/dist/cjs/{dto-renderer-manager-424c5031.js → dto-renderer-manager-6d338e46.js} +9 -4
- package/dist/cjs/{element-appender-slimmer-1d035b1f.js → element-appender-slimmer-5a23e722.js} +4 -4
- package/dist/cjs/{form-field-controller-slimmer-cc6e53a4.js → form-field-controller-slimmer-cceb5c79.js} +4 -4
- package/dist/cjs/{image-annotation-action-f831e09b.js → image-annotation-action-9785bc59.js} +4 -4
- package/dist/cjs/{index-00ba6623.js → index-58ea899e.js} +1 -0
- package/dist/cjs/{index-5505e8dd.js → index-9a92abce.js} +1 -1
- package/dist/cjs/index.cjs.js +13 -13
- package/dist/cjs/{language-extension-cfe0eabd.js → language-extension-abbc251a.js} +2 -2
- package/dist/cjs/loader.cjs.js +12 -12
- package/dist/cjs/{public-rules-7e9b633d.js → public-rules-ffc5db13.js} +6 -6
- package/dist/cjs/{range-44f08955.js → range-37161c00.js} +1 -1
- package/dist/cjs/{responsive-format-facade-a7fbefc4.js → responsive-format-facade-b20dad44.js} +4 -4
- package/dist/cjs/{rich-text-editor-required-rule-a0618c85.js → rich-text-editor-required-rule-604ea2b9.js} +1 -1
- package/dist/cjs/{static-subject-title-85732e0f.js → static-subject-title-7e7d791a.js} +0 -2
- package/dist/cjs/{string-input-formatter-slimmer-f6c7a255.js → string-input-formatter-slimmer-8445abc9.js} +2 -2
- package/dist/cjs/{style-formatter-795451f2.js → style-formatter-56751462.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-bb64fcfc.js → sub-state-notify-slimmer-52fa23af.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-84175d61.js → sub-state-observer-slimmer-90c26113.js} +1 -1
- package/dist/cjs/{token-extension-4764d5f3.js → token-extension-46821c19.js} +3 -3
- package/dist/cjs/{translation-cde4dce3.js → translation-ecfc704a.js} +1 -1
- package/dist/cjs/{translation-slimmer-af399096.js → translation-slimmer-40a3536d.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +10 -10
- package/dist/cjs/vega-app-footer.cjs.entry.js +4 -4
- package/dist/cjs/vega-app-header-button.cjs.entry.js +10 -10
- package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/vega-banner.cjs.entry.js +1 -1
- package/dist/cjs/vega-bar-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-box.cjs.entry.js +11 -11
- package/dist/cjs/vega-brand-logo.cjs.entry.js +4 -4
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/vega-button-circle.cjs.entry.js +10 -10
- package/dist/cjs/vega-button-group_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-button-link.cjs.entry.js +1 -1
- package/dist/cjs/vega-button.cjs.entry.js +9 -9
- package/dist/cjs/vega-calendar_4.cjs.entry.js +29 -21
- package/dist/cjs/vega-card.cjs.entry.js +10 -10
- package/dist/cjs/vega-carousel.cjs.entry.js +9 -9
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-chip.cjs.entry.js +10 -10
- package/dist/cjs/vega-code-block.cjs.entry.js +9 -9
- package/dist/cjs/vega-color-picker.cjs.entry.js +6 -6
- package/dist/cjs/vega-combo-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-counter-badge.cjs.entry.js +1 -1
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-dialog_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-divider.cjs.entry.js +10 -10
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +13 -13
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +1 -1
- package/dist/cjs/vega-file-uploader.cjs.entry.js +7 -7
- package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -10
- package/dist/cjs/vega-flex.cjs.entry.js +11 -11
- package/dist/cjs/vega-font.cjs.entry.js +10 -10
- package/dist/cjs/vega-form.cjs.entry.js +90 -16
- package/dist/cjs/vega-grid.cjs.entry.js +10 -10
- package/dist/cjs/vega-hint.cjs.entry.js +1 -1
- package/dist/cjs/vega-icon.cjs.entry.js +10 -10
- package/dist/cjs/vega-image-uploader.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-numeric.cjs.entry.js +7 -7
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-range.cjs.entry.js +7 -7
- package/dist/cjs/vega-input-select.cjs.entry.js +12 -12
- package/dist/cjs/vega-input.cjs.entry.js +8 -8
- package/dist/cjs/{vega-internal-event-id-9647aaf8.js → vega-internal-event-id-dfd8b802.js} +2 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +1 -1
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +13 -13
- package/dist/cjs/vega-line-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination.cjs.entry.js +10 -10
- package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-popover_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +1 -1
- package/dist/cjs/vega-radio_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +18 -22
- package/dist/cjs/vega-section-title.cjs.entry.js +1 -1
- package/dist/cjs/vega-segment-control.cjs.entry.js +1 -1
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +11 -11
- package/dist/cjs/vega-signature-capture.cjs.entry.js +13 -13
- package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/vega-slot-container.cjs.entry.js +1 -1
- package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-table_8.cjs.entry.js +12 -12
- package/dist/cjs/vega-text.cjs.entry.js +1 -1
- package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -10
- package/dist/cjs/vega.cjs.js +12 -12
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-preview-popover-renderer.js +7 -6
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-event-renderer.js +6 -7
- package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +15 -5
- package/dist/collection/components/vega-form/slimmers/renderers/native-form-renderer.js +30 -0
- package/dist/collection/components/vega-form/vega-form.js +111 -3
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-annotation.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +5 -7
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +3 -5
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +7 -2
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +1 -5
- package/dist/collection/components/vega-rich-text-editor/test/dto/annotations.test.js +9 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +51 -40
- package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +0 -1
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
- package/dist/esm/{app-globals-2623304e.js → app-globals-b074e012.js} +9 -9
- package/dist/esm/{brand-switch-state-controller-slimmer-d6e4d217.js → brand-switch-state-controller-slimmer-05c85e6d.js} +1 -1
- package/dist/esm/{code-block-23e7f8d0.js → code-block-a6c78bbb.js} +11 -15
- package/dist/esm/{component-value-history-controller-slimmer.abstract-df25e4a1.js → component-value-history-controller-slimmer.abstract-d37d2df7.js} +3 -3
- package/dist/esm/{dark-mode-state-controller-slimmer-0c7d1c77.js → dark-mode-state-controller-slimmer-f1c2c299.js} +1 -1
- package/dist/esm/{dark-mode-style-controller-972e1f06.js → dark-mode-style-controller-5cf1c482.js} +1 -1
- package/dist/esm/{design-token-0f439510.js → design-token-6f9e70c4.js} +1 -1
- package/dist/esm/{dto-renderer-manager-65b7b1b1.js → dto-renderer-manager-5b036e47.js} +9 -4
- package/dist/esm/{element-appender-slimmer-bf5ca501.js → element-appender-slimmer-1d6c2960.js} +4 -4
- package/dist/esm/{form-field-controller-slimmer-f7e8845b.js → form-field-controller-slimmer-c29b345f.js} +4 -4
- package/dist/esm/{image-annotation-action-af21ea8f.js → image-annotation-action-f6308cf4.js} +4 -4
- package/dist/esm/{index-057d0f70.js → index-090d31ca.js} +1 -0
- package/dist/esm/{index-7fe93427.js → index-4f26bbd0.js} +1 -1
- package/dist/esm/index.js +13 -13
- package/dist/esm/{language-extension-d355f9aa.js → language-extension-962c427a.js} +2 -2
- package/dist/esm/loader.js +12 -12
- package/dist/esm/{public-rules-1a5da7bf.js → public-rules-6fa7533f.js} +6 -6
- package/dist/esm/{range-fac2962c.js → range-4d7aa0fd.js} +1 -1
- package/dist/esm/{responsive-format-facade-2904b456.js → responsive-format-facade-b594fc72.js} +4 -4
- package/dist/esm/{rich-text-editor-required-rule-bb94d680.js → rich-text-editor-required-rule-a72374cd.js} +1 -1
- package/dist/esm/{static-subject-title-633b3474.js → static-subject-title-ca83d6b6.js} +1 -2
- package/dist/esm/{string-input-formatter-slimmer-69117deb.js → string-input-formatter-slimmer-75256a17.js} +2 -2
- package/dist/esm/{style-formatter-a724e38d.js → style-formatter-56074ede.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-4252a90e.js → sub-state-notify-slimmer-85c658b7.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-baa8853a.js → sub-state-observer-slimmer-e58a2485.js} +1 -1
- package/dist/esm/{token-extension-89eeef74.js → token-extension-3c198013.js} +3 -3
- package/dist/esm/{translation-833d9ef4.js → translation-3d35961b.js} +1 -1
- package/dist/esm/{translation-slimmer-c83b52c1.js → translation-slimmer-d5b0d292.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +10 -10
- package/dist/esm/vega-app-footer.entry.js +4 -4
- package/dist/esm/vega-app-header-button.entry.js +10 -10
- package/dist/esm/vega-backdrop.entry.js +1 -1
- package/dist/esm/vega-banner.entry.js +1 -1
- package/dist/esm/vega-bar-chart.entry.js +1 -1
- package/dist/esm/vega-box.entry.js +11 -11
- package/dist/esm/vega-brand-logo.entry.js +4 -4
- package/dist/esm/vega-breadcrumb.entry.js +1 -1
- package/dist/esm/vega-button-circle.entry.js +10 -10
- package/dist/esm/vega-button-group_2.entry.js +4 -4
- package/dist/esm/vega-button-link.entry.js +1 -1
- package/dist/esm/vega-button.entry.js +9 -9
- package/dist/esm/vega-calendar_4.entry.js +30 -22
- package/dist/esm/vega-card.entry.js +10 -10
- package/dist/esm/vega-carousel.entry.js +9 -9
- package/dist/esm/vega-checkbox_2.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +10 -10
- package/dist/esm/vega-code-block.entry.js +9 -9
- package/dist/esm/vega-color-picker.entry.js +6 -6
- package/dist/esm/vega-combo-box.entry.js +6 -6
- package/dist/esm/vega-counter-badge.entry.js +1 -1
- package/dist/esm/vega-date-picker_2.entry.js +15 -15
- package/dist/esm/vega-dialog_2.entry.js +10 -10
- package/dist/esm/vega-divider.entry.js +10 -10
- package/dist/esm/vega-dropdown_5.entry.js +13 -13
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +2 -2
- package/dist/esm/vega-field-label.entry.js +1 -1
- package/dist/esm/vega-file-uploader.entry.js +7 -7
- package/dist/esm/vega-flag-icon.entry.js +10 -10
- package/dist/esm/vega-flex.entry.js +11 -11
- package/dist/esm/vega-font.entry.js +10 -10
- package/dist/esm/vega-form.entry.js +90 -16
- package/dist/esm/vega-grid.entry.js +10 -10
- package/dist/esm/vega-hint.entry.js +1 -1
- package/dist/esm/vega-icon.entry.js +10 -10
- package/dist/esm/vega-image-uploader.entry.js +13 -13
- package/dist/esm/vega-input-credit-card.entry.js +6 -6
- package/dist/esm/vega-input-numeric.entry.js +7 -7
- package/dist/esm/vega-input-phone-number.entry.js +10 -10
- package/dist/esm/vega-input-range.entry.js +7 -7
- package/dist/esm/vega-input-select.entry.js +12 -12
- package/dist/esm/vega-input.entry.js +8 -8
- package/dist/esm/{vega-internal-event-id-5a143cd2.js → vega-internal-event-id-bee7946b.js} +2 -1
- package/dist/esm/vega-item-toggle.entry.js +1 -1
- package/dist/esm/vega-left-nav_5.entry.js +13 -13
- package/dist/esm/vega-line-chart.entry.js +1 -1
- package/dist/esm/vega-loader-wrapper_2.entry.js +9 -9
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination.entry.js +10 -10
- package/dist/esm/vega-pie-chart.entry.js +1 -1
- package/dist/esm/vega-popover_2.entry.js +11 -11
- package/dist/esm/vega-progress-tracker.entry.js +1 -1
- package/dist/esm/vega-radio_2.entry.js +6 -6
- package/dist/esm/vega-rich-text-content.entry.js +9 -9
- package/dist/esm/vega-rich-text-editor_4.entry.js +18 -22
- package/dist/esm/vega-section-title.entry.js +1 -1
- package/dist/esm/vega-segment-control.entry.js +1 -1
- package/dist/esm/vega-selection-chip_2.entry.js +12 -12
- package/dist/esm/vega-selection-tile_2.entry.js +7 -7
- package/dist/esm/vega-sidenav_3.entry.js +11 -11
- package/dist/esm/vega-signature-capture.entry.js +13 -13
- package/dist/esm/vega-skeleton.entry.js +1 -1
- package/dist/esm/vega-slot-container.entry.js +1 -1
- package/dist/esm/vega-stepper.entry.js +6 -6
- package/dist/esm/vega-tab-group_2.entry.js +2 -2
- package/dist/esm/vega-table_8.entry.js +12 -12
- package/dist/esm/vega-text.entry.js +1 -1
- package/dist/esm/vega-textarea.entry.js +6 -6
- package/dist/esm/vega-time-picker_2.entry.js +13 -13
- package/dist/esm/vega-toggle-switch.entry.js +6 -6
- package/dist/esm/vega-tooltip_2.entry.js +10 -10
- package/dist/esm/vega.js +12 -12
- package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +3 -0
- package/dist/types/components/vega-form/slimmers/renderers/native-form-renderer.d.ts +12 -0
- package/dist/types/components/vega-form/vega-form.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +2 -1
- package/dist/types/components.d.ts +30 -0
- package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +1 -2
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-81765b4b.entry.js → p-04158119.entry.js} +1 -1
- package/dist/vega/{p-66199d68.js → p-06b624e6.js} +1 -1
- package/dist/vega/p-06e6be0e.js +1 -0
- package/dist/vega/{p-476cc642.entry.js → p-0b38a01f.entry.js} +1 -1
- package/dist/vega/p-0b92b15b.entry.js +1 -0
- package/dist/vega/{p-5e4fb663.entry.js → p-0bb3be0b.entry.js} +1 -1
- package/dist/vega/{p-c61f8ca6.entry.js → p-0f2c83a1.entry.js} +1 -1
- package/dist/vega/{p-427b2b55.entry.js → p-1110b422.entry.js} +1 -1
- package/dist/vega/{p-5397648b.entry.js → p-119430db.entry.js} +1 -1
- package/dist/vega/{p-6585cfd5.entry.js → p-15766433.entry.js} +1 -1
- package/dist/vega/{p-320cccc5.entry.js → p-159fda34.entry.js} +1 -1
- package/dist/vega/{p-0ec14fbc.entry.js → p-1655b920.entry.js} +1 -1
- package/dist/vega/{p-25c831a4.entry.js → p-179693f1.entry.js} +1 -1
- package/dist/vega/p-1aba48bc.js +1 -0
- package/dist/vega/{p-4f21faf1.js → p-1be68fba.js} +1 -1
- package/dist/vega/{p-e0729c4d.entry.js → p-1cb87bad.entry.js} +1 -1
- package/dist/vega/{p-6180c1af.entry.js → p-1d3a7be6.entry.js} +1 -1
- package/dist/vega/{p-5313d0bc.js → p-2044aa2c.js} +1 -1
- package/dist/vega/{p-2591f217.entry.js → p-21a480b0.entry.js} +1 -1
- package/dist/vega/{p-614e450a.entry.js → p-3176804b.entry.js} +1 -1
- package/dist/vega/{p-648134d2.entry.js → p-32058dbd.entry.js} +1 -1
- package/dist/vega/{p-5970369e.entry.js → p-32655cfc.entry.js} +1 -1
- package/dist/vega/{p-c2377afa.js → p-3354f5a7.js} +1 -1
- package/dist/vega/p-3355ec0f.js +1 -0
- package/dist/vega/{p-02b29c18.js → p-3674db0f.js} +1 -1
- package/dist/vega/p-36f331bf.entry.js +1 -0
- package/dist/vega/p-3709b0e0.js +1 -0
- package/dist/vega/{p-e513f041.js → p-37fd7a80.js} +1 -1
- package/dist/vega/{p-0717073b.entry.js → p-3a0b9e66.entry.js} +1 -1
- package/dist/vega/{p-dcae53cf.entry.js → p-3a455ac3.entry.js} +1 -1
- package/dist/vega/{p-7cd2fac8.entry.js → p-3a9aa6eb.entry.js} +1 -1
- package/dist/vega/{p-89d2cf34.js → p-3af81271.js} +1 -1
- package/dist/vega/{p-b110b7bd.entry.js → p-3eaa6cce.entry.js} +1 -1
- package/dist/vega/{p-40924882.entry.js → p-4082fa22.entry.js} +1 -1
- package/dist/vega/{p-9b2d8516.entry.js → p-459efe39.entry.js} +1 -1
- package/dist/vega/p-465a6660.entry.js +1 -0
- package/dist/vega/{p-2a1b3108.entry.js → p-4669ce11.entry.js} +1 -1
- package/dist/vega/{p-3ab20f9e.entry.js → p-4ae3eebf.entry.js} +1 -1
- package/dist/vega/{p-8a484812.entry.js → p-4b57bb12.entry.js} +1 -1
- package/dist/vega/{p-cc5a3a1b.entry.js → p-4dd6554e.entry.js} +1 -1
- package/dist/vega/p-4e503e23.entry.js +1 -0
- package/dist/vega/{p-2f88ba36.entry.js → p-4faa7bab.entry.js} +1 -1
- package/dist/vega/{p-9c309b85.entry.js → p-52b0abb5.entry.js} +1 -1
- package/dist/vega/{p-6244b0ad.entry.js → p-5443d614.entry.js} +1 -1
- package/dist/vega/{p-f92fc49b.entry.js → p-55c26035.entry.js} +1 -1
- package/dist/vega/{p-76c7538a.entry.js → p-56b8ffd5.entry.js} +1 -1
- package/dist/vega/p-5773a9a3.js +1 -0
- package/dist/vega/{p-de1ee131.entry.js → p-57c42c30.entry.js} +1 -1
- package/dist/vega/{p-57257de0.entry.js → p-5910be31.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-6163818f.js +1 -0
- package/dist/vega/{p-09cb98f3.entry.js → p-61966868.entry.js} +1 -1
- package/dist/vega/p-641fbb48.entry.js +1 -0
- package/dist/vega/{p-7bad6577.entry.js → p-64e949fa.entry.js} +1 -1
- package/dist/vega/{p-2d58cf34.entry.js → p-684391a4.entry.js} +1 -1
- package/dist/vega/{p-ab29f968.js → p-697acd40.js} +1 -1
- package/dist/vega/p-6be16084.js +1 -0
- package/dist/vega/{p-b6c51409.entry.js → p-6c85c1f3.entry.js} +1 -1
- package/dist/vega/{p-56ff8559.entry.js → p-6ed663d5.entry.js} +1 -1
- package/dist/vega/{p-3be7bfee.entry.js → p-7aae9252.entry.js} +1 -1
- package/dist/vega/{p-b32f7aac.entry.js → p-7c75ce6c.entry.js} +1 -1
- package/dist/vega/{p-d87c3058.entry.js → p-84eabbec.entry.js} +1 -1
- package/dist/vega/{p-02a4732a.js → p-8938b5c4.js} +1 -1
- package/dist/vega/{p-846ae5fb.js → p-904d1b43.js} +1 -1
- package/dist/vega/{p-20223e8e.entry.js → p-92ec4fac.entry.js} +1 -1
- package/dist/vega/{p-b4d88fce.entry.js → p-956a5899.entry.js} +1 -1
- package/dist/vega/{p-0e954b9b.js → p-96bda7ca.js} +1 -1
- package/dist/vega/{p-bc0ae89a.entry.js → p-9819dda9.entry.js} +1 -1
- package/dist/vega/{p-942fc9b9.js → p-a1cf29a9.js} +1 -1
- package/dist/vega/{p-bdd9ef3b.js → p-a30ebdf5.js} +1 -1
- package/dist/vega/{p-c7726252.js → p-a3d77013.js} +1 -1
- package/dist/vega/{p-cfb2af9c.entry.js → p-a9e3058e.entry.js} +1 -1
- package/dist/vega/{p-8175d8de.entry.js → p-ad2055f4.entry.js} +1 -1
- package/dist/vega/{p-460429da.entry.js → p-ae963cb3.entry.js} +1 -1
- package/dist/vega/{p-92469fa1.entry.js → p-b3cd1992.entry.js} +1 -1
- package/dist/vega/{p-da6369d4.entry.js → p-b9e8c6bf.entry.js} +1 -1
- package/dist/vega/{p-351405f2.entry.js → p-bb58a7cf.entry.js} +1 -1
- package/dist/vega/{p-bb61f015.js → p-be539a54.js} +1 -1
- package/dist/vega/{p-589b7ea3.entry.js → p-bf8d2978.entry.js} +1 -1
- package/dist/vega/{p-dadc6ab3.js → p-c7f68d74.js} +1 -1
- package/dist/vega/p-c8789df1.entry.js +1 -0
- package/dist/vega/p-d20ab09f.entry.js +1 -0
- package/dist/vega/{p-bf0ced3c.js → p-d3bf55e9.js} +1 -1
- package/dist/vega/{p-26ef2066.entry.js → p-db29b9f9.entry.js} +1 -1
- package/dist/vega/{p-e74c275a.entry.js → p-df31307b.entry.js} +1 -1
- package/dist/vega/{p-4c3075ef.js → p-e27802fb.js} +1 -1
- package/dist/vega/{p-134ed822.entry.js → p-e41931d4.entry.js} +1 -1
- package/dist/vega/{p-3fba9e77.entry.js → p-e4acac0a.entry.js} +1 -1
- package/dist/vega/{p-d15e70d7.entry.js → p-e4b0606a.entry.js} +1 -1
- package/dist/vega/{p-36ae2dd3.entry.js → p-e5af5a4d.entry.js} +1 -1
- package/dist/vega/{p-10454aa5.entry.js → p-e6158a33.entry.js} +1 -1
- package/dist/vega/{p-d72abacd.entry.js → p-e9b86dac.entry.js} +1 -1
- package/dist/vega/{p-969066d3.entry.js → p-eb5f99db.entry.js} +1 -1
- package/dist/vega/{p-d85b0bfa.entry.js → p-ed0f000b.entry.js} +1 -1
- package/dist/vega/p-f37558c1.js +1 -0
- package/dist/vega/{p-81fbf18f.entry.js → p-f4877bee.entry.js} +1 -1
- package/dist/vega/{p-64c281ec.entry.js → p-f81f2071.entry.js} +1 -1
- package/dist/vega/{p-4f5a2b0c.entry.js → p-fd2d02ea.entry.js} +1 -1
- package/dist/vega/{p-0bc93777.entry.js → p-ffc2ef90.entry.js} +1 -1
- package/dist/vega/{p-b73532c0.entry.js → p-fff13ed1.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-079f5d94.entry.js +0 -1
- package/dist/vega/p-0b36f4ce.js +0 -1
- package/dist/vega/p-0e3cd270.entry.js +0 -1
- package/dist/vega/p-258f9603.js +0 -1
- package/dist/vega/p-2b90fae6.js +0 -1
- package/dist/vega/p-51d40b0d.entry.js +0 -1
- package/dist/vega/p-521ace2d.js +0 -1
- package/dist/vega/p-657446a3.entry.js +0 -1
- package/dist/vega/p-6908117a.js +0 -1
- package/dist/vega/p-893d5dfa.js +0 -1
- package/dist/vega/p-8a6b820a.entry.js +0 -1
- package/dist/vega/p-8a877e12.js +0 -1
- package/dist/vega/p-9ffd2a96.entry.js +0 -1
- package/dist/vega/p-b1054e18.entry.js +0 -1
- package/dist/vega/p-e5cd6521.js +0 -1
- /package/dist/vega/{p-48a58baf.js → p-6b2342e0.js} +0 -0
|
@@ -24,6 +24,8 @@ import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/
|
|
|
24
24
|
import { createSubStateNotifySlimmer } from '../../helpers/slimmers/sub-state/sub-state-notify-slimmer';
|
|
25
25
|
import { VegaFormNestStateController } from './slimmers/controllers/vega-form-nest-state-controller';
|
|
26
26
|
import { VegaFormFieldValidationStateController } from './slimmers/controllers/vega-form-field-validation-state-controller';
|
|
27
|
+
import { NativeFormRenderer } from './slimmers/renderers/native-form-renderer';
|
|
28
|
+
import { tryGetDocument } from '../../utils/try-get-document';
|
|
27
29
|
/**
|
|
28
30
|
* @vegaVersion 1.3.0
|
|
29
31
|
*/
|
|
@@ -49,6 +51,7 @@ export class VegaForm {
|
|
|
49
51
|
this.childNodeValueChangeObserver = new ChildNodesNotifyObserverSlimmer(FORM_ELEMENT_VALUE_CHANGE, () => this.updateInternalTouchedStatus());
|
|
50
52
|
this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
|
|
51
53
|
this.vegaFormFieldValidationStateController = new VegaFormFieldValidationStateController();
|
|
54
|
+
this.nativeFormRenderer = new NativeFormRenderer();
|
|
52
55
|
this.invalidFieldPathMap = new ImmutableMap(new Map(), (newMap) => {
|
|
53
56
|
this.invalidFieldPathMap = newMap;
|
|
54
57
|
this.updateIsValidFlag();
|
|
@@ -108,6 +111,19 @@ export class VegaForm {
|
|
|
108
111
|
*/
|
|
109
112
|
/* eslint-disable-next-line @stencil/strict-mutable */
|
|
110
113
|
this.disableBlurValidation = false;
|
|
114
|
+
/**
|
|
115
|
+
* Determines whether the `vega-form` content is wrapped in a native HTML <form> element.
|
|
116
|
+
*
|
|
117
|
+
* @vegaVersion 2.64.0
|
|
118
|
+
*/
|
|
119
|
+
this.useNativeForm = false;
|
|
120
|
+
/**
|
|
121
|
+
* Specifies the HTTP method used for form submission.
|
|
122
|
+
* This property takes effect only when {@link useNativeForm} is set to `true`.
|
|
123
|
+
*
|
|
124
|
+
* @vegaVersion 2.64.0
|
|
125
|
+
*/
|
|
126
|
+
this.method = 'get';
|
|
111
127
|
/**
|
|
112
128
|
* If the element is valid, remove it from the set of
|
|
113
129
|
* invalid elements. If the element is invalid,
|
|
@@ -287,8 +303,7 @@ export class VegaForm {
|
|
|
287
303
|
: element['value'];
|
|
288
304
|
}
|
|
289
305
|
render() {
|
|
290
|
-
return sanitizeVegaComponent(h(Host, null,
|
|
291
|
-
h("slot", null)), this.host);
|
|
306
|
+
return sanitizeVegaComponent(h(Host, null, this.useNativeForm ? this.nativeFormRenderer.render() : h("slot", null)), this.host);
|
|
292
307
|
}
|
|
293
308
|
/**
|
|
294
309
|
* If the value of any child elements have changed,
|
|
@@ -408,8 +423,36 @@ export class VegaForm {
|
|
|
408
423
|
const valid = await this.valid();
|
|
409
424
|
if (valid.isValid) {
|
|
410
425
|
const formValue = await this.getValue();
|
|
411
|
-
this.submitEventEmitter.emit(formValue);
|
|
426
|
+
const submitEvent = this.submitEventEmitter.emit(formValue);
|
|
427
|
+
if (!submitEvent.defaultPrevented) {
|
|
428
|
+
await this.submitWithFormData();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Submits the form using native HTML form submission with all current field values.
|
|
434
|
+
*
|
|
435
|
+
* This method collects all form field values, creates hidden input elements for each field,
|
|
436
|
+
* appends them to a container inside the native form, and then triggers the native
|
|
437
|
+
* `requestSubmit()` method to submit the form.
|
|
438
|
+
*
|
|
439
|
+
* The method ensures that the form data is available in the native form for submission,
|
|
440
|
+
* which is useful when `useNativeForm` is enabled.
|
|
441
|
+
*
|
|
442
|
+
* @returns {Promise<void>} Resolves when the form submission process is complete.
|
|
443
|
+
*/
|
|
444
|
+
async submitWithFormData() {
|
|
445
|
+
if (!this.useNativeForm)
|
|
446
|
+
return;
|
|
447
|
+
const data = await this.getValue();
|
|
448
|
+
for (const dataKey in data) {
|
|
449
|
+
const hiddenInput = tryGetDocument().createElement('input');
|
|
450
|
+
hiddenInput.type = 'hidden';
|
|
451
|
+
hiddenInput.name = dataKey;
|
|
452
|
+
hiddenInput.value = data[dataKey];
|
|
453
|
+
this.nativeFormRenderer.getNativeFormRef().append(hiddenInput);
|
|
412
454
|
}
|
|
455
|
+
this.nativeFormRenderer.getNativeFormRef().requestSubmit();
|
|
413
456
|
}
|
|
414
457
|
registerFormResetChangeManager() {
|
|
415
458
|
this.formEventsObserver = new Observer(this.canAcceptFormResetEvent.bind(this), this.handleResetEvents.bind(this));
|
|
@@ -527,6 +570,68 @@ export class VegaForm {
|
|
|
527
570
|
"attribute": "disable-blur-validation",
|
|
528
571
|
"reflect": false,
|
|
529
572
|
"defaultValue": "false"
|
|
573
|
+
},
|
|
574
|
+
"useNativeForm": {
|
|
575
|
+
"type": "boolean",
|
|
576
|
+
"mutable": false,
|
|
577
|
+
"complexType": {
|
|
578
|
+
"original": "boolean",
|
|
579
|
+
"resolved": "boolean",
|
|
580
|
+
"references": {}
|
|
581
|
+
},
|
|
582
|
+
"required": false,
|
|
583
|
+
"optional": false,
|
|
584
|
+
"docs": {
|
|
585
|
+
"tags": [{
|
|
586
|
+
"name": "vegaVersion",
|
|
587
|
+
"text": "2.64.0"
|
|
588
|
+
}],
|
|
589
|
+
"text": "Determines whether the `vega-form` content is wrapped in a native HTML <form> element."
|
|
590
|
+
},
|
|
591
|
+
"attribute": "use-native-form",
|
|
592
|
+
"reflect": false,
|
|
593
|
+
"defaultValue": "false"
|
|
594
|
+
},
|
|
595
|
+
"action": {
|
|
596
|
+
"type": "string",
|
|
597
|
+
"mutable": false,
|
|
598
|
+
"complexType": {
|
|
599
|
+
"original": "string",
|
|
600
|
+
"resolved": "string",
|
|
601
|
+
"references": {}
|
|
602
|
+
},
|
|
603
|
+
"required": false,
|
|
604
|
+
"optional": false,
|
|
605
|
+
"docs": {
|
|
606
|
+
"tags": [{
|
|
607
|
+
"name": "vegaVersion",
|
|
608
|
+
"text": "2.64.0"
|
|
609
|
+
}],
|
|
610
|
+
"text": "Specifies the HTTP URL for form submission.\n This property takes effect only when {@link useNativeForm} is set to `true`."
|
|
611
|
+
},
|
|
612
|
+
"attribute": "action",
|
|
613
|
+
"reflect": false
|
|
614
|
+
},
|
|
615
|
+
"method": {
|
|
616
|
+
"type": "string",
|
|
617
|
+
"mutable": false,
|
|
618
|
+
"complexType": {
|
|
619
|
+
"original": "'post' | 'get'",
|
|
620
|
+
"resolved": "\"get\" | \"post\"",
|
|
621
|
+
"references": {}
|
|
622
|
+
},
|
|
623
|
+
"required": false,
|
|
624
|
+
"optional": false,
|
|
625
|
+
"docs": {
|
|
626
|
+
"tags": [{
|
|
627
|
+
"name": "vegaVersion",
|
|
628
|
+
"text": "2.64.0"
|
|
629
|
+
}],
|
|
630
|
+
"text": "Specifies the HTTP method used for form submission.\n This property takes effect only when {@link useNativeForm} is set to `true`."
|
|
631
|
+
},
|
|
632
|
+
"attribute": "method",
|
|
633
|
+
"reflect": false,
|
|
634
|
+
"defaultValue": "'get'"
|
|
530
635
|
}
|
|
531
636
|
}; }
|
|
532
637
|
static get events() { return [{
|
|
@@ -915,3 +1020,6 @@ __decorate([
|
|
|
915
1020
|
__decorate([
|
|
916
1021
|
InjectVegaSlimmer()
|
|
917
1022
|
], VegaForm.prototype, "vegaFormFieldValidationStateController", void 0);
|
|
1023
|
+
__decorate([
|
|
1024
|
+
InjectVegaSlimmer()
|
|
1025
|
+
], VegaForm.prototype, "nativeFormRenderer", void 0);
|
|
@@ -33,7 +33,7 @@ export class LinkAnnotation extends NodeAnnotation {
|
|
|
33
33
|
* @inheritDoc
|
|
34
34
|
*/
|
|
35
35
|
clone() {
|
|
36
|
-
return new LinkAnnotation(this.link);
|
|
36
|
+
return new LinkAnnotation(this.link, this.useInternalStyle);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Verify whether two link annotation is same or not
|
package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js
CHANGED
|
@@ -43,7 +43,7 @@ export class LinkGroupAnnotation extends Annotation {
|
|
|
43
43
|
toJsx(linkAnnotation, options) {
|
|
44
44
|
const linkStyle = this.getStyle(linkAnnotation, options);
|
|
45
45
|
const linkClass = this.getClass(linkAnnotation, options);
|
|
46
|
-
const attributes = this.getAttribute(linkAnnotation
|
|
46
|
+
const attributes = this.getAttribute(linkAnnotation);
|
|
47
47
|
if (linkClass.length > 0) {
|
|
48
48
|
attributes.class = linkClass.join(' ');
|
|
49
49
|
}
|
|
@@ -87,15 +87,13 @@ export class LinkGroupAnnotation extends Annotation {
|
|
|
87
87
|
* Get the custom attribute for the annotation
|
|
88
88
|
*
|
|
89
89
|
* @param {LinkAnnotation} linkAnnotation current link annotation which saved custom style, class and attribute.
|
|
90
|
-
* @param {RTERenderContext} options - Render context options.
|
|
91
90
|
* @returns {Record<string, string>} Link attributes
|
|
92
91
|
*/
|
|
93
|
-
getAttribute(linkAnnotation
|
|
94
|
-
var _a;
|
|
92
|
+
getAttribute(linkAnnotation) {
|
|
95
93
|
const { href, customAttribute = {} } = linkAnnotation.link;
|
|
96
|
-
const
|
|
97
|
-
const target = customAttribute.target || (
|
|
98
|
-
return Object.assign(Object.assign(Object.assign({}, customAttribute), (href ? { href } :
|
|
94
|
+
const useInternalStyle = linkAnnotation.useInternalStyle;
|
|
95
|
+
const target = customAttribute.target || (useInternalStyle ? '_blank' : '');
|
|
96
|
+
return Object.assign(Object.assign(Object.assign({}, customAttribute), (href ? { href } : useInternalStyle ? { href } : {})), (target ? { target } : {}));
|
|
99
97
|
}
|
|
100
98
|
/**
|
|
101
99
|
* Convert style to string which can be used to html string.
|
|
@@ -137,13 +137,13 @@ export class RTETextBlock extends RTEBlock {
|
|
|
137
137
|
/**
|
|
138
138
|
* @inheritDoc
|
|
139
139
|
*/
|
|
140
|
-
toHtml(
|
|
140
|
+
toHtml() {
|
|
141
141
|
const BlockTag = this.getBlockTag();
|
|
142
142
|
const attrStr = super.generateAttributeString();
|
|
143
143
|
const linkGroupAnnotation = this.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
|
|
144
144
|
let nodesHtml = this.children.map((node) => node.toHtml()).join('');
|
|
145
145
|
if (linkGroupAnnotation && this.children.length > 0) {
|
|
146
|
-
nodesHtml = this.generateLinkHtml(linkGroupAnnotation, nodesHtml
|
|
146
|
+
nodesHtml = this.generateLinkHtml(linkGroupAnnotation, nodesHtml);
|
|
147
147
|
}
|
|
148
148
|
return super.shouldRenderAsInternalWrapper()
|
|
149
149
|
? nodesHtml
|
|
@@ -228,10 +228,9 @@ export class RTETextBlock extends RTEBlock {
|
|
|
228
228
|
*
|
|
229
229
|
* @param {LinkGroupAnnotation} linkGroupAnnotation - linkGroupAnnotation
|
|
230
230
|
* @param {string} nodesHtml - The nodes html
|
|
231
|
-
* @param {VegaRTETransformOptions} options - options
|
|
232
231
|
* @returns {string} link html
|
|
233
232
|
*/
|
|
234
|
-
generateLinkHtml(linkGroupAnnotation, nodesHtml
|
|
233
|
+
generateLinkHtml(linkGroupAnnotation, nodesHtml) {
|
|
235
234
|
nodesHtml = '';
|
|
236
235
|
let linkGroupNodes = [];
|
|
237
236
|
for (let i = 0; i < this.children.length; i++) {
|
|
@@ -245,7 +244,6 @@ export class RTETextBlock extends RTEBlock {
|
|
|
245
244
|
currentLinkAnnotation.link.groupKey !== nextLinkAnnotation.link.groupKey) {
|
|
246
245
|
const linkAttributes = linkGroupAnnotation.toString(currentLinkAnnotation, {
|
|
247
246
|
standalone: true,
|
|
248
|
-
autoMatchFormat: options === null || options === void 0 ? void 0 : options.autoMatchFormat,
|
|
249
247
|
});
|
|
250
248
|
nodesHtml += [
|
|
251
249
|
`<a${linkAttributes ? ` ${linkAttributes}` : ''}>`,
|
|
@@ -16,6 +16,7 @@ import { InsertChildrenBeforeStrategy } from './action-handle-strategies/modify-
|
|
|
16
16
|
import { InsertChildrenAfterStrategy } from './action-handle-strategies/modify-content-strategies/insert-children-after-strategy';
|
|
17
17
|
import './setup';
|
|
18
18
|
import { StylePreservator } from '../../../helpers/csp/styles-preservator';
|
|
19
|
+
import { LogUtility } from '../../../utils/log';
|
|
19
20
|
/**
|
|
20
21
|
* Class representing the content state of the rich text editor.
|
|
21
22
|
*/
|
|
@@ -128,11 +129,15 @@ export class VegaRTEContent {
|
|
|
128
129
|
/**
|
|
129
130
|
* Converts the content state to HTML.
|
|
130
131
|
*
|
|
131
|
-
* @
|
|
132
|
+
* @deprecated The [`options`]{@link options} parameter is deprecated and will be removed in the future.
|
|
133
|
+
* @param {VegaRTETransformOptions} [options] - Deprecated. Optional rendering context (currently unused).
|
|
132
134
|
* @returns {string} The HTML representation of the content state.
|
|
133
135
|
*/
|
|
134
136
|
toHtml(options) {
|
|
135
|
-
|
|
137
|
+
if (options) {
|
|
138
|
+
LogUtility.warn(`The 'options' parameter in toHtml method is deprecated and will be removed in the future.`);
|
|
139
|
+
}
|
|
140
|
+
return this.children.map((block) => block.toHtml()).join('');
|
|
136
141
|
}
|
|
137
142
|
/**
|
|
138
143
|
* Internal method to add the block item, remove the block item
|
|
@@ -43,11 +43,7 @@ export class VegaRichTextEditorRenderer extends VegaSlimmer {
|
|
|
43
43
|
this.renderSourceViewContent = () => {
|
|
44
44
|
if (!this.allowSourceEdit)
|
|
45
45
|
return;
|
|
46
|
-
const sourceViewValue = this.sourceView
|
|
47
|
-
? CodeFormatter.format(this.value.toHtml({
|
|
48
|
-
autoMatchFormat: this.sourceEditConfig.autoMatchFormat,
|
|
49
|
-
}))
|
|
50
|
-
: '';
|
|
46
|
+
const sourceViewValue = this.sourceView ? CodeFormatter.format(this.value.toHtml()) : '';
|
|
51
47
|
return (h("div", { class: {
|
|
52
48
|
'source-view-container': true,
|
|
53
49
|
'vega-hidden': !this.sourceView,
|
|
@@ -272,6 +272,14 @@ describe('annotations', () => {
|
|
|
272
272
|
});
|
|
273
273
|
expect(new LinkAnnotation({ href: 'www.google.com', groupKey: '123' }).toEqual(new LinkAnnotation({ href: 'www.google.com', groupKey: '123' }))).toEqual(true);
|
|
274
274
|
});
|
|
275
|
+
it('link annotation clone', () => {
|
|
276
|
+
const linkAnnotation = new LinkAnnotation({
|
|
277
|
+
href: 'www.google.com',
|
|
278
|
+
groupKey: '123',
|
|
279
|
+
}, false);
|
|
280
|
+
expect(linkAnnotation.clone()).toEqual(linkAnnotation);
|
|
281
|
+
expect(linkAnnotation.clone()).not.toBe(linkAnnotation);
|
|
282
|
+
});
|
|
275
283
|
it('link group annotation', () => {
|
|
276
284
|
const linkGroupAnnotation = new LinkGroupAnnotation('123');
|
|
277
285
|
const linkAnnotation = new LinkAnnotation({
|
|
@@ -296,7 +304,7 @@ describe('annotations', () => {
|
|
|
296
304
|
expect(linkGroupAnnotation.toString(LinkAnnotation.from({
|
|
297
305
|
href: 'www.google.com',
|
|
298
306
|
groupKey: '123',
|
|
299
|
-
}, false)[1])).toEqual('href="www.google.com"
|
|
307
|
+
}, false)[1])).toEqual('href="www.google.com"');
|
|
300
308
|
});
|
|
301
309
|
it('list annotation', () => {
|
|
302
310
|
expect(new ListAnnotation().renderStyle()).toEqual(null);
|
|
@@ -188,6 +188,6 @@ describe('text block', () => {
|
|
|
188
188
|
],
|
|
189
189
|
};
|
|
190
190
|
expect(RTETextBlock.from(textBlock).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="www.google.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>This is a text.</span></a></p>`);
|
|
191
|
-
expect(RTETextBlock.from(textBlock, { autoMatchFormat: false }).toHtml(
|
|
191
|
+
expect(RTETextBlock.from(textBlock, { autoMatchFormat: false }).toHtml()).toEqual(`<p><a href="www.google.com"><span>This is a text.</span></a></p>`);
|
|
192
192
|
});
|
|
193
193
|
});
|
|
@@ -6,6 +6,7 @@ import { BlockAnnotationTypeEnum } from '../../dto/annotations/block-annotation.
|
|
|
6
6
|
import { NodeAnnotationTypeEnum } from '../../dto/annotations/node-annotation.abstract';
|
|
7
7
|
import '../../../../polyfill/test-polyfill/unit/index';
|
|
8
8
|
import CodeFormatter from '../../../../helpers/code-format/code-formatter';
|
|
9
|
+
import { setVegaLogLevel } from '../../../../utils/log';
|
|
9
10
|
describe('content state', () => {
|
|
10
11
|
it('fromJSON should work as expect', () => {
|
|
11
12
|
expect(() => VegaRTEContent.fromJSON([
|
|
@@ -1111,6 +1112,20 @@ describe('content state', () => {
|
|
|
1111
1112
|
]);
|
|
1112
1113
|
expect(contentState.toHtml()).toEqual(`<ul style="padding-left: 8px;margin-left: 16px;padding: 60px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;padding: 40px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;padding: 50px;"><span>Item 2</span></li></ul>`);
|
|
1113
1114
|
});
|
|
1115
|
+
it('should log warning when call toHtml with deprecated parameter', () => {
|
|
1116
|
+
setVegaLogLevel('warn');
|
|
1117
|
+
console.warn = jest.fn();
|
|
1118
|
+
const content = VegaRTEContent.fromJSON([
|
|
1119
|
+
{
|
|
1120
|
+
id: '1',
|
|
1121
|
+
type: 'paragraph',
|
|
1122
|
+
nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
|
|
1123
|
+
},
|
|
1124
|
+
]);
|
|
1125
|
+
content.toHtml({ autoMatchFormat: false });
|
|
1126
|
+
expect(console.warn).toBeCalledTimes(1);
|
|
1127
|
+
expect(console.warn).toHaveBeenCalledWith('%c[Vega]', 'font-weight: bold', "The 'options' parameter in toHtml method is deprecated and will be removed in the future.");
|
|
1128
|
+
});
|
|
1114
1129
|
});
|
|
1115
1130
|
describe('fromHtml', () => {
|
|
1116
1131
|
it('should convert a simple paragraph element to the expected RTEContentBlock', () => {
|
|
@@ -1934,7 +1949,7 @@ describe('content state', () => {
|
|
|
1934
1949
|
it('should not match bold style', () => {
|
|
1935
1950
|
const sourceCode = '<p style="font-weight: 700;">Hello</p>';
|
|
1936
1951
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
1937
|
-
expect(content.toHtml(
|
|
1952
|
+
expect(content.toHtml()).toEqual(`<p style="font-weight: 700;">Hello</p>`);
|
|
1938
1953
|
expect(content.toJSON()).toEqual([
|
|
1939
1954
|
{
|
|
1940
1955
|
id: expect.anything(),
|
|
@@ -1958,7 +1973,7 @@ describe('content state', () => {
|
|
|
1958
1973
|
it('should not match color style', () => {
|
|
1959
1974
|
const sourceCode = '<p style="color: red">Hello</p>';
|
|
1960
1975
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
1961
|
-
expect(content.toHtml(
|
|
1976
|
+
expect(content.toHtml()).toEqual(`<p style="color: red;">Hello</p>`);
|
|
1962
1977
|
expect(content.toJSON()).toEqual([
|
|
1963
1978
|
{
|
|
1964
1979
|
id: expect.anything(),
|
|
@@ -1982,7 +1997,7 @@ describe('content state', () => {
|
|
|
1982
1997
|
it('should not match link style', () => {
|
|
1983
1998
|
const sourceCode = `<p><a href="https://example.com">Link</a></p>`;
|
|
1984
1999
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
1985
|
-
expect(content.toHtml(
|
|
2000
|
+
expect(content.toHtml()).toEqual(`<p><a href="https://example.com">Link</a></p>`);
|
|
1986
2001
|
expect(content.toJSON()).toEqual([
|
|
1987
2002
|
{
|
|
1988
2003
|
id: expect.anything(),
|
|
@@ -2010,7 +2025,7 @@ describe('content state', () => {
|
|
|
2010
2025
|
it('should not match heading', () => {
|
|
2011
2026
|
const sourceCode = '<h1><span>Hello</span></h1>';
|
|
2012
2027
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2013
|
-
expect(content.toHtml(
|
|
2028
|
+
expect(content.toHtml()).toEqual(`<h1><span>Hello</span></h1>`);
|
|
2014
2029
|
expect(content.toJSON()).toEqual([
|
|
2015
2030
|
{
|
|
2016
2031
|
id: expect.anything(),
|
|
@@ -2022,7 +2037,7 @@ describe('content state', () => {
|
|
|
2022
2037
|
it('should not match image style', () => {
|
|
2023
2038
|
const sourceCode = '<img src="https://example.com/image.jpg">';
|
|
2024
2039
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2025
|
-
expect(content.toHtml(
|
|
2040
|
+
expect(content.toHtml()).toEqual(`<img src="https://example.com/image.jpg">`);
|
|
2026
2041
|
expect(content.toJSON()).toEqual([
|
|
2027
2042
|
{
|
|
2028
2043
|
id: expect.anything(),
|
|
@@ -2045,7 +2060,7 @@ describe('content state', () => {
|
|
|
2045
2060
|
it('should not match list style', () => {
|
|
2046
2061
|
const sourceCode = '<ul><li>Item 1</li><li>Item 2</li></ul>';
|
|
2047
2062
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2048
|
-
expect(content.toHtml(
|
|
2063
|
+
expect(content.toHtml()).toEqual(`<ul><li>Item 1</li><li>Item 2</li></ul>`);
|
|
2049
2064
|
expect(content.toJSON()).toEqual([
|
|
2050
2065
|
{
|
|
2051
2066
|
id: expect.anything(),
|
|
@@ -2084,7 +2099,7 @@ describe('content state', () => {
|
|
|
2084
2099
|
it('should not match div to internal style', () => {
|
|
2085
2100
|
const sourceCode = "<div class='my-class'><span> I want this be a sentence </span><span class='my-another-class'> I want this be another sentence </span></div>";
|
|
2086
2101
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2087
|
-
expect(content.toHtml(
|
|
2102
|
+
expect(content.toHtml()).toEqual(`<div class="my-class"><span> I want this be a sentence </span><span class="my-another-class"> I want this be another sentence </span></div>`);
|
|
2088
2103
|
expect(content.toJSON()).toEqual([
|
|
2089
2104
|
{
|
|
2090
2105
|
id: expect.anything(),
|
|
@@ -2113,17 +2128,17 @@ describe('content state', () => {
|
|
|
2113
2128
|
it('should not match parent style', () => {
|
|
2114
2129
|
const sourceCode = `<p style="font-weight: bold;font-style: italic;text-decoration: line-through;color: pink;text-shadow: 2px 2px 5px gray;font-size: 24px;">mix</p>`;
|
|
2115
2130
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2116
|
-
expect(content.toHtml(
|
|
2131
|
+
expect(content.toHtml()).toEqual(`<p style="font-weight: bold;font-style: italic;text-decoration: line-through;color: pink;text-shadow: 2px 2px 5px gray;font-size: 24px;">mix</p>`);
|
|
2117
2132
|
});
|
|
2118
2133
|
it('should not match parent link style', () => {
|
|
2119
2134
|
const sourceCode = `<a id="readMoreLink" class="link read-more" href="https://example.com" style="color: #2980b9; text-decoration: underline;">Read more</a>`;
|
|
2120
2135
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2121
|
-
expect(content.toHtml(
|
|
2136
|
+
expect(content.toHtml()).toEqual(`<a id="readMoreLink" href="https://example.com" class="link read-more" style="color: #2980b9; text-decoration: underline;">Read more</a>`);
|
|
2122
2137
|
});
|
|
2123
2138
|
it('should not match code style', () => {
|
|
2124
2139
|
const sourceCode = `<p>This is <code>code text</code>.</p>`;
|
|
2125
2140
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2126
|
-
expect(content.toHtml(
|
|
2141
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2127
2142
|
expect(content.toJSON()).toEqual([
|
|
2128
2143
|
{
|
|
2129
2144
|
id: expect.anything(),
|
|
@@ -2149,7 +2164,7 @@ describe('content state', () => {
|
|
|
2149
2164
|
it('should preserve plain text nodes correctly', () => {
|
|
2150
2165
|
const sourceCode = `<p>Plain text <span>with span</span> and <strong>bold</strong> text.</p>`;
|
|
2151
2166
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2152
|
-
const htmlOutput = content.toHtml(
|
|
2167
|
+
const htmlOutput = content.toHtml();
|
|
2153
2168
|
expect(htmlOutput).toEqual(sourceCode);
|
|
2154
2169
|
const jsonData = content.toJSON();
|
|
2155
2170
|
expect(jsonData).toEqual([
|
|
@@ -2190,9 +2205,7 @@ describe('content state', () => {
|
|
|
2190
2205
|
],
|
|
2191
2206
|
},
|
|
2192
2207
|
]);
|
|
2193
|
-
expect(VegaRTEContent.fromJSON(jsonData, { autoMatchFormat: false }).toHtml(
|
|
2194
|
-
autoMatchFormat: false,
|
|
2195
|
-
})).toEqual(htmlOutput);
|
|
2208
|
+
expect(VegaRTEContent.fromJSON(jsonData, { autoMatchFormat: false }).toHtml()).toEqual(htmlOutput);
|
|
2196
2209
|
});
|
|
2197
2210
|
it('should convert the html block to RTEContentBlock', () => {
|
|
2198
2211
|
const sourceCode = `
|
|
@@ -2264,7 +2277,7 @@ describe('content state', () => {
|
|
|
2264
2277
|
],
|
|
2265
2278
|
},
|
|
2266
2279
|
]);
|
|
2267
|
-
expect(content.toHtml(
|
|
2280
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2268
2281
|
});
|
|
2269
2282
|
it('should convert the html block with an internal block wrapper to include the text nodes', () => {
|
|
2270
2283
|
const sourceCode = `<section>111<span> 222 </span>333</section>`;
|
|
@@ -2298,7 +2311,7 @@ describe('content state', () => {
|
|
|
2298
2311
|
],
|
|
2299
2312
|
},
|
|
2300
2313
|
]);
|
|
2301
|
-
expect(content.toHtml(
|
|
2314
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2302
2315
|
});
|
|
2303
2316
|
it('should convert the img element with an internal block wrapper', () => {
|
|
2304
2317
|
const sourceCode = `<section><img src="mocked-url"></section><div><img src="mocked-url-2"></div><img src="mocked-url-3">`;
|
|
@@ -2350,7 +2363,7 @@ describe('content state', () => {
|
|
|
2350
2363
|
],
|
|
2351
2364
|
},
|
|
2352
2365
|
]);
|
|
2353
|
-
expect(content.toHtml(
|
|
2366
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2354
2367
|
});
|
|
2355
2368
|
it('should show the internal block wrapper if the block has annotations', () => {
|
|
2356
2369
|
const data = [
|
|
@@ -2378,9 +2391,9 @@ describe('content state', () => {
|
|
|
2378
2391
|
],
|
|
2379
2392
|
},
|
|
2380
2393
|
];
|
|
2381
|
-
expect(VegaRTEContent.fromJSON(data, { autoMatchFormat: false }).toHtml(
|
|
2394
|
+
expect(VegaRTEContent.fromJSON(data, { autoMatchFormat: false }).toHtml()).toEqual(`<section><a href="https://example.com">link</a></section>`);
|
|
2382
2395
|
data[0].children[0].annotations = { textAlign: 'center' };
|
|
2383
|
-
expect(VegaRTEContent.fromJSON(data, { autoMatchFormat: false }).toHtml(
|
|
2396
|
+
expect(VegaRTEContent.fromJSON(data, { autoMatchFormat: false }).toHtml()).toEqual(`<section><p style="text-align: center;"><a href="https://example.com">link</a></p></section>`);
|
|
2384
2397
|
});
|
|
2385
2398
|
it('should covert nested html block as expect', () => {
|
|
2386
2399
|
const sourceCode = `<section><nav>React<span> Vue </span>Angular</nav></section>`;
|
|
@@ -2421,17 +2434,17 @@ describe('content state', () => {
|
|
|
2421
2434
|
],
|
|
2422
2435
|
},
|
|
2423
2436
|
]);
|
|
2424
|
-
expect(content.toHtml(
|
|
2437
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2425
2438
|
});
|
|
2426
2439
|
it('should not covert the unsupported html', () => {
|
|
2427
2440
|
const sourceCode = `<section><abc>test </abc>123</section>`;
|
|
2428
2441
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2429
|
-
expect(content.toHtml(
|
|
2442
|
+
expect(content.toHtml()).toEqual(`<section>test 123</section>`);
|
|
2430
2443
|
});
|
|
2431
2444
|
it('should convert as expect if it is internal element', () => {
|
|
2432
2445
|
const sourceCode = `<h1>123</h1>`;
|
|
2433
2446
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2434
|
-
expect(content.toHtml(
|
|
2447
|
+
expect(content.toHtml()).toEqual(`<h1>123</h1>`);
|
|
2435
2448
|
expect(content.toJSON()).toEqual([
|
|
2436
2449
|
{
|
|
2437
2450
|
id: expect.anything(),
|
|
@@ -2450,7 +2463,7 @@ describe('content state', () => {
|
|
|
2450
2463
|
it('should convert nested inline html node as expect', () => {
|
|
2451
2464
|
const sourceCode = `<p><b><u><s>111</s></u></b></p>`;
|
|
2452
2465
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2453
|
-
expect(content.toHtml(
|
|
2466
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2454
2467
|
expect(content.toJSON()).toEqual([
|
|
2455
2468
|
{
|
|
2456
2469
|
id: expect.anything(),
|
|
@@ -2480,7 +2493,7 @@ describe('content state', () => {
|
|
|
2480
2493
|
it('should convert the inline html node with custom attrs', () => {
|
|
2481
2494
|
const sourceCode = `<p><b id="b-element" class="my-class-1 my-class-2" style="color: red; background: yellow;">text</b></p>`;
|
|
2482
2495
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2483
|
-
expect(content.toHtml(
|
|
2496
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2484
2497
|
expect(content.toJSON()).toEqual([
|
|
2485
2498
|
{
|
|
2486
2499
|
id: expect.anything(),
|
|
@@ -2507,7 +2520,7 @@ describe('content state', () => {
|
|
|
2507
2520
|
it('should convert the inline html node with text node as expect', () => {
|
|
2508
2521
|
const sourceCode = `<p>Do not forget to buy <mark>milk</mark> today.</p>`;
|
|
2509
2522
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2510
|
-
expect(content.toHtml(
|
|
2523
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2511
2524
|
expect(content.toJSON()).toEqual([
|
|
2512
2525
|
{
|
|
2513
2526
|
id: expect.anything(),
|
|
@@ -2538,7 +2551,7 @@ describe('content state', () => {
|
|
|
2538
2551
|
it('should convert the span as inline html when it includes not text node', () => {
|
|
2539
2552
|
const sourceCode = `<p>This is a <span style="color: red;"><b>red</b></span> word.</p>`;
|
|
2540
2553
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2541
|
-
expect(content.toHtml(
|
|
2554
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2542
2555
|
expect(content.toJSON()).toEqual([
|
|
2543
2556
|
{
|
|
2544
2557
|
id: expect.anything(),
|
|
@@ -2659,7 +2672,7 @@ Line 1
|
|
|
2659
2672
|
</footer>
|
|
2660
2673
|
`;
|
|
2661
2674
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2662
|
-
expect(CodeFormatter.format(content.toHtml(
|
|
2675
|
+
expect(CodeFormatter.format(content.toHtml())).toMatchSnapshot();
|
|
2663
2676
|
});
|
|
2664
2677
|
it('should convert the supported inline html as expected', () => {
|
|
2665
2678
|
const sourceCode = `<p>
|
|
@@ -2694,7 +2707,7 @@ Line 1
|
|
|
2694
2707
|
<video src="video.mp4"></video>
|
|
2695
2708
|
</p>`;
|
|
2696
2709
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2697
|
-
expect(content.toHtml(
|
|
2710
|
+
expect(content.toHtml()).toMatchSnapshot();
|
|
2698
2711
|
});
|
|
2699
2712
|
it('should convert the code as inline html', () => {
|
|
2700
2713
|
const sourceCode = `<code>1111</code>
|
|
@@ -2705,12 +2718,12 @@ Line 1
|
|
|
2705
2718
|
<code>333</code>
|
|
2706
2719
|
</b>`;
|
|
2707
2720
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2708
|
-
expect(content.toHtml(
|
|
2721
|
+
expect(content.toHtml()).toMatchSnapshot();
|
|
2709
2722
|
});
|
|
2710
2723
|
it('should convert the link that allow plain text', () => {
|
|
2711
2724
|
const sourceCode = `<p><a href="https://example.com">Example <b>link</b></a></p>`;
|
|
2712
2725
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2713
|
-
expect(content.toHtml(
|
|
2726
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2714
2727
|
expect(content.toJSON()).toEqual([
|
|
2715
2728
|
{
|
|
2716
2729
|
id: expect.anything(),
|
|
@@ -2751,32 +2764,32 @@ Line 1
|
|
|
2751
2764
|
it('should split the multiple nested inline html', () => {
|
|
2752
2765
|
const sourceCode = `<p><b><s>111</s><u>222</u></b></p>`;
|
|
2753
2766
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2754
|
-
expect(content.toHtml(
|
|
2767
|
+
expect(content.toHtml()).toEqual(`<p><b><s>111</s></b><b><u>222</u></b></p>`);
|
|
2755
2768
|
});
|
|
2756
2769
|
it('should convert li elements into a list block by default', () => {
|
|
2757
2770
|
const sourceCode = '<li>Item 1</li><li>Item 2</li><li>Item 3</li>';
|
|
2758
2771
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2759
|
-
expect(content.toHtml(
|
|
2772
|
+
expect(content.toHtml()).toEqual(`<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>`);
|
|
2760
2773
|
});
|
|
2761
2774
|
it('should convert all the ul children to list item', () => {
|
|
2762
2775
|
const sourceCode = '<ul><li>Item 1</li>Item 2<li>Item 3</li></ul>';
|
|
2763
2776
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2764
|
-
expect(content.toHtml(
|
|
2777
|
+
expect(content.toHtml()).toEqual(`<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>`);
|
|
2765
2778
|
});
|
|
2766
2779
|
it('should correctly handle both standalone li elements and li elements with ul/ol', () => {
|
|
2767
2780
|
const sourceCode = `<li>111</li><li>222</li><li>333</li><ol>444</ol><p>555</p>`;
|
|
2768
2781
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2769
|
-
expect(content.toHtml(
|
|
2782
|
+
expect(content.toHtml()).toEqual(`<ul><li>111</li><li>222</li><li>333</li></ul><ol><li>444</li></ol><p>555</p>`);
|
|
2770
2783
|
});
|
|
2771
2784
|
it('should handle non-contiguous li elements as separate lists', () => {
|
|
2772
2785
|
const sourceCode = '<li>Item 1</li><p>Middle</p>Plain text<li>Item 2</li><li>Item 3</li>';
|
|
2773
2786
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2774
|
-
expect(content.toHtml(
|
|
2787
|
+
expect(content.toHtml()).toEqual(`<ul><li>Item 1</li></ul><p>Middle</p>Plain text<ul><li>Item 2</li><li>Item 3</li></ul>`);
|
|
2775
2788
|
});
|
|
2776
2789
|
it('should not merge bold annotation with custom attr', () => {
|
|
2777
2790
|
const sourceCode = '<span style="font-weight: bold;">bold text</span>';
|
|
2778
2791
|
const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
|
|
2779
|
-
expect(content.toHtml(
|
|
2792
|
+
expect(content.toHtml()).toEqual(sourceCode);
|
|
2780
2793
|
});
|
|
2781
2794
|
it('should not remove blank space between elements', () => {
|
|
2782
2795
|
const sourceCode = '<p><span>A</span><span> </span><span>paragraph</span></p>';
|
|
@@ -2827,11 +2840,9 @@ Line 1
|
|
|
2827
2840
|
},
|
|
2828
2841
|
];
|
|
2829
2842
|
expect(VegaRTEContent.fromJSON(content).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
|
|
2830
|
-
expect(VegaRTEContent.fromJSON(content).toHtml(
|
|
2843
|
+
expect(VegaRTEContent.fromJSON(content).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
|
|
2844
|
+
expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toEqual(`<p><span>This is a paragraph</span></p>`);
|
|
2831
2845
|
expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toEqual(`<p><span>This is a paragraph</span></p>`);
|
|
2832
|
-
expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml({
|
|
2833
|
-
autoMatchFormat: false,
|
|
2834
|
-
})).toEqual(`<p><span>This is a paragraph</span></p>`);
|
|
2835
2846
|
});
|
|
2836
2847
|
it('should translate the html block as expect html', () => {
|
|
2837
2848
|
const content = [
|
package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js
CHANGED
|
@@ -28,4 +28,3 @@ export const DARK_MODE_CHANGE = new StaticSubject('DARK_MODE_CHANGE');
|
|
|
28
28
|
export const SHADOW_ROOT_ELEMENT_SCROLLING = new StaticSubject('SHADOW_ROOT_ELEMENT_SCROLLING');
|
|
29
29
|
export const FLAG_ICON_LOADED = new StaticSubject('FLAG_ICON_LOADED');
|
|
30
30
|
export const GP_BRAND_CHANGE = new StaticSubject('GP_BRAND_CHANGE');
|
|
31
|
-
export const CALENDAR_EVENT_PREVIEW_POPOVER_HIDE = new StaticSubject('CALENDAR_EVENT_PREVIEW_POPOVER_HIDE');
|
|
@@ -57,3 +57,4 @@ export const VegaInternalCalendarEventPreviewUpdate = new VegaInternalEventID('c
|
|
|
57
57
|
export const VegaInternalCalendarEventPreviewClear = new VegaInternalEventID('calendarEventPreviewClear');
|
|
58
58
|
export const VegaInternalUpdateRTECursorPosition = new VegaInternalEventID('InternalUpdateRTECursorPosition');
|
|
59
59
|
export const VegaInternalMonthYearChange = new VegaInternalEventID('internalMonthYearChange');
|
|
60
|
+
export const VegaInternalCalendarEventPreviewHide = new VegaInternalEventID('calendarEventPreviewHide');
|