@wix/patterns-fields 1.66.0 → 1.67.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/auto-field-types/validations.js +9 -13
- package/dist/cjs/auto-field-types/validations.js.map +1 -1
- package/dist/cjs/components/address/input/address-input.st.css.js +3 -3
- package/dist/cjs/components/address/input/address-input.st.css.js.map +1 -1
- package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
- package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
- package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js +4 -4
- package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/cjs/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/cjs/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/cjs/components/color-view/cell-color-view.st.css.js +3 -3
- package/dist/cjs/components/color-view/cell-color-view.st.css.js.map +1 -1
- package/dist/cjs/components/color-view/color-view.st.css.js +4 -4
- package/dist/cjs/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js +3 -3
- package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
- package/dist/cjs/components/document/form-document-field.st.css.js +7 -7
- package/dist/cjs/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/cjs/components/exclamation/exclamation.st.css.js +5 -5
- package/dist/cjs/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js +5 -5
- package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
- package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js +3 -3
- package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
- package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js.map +1 -1
- package/dist/cjs/components/media-control/paste-url-button.st.css.js +4 -4
- package/dist/cjs/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
- package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/cjs/components/media-image/media-image.st.css.js +4 -4
- package/dist/cjs/components/media-image/media-image.st.css.js.map +1 -1
- package/dist/cjs/components/media-image/overlays/overlay.st.css.js +3 -3
- package/dist/cjs/components/media-image/overlays/overlay.st.css.js.map +1 -1
- package/dist/cjs/components/media-loader/media-loader.st.css.js +3 -3
- package/dist/cjs/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
- package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js +3 -3
- package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
- package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js +2 -2
- package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js.map +1 -1
- package/dist/cjs/components/reference/cell-reference-input.st.css.js +3 -3
- package/dist/cjs/components/reference/cell-reference-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/cdn/load-ricos.js +135 -0
- package/dist/cjs/components/rich-content/cdn/load-ricos.js.map +1 -0
- package/dist/cjs/components/rich-content/cdn/types.js +4 -0
- package/dist/cjs/components/rich-content/cdn/types.js.map +1 -0
- package/dist/cjs/components/rich-content/cell-rich-content-input.js +3 -3
- package/dist/cjs/components/rich-content/cell-rich-content-input.js.map +1 -1
- package/dist/cjs/components/rich-content/cell-rich-content-view.js +2 -2
- package/dist/cjs/components/rich-content/cell-rich-content-view.js.map +1 -1
- package/dist/cjs/components/rich-content/editor.js.map +1 -1
- package/dist/cjs/components/rich-content/form-rich-content.js +2 -2
- package/dist/cjs/components/rich-content/form-rich-content.js.map +1 -1
- package/dist/cjs/components/rich-content/hooks/use-plain-text-rich-content.js +5 -3
- package/dist/cjs/components/rich-content/hooks/use-plain-text-rich-content.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +4 -4
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/hooks.js +7 -8
- package/dist/cjs/components/rich-content/rich-content-input/hooks.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/hooks.js +15 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/hooks.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/types.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/plugins.js +38 -31
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/plugins.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js +27 -22
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +7 -7
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js +10 -9
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +5 -5
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/plugins.js +11 -17
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/plugins.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js +47 -15
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/services/rich-content-document-http-service.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/services/types.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- package/dist/cjs/components/text/text-view.st.css.js +3 -3
- package/dist/cjs/components/text/text-view.st.css.js.map +1 -1
- package/dist/cjs/exports/ricos-statics-legacy.js +10 -0
- package/dist/cjs/exports/ricos-statics-legacy.js.map +1 -0
- package/dist/cjs/exports/ricos-statics.js +10 -0
- package/dist/cjs/exports/ricos-statics.js.map +1 -0
- package/dist/cjs/styles.global.css +1 -1
- package/dist/cjs/validations/rich-content.js +26 -6
- package/dist/cjs/validations/rich-content.js.map +1 -1
- package/dist/esm/auto-field-types/validations.js +10 -13
- package/dist/esm/auto-field-types/validations.js.map +1 -1
- package/dist/esm/components/address/input/address-input.st.css.js +2 -2
- package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js +2 -2
- package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
- package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js +2 -2
- package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/esm/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/esm/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/esm/components/color-view/cell-color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/esm/components/delete-dialog/delete-dialog.st.css.js +2 -2
- package/dist/esm/components/document/form-document-field.st.css.js +2 -2
- package/dist/esm/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/esm/components/exclamation/exclamation.st.css.js +2 -2
- package/dist/esm/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/esm/components/highlighted-text/highlighted-text.st.css.js +3 -3
- package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js +2 -2
- package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
- package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/esm/components/media-control/paste-url-button.st.css.js +2 -2
- package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js +2 -2
- package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/esm/components/media-image/media-image.st.css.js +3 -3
- package/dist/esm/components/media-image/overlays/overlay.st.css.js +2 -2
- package/dist/esm/components/media-loader/media-loader.st.css.js +2 -2
- package/dist/esm/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/esm/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js +2 -2
- package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
- package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js +2 -2
- package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
- package/dist/esm/components/reference/cell-multi-reference-input.st.css.js +2 -2
- package/dist/esm/components/reference/cell-reference-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/cdn/load-ricos.js +126 -0
- package/dist/esm/components/rich-content/cdn/load-ricos.js.map +1 -0
- package/dist/esm/components/rich-content/cdn/types.js +2 -0
- package/dist/esm/components/rich-content/cdn/types.js.map +1 -0
- package/dist/esm/components/rich-content/cell-rich-content-input.js +1 -1
- package/dist/esm/components/rich-content/cell-rich-content-input.js.map +1 -1
- package/dist/esm/components/rich-content/cell-rich-content-view.js +1 -1
- package/dist/esm/components/rich-content/cell-rich-content-view.js.map +1 -1
- package/dist/esm/components/rich-content/editor.js +1 -1
- package/dist/esm/components/rich-content/editor.js.map +1 -1
- package/dist/esm/components/rich-content/form-rich-content.js +1 -1
- package/dist/esm/components/rich-content/form-rich-content.js.map +1 -1
- package/dist/esm/components/rich-content/hooks/use-plain-text-rich-content.js +3 -2
- package/dist/esm/components/rich-content/hooks/use-plain-text-rich-content.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/hooks.js +4 -7
- package/dist/esm/components/rich-content/rich-content-input/hooks.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/hooks.js +14 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/hooks.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/plugins.js +49 -41
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/plugins.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js +10 -5
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js +3 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/plugins.js +31 -37
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/plugins.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js +11 -5
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +2 -2
- package/dist/esm/components/text/text-view.st.css.js +2 -2
- package/dist/esm/components/text/text-view.st.css.js.map +1 -1
- package/dist/esm/exports/ricos-statics-legacy.js +6 -0
- package/dist/esm/exports/ricos-statics-legacy.js.map +1 -0
- package/dist/esm/exports/ricos-statics.js +10 -0
- package/dist/esm/exports/ricos-statics.js.map +1 -0
- package/dist/esm/styles.global.css +1 -1
- package/dist/esm/validations/rich-content.js +18 -1
- package/dist/esm/validations/rich-content.js.map +1 -1
- package/dist/types/auto-field-types/validations.d.ts +8 -0
- package/dist/types/auto-field-types/validations.d.ts.map +1 -1
- package/dist/types/components/audio/actions/actions-menu/actions-menu.st.css.d.ts.map +1 -1
- package/dist/types/components/audio/audio-field/form-audio-field.st.css.d.ts.map +1 -1
- package/dist/types/components/audio/audio-player/audio-player.st.css.d.ts.map +1 -1
- package/dist/types/components/color-view/color-view.st.css.d.ts.map +1 -1
- package/dist/types/components/document/form-document-field.st.css.d.ts.map +1 -1
- package/dist/types/components/exclamation/exclamation.st.css.d.ts.map +1 -1
- package/dist/types/components/image/thumbnail-replace-overlay.st.css.d.ts.map +1 -1
- package/dist/types/components/media-gallery/form-media-gallery-field.st.css.d.ts.map +1 -1
- package/dist/types/components/media-loader/media-loader.st.css.d.ts.map +1 -1
- package/dist/types/components/multi-document/cell-multi-document-edit.st.css.d.ts.map +1 -1
- package/dist/types/components/multi-document/multi-document-input/form-multi-document.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/cdn/load-ricos.d.ts +11 -0
- package/dist/types/components/rich-content/cdn/load-ricos.d.ts.map +1 -0
- package/dist/types/components/rich-content/cdn/types.d.ts +20 -0
- package/dist/types/components/rich-content/cdn/types.d.ts.map +1 -0
- package/dist/types/components/rich-content/cell-rich-content-input.d.ts +1 -1
- package/dist/types/components/rich-content/cell-rich-content-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/form-rich-content.d.ts +1 -1
- package/dist/types/components/rich-content/form-rich-content.d.ts.map +1 -1
- package/dist/types/components/rich-content/hooks/use-plain-text-rich-content.d.ts +1 -1
- package/dist/types/components/rich-content/hooks/use-plain-text-rich-content.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.d.ts +3 -3
- package/dist/types/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/hooks.d.ts +2 -2
- package/dist/types/components/rich-content/rich-content-input/hooks.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/hooks.d.ts +11 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/hooks.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/types.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/types.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/plugins.d.ts +7 -2
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/plugins.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.d.ts +2 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/plugins.d.ts +6 -15
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/plugins.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.d.ts +2 -2
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/services/types.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/services/types.d.ts.map +1 -1
- package/dist/types/components/text/text-view.st.css.d.ts.map +1 -1
- package/dist/types/exports/ricos-statics-legacy.d.ts +6 -0
- package/dist/types/exports/ricos-statics-legacy.d.ts.map +1 -0
- package/dist/types/exports/ricos-statics.d.ts +10 -0
- package/dist/types/exports/ricos-statics.d.ts.map +1 -0
- package/dist/types/validations/rich-content.d.ts +9 -1
- package/dist/types/validations/rich-content.d.ts.map +1 -1
- package/package.json +24 -7
- package/src/__tests__/components/rich-content/form-rich-content.spec.tsx +1 -1
- package/src/__tests__/components/rich-content/load-ricos.spec.ts +17 -0
- package/src/__tests__/components/rich-content-editor.spec.tsx +40 -32
- package/src/__tests__/validations/rich-content.spec.ts +1 -1
- package/src/auto-field-types/validations.ts +25 -13
- package/src/components/address/input/address-input.st.css.ts +2 -2
- package/src/components/audio/actions/actions-menu/actions-menu.st.css.ts +2 -2
- package/src/components/audio/audio-field/form-audio-field.st.css.ts +2 -2
- package/src/components/audio/audio-player/audio-player.st.css.ts +2 -2
- package/src/components/color-view/cell-color-view.st.css.ts +2 -2
- package/src/components/color-view/color-view.st.css.ts +2 -2
- package/src/components/delete-dialog/delete-dialog.st.css.ts +2 -2
- package/src/components/document/form-document-field.st.css.ts +2 -2
- package/src/components/exclamation/exclamation.st.css.ts +2 -2
- package/src/components/highlighted-text/highlighted-text.st.css.ts +3 -3
- package/src/components/image/thumbnail-replace-overlay.st.css.ts +2 -2
- package/src/components/media-control/cell-media-edit-shell.st.css.ts +2 -2
- package/src/components/media-control/paste-url-button.st.css.ts +2 -2
- package/src/components/media-gallery/form-media-gallery-field.st.css.ts +2 -2
- package/src/components/media-image/media-image.st.css.ts +3 -3
- package/src/components/media-image/overlays/overlay.st.css.ts +2 -2
- package/src/components/media-loader/media-loader.st.css.ts +2 -2
- package/src/components/media-tag/web-media-tag/media-tag.st.css.ts +2 -2
- package/src/components/multi-document/cell-multi-document-edit.st.css.ts +2 -2
- package/src/components/multi-document/multi-document-input/form-multi-document.st.css.ts +2 -2
- package/src/components/reference/cell-multi-reference-input.st.css.ts +2 -2
- package/src/components/reference/cell-reference-input.st.css.ts +2 -2
- package/src/components/rich-content/cdn/load-ricos.ts +184 -0
- package/src/components/rich-content/cdn/types.ts +21 -0
- package/src/components/rich-content/cell-rich-content-input.tsx +2 -2
- package/src/components/rich-content/cell-rich-content-view.tsx +1 -1
- package/src/components/rich-content/editor.ts +1 -1
- package/src/components/rich-content/form-rich-content.tsx +2 -2
- package/src/components/rich-content/hooks/use-plain-text-rich-content.ts +4 -3
- package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.ts +1 -1
- package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/hooks.ts +5 -8
- package/src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/hooks.ts +15 -3
- package/src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/types.ts +1 -1
- package/src/components/rich-content/rich-content-input/rich-content-editor/plugins.ts +59 -72
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx +11 -7
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.tsx +4 -2
- package/src/components/rich-content/rich-content-input/rich-content-viewer/plugins.ts +33 -63
- package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.tsx +26 -10
- package/src/components/rich-content/rich-content-input/services/rich-content-document-http-service.ts +1 -1
- package/src/components/rich-content/rich-content-input/services/types.ts +1 -1
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.ts +2 -2
- package/src/components/text/text-view.st.css.ts +2 -2
- package/src/exports/ricos-statics-legacy.ts +5 -0
- package/src/exports/ricos-statics.ts +9 -0
- package/src/styles.global.css +1 -1
- package/src/validations/rich-content.ts +20 -2
- package/utils/@wix/patterns-fields-ricos-statics/legacy/package.json +5 -0
- package/utils/@wix/patterns-fields-ricos-statics/package.json +5 -0
|
@@ -3,44 +3,51 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.usePlugins = void 0;
|
|
5
5
|
var _react = require("react");
|
|
6
|
-
var _ricos = require("@wix/ricos");
|
|
7
6
|
var _utils = require("../../../../utils");
|
|
8
7
|
var _consts = require("../consts");
|
|
9
|
-
const {
|
|
10
|
-
Instagram,
|
|
11
|
-
Twitter,
|
|
12
|
-
TikTok
|
|
13
|
-
} = _ricos.LinkPreviewProviders;
|
|
14
|
-
const {
|
|
15
|
-
event,
|
|
16
|
-
booking,
|
|
17
|
-
product
|
|
18
|
-
} = _ricos.verticalEmbedProviders;
|
|
19
8
|
const layoutPlugin = {
|
|
20
9
|
type: 'LAYOUT',
|
|
21
10
|
showInQuickActions: true,
|
|
22
11
|
showInToolbars: true
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Plugin creators come from the CDN module, so this returns an empty list until
|
|
16
|
+
* it has loaded. The editor is not rendered before then, so nothing sees it.
|
|
17
|
+
*/
|
|
18
|
+
const usePlugins = (ricos, colorScheme) => {
|
|
19
|
+
return (0, _react.useMemo)(() => {
|
|
20
|
+
if (!ricos) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const {
|
|
24
|
+
Instagram,
|
|
25
|
+
Twitter,
|
|
26
|
+
TikTok
|
|
27
|
+
} = ricos.LinkPreviewProviders;
|
|
28
|
+
const {
|
|
29
|
+
event,
|
|
30
|
+
booking,
|
|
31
|
+
product
|
|
32
|
+
} = ricos.verticalEmbedProviders;
|
|
33
|
+
return [ricos.pluginHeadings(), ricos.pluginTextColor({
|
|
34
|
+
inlinePopups: true,
|
|
35
|
+
colorScheme
|
|
36
|
+
}), ricos.pluginTextHighlight({
|
|
37
|
+
inlinePopups: true,
|
|
38
|
+
colorScheme
|
|
39
|
+
}), ricos.pluginLineSpacing({
|
|
40
|
+
inlinePopups: true
|
|
41
|
+
}), ricos.pluginIndent(), ricos.pluginLink(), ricos.pluginImage(), ricos.pluginVideo(), ricos.pluginGallery(), ricos.pluginDivider(), ricos.pluginTable({
|
|
42
|
+
toolbar: {}
|
|
43
|
+
}), ricos.pluginAi({
|
|
44
|
+
appDefId: _consts.CMS_RICOS_APP_ID
|
|
45
|
+
}), ricos.pluginFileUpload(), ricos.pluginHtml(), ricos.pluginLinkPreview({
|
|
46
|
+
exposeEmbedButtons: [Instagram, Twitter, TikTok]
|
|
47
|
+
}), ricos.pluginVerticalEmbed({
|
|
48
|
+
exposeEmbedButtons: [event, booking, product]
|
|
49
|
+
}), ricos.pluginCodeBlock(), ricos.pluginEmoji(), ricos.pluginSpoiler(), ricos.pluginGiphy(), ricos.pluginCollapsibleList(), ricos.pluginLinkButton(), layoutPlugin].filter(_utils.isTruthy);
|
|
50
|
+
}, [ricos, colorScheme]);
|
|
44
51
|
};
|
|
45
52
|
exports.usePlugins = usePlugins;
|
|
46
53
|
//# sourceMappingURL=plugins.js.map
|
package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/plugins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_utils","_consts","layoutPlugin","type","showInQuickActions","showInToolbars","usePlugins","ricos","colorScheme","useMemo","Instagram","Twitter","TikTok","LinkPreviewProviders","event","booking","product","verticalEmbedProviders","pluginHeadings","pluginTextColor","inlinePopups","pluginTextHighlight","pluginLineSpacing","pluginIndent","pluginLink","pluginImage","pluginVideo","pluginGallery","pluginDivider","pluginTable","toolbar","pluginAi","appDefId","CMS_RICOS_APP_ID","pluginFileUpload","pluginHtml","pluginLinkPreview","exposeEmbedButtons","pluginVerticalEmbed","pluginCodeBlock","pluginEmoji","pluginSpoiler","pluginGiphy","pluginCollapsibleList","pluginLinkButton","filter","isTruthy","exports"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/plugins.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type {\n EditorPlugin,\n EditorPluginOptions,\n} from '@wix/patterns-fields-utils/@wix/patterns-fields-ricos-statics';\n\nimport type { RicosCdnModule } from '../../cdn/types';\nimport { isTruthy } from '../../../../utils';\nimport type { ColorScheme } from '../../types';\nimport { CMS_RICOS_APP_ID } from '../consts';\n\nconst layoutPlugin: EditorPluginOptions = {\n type: 'LAYOUT',\n showInQuickActions: true,\n showInToolbars: true,\n};\n\n/**\n * Plugin creators come from the CDN module, so this returns an empty list until\n * it has loaded. The editor is not rendered before then, so nothing sees it.\n */\nexport const usePlugins = (\n ricos: RicosCdnModule | undefined,\n colorScheme?: ColorScheme,\n) => {\n return useMemo<(EditorPlugin | EditorPluginOptions)[]>(() => {\n if (!ricos) {\n return [];\n }\n\n const { Instagram, Twitter, TikTok } = ricos.LinkPreviewProviders;\n const { event, booking, product } = ricos.verticalEmbedProviders;\n\n return [\n ricos.pluginHeadings(),\n ricos.pluginTextColor({\n inlinePopups: true,\n colorScheme,\n }),\n ricos.pluginTextHighlight({\n inlinePopups: true,\n colorScheme,\n }),\n ricos.pluginLineSpacing({ inlinePopups: true }),\n ricos.pluginIndent(),\n ricos.pluginLink(),\n ricos.pluginImage(),\n ricos.pluginVideo(),\n ricos.pluginGallery(),\n ricos.pluginDivider(),\n ricos.pluginTable({ toolbar: {} }),\n ricos.pluginAi({\n appDefId: CMS_RICOS_APP_ID,\n }) as unknown as EditorPlugin,\n ricos.pluginFileUpload(),\n ricos.pluginHtml(),\n ricos.pluginLinkPreview({\n exposeEmbedButtons: [Instagram, Twitter, TikTok],\n }),\n ricos.pluginVerticalEmbed({\n exposeEmbedButtons: [event, booking, product],\n }),\n ricos.pluginCodeBlock(),\n ricos.pluginEmoji(),\n ricos.pluginSpoiler(),\n ricos.pluginGiphy(),\n ricos.pluginCollapsibleList(),\n ricos.pluginLinkButton(),\n layoutPlugin,\n ].filter(isTruthy);\n }, [ricos, colorScheme]);\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,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KAAK,CAAC6B,iBAAiB,CAAC;MACtBC,kBAAkB,EAAE,CAAC3B,SAAS,EAAEC,OAAO,EAAEC,MAAM;IACjD,CAAC,CAAC,EACFL,KAAK,CAAC+B,mBAAmB,CAAC;MACxBD,kBAAkB,EAAE,CAACvB,KAAK,EAAEC,OAAO,EAAEC,OAAO;IAC9C,CAAC,CAAC,EACFT,KAAK,CAACgC,eAAe,CAAC,CAAC,EACvBhC,KAAK,CAACiC,WAAW,CAAC,CAAC,EACnBjC,KAAK,CAACkC,aAAa,CAAC,CAAC,EACrBlC,KAAK,CAACmC,WAAW,CAAC,CAAC,EACnBnC,KAAK,CAACoC,qBAAqB,CAAC,CAAC,EAC7BpC,KAAK,CAACqC,gBAAgB,CAAC,CAAC,EACxB1C,YAAY,CACb,CAAC2C,MAAM,CAACC,eAAQ,CAAC;EACpB,CAAC,EAAE,CAACvC,KAAK,EAAEC,WAAW,CAAC,CAAC;AAC1B,CAAC;AAACuC,OAAA,CAAAzC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
|
9
9
|
var _defaultsDeep = _interopRequireDefault(require("lodash/defaultsDeep"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _designSystem = require("@wix/design-system");
|
|
12
|
-
var
|
|
12
|
+
var _loadRicos = require("../../cdn/load-ricos");
|
|
13
13
|
var _hooks = require("../../../../hooks");
|
|
14
14
|
var _utils = require("../../../../utils");
|
|
15
15
|
var _userSiteFonts = require("../../../user-site-fonts");
|
|
@@ -32,7 +32,7 @@ const InsertToolbarSync = ({
|
|
|
32
32
|
// Ricos 11's next-runtime proxy is supposed to convert the legacy
|
|
33
33
|
// `Record<string, ToolbarButtonProps>` into a v2 `ExternalToolbarButton[]`,
|
|
34
34
|
// but some consumer bundles end up calling through to the inner adapter
|
|
35
|
-
// (duplicate
|
|
35
|
+
// (duplicate ricos copies / unwrapped ref) and we receive the
|
|
36
36
|
// record shape. Normalize to an array so `.map` is safe, and treat the
|
|
37
37
|
// non-array (record) shape as ready — otherwise the absolute-positioned
|
|
38
38
|
// RCELoader overlay stays mounted and the editor row becomes unclickable.
|
|
@@ -48,7 +48,10 @@ const InsertToolbarSync = ({
|
|
|
48
48
|
return null;
|
|
49
49
|
};
|
|
50
50
|
InsertToolbarSync.displayName = 'InsertToolbarSync';
|
|
51
|
-
const filterStaticToolbarButtons = button =>
|
|
51
|
+
const filterStaticToolbarButtons = button =>
|
|
52
|
+
// Inlined rather than read off the CDN module's `FORMATTING_BUTTONS`: this is
|
|
53
|
+
// a plain string constant and the filter runs before the module has loaded.
|
|
54
|
+
button !== 'CODE_BLOCK';
|
|
52
55
|
const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
53
56
|
content,
|
|
54
57
|
injectedContent,
|
|
@@ -197,7 +200,9 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
197
200
|
}
|
|
198
201
|
}, [triggerBlur, requestEditorBlur]);
|
|
199
202
|
const wixRicosProps = (0, _richContentCommon.useWixRicosProps)();
|
|
200
|
-
const
|
|
203
|
+
const ricos = (0, _loadRicos.useRicosFromCdn)();
|
|
204
|
+
const plugins = (0, _plugins.usePlugins)(ricos, colorScheme);
|
|
205
|
+
const RicosEditor = ricos == null ? void 0 : ricos.RicosEditor;
|
|
201
206
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
202
207
|
ref: containerRef,
|
|
203
208
|
"data-hook": "rich-content.editor",
|
|
@@ -211,7 +216,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
211
216
|
__self: void 0,
|
|
212
217
|
__source: {
|
|
213
218
|
fileName: _jsxFileName,
|
|
214
|
-
lineNumber:
|
|
219
|
+
lineNumber: 308,
|
|
215
220
|
columnNumber: 7
|
|
216
221
|
}
|
|
217
222
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -219,7 +224,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
219
224
|
__self: void 0,
|
|
220
225
|
__source: {
|
|
221
226
|
fileName: _jsxFileName,
|
|
222
|
-
lineNumber:
|
|
227
|
+
lineNumber: 319,
|
|
223
228
|
columnNumber: 9
|
|
224
229
|
}
|
|
225
230
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -228,7 +233,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
228
233
|
__self: void 0,
|
|
229
234
|
__source: {
|
|
230
235
|
fileName: _jsxFileName,
|
|
231
|
-
lineNumber:
|
|
236
|
+
lineNumber: 320,
|
|
232
237
|
columnNumber: 11
|
|
233
238
|
}
|
|
234
239
|
}), !hidden && isToolbarReady && /*#__PURE__*/_react.default.createElement(_richContentCommon.ToggleFullscreenButton, {
|
|
@@ -237,7 +242,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
237
242
|
__self: void 0,
|
|
238
243
|
__source: {
|
|
239
244
|
fileName: _jsxFileName,
|
|
240
|
-
lineNumber:
|
|
245
|
+
lineNumber: 322,
|
|
241
246
|
columnNumber: 13
|
|
242
247
|
}
|
|
243
248
|
})), editor && /*#__PURE__*/_react.default.createElement(InsertToolbarSync, {
|
|
@@ -247,19 +252,19 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
247
252
|
__self: void 0,
|
|
248
253
|
__source: {
|
|
249
254
|
fileName: _jsxFileName,
|
|
250
|
-
lineNumber:
|
|
255
|
+
lineNumber: 330,
|
|
251
256
|
columnNumber: 11
|
|
252
257
|
}
|
|
253
|
-
}), !hidden ? /*#__PURE__*/_react.default.createElement("div", {
|
|
258
|
+
}), !hidden && RicosEditor ? /*#__PURE__*/_react.default.createElement("div", {
|
|
254
259
|
"data-hook": dataHook,
|
|
255
260
|
className: _richContentEditorStCss.classes.editor,
|
|
256
261
|
__self: void 0,
|
|
257
262
|
__source: {
|
|
258
263
|
fileName: _jsxFileName,
|
|
259
|
-
lineNumber:
|
|
264
|
+
lineNumber: 338,
|
|
260
265
|
columnNumber: 11
|
|
261
266
|
}
|
|
262
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
267
|
+
}, /*#__PURE__*/_react.default.createElement(RicosEditor, (0, _extends2.default)({
|
|
263
268
|
ref: setEditorInstance,
|
|
264
269
|
plugins: plugins,
|
|
265
270
|
initialContent: content,
|
|
@@ -272,14 +277,14 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
272
277
|
__self: void 0,
|
|
273
278
|
__source: {
|
|
274
279
|
fileName: _jsxFileName,
|
|
275
|
-
lineNumber:
|
|
280
|
+
lineNumber: 339,
|
|
276
281
|
columnNumber: 13
|
|
277
282
|
}
|
|
278
283
|
}))) : null, !isToolbarReady && /*#__PURE__*/_react.default.createElement(RCELoader, {
|
|
279
284
|
__self: void 0,
|
|
280
285
|
__source: {
|
|
281
286
|
fileName: _jsxFileName,
|
|
282
|
-
lineNumber:
|
|
287
|
+
lineNumber: 354,
|
|
283
288
|
columnNumber: 29
|
|
284
289
|
}
|
|
285
290
|
}), !hidden && isToolbarReady && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -288,7 +293,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
288
293
|
__self: void 0,
|
|
289
294
|
__source: {
|
|
290
295
|
fileName: _jsxFileName,
|
|
291
|
-
lineNumber:
|
|
296
|
+
lineNumber: 356,
|
|
292
297
|
columnNumber: 11
|
|
293
298
|
}
|
|
294
299
|
}, /*#__PURE__*/_react.default.createElement(_richContentToolbar.ExternalToolbar, {
|
|
@@ -296,7 +301,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
296
301
|
__self: void 0,
|
|
297
302
|
__source: {
|
|
298
303
|
fileName: _jsxFileName,
|
|
299
|
-
lineNumber:
|
|
304
|
+
lineNumber: 360,
|
|
300
305
|
columnNumber: 13
|
|
301
306
|
}
|
|
302
307
|
})));
|
|
@@ -312,7 +317,7 @@ const RCELoader = () => /*#__PURE__*/_react.default.createElement(_designSystem.
|
|
|
312
317
|
__self: void 0,
|
|
313
318
|
__source: {
|
|
314
319
|
fileName: _jsxFileName,
|
|
315
|
-
lineNumber:
|
|
320
|
+
lineNumber: 370,
|
|
316
321
|
columnNumber: 3
|
|
317
322
|
}
|
|
318
323
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.Loader, {
|
|
@@ -320,7 +325,7 @@ const RCELoader = () => /*#__PURE__*/_react.default.createElement(_designSystem.
|
|
|
320
325
|
__self: void 0,
|
|
321
326
|
__source: {
|
|
322
327
|
fileName: _jsxFileName,
|
|
323
|
-
lineNumber:
|
|
328
|
+
lineNumber: 378,
|
|
324
329
|
columnNumber: 5
|
|
325
330
|
}
|
|
326
331
|
}));
|
|
@@ -448,7 +453,7 @@ const RichContentEditor = ({
|
|
|
448
453
|
__self: void 0,
|
|
449
454
|
__source: {
|
|
450
455
|
fileName: _jsxFileName,
|
|
451
|
-
lineNumber:
|
|
456
|
+
lineNumber: 574,
|
|
452
457
|
columnNumber: 7
|
|
453
458
|
}
|
|
454
459
|
}), !fullScreenOnly && /*#__PURE__*/_react.default.createElement(RCE, (0, _extends2.default)({}, props, rceProps, {
|
|
@@ -463,7 +468,7 @@ const RichContentEditor = ({
|
|
|
463
468
|
__self: void 0,
|
|
464
469
|
__source: {
|
|
465
470
|
fileName: _jsxFileName,
|
|
466
|
-
lineNumber:
|
|
471
|
+
lineNumber: 576,
|
|
467
472
|
columnNumber: 9
|
|
468
473
|
}
|
|
469
474
|
})), /*#__PURE__*/_react.default.createElement(_richContentCommon.FullscreenModal, {
|
|
@@ -472,7 +477,7 @@ const RichContentEditor = ({
|
|
|
472
477
|
__self: void 0,
|
|
473
478
|
__source: {
|
|
474
479
|
fileName: _jsxFileName,
|
|
475
|
-
lineNumber:
|
|
480
|
+
lineNumber: 589,
|
|
476
481
|
columnNumber: 7
|
|
477
482
|
}
|
|
478
483
|
}, /*#__PURE__*/_react.default.createElement(RCE, (0, _extends2.default)({}, props, rceProps, {
|
|
@@ -486,7 +491,7 @@ const RichContentEditor = ({
|
|
|
486
491
|
__self: void 0,
|
|
487
492
|
__source: {
|
|
488
493
|
fileName: _jsxFileName,
|
|
489
|
-
lineNumber:
|
|
494
|
+
lineNumber: 590,
|
|
490
495
|
columnNumber: 9
|
|
491
496
|
}
|
|
492
497
|
}))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_isEqual","_interopRequireDefault","require","_cloneDeep","_defaultsDeep","_react","_interopRequireWildcard","_designSystem","_ricos","_hooks","_utils","_userSiteFonts","_common","_richContentCommon","_plugins","_richContentToolbar","_richContentEditorStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","InsertToolbarSync","editor","onButtonsChange","onReadyChange","buttons","useToolbarProps","isRecordShape","Array","isArray","safeButtons","signature","map","b","id","join","buttonsRef","useRef","current","useEffect","length","displayName","filterStaticToolbarButtons","button","FORMATTING_BUTTONS","CODE_BLOCK","RCE","forwardRef","content","injectedContent","onChange","autoFocus","onFocus","onBlur","className","dataHook","colorScheme","isFullScreen","onToggleFullScreen","hidden","ricosProps","ref","containerRef","containerHeightRef","getContainer","useCallback","onFullScreenChange","clientHeight","editorRef","setEditor","useState","isToolbarReady","setIsToolbarReady","toolbarButtons","setToolbarButtons","toolbarContainer","setToolbarContainer","setEditorInstance","nextEditor","setContent","nextContent","_editorRef$current","getEditorCommands","useImperativeHandle","isContentChanged","_editorRef$current2","Boolean","getContentTraits","prePublish","_editorRef$current3","INITIAL_INJECTED_RICH_CONTENT","appliedInjectedContentRef","isEqual","timerId","window","setTimeout","clearTimeout","frameId","requestAnimationFrame","_editorRef$current4","focus","cancelAnimationFrame","toolbars","useMemo","undefined","text","mode","container","alignment","defaultButtons","filter","insert","footer","disabled","isModalOpenRef","modalSettings","onModalOpen","onModalClose","isFocusedRef","isBlurringRef","triggerFocus","triggerBlur","requestBlurCallback","useRequestFrameCallback","requestEditorBlur","handleFocus","getActiveElement","_editorRef$current5","handleBlur","relatedTarget","_containerRef$current","contains","getAppRootElement","wixRicosProps","useWixRicosProps","plugins","usePlugins","createElement","st","classes","root","tabIndex","style","height","__self","__source","fileName","lineNumber","columnNumber","toolbarAndFullScreenButtonWrapper","ToggleFullscreenButton","RicosEditor","_extends2","initialContent","textWrap","RCELoader","footerToolbarContainer","ExternalToolbar","Box","align","verticalAlign","position","top","bottom","width","Loader","size","LOADER_DELAY","RichContentEditor","onEnterFullScreen","onExitFullScreen","fullScreenOnly","onPublish","theme","props","modalEditorRef","isRichContentChanged","_editorRef$current6","_modalEditorRef$curre","handleChange","richContent","loader","setLoader","timer","resetLoader","queueLoader","setIsFullScreen","fullScreenContent","setFullScreenContent","publishEditorContent","editorHandle","fallbackContent","onOpen","finalContent","isChanged","error","onClose","catch","handleKeyDown","key","stopPropagation","document","addEventListener","removeEventListener","rceProps","fullScreenTheme","defaultsDeep","cloneDeep","customStyles","maxHeight","settingsStyles","modals","dialogZIndex","Z_INDEX_MODAL_POPOVER","Fragment","UserSiteFonts","FullscreenModal","isOpen","isLoading","modalEditor","exports"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx"],"sourcesContent":["import isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport defaultsDeep from 'lodash/defaultsDeep';\n\nimport type { FC, FocusEventHandler } from 'react';\nimport React, {\n forwardRef,\n useRef,\n useMemo,\n useState,\n useEffect,\n useCallback,\n useImperativeHandle,\n} from 'react';\n\nimport { Box, Loader } from '@wix/design-system';\nimport type {\n ExternalToolbarButton as RicosExternalToolbarButton,\n RicosDocument,\n RicosEditorAPI,\n RicosEditorProps,\n ToolbarsConfig,\n} from '@wix/ricos';\nimport { RicosEditor, FORMATTING_BUTTONS } from '@wix/ricos';\n\nimport { useRequestFrameCallback } from '../../../../hooks';\nimport { getActiveElement, getAppRootElement } from '../../../../utils';\nimport { UserSiteFonts } from '../../../user-site-fonts';\nimport { Z_INDEX_MODAL_POPOVER } from '../../../common';\n\nimport type { ColorScheme } from '../../types';\n\nimport type { ToggleFullscreenButtonProps } from '../rich-content-common';\nimport {\n useWixRicosProps,\n FullscreenModal,\n ToggleFullscreenButton,\n INITIAL_INJECTED_RICH_CONTENT,\n} from '../rich-content-common';\n\nimport { usePlugins } from './plugins';\nimport { ExternalToolbar } from './rich-content-toolbar';\nimport { st, classes } from './rich-content-editor.st.css.js';\n\ntype RicosProps = Pick<RicosEditorProps, 'biSettings' | 'theme'> & {\n wixExperiments?: unknown;\n};\n\ninterface RCEHandle {\n isContentChanged: () => boolean;\n prePublish: () => Promise<RicosDocument>;\n setContent: (content: RicosDocument) => void;\n}\n\ninterface RCEProps extends RicosProps {\n content?: RicosDocument;\n injectedContent?: RicosDocument;\n onChange?: (content: RicosDocument) => void;\n autoFocus?: boolean;\n onFocus?: () => void;\n onBlur?: () => void;\n className?: string;\n colorScheme?: ColorScheme;\n hidden?: boolean;\n dataHook?: string;\n}\n\ntype ToolbarSyncProps = {\n editor: RicosEditorAPI;\n onButtonsChange: (buttons: readonly RicosExternalToolbarButton[]) => void;\n onReadyChange: (ready: boolean) => void;\n};\n\nconst InsertToolbarSync: FC<ToolbarSyncProps> = ({\n editor,\n onButtonsChange,\n onReadyChange,\n}) => {\n const { buttons } = editor.useToolbarProps('insert');\n\n // Ricos 11's next-runtime proxy is supposed to convert the legacy\n // `Record<string, ToolbarButtonProps>` into a v2 `ExternalToolbarButton[]`,\n // but some consumer bundles end up calling through to the inner adapter\n // (duplicate `@wix/ricos` copies / unwrapped ref) and we receive the\n // record shape. Normalize to an array so `.map` is safe, and treat the\n // non-array (record) shape as ready — otherwise the absolute-positioned\n // RCELoader overlay stays mounted and the editor row becomes unclickable.\n const isRecordShape = !Array.isArray(buttons);\n const safeButtons: readonly RicosExternalToolbarButton[] = isRecordShape\n ? []\n : buttons;\n const signature = safeButtons.map((b) => b.id).join('|');\n const buttonsRef = useRef(safeButtons);\n buttonsRef.current = safeButtons;\n\n useEffect(() => {\n onButtonsChange(buttonsRef.current);\n onReadyChange(buttonsRef.current.length > 0 || isRecordShape);\n }, [signature, isRecordShape, onButtonsChange, onReadyChange]);\n\n return null;\n};\n\nInsertToolbarSync.displayName = 'InsertToolbarSync';\n\nconst filterStaticToolbarButtons = (button: string) =>\n button !== FORMATTING_BUTTONS.CODE_BLOCK;\n\nconst RCE = forwardRef<RCEHandle, RCEProps & ToggleFullscreenButtonProps>(\n (\n {\n content,\n injectedContent,\n onChange,\n autoFocus,\n onFocus,\n onBlur,\n className,\n dataHook,\n colorScheme,\n isFullScreen,\n onToggleFullScreen,\n hidden,\n ...ricosProps\n },\n ref,\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const containerHeightRef = useRef<number | undefined>();\n\n // Stable identity so RicosEditor doesn't see a new `container` prop each render.\n const getContainer = useCallback(() => containerRef.current, []);\n\n const onFullScreenChange = useCallback(() => {\n onToggleFullScreen?.();\n\n if (containerRef.current) {\n containerHeightRef.current = containerRef.current.clientHeight;\n }\n }, [onToggleFullScreen]);\n\n const editorRef = useRef<RicosEditorAPI | null>(null);\n const [editor, setEditor] = useState<RicosEditorAPI | null>(null);\n const [isToolbarReady, setIsToolbarReady] = useState(false);\n const [toolbarButtons, setToolbarButtons] = useState<\n readonly RicosExternalToolbarButton[]\n >([]);\n const [toolbarContainer, setToolbarContainer] =\n useState<HTMLDivElement | null>(null);\n\n const setEditorInstance = useCallback(\n (nextEditor: RicosEditorAPI | null) => {\n editorRef.current = nextEditor;\n setEditor(nextEditor);\n },\n [],\n );\n\n const setContent = useCallback((nextContent: RicosDocument) => {\n editorRef.current?.getEditorCommands().setContent(nextContent);\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n isContentChanged: () =>\n Boolean(editorRef.current?.getContentTraits().isContentChanged),\n prePublish: async () =>\n (await editorRef.current?.prePublish()) ??\n INITIAL_INJECTED_RICH_CONTENT,\n setContent,\n }),\n [setContent],\n );\n\n const appliedInjectedContentRef = useRef<RicosDocument | undefined>();\n useEffect(() => {\n if (\n !injectedContent ||\n isEqual(INITIAL_INJECTED_RICH_CONTENT, injectedContent) ||\n isEqual(appliedInjectedContentRef.current, injectedContent)\n ) {\n return;\n }\n\n appliedInjectedContentRef.current = injectedContent;\n const timerId = window.setTimeout(() => {\n setContent(injectedContent);\n }, 0);\n\n return () => window.clearTimeout(timerId);\n }, [injectedContent, setContent]);\n\n useEffect(() => {\n if (!autoFocus || !editorRef.current) {\n return;\n }\n\n const frameId = requestAnimationFrame(() => {\n editorRef.current?.focus();\n });\n\n return () => cancelAnimationFrame(frameId);\n }, [autoFocus, editor]);\n\n const toolbars = useMemo<ToolbarsConfig | undefined>(() => {\n if (!toolbarContainer) {\n return undefined;\n }\n\n return {\n text: {\n mode: 'static',\n container: toolbarContainer,\n alignment: 'left',\n buttons: ({ defaultButtons }) =>\n defaultButtons.filter(filterStaticToolbarButtons),\n },\n insert: {\n footer: {\n disabled: true,\n },\n },\n };\n }, [toolbarContainer]);\n\n const isModalOpenRef = useRef(false);\n const modalSettings = useMemo<RicosEditorProps['modalSettings']>(\n () => ({\n onModalOpen() {\n isModalOpenRef.current = true;\n },\n onModalClose() {\n isModalOpenRef.current = false;\n },\n }),\n [],\n );\n\n const isFocusedRef = useRef(false);\n const isBlurringRef = useRef(false);\n\n const triggerFocus = useCallback(() => {\n isBlurringRef.current = false;\n\n if (isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = true;\n onFocus?.();\n }, [onFocus]);\n const triggerBlur = useCallback(() => {\n isBlurringRef.current = false;\n\n if (!isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = false;\n onBlur?.();\n }, [onBlur]);\n\n const requestBlurCallback = useRequestFrameCallback();\n const requestEditorBlur = useCallback(() => {\n isBlurringRef.current = true;\n requestBlurCallback(() => isBlurringRef.current && triggerBlur());\n }, [triggerBlur, requestBlurCallback]);\n\n const handleFocus = useCallback<FocusEventHandler>(() => {\n if (containerRef.current === getActiveElement()) {\n editorRef.current?.focus();\n }\n\n triggerFocus();\n }, [triggerFocus]);\n const handleBlur = useCallback<FocusEventHandler>(\n ({ relatedTarget }) => {\n if (!relatedTarget) {\n requestEditorBlur();\n return;\n }\n\n if (\n isModalOpenRef.current ||\n containerRef.current?.contains(relatedTarget)\n ) {\n return;\n }\n\n if (!getAppRootElement().contains(relatedTarget)) {\n requestEditorBlur();\n } else {\n triggerBlur();\n }\n },\n [triggerBlur, requestEditorBlur],\n );\n\n const wixRicosProps = useWixRicosProps();\n const plugins = usePlugins(colorScheme);\n\n return (\n <div\n ref={containerRef}\n data-hook=\"rich-content.editor\"\n className={st(classes.root, className)}\n tabIndex={onFocus || onBlur ? 0 : undefined}\n onFocus={handleFocus}\n onBlur={handleBlur}\n style={{\n height: hidden ? containerHeightRef.current : undefined,\n }}\n >\n <div className={classes.toolbarAndFullScreenButtonWrapper}>\n <div className={classes.toolbarContainer} ref={setToolbarContainer} />\n {!hidden && isToolbarReady && (\n <ToggleFullscreenButton\n isFullScreen={isFullScreen}\n onToggleFullScreen={onFullScreenChange}\n />\n )}\n </div>\n\n {editor && (\n <InsertToolbarSync\n editor={editor}\n onButtonsChange={setToolbarButtons}\n onReadyChange={setIsToolbarReady}\n />\n )}\n\n {!hidden ? (\n <div data-hook={dataHook} className={classes.editor}>\n <RicosEditor\n ref={setEditorInstance}\n plugins={plugins}\n initialContent={content}\n toolbars={toolbars}\n modalSettings={modalSettings}\n textWrap={false}\n onChange={onChange}\n container={getContainer}\n {...ricosProps}\n {...wixRicosProps}\n />\n </div>\n ) : null}\n\n {!isToolbarReady && <RCELoader />}\n {!hidden && isToolbarReady && (\n <div\n data-hook=\"rich-content.footerToolbar\"\n className={classes.footerToolbarContainer}\n >\n <ExternalToolbar buttons={toolbarButtons} />\n </div>\n )}\n </div>\n );\n },\n);\nRCE.displayName = 'RCE';\n\nconst RCELoader: React.FC = () => (\n <Box\n align=\"center\"\n verticalAlign=\"middle\"\n position=\"absolute\"\n top=\"0\"\n bottom=\"0\"\n width=\"100%\"\n >\n <Loader size=\"small\" />\n </Box>\n);\nRCELoader.displayName = 'RCELoader';\n\nconst LOADER_DELAY = 100;\n\nexport type RichContentEditorProps = Omit<RCEProps, 'onChange'> & {\n onEnterFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onExitFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onChange?: (content: RicosDocument, isContentChanged?: boolean) => void;\n onPublish?: (promise: Promise<RicosDocument>) => void;\n fullScreenOnly?: boolean;\n};\n\nexport const RichContentEditor: FC<RichContentEditorProps> = ({\n onFocus,\n onBlur,\n onEnterFullScreen,\n onExitFullScreen,\n fullScreenOnly,\n onPublish,\n onChange,\n theme,\n content,\n ...props\n}) => {\n const editorRef = useRef<RCEHandle>(null);\n const modalEditorRef = useRef<RCEHandle>(null);\n\n const isRichContentChanged = useCallback(\n () =>\n Boolean(\n editorRef.current?.isContentChanged() ||\n modalEditorRef.current?.isContentChanged(),\n ),\n [],\n );\n const handleChange = useCallback(\n (richContent: RicosDocument) => {\n onChange?.(richContent, isRichContentChanged());\n },\n [onChange, isRichContentChanged],\n );\n\n const [loader, setLoader] = useState(false);\n const timer = useRef<number>(0);\n const resetLoader = useCallback(() => {\n window.clearTimeout(timer.current);\n setLoader(false);\n }, []);\n const queueLoader = useCallback(() => {\n timer.current = window.setTimeout(() => {\n setLoader(true);\n }, LOADER_DELAY);\n }, []);\n\n const [isFullScreen, setIsFullScreen] = useState(!!fullScreenOnly);\n const [fullScreenContent, setFullScreenContent] = useState(content);\n\n useEffect(() => {\n if (!isFullScreen) {\n setFullScreenContent(content);\n }\n }, [content, isFullScreen]);\n\n const publishEditorContent = useCallback(\n async (\n editorHandle: RCEHandle | null,\n fallbackContent?: RicosDocument,\n ): Promise<RicosDocument> => {\n if (!editorHandle) {\n return fallbackContent ?? INITIAL_INJECTED_RICH_CONTENT;\n }\n\n return (\n (await editorHandle.prePublish()) ??\n fallbackContent ??\n INITIAL_INJECTED_RICH_CONTENT\n );\n },\n [],\n );\n\n const onOpen = useCallback(async () => {\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(editorRef.current, content);\n onEnterFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onEnterFullScreen?.(content, isChanged);\n } finally {\n setFullScreenContent(finalContent);\n setIsFullScreen(true);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onEnterFullScreen,\n publishEditorContent,\n ]);\n const onClose = useCallback(async () => {\n queueLoader();\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(\n modalEditorRef.current,\n content,\n );\n onExitFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onExitFullScreen?.(content, isChanged);\n } finally {\n resetLoader();\n setIsFullScreen(false);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onExitFullScreen,\n publishEditorContent,\n queueLoader,\n resetLoader,\n ]);\n\n const handleBlur = useCallback(() => {\n if (isRichContentChanged()) {\n onPublish?.(\n publishEditorContent(editorRef.current, content).catch(\n () => content ?? INITIAL_INJECTED_RICH_CONTENT,\n ),\n );\n }\n onBlur?.();\n }, [content, isRichContentChanged, onBlur, onPublish, publishEditorContent]);\n\n useEffect(() => {\n if (!isFullScreen) {\n return;\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n void onClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown, true);\n return () => document.removeEventListener('keydown', handleKeyDown, true);\n }, [isFullScreen, onClose]);\n\n const rceProps = {\n onChange: handleChange,\n };\n\n // Must be memoized: Ricos re-processes `theme` whenever its identity changes,\n // so passing a freshly cloned object every render drives an infinite\n // re-render loop (freezes the tab) once the fullscreen editor mounts.\n const fullScreenTheme = useMemo(\n () =>\n defaultsDeep(cloneDeep(theme), {\n customStyles: { editor: { maxHeight: '100%' } },\n settingsStyles: {\n modals: {\n dialogZIndex: Z_INDEX_MODAL_POPOVER,\n },\n },\n }),\n [theme],\n );\n\n return (\n <>\n <UserSiteFonts />\n {!fullScreenOnly && (\n <RCE\n {...props}\n {...rceProps}\n content={content}\n theme={theme}\n onFocus={onFocus}\n onBlur={handleBlur}\n hidden={isFullScreen}\n ref={editorRef}\n isFullScreen={false}\n onToggleFullScreen={onOpen}\n />\n )}\n <FullscreenModal isOpen={isFullScreen} isLoading={loader}>\n <RCE\n {...props}\n {...rceProps}\n content={fullScreenContent}\n theme={fullScreenTheme}\n autoFocus\n className={classes.modalEditor}\n ref={modalEditorRef}\n isFullScreen\n onToggleFullScreen={onClose}\n />\n </FullscreenModal>\n </>\n );\n};\nRichContentEditor.displayName = 'RichContentEditor';\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAUA,IAAAK,aAAA,GAAAL,OAAA;AAQA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAKA,IAAAW,kBAAA,GAAAX,OAAA;AAOA,IAAAY,QAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,uBAAA,GAAAd,OAAA;AAA8D,IAAAe,YAAA;AAAA,SAAAX,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,O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AA,MACEkK,KAAK,EACL8B,QAAQ;IACZ5J,OAAO,EAAEA,OAAQ;IACjB6H,KAAK,EAAEA,KAAM;IACbzH,OAAO,EAAEA,OAAQ;IACjBC,MAAM,EAAE2E,UAAW;IACnBrE,MAAM,EAAEF,YAAa;IACrBI,GAAG,EAAEO,SAAU;IACfX,YAAY,EAAE,KAAM;IACpBC,kBAAkB,EAAEsI,MAAO;IAAAhD,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjJ,YAAA;MAAAkJ,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC5B,CACF,eACD/J,MAAA,CAAAuB,OAAA,CAAA6H,aAAA,CAAC5I,kBAAA,CAAA2N,eAAe;IAACC,MAAM,EAAEhK,YAAa;IAACiK,SAAS,EAAErC,MAAO;IAAArC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjJ,YAAA;MAAAkJ,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACvD/J,MAAA,CAAAuB,OAAA,CAAA6H,aAAA,CAAC3F,GAAG,MAAA0G,SAAA,CAAA5I,OAAA,MACEkK,KAAK,EACL8B,QAAQ;IACZ5J,OAAO,EAAE2I,iBAAkB;IAC3Bd,KAAK,EAAEgC,eAAgB;IACvB1J,SAAS;IACTG,SAAS,EAAEqF,+BAAO,CAACgF,WAAY;IAC/B9J,GAAG,EAAEkH,cAAe;IACpBtH,YAAY;IACZC,kBAAkB,EAAE0I,OAAQ;IAAApD,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjJ,YAAA;MAAAkJ,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC7B,CACc,CACjB,CAAC;AAEP,CAAC;AAACwE,OAAA,CAAApD,iBAAA,GAAAA,iBAAA;AACFA,iBAAiB,CAAC/H,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_isEqual","_interopRequireDefault","require","_cloneDeep","_defaultsDeep","_react","_interopRequireWildcard","_designSystem","_loadRicos","_hooks","_utils","_userSiteFonts","_common","_richContentCommon","_plugins","_richContentToolbar","_richContentEditorStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","InsertToolbarSync","editor","onButtonsChange","onReadyChange","buttons","useToolbarProps","isRecordShape","Array","isArray","safeButtons","signature","map","b","id","join","buttonsRef","useRef","current","useEffect","length","displayName","filterStaticToolbarButtons","button","RCE","forwardRef","content","injectedContent","onChange","autoFocus","onFocus","onBlur","className","dataHook","colorScheme","isFullScreen","onToggleFullScreen","hidden","ricosProps","ref","containerRef","containerHeightRef","getContainer","useCallback","onFullScreenChange","clientHeight","editorRef","setEditor","useState","isToolbarReady","setIsToolbarReady","toolbarButtons","setToolbarButtons","toolbarContainer","setToolbarContainer","setEditorInstance","nextEditor","setContent","nextContent","_editorRef$current","getEditorCommands","useImperativeHandle","isContentChanged","_editorRef$current2","Boolean","getContentTraits","prePublish","_editorRef$current3","INITIAL_INJECTED_RICH_CONTENT","appliedInjectedContentRef","isEqual","timerId","window","setTimeout","clearTimeout","frameId","requestAnimationFrame","_editorRef$current4","focus","cancelAnimationFrame","toolbars","useMemo","undefined","text","mode","container","alignment","defaultButtons","filter","insert","footer","disabled","isModalOpenRef","modalSettings","onModalOpen","onModalClose","isFocusedRef","isBlurringRef","triggerFocus","triggerBlur","requestBlurCallback","useRequestFrameCallback","requestEditorBlur","handleFocus","getActiveElement","_editorRef$current5","handleBlur","relatedTarget","_containerRef$current","contains","getAppRootElement","wixRicosProps","useWixRicosProps","ricos","useRicosFromCdn","plugins","usePlugins","RicosEditor","createElement","st","classes","root","tabIndex","style","height","__self","__source","fileName","lineNumber","columnNumber","toolbarAndFullScreenButtonWrapper","ToggleFullscreenButton","_extends2","initialContent","textWrap","RCELoader","footerToolbarContainer","ExternalToolbar","Box","align","verticalAlign","position","top","bottom","width","Loader","size","LOADER_DELAY","RichContentEditor","onEnterFullScreen","onExitFullScreen","fullScreenOnly","onPublish","theme","props","modalEditorRef","isRichContentChanged","_editorRef$current6","_modalEditorRef$curre","handleChange","richContent","loader","setLoader","timer","resetLoader","queueLoader","setIsFullScreen","fullScreenContent","setFullScreenContent","publishEditorContent","editorHandle","fallbackContent","onOpen","finalContent","isChanged","error","onClose","catch","handleKeyDown","key","stopPropagation","document","addEventListener","removeEventListener","rceProps","fullScreenTheme","defaultsDeep","cloneDeep","customStyles","maxHeight","settingsStyles","modals","dialogZIndex","Z_INDEX_MODAL_POPOVER","Fragment","UserSiteFonts","FullscreenModal","isOpen","isLoading","modalEditor","exports"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx"],"sourcesContent":["import isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport defaultsDeep from 'lodash/defaultsDeep';\n\nimport type { FC, FocusEventHandler } from 'react';\nimport React, {\n forwardRef,\n useRef,\n useMemo,\n useState,\n useEffect,\n useCallback,\n useImperativeHandle,\n} from 'react';\n\nimport { Box, Loader } from '@wix/design-system';\nimport type { RicosDocument } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\nimport type {\n ExternalToolbarButton as RicosExternalToolbarButton,\n RicosEditorAPI,\n RicosEditorProps,\n ToolbarsConfig,\n} from '@wix/patterns-fields-utils/@wix/patterns-fields-ricos-statics';\n\nimport { useRicosFromCdn } from '../../cdn/load-ricos';\nimport { useRequestFrameCallback } from '../../../../hooks';\nimport { getActiveElement, getAppRootElement } from '../../../../utils';\nimport { UserSiteFonts } from '../../../user-site-fonts';\nimport { Z_INDEX_MODAL_POPOVER } from '../../../common';\n\nimport type { ColorScheme } from '../../types';\n\nimport type { ToggleFullscreenButtonProps } from '../rich-content-common';\nimport {\n useWixRicosProps,\n FullscreenModal,\n ToggleFullscreenButton,\n INITIAL_INJECTED_RICH_CONTENT,\n} from '../rich-content-common';\n\nimport { usePlugins } from './plugins';\nimport { ExternalToolbar } from './rich-content-toolbar';\nimport { st, classes } from './rich-content-editor.st.css.js';\n\ntype RicosProps = Pick<RicosEditorProps, 'biSettings' | 'theme'> & {\n wixExperiments?: unknown;\n};\n\ninterface RCEHandle {\n isContentChanged: () => boolean;\n prePublish: () => Promise<RicosDocument>;\n setContent: (content: RicosDocument) => void;\n}\n\ninterface RCEProps extends RicosProps {\n content?: RicosDocument;\n injectedContent?: RicosDocument;\n onChange?: (content: RicosDocument) => void;\n autoFocus?: boolean;\n onFocus?: () => void;\n onBlur?: () => void;\n className?: string;\n colorScheme?: ColorScheme;\n hidden?: boolean;\n dataHook?: string;\n}\n\ntype ToolbarSyncProps = {\n editor: RicosEditorAPI;\n onButtonsChange: (buttons: readonly RicosExternalToolbarButton[]) => void;\n onReadyChange: (ready: boolean) => void;\n};\n\nconst InsertToolbarSync: FC<ToolbarSyncProps> = ({\n editor,\n onButtonsChange,\n onReadyChange,\n}) => {\n const { buttons } = editor.useToolbarProps('insert');\n\n // Ricos 11's next-runtime proxy is supposed to convert the legacy\n // `Record<string, ToolbarButtonProps>` into a v2 `ExternalToolbarButton[]`,\n // but some consumer bundles end up calling through to the inner adapter\n // (duplicate ricos copies / unwrapped ref) and we receive the\n // record shape. Normalize to an array so `.map` is safe, and treat the\n // non-array (record) shape as ready — otherwise the absolute-positioned\n // RCELoader overlay stays mounted and the editor row becomes unclickable.\n const isRecordShape = !Array.isArray(buttons);\n const safeButtons: readonly RicosExternalToolbarButton[] = isRecordShape\n ? []\n : buttons;\n const signature = safeButtons.map((b) => b.id).join('|');\n const buttonsRef = useRef(safeButtons);\n buttonsRef.current = safeButtons;\n\n useEffect(() => {\n onButtonsChange(buttonsRef.current);\n onReadyChange(buttonsRef.current.length > 0 || isRecordShape);\n }, [signature, isRecordShape, onButtonsChange, onReadyChange]);\n\n return null;\n};\n\nInsertToolbarSync.displayName = 'InsertToolbarSync';\n\nconst filterStaticToolbarButtons = (button: string) =>\n // Inlined rather than read off the CDN module's `FORMATTING_BUTTONS`: this is\n // a plain string constant and the filter runs before the module has loaded.\n button !== 'CODE_BLOCK';\n\nconst RCE = forwardRef<RCEHandle, RCEProps & ToggleFullscreenButtonProps>(\n (\n {\n content,\n injectedContent,\n onChange,\n autoFocus,\n onFocus,\n onBlur,\n className,\n dataHook,\n colorScheme,\n isFullScreen,\n onToggleFullScreen,\n hidden,\n ...ricosProps\n },\n ref,\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const containerHeightRef = useRef<number | undefined>();\n\n // Stable identity so RicosEditor doesn't see a new `container` prop each render.\n const getContainer = useCallback(() => containerRef.current, []);\n\n const onFullScreenChange = useCallback(() => {\n onToggleFullScreen?.();\n\n if (containerRef.current) {\n containerHeightRef.current = containerRef.current.clientHeight;\n }\n }, [onToggleFullScreen]);\n\n const editorRef = useRef<RicosEditorAPI | null>(null);\n const [editor, setEditor] = useState<RicosEditorAPI | null>(null);\n const [isToolbarReady, setIsToolbarReady] = useState(false);\n const [toolbarButtons, setToolbarButtons] = useState<\n readonly RicosExternalToolbarButton[]\n >([]);\n const [toolbarContainer, setToolbarContainer] =\n useState<HTMLDivElement | null>(null);\n\n const setEditorInstance = useCallback(\n (nextEditor: RicosEditorAPI | null) => {\n editorRef.current = nextEditor;\n setEditor(nextEditor);\n },\n [],\n );\n\n const setContent = useCallback((nextContent: RicosDocument) => {\n editorRef.current?.getEditorCommands().setContent(nextContent);\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n isContentChanged: () =>\n Boolean(editorRef.current?.getContentTraits().isContentChanged),\n prePublish: async () =>\n (await editorRef.current?.prePublish()) ??\n INITIAL_INJECTED_RICH_CONTENT,\n setContent,\n }),\n [setContent],\n );\n\n const appliedInjectedContentRef = useRef<RicosDocument | undefined>();\n useEffect(() => {\n if (\n !injectedContent ||\n isEqual(INITIAL_INJECTED_RICH_CONTENT, injectedContent) ||\n isEqual(appliedInjectedContentRef.current, injectedContent)\n ) {\n return;\n }\n\n appliedInjectedContentRef.current = injectedContent;\n const timerId = window.setTimeout(() => {\n setContent(injectedContent);\n }, 0);\n\n return () => window.clearTimeout(timerId);\n }, [injectedContent, setContent]);\n\n useEffect(() => {\n if (!autoFocus || !editorRef.current) {\n return;\n }\n\n const frameId = requestAnimationFrame(() => {\n editorRef.current?.focus();\n });\n\n return () => cancelAnimationFrame(frameId);\n }, [autoFocus, editor]);\n\n const toolbars = useMemo<ToolbarsConfig | undefined>(() => {\n if (!toolbarContainer) {\n return undefined;\n }\n\n return {\n text: {\n mode: 'static',\n container: toolbarContainer,\n alignment: 'left',\n buttons: ({ defaultButtons }) =>\n defaultButtons.filter(filterStaticToolbarButtons),\n },\n insert: {\n footer: {\n disabled: true,\n },\n },\n };\n }, [toolbarContainer]);\n\n const isModalOpenRef = useRef(false);\n const modalSettings = useMemo<RicosEditorProps['modalSettings']>(\n () => ({\n onModalOpen() {\n isModalOpenRef.current = true;\n },\n onModalClose() {\n isModalOpenRef.current = false;\n },\n }),\n [],\n );\n\n const isFocusedRef = useRef(false);\n const isBlurringRef = useRef(false);\n\n const triggerFocus = useCallback(() => {\n isBlurringRef.current = false;\n\n if (isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = true;\n onFocus?.();\n }, [onFocus]);\n const triggerBlur = useCallback(() => {\n isBlurringRef.current = false;\n\n if (!isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = false;\n onBlur?.();\n }, [onBlur]);\n\n const requestBlurCallback = useRequestFrameCallback();\n const requestEditorBlur = useCallback(() => {\n isBlurringRef.current = true;\n requestBlurCallback(() => isBlurringRef.current && triggerBlur());\n }, [triggerBlur, requestBlurCallback]);\n\n const handleFocus = useCallback<FocusEventHandler>(() => {\n if (containerRef.current === getActiveElement()) {\n editorRef.current?.focus();\n }\n\n triggerFocus();\n }, [triggerFocus]);\n const handleBlur = useCallback<FocusEventHandler>(\n ({ relatedTarget }) => {\n if (!relatedTarget) {\n requestEditorBlur();\n return;\n }\n\n if (\n isModalOpenRef.current ||\n containerRef.current?.contains(relatedTarget)\n ) {\n return;\n }\n\n if (!getAppRootElement().contains(relatedTarget)) {\n requestEditorBlur();\n } else {\n triggerBlur();\n }\n },\n [triggerBlur, requestEditorBlur],\n );\n\n const wixRicosProps = useWixRicosProps();\n const ricos = useRicosFromCdn();\n const plugins = usePlugins(ricos, colorScheme);\n const RicosEditor = ricos?.RicosEditor;\n\n return (\n <div\n ref={containerRef}\n data-hook=\"rich-content.editor\"\n className={st(classes.root, className)}\n tabIndex={onFocus || onBlur ? 0 : undefined}\n onFocus={handleFocus}\n onBlur={handleBlur}\n style={{\n height: hidden ? containerHeightRef.current : undefined,\n }}\n >\n <div className={classes.toolbarAndFullScreenButtonWrapper}>\n <div className={classes.toolbarContainer} ref={setToolbarContainer} />\n {!hidden && isToolbarReady && (\n <ToggleFullscreenButton\n isFullScreen={isFullScreen}\n onToggleFullScreen={onFullScreenChange}\n />\n )}\n </div>\n\n {editor && (\n <InsertToolbarSync\n editor={editor}\n onButtonsChange={setToolbarButtons}\n onReadyChange={setIsToolbarReady}\n />\n )}\n\n {!hidden && RicosEditor ? (\n <div data-hook={dataHook} className={classes.editor}>\n <RicosEditor\n ref={setEditorInstance}\n plugins={plugins}\n initialContent={content}\n toolbars={toolbars}\n modalSettings={modalSettings}\n textWrap={false}\n onChange={onChange}\n container={getContainer}\n {...ricosProps}\n {...wixRicosProps}\n />\n </div>\n ) : null}\n\n {!isToolbarReady && <RCELoader />}\n {!hidden && isToolbarReady && (\n <div\n data-hook=\"rich-content.footerToolbar\"\n className={classes.footerToolbarContainer}\n >\n <ExternalToolbar buttons={toolbarButtons} />\n </div>\n )}\n </div>\n );\n },\n);\nRCE.displayName = 'RCE';\n\nconst RCELoader: React.FC = () => (\n <Box\n align=\"center\"\n verticalAlign=\"middle\"\n position=\"absolute\"\n top=\"0\"\n bottom=\"0\"\n width=\"100%\"\n >\n <Loader size=\"small\" />\n </Box>\n);\nRCELoader.displayName = 'RCELoader';\n\nconst LOADER_DELAY = 100;\n\nexport type RichContentEditorProps = Omit<RCEProps, 'onChange'> & {\n onEnterFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onExitFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onChange?: (content: RicosDocument, isContentChanged?: boolean) => void;\n onPublish?: (promise: Promise<RicosDocument>) => void;\n fullScreenOnly?: boolean;\n};\n\nexport const RichContentEditor: FC<RichContentEditorProps> = ({\n onFocus,\n onBlur,\n onEnterFullScreen,\n onExitFullScreen,\n fullScreenOnly,\n onPublish,\n onChange,\n theme,\n content,\n ...props\n}) => {\n const editorRef = useRef<RCEHandle>(null);\n const modalEditorRef = useRef<RCEHandle>(null);\n\n const isRichContentChanged = useCallback(\n () =>\n Boolean(\n editorRef.current?.isContentChanged() ||\n modalEditorRef.current?.isContentChanged(),\n ),\n [],\n );\n const handleChange = useCallback(\n (richContent: RicosDocument) => {\n onChange?.(richContent, isRichContentChanged());\n },\n [onChange, isRichContentChanged],\n );\n\n const [loader, setLoader] = useState(false);\n const timer = useRef<number>(0);\n const resetLoader = useCallback(() => {\n window.clearTimeout(timer.current);\n setLoader(false);\n }, []);\n const queueLoader = useCallback(() => {\n timer.current = window.setTimeout(() => {\n setLoader(true);\n }, LOADER_DELAY);\n }, []);\n\n const [isFullScreen, setIsFullScreen] = useState(!!fullScreenOnly);\n const [fullScreenContent, setFullScreenContent] = useState(content);\n\n useEffect(() => {\n if (!isFullScreen) {\n setFullScreenContent(content);\n }\n }, [content, isFullScreen]);\n\n const publishEditorContent = useCallback(\n async (\n editorHandle: RCEHandle | null,\n fallbackContent?: RicosDocument,\n ): Promise<RicosDocument> => {\n if (!editorHandle) {\n return fallbackContent ?? INITIAL_INJECTED_RICH_CONTENT;\n }\n\n return (\n (await editorHandle.prePublish()) ??\n fallbackContent ??\n INITIAL_INJECTED_RICH_CONTENT\n );\n },\n [],\n );\n\n const onOpen = useCallback(async () => {\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(editorRef.current, content);\n onEnterFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onEnterFullScreen?.(content, isChanged);\n } finally {\n setFullScreenContent(finalContent);\n setIsFullScreen(true);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onEnterFullScreen,\n publishEditorContent,\n ]);\n const onClose = useCallback(async () => {\n queueLoader();\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(\n modalEditorRef.current,\n content,\n );\n onExitFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onExitFullScreen?.(content, isChanged);\n } finally {\n resetLoader();\n setIsFullScreen(false);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onExitFullScreen,\n publishEditorContent,\n queueLoader,\n resetLoader,\n ]);\n\n const handleBlur = useCallback(() => {\n if (isRichContentChanged()) {\n onPublish?.(\n publishEditorContent(editorRef.current, content).catch(\n () => content ?? INITIAL_INJECTED_RICH_CONTENT,\n ),\n );\n }\n onBlur?.();\n }, [content, isRichContentChanged, onBlur, onPublish, publishEditorContent]);\n\n useEffect(() => {\n if (!isFullScreen) {\n return;\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n void onClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown, true);\n return () => document.removeEventListener('keydown', handleKeyDown, true);\n }, [isFullScreen, onClose]);\n\n const rceProps = {\n onChange: handleChange,\n };\n\n // Must be memoized: Ricos re-processes `theme` whenever its identity changes,\n // so passing a freshly cloned object every render drives an infinite\n // re-render loop (freezes the tab) once the fullscreen editor mounts.\n const fullScreenTheme = useMemo(\n () =>\n defaultsDeep(cloneDeep(theme), {\n customStyles: { editor: { maxHeight: '100%' } },\n settingsStyles: {\n modals: {\n dialogZIndex: Z_INDEX_MODAL_POPOVER,\n },\n },\n }),\n [theme],\n );\n\n return (\n <>\n <UserSiteFonts />\n {!fullScreenOnly && (\n <RCE\n {...props}\n {...rceProps}\n content={content}\n theme={theme}\n onFocus={onFocus}\n onBlur={handleBlur}\n hidden={isFullScreen}\n ref={editorRef}\n isFullScreen={false}\n onToggleFullScreen={onOpen}\n />\n )}\n <FullscreenModal isOpen={isFullScreen} isLoading={loader}>\n <RCE\n {...props}\n {...rceProps}\n content={fullScreenContent}\n theme={fullScreenTheme}\n autoFocus\n className={classes.modalEditor}\n ref={modalEditorRef}\n isFullScreen\n onToggleFullScreen={onClose}\n />\n </FullscreenModal>\n </>\n );\n};\nRichContentEditor.displayName = 'RichContentEditor';\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAUA,IAAAK,aAAA,GAAAL,OAAA;AASA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAKA,IAAAW,kBAAA,GAAAX,OAAA;AAOA,IAAAY,QAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,uBAAA,GAAAd,OAAA;AAA8D,IAAAe,YAAA;AAAA,SAAAX,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OA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,OAAO,EAAEA,OAAQ;IACjBC,MAAM,EAAE2E,UAAW;IACnBrE,MAAM,EAAEF,YAAa;IACrBI,GAAG,EAAEO,SAAU;IACfX,YAAY,EAAE,KAAM;IACpBC,kBAAkB,EAAEwI,MAAO;IAAA/C,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlJ,YAAA;MAAAmJ,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC5B,CACF,eACDhK,MAAA,CAAAuB,OAAA,CAAA8H,aAAA,CAAC7I,kBAAA,CAAA2N,eAAe;IAACC,MAAM,EAAElK,YAAa;IAACmK,SAAS,EAAErC,MAAO;IAAApC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlJ,YAAA;MAAAmJ,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACvDhK,MAAA,CAAAuB,OAAA,CAAA8H,aAAA,CAAC9F,GAAG,MAAA4G,SAAA,CAAA5I,OAAA,MACEkK,KAAK,EACL8B,QAAQ;IACZ9J,OAAO,EAAE6I,iBAAkB;IAC3Bd,KAAK,EAAEgC,eAAgB;IACvB5J,SAAS;IACTG,SAAS,EAAEwF,+BAAO,CAAC+E,WAAY;IAC/BhK,GAAG,EAAEoH,cAAe;IACpBxH,YAAY;IACZC,kBAAkB,EAAE4I,OAAQ;IAAAnD,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlJ,YAAA;MAAAmJ,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC7B,CACc,CACjB,CAAC;AAEP,CAAC;AAACuE,OAAA,CAAApD,iBAAA,GAAAA,iBAAA;AACFA,iBAAiB,CAAC/H,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -5,19 +5,19 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../../../../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontenteditor2982314878";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
16
|
-
"toolbarContainer": "
|
|
17
|
-
"footerToolbarContainer": "
|
|
18
|
-
"toolbarAndFullScreenButtonWrapper": "
|
|
19
|
-
"editor": "
|
|
20
|
-
"modalEditor": "
|
|
15
|
+
"root": "richcontenteditor2982314878__root",
|
|
16
|
+
"toolbarContainer": "richcontenteditor2982314878__toolbarContainer",
|
|
17
|
+
"footerToolbarContainer": "richcontenteditor2982314878__footerToolbarContainer",
|
|
18
|
+
"toolbarAndFullScreenButtonWrapper": "richcontenteditor2982314878__toolbarAndFullScreenButtonWrapper",
|
|
19
|
+
"editor": "richcontenteditor2982314878__editor",
|
|
20
|
+
"modalEditor": "richcontenteditor2982314878__modalEditor"
|
|
21
21
|
};
|
|
22
22
|
var keyframes = exports.keyframes = {};
|
|
23
23
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontenteditor2982314878\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontenteditor2982314878__root\",\"toolbarContainer\":\"richcontenteditor2982314878__toolbarContainer\",\"footerToolbarContainer\":\"richcontenteditor2982314878__footerToolbarContainer\",\"toolbarAndFullScreenButtonWrapper\":\"richcontenteditor2982314878__toolbarAndFullScreenButtonWrapper\",\"editor\":\"richcontenteditor2982314878__editor\",\"modalEditor\":\"richcontenteditor2982314878__modalEditor\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-font-family-default\":\"--wds-font-family-default\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,6BAA6B;AAC/C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,mCAAmC;EAAC,kBAAkB,EAAC,+CAA+C;EAAC,wBAAwB,EAAC,qDAAqD;EAAC,mCAAmC,EAAC,gEAAgE;EAAC,QAAQ,EAAC,qCAAqC;EAAC,aAAa,EAAC;AAA0C,CAAC;AACzZ,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,yBAAyB,EAAC;AAA2B,CAAC","ignoreList":[]}
|
|
@@ -5,9 +5,10 @@ exports.__esModule = true;
|
|
|
5
5
|
exports.ExternalToolbar = void 0;
|
|
6
6
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _designSystem = require("@wix/design-system");
|
|
9
9
|
var _richContentToolbarStCss = require("./rich-content-toolbar.st.css.js");
|
|
10
|
-
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/fields/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.tsx";
|
|
10
|
+
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/fields/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.tsx"; // WDS rather than ricos's Tooltip: this toolbar renders from state the editor
|
|
11
|
+
// pushes out, so it must not depend on the CDN module being loaded.
|
|
11
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
13
|
class ExternalToolbar extends _react.Component {
|
|
13
14
|
constructor(...args) {
|
|
@@ -21,7 +22,7 @@ class ExternalToolbar extends _react.Component {
|
|
|
21
22
|
__self: this,
|
|
22
23
|
__source: {
|
|
23
24
|
fileName: _jsxFileName,
|
|
24
|
-
lineNumber:
|
|
25
|
+
lineNumber: 19,
|
|
25
26
|
columnNumber: 14
|
|
26
27
|
}
|
|
27
28
|
});
|
|
@@ -33,7 +34,7 @@ class ExternalToolbar extends _react.Component {
|
|
|
33
34
|
__self: this,
|
|
34
35
|
__source: {
|
|
35
36
|
fileName: _jsxFileName,
|
|
36
|
-
lineNumber:
|
|
37
|
+
lineNumber: 24,
|
|
37
38
|
columnNumber: 14
|
|
38
39
|
}
|
|
39
40
|
});
|
|
@@ -54,13 +55,13 @@ class ExternalToolbar extends _react.Component {
|
|
|
54
55
|
referenceElement: event.currentTarget
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
|
|
58
59
|
content: button.tooltip,
|
|
59
60
|
key: button.id,
|
|
60
61
|
__self: this,
|
|
61
62
|
__source: {
|
|
62
63
|
fileName: _jsxFileName,
|
|
63
|
-
lineNumber:
|
|
64
|
+
lineNumber: 45,
|
|
64
65
|
columnNumber: 7
|
|
65
66
|
}
|
|
66
67
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -72,14 +73,14 @@ class ExternalToolbar extends _react.Component {
|
|
|
72
73
|
__self: this,
|
|
73
74
|
__source: {
|
|
74
75
|
fileName: _jsxFileName,
|
|
75
|
-
lineNumber:
|
|
76
|
+
lineNumber: 46,
|
|
76
77
|
columnNumber: 9
|
|
77
78
|
}
|
|
78
79
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
79
80
|
__self: this,
|
|
80
81
|
__source: {
|
|
81
82
|
fileName: _jsxFileName,
|
|
82
|
-
lineNumber:
|
|
83
|
+
lineNumber: 53,
|
|
83
84
|
columnNumber: 11
|
|
84
85
|
}
|
|
85
86
|
})));
|
|
@@ -92,7 +93,7 @@ class ExternalToolbar extends _react.Component {
|
|
|
92
93
|
__self: this,
|
|
93
94
|
__source: {
|
|
94
95
|
fileName: _jsxFileName,
|
|
95
|
-
lineNumber:
|
|
96
|
+
lineNumber: 61,
|
|
96
97
|
columnNumber: 7
|
|
97
98
|
}
|
|
98
99
|
}, (_this$props$buttons = this.props.buttons) == null ? void 0 : _this$props$buttons.map(button => this.renderButton(button)));
|