@wix/auto-patterns 1.25.0 → 1.27.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 (118) hide show
  1. package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js +16 -7
  2. package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -1
  3. package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +2 -2
  4. package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
  5. package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +58 -4
  6. package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
  7. package/dist/cjs/components/AutoPatternsEntityPage/EditModeEntityPage.js +10 -9
  8. package/dist/cjs/components/AutoPatternsEntityPage/EditModeEntityPage.js.map +1 -1
  9. package/dist/cjs/components/AutoPatternsEntityPage/ViewModeEntityPage.js +88 -36
  10. package/dist/cjs/components/AutoPatternsEntityPage/ViewModeEntityPage.js.map +1 -1
  11. package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js +19 -5
  12. package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
  13. package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js +1 -1
  14. package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
  15. package/dist/cjs/hooks/index.js +19 -0
  16. package/dist/cjs/hooks/index.js.map +1 -1
  17. package/dist/cjs/hooks/useEntityPageHeaderTexts.js +48 -9
  18. package/dist/cjs/hooks/useEntityPageHeaderTexts.js.map +1 -1
  19. package/dist/cjs/hooks/useGridFeatures.js +3 -0
  20. package/dist/cjs/hooks/useGridFeatures.js.map +1 -1
  21. package/dist/cjs/hooks/useNavigationUtils.js +21 -6
  22. package/dist/cjs/hooks/useNavigationUtils.js.map +1 -1
  23. package/dist/cjs/hooks/useTableFeatures.js +3 -0
  24. package/dist/cjs/hooks/useTableFeatures.js.map +1 -1
  25. package/dist/cjs/hooks/useTableGridSwitchFeatures.js +3 -0
  26. package/dist/cjs/hooks/useTableGridSwitchFeatures.js.map +1 -1
  27. package/dist/cjs/hooks/useUpdateAppContextItems.js +18 -0
  28. package/dist/cjs/hooks/useUpdateAppContextItems.js.map +1 -0
  29. package/dist/cjs/providers/AppContext.js +58 -0
  30. package/dist/cjs/providers/AppContext.js.map +1 -0
  31. package/dist/cjs/providers/ItemsContext.js +37 -0
  32. package/dist/cjs/providers/ItemsContext.js.map +1 -0
  33. package/dist/cjs/providers/PatternsWizardOverridesContext.js +1 -1
  34. package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
  35. package/dist/cjs/providers/index.js +12 -0
  36. package/dist/cjs/providers/index.js.map +1 -1
  37. package/dist/cjs/types/EntityPageConfig.js.map +1 -1
  38. package/dist/cjs/types/types.js.map +1 -1
  39. package/dist/docs/app_config_structure.md +6 -2
  40. package/dist/docs/auto-patterns-guide.md +466 -38
  41. package/dist/docs/bulk_actions.md +2 -5
  42. package/dist/docs/collection_page.md +1 -1
  43. package/dist/docs/collection_page_actions.md +4 -13
  44. package/dist/docs/custom_overrides.md +18 -6
  45. package/dist/docs/entity_page.md +294 -2
  46. package/dist/docs/entity_page_actions.md +3 -3
  47. package/dist/docs/entity_page_view_actions.md +2 -2
  48. package/dist/docs/index.md +12 -0
  49. package/dist/docs/installation.md +25 -2
  50. package/dist/docs/pages_configuration.md +2 -2
  51. package/dist/docs/resolved_action.md +106 -0
  52. package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js +5 -3
  53. package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -1
  54. package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +2 -2
  55. package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
  56. package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +24 -0
  57. package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
  58. package/dist/esm/components/AutoPatternsEntityPage/EditModeEntityPage.js +2 -1
  59. package/dist/esm/components/AutoPatternsEntityPage/EditModeEntityPage.js.map +1 -1
  60. package/dist/esm/components/AutoPatternsEntityPage/ViewModeEntityPage.js +45 -18
  61. package/dist/esm/components/AutoPatternsEntityPage/ViewModeEntityPage.js.map +1 -1
  62. package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js +8 -0
  63. package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
  64. package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js +1 -1
  65. package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
  66. package/dist/esm/hooks/index.js +2 -0
  67. package/dist/esm/hooks/index.js.map +1 -1
  68. package/dist/esm/hooks/useEntityPageHeaderTexts.js +48 -9
  69. package/dist/esm/hooks/useEntityPageHeaderTexts.js.map +1 -1
  70. package/dist/esm/hooks/useGridFeatures.js +4 -1
  71. package/dist/esm/hooks/useGridFeatures.js.map +1 -1
  72. package/dist/esm/hooks/useNavigationUtils.js +21 -6
  73. package/dist/esm/hooks/useNavigationUtils.js.map +1 -1
  74. package/dist/esm/hooks/useTableFeatures.js +4 -1
  75. package/dist/esm/hooks/useTableFeatures.js.map +1 -1
  76. package/dist/esm/hooks/useTableGridSwitchFeatures.js +4 -1
  77. package/dist/esm/hooks/useTableGridSwitchFeatures.js.map +1 -1
  78. package/dist/esm/hooks/useUpdateAppContextItems.js +13 -0
  79. package/dist/esm/hooks/useUpdateAppContextItems.js.map +1 -0
  80. package/dist/esm/providers/AppContext.js +31 -0
  81. package/dist/esm/providers/AppContext.js.map +1 -0
  82. package/dist/esm/providers/ItemsContext.js +23 -0
  83. package/dist/esm/providers/ItemsContext.js.map +1 -0
  84. package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
  85. package/dist/esm/providers/index.js +1 -0
  86. package/dist/esm/providers/index.js.map +1 -1
  87. package/dist/esm/types/EntityPageConfig.js.map +1 -1
  88. package/dist/esm/types/types.js.map +1 -1
  89. package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts +1 -0
  90. package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts.map +1 -1
  91. package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
  92. package/dist/types/components/AutoPatternsEntityPage/EditModeEntityPage.d.ts.map +1 -1
  93. package/dist/types/components/AutoPatternsEntityPage/ViewModeEntityPage.d.ts.map +1 -1
  94. package/dist/types/components/AutoPatternsRoute/AutoPatternsRoutes.d.ts.map +1 -1
  95. package/dist/types/hooks/index.d.ts +2 -0
  96. package/dist/types/hooks/index.d.ts.map +1 -1
  97. package/dist/types/hooks/useEntityPageHeaderTexts.d.ts +10 -1
  98. package/dist/types/hooks/useEntityPageHeaderTexts.d.ts.map +1 -1
  99. package/dist/types/hooks/useGridFeatures.d.ts.map +1 -1
  100. package/dist/types/hooks/useNavigationUtils.d.ts +5 -1
  101. package/dist/types/hooks/useNavigationUtils.d.ts.map +1 -1
  102. package/dist/types/hooks/useTableFeatures.d.ts.map +1 -1
  103. package/dist/types/hooks/useTableGridSwitchFeatures.d.ts.map +1 -1
  104. package/dist/types/hooks/useUpdateAppContextItems.d.ts +2 -0
  105. package/dist/types/hooks/useUpdateAppContextItems.d.ts.map +1 -0
  106. package/dist/types/providers/AppContext.d.ts +11 -0
  107. package/dist/types/providers/AppContext.d.ts.map +1 -0
  108. package/dist/types/providers/ItemsContext.d.ts +11 -0
  109. package/dist/types/providers/ItemsContext.d.ts.map +1 -0
  110. package/dist/types/providers/PatternsWizardOverridesContext.d.ts +10 -0
  111. package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +1 -1
  112. package/dist/types/providers/index.d.ts +1 -0
  113. package/dist/types/providers/index.d.ts.map +1 -1
  114. package/dist/types/types/EntityPageConfig.d.ts +5 -1
  115. package/dist/types/types/EntityPageConfig.d.ts.map +1 -1
  116. package/dist/types/types/types.d.ts +1 -0
  117. package/dist/types/types/types.d.ts.map +1 -1
  118. package/package.json +18 -18
@@ -4,10 +4,19 @@ import { useAppConfigContext, useSchemaRegistry } from '../providers';
4
4
  import { generatePath } from 'react-router-dom';
5
5
  import { usePagePath } from './usePagePath';
6
6
  export const useNavigation = () => {
7
- const {
8
- navigateToEntityPage: navigateToEntityPagePatterns,
9
- navigateToCollectionPage: navigateToCollectionPagePatterns
10
- } = usePatternsNavigate();
7
+ let navigateToEntityPagePatterns;
8
+ let navigateToCollectionPagePatterns;
9
+ let isNavigationAvailable = true;
10
+ try {
11
+ const navigation = usePatternsNavigate();
12
+ navigateToEntityPagePatterns = navigation.navigateToEntityPage;
13
+ navigateToCollectionPagePatterns = navigation.navigateToCollectionPage;
14
+ } catch (error) {
15
+ // Navigation context not available (e.g., when rendering components without routes)
16
+ isNavigationAvailable = false;
17
+ navigateToEntityPagePatterns = () => {};
18
+ navigateToCollectionPagePatterns = () => {};
19
+ }
11
20
  const appConfig = useAppConfigContext();
12
21
  const {
13
22
  getSchema
@@ -21,6 +30,9 @@ export const useNavigation = () => {
21
30
  item,
22
31
  entityPageId
23
32
  } = _ref;
33
+ if (!isNavigationAvailable || !appConfig.pages) {
34
+ return;
35
+ }
24
36
  const entityPage = entityPageId ? appConfig.pages.find(page => page.id === entityPageId) : null;
25
37
  if (!entityPage) {
26
38
  return;
@@ -39,8 +51,11 @@ export const useNavigation = () => {
39
51
  entity: item
40
52
  });
41
53
  }
42
- }, [appConfig, navigateToEntityPagePatterns, getSchema]);
54
+ }, [appConfig, navigateToEntityPagePatterns, getSchema, isNavigationAvailable]);
43
55
  const navigateToCollectionPage = useCallback(parentPageId => {
56
+ if (!isNavigationAvailable) {
57
+ return;
58
+ }
44
59
  const parentPagePath = getPagePath(parentPageId);
45
60
  if (!parentPagePath) {
46
61
  return;
@@ -48,7 +63,7 @@ export const useNavigation = () => {
48
63
  navigateToCollectionPagePatterns({
49
64
  path: parentPagePath
50
65
  });
51
- }, [navigateToCollectionPagePatterns, getPagePath]);
66
+ }, [navigateToCollectionPagePatterns, getPagePath, isNavigationAvailable]);
52
67
  const getParentPagePath = useCallback(parentPageId => {
53
68
  return getPagePath(parentPageId);
54
69
  }, [getPagePath]);
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","usePatternsNavigate","useAppConfigContext","useSchemaRegistry","generatePath","usePagePath","useNavigation","navigateToEntityPage","navigateToEntityPagePatterns","navigateToCollectionPage","navigateToCollectionPagePatterns","appConfig","getSchema","getPagePath","_ref","_route$params","item","entityPageId","entityPage","pages","find","page","id","route","collectionId","schema","path","params","idField","entity","parentPageId","parentPagePath","getParentPagePath"],"sources":["../../../src/hooks/useNavigationUtils.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { usePatternsNavigate } from '@wix/patterns/router';\nimport { useAppConfigContext, useSchemaRegistry } from '../providers';\nimport { generatePath } from 'react-router-dom';\nimport { EntityPageConfig } from '../types';\nimport { usePagePath } from './usePagePath';\n\nexport type NavigateToEntityPageFunc = (args: {\n item: any;\n entityPageId?: string;\n}) => void;\n\nexport const useNavigation = () => {\n const {\n navigateToEntityPage: navigateToEntityPagePatterns,\n navigateToCollectionPage: navigateToCollectionPagePatterns,\n } = usePatternsNavigate();\n const appConfig = useAppConfigContext();\n const { getSchema } = useSchemaRegistry();\n const { getPagePath } = usePagePath(appConfig);\n\n const navigateToEntityPage = useCallback(\n ({ item, entityPageId }) => {\n const entityPage = entityPageId\n ? appConfig.pages.find((page) => page.id === entityPageId)\n : null;\n\n if (!entityPage) {\n return;\n }\n\n const { route, collectionId } = entityPage.entityPage as EntityPageConfig;\n const schema = getSchema(collectionId);\n if (route.path && route.params?.id && schema) {\n const path = generatePath(route.path, {\n [route.params.id]: item?.[schema.idField] ?? '',\n });\n navigateToEntityPagePatterns({\n path,\n entity: item,\n });\n }\n },\n [appConfig, navigateToEntityPagePatterns, getSchema],\n );\n\n const navigateToCollectionPage = useCallback(\n (parentPageId: string) => {\n const parentPagePath = getPagePath(parentPageId);\n if (!parentPagePath) {\n return;\n }\n navigateToCollectionPagePatterns({\n path: parentPagePath,\n });\n },\n [navigateToCollectionPagePatterns, getPagePath],\n );\n\n const getParentPagePath = useCallback(\n (parentPageId?: string): string | undefined => {\n return getPagePath(parentPageId);\n },\n [getPagePath],\n );\n\n return {\n navigateToEntityPage,\n navigateToCollectionPage,\n getParentPagePath,\n getPagePath,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,cAAc;AACrE,SAASC,YAAY,QAAQ,kBAAkB;AAE/C,SAASC,WAAW,QAAQ,eAAe;AAO3C,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAM;IACJC,oBAAoB,EAAEC,4BAA4B;IAClDC,wBAAwB,EAAEC;EAC5B,CAAC,GAAGT,mBAAmB,CAAC,CAAC;EACzB,MAAMU,SAAS,GAAGT,mBAAmB,CAAC,CAAC;EACvC,MAAM;IAAEU;EAAU,CAAC,GAAGT,iBAAiB,CAAC,CAAC;EACzC,MAAM;IAAEU;EAAY,CAAC,GAAGR,WAAW,CAACM,SAAS,CAAC;EAE9C,MAAMJ,oBAAoB,GAAGP,WAAW,CACtCc,IAAA,IAA4B;IAAA,IAAAC,aAAA;IAAA,IAA3B;MAAEC,IAAI;MAAEC;IAAa,CAAC,GAAAH,IAAA;IACrB,MAAMI,UAAU,GAAGD,YAAY,GAC3BN,SAAS,CAACQ,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACC,EAAE,KAAKL,YAAY,CAAC,GACxD,IAAI;IAER,IAAI,CAACC,UAAU,EAAE;MACf;IACF;IAEA,MAAM;MAAEK,KAAK;MAAEC;IAAa,CAAC,GAAGN,UAAU,CAACA,UAA8B;IACzE,MAAMO,MAAM,GAAGb,SAAS,CAACY,YAAY,CAAC;IACtC,IAAID,KAAK,CAACG,IAAI,KAAAX,aAAA,GAAIQ,KAAK,CAACI,MAAM,aAAZZ,aAAA,CAAcO,EAAE,IAAIG,MAAM,EAAE;MAC5C,MAAMC,IAAI,GAAGtB,YAAY,CAACmB,KAAK,CAACG,IAAI,EAAE;QACpC,CAACH,KAAK,CAACI,MAAM,CAACL,EAAE,GAAG,CAAAN,IAAI,oBAAJA,IAAI,CAAGS,MAAM,CAACG,OAAO,CAAC,KAAI;MAC/C,CAAC,CAAC;MACFpB,4BAA4B,CAAC;QAC3BkB,IAAI;QACJG,MAAM,EAAEb;MACV,CAAC,CAAC;IACJ;EACF,CAAC,EACD,CAACL,SAAS,EAAEH,4BAA4B,EAAEI,SAAS,CACrD,CAAC;EAED,MAAMH,wBAAwB,GAAGT,WAAW,CACzC8B,YAAoB,IAAK;IACxB,MAAMC,cAAc,GAAGlB,WAAW,CAACiB,YAAY,CAAC;IAChD,IAAI,CAACC,cAAc,EAAE;MACnB;IACF;IACArB,gCAAgC,CAAC;MAC/BgB,IAAI,EAAEK;IACR,CAAC,CAAC;EACJ,CAAC,EACD,CAACrB,gCAAgC,EAAEG,WAAW,CAChD,CAAC;EAED,MAAMmB,iBAAiB,GAAGhC,WAAW,CAClC8B,YAAqB,IAAyB;IAC7C,OAAOjB,WAAW,CAACiB,YAAY,CAAC;EAClC,CAAC,EACD,CAACjB,WAAW,CACd,CAAC;EAED,OAAO;IACLN,oBAAoB;IACpBE,wBAAwB;IACxBuB,iBAAiB;IACjBnB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","usePatternsNavigate","useAppConfigContext","useSchemaRegistry","generatePath","usePagePath","useNavigation","navigateToEntityPagePatterns","navigateToCollectionPagePatterns","isNavigationAvailable","navigation","navigateToEntityPage","navigateToCollectionPage","error","appConfig","getSchema","getPagePath","_ref","_route$params","item","entityPageId","pages","entityPage","find","page","id","route","collectionId","schema","path","params","idField","entity","parentPageId","parentPagePath","getParentPagePath"],"sources":["../../../src/hooks/useNavigationUtils.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { usePatternsNavigate } from '@wix/patterns/router';\nimport { useAppConfigContext, useSchemaRegistry } from '../providers';\nimport { generatePath } from 'react-router-dom';\nimport { EntityPageConfig, EntityProps } from '../types';\nimport { usePagePath } from './usePagePath';\n\nexport type NavigateToEntityPageFunc = (args: {\n item: any;\n entityPageId?: string;\n}) => void;\n\nexport const useNavigation = () => {\n let navigateToEntityPagePatterns: ({\n path,\n entity,\n }: {\n path: string;\n entity: EntityProps;\n }) => void;\n let navigateToCollectionPagePatterns: ({ path }: { path: string }) => void;\n let isNavigationAvailable = true;\n\n try {\n const navigation = usePatternsNavigate();\n navigateToEntityPagePatterns = navigation.navigateToEntityPage;\n navigateToCollectionPagePatterns = navigation.navigateToCollectionPage;\n } catch (error) {\n // Navigation context not available (e.g., when rendering components without routes)\n isNavigationAvailable = false;\n navigateToEntityPagePatterns = () => {};\n navigateToCollectionPagePatterns = () => {};\n }\n\n const appConfig = useAppConfigContext();\n const { getSchema } = useSchemaRegistry();\n const { getPagePath } = usePagePath(appConfig);\n\n const navigateToEntityPage = useCallback(\n ({ item, entityPageId }: { item: EntityProps; entityPageId?: string }) => {\n if (!isNavigationAvailable || !appConfig.pages) {\n return;\n }\n\n const entityPage = entityPageId\n ? appConfig.pages.find((page) => page.id === entityPageId)\n : null;\n\n if (!entityPage) {\n return;\n }\n\n const { route, collectionId } = entityPage.entityPage as EntityPageConfig;\n const schema = getSchema(collectionId);\n if (route.path && route.params?.id && schema) {\n const path = generatePath(route.path, {\n [route.params.id]: item?.[schema.idField] ?? '',\n });\n navigateToEntityPagePatterns({\n path,\n entity: item,\n });\n }\n },\n [appConfig, navigateToEntityPagePatterns, getSchema, isNavigationAvailable],\n );\n\n const navigateToCollectionPage = useCallback(\n (parentPageId: string) => {\n if (!isNavigationAvailable) {\n return;\n }\n const parentPagePath = getPagePath(parentPageId);\n if (!parentPagePath) {\n return;\n }\n navigateToCollectionPagePatterns({\n path: parentPagePath,\n });\n },\n [navigateToCollectionPagePatterns, getPagePath, isNavigationAvailable],\n );\n\n const getParentPagePath = useCallback(\n (parentPageId?: string): string | undefined => {\n return getPagePath(parentPageId);\n },\n [getPagePath],\n );\n\n return {\n navigateToEntityPage,\n navigateToCollectionPage,\n getParentPagePath,\n getPagePath,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,cAAc;AACrE,SAASC,YAAY,QAAQ,kBAAkB;AAE/C,SAASC,WAAW,QAAQ,eAAe;AAO3C,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,IAAIC,4BAMM;EACV,IAAIC,gCAAsE;EAC1E,IAAIC,qBAAqB,GAAG,IAAI;EAEhC,IAAI;IACF,MAAMC,UAAU,GAAGT,mBAAmB,CAAC,CAAC;IACxCM,4BAA4B,GAAGG,UAAU,CAACC,oBAAoB;IAC9DH,gCAAgC,GAAGE,UAAU,CAACE,wBAAwB;EACxE,CAAC,CAAC,OAAOC,KAAK,EAAE;IACd;IACAJ,qBAAqB,GAAG,KAAK;IAC7BF,4BAA4B,GAAGA,CAAA,KAAM,CAAC,CAAC;IACvCC,gCAAgC,GAAGA,CAAA,KAAM,CAAC,CAAC;EAC7C;EAEA,MAAMM,SAAS,GAAGZ,mBAAmB,CAAC,CAAC;EACvC,MAAM;IAAEa;EAAU,CAAC,GAAGZ,iBAAiB,CAAC,CAAC;EACzC,MAAM;IAAEa;EAAY,CAAC,GAAGX,WAAW,CAACS,SAAS,CAAC;EAE9C,MAAMH,oBAAoB,GAAGX,WAAW,CACtCiB,IAAA,IAA0E;IAAA,IAAAC,aAAA;IAAA,IAAzE;MAAEC,IAAI;MAAEC;IAA2D,CAAC,GAAAH,IAAA;IACnE,IAAI,C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yB;IAC7C,OAAOjB,WAAW,CAACiB,YAAY,CAAC;EAClC,CAAC,EACD,CAACjB,WAAW,CACd,CAAC;EAED,OAAO;IACLL,oBAAoB;IACpBC,wBAAwB;IACxBuB,iBAAiB;IACjBnB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,11 +1,12 @@
1
1
  import { useFetchData } from './useFetchData';
2
- import { TableSections, useTableCollection } from '@wix/patterns';
2
+ import { TableSections, useSelector, useTableCollection } from '@wix/patterns';
3
3
  import { useCommonCollectionFeatures } from './useCommonCollectionFeatures';
4
4
  import { useFilters } from './useFilters';
5
5
  import { useSchema } from '../providers/SchemaContext';
6
6
  import { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';
7
7
  import { useBaseTableFeatures } from './useBaseTableFeatures';
8
8
  import { usePatternsWizardOverridesContext } from '../providers/PatternsWizardOverridesContext';
9
+ import { useUpdateAppContextItems } from './useUpdateAppContextItems';
9
10
  export const useTableFeatures = configuration => {
10
11
  var _configuration$sectio, _overrides$sections;
11
12
  const {
@@ -55,6 +56,8 @@ export const useTableFeatures = configuration => {
55
56
  disableAutoSelectAllCount: selectAllScope === 'page',
56
57
  selectionConsistencyMode: selectionUpdateMode
57
58
  });
59
+ const items = useSelector(() => state.collection.result.items);
60
+ useUpdateAppContextItems(items);
58
61
  const optimisticActions = useAutoPatternsOptimisticActions(collectionId, state.collection);
59
62
  const commonFeatures = useCommonCollectionFeatures({
60
63
  ...configuration,
@@ -1 +1 @@
1
- {"version":3,"names":["useFetchData","TableSections","useTableCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseTableFeatures","usePatternsWizardOverridesContext","useTableFeatures","configuration","_configuration$sectio","_overrides$sections","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","customColumns","visibleFieldIds","columns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","searchableFieldIds","schema","overrides","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","optimisticActions","commonFeatures","sections","id","renderSection","undefined"],"sources":["../../../src/hooks/useTableFeatures.tsx"],"sourcesContent":["import { TableConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { TableSections, useTableCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\nimport { usePatternsWizardOverridesContext } from '../providers/PatternsWizardOverridesContext';\n\nexport const useTableFeatures = (configuration: TableConfig) => {\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = configuration.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n configuration.filters,\n );\n const {\n customColumns,\n visibleFieldIds,\n columns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n } = useBaseTableFeatures(configuration);\n\n const { fetchData } = useFetchData({\n searchableFieldIds: visibleFieldIds,\n filterFieldMapping,\n });\n\n const schema = useSchema();\n const overrides = usePatternsWizardOverridesContext();\n\n const state = useTableCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...configuration,\n optimisticActions,\n });\n\n const sections =\n configuration.sections?.id &&\n overrides?.sections?.[configuration.sections.id]\n ? {\n renderSection: overrides.sections[configuration.sections.id],\n TableSections,\n }\n : undefined;\n\n return {\n ...commonFeatures,\n state,\n columns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n sections,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,eAAe;AACjE,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,iCAAiC,QAAQ,6CAA6C;AAE/F,OAAO,MAAMC,gBAAgB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA,EAAAC,mBAAA;EAC9D,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGP,aAAa,CAACQ,UAAU;EAE5B,MAAM;IAAEC,eAAe;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GAAGjB,UAAU,CACvEM,aAAa,CAACY,OAChB,CAAC;EACD,MAAM;IACJC,aAAa;IACbC,eAAe;IACfC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrBC;EACF,CAAC,GAAGtB,oBAAoB,CAACG,aAAa,CAAC;EAEvC,MAAM;IAAEoB;EAAU,CAAC,GAAG9B,YAAY,CAAC;IACjC+B,kBAAkB,EAAEP,eAAe;IACnCH;EACF,CAAC,CAAC;EAEF,MAAMW,MAAM,GAAG3B,SAAS,CAAC,CAAC;EAC1B,MAAM4B,SAAS,GAAGzB,iCAAiC,CAAC,CAAC;EAErD,MAAM0B,KAAK,GAAGhC,kBAAkB,CAAM;IACpCiC,SAAS,EAAE,GAAGtB,YAAY,EAAE;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 {"version":3,"names":["useFetchData","TableSections","useSelector","useTableCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseTableFeatures","usePatternsWizardOverridesContext","useUpdateAppContextItems","useTableFeatures","configuration","_configuration$sectio","_overrides$sections","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","customColumns","visibleFieldIds","columns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","searchableFieldIds","schema","overrides","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","items","result","optimisticActions","commonFeatures","sections","id","renderSection","undefined"],"sources":["../../../src/hooks/useTableFeatures.tsx"],"sourcesContent":["import { TableConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { TableSections, useSelector, useTableCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\nimport { usePatternsWizardOverridesContext } from '../providers/PatternsWizardOverridesContext';\nimport { useUpdateAppContextItems } from './useUpdateAppContextItems';\n\nexport const useTableFeatures = (configuration: TableConfig) => {\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = configuration.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n configuration.filters,\n );\n const {\n customColumns,\n visibleFieldIds,\n columns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n } = useBaseTableFeatures(configuration);\n\n const { fetchData } = useFetchData({\n searchableFieldIds: visibleFieldIds,\n filterFieldMapping,\n });\n\n const schema = useSchema();\n const overrides = usePatternsWizardOverridesContext();\n\n const state = useTableCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const items = useSelector(() => state.collection.result.items);\n useUpdateAppContextItems(items);\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...configuration,\n optimisticActions,\n });\n\n const sections =\n configuration.sections?.id &&\n overrides?.sections?.[configuration.sections.id]\n ? {\n renderSection: overrides.sections[configuration.sections.id],\n TableSections,\n }\n : undefined;\n\n return {\n ...commonFeatures,\n state,\n columns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n sections,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,EAAEC,WAAW,EAAEC,kBAAkB,QAAQ,eAAe;AAC9E,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,iCAAiC,QAAQ,6CAA6C;AAC/F,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,OAAO,MAAMC,gBAAgB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA,EAAAC,mBAAA;EAC9D,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGP,aAAa,CAACQ,UAAU;EAE5B,MAAM;IAAEC,eAAe;IAAEC,aAAa;IAAEC;EAAmB,CAAC,G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IACjD,GAAGQ,aAAa;IAChB0C;EACF,CAAC,CAAC;EAEF,MAAME,QAAQ,GACZ,CAAA3C,qBAAA,GAAAD,aAAa,CAAC4C,QAAQ,aAAtB3C,qBAAA,CAAwB4C,EAAE,IAC1BtB,SAAS,aAAArB,mBAAA,GAATqB,SAAS,CAAEqB,QAAQ,aAAnB1C,mBAAA,CAAsBF,aAAa,CAAC4C,QAAQ,CAACC,EAAE,CAAC,GAC5C;IACEC,aAAa,EAAEvB,SAAS,CAACqB,QAAQ,CAAC5C,aAAa,CAAC4C,QAAQ,CAACC,EAAE,CAAC;IAC5DxD;EACF,CAAC,GACD0D,SAAS;EAEf,OAAO;IACL,GAAGJ,cAAc;IACjBnB,KAAK;IACLT,OAAO;IACPH,OAAO,EAAEH,eAAe;IACxBiC,iBAAiB;IACjB7B,aAAa;IACbG,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrBC,YAAY;IACZyB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,11 +1,12 @@
1
1
  import { useFetchData } from './useFetchData';
2
- import { useTableGridSwitchCollection } from '@wix/patterns';
2
+ import { useSelector, useTableGridSwitchCollection } from '@wix/patterns';
3
3
  import { useCommonCollectionFeatures } from './useCommonCollectionFeatures';
4
4
  import { useFilters } from './useFilters';
5
5
  import { useSchema } from '../providers/SchemaContext';
6
6
  import { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';
7
7
  import { useBaseGridFeatures } from './useBaseGridFeatures';
8
8
  import { useBaseTableFeatures } from './useBaseTableFeatures';
9
+ import { useUpdateAppContextItems } from './useUpdateAppContextItems';
9
10
  export const useTableGridSwitchFeatures = config => {
10
11
  const schema = useSchema();
11
12
  const {
@@ -59,6 +60,8 @@ export const useTableGridSwitchFeatures = config => {
59
60
  disableAutoSelectAllCount: selectAllScope === 'page',
60
61
  selectionConsistencyMode: selectionUpdateMode
61
62
  });
63
+ const items = useSelector(() => state.collection.result.items);
64
+ useUpdateAppContextItems(items);
62
65
  const optimisticActions = useAutoPatternsOptimisticActions(collectionId, state.collection);
63
66
  const commonFeatures = useCommonCollectionFeatures({
64
67
  ...config,
@@ -1 +1 @@
1
- {"version":3,"names":["useFetchData","useTableGridSwitchCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseGridFeatures","useBaseTableFeatures","useTableGridSwitchFeatures","config","schema","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","preset","imagePlacement","visibleFieldIds","gridVisibleFieldIds","renderItem","customColumns","tableVisibleFieldIds","columns","tableColumns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","tableFetchData","searchableFieldIds","Array","from","Set","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","optimisticActions","commonFeatures","horizontalScroll"],"sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"sourcesContent":["import { TableGridSwitchConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { useTableGridSwitchCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseGridFeatures } from './useBaseGridFeatures';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\n\nexport const useTableGridSwitchFeatures = (config: TableGridSwitchConfig) => {\n const schema = useSchema();\n\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = config.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n config.filters,\n );\n\n const {\n preset,\n imagePlacement,\n visibleFieldIds: gridVisibleFieldIds,\n renderItem,\n } = useBaseGridFeatures(config);\n\n const {\n customColumns,\n visibleFieldIds: tableVisibleFieldIds,\n columns: tableColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n } = useBaseTableFeatures(config);\n\n const { fetchData: tableFetchData } = useFetchData({\n searchableFieldIds: Array.from(\n new Set([...tableVisibleFieldIds, ...gridVisibleFieldIds]),\n ),\n filterFieldMapping,\n });\n\n const state = useTableGridSwitchCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData: tableFetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...config,\n optimisticActions,\n });\n\n return {\n ...commonFeatures,\n state,\n columns: tableColumns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n horizontalScroll: true,\n // Grid specific features\n imagePlacement,\n preset,\n renderItem,\n showTitleBar,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,4BAA4B,QAAQ,eAAe;AAC5D,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D,OAAO,MAAMC,0BAA0B,GAAIC,MAA6B,IAAK;EAC3E,MAAMC,MAAM,GAAGN,SAAS,CAAC,CAAC;EAE1B,MAAM;IACJO,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGN,MAAM,CA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yC,iBAAiB,GAAGnD,gCAAgC,CACxDM,YAAY,EACZ6B,KAAK,CAACxB,UACR,CAAC;EAED,MAAMyC,cAAc,GAAGvD,2BAA2B,CAAC;IACjD,GAAGO,MAAM;IACT+C;EACF,CAAC,CAAC;EAEF,OAAO;IACL,GAAGC,cAAc;IACjBjB,KAAK;IACLZ,OAAO,EAAEC,YAAY;IACrBT,OAAO,EAAEH,eAAe;IACxBuC,iBAAiB;IACjB9B,aAAa;IACbI,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrB0B,gBAAgB,EAAE,IAAI;IACtB;IACApC,cAAc;IACdD,MAAM;IACNI,UAAU;IACVQ;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useFetchData","useSelector","useTableGridSwitchCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseGridFeatures","useBaseTableFeatures","useUpdateAppContextItems","useTableGridSwitchFeatures","config","schema","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","preset","imagePlacement","visibleFieldIds","gridVisibleFieldIds","renderItem","customColumns","tableVisibleFieldIds","columns","tableColumns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","tableFetchData","searchableFieldIds","Array","from","Set","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","items","result","optimisticActions","commonFeatures","horizontalScroll"],"sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"sourcesContent":["import { TableGridSwitchConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { useSelector, useTableGridSwitchCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseGridFeatures } from './useBaseGridFeatures';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\nimport { useUpdateAppContextItems } from './useUpdateAppContextItems';\n\nexport const useTableGridSwitchFeatures = (config: TableGridSwitchConfig) => {\n const schema = useSchema();\n\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = config.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n config.filters,\n );\n\n const {\n preset,\n imagePlacement,\n visibleFieldIds: gridVisibleFieldIds,\n renderItem,\n } = useBaseGridFeatures(config);\n\n const {\n customColumns,\n visibleFieldIds: tableVisibleFieldIds,\n columns: tableColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n } = useBaseTableFeatures(config);\n\n const { fetchData: tableFetchData } = useFetchData({\n searchableFieldIds: Array.from(\n new Set([...tableVisibleFieldIds, ...gridVisibleFieldIds]),\n ),\n filterFieldMapping,\n });\n\n const state = useTableGridSwitchCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData: tableFetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const items = useSelector(() => state.collection.result.items);\n useUpdateAppContextItems(items);\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...config,\n optimisticActions,\n });\n\n return {\n ...commonFeatures,\n state,\n columns: tableColumns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n horizontalScroll: true,\n // Grid specific features\n imagePlacement,\n preset,\n renderItem,\n showTitleBar,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,Q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AGC,IAAI,IAAKA,IAAI,CAACjC,MAAM,CAACkC,OAAO,CAAC;IACvCC,QAAQ,EAAGF,IAAI,IAAKA,IAAI,CAACjC,MAAM,CAACoC,YAAY,CAAC;IAC7C1B,OAAO,EAAEF,aAAa;IACtB6B,gBAAgB,EAAGJ,IAAI,IAAKA,IAAI,CAACK,cAAc;IAC/CC,iBAAiB,EAAEC,IAAA;MAAA,IAAC;QAAEC;MAAI,CAAC,GAAAD,IAAA;MAAA,OAAKE,MAAM,CAACD,GAAG,CAAC;IAAA;IAC3CjB,SAAS,EAAEC,cAAc;IACzBvB,KAAK;IACLyC,iBAAiB,EAAExC,iBAAiB;IACpCyC,yBAAyB,EAAExC,cAAc,KAAK,MAAM;IACpDyC,wBAAwB,EAAExC;EAC5B,CAAC,CAAC;EAEF,MAAMyC,KAAK,GAAGzD,WAAW,CAAC,MAAMyC,KAAK,CAACxB,UAAU,CAACyC,MAAM,CAACD,KAAK,CAAC;EAC9DjD,wBAAwB,CAACiD,KAAK,CAAC;EAE/B,MAAME,iBAAiB,GAAGtD,gCAAgC,CACxDO,YAAY,EACZ6B,KAAK,CAACxB,UACR,CAAC;EAED,MAAM2C,cAAc,GAAG1D,2BAA2B,CAAC;IACjD,GAAGQ,MAAM;IACTiD;EACF,CAAC,CAAC;EAEF,OAAO;IACL,GAAGC,cAAc;IACjBnB,KAAK;IACLZ,OAAO,EAAEC,YAAY;IACrBT,OAAO,EAAEH,eAAe;IACxByC,iBAAiB;IACjBhC,aAAa;IACbI,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrB4B,gBAAgB,EAAE,IAAI;IACtB;IACAtC,cAAc;IACdD,MAAM;IACNI,UAAU;IACVQ;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import { useEffect } from 'react';
2
+ import { useItemsContext } from '../providers/ItemsContext';
3
+ export const useUpdateAppContextItems = items => {
4
+ const {
5
+ setItems
6
+ } = useItemsContext();
7
+ useEffect(() => {
8
+ if (items) {
9
+ setItems(items);
10
+ }
11
+ }, [items, setItems]);
12
+ };
13
+ //# sourceMappingURL=useUpdateAppContextItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useItemsContext","useUpdateAppContextItems","items","setItems"],"sources":["../../../src/hooks/useUpdateAppContextItems.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { useItemsContext } from '../providers/ItemsContext';\n\nexport const useUpdateAppContextItems = (items: any[]) => {\n const { setItems } = useItemsContext();\n\n useEffect(() => {\n if (items) {\n setItems(items);\n }\n }, [items, setItems]);\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,eAAe,QAAQ,2BAA2B;AAE3D,OAAO,MAAMC,wBAAwB,GAAIC,KAAY,IAAK;EACxD,MAAM;IAAEC;EAAS,CAAC,GAAGH,eAAe,CAAC,CAAC;EAEtCD,SAAS,CAAC,MAAM;IACd,IAAIG,KAAK,EAAE;MACTC,QAAQ,CAACD,KAAK,CAAC;IACjB;EACF,CAAC,EAAE,CAACA,KAAK,EAAEC,QAAQ,CAAC,CAAC;AACvB,CAAC","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ import React, { createContext, useContext } from 'react';
2
+ import { ItemsContextProvider, useItemsContext } from './ItemsContext';
3
+ const AppContext = /*#__PURE__*/createContext(undefined);
4
+ const AppContextInner = _ref => {
5
+ let {
6
+ children
7
+ } = _ref;
8
+ const {
9
+ items
10
+ } = useItemsContext();
11
+ const contextValue = {
12
+ items
13
+ };
14
+ return /*#__PURE__*/React.createElement(AppContext.Provider, {
15
+ value: contextValue
16
+ }, children);
17
+ };
18
+ export const AppContextProvider = _ref2 => {
19
+ let {
20
+ children
21
+ } = _ref2;
22
+ return /*#__PURE__*/React.createElement(ItemsContextProvider, null, /*#__PURE__*/React.createElement(AppContextInner, null, children));
23
+ };
24
+ export const useAppContext = () => {
25
+ const context = useContext(AppContext);
26
+ if (context === undefined) {
27
+ throw new Error('useAppContext must be used within an AppContextProvider');
28
+ }
29
+ return context;
30
+ };
31
+ //# sourceMappingURL=AppContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","createContext","useContext","ItemsContextProvider","useItemsContext","AppContext","undefined","AppContextInner","_ref","children","items","contextValue","createElement","Provider","value","AppContextProvider","_ref2","useAppContext","context","Error"],"sources":["../../../src/providers/AppContext.tsx"],"sourcesContent":["import React, { ReactNode, createContext, useContext } from 'react';\nimport {\n ItemsContextProvider,\n ItemsContextValue,\n useItemsContext,\n} from './ItemsContext';\n\ninterface AppContextValue extends Pick<ItemsContextValue, 'items'> {}\n\nconst AppContext = createContext<AppContextValue | undefined>(undefined);\n\nexport interface AppContextProviderProps {\n children: ReactNode;\n}\n\nconst AppContextInner: React.FC<AppContextProviderProps> = ({ children }) => {\n const { items } = useItemsContext();\n\n const contextValue: AppContextValue = {\n items,\n };\n\n return (\n <AppContext.Provider value={contextValue}>{children}</AppContext.Provider>\n );\n};\n\nexport const AppContextProvider: React.FC<AppContextProviderProps> = ({\n children,\n}) => {\n return (\n <ItemsContextProvider>\n <AppContextInner>{children}</AppContextInner>\n </ItemsContextProvider>\n );\n};\n\nexport const useAppContext = (): AppContextValue => {\n const context = useContext(AppContext);\n\n if (context === undefined) {\n throw new Error('useAppContext must be used within an AppContextProvider');\n }\n\n return context;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AACnE,SACEC,oBAAoB,EAEpBC,eAAe,QACV,gBAAgB;AAIvB,MAAMC,UAAU,gBAAGJ,aAAa,CAA8BK,SAAS,CAAC;AAMxE,MAAMC,eAAkD,GAAGC,IAAA,IAAkB;EAAA,IAAjB;IAAEC;EAAS,CAAC,GAAAD,IAAA;EACtE,MAAM;IAAEE;EAAM,CAAC,GAAGN,eAAe,CAAC,CAAC;EAEnC,MAAMO,YAA6B,GAAG;IACpCD;EACF,CAAC;EAED,oBACEV,KAAA,CAAAY,aAAA,CAACP,UAAU,CAACQ,QAAQ;IAACC,KAAK,EAAEH;EAAa,GAAEF,QAA8B,CAAC;AAE9E,CAAC;AAED,OAAO,MAAMM,kBAAqD,GAAGC,KAAA,IAE/D;EAAA,IAFgE;IACpEP;EACF,CAAC,GAAAO,KAAA;EACC,oBACEhB,KAAA,CAAAY,aAAA,CAACT,oBAAoB,qBACnBH,KAAA,CAAAY,aAAA,CAACL,eAAe,QAAEE,QAA0B,CACxB,CAAC;AAE3B,CAAC;AAED,OAAO,MAAMQ,aAAa,GAAGA,CAAA,KAAuB;EAClD,MAAMC,OAAO,GAAGhB,UAAU,CAACG,UAAU,CAAC;EAEtC,IAAIa,OAAO,KAAKZ,SAAS,EAAE;IACzB,MAAM,IAAIa,KAAK,CAAC,yDAAyD,CAAC;EAC5E;EAEA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ import React, { createContext, useContext, useState } from 'react';
2
+ const ItemsContext = /*#__PURE__*/createContext(undefined);
3
+ export const ItemsContextProvider = _ref => {
4
+ let {
5
+ children
6
+ } = _ref;
7
+ const [items, setItems] = useState([]);
8
+ const contextValue = {
9
+ items,
10
+ setItems
11
+ };
12
+ return /*#__PURE__*/React.createElement(ItemsContext.Provider, {
13
+ value: contextValue
14
+ }, children);
15
+ };
16
+ export const useItemsContext = () => {
17
+ const context = useContext(ItemsContext);
18
+ if (context === undefined) {
19
+ throw new Error('useItemsContext must be used within an ItemsContextProvider');
20
+ }
21
+ return context;
22
+ };
23
+ //# sourceMappingURL=ItemsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","createContext","useContext","useState","ItemsContext","undefined","ItemsContextProvider","_ref","children","items","setItems","contextValue","createElement","Provider","value","useItemsContext","context","Error"],"sources":["../../../src/providers/ItemsContext.tsx"],"sourcesContent":["import React, { ReactNode, createContext, useContext, useState } from 'react';\n\nexport interface ItemsContextValue {\n items: any[];\n setItems: (items: any[]) => void;\n}\n\nconst ItemsContext = createContext<ItemsContextValue | undefined>(undefined);\n\nexport interface ItemsContextProviderProps {\n children: ReactNode;\n}\n\nexport const ItemsContextProvider: React.FC<ItemsContextProviderProps> = ({\n children,\n}) => {\n const [items, setItems] = useState<any[]>([]);\n\n const contextValue: ItemsContextValue = {\n items,\n setItems,\n };\n\n return (\n <ItemsContext.Provider value={contextValue}>\n {children}\n </ItemsContext.Provider>\n );\n};\n\nexport const useItemsContext = (): ItemsContextValue => {\n const context = useContext(ItemsContext);\n\n if (context === undefined) {\n throw new Error(\n 'useItemsContext must be used within an ItemsContextProvider',\n );\n }\n\n return context;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,aAAa,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAO7E,MAAMC,YAAY,gBAAGH,aAAa,CAAgCI,SAAS,CAAC;AAM5E,OAAO,MAAMC,oBAAyD,GAAGC,IAAA,IAEnE;EAAA,IAFoE;IACxEC;EACF,CAAC,GAAAD,IAAA;EACC,MAAM,CAACE,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAAQ,EAAE,CAAC;EAE7C,MAAMQ,YAA+B,GAAG;IACtCF,KAAK;IACLC;EACF,CAAC;EAED,oBACEV,KAAA,CAAAY,aAAA,CAACR,YAAY,CAACS,QAAQ;IAACC,KAAK,EAAEH;EAAa,GACxCH,QACoB,CAAC;AAE5B,CAAC;AAED,OAAO,MAAMO,eAAe,GAAGA,CAAA,KAAyB;EACtD,MAAMC,OAAO,GAAGd,UAAU,CAACE,YAAY,CAAC;EAExC,IAAIY,OAAO,KAAKX,SAAS,EAAE;IACzB,MAAM,IAAIY,KAAK,CACb,6DACF,CAAC;EACH;EAEA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useContext","PatternsWizardOverridesContext","undefined","PatternsWizardOverridesProvider","_ref","children","value","createElement","Provider","usePatternsWizardOverridesContext"],"sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from 'react';\nimport {\n CustomComponentProps,\n CustomActionCellPrimaryActionResolver,\n CustomActionCellSecondaryActionResolver,\n CustomEntityPageActionResolver,\n CustomBulkActionsActionResolver,\n CustomActionCollectionPageActionResolver,\n CustomActionCollectionPageActionOnRowClickResolver,\n IColumnValue,\n SchemaConfig,\n} from '../types';\n\nimport { Section } from '@wix/patterns';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<\n string,\n | CustomActionCellPrimaryActionResolver\n | CustomActionCellSecondaryActionResolver\n | CustomBulkActionsActionResolver\n | CustomEntityPageActionResolver\n | CustomActionCollectionPageActionResolver\n | CustomActionCollectionPageActionOnRowClickResolver\n >;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n modals?: Record<string, React.FC<any>>;\n emptyState?: Record<string, () => void>;\n components?: Record<string, React.FC<CustomComponentProps>>;\n slots?: Record<string, React.FC>;\n customDataSources?: Record<\n string,\n (collectionId: string, context: any) => Promise<SchemaConfig>\n >;\n sections?: Record<string, (item: any) => Section>;\n}\n\nconst PatternsWizardOverridesContext = createContext<\n PatternsWizardOverridesContextProps | undefined\n>(undefined);\n\nexport const PatternsWizardOverridesProvider: React.FC<{\n children: ReactNode;\n value: PatternsWizardOverridesContextProps;\n}> = ({ children, value }) => {\n return (\n <PatternsWizardOverridesContext.Provider value={value}>\n {children}\n </PatternsWizardOverridesContext.Provider>\n );\n};\n\nexport const usePatternsWizardOverridesContext = ():\n | PatternsWizardOverridesContextProps\n | undefined => {\n return useContext(PatternsWizardOverridesContext);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAqCnE,MAAMC,8BAA8B,gBAAGF,aAAa,CAElDG,SAAS,CAAC;AAEZ,OAAO,MAAMC,+BAGX,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,QAAQ;IAAEC;EAAM,CAAC,GAAAF,IAAA;EACvB,oBACEN,KAAA,CAAAS,aAAA,CAACN,8BAA8B,CAACO,QAAQ;IAACF,KAAK,EAAEA;EAAM,GACnDD,QACsC,CAAC;AAE9C,CAAC;AAED,OAAO,MAAMI,iCAAiC,GAAGA,CAAA,KAEhC;EACf,OAAOT,UAAU,CAACC,8BAA8B,CAAC;AACnD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","createContext","useContext","PatternsWizardOverridesContext","undefined","PatternsWizardOverridesProvider","_ref","children","value","createElement","Provider","usePatternsWizardOverridesContext"],"sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from 'react';\nimport {\n CustomComponentProps,\n CustomActionCellPrimaryActionResolver,\n CustomActionCellSecondaryActionResolver,\n CustomEntityPageActionResolver,\n CustomBulkActionsActionResolver,\n CustomActionCollectionPageActionResolver,\n CustomActionCollectionPageActionOnRowClickResolver,\n IColumnValue,\n SchemaConfig,\n} from '../types';\n\nimport { Section } from '@wix/patterns';\nimport { BadgeSkin, IconElement } from '@wix/design-system';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<\n string,\n | CustomActionCellPrimaryActionResolver\n | CustomActionCellSecondaryActionResolver\n | CustomBulkActionsActionResolver\n | CustomEntityPageActionResolver\n | CustomActionCollectionPageActionResolver\n | CustomActionCollectionPageActionOnRowClickResolver\n >;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n modals?: Record<string, React.FC<any>>;\n emptyState?: Record<string, () => void>;\n components?: Record<string, React.FC<CustomComponentProps>>;\n slots?: Record<string, React.FC>;\n entityPageHeaderSubtitle?: Record<\n string,\n (entity: Record<string, any>) => { text: string }\n >;\n entityPageHeaderBadges?: Record<\n string,\n (entity: Record<string, any>) => {\n text: string;\n skin?: BadgeSkin;\n prefixIcon?: IconElement;\n suffixIcon?: IconElement;\n }[]\n >;\n customDataSources?: Record<\n string,\n (collectionId: string, context: any) => Promise<SchemaConfig>\n >;\n sections?: Record<string, (item: any) => Section>;\n}\n\nconst PatternsWizardOverridesContext = createContext<\n PatternsWizardOverridesContextProps | undefined\n>(undefined);\n\nexport const PatternsWizardOverridesProvider: React.FC<{\n children: ReactNode;\n value: PatternsWizardOverridesContextProps;\n}> = ({ children, value }) => {\n return (\n <PatternsWizardOverridesContext.Provider value={value}>\n {children}\n </PatternsWizardOverridesContext.Provider>\n );\n};\n\nexport const usePatternsWizardOverridesContext = ():\n | PatternsWizardOverridesContextProps\n | undefined => {\n return useContext(PatternsWizardOverridesContext);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAmDnE,MAAMC,8BAA8B,gBAAGF,aAAa,CAElDG,SAAS,CAAC;AAEZ,OAAO,MAAMC,+BAGX,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,QAAQ;IAAEC;EAAM,CAAC,GAAAF,IAAA;EACvB,oBACEN,KAAA,CAAAS,aAAA,CAACN,8BAA8B,CAACO,QAAQ;IAACF,KAAK,EAAEA;EAAM,GACnDD,QACsC,CAAC;AAE9C,CAAC;AAED,OAAO,MAAMI,iCAAiC,GAAGA,CAAA,KAEhC;EACf,OAAOT,UAAU,CAACC,8BAA8B,CAAC;AACnD,CAAC","ignoreList":[]}
@@ -4,4 +4,5 @@ export * from './ModalContext';
4
4
  export * from './SchemaRegistryContext';
5
5
  export * from './AppConfigContext';
6
6
  export * from './ErrorContext';
7
+ export { useAppContext } from './AppContext';
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/providers/index.ts"],"sourcesContent":["export * from './SchemaContext';\nexport * from './PatternsWizardOverridesContext';\nexport * from './ModalContext';\nexport * from './SchemaRegistryContext';\nexport * from './AppConfigContext';\nexport * from './ErrorContext';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,kCAAkC;AAChD,cAAc,gBAAgB;AAC9B,cAAc,yBAAyB;AACvC,cAAc,oBAAoB;AAClC,cAAc,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["useAppContext"],"sources":["../../../src/providers/index.ts"],"sourcesContent":["export * from './SchemaContext';\nexport * from './PatternsWizardOverridesContext';\nexport * from './ModalContext';\nexport * from './SchemaRegistryContext';\nexport * from './AppConfigContext';\nexport * from './ErrorContext';\nexport { useAppContext } from './AppContext';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,kCAAkC;AAChD,cAAc,gBAAgB;AAC9B,cAAc,yBAAyB;AACvC,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SAASA,aAAa,QAAQ,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/types/EntityPageConfig.ts"],"sourcesContent":["import { FieldValues, UseFormReturn } from '@wix/patterns/form';\nimport {\n EntityPageMoreActions,\n EntityPagePrimaryActions,\n EntityPageSecondaryActions,\n} from './actions/entityPageActions';\nimport { BaseCollectionConfig } from './types';\n\nexport type EntityPageBaseConfig = {\n route: {\n path: string;\n params: {\n id: string;\n };\n };\n title?: {\n text: string;\n };\n subtitle?: {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n parentPageId?: string;\n layout?: {\n main: CardLayout[];\n sidebar?: CardLayout[];\n };\n} & BaseCollectionConfig;\n\nexport type EditEntityPageConfig = EntityPageBaseConfig & {\n mode?: 'edit';\n actions?: {\n primaryActions?: never;\n secondaryActions?: never;\n moreActions?: EntityPageMoreActions;\n };\n};\n\nexport type ViewEntityPageConfig = EntityPageBaseConfig & {\n mode: 'view';\n actions?: {\n primaryActions?: EntityPagePrimaryActions;\n secondaryActions?: EntityPageSecondaryActions;\n moreActions?: EntityPageMoreActions;\n };\n};\n\nexport type EntityPageConfig = EditEntityPageConfig | ViewEntityPageConfig;\n\nexport interface CardLayout {\n type: 'card';\n card: {\n title: {\n text: string;\n };\n subtitle?: {\n text: string;\n };\n children: LayoutContent[];\n };\n}\n\nexport type LayoutContent =\n | FieldContent\n | ContainerContent\n | ComponentItemContent;\n\ninterface FieldContent {\n type: 'field';\n field: {\n span?: number;\n fieldId: string;\n };\n}\n\ninterface ContainerContent {\n type: 'container';\n container: {\n span?: number;\n children: LayoutContent[];\n };\n}\n\ninterface ComponentItemContent {\n type: 'component';\n component: {\n span?: number;\n componentId: string;\n };\n}\n\nexport interface CustomComponentProps {\n entity?: Record<string, any>;\n form?: UseFormReturn<FieldValues, any, undefined>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/types/EntityPageConfig.ts"],"sourcesContent":["import { FieldValues, UseFormReturn } from '@wix/patterns/form';\nimport {\n EntityPageMoreActions,\n EntityPagePrimaryActions,\n EntityPageSecondaryActions,\n} from './actions/entityPageActions';\nimport { BaseCollectionConfig } from './types';\n\nexport type EntityPageBaseConfig = {\n route: {\n path: string;\n params: {\n id: string;\n };\n };\n title?: {\n text: string;\n badges?: {\n id: string;\n };\n };\n subtitle?: {\n text?: string;\n id?: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n parentPageId?: string;\n layout?: {\n main: CardLayout[];\n sidebar?: CardLayout[];\n };\n} & BaseCollectionConfig;\n\nexport type EditEntityPageConfig = EntityPageBaseConfig & {\n mode?: 'edit';\n actions?: {\n primaryActions?: never;\n secondaryActions?: never;\n moreActions?: EntityPageMoreActions;\n };\n};\n\nexport type ViewEntityPageConfig = EntityPageBaseConfig & {\n mode: 'view';\n actions?: {\n primaryActions?: EntityPagePrimaryActions;\n secondaryActions?: EntityPageSecondaryActions;\n moreActions?: EntityPageMoreActions;\n };\n};\n\nexport type EntityPageConfig = EditEntityPageConfig | ViewEntityPageConfig;\n\nexport interface CardLayout {\n type: 'card';\n card: {\n title: {\n text: string;\n };\n subtitle?: {\n text: string;\n };\n children: LayoutContent[];\n };\n}\n\nexport type LayoutContent =\n | FieldContent\n | ContainerContent\n | ComponentItemContent;\n\ninterface FieldContent {\n type: 'field';\n field: {\n span?: number;\n fieldId: string;\n };\n}\n\ninterface ContainerContent {\n type: 'container';\n container: {\n span?: number;\n children: LayoutContent[];\n };\n}\n\ninterface ComponentItemContent {\n type: 'component';\n component: {\n span?: number;\n componentId: string;\n };\n}\n\nexport interface CustomComponentProps {\n entity?: Record<string, any>;\n form?: UseFormReturn<FieldValues, any, undefined>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\n\ninterface BaseCollectionConfigCommon {\n collectionId: string;\n}\n\ninterface CMSCollectionConfig extends BaseCollectionConfigCommon {\n entityTypeSource: 'cms';\n custom?: never;\n}\n\ninterface CustomCollectionConfig extends BaseCollectionConfigCommon {\n entityTypeSource: 'custom';\n custom: {\n id: string;\n };\n}\n\nexport type BaseCollectionConfig = CMSCollectionConfig | CustomCollectionConfig;\n\nexport type PatternsFieldType =\n | 'SHORT_TEXT'\n | 'LONG_TEXT'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'URL'\n | 'ARRAY'\n | 'REFERENCE'\n | 'IMAGE';\n\nexport interface AppConfig {\n pages: PageConfig[];\n}\n\nexport interface BasePageConfig {\n id: string;\n appMainPage?: boolean;\n}\n\nexport interface CollectionPageConfigType extends BasePageConfig {\n type: 'collectionPage';\n collectionPage: CollectionPageConfig;\n entityPage?: never;\n}\n\nexport interface EntityPageConfigType extends BasePageConfig {\n type: 'entityPage';\n entityPage: EntityPageConfig;\n collectionPage?: never;\n}\n\nexport type PageConfig = CollectionPageConfigType | EntityPageConfigType;\n\nexport type EntityProps = { [key: string]: any };\n\nexport interface IMenuItem<T extends EntityProps = any> {\n item: T;\n}\nexport interface IColumnValue<T> {\n value: T;\n row: Record<string, any>;\n}\n\nexport type QueryOperator =\n | 'CONTAINS'\n | 'ENDS_WITH'\n | 'EQ'\n | 'EXISTS'\n | 'GT'\n | 'GTE'\n | 'HAS_ALL'\n | 'HAS_SOME'\n | 'LT'\n | 'LTE'\n | 'NE'\n | 'STARTS_WITH'\n | 'URLIZED';\n\ninterface BaseField {\n id: string;\n displayName: string;\n validation?: {\n numberRange?: NumberRange;\n stringLengthRange?: StringLengthRange;\n required: boolean;\n };\n capabilities: {\n supportedQueryOperators: QueryOperator[];\n sortable: boolean;\n };\n}\n\nexport interface ReferenceField extends BaseField {\n type: 'REFERENCE';\n referenceMetadata: {\n referencedCollectionId: string;\n };\n}\n\nexport interface NonReferenceField extends BaseField {\n type: Exclude<PatternsFieldType, 'REFERENCE'>;\n}\n\nexport type Field = ReferenceField | NonReferenceField;\n\nexport interface NumberRange {\n min?: number;\n max?: number;\n}\nexport interface StringLengthRange {\n minLength?: number;\n maxLength?: number;\n}\n\nexport interface Query {\n limit: number;\n offset: number;\n page: number;\n search?: string;\n cursor?: string | null;\n filters: Record<string, any>;\n sort?: {\n fieldName: string;\n order: 'asc' | 'desc';\n }[];\n}\n\nexport interface SchemaConfig {\n id: string;\n fields: Record<string, Field | undefined>;\n displayField: string;\n idField: string;\n actions: {\n get: (entityId: string) => Promise<any>;\n create: (newEntity: Partial<any>) => Promise<any>;\n update: (updatedEntity: any) => Promise<any>;\n delete: (entityId: string) => Promise<any>;\n bulkDelete: (entityIds: string[]) => Promise<any>;\n find: (\n query: Query,\n options?: {\n searchableFieldIds?: string[];\n filterFieldMapping?: Record<string, { fieldId: string }>;\n },\n ) => Promise<{ items: any[]; total: number }>;\n };\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\n\ninterface BaseCollectionConfigCommon {\n collectionId: string;\n}\n\ninterface CMSCollectionConfig extends BaseCollectionConfigCommon {\n entityTypeSource: 'cms';\n custom?: never;\n}\n\ninterface CustomCollectionConfig extends BaseCollectionConfigCommon {\n entityTypeSource: 'custom';\n custom: {\n id: string;\n };\n}\n\nexport type BaseCollectionConfig = CMSCollectionConfig | CustomCollectionConfig;\n\nexport type PatternsFieldType =\n | 'SHORT_TEXT'\n | 'LONG_TEXT'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'URL'\n | 'ARRAY'\n | 'REFERENCE'\n | 'IMAGE';\n\nexport interface AppConfig {\n pages: PageConfig[];\n layout?: 'panel';\n}\n\nexport interface BasePageConfig {\n id: string;\n appMainPage?: boolean;\n}\n\nexport interface CollectionPageConfigType extends BasePageConfig {\n type: 'collectionPage';\n collectionPage: CollectionPageConfig;\n entityPage?: never;\n}\n\nexport interface EntityPageConfigType extends BasePageConfig {\n type: 'entityPage';\n entityPage: EntityPageConfig;\n collectionPage?: never;\n}\n\nexport type PageConfig = CollectionPageConfigType | EntityPageConfigType;\n\nexport type EntityProps = { [key: string]: any };\n\nexport interface IMenuItem<T extends EntityProps = any> {\n item: T;\n}\nexport interface IColumnValue<T> {\n value: T;\n row: Record<string, any>;\n}\n\nexport type QueryOperator =\n | 'CONTAINS'\n | 'ENDS_WITH'\n | 'EQ'\n | 'EXISTS'\n | 'GT'\n | 'GTE'\n | 'HAS_ALL'\n | 'HAS_SOME'\n | 'LT'\n | 'LTE'\n | 'NE'\n | 'STARTS_WITH'\n | 'URLIZED';\n\ninterface BaseField {\n id: string;\n displayName: string;\n validation?: {\n numberRange?: NumberRange;\n stringLengthRange?: StringLengthRange;\n required: boolean;\n };\n capabilities: {\n supportedQueryOperators: QueryOperator[];\n sortable: boolean;\n };\n}\n\nexport interface ReferenceField extends BaseField {\n type: 'REFERENCE';\n referenceMetadata: {\n referencedCollectionId: string;\n };\n}\n\nexport interface NonReferenceField extends BaseField {\n type: Exclude<PatternsFieldType, 'REFERENCE'>;\n}\n\nexport type Field = ReferenceField | NonReferenceField;\n\nexport interface NumberRange {\n min?: number;\n max?: number;\n}\nexport interface StringLengthRange {\n minLength?: number;\n maxLength?: number;\n}\n\nexport interface Query {\n limit: number;\n offset: number;\n page: number;\n search?: string;\n cursor?: string | null;\n filters: Record<string, any>;\n sort?: {\n fieldName: string;\n order: 'asc' | 'desc';\n }[];\n}\n\nexport interface SchemaConfig {\n id: string;\n fields: Record<string, Field | undefined>;\n displayField: string;\n idField: string;\n actions: {\n get: (entityId: string) => Promise<any>;\n create: (newEntity: Partial<any>) => Promise<any>;\n update: (updatedEntity: any) => Promise<any>;\n delete: (entityId: string) => Promise<any>;\n bulkDelete: (entityIds: string[]) => Promise<any>;\n find: (\n query: Query,\n options?: {\n searchableFieldIds?: string[];\n filterFieldMapping?: Record<string, { fieldId: string }>;\n },\n ) => Promise<{ items: any[]; total: number }>;\n };\n}\n"],"mappings":"","ignoreList":[]}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { AppConfig } from '../../types';
3
3
  export interface AutoPatternsAppProps {
4
4
  configuration: AppConfig;
5
+ children?: React.ReactNode;
5
6
  }
6
7
  export declare const AutoPatternsApp: React.FC<AutoPatternsAppProps>;
7
8
  //# sourceMappingURL=AutoPatternsApp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoPatternsApp.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsApp/AutoPatternsApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAQ1D,CAAC"}
1
+ {"version":3,"file":"AutoPatternsApp.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsApp/AutoPatternsApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAY1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CAqBhC,CAAC"}
1
+ {"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAKxE,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CAoChC,CAAC"}
@@ -1 +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"}
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,CAiIA,CAAC"}
@@ -1 +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
+ {"version":3,"file":"ViewModeEntityPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/ViewModeEntityPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,UAAU,uBAAuB;IAC/B,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAGD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8IhE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AutoPatternsRoutes.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAOxC,eAAO,MAAM,kBAAkB,GAAI,YAAY;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,sBAuCnE,CAAC"}
1
+ {"version":3,"file":"AutoPatternsRoutes.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAOxC,eAAO,MAAM,kBAAkB,GAAI,YAAY;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,sBAkDnE,CAAC"}
@@ -4,4 +4,6 @@ export * from './useGridFeatures';
4
4
  export * from './useNavigationUtils';
5
5
  export * from './usePagePath';
6
6
  export * from './useEntityPageHeaderTexts';
7
+ export * from './useUpdateAppContextItems';
8
+ export { useAppContext } from '../providers/AppContext';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,14 +1,23 @@
1
1
  import { EntityPageConfig } from '../types';
2
- export declare const useEntityPageHeaderTexts: ({ config, isCreateMode, entityDisplayName, }: {
2
+ export declare const useEntityPageHeaderTexts: ({ config, isCreateMode, isViewMode, entityDisplayName, entity, }: {
3
3
  config: EntityPageConfig;
4
4
  isCreateMode: boolean;
5
+ isViewMode?: boolean;
5
6
  entityDisplayName?: string;
7
+ entity?: Record<string, any>;
6
8
  }) => {
7
9
  title: {
8
10
  text: string;
11
+ badges: {
12
+ text: string;
13
+ skin?: import("@wix/design-system").BadgeSkin;
14
+ prefixIcon?: import("@wix/design-system").IconElement;
15
+ suffixIcon?: import("@wix/design-system").IconElement;
16
+ }[] | undefined;
9
17
  };
10
18
  subtitle: {
11
19
  text: string;
20
+ id?: string;
12
21
  learnMore?: {
13
22
  url: string;
14
23
  label?: string;
@@ -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;;;;;;;;iBAQoC,CAAC;;;CAQrC,CAAC"}
1
+ {"version":3,"file":"useEntityPageHeaderTexts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageHeaderTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,wBAAwB,GAAI,kEAMtC;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;;;;;;;;;;;;;;;iBAG2B,CAAC;;;CAqD5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGridFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGridFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAStC,eAAO,MAAM,eAAe,GAAI,eAAe,UAAU;;;;;;;;;;;;;;;;;CAwDxD,CAAC"}
1
+ {"version":3,"file":"useGridFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGridFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAUtC,eAAO,MAAM,eAAe,GAAI,eAAe,UAAU;;;;;;;;;;;;;;;;;CA2DxD,CAAC"}
@@ -1,9 +1,13 @@
1
+ import { EntityProps } from '../types';
1
2
  export type NavigateToEntityPageFunc = (args: {
2
3
  item: any;
3
4
  entityPageId?: string;
4
5
  }) => void;
5
6
  export declare const useNavigation: () => {
6
- navigateToEntityPage: ({ item, entityPageId }: any) => void;
7
+ navigateToEntityPage: ({ item, entityPageId }: {
8
+ item: EntityProps;
9
+ entityPageId?: string;
10
+ }) => void;
7
11
  navigateToCollectionPage: (parentPageId: string) => void;
8
12
  getParentPagePath: (parentPageId?: string) => string | undefined;
9
13
  getPagePath: (pageId?: string) => string | undefined;
@@ -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;;6CAmCP,MAAM;uCAaL,MAAM,KAAG,MAAM,GAAG,SAAS;;CAY9C,CAAC"}
1
+ {"version":3,"file":"useNavigationUtils.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigationUtils.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,WAAW,EAAE,MAAM,UAAU,CAAC;AAGzD,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;mDA2BG;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;6CA6BtD,MAAM;uCAgBL,MAAM,KAAG,MAAM,GAAG,SAAS;;CAY9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAUvC,eAAO,MAAM,gBAAgB,GAAI,eAAe,WAAW;;;;;;;;;;;;;;;;;;;;;CA4E1D,CAAC"}
1
+ {"version":3,"file":"useTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAWvC,eAAO,MAAM,gBAAgB,GAAI,eAAe,WAAW;;;;;;;;;;;;;;;;;;;;;CA+E1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableGridSwitchFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAUjD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAgFvE,CAAC"}
1
+ {"version":3,"file":"useTableGridSwitchFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAWjD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAmFvE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useUpdateAppContextItems: (items: any[]) => void;
2
+ //# sourceMappingURL=useUpdateAppContextItems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateAppContextItems.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUpdateAppContextItems.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,GAAI,OAAO,GAAG,EAAE,SAQpD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ItemsContextValue } from './ItemsContext';
3
+ interface AppContextValue extends Pick<ItemsContextValue, 'items'> {
4
+ }
5
+ export interface AppContextProviderProps {
6
+ children: ReactNode;
7
+ }
8
+ export declare const AppContextProvider: React.FC<AppContextProviderProps>;
9
+ export declare const useAppContext: () => AppContextValue;
10
+ export {};
11
+ //# sourceMappingURL=AppContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppContext.d.ts","sourceRoot":"","sources":["../../../src/providers/AppContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AACpE,OAAO,EAEL,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AAExB,UAAU,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC;CAAG;AAIrE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAcD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAQhE,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,eAQhC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface ItemsContextValue {
3
+ items: any[];
4
+ setItems: (items: any[]) => void;
5
+ }
6
+ export interface ItemsContextProviderProps {
7
+ children: ReactNode;
8
+ }
9
+ export declare const ItemsContextProvider: React.FC<ItemsContextProviderProps>;
10
+ export declare const useItemsContext: () => ItemsContextValue;
11
+ //# sourceMappingURL=ItemsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemsContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ItemsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CAClC;AAID,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAepE,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,iBAUlC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { CustomComponentProps, CustomActionCellPrimaryActionResolver, CustomActionCellSecondaryActionResolver, CustomEntityPageActionResolver, CustomBulkActionsActionResolver, CustomActionCollectionPageActionResolver, CustomActionCollectionPageActionOnRowClickResolver, IColumnValue, SchemaConfig } from '../types';
3
3
  import { Section } from '@wix/patterns';
4
+ import { BadgeSkin, IconElement } from '@wix/design-system';
4
5
  export interface PatternsWizardOverridesContextProps {
5
6
  actions?: Record<string, CustomActionCellPrimaryActionResolver | CustomActionCellSecondaryActionResolver | CustomBulkActionsActionResolver | CustomEntityPageActionResolver | CustomActionCollectionPageActionResolver | CustomActionCollectionPageActionOnRowClickResolver>;
6
7
  columns?: Record<string, (props: IColumnValue<any>) => void>;
@@ -8,6 +9,15 @@ export interface PatternsWizardOverridesContextProps {
8
9
  emptyState?: Record<string, () => void>;
9
10
  components?: Record<string, React.FC<CustomComponentProps>>;
10
11
  slots?: Record<string, React.FC>;
12
+ entityPageHeaderSubtitle?: Record<string, (entity: Record<string, any>) => {
13
+ text: string;
14
+ }>;
15
+ entityPageHeaderBadges?: Record<string, (entity: Record<string, any>) => {
16
+ text: string;
17
+ skin?: BadgeSkin;
18
+ prefixIcon?: IconElement;
19
+ suffixIcon?: IconElement;
20
+ }[]>;
11
21
  customDataSources?: Record<string, (collectionId: string, context: any) => Promise<SchemaConfig>>;
12
22
  sections?: Record<string, (item: any) => Section>;
13
23
  }
@@ -1 +1 @@
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
+ {"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;AACxC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE5D,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,E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ext';
4
4
  export * from './SchemaRegistryContext';
5
5
  export * from './AppConfigContext';
6
6
  export * from './ErrorContext';
7
+ export { useAppContext } from './AppContext';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -10,9 +10,13 @@ export type EntityPageBaseConfig = {
10
10
  };
11
11
  title?: {
12
12
  text: string;
13
+ badges?: {
14
+ id: string;
15
+ };
13
16
  };
14
17
  subtitle?: {
15
- text: string;
18
+ text?: string;
19
+ id?: string;
16
20
  learnMore?: {
17
21
  url: string;
18
22
  label?: string;