@wix/auto-patterns 1.3.0 → 1.5.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 (311) hide show
  1. package/dist/cjs/collectionData/CollectionData.js +4 -0
  2. package/dist/cjs/collectionData/CollectionData.js.map +1 -0
  3. package/dist/cjs/collectionData/CollectionDataFactory.js +12 -0
  4. package/dist/cjs/collectionData/CollectionDataFactory.js.map +1 -0
  5. package/dist/cjs/collectionData/SchemaFactory.js +12 -0
  6. package/dist/cjs/collectionData/SchemaFactory.js.map +1 -0
  7. package/dist/cjs/{config/cms/CmsCompositeConfig.js → collectionData/cms/CmsCollectionData.js} +27 -10
  8. package/dist/cjs/collectionData/cms/CmsCollectionData.js.map +1 -0
  9. package/dist/cjs/{config → collectionData}/cms/filterUtils.js +24 -10
  10. package/dist/cjs/collectionData/cms/filterUtils.js.map +1 -0
  11. package/dist/cjs/collectionData/cms/sortUtils.js.map +1 -0
  12. package/dist/cjs/collectionData/constants.js +13 -0
  13. package/dist/cjs/collectionData/constants.js.map +1 -0
  14. package/dist/cjs/collectionData/index.js +10 -0
  15. package/dist/cjs/collectionData/index.js.map +1 -0
  16. package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js +47 -0
  17. package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -0
  18. package/dist/cjs/components/AutoPatternsApp/index.js +10 -0
  19. package/dist/cjs/components/AutoPatternsApp/index.js.map +1 -0
  20. package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +22 -33
  21. package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
  22. package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +33 -143
  23. package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
  24. package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +164 -0
  25. package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -0
  26. package/dist/cjs/components/AutoPatternsEntityPage/Fields/Checkbox.js +33 -0
  27. package/dist/cjs/components/AutoPatternsEntityPage/Fields/Checkbox.js.map +1 -0
  28. package/dist/cjs/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +50 -0
  29. package/dist/cjs/components/AutoPatternsEntityPage/Fields/FormFieldInput.js.map +1 -0
  30. package/dist/cjs/components/AutoPatternsEntityPage/Fields/ShortText.js +60 -0
  31. package/dist/cjs/components/AutoPatternsEntityPage/Fields/ShortText.js.map +1 -0
  32. package/dist/cjs/components/AutoPatternsEntityPage/index.js +10 -0
  33. package/dist/cjs/components/AutoPatternsEntityPage/index.js.map +1 -0
  34. package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js +35 -0
  35. package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -0
  36. package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGridContent.js +44 -0
  37. package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGridContent.js.map +1 -0
  38. package/dist/cjs/components/AutoPatternsGrid/index.js +10 -0
  39. package/dist/cjs/components/AutoPatternsGrid/index.js.map +1 -0
  40. package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js +61 -0
  41. package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js.map +1 -0
  42. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js +35 -0
  43. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -0
  44. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTableContent.js +55 -0
  45. package/dist/cjs/components/AutoPatternsTable/AutoPatternsTableContent.js.map +1 -0
  46. package/dist/cjs/components/AutoPatternsTable/index.js +10 -0
  47. package/dist/cjs/components/AutoPatternsTable/index.js.map +1 -0
  48. package/dist/cjs/exports/react.js +7 -0
  49. package/dist/cjs/exports/react.js.map +1 -1
  50. package/dist/cjs/hooks/index.js +16 -4
  51. package/dist/cjs/hooks/index.js.map +1 -1
  52. package/dist/cjs/hooks/useColumns.js +2 -5
  53. package/dist/cjs/hooks/useColumns.js.map +1 -1
  54. package/dist/cjs/hooks/useCommonCollectionFeatures.js +109 -0
  55. package/dist/cjs/hooks/useCommonCollectionFeatures.js.map +1 -0
  56. package/dist/cjs/hooks/useEmptyStates.js +2 -7
  57. package/dist/cjs/hooks/useEmptyStates.js.map +1 -1
  58. package/dist/cjs/hooks/useFetchData.js +7 -8
  59. package/dist/cjs/hooks/useFetchData.js.map +1 -1
  60. package/dist/cjs/hooks/useFilters.js +72 -76
  61. package/dist/cjs/hooks/useFilters.js.map +1 -1
  62. package/dist/cjs/hooks/useGridFeatures.js +77 -0
  63. package/dist/cjs/hooks/useGridFeatures.js.map +1 -0
  64. package/dist/cjs/hooks/useTableFeatures.js +69 -0
  65. package/dist/cjs/hooks/useTableFeatures.js.map +1 -0
  66. package/dist/cjs/providers/CollectionDataContext.js +44 -0
  67. package/dist/cjs/providers/CollectionDataContext.js.map +1 -0
  68. package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
  69. package/dist/cjs/providers/{ConfigContext.js → SchemaContext.js} +21 -20
  70. package/dist/cjs/providers/SchemaContext.js.map +1 -0
  71. package/dist/cjs/providers/index.js +4 -4
  72. package/dist/cjs/providers/index.js.map +1 -1
  73. package/dist/cjs/react.js +4 -4
  74. package/dist/cjs/react.js.map +1 -1
  75. package/dist/cjs/{types.js → types/CollectionPageConfig.js} +3 -9
  76. package/dist/cjs/types/CollectionPageConfig.js.map +1 -0
  77. package/dist/cjs/types/EntityPageConfig.js +4 -0
  78. package/dist/cjs/types/EntityPageConfig.js.map +1 -0
  79. package/dist/cjs/types/index.js +22 -0
  80. package/dist/cjs/types/index.js.map +1 -0
  81. package/dist/cjs/types/types.js +4 -0
  82. package/dist/cjs/types/types.js.map +1 -0
  83. package/dist/cjs/utils/filters.js +53 -0
  84. package/dist/cjs/utils/filters.js.map +1 -0
  85. package/dist/esm/collectionData/CollectionData.js +2 -0
  86. package/dist/esm/collectionData/CollectionData.js.map +1 -0
  87. package/dist/esm/collectionData/CollectionDataFactory.js +8 -0
  88. package/dist/esm/collectionData/CollectionDataFactory.js.map +1 -0
  89. package/dist/esm/collectionData/SchemaFactory.js +8 -0
  90. package/dist/esm/collectionData/SchemaFactory.js.map +1 -0
  91. package/dist/esm/{config/cms/CmsCompositeConfig.js → collectionData/cms/CmsCollectionData.js} +26 -9
  92. package/dist/esm/collectionData/cms/CmsCollectionData.js.map +1 -0
  93. package/dist/esm/{config → collectionData}/cms/filterUtils.js +25 -11
  94. package/dist/esm/collectionData/cms/filterUtils.js.map +1 -0
  95. package/dist/esm/collectionData/cms/sortUtils.js.map +1 -0
  96. package/dist/esm/collectionData/constants.js +9 -0
  97. package/dist/esm/collectionData/constants.js.map +1 -0
  98. package/dist/esm/collectionData/index.js +2 -0
  99. package/dist/esm/collectionData/index.js.map +1 -0
  100. package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js +22 -0
  101. package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -0
  102. package/dist/esm/components/AutoPatternsApp/index.js +2 -0
  103. package/dist/esm/components/AutoPatternsApp/index.js.map +1 -0
  104. package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +11 -13
  105. package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
  106. package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +31 -110
  107. package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
  108. package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +82 -0
  109. package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -0
  110. package/dist/esm/components/AutoPatternsEntityPage/Fields/Checkbox.js +19 -0
  111. package/dist/esm/components/AutoPatternsEntityPage/Fields/Checkbox.js.map +1 -0
  112. package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +37 -0
  113. package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js.map +1 -0
  114. package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js +40 -0
  115. package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js.map +1 -0
  116. package/dist/esm/components/AutoPatternsEntityPage/index.js +2 -0
  117. package/dist/esm/components/AutoPatternsEntityPage/index.js.map +1 -0
  118. package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js +16 -0
  119. package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -0
  120. package/dist/esm/components/AutoPatternsGrid/AutoPatternsGridContent.js +32 -0
  121. package/dist/esm/components/AutoPatternsGrid/AutoPatternsGridContent.js.map +1 -0
  122. package/dist/esm/components/AutoPatternsGrid/index.js +2 -0
  123. package/dist/esm/components/AutoPatternsGrid/index.js.map +1 -0
  124. package/dist/esm/components/AutoPatternsRoute/AutoPatternsPage.js +37 -0
  125. package/dist/esm/components/AutoPatternsRoute/AutoPatternsPage.js.map +1 -0
  126. package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js +16 -0
  127. package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -0
  128. package/dist/esm/components/AutoPatternsTable/AutoPatternsTableContent.js +43 -0
  129. package/dist/esm/components/AutoPatternsTable/AutoPatternsTableContent.js.map +1 -0
  130. package/dist/esm/components/AutoPatternsTable/index.js +2 -0
  131. package/dist/esm/components/AutoPatternsTable/index.js.map +1 -0
  132. package/dist/esm/exports/react.js +1 -0
  133. package/dist/esm/exports/react.js.map +1 -1
  134. package/dist/esm/hooks/index.js +3 -1
  135. package/dist/esm/hooks/index.js.map +1 -1
  136. package/dist/esm/hooks/useColumns.js +3 -6
  137. package/dist/esm/hooks/useColumns.js.map +1 -1
  138. package/dist/esm/hooks/useCommonCollectionFeatures.js +72 -0
  139. package/dist/esm/hooks/useCommonCollectionFeatures.js.map +1 -0
  140. package/dist/esm/hooks/useEmptyStates.js +2 -7
  141. package/dist/esm/hooks/useEmptyStates.js.map +1 -1
  142. package/dist/esm/hooks/useFetchData.js +8 -9
  143. package/dist/esm/hooks/useFetchData.js.map +1 -1
  144. package/dist/esm/hooks/useFilters.js +63 -75
  145. package/dist/esm/hooks/useFilters.js.map +1 -1
  146. package/dist/esm/hooks/useGridFeatures.js +75 -0
  147. package/dist/esm/hooks/useGridFeatures.js.map +1 -0
  148. package/dist/esm/hooks/useTableFeatures.js +58 -0
  149. package/dist/esm/hooks/useTableFeatures.js.map +1 -0
  150. package/dist/esm/providers/CollectionDataContext.js +30 -0
  151. package/dist/esm/providers/CollectionDataContext.js.map +1 -0
  152. package/dist/esm/providers/PatternsWizardOverridesContext.js +1 -1
  153. package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
  154. package/dist/esm/providers/SchemaContext.js +30 -0
  155. package/dist/esm/providers/SchemaContext.js.map +1 -0
  156. package/dist/esm/providers/index.js +1 -1
  157. package/dist/esm/providers/index.js.map +1 -1
  158. package/dist/esm/react.js +1 -1
  159. package/dist/esm/react.js.map +1 -1
  160. package/dist/esm/{types.js → types/CollectionPageConfig.js} +1 -9
  161. package/dist/esm/types/CollectionPageConfig.js.map +1 -0
  162. package/dist/esm/types/EntityPageConfig.js +2 -0
  163. package/dist/esm/types/EntityPageConfig.js.map +1 -0
  164. package/dist/esm/types/index.js +4 -0
  165. package/dist/esm/types/index.js.map +1 -0
  166. package/dist/esm/types/types.js +2 -0
  167. package/dist/esm/types/types.js.map +1 -0
  168. package/dist/esm/utils/filters.js +49 -0
  169. package/dist/esm/utils/filters.js.map +1 -0
  170. package/dist/types/collectionData/CollectionData.d.ts +9 -0
  171. package/dist/types/collectionData/CollectionData.d.ts.map +1 -0
  172. package/dist/types/collectionData/CollectionDataFactory.d.ts +4 -0
  173. package/dist/types/collectionData/CollectionDataFactory.d.ts.map +1 -0
  174. package/dist/types/collectionData/SchemaFactory.d.ts +3 -0
  175. package/dist/types/collectionData/SchemaFactory.d.ts.map +1 -0
  176. package/dist/types/collectionData/cms/CmsCollectionData.d.ts +8 -0
  177. package/dist/types/collectionData/cms/CmsCollectionData.d.ts.map +1 -0
  178. package/dist/types/{config → collectionData}/cms/filterUtils.d.ts +3 -3
  179. package/dist/types/collectionData/cms/filterUtils.d.ts.map +1 -0
  180. package/dist/types/collectionData/cms/sortUtils.d.ts.map +1 -0
  181. package/dist/types/{config → collectionData}/constants.d.ts +4 -0
  182. package/dist/types/collectionData/constants.d.ts.map +1 -0
  183. package/dist/types/collectionData/index.d.ts +2 -0
  184. package/dist/types/collectionData/index.d.ts.map +1 -0
  185. package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts +7 -0
  186. package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts.map +1 -0
  187. package/dist/types/components/AutoPatternsApp/index.d.ts +2 -0
  188. package/dist/types/components/AutoPatternsApp/index.d.ts.map +1 -0
  189. package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts +2 -2
  190. package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
  191. package/dist/types/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.d.ts +5 -1
  192. package/dist/types/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.d.ts.map +1 -1
  193. package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts +7 -0
  194. package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts.map +1 -0
  195. package/dist/types/components/AutoPatternsEntityPage/Fields/Checkbox.d.ts +6 -0
  196. package/dist/types/components/AutoPatternsEntityPage/Fields/Checkbox.d.ts.map +1 -0
  197. package/dist/types/components/AutoPatternsEntityPage/Fields/FormFieldInput.d.ts +14 -0
  198. package/dist/types/components/AutoPatternsEntityPage/Fields/FormFieldInput.d.ts.map +1 -0
  199. package/dist/types/components/AutoPatternsEntityPage/Fields/ShortText.d.ts +13 -0
  200. package/dist/types/components/AutoPatternsEntityPage/Fields/ShortText.d.ts.map +1 -0
  201. package/dist/types/components/AutoPatternsEntityPage/index.d.ts +2 -0
  202. package/dist/types/components/AutoPatternsEntityPage/index.d.ts.map +1 -0
  203. package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts +7 -0
  204. package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts.map +1 -0
  205. package/dist/types/components/AutoPatternsGrid/AutoPatternsGridContent.d.ts +7 -0
  206. package/dist/types/components/AutoPatternsGrid/AutoPatternsGridContent.d.ts.map +1 -0
  207. package/dist/types/components/AutoPatternsGrid/index.d.ts +2 -0
  208. package/dist/types/components/AutoPatternsGrid/index.d.ts.map +1 -0
  209. package/dist/types/components/AutoPatternsRoute/AutoPatternsPage.d.ts +7 -0
  210. package/dist/types/components/AutoPatternsRoute/AutoPatternsPage.d.ts.map +1 -0
  211. package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts +7 -0
  212. package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts.map +1 -0
  213. package/dist/types/components/AutoPatternsTable/AutoPatternsTableContent.d.ts +7 -0
  214. package/dist/types/components/AutoPatternsTable/AutoPatternsTableContent.d.ts.map +1 -0
  215. package/dist/types/components/AutoPatternsTable/index.d.ts +2 -0
  216. package/dist/types/components/AutoPatternsTable/index.d.ts.map +1 -0
  217. package/dist/types/exports/react.d.ts +1 -0
  218. package/dist/types/exports/react.d.ts.map +1 -1
  219. package/dist/types/hooks/index.d.ts +3 -1
  220. package/dist/types/hooks/index.d.ts.map +1 -1
  221. package/dist/types/hooks/useColumns.d.ts +2 -1
  222. package/dist/types/hooks/useColumns.d.ts.map +1 -1
  223. package/dist/types/hooks/useCommonCollectionFeatures.d.ts +15 -0
  224. package/dist/types/hooks/useCommonCollectionFeatures.d.ts.map +1 -0
  225. package/dist/types/hooks/useEmptyStates.d.ts +2 -1
  226. package/dist/types/hooks/useEmptyStates.d.ts.map +1 -1
  227. package/dist/types/hooks/useFetchData.d.ts +2 -1
  228. package/dist/types/hooks/useFetchData.d.ts.map +1 -1
  229. package/dist/types/hooks/useFilters.d.ts +7 -2
  230. package/dist/types/hooks/useFilters.d.ts.map +1 -1
  231. package/dist/types/hooks/useGridFeatures.d.ts +25 -0
  232. package/dist/types/hooks/useGridFeatures.d.ts.map +1 -0
  233. package/dist/types/hooks/useTableFeatures.d.ts +19 -0
  234. package/dist/types/hooks/useTableFeatures.d.ts.map +1 -0
  235. package/dist/types/providers/CollectionDataContext.d.ts +12 -0
  236. package/dist/types/providers/CollectionDataContext.d.ts.map +1 -0
  237. package/dist/types/providers/PatternsWizardOverridesContext.d.ts +2 -2
  238. package/dist/types/providers/SchemaContext.d.ts +11 -0
  239. package/dist/types/providers/SchemaContext.d.ts.map +1 -0
  240. package/dist/types/providers/index.d.ts +1 -1
  241. package/dist/types/providers/index.d.ts.map +1 -1
  242. package/dist/types/react.d.ts +1 -1
  243. package/dist/types/react.d.ts.map +1 -1
  244. package/dist/types/types/CollectionPageConfig.d.ts +166 -0
  245. package/dist/types/types/CollectionPageConfig.d.ts.map +1 -0
  246. package/dist/types/types/EntityPageConfig.d.ts +17 -0
  247. package/dist/types/types/EntityPageConfig.d.ts.map +1 -0
  248. package/dist/types/types/index.d.ts +4 -0
  249. package/dist/types/types/index.d.ts.map +1 -0
  250. package/dist/types/types/types.d.ts +49 -0
  251. package/dist/types/types/types.d.ts.map +1 -0
  252. package/dist/types/utils/filters.d.ts +7 -0
  253. package/dist/types/utils/filters.d.ts.map +1 -0
  254. package/package.json +24 -23
  255. package/dist/cjs/config/CompositeConfig.js +0 -4
  256. package/dist/cjs/config/CompositeConfig.js.map +0 -1
  257. package/dist/cjs/config/ConfigFactory.js +0 -12
  258. package/dist/cjs/config/ConfigFactory.js.map +0 -1
  259. package/dist/cjs/config/cms/CmsCompositeConfig.js.map +0 -1
  260. package/dist/cjs/config/cms/filterUtils.js.map +0 -1
  261. package/dist/cjs/config/cms/sortUtils.js.map +0 -1
  262. package/dist/cjs/config/constants.js +0 -9
  263. package/dist/cjs/config/constants.js.map +0 -1
  264. package/dist/cjs/config/index.js +0 -10
  265. package/dist/cjs/config/index.js.map +0 -1
  266. package/dist/cjs/hooks/useFeatures.js +0 -50
  267. package/dist/cjs/hooks/useFeatures.js.map +0 -1
  268. package/dist/cjs/hooks/useTableProps.js +0 -34
  269. package/dist/cjs/hooks/useTableProps.js.map +0 -1
  270. package/dist/cjs/providers/ConfigContext.js.map +0 -1
  271. package/dist/cjs/types.js.map +0 -1
  272. package/dist/esm/config/CompositeConfig.js +0 -2
  273. package/dist/esm/config/CompositeConfig.js.map +0 -1
  274. package/dist/esm/config/ConfigFactory.js +0 -8
  275. package/dist/esm/config/ConfigFactory.js.map +0 -1
  276. package/dist/esm/config/cms/CmsCompositeConfig.js.map +0 -1
  277. package/dist/esm/config/cms/filterUtils.js.map +0 -1
  278. package/dist/esm/config/cms/sortUtils.js.map +0 -1
  279. package/dist/esm/config/constants.js +0 -5
  280. package/dist/esm/config/constants.js.map +0 -1
  281. package/dist/esm/config/index.js +0 -2
  282. package/dist/esm/config/index.js.map +0 -1
  283. package/dist/esm/hooks/useFeatures.js +0 -22
  284. package/dist/esm/hooks/useFeatures.js.map +0 -1
  285. package/dist/esm/hooks/useTableProps.js +0 -29
  286. package/dist/esm/hooks/useTableProps.js.map +0 -1
  287. package/dist/esm/providers/ConfigContext.js +0 -29
  288. package/dist/esm/providers/ConfigContext.js.map +0 -1
  289. package/dist/esm/types.js.map +0 -1
  290. package/dist/types/config/CompositeConfig.d.ts +0 -8
  291. package/dist/types/config/CompositeConfig.d.ts.map +0 -1
  292. package/dist/types/config/ConfigFactory.d.ts +0 -4
  293. package/dist/types/config/ConfigFactory.d.ts.map +0 -1
  294. package/dist/types/config/cms/CmsCompositeConfig.d.ts +0 -7
  295. package/dist/types/config/cms/CmsCompositeConfig.d.ts.map +0 -1
  296. package/dist/types/config/cms/filterUtils.d.ts.map +0 -1
  297. package/dist/types/config/cms/sortUtils.d.ts.map +0 -1
  298. package/dist/types/config/constants.d.ts.map +0 -1
  299. package/dist/types/config/index.d.ts +0 -2
  300. package/dist/types/config/index.d.ts.map +0 -1
  301. package/dist/types/hooks/useFeatures.d.ts +0 -8
  302. package/dist/types/hooks/useFeatures.d.ts.map +0 -1
  303. package/dist/types/hooks/useTableProps.d.ts +0 -13
  304. package/dist/types/hooks/useTableProps.d.ts.map +0 -1
  305. package/dist/types/providers/ConfigContext.d.ts +0 -11
  306. package/dist/types/providers/ConfigContext.d.ts.map +0 -1
  307. package/dist/types/types.d.ts +0 -215
  308. package/dist/types/types.d.ts.map +0 -1
  309. /package/dist/cjs/{config → collectionData}/cms/sortUtils.js +0 -0
  310. /package/dist/esm/{config → collectionData}/cms/sortUtils.js +0 -0
  311. /package/dist/types/{config → collectionData}/cms/sortUtils.d.ts +0 -0
@@ -1,115 +1,36 @@
1
1
  import React from 'react';
2
- import { CollectionToolbarFilters, Table, ToolbarTitle, useTableCollection } from '@wix/patterns';
3
- import { useTableProps } from '../../hooks';
4
- import { usePatternsWizardOverridesContext, useConfig } from '../../providers';
5
- import { Edit } from '@wix/wix-ui-icons-common';
6
- import { Box, Text, TextButton } from '@wix/design-system';
7
- export const AutoPatternsCollectionPageContent = () => {
8
- var _toolbarTitle$subtitl, _toolbarTitle$subtitl2, _toolbarTitle$subtitl3, _toolbarTitle$subtitl4, _toolbarTitle$subtitl5, _toolbarTitle$subtitl6, _toolbarTitle$subtitl7;
9
- const config = useConfig();
2
+ import { AutoPatternsTable } from '../AutoPatternsTable';
3
+ import { AutoPatternsGrid } from '../AutoPatternsGrid';
4
+ export const AutoPatternsCollectionPageContent = _ref => {
5
+ let {
6
+ configuration
7
+ } = _ref;
10
8
  const {
11
- page: {
12
- pageTitle,
13
- collectionId,
14
- entityId,
15
- entityName,
16
- actions: secondaryActions = [],
17
- search,
18
- toolbarTitle,
19
- limit,
20
- persistQueryToUrl,
21
- disableAutoSelectAllCount,
22
- selectionConsistencyMode
23
- }
24
- } = config;
25
- const context = usePatternsWizardOverridesContext();
26
- const {
27
- columns,
28
- views,
29
- dataExtension,
30
- customColumns,
31
- filters: {
32
- filters,
33
- components,
34
- collectionToolbarFiltersProps
35
- },
36
- emptyState,
37
- fetchData
38
- } = useTableProps();
39
- const tableState = useTableCollection({
40
- queryName: `${collectionId}-${pageTitle.text}`,
41
- itemKey: item => item[`${entityId}`],
42
- itemName: item => item[`${entityName}`],
43
- filters,
44
- toExtendedFields: item => item.extendedFields,
45
- fetchErrorMessage: _ref => {
46
- let {
47
- err
48
- } = _ref;
49
- return String(err);
50
- },
51
- fetchData,
52
- limit,
53
- persistQueryToUrl,
54
- disableAutoSelectAllCount,
55
- selectionConsistencyMode
56
- });
57
- const secondaryActionComponents = React.useMemo(() => {
58
- if (secondaryActions.length === 0) {
59
- return undefined;
60
- }
61
- return secondaryActions.map(action => item => ({
62
- icon: /*#__PURE__*/React.createElement(Edit, null),
63
- text: action.text,
64
- onClick: () => {
65
- var _context$actions, _context$actions$acti;
66
- context == null || (_context$actions = context.actions) == null || (_context$actions$acti = _context$actions[action.id]) == null || _context$actions$acti.call(_context$actions, {
67
- item
68
- });
69
- }
70
- }));
71
- }, [secondaryActions, context == null ? void 0 : context.actions]);
72
- return /*#__PURE__*/React.createElement(Table, {
73
- search: (search == null ? void 0 : search.shown) !== false,
74
- title: toolbarTitle && /*#__PURE__*/React.createElement(ToolbarTitle, {
75
- title: toolbarTitle.title,
76
- subtitle: {
77
- text: ((_toolbarTitle$subtitl = toolbarTitle.subtitle) == null ? void 0 : _toolbarTitle$subtitl.text) ?? '',
78
- learnMore: (_toolbarTitle$subtitl2 = toolbarTitle.subtitle) == null ? void 0 : _toolbarTitle$subtitl2.learnMore,
79
- info: ((_toolbarTitle$subtitl3 = toolbarTitle.subtitle) == null ? void 0 : _toolbarTitle$subtitl3.info) && {
80
- content: /*#__PURE__*/React.createElement(Box, {
81
- direction: "vertical",
82
- gap: "6px"
83
- }, /*#__PURE__*/React.createElement(Text, {
84
- dataHook: "toolbar-title-subtitle-info-content",
85
- light: true,
86
- size: "small"
87
- }, (_toolbarTitle$subtitl4 = toolbarTitle.subtitle) == null || (_toolbarTitle$subtitl4 = _toolbarTitle$subtitl4.info) == null ? void 0 : _toolbarTitle$subtitl4.content.text), ((_toolbarTitle$subtitl5 = toolbarTitle.subtitle) == null || (_toolbarTitle$subtitl5 = _toolbarTitle$subtitl5.info) == null ? void 0 : _toolbarTitle$subtitl5.content.link) && /*#__PURE__*/React.createElement(TextButton, {
88
- dataHook: "toolbar-title-subtitle-info-link",
89
- size: "small",
90
- underline: "always",
91
- skin: "light",
92
- as: "a",
93
- rel: "noopener",
94
- target: "_blank",
95
- href: (_toolbarTitle$subtitl6 = toolbarTitle.subtitle) == null || (_toolbarTitle$subtitl6 = _toolbarTitle$subtitl6.info) == null ? void 0 : _toolbarTitle$subtitl6.content.link.url
96
- }, (_toolbarTitle$subtitl7 = toolbarTitle.subtitle) == null || (_toolbarTitle$subtitl7 = _toolbarTitle$subtitl7.info) == null ? void 0 : _toolbarTitle$subtitl7.content.link.label))
9
+ components
10
+ } = configuration;
11
+ return /*#__PURE__*/React.createElement(React.Fragment, null, components.map(component => {
12
+ const {
13
+ type
14
+ } = component;
15
+ switch (type) {
16
+ case 'Table':
17
+ if (component.table) {
18
+ return /*#__PURE__*/React.createElement(AutoPatternsTable, {
19
+ key: component.table.collection.collectionId,
20
+ configuration: component.table
21
+ });
97
22
  }
98
- },
99
- itemsLimit: toolbarTitle.itemsLimit,
100
- showTotal: toolbarTitle.showTotal
101
- }),
102
- dataHook: "auto-patterns-table",
103
- state: tableState,
104
- columns: columns,
105
- views: views,
106
- dataExtension: dataExtension,
107
- customColumns: customColumns,
108
- actionCell: item => ({
109
- secondaryActions: secondaryActionComponents == null ? void 0 : secondaryActionComponents.map(action => action(item))
110
- }),
111
- filters: components.length > 0 ? /*#__PURE__*/React.createElement(CollectionToolbarFilters, collectionToolbarFiltersProps, components) : undefined,
112
- emptyState: emptyState
113
- });
23
+ return null;
24
+ case 'Grid':
25
+ if (component.grid) {
26
+ return /*#__PURE__*/React.createElement(AutoPatternsGrid, {
27
+ configuration: component.grid
28
+ });
29
+ }
30
+ return null;
31
+ default:
32
+ return null;
33
+ }
34
+ }));
114
35
  };
115
36
  //# sourceMappingURL=AutoPatternsCollectionPageContent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","CollectionToolbarFilters","Table","ToolbarTitle","useTableCollection","useTableProps","usePatternsWizardOverridesContext","useConfig","Edit","Box","Text","TextButton","AutoPatternsCollectionPageContent","_toolbarTitle$subtitl","_toolbarTitle$subtitl2","_toolbarTitle$subtitl3","_toolbarTitle$subtitl4","_toolbarTitle$subtitl5","_toolbarTitle$subtitl6","_toolbarTitle$subtitl7","config","page","pageTitle","collectionId","entityId","entityName","actions","secondaryActions","search","toolbarTitle","limit","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","context","columns","views","dataExtension","customColumns","filters","components","collectionToolbarFiltersProps","emptyState","fetchData","tableState","queryName","text","itemKey","item","itemName","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","secondaryActionComponents","useMemo","length","undefined","map","action","icon","createElement","onClick","_context$actions","_context$actions$acti","id","call","shown","title","subtitle","learnMore","info","content","direction","gap","dataHook","light","size","link","underline","skin","as","rel","target","href","url","label","itemsLimit","showTotal","state","actionCell"],"sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"sourcesContent":["import React from 'react';\nimport {\n CollectionToolbarFilters,\n Table,\n ToolbarTitle,\n useTableCollection,\n} from '@wix/patterns';\nimport { useTableProps } from '../../hooks';\nimport { usePatternsWizardOverridesContext, useConfig } from '../../providers';\nimport { Edit } from '@wix/wix-ui-icons-common';\nimport { Box, Text, TextButton } from '@wix/design-system';\n\nexport const AutoPatternsCollectionPageContent: React.FC = () => {\n const config = useConfig();\n\n const {\n page: {\n pageTitle,\n collectionId,\n entityId,\n entityName,\n actions: secondaryActions = [],\n search,\n toolbarTitle,\n limit,\n persistQueryToUrl,\n disableAutoSelectAllCount,\n selectionConsistencyMode,\n },\n } = config;\n const context = usePatternsWizardOverridesContext();\n\n const {\n columns,\n views,\n dataExtension,\n customColumns,\n filters: { filters, components, collectionToolbarFiltersProps },\n emptyState,\n fetchData,\n } = useTableProps();\n\n const tableState = useTableCollection<any>({\n queryName: `${collectionId}-${pageTitle.text}`,\n itemKey: (item) => item[`${entityId}`],\n itemName: (item) => item[`${entityName}`],\n filters,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData,\n limit,\n persistQueryToUrl,\n disableAutoSelectAllCount,\n selectionConsistencyMode,\n });\n\n const secondaryActionComponents = React.useMemo(() => {\n if (secondaryActions.length === 0) {\n return undefined;\n }\n\n return secondaryActions.map((action) => (item: any) => ({\n icon: <Edit />,\n text: action.text,\n onClick: () => {\n context?.actions?.[action.id]?.({ item });\n },\n }));\n }, [secondaryActions, context?.actions]);\n return (\n <Table\n search={search?.shown !== false}\n title={\n toolbarTitle && (\n <ToolbarTitle\n title={toolbarTitle.title}\n subtitle={{\n text: toolbarTitle.subtitle?.text ?? '',\n learnMore: toolbarTitle.subtitle?.learnMore,\n info: toolbarTitle.subtitle?.info && {\n content: (\n <Box direction=\"vertical\" gap=\"6px\">\n <Text\n dataHook=\"toolbar-title-subtitle-info-content\"\n light\n size=\"small\"\n >\n {toolbarTitle.subtitle?.info?.content.text}\n </Text>\n {toolbarTitle.subtitle?.info?.content.link && (\n <TextButton\n dataHook=\"toolbar-title-subtitle-info-link\"\n size=\"small\"\n underline=\"always\"\n skin=\"light\"\n as=\"a\"\n rel=\"noopener\"\n target=\"_blank\"\n href={toolbarTitle.subtitle?.info?.content.link.url}\n >\n {toolbarTitle.subtitle?.info?.content.link.label}\n </TextButton>\n )}\n </Box>\n ),\n },\n }}\n itemsLimit={toolbarTitle.itemsLimit}\n showTotal={toolbarTitle.showTotal}\n />\n )\n }\n dataHook=\"auto-patterns-table\"\n state={tableState}\n columns={columns}\n views={views}\n dataExtension={dataExtension}\n customColumns={customColumns}\n actionCell={(item) => ({\n secondaryActions: secondaryActionComponents?.map((action) =>\n action(item),\n ),\n })}\n filters={\n components.length > 0 ? (\n <CollectionToolbarFilters {...collectionToolbarFiltersProps}>\n {components}\n </CollectionToolbarFilters>\n ) : undefined\n }\n emptyState={emptyState}\n />\n );\n};\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["React","AutoPatternsTable","AutoPatternsGrid","AutoPatternsCollectionPageContent","_ref","configuration","components","createElement","Fragment","map","component","type","table","key","collection","collectionId","grid"],"sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"sourcesContent":["import React from 'react';\nimport { AutoPatternsTable } from '../AutoPatternsTable';\nimport { CollectionPageConfig } from '../../types';\nimport { AutoPatternsGrid } from '../AutoPatternsGrid';\n\nexport interface AutoPatternsCollectionPageContentProps {\n configuration: CollectionPageConfig;\n}\n\nexport const AutoPatternsCollectionPageContent = ({\n configuration,\n}: AutoPatternsCollectionPageContentProps) => {\n const { components } = configuration;\n return (\n <>\n {components.map((component) => {\n const { type } = component;\n switch (type) {\n case 'Table':\n if (component.table) {\n return (\n <AutoPatternsTable\n key={component.table.collection.collectionId}\n configuration={component.table}\n />\n );\n }\n return null;\n case 'Grid':\n if (component.grid) {\n return <AutoPatternsGrid configuration={component.grid} />;\n }\n return null;\n default:\n return null;\n }\n })}\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,sBAAsB;AAExD,SAASC,gBAAgB,QAAQ,qBAAqB;AAMtD,OAAO,MAAMC,iCAAiC,GAAGC,IAAA,IAEH;EAAA,IAFI;IAChDC;EACsC,CAAC,GAAAD,IAAA;EACvC,MAAM;IAAEE;EAAW,CAAC,GAAGD,aAAa;EACpC,oBACEL,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACGF,UAAU,CAACG,GAAG,CAAEC,SAAS,IAAK;IAC7B,MAAM;MAAEC;IAAK,CAAC,GAAGD,SAAS;IAC1B,QAAQC,IAAI;MACV,KAAK,OAAO;QACV,IAAID,SAAS,CAACE,KAAK,EAAE;UACnB,oBACEZ,KAAA,CAAAO,aAAA,CAACN,iBAAiB;YAChBY,GAAG,EAAEH,SAAS,CAACE,KAAK,CAACE,UAAU,CAACC,YAAa;YAC7CV,aAAa,EAAEK,SAAS,CAACE;UAAM,CAChC,CAAC;QAEN;QACA,OAAO,IAAI;MACb,KAAK,MAAM;QACT,IAAIF,SAAS,CAACM,IAAI,EAAE;UAClB,oBAAOhB,KAAA,CAAAO,aAAA,CAACL,gBAAgB;YAACG,aAAa,EAAEK,SAAS,CAACM;UAAK,CAAE,CAAC;QAC5D;QACA,OAAO,IAAI;MACb;QACE,OAAO,IAAI;IACf;EACF,CAAC,CACD,CAAC;AAEP,CAAC","ignoreList":[]}
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import { EntityPage, useEntity, useEntityPage } from '@wix/patterns';
3
+ import { useForm } from '@wix/patterns/form';
4
+ import { Box, Card, Cell } from '@wix/design-system';
5
+ import { FormFieldInput } from './Fields/FormFieldInput';
6
+ import { useParams } from 'react-router-dom';
7
+ import { useSchema } from '../../providers/SchemaContext';
8
+ export const AutoPatternsEntityPage = _ref => {
9
+ let {
10
+ configuration
11
+ } = _ref;
12
+ const {
13
+ title,
14
+ subtitle,
15
+ visibleFieldIds = [],
16
+ collectionPagePath: parentPath
17
+ } = configuration;
18
+ const form = useForm();
19
+ const params = useParams();
20
+ const entityId = params.entityId;
21
+ const schema = useSchema();
22
+ const state = useEntityPage({
23
+ parentPath,
24
+ form,
25
+ onSave: async () => {
26
+ var _state$entity;
27
+ const formValues = form.getValues();
28
+ const updatedEntity = {
29
+ ...state.entity,
30
+ ...formValues
31
+ };
32
+ let newUpdatedEntity;
33
+ // TODO: Works only for CMS collections, need to be extracted from collection data somehow or share similar context
34
+ if ((_state$entity = state.entity) != null && _state$entity._id) {
35
+ newUpdatedEntity = await schema.actions.update(updatedEntity);
36
+ } else {
37
+ newUpdatedEntity = await schema.actions.create(updatedEntity);
38
+ }
39
+ return {
40
+ updatedEntity: newUpdatedEntity
41
+ };
42
+ },
43
+ saveErrorToast: () => 'Failed to save',
44
+ fetch: async () => {
45
+ if (!entityId) {
46
+ return {
47
+ entity: undefined
48
+ };
49
+ }
50
+ const entity = await schema.actions.get(entityId);
51
+ return {
52
+ entity
53
+ };
54
+ }
55
+ });
56
+ const entity = useEntity(state);
57
+ return /*#__PURE__*/React.createElement(EntityPage, {
58
+ state: state,
59
+ dataHook: "auto-patterns-entity-page"
60
+ }, /*#__PURE__*/React.createElement(EntityPage.Header, {
61
+ title: title ?? {
62
+ text: (entity == null ? void 0 : entity[schema.displayField]) ?? 'Edit Entity'
63
+ },
64
+ subtitle: subtitle
65
+ }), /*#__PURE__*/React.createElement(EntityPage.Content, null, /*#__PURE__*/React.createElement(EntityPage.MainContent, null, /*#__PURE__*/React.createElement(EntityPage.Card, {
66
+ minHeight: "50px"
67
+ }, /*#__PURE__*/React.createElement(Card.Header, {
68
+ title: "Item details",
69
+ subtitle: "Modify the details of your selected item below"
70
+ }), /*#__PURE__*/React.createElement(Card.Divider, null), /*#__PURE__*/React.createElement(Card.Content, null, /*#__PURE__*/React.createElement(Box, {
71
+ gap: "SP2",
72
+ direction: "vertical"
73
+ }, visibleFieldIds.map(fieldId => /*#__PURE__*/React.createElement(React.Fragment, {
74
+ key: fieldId
75
+ }, /*#__PURE__*/React.createElement(Cell, {
76
+ span: 12
77
+ }, /*#__PURE__*/React.createElement(FormFieldInput, {
78
+ key: fieldId,
79
+ field: schema.fields[fieldId]
80
+ }))))))))));
81
+ };
82
+ //# sourceMappingURL=AutoPatternsEntityPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","EntityPage","useEntity","useEntityPage","useForm","Box","Card","Cell","FormFieldInput","useParams","useSchema","AutoPatternsEntityPage","_ref","configuration","title","subtitle","visibleFieldIds","collectionPagePath","parentPath","form","params","entityId","schema","state","onSave","_state$entity","formValues","getValues","updatedEntity","entity","newUpdatedEntity","_id","actions","update","create","saveErrorToast","fetch","undefined","get","createElement","dataHook","Header","text","displayField","Content","MainContent","minHeight","Divider","gap","direction","map","fieldId","Fragment","key","span","field","fields"],"sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"sourcesContent":["import React from 'react';\nimport { EntityPageConfig } from '../../types';\nimport {\n EntityPage,\n EntityPageState,\n useEntity,\n useEntityPage,\n} from '@wix/patterns';\nimport { useForm } from '@wix/patterns/form';\nimport { Box, Card, Cell } from '@wix/design-system';\nimport { FormFieldInput } from './Fields/FormFieldInput';\nimport { useParams } from 'react-router-dom';\nimport { useSchema } from '../../providers/SchemaContext';\n\nexport interface AutoPatternsEntityPageProps {\n configuration: EntityPageConfig;\n}\n\nexport const AutoPatternsEntityPage: React.FC<AutoPatternsEntityPageProps> = ({\n configuration,\n}) => {\n const {\n title,\n subtitle,\n visibleFieldIds = [],\n collectionPagePath: parentPath,\n } = configuration;\n const form = useForm<any>();\n const params = useParams();\n const entityId = params.entityId;\n const schema = useSchema();\n const state: EntityPageState<any> = useEntityPage<any, any>({\n parentPath,\n form,\n onSave: async () => {\n const formValues = form.getValues();\n const updatedEntity: any = {\n ...state.entity,\n ...formValues,\n };\n\n let newUpdatedEntity;\n // TODO: Works only for CMS collections, need to be extracted from collection data somehow or share similar context\n if (state.entity?._id) {\n newUpdatedEntity = await schema.actions.update(updatedEntity);\n } else {\n newUpdatedEntity = await schema.actions.create(updatedEntity);\n }\n\n return { updatedEntity: newUpdatedEntity };\n },\n saveErrorToast: () => 'Failed to save',\n fetch: async () => {\n if (!entityId) {\n return { entity: undefined };\n }\n\n const entity = await schema.actions.get(entityId);\n return { entity };\n },\n });\n const entity = useEntity<any, any>(state);\n\n return (\n <EntityPage state={state} dataHook=\"auto-patterns-entity-page\">\n <EntityPage.Header\n title={\n title ?? { text: entity?.[schema.displayField] ?? 'Edit Entity' }\n }\n subtitle={subtitle}\n />\n <EntityPage.Content>\n <EntityPage.MainContent>\n <EntityPage.Card minHeight=\"50px\">\n <Card.Header\n title=\"Item details\"\n subtitle=\"Modify the details of your selected item below\"\n />\n <Card.Divider />\n <Card.Content>\n <Box gap=\"SP2\" direction=\"vertical\">\n {visibleFieldIds.map((fieldId) => (\n <React.Fragment key={fieldId}>\n <Cell span={12}>\n <FormFieldInput\n key={fieldId}\n field={schema.fields[fieldId]}\n />\n </Cell>\n </React.Fragment>\n ))}\n </Box>\n </Card.Content>\n </EntityPage.Card>\n </EntityPage.MainContent>\n </EntityPage.Content>\n </EntityPage>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACEC,UAAU,EAEVC,SAAS,EACTC,aAAa,QACR,eAAe;AACtB,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,GAAG,EAAEC,IAAI,EAAEC,IAAI,QAAQ,oBAAoB;AACpD,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,SAAS,QAAQ,+BAA+B;AAMzD,OAAO,MAAMC,sBAA6D,GAAGC,IAAA,IAEvE;EAAA,IAFwE;IAC5EC;EACF,CAAC,GAAAD,IAAA;EACC,MAAM;IACJE,KAAK;IACLC,QAAQ;IACRC,eAAe,GAAG,EAAE;IACpBC,kBAAkB,EAAEC;EACtB,CAAC,GAAGL,aAAa;EACjB,MAAMM,IAAI,GAAGf,OAAO,CAAM,CAAC;EAC3B,MAAMgB,MAAM,GAAGX,SAAS,CAAC,CAAC;EAC1B,MAAMY,QAAQ,GAAGD,MAAM,CAACC,QAAQ;EAChC,MAAMC,MAAM,GAAGZ,SAAS,CAAC,CAAC;EAC1B,MAAMa,KAA2B,GAAGpB,aAAa,CAAW;IAC1De,UAAU;IACVC,IAAI;IACJK,MAAM,EAAE,MAAAA,CAAA,KAAY;MAAA,IAAAC,aAAA;MAClB,MAAMC,UAAU,GAAGP,IAAI,CAACQ,SAAS,CAAC,CAAC;MACnC,MAAMC,aAAkB,GAAG;QACzB,GAAGL,KAAK,CAACM,MAAM;QACf,GAAGH;MACL,CAAC;MAED,IAAII,gBAAgB;MACpB;MACA,KAAAL,aAAA,GAAIF,KAAK,CAACM,MAAM,aAAZJ,aAAA,CAAcM,GAAG,EAAE;QACrBD,gBAAgB,GAAG,MAAMR,MAAM,CAACU,OAAO,CAACC,MAAM,CAACL,aAAa,CAAC;MAC/D,CAAC,MAAM;QACLE,gBAAgB,GAAG,MAAMR,MAAM,CAACU,OAAO,CAACE,MAAM,CAACN,aAAa,CAAC;MAC/D;MAEA,OAAO;QAAEA,aAAa,EAAEE;MAAiB,CAAC;IAC5C,CAAC;IACDK,cAAc,EAAEA,CAAA,KAAM,gBAAgB;IACtCC,KAAK,EAAE,MAAAA,CAAA,KAAY;MACjB,IAAI,CAACf,QAAQ,EAAE;QACb,OAAO;UAAEQ,MAAM,EAAEQ;QAAU,CAAC;MAC9B;MAEA,MAAMR,MAAM,GAAG,MAAMP,MAAM,CAACU,OAAO,CAACM,GAAG,CAACjB,QAAQ,CAAC;MACjD,OAAO;QAAEQ;MAAO,CAAC;IACnB;EACF,CAAC,CAAC;EACF,MAAMA,MAAM,GAAG3B,SAAS,CAAWqB,KAAK,CAAC;EAEzC,oBACEvB,KAAA,CAAAuC,aAAA,CAACtC,UAAU;IAACsB,KAAK,EAAEA,KAAM;IAACiB,QAAQ,EAAC;EAA2B,gBAC5DxC,KAAA,CAAAuC,aAAA,CAACtC,UAAU,CAACwC,MAAM;IAChB3B,KAAK,EACHA,KAAK,IAAI;MAAE4B,IAAI,EAAE,CAAAb,MAAM,oBAANA,MAAM,CAAGP,MAAM,CAACqB,YAAY,CAAC,KAAI;IAAc,CACjE;IACD5B,QAAQ,EAAEA;EAAS,CACpB,CAAC,eACFf,KAAA,CAAAuC,aAAA,CAACtC,UAAU,CAAC2C,OAAO,qBACjB5C,KAAA,CAAAuC,aAAA,CAACtC,UAAU,CAAC4C,WAAW,qBACrB7C,KAAA,CAAAuC,aAAA,CAACtC,UAAU,CAACK,IAAI;IAACwC,SAAS,EAAC;EAAM,gBAC/B9C,KAAA,CAAAuC,aAAA,CAACjC,IAAI,CAACmC,MAAM;IACV3B,KAAK,EAAC,cAAc;IACpBC,QAAQ,EAAC;EAAgD,CAC1D,CAAC,eACFf,KAAA,CAAAuC,aAAA,CAACjC,IAAI,CAACyC,OAAO,MAAE,CAAC,eAChB/C,KAAA,CAAAuC,aAAA,CAACjC,IAAI,CAACsC,OAAO,qBACX5C,KAAA,CAAAuC,aAAA,CAAClC,GAAG;IAAC2C,GAAG,EAAC,KAAK;IAACC,SAAS,EAAC;EAAU,GAChCjC,eAAe,CAACkC,GAAG,CAAEC,OAAO,iBAC3BnD,KAAA,CAAAuC,aAAA,CAACvC,KAAK,CAACoD,QAAQ;IAACC,GAAG,EAAEF;EAAQ,gBAC3BnD,KAAA,CAAAuC,aAAA,CAAChC,IAAI;IAAC+C,IAAI,EAAE;EAAG,gBACbtD,KAAA,CAAAuC,aAAA,CAAC/B,cAAc;IACb6C,GAAG,EAAEF,OAAQ;IACbI,KAAK,EAAEjC,MAAM,CAACkC,MAAM,CAACL,OAAO;EAAE,CAC/B,CACG,CACQ,CACjB,CACE,CACO,CACC,CACK,CACN,CACV,CAAC;AAEjB,CAAC","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ import React, { useState } from 'react';
2
+ import { Checkbox as CheckboxWSR } from '@wix/design-system';
3
+ export const Checkbox = props => {
4
+ const {
5
+ field,
6
+ initialValue,
7
+ onChange
8
+ } = props;
9
+ const [value, setValue] = useState(initialValue);
10
+ return /*#__PURE__*/React.createElement(CheckboxWSR, {
11
+ checked: value,
12
+ onChange: e => {
13
+ setValue(e.target.checked);
14
+ onChange(e.target.checked);
15
+ },
16
+ dataHook: `checkbox-${field.id}`
17
+ }, field.displayName);
18
+ };
19
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Checkbox","CheckboxWSR","props","field","initialValue","onChange","value","setValue","createElement","checked","e","target","dataHook","id","displayName"],"sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/Checkbox.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Checkbox as CheckboxWSR } from '@wix/design-system';\nimport { BaseInputProps } from './FormFieldInput';\n\nexport interface CheckboxProps extends BaseInputProps<boolean> {}\n\nexport const Checkbox = (props: CheckboxProps) => {\n const { field, initialValue, onChange } = props;\n const [value, setValue] = useState(initialValue);\n\n return (\n <CheckboxWSR\n checked={value}\n onChange={(e) => {\n setValue(e.target.checked);\n onChange(e.target.checked);\n }}\n dataHook={`checkbox-${field.id}`}\n >\n {field.displayName}\n </CheckboxWSR>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,QAAQ,IAAIC,WAAW,QAAQ,oBAAoB;AAK5D,OAAO,MAAMD,QAAQ,GAAIE,KAAoB,IAAK;EAChD,MAAM;IAAEC,KAAK;IAAEC,YAAY;IAAEC;EAAS,CAAC,GAAGH,KAAK;EAC/C,MAAM,CAACI,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAACK,YAAY,CAAC;EAEhD,oBACEN,KAAA,CAAAU,aAAA,CAACP,WAAW;IACVQ,OAAO,EAAEH,KAAM;IACfD,QAAQ,EAAGK,CAAC,IAAK;MACfH,QAAQ,CAACG,CAAC,CAACC,MAAM,CAACF,OAAO,CAAC;MAC1BJ,QAAQ,CAACK,CAAC,CAACC,MAAM,CAACF,OAAO,CAAC;IAC5B,CAAE;IACFG,QAAQ,EAAE,YAAYT,KAAK,CAACU,EAAE;EAAG,GAEhCV,KAAK,CAACW,WACI,CAAC;AAElB,CAAC","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { ShortText } from './ShortText';
3
+ import { useEntityPageContext } from '@wix/patterns';
4
+ import { useController } from '@wix/patterns/form';
5
+ import { collections } from '@wix/data';
6
+ import { Checkbox } from './Checkbox';
7
+ export const EDITABLE_INPUT_ELEMENTS = {
8
+ [collections.Type.TEXT]: ShortText,
9
+ [collections.Type.BOOLEAN]: Checkbox
10
+ };
11
+ export const FormFieldInput = props => {
12
+ var _pageState$entity, _controller$fieldStat;
13
+ const {
14
+ field
15
+ } = props;
16
+ const pageState = useEntityPageContext();
17
+ const controller = useController({
18
+ name: (field == null ? void 0 : field.id) ?? '',
19
+ control: pageState.form.control,
20
+ defaultValue: (_pageState$entity = pageState.entity) == null ? void 0 : _pageState$entity[(field == null ? void 0 : field.id) ?? '']
21
+ });
22
+ if (!field || !EDITABLE_INPUT_ELEMENTS.hasOwnProperty(field.originalType) || !pageState || !pageState.entity) {
23
+ return null;
24
+ }
25
+ const FieldInput = EDITABLE_INPUT_ELEMENTS[field.originalType];
26
+ return /*#__PURE__*/React.createElement(FieldInput, {
27
+ field: field,
28
+ initialValue: pageState.entity[field.id],
29
+ status: controller.fieldState.invalid ? 'error' : undefined,
30
+ statusMessage: (_controller$fieldStat = controller.fieldState.error) == null ? void 0 : _controller$fieldStat.message,
31
+ inputRef: controller.field.ref,
32
+ value: controller.field.value,
33
+ onChange: controller.field.onChange,
34
+ onBlur: controller.field.onBlur
35
+ });
36
+ };
37
+ //# sourceMappingURL=FormFieldInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","ShortText","useEntityPageContext","useController","collections","Checkbox","EDITABLE_INPUT_ELEMENTS","Type","TEXT","BOOLEAN","FormFieldInput","props","_pageState$entity","_controller$fieldStat","field","pageState","controller","name","id","control","form","defaultValue","entity","hasOwnProperty","originalType","FieldInput","createElement","initialValue","status","fieldState","invalid","undefined","statusMessage","error","message","inputRef","ref","value","onChange","onBlur"],"sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/FormFieldInput.tsx"],"sourcesContent":["import React from 'react';\nimport { ShortText } from './ShortText';\nimport { useEntityPageContext } from '@wix/patterns';\nimport { useController } from '@wix/patterns/form';\nimport { Field } from '../../../types';\nimport { collections } from '@wix/data';\nimport { Checkbox } from './Checkbox';\n\nexport interface BaseInputProps<T> {\n field: Field;\n initialValue: T;\n onChange: (newValue: T) => void;\n}\n\nexport const EDITABLE_INPUT_ELEMENTS: Partial<\n Record<collections.Type, React.ComponentType<any>>\n> = {\n [collections.Type.TEXT]: ShortText,\n [collections.Type.BOOLEAN]: Checkbox,\n};\n\nexport interface FormFieldInputProps {\n field?: Field;\n}\n\nexport const FormFieldInput = (props: FormFieldInputProps) => {\n const { field } = props;\n\n const pageState = useEntityPageContext();\n const controller = useController({\n name: field?.id ?? '',\n control: pageState.form.control,\n defaultValue: (pageState.entity as any)?.[field?.id ?? ''],\n });\n\n if (\n !field ||\n !EDITABLE_INPUT_ELEMENTS.hasOwnProperty(field.originalType) ||\n !pageState ||\n !pageState.entity\n ) {\n return null;\n }\n const FieldInput = EDITABLE_INPUT_ELEMENTS[field.originalType]!;\n\n return (\n <FieldInput\n field={field}\n initialValue={(pageState.entity as any)[field.id]}\n status={controller.fieldState.invalid ? 'error' : undefined}\n statusMessage={controller.fieldState.error?.message}\n inputRef={controller.field.ref}\n value={controller.field.value}\n onChange={controller.field.onChange}\n onBlur={controller.field.onBlur}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,aAAa,QAAQ,oBAAoB;AAElD,SAASC,WAAW,QAAQ,WAAW;AACvC,SAASC,QAAQ,QAAQ,YAAY;AAQrC,OAAO,MAAMC,uBAEZ,GAAG;EACF,CAACF,WAAW,CAACG,IAAI,CAACC,IAAI,GAAGP,SAAS;EAClC,CAACG,WAAW,CAACG,IAAI,CAACE,OAAO,GAAGJ;AAC9B,CAAC;AAMD,OAAO,MAAMK,cAAc,GAAIC,KAA0B,IAAK;EAAA,IAAAC,iBAAA,EAAAC,qBAAA;EAC5D,MAAM;IAAEC;EAAM,CAAC,GAAGH,KAAK;EAEvB,MAAMI,SAAS,GAAGb,oBAAoB,CAAC,CAAC;EACxC,MAAMc,UAAU,GAAGb,aAAa,CAAC;IAC/Bc,IAAI,EAAE,CAAAH,KAAK,oBAALA,KAAK,CAAEI,EAAE,KAAI,EAAE;IACrBC,OAAO,EAAEJ,SAAS,CAACK,IAAI,CAACD,OAAO;IAC/BE,YAAY,GAAAT,iBAAA,GAAGG,SAAS,CAACO,MAAM,qBAAjBV,iBAAA,CAA4B,CAAAE,KAAK,oBAALA,KAAK,CAAEI,EAAE,KAAI,EAAE;EAC3D,CAAC,CAAC;EAEF,IACE,CAACJ,KAAK,IACN,CAACR,uBAAuB,CAACiB,cAAc,CAACT,KAAK,CAACU,YAAY,CAAC,IAC3D,CAACT,SAAS,IACV,CAACA,SAAS,CAACO,MAAM,EACjB;IACA,OAAO,IAAI;EACb;EACA,MAAMG,UAAU,GAAGnB,uBAAuB,CAACQ,KAAK,CAACU,YAAY,CAAE;EAE/D,oBACExB,KAAA,CAAA0B,aAAA,CAACD,UAAU;IACTX,KAAK,EAAEA,KAAM;IACba,YAAY,EAAGZ,SAAS,CAACO,MAAM,CAASR,KAAK,CAACI,EAAE,CAAE;IAClDU,MAAM,EAAEZ,UAAU,CAACa,UAAU,CAACC,OAAO,GAAG,OAAO,GAAGC,SAAU;IAC5DC,aAAa,GAAAnB,qBAAA,GAAEG,UAAU,CAACa,UAAU,CAACI,KAAK,qBAA3BpB,qBAAA,CAA6BqB,OAAQ;IACpDC,QAAQ,EAAEnB,UAAU,CAACF,KAAK,CAACsB,GAAI;IAC/BC,KAAK,EAAErB,UAAU,CAACF,KAAK,CAACuB,KAAM;IAC9BC,QAAQ,EAAEtB,UAAU,CAACF,KAAK,CAACwB,QAAS;IACpCC,MAAM,EAAEvB,UAAU,CAACF,KAAK,CAACyB;EAAO,CACjC,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ import React, { useState } from 'react';
2
+ import { FormField, Input } from '@wix/design-system';
3
+ export const useTextInput = _ref => {
4
+ let {
5
+ initialValue,
6
+ onChange
7
+ } = _ref;
8
+ const [value, setValue] = useState(initialValue || '');
9
+ const handleChange = e => {
10
+ const newValue = e.target.value;
11
+ setValue(newValue);
12
+ onChange == null || onChange(newValue);
13
+ };
14
+ return {
15
+ value,
16
+ handleChange
17
+ };
18
+ };
19
+ export const ShortText = props => {
20
+ const {
21
+ field,
22
+ initialValue,
23
+ onChange
24
+ } = props;
25
+ const {
26
+ value,
27
+ handleChange
28
+ } = useTextInput({
29
+ initialValue,
30
+ onChange
31
+ });
32
+ return /*#__PURE__*/React.createElement(FormField, {
33
+ label: field.displayName
34
+ }, /*#__PURE__*/React.createElement(Input, {
35
+ value: value,
36
+ onChange: handleChange,
37
+ dataHook: `short-text-${field.id}`
38
+ }));
39
+ };
40
+ //# sourceMappingURL=ShortText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","FormField","Input","useTextInput","_ref","initialValue","onChange","value","setValue","handleChange","e","newValue","target","ShortText","props","field","createElement","label","displayName","dataHook","id"],"sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/ShortText.tsx"],"sourcesContent":["import React, { ChangeEvent, useState } from 'react';\nimport { FormField, Input } from '@wix/design-system';\nimport { BaseInputProps } from './FormFieldInput';\n\nexport const useTextInput = ({\n initialValue,\n onChange,\n}: {\n initialValue: string;\n onChange: (value: string) => void;\n}) => {\n const [value, setValue] = useState(initialValue || '');\n\n const handleChange = (\n e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n ) => {\n const newValue = e.target.value;\n\n setValue(newValue);\n onChange?.(newValue);\n };\n\n return {\n value,\n handleChange,\n };\n};\n\nexport interface ShortTextProps extends BaseInputProps<string> {}\n\nexport const ShortText = (props: ShortTextProps) => {\n const { field, initialValue, onChange } = props;\n const { value, handleChange } = useTextInput({\n initialValue,\n onChange,\n });\n\n return (\n <FormField label={field.displayName}>\n <Input\n value={value}\n onChange={handleChange}\n dataHook={`short-text-${field.id}`}\n />\n </FormField>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAiBC,QAAQ,QAAQ,OAAO;AACpD,SAASC,SAAS,EAAEC,KAAK,QAAQ,oBAAoB;AAGrD,OAAO,MAAMC,YAAY,GAAGC,IAAA,IAMtB;EAAA,IANuB;IAC3BC,YAAY;IACZC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAM,CAACG,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAACK,YAAY,IAAI,EAAE,CAAC;EAEtD,MAAMI,YAAY,GAChBC,CAAsD,IACnD;IACH,MAAMC,QAAQ,GAAGD,CAAC,CAACE,MAAM,CAACL,KAAK;IAE/BC,QAAQ,CAACG,QAAQ,CAAC;IAClBL,QAAQ,YAARA,QAAQ,CAAGK,QAAQ,CAAC;EACtB,CAAC;EAED,OAAO;IACLJ,KAAK;IACLE;EACF,CAAC;AACH,CAAC;AAID,OAAO,MAAMI,SAAS,GAAIC,KAAqB,IAAK;EAClD,MAAM;IAAEC,KAAK;IAAEV,YAAY;IAAEC;EAAS,CAAC,GAAGQ,KAAK;EAC/C,MAAM;IAAEP,KAAK;IAAEE;EAAa,CAAC,GAAGN,YAAY,CAAC;IAC3CE,YAAY;IACZC;EACF,CAAC,CAAC;EAEF,oBACEP,KAAA,CAAAiB,aAAA,CAACf,SAAS;IAACgB,KAAK,EAAEF,KAAK,CAACG;EAAY,gBAClCnB,KAAA,CAAAiB,aAAA,CAACd,KAAK;IACJK,KAAK,EAAEA,KAAM;IACbD,QAAQ,EAAEG,YAAa;IACvBU,QAAQ,EAAE,cAAcJ,KAAK,CAACK,EAAE;EAAG,CACpC,CACQ,CAAC;AAEhB,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from './AutoPatternsEntityPage';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../../src/components/AutoPatternsEntityPage/index.ts"],"sourcesContent":["export * from './AutoPatternsEntityPage';\n"],"mappings":"AAAA,cAAc,0BAA0B","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ import React, { useMemo } from 'react';
2
+ import { CollectionDataProvider } from '../../providers';
3
+ import { AutoPatternsGridContent } from './AutoPatternsGridContent';
4
+ export const AutoPatternsGrid = _ref => {
5
+ let {
6
+ configuration
7
+ } = _ref;
8
+ const visibleFieldIds = useMemo(() => [configuration.item.title, configuration.item.subtitle].filter(value => value != null), [configuration]);
9
+ return /*#__PURE__*/React.createElement(CollectionDataProvider, {
10
+ collectionConfig: configuration.collection,
11
+ visibleFieldIds: visibleFieldIds
12
+ }, /*#__PURE__*/React.createElement(AutoPatternsGridContent, {
13
+ configuration: configuration
14
+ }));
15
+ };
16
+ //# sourceMappingURL=AutoPatternsGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","CollectionDataProvider","AutoPatternsGridContent","AutoPatternsGrid","_ref","configuration","visibleFieldIds","item","title","subtitle","filter","value","createElement","collectionConfig","collection"],"sources":["../../../../src/components/AutoPatternsGrid/AutoPatternsGrid.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { CollectionDataProvider } from '../../providers';\nimport { GridConfig } from '../../types';\nimport { AutoPatternsGridContent } from './AutoPatternsGridContent';\n\nexport interface AutoPatternsGridProps {\n configuration: GridConfig;\n}\n\nexport const AutoPatternsGrid = ({ configuration }: AutoPatternsGridProps) => {\n const visibleFieldIds = useMemo(\n () =>\n [configuration.item.title, configuration.item.subtitle].filter(\n (value) => value != null,\n ) as string[],\n [configuration],\n );\n\n return (\n <CollectionDataProvider\n collectionConfig={configuration.collection}\n visibleFieldIds={visibleFieldIds}\n >\n <AutoPatternsGridContent configuration={configuration} />\n </CollectionDataProvider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,sBAAsB,QAAQ,iBAAiB;AAExD,SAASC,uBAAuB,QAAQ,2BAA2B;AAMnE,OAAO,MAAMC,gBAAgB,GAAGC,IAAA,IAA8C;EAAA,IAA7C;IAAEC;EAAqC,CAAC,GAAAD,IAAA;EACvE,MAAME,eAAe,GAAGN,OAAO,CAC7B,MACE,CAACK,aAAa,CAACE,IAAI,CAACC,KAAK,EAAEH,aAAa,CAACE,IAAI,CAACE,QAAQ,CAAC,CAACC,MAAM,CAC3DC,KAAK,IAAKA,KAAK,IAAI,IACtB,CAAa,EACf,CAACN,aAAa,CAChB,CAAC;EAED,oBACEN,KAAA,CAAAa,aAAA,CAACX,sBAAsB;IACrBY,gBAAgB,EAAER,aAAa,CAACS,UAAW;IAC3CR,eAAe,EAAEA;EAAgB,gBAEjCP,KAAA,CAAAa,aAAA,CAACV,uBAAuB;IAACG,aAAa,EAAEA;EAAc,CAAE,CAClC,CAAC;AAE7B,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { Grid } from '@wix/patterns';
3
+ import { useGridFeatures } from '../../hooks';
4
+ export const AutoPatternsGridContent = _ref => {
5
+ let {
6
+ configuration
7
+ } = _ref;
8
+ const {
9
+ state,
10
+ search,
11
+ title,
12
+ emptyState,
13
+ filters,
14
+ actionCell,
15
+ renderItem,
16
+ imagePlacement,
17
+ preset
18
+ } = useGridFeatures(configuration);
19
+ return /*#__PURE__*/React.createElement(Grid, {
20
+ dataHook: "auto-patterns-grid",
21
+ search: search,
22
+ title: title,
23
+ state: state,
24
+ actionCell: actionCell,
25
+ filters: filters,
26
+ emptyState: emptyState,
27
+ imagePlacement: imagePlacement,
28
+ preset: preset,
29
+ renderItem: renderItem
30
+ });
31
+ };
32
+ //# sourceMappingURL=AutoPatternsGridContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Grid","useGridFeatures","AutoPatternsGridContent","_ref","configuration","state","search","title","emptyState","filters","actionCell","renderItem","imagePlacement","preset","createElement","dataHook"],"sources":["../../../../src/components/AutoPatternsGrid/AutoPatternsGridContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Grid } from '@wix/patterns';\nimport { GridConfig } from '../../types';\nimport { useGridFeatures } from '../../hooks';\n\nexport interface AutoPatternsGridContentProps {\n configuration: GridConfig;\n}\n\nexport const AutoPatternsGridContent = ({\n configuration,\n}: AutoPatternsGridContentProps) => {\n const {\n state,\n search,\n title,\n emptyState,\n filters,\n actionCell,\n renderItem,\n imagePlacement,\n preset,\n } = useGridFeatures(configuration);\n\n return (\n <Grid\n dataHook=\"auto-patterns-grid\"\n search={search}\n title={title}\n state={state}\n actionCell={actionCell}\n filters={filters}\n emptyState={emptyState}\n imagePlacement={imagePlacement}\n preset={preset}\n renderItem={renderItem}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,eAAe;AAEpC,SAASC,eAAe,QAAQ,aAAa;AAM7C,OAAO,MAAMC,uBAAuB,GAAGC,IAAA,IAEH;EAAA,IAFI;IACtCC;EAC4B,CAAC,GAAAD,IAAA;EAC7B,MAAM;IACJE,KAAK;IACLC,MAAM;IACNC,KAAK;IACLC,UAAU;IACVC,OAAO;IACPC,UAAU;IACVC,UAAU;IACVC,cAAc;IACdC;EACF,CAAC,GAAGZ,eAAe,CAACG,aAAa,CAAC;EAElC,oBACEL,KAAA,CAAAe,aAAA,CAACd,IAAI;IACHe,QAAQ,EAAC,oBAAoB;IAC7BT,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbF,KAAK,EAAEA,KAAM;IACbK,UAAU,EAAEA,UAAW;IACvBD,OAAO,EAAEA,OAAQ;IACjBD,UAAU,EAAEA,UAAW;IACvBI,cAAc,EAAEA,cAAe;IAC/BC,MAAM,EAAEA,MAAO;IACfF,UAAU,EAAEA;EAAW,CACxB,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from './AutoPatternsGrid';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../../src/components/AutoPatternsGrid/index.ts"],"sourcesContent":["export * from './AutoPatternsGrid';\n"],"mappings":"AAAA,cAAc,oBAAoB","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { AutoPatternsCollectionPage } from '../AutoPatternsCollectionPage';
3
+ import { AutoPatternsEntityPage } from '../AutoPatternsEntityPage';
4
+ import { SchemaProvider } from '../../providers/SchemaContext';
5
+ export const AutoPatternsPage = _ref => {
6
+ let {
7
+ pageConfig
8
+ } = _ref;
9
+ const {
10
+ type,
11
+ collectionPage,
12
+ entityPage
13
+ } = pageConfig;
14
+ switch (type) {
15
+ case 'collectionPage':
16
+ if (collectionPage) {
17
+ return /*#__PURE__*/React.createElement(AutoPatternsCollectionPage, {
18
+ configuration: collectionPage
19
+ });
20
+ }
21
+ break;
22
+ case 'entityPage':
23
+ if (entityPage) {
24
+ return /*#__PURE__*/React.createElement(SchemaProvider, {
25
+ collectionId: entityPage.collectionId,
26
+ entityTypeSource: entityPage.entityTypeSource
27
+ }, /*#__PURE__*/React.createElement(AutoPatternsEntityPage, {
28
+ configuration: entityPage
29
+ }));
30
+ }
31
+ break;
32
+ default:
33
+ break;
34
+ }
35
+ return null;
36
+ };
37
+ //# sourceMappingURL=AutoPatternsPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","AutoPatternsCollectionPage","AutoPatternsEntityPage","SchemaProvider","AutoPatternsPage","_ref","pageConfig","type","collectionPage","entityPage","createElement","configuration","collectionId","entityTypeSource"],"sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsPage.tsx"],"sourcesContent":["import React from 'react';\nimport { PageConfig } from '../../types';\nimport { AutoPatternsCollectionPage } from '../AutoPatternsCollectionPage';\nimport { AutoPatternsEntityPage } from '../AutoPatternsEntityPage';\nimport { SchemaProvider } from '../../providers/SchemaContext';\n\nexport interface AutoPatternsPageProps {\n pageConfig: PageConfig;\n}\n\nexport const AutoPatternsPage = ({ pageConfig }: AutoPatternsPageProps) => {\n const { type, collectionPage, entityPage } = pageConfig;\n\n switch (type) {\n case 'collectionPage':\n if (collectionPage) {\n return <AutoPatternsCollectionPage configuration={collectionPage} />;\n }\n break;\n case 'entityPage':\n if (entityPage) {\n return (\n <SchemaProvider\n collectionId={entityPage.collectionId}\n entityTypeSource={entityPage.entityTypeSource}\n >\n <AutoPatternsEntityPage configuration={entityPage} />\n </SchemaProvider>\n );\n }\n break;\n default:\n break;\n }\n\n return null;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,0BAA0B,QAAQ,+BAA+B;AAC1E,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,SAASC,cAAc,QAAQ,+BAA+B;AAM9D,OAAO,MAAMC,gBAAgB,GAAGC,IAAA,IAA2C;EAAA,IAA1C;IAAEC;EAAkC,CAAC,GAAAD,IAAA;EACpE,MAAM;IAAEE,IAAI;IAAEC,cAAc;IAAEC;EAAW,CAAC,GAAGH,UAAU;EAEvD,QAAQC,IAAI;IACV,KAAK,gBAAgB;MACnB,IAAIC,cAAc,EAAE;QAClB,oBAAOR,KAAA,CAAAU,aAAA,CAACT,0BAA0B;UAACU,aAAa,EAAEH;QAAe,CAAE,CAAC;MACtE;MACA;IACF,KAAK,YAAY;MACf,IAAIC,UAAU,EAAE;QACd,oBACET,KAAA,CAAAU,aAAA,CAACP,cAAc;UACbS,YAAY,EAAEH,UAAU,CAACG,YAAa;UACtCC,gBAAgB,EAAEJ,UAAU,CAACI;QAAiB,gBAE9Cb,KAAA,CAAAU,aAAA,CAACR,sBAAsB;UAACS,aAAa,EAAEF;QAAW,CAAE,CACtC,CAAC;MAErB;MACA;IACF;MACE;EACJ;EAEA,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ import React, { useMemo } from 'react';
2
+ import { CollectionDataProvider } from '../../providers';
3
+ import { AutoPatternsTableContent } from './AutoPatternsTableContent';
4
+ export const AutoPatternsTable = _ref => {
5
+ let {
6
+ configuration
7
+ } = _ref;
8
+ const visibleFieldIds = useMemo(() => configuration.columns.map(column => column.id), [configuration]);
9
+ return /*#__PURE__*/React.createElement(CollectionDataProvider, {
10
+ collectionConfig: configuration.collection,
11
+ visibleFieldIds: visibleFieldIds
12
+ }, /*#__PURE__*/React.createElement(AutoPatternsTableContent, {
13
+ configuration: configuration
14
+ }));
15
+ };
16
+ //# sourceMappingURL=AutoPatternsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","CollectionDataProvider","AutoPatternsTableContent","AutoPatternsTable","_ref","configuration","visibleFieldIds","columns","map","column","id","createElement","collectionConfig","collection"],"sources":["../../../../src/components/AutoPatternsTable/AutoPatternsTable.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { TableConfig } from '../../types';\nimport { CollectionDataProvider } from '../../providers';\nimport { AutoPatternsTableContent } from './AutoPatternsTableContent';\n\nexport interface AutoPatternsTableProps {\n configuration: TableConfig;\n}\n\nexport const AutoPatternsTable = ({\n configuration,\n}: AutoPatternsTableProps) => {\n const visibleFieldIds = useMemo(\n () => configuration.columns.map((column) => column.id),\n [configuration],\n );\n\n return (\n <CollectionDataProvider\n collectionConfig={configuration.collection}\n visibleFieldIds={visibleFieldIds}\n >\n <AutoPatternsTableContent configuration={configuration} />\n </CollectionDataProvider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,wBAAwB,QAAQ,4BAA4B;AAMrE,OAAO,MAAMC,iBAAiB,GAAGC,IAAA,IAEH;EAAA,IAFI;IAChCC;EACsB,CAAC,GAAAD,IAAA;EACvB,MAAME,eAAe,GAAGN,OAAO,CAC7B,MAAMK,aAAa,CAACE,OAAO,CAACC,GAAG,CAAEC,MAAM,IAAKA,MAAM,CAACC,EAAE,CAAC,EACtD,CAACL,aAAa,CAChB,CAAC;EAED,oBACEN,KAAA,CAAAY,aAAA,CAACV,sBAAsB;IACrBW,gBAAgB,EAAEP,aAAa,CAACQ,UAAW;IAC3CP,eAAe,EAAEA;EAAgB,gBAEjCP,KAAA,CAAAY,aAAA,CAACT,wBAAwB;IAACG,aAAa,EAAEA;EAAc,CAAE,CACnC,CAAC;AAE7B,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { Table, usePatternsNavigate } from '@wix/patterns';
3
+ import { useTableFeatures } from '../../hooks';
4
+ import { useCollectionData } from '../../providers';
5
+ export const AutoPatternsTableContent = _ref => {
6
+ let {
7
+ configuration
8
+ } = _ref;
9
+ const {
10
+ navigateToEntityPage
11
+ } = usePatternsNavigate();
12
+ const {
13
+ state,
14
+ columns,
15
+ customColumns,
16
+ search,
17
+ title,
18
+ emptyState,
19
+ filters,
20
+ actionCell
21
+ } = useTableFeatures(configuration);
22
+ const {
23
+ entityIdKey
24
+ } = useCollectionData();
25
+ return /*#__PURE__*/React.createElement(Table, {
26
+ dataHook: "auto-patterns-table",
27
+ search: search,
28
+ title: title,
29
+ state: state,
30
+ columns: columns,
31
+ customColumns: customColumns,
32
+ actionCell: actionCell,
33
+ filters: filters,
34
+ emptyState: emptyState,
35
+ onRowClick: item => {
36
+ navigateToEntityPage({
37
+ path: `/${item[entityIdKey]}`,
38
+ entity: item
39
+ });
40
+ }
41
+ });
42
+ };
43
+ //# sourceMappingURL=AutoPatternsTableContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Table","usePatternsNavigate","useTableFeatures","useCollectionData","AutoPatternsTableContent","_ref","configuration","navigateToEntityPage","state","columns","customColumns","search","title","emptyState","filters","actionCell","entityIdKey","createElement","dataHook","onRowClick","item","path","entity"],"sources":["../../../../src/components/AutoPatternsTable/AutoPatternsTableContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Table, usePatternsNavigate } from '@wix/patterns';\nimport { TableConfig } from '../../types';\nimport { useTableFeatures } from '../../hooks';\nimport { useCollectionData } from '../../providers';\n\nexport interface AutoPatternsTableContentProps {\n configuration: TableConfig;\n}\n\nexport const AutoPatternsTableContent = ({\n configuration,\n}: AutoPatternsTableContentProps) => {\n const { navigateToEntityPage } = usePatternsNavigate();\n\n const {\n state,\n columns,\n customColumns,\n search,\n title,\n emptyState,\n filters,\n actionCell,\n } = useTableFeatures(configuration);\n\n const { entityIdKey } = useCollectionData();\n\n return (\n <Table\n dataHook=\"auto-patterns-table\"\n search={search}\n title={title}\n state={state}\n columns={columns}\n customColumns={customColumns}\n actionCell={actionCell}\n filters={filters}\n emptyState={emptyState}\n onRowClick={(item) => {\n navigateToEntityPage({\n path: `/${item[entityIdKey]}`,\n entity: item,\n });\n }}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,mBAAmB,QAAQ,eAAe;AAE1D,SAASC,gBAAgB,QAAQ,aAAa;AAC9C,SAASC,iBAAiB,QAAQ,iBAAiB;AAMnD,OAAO,MAAMC,wBAAwB,GAAGC,IAAA,IAEH;EAAA,IAFI;IACvCC;EAC6B,CAAC,GAAAD,IAAA;EAC9B,MAAM;IAAEE;EAAqB,CAAC,GAAGN,mBAAmB,CAAC,CAAC;EAEtD,MAAM;IACJO,KAAK;IACLC,OAAO;IACPC,aAAa;IACbC,MAAM;IACNC,KAAK;IACLC,UAAU;IACVC,OAAO;IACPC;EACF,CAAC,GAAGb,gBAAgB,CAACI,aAAa,CAAC;EAEnC,MAAM;IAAEU;EAAY,CAAC,GAAGb,iBAAiB,CAAC,CAAC;EAE3C,oBACEJ,KAAA,CAAAkB,aAAA,CAACjB,KAAK;IACJkB,QAAQ,EAAC,qBAAqB;IAC9BP,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbJ,KAAK,EAAEA,KAAM;IACbC,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAc;IAC7BK,UAAU,EAAEA,UAAW;IACvBD,OAAO,EAAEA,OAAQ;IACjBD,UAAU,EAAEA,UAAW;IACvBM,UAAU,EAAGC,IAAI,IAAK;MACpBb,oBAAoB,CAAC;QACnBc,IAAI,EAAE,IAAID,IAAI,CAACJ,WAAW,CAAC,EAAE;QAC7BM,MAAM,EAAEF;MACV,CAAC,CAAC;IACJ;EAAE,CACH,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from './AutoPatternsTable';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../../src/components/AutoPatternsTable/index.ts"],"sourcesContent":["export * from './AutoPatternsTable';\n"],"mappings":"AAAA,cAAc,qBAAqB","ignoreList":[]}
@@ -1,2 +1,3 @@
1
1
  export * from '../react';
2
+ export { AutoPatternsApp } from '../components/AutoPatternsApp';
2
3
  //# sourceMappingURL=react.js.map