@wix/patterns-fields 1.73.0 → 1.74.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/components/address/form-address.js +5 -3
- package/dist/cjs/components/address/form-address.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-field/form-audio.js +5 -3
- package/dist/cjs/components/audio/audio-field/form-audio.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-input.js +6 -5
- package/dist/cjs/components/color-view/color-input.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/color-view/form-color.driver.js +8 -2
- package/dist/cjs/components/color-view/form-color.driver.js.map +1 -1
- package/dist/cjs/components/datetime-input/form-date-time.driver.js +4 -1
- package/dist/cjs/components/datetime-input/form-date-time.driver.js.map +1 -1
- package/dist/cjs/components/datetime-input/form-date-time.js +1 -0
- package/dist/cjs/components/datetime-input/form-date-time.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/document/form-document.js +5 -3
- package/dist/cjs/components/document/form-document.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/form-image-input.js +6 -4
- package/dist/cjs/components/image/form-image-input.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-gallery/form-media-gallery.js +5 -3
- package/dist/cjs/components/media-gallery/form-media-gallery.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.js +5 -3
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.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/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/form-input/rich-content-form-input.st.css +15 -7
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +11 -7
- 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-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/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/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-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.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/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-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 +32 -19
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +20 -12
- 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/components/time-input/form-time.js +9 -10
- package/dist/cjs/components/time-input/form-time.js.map +1 -1
- package/dist/cjs/components/video/form-video.js +30 -29
- package/dist/cjs/components/video/form-video.js.map +1 -1
- package/dist/cjs/hooks/index.js +6 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/pr-5746-kobiburnley-comments.md +54 -0
- package/dist/cjs/hooks/use-field-ref.js +60 -0
- package/dist/cjs/hooks/use-field-ref.js.map +1 -0
- package/dist/cjs/hooks/use-scroll-to-error-ref.js +15 -15
- package/dist/cjs/hooks/use-scroll-to-error-ref.js.map +1 -1
- package/dist/cjs/styles.global.css +1 -1
- package/dist/esm/components/address/form-address.js +3 -1
- package/dist/esm/components/address/form-address.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/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-field/form-audio.js +3 -1
- package/dist/esm/components/audio/audio-field/form-audio.js.map +1 -1
- package/dist/esm/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/esm/components/color-view/cell-color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/color-input.js +1 -1
- package/dist/esm/components/color-view/color-input.js.map +1 -1
- package/dist/esm/components/color-view/color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/form-color.driver.js +8 -2
- package/dist/esm/components/color-view/form-color.driver.js.map +1 -1
- package/dist/esm/components/datetime-input/form-date-time.driver.js +3 -0
- package/dist/esm/components/datetime-input/form-date-time.driver.js.map +1 -1
- package/dist/esm/components/datetime-input/form-date-time.js +1 -1
- package/dist/esm/components/datetime-input/form-date-time.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.js +3 -1
- package/dist/esm/components/document/form-document.js.map +1 -1
- package/dist/esm/components/exclamation/exclamation.st.css.js +2 -2
- package/dist/esm/components/highlighted-text/highlighted-text.st.css.js +3 -3
- package/dist/esm/components/image/form-image-input.js +3 -1
- package/dist/esm/components/image/form-image-input.js.map +1 -1
- package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js +2 -2
- package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js.map +1 -1
- package/dist/esm/components/media-control/paste-url-button.st.css.js +2 -2
- package/dist/esm/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js +2 -2
- package/dist/esm/components/media-gallery/form-media-gallery.js +3 -1
- package/dist/esm/components/media-gallery/form-media-gallery.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-image/overlays/overlay.st.css.js.map +1 -1
- 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/multi-document-input/form-multi-document.js +3 -1
- package/dist/esm/components/multi-document/multi-document-input/form-multi-document.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/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 +15 -7
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +3 -3
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- 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/form-read-only-input/rich-content-form-read-only-input.st.css.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/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-editor/rich-content-editor.st.css.js +2 -2
- 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-viewer/rich-content-viewer.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
- 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-editor.st.css.js.map +1 -1
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css +32 -19
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +3 -3
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- 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/components/time-input/form-time.js +4 -3
- package/dist/esm/components/time-input/form-time.js.map +1 -1
- package/dist/esm/components/video/form-video.js +3 -2
- package/dist/esm/components/video/form-video.js.map +1 -1
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/pr-5746-kobiburnley-comments.md +54 -0
- package/dist/esm/hooks/use-field-ref.js +36 -0
- package/dist/esm/hooks/use-field-ref.js.map +1 -0
- package/dist/esm/hooks/use-scroll-to-error-ref.js +12 -12
- package/dist/esm/hooks/use-scroll-to-error-ref.js.map +1 -1
- package/dist/esm/styles.global.css +1 -1
- package/dist/types/components/address/form-address.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-field/form-audio.d.ts.map +1 -1
- package/dist/types/components/color-view/color-input.d.ts.map +1 -1
- package/dist/types/components/color-view/form-color.driver.d.ts +5 -15
- package/dist/types/components/color-view/form-color.driver.d.ts.map +1 -1
- package/dist/types/components/datetime-input/form-date-time.driver.d.ts +1 -0
- package/dist/types/components/datetime-input/form-date-time.driver.d.ts.map +1 -1
- package/dist/types/components/document/form-document.d.ts.map +1 -1
- package/dist/types/components/image/form-image-input.d.ts.map +1 -1
- package/dist/types/components/media-control/cell-media-edit-shell.st.css.d.ts.map +1 -1
- package/dist/types/components/media-control/paste-url-button.st.css.d.ts.map +1 -1
- package/dist/types/components/media-gallery/form-media-gallery.d.ts.map +1 -1
- package/dist/types/components/media-image/overlays/overlay.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/multi-document-input/form-multi-document.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/rich-content-input/form-input/rich-content-form-input.st.css.d.ts +7 -3
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.d.ts +16 -8
- package/dist/types/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/text/text-view.st.css.d.ts.map +1 -1
- package/dist/types/components/time-input/form-time.d.ts.map +1 -1
- package/dist/types/components/video/form-video.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/use-field-ref.d.ts +36 -0
- package/dist/types/hooks/use-field-ref.d.ts.map +1 -0
- package/dist/types/hooks/use-scroll-to-error-ref.d.ts +5 -5
- package/dist/types/hooks/use-scroll-to-error-ref.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/components/color-view/form-color.spec.tsx +46 -3
- package/src/__tests__/components/rich-editors-border.spec.ts +45 -0
- package/src/__tests__/hooks/use-field-ref.spec.tsx +132 -0
- package/src/components/address/form-address.tsx +4 -1
- 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-field/form-audio.tsx +4 -1
- 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-input.tsx +13 -2
- package/src/components/color-view/color-view.st.css.ts +2 -2
- package/src/components/color-view/form-color.driver.ts +8 -2
- package/src/components/datetime-input/form-date-time.driver.ts +3 -0
- package/src/components/datetime-input/form-date-time.tsx +1 -1
- 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/document/form-document.tsx +4 -1
- 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/form-image-input.tsx +4 -1
- 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-gallery/form-media-gallery.tsx +4 -1
- 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/multi-document/multi-document-input/form-multi-document.tsx +4 -1
- 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/rich-content-input/default-value-input/rich-content-default-value-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css +15 -7
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts +3 -3
- 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/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts +2 -2
- 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-editor/rich-content-editor.st.css.ts +2 -2
- 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-viewer/rich-content-viewer.st.css.ts +2 -2
- 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 +32 -19
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts +3 -3
- 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/components/time-input/form-time.tsx +9 -3
- package/src/components/video/form-video.tsx +4 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/pr-5746-kobiburnley-comments.md +54 -0
- package/src/hooks/use-field-ref.ts +65 -0
- package/src/hooks/use-scroll-to-error-ref.ts +15 -10
- package/src/styles.global.css +1 -1
|
@@ -5,15 +5,15 @@ 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_ = "textview2294932004";
|
|
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
|
-
"textView": "
|
|
15
|
+
"root": "textview2294932004__root",
|
|
16
|
+
"textView": "textview2294932004__textView"
|
|
17
17
|
};
|
|
18
18
|
var keyframes = exports.keyframes = {};
|
|
19
19
|
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/text/text-view.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/text/text-view.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"textview2294932004\";\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\":\"textview2294932004__root\",\"textView\":\"textview2294932004__textView\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,oBAAoB;AACtC,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,0BAA0B;EAAC,UAAU,EAAC;AAA8B,CAAC;AAC3F,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,CAAC,CAAC","ignoreList":[]}
|
|
@@ -45,15 +45,14 @@ const _FormTime = props => {
|
|
|
45
45
|
|
|
46
46
|
// TimeInput has no DOM ref to hand to field.ref, so bridge its imperative
|
|
47
47
|
// focus() — lets react-hook-form's shouldFocusError scroll to this field
|
|
48
|
-
// when it blocks save.
|
|
48
|
+
// when it blocks save. TimeInputImperativeActions has no select(), so the
|
|
49
|
+
// handle absorbs the calls react-hook-form makes beyond focus.
|
|
49
50
|
const timeRef = (0, _react.useRef)(null);
|
|
50
51
|
(0, _react.useEffect)(() => {
|
|
51
|
-
controller.field.ref({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
});
|
|
52
|
+
controller.field.ref((0, _hooks.fieldRefHandle)(() => {
|
|
53
|
+
var _timeRef$current;
|
|
54
|
+
return (_timeRef$current = timeRef.current) == null ? void 0 : _timeRef$current.focus();
|
|
55
|
+
}, () => timeRef.current));
|
|
57
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
57
|
}, []);
|
|
59
58
|
return /*#__PURE__*/_react.default.createElement(_designSystem.FormField, {
|
|
@@ -79,14 +78,14 @@ const _FormTime = props => {
|
|
|
79
78
|
__self: void 0,
|
|
80
79
|
__source: {
|
|
81
80
|
fileName: _jsxFileName,
|
|
82
|
-
lineNumber:
|
|
81
|
+
lineNumber: 68,
|
|
83
82
|
columnNumber: 11
|
|
84
83
|
}
|
|
85
84
|
}),
|
|
86
85
|
__self: void 0,
|
|
87
86
|
__source: {
|
|
88
87
|
fileName: _jsxFileName,
|
|
89
|
-
lineNumber:
|
|
88
|
+
lineNumber: 57,
|
|
90
89
|
columnNumber: 5
|
|
91
90
|
}
|
|
92
91
|
}, /*#__PURE__*/_react.default.createElement(_formTimeInput.FormTimeInput, {
|
|
@@ -98,7 +97,7 @@ const _FormTime = props => {
|
|
|
98
97
|
__self: void 0,
|
|
99
98
|
__source: {
|
|
100
99
|
fileName: _jsxFileName,
|
|
101
|
-
lineNumber:
|
|
100
|
+
lineNumber: 88,
|
|
102
101
|
columnNumber: 7
|
|
103
102
|
}
|
|
104
103
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_mobxReactLite","_react2","_form","_hooks","_validations","_string","_typeMismatchExclamation","_formTimeInput","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_FormTime","props","_field$validation2","_controller$fieldStat","field","dataHook","formControl","data","translate","pt","useWixPatternsContainer","useTranslations","controller","useController","name","id","control","defaultValue","rules","validate","value","_field$validation","validation","required","isEmpty","timeRef","useRef","useEffect","ref","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_mobxReactLite","_react2","_form","_hooks","_validations","_string","_typeMismatchExclamation","_formTimeInput","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_FormTime","props","_field$validation2","_controller$fieldStat","field","dataHook","formControl","data","translate","pt","useWixPatternsContainer","useTranslations","controller","useController","name","id","control","defaultValue","rules","validate","value","_field$validation","validation","required","isEmpty","timeRef","useRef","useEffect","ref","fieldRefHandle","_timeRef$current","current","focus","createElement","FormField","label","displayName","status","fieldState","error","undefined","statusMessage","message","suffix","isDataValidOrNotSet","timeValidation","TypeMismatchExclamation","typeName","clearButtonText","convertButtonText","onClear","onChange","convertDisabledText","fieldName","isConverted","isConverting","convertedValue","tooltipText","__self","__source","fileName","lineNumber","columnNumber","FormTimeInput","autoFocus","inputRef","FormTime","exports","observer"],"sources":["../../../../src/components/time-input/form-time.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { FormField } from '@wix/design-system';\nimport type { TimeInputImperativeActions } from '@wix/design-system';\nimport { observer } from 'mobx-react-lite';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport { useController } from '@wix/bex-core/form';\n\nimport { BaseInputProps } from '../../types/base-input';\nimport { fieldRefHandle, useTranslations } from '../../hooks';\nimport {\n isDataValidOrNotSet,\n timeValidation,\n} from '../../validations/validations';\nimport { isEmpty } from '../../validations/string';\nimport { TypeMismatchExclamation } from '../exclamation/type-mismatch-exclamation';\n\nimport { FormTimeInput } from './form-time-input';\n\nexport interface FormTimeProps extends BaseInputProps<string> {}\n\nconst _FormTime = (props: FormTimeProps) => {\n const { field, dataHook, formControl, data } = props;\n\n const { translate: pt } = useWixPatternsContainer();\n const { t } = useTranslations();\n\n const controller = useController({\n name: field.id,\n control: formControl,\n defaultValue: data?.[field.id],\n rules: {\n validate: (value) => {\n if (field.validation?.required && isEmpty(value)) {\n return pt('cairo.fieldValidation.requiredField');\n }\n return true;\n },\n },\n });\n\n // TimeInput has no DOM ref to hand to field.ref, so bridge its imperative\n // focus() — lets react-hook-form's shouldFocusError scroll to this field\n // when it blocks save. TimeInputImperativeActions has no select(), so the\n // handle absorbs the calls react-hook-form makes beyond focus.\n const timeRef = useRef<TimeInputImperativeActions>(null);\n useEffect(() => {\n controller.field.ref(\n fieldRefHandle(\n () => timeRef.current?.focus(),\n () => timeRef.current,\n ),\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <FormField\n label={field.displayName}\n required={field.validation?.required}\n status={controller.fieldState.error ? 'error' : undefined}\n statusMessage={controller.fieldState.error?.message}\n dataHook={dataHook}\n suffix={\n isDataValidOrNotSet(\n controller.field.value,\n timeValidation,\n ) ? undefined : (\n <TypeMismatchExclamation\n typeName={t('auto-patterns.fields.field_type_time_title')}\n clearButtonText={t('auto-patterns.fields.type_mismatch_clear')}\n convertButtonText={t('auto-patterns.fields.type_mismatch_convert')}\n onClear={() => controller.field.onChange(undefined)}\n onChange={(value) => controller.field.onChange(value)}\n convertDisabledText={t(\n 'auto-patterns.fields.type_mismatch_convert_disabled',\n )}\n fieldName={field.displayName}\n isConverted={false}\n isConverting={false}\n convertedValue=\"00:00:00.000\"\n tooltipText={t('auto-patterns.fields.type_mismatch_tip', {\n typeName: 'Time',\n })}\n />\n )\n }\n >\n <FormTimeInput\n autoFocus={false}\n inputRef={timeRef}\n data={controller.field.value}\n onChange={(value) => controller.field.onChange(value)}\n dataHook={`time-${field.id}`}\n />\n </FormField>\n );\n};\n\nexport const FormTime = observer(_FormTime);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAGA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAIA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,wBAAA,GAAAR,OAAA;AAEA,IAAAS,cAAA,GAAAT,OAAA;AAAkD,IAAAU,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,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,C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AK,CAAC+C,QAAQ,CAAC/B,KAAK,CAAE;MACtDgC,mBAAmB,EAAEtE,CAAC,CACpB,qDACF,CAAE;MACFuE,SAAS,EAAEjD,KAAK,CAACgC,WAAY;MAC7BkB,WAAW,EAAE,KAAM;MACnBC,YAAY,EAAE,KAAM;MACpBC,cAAc,EAAC,cAAc;MAC7BC,WAAW,EAAE3E,CAAC,CAAC,wCAAwC,EAAE;QACvDiE,QAAQ,EAAE;MACZ,CAAC,CAAE;MAAAW,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAhF,YAAA;QAAAiF,UAAA;QAAAC,YAAA;MAAA;IAAA,CACJ,CAEJ;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAhF,YAAA;MAAAiF,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAED9F,MAAA,CAAAuB,OAAA,CAAA0C,aAAA,CAACtD,cAAA,CAAAoF,aAAa;IACZC,SAAS,EAAE,KAAM;IACjBC,QAAQ,EAAExC,OAAQ;IAClBlB,IAAI,EAAEK,UAAU,CAACR,KAAK,CAACgB,KAAM;IAC7B+B,QAAQ,EAAG/B,KAAK,IAAKR,UAAU,CAACR,KAAK,CAAC+C,QAAQ,CAAC/B,KAAK,CAAE;IACtDf,QAAQ,EAAE,QAAQD,KAAK,CAACW,EAAE,EAAG;IAAA2C,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAhF,YAAA;MAAAiF,UAAA;MAAAC,YAAA;IAAA;EAAA,CAC9B,CACQ,CAAC;AAEhB,CAAC;AAEM,MAAMI,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,uBAAQ,EAACpE,SAAS,CAAC","ignoreList":[]}
|
|
@@ -48,6 +48,7 @@ const _FormVideo = props => {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
+
const setFieldRef = (0, _hooks.useFieldRef)(controller.field.ref);
|
|
51
52
|
async function openMedia() {
|
|
52
53
|
if (!openMediaManager) return;
|
|
53
54
|
try {
|
|
@@ -98,14 +99,14 @@ const _FormVideo = props => {
|
|
|
98
99
|
__self: void 0,
|
|
99
100
|
__source: {
|
|
100
101
|
fileName: _jsxFileName,
|
|
101
|
-
lineNumber:
|
|
102
|
+
lineNumber: 110,
|
|
102
103
|
columnNumber: 11
|
|
103
104
|
}
|
|
104
105
|
}),
|
|
105
106
|
__self: void 0,
|
|
106
107
|
__source: {
|
|
107
108
|
fileName: _jsxFileName,
|
|
108
|
-
lineNumber:
|
|
109
|
+
lineNumber: 99,
|
|
109
110
|
columnNumber: 5
|
|
110
111
|
}
|
|
111
112
|
}, controller.field.value ? /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
|
|
@@ -115,7 +116,7 @@ const _FormVideo = props => {
|
|
|
115
116
|
__self: void 0,
|
|
116
117
|
__source: {
|
|
117
118
|
fileName: _jsxFileName,
|
|
118
|
-
lineNumber:
|
|
119
|
+
lineNumber: 131,
|
|
119
120
|
columnNumber: 9
|
|
120
121
|
}
|
|
121
122
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.MediaOverlay, {
|
|
@@ -129,14 +130,14 @@ const _FormVideo = props => {
|
|
|
129
130
|
__self: void 0,
|
|
130
131
|
__source: {
|
|
131
132
|
fileName: _jsxFileName,
|
|
132
|
-
lineNumber:
|
|
133
|
+
lineNumber: 136,
|
|
133
134
|
columnNumber: 15
|
|
134
135
|
}
|
|
135
136
|
}),
|
|
136
137
|
__self: void 0,
|
|
137
138
|
__source: {
|
|
138
139
|
fileName: _jsxFileName,
|
|
139
|
-
lineNumber:
|
|
140
|
+
lineNumber: 132,
|
|
140
141
|
columnNumber: 11
|
|
141
142
|
}
|
|
142
143
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.MediaOverlay.Content, {
|
|
@@ -145,7 +146,7 @@ const _FormVideo = props => {
|
|
|
145
146
|
__self: void 0,
|
|
146
147
|
__source: {
|
|
147
148
|
fileName: _jsxFileName,
|
|
148
|
-
lineNumber:
|
|
149
|
+
lineNumber: 144,
|
|
149
150
|
columnNumber: 13
|
|
150
151
|
}
|
|
151
152
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
|
|
@@ -153,7 +154,7 @@ const _FormVideo = props => {
|
|
|
153
154
|
__self: void 0,
|
|
154
155
|
__source: {
|
|
155
156
|
fileName: _jsxFileName,
|
|
156
|
-
lineNumber:
|
|
157
|
+
lineNumber: 145,
|
|
157
158
|
columnNumber: 15
|
|
158
159
|
}
|
|
159
160
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
|
|
@@ -161,7 +162,7 @@ const _FormVideo = props => {
|
|
|
161
162
|
__self: void 0,
|
|
162
163
|
__source: {
|
|
163
164
|
fileName: _jsxFileName,
|
|
164
|
-
lineNumber:
|
|
165
|
+
lineNumber: 146,
|
|
165
166
|
columnNumber: 17
|
|
166
167
|
}
|
|
167
168
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.IconButton, {
|
|
@@ -174,14 +175,14 @@ const _FormVideo = props => {
|
|
|
174
175
|
__self: void 0,
|
|
175
176
|
__source: {
|
|
176
177
|
fileName: _jsxFileName,
|
|
177
|
-
lineNumber:
|
|
178
|
+
lineNumber: 149,
|
|
178
179
|
columnNumber: 19
|
|
179
180
|
}
|
|
180
181
|
}, /*#__PURE__*/_react.default.createElement(_lazy.Replace, {
|
|
181
182
|
__self: void 0,
|
|
182
183
|
__source: {
|
|
183
184
|
fileName: _jsxFileName,
|
|
184
|
-
lineNumber:
|
|
185
|
+
lineNumber: 157,
|
|
185
186
|
columnNumber: 21
|
|
186
187
|
}
|
|
187
188
|
}))), /*#__PURE__*/_react.default.createElement(_designSystem.PopoverMenu, {
|
|
@@ -192,7 +193,7 @@ const _FormVideo = props => {
|
|
|
192
193
|
__self: void 0,
|
|
193
194
|
__source: {
|
|
194
195
|
fileName: _jsxFileName,
|
|
195
|
-
lineNumber:
|
|
196
|
+
lineNumber: 162,
|
|
196
197
|
columnNumber: 21
|
|
197
198
|
}
|
|
198
199
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.IconButton, {
|
|
@@ -204,21 +205,21 @@ const _FormVideo = props => {
|
|
|
204
205
|
__self: void 0,
|
|
205
206
|
__source: {
|
|
206
207
|
fileName: _jsxFileName,
|
|
207
|
-
lineNumber:
|
|
208
|
+
lineNumber: 165,
|
|
208
209
|
columnNumber: 23
|
|
209
210
|
}
|
|
210
211
|
}, /*#__PURE__*/_react.default.createElement(_lazy.More, {
|
|
211
212
|
__self: void 0,
|
|
212
213
|
__source: {
|
|
213
214
|
fileName: _jsxFileName,
|
|
214
|
-
lineNumber:
|
|
215
|
+
lineNumber: 174,
|
|
215
216
|
columnNumber: 25
|
|
216
217
|
}
|
|
217
218
|
}))),
|
|
218
219
|
__self: void 0,
|
|
219
220
|
__source: {
|
|
220
221
|
fileName: _jsxFileName,
|
|
221
|
-
lineNumber:
|
|
222
|
+
lineNumber: 160,
|
|
222
223
|
columnNumber: 17
|
|
223
224
|
}
|
|
224
225
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.PopoverMenu.MenuItem, {
|
|
@@ -226,7 +227,7 @@ const _FormVideo = props => {
|
|
|
226
227
|
__self: void 0,
|
|
227
228
|
__source: {
|
|
228
229
|
fileName: _jsxFileName,
|
|
229
|
-
lineNumber:
|
|
230
|
+
lineNumber: 180,
|
|
230
231
|
columnNumber: 33
|
|
231
232
|
}
|
|
232
233
|
}),
|
|
@@ -237,7 +238,7 @@ const _FormVideo = props => {
|
|
|
237
238
|
__self: void 0,
|
|
238
239
|
__source: {
|
|
239
240
|
fileName: _jsxFileName,
|
|
240
|
-
lineNumber:
|
|
241
|
+
lineNumber: 179,
|
|
241
242
|
columnNumber: 19
|
|
242
243
|
}
|
|
243
244
|
}), /*#__PURE__*/_react.default.createElement(_designSystem.PopoverMenu.MenuItem, {
|
|
@@ -245,7 +246,7 @@ const _FormVideo = props => {
|
|
|
245
246
|
__self: void 0,
|
|
246
247
|
__source: {
|
|
247
248
|
fileName: _jsxFileName,
|
|
248
|
-
lineNumber:
|
|
249
|
+
lineNumber: 187,
|
|
249
250
|
columnNumber: 33
|
|
250
251
|
}
|
|
251
252
|
}),
|
|
@@ -255,14 +256,14 @@ const _FormVideo = props => {
|
|
|
255
256
|
__self: void 0,
|
|
256
257
|
__source: {
|
|
257
258
|
fileName: _jsxFileName,
|
|
258
|
-
lineNumber:
|
|
259
|
+
lineNumber: 186,
|
|
259
260
|
columnNumber: 19
|
|
260
261
|
}
|
|
261
262
|
}), /*#__PURE__*/_react.default.createElement(_designSystem.PopoverMenu.Divider, {
|
|
262
263
|
__self: void 0,
|
|
263
264
|
__source: {
|
|
264
265
|
fileName: _jsxFileName,
|
|
265
|
-
lineNumber:
|
|
266
|
+
lineNumber: 192,
|
|
266
267
|
columnNumber: 19
|
|
267
268
|
}
|
|
268
269
|
}), /*#__PURE__*/_react.default.createElement(_designSystem.PopoverMenu.MenuItem, {
|
|
@@ -270,7 +271,7 @@ const _FormVideo = props => {
|
|
|
270
271
|
__self: void 0,
|
|
271
272
|
__source: {
|
|
272
273
|
fileName: _jsxFileName,
|
|
273
|
-
lineNumber:
|
|
274
|
+
lineNumber: 194,
|
|
274
275
|
columnNumber: 33
|
|
275
276
|
}
|
|
276
277
|
}),
|
|
@@ -280,7 +281,7 @@ const _FormVideo = props => {
|
|
|
280
281
|
__self: void 0,
|
|
281
282
|
__source: {
|
|
282
283
|
fileName: _jsxFileName,
|
|
283
|
-
lineNumber:
|
|
284
|
+
lineNumber: 193,
|
|
284
285
|
columnNumber: 19
|
|
285
286
|
}
|
|
286
287
|
})))))) : /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
|
|
@@ -289,14 +290,14 @@ const _FormVideo = props => {
|
|
|
289
290
|
__self: void 0,
|
|
290
291
|
__source: {
|
|
291
292
|
fileName: _jsxFileName,
|
|
292
|
-
lineNumber:
|
|
293
|
+
lineNumber: 205,
|
|
293
294
|
columnNumber: 9
|
|
294
295
|
}
|
|
295
296
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.ImageViewer
|
|
296
297
|
// Only the empty state can fail `required`, so the add button is
|
|
297
298
|
// always the right target for react-hook-form's shouldFocusError.
|
|
298
299
|
, {
|
|
299
|
-
ref:
|
|
300
|
+
ref: setFieldRef,
|
|
300
301
|
dataHook: `video-${field.id}`,
|
|
301
302
|
onAddImage: isMobile ? undefined : () => openMedia(),
|
|
302
303
|
addImageInfo: t('auto-patterns.fields.add_video_tooltip'),
|
|
@@ -305,7 +306,7 @@ const _FormVideo = props => {
|
|
|
305
306
|
__self: void 0,
|
|
306
307
|
__source: {
|
|
307
308
|
fileName: _jsxFileName,
|
|
308
|
-
lineNumber:
|
|
309
|
+
lineNumber: 206,
|
|
309
310
|
columnNumber: 11
|
|
310
311
|
}
|
|
311
312
|
})), isPreviewOpen && /*#__PURE__*/_react.default.createElement(_designSystem.Modal, {
|
|
@@ -314,7 +315,7 @@ const _FormVideo = props => {
|
|
|
314
315
|
__self: void 0,
|
|
315
316
|
__source: {
|
|
316
317
|
fileName: _jsxFileName,
|
|
317
|
-
lineNumber:
|
|
318
|
+
lineNumber: 219,
|
|
318
319
|
columnNumber: 9
|
|
319
320
|
}
|
|
320
321
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.CustomModalLayout, {
|
|
@@ -329,7 +330,7 @@ const _FormVideo = props => {
|
|
|
329
330
|
__self: void 0,
|
|
330
331
|
__source: {
|
|
331
332
|
fileName: _jsxFileName,
|
|
332
|
-
lineNumber:
|
|
333
|
+
lineNumber: 224,
|
|
333
334
|
columnNumber: 15
|
|
334
335
|
}
|
|
335
336
|
}, /*#__PURE__*/_react.default.createElement("video", {
|
|
@@ -343,7 +344,7 @@ const _FormVideo = props => {
|
|
|
343
344
|
__self: void 0,
|
|
344
345
|
__source: {
|
|
345
346
|
fileName: _jsxFileName,
|
|
346
|
-
lineNumber:
|
|
347
|
+
lineNumber: 231,
|
|
347
348
|
columnNumber: 17
|
|
348
349
|
}
|
|
349
350
|
}, videoUrl && /*#__PURE__*/_react.default.createElement("source", {
|
|
@@ -352,14 +353,14 @@ const _FormVideo = props => {
|
|
|
352
353
|
__self: void 0,
|
|
353
354
|
__source: {
|
|
354
355
|
fileName: _jsxFileName,
|
|
355
|
-
lineNumber:
|
|
356
|
+
lineNumber: 237,
|
|
356
357
|
columnNumber: 32
|
|
357
358
|
}
|
|
358
359
|
}), "Your browser does not support the video tag.")),
|
|
359
360
|
__self: void 0,
|
|
360
361
|
__source: {
|
|
361
362
|
fileName: _jsxFileName,
|
|
362
|
-
lineNumber:
|
|
363
|
+
lineNumber: 220,
|
|
363
364
|
columnNumber: 11
|
|
364
365
|
}
|
|
365
366
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_designSystem","_lazy","_mobxReactLite","_react2","_form","_hooks","_string","_validations","videoValidation","_interopRequireWildcard","_typeMismatchExclamation","_mediaConstants","_useVideoPreview","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_FormVideo","props","_field$validation2","_controller$fieldStat","field","dataHook","formControl","data","translate","pt","openMediaManager","useWixPatternsContainer","useTranslations","isMobile","useIsMobile","controller","useController","name","id","control","defaultValue","rules","validate","value","_field$validation","validation","required","isEmpty","openMedia","_chosenMediaItems$ite","_mediaItem$media","chosenMediaItems","multiSelect","category","mediaItem","items","newVideo","media","video","onChange","error","console","videoUrl","posterUrl","imageUrl","isPreviewOpen","openPreview","handlePreview","closePreview","handleClosePreview","handleDownload","useVideoPreview","videoUri","createElement","FormField","label","displayName","status","fieldState","undefined","statusMessage","message","suffix","isDataValidOrNotSet","TypeMismatchExclamation","typeName","clearButtonText","convertButtonText","onClear","convertDisabledText","fieldName","isConverted","isConverting","convertedValue","tooltipText","__self","__source","fileName","lineNumber","columnNumber","Box","width","maxWidth","MEDIA_MAX_WIDTH","height","MEDIA_HEIGHT","MediaOverlay","hoverSkin","Image","src","fit","Content","placement","visible","gap","Tooltip","content","IconButton","onClick","skin","priority","disabled","ariaLabel","Replace","PopoverMenu","triggerElement","toggle","More","MenuItem","prefixIcon","Maximize","text","Download","Divider","Delete","ImageViewer","ref","onAddImage","addImageInfo","Modal","isOpen","onRequestClose","CustomModalLayout","title","onCloseButtonClick","style","display","justifyContent","padding","controls","autoPlay","maxHeight","poster","type","FormVideo","exports","observer"],"sources":["../../../../src/components/video/form-video.tsx"],"sourcesContent":["import React from 'react';\nimport {\n FormField,\n ImageViewer,\n Modal,\n CustomModalLayout,\n MediaOverlay,\n Box,\n Tooltip,\n IconButton,\n PopoverMenu,\n Image,\n} from '@wix/design-system';\nimport {\n Replace,\n More,\n Download,\n Delete,\n Maximize,\n} from '@wix/wix-ui-icons-common/lazy';\nimport { observer } from 'mobx-react-lite';\nimport { useIsMobile, useWixPatternsContainer } from '@wix/bex-core/react';\nimport { useController } from '@wix/bex-core/form';\nimport { BaseInputProps } from '../../types/base-input';\nimport { useTranslations } from '../../hooks';\nimport { isEmpty } from '../../validations/string';\nimport { isDataValidOrNotSet } from '../../validations/validations';\nimport * as videoValidation from '../../validations/video';\nimport { TypeMismatchExclamation } from '../exclamation/type-mismatch-exclamation';\nimport { MEDIA_HEIGHT, MEDIA_MAX_WIDTH } from '../../utils/media-constants';\nimport { useVideoPreview } from './use-video-preview';\n\ninterface VideoMediaDescriptor {\n video?: string;\n}\n\ninterface MediaManagerVideoItem {\n _id?: string;\n displayName?: string;\n mediaType?: string;\n media?: VideoMediaDescriptor;\n}\n\nexport interface FormVideoProps extends BaseInputProps<string> {}\n\nconst _FormVideo = (props: FormVideoProps) => {\n const { field, dataHook, formControl, data } = props;\n\n const { translate: pt, openMediaManager } = useWixPatternsContainer();\n const { t } = useTranslations();\n const isMobile = useIsMobile();\n\n const controller = useController({\n name: field?.id ?? '',\n control: formControl,\n defaultValue: data?.[field?.id ?? ''],\n rules: {\n validate: (value) => {\n if (field.validation?.required && isEmpty(value)) {\n return pt('cairo.fieldValidation.requiredField');\n }\n return true;\n },\n },\n });\n\n async function openMedia() {\n if (!openMediaManager) return;\n try {\n const chosenMediaItems = await openMediaManager({\n multiSelect: false,\n category: 'VIDEO',\n });\n\n const mediaItem = chosenMediaItems?.items?.[0] as\n | MediaManagerVideoItem\n | undefined;\n const newVideo = mediaItem?.media?.video;\n if (newVideo) {\n controller.field.onChange(newVideo);\n }\n } catch (error) {\n console.error('Error opening Media Manager or no files selected:', error);\n }\n }\n\n const {\n videoUrl,\n posterUrl: imageUrl,\n isPreviewOpen,\n openPreview: handlePreview,\n closePreview: handleClosePreview,\n handleDownload,\n } = useVideoPreview({ videoUri: controller.field.value });\n\n return (\n <FormField\n label={field.displayName}\n required={field.validation?.required}\n status={controller.fieldState.error ? 'error' : undefined}\n statusMessage={controller.fieldState.error?.message}\n dataHook={dataHook}\n suffix={\n isDataValidOrNotSet(\n controller.field.value,\n videoValidation,\n ) ? undefined : (\n <TypeMismatchExclamation\n typeName={t('auto-patterns.fields.field_type_video_title')}\n clearButtonText={t('auto-patterns.fields.type_mismatch_clear')}\n convertButtonText={t('auto-patterns.fields.type_mismatch_convert')}\n onClear={() => controller.field.onChange(undefined)}\n onChange={(value) => controller.field.onChange(value)}\n convertDisabledText={t(\n 'auto-patterns.fields.type_mismatch_convert_disabled',\n )}\n fieldName={field.displayName}\n isConverted={false}\n isConverting={false}\n convertedValue={null}\n tooltipText={t('auto-patterns.fields.type_mismatch_tip', {\n typeName: 'Video',\n })}\n />\n )\n }\n >\n {controller.field.value ? (\n <Box width=\"100%\" maxWidth={MEDIA_MAX_WIDTH} height={MEDIA_HEIGHT}>\n <MediaOverlay\n dataHook={`video-${field.id}`}\n hoverSkin=\"dark\"\n media={\n <Image\n src={imageUrl}\n width=\"100%\"\n height={MEDIA_HEIGHT}\n fit=\"cover\"\n />\n }\n >\n <MediaOverlay.Content placement=\"middle\" visible=\"hover\">\n <Box gap=\"SP2\">\n <Tooltip\n content={t('auto-patterns.fields.replace_video_tooltip')}\n >\n <IconButton\n onClick={() => openMedia()}\n skin=\"light\"\n priority=\"secondary\"\n disabled={isMobile}\n ariaLabel={t('auto-patterns.fields.replace_video_tooltip')}\n dataHook={`video-replace-${field.id}`}\n >\n <Replace />\n </IconButton>\n </Tooltip>\n <PopoverMenu\n triggerElement={({ toggle }) => (\n <Tooltip\n content={t('auto-patterns.fields.more_actions_tooltip')}\n >\n <IconButton\n priority=\"secondary\"\n onClick={toggle}\n skin=\"light\"\n ariaLabel={t(\n 'auto-patterns.fields.more_actions_tooltip',\n )}\n dataHook={`video-more-${field.id}`}\n >\n <More />\n </IconButton>\n </Tooltip>\n )}\n >\n <PopoverMenu.MenuItem\n prefixIcon={<Maximize />}\n text={t('auto-patterns.fields.preview_video')}\n onClick={handlePreview}\n disabled={!videoUrl}\n dataHook={`video-preview-${field.id}`}\n />\n <PopoverMenu.MenuItem\n prefixIcon={<Download />}\n text={t('auto-patterns.fields.download_video')}\n onClick={handleDownload}\n dataHook={`video-download-${field.id}`}\n />\n <PopoverMenu.Divider />\n <PopoverMenu.MenuItem\n prefixIcon={<Delete />}\n text={t('auto-patterns.fields.remove_video')}\n onClick={() => controller.field.onChange(null)}\n dataHook={`video-delete-${field.id}`}\n />\n </PopoverMenu>\n </Box>\n </MediaOverlay.Content>\n </MediaOverlay>\n </Box>\n ) : (\n <Box width=\"100%\" maxWidth={MEDIA_MAX_WIDTH}>\n <ImageViewer\n // Only the empty state can fail `required`, so the add button is\n // always the right target for react-hook-form's shouldFocusError.\n ref={controller.field.ref}\n dataHook={`video-${field.id}`}\n onAddImage={isMobile ? undefined : () => openMedia()}\n addImageInfo={t('auto-patterns.fields.add_video_tooltip')}\n height={MEDIA_HEIGHT}\n width=\"100%\"\n />\n </Box>\n )}\n {isPreviewOpen && (\n <Modal isOpen={isPreviewOpen} onRequestClose={handleClosePreview}>\n <CustomModalLayout\n title={field.displayName}\n onCloseButtonClick={handleClosePreview}\n content={\n <div\n style={{\n display: 'flex',\n justifyContent: 'center',\n padding: '24px',\n }}\n >\n <video\n controls\n autoPlay\n style={{ maxWidth: '100%', maxHeight: '70vh' }}\n poster={imageUrl}\n >\n {videoUrl && <source src={videoUrl} type=\"video/mp4\" />}\n Your browser does not support the video tag.\n </video>\n </div>\n }\n />\n </Modal>\n )}\n </FormField>\n );\n};\n\nexport const FormVideo = observer(_FormVideo);\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAYA,IAAAE,KAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAC,uBAAA,CAAAV,OAAA;AACA,IAAAW,wBAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;AACA,IAAAa,gBAAA,GAAAb,OAAA;AAAsD,IAAAc,YAAA;AAAA,SAAAJ,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA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E,QAAQ;MACRC,QAAQ;MACRL,KAAK,EAAE;QAAE3C,QAAQ,EAAE,MAAM;QAAEiD,SAAS,EAAE;MAAO,CAAE;MAC/CC,MAAM,EAAExF,QAAS;MAAA+B,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAjG,YAAA;QAAAkG,UAAA;QAAAC,YAAA;MAAA;IAAA,GAEhBrC,QAAQ,iBAAI9E,MAAA,CAAA2B,OAAA,CAAA8D,aAAA;MAAQoC,GAAG,EAAE/C,QAAS;MAAC2F,IAAI,EAAC,WAAW;MAAA1D,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAjG,YAAA;QAAAkG,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CAAC,EAAC,8CAEnD,CACJ,CACN;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjG,YAAA;MAAAkG,UAAA;MAAAC,YAAA;IAAA;EAAA,CACF,CACI,CAEA,CAAC;AAEhB,CAAC;AAEM,MAAMuD,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,uBAAQ,EAACxI,UAAU,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_designSystem","_lazy","_mobxReactLite","_react2","_form","_hooks","_string","_validations","videoValidation","_interopRequireWildcard","_typeMismatchExclamation","_mediaConstants","_useVideoPreview","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_FormVideo","props","_field$validation2","_controller$fieldStat","field","dataHook","formControl","data","translate","pt","openMediaManager","useWixPatternsContainer","useTranslations","isMobile","useIsMobile","controller","useController","name","id","control","defaultValue","rules","validate","value","_field$validation","validation","required","isEmpty","setFieldRef","useFieldRef","ref","openMedia","_chosenMediaItems$ite","_mediaItem$media","chosenMediaItems","multiSelect","category","mediaItem","items","newVideo","media","video","onChange","error","console","videoUrl","posterUrl","imageUrl","isPreviewOpen","openPreview","handlePreview","closePreview","handleClosePreview","handleDownload","useVideoPreview","videoUri","createElement","FormField","label","displayName","status","fieldState","undefined","statusMessage","message","suffix","isDataValidOrNotSet","TypeMismatchExclamation","typeName","clearButtonText","convertButtonText","onClear","convertDisabledText","fieldName","isConverted","isConverting","convertedValue","tooltipText","__self","__source","fileName","lineNumber","columnNumber","Box","width","maxWidth","MEDIA_MAX_WIDTH","height","MEDIA_HEIGHT","MediaOverlay","hoverSkin","Image","src","fit","Content","placement","visible","gap","Tooltip","content","IconButton","onClick","skin","priority","disabled","ariaLabel","Replace","PopoverMenu","triggerElement","toggle","More","MenuItem","prefixIcon","Maximize","text","Download","Divider","Delete","ImageViewer","onAddImage","addImageInfo","Modal","isOpen","onRequestClose","CustomModalLayout","title","onCloseButtonClick","style","display","justifyContent","padding","controls","autoPlay","maxHeight","poster","type","FormVideo","exports","observer"],"sources":["../../../../src/components/video/form-video.tsx"],"sourcesContent":["import React from 'react';\nimport {\n FormField,\n ImageViewer,\n Modal,\n CustomModalLayout,\n MediaOverlay,\n Box,\n Tooltip,\n IconButton,\n PopoverMenu,\n Image,\n} from '@wix/design-system';\nimport {\n Replace,\n More,\n Download,\n Delete,\n Maximize,\n} from '@wix/wix-ui-icons-common/lazy';\nimport { observer } from 'mobx-react-lite';\nimport { useIsMobile, useWixPatternsContainer } from '@wix/bex-core/react';\nimport { useController } from '@wix/bex-core/form';\nimport { BaseInputProps } from '../../types/base-input';\nimport { useFieldRef, useTranslations } from '../../hooks';\nimport { isEmpty } from '../../validations/string';\nimport { isDataValidOrNotSet } from '../../validations/validations';\nimport * as videoValidation from '../../validations/video';\nimport { TypeMismatchExclamation } from '../exclamation/type-mismatch-exclamation';\nimport { MEDIA_HEIGHT, MEDIA_MAX_WIDTH } from '../../utils/media-constants';\nimport { useVideoPreview } from './use-video-preview';\n\ninterface VideoMediaDescriptor {\n video?: string;\n}\n\ninterface MediaManagerVideoItem {\n _id?: string;\n displayName?: string;\n mediaType?: string;\n media?: VideoMediaDescriptor;\n}\n\nexport interface FormVideoProps extends BaseInputProps<string> {}\n\nconst _FormVideo = (props: FormVideoProps) => {\n const { field, dataHook, formControl, data } = props;\n\n const { translate: pt, openMediaManager } = useWixPatternsContainer();\n const { t } = useTranslations();\n const isMobile = useIsMobile();\n\n const controller = useController({\n name: field?.id ?? '',\n control: formControl,\n defaultValue: data?.[field?.id ?? ''],\n rules: {\n validate: (value) => {\n if (field.validation?.required && isEmpty(value)) {\n return pt('cairo.fieldValidation.requiredField');\n }\n return true;\n },\n },\n });\n\n const setFieldRef = useFieldRef(controller.field.ref);\n\n async function openMedia() {\n if (!openMediaManager) return;\n try {\n const chosenMediaItems = await openMediaManager({\n multiSelect: false,\n category: 'VIDEO',\n });\n\n const mediaItem = chosenMediaItems?.items?.[0] as\n | MediaManagerVideoItem\n | undefined;\n const newVideo = mediaItem?.media?.video;\n if (newVideo) {\n controller.field.onChange(newVideo);\n }\n } catch (error) {\n console.error('Error opening Media Manager or no files selected:', error);\n }\n }\n\n const {\n videoUrl,\n posterUrl: imageUrl,\n isPreviewOpen,\n openPreview: handlePreview,\n closePreview: handleClosePreview,\n handleDownload,\n } = useVideoPreview({ videoUri: controller.field.value });\n\n return (\n <FormField\n label={field.displayName}\n required={field.validation?.required}\n status={controller.fieldState.error ? 'error' : undefined}\n statusMessage={controller.fieldState.error?.message}\n dataHook={dataHook}\n suffix={\n isDataValidOrNotSet(\n controller.field.value,\n videoValidation,\n ) ? undefined : (\n <TypeMismatchExclamation\n typeName={t('auto-patterns.fields.field_type_video_title')}\n clearButtonText={t('auto-patterns.fields.type_mismatch_clear')}\n convertButtonText={t('auto-patterns.fields.type_mismatch_convert')}\n onClear={() => controller.field.onChange(undefined)}\n onChange={(value) => controller.field.onChange(value)}\n convertDisabledText={t(\n 'auto-patterns.fields.type_mismatch_convert_disabled',\n )}\n fieldName={field.displayName}\n isConverted={false}\n isConverting={false}\n convertedValue={null}\n tooltipText={t('auto-patterns.fields.type_mismatch_tip', {\n typeName: 'Video',\n })}\n />\n )\n }\n >\n {controller.field.value ? (\n <Box width=\"100%\" maxWidth={MEDIA_MAX_WIDTH} height={MEDIA_HEIGHT}>\n <MediaOverlay\n dataHook={`video-${field.id}`}\n hoverSkin=\"dark\"\n media={\n <Image\n src={imageUrl}\n width=\"100%\"\n height={MEDIA_HEIGHT}\n fit=\"cover\"\n />\n }\n >\n <MediaOverlay.Content placement=\"middle\" visible=\"hover\">\n <Box gap=\"SP2\">\n <Tooltip\n content={t('auto-patterns.fields.replace_video_tooltip')}\n >\n <IconButton\n onClick={() => openMedia()}\n skin=\"light\"\n priority=\"secondary\"\n disabled={isMobile}\n ariaLabel={t('auto-patterns.fields.replace_video_tooltip')}\n dataHook={`video-replace-${field.id}`}\n >\n <Replace />\n </IconButton>\n </Tooltip>\n <PopoverMenu\n triggerElement={({ toggle }) => (\n <Tooltip\n content={t('auto-patterns.fields.more_actions_tooltip')}\n >\n <IconButton\n priority=\"secondary\"\n onClick={toggle}\n skin=\"light\"\n ariaLabel={t(\n 'auto-patterns.fields.more_actions_tooltip',\n )}\n dataHook={`video-more-${field.id}`}\n >\n <More />\n </IconButton>\n </Tooltip>\n )}\n >\n <PopoverMenu.MenuItem\n prefixIcon={<Maximize />}\n text={t('auto-patterns.fields.preview_video')}\n onClick={handlePreview}\n disabled={!videoUrl}\n dataHook={`video-preview-${field.id}`}\n />\n <PopoverMenu.MenuItem\n prefixIcon={<Download />}\n text={t('auto-patterns.fields.download_video')}\n onClick={handleDownload}\n dataHook={`video-download-${field.id}`}\n />\n <PopoverMenu.Divider />\n <PopoverMenu.MenuItem\n prefixIcon={<Delete />}\n text={t('auto-patterns.fields.remove_video')}\n onClick={() => controller.field.onChange(null)}\n dataHook={`video-delete-${field.id}`}\n />\n </PopoverMenu>\n </Box>\n </MediaOverlay.Content>\n </MediaOverlay>\n </Box>\n ) : (\n <Box width=\"100%\" maxWidth={MEDIA_MAX_WIDTH}>\n <ImageViewer\n // Only the empty state can fail `required`, so the add button is\n // always the right target for react-hook-form's shouldFocusError.\n ref={setFieldRef}\n dataHook={`video-${field.id}`}\n onAddImage={isMobile ? undefined : () => openMedia()}\n addImageInfo={t('auto-patterns.fields.add_video_tooltip')}\n height={MEDIA_HEIGHT}\n width=\"100%\"\n />\n </Box>\n )}\n {isPreviewOpen && (\n <Modal isOpen={isPreviewOpen} onRequestClose={handleClosePreview}>\n <CustomModalLayout\n title={field.displayName}\n onCloseButtonClick={handleClosePreview}\n content={\n <div\n style={{\n display: 'flex',\n justifyContent: 'center',\n padding: '24px',\n }}\n >\n <video\n controls\n autoPlay\n style={{ maxWidth: '100%', maxHeight: '70vh' }}\n poster={imageUrl}\n >\n {videoUrl && <source src={videoUrl} type=\"video/mp4\" />}\n Your browser does not support the video tag.\n </video>\n </div>\n }\n />\n </Modal>\n )}\n </FormField>\n );\n};\n\nexport const FormVideo = observer(_FormVideo);\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAYA,IAAAE,KAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAC,uBAAA,CAAAV,OAAA;AACA,IAAAW,wBAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;AACA,IAAAa,gBAAA,GAAAb,OAAA;AAAsD,IAAAc,YAAA;AAAA,SAAAJ,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK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AChBC,KAAK,EAAEzH,KAAK,CAACuD,WAAY;IACzBmE,kBAAkB,EAAE1E,kBAAmB;IACvC+C,OAAO,eACLvI,MAAA,CAAA2B,OAAA,CAAAiE,aAAA;MACEuE,KAAK,EAAE;QACLC,OAAO,EAAE,MAAM;QACfC,cAAc,EAAE,QAAQ;QACxBC,OAAO,EAAE;MACX,CAAE;MAAApD,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAApG,YAAA;QAAAqG,UAAA;QAAAC,YAAA;MAAA;IAAA,gBAEFtH,MAAA,CAAA2B,OAAA,CAAAiE,aAAA;MACE2E,QAAQ;MACRC,QAAQ;MACRL,KAAK,EAAE;QAAE1C,QAAQ,EAAE,MAAM;QAAEgD,SAAS,EAAE;MAAO,CAAE;MAC/CC,MAAM,EAAEvF,QAAS;MAAA+B,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAApG,YAAA;QAAAqG,UAAA;QAAAC,YAAA;MAAA;IAAA,GAEhBrC,QAAQ,iBAAIjF,MAAA,CAAA2B,OAAA,CAAAiE,aAAA;MAAQoC,GAAG,EAAE/C,QAAS;MAAC0F,IAAI,EAAC,WAAW;MAAAzD,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAApG,YAAA;QAAAqG,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CAAC,EAAC,8CAEnD,CACJ,CACN;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAApG,YAAA;MAAAqG,UAAA;MAAAC,YAAA;IAAA;EAAA,CACF,CACI,CAEA,CAAC;AAEhB,CAAC;AAEM,MAAMsD,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,uBAAQ,EAAC1I,UAAU,CAAC","ignoreList":[]}
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -55,6 +55,12 @@ Object.keys(_useCellEditKeyboard).forEach(function (key) {
|
|
|
55
55
|
if (key in exports && exports[key] === _useCellEditKeyboard[key]) return;
|
|
56
56
|
exports[key] = _useCellEditKeyboard[key];
|
|
57
57
|
});
|
|
58
|
+
var _useFieldRef = require("./use-field-ref");
|
|
59
|
+
Object.keys(_useFieldRef).forEach(function (key) {
|
|
60
|
+
if (key === "default" || key === "__esModule") return;
|
|
61
|
+
if (key in exports && exports[key] === _useFieldRef[key]) return;
|
|
62
|
+
exports[key] = _useFieldRef[key];
|
|
63
|
+
});
|
|
58
64
|
var _useMergedRef = require("./use-merged-ref");
|
|
59
65
|
Object.keys(_useMergedRef).forEach(function (key) {
|
|
60
66
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useAutoFocus","require","Object","keys","forEach","key","exports","_useControlledInput","_useRequestCallback","_useSetSelectionOnFocus","_useOpenState","_useTranslations","_useWithCallback","_useResizeEffect","_useCellEditKeyboard","_useMergedRef","_useScrollToErrorRef"],"sources":["../../../src/hooks/index.ts"],"sourcesContent":["export * from './use-auto-focus';\nexport * from './use-controlled-input';\nexport * from './use-request-callback';\nexport * from './use-set-selection-on-focus';\nexport * from './use-open-state';\nexport * from './use-translations';\nexport * from './use-with-callback';\nexport * from './use-resize-effect';\nexport * from './use-cell-edit-keyboard';\nexport * from './use-merged-ref';\nexport * from './use-scroll-to-error-ref';\n"],"mappings":";;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,aAAA,CAAAK,GAAA;AAAA;AACA,IAAAE,mBAAA,GAAAN,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAI,mBAAA,EAAAH,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,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AA;AACA,IAAAO,gBAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,gBAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,gBAAA,CAAAP,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAO,gBAAA,CAAAP,GAAA;AAAA;AACA,IAAAQ,gBAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,gBAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,gBAAA,CAAAR,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAQ,gBAAA,CAAAR,GAAA;AAAA;AACA,IAAAS,oBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,oBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,oBAAA,CAAAT,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAS,oBAAA,CAAAT,GAAA;AAAA;AACA,IAAAU,
|
|
1
|
+
{"version":3,"names":["_useAutoFocus","require","Object","keys","forEach","key","exports","_useControlledInput","_useRequestCallback","_useSetSelectionOnFocus","_useOpenState","_useTranslations","_useWithCallback","_useResizeEffect","_useCellEditKeyboard","_useFieldRef","_useMergedRef","_useScrollToErrorRef"],"sources":["../../../src/hooks/index.ts"],"sourcesContent":["export * from './use-auto-focus';\nexport * from './use-controlled-input';\nexport * from './use-request-callback';\nexport * from './use-set-selection-on-focus';\nexport * from './use-open-state';\nexport * from './use-translations';\nexport * from './use-with-callback';\nexport * from './use-resize-effect';\nexport * from './use-cell-edit-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AAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,oBAAA,CAAAT,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAS,oBAAA,CAAAT,GAAA;AAAA;AACA,IAAAU,YAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,YAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,YAAA,CAAAV,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAU,YAAA,CAAAV,GAAA;AAAA;AACA,IAAAW,aAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,aAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,aAAA,CAAAX,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAW,aAAA,CAAAX,GAAA;AAAA;AACA,IAAAY,oBAAA,GAAAhB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAc,oBAAA,EAAAb,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAY,oBAAA,CAAAZ,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAY,oBAAA,CAAAZ,GAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# PR #5746 — kobiburnley review
|
|
2
|
+
|
|
3
|
+
[fix(fields): register a field ref that answers every call react-hook-form makes](https://github.com/wix-private/cairo/pull/5746)
|
|
4
|
+
|
|
5
|
+
> **Verdict: Request changes** — 1 blocker. (Posted as a comment review because GitHub will not let the
|
|
6
|
+
> author formally request changes on their own PR.)
|
|
7
|
+
>
|
|
8
|
+
> The diagnosis is right, and I checked it against the installed `react-hook-form` (7.56.4) rather than
|
|
9
|
+
> taking it on trust […] `fieldRefHandle` / `useFieldRef` are a clean way to close it […] I also confirmed
|
|
10
|
+
> the integration test is a real guard, not decoration.
|
|
11
|
+
>
|
|
12
|
+
> One blocker: the audit missed a call site with exactly the shape the helper exists for.
|
|
13
|
+
>
|
|
14
|
+
> — [pullrequestreview-5002194499](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499)
|
|
15
|
+
|
|
16
|
+
All claims below were checked against the branch before being written down. Every one holds.
|
|
17
|
+
|
|
18
|
+
| # | Comment link | Description | Severity | Status | Resolution recommendation |
|
|
19
|
+
|---|---|---|---|---|---|
|
|
20
|
+
| 1 | [discussion_r3838295772](https://github.com/wix-private/cairo/pull/5746#discussion_r3838295772) — `packages/fields/src/components/time-input/form-time.tsx:46` | `form-time` registers a hand-rolled focus-only object, `controller.field.ref({ focus: () => timeRef.current?.focus() })`. Exactly the shape the helper exists for, missed by the audit, so it ships still broken while the PR reads as closing the trap. | Blocker | done | Fixed in `23dc894` — wrapped with `fieldRefHandle` as suggested. Missed originally because `form-time` calls `controller.field.ref(...)` directly in a `useEffect`, so the `inputRef=`/`ref=` grep never matched it. Covered by the table-driven `setFocus` guard. |
|
|
21
|
+
| 2 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | PR body claims "audited all nine that register directly"; there are ~23 `controller.field.ref` sites. The 7 passing `ref=` to a WDS `Input`/`InputArea` get `InputImperativeActions`, which has `select` but no `setCustomValidity`/`reportValidity` — so the `shouldUseNativeValidation` half stays open in `form-url`, `form-email`, `form-short-text` (Input branch), `form-long-text`, `form-color`, `form-array`, `form-object`. | Major (accuracy) | done | PR description rewritten with the full 23-site table. `InputImperativeActions` confirmed as `{ focus, blur, select, setSelectionRange, clear, input }`. The `shouldUseNativeValidation` gap in the 7 `ref=`-on-`Input` sites is left open and stated as a follow-up rather than implied fixed. |
|
|
22
|
+
| 3 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | Fix it once in `packages/core` instead. `packages/core/src/exports/form.ts` is `export * from 'react-hook-form'`, so core owns the entry point; a `useController` there installing the safe handle would cover all sites and every future one, making `useFieldRef` and the seven adopting edits unnecessary. As it stands the fix is opt-in — which is how `form-time` got missed. | Major (design) | dismiss | Not implemented; kept per-site by decision. Rationale recorded in the PR reply: core's `exports/form.ts` is a bare re-export, so wrapping `useController` there would turn it into real implementation and change behaviour for every consumer of `@wix/bex-core/form`, not just Cairo renderers. Filed as a follow-up — if it lands, `useFieldRef` and all adopting edits should be deleted and the `Input` group closes for free. |
|
|
23
|
+
| 4 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | The same 3-line comment is copy-pasted verbatim into seven files; the `fieldRefHandle` docblock already says it, and `AGENTS.md` asks for a comment only when it tells the reader something the code cannot. | Nit | done | Removed from all seven files in `b64bfc4`. |
|
|
24
|
+
| 5 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | `useFieldRef`'s type parameter `T` appears only in the return type, so every call site infers `FieldControl` and the annotation buys nothing. | Minor | done | `T` dropped in `a51e9c6`; takes and returns `FieldControl`. |
|
|
25
|
+
| 6 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | Lint is not clean: `use-field-ref.ts:56` trips `prettier/prettier`. | Minor | done | Fixed in `c6406f6`. Root cause of the false "clean" report: all changed files were passed as one joined argument, so eslint matched nothing. Re-verified one file at a time. `form-video.tsx:73` `curly` warning remains but is unchanged from master. |
|
|
26
|
+
| 7 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | Only `form-address` has an integration guard; the other six conversions would not notice a revert. | Test gap | done | Fixed in `94baa17`. Table-driven over one renderer per control shape: address, time, `FormDocument` (`AddItemActions`, shared with audio/multi-document/media-gallery), `FormImageInput` (`ImageViewer`, shared with video). Each verified failing via `git checkout origin/master -- <file>` — note `git checkout -- <file>` restores from HEAD and silently proves nothing once the change is committed. |
|
|
27
|
+
| 8 | [review summary](https://github.com/wix-private/cairo/pull/5746#pullrequestreview-5002194499) | In `EntityPageCustomField`, the new `control` closure and the `focus` callback each resolve consumer-then-`querySelector` separately; not wrong (focus needs `scrollIntoView` between the steps) but they will drift. | Nit | done | Fixed in `91147ff`. Both paths read one `control()`. The identity check I first wrote was also wrong, not just duplicative: with nothing focusable, `target` and `consumerRef.current` were both `null`, so it skipped the scroll in exactly the case needing it. Now keyed off `!consumerRef.current`. |
|
|
28
|
+
|
|
29
|
+
## Notes
|
|
30
|
+
|
|
31
|
+
- #3 is the pivot. If the fix moves into core's `useController`, then #1, #2, #4, #5 and #7 mostly evaporate and this
|
|
32
|
+
PR shrinks to deleting `useFieldRef` and reverting the seven adopting edits. Worth settling before spending
|
|
33
|
+
effort on the others.
|
|
34
|
+
- #1 is a blocker on its own terms and is a one-line fix either way, since `form-time` is broken today
|
|
35
|
+
regardless of which mechanism wins.
|
|
36
|
+
- The reviewer independently reproduced the address integration test (revert → `1 failed, 3 passed`), so the
|
|
37
|
+
guard is trusted; the gap is coverage of the other six (#7), not the approach.
|
|
38
|
+
|
|
39
|
+
## Outcome
|
|
40
|
+
|
|
41
|
+
All eight resolved: seven fixed, one (row 3) dismissed with rationale. Commits on `fix/delegating-field-ref`,
|
|
42
|
+
all pushed:
|
|
43
|
+
|
|
44
|
+
| Commit | Row |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `23dc894` fix(TimeInput): give form-time a field ref that answers every call | 1 |
|
|
47
|
+
| `c6406f6` style(fields): format the fieldRefHandle call in useFieldRef | 6 |
|
|
48
|
+
| `a51e9c6` refactor(fields): drop useFieldRef's unusable type parameter | 5 |
|
|
49
|
+
| `b64bfc4` refactor(fields): drop the repeated useFieldRef comment | 4 |
|
|
50
|
+
| `91147ff` refactor(EntityPageCustomField): resolve the control once | 8 |
|
|
51
|
+
| `94baa17` test(fields): guard the other converted renderers against setFocus | 7 |
|
|
52
|
+
|
|
53
|
+
Row 2 was a PR-description correction, not code. Row 3 answered in
|
|
54
|
+
[issuecomment-5385655358](https://github.com/wix-private/cairo/pull/5746#issuecomment-5385655358).
|