@wix/auto-patterns 1.23.0 → 1.25.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 (207) hide show
  1. package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +12 -323
  2. package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
  3. package/dist/cjs/components/AutoPatternsEntityPage/EditModeEntityPage.js +172 -0
  4. package/dist/cjs/components/AutoPatternsEntityPage/EditModeEntityPage.js.map +1 -0
  5. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.js +78 -0
  6. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.js.map +1 -0
  7. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js +119 -0
  8. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js.map +1 -0
  9. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.js +79 -0
  10. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.js.map +1 -0
  11. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/index.js +16 -0
  12. package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/index.js.map +1 -0
  13. package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.js +77 -0
  14. package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.js.map +1 -0
  15. package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js +109 -0
  16. package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js.map +1 -0
  17. package/dist/cjs/components/AutoPatternsEntityPage/ViewModeEntityPage.js +198 -0
  18. package/dist/cjs/components/AutoPatternsEntityPage/ViewModeEntityPage.js.map +1 -0
  19. package/dist/cjs/components/AutoPatternsEntityPage/index.js +12 -0
  20. package/dist/cjs/components/AutoPatternsEntityPage/index.js.map +1 -1
  21. package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js +2 -1
  22. package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
  23. package/dist/cjs/hooks/useActionCell.js +2 -1
  24. package/dist/cjs/hooks/useActionCell.js.map +1 -1
  25. package/dist/cjs/hooks/useBulkActionToolbar.js +2 -1
  26. package/dist/cjs/hooks/useBulkActionToolbar.js.map +1 -1
  27. package/dist/cjs/hooks/useCollectionPageActions.js +2 -1
  28. package/dist/cjs/hooks/useCollectionPageActions.js.map +1 -1
  29. package/dist/cjs/hooks/useEntityPageActions.js +106 -0
  30. package/dist/cjs/hooks/useEntityPageActions.js.map +1 -0
  31. package/dist/cjs/hooks/useEntityPageMoreActions.js +11 -1
  32. package/dist/cjs/hooks/useEntityPageMoreActions.js.map +1 -1
  33. package/dist/cjs/hooks/useNavigateEditEntityAction.js +50 -0
  34. package/dist/cjs/hooks/useNavigateEditEntityAction.js.map +1 -0
  35. package/dist/cjs/hooks/useNavigationUtils.js +12 -1
  36. package/dist/cjs/hooks/useNavigationUtils.js.map +1 -1
  37. package/dist/cjs/providers/ErrorContext.js +6 -3
  38. package/dist/cjs/providers/ErrorContext.js.map +1 -1
  39. package/dist/cjs/providers/PatternsWizardOverridesContext.js +1 -1
  40. package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
  41. package/dist/cjs/types/EntityPageConfig.js.map +1 -1
  42. package/dist/cjs/types/actions/actionCell.js.map +1 -1
  43. package/dist/cjs/types/actions/entityPageActions.js.map +1 -1
  44. package/dist/cjs/utils/actions/types.js.map +1 -1
  45. package/dist/docs/action_cell.md +11 -6
  46. package/dist/docs/app_config_structure.md +49 -4
  47. package/dist/docs/auto-patterns-guide.md +311 -43
  48. package/dist/docs/bulk_actions.md +7 -2
  49. package/dist/docs/collection_page_actions.md +14 -4
  50. package/dist/docs/entity_page.md +65 -1
  51. package/dist/docs/entity_page_actions.md +13 -11
  52. package/dist/docs/entity_page_view_actions.md +137 -0
  53. package/dist/docs/index.md +6 -2
  54. package/dist/docs/pages_configuration.md +1 -11
  55. package/dist/docs/sdk_utilities.md +11 -4
  56. package/dist/docs/wix_fqdn_custom_data_source.md +25 -5
  57. package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +4 -3
  58. package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
  59. package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +2 -1
  60. package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
  61. package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +9 -196
  62. package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
  63. package/dist/esm/components/AutoPatternsEntityPage/EditModeEntityPage.js +115 -0
  64. package/dist/esm/components/AutoPatternsEntityPage/EditModeEntityPage.js.map +1 -0
  65. package/dist/esm/components/AutoPatternsEntityPage/Fields/DateInput.js +10 -6
  66. package/dist/esm/components/AutoPatternsEntityPage/Fields/DateInput.js.map +1 -1
  67. package/dist/esm/components/AutoPatternsEntityPage/Fields/DateTime.js +23 -16
  68. package/dist/esm/components/AutoPatternsEntityPage/Fields/DateTime.js.map +1 -1
  69. package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +3 -2
  70. package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js.map +1 -1
  71. package/dist/esm/components/AutoPatternsEntityPage/Fields/ImageInput.js +9 -6
  72. package/dist/esm/components/AutoPatternsEntityPage/Fields/ImageInput.js.map +1 -1
  73. package/dist/esm/components/AutoPatternsEntityPage/Fields/LongText.js +8 -6
  74. package/dist/esm/components/AutoPatternsEntityPage/Fields/LongText.js.map +1 -1
  75. package/dist/esm/components/AutoPatternsEntityPage/Fields/Number.js +10 -8
  76. package/dist/esm/components/AutoPatternsEntityPage/Fields/Number.js.map +1 -1
  77. package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js +12 -10
  78. package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js.map +1 -1
  79. package/dist/esm/components/AutoPatternsEntityPage/Fields/Url.js +8 -6
  80. package/dist/esm/components/AutoPatternsEntityPage/Fields/Url.js.map +1 -1
  81. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.js +33 -0
  82. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.js.map +1 -0
  83. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js +70 -0
  84. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js.map +1 -0
  85. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.js +48 -0
  86. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.js.map +1 -0
  87. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/index.js +3 -0
  88. package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/index.js.map +1 -0
  89. package/dist/esm/components/AutoPatternsEntityPage/SkeletonEntity.js +7 -4
  90. package/dist/esm/components/AutoPatternsEntityPage/SkeletonEntity.js.map +1 -1
  91. package/dist/esm/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.js +31 -0
  92. package/dist/esm/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.js.map +1 -0
  93. package/dist/esm/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js +66 -0
  94. package/dist/esm/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js.map +1 -0
  95. package/dist/esm/components/AutoPatternsEntityPage/ViewModeEntityPage.js +111 -0
  96. package/dist/esm/components/AutoPatternsEntityPage/ViewModeEntityPage.js.map +1 -0
  97. package/dist/esm/components/AutoPatternsEntityPage/index.js +2 -0
  98. package/dist/esm/components/AutoPatternsEntityPage/index.js.map +1 -1
  99. package/dist/esm/components/ModalRenderer.js +2 -1
  100. package/dist/esm/components/ModalRenderer.js.map +1 -1
  101. package/dist/esm/components/modals/actions/BulkDeleteModal.js +12 -7
  102. package/dist/esm/components/modals/actions/BulkDeleteModal.js.map +1 -1
  103. package/dist/esm/components/modals/actions/CreateModal.js +11 -6
  104. package/dist/esm/components/modals/actions/CreateModal.js.map +1 -1
  105. package/dist/esm/components/modals/actions/EditModal.js +11 -6
  106. package/dist/esm/components/modals/actions/EditModal.js.map +1 -1
  107. package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js +6 -4
  108. package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
  109. package/dist/esm/dataSourceAdapters/cms/filterUtils.js +2 -1
  110. package/dist/esm/dataSourceAdapters/cms/filterUtils.js.map +1 -1
  111. package/dist/esm/dataSourceAdapters/cms/sortUtils.js +2 -2
  112. package/dist/esm/dataSourceAdapters/cms/sortUtils.js.map +1 -1
  113. package/dist/esm/hooks/useActionCell.js +14 -9
  114. package/dist/esm/hooks/useActionCell.js.map +1 -1
  115. package/dist/esm/hooks/useBaseTableFeatures.js +2 -1
  116. package/dist/esm/hooks/useBaseTableFeatures.js.map +1 -1
  117. package/dist/esm/hooks/useBulkActionToolbar.js +4 -3
  118. package/dist/esm/hooks/useBulkActionToolbar.js.map +1 -1
  119. package/dist/esm/hooks/useCollectionPageActions.js +5 -4
  120. package/dist/esm/hooks/useCollectionPageActions.js.map +1 -1
  121. package/dist/esm/hooks/useCollectionPageOnRowClickActions.js +1 -1
  122. package/dist/esm/hooks/useCollectionPageOnRowClickActions.js.map +1 -1
  123. package/dist/esm/hooks/useColumns.js +12 -7
  124. package/dist/esm/hooks/useColumns.js.map +1 -1
  125. package/dist/esm/hooks/useCommonCollectionFeatures.js +8 -7
  126. package/dist/esm/hooks/useCommonCollectionFeatures.js.map +1 -1
  127. package/dist/esm/hooks/useEmptyStates.js +6 -5
  128. package/dist/esm/hooks/useEmptyStates.js.map +1 -1
  129. package/dist/esm/hooks/useEntityPageActions.js +83 -0
  130. package/dist/esm/hooks/useEntityPageActions.js.map +1 -0
  131. package/dist/esm/hooks/useEntityPageMoreActions.js +12 -2
  132. package/dist/esm/hooks/useEntityPageMoreActions.js.map +1 -1
  133. package/dist/esm/hooks/useFilters.js +7 -7
  134. package/dist/esm/hooks/useFilters.js.map +1 -1
  135. package/dist/esm/hooks/useNavigateEditEntityAction.js +46 -0
  136. package/dist/esm/hooks/useNavigateEditEntityAction.js.map +1 -0
  137. package/dist/esm/hooks/useNavigationUtils.js +15 -3
  138. package/dist/esm/hooks/useNavigationUtils.js.map +1 -1
  139. package/dist/esm/hooks/usePagePath.js +4 -3
  140. package/dist/esm/hooks/usePagePath.js.map +1 -1
  141. package/dist/esm/hooks/useTableFeatures.js +2 -1
  142. package/dist/esm/hooks/useTableFeatures.js.map +1 -1
  143. package/dist/esm/providers/ErrorContext.js +4 -1
  144. package/dist/esm/providers/ErrorContext.js.map +1 -1
  145. package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
  146. package/dist/esm/providers/SchemaContext.js +3 -2
  147. package/dist/esm/providers/SchemaContext.js.map +1 -1
  148. package/dist/esm/providers/SchemaRegistryContext.js +1 -1
  149. package/dist/esm/providers/SchemaRegistryContext.js.map +1 -1
  150. package/dist/esm/types/EntityPageConfig.js.map +1 -1
  151. package/dist/esm/types/actions/actionCell.js.map +1 -1
  152. package/dist/esm/types/actions/entityPageActions.js.map +1 -1
  153. package/dist/esm/utils/actions/customAction.js +2 -1
  154. package/dist/esm/utils/actions/customAction.js.map +1 -1
  155. package/dist/esm/utils/actions/deleteAction.js +10 -5
  156. package/dist/esm/utils/actions/deleteAction.js.map +1 -1
  157. package/dist/esm/utils/actions/types.js.map +1 -1
  158. package/dist/esm/utils/filterCreators.js +11 -11
  159. package/dist/esm/utils/filterCreators.js.map +1 -1
  160. package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts.map +1 -1
  161. package/dist/types/components/AutoPatternsEntityPage/EditModeEntityPage.d.ts +6 -0
  162. package/dist/types/components/AutoPatternsEntityPage/EditModeEntityPage.d.ts.map +1 -0
  163. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.d.ts +11 -0
  164. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.d.ts.map +1 -0
  165. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.d.ts +13 -0
  166. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.d.ts.map +1 -0
  167. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.d.ts +8 -0
  168. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.d.ts.map +1 -0
  169. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/index.d.ts +3 -0
  170. package/dist/types/components/AutoPatternsEntityPage/RenderLayout/index.d.ts.map +1 -0
  171. package/dist/types/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.d.ts +8 -0
  172. package/dist/types/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.d.ts.map +1 -0
  173. package/dist/types/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.d.ts +8 -0
  174. package/dist/types/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.d.ts.map +1 -0
  175. package/dist/types/components/AutoPatternsEntityPage/ViewModeEntityPage.d.ts +8 -0
  176. package/dist/types/components/AutoPatternsEntityPage/ViewModeEntityPage.d.ts.map +1 -0
  177. package/dist/types/components/AutoPatternsEntityPage/index.d.ts +2 -0
  178. package/dist/types/components/AutoPatternsEntityPage/index.d.ts.map +1 -1
  179. package/dist/types/dataSourceAdapters/cms/cmsAdapter.d.ts.map +1 -1
  180. package/dist/types/hooks/useActionCell.d.ts.map +1 -1
  181. package/dist/types/hooks/useEntityPageActions.d.ts +9 -0
  182. package/dist/types/hooks/useEntityPageActions.d.ts.map +1 -0
  183. package/dist/types/hooks/useEntityPageHeaderTexts.d.ts.map +1 -1
  184. package/dist/types/hooks/useEntityPageMoreActions.d.ts +2 -2
  185. package/dist/types/hooks/useEntityPageMoreActions.d.ts.map +1 -1
  186. package/dist/types/hooks/useNavigateEditEntityAction.d.ts +6 -0
  187. package/dist/types/hooks/useNavigateEditEntityAction.d.ts.map +1 -0
  188. package/dist/types/hooks/useNavigationUtils.d.ts +1 -0
  189. package/dist/types/hooks/useNavigationUtils.d.ts.map +1 -1
  190. package/dist/types/providers/ErrorContext.d.ts +7 -0
  191. package/dist/types/providers/ErrorContext.d.ts.map +1 -1
  192. package/dist/types/providers/PatternsWizardOverridesContext.d.ts +2 -2
  193. package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +1 -1
  194. package/dist/types/types/EntityPageConfig.d.ts +20 -4
  195. package/dist/types/types/EntityPageConfig.d.ts.map +1 -1
  196. package/dist/types/types/actions/actionCell.d.ts +7 -1
  197. package/dist/types/types/actions/actionCell.d.ts.map +1 -1
  198. package/dist/types/types/actions/entityPageActions.d.ts +24 -5
  199. package/dist/types/types/actions/entityPageActions.d.ts.map +1 -1
  200. package/dist/types/utils/actions/customAction.d.ts +1 -1
  201. package/dist/types/utils/actions/customAction.d.ts.map +1 -1
  202. package/dist/types/utils/actions/resolveAction.d.ts +1 -0
  203. package/dist/types/utils/actions/resolveAction.d.ts.map +1 -1
  204. package/dist/types/utils/actions/types.d.ts +2 -1
  205. package/dist/types/utils/actions/types.d.ts.map +1 -1
  206. package/package.json +16 -15
  207. package/dist/docs/config_schema.md +0 -184
@@ -14,9 +14,9 @@ export const createDateTimeFilter = _ref => {
14
14
  component: DateRangeFilter,
15
15
  props: {
16
16
  ...commonFilterProps,
17
- mode: config?.mode,
18
- dateRangeOptions: config?.presets,
19
- filterByTime: config?.includeTime
17
+ mode: config == null ? void 0 : config.mode,
18
+ dateRangeOptions: config == null ? void 0 : config.presets,
19
+ filterByTime: config == null ? void 0 : config.includeTime
20
20
  }
21
21
  };
22
22
  };
@@ -43,10 +43,10 @@ export const createBooleanFilter = _ref2 => {
43
43
  ...commonFilterProps,
44
44
  data: [{
45
45
  id: 'checked',
46
- name: config?.trueLabel || 'Yes'
46
+ name: (config == null ? void 0 : config.trueLabel) || 'Yes'
47
47
  }, {
48
48
  id: 'unchecked',
49
- name: config?.falseLabel || 'No'
49
+ name: (config == null ? void 0 : config.falseLabel) || 'No'
50
50
  }]
51
51
  }
52
52
  };
@@ -65,9 +65,9 @@ export const createNumberFilter = _ref3 => {
65
65
  component: NumberRangeFilter,
66
66
  props: {
67
67
  ...commonFilterProps,
68
- min: config?.min,
69
- max: config?.max,
70
- decimal: config?.allowedDecimals
68
+ min: config == null ? void 0 : config.min,
69
+ max: config == null ? void 0 : config.max,
70
+ decimal: config == null ? void 0 : config.allowedDecimals
71
71
  }
72
72
  };
73
73
  };
@@ -83,10 +83,10 @@ export const createEnumFilter = _ref4 => {
83
83
  selectionMode,
84
84
  optionType
85
85
  } = config;
86
- const data = options?.map(option => ({
86
+ const data = (options == null ? void 0 : options.map(option => ({
87
87
  id: option.value,
88
88
  name: option.label
89
- })) ?? [];
89
+ }))) ?? [];
90
90
  const inlineComponentThreshold = 5;
91
91
  let component;
92
92
  if (selectionMode === 'single') {
@@ -126,7 +126,7 @@ export const createReferenceFilter = _ref5 => {
126
126
  config,
127
127
  additionalParams
128
128
  } = _ref5;
129
- const component = config?.selectionMode === 'single' ? AutoCompleteFilter : MultiSelectCollectionFilter;
129
+ const component = (config == null ? void 0 : config.selectionMode) === 'single' ? AutoCompleteFilter : MultiSelectCollectionFilter;
130
130
  return {
131
131
  key: id,
132
132
  fieldId,
@@ -1 +1 @@
1
- {"version":3,"names":["dateRangeFilter","idNameArrayFilter","numberRangeFilter","DateRangeFilter","RadioGroupFilter","NumberRangeFilter","AutoCompleteFilter","MultiSelectCheckboxFilter","MultiInlineCheckboxFilter","MultiSelectCollectionFilter","BooleanFilters","createDateTimeFilter","_ref","id","fieldId","commonFilterProps","config","key","filter","component","props","mode","dateRangeOptions","presets","filterByTime","includeTime","createBooleanFilter","_ref2","matches","fieldValue","filterValue","some","v","checked","unchecked","data","name","trueLabel","falseLabel","createNumberFilter","_ref3","min","max","decimal","allowedDecimals","createEnumFilter","_ref4","options","selectionMode","optionType","map","option","value","label","inlineComponentThreshold","length","collectionData","createReferenceFilter","_ref5","additionalParams","collectionId","referencedSchema"],"sources":["../../../src/utils/filterCreators.ts"],"sourcesContent":["import {\n dateRangeFilter,\n idNameArrayFilter,\n numberRangeFilter,\n DateRangeFilter,\n RadioGroupFilter,\n NumberRangeFilter,\n AutoCompleteFilter,\n MultiSelectCheckboxFilter,\n MultiInlineCheckboxFilter,\n MultiSelectCollectionFilter,\n} from '@wix/patterns';\nimport { BooleanFilters } from '../dataSourceAdapters/constants';\nimport { FilterOptions } from '../hooks/useFilters';\nimport { SchemaConfig } from '../types';\n\ninterface FilterOption {\n value: string;\n label: string;\n}\n\ninterface BaseFilterParams {\n id: string;\n fieldId: string;\n commonFilterProps: Record<string, any>;\n}\n\nexport const createDateTimeFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n mode?: 'ONLY_PREDEFINED' | 'ONLY_CUSTOM' | 'COMBINE';\n presets?: string[];\n includeTime?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: dateRangeFilter(),\n component: DateRangeFilter,\n props: {\n ...commonFilterProps,\n mode: config?.mode,\n dateRangeOptions: config?.presets,\n filterByTime: config?.includeTime,\n },\n});\n\nexport const createBooleanFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n trueLabel?: string;\n falseLabel?: string;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: idNameArrayFilter({\n matches: (fieldValue, filterValue) => {\n if (fieldValue) {\n return filterValue.some((v) => v.id === BooleanFilters.checked);\n }\n return filterValue.some((v) => v.id === BooleanFilters.unchecked);\n },\n }),\n component: RadioGroupFilter,\n props: {\n ...commonFilterProps,\n data: [\n {\n id: 'checked',\n name: config?.trueLabel || 'Yes',\n },\n {\n id: 'unchecked',\n name: config?.falseLabel || 'No',\n },\n ],\n },\n});\n\nexport const createNumberFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: numberRangeFilter(),\n component: NumberRangeFilter,\n props: {\n ...commonFilterProps,\n min: config?.min,\n max: config?.max,\n decimal: config?.allowedDecimals,\n },\n});\n\nexport const createEnumFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config: {\n options?: FilterOption[];\n selectionMode?: 'single' | 'multiple';\n optionType?: 'select' | 'radio' | 'checkbox' | 'inlineCheckbox';\n };\n}): FilterOptions => {\n const { options, selectionMode, optionType } = config;\n const data =\n options?.map((option: FilterOption) => ({\n id: option.value,\n name: option.label,\n })) ?? [];\n\n const inlineComponentThreshold = 5;\n\n let component;\n\n if (selectionMode === 'single') {\n component =\n data.length > inlineComponentThreshold\n ? AutoCompleteFilter\n : RadioGroupFilter;\n if (optionType === 'select') {\n component = AutoCompleteFilter;\n } else if (optionType === 'radio') {\n component = RadioGroupFilter;\n }\n } else {\n component =\n data.length > inlineComponentThreshold\n ? MultiSelectCheckboxFilter\n : MultiInlineCheckboxFilter;\n if (optionType === 'select') {\n component = MultiSelectCollectionFilter;\n } else if (optionType === 'inlineCheckbox') {\n component = MultiInlineCheckboxFilter;\n } else if (optionType === 'checkbox') {\n component = MultiSelectCheckboxFilter;\n }\n }\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionData: data,\n props: { ...commonFilterProps, data },\n };\n};\n\nexport const createReferenceFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n additionalParams,\n}: BaseFilterParams & {\n config?: {\n selectionMode?: 'single' | 'multiple';\n };\n additionalParams: {\n referencedSchema: SchemaConfig;\n };\n}): FilterOptions => {\n const component =\n config?.selectionMode === 'single'\n ? AutoCompleteFilter\n : MultiSelectCollectionFilter;\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionId: additionalParams.referencedSchema.id,\n props: commonFilterProps,\n };\n};\n"],"mappings":"AAAA,SACEA,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,yBAAyB,EACzBC,yBAAyB,EACzBC,2BAA2B,QACtB,eAAe;AACtB,SAASC,cAAc,QAAQ,iCAAiC;AAehE,OAAO,MAAMC,oBAAoB,GAAGC,IAAA;EAAA,IAAC;IACnCC,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC;EAOF,CAAC,GAAAJ,IAAA;EAAA,OAAqB;IACpBK,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAElB,eAAe,CAAC,CAAC;IACzBmB,SAAS,EAAEhB,eAAe;IAC1BiB,KAAK,EAAE;MACL,GAAGL,iBAAiB;MACpBM,IAAI,EAAEL,MAAM,EAAEK,IAAI;MAClBC,gBAAgB,EAAEN,MAAM,EAAEO,OAAO;MACjCC,YAAY,EAAER,MAAM,EAAES;IACxB;EACF,CAAC;AAAA,CAAC;AAEF,OAAO,MAAMC,mBAAmB,GAAGC,KAAA;EAAA,IAAC;IAClCd,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC;EAMF,CAAC,GAAAW,KAAA;EAAA,OAAqB;IACpBV,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAEjB,iBAAiB,CAAC;MACxB2B,OAAO,EAAEA,CAACC,UAAU,EAAEC,WAAW,KAAK;QACpC,IAAID,UAAU,EAAE;UACd,OAAOC,WAAW,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACnB,E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AG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAEjB,iBAAiB,CAAC,CAAC;IAC3BkB,SAAS;IACTyC,YAAY,EAAED,gBAAgB,CAACE,gBAAgB,CAAChD,EAAE;IAClDO,KAAK,EAAEL;EACT,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["dateRangeFilter","idNameArrayFilter","numberRangeFilter","DateRangeFilter","RadioGroupFilter","NumberRangeFilter","AutoCompleteFilter","MultiSelectCheckboxFilter","MultiInlineCheckboxFilter","MultiSelectCollectionFilter","BooleanFilters","createDateTimeFilter","_ref","id","fieldId","commonFilterProps","config","key","filter","component","props","mode","dateRangeOptions","presets","filterByTime","includeTime","createBooleanFilter","_ref2","matches","fieldValue","filterValue","some","v","checked","unchecked","data","name","trueLabel","falseLabel","createNumberFilter","_ref3","min","max","decimal","allowedDecimals","createEnumFilter","_ref4","options","selectionMode","optionType","map","option","value","label","inlineComponentThreshold","length","collectionData","createReferenceFilter","_ref5","additionalParams","collectionId","referencedSchema"],"sources":["../../../src/utils/filterCreators.ts"],"sourcesContent":["import {\n dateRangeFilter,\n idNameArrayFilter,\n numberRangeFilter,\n DateRangeFilter,\n RadioGroupFilter,\n NumberRangeFilter,\n AutoCompleteFilter,\n MultiSelectCheckboxFilter,\n MultiInlineCheckboxFilter,\n MultiSelectCollectionFilter,\n} from '@wix/patterns';\nimport { BooleanFilters } from '../dataSourceAdapters/constants';\nimport { FilterOptions } from '../hooks/useFilters';\nimport { SchemaConfig } from '../types';\n\ninterface FilterOption {\n value: string;\n label: string;\n}\n\ninterface BaseFilterParams {\n id: string;\n fieldId: string;\n commonFilterProps: Record<string, any>;\n}\n\nexport const createDateTimeFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n mode?: 'ONLY_PREDEFINED' | 'ONLY_CUSTOM' | 'COMBINE';\n presets?: string[];\n includeTime?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: dateRangeFilter(),\n component: DateRangeFilter,\n props: {\n ...commonFilterProps,\n mode: config?.mode,\n dateRangeOptions: config?.presets,\n filterByTime: config?.includeTime,\n },\n});\n\nexport const createBooleanFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n trueLabel?: string;\n falseLabel?: string;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: idNameArrayFilter({\n matches: (fieldValue, filterValue) => {\n if (fieldValue) {\n return filterValue.some((v) => v.id === BooleanFilters.checked);\n }\n return filterValue.some((v) => v.id === BooleanFilters.unchecked);\n },\n }),\n component: RadioGroupFilter,\n props: {\n ...commonFilterProps,\n data: [\n {\n id: 'checked',\n name: config?.trueLabel || 'Yes',\n },\n {\n id: 'unchecked',\n name: config?.falseLabel || 'No',\n },\n ],\n },\n});\n\nexport const createNumberFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: numberRangeFilter(),\n component: NumberRangeFilter,\n props: {\n ...commonFilterProps,\n min: config?.min,\n max: config?.max,\n decimal: config?.allowedDecimals,\n },\n});\n\nexport const createEnumFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config: {\n options?: FilterOption[];\n selectionMode?: 'single' | 'multiple';\n optionType?: 'select' | 'radio' | 'checkbox' | 'inlineCheckbox';\n };\n}): FilterOptions => {\n const { options, selectionMode, optionType } = config;\n const data =\n options?.map((option: FilterOption) => ({\n id: option.value,\n name: option.label,\n })) ?? [];\n\n const inlineComponentThreshold = 5;\n\n let component;\n\n if (selectionMode === 'single') {\n component =\n data.length > inlineComponentThreshold\n ? AutoCompleteFilter\n : RadioGroupFilter;\n if (optionType === 'select') {\n component = AutoCompleteFilter;\n } else if (optionType === 'radio') {\n component = RadioGroupFilter;\n }\n } else {\n component =\n data.length > inlineComponentThreshold\n ? MultiSelectCheckboxFilter\n : MultiInlineCheckboxFilter;\n if (optionType === 'select') {\n component = MultiSelectCollectionFilter;\n } else if (optionType === 'inlineCheckbox') {\n component = MultiInlineCheckboxFilter;\n } else if (optionType === 'checkbox') {\n component = MultiSelectCheckboxFilter;\n }\n }\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionData: data,\n props: { ...commonFilterProps, data },\n };\n};\n\nexport const createReferenceFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n additionalParams,\n}: BaseFilterParams & {\n config?: {\n selectionMode?: 'single' | 'multiple';\n };\n additionalParams: {\n referencedSchema: SchemaConfig;\n };\n}): FilterOptions => {\n const component =\n config?.selectionMode === 'single'\n ? AutoCompleteFilter\n : MultiSelectCollectionFilter;\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionId: additionalParams.referencedSchema.id,\n props: commonFilterProps,\n };\n};\n"],"mappings":"AAAA,SACEA,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,yBAAyB,EACzBC,yBAAyB,EACzBC,2BAA2B,QACtB,eAAe;AACtB,SAASC,cAAc,QAAQ,iCAAiC;AAehE,OAAO,MAAMC,oBAAoB,GAAGC,IAAA;EAAA,IAAC;IACnCC,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC;EAOF,CAAC,GAAAJ,IAAA;EAAA,OAAqB;IACpBK,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAElB,eAAe,CAAC,CAAC;IACzBmB,SAAS,EAAEhB,eAAe;IAC1BiB,KAAK,EAAE;MACL,GAAGL,iBAAiB;MACpBM,IAAI,EAAEL,MAAM,oBAANA,MAAM,CAAEK,IAAI;MAClBC,gBAAgB,EAAEN,MAAM,oBAANA,MAAM,CAAEO,OAAO;MACjCC,YAAY,EAAER,MAAM,oBAANA,M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AAyB;IACvC;EACF;EAEA,OAAO;IACLU,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAEjB,iBAAiB,CAAC,CAAC;IAC3BkB,SAAS;IACTqC,cAAc,EAAErB,IAAI;IACpBf,KAAK,EAAE;MAAE,GAAGL,iBAAiB;MAAEoB;IAAK;EACtC,CAAC;AACH,CAAC;AAED,OAAO,MAAMsB,qBAAqB,GAAGC,KAAA,IAahB;EAAA,IAbiB;IACpC7C,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC,MAAM;IACN2C;EAQF,CAAC,GAAAD,KAAA;EACC,MAAMvC,SAAS,GACb,CAAAH,MAAM,oBAANA,MAAM,CAAEgC,aAAa,MAAK,QAAQ,GAC9B1C,kBAAkB,GAClBG,2BAA2B;EAEjC,OAAO;IACLQ,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAEjB,iBAAiB,CAAC,CAAC;IAC3BkB,SAAS;IACTyC,YAAY,EAAED,gBAAgB,CAACE,gBAAgB,CAAChD,EAAE;IAClDO,KAAK,EAAEL;EACT,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AutoPatternsEntityPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAc,gBAAgB,EAAiB,MAAM,aAAa,CAAC;AA2I1E,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAgIxE,CAAC"}
1
+ {"version":3,"file":"AutoPatternsEntityPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAQxE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { EditEntityPageConfig } from '../../types';
3
+ export declare const EditModeEntityPage: React.FC<{
4
+ configuration: EditEntityPageConfig;
5
+ }>;
6
+ //# sourceMappingURL=EditModeEntityPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditModeEntityPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/EditModeEntityPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAgB/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC;IACxC,aAAa,EAAE,oBAAoB,CAAC;CACrC,CAgIA,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { CardLayout } from '../../../types';
3
+ import { BaseInputRef } from '../Fields/types';
4
+ export interface RenderLayoutCardProps {
5
+ layout: CardLayout;
6
+ sectionId: string;
7
+ cardIndex: number;
8
+ setInputRef: (id: string, input: BaseInputRef) => void;
9
+ }
10
+ export declare const RenderLayoutCard: React.FC<RenderLayoutCardProps>;
11
+ //# sourceMappingURL=RenderLayoutCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderLayoutCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmC5D,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { LayoutContent } from '../../../types';
3
+ import { BaseInputRef } from '../Fields/types';
4
+ export interface RenderLayoutContentProps {
5
+ content: LayoutContent;
6
+ level: number;
7
+ sectionId: string;
8
+ cardIndex: number;
9
+ contentIndex: number;
10
+ setInputRef: (id: string, input: BaseInputRef) => void;
11
+ }
12
+ export declare const RenderLayoutContent: React.FC<RenderLayoutContentProps>;
13
+ //# sourceMappingURL=RenderLayoutContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderLayoutContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgFlE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const RenderViewField: React.FC<{
3
+ field: any;
4
+ fieldId: string;
5
+ entity: any;
6
+ span?: number;
7
+ }>;
8
+ //# sourceMappingURL=RenderViewField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderViewField.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CA6CA,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './RenderLayoutCard';
2
+ export * from './RenderLayoutContent';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/RenderLayout/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { RenderLayoutCardProps } from '../RenderLayout';
3
+ interface RenderViewLayoutCardProps extends Omit<RenderLayoutCardProps, 'setInputRef'> {
4
+ entity: Record<string, any>;
5
+ }
6
+ export declare const RenderViewLayoutCard: React.FC<RenderViewLayoutCardProps>;
7
+ export {};
8
+ //# sourceMappingURL=RenderViewLayoutCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderViewLayoutCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,UAAU,yBACR,SAAQ,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAGD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAmCpE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { RenderLayoutContentProps } from '../RenderLayout';
3
+ interface RenderViewLayoutContentProps extends Omit<RenderLayoutContentProps, 'setInputRef'> {
4
+ entity: Record<string, any>;
5
+ }
6
+ export declare const RenderViewLayoutContent: React.FC<RenderViewLayoutContentProps>;
7
+ export {};
8
+ //# sourceMappingURL=RenderViewLayoutContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderViewLayoutContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,UAAU,4BACR,SAAQ,IAAI,CAAC,wBAAwB,EAAE,aAAa,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAGD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAC5C,4BAA4B,CAmE7B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ViewEntityPageConfig } from '../../types';
3
+ interface ViewModeEntityPageProps {
4
+ configuration: ViewEntityPageConfig;
5
+ }
6
+ export declare const ViewModeEntityPage: React.FC<ViewModeEntityPageProps>;
7
+ export {};
8
+ //# sourceMappingURL=ViewModeEntityPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewModeEntityPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/ViewModeEntityPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAYnD,UAAU,uBAAuB;IAC/B,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAGD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsHhE,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from './AutoPatternsEntityPage';
2
+ export * from './ViewModeEntityPage';
3
+ export * from './RenderLayout';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cmsAdapter.d.ts","sourceRoot":"","sources":["../../../../src/dataSourceAdapters/cms/cmsAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,WAAW,EAAS,MAAM,WAAW,CAAC;AAG/C,eAAO,MAAM,+BAA+B,EAAE,OAAO,CACnD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAgB5C,CAAC;AAEF,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,YAAY,CAAC,CAkGvB"}
1
+ {"version":3,"file":"cmsAdapter.d.ts","sourceRoot":"","sources":["../../../../src/dataSourceAdapters/cms/cmsAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,WAAW,EAAS,MAAM,WAAW,CAAC;AAI/C,eAAO,MAAM,+BAA+B,EAAE,OAAO,CACnD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAgB5C,CAAC;AAEF,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,YAAY,CAAC,CAoGvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useActionCell.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionCell.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,eAAO,MAAM,aAAa,GAAI,2BAG3B,mBAAmB,4CA4GrB,CAAC"}
1
+ {"version":3,"file":"useActionCell.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionCell.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,eAAO,MAAM,aAAa,GAAI,2BAG3B,mBAAmB,4CA8GrB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ActionsSDK, EntityPageConfig } from '../types';
3
+ export interface UseEntityPageActionsParams {
4
+ entityPageActions: EntityPageConfig['actions'];
5
+ entity: Record<string, any>;
6
+ sdk: ActionsSDK;
7
+ }
8
+ export declare const useEntityPageActions: ({ entityPageActions, entity, sdk, }: UseEntityPageActionsParams) => React.JSX.Element | null;
9
+ //# sourceMappingURL=useEntityPageActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEntityPageActions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EACL,UAAU,EAEV,gBAAgB,EAIjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,eAAO,MAAM,oBAAoB,GAAI,qCAIlC,0BAA0B,6BA2G5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityPageHeaderTexts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageHeaderTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,wBAAwB,GAAI,8CAItC;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;;;;;;;;iBAOS,CAAP;;;CASF,CAAC"}
1
+ {"version":3,"file":"useEntityPageHeaderTexts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageHeaderTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,wBAAwB,GAAI,8CAItC;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;;;;;;;;iBAQoC,CAAC;;;CAQrC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { ActionsSDK } from '../types';
2
- import { EntityPageMoreActions } from '../types/actions';
3
2
  import { MoreActionsItem } from '@wix/patterns';
4
3
  import { FieldValues, UseFormReturn } from '@wix/patterns/form';
5
- export declare function useEntityPageMoreActions(moreActions: EntityPageMoreActions | undefined, entity: Record<string, any>, sdk: ActionsSDK, form: UseFormReturn<FieldValues, any, undefined>): MoreActionsItem[][];
4
+ import { CustomActionConfig, DividerActionConfig, UpdateActionConfig } from '../types/actions/base';
5
+ export declare function useEntityPageMoreActions(moreActions: (CustomActionConfig | UpdateActionConfig | DividerActionConfig)[] | undefined, entity: Record<string, any>, sdk: ActionsSDK, form?: UseFormReturn<FieldValues, any, undefined>): MoreActionsItem[][];
6
6
  //# sourceMappingURL=useEntityPageMoreActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEntityPageMoreActions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageMoreActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGhE,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,uBAuDjD"}
1
+ {"version":3,"file":"useEntityPageMoreActions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageMoreActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AAQtD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,wBAAwB,CACtC,WAAW,EACP,CAAC,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC,EAAE,GACjE,SAAS,EACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,GAAG,EAAE,UAAU,EACf,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,uBAiElD"}
@@ -0,0 +1,6 @@
1
+ import { UpdateActionConfig, ViewEntityPageConfig } from '../types';
2
+ export declare const useNavigateEditEntityAction: ({ displayName, configuration, }: {
3
+ displayName: string;
4
+ configuration: ViewEntityPageConfig;
5
+ }) => (import("../types").DividerActionConfig | UpdateActionConfig | import("../types").CustomActionConfig)[];
6
+ //# sourceMappingURL=useNavigateEditEntityAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigateEditEntityAction.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigateEditEntityAction.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGpE,eAAO,MAAM,2BAA2B,GAAI,iCAGzC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,oBAAoB,CAAC;CACrC,4GA4CA,CAAC"}
@@ -4,6 +4,7 @@ export type NavigateToEntityPageFunc = (args: {
4
4
  }) => void;
5
5
  export declare const useNavigation: () => {
6
6
  navigateToEntityPage: ({ item, entityPageId }: any) => void;
7
+ navigateToCollectionPage: (parentPageId: string) => void;
7
8
  getParentPagePath: (parentPageId?: string) => string | undefined;
8
9
  getPagePath: (pageId?: string) => string | undefined;
9
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useNavigationUtils.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigationUtils.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAAG,CAAC,IAAI,EAAE;IAC5C,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAK,IAAI,CAAC;AAEX,eAAO,MAAM,aAAa;;uCAiCN,MAAM,KAAG,MAAM,GAAG,SAAS;;CAW9C,CAAC"}
1
+ {"version":3,"file":"useNavigationUtils.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigationUtils.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAAG,CAAC,IAAI,EAAE;IAC5C,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAK,IAAI,CAAC;AAEX,eAAO,MAAM,aAAa;;6CAmCP,MAAM;uCAaL,MAAM,KAAG,MAAM,GAAG,SAAS;;CAY9C,CAAC"}
@@ -1,4 +1,11 @@
1
1
  import React, { ReactNode } from 'react';
2
+ export interface ErrorResponse extends Error {
3
+ details: {
4
+ applicationError: {
5
+ description: string;
6
+ };
7
+ };
8
+ }
2
9
  interface ErrorContextType {
3
10
  showError: (error: Error) => void;
4
11
  clearError: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ErrorContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKZ,SAAS,EACV,MAAM,OAAO,CAAC;AAQf,UAAU,gBAAgB;IACxB,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAID,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAgC3D,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,gBAM3B,CAAC"}
1
+ {"version":3,"file":"ErrorContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ErrorContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKZ,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,OAAO,EAAE;QACP,gBAAgB,EAAE;YAChB,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAOD,UAAU,gBAAgB;IACxB,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAID,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAkC3D,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,gBAM3B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { CustomComponentProps, CustomActionCellActionResolver, CustomEntityPageMoreActionsActionResolver, CustomBulkActionsActionResolver, CustomActionCollectionPageActionResolver, CustomActionCollectionPageActionOnRowClickResolver, IColumnValue, SchemaConfig } from '../types';
2
+ import { CustomComponentProps, CustomActionCellPrimaryActionResolver, CustomActionCellSecondaryActionResolver, CustomEntityPageActionResolver, CustomBulkActionsActionResolver, CustomActionCollectionPageActionResolver, CustomActionCollectionPageActionOnRowClickResolver, IColumnValue, SchemaConfig } from '../types';
3
3
  import { Section } from '@wix/patterns';
4
4
  export interface PatternsWizardOverridesContextProps {
5
- actions?: Record<string, CustomActionCellActionResolver | CustomBulkActionsActionResolver | CustomEntityPageMoreActionsActionResolver | CustomActionCollectionPageActionResolver | CustomActionCollectionPageActionOnRowClickResolver>;
5
+ actions?: Record<string, CustomActionCellPrimaryActionResolver | CustomActionCellSecondaryActionResolver | CustomBulkActionsActionResolver | CustomEntityPageActionResolver | CustomActionCollectionPageActionResolver | CustomActionCollectionPageActionOnRowClickResolver>;
6
6
  columns?: Record<string, (props: IColumnValue<any>) => void>;
7
7
  modals?: Record<string, React.FC<any>>;
8
8
  emptyState?: Record<string, () => void>;
@@ -1 +1 @@
1
- {"version":3,"file":"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AAK,CAAC,EAAE,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,mCAAmC,CAAC;CAC5C,CAMA,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAC1C,mCAAmC,GACnC,SAEH,CAAC"}
1
+ {"version":3,"file":"PatternsWizardOverridesContext.d.ts","sourceRoot":"","sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,qCAAqC,EACrC,uCAAuC,EACvC,8BAA8B,EAC9B,+BAA+B,EAC/B,wCAAwC,EACxC,kDAAkD,EAClD,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACJ,qCAAqC,GACrC,uCAAuC,GACvC,+BAA+B,GAC/B,8BAA8B,GAC9B,wCAAwC,GACxC,kDAAkD,CACrD,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CACxB,MAAM,EACN,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,YAAY,CAAC,CAC9D,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC;CACnD;AAMD,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,mCAAmC,CAAC;CAC5C,CAMA,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAC1C,mCAAmC,GACnC,SAEH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { FieldValues, UseFormReturn } from '@wix/patterns/form';
2
- import { EntityPageMoreActions } from './actions/entityPageActions';
2
+ import { EntityPageMoreActions, EntityPagePrimaryActions, EntityPageSecondaryActions } from './actions/entityPageActions';
3
3
  import { BaseCollectionConfig } from './types';
4
- export type EntityPageConfig = {
4
+ export type EntityPageBaseConfig = {
5
5
  route: {
6
6
  path: string;
7
7
  params: {
@@ -23,8 +23,24 @@ export type EntityPageConfig = {
23
23
  main: CardLayout[];
24
24
  sidebar?: CardLayout[];
25
25
  };
26
- moreActions?: EntityPageMoreActions;
27
26
  } & BaseCollectionConfig;
27
+ export type EditEntityPageConfig = EntityPageBaseConfig & {
28
+ mode?: 'edit';
29
+ actions?: {
30
+ primaryActions?: never;
31
+ secondaryActions?: never;
32
+ moreActions?: EntityPageMoreActions;
33
+ };
34
+ };
35
+ export type ViewEntityPageConfig = EntityPageBaseConfig & {
36
+ mode: 'view';
37
+ actions?: {
38
+ primaryActions?: EntityPagePrimaryActions;
39
+ secondaryActions?: EntityPageSecondaryActions;
40
+ moreActions?: EntityPageMoreActions;
41
+ };
42
+ };
43
+ export type EntityPageConfig = EditEntityPageConfig | ViewEntityPageConfig;
28
44
  export interface CardLayout {
29
45
  type: 'card';
30
46
  card: {
@@ -61,7 +77,7 @@ interface ComponentItemContent {
61
77
  }
62
78
  export interface CustomComponentProps {
63
79
  entity?: Record<string, any>;
64
- form: UseFormReturn<FieldValues, any, undefined>;
80
+ form?: UseFormReturn<FieldValues, any, undefined>;
65
81
  }
66
82
  export {};
67
83
  //# sourceMappingURL=EntityPageConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageConfig.d.ts","sourceRoot":"","sources":["../../../src/types/EntityPageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE;YACN,EAAE,EAAE,MAAM,CAAC;SACZ,CAAC;KACH,CAAC;IACF,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE;YACV,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,UAAU,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;KACxB,CAAC;IACF,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC,GAAG,oBAAoB,CAAC;AAEzB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,QAAQ,EAAE,aAAa,EAAE,CAAC;KAC3B,CAAC;CACH;AAED,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,CAAC;AAEzB,UAAU,YAAY;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,aAAa,EAAE,CAAC;KAC3B,CAAC;CACH;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,IAAI,EAAE,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;CAClD"}
1
+ {"version":3,"file":"EntityPageConfig.d.ts","sourceRoot":"","sources":["../../../src/types/EntityPageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE;YACN,EAAE,EAAE,MAAM,CAAC;SACZ,CAAC;KACH,CAAC;IACF,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,C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AC;IACd,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,aAAa,EAAE,CAAC;KAC3B,CAAC;CACH;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;CACnD"}
@@ -1,5 +1,6 @@
1
1
  import { CustomActionModalProps, CustomActionParams, ResolvedAction } from '../../exports/types';
2
2
  import { CustomActionConfig, DeleteActionConfig, UpdateActionConfig, DividerActionConfig } from './base';
3
+ import { IconElement } from '@wix/design-system';
3
4
  export type ActionCellItemConfig = UpdateActionConfig | CustomActionConfig | DeleteActionConfig;
4
5
  export interface ActionCellPrimaryAction {
5
6
  item: ActionCellItemConfig;
@@ -14,11 +15,16 @@ export interface ActionCellConfig {
14
15
  primaryAction?: ActionCellPrimaryAction;
15
16
  secondaryActions?: ActionCellSecondaryActions;
16
17
  }
18
+ export interface ResolvedActionCellPrimaryAction extends Omit<ResolvedAction, 'icon'> {
19
+ prefixIcon?: IconElement;
20
+ suffixIcon?: IconElement;
21
+ }
17
22
  export interface ActionCellActionParams {
18
23
  item: any;
19
24
  }
20
25
  export type CustomActionCellActionParams = CustomActionParams<ActionCellActionParams>;
21
- export type CustomActionCellActionResolver = (params: CustomActionCellActionParams) => ResolvedAction;
26
+ export type CustomActionCellPrimaryActionResolver = (params: CustomActionCellActionParams) => ResolvedActionCellPrimaryAction;
27
+ export type CustomActionCellSecondaryActionResolver = (params: CustomActionCellActionParams) => ResolvedAction;
22
28
  export interface CustomActionCellActionModalProps extends CustomActionModalProps {
23
29
  actionParams: ActionCellActionParams;
24
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"actionCell.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/actionCell.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,oBAAoB,GAC5B,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,EAAE,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,GAAG,CAAC;CACX;AAED,MAAM,MAAM,4BAA4B,GACtC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7C,MAAM,MAAM,8BAA8B,GAAG,CAC3C,MAAM,EAAE,4BAA4B,KACjC,cAAc,CAAC;AAEpB,MAAM,WAAW,gCACf,SAAQ,sBAAsB;IAC9B,YAAY,EAAE,sBAAsB,CAAC;CACtC"}
1
+ {"version":3,"file":"actionCell.d.ts","sourceR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sB,CAAC;CACtC"}
@@ -1,11 +1,30 @@
1
1
  import { FieldValues, UseFormReturn } from '@wix/patterns/form';
2
2
  import { CustomActionParams, ResolvedAction } from '../..';
3
- import { CustomActionConfig, DividerActionConfig } from './base';
3
+ import { CreateActionConfig, CustomActionConfig, DividerActionConfig } from './base';
4
4
  export type EntityPageMoreActions = (CustomActionConfig | DividerActionConfig)[];
5
- export interface EntityPageMoreActionsActionParams {
5
+ export type EntityPageActionConfig = CreateActionConfig | CustomActionConfig;
6
+ type EntityPageAction = {
7
+ type: 'action';
8
+ action: {
9
+ item: EntityPageActionConfig;
10
+ };
11
+ menu?: never;
12
+ };
13
+ type EntityPageMenu = {
14
+ type: 'menu';
15
+ menu: {
16
+ label: string;
17
+ items: (EntityPageActionConfig | DividerActionConfig)[];
18
+ };
19
+ action?: never;
20
+ };
21
+ export type EntityPagePrimaryActions = EntityPageAction | EntityPageMenu;
22
+ export type EntityPageSecondaryActions = EntityPageAction | EntityPageMenu;
23
+ export interface EntityPageActionParams {
6
24
  entity: any;
7
- form: UseFormReturn<FieldValues, any, undefined>;
25
+ form?: UseFormReturn<FieldValues, any, undefined>;
8
26
  }
9
- export type CustomEntityPageMoreActionsActionParams = CustomActionParams<EntityPageMoreActionsActionParams>;
10
- export type CustomEntityPageMoreActionsActionResolver = (params: CustomEntityPageMoreActionsActionParams) => ResolvedAction;
27
+ export type CustomEntityPageActionParams = CustomActionParams<EntityPageActionParams>;
28
+ export type CustomEntityPageActionResolver = (params: CustomEntityPageActionParams) => ResolvedAction;
29
+ export {};
11
30
  //# sourceMappingURL=entityPageActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entityPageActions.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/entityPageActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAEjE,MAAM,MAAM,qBAAqB,GAAG,CAChC,kBAAkB,GAClB,mBAAmB,CACtB,EAAE,CAAC;AAEJ,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;CAClD;AAED,MAAM,MAAM,uCAAuC,GACjD,kBAAkB,CAAC,iCAAiC,CAAC,CAAC;AAExD,MAAM,MAAM,yCAAyC,GAAG,CACtD,MAAM,EAAE,uCAAuC,KAC5C,cAAc,CAAC"}
1
+ {"version":3,"file":"entityPageActions.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/entityPageActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,qBAAqB,GAAG,CAChC,kBAAkB,GAClB,mBAAmB,CACtB,EAAE,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAE7E,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE;QACN,IAAI,EAAE,sBAAsB,CAAC;KAC9B,CAAC;IACF,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,sBAAsB,GAAG,mBAAmB,CAAC,EAAE,CAAC;KACzD,CAAC;IACF,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AACzE,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAE3E,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;CACnD;AAED,MAAM,MAAM,4BAA4B,GACtC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7C,MAAM,MAAM,8BAA8B,GAAG,CAC3C,MAAM,EAAE,4BAA4B,KACjC,cAAc,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { CustomActionParams } from './types';
2
- export declare const customAction: (params: CustomActionParams<any>) => import("./types").ResolvedAction | null;
2
+ export declare const customAction: (params: CustomActionParams<any>) => import("./types").ResolvedAction | import("../..").ResolvedActionCellPrimaryAction | null;
3
3
  //# sourceMappingURL=customAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customAction.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/customAction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,YAAY,GAAI,QAAQ,kBAAkB,CAAC,GAAG,CAAC,4CAa3D,CAAC"}
1
+ {"version":3,"file":"customAction.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/customAction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,YAAY,GAAI,QAAQ,kBAAkB,CAAC,GAAG,CAAC,8FAa3D,CAAC"}
@@ -5,6 +5,7 @@ export declare const resolveAction: (actionConfig: BaseActionItemConfig, action:
5
5
  icon?: import("@wix/design-system").IconElement | undefined;
6
6
  onClick?: (() => void) | undefined;
7
7
  disabled?: boolean | undefined;
8
+ hidden?: boolean | undefined;
8
9
  tooltip?: string | undefined;
9
10
  };
10
11
  //# sourceMappingURL=resolveAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveAction.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/resolveAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnE,eAAO,MAAM,aAAa,GACxB,cAAc,oBAAoB,EAClC,QAAQ,OAAO,CAAC,cAAc,CAAC;;;;;;;CAOhC,CAAC"}
1
+ {"version":3,"file":"resolveAction.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/resolveAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnE,eAAO,MAAM,aAAa,GACxB,cAAc,oBAAoB,EAClC,QAAQ,OAAO,CAAC,cAAc,CAAC;;;;;;;;CAOhC,CAAC"}
@@ -6,6 +6,7 @@ export interface ResolvedAction {
6
6
  icon: IconElement;
7
7
  onClick: () => void;
8
8
  disabled?: boolean;
9
+ hidden?: boolean;
9
10
  tooltip?: string;
10
11
  skin?: string;
11
12
  }
@@ -38,7 +39,7 @@ export interface BulkDeleteActionParams extends BaseActionParams {
38
39
  export interface DeleteActionParams extends ActionCellBaseParams {
39
40
  action: DeleteActionConfig;
40
41
  }
41
- export interface UpdateActionParams extends ActionCellBaseParams {
42
+ export interface UpdateActionParams extends BaseActionParams {
42
43
  action: UpdateActionConfig;
43
44
  }
44
45
  export interface CreateActionParams extends BaseActionParams {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACR,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