@wix/auto-patterns 1.26.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.
- package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js +16 -7
- package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +2 -2
- package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +58 -4
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js +19 -5
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
- package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js +1 -1
- package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
- package/dist/cjs/hooks/index.js +19 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useGridFeatures.js +3 -0
- package/dist/cjs/hooks/useGridFeatures.js.map +1 -1
- package/dist/cjs/hooks/useNavigationUtils.js +21 -6
- package/dist/cjs/hooks/useNavigationUtils.js.map +1 -1
- package/dist/cjs/hooks/useTableFeatures.js +3 -0
- package/dist/cjs/hooks/useTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js +3 -0
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/cjs/hooks/useUpdateAppContextItems.js +18 -0
- package/dist/cjs/hooks/useUpdateAppContextItems.js.map +1 -0
- package/dist/cjs/providers/AppContext.js +58 -0
- package/dist/cjs/providers/AppContext.js.map +1 -0
- package/dist/cjs/providers/ItemsContext.js +37 -0
- package/dist/cjs/providers/ItemsContext.js.map +1 -0
- package/dist/cjs/providers/index.js +12 -0
- package/dist/cjs/providers/index.js.map +1 -1
- package/dist/cjs/types/types.js.map +1 -1
- package/dist/docs/auto-patterns-guide.md +119 -22
- package/dist/docs/bulk_actions.md +2 -5
- package/dist/docs/collection_page_actions.md +3 -12
- package/dist/docs/entity_page_actions.md +3 -3
- package/dist/docs/entity_page_view_actions.md +2 -2
- package/dist/docs/index.md +4 -0
- package/dist/docs/resolved_action.md +106 -0
- package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js +5 -3
- package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +2 -2
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +24 -0
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js +8 -0
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js +1 -1
- package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
- package/dist/esm/hooks/index.js +2 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useGridFeatures.js +4 -1
- package/dist/esm/hooks/useGridFeatures.js.map +1 -1
- package/dist/esm/hooks/useNavigationUtils.js +21 -6
- package/dist/esm/hooks/useNavigationUtils.js.map +1 -1
- package/dist/esm/hooks/useTableFeatures.js +4 -1
- package/dist/esm/hooks/useTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableGridSwitchFeatures.js +4 -1
- package/dist/esm/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/esm/hooks/useUpdateAppContextItems.js +13 -0
- package/dist/esm/hooks/useUpdateAppContextItems.js.map +1 -0
- package/dist/esm/providers/AppContext.js +31 -0
- package/dist/esm/providers/AppContext.js.map +1 -0
- package/dist/esm/providers/ItemsContext.js +23 -0
- package/dist/esm/providers/ItemsContext.js.map +1 -0
- package/dist/esm/providers/index.js +1 -0
- package/dist/esm/providers/index.js.map +1 -1
- package/dist/esm/types/types.js.map +1 -1
- package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts +1 -0
- package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsRoute/AutoPatternsRoutes.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useGridFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useNavigationUtils.d.ts +5 -1
- package/dist/types/hooks/useNavigationUtils.d.ts.map +1 -1
- package/dist/types/hooks/useTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useUpdateAppContextItems.d.ts +2 -0
- package/dist/types/hooks/useUpdateAppContextItems.d.ts.map +1 -0
- package/dist/types/providers/AppContext.d.ts +11 -0
- package/dist/types/providers/AppContext.d.ts.map +1 -0
- package/dist/types/providers/ItemsContext.d.ts +11 -0
- package/dist/types/providers/ItemsContext.d.ts.map +1 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/providers/index.d.ts.map +1 -1
- package/dist/types/types/types.d.ts +1 -0
- package/dist/types/types/types.d.ts.map +1 -1
- package/package.json +14 -14
|
@@ -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;
|
|
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,QAAQ,gBAAgB;AAC7C,SAASC,WAAW,EAAEC,4BAA4B,QAAQ,eAAe;AACzE,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;AAC7D,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,OAAO,MAAMC,0BAA0B,GAAIC,MAA6B,IAAK;EAC3E,MAAMC,MAAM,GAAGP,SAAS,CAAC,CAAC;EAE1B,MAAM;IACJQ,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGN,MAAM,CAACO,UAAU;EAErB,MAAM;IAAEC,eAAe;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GAAGjB,UAAU,CACvEO,MAAM,CAACW,OACT,CAAC;EAED,MAAM;IACJC,MAAM;IACNC,cAAc;IACdC,eAAe,EAAEC,mBAAmB;IACpCC;EACF,CAAC,GAAGpB,mBAAmB,CAACI,MAAM,CAAC;EAE/B,MAAM;IACJiB,aAAa;IACbH,eAAe,EAAEI,oBAAoB;IACrCC,OAAO,EAAEC,YAAY;IACrBC,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrBC;EACF,CAAC,GAAG3B,oBAAoB,CAACG,MAAM,CAAC;EAEhC,MAAM;IAAEyB,SAAS,EAAEC;EAAe,CAAC,GAAGrC,YAAY,CAAC;IACjDsC,kBAAkB,EAAEC,KAAK,CAACC,IAAI,CAC5B,IAAIC,GAAG,CAAC,CAAC,GAAGZ,oBAAoB,EAAE,GAAGH,mBAAmB,CAAC,CAC3D,CAAC;IACDL;EACF,CAAC,CAAC;EAEF,MA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|
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":[],"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/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;
|
|
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"}
|
package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map
CHANGED
|
@@ -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;
|
|
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":"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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGridFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGridFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,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 }:
|
|
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":"
|
|
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;
|
|
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;
|
|
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 @@
|
|
|
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 +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"}
|
|
@@ -17,6 +17,7 @@ export type BaseCollectionConfig = CMSCollectionConfig | CustomCollectionConfig;
|
|
|
17
17
|
export type PatternsFieldType = 'SHORT_TEXT' | 'LONG_TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'URL' | 'ARRAY' | 'REFERENCE' | 'IMAGE';
|
|
18
18
|
export interface AppConfig {
|
|
19
19
|
pages: PageConfig[];
|
|
20
|
+
layout?: 'panel';
|
|
20
21
|
}
|
|
21
22
|
export interface BasePageConfig {
|
|
22
23
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,UAAU,0BAA0B;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,mBAAoB,SAAQ,0BAA0B;IAC9D,gBAAgB,EAAE,KAAK,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,UAAU,sBAAuB,SAAQ,0BAA0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AAM,EAAE,CAAC,aAAa,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7C,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3C,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;QAClD,IAAI,EAAE,CACJ,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE;YACR,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;YAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;gBAAE,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;SAC1D,KACE,OAAO,CAAC;YAAE,KAAK,EAAE,GAAG,EAAE,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC/C,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matvey Oklander",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.28.3",
|
|
38
|
-
"@wix/data": "^1.0.
|
|
39
|
-
"@wix/wix-ui-icons-common": "^3.
|
|
38
|
+
"@wix/data": "^1.0.277",
|
|
39
|
+
"@wix/wix-ui-icons-common": "^3.87.1",
|
|
40
40
|
"ejs": "^3.1.10",
|
|
41
41
|
"lodash": "^4.17.21"
|
|
42
42
|
},
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"@types/lodash": "^4.17.20",
|
|
52
52
|
"@types/node": "^16.18.126",
|
|
53
53
|
"@types/node-fetch": "^2.6.13",
|
|
54
|
-
"@types/react": "^16.14.
|
|
55
|
-
"@wix/crm": "^1.0.
|
|
56
|
-
"@wix/design-system": "^1.
|
|
57
|
-
"@wix/eslint-config-yoshi": "^6.
|
|
54
|
+
"@types/react": "^16.14.66",
|
|
55
|
+
"@wix/crm": "^1.0.940",
|
|
56
|
+
"@wix/design-system": "^1.214.1",
|
|
57
|
+
"@wix/eslint-config-yoshi": "^6.157.0",
|
|
58
58
|
"@wix/fe-essentials-standalone": "^1.1380.0",
|
|
59
|
-
"@wix/jest-yoshi-preset": "^6.
|
|
60
|
-
"@wix/patterns": "^1.
|
|
59
|
+
"@wix/jest-yoshi-preset": "^6.157.0",
|
|
60
|
+
"@wix/patterns": "^1.265.0",
|
|
61
61
|
"@wix/sdk": "^1.15.27",
|
|
62
62
|
"@wix/sdk-testkit": ">=0.1.7",
|
|
63
|
-
"@wix/wix-data-items-common": "^1.0.
|
|
64
|
-
"@wix/wix-data-items-sdk": "^1.0.
|
|
65
|
-
"@wix/yoshi-flow-library": "^6.
|
|
66
|
-
"@wix/yoshi-style-dependencies": "^6.
|
|
63
|
+
"@wix/wix-data-items-common": "^1.0.231",
|
|
64
|
+
"@wix/wix-data-items-sdk": "^1.0.424",
|
|
65
|
+
"@wix/yoshi-flow-library": "^6.157.0",
|
|
66
|
+
"@wix/yoshi-style-dependencies": "^6.157.0",
|
|
67
67
|
"chance": "^1.1.13",
|
|
68
68
|
"date-fns": "^2.30.0",
|
|
69
69
|
"express": "^4.21.2",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"wallaby": {
|
|
127
127
|
"autoDetect": true
|
|
128
128
|
},
|
|
129
|
-
"falconPackageHash": "
|
|
129
|
+
"falconPackageHash": "822e945fdc870422abbbe23034d595c9c8564b5ef23630d4722bc26f"
|
|
130
130
|
}
|