@wix/auto-patterns 1.53.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.
Files changed (342) hide show
  1. package/dist/cjs/assets/locale/messages_en.json +1 -0
  2. package/dist/cjs/cms-fields/components/address/input/address-input.st.css.js +3 -3
  3. package/dist/cjs/cms-fields/components/address/input/address-input.st.css.js.map +1 -1
  4. package/dist/cjs/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
  5. package/dist/cjs/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
  6. package/dist/cjs/cms-fields/components/audio/audio-field/form-audio-field.st.css.js +4 -4
  7. package/dist/cjs/cms-fields/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
  8. package/dist/cjs/cms-fields/components/audio/audio-player/audio-player.st.css.js +2 -2
  9. package/dist/cjs/cms-fields/components/audio/audio-player/audio-player.st.css.js.map +1 -1
  10. package/dist/cjs/cms-fields/components/color-view/color-input.js +168 -0
  11. package/dist/cjs/cms-fields/components/color-view/color-input.js.map +1 -0
  12. package/dist/cjs/cms-fields/components/color-view/color-view.js +62 -0
  13. package/dist/cjs/cms-fields/components/color-view/color-view.js.map +1 -0
  14. package/dist/cjs/cms-fields/components/color-view/color-view.st.css +14 -0
  15. package/dist/cjs/cms-fields/components/color-view/color-view.st.css.js +24 -0
  16. package/dist/cjs/cms-fields/components/color-view/color-view.st.css.js.map +1 -0
  17. package/dist/cjs/cms-fields/components/color-view/color-view.uni.driver.js +15 -0
  18. package/dist/cjs/cms-fields/components/color-view/color-view.uni.driver.js.map +1 -0
  19. package/dist/cjs/cms-fields/components/color-view/form-color-input.js +35 -0
  20. package/dist/cjs/cms-fields/components/color-view/form-color-input.js.map +1 -0
  21. package/dist/cjs/cms-fields/components/color-view/index.js +22 -0
  22. package/dist/cjs/cms-fields/components/color-view/index.js.map +1 -0
  23. package/dist/cjs/cms-fields/components/delete-dialog/delete-dialog.st.css.js +3 -3
  24. package/dist/cjs/cms-fields/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
  25. package/dist/cjs/cms-fields/components/document/form-document-field.st.css.js +7 -7
  26. package/dist/cjs/cms-fields/components/document/form-document-field.st.css.js.map +1 -1
  27. package/dist/cjs/cms-fields/components/exclamation/exclamation.st.css +2 -3
  28. package/dist/cjs/cms-fields/components/exclamation/exclamation.st.css.js +5 -5
  29. package/dist/cjs/cms-fields/components/exclamation/exclamation.st.css.js.map +1 -1
  30. package/dist/cjs/cms-fields/components/exclamation/type-mismatch-exclamation.js +1 -0
  31. package/dist/cjs/cms-fields/components/exclamation/type-mismatch-exclamation.js.map +1 -1
  32. package/dist/cjs/cms-fields/components/highlighted-text/highlighted-text.st.css.js +5 -5
  33. package/dist/cjs/cms-fields/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
  34. package/dist/cjs/cms-fields/components/index.js +6 -0
  35. package/dist/cjs/cms-fields/components/index.js.map +1 -1
  36. package/dist/cjs/cms-fields/components/media-control/paste-url-button.st.css.js +4 -4
  37. package/dist/cjs/cms-fields/components/media-control/paste-url-button.st.css.js.map +1 -1
  38. package/dist/cjs/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
  39. package/dist/cjs/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
  40. package/dist/cjs/cms-fields/components/media-image/media-image.st.css.js +4 -4
  41. package/dist/cjs/cms-fields/components/media-image/media-image.st.css.js.map +1 -1
  42. package/dist/cjs/cms-fields/components/media-loader/media-loader.st.css.js +3 -3
  43. package/dist/cjs/cms-fields/components/media-loader/media-loader.st.css.js.map +1 -1
  44. package/dist/cjs/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
  45. package/dist/cjs/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
  46. package/dist/cjs/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
  47. package/dist/cjs/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
  48. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +6 -6
  49. 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
  50. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +5 -5
  51. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
  52. 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
  53. 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
  54. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
  55. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
  56. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
  57. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
  58. 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
  59. 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
  60. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +9 -9
  61. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
  62. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +4 -4
  63. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
  64. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
  65. package/dist/cjs/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
  66. package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
  67. package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
  68. package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
  69. package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
  70. package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
  71. package/dist/cjs/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
  72. package/dist/cjs/cms-fields/components/text/text-view.st.css.js +3 -3
  73. package/dist/cjs/cms-fields/components/text/text-view.st.css.js.map +1 -1
  74. package/dist/cjs/cms-fields/validations/array.js +26 -0
  75. package/dist/cjs/cms-fields/validations/array.js.map +1 -0
  76. package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js +1 -1
  77. package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -1
  78. package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +2 -1
  79. package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
  80. package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js +9 -6
  81. package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -1
  82. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js +7 -5
  83. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -1
  84. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.uni.driver.js +5 -0
  85. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.uni.driver.js.map +1 -1
  86. package/dist/cjs/components/AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch.js +7 -5
  87. package/dist/cjs/components/AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch.js.map +1 -1
  88. package/dist/cjs/components/fields/Array.js +111 -0
  89. package/dist/cjs/components/fields/Array.js.map +1 -0
  90. package/dist/cjs/components/fields/Color.js +50 -0
  91. package/dist/cjs/components/fields/Color.js.map +1 -0
  92. package/dist/cjs/components/fields/Color.uni.driver.js +19 -0
  93. package/dist/cjs/components/fields/Color.uni.driver.js.map +1 -0
  94. package/dist/cjs/components/fields/index.js +8 -2
  95. package/dist/cjs/components/fields/index.js.map +1 -1
  96. package/dist/cjs/components/layouts/FormField.js +4 -2
  97. package/dist/cjs/components/layouts/FormField.js.map +1 -1
  98. package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js +20 -1
  99. package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
  100. package/dist/cjs/dataSourceAdapters/cms/cmsBackup.js +48 -0
  101. package/dist/cjs/dataSourceAdapters/cms/cmsBackup.js.map +1 -0
  102. package/dist/cjs/hooks/pluginsDynamicImports.js +4 -1
  103. package/dist/cjs/hooks/pluginsDynamicImports.js.map +1 -1
  104. package/dist/cjs/hooks/useActionCell.js +3 -0
  105. package/dist/cjs/hooks/useActionCell.js.map +1 -1
  106. package/dist/cjs/hooks/useBaseTableFeatures.js +1 -0
  107. package/dist/cjs/hooks/useBaseTableFeatures.js.map +1 -1
  108. package/dist/cjs/hooks/useColumns.js +36 -18
  109. package/dist/cjs/hooks/useColumns.js.map +1 -1
  110. package/dist/cjs/hooks/useFiltersState.js +1 -0
  111. package/dist/cjs/hooks/useFiltersState.js.map +1 -1
  112. package/dist/cjs/hooks/useGridFeaturesAsync.js +3 -1
  113. package/dist/cjs/hooks/useGridFeaturesAsync.js.map +1 -1
  114. package/dist/cjs/hooks/useImport.js +78 -0
  115. package/dist/cjs/hooks/useImport.js.map +1 -0
  116. package/dist/cjs/hooks/useTableFeaturesAsync.js +3 -1
  117. package/dist/cjs/hooks/useTableFeaturesAsync.js.map +1 -1
  118. package/dist/cjs/hooks/useTableGridSwitchFeaturesAsync.js +3 -1
  119. package/dist/cjs/hooks/useTableGridSwitchFeaturesAsync.js.map +1 -1
  120. package/dist/cjs/services/translations.js.map +1 -1
  121. package/dist/cjs/styles.global.css +1 -1
  122. package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
  123. package/dist/cjs/types/SchemaConfig.js +4 -0
  124. package/dist/cjs/types/SchemaConfig.js.map +1 -0
  125. package/dist/cjs/types/types.js +6 -0
  126. package/dist/cjs/types/types.js.map +1 -1
  127. package/dist/cjs/utils/backupPolling.js +31 -0
  128. package/dist/cjs/utils/backupPolling.js.map +1 -0
  129. package/dist/esm/assets/locale/messages_en.json +1 -0
  130. package/dist/esm/cms-fields/components/address/input/address-input.st.css.js +3 -3
  131. package/dist/esm/cms-fields/components/address/input/address-input.st.css.js.map +1 -1
  132. package/dist/esm/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
  133. package/dist/esm/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
  134. package/dist/esm/cms-fields/components/audio/audio-field/form-audio-field.st.css.js +4 -4
  135. package/dist/esm/cms-fields/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
  136. package/dist/esm/cms-fields/components/audio/audio-player/audio-player.st.css.js +2 -2
  137. package/dist/esm/cms-fields/components/audio/audio-player/audio-player.st.css.js.map +1 -1
  138. package/dist/esm/cms-fields/components/color-view/color-input.js +104 -0
  139. package/dist/esm/cms-fields/components/color-view/color-input.js.map +1 -0
  140. package/dist/esm/cms-fields/components/color-view/color-view.js +30 -0
  141. package/dist/esm/cms-fields/components/color-view/color-view.js.map +1 -0
  142. package/dist/esm/cms-fields/components/color-view/color-view.st.css +14 -0
  143. package/dist/esm/cms-fields/components/color-view/color-view.st.css.js +20 -0
  144. package/dist/esm/cms-fields/components/color-view/color-view.st.css.js.map +1 -0
  145. package/dist/esm/cms-fields/components/color-view/color-view.uni.driver.js +11 -0
  146. package/dist/esm/cms-fields/components/color-view/color-view.uni.driver.js.map +1 -0
  147. package/dist/esm/cms-fields/components/color-view/form-color-input.js +24 -0
  148. package/dist/esm/cms-fields/components/color-view/form-color-input.js.map +1 -0
  149. package/dist/esm/cms-fields/components/color-view/index.js +4 -0
  150. package/dist/esm/cms-fields/components/color-view/index.js.map +1 -0
  151. package/dist/esm/cms-fields/components/delete-dialog/delete-dialog.st.css.js +3 -3
  152. package/dist/esm/cms-fields/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
  153. package/dist/esm/cms-fields/components/document/form-document-field.st.css.js +7 -7
  154. package/dist/esm/cms-fields/components/document/form-document-field.st.css.js.map +1 -1
  155. package/dist/esm/cms-fields/components/exclamation/exclamation.st.css +2 -3
  156. package/dist/esm/cms-fields/components/exclamation/exclamation.st.css.js +5 -5
  157. package/dist/esm/cms-fields/components/exclamation/exclamation.st.css.js.map +1 -1
  158. package/dist/esm/cms-fields/components/exclamation/type-mismatch-exclamation.js +2 -1
  159. package/dist/esm/cms-fields/components/exclamation/type-mismatch-exclamation.js.map +1 -1
  160. package/dist/esm/cms-fields/components/highlighted-text/highlighted-text.st.css.js +5 -5
  161. package/dist/esm/cms-fields/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
  162. package/dist/esm/cms-fields/components/index.js +1 -0
  163. package/dist/esm/cms-fields/components/index.js.map +1 -1
  164. package/dist/esm/cms-fields/components/media-control/paste-url-button.st.css.js +4 -4
  165. package/dist/esm/cms-fields/components/media-control/paste-url-button.st.css.js.map +1 -1
  166. package/dist/esm/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
  167. package/dist/esm/cms-fields/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
  168. package/dist/esm/cms-fields/components/media-image/media-image.st.css.js +4 -4
  169. package/dist/esm/cms-fields/components/media-image/media-image.st.css.js.map +1 -1
  170. package/dist/esm/cms-fields/components/media-loader/media-loader.st.css.js +3 -3
  171. package/dist/esm/cms-fields/components/media-loader/media-loader.st.css.js.map +1 -1
  172. package/dist/esm/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
  173. package/dist/esm/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
  174. package/dist/esm/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
  175. package/dist/esm/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
  176. package/dist/esm/cms-fields/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +6 -6
  177. 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
  178. package/dist/esm/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +5 -5
  179. package/dist/esm/cms-fields/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
  180. 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
  181. 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
  182. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
  183. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
  184. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
  185. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
  186. 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
  187. 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
  188. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +9 -9
  189. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
  190. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +4 -4
  191. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
  192. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
  193. package/dist/esm/cms-fields/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
  194. package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
  195. package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
  196. package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
  197. package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
  198. package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
  199. package/dist/esm/cms-fields/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
  200. package/dist/esm/cms-fields/components/text/text-view.st.css.js +3 -3
  201. package/dist/esm/cms-fields/components/text/text-view.st.css.js.map +1 -1
  202. package/dist/esm/cms-fields/validations/array.js +20 -0
  203. package/dist/esm/cms-fields/validations/array.js.map +1 -0
  204. package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js +1 -1
  205. package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -1
  206. package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +1 -0
  207. package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
  208. package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js +6 -3
  209. package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -1
  210. package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js +4 -2
  211. package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -1
  212. package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.uni.driver.js +5 -0
  213. package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.uni.driver.js.map +1 -1
  214. package/dist/esm/components/AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch.js +4 -2
  215. package/dist/esm/components/AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch.js.map +1 -1
  216. package/dist/esm/components/fields/Array.js +86 -0
  217. package/dist/esm/components/fields/Array.js.map +1 -0
  218. package/dist/esm/components/fields/Color.js +31 -0
  219. package/dist/esm/components/fields/Color.js.map +1 -0
  220. package/dist/esm/components/fields/Color.uni.driver.js +15 -0
  221. package/dist/esm/components/fields/Color.uni.driver.js.map +1 -0
  222. package/dist/esm/components/fields/index.js +2 -0
  223. package/dist/esm/components/fields/index.js.map +1 -1
  224. package/dist/esm/components/layouts/FormField.js +4 -2
  225. package/dist/esm/components/layouts/FormField.js.map +1 -1
  226. package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js +20 -1
  227. package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
  228. package/dist/esm/dataSourceAdapters/cms/cmsBackup.js +44 -0
  229. package/dist/esm/dataSourceAdapters/cms/cmsBackup.js.map +1 -0
  230. package/dist/esm/hooks/pluginsDynamicImports.js +2 -0
  231. package/dist/esm/hooks/pluginsDynamicImports.js.map +1 -1
  232. package/dist/esm/hooks/useActionCell.js +3 -0
  233. package/dist/esm/hooks/useActionCell.js.map +1 -1
  234. package/dist/esm/hooks/useBaseTableFeatures.js +1 -0
  235. package/dist/esm/hooks/useBaseTableFeatures.js.map +1 -1
  236. package/dist/esm/hooks/useColumns.js +11 -5
  237. package/dist/esm/hooks/useColumns.js.map +1 -1
  238. package/dist/esm/hooks/useFiltersState.js +1 -0
  239. package/dist/esm/hooks/useFiltersState.js.map +1 -1
  240. package/dist/esm/hooks/useGridFeaturesAsync.js +4 -2
  241. package/dist/esm/hooks/useGridFeaturesAsync.js.map +1 -1
  242. package/dist/esm/hooks/useImport.js +66 -0
  243. package/dist/esm/hooks/useImport.js.map +1 -0
  244. package/dist/esm/hooks/useTableFeaturesAsync.js +4 -2
  245. package/dist/esm/hooks/useTableFeaturesAsync.js.map +1 -1
  246. package/dist/esm/hooks/useTableGridSwitchFeaturesAsync.js +4 -2
  247. package/dist/esm/hooks/useTableGridSwitchFeaturesAsync.js.map +1 -1
  248. package/dist/esm/services/translations.js.map +1 -1
  249. package/dist/esm/styles.global.css +1 -1
  250. package/dist/esm/types/CollectionPageConfig.js.map +1 -1
  251. package/dist/esm/types/SchemaConfig.js +2 -0
  252. package/dist/esm/types/SchemaConfig.js.map +1 -0
  253. package/dist/esm/types/types.js +5 -0
  254. package/dist/esm/types/types.js.map +1 -1
  255. package/dist/esm/utils/backupPolling.js +27 -0
  256. package/dist/esm/utils/backupPolling.js.map +1 -0
  257. package/dist/types/cms-fields/components/audio/audio-field/form-audio-field.st.css.d.ts.map +1 -1
  258. package/dist/types/cms-fields/components/color-view/color-input.d.ts +8 -0
  259. package/dist/types/cms-fields/components/color-view/color-input.d.ts.map +1 -0
  260. package/dist/types/cms-fields/components/color-view/color-view.d.ts +7 -0
  261. package/dist/types/cms-fields/components/color-view/color-view.d.ts.map +1 -0
  262. package/dist/types/cms-fields/components/color-view/color-view.st.css.d.ts +15 -0
  263. package/dist/types/cms-fields/components/color-view/color-view.st.css.d.ts.map +1 -0
  264. package/dist/types/cms-fields/components/color-view/color-view.uni.driver.d.ts +16 -0
  265. package/dist/types/cms-fields/components/color-view/color-view.uni.driver.d.ts.map +1 -0
  266. package/dist/types/cms-fields/components/color-view/form-color-input.d.ts +7 -0
  267. package/dist/types/cms-fields/components/color-view/form-color-input.d.ts.map +1 -0
  268. package/dist/types/cms-fields/components/color-view/index.d.ts +4 -0
  269. package/dist/types/cms-fields/components/color-view/index.d.ts.map +1 -0
  270. package/dist/types/cms-fields/components/document/form-document-field.st.css.d.ts.map +1 -1
  271. package/dist/types/cms-fields/components/highlighted-text/highlighted-text.st.css.d.ts.map +1 -1
  272. package/dist/types/cms-fields/components/index.d.ts +1 -0
  273. package/dist/types/cms-fields/components/index.d.ts.map +1 -1
  274. package/dist/types/cms-fields/components/media-control/paste-url-button.st.css.d.ts.map +1 -1
  275. package/dist/types/cms-fields/components/media-gallery/form-media-gallery-field.st.css.d.ts.map +1 -1
  276. package/dist/types/cms-fields/components/media-loader/media-loader.st.css.d.ts.map +1 -1
  277. package/dist/types/cms-fields/components/media-tag/web-media-tag/media-tag.st.css.d.ts.map +1 -1
  278. package/dist/types/cms-fields/components/multi-document/multi-document-input/form-multi-document.st.css.d.ts.map +1 -1
  279. 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
  280. package/dist/types/cms-fields/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
  281. package/dist/types/cms-fields/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.d.ts.map +1 -1
  282. package/dist/types/cms-fields/components/text/text-view.st.css.d.ts.map +1 -1
  283. package/dist/types/cms-fields/validations/array.d.ts +3 -0
  284. package/dist/types/cms-fields/validations/array.d.ts.map +1 -0
  285. package/dist/types/components/AutoPatternsApp/AutoPatternsApp.uni.driver.d.ts +379 -5
  286. package/dist/types/components/AutoPatternsApp/AutoPatternsApp.uni.driver.d.ts.map +1 -1
  287. package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts +1 -0
  288. package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts.map +1 -1
  289. package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts.map +1 -1
  290. package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts.map +1 -1
  291. package/dist/types/components/AutoPatternsTable/AutoPatternsTable.uni.driver.d.ts +379 -5
  292. package/dist/types/components/AutoPatternsTable/AutoPatternsTable.uni.driver.d.ts.map +1 -1
  293. package/dist/types/components/AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch.d.ts.map +1 -1
  294. package/dist/types/components/fields/Array.d.ts +6 -0
  295. package/dist/types/components/fields/Array.d.ts.map +1 -0
  296. package/dist/types/components/fields/Color.d.ts +6 -0
  297. package/dist/types/components/fields/Color.d.ts.map +1 -0
  298. package/dist/types/components/fields/Color.uni.driver.d.ts +89 -0
  299. package/dist/types/components/fields/Color.uni.driver.d.ts.map +1 -0
  300. package/dist/types/components/fields/index.d.ts +2 -0
  301. package/dist/types/components/fields/index.d.ts.map +1 -1
  302. package/dist/types/components/layouts/FormField.d.ts.map +1 -1
  303. package/dist/types/dataSourceAdapters/cms/cmsAdapter.d.ts +1 -1
  304. package/dist/types/dataSourceAdapters/cms/cmsAdapter.d.ts.map +1 -1
  305. package/dist/types/dataSourceAdapters/cms/cmsBackup.d.ts +3 -0
  306. package/dist/types/dataSourceAdapters/cms/cmsBackup.d.ts.map +1 -0
  307. package/dist/types/hooks/pluginsDynamicImports.d.ts +1 -0
  308. package/dist/types/hooks/pluginsDynamicImports.d.ts.map +1 -1
  309. package/dist/types/hooks/useActionCell.d.ts +1 -1
  310. package/dist/types/hooks/useActionCell.d.ts.map +1 -1
  311. package/dist/types/hooks/useBaseTableFeatures.d.ts +2 -0
  312. package/dist/types/hooks/useBaseTableFeatures.d.ts.map +1 -1
  313. package/dist/types/hooks/useColumns.d.ts.map +1 -1
  314. package/dist/types/hooks/useCommonCollectionFeatures.d.ts +1 -1
  315. package/dist/types/hooks/useFiltersState.d.ts.map +1 -1
  316. package/dist/types/hooks/useGridFeaturesAsync.d.ts +1 -0
  317. package/dist/types/hooks/useGridFeaturesAsync.d.ts.map +1 -1
  318. package/dist/types/hooks/useImport.d.ts +8 -0
  319. package/dist/types/hooks/useImport.d.ts.map +1 -0
  320. package/dist/types/hooks/useTableFeaturesAsync.d.ts +1 -0
  321. package/dist/types/hooks/useTableFeaturesAsync.d.ts.map +1 -1
  322. package/dist/types/hooks/useTableGridSwitchFeaturesAsync.d.ts +1 -0
  323. package/dist/types/hooks/useTableGridSwitchFeaturesAsync.d.ts.map +1 -1
  324. package/dist/types/services/translations.d.ts +1 -1
  325. package/dist/types/services/translations.d.ts.map +1 -1
  326. package/dist/types/testkit/enzyme.d.ts +379 -5
  327. package/dist/types/testkit/enzyme.d.ts.map +1 -1
  328. package/dist/types/testkit/jsdom.d.ts +379 -5
  329. package/dist/types/testkit/jsdom.d.ts.map +1 -1
  330. package/dist/types/testkit/playwright.d.ts +379 -5
  331. package/dist/types/testkit/playwright.d.ts.map +1 -1
  332. package/dist/types/testkit/puppeteer.d.ts +379 -5
  333. package/dist/types/testkit/puppeteer.d.ts.map +1 -1
  334. package/dist/types/types/CollectionPageConfig.d.ts +14 -0
  335. package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
  336. package/dist/types/types/SchemaConfig.d.ts +211 -0
  337. package/dist/types/types/SchemaConfig.d.ts.map +1 -0
  338. package/dist/types/types/types.d.ts +1 -160
  339. package/dist/types/types/types.d.ts.map +1 -1
  340. package/dist/types/utils/backupPolling.d.ts +12 -0
  341. package/dist/types/utils/backupPolling.d.ts.map +1 -0
  342. package/package.json +6 -4
@@ -1 +1 @@
1
- {"version":3,"names":["ComponentTypeEnum","exports"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport {\n DateRangeFilterMode,\n DateRangeOptions,\n DateRangePredefinedPresetOptions,\n} from '@wix/patterns/core';\nimport { BaseCollectionConfig } from './types';\nimport {\n ActionCellConfig,\n BulkActionsConfig,\n CollectionPageOnRowClickActionConfig,\n CollectionPagePrimaryActions,\n CollectionPageSecondaryActions,\n} from './actions';\n\nexport interface CollectionPageTitle {\n /**\n * The title text.\n */\n text: string;\n /**\n * Determines whether to hide the number of total entities on the title of the page.\n */\n hideTotal?: boolean;\n}\n\nexport interface CollectionPageSubtitle {\n /**\n * The subtitle text.\n */\n text: string;\n /**\n * \"Learn more\" link.\n */\n learnMore?: {\n /**\n * Where the link should navigate to.\n */\n url: string;\n /**\n * The label of the link button. defaults to \"Learn More\".\n */\n label?: string;\n };\n}\n\nexport interface CollectionPageConfig {\n /**\n * Route configuration.\n */\n route: {\n /**\n * Route path (relative path).\n */\n path: string;\n };\n /**\n * Page title configuration.\n */\n title: CollectionPageTitle;\n /**\n * Page subtitle configuration.\n */\n subtitle?: CollectionPageSubtitle;\n /**\n * Page-level actions to render in the page header.\n */\n actions?: {\n /**\n * Primary actions.\n */\n primaryActions?: CollectionPagePrimaryActions;\n /**\n * Secondary actions.\n */\n secondaryActions?: CollectionPageSecondaryActions;\n };\n /**\n * Components rendered within the page layout.\n */\n components: ComponentConfig[];\n}\n\nexport interface CollectionComponentConfig\n extends BaseCollectionComponentConfig {\n /**\n * Type discriminator.\n */\n type: 'collection';\n /**\n * Layout items to render.\n */\n layout: LayoutItemConfig[];\n}\n\nexport interface CustomComponentConfig {\n /**\n * Type discriminator.\n */\n type: 'custom';\n /**\n * Identifier that maps to a custom React component provided via overrides.\n */\n id: string;\n}\n\nexport type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;\n\nexport interface LayoutItemConfig {\n /**\n * Rendering mode for the collection component.\n */\n type: 'Table' | 'Grid';\n /**\n * Table-specific configuration.\n */\n table?: TableSpecificConfig;\n /**\n * Grid-specific configuration.\n */\n grid?: GridSpecificConfig;\n}\n\nexport type ColumnsConfig = Column[];\n\nexport interface TableSpecificConfig {\n /**\n * Table columns configuration.\n */\n columns: ColumnsConfig;\n /**\n * Enables custom columns (hide/reorder columns) functionality.\n */\n customColumns?: {\n enabled: boolean;\n };\n /**\n * Number of leading columns that remain sticky on horizontal scroll.\n */\n stickyColumns?: number;\n /**\n * Row click action.\n */\n onRowClick?: CollectionPageOnRowClickActionConfig;\n /**\n * Show column headers (title bar).\n * @default true\n */\n showTitleBar?: boolean;\n /**\n * Sectioning support for table.\n *\n * The `id` must match the identifier of a custom sectioning override component.\n * This allows you to provide a custom React component for table section rendering.\n */\n sections?: {\n id: string;\n };\n /**\n * Data extension configuration.\n */\n dataExtension?: {\n enabled: boolean;\n };\n}\n\nexport interface GridSpecificConfig {\n /**\n * Grid item.\n */\n item: GridItem;\n}\n\nexport interface TableConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig {}\n\nexport interface GridConfig\n extends BaseCollectionComponentConfig,\n GridSpecificConfig {}\n\nexport interface TableGridSwitchConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig,\n GridSpecificConfig {}\n\nexport type CollectionConfig = BaseCollectionConfig & {\n /**\n * Default fetch limit (items per page).\n */\n limit?: number;\n /**\n * Reflect search/filters/sort in the URL.\n * @default false\n */\n reflectQueryInUrl?: boolean;\n /**\n * Scope of \"Select All\":\n * - 'all': select the entire collection (server-side).\n * - 'page': select only currently visible items.\n * @default \"all\"\n */\n selectAllScope?: 'page' | 'all';\n /**\n * Selection behavior when data changes:\n * - 'preserve': keep current selections if still valid.\n * - 'clear': clear selection on data refresh.\n * @default \"clear\"\n */\n selectionUpdateMode?: 'preserve' | 'clear';\n /**\n * Enables optimistic UI actions;\n * Identifier that maps to a custom optimistic actions provided via overrides.\n */\n optimisticActions?: {\n id: string;\n };\n /**\n * Pagination strategy:\n * - 'cursor': `find()` must return { items, cursor, total? }\n * - 'offset': `find()` must return { items, hasNext, total? }\n * @default \"offset\"\n */\n paginationMode?: 'cursor' | 'offset';\n};\n\nexport interface BaseCollectionComponentConfig {\n /**\n * Collection data configuration and behavior.\n */\n collection: CollectionConfig;\n /**\n * Entity page to navigate to (by page id) when interacting with rows (e.g. onRowClick/update).\n */\n entityPageId?: string;\n /**\n * Search configuration.\n */\n search?: {\n /**\n * Whether to show the search input.\n * @default true\n */\n shown?: boolean;\n };\n /**\n * Toolbar title configuration.\n */\n toolbarTitle?: ToolbarTitle;\n /**\n * Action cell configuration per row.\n */\n actionCell?: ActionCellConfig;\n /**\n * Empty state configuration.\n */\n emptyState?: EmptyState;\n /**\n * Filters configuration.\n */\n filters?: FiltersConfig;\n /**\n * Views configuration.\n */\n views?: ViewsConfig;\n /**\n * Bulk action toolbar configuration.\n */\n bulkActionToolbar?: BulkActionsConfig;\n /**\n * Drag and drop configuration.\n */\n dragAndDrop?: {\n /**\n * Whether drag and drop is enabled. When enabled, the schema must support a \"move\" action.\n */\n enabled: boolean;\n /**\n * Custom drag and drop cancel handler.\n */\n dragAndDropCancel?: {\n id?: string;\n };\n };\n}\n\nexport interface ToolbarTitle {\n /**\n * Title text.\n */\n title: string;\n /**\n * Subtitle configuration.\n */\n subtitle?: {\n /**\n * Subtitle text.\n */\n text: string;\n /**\n * Info tooltip content with an optional link.\n */\n info?: {\n content: {\n text: string;\n link?: {\n url: string;\n label: string;\n };\n };\n };\n /**\n * \"Learn more\" link.\n */\n learnMore?: {\n /**\n * Where the link should navigate to.\n */\n url: string;\n /**\n * The label of the link button.\n */\n label?: string;\n };\n };\n /**\n * Show total items on the toolbar.\n * @default false\n */\n showTotal?: boolean;\n /**\n * Limit displayed item count in the toolbar.\n */\n itemsLimit?: number;\n}\n\nexport interface Column {\n /**\n * FieldId to bind the column to.\n */\n id: string;\n /**\n * Column header text.\n */\n name: string;\n /**\n * CSS width value (e.g. '120px', '20%').\n */\n width: string;\n /**\n * Whether the column supports sorting.\n */\n sortable?: boolean;\n /**\n * Initial sort order when the page loads.\n */\n defaultSortOrder?: 'asc' | 'desc';\n /**\n * Current sort mode selected in UI.\n */\n sortMode?: 'asc' | 'desc';\n /**\n * Hide column by default in the custom columns panel.\n * When true, the column will not be shown initially and must be enabled by the user via the customize columns UI.\n */\n defaultHidden?: boolean;\n /**\n * Exclude from the \"customize columns\" selection UI.\n */\n hiddenFromCustomColumnsSelection?: boolean;\n /**\n * Controls whether the \"hide/show\" checkbox for this column is enabled in the custom columns panel.\n * If set to false, the checkbox will be disabled and the user cannot toggle visibility for this column.\n */\n hideable?: boolean;\n /**\n * Prevent column reordering in the customization UI.\n */\n reorderDisabled?: boolean;\n /**\n * Tooltip content to display when hovering over the info icon in the column header.\n */\n tooltipContent?: string;\n}\n\nexport interface GridItem {\n /**\n * FieldId to use as the card title.\n */\n titleFieldId: string;\n /**\n * FieldId to use as the card subtitle.\n */\n subtitleFieldId?: string;\n /**\n * FieldId to use as the card image.\n */\n imageFieldId?: string;\n /**\n * Controls which content is shown in the card (preset):\n * - 'full': shows title and subtitle.\n * - 'title': shows only the title.\n * - 'empty': hides both title and subtitle.\n */\n cardContentMode?: 'full' | 'title' | 'empty'; // Footer is not supported in auto-patterns\n /**\n * Position of the image inside the card layout.\n */\n imagePlacement?: 'top' | 'side';\n}\n\nexport interface EmptyState {\n /**\n * Empty state title.\n */\n title?: string;\n /**\n * Empty state subtitle.\n */\n subtitle?: string;\n /**\n * Image to display in the empty state.\n */\n image?: {\n id: string;\n };\n /**\n * \"Add new\" call-to-action button.\n */\n addNewCta?: {\n id?: string;\n text?: string;\n };\n /**\n * Custom CTA slot (advanced).\n */\n customCta?: {\n id?: string;\n };\n}\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport type FilterSelectionMode = 'single' | 'multiple';\n\nexport type FilterOptionType =\n | 'checkbox'\n | 'inlineCheckbox'\n | 'radio'\n | 'select';\n\nexport enum ComponentTypeEnum {\n SINGLE = 'single',\n MULTI_SELECT = 'multi-select',\n RADIO_GROUP = 'radio-group',\n NUMBER = 'number',\n DATE_RANGE = 'date-range',\n}\n\nexport type FilterItems = Filter[];\n\nexport interface FiltersConfig {\n /**\n * Filter items to display.\n */\n items: FilterItems;\n /**\n * Maximum number of filters shown inline before moving to the panel.\n * @default 0 (all in panel).\n */\n maxInlineFilters?: CollectionToolbarFiltersProps['inline'];\n /**\n * Title for the filter panel drawer.\n */\n panelTitle?: string;\n}\n\nexport interface ViewsConfig {\n /**\n * Whether to show the views control.\n * @default false\n */\n enabled?: boolean;\n /**\n * Props for the Save View modal.\n */\n saveViewModalProps?: {\n /**\n * Placeholder text for the new view name input in the modal.\n */\n placeholderName?: string;\n /**\n * props for the learn more link in the modal.\n */\n learnMore?: {\n /**\n * Redirect URL for the Learn More button in the modal.\n */\n url?: string;\n };\n };\n /**\n * Props for the views control dropdown.\n */\n viewsDropdownProps?: {\n /**\n * Show the total number of items next to the views control.\n * @default false\n */\n showTotal?: boolean;\n /**\n * Hide the \"All items\" view from the dropdown. Only works when custom presets exist.\n * @default false\n */\n hideAllItemsView?: boolean;\n /**\n * Custom label for the \"All items\" view. Ignored if a preset has `isDefaultView: true`.\n * @default \"All items\"\n */\n customAllItemsViewLabel?: string;\n };\n /**\n * Custom presets to use for the views control.\n */\n presets?:\n | {\n type: 'categories';\n categories: AutoCategory[];\n }\n | {\n type: 'views';\n views: AutoView[];\n };\n}\n\nexport interface AutoCategory {\n /**\n * Category unique identifier.\n */\n id: string;\n /**\n * Category name that will be displayed in the views control.\n */\n label: string;\n /**\n * Category views.\n */\n views: AutoView[];\n /**\n * An icon that will be displayed next to the category label.\n */\n icon?: {\n tooltipContent: string;\n size?: 'small' | 'medium';\n };\n}\n\nexport interface AutoView {\n /**\n * View unique identifier.\n */\n id: string;\n /**\n * Display name for the view in the dropdown.\n */\n label: string;\n /**\n * Filters to apply when the view is selected. Keys must be filters id declared in this config.\n * @external\n */\n filters?: Record<string, AutoFilterValue | null>;\n /**\n * Column preferences for the view. Use this to control column order, visibility, and sorting.\n */\n columnPreferences?: ColumnPreferences[];\n /**\n * Makes this view the default selection instead of the \"All items\" view.\n */\n isDefaultView?: boolean;\n}\n\ninterface ColumnPreferences {\n /**\n * Column unique identifier.\n */\n id: string;\n /**\n * Sorting direction of the column in the view.\n */\n direction?: 'asc' | 'desc';\n /**\n * Pass false to hide the column from the view.\n */\n show?: boolean;\n}\n\nexport interface BaseOptionsFilterConfig {\n /**\n * Selection behavior: single choice or multiple choices.\n */\n selectionMode: FilterSelectionMode;\n}\n\nexport interface DateFilterConfig {\n /**\n * Controls behavior: presets only, custom only, or both.\n */\n mode?: DateRangeFilterMode;\n /**\n * Which preset ranges to display (only if mode supports presets).\n */\n presets?: DateRangeOptions;\n /**\n * Whether to include time selection.\n * @default true\n */\n includeTime?: boolean;\n}\n\nexport type AutoFilterValue =\n | {\n filterType: 'date';\n value: DateFilterValue;\n }\n | {\n filterType: 'number';\n value: NumberFilterValue;\n }\n | {\n filterType: 'boolean';\n value: BooleanFilterValue;\n }\n | {\n filterType: 'enum';\n value: EnumFilterValue;\n }\n | {\n filterType: 'reference';\n value: ReferenceFilterValue;\n }\n | {\n filterType: 'hasValue';\n value: HasValueFilterValue;\n };\n\nexport type DateFilterValue =\n | {\n preset: DateRangeOptions | DateRangePredefinedPresetOptions;\n }\n | {\n /**\n * Start date. format: MM-DD-YYYY\n */\n from?: string;\n /**\n * End date. format: MM-DD-YYYY\n */\n to?: string;\n };\n\nexport interface NumberFilterConfig {\n /**\n * Minimum allowed value.\n */\n min?: number;\n /**\n * Maximum allowed value.\n */\n max?: number;\n /**\n * Whether decimal values are allowed.\n */\n allowedDecimals?: boolean;\n}\n\nexport type NumberFilterValue = {\n /**\n * Minimum allowed value. default is negative infinity\n */\n from?: number;\n /**\n * Maximum allowed value. default is infinity\n */\n to?: number;\n};\n\nexport interface BooleanFilterConfig {\n /**\n * Label for the \"true\" option.\n */\n trueLabel?: string;\n /**\n * Label for the \"false\" option.\n */\n falseLabel?: string;\n}\n\nexport type BooleanFilterValue = {\n /**\n * checked for true, unchecked for false, all for all\n */\n id: 'checked' | 'unchecked' | 'all';\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport type HasValueFilterValue = {\n /**\n * hasValue for cells with a value, noValue for empty cells\n */\n id: 'hasValue' | 'noValue';\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport interface EnumFilterConfig extends BaseOptionsFilterConfig {\n /**\n * List of available options.\n */\n options: FilterOption[];\n /**\n * Rendering control for option appearance.\n */\n optionType?: FilterOptionType;\n}\n\nexport type EnumFilterValue = {\n /**\n * The option value (from the filter config)\n */\n id: string;\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport interface DynamicOptionsFilterConfig extends BaseOptionsFilterConfig {}\n\nexport type ReferenceFilterValue = {\n /**\n * The option value (from the filter config)\n */\n id: string;\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport interface Filter {\n /**\n * Filter unique identifier.\n */\n id: string;\n /**\n * Target field id this filter controls.\n */\n fieldId: string;\n /**\n * Optional filter display name (defaults to field name).\n */\n displayName?: string;\n /**\n * Optional grouping label. Filters with the same `sectionTitle` are grouped together.\n */\n sectionTitle?: string;\n /**\n * Whether the filter item is expanded by default in the panel.\n */\n openByDefault?: boolean;\n /**\n * Label shown in the table/grid tag when the filter is active.\n */\n tagLabel?: string;\n /**\n * Configuration for number inputs (NUMBER fields).\n */\n numberConfig?: NumberFilterConfig;\n /**\n * Configuration for date inputs (DATETIME fields).\n */\n dateConfig?: DateFilterConfig;\n /**\n * Configuration for boolean input labels (BOOLEAN fields).\n */\n booleanConfig?: BooleanFilterConfig;\n /**\n * Configuration for enum inputs (ARRAY/ARRAY_STRING fields).\n */\n enumConfig?: EnumFilterConfig;\n /**\n * Dynamic options configuration (advanced).\n */\n dynamicOptionsConfig?: DynamicOptionsFilterConfig;\n}\n"],"mappings":";;;;IAscYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["ComponentTypeEnum","exports"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport {\n DateRangeFilterMode,\n DateRangeOptions,\n DateRangePredefinedPresetOptions,\n} from '@wix/patterns/core';\nimport { BaseCollectionConfig } from './types';\nimport {\n ActionCellConfig,\n BulkActionsConfig,\n CollectionPageOnRowClickActionConfig,\n CollectionPagePrimaryActions,\n CollectionPageSecondaryActions,\n} from './actions';\n\nexport interface CollectionPageTitle {\n /**\n * The title text.\n */\n text: string;\n /**\n * Determines whether to hide the number of total entities on the title of the page.\n */\n hideTotal?: boolean;\n}\n\nexport interface CollectionPageSubtitle {\n /**\n * The subtitle text.\n */\n text: string;\n /**\n * \"Learn more\" link.\n */\n learnMore?: {\n /**\n * Where the link should navigate to.\n */\n url: string;\n /**\n * The label of the link button. defaults to \"Learn More\".\n */\n label?: string;\n };\n}\n\nexport interface CollectionPageConfig {\n /**\n * Route configuration.\n */\n route: {\n /**\n * Route path (relative path).\n */\n path: string;\n };\n /**\n * Page title configuration.\n */\n title: CollectionPageTitle;\n /**\n * Page subtitle configuration.\n */\n subtitle?: CollectionPageSubtitle;\n /**\n * Page-level actions to render in the page header.\n */\n actions?: {\n /**\n * Primary actions.\n */\n primaryActions?: CollectionPagePrimaryActions;\n /**\n * Secondary actions.\n */\n secondaryActions?: CollectionPageSecondaryActions;\n };\n /**\n * Components rendered within the page layout.\n */\n components: ComponentConfig[];\n}\n\nexport interface CollectionComponentConfig\n extends BaseCollectionComponentConfig {\n /**\n * Type discriminator.\n */\n type: 'collection';\n /**\n * Layout items to render.\n */\n layout: LayoutItemConfig[];\n}\n\nexport interface CustomComponentConfig {\n /**\n * Type discriminator.\n */\n type: 'custom';\n /**\n * Identifier that maps to a custom React component provided via overrides.\n */\n id: string;\n}\n\nexport type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;\n\nexport interface LayoutItemConfig {\n /**\n * Rendering mode for the collection component.\n */\n type: 'Table' | 'Grid';\n /**\n * Table-specific configuration.\n */\n table?: TableSpecificConfig;\n /**\n * Grid-specific configuration.\n */\n grid?: GridSpecificConfig;\n}\n\nexport type ColumnsConfig = Column[];\n\nexport interface TableSpecificConfig {\n /**\n * Table columns configuration.\n */\n columns: ColumnsConfig;\n /**\n * Enables custom columns (hide/reorder columns) functionality.\n */\n customColumns?: {\n enabled: boolean;\n };\n /**\n * Number of leading columns that remain sticky on horizontal scroll.\n */\n stickyColumns?: number;\n /**\n * Row click action.\n */\n onRowClick?: CollectionPageOnRowClickActionConfig;\n /**\n * Show column headers (title bar).\n * @default true\n */\n showTitleBar?: boolean;\n /**\n * Sectioning support for table.\n *\n * The `id` must match the identifier of a custom sectioning override component.\n * This allows you to provide a custom React component for table section rendering.\n */\n sections?: {\n id: string;\n };\n /**\n * Data extension configuration.\n */\n dataExtension?: {\n enabled: boolean;\n };\n}\n\nexport interface GridSpecificConfig {\n /**\n * Grid item.\n */\n item: GridItem;\n}\n\nexport interface TableConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig {}\n\nexport interface GridConfig\n extends BaseCollectionComponentConfig,\n GridSpecificConfig {}\n\nexport interface TableGridSwitchConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig,\n GridSpecificConfig {}\n\nexport type CollectionConfig = BaseCollectionConfig & {\n /**\n * Default fetch limit (items per page).\n */\n limit?: number;\n /**\n * Reflect search/filters/sort in the URL.\n * @default false\n */\n reflectQueryInUrl?: boolean;\n /**\n * Scope of \"Select All\":\n * - 'all': select the entire collection (server-side).\n * - 'page': select only currently visible items.\n * @default \"all\"\n */\n selectAllScope?: 'page' | 'all';\n /**\n * Selection behavior when data changes:\n * - 'preserve': keep current selections if still valid.\n * - 'clear': clear selection on data refresh.\n * @default \"clear\"\n */\n selectionUpdateMode?: 'preserve' | 'clear';\n /**\n * Enables optimistic UI actions;\n * Identifier that maps to a custom optimistic actions provided via overrides.\n */\n optimisticActions?: {\n id: string;\n };\n /**\n * Pagination strategy:\n * - 'cursor': `find()` must return { items, cursor, total? }\n * - 'offset': `find()` must return { items, hasNext, total? }\n * @default \"offset\"\n */\n paginationMode?: 'cursor' | 'offset';\n};\n\nexport interface BaseCollectionComponentConfig {\n /**\n * Collection data configuration and behavior.\n */\n collection: CollectionConfig;\n /**\n * Entity page to navigate to (by page id) when interacting with rows (e.g. onRowClick/update).\n */\n entityPageId?: string;\n /**\n * Search configuration.\n */\n search?: {\n /**\n * Whether to show the search input.\n * @default true\n */\n shown?: boolean;\n };\n /**\n * Toolbar title configuration.\n */\n toolbarTitle?: ToolbarTitle;\n /**\n * Action cell configuration per row.\n */\n actionCell?: ActionCellConfig;\n /**\n * Empty state configuration.\n */\n emptyState?: EmptyState;\n /**\n * Filters configuration.\n */\n filters?: FiltersConfig;\n /**\n * Views configuration.\n */\n views?: ViewsConfig;\n /**\n * Bulk action toolbar configuration.\n */\n bulkActionToolbar?: BulkActionsConfig;\n /**\n * Drag and drop configuration.\n */\n dragAndDrop?: {\n /**\n * Whether drag and drop is enabled. When enabled, the schema must support a \"move\" action.\n */\n enabled: boolean;\n /**\n * Custom drag and drop cancel handler.\n */\n dragAndDropCancel?: {\n id?: string;\n };\n };\n /**\n * Import configuration. Renders an `ImportButton` in the collection toolbar\n * that allows users to upload CSV files and bulk-import entities.\n */\n import?: ImportConfig;\n /**\n * Whether to show prefix icons for field types in column headers, filters, and the customize-columns panel.\n * When enabled, each column and filter receives its schema field type so Cairo can render the matching icon.\n * @default false\n */\n showFieldTypeIcons?: boolean;\n}\n\nexport interface ImportConfig {\n enabled?: boolean;\n}\n\nexport interface ToolbarTitle {\n /**\n * Title text.\n */\n title: string;\n /**\n * Subtitle configuration.\n */\n subtitle?: {\n /**\n * Subtitle text.\n */\n text: string;\n /**\n * Info tooltip content with an optional link.\n */\n info?: {\n content: {\n text: string;\n link?: {\n url: string;\n label: string;\n };\n };\n };\n /**\n * \"Learn more\" link.\n */\n learnMore?: {\n /**\n * Where the link should navigate to.\n */\n url: string;\n /**\n * The label of the link button.\n */\n label?: string;\n };\n };\n /**\n * Show total items on the toolbar.\n * @default false\n */\n showTotal?: boolean;\n /**\n * Limit displayed item count in the toolbar.\n */\n itemsLimit?: number;\n}\n\nexport interface Column {\n /**\n * FieldId to bind the column to.\n */\n id: string;\n /**\n * Column header text.\n */\n name: string;\n /**\n * CSS width value (e.g. '120px', '20%').\n */\n width: string;\n /**\n * Whether the column supports sorting.\n */\n sortable?: boolean;\n /**\n * Initial sort order when the page loads.\n */\n defaultSortOrder?: 'asc' | 'desc';\n /**\n * Current sort mode selected in UI.\n */\n sortMode?: 'asc' | 'desc';\n /**\n * Hide column by default in the custom columns panel.\n * When true, the column will not be shown initially and must be enabled by the user via the customize columns UI.\n */\n defaultHidden?: boolean;\n /**\n * Exclude from the \"customize columns\" selection UI.\n */\n hiddenFromCustomColumnsSelection?: boolean;\n /**\n * Controls whether the \"hide/show\" checkbox for this column is enabled in the custom columns panel.\n * If set to false, the checkbox will be disabled and the user cannot toggle visibility for this column.\n */\n hideable?: boolean;\n /**\n * Prevent column reordering in the customization UI.\n */\n reorderDisabled?: boolean;\n /**\n * Tooltip content to display when hovering over the info icon in the column header.\n */\n tooltipContent?: string;\n}\n\nexport interface GridItem {\n /**\n * FieldId to use as the card title.\n */\n titleFieldId: string;\n /**\n * FieldId to use as the card subtitle.\n */\n subtitleFieldId?: string;\n /**\n * FieldId to use as the card image.\n */\n imageFieldId?: string;\n /**\n * Controls which content is shown in the card (preset):\n * - 'full': shows title and subtitle.\n * - 'title': shows only the title.\n * - 'empty': hides both title and subtitle.\n */\n cardContentMode?: 'full' | 'title' | 'empty'; // Footer is not supported in auto-patterns\n /**\n * Position of the image inside the card layout.\n */\n imagePlacement?: 'top' | 'side';\n}\n\nexport interface EmptyState {\n /**\n * Empty state title.\n */\n title?: string;\n /**\n * Empty state subtitle.\n */\n subtitle?: string;\n /**\n * Image to display in the empty state.\n */\n image?: {\n id: string;\n };\n /**\n * \"Add new\" call-to-action button.\n */\n addNewCta?: {\n id?: string;\n text?: string;\n };\n /**\n * Custom CTA slot (advanced).\n */\n customCta?: {\n id?: string;\n };\n}\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport type FilterSelectionMode = 'single' | 'multiple';\n\nexport type FilterOptionType =\n | 'checkbox'\n | 'inlineCheckbox'\n | 'radio'\n | 'select';\n\nexport enum ComponentTypeEnum {\n SINGLE = 'single',\n MULTI_SELECT = 'multi-select',\n RADIO_GROUP = 'radio-group',\n NUMBER = 'number',\n DATE_RANGE = 'date-range',\n}\n\nexport type FilterItems = Filter[];\n\nexport interface FiltersConfig {\n /**\n * Filter items to display.\n */\n items: FilterItems;\n /**\n * Maximum number of filters shown inline before moving to the panel.\n * @default 0 (all in panel).\n */\n maxInlineFilters?: CollectionToolbarFiltersProps['inline'];\n /**\n * Title for the filter panel drawer.\n */\n panelTitle?: string;\n}\n\nexport interface ViewsConfig {\n /**\n * Whether to show the views control.\n * @default false\n */\n enabled?: boolean;\n /**\n * Props for the Save View modal.\n */\n saveViewModalProps?: {\n /**\n * Placeholder text for the new view name input in the modal.\n */\n placeholderName?: string;\n /**\n * props for the learn more link in the modal.\n */\n learnMore?: {\n /**\n * Redirect URL for the Learn More button in the modal.\n */\n url?: string;\n };\n };\n /**\n * Props for the views control dropdown.\n */\n viewsDropdownProps?: {\n /**\n * Show the total number of items next to the views control.\n * @default false\n */\n showTotal?: boolean;\n /**\n * Hide the \"All items\" view from the dropdown. Only works when custom presets exist.\n * @default false\n */\n hideAllItemsView?: boolean;\n /**\n * Custom label for the \"All items\" view. Ignored if a preset has `isDefaultView: true`.\n * @default \"All items\"\n */\n customAllItemsViewLabel?: string;\n };\n /**\n * Custom presets to use for the views control.\n */\n presets?:\n | {\n type: 'categories';\n categories: AutoCategory[];\n }\n | {\n type: 'views';\n views: AutoView[];\n };\n}\n\nexport interface AutoCategory {\n /**\n * Category unique identifier.\n */\n id: string;\n /**\n * Category name that will be displayed in the views control.\n */\n label: string;\n /**\n * Category views.\n */\n views: AutoView[];\n /**\n * An icon that will be displayed next to the category label.\n */\n icon?: {\n tooltipContent: string;\n size?: 'small' | 'medium';\n };\n}\n\nexport interface AutoView {\n /**\n * View unique identifier.\n */\n id: string;\n /**\n * Display name for the view in the dropdown.\n */\n label: string;\n /**\n * Filters to apply when the view is selected. Keys must be filters id declared in this config.\n * @external\n */\n filters?: Record<string, AutoFilterValue | null>;\n /**\n * Column preferences for the view. Use this to control column order, visibility, and sorting.\n */\n columnPreferences?: ColumnPreferences[];\n /**\n * Makes this view the default selection instead of the \"All items\" view.\n */\n isDefaultView?: boolean;\n}\n\ninterface ColumnPreferences {\n /**\n * Column unique identifier.\n */\n id: string;\n /**\n * Sorting direction of the column in the view.\n */\n direction?: 'asc' | 'desc';\n /**\n * Pass false to hide the column from the view.\n */\n show?: boolean;\n}\n\nexport interface BaseOptionsFilterConfig {\n /**\n * Selection behavior: single choice or multiple choices.\n */\n selectionMode: FilterSelectionMode;\n}\n\nexport interface DateFilterConfig {\n /**\n * Controls behavior: presets only, custom only, or both.\n */\n mode?: DateRangeFilterMode;\n /**\n * Which preset ranges to display (only if mode supports presets).\n */\n presets?: DateRangeOptions;\n /**\n * Whether to include time selection.\n * @default true\n */\n includeTime?: boolean;\n}\n\nexport type AutoFilterValue =\n | {\n filterType: 'date';\n value: DateFilterValue;\n }\n | {\n filterType: 'number';\n value: NumberFilterValue;\n }\n | {\n filterType: 'boolean';\n value: BooleanFilterValue;\n }\n | {\n filterType: 'enum';\n value: EnumFilterValue;\n }\n | {\n filterType: 'reference';\n value: ReferenceFilterValue;\n }\n | {\n filterType: 'hasValue';\n value: HasValueFilterValue;\n };\n\nexport type DateFilterValue =\n | {\n preset: DateRangeOptions | DateRangePredefinedPresetOptions;\n }\n | {\n /**\n * Start date. format: MM-DD-YYYY\n */\n from?: string;\n /**\n * End date. format: MM-DD-YYYY\n */\n to?: string;\n };\n\nexport interface NumberFilterConfig {\n /**\n * Minimum allowed value.\n */\n min?: number;\n /**\n * Maximum allowed value.\n */\n max?: number;\n /**\n * Whether decimal values are allowed.\n */\n allowedDecimals?: boolean;\n}\n\nexport type NumberFilterValue = {\n /**\n * Minimum allowed value. default is negative infinity\n */\n from?: number;\n /**\n * Maximum allowed value. default is infinity\n */\n to?: number;\n};\n\nexport interface BooleanFilterConfig {\n /**\n * Label for the \"true\" option.\n */\n trueLabel?: string;\n /**\n * Label for the \"false\" option.\n */\n falseLabel?: string;\n}\n\nexport type BooleanFilterValue = {\n /**\n * checked for true, unchecked for false, all for all\n */\n id: 'checked' | 'unchecked' | 'all';\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport type HasValueFilterValue = {\n /**\n * hasValue for cells with a value, noValue for empty cells\n */\n id: 'hasValue' | 'noValue';\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport interface EnumFilterConfig extends BaseOptionsFilterConfig {\n /**\n * List of available options.\n */\n options: FilterOption[];\n /**\n * Rendering control for option appearance.\n */\n optionType?: FilterOptionType;\n}\n\nexport type EnumFilterValue = {\n /**\n * The option value (from the filter config)\n */\n id: string;\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport interface DynamicOptionsFilterConfig extends BaseOptionsFilterConfig {}\n\nexport type ReferenceFilterValue = {\n /**\n * The option value (from the filter config)\n */\n id: string;\n /**\n * A string that will appear on the filter tag, after the field name, when the filter is active (appears as \\<field-name\\>: \\<name\\>)\n */\n name: string;\n}[];\n\nexport interface Filter {\n /**\n * Filter unique identifier.\n */\n id: string;\n /**\n * Target field id this filter controls.\n */\n fieldId: string;\n /**\n * Optional filter display name (defaults to field name).\n */\n displayName?: string;\n /**\n * Optional grouping label. Filters with the same `sectionTitle` are grouped together.\n */\n sectionTitle?: string;\n /**\n * Whether the filter item is expanded by default in the panel.\n */\n openByDefault?: boolean;\n /**\n * Label shown in the table/grid tag when the filter is active.\n */\n tagLabel?: string;\n /**\n * Configuration for number inputs (NUMBER fields).\n */\n numberConfig?: NumberFilterConfig;\n /**\n * Configuration for date inputs (DATETIME fields).\n */\n dateConfig?: DateFilterConfig;\n /**\n * Configuration for boolean input labels (BOOLEAN fields).\n */\n booleanConfig?: BooleanFilterConfig;\n /**\n * Configuration for enum inputs (ARRAY/ARRAY_STRING fields).\n */\n enumConfig?: EnumFilterConfig;\n /**\n * Dynamic options configuration (advanced).\n */\n dynamicOptionsConfig?: DynamicOptionsFilterConfig;\n}\n"],"mappings":";;;;IAqdYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ //# sourceMappingURL=SchemaConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../src/types/SchemaConfig.ts"],"sourcesContent":["import { CursorQueryResult, OffsetQueryResult } from './fetchData';\n\nexport type PatternsFieldType =\n | 'SHORT_TEXT'\n | 'LONG_TEXT'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'TIME'\n | 'URL'\n | 'ARRAY'\n | 'REFERENCE'\n | 'MULTI_REFERENCE'\n | 'OBJECT'\n | 'IMAGE'\n | 'MEDIA_GALLERY'\n | 'ADDRESS'\n | 'RICH_TEXT'\n | 'DOCUMENT'\n | 'RICH_CONTENT'\n | 'MULTI_DOCUMENT'\n | 'EMAIL'\n | 'AUDIO'\n | 'COLOR';\n\nexport type QueryOperator =\n | 'CONTAINS'\n | 'ENDS_WITH'\n | 'EQ'\n | 'EXISTS'\n | 'GT'\n | 'GTE'\n | 'HAS_ALL'\n | 'HAS_SOME'\n | 'LT'\n | 'LTE'\n | 'NE'\n | 'STARTS_WITH'\n | 'URLIZED';\n\ninterface BaseField {\n /**\n * Field unique identifier (dot-path supported, e.g. 'primaryInfo.email').\n */\n id: string;\n /**\n * Human-readable field display name.\n */\n displayName: string;\n /**\n * Optional validation rules for UI inputs/editing.\n */\n validation?: {\n numberRange?: NumberRange;\n stringLengthRange?: StringLengthRange;\n /**\n * Whether the field is required when creating/updating an entity.\n */\n required: boolean;\n };\n /**\n * Capabilities informing UI and query layer behavior.\n */\n capabilities?: {\n /**\n * Operators allowed for querying/filtering this field.\n */\n supportedQueryOperators: QueryOperator[];\n /**\n * Whether the field supports sorting.\n */\n sortable: boolean;\n };\n}\n\nexport interface BaseReferenceField extends BaseField {\n referenceMetadata: {\n /**\n * Target collection ID referenced by this field.\n */\n referencedCollectionId: string;\n };\n}\n\nexport interface ReferenceField extends BaseReferenceField {\n type: 'REFERENCE';\n}\n\nexport interface MultiReferenceField extends BaseReferenceField {\n type: 'MULTI_REFERENCE';\n}\n\nexport interface NonReferenceField extends BaseField {\n type: Exclude<PatternsFieldType, 'REFERENCE' | 'MULTI_REFERENCE'>;\n}\n\nexport type Field = ReferenceField | MultiReferenceField | NonReferenceField;\n\nexport interface NumberRange {\n min?: number;\n max?: number;\n}\n\nexport interface StringLengthRange {\n minLength?: number;\n maxLength?: number;\n}\n\nexport interface BackupConfig {\n /**\n * Initiate a backup and return its identifier.\n */\n create: () => Promise<{ backupId: string }>;\n /**\n * Poll or wait until the backup reaches a terminal status.\n * The adapter owns the polling implementation.\n */\n waitForCompletion: (\n backupId: string,\n options?: { signal?: AbortSignal },\n ) => Promise<void>;\n /**\n * Optionally cancel a running backup.\n */\n cancel?: (backupId: string) => Promise<void>;\n\n /**\n * Restore a backup by its identifier.\n */\n restore?: (backupId: string) => Promise<{ restorationId: string }>;\n\n /**\n * Optionally poll or wait until a restoration reaches a terminal status.\n */\n waitForRestoration?: (\n restorationId: string,\n options?: { signal?: AbortSignal },\n ) => Promise<void>;\n}\n\nexport interface BulkInsertError {\n rowIndex: number;\n message?: string;\n code?: string;\n}\n\nexport interface BulkInsertResult {\n succeeded?: number;\n failed?: number;\n errors?: BulkInsertError[];\n}\n\nexport interface Query {\n limit: number;\n offset?: number;\n page: number;\n search?: string;\n cursor?: string | null;\n filters: Record<string, any>;\n sort?: {\n fieldName: string;\n order: 'asc' | 'desc';\n }[];\n}\n\nexport interface SchemaConfig {\n /**\n * Schema unique identifier (usually same as collectionId).\n */\n id: string;\n /**\n * Field registry by fieldId. Undefined value allows reserving keys conditionally.\n */\n fields: Record<string, Field | undefined>;\n /**\n * The fieldId that best represents the entity for titles/selections.\n */\n displayField: string;\n /**\n * The underlying identifier field used by your data source (e.g. '_id').\n */\n idField: string;\n\n /**\n * Whether the entity supports data extensions\n * Maps to `info.extensible` in the collection schema - map only properties that are relevant or `null` if not extensible */\n extensible?: {\n /**\n * Whether the entity supports filtering on data extensions\n * Maps to `info.extensible.filterable` in the collection schema\n */\n filterable?: boolean;\n } | null;\n /**\n * Whether the schema contains personally identifiable information (PII).\n * Maps to `info.containsPii` in the collection schema\n */\n containsPii?: boolean;\n /**\n * Data access layer for entities of this schema.\n */\n actions: {\n /**\n * Fetch a single entity by ID.\n */\n get: (entityId: string) => Promise<any>;\n /**\n * Create a new entity with the provided partial.\n */\n create: (newEntity: Record<string, any>) => Promise<any>;\n /**\n * Update an existing entity.\n */\n update: (updatedEntity: Record<string, any>) => Promise<any>;\n /**\n * Delete an entity by ID.\n */\n delete: (entityId: string) => Promise<any>;\n /**\n * Bulk deletion by IDs.\n */\n bulkDelete: (entityIds: string[]) => Promise<any>;\n /**\n * Query for entities with pagination/sort/filter.\n * Return shape depends on pagination mode (see CollectionConfig.paginationMode):\n * - Cursor mode: { items, cursor, total? }\n * - Offset mode (default): { items, hasNext, total? }\n */\n find: (\n query: Query,\n options?: {\n /**\n * Overrides the set of fieldIds used for search term matching.\n */\n searchableFieldIds?: string[];\n /**\n * Maps UI filter ids to underlying fieldIds when they differ.\n */\n filterFieldMapping?: Record<string, { fieldId: string }>;\n },\n ) => Promise<CursorQueryResult | OffsetQueryResult>;\n /**\n * Reorder an entity within the collection.\n * @param id The ID of the entity to move.\n * @param params.moveAfterId The ID of the entity that should precede the moved entity, or null/undefined to move to start.\n */\n move?: (\n id: string,\n params: {\n moveAfterId: string | null | undefined;\n },\n ) => Promise<void>;\n /**\n * Backup configuration for the collection.\n * When provided, the import flow will create a backup before importing.\n */\n readonly backup?: BackupConfig;\n /**\n * Insert multiple entities in a single batch operation.\n */\n readonly bulkInsert?: (\n entities: Record<string, any>[],\n ) => Promise<BulkInsertResult>;\n };\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ var _SchemaConfig = require("./SchemaConfig");
5
+ Object.keys(_SchemaConfig).forEach(function (key) {
6
+ if (key === "default" || key === "__esModule") return;
7
+ if (key in exports && exports[key] === _SchemaConfig[key]) return;
8
+ exports[key] = _SchemaConfig[key];
9
+ });
4
10
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\nimport { SettingsPageConfig } from './SettingsPageConfig';\nimport { useOptimisticActions } from '@wix/patterns';\nimport { CursorQueryResult, OffsetQueryResult } from './fetchData';\n\ninterface BaseCollectionConfigCommon {\n /**\n * Collection identifier.\n * - For CMS: the Wix Data collection ID.\n * - For custom sources: the logical collection/entity type ID your data provider recognizes.\n */\n collectionId: string;\n}\n\nexport interface CMSCollectionConfig extends BaseCollectionConfigCommon {\n /**\n * Declares this collection pulls schema/data from Wix CMS.\n */\n entityTypeSource: 'cms';\n /**\n * Optional override for CMS schema metadata.\n * Use this if you already have the schema and want to provide it directly.\n */\n cms?: {\n schema?: { id: string };\n };\n custom?: never;\n}\n\ninterface CustomCollectionConfig extends BaseCollectionConfigCommon {\n /**\n * Declares this collection is backed by a custom data source.\n */\n entityTypeSource: 'custom';\n cms?: never;\n /**\n * Required metadata for custom sources.\n * `id` must match the identifier your custom data source registers under.\n */\n custom: {\n id: string;\n };\n}\n\nexport type BaseCollectionConfig = CMSCollectionConfig | CustomCollectionConfig;\n\nexport type PatternsFieldType =\n | 'SHORT_TEXT'\n | 'LONG_TEXT'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'TIME'\n | 'URL'\n | 'ARRAY'\n | 'REFERENCE'\n | 'MULTI_REFERENCE'\n | 'OBJECT'\n | 'IMAGE'\n | 'MEDIA_GALLERY'\n | 'ADDRESS'\n | 'RICH_TEXT'\n | 'DOCUMENT'\n | 'RICH_CONTENT'\n | 'MULTI_DOCUMENT'\n | 'EMAIL'\n | 'AUDIO';\n\nexport interface AppConfig {\n /** List of pages to render and route between. */\n pages: PageConfig[];\n}\n\nexport interface BasePageConfig {\n /**\n * Page unique identifier.\n * - Used for routing, navigation, and cross references (e.g. `entityPageId`, `parentPageId`).\n */\n id: string;\n /**\n * Marks this page as the main landing page of the app.\n * - Exactly one page should have `true`.\n * - Used to determine the default route.\n */\n appMainPage?: boolean;\n}\n\nexport interface CollectionPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'collectionPage';\n /**\n * Collection page configuration.\n */\n collectionPage: CollectionPageConfig;\n entityPage?: never;\n settingsPage?: never;\n}\n\nexport interface EntityPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'entityPage';\n /**\n * Entity page configuration.\n */\n entityPage: EntityPageConfig;\n collectionPage?: never;\n settingsPage?: never;\n}\n\nexport interface SettingsPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'settingsPage';\n /**\n * Settings page configuration.\n */\n settingsPage: SettingsPageConfig;\n collectionPage?: never;\n entityPage?: never;\n}\n\nexport type PageConfig =\n | CollectionPageConfigType\n | EntityPageConfigType\n | SettingsPageConfigType;\n\nexport type EntityProps = { [key: string]: any };\n\nexport interface IMenuItem<T extends EntityProps = any> {\n item: T;\n}\n\nexport interface IColumnValue<T> {\n value: T;\n row: Record<string, any>;\n}\n\nexport type QueryOperator =\n | 'CONTAINS'\n | 'ENDS_WITH'\n | 'EQ'\n | 'EXISTS'\n | 'GT'\n | 'GTE'\n | 'HAS_ALL'\n | 'HAS_SOME'\n | 'LT'\n | 'LTE'\n | 'NE'\n | 'STARTS_WITH'\n | 'URLIZED';\n\nexport interface BaseInputRef {\n focus?: () => void;\n invalid?: boolean;\n}\ninterface BaseField {\n /**\n * Field unique identifier (dot-path supported, e.g. 'primaryInfo.email').\n */\n id: string;\n /**\n * Human-readable field display name.\n */\n displayName: string;\n /**\n * Optional validation rules for UI inputs/editing.\n */\n validation?: {\n numberRange?: NumberRange;\n stringLengthRange?: StringLengthRange;\n /**\n * Whether the field is required when creating/updating an entity.\n */\n required: boolean;\n };\n /**\n * Capabilities informing UI and query layer behavior.\n */\n capabilities?: {\n /**\n * Operators allowed for querying/filtering this field.\n */\n supportedQueryOperators: QueryOperator[];\n /**\n * Whether the field supports sorting.\n */\n sortable: boolean;\n };\n}\n\nexport interface BaseReferenceField extends BaseField {\n referenceMetadata: {\n /**\n * Target collection ID referenced by this field.\n */\n referencedCollectionId: string;\n };\n}\n\nexport interface ReferenceField extends BaseReferenceField {\n type: 'REFERENCE';\n}\n\nexport interface MultiReferenceField extends BaseReferenceField {\n type: 'MULTI_REFERENCE';\n}\n\nexport interface NonReferenceField extends BaseField {\n type: Exclude<PatternsFieldType, 'REFERENCE' | 'MULTI_REFERENCE'>;\n}\n\nexport type Field = ReferenceField | MultiReferenceField | NonReferenceField;\n\nexport interface NumberRange {\n min?: number;\n max?: number;\n}\n\nexport interface StringLengthRange {\n minLength?: number;\n maxLength?: number;\n}\n\nexport interface Query {\n limit: number;\n offset?: number;\n page: number;\n search?: string;\n cursor?: string | null;\n filters: Record<string, any>;\n sort?: {\n fieldName: string;\n order: 'asc' | 'desc';\n }[];\n}\n\nexport interface SchemaConfig {\n /**\n * Schema unique identifier (usually same as collectionId).\n */\n id: string;\n /**\n * Field registry by fieldId. Undefined value allows reserving keys conditionally.\n */\n fields: Record<string, Field | undefined>;\n /**\n * The fieldId that best represents the entity for titles/selections.\n */\n displayField: string;\n /**\n * The underlying identifier field used by your data source (e.g. '_id').\n */\n idField: string;\n\n /**\n * Whether the entity supports data extensions\n * Maps to `info.extensible` in the collection schema - map only properties that are relevant or `null` if not extensible */\n extensible?: {\n /**\n * Whether the entity supports filtering on data extensions\n * Maps to `info.extensible.filterable` in the collection schema\n */\n filterable?: boolean;\n } | null;\n /**\n * Whether the schema contains personally identifiable information (PII).\n * Maps to `info.containsPii` in the collection schema\n */\n containsPii?: boolean;\n /**\n * Data access layer for entities of this schema.\n */\n actions: {\n /**\n * Fetch a single entity by ID.\n */\n get: (entityId: string) => Promise<any>;\n /**\n * Create a new entity with the provided partial.\n */\n create: (newEntity: Record<string, any>) => Promise<any>;\n /**\n * Update an existing entity.\n */\n update: (updatedEntity: Record<string, any>) => Promise<any>;\n /**\n * Delete an entity by ID.\n */\n delete: (entityId: string) => Promise<any>;\n /**\n * Bulk deletion by IDs.\n */\n bulkDelete: (entityIds: string[]) => Promise<any>;\n /**\n * Query for entities with pagination/sort/filter.\n * Return shape depends on pagination mode (see CollectionConfig.paginationMode):\n * - Cursor mode: { items, cursor, total? }\n * - Offset mode (default): { items, hasNext, total? }\n */\n find: (\n query: Query,\n options?: {\n /**\n * Overrides the set of fieldIds used for search term matching.\n */\n searchableFieldIds?: string[];\n /**\n * Maps UI filter ids to underlying fieldIds when they differ.\n */\n filterFieldMapping?: Record<string, { fieldId: string }>;\n },\n ) => Promise<CursorQueryResult | OffsetQueryResult>;\n /**\n * Reorder an entity within the collection.\n * @param id The ID of the entity to move.\n * @param params.moveAfterId The ID of the entity that should precede the moved entity, or null/undefined to move to start.\n */\n move?: (\n id: string,\n params: {\n moveAfterId: string | null | undefined;\n },\n ) => Promise<void>;\n };\n}\n\nexport type OptimisticActionsParams = Parameters<\n typeof useOptimisticActions\n>[1];\n\n/**\n * BI reporting function type for toolbar events.\n */\nexport type ReportBiFn = (event: any) => void;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":["_SchemaConfig","require","Object","keys","forEach","key","exports"],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\nimport { SettingsPageConfig } from './SettingsPageConfig';\nimport { useOptimisticActions } from '@wix/patterns';\n\nexport * from './SchemaConfig';\n\ninterface BaseCollectionConfigCommon {\n /**\n * Collection identifier.\n * - For CMS: the Wix Data collection ID.\n * - For custom sources: the logical collection/entity type ID your data provider recognizes.\n */\n collectionId: string;\n}\n\nexport interface CMSCollectionConfig extends BaseCollectionConfigCommon {\n /**\n * Declares this collection pulls schema/data from Wix CMS.\n */\n entityTypeSource: 'cms';\n /**\n * Optional override for CMS schema metadata.\n * Use this if you already have the schema and want to provide it directly.\n */\n cms?: {\n schema?: { id: string };\n };\n custom?: never;\n}\n\ninterface CustomCollectionConfig extends BaseCollectionConfigCommon {\n /**\n * Declares this collection is backed by a custom data source.\n */\n entityTypeSource: 'custom';\n cms?: never;\n /**\n * Required metadata for custom sources.\n * `id` must match the identifier your custom data source registers under.\n */\n custom: {\n id: string;\n };\n}\n\nexport type BaseCollectionConfig = CMSCollectionConfig | CustomCollectionConfig;\n\nexport interface AppConfig {\n /** List of pages to render and route between. */\n pages: PageConfig[];\n}\n\nexport interface BasePageConfig {\n /**\n * Page unique identifier.\n * - Used for routing, navigation, and cross references (e.g. `entityPageId`, `parentPageId`).\n */\n id: string;\n /**\n * Marks this page as the main landing page of the app.\n * - Exactly one page should have `true`.\n * - Used to determine the default route.\n */\n appMainPage?: boolean;\n}\n\nexport interface CollectionPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'collectionPage';\n /**\n * Collection page configuration.\n */\n collectionPage: CollectionPageConfig;\n entityPage?: never;\n settingsPage?: never;\n}\n\nexport interface EntityPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'entityPage';\n /**\n * Entity page configuration.\n */\n entityPage: EntityPageConfig;\n collectionPage?: never;\n settingsPage?: never;\n}\n\nexport interface SettingsPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'settingsPage';\n /**\n * Settings page configuration.\n */\n settingsPage: SettingsPageConfig;\n collectionPage?: never;\n entityPage?: never;\n}\n\nexport type PageConfig =\n | CollectionPageConfigType\n | EntityPageConfigType\n | SettingsPageConfigType;\n\nexport type EntityProps = { [key: string]: any };\n\nexport interface IMenuItem<T extends EntityProps = any> {\n item: T;\n}\n\nexport interface IColumnValue<T> {\n value: T;\n row: Record<string, any>;\n}\n\nexport interface BaseInputRef {\n focus?: () => void;\n invalid?: boolean;\n}\n\nexport type OptimisticActionsParams = Parameters<\n typeof useOptimisticActions\n>[1];\n\n/**\n * BI reporting function type for toolbar events.\n */\nexport type ReportBiFn = (event: any) => void;\n"],"mappings":";;;AAKA,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","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.pollUntilReady = pollUntilReady;
5
+ /**
6
+ * Polls `isDone` until it returns `true`, max attempts are exhausted,
7
+ * or the provided AbortSignal is aborted.
8
+ * Each consumer supplies its own completion logic.
9
+ */
10
+ async function pollUntilReady(isDone, options) {
11
+ const interval = (options == null ? void 0 : options.interval) ?? 2000;
12
+ const maxAttempts = (options == null ? void 0 : options.maxAttempts) ?? 120;
13
+ const signal = options == null ? void 0 : options.signal;
14
+ for (let i = 0; i < maxAttempts; i++) {
15
+ signal == null || signal.throwIfAborted();
16
+ if (await isDone()) {
17
+ return;
18
+ }
19
+ await new Promise((resolve, reject) => {
20
+ const timer = setTimeout(resolve, interval);
21
+ signal == null || signal.addEventListener('abort', () => {
22
+ clearTimeout(timer);
23
+ reject(signal.reason);
24
+ }, {
25
+ once: true
26
+ });
27
+ });
28
+ }
29
+ throw new Error('Backup polling timed out');
30
+ }
31
+ //# sourceMappingURL=backupPolling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["pollUntilReady","isDone","options","interval","maxAttempts","signal","i","throwIfAborted","Promise","resolve","reject","timer","setTimeout","addEventListener","clearTimeout","reason","once","Error"],"sources":["../../../src/utils/backupPolling.ts"],"sourcesContent":["export interface PollOptions {\n interval?: number;\n maxAttempts?: number;\n signal?: AbortSignal;\n}\n\n/**\n * Polls `isDone` until it returns `true`, max attempts are exhausted,\n * or the provided AbortSignal is aborted.\n * Each consumer supplies its own completion logic.\n */\nexport async function pollUntilReady(\n isDone: () => Promise<boolean>,\n options?: PollOptions,\n): Promise<void> {\n const interval = options?.interval ?? 2000;\n const maxAttempts = options?.maxAttempts ?? 120;\n const signal = options?.signal;\n\n for (let i = 0; i < maxAttempts; i++) {\n signal?.throwIfAborted();\n\n if (await isDone()) {\n return;\n }\n\n await new Promise<void>((resolve, reject) => {\n const timer = setTimeout(resolve, interval);\n\n signal?.addEventListener(\n 'abort',\n () => {\n clearTimeout(timer);\n reject(signal.reason);\n },\n { once: true },\n );\n });\n }\n\n throw new Error('Backup polling timed out');\n}\n"],"mappings":";;;;AAMA;AACA;AACA;AACA;AACA;AACO,eAAeA,cAAcA,CAClCC,MAA8B,EAC9BC,OAAqB,EACN;EACf,MAAMC,QAAQ,GAAG,CAAAD,OAAO,oBAAPA,OAAO,CAAEC,QAAQ,KAAI,IAAI;EAC1C,MAAMC,WAAW,GAAG,CAAAF,OAAO,oBAAPA,OAAO,CAAEE,WAAW,KAAI,GAAG;EAC/C,MAAMC,MAAM,GAAGH,OAAO,oBAAPA,OAAO,CAAEG,MAAM;EAE9B,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,WAAW,EAAEE,CAAC,EAAE,EAAE;IACpCD,MAAM,YAANA,MAAM,CAAEE,cAAc,CAAC,CAAC;IAExB,IAAI,MAAMN,MAAM,CAAC,CAAC,EAAE;MAClB;IACF;IAEA,MAAM,IAAIO,OAAO,CAAO,CAACC,OAAO,EAAEC,MAAM,KAAK;MAC3C,MAAMC,KAAK,GAAGC,UAAU,CAACH,OAAO,EAAEN,QAAQ,CAAC;MAE3CE,MAAM,YAANA,MAAM,CAAEQ,gBAAgB,CACtB,OAAO,EACP,MAAM;QACJC,YAAY,CAACH,KAAK,CAAC;QACnBD,MAAM,CAACL,MAAM,CAACU,MAAM,CAAC;MACvB,CAAC,EACD;QAAEC,IAAI,EAAE;MAAK,CACf,CAAC;IACH,CAAC,CAAC;EACJ;EAEA,MAAM,IAAIC,KAAK,CAAC,0BAA0B,CAAC;AAC7C","ignoreList":[]}
@@ -26,6 +26,7 @@
26
26
  "auto-patterns.fields.type_mismatch_clear": "Clear this field",
27
27
  "auto-patterns.fields.type_mismatch_tip": "The value does not match the field type {typeName}",
28
28
  "auto-patterns.fields.field_type_object_title": "Object",
29
+ "auto-patterns.fields.field_type_array_title": "Array",
29
30
  "auto-patterns.fields.field_type_address_title": "Address",
30
31
  "auto-patterns.fields.field_type_time_title": "Time",
31
32
  "auto-patterns.time_input.placeholder": "Enter time",
@@ -1,15 +1,15 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.js";
4
- var _namespace_ = "addressinput1933042154";
4
+ var _namespace_ = "addressinput1401564759";
5
5
  var _style_ = classesRuntime.bind(null, _namespace_);
6
6
  export var cssStates = statesRuntime.bind(null, _namespace_);
7
7
  export var style = _style_;
8
8
  export var st = _style_;
9
9
  export var namespace = _namespace_;
10
10
  export var classes = {
11
- "root": "addressinput1933042154__root",
12
- "tableAddressInput": "addressinput1933042154__tableAddressInput"
11
+ "root": "addressinput1401564759__root",
12
+ "tableAddressInput": "addressinput1401564759__tableAddressInput"
13
13
  };
14
14
  export var keyframes = {};
15
15
  export var layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/cms-fields/components/address/input/address-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"addressinput1933042154\";\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\":\"addressinput1933042154__root\",\"tableAddressInput\":\"addressinput1933042154__tableAddressInput\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,qCAAqC;AAInF,IAAIC,WAAW,GAAG,wBAAwB;AAC1C,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,8BAA8B;EAAC,mBAAmB,EAAC;AAA2C,CAAC;AAC5H,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/cms-fields/components/address/input/address-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"addressinput1401564759\";\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\":\"addressinput1401564759__root\",\"tableAddressInput\":\"addressinput1401564759__tableAddressInput\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,qCAAqC;AAInF,IAAIC,WAAW,GAAG,wBAAwB;AAC1C,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,8BAA8B;EAAC,mBAAmB,EAAC;AAA2C,CAAC;AAC5H,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -1,15 +1,15 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  import { classesRuntime, statesRuntime } from "../../../../../stylable-esm-runtime.js";
4
- var _namespace_ = "actionsmenu3356075028";
4
+ var _namespace_ = "actionsmenu1915560084";
5
5
  var _style_ = classesRuntime.bind(null, _namespace_);
6
6
  export var cssStates = statesRuntime.bind(null, _namespace_);
7
7
  export var style = _style_;
8
8
  export var st = _style_;
9
9
  export var namespace = _namespace_;
10
10
  export var classes = {
11
- "root": "actionsmenu3356075028__root",
12
- "action": "actionsmenu3356075028__action"
11
+ "root": "actionsmenu1915560084__root",
12
+ "action": "actionsmenu1915560084__action"
13
13
  };
14
14
  export var keyframes = {};
15
15
  export var layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"actionsmenu3356075028\";\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\":\"actionsmenu3356075028__root\",\"action\":\"actionsmenu3356075028__action\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-space-100\":\"--wds-space-100\"}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,wCAAwC;AAItF,IAAIC,WAAW,GAAG,uBAAuB;AACzC,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,6BAA6B;EAAC,QAAQ,EAAC;AAA+B,CAAC;AACpG,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG;EAAC,eAAe,EAAC;AAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/cms-fields/components/audio/actions/actions-menu/actions-menu.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"actionsmenu1915560084\";\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\":\"actionsmenu1915560084__root\",\"action\":\"actionsmenu1915560084__action\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-space-100\":\"--wds-space-100\"}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,wCAAwC;AAItF,IAAIC,WAAW,GAAG,uBAAuB;AACzC,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,6BAA6B;EAAC,QAAQ,EAAC;AAA+B,CAAC;AACpG,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG;EAAC,eAAe,EAAC;AAAiB,CAAC","ignoreList":[]}
@@ -1,16 +1,16 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.js";
4
- var _namespace_ = "formaudiofield1060026357";
4
+ var _namespace_ = "formaudiofield925238266";
5
5
  var _style_ = classesRuntime.bind(null, _namespace_);
6
6
  export var cssStates = statesRuntime.bind(null, _namespace_);
7
7
  export var style = _style_;
8
8
  export var st = _style_;
9
9
  export var namespace = _namespace_;
10
10
  export var classes = {
11
- "root": "formaudiofield1060026357__root",
12
- "addItem": "formaudiofield1060026357__addItem",
13
- "mediaTitle": "formaudiofield1060026357__mediaTitle"
11
+ "root": "formaudiofield925238266__root",
12
+ "addItem": "formaudiofield925238266__addItem",
13
+ "mediaTitle": "formaudiofield925238266__mediaTitle"
14
14
  };
15
15
  export var keyframes = {};
16
16
  export var layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/cms-fields/components/audio/audio-field/form-audio-field.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"formaudiofield1060026357\";\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\":\"formaudiofield1060026357__root\",\"addItem\":\"formaudiofield1060026357__addItem\",\"mediaTitle\":\"formaudiofield1060026357__mediaTitle\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-red-100\":\"--wds-color-red-100\",\"wds-color-blue-300\":\"--wds-color-blue-300\",\"wds-border-radius-400\":\"--wds-border-radius-400\",\"wds-input-shadow-focus-standard\":\"--wds-input-shadow-focus-standard\",\"wsr-color-R10\":\"--wsr-color-R10\",\"wsr-color-B30\":\"--wsr-color-B30\"}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,qCAAqC;AAInF,IAAIC,WAAW,GAAG,0BAA0B;AAC5C,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,gCAAgC;EAAC,SAAS,EAAC,mCAAmC;EAAC,YAAY,EAAC;AAAsC,CAAC;AAChK,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG;EAAC,mBAAmB,EAAC,qBAAqB;EAAC,oBAAoB,EAAC,sBAAsB;EAAC,uBAAuB,EAAC,yBAAyB;EAAC,iCAAiC,EAAC,mCAAmC;EAAC,eAAe,EAAC,iBAAiB;EAAC,eAAe,EAAC;AAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/cms-fields/components/audio/audio-field/form-audio-field.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"formaudiofield925238266\";\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\":\"formaudiofield925238266__root\",\"addItem\":\"formaudiofield925238266__addItem\",\"mediaTitle\":\"formaudiofield925238266__mediaTitle\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-red-100\":\"--wds-color-red-100\",\"wds-color-blue-300\":\"--wds-color-blue-300\",\"wds-border-radius-400\":\"--wds-border-radius-400\",\"wds-input-shadow-focus-standard\":\"--wds-input-shadow-focus-standard\",\"wsr-color-R10\":\"--wsr-color-R10\",\"wsr-color-B30\":\"--wsr-color-B30\"}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,qCAAqC;AAInF,IAAIC,WAAW,GAAG,yBAAyB;AAC3C,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,+BAA+B;EAAC,SAAS,EAAC,kCAAkC;EAAC,YAAY,EAAC;AAAqC,CAAC;AAC7J,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG;EAAC,mBAAmB,EAAC,qBAAqB;EAAC,oBAAoB,EAAC,sBAAsB;EAAC,uBAAuB,EAAC,yBAAyB;EAAC,iCAAiC,EAAC,mCAAmC;EAAC,eAAe,EAAC,iBAAiB;EAAC,eAAe,EAAC;AAAiB,CAAC","ignoreList":[]}
@@ -1,14 +1,14 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.js";
4
- var _namespace_ = "audioplayer3379434368";
4
+ var _namespace_ = "audioplayer3633182906";
5
5
  var _style_ = classesRuntime.bind(null, _namespace_);
6
6
  export var cssStates = statesRuntime.bind(null, _namespace_);
7
7
  export var style = _style_;
8
8
  export var st = _style_;
9
9
  export var namespace = _namespace_;
10
10
  export var classes = {
11
- "root": "audioplayer3379434368__root"
11
+ "root": "audioplayer3633182906__root"
12
12
  };
13
13
  export var keyframes = {};
14
14
  export var layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/cms-fields/components/audio/audio-player/audio-player.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"audioplayer3379434368\";\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\":\"audioplayer3379434368__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,qCAAqC;AAInF,IAAIC,WAAW,GAAG,uBAAuB;AACzC,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC;AAA6B,CAAC;AAC3D,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/cms-fields/components/audio/audio-player/audio-player.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"audioplayer3633182906\";\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\":\"audioplayer3633182906__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,qCAAqC;AAInF,IAAIC,WAAW,GAAG,uBAAuB;AACzC,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC;AAA6B,CAAC;AAC3D,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,104 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React, { forwardRef, useCallback, useState } from 'react';
3
+ import { ColorPicker, FillButton, FillPreview, Input, Popover } from '@wix/design-system';
4
+ import ColorLib from 'color';
5
+ const omitHash = value => value.replace(/^#/, '');
6
+ const isValidHex = value => /^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(value);
7
+ const normalizeHex = value => {
8
+ const cleaned = value.startsWith('#') ? value : `#${value}`;
9
+ if (isValidHex(cleaned)) {
10
+ return cleaned.toUpperCase();
11
+ }
12
+ return undefined;
13
+ };
14
+ const safeColorLib = value => {
15
+ try {
16
+ return ColorLib(value);
17
+ } catch {
18
+ return undefined;
19
+ }
20
+ };
21
+ export const ColorInput = /*#__PURE__*/forwardRef((_ref, ref) => {
22
+ let {
23
+ value: colorValue,
24
+ onChange,
25
+ onBlur,
26
+ ...props
27
+ } = _ref;
28
+ const [inputValue, setInputValue] = useState(colorValue ? omitHash(colorValue) : '');
29
+ const [showPicker, setShowPicker] = useState(false);
30
+ const [pickerColor, setPickerColor] = useState(colorValue ? safeColorLib(colorValue) : undefined);
31
+ const onInputChange = useCallback(e => {
32
+ const raw = e.target.value;
33
+ setInputValue(raw);
34
+ const hex = normalizeHex(raw);
35
+ if (hex) {
36
+ onChange == null || onChange(hex);
37
+ setPickerColor(safeColorLib(hex));
38
+ }
39
+ }, [onChange]);
40
+ const onInputBlur = useCallback(e => {
41
+ const hex = normalizeHex(inputValue);
42
+ if (hex) {
43
+ onChange == null || onChange(hex);
44
+ setInputValue(omitHash(hex));
45
+ } else if (colorValue) {
46
+ setInputValue(omitHash(colorValue));
47
+ } else {
48
+ setInputValue('');
49
+ }
50
+ onBlur == null || onBlur(e);
51
+ }, [onChange, onBlur, inputValue, colorValue]);
52
+ const onPickerConfirm = useCallback(confirmedColor => {
53
+ var _confirmedColor$hex;
54
+ const hex = typeof confirmedColor === 'string' ? confirmedColor : confirmedColor == null || (_confirmedColor$hex = confirmedColor.hex()) == null ? void 0 : _confirmedColor$hex.toUpperCase();
55
+ if (hex) {
56
+ onChange == null || onChange(hex);
57
+ setInputValue(omitHash(hex));
58
+ setPickerColor(safeColorLib(hex));
59
+ }
60
+ setShowPicker(false);
61
+ }, [onChange]);
62
+ const onPickerCancel = useCallback(() => {
63
+ setPickerColor(colorValue ? safeColorLib(colorValue) : undefined);
64
+ setShowPicker(false);
65
+ }, [colorValue]);
66
+ const onPreviewClick = useCallback(() => {
67
+ setShowPicker(prev => !prev);
68
+ }, []);
69
+ return /*#__PURE__*/React.createElement(Input, _extends({}, props, {
70
+ ref: ref,
71
+ value: inputValue,
72
+ onChange: onInputChange,
73
+ onBlur: onInputBlur,
74
+ prefix: /*#__PURE__*/React.createElement(Input.Affix, null, "#"),
75
+ suffix: /*#__PURE__*/React.createElement(Input.Affix, null, /*#__PURE__*/React.createElement(Popover, {
76
+ shown: showPicker,
77
+ onClickOutside: () => setShowPicker(false),
78
+ animate: true,
79
+ flip: true,
80
+ fixed: false,
81
+ placement: "left-start",
82
+ appendTo: "scrollParent",
83
+ moveBy: {
84
+ x: 6,
85
+ y: 6
86
+ },
87
+ zIndex: 5001
88
+ }, /*#__PURE__*/React.createElement(Popover.Element, null, colorValue ? /*#__PURE__*/React.createElement(FillPreview, {
89
+ fill: colorValue,
90
+ onClick: onPreviewClick
91
+ }) : /*#__PURE__*/React.createElement(FillButton, {
92
+ onClick: onPreviewClick
93
+ })), /*#__PURE__*/React.createElement(Popover.Content, null, /*#__PURE__*/React.createElement(ColorPicker, {
94
+ value: pickerColor,
95
+ onChange: c => setPickerColor(c),
96
+ onConfirm: onPickerConfirm,
97
+ onCancel: onPickerCancel,
98
+ showConverter: true,
99
+ allowEmpty: true
100
+ }))))
101
+ }));
102
+ });
103
+ ColorInput.displayName = 'ColorInput';
104
+ //# sourceMappingURL=color-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","forwardRef","useCallback","useState","ColorPicker","FillButton","FillPreview","Input","Popover","ColorLib","omitHash","value","replace","isValidHex","test","normalizeHex","cleaned","startsWith","toUpperCase","undefined","safeColorLib","ColorInput","_ref","ref","colorValue","onChange","onBlur","props","inputValue","setInputValue","showPicker","setShowPicker","pickerColor","setPickerColor","onInputChange","e","raw","target","hex","onInputBlur","onPickerConfirm","confirmedColor","_confirmedColor$hex","onPickerCancel","onPreviewClick","prev","createElement","_extends","prefix","Affix","suffix","shown","onClickOutside","animate","flip","fixed","placement","appendTo","moveBy","x","y","zIndex","Element","fill","onClick","Content","c","onConfirm","onCancel","showConverter","allowEmpty","displayName"],"sources":["../../../../../src/cms-fields/components/color-view/color-input.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useState } from 'react';\nimport type {\n ColorPickerProps,\n InputImperativeActions,\n InputProps,\n} from '@wix/design-system';\nimport {\n ColorPicker,\n FillButton,\n FillPreview,\n Input,\n Popover,\n} from '@wix/design-system';\nimport ColorLib, { rgb } from 'color';\n\ntype ColorInstance = ReturnType<typeof rgb>;\n\nconst omitHash = (value: string) => value.replace(/^#/, '');\n\nconst isValidHex = (value: string): boolean =>\n /^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(value);\n\nconst normalizeHex = (value: string): string | undefined => {\n const cleaned = value.startsWith('#') ? value : `#${value}`;\n if (isValidHex(cleaned)) {\n return cleaned.toUpperCase();\n }\n return undefined;\n};\n\nconst safeColorLib = (value: string): ColorInstance | undefined => {\n try {\n return ColorLib(value);\n } catch {\n return undefined;\n }\n};\n\nexport interface ColorInputProps\n extends Omit<InputProps, 'value' | 'onChange' | 'prefix' | 'suffix'> {\n value?: string;\n onChange?: (hex: string) => void;\n}\n\nexport const ColorInput = forwardRef<InputImperativeActions, ColorInputProps>(\n ({ value: colorValue, onChange, onBlur, ...props }, ref) => {\n const [inputValue, setInputValue] = useState(\n colorValue ? omitHash(colorValue) : '',\n );\n const [showPicker, setShowPicker] = useState(false);\n const [pickerColor, setPickerColor] = useState<ColorInstance | undefined>(\n colorValue ? safeColorLib(colorValue) : undefined,\n );\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = e.target.value;\n setInputValue(raw);\n\n const hex = normalizeHex(raw);\n if (hex) {\n onChange?.(hex);\n setPickerColor(safeColorLib(hex));\n }\n },\n [onChange],\n );\n\n const onInputBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n const hex = normalizeHex(inputValue);\n if (hex) {\n onChange?.(hex);\n setInputValue(omitHash(hex));\n } else if (colorValue) {\n setInputValue(omitHash(colorValue));\n } else {\n setInputValue('');\n }\n onBlur?.(e);\n },\n [onChange, onBlur, inputValue, colorValue],\n );\n\n const onPickerConfirm = useCallback(\n (confirmedColor: ColorPickerProps['value']) => {\n const hex =\n typeof confirmedColor === 'string'\n ? confirmedColor\n : confirmedColor?.hex()?.toUpperCase();\n if (hex) {\n onChange?.(hex);\n setInputValue(omitHash(hex));\n setPickerColor(safeColorLib(hex));\n }\n setShowPicker(false);\n },\n [onChange],\n );\n\n const onPickerCancel = useCallback(() => {\n setPickerColor(colorValue ? safeColorLib(colorValue) : undefined);\n setShowPicker(false);\n }, [colorValue]);\n\n const onPreviewClick = useCallback(() => {\n setShowPicker((prev) => !prev);\n }, []);\n\n return (\n <Input\n {...props}\n ref={ref}\n value={inputValue}\n onChange={onInputChange}\n onBlur={onInputBlur}\n prefix={<Input.Affix>#</Input.Affix>}\n suffix={\n <Input.Affix>\n <Popover\n shown={showPicker}\n onClickOutside={() => setShowPicker(false)}\n animate\n flip\n fixed={false}\n placement=\"left-start\"\n appendTo=\"scrollParent\"\n moveBy={{ x: 6, y: 6 }}\n zIndex={5001}\n >\n <Popover.Element>\n {colorValue ? (\n <FillPreview fill={colorValue} onClick={onPreviewClick} />\n ) : (\n <FillButton onClick={onPreviewClick} />\n )}\n </Popover.Element>\n <Popover.Content>\n <ColorPicker\n value={pickerColor as ColorPickerProps['value']}\n onChange={\n ((c: ColorPickerProps['value']) =>\n setPickerColor(\n c as ColorInstance | undefined,\n )) as ColorPickerProps['onChange']\n }\n onConfirm={onPickerConfirm}\n onCancel={onPickerCancel}\n showConverter\n allowEmpty\n />\n </Popover.Content>\n </Popover>\n </Input.Affix>\n }\n />\n );\n },\n);\n\nColorInput.displayName = 'ColorInput';\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAMhE,SACEC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,KAAK,EACLC,OAAO,QACF,oBAAoB;AAC3B,OAAOC,QAAQ,MAAe,OAAO;AAIrC,MAAMC,QAAQ,GAAIC,KAAa,IAAKA,KAAK,CAACC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AAE3D,MAAMC,UAAU,GAAIF,KAAa,IAC/B,qCAAqC,CAACG,IAAI,CAACH,KAAK,CAAC;AAEnD,MAAMI,YAAY,GAAIJ,KAAa,IAAyB;EAC1D,MAAMK,OAAO,GAAGL,KAAK,CAACM,UAAU,CAAC,GAAG,CAAC,GAAGN,KAAK,GAAG,IAAIA,KAAK,EAAE;EAC3D,IAAIE,UAAU,CAACG,OAAO,CAAC,EAAE;IACvB,OAAOA,OAAO,CAACE,WAAW,CAAC,CAAC;EAC9B;EACA,OAAOC,SAAS;AAClB,CAAC;AAED,MAAMC,YAAY,GAAIT,KAAa,IAAgC;EACjE,IAAI;IACF,OAAOF,QAAQ,CAACE,KAAK,CAAC;EACxB,CAAC,CAAC,MAAM;IACN,OAAOQ,SAAS;EAClB;AACF,CAAC;AAQD,OAAO,MAAME,UAAU,gBAAGpB,UAAU,CAClC,CAAAqB,IAAA,EAAoDC,GAAG,KAAK;EAAA,IAA3D;IAAEZ,KAAK,EAAEa,UAAU;IAAEC,QAAQ;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAAL,IAAA;EAChD,MAAM,CAACM,UAAU,EAAEC,aAAa,CAAC,GAAG1B,QAAQ,CAC1CqB,UAAU,GAAGd,QAAQ,CAACc,UAAU,CAAC,GAAG,EACtC,CAAC;EACD,MAAM,CAACM,UAAU,EAAEC,aAAa,CAAC,GAAG5B,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAM,CAAC6B,WAAW,EAAEC,cAAc,CAAC,GAAG9B,QAAQ,CAC5CqB,UAAU,GAAGJ,YAAY,CAACI,UAAU,CAAC,GAAGL,SAC1C,CAAC;EAED,MAAMe,aAAa,GAAGhC,WAAW,CAC9BiC,CAAsC,IAAK;IAC1C,MAAMC,GAAG,GAAGD,CAAC,CAACE,MAAM,CAAC1B,KAAK;IAC1BkB,aAAa,CAACO,GAAG,CAAC;IAElB,MAAME,GAAG,GAAGvB,YAAY,CAACqB,GAAG,CAAC;IAC7B,IAAIE,GAAG,EAAE;MACPb,QAAQ,YAARA,QAAQ,CAAGa,GAAG,CAAC;MACfL,cAAc,CAACb,YAAY,CAACkB,GAAG,CAAC,CAAC;IACnC;EACF,CAAC,EACD,CAACb,QAAQ,CACX,CAAC;EAED,MAAMc,WAAW,GAAGrC,WAAW,CAC5BiC,CAAqC,IAAK;IACzC,MAAMG,GAAG,GAAGvB,YAAY,CAACa,UAAU,CAAC;IACpC,IAAIU,GAAG,EAAE;MACPb,QAAQ,YAARA,QAAQ,CAAGa,GAAG,CAAC;MACfT,aAAa,CAACnB,QAAQ,CAAC4B,GAAG,CAAC,CAAC;IAC9B,CAAC,MAAM,IAAId,UAAU,EAAE;MACrBK,aAAa,CAACnB,QAAQ,CAACc,UAAU,CAAC,CAAC;IACrC,CAAC,MAAM;MACLK,aAAa,CAAC,EAAE,CAAC;IACnB;IACAH,MAAM,YAANA,MAAM,CAAGS,CAAC,CAAC;EACb,CAAC,EACD,CAACV,QAAQ,EAAEC,MAAM,EAAEE,UAAU,EAAEJ,UAAU,CAC3C,CAAC;EAED,MAAMgB,eAAe,GAAGtC,WAAW,CAChCuC,cAAyC,IAAK;IAAA,IAAAC,mBAAA;IAC7C,MAAMJ,GAAG,GACP,OAAOG,cAAc,KAAK,QAAQ,GAC9BA,cAAc,GACdA,cAAc,aAAAC,mBAAA,GAAdD,cAAc,CAAEH,GAAG,CAAC,CAAC,qBAArBI,mBAAA,CAAuBxB,WAAW,CAAC,CAAC;IAC1C,IAAIoB,GAAG,EAAE;MACPb,QAAQ,YAARA,QAAQ,CAAGa,GAAG,CAAC;MACfT,aAAa,CAACnB,QAAQ,CAAC4B,GAAG,CAAC,CAAC;MAC5BL,cAAc,CAACb,YAAY,CAACkB,GAAG,CAAC,CAAC;IACnC;IACAP,aAAa,CAAC,KAAK,CAAC;EACtB,CAAC,EACD,CAACN,QAAQ,CACX,CAAC;EAED,MAAMkB,cAAc,GAAGzC,WAAW,CAAC,MAAM;IACvC+B,cAAc,CAACT,UAAU,GAAGJ,YAAY,CAACI,UAAU,CAAC,GAAGL,SAAS,CAAC;IACjEY,aAAa,CAAC,KAAK,CAAC;EACtB,CAAC,EAAE,CAACP,UAAU,CAAC,CAAC;EAEhB,MAAMoB,cAAc,GAAG1C,WAAW,CAAC,MAAM;IACvC6B,aAAa,CAAEc,IAAI,IAAK,CAACA,IAAI,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE7C,KAAA,CAAA8C,aAAA,CAACvC,KAAK,EAAAwC,QAAA,KACApB,KAAK;IACTJ,GAAG,EAAEA,GAAI;IACTZ,KAAK,EAAEiB,UAAW;IAClBH,QAAQ,EAAES,aAAc;IACxBR,MAAM,EAAEa,WAAY;IACpBS,MAAM,eAAEhD,KAAA,CAAA8C,aAAA,CAACvC,KAAK,CAAC0C,KAAK,QAAC,GAAc,CAAE;IACrCC,MAAM,eACJlD,KAAA,CAAA8C,aAAA,CAACvC,KAAK,CAAC0C,KAAK,qBACVjD,KAAA,CAAA8C,aAAA,CAACtC,OAAO;MACN2C,KAAK,EAAErB,UAAW;MAClBsB,cAAc,EAAEA,CAAA,KAAMrB,aAAa,CAAC,KAAK,CAAE;MAC3CsB,OAAO;MACPC,IAAI;MACJC,KAAK,EAAE,KAAM;MACbC,SAAS,EAAC,YAAY;MACtBC,QAAQ,EAAC,cAAc;MACvBC,MAAM,EAAE;QAAEC,CAAC,EAAE,CAAC;QAAEC,CAAC,EAAE;MAAE,CAAE;MACvBC,MAAM,EAAE;IAAK,gBAEb7D,KAAA,CAAA8C,aAAA,CAACtC,OAAO,CAACsD,OAAO,QACbtC,UAAU,gBACTxB,KAAA,CAAA8C,aAAA,CAACxC,WAAW;MAACyD,IAAI,EAAEvC,UAAW;MAACwC,OAAO,EAAEpB;IAAe,CAAE,CAAC,gBAE1D5C,KAAA,CAAA8C,aAAA,CAACzC,UAAU;MAAC2D,OAAO,EAAEpB;IAAe,CAAE,CAEzB,CAAC,eAClB5C,KAAA,CAAA8C,aAAA,CAACtC,OAAO,CAACyD,OAAO,qBACdjE,KAAA,CAAA8C,aAAA,CAAC1C,WAAW;MACVO,KAAK,EAAEqB,WAAyC;MAChDP,QAAQ,EACJyC,CAA4B,IAC5BjC,cAAc,CACZiC,CACF,CACH;MACDC,SAAS,EAAE3B,eAAgB;MAC3B4B,QAAQ,EAAEzB,cAAe;MACzB0B,aAAa;MACbC,UAAU;IAAA,CACX,CACc,CACV,CACE;EACd,EACF,CAAC;AAEN,CACF,CAAC;AAEDjD,UAAU,CAACkD,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { Box, FillPreview, Text } from '@wix/design-system';
3
+ import { classes } from './color-view.st.css.js';
4
+ const ColorPreview = _ref => {
5
+ let {
6
+ data,
7
+ children
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement(Box, {
10
+ className: classes.view,
11
+ align: "left",
12
+ verticalAlign: "middle",
13
+ direction: "horizontal",
14
+ gap: "SP1",
15
+ dataHook: "color-view"
16
+ }, /*#__PURE__*/React.createElement(FillPreview, {
17
+ className: classes.fillPreview,
18
+ aspectRatio: 1,
19
+ fill: data,
20
+ dataHook: "color-view-fill-preview"
21
+ }), children);
22
+ };
23
+ export const ColorView = props => {
24
+ return /*#__PURE__*/React.createElement(ColorPreview, props, /*#__PURE__*/React.createElement(Text, {
25
+ size: "small",
26
+ weight: "normal",
27
+ dataHook: "color-view-text"
28
+ }, props.data ?? '#'));
29
+ };
30
+ //# sourceMappingURL=color-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Box","FillPreview","Text","classes","ColorPreview","_ref","data","children","createElement","className","view","align","verticalAlign","direction","gap","dataHook","fillPreview","aspectRatio","fill","ColorView","props","size","weight"],"sources":["../../../../../src/cms-fields/components/color-view/color-view.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Box, FillPreview, Text } from '@wix/design-system';\n\nimport { classes } from './color-view.st.css.js';\n\nexport interface ColorViewProps {\n data?: string;\n children?: React.ReactNode;\n}\n\nconst ColorPreview: React.FC<ColorViewProps> = ({ data, children }) => {\n return (\n <Box\n className={classes.view}\n align=\"left\"\n verticalAlign=\"middle\"\n direction=\"horizontal\"\n gap=\"SP1\"\n dataHook=\"color-view\"\n >\n <FillPreview\n className={classes.fillPreview}\n aspectRatio={1}\n fill={data}\n dataHook=\"color-view-fill-preview\"\n />\n {children}\n </Box>\n );\n};\n\nexport const ColorView: React.FC<ColorViewProps> = (props) => {\n return (\n <ColorPreview {...props}>\n <Text size=\"small\" weight=\"normal\" dataHook=\"color-view-text\">\n {props.data ?? '#'}\n </Text>\n </ColorPreview>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,GAAG,EAAEC,WAAW,EAAEC,IAAI,QAAQ,oBAAoB;AAE3D,SAASC,OAAO,QAAQ,wBAAwB;AAOhD,MAAMC,YAAsC,GAAGC,IAAA,IAAwB;EAAA,IAAvB;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAChE,oBACEN,KAAA,CAAAS,aAAA,CAACR,GAAG;IACFS,SAAS,EAAEN,OAAO,CAACO,IAAK;IACxBC,KAAK,EAAC,MAAM;IACZC,aAAa,EAAC,QAAQ;IACtBC,SAAS,EAAC,YAAY;IACtBC,GAAG,EAAC,KAAK;IACTC,QAAQ,EAAC;EAAY,gBAErBhB,KAAA,CAAAS,aAAA,CAACP,WAAW;IACVQ,SAAS,EAAEN,OAAO,CAACa,WAAY;IAC/BC,WAAW,EAAE,CAAE;IACfC,IAAI,EAAEZ,IAAK;IACXS,QAAQ,EAAC;EAAyB,CACnC,CAAC,EACDR,QACE,CAAC;AAEV,CAAC;AAED,OAAO,MAAMY,SAAmC,GAAIC,KAAK,IAAK;EAC5D,oBACErB,KAAA,CAAAS,aAAA,CAACJ,YAAY,EAAKgB,KAAK,eACrBrB,KAAA,CAAAS,aAAA,CAACN,IAAI;IAACmB,IAAI,EAAC,OAAO;IAACC,MAAM,EAAC,QAAQ;IAACP,QAAQ,EAAC;EAAiB,GAC1DK,KAAK,CAACd,IAAI,IAAI,GACX,CACM,CAAC;AAEnB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ .view {
2
+ width: 100%;
3
+ }
4
+
5
+ .fillPreview {
6
+ flex-shrink: 0;
7
+ }
8
+
9
+ .view .fillPreview {
10
+ width: 18px;
11
+ height: 18px;
12
+ min-width: 18px !important;
13
+ min-height: 18px !important;
14
+ }
@@ -0,0 +1,20 @@
1
+ // @ts-nocheck
2
+
3
+ import { classesRuntime, statesRuntime } from "../../../stylable-esm-runtime.js";
4
+ var _namespace_ = "colorview609827872";
5
+ var _style_ = classesRuntime.bind(null, _namespace_);
6
+ export var cssStates = statesRuntime.bind(null, _namespace_);
7
+ export var style = _style_;
8
+ export var st = _style_;
9
+ export var namespace = _namespace_;
10
+ export var classes = {
11
+ "root": "colorview609827872__root",
12
+ "view": "colorview609827872__view",
13
+ "fillPreview": "colorview609827872__fillPreview"
14
+ };
15
+ export var keyframes = {};
16
+ export var layers = {};
17
+ export var containers = {};
18
+ export var stVars = {};
19
+ export var vars = {};
20
+ //# sourceMappingURL=color-view.st.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["classesRuntime","statesRuntime","_namespace_","_style_","bind","cssStates","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../src/cms-fields/components/color-view/color-view.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"colorview609827872\";\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\":\"colorview609827872__root\",\"view\":\"colorview609827872__view\",\"fillPreview\":\"colorview609827872__fillPreview\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":"AAAA;;AAGA,SAASA,cAAc,EAAEC,aAAa,QAAQ,kCAAkC;AAIhF,IAAIC,WAAW,GAAG,oBAAoB;AACtC,IAAIC,OAAO,GAAGH,cAAc,CAACI,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAEpD,OAAO,IAAIG,SAAS,GAAGJ,aAAa,CAACG,IAAI,CAAC,IAAI,EAAEF,WAAW,CAAC;AAC5D,OAAO,IAAII,KAA6C,GAAGH,OAAO;AAClE,OAAO,IAAII,EAA0C,GAAGJ,OAAO;AAE/D,OAAO,IAAIK,SAAS,GAAGN,WAAW;AAClC,OAAO,IAAIO,OAAO,GAAG;EAAC,MAAM,EAAC,0BAA0B;EAAC,MAAM,EAAC,0BAA0B;EAAC,aAAa,EAAC;AAAiC,CAAC;AAC1I,OAAO,IAAIC,SAAS,GAAG,CAAC,CAAC;AACzB,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,UAAU,GAAG,CAAC,CAAC;AAC1B,OAAO,IAAIC,MAAM,GAAG,CAAC,CAAC;AACtB,OAAO,IAAIC,IAAI,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import { FillPreviewUniDriver } from '@wix/design-system/dist/testkit/unidriver';
2
+ import { baseUniDriverFactory } from '../../../components/AutoPatternsApp/AutoPatternsApp.uni.driver';
3
+ export function ColorViewUniDriver(base, body) {
4
+ const root = base.$('[data-hook="color-view"]');
5
+ return {
6
+ ...baseUniDriverFactory(root),
7
+ getFillPreview: () => FillPreviewUniDriver(root.$('[data-hook="color-view-fill-preview"]'), body),
8
+ getText: () => root.$('[data-hook="color-view-text"]').text()
9
+ };
10
+ }
11
+ //# sourceMappingURL=color-view.uni.driver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FillPreviewUniDriver","baseUniDriverFactory","ColorViewUniDriver","base","body","root","$","getFillPreview","getText","text"],"sources":["../../../../../src/cms-fields/components/color-view/color-view.uni.driver.ts"],"sourcesContent":["import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';\nimport { FillPreviewUniDriver } from '@wix/design-system/dist/testkit/unidriver';\nimport { baseUniDriverFactory } from '../../../components/AutoPatternsApp/AutoPatternsApp.uni.driver';\n\nexport function ColorViewUniDriver(base: UniDriver, body: UniDriver) {\n const root = base.$('[data-hook=\"color-view\"]');\n\n return {\n ...baseUniDriverFactory(root),\n getFillPreview: () =>\n FillPreviewUniDriver(\n root.$('[data-hook=\"color-view-fill-preview\"]'),\n body,\n ),\n getText: () => root.$('[data-hook=\"color-view-text\"]').text(),\n };\n}\n"],"mappings":"AACA,SAASA,oBAAoB,QAAQ,2CAA2C;AAChF,SAASC,oBAAoB,QAAQ,gEAAgE;AAErG,OAAO,SAASC,kBAAkBA,CAACC,IAAe,EAAEC,IAAe,EAAE;EACnE,MAAMC,IAAI,GAAGF,IAAI,CAACG,CAAC,CAAC,0BAA0B,CAAC;EAE/C,OAAO;IACL,GAAGL,oBAAoB,CAACI,IAAI,CAAC;IAC7BE,cAAc,EAAEA,CAAA,KACdP,oBAAoB,CAClBK,IAAI,CAACC,CAAC,CAAC,uCAAuC,CAAC,EAC/CF,IACF,CAAC;IACHI,OAAO,EAAEA,CAAA,KAAMH,IAAI,CAACC,CAAC,CAAC,+BAA+B,CAAC,CAACG,IAAI,CAAC;EAC9D,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ import React, { useRef, useImperativeHandle } from 'react';
2
+ import { ColorInput } from './color-input';
3
+ import { useAutoFocus } from '../../hooks';
4
+ export const FormColorInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
5
+ let {
6
+ data,
7
+ onChange,
8
+ autoFocus,
9
+ readOnly,
10
+ dataHook
11
+ } = _ref;
12
+ const inputRef = useRef(null);
13
+ useAutoFocus(inputRef, autoFocus);
14
+ useImperativeHandle(ref, () => inputRef.current);
15
+ return /*#__PURE__*/React.createElement(ColorInput, {
16
+ dataHook: dataHook,
17
+ ref: inputRef,
18
+ value: data,
19
+ onChange: onChange,
20
+ readOnly: readOnly
21
+ });
22
+ });
23
+ FormColorInput.displayName = 'FormColorInput';
24
+ //# sourceMappingURL=form-color-input.js.map