@wix/auto-patterns 1.54.0 → 1.55.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/assets/locale/messages_en.json +1 -0
- package/dist/cjs/cms-fields/components/address/input/address-input.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/address/input/address-input.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/audio/audio-field/form-audio-field.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/cjs/cms-fields/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/color-view/color-view.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/delete-dialog/delete-dialog.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/document/form-document-field.st.css.js +7 -7
- package/dist/cjs/cms-fields/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/exclamation/exclamation.st.css +2 -3
- package/dist/cjs/cms-fields/components/exclamation/exclamation.st.css.js +5 -5
- package/dist/cjs/cms-fields/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/exclamation/type-mismatch-exclamation.js +1 -0
- package/dist/cjs/cms-fields/components/exclamation/type-mismatch-exclamation.js.map +1 -1
- package/dist/cjs/cms-fields/components/highlighted-text/highlighted-text.st.css.js +5 -5
- package/dist/cjs/cms-fields/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/media-control/paste-url-button.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
- package/dist/cjs/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/media-image/media-image.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/media-image/media-image.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/media-loader/media-loader.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/cjs/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
- package/dist/cjs/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +6 -6
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +5 -5
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/cjs/cms-fields/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/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +9 -9
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
- package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
- package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
- package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/components/text/text-view.st.css.js +3 -3
- package/dist/cjs/cms-fields/components/text/text-view.st.css.js.map +1 -1
- package/dist/cjs/cms-fields/validations/array.js +26 -0
- package/dist/cjs/cms-fields/validations/array.js.map +1 -0
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +2 -1
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js +4 -3
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -1
- package/dist/cjs/components/fields/Array.js +111 -0
- package/dist/cjs/components/fields/Array.js.map +1 -0
- package/dist/cjs/components/fields/index.js +5 -2
- package/dist/cjs/components/fields/index.js.map +1 -1
- package/dist/cjs/components/layouts/FormField.js +2 -1
- package/dist/cjs/components/layouts/FormField.js.map +1 -1
- package/dist/cjs/hooks/useBaseTableFeatures.js +1 -0
- package/dist/cjs/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useColumns.js +26 -18
- package/dist/cjs/hooks/useColumns.js.map +1 -1
- package/dist/cjs/hooks/useFiltersState.js +1 -0
- package/dist/cjs/hooks/useFiltersState.js.map +1 -1
- package/dist/cjs/services/translations.js.map +1 -1
- package/dist/cjs/styles.global.css +1 -1
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
- package/dist/esm/assets/locale/messages_en.json +1 -0
- package/dist/esm/cms-fields/components/address/input/address-input.st.css.js +3 -3
- package/dist/esm/cms-fields/components/address/input/address-input.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
- package/dist/esm/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/audio/audio-field/form-audio-field.st.css.js +4 -4
- package/dist/esm/cms-fields/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/esm/cms-fields/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/color-view/color-view.st.css.js +4 -4
- package/dist/esm/cms-fields/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/delete-dialog/delete-dialog.st.css.js +3 -3
- package/dist/esm/cms-fields/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/document/form-document-field.st.css.js +7 -7
- package/dist/esm/cms-fields/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/exclamation/exclamation.st.css +2 -3
- package/dist/esm/cms-fields/components/exclamation/exclamation.st.css.js +5 -5
- package/dist/esm/cms-fields/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/exclamation/type-mismatch-exclamation.js +2 -1
- package/dist/esm/cms-fields/components/exclamation/type-mismatch-exclamation.js.map +1 -1
- package/dist/esm/cms-fields/components/highlighted-text/highlighted-text.st.css.js +5 -5
- package/dist/esm/cms-fields/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/media-control/paste-url-button.st.css.js +4 -4
- package/dist/esm/cms-fields/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
- package/dist/esm/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/media-image/media-image.st.css.js +4 -4
- package/dist/esm/cms-fields/components/media-image/media-image.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/media-loader/media-loader.st.css.js +3 -3
- package/dist/esm/cms-fields/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/esm/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
- package/dist/esm/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +6 -6
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +5 -5
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/esm/cms-fields/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/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +9 -9
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +4 -4
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
- package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
- package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
- package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
- package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- package/dist/esm/cms-fields/components/text/text-view.st.css.js +3 -3
- package/dist/esm/cms-fields/components/text/text-view.st.css.js.map +1 -1
- package/dist/esm/cms-fields/validations/array.js +20 -0
- package/dist/esm/cms-fields/validations/array.js.map +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js +2 -1
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -1
- package/dist/esm/components/fields/Array.js +86 -0
- package/dist/esm/components/fields/Array.js.map +1 -0
- package/dist/esm/components/fields/index.js +1 -0
- package/dist/esm/components/fields/index.js.map +1 -1
- package/dist/esm/components/layouts/FormField.js +2 -1
- package/dist/esm/components/layouts/FormField.js.map +1 -1
- package/dist/esm/hooks/useBaseTableFeatures.js +1 -0
- package/dist/esm/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useColumns.js +6 -4
- package/dist/esm/hooks/useColumns.js.map +1 -1
- package/dist/esm/hooks/useFiltersState.js +1 -0
- package/dist/esm/hooks/useFiltersState.js.map +1 -1
- package/dist/esm/services/translations.js.map +1 -1
- package/dist/esm/styles.global.css +1 -1
- package/dist/esm/types/CollectionPageConfig.js.map +1 -1
- package/dist/types/cms-fields/components/audio/audio-field/form-audio-field.st.css.d.ts.map +1 -1
- package/dist/types/cms-fields/components/color-view/color-view.st.css.d.ts.map +1 -1
- package/dist/types/cms-fields/components/media-gallery/form-media-gallery-field.st.css.d.ts.map +1 -1
- package/dist/types/cms-fields/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/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.d.ts.map +1 -1
- package/dist/types/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
- package/dist/types/cms-fields/components/text/text-view.st.css.d.ts.map +1 -1
- package/dist/types/cms-fields/validations/array.d.ts +3 -0
- package/dist/types/cms-fields/validations/array.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsApp/AutoPatternsApp.uni.driver.d.ts +193 -5
- package/dist/types/components/AutoPatternsApp/AutoPatternsApp.uni.driver.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts +1 -0
- package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsTable/AutoPatternsTable.uni.driver.d.ts +193 -5
- package/dist/types/components/AutoPatternsTable/AutoPatternsTable.uni.driver.d.ts.map +1 -1
- package/dist/types/components/fields/Array.d.ts +6 -0
- package/dist/types/components/fields/Array.d.ts.map +1 -0
- package/dist/types/components/fields/index.d.ts +1 -0
- package/dist/types/components/fields/index.d.ts.map +1 -1
- package/dist/types/components/layouts/FormField.d.ts.map +1 -1
- package/dist/types/hooks/useBaseTableFeatures.d.ts +2 -0
- package/dist/types/hooks/useBaseTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useColumns.d.ts.map +1 -1
- package/dist/types/hooks/useFiltersState.d.ts.map +1 -1
- package/dist/types/services/translations.d.ts +1 -1
- package/dist/types/services/translations.d.ts.map +1 -1
- package/dist/types/testkit/enzyme.d.ts +193 -5
- package/dist/types/testkit/enzyme.d.ts.map +1 -1
- package/dist/types/testkit/jsdom.d.ts +193 -5
- package/dist/types/testkit/jsdom.d.ts.map +1 -1
- package/dist/types/testkit/playwright.d.ts +193 -5
- package/dist/types/testkit/playwright.d.ts.map +1 -1
- package/dist/types/testkit/puppeteer.d.ts +193 -5
- package/dist/types/testkit/puppeteer.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +6 -0
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -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/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-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/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richtexteditor4055661011\";\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\":\"richtexteditor4055661011__root\",\"nativeInput\":\"richtexteditor4055661011__nativeInput\",\"editor\":\"richtexteditor4055661011__editor\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-blue-100\":\"--wds-color-blue-100\",\"wds-color-blue-300\":\"--wds-color-blue-300\",\"wds-color-red-100\":\"--wds-color-red-100\",\"wds-color-red-300\":\"--wds-color-red-300\",\"wds-color-yellow-100\":\"--wds-color-yellow-100\",\"wds-color-yellow-300\":\"--wds-color-yellow-300\",\"wds-color-black-700\":\"--wds-color-black-700\",\"wds-input-shadow-focus-standard\":\"--wds-input-shadow-focus-standard\",\"wds-border-radius-300\":\"--wds-border-radius-300\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,0BAA0B;AAC5C,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,gCAAgC;EAAC,aAAa,EAAC,uCAAuC;EAAC,QAAQ,EAAC;AAAkC,CAAC;AACzJ,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,oBAAoB,EAAC,sBAAsB;EAAC,oBAAoB,EAAC,sBAAsB;EAAC,mBAAmB,EAAC,qBAAqB;EAAC,mBAAmB,EAAC,qBAAqB;EAAC,sBAAsB,EAAC,wBAAwB;EAAC,sBAAsB,EAAC,wBAAwB;EAAC,qBAAqB,EAAC,uBAAuB;EAAC,iCAAiC,EAAC,mCAAmC;EAAC,uBAAuB,EAAC;AAAyB,CAAC","ignoreList":[]}
|
|
@@ -5,30 +5,30 @@ 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_ = "toolbar2895226836";
|
|
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
|
-
"item": "
|
|
17
|
-
"separator": "
|
|
18
|
-
"clearFormatting": "
|
|
19
|
-
"fullScreen": "
|
|
20
|
-
"dropdownItemContent": "
|
|
21
|
-
"dropdownItemTitle": "
|
|
22
|
-
"dropdownItemSubtitle": "
|
|
23
|
-
"dropdownHeaderOne": "
|
|
24
|
-
"dropdownHeaderTwo": "
|
|
25
|
-
"dropdownHeaderThree": "
|
|
26
|
-
"dropdownHeaderFour": "
|
|
27
|
-
"dropdownHeaderFive": "
|
|
28
|
-
"dropdownHeaderSix": "
|
|
29
|
-
"dropdownParagraphOne": "
|
|
30
|
-
"dropdownNormalText": "
|
|
31
|
-
"dropdownParagraphThree": "
|
|
15
|
+
"root": "toolbar2895226836__root",
|
|
16
|
+
"item": "toolbar2895226836__item",
|
|
17
|
+
"separator": "toolbar2895226836__separator",
|
|
18
|
+
"clearFormatting": "toolbar2895226836__clearFormatting",
|
|
19
|
+
"fullScreen": "toolbar2895226836__fullScreen",
|
|
20
|
+
"dropdownItemContent": "toolbar2895226836__dropdownItemContent",
|
|
21
|
+
"dropdownItemTitle": "toolbar2895226836__dropdownItemTitle",
|
|
22
|
+
"dropdownItemSubtitle": "toolbar2895226836__dropdownItemSubtitle",
|
|
23
|
+
"dropdownHeaderOne": "toolbar2895226836__dropdownHeaderOne",
|
|
24
|
+
"dropdownHeaderTwo": "toolbar2895226836__dropdownHeaderTwo",
|
|
25
|
+
"dropdownHeaderThree": "toolbar2895226836__dropdownHeaderThree",
|
|
26
|
+
"dropdownHeaderFour": "toolbar2895226836__dropdownHeaderFour",
|
|
27
|
+
"dropdownHeaderFive": "toolbar2895226836__dropdownHeaderFive",
|
|
28
|
+
"dropdownHeaderSix": "toolbar2895226836__dropdownHeaderSix",
|
|
29
|
+
"dropdownParagraphOne": "toolbar2895226836__dropdownParagraphOne",
|
|
30
|
+
"dropdownNormalText": "toolbar2895226836__dropdownNormalText",
|
|
31
|
+
"dropdownParagraphThree": "toolbar2895226836__dropdownParagraphThree"
|
|
32
32
|
};
|
|
33
33
|
var keyframes = exports.keyframes = {};
|
|
34
34
|
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/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.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/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"toolbar2895226836\";\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\":\"toolbar2895226836__root\",\"item\":\"toolbar2895226836__item\",\"separator\":\"toolbar2895226836__separator\",\"clearFormatting\":\"toolbar2895226836__clearFormatting\",\"fullScreen\":\"toolbar2895226836__fullScreen\",\"dropdownItemContent\":\"toolbar2895226836__dropdownItemContent\",\"dropdownItemTitle\":\"toolbar2895226836__dropdownItemTitle\",\"dropdownItemSubtitle\":\"toolbar2895226836__dropdownItemSubtitle\",\"dropdownHeaderOne\":\"toolbar2895226836__dropdownHeaderOne\",\"dropdownHeaderTwo\":\"toolbar2895226836__dropdownHeaderTwo\",\"dropdownHeaderThree\":\"toolbar2895226836__dropdownHeaderThree\",\"dropdownHeaderFour\":\"toolbar2895226836__dropdownHeaderFour\",\"dropdownHeaderFive\":\"toolbar2895226836__dropdownHeaderFive\",\"dropdownHeaderSix\":\"toolbar2895226836__dropdownHeaderSix\",\"dropdownParagraphOne\":\"toolbar2895226836__dropdownParagraphOne\",\"dropdownNormalText\":\"toolbar2895226836__dropdownNormalText\",\"dropdownParagraphThree\":\"toolbar2895226836__dropdownParagraphThree\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-blue-400\":\"--wds-color-blue-400\",\"wds-color-black-400\":\"--wds-color-black-400\",\"wds-color-white\":\"--wds-color-white\",\"wds-font-family-default\":\"--wds-font-family-default\",\"wds-font-weight-medium\":\"--wds-font-weight-medium\",\"wds-font-weight-bold\":\"--wds-font-weight-bold\",\"wds-font-size-500\":\"--wds-font-size-500\",\"wds-font-line-height-300\":\"--wds-font-line-height-300\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,mBAAmB;AACrC,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,yBAAyB;EAAC,MAAM,EAAC,yBAAyB;EAAC,WAAW,EAAC,8BAA8B;EAAC,iBAAiB,EAAC,oCAAoC;EAAC,YAAY,EAAC,+BAA+B;EAAC,qBAAqB,EAAC,wCAAwC;EAAC,mBAAmB,EAAC,sCAAsC;EAAC,sBAAsB,EAAC,yCAAyC;EAAC,mBAAmB,EAAC,sCAAsC;EAAC,mBAAmB,EAAC,sCAAsC;EAAC,qBAAqB,EAAC,wCAAwC;EAAC,oBAAoB,EAAC,uCAAuC;EAAC,oBAAoB,EAAC,uCAAuC;EAAC,mBAAmB,EAAC,sCAAsC;EAAC,sBAAsB,EAAC,yCAAyC;EAAC,oBAAoB,EAAC,uCAAuC;EAAC,wBAAwB,EAAC;AAA2C,CAAC;AACx8B,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,oBAAoB,EAAC,sBAAsB;EAAC,qBAAqB,EAAC,uBAAuB;EAAC,iBAAiB,EAAC,mBAAmB;EAAC,yBAAyB,EAAC,2BAA2B;EAAC,wBAAwB,EAAC,0BAA0B;EAAC,sBAAsB,EAAC,wBAAwB;EAAC,mBAAmB,EAAC,qBAAqB;EAAC,0BAA0B,EAAC;AAA4B,CAAC","ignoreList":[]}
|
|
@@ -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_ = "textview1495705";
|
|
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": "textview1495705__root",
|
|
16
|
+
"textView": "textview1495705__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/cms-fields/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/cms-fields/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_ = \"textview1495705\";\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\":\"textview1495705__root\",\"textView\":\"textview1495705__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,iBAAiB;AACnC,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,uBAAuB;EAAC,UAAU,EAAC;AAA2B,CAAC;AACrF,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":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.isValid = exports.hardConvert = void 0;
|
|
5
|
+
const isValid = data => {
|
|
6
|
+
return Array.isArray(data);
|
|
7
|
+
};
|
|
8
|
+
exports.isValid = isValid;
|
|
9
|
+
const hardConvert = data => {
|
|
10
|
+
if (typeof data !== 'string') {
|
|
11
|
+
throw new Error(`Can not convert "${data}" into array`);
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
return JSON.parse(data);
|
|
15
|
+
} catch {
|
|
16
|
+
return data.split(',').map(item => {
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(item);
|
|
19
|
+
} catch {
|
|
20
|
+
return item.trim();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.hardConvert = hardConvert;
|
|
26
|
+
//# sourceMappingURL=array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isValid","data","Array","isArray","exports","hardConvert","Error","JSON","parse","split","map","item","trim"],"sources":["../../../../src/cms-fields/validations/array.ts"],"sourcesContent":["export const isValid = (data: any): data is any[] => {\n return Array.isArray(data);\n};\n\nexport const hardConvert = (data: any) => {\n if (typeof data !== 'string') {\n throw new Error(`Can not convert \"${data}\" into array`);\n }\n\n try {\n return JSON.parse(data);\n } catch {\n return data.split(',').map((item) => {\n try {\n return JSON.parse(item);\n } catch {\n return item.trim();\n }\n });\n }\n};\n"],"mappings":";;;;AAAO,MAAMA,OAAO,GAAIC,IAAS,IAAoB;EACnD,OAAOC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC;AAC5B,CAAC;AAACG,OAAA,CAAAJ,OAAA,GAAAA,OAAA;AAEK,MAAMK,WAAW,GAAIJ,IAAS,IAAK;EACxC,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IAC5B,MAAM,IAAIK,KAAK,CAAC,oBAAoBL,IAAI,cAAc,CAAC;EACzD;EAEA,IAAI;IACF,OAAOM,IAAI,CAACC,KAAK,CAACP,IAAI,CAAC;EACzB,CAAC,CAAC,MAAM;IACN,OAAOA,IAAI,CAACQ,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAEC,IAAI,IAAK;MACnC,IAAI;QACF,OAAOJ,IAAI,CAACC,KAAK,CAACG,IAAI,CAAC;MACzB,CAAC,CAAC,MAAM;QACN,OAAOA,IAAI,CAACC,IAAI,CAAC,CAAC;MACpB;IACF,CAAC,CAAC;EACJ;AACF,CAAC;AAACR,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ var _ContentSkeleton = require("../layouts/ContentSkeleton");
|
|
|
7
7
|
var _patterns = require("@wix/patterns");
|
|
8
8
|
var _AutoPatternsAppContainerProvider = require("../AutoPatternsApp/AutoPatternsAppContainerProvider");
|
|
9
9
|
var _AutoPatternsEntityPageState = require("./AutoPatternsEntityPageState");
|
|
10
|
+
require("../../styles.global.css");
|
|
10
11
|
var _jsxFileName = "/home/builduser/work/8f3ab5a55e62623a/packages/auto-patterns/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx";
|
|
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
|
const AutoPatternsEntityPage = exports.AutoPatternsEntityPage = (0, _patterns.observer)(({
|
|
@@ -24,7 +25,7 @@ const AutoPatternsEntityPage = exports.AutoPatternsEntityPage = (0, _patterns.ob
|
|
|
24
25
|
__self: void 0,
|
|
25
26
|
__source: {
|
|
26
27
|
fileName: _jsxFileName,
|
|
27
|
-
lineNumber:
|
|
28
|
+
lineNumber: 28,
|
|
28
29
|
columnNumber: 14
|
|
29
30
|
}
|
|
30
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_ContentSkeleton","_patterns","_AutoPatternsAppContainerProvider","_AutoPatternsEntityPageState","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AutoPatternsEntityPage","exports","observer","configuration","container","useAutoPatternsAppContainer","state","useState","AutoPatternsEntityPageState","config","useEffect","init","initTask","status","isIdle","isLoading","createElement","ContentSkeleton","pageConfig","__self","__source","fileName","lineNumber","columnNumber","EntityPageElement"],"sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { EntityPageConfig } from '../../types';\nimport { ContentSkeleton } from '../layouts/ContentSkeleton';\nimport { observer } from '@wix/patterns';\nimport { useAutoPatternsAppContainer } from '../AutoPatternsApp/AutoPatternsAppContainerProvider';\nimport { AutoPatternsEntityPageState } from './AutoPatternsEntityPageState';\n\nexport interface AutoPatternsEntityPageProps {\n configuration: EntityPageConfig;\n}\n\nexport const AutoPatternsEntityPage = observer(\n ({ configuration }: AutoPatternsEntityPageProps) => {\n const container = useAutoPatternsAppContainer();\n\n const [state] = useState(\n () =>\n new AutoPatternsEntityPageState({\n container,\n config: configuration,\n }),\n );\n\n useEffect(() => state.init(), [state]);\n\n if (state.initTask.status.isIdle || state.initTask.status.isLoading) {\n return <ContentSkeleton pageConfig={configuration} />;\n }\n\n return state.EntityPageElement;\n },\n);\n\n/*\n Key structure explanation:\n\n Main cards: main-section-card-{layoutIndex}\n Sidebar cards: sidebar-section-card-{layoutIndex}\n\n Layout content:\n {sectionId}-card-{cardIndex}-content-{contentIndex}\n\n Nested children:\n {sectionId}-card-{cardIndex}-content-{parentContentIndex}-level-{level}-child-{childIndex}\n\n This ensures uniqueness across all levels and sections.\n*/\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_ContentSkeleton","_patterns","_AutoPatternsAppContainerProvider","_AutoPatternsEntityPageState","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AutoPatternsEntityPage","exports","observer","configuration","container","useAutoPatternsAppContainer","state","useState","AutoPatternsEntityPageState","config","useEffect","init","initTask","status","isIdle","isLoading","createElement","ContentSkeleton","pageConfig","__self","__source","fileName","lineNumber","columnNumber","EntityPageElement"],"sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { EntityPageConfig } from '../../types';\nimport { ContentSkeleton } from '../layouts/ContentSkeleton';\nimport { observer } from '@wix/patterns';\nimport { useAutoPatternsAppContainer } from '../AutoPatternsApp/AutoPatternsAppContainerProvider';\nimport { AutoPatternsEntityPageState } from './AutoPatternsEntityPageState';\nimport '../../styles.global.css';\n\nexport interface AutoPatternsEntityPageProps {\n configuration: EntityPageConfig;\n}\n\nexport const AutoPatternsEntityPage = observer(\n ({ configuration }: AutoPatternsEntityPageProps) => {\n const container = useAutoPatternsAppContainer();\n\n const [state] = useState(\n () =>\n new AutoPatternsEntityPageState({\n container,\n config: configuration,\n }),\n );\n\n useEffect(() => state.init(), [state]);\n\n if (state.initTask.status.isIdle || state.initTask.status.isLoading) {\n return <ContentSkeleton pageConfig={configuration} />;\n }\n\n return state.EntityPageElement;\n },\n);\n\n/*\n Key structure explanation:\n\n Main cards: main-section-card-{layoutIndex}\n Sidebar cards: sidebar-section-card-{layoutIndex}\n\n Layout content:\n {sectionId}-card-{cardIndex}-content-{contentIndex}\n\n Nested children:\n {sectionId}-card-{cardIndex}-content-{parentContentIndex}-level-{level}-child-{childIndex}\n\n This ensures uniqueness across all levels and sections.\n*/\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACAA,OAAA;AAAiC,IAAAK,YAAA;AAAA,SAAAN,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAA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,CAACE,SAAS,EAAE;IACnE,oBAAO1C,MAAA,CAAAkB,OAAA,CAAAyB,aAAA,CAACxC,gBAAA,CAAAyC,eAAe;MAACC,UAAU,EAAEf,aAAc;MAAAgB,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAzC,YAAA;QAAA0C,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CAAC;EACvD;EAEA,OAAOjB,KAAK,CAACkB,iBAAiB;AAChC,CACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -74,7 +74,8 @@ const AutoPatternsGridLoaded = props => {
|
|
|
74
74
|
preset: preset,
|
|
75
75
|
imagePlacement: imagePlacement,
|
|
76
76
|
renderItem: renderItem,
|
|
77
|
-
state: state
|
|
77
|
+
state: state,
|
|
78
|
+
showFieldTypeIcons: config.showFieldTypeIcons
|
|
78
79
|
}, baseCollectionComponentReadyFeatures, dragAndDropProps, importProps, {
|
|
79
80
|
__self: void 0,
|
|
80
81
|
__source: {
|
|
@@ -148,7 +149,7 @@ const AutoPatternsGrid = props => {
|
|
|
148
149
|
__self: void 0,
|
|
149
150
|
__source: {
|
|
150
151
|
fileName: _jsxFileName,
|
|
151
|
-
lineNumber:
|
|
152
|
+
lineNumber: 141,
|
|
152
153
|
columnNumber: 7
|
|
153
154
|
}
|
|
154
155
|
});
|
|
@@ -164,7 +165,7 @@ const AutoPatternsGrid = props => {
|
|
|
164
165
|
__self: void 0,
|
|
165
166
|
__source: {
|
|
166
167
|
fileName: _jsxFileName,
|
|
167
|
-
lineNumber:
|
|
168
|
+
lineNumber: 152,
|
|
168
169
|
columnNumber: 5
|
|
169
170
|
}
|
|
170
171
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_patterns","_useBasePatternsStateParams","_hooks","_useBaseGridFeatures","_useBaseCollectionComponentReadyFeatures","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AutoPatternsGridLoaded","props","config","asyncFeaturesState","baseStateParams","dataHook","renderItem","imagePlacement","preset","useBaseGridFeatures","dragAndDrop","importFeature","useSelector","status","data","state","useGridCollection","params","baseCollectionComponentReadyFeatures","useBaseCollectionComponentReadyFeatures","collection","reportBi","toolbar","dragAndDropProps","useGridDragAndDrop","importProps","useImport","createElement","Grid","_extends2","__self","__source","fileName","lineNumber","columnNumber","AutoPatternsGrid","visibleFieldIds","useBasePatternsStateParams","useGridFeaturesAsync","container","useWixPatternsContainer","createCollection","useCreateCollection","useState","GridState","isReady","isSuccess","isError","exports"],"sources":["../../../../src/components/AutoPatternsGrid/AutoPatternsGrid.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Grid,\n GridState,\n useCreateCollection,\n useGridCollection,\n useSelector,\n useWixPatternsContainer,\n} from '@wix/patterns';\nimport { GridConfig } from '../../types';\nimport { useBasePatternsStateParams } from '../../hooks/useBasePatternsStateParams';\nimport { useGridFeaturesAsync } from '../../hooks';\nimport { useBaseGridFeatures } from '../../hooks/useBaseGridFeatures';\nimport { useBaseCollectionComponentReadyFeatures } from '../../hooks/useBaseCollectionComponentReadyFeatures';\n\nexport interface AutoPatternsGridContentProps {\n config: GridConfig;\n}\n\n/**\n * AutoPatternsGridLoaded - Step 4 in Grid Flow\n *\n * FLOW 2: AutoPatternsCollectionComponent → AutoPatternsGrid → useGridFeaturesAsync → [AutoPatternsGridLoaded] → useBaseCollectionComponentReadyFeatures → Grid\n *\n * This component renders when all async features have been loaded and are ready.\n * It represents the \"loaded\" state of the grid flow and handles:\n *\n * Key Responsibilities:\n * - Creates the grid collection state using loaded async features\n * - Calls useBaseCollectionComponentReadyFeatures for final feature preparation\n * - Extracts grid-specific features (renderItem, preset, imagePlacement) from base features\n * - Extracts async features like dragAndDrop if enabled\n * - Renders the final Grid component with all features combined\n */\nconst AutoPatternsGridLoaded = (\n props: NonNullable<ReturnType<typeof useGridFeaturesAsync>> &\n AutoPatternsGridContentProps & {\n baseStateParams: ReturnType<typeof useBasePatternsStateParams>;\n dataHook?: string;\n },\n) => {\n const { config, asyncFeaturesState, baseStateParams, dataHook } = props;\n\n // Extract grid-specific display features (how items are rendered and displayed)\n const { renderItem, imagePlacement, preset } = useBaseGridFeatures(config);\n\n // Extract loaded async features from the successful feature loading state\n const { dragAndDrop, importFeature } = useSelector(() => ({\n ...asyncFeaturesState.status.data,\n }));\n\n // Create grid collection state with the loaded async dependencies\n const state = useGridCollection<any>(baseStateParams.params);\n\n // STEP 5: Call shared hook that prepares final collection features\n // This hook is shared across all three flows (Table, Grid, TableGridSwitch)\n const baseCollectionComponentReadyFeatures =\n useBaseCollectionComponentReadyFeatures({\n config,\n collection: state.collection,\n reportBi: state.toolbar.reportBi,\n asyncFeaturesState,\n baseStateParams,\n });\n\n // Extract grid-specific drag and drop props if feature is loaded\n const dragAndDropProps = dragAndDrop?.useGridDragAndDrop?.(config);\n const importProps = importFeature?.useImport?.(config);\n\n // FINAL STEP: Render the fully-featured Grid component\n // Combines grid display features with loaded async features\n return (\n <Grid\n dataHook={dataHook}\n preset={preset}\n imagePlacement={imagePlacement}\n renderItem={renderItem}\n state={state}\n {...baseCollectionComponentReadyFeatures}\n {...dragAndDropProps}\n {...importProps}\n />\n );\n};\n\n/**\n * AutoPatternsGrid - Step 2 in Grid Flow\n *\n * FLOW 2: AutoPatternsCollectionComponent → [AutoPatternsGrid] → useGridFeaturesAsync → AutoPatternsGridLoaded → useBaseCollectionComponentReadyFeatures → Grid\n *\n * This is the main grid component that orchestrates the grid rendering flow.\n * It handles the loading states and coordinates between async feature loading and final rendering.\n *\n * Key Responsibilities:\n * - Extracts grid display features (renderItem, preset, imagePlacement) and visible field IDs\n * - Calls useGridFeaturesAsync (Step 3) to load grid-specific async features\n * - Creates initial grid state with basic collection\n * - Monitors loading status and switches between loading/loaded states\n * - Renders skeleton grid during loading or AutoPatternsGridLoaded when ready\n */\nexport const AutoPatternsGrid = (props: AutoPatternsGridContentProps) => {\n const { config } = props;\n\n // Extract grid display features and visible field IDs from configuration\n const { renderItem, imagePlacement, preset, visibleFieldIds } =\n useBaseGridFeatures(config);\n\n // Initialize base state parameters with collection config and visible fields\n const baseStateParams = useBasePatternsStateParams(config, {\n visibleFieldIds,\n });\n\n // STEP 3: Load grid-specific async features (currently only drag&drop)\n const { asyncFeaturesState } = useGridFeaturesAsync({ config });\n\n // Create patterns container and collection factory\n const container = useWixPatternsContainer();\n const createCollection = useCreateCollection();\n\n // Initialize grid state with basic collection (used during loading)\n const [state] = useState(\n () =>\n new GridState<any, {}>({\n collection: createCollection<any, {}>(baseStateParams.params),\n container,\n }),\n );\n\n // Monitor async features loading status\n const isReady = useSelector(\n () =>\n asyncFeaturesState.status.isSuccess || asyncFeaturesState.status.isError,\n );\n\n const dataHook = 'auto-patterns-grid';\n\n if (isReady) {\n // STEP 4: All features loaded - render the fully-featured grid\n return (\n <AutoPatternsGridLoaded\n dataHook={dataHook}\n config={config}\n baseStateParams={baseStateParams}\n asyncFeaturesState={asyncFeaturesState}\n />\n );\n }\n\n // LOADING STATE: Render basic grid skeleton while features are loading\n return (\n <Grid\n dataHook={dataHook}\n preset={preset}\n imagePlacement={imagePlacement}\n renderItem={renderItem}\n state={state}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AASA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,wCAAA,GAAAL,OAAA;AAA8G,IAAAM,YAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAA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AAAC,QAAA;MAAAC,QAAA,EAAApD,YAAA;MAAAqD,UAAA;MAAAC,YAAA;IAAA;EAAA,CACd,CAAC;AAEN,CAAC;AAACc,OAAA,CAAAb,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_patterns","_useBasePatternsStateParams","_hooks","_useBaseGridFeatures","_useBaseCollectionComponentReadyFeatures","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AutoPatternsGridLoaded","props","config","asyncFeaturesState","baseStateParams","dataHook","renderItem","imagePlacement","preset","useBaseGridFeatures","dragAndDrop","importFeature","useSelector","status","data","state","useGridCollection","params","baseCollectionComponentReadyFeatures","useBaseCollectionComponentReadyFeatures","collection","reportBi","toolbar","dragAndDropProps","useGridDragAndDrop","importProps","useImport","createElement","Grid","_extends2","showFieldTypeIcons","__self","__source","fileName","lineNumber","columnNumber","AutoPatternsGrid","visibleFieldIds","useBasePatternsStateParams","useGridFeaturesAsync","container","useWixPatternsContainer","createCollection","useCreateCollection","useState","GridState","isReady","isSuccess","isError","exports"],"sources":["../../../../src/components/AutoPatternsGrid/AutoPatternsGrid.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Grid,\n GridState,\n useCreateCollection,\n useGridCollection,\n useSelector,\n useWixPatternsContainer,\n} from '@wix/patterns';\nimport { GridConfig } from '../../types';\nimport { useBasePatternsStateParams } from '../../hooks/useBasePatternsStateParams';\nimport { useGridFeaturesAsync } from '../../hooks';\nimport { useBaseGridFeatures } from '../../hooks/useBaseGridFeatures';\nimport { useBaseCollectionComponentReadyFeatures } from '../../hooks/useBaseCollectionComponentReadyFeatures';\n\nexport interface AutoPatternsGridContentProps {\n config: GridConfig;\n}\n\n/**\n * AutoPatternsGridLoaded - Step 4 in Grid Flow\n *\n * FLOW 2: AutoPatternsCollectionComponent → AutoPatternsGrid → useGridFeaturesAsync → [AutoPatternsGridLoaded] → useBaseCollectionComponentReadyFeatures → Grid\n *\n * This component renders when all async features have been loaded and are ready.\n * It represents the \"loaded\" state of the grid flow and handles:\n *\n * Key Responsibilities:\n * - Creates the grid collection state using loaded async features\n * - Calls useBaseCollectionComponentReadyFeatures for final feature preparation\n * - Extracts grid-specific features (renderItem, preset, imagePlacement) from base features\n * - Extracts async features like dragAndDrop if enabled\n * - Renders the final Grid component with all features combined\n */\nconst AutoPatternsGridLoaded = (\n props: NonNullable<ReturnType<typeof useGridFeaturesAsync>> &\n AutoPatternsGridContentProps & {\n baseStateParams: ReturnType<typeof useBasePatternsStateParams>;\n dataHook?: string;\n },\n) => {\n const { config, asyncFeaturesState, baseStateParams, dataHook } = props;\n\n // Extract grid-specific display features (how items are rendered and displayed)\n const { renderItem, imagePlacement, preset } = useBaseGridFeatures(config);\n\n // Extract loaded async features from the successful feature loading state\n const { dragAndDrop, importFeature } = useSelector(() => ({\n ...asyncFeaturesState.status.data,\n }));\n\n // Create grid collection state with the loaded async dependencies\n const state = useGridCollection<any>(baseStateParams.params);\n\n // STEP 5: Call shared hook that prepares final collection features\n // This hook is shared across all three flows (Table, Grid, TableGridSwitch)\n const baseCollectionComponentReadyFeatures =\n useBaseCollectionComponentReadyFeatures({\n config,\n collection: state.collection,\n reportBi: state.toolbar.reportBi,\n asyncFeaturesState,\n baseStateParams,\n });\n\n // Extract grid-specific drag and drop props if feature is loaded\n const dragAndDropProps = dragAndDrop?.useGridDragAndDrop?.(config);\n const importProps = importFeature?.useImport?.(config);\n\n // FINAL STEP: Render the fully-featured Grid component\n // Combines grid display features with loaded async features\n return (\n <Grid\n dataHook={dataHook}\n preset={preset}\n imagePlacement={imagePlacement}\n renderItem={renderItem}\n state={state}\n showFieldTypeIcons={config.showFieldTypeIcons}\n {...baseCollectionComponentReadyFeatures}\n {...dragAndDropProps}\n {...importProps}\n />\n );\n};\n\n/**\n * AutoPatternsGrid - Step 2 in Grid Flow\n *\n * FLOW 2: AutoPatternsCollectionComponent → [AutoPatternsGrid] → useGridFeaturesAsync → AutoPatternsGridLoaded → useBaseCollectionComponentReadyFeatures → Grid\n *\n * This is the main grid component that orchestrates the grid rendering flow.\n * It handles the loading states and coordinates between async feature loading and final rendering.\n *\n * Key Responsibilities:\n * - Extracts grid display features (renderItem, preset, imagePlacement) and visible field IDs\n * - Calls useGridFeaturesAsync (Step 3) to load grid-specific async features\n * - Creates initial grid state with basic collection\n * - Monitors loading status and switches between loading/loaded states\n * - Renders skeleton grid during loading or AutoPatternsGridLoaded when ready\n */\nexport const AutoPatternsGrid = (props: AutoPatternsGridContentProps) => {\n const { config } = props;\n\n // Extract grid display features and visible field IDs from configuration\n const { renderItem, imagePlacement, preset, visibleFieldIds } =\n useBaseGridFeatures(config);\n\n // Initialize base state parameters with collection config and visible fields\n const baseStateParams = useBasePatternsStateParams(config, {\n visibleFieldIds,\n });\n\n // STEP 3: Load grid-specific async features (currently only drag&drop)\n const { asyncFeaturesState } = useGridFeaturesAsync({ config });\n\n // Create patterns container and collection factory\n const container = useWixPatternsContainer();\n const createCollection = useCreateCollection();\n\n // Initialize grid state with basic collection (used during loading)\n const [state] = useState(\n () =>\n new GridState<any, {}>({\n collection: createCollection<any, {}>(baseStateParams.params),\n container,\n }),\n );\n\n // Monitor async features loading status\n const isReady = useSelector(\n () =>\n asyncFeaturesState.status.isSuccess || asyncFeaturesState.status.isError,\n );\n\n const dataHook = 'auto-patterns-grid';\n\n if (isReady) {\n // STEP 4: All features loaded - render the fully-featured grid\n return (\n <AutoPatternsGridLoaded\n dataHook={dataHook}\n config={config}\n baseStateParams={baseStateParams}\n asyncFeaturesState={asyncFeaturesState}\n />\n );\n }\n\n // LOADING STATE: Render basic grid skeleton while features are loading\n return (\n <Grid\n dataHook={dataHook}\n preset={preset}\n imagePlacement={imagePlacement}\n renderItem={renderItem}\n state={state}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA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CD,kBAAkB,EAAEA,kBAAmB;MAAA4B,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAArD,YAAA;QAAAsD,UAAA;QAAAC,YAAA;MAAA;IAAA,CACxC,CAAC;EAEN;;EAEA;EACA,oBACE/D,MAAA,CAAAmB,OAAA,CAAAoC,aAAA,CAACpD,SAAA,CAAAqD,IAAI;IACHvB,QAAQ,EAAEA,QAAS;IACnBG,MAAM,EAAEA,MAAO;IACfD,cAAc,EAAEA,cAAe;IAC/BD,UAAU,EAAEA,UAAW;IACvBS,KAAK,EAAEA,KAAM;IAAAgB,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAArD,YAAA;MAAAsD,UAAA;MAAAC,YAAA;IAAA;EAAA,CACd,CAAC;AAEN,CAAC;AAACc,OAAA,CAAAb,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.Array = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _designSystem = require("@wix/design-system");
|
|
7
|
+
var _patterns = require("@wix/patterns");
|
|
8
|
+
var _form = require("@wix/patterns/form");
|
|
9
|
+
var _AutoPatternsAppContainerProvider = require("../AutoPatternsApp/AutoPatternsAppContainerProvider");
|
|
10
|
+
var _validations = require("../../cms-fields/validations/validations");
|
|
11
|
+
var _cmsFields = require("../../cms-fields");
|
|
12
|
+
var arrayValidation = _interopRequireWildcard(require("../../cms-fields/validations/array"));
|
|
13
|
+
var _jsxFileName = "/home/builduser/work/8f3ab5a55e62623a/packages/auto-patterns/dist/cjs/components/fields/Array.tsx";
|
|
14
|
+
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); }
|
|
15
|
+
const Array = props => {
|
|
16
|
+
var _pageState$entity, _field$validation2, _controller$fieldStat;
|
|
17
|
+
const {
|
|
18
|
+
field,
|
|
19
|
+
dataHook
|
|
20
|
+
} = props;
|
|
21
|
+
const {
|
|
22
|
+
translate: t
|
|
23
|
+
} = (0, _AutoPatternsAppContainerProvider.useAutoPatternsAppContainer)();
|
|
24
|
+
const {
|
|
25
|
+
translate: pt
|
|
26
|
+
} = (0, _patterns.useWixPatternsContainer)();
|
|
27
|
+
const pageState = (0, _patterns.useEntityPageContext)();
|
|
28
|
+
const controller = (0, _form.useController)({
|
|
29
|
+
name: (field == null ? void 0 : field.id) ?? '',
|
|
30
|
+
control: pageState.form.control,
|
|
31
|
+
defaultValue: (_pageState$entity = pageState.entity) == null ? void 0 : _pageState$entity[(field == null ? void 0 : field.id) ?? ''],
|
|
32
|
+
rules: {
|
|
33
|
+
validate: value => {
|
|
34
|
+
var _field$validation;
|
|
35
|
+
if ((_field$validation = field.validation) != null && _field$validation.required && (value === null || value === undefined || value === '')) {
|
|
36
|
+
return pt('cairo.fieldValidation.requiredField');
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const {
|
|
43
|
+
isConverted,
|
|
44
|
+
convertedValue
|
|
45
|
+
} = (0, _react.useMemo)(() => {
|
|
46
|
+
try {
|
|
47
|
+
return {
|
|
48
|
+
isConverted: true,
|
|
49
|
+
convertedValue: arrayValidation.hardConvert(controller.field.value)
|
|
50
|
+
};
|
|
51
|
+
} catch {
|
|
52
|
+
return {
|
|
53
|
+
isConverted: false,
|
|
54
|
+
convertedValue: null
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}, [controller.field.value]);
|
|
58
|
+
const typeName = t('auto-patterns.fields.field_type_array_title');
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_designSystem.FormField, {
|
|
60
|
+
label: field.displayName,
|
|
61
|
+
required: (_field$validation2 = field.validation) == null ? void 0 : _field$validation2.required,
|
|
62
|
+
status: controller.fieldState.error ? 'error' : undefined,
|
|
63
|
+
statusMessage: (_controller$fieldStat = controller.fieldState.error) == null ? void 0 : _controller$fieldStat.message,
|
|
64
|
+
dataHook: dataHook,
|
|
65
|
+
suffix: (0, _validations.isDataValidOrNotSet)(controller.field.value, arrayValidation) ? undefined : /*#__PURE__*/_react.default.createElement(_cmsFields.TypeMismatchExclamation, {
|
|
66
|
+
typeName: typeName,
|
|
67
|
+
clearButtonText: t('auto-patterns.fields.type_mismatch_clear'),
|
|
68
|
+
convertButtonText: t('auto-patterns.fields.type_mismatch_convert', {
|
|
69
|
+
typeName: typeName.toLocaleLowerCase()
|
|
70
|
+
}),
|
|
71
|
+
onClear: () => controller.field.onChange(undefined),
|
|
72
|
+
onChange: value => controller.field.onChange(value),
|
|
73
|
+
convertDisabledText: t('auto-patterns.fields.type_mismatch_convert_disabled'),
|
|
74
|
+
fieldName: field.displayName,
|
|
75
|
+
isConverted: isConverted,
|
|
76
|
+
isConverting: false,
|
|
77
|
+
convertedValue: convertedValue,
|
|
78
|
+
tooltipText: t('auto-patterns.fields.type_mismatch_tip', {
|
|
79
|
+
typeName
|
|
80
|
+
}),
|
|
81
|
+
__self: void 0,
|
|
82
|
+
__source: {
|
|
83
|
+
fileName: _jsxFileName,
|
|
84
|
+
lineNumber: 64,
|
|
85
|
+
columnNumber: 11
|
|
86
|
+
}
|
|
87
|
+
}),
|
|
88
|
+
__self: void 0,
|
|
89
|
+
__source: {
|
|
90
|
+
fileName: _jsxFileName,
|
|
91
|
+
lineNumber: 53,
|
|
92
|
+
columnNumber: 5
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement(_cmsFields.FormJsonInput, {
|
|
95
|
+
autoFocus: false,
|
|
96
|
+
data: controller.field.value,
|
|
97
|
+
onChange: value => controller.field.onChange == null ? void 0 : controller.field.onChange(value),
|
|
98
|
+
onBlur: controller.field.onBlur,
|
|
99
|
+
ref: controller.field.ref,
|
|
100
|
+
dataHook: `array-${field.id}`,
|
|
101
|
+
field: field.id,
|
|
102
|
+
__self: void 0,
|
|
103
|
+
__source: {
|
|
104
|
+
fileName: _jsxFileName,
|
|
105
|
+
lineNumber: 86,
|
|
106
|
+
columnNumber: 7
|
|
107
|
+
}
|
|
108
|
+
}));
|
|
109
|
+
};
|
|
110
|
+
exports.Array = Array;
|
|
111
|
+
//# sourceMappingURL=Array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_patterns","_form","_AutoPatternsAppContainerProvider","_validations","_cmsFields","arrayValidation","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Array","props","_pageState$entity","_field$validation2","_controller$fieldStat","field","dataHook","translate","useAutoPatternsAppContainer","pt","useWixPatternsContainer","pageState","useEntityPageContext","controller","useController","name","id","control","form","defaultValue","entity","rules","validate","value","_field$validation","validation","required","undefined","isConverted","convertedValue","useMemo","hardConvert","typeName","createElement","FormField","label","displayName","status","fieldState","error","statusMessage","message","suffix","isDataValidOrNotSet","TypeMismatchExclamation","clearButtonText","convertButtonText","toLocaleLowerCase","onClear","onChange","convertDisabledText","fieldName","isConverting","tooltipText","__self","__source","fileName","lineNumber","columnNumber","FormJsonInput","autoFocus","data","onBlur","ref","exports"],"sources":["../../../../src/components/fields/Array.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { FormField } from '@wix/design-system';\nimport { BaseInputProps } from './types';\nimport { useEntityPageContext, useWixPatternsContainer } from '@wix/patterns';\nimport { useController } from '@wix/patterns/form';\nimport { useAutoPatternsAppContainer } from '../AutoPatternsApp/AutoPatternsAppContainerProvider';\nimport { isDataValidOrNotSet } from '../../cms-fields/validations/validations';\nimport { FormJsonInput, TypeMismatchExclamation } from '../../cms-fields';\nimport * as arrayValidation from '../../cms-fields/validations/array';\n\nexport interface ArrayProps extends BaseInputProps<string> {}\n\nexport const Array = (props: ArrayProps) => {\n const { field, dataHook } = props;\n\n const { translate: t } = useAutoPatternsAppContainer();\n const { translate: pt } = useWixPatternsContainer();\n\n const pageState = useEntityPageContext();\n\n const controller = useController({\n name: field?.id ?? '',\n control: pageState.form.control,\n defaultValue: (pageState.entity as any)?.[field?.id ?? ''],\n rules: {\n validate: (value) => {\n if (\n field.validation?.required &&\n (value === null || value === undefined || value === '')\n ) {\n return pt('cairo.fieldValidation.requiredField');\n }\n\n return true;\n },\n },\n });\n\n const { isConverted, convertedValue } = useMemo(() => {\n try {\n return {\n isConverted: true,\n convertedValue: arrayValidation.hardConvert(controller.field.value),\n };\n } catch {\n return { isConverted: false, convertedValue: null };\n }\n }, [controller.field.value]);\n\n const typeName = t('auto-patterns.fields.field_type_array_title');\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 arrayValidation,\n ) ? undefined : (\n <TypeMismatchExclamation\n typeName={typeName}\n clearButtonText={t('auto-patterns.fields.type_mismatch_clear')}\n convertButtonText={t('auto-patterns.fields.type_mismatch_convert', {\n typeName: typeName.toLocaleLowerCase(),\n })}\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={isConverted}\n isConverting={false}\n convertedValue={convertedValue}\n tooltipText={t('auto-patterns.fields.type_mismatch_tip', {\n typeName,\n })}\n />\n )\n }\n >\n <FormJsonInput\n autoFocus={false}\n data={controller.field.value}\n onChange={(value) => controller.field.onChange?.(value)}\n onBlur={controller.field.onBlur}\n ref={controller.field.ref}\n dataHook={`array-${field.id}`}\n field={field.id}\n />\n </FormField>\n );\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,iCAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAR,uBAAA,CAAAC,OAAA;AAAsE,IAAAQ,YAAA;AAAA,SAAAT,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,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,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM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,KAAA,GAAAA,KAAA","ignoreList":[]}
|
|
@@ -22,9 +22,10 @@ var _exportNames = {
|
|
|
22
22
|
Address: true,
|
|
23
23
|
RichContent: true,
|
|
24
24
|
RichText: true,
|
|
25
|
-
MediaGallery: true
|
|
25
|
+
MediaGallery: true,
|
|
26
|
+
Array: true
|
|
26
27
|
};
|
|
27
|
-
exports.Url = exports.Time = exports.ShortText = exports.RichText = exports.RichContent = exports.Reference = exports.Object = exports.Number = exports.MultiReference = exports.MultiDocument = exports.MediaGallery = exports.LongText = exports.ImageInput = exports.Email = exports.Document = exports.DateTime = exports.DateInput = exports.Color = exports.Checkbox = exports.Audio = exports.Address = void 0;
|
|
28
|
+
exports.Url = exports.Time = exports.ShortText = exports.RichText = exports.RichContent = exports.Reference = exports.Object = exports.Number = exports.MultiReference = exports.MultiDocument = exports.MediaGallery = exports.LongText = exports.ImageInput = exports.Email = exports.Document = exports.DateTime = exports.DateInput = exports.Color = exports.Checkbox = exports.Audio = exports.Array = exports.Address = void 0;
|
|
28
29
|
var _Audio = require("./Audio");
|
|
29
30
|
exports.Audio = _Audio.Audio;
|
|
30
31
|
var _Checkbox = require("./Checkbox");
|
|
@@ -67,6 +68,8 @@ var _RichText = require("./RichText");
|
|
|
67
68
|
exports.RichText = _RichText.RichText;
|
|
68
69
|
var _MediaGallery = require("./MediaGallery");
|
|
69
70
|
exports.MediaGallery = _MediaGallery.MediaGallery;
|
|
71
|
+
var _Array = require("./Array");
|
|
72
|
+
exports.Array = _Array.Array;
|
|
70
73
|
var _types = require("./types");
|
|
71
74
|
Object.keys(_types).forEach(function (key) {
|
|
72
75
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Audio","require","exports","Audio","_Checkbox","Checkbox","_Color","Color","_Email","Email","_DateInput","DateInput","_DateTime","DateTime","_Document","Document","_MultiDocument","MultiDocument","_ImageInput","ImageInput","_LongText","LongText","_Number","Number","_Reference","Reference","_MultiReference","MultiReference","_ShortText","ShortText","_Time","Time","_Url","Url","_Object","Object","_Address","Address","_RichContent","RichContent","_RichText","RichText","_MediaGallery","MediaGallery","_types","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames"],"sources":["../../../../src/components/fields/index.ts"],"sourcesContent":["export { Audio } from './Audio';\nexport { Checkbox } from './Checkbox';\nexport { Color } from './Color';\nexport { Email } from './Email';\nexport { DateInput } from './DateInput';\nexport { DateTime } from './DateTime';\nexport { Document } from './Document';\nexport { MultiDocument } from './MultiDocument';\nexport { ImageInput } from './ImageInput';\nexport { LongText } from './LongText';\nexport { Number } from './Number';\nexport { Reference } from './Reference';\nexport { MultiReference } from './MultiReference';\nexport { ShortText } from './ShortText';\nexport { Time } from './Time';\nexport { Url } from './Url';\nexport { Object } from './Object';\nexport { Address } from './Address';\nexport { RichContent } from './RichContent';\nexport { RichText } from './RichText';\nexport { MediaGallery } from './MediaGallery';\nexport * from './types';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_Audio","require","exports","Audio","_Checkbox","Checkbox","_Color","Color","_Email","Email","_DateInput","DateInput","_DateTime","DateTime","_Document","Document","_MultiDocument","MultiDocument","_ImageInput","ImageInput","_LongText","LongText","_Number","Number","_Reference","Reference","_MultiReference","MultiReference","_ShortText","ShortText","_Time","Time","_Url","Url","_Object","Object","_Address","Address","_RichContent","RichContent","_RichText","RichText","_MediaGallery","MediaGallery","_Array","Array","_types","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames"],"sources":["../../../../src/components/fields/index.ts"],"sourcesContent":["export { Audio } from './Audio';\nexport { Checkbox } from './Checkbox';\nexport { Color } from './Color';\nexport { Email } from './Email';\nexport { DateInput } from './DateInput';\nexport { DateTime } from './DateTime';\nexport { Document } from './Document';\nexport { MultiDocument } from './MultiDocument';\nexport { ImageInput } from './ImageInput';\nexport { LongText } from './LongText';\nexport { Number } from './Number';\nexport { Reference } from './Reference';\nexport { MultiReference } from './MultiReference';\nexport { ShortText } from './ShortText';\nexport { Time } from './Time';\nexport { Url } from './Url';\nexport { Object } from './Object';\nexport { Address } from './Address';\nexport { RichContent } from './RichContent';\nexport { RichText } from './RichText';\nexport { MediaGallery } from './MediaGallery';\nexport { Array } from './Array';\nexport * from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAgCC,OAAA,CAAAC,KAAA,GAAAH,MAAA,CAAAG,KAAA;AAChC,IAAAC,SAAA,GAAAH,OAAA;AAAsCC,OAAA,CAAAG,QAAA,GAAAD,SAAA,CAAAC,QAAA;AACtC,IAAAC,MAAA,GAAAL,OAAA;AAAgCC,OAAA,CAAAK,KAAA,GAAAD,MAAA,CAAAC,KAAA;AAChC,IAAAC,MAAA,GAAAP,OAAA;AAAgCC,OAAA,CAAAO,KAAA,GAAAD,MAAA,CAAAC,KAAA;AAChC,IAAAC,UAAA,GAAAT,OAAA;AAAwCC,OAAA,CAAAS,SAAA,GAAAD,UAAA,CAAAC,SAAA;AACxC,IAAAC,SAAA,GAAAX,OAAA;AAAsCC,OAAA,CAAAW,QAAA,GAAAD,SAAA,CAAAC,QAAA;AACtC,IAAAC,SAAA,GAAAb,OAAA;AAAsCC,OAAA,CAAAa,QAAA,GAAAD,SAAA,CAAAC,QAAA;AACtC,IAAAC,cAAA,GAAAf,OAAA;AAAgDC,OAAA,CAAAe,aAAA,GAAAD,cAAA,CAAAC,aAAA;AAChD,IAAAC,WAAA,GAAAjB,OAAA;AAA0CC,OAAA,CAAAiB,UAAA,GAAAD,WAAA,CAAAC,UAAA;AAC1C,IAAAC,SAAA,GAAAnB,OAAA;AAAsCC,OAAA,CAAAmB,QAAA,GAAAD,SAAA,CAAAC,QAAA;AACtC,IAAAC,OAAA,GAAArB,OAAA;AAAkCC,OAAA,CAAAqB,MAAA,GAAAD,OAAA,CAAAC,MAAA;AAClC,IAAAC,UAAA,GAAAvB,OAAA;AAAwCC,OAAA,CAAAuB,SAAA,GAAAD,UAAA,CAAAC,SA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AA,IAAAH,MAAA,CAAAG,GAAA;AAAA","ignoreList":[]}
|
|
@@ -21,6 +21,7 @@ const EDITABLE_INPUT_ELEMENTS = exports.EDITABLE_INPUT_ELEMENTS = {
|
|
|
21
21
|
REFERENCE: _fields.Reference,
|
|
22
22
|
MULTI_REFERENCE: _fields.MultiReference,
|
|
23
23
|
OBJECT: _fields.Object,
|
|
24
|
+
ARRAY: _fields.Array,
|
|
24
25
|
ADDRESS: _fields.Address,
|
|
25
26
|
RICH_CONTENT: _fields.RichContent,
|
|
26
27
|
RICH_TEXT: _fields.RichText,
|
|
@@ -56,7 +57,7 @@ const FormField = ({
|
|
|
56
57
|
__self: void 0,
|
|
57
58
|
__source: {
|
|
58
59
|
fileName: _jsxFileName,
|
|
59
|
-
lineNumber:
|
|
60
|
+
lineNumber: 83,
|
|
60
61
|
columnNumber: 5
|
|
61
62
|
}
|
|
62
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_form","_fields","_jsxFileName","EDITABLE_INPUT_ELEMENTS","exports","AUDIO","Audio","SHORT_TEXT","ShortText","LONG_TEXT","LongText","BOOLEAN","Checkbox","DATE","DateInput","DATETIME","DateTime","TIME","Time","NUMBER","Number","URL","Url","IMAGE","ImageInput","REFERENCE","Reference","MULTI_REFERENCE","MultiReference","OBJECT","Object","ADDRESS","Address","RICH_CONTENT","RichContent","RICH_TEXT","RichText","DOCUMENT","Document","MULTI_DOCUMENT","MultiDocument","EMAIL","Email","MEDIA_GALLERY","MediaGallery","COLOR","Color","FormField","field","inputRef","formControl","data","controller","useController","name","id","control","defaultValue","hasOwnProperty","type","FieldInput","default","createElement","value","onChange","dataHook","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/layouts/FormField.tsx"],"sourcesContent":["import React from 'react';\nimport { useController, Control } from '@wix/patterns/form';\nimport { Field, PatternsFieldType } from '../../types';\nimport {\n Audio,\n ShortText,\n LongText,\n Checkbox,\n Color,\n DateInput,\n DateTime,\n Time,\n Number,\n Url,\n Email,\n ImageInput,\n Reference,\n BaseInputProps,\n Object,\n Address,\n RichContent,\n RichText,\n Document,\n MultiDocument,\n MultiReference,\n MediaGallery,\n} from '../fields';\n\nexport const EDITABLE_INPUT_ELEMENTS: Partial<\n Record<PatternsFieldType, React.ComponentType<any>>\n> = {\n AUDIO: Audio,\n SHORT_TEXT: ShortText,\n LONG_TEXT: LongText,\n BOOLEAN: Checkbox,\n DATE: DateInput,\n DATETIME: DateTime,\n TIME: Time,\n NUMBER: Number,\n URL: Url,\n IMAGE: ImageInput,\n REFERENCE: Reference,\n MULTI_REFERENCE: MultiReference,\n OBJECT: Object,\n ADDRESS: Address,\n RICH_CONTENT: RichContent,\n RICH_TEXT: RichText,\n DOCUMENT: Document,\n MULTI_DOCUMENT: MultiDocument,\n EMAIL: Email,\n MEDIA_GALLERY: MediaGallery,\n COLOR: Color,\n};\n\nexport interface FormFieldProps {\n field: Field;\n inputRef?: BaseInputProps<any>['inputRef'];\n formControl?: Control<any>;\n data?: Record<string, any>;\n}\n\nexport const FormField: React.FC<FormFieldProps> = ({\n field,\n inputRef,\n formControl,\n data,\n}) => {\n const controller = useController({\n name: field?.id ?? '',\n control: formControl,\n defaultValue: data?.[field?.id ?? ''],\n });\n\n if (!EDITABLE_INPUT_ELEMENTS.hasOwnProperty(field.type)) {\n return null;\n }\n\n const FieldInput = EDITABLE_INPUT_ELEMENTS[field.type]!;\n\n return (\n <FieldInput\n field={field}\n value={controller.field.value}\n onChange={controller.field.onChange}\n dataHook={`form-field-${field.id}`}\n inputRef={inputRef}\n formControl={formControl}\n data={data ?? {}}\n />\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_form","_fields","_jsxFileName","EDITABLE_INPUT_ELEMENTS","exports","AUDIO","Audio","SHORT_TEXT","ShortText","LONG_TEXT","LongText","BOOLEAN","Checkbox","DATE","DateInput","DATETIME","DateTime","TIME","Time","NUMBER","Number","URL","Url","IMAGE","ImageInput","REFERENCE","Reference","MULTI_REFERENCE","MultiReference","OBJECT","Object","ARRAY","Array","ADDRESS","Address","RICH_CONTENT","RichContent","RICH_TEXT","RichText","DOCUMENT","Document","MULTI_DOCUMENT","MultiDocument","EMAIL","Email","MEDIA_GALLERY","MediaGallery","COLOR","Color","FormField","field","inputRef","formControl","data","controller","useController","name","id","control","defaultValue","hasOwnProperty","type","FieldInput","default","createElement","value","onChange","dataHook","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/layouts/FormField.tsx"],"sourcesContent":["import React from 'react';\nimport { useController, Control } from '@wix/patterns/form';\nimport { Field, PatternsFieldType } from '../../types';\nimport {\n Audio,\n ShortText,\n LongText,\n Checkbox,\n Color,\n DateInput,\n DateTime,\n Time,\n Number,\n Url,\n Email,\n ImageInput,\n Reference,\n BaseInputProps,\n Object,\n Address,\n RichContent,\n RichText,\n Document,\n MultiDocument,\n MultiReference,\n MediaGallery,\n Array,\n} from '../fields';\n\nexport const EDITABLE_INPUT_ELEMENTS: Partial<\n Record<PatternsFieldType, React.ComponentType<any>>\n> = {\n AUDIO: Audio,\n SHORT_TEXT: ShortText,\n LONG_TEXT: LongText,\n BOOLEAN: Checkbox,\n DATE: DateInput,\n DATETIME: DateTime,\n TIME: Time,\n NUMBER: Number,\n URL: Url,\n IMAGE: ImageInput,\n REFERENCE: Reference,\n MULTI_REFERENCE: MultiReference,\n OBJECT: Object,\n ARRAY: Array,\n ADDRESS: Address,\n RICH_CONTENT: RichContent,\n RICH_TEXT: RichText,\n DOCUMENT: Document,\n MULTI_DOCUMENT: MultiDocument,\n EMAIL: Email,\n MEDIA_GALLERY: MediaGallery,\n COLOR: Color,\n};\n\nexport interface FormFieldProps {\n field: Field;\n inputRef?: BaseInputProps<any>['inputRef'];\n formControl?: Control<any>;\n data?: Record<string, any>;\n}\n\nexport const FormField: React.FC<FormFieldProps> = ({\n field,\n inputRef,\n formControl,\n data,\n}) => {\n const controller = useController({\n name: field?.id ?? '',\n control: formControl,\n defaultValue: data?.[field?.id ?? ''],\n });\n\n if (!EDITABLE_INPUT_ELEMENTS.hasOwnProperty(field.type)) {\n return null;\n }\n\n const FieldInput = EDITABLE_INPUT_ELEMENTS[field.type]!;\n\n return (\n <FieldInput\n field={field}\n value={controller.field.value}\n onChange={controller.field.onChange}\n dataHook={`form-field-${field.id}`}\n inputRef={inputRef}\n formControl={formControl}\n data={data ?? {}}\n />\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAwBmB,IAAAG,YAAA;AAEZ,MAAMC,uBAEZ,GAAAC,OAAA,CAAAD,uBAAA,GAAG;EACFE,KAAK,EAAEC,aAAK;EACZC,UAAU,EAAEC,iBAAS;EACrBC,SAAS,EAAEC,gBAAQ;EACnBC,OAAO,EAAEC,gBAAQ;EACjBC,IAAI,EAAEC,iBAAS;EACfC,QAAQ,EAAEC,gBAAQ;EAClBC,IAAI,EAAEC,YAAI;EACVC,MAAM,EAAEC,cAAM;EACdC,GAAG,EAAEC,WAAG;EACRC,KAAK,EAAEC,kBAAU;EACjBC,SAAS,EAAEC,iBAAS;EACpBC,eAAe,EAAEC,sBAAc;EAC/BC,MAAM,EAAEC,cAAM;EACdC,KAAK,EAAEC,aAAK;EACZC,OAAO,EAAEC,eAAO;EAChBC,YAAY,EAAEC,mBAAW;EACzBC,SAAS,EAAEC,gBAAQ;EACnBC,QAAQ,EAAEC,gBAAQ;EAClBC,cAAc,EAAEC,qBAAa;EAC7BC,KAAK,EAAEC,aAAK;EACZC,aAAa,EAAEC,oBAAY;EAC3BC,KAAK,EAAEC;AACT,CAAC;AASM,MAAMC,SAAmC,GAAGA,CAAC;EAClDC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC;AACF,CAAC,KAAK;EACJ,MAAMC,UAAU,GAAG,IAAAC,mBAAa,EAAC;IAC/BC,IAAI,EAAE,CAAAN,KAAK,oBAALA,KAAK,CAAEO,EAAE,KAAI,EAAE;IACrBC,OAAO,EAAEN,WAAW;IACpBO,YAAY,EAAEN,IAAI,oBAAJA,IAAI,CAAG,CAAAH,KAAK,oBAALA,KAAK,CAAEO,EAAE,KAAI,EAAE;EACtC,CAAC,CAAC;EAEF,IAAI,CAACtD,uBAAuB,CAACyD,cAAc,CAACV,KAAK,CAACW,IAAI,CAAC,EAAE;IACvD,OAAO,IAAI;EACb;EAEA,MAAMC,UAAU,GAAG3D,uBAAuB,CAAC+C,KAAK,CAACW,IAAI,CAAE;EAEvD,oBACEhE,MAAA,CAAAkE,OAAA,CAAAC,aAAA,CAACF,UAAU;IACTZ,KAAK,EAAEA,KAAM;IACbe,KAAK,EAAEX,UAAU,CAACJ,KAAK,CAACe,KAAM;IAC9BC,QAAQ,EAAEZ,UAAU,CAACJ,KAAK,CAACgB,QAAS;IACpCC,QAAQ,EAAE,cAAcjB,KAAK,CAACO,EAAE,EAAG;IACnCN,QAAQ,EAAEA,QAAS;IACnBC,WAAW,EAAEA,WAAY;IACzBC,IAAI,EAAEA,IAAI,IAAI,CAAC,CAAE;IAAAe,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAApE,YAAA;MAAAqE,UAAA;MAAAC,YAAA;IAAA;EAAA,CAClB,CAAC;AAEN,CAAC;AAACpE,OAAA,CAAA6C,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_useColumns","_patterns","_useCollectionPageOnRowClickActions","_useNavigationUtils","_useDataExtensionProps","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useBaseTableFeatures","configuration","_configuration$custom","navigateToEntityPage","useNavigation","columns","useColumns","visibleFieldIds","useMemo","map","column","id","entityPageId","onRowClickOverride","useCollectionPageOnRowClickActions","collectionPageOnRowClickActions","onRowClick","collectionId","collection","item","stickyColumns","stickySelectionColumn","showTitleBar","dataExtensionProps","useDataExtensionProps","horizontalScroll","customColumns","enabled","createElement","CustomColumns","__self","__source","fileName","lineNumber","columnNumber","undefined","exports"],"sources":["../../../src/hooks/useBaseTableFeatures.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { TableConfig } from '../types';\nimport { useColumns } from './useColumns';\nimport { CustomColumns } from '@wix/patterns';\nimport { useCollectionPageOnRowClickActions } from './useCollectionPageOnRowClickActions';\nimport { useNavigation } from './useNavigationUtils';\nimport { useDataExtensionProps } from './useDataExtensionProps';\n\nexport const useBaseTableFeatures = (configuration: TableConfig) => {\n const { navigateToEntityPage } = useNavigation();\n const columns = useColumns(configuration.columns);\n const visibleFieldIds = useMemo(\n () => configuration.columns.map((column) => column.id),\n [configuration],\n );\n\n const entityPageId = configuration.entityPageId;\n\n const onRowClickOverride = useCollectionPageOnRowClickActions({\n collectionPageOnRowClickActions: configuration.onRowClick,\n collectionId: configuration.collection.collectionId,\n });\n\n const onRowClick = configuration.onRowClick\n ? onRowClickOverride\n : (item: any) =>\n navigateToEntityPage({\n item,\n entityPageId,\n });\n\n const stickyColumns = configuration.stickyColumns;\n const stickySelectionColumn = !!stickyColumns; // Sticky selection column is true if stickyColumns is positive number\n const showTitleBar = configuration.showTitleBar ?? true;\n const dataExtensionProps = useDataExtensionProps(configuration);\n\n return {\n columns,\n visibleFieldIds,\n onRowClick,\n horizontalScroll: true,\n customColumns: configuration.customColumns?.enabled ? (\n <CustomColumns />\n ) : undefined,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n ...dataExtensionProps,\n };\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAA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_react","_interopRequireWildcard","require","_useColumns","_patterns","_useCollectionPageOnRowClickActions","_useNavigationUtils","_useDataExtensionProps","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useBaseTableFeatures","configuration","_configuration$custom","navigateToEntityPage","useNavigation","columns","useColumns","visibleFieldIds","useMemo","map","column","id","entityPageId","onRowClickOverride","useCollectionPageOnRowClickActions","collectionPageOnRowClickActions","onRowClick","collectionId","collection","item","stickyColumns","stickySelectionColumn","showTitleBar","dataExtensionProps","useDataExtensionProps","horizontalScroll","customColumns","enabled","createElement","CustomColumns","__self","__source","fileName","lineNumber","columnNumber","undefined","showFieldTypeIcons","exports"],"sources":["../../../src/hooks/useBaseTableFeatures.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { TableConfig } from '../types';\nimport { useColumns } from './useColumns';\nimport { CustomColumns } from '@wix/patterns';\nimport { useCollectionPageOnRowClickActions } from './useCollectionPageOnRowClickActions';\nimport { useNavigation } from './useNavigationUtils';\nimport { useDataExtensionProps } from './useDataExtensionProps';\n\nexport const useBaseTableFeatures = (configuration: TableConfig) => {\n const { navigateToEntityPage } = useNavigation();\n const columns = useColumns(configuration.columns);\n const visibleFieldIds = useMemo(\n () => configuration.columns.map((column) => column.id),\n [configuration],\n );\n\n const entityPageId = configuration.entityPageId;\n\n const onRowClickOverride = useCollectionPageOnRowClickActions({\n collectionPageOnRowClickActions: configuration.onRowClick,\n collectionId: configuration.collection.collectionId,\n });\n\n const onRowClick = configuration.onRowClick\n ? onRowClickOverride\n : (item: any) =>\n navigateToEntityPage({\n item,\n entityPageId,\n });\n\n const stickyColumns = configuration.stickyColumns;\n const stickySelectionColumn = !!stickyColumns; // Sticky selection column is true if stickyColumns is positive number\n const showTitleBar = configuration.showTitleBar ?? true;\n const dataExtensionProps = useDataExtensionProps(configuration);\n\n return {\n columns,\n visibleFieldIds,\n onRowClick,\n horizontalScroll: true,\n customColumns: configuration.customColumns?.enabled ? (\n <CustomColumns />\n ) : undefined,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n showFieldTypeIcons: configuration.showFieldTypeIcons,\n ...dataExtensionProps,\n };\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,mCAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AAAgE,IAAAM,YAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,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,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CA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