@wix/auto-patterns 1.26.0 → 1.28.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/dataSourceAdapters/cms/fetchCmsData.js +1 -1
- package/dist/cjs/dataSourceAdapters/cms/fetchCmsData.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/useAutoPatternsOptimisticActions.js +13 -6
- package/dist/cjs/hooks/useAutoPatternsOptimisticActions.js.map +1 -1
- package/dist/cjs/hooks/useBaseCollectionParams.js +38 -0
- package/dist/cjs/hooks/useBaseCollectionParams.js.map +1 -0
- package/dist/cjs/hooks/useCommonCollectionFeatures.js +13 -6
- package/dist/cjs/hooks/useCommonCollectionFeatures.js.map +1 -1
- package/dist/cjs/hooks/useFetchData.js +4 -5
- package/dist/cjs/hooks/useFetchData.js.map +1 -1
- package/dist/cjs/hooks/useGridFeatures.js +9 -26
- 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 +9 -26
- package/dist/cjs/hooks/useTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js +11 -28
- 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/PatternsWizardOverridesContext.js +1 -1
- package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/cjs/providers/index.js +12 -0
- package/dist/cjs/providers/index.js.map +1 -1
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
- package/dist/cjs/types/fetchData.js +4 -0
- package/dist/cjs/types/fetchData.js.map +1 -0
- package/dist/cjs/types/index.js +6 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/types/types.js.map +1 -1
- package/dist/docs/app_config_structure.md +1 -0
- package/dist/docs/auto-patterns-guide.md +270 -40
- package/dist/docs/bulk_actions.md +2 -5
- package/dist/docs/collection_page_actions.md +3 -12
- package/dist/docs/custom_overrides.md +1 -15
- package/dist/docs/entity_page_actions.md +3 -3
- package/dist/docs/entity_page_view_actions.md +2 -2
- package/dist/docs/error_handling.md +135 -0
- package/dist/docs/index.md +8 -0
- package/dist/docs/resolved_action.md +106 -0
- package/dist/docs/schema_config.md +11 -3
- package/dist/docs/wix_fqdn_custom_data_source.md +49 -7
- 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/dataSourceAdapters/cms/fetchCmsData.js +1 -1
- package/dist/esm/dataSourceAdapters/cms/fetchCmsData.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/useAutoPatternsOptimisticActions.js +14 -9
- package/dist/esm/hooks/useAutoPatternsOptimisticActions.js.map +1 -1
- package/dist/esm/hooks/useBaseCollectionParams.js +37 -0
- package/dist/esm/hooks/useBaseCollectionParams.js.map +1 -0
- package/dist/esm/hooks/useCommonCollectionFeatures.js +9 -2
- package/dist/esm/hooks/useCommonCollectionFeatures.js.map +1 -1
- package/dist/esm/hooks/useFetchData.js +2 -2
- package/dist/esm/hooks/useFetchData.js.map +1 -1
- package/dist/esm/hooks/useGridFeatures.js +10 -30
- 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 +10 -30
- package/dist/esm/hooks/useTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableGridSwitchFeatures.js +12 -32
- 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/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/esm/providers/index.js +1 -0
- package/dist/esm/providers/index.js.map +1 -1
- package/dist/esm/types/CollectionPageConfig.js.map +1 -1
- package/dist/esm/types/fetchData.js +2 -0
- package/dist/esm/types/fetchData.js.map +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/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/useAutoPatternsOptimisticActions.d.ts +7 -1
- package/dist/types/hooks/useAutoPatternsOptimisticActions.d.ts.map +1 -1
- package/dist/types/hooks/useBaseCollectionParams.d.ts +27 -0
- package/dist/types/hooks/useBaseCollectionParams.d.ts.map +1 -0
- package/dist/types/hooks/useCommonCollectionFeatures.d.ts +4 -3
- package/dist/types/hooks/useCommonCollectionFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useFetchData.d.ts +3 -13
- package/dist/types/hooks/useFetchData.d.ts.map +1 -1
- package/dist/types/hooks/useGridFeatures.d.ts +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 +1 -1
- package/dist/types/hooks/useTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts +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/PatternsWizardOverridesContext.d.ts +2 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +1 -1
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/providers/index.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +4 -0
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
- package/dist/types/types/fetchData.d.ts +21 -0
- package/dist/types/types/fetchData.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/types.d.ts +6 -5
- 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","
|
|
1
|
+
{"version":3,"names":["useFetchData","useSelector","useTableGridSwitchCollection","useCommonCollectionFeatures","useFilters","useBaseGridFeatures","useBaseTableFeatures","useBaseCollectionParams","useUpdateAppContextItems","useTableGridSwitchFeatures","config","filterComponent","filtersObject","filterFieldMapping","filters","preset","imagePlacement","visibleFieldIds","gridVisibleFieldIds","renderItem","customColumns","tableVisibleFieldIds","columns","tableColumns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","searchableFieldIds","Array","from","Set","params","collection","state","items","result","commonFeatures","collectionState","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 { useBaseGridFeatures } from './useBaseGridFeatures';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\nimport { useBaseCollectionParams } from './useBaseCollectionParams';\nimport { useUpdateAppContextItems } from './useUpdateAppContextItems';\n\nexport const useTableGridSwitchFeatures = (config: TableGridSwitchConfig) => {\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 } = useFetchData({\n searchableFieldIds: Array.from(\n new Set([...tableVisibleFieldIds, ...gridVisibleFieldIds]),\n ),\n filterFieldMapping,\n });\n\n const params = useBaseCollectionParams({\n config: config.collection,\n fetchData,\n filters: filtersObject,\n });\n\n const state = useTableGridSwitchCollection<any>(params);\n const items = useSelector(() => state.collection.result.items);\n useUpdateAppContextItems(items);\n\n const commonFeatures = useCommonCollectionFeatures({\n ...config,\n collectionState: state.collection,\n });\n\n return {\n ...commonFeatures,\n state,\n columns: tableColumns,\n filters: filterComponent,\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,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,S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;IACVC,aAAa;IACbC,qBAAqB;IACrBc,gBAAgB,EAAE,IAAI;IACtB;IACAxB,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';\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;
|
|
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, useOptimisticActions } 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 optimisticActions?: Record<\n string,\n Parameters<typeof useOptimisticActions>[1]\n >;\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;AAuDnE,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 +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":["ComponentTypeEnum"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport { DateRangeFilterMode, DateRangeOptions } from '@wix/patterns/core';\nimport { BaseCollectionConfig } from './types';\nimport {\n ActionCellConfig,\n BulkActionsConfig,\n CollectionPageOnRowClickActionConfig,\n CollectionPagePrimaryActions,\n CollectionPageSecondaryActions,\n} from './actions';\n\nexport interface CollectionPageTitle {\n text: string;\n hideTotal?: boolean;\n}\n\nexport interface CollectionPageSubtitle {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n}\n\nexport interface CollectionPageConfig {\n route: {\n path: string;\n };\n title: CollectionPageTitle;\n subtitle?: CollectionPageSubtitle;\n actions?: {\n primaryActions?: CollectionPagePrimaryActions;\n secondaryActions?: CollectionPageSecondaryActions;\n };\n components: ComponentConfig[];\n}\n\nexport interface CollectionComponentConfig\n extends BaseCollectionComponentConfig {\n type: 'collection';\n layout: LayoutItemConfig[];\n}\n\nexport interface CustomComponentConfig {\n type: 'custom';\n id: string;\n}\n\nexport type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;\n\nexport interface LayoutItemConfig {\n type: 'Table' | 'Grid';\n table?: TableSpecificConfig;\n grid?: GridSpecificConfig;\n}\n\nexport type ColumnsConfig = Column[];\n\nexport interface TableSpecificConfig {\n columns: ColumnsConfig;\n customColumns?: {\n enabled: boolean;\n };\n stickyColumns?: number;\n onRowClick?: CollectionPageOnRowClickActionConfig;\n showTitleBar?: boolean;\n sections?: {\n id: string;\n };\n}\n\nexport interface GridSpecificConfig {\n item: GridItem;\n}\n\nexport interface TableConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig {}\nexport interface GridConfig\n extends BaseCollectionComponentConfig,\n GridSpecificConfig {}\nexport interface TableGridSwitchConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig,\n GridSpecificConfig {}\n\nexport type CollectionConfig = BaseCollectionConfig & {\n limit?: number;\n reflectQueryInUrl?: boolean;\n selectAllScope?: 'page' | 'all';\n selectionUpdateMode?: 'preserve' | 'clear';\n};\n\nexport interface BaseCollectionComponentConfig {\n collection: CollectionConfig;\n entityPageId?: string;\n search?: { shown?: boolean };\n toolbarTitle?: ToolbarTitle;\n actionCell?: ActionCellConfig;\n emptyState?: EmptyState;\n filters?: FiltersConfig;\n bulkActionToolbar?: BulkActionsConfig;\n}\n\nexport interface ToolbarTitle {\n title: string;\n subtitle?: {\n text: string;\n info?: {\n content: {\n text: string;\n link?: {\n url: string;\n label: string;\n };\n };\n };\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n showTotal?: boolean;\n itemsLimit?: number;\n}\n\nexport interface Column {\n id: string;\n name: string;\n width: string;\n sortable?: boolean;\n defaultSortOrder?: 'asc' | 'desc';\n sortMode?: 'asc' | 'desc';\n defaultHidden?: boolean;\n hiddenFromCustomColumnsSelection?: boolean;\n hideable?: boolean;\n reorderDisabled?: boolean;\n}\n\nexport interface GridItem {\n titleFieldId: string;\n subtitleFieldId?: string;\n imageFieldId?: string;\n cardContentMode?: 'full' | 'title' | 'empty'; // Footer is not supported in auto-patterns\n imagePlacement?: 'top' | 'side';\n}\n\nexport interface EmptyState {\n title?: string;\n subtitle?: string;\n image?: {\n id: string;\n };\n addNewCta?: {\n id?: string;\n text?: string;\n };\n customCta?: {\n id?: string;\n };\n}\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport type FilterSelectionMode = 'single' | 'multiple';\nexport type FilterOptionType =\n | 'checkbox'\n | 'inlineCheckbox'\n | 'radio'\n | 'select';\n\nexport enum ComponentTypeEnum {\n SINGLE = 'single',\n MULTI_SELECT = 'multi-select',\n RADIO_GROUP = 'radio-group',\n NUMBER = 'number',\n DATE_RANGE = 'date-range',\n}\n\nexport type FilterItems = Filter[];\nexport interface FiltersConfig {\n items: FilterItems;\n maxInlineFilters?: CollectionToolbarFiltersProps['inline'];\n panelTitle?: string;\n}\n\nexport interface BaseOptionsFilterConfig {\n selectionMode: FilterSelectionMode;\n}\n\nexport interface DateFilterConfig {\n mode?: DateRangeFilterMode;\n presets?: DateRangeOptions;\n includeTime?: boolean;\n}\n\nexport interface NumberFilterConfig {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n}\n\nexport interface BooleanFilterConfig {\n trueLabel?: string;\n falseLabel?: string;\n}\n\nexport interface EnumFilterConfig extends BaseOptionsFilterConfig {\n options: FilterOption[];\n optionType?: FilterOptionType;\n}\n\nexport interface DynamicOptionsFilterConfig extends BaseOptionsFilterConfig {}\n\nexport interface Filter {\n id: string;\n fieldId: string;\n displayName?: string;\n sectionTitle?: string;\n openByDefault?: boolean;\n tagLabel?: string;\n numberConfig?: NumberFilterConfig;\n dateConfig?: DateFilterConfig;\n booleanConfig?: BooleanFilterConfig;\n enumConfig?: EnumFilterConfig;\n dynamicOptionsConfig?: DynamicOptionsFilterConfig;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ComponentTypeEnum"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport { DateRangeFilterMode, DateRangeOptions } from '@wix/patterns/core';\nimport { BaseCollectionConfig } from './types';\nimport {\n ActionCellConfig,\n BulkActionsConfig,\n CollectionPageOnRowClickActionConfig,\n CollectionPagePrimaryActions,\n CollectionPageSecondaryActions,\n} from './actions';\n\nexport interface CollectionPageTitle {\n text: string;\n hideTotal?: boolean;\n}\n\nexport interface CollectionPageSubtitle {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n}\n\nexport interface CollectionPageConfig {\n route: {\n path: string;\n };\n title: CollectionPageTitle;\n subtitle?: CollectionPageSubtitle;\n actions?: {\n primaryActions?: CollectionPagePrimaryActions;\n secondaryActions?: CollectionPageSecondaryActions;\n };\n components: ComponentConfig[];\n}\n\nexport interface CollectionComponentConfig\n extends BaseCollectionComponentConfig {\n type: 'collection';\n layout: LayoutItemConfig[];\n}\n\nexport interface CustomComponentConfig {\n type: 'custom';\n id: string;\n}\n\nexport type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;\n\nexport interface LayoutItemConfig {\n type: 'Table' | 'Grid';\n table?: TableSpecificConfig;\n grid?: GridSpecificConfig;\n}\n\nexport type ColumnsConfig = Column[];\n\nexport interface TableSpecificConfig {\n columns: ColumnsConfig;\n customColumns?: {\n enabled: boolean;\n };\n stickyColumns?: number;\n onRowClick?: CollectionPageOnRowClickActionConfig;\n showTitleBar?: boolean;\n sections?: {\n id: string;\n };\n}\n\nexport interface GridSpecificConfig {\n item: GridItem;\n}\n\nexport interface TableConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig {}\nexport interface GridConfig\n extends BaseCollectionComponentConfig,\n GridSpecificConfig {}\nexport interface TableGridSwitchConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig,\n GridSpecificConfig {}\n\nexport type CollectionConfig = BaseCollectionConfig & {\n limit?: number;\n reflectQueryInUrl?: boolean;\n selectAllScope?: 'page' | 'all';\n selectionUpdateMode?: 'preserve' | 'clear';\n optimisticActions?: {\n id: string;\n };\n paginationMode?: 'cursor' | 'offset';\n};\n\nexport interface BaseCollectionComponentConfig {\n collection: CollectionConfig;\n entityPageId?: string;\n search?: { shown?: boolean };\n toolbarTitle?: ToolbarTitle;\n actionCell?: ActionCellConfig;\n emptyState?: EmptyState;\n filters?: FiltersConfig;\n bulkActionToolbar?: BulkActionsConfig;\n}\n\nexport interface ToolbarTitle {\n title: string;\n subtitle?: {\n text: string;\n info?: {\n content: {\n text: string;\n link?: {\n url: string;\n label: string;\n };\n };\n };\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n showTotal?: boolean;\n itemsLimit?: number;\n}\n\nexport interface Column {\n id: string;\n name: string;\n width: string;\n sortable?: boolean;\n defaultSortOrder?: 'asc' | 'desc';\n sortMode?: 'asc' | 'desc';\n defaultHidden?: boolean;\n hiddenFromCustomColumnsSelection?: boolean;\n hideable?: boolean;\n reorderDisabled?: boolean;\n}\n\nexport interface GridItem {\n titleFieldId: string;\n subtitleFieldId?: string;\n imageFieldId?: string;\n cardContentMode?: 'full' | 'title' | 'empty'; // Footer is not supported in auto-patterns\n imagePlacement?: 'top' | 'side';\n}\n\nexport interface EmptyState {\n title?: string;\n subtitle?: string;\n image?: {\n id: string;\n };\n addNewCta?: {\n id?: string;\n text?: string;\n };\n customCta?: {\n id?: string;\n };\n}\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport type FilterSelectionMode = 'single' | 'multiple';\nexport type FilterOptionType =\n | 'checkbox'\n | 'inlineCheckbox'\n | 'radio'\n | 'select';\n\nexport enum ComponentTypeEnum {\n SINGLE = 'single',\n MULTI_SELECT = 'multi-select',\n RADIO_GROUP = 'radio-group',\n NUMBER = 'number',\n DATE_RANGE = 'date-range',\n}\n\nexport type FilterItems = Filter[];\nexport interface FiltersConfig {\n items: FilterItems;\n maxInlineFilters?: CollectionToolbarFiltersProps['inline'];\n panelTitle?: string;\n}\n\nexport interface BaseOptionsFilterConfig {\n selectionMode: FilterSelectionMode;\n}\n\nexport interface DateFilterConfig {\n mode?: DateRangeFilterMode;\n presets?: DateRangeOptions;\n includeTime?: boolean;\n}\n\nexport interface NumberFilterConfig {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n}\n\nexport interface BooleanFilterConfig {\n trueLabel?: string;\n falseLabel?: string;\n}\n\nexport interface EnumFilterConfig extends BaseOptionsFilterConfig {\n options: FilterOption[];\n optionType?: FilterOptionType;\n}\n\nexport interface DynamicOptionsFilterConfig extends BaseOptionsFilterConfig {}\n\nexport interface Filter {\n id: string;\n fieldId: string;\n displayName?: string;\n sectionTitle?: string;\n openByDefault?: boolean;\n tagLabel?: string;\n numberConfig?: NumberFilterConfig;\n dateConfig?: DateFilterConfig;\n booleanConfig?: BooleanFilterConfig;\n enumConfig?: EnumFilterConfig;\n dynamicOptionsConfig?: DynamicOptionsFilterConfig;\n}\n"],"mappings":"AAkLA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/fetchData.ts"],"sourcesContent":["import { CursorQuery, OffsetQuery } from '@wix/patterns';\n\nexport type Mode = 'cursor' | 'offset';\n\nexport type UseFetchDataProps<M extends Mode> = {\n searchableFieldIds?: string[];\n filterFieldMapping?: Record<string, { fieldId: string }>;\n paginationMode?: M;\n};\n\nexport interface CursorQueryResult {\n items: any[];\n cursor?: string | undefined | null;\n total?: number | null;\n}\n\nexport interface OffsetQueryResult {\n items: any[];\n total?: number | null;\n hasNext?: boolean;\n}\n\nexport type FetchDataFn<M extends Mode> = M extends 'cursor'\n ? (q: CursorQuery<any>) => Promise<CursorQueryResult>\n : (q: OffsetQuery<any>) => Promise<OffsetQueryResult>;\n"],"mappings":"","ignoreList":[]}
|
package/dist/esm/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/types/index.ts"],"sourcesContent":["export * from './types';\nexport * from './CollectionPageConfig';\nexport * from './EntityPageConfig';\nexport * from './providers';\nexport * from './actions';\nexport * from '../utils/actions/types';\nexport * from './BaseSDK';\n"],"mappings":"AAAA,cAAc,SAAS;AACvB,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,wBAAwB;AACtC,cAAc,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/index.ts"],"sourcesContent":["export * from './types';\nexport * from './CollectionPageConfig';\nexport * from './EntityPageConfig';\nexport * from './providers';\nexport * from './actions';\nexport * from '../utils/actions/types';\nexport * from './BaseSDK';\nexport * from './fetchData';\n"],"mappings":"AAAA,cAAc,SAAS;AACvB,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,wBAAwB;AACtC,cAAc,WAAW;AACzB,cAAc,aAAa","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
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\nimport { useOptimisticActions } from '@wix/patterns';\nimport { CursorQueryResult, OffsetQueryResult } from './fetchData';\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}\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<CursorQueryResult | OffsetQueryResult>;\n };\n}\n\nexport type OptimisticActionsParams = Parameters<\n typeof useOptimisticActions\n>[1];\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,3 +1,9 @@
|
|
|
1
1
|
import { CollectionState } from '@wix/patterns';
|
|
2
|
-
|
|
2
|
+
import { CollectionConfig } from '../types/CollectionPageConfig';
|
|
3
|
+
interface UseAutoPatternsOptimisticActionParams {
|
|
4
|
+
collectionConfig: CollectionConfig;
|
|
5
|
+
collectionState: CollectionState<any>;
|
|
6
|
+
}
|
|
7
|
+
export declare const useAutoPatternsOptimisticActions: ({ collectionConfig, collectionState, }: UseAutoPatternsOptimisticActionParams) => import("@wix/patterns").CollectionOptimisticActions<unknown, import("@wix/patterns").FiltersMap>;
|
|
8
|
+
export {};
|
|
3
9
|
//# sourceMappingURL=useAutoPatternsOptimisticActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutoPatternsOptimisticActions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAutoPatternsOptimisticActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAwB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useAutoPatternsOptimisticActions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAutoPatternsOptimisticActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAwB,MAAM,eAAe,CAAC;AAGtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,UAAU,qCAAqC;IAC7C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;CACvC;AAED,eAAO,MAAM,gCAAgC,GAAI,wCAG9C,qCAAqC,qGAoBvC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Filter } from '@wix/patterns';
|
|
2
|
+
import { CollectionConfig, FetchDataFn } from '../types';
|
|
3
|
+
export declare const useBaseCollectionParams: ({ config, fetchData, filters, }: {
|
|
4
|
+
config: CollectionConfig;
|
|
5
|
+
fetchData: FetchDataFn<any>;
|
|
6
|
+
filters: {
|
|
7
|
+
[key: string]: Filter<any>;
|
|
8
|
+
};
|
|
9
|
+
}) => {
|
|
10
|
+
queryName: string;
|
|
11
|
+
paginationMode: any;
|
|
12
|
+
itemKey: (item: any) => any;
|
|
13
|
+
itemName: (item: any) => any;
|
|
14
|
+
toExtendedFields: (item: any) => any;
|
|
15
|
+
fetchErrorMessage: ({ err }: {
|
|
16
|
+
err: unknown;
|
|
17
|
+
}) => string;
|
|
18
|
+
fetchData: ((q: import("@wix/patterns").CursorQuery<any>) => Promise<import("../types").CursorQueryResult>) | ((q: import("@wix/patterns").OffsetQuery<any>) => Promise<import("../types").OffsetQueryResult>);
|
|
19
|
+
filters: {
|
|
20
|
+
[key: string]: Filter<any>;
|
|
21
|
+
};
|
|
22
|
+
limit: number | undefined;
|
|
23
|
+
persistQueryToUrl: boolean | undefined;
|
|
24
|
+
disableAutoSelectAllCount: boolean;
|
|
25
|
+
selectionConsistencyMode: "preserve" | "clear" | undefined;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=useBaseCollectionParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBaseCollectionParams.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBaseCollectionParams.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,uBAAuB,GAAI,iCAIrC;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;KAC5B,CAAC;CACH;;oBAcqC,GAAG;oBACrB,GAAG;qBACF,GAAG;6BACK,GAAG;iCACC;QAAE,GAAG,EAAE,OAAO,CAAA;KAAE;;;;;;;;;CAQhD,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CollectionState } from '@wix/patterns';
|
|
3
3
|
import { BaseCollectionComponentConfig } from '../types';
|
|
4
4
|
export type UseCommonCollectionFeaturesParams = Pick<BaseCollectionComponentConfig, 'actionCell' | 'toolbarTitle' | 'search' | 'emptyState' | 'collection' | 'bulkActionToolbar' | 'entityPageId'> & {
|
|
5
|
-
|
|
5
|
+
collectionState: CollectionState<any>;
|
|
6
6
|
};
|
|
7
|
-
export declare const useCommonCollectionFeatures: ({ actionCell: actionCellConfig, bulkActionToolbar: bulkActionToolbarConfig, toolbarTitle, search, emptyState: emptyStateConfig, collection, }: UseCommonCollectionFeaturesParams) => {
|
|
7
|
+
export declare const useCommonCollectionFeatures: ({ actionCell: actionCellConfig, bulkActionToolbar: bulkActionToolbarConfig, toolbarTitle, search, emptyState: emptyStateConfig, collection, collectionState, }: UseCommonCollectionFeaturesParams) => {
|
|
8
8
|
search: boolean;
|
|
9
9
|
title: React.JSX.Element | undefined;
|
|
10
10
|
emptyState: React.JSX.Element;
|
|
11
11
|
actionCell: (item: any, index: any, api: any) => {};
|
|
12
12
|
bulkActionToolbar: ((param: import("./useBulkActionToolbar").BulkActionToolbarRenderProp) => React.JSX.Element) | undefined;
|
|
13
|
+
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<unknown, import("@wix/patterns").FiltersMap>;
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=useCommonCollectionFeatures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommonCollectionFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCommonCollectionFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useCommonCollectionFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCommonCollectionFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAgB,MAAM,eAAe,CAAC;AAG9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAKzD,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAClD,6BAA6B,EAC3B,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,mBAAmB,GACnB,cAAc,CACjB,GAAG;IACF,eAAe,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,gKAQzC,iCAAiC;;;;;;;CAgEnC,CAAC"}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
filterFieldMapping?: Record<string, {
|
|
5
|
-
fieldId: string;
|
|
6
|
-
}>;
|
|
7
|
-
}
|
|
8
|
-
export declare const useFetchData: ({ searchableFieldIds, filterFieldMapping, }: UseFetchDataProps) => {
|
|
9
|
-
fetchData: (query: ComputedQuery<any>) => Promise<{
|
|
10
|
-
items: any[];
|
|
11
|
-
total: number;
|
|
12
|
-
}>;
|
|
1
|
+
import { FetchDataFn, Mode, UseFetchDataProps } from '../types';
|
|
2
|
+
export declare function useFetchData<M extends Mode>({ searchableFieldIds, filterFieldMapping, }: UseFetchDataProps<M>): {
|
|
3
|
+
fetchData: FetchDataFn<M>;
|
|
13
4
|
};
|
|
14
|
-
export {};
|
|
15
5
|
//# sourceMappingURL=useFetchData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFetchData.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFetchData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFetchData.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEhE,wBAAgB,YAAY,CAAC,CAAC,SAAS,IAAI,EAAE,EAC3C,kBAAkB,EAClB,kBAAkB,GACnB,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,CAatD"}
|
|
@@ -3,7 +3,6 @@ export declare const useGridFeatures: (configuration: GridConfig) => {
|
|
|
3
3
|
state: import("@wix/patterns").GridState<any, import("@wix/patterns").OptionalFiltersMap>;
|
|
4
4
|
imagePlacement: "top" | "side" | undefined;
|
|
5
5
|
preset: "title" | "full" | "empty" | undefined;
|
|
6
|
-
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<any, import("@wix/patterns").FiltersMap>;
|
|
7
6
|
renderItem: (gridItem: any) => {
|
|
8
7
|
backgroundImageUrl?: string | undefined;
|
|
9
8
|
subtitle?: string | undefined;
|
|
@@ -16,5 +15,6 @@ export declare const useGridFeatures: (configuration: GridConfig) => {
|
|
|
16
15
|
emptyState: import("react").JSX.Element;
|
|
17
16
|
actionCell: (item: any, index: any, api: any) => {};
|
|
18
17
|
bulkActionToolbar: ((param: import("./useBulkActionToolbar").BulkActionToolbarRenderProp) => import("react").JSX.Element) | undefined;
|
|
18
|
+
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<unknown, import("@wix/patterns").FiltersMap>;
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=useGridFeatures.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;
|
|
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;;;;;;;;;;;;;;;;;CAoCxD,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"}
|
|
@@ -3,7 +3,6 @@ export declare const useTableFeatures: (configuration: TableConfig) => {
|
|
|
3
3
|
state: import("@wix/patterns").TableState<any, import("@wix/patterns").OptionalFiltersMap>;
|
|
4
4
|
columns: import("@wix/patterns").TableColumn<any>[];
|
|
5
5
|
filters: import("react").JSX.Element | undefined;
|
|
6
|
-
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<any, import("@wix/patterns").FiltersMap>;
|
|
7
6
|
customColumns: import("react").JSX.Element | undefined;
|
|
8
7
|
onRowClick: (item: any, index: any) => void | null;
|
|
9
8
|
stickyColumns: number | undefined;
|
|
@@ -20,5 +19,6 @@ export declare const useTableFeatures: (configuration: TableConfig) => {
|
|
|
20
19
|
emptyState: import("react").JSX.Element;
|
|
21
20
|
actionCell: (item: any, index: any, api: any) => {};
|
|
22
21
|
bulkActionToolbar: ((param: import("./useBulkActionToolbar").BulkActionToolbarRenderProp) => import("react").JSX.Element) | undefined;
|
|
22
|
+
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<unknown, import("@wix/patterns").FiltersMap>;
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=useTableFeatures.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;
|
|
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;;;;;;;;;;;;;;;;;;;;;CAyD1D,CAAC"}
|
|
@@ -3,7 +3,6 @@ export declare const useTableGridSwitchFeatures: (config: TableGridSwitchConfig)
|
|
|
3
3
|
state: import("@wix/patterns").TableGridSwitchState<any, import("@wix/patterns").OptionalFiltersMap>;
|
|
4
4
|
columns: import("@wix/patterns").TableColumn<any>[];
|
|
5
5
|
filters: import("react").JSX.Element | undefined;
|
|
6
|
-
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<any, import("@wix/patterns").FiltersMap>;
|
|
7
6
|
customColumns: import("react").JSX.Element | undefined;
|
|
8
7
|
onRowClick: (item: any, index: any) => void | null;
|
|
9
8
|
stickyColumns: number | undefined;
|
|
@@ -23,5 +22,6 @@ export declare const useTableGridSwitchFeatures: (config: TableGridSwitchConfig)
|
|
|
23
22
|
emptyState: import("react").JSX.Element;
|
|
24
23
|
actionCell: (item: any, index: any, api: any) => {};
|
|
25
24
|
bulkActionToolbar: ((param: import("./useBulkActionToolbar").BulkActionToolbarRenderProp) => import("react").JSX.Element) | undefined;
|
|
25
|
+
optimisticActions: import("@wix/patterns").CollectionOptimisticActions<unknown, import("@wix/patterns").FiltersMap>;
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=useTableGridSwitchFeatures.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;CA4DvE,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,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CustomComponentProps, CustomActionCellPrimaryActionResolver, CustomActionCellSecondaryActionResolver, CustomEntityPageActionResolver, CustomBulkActionsActionResolver, CustomActionCollectionPageActionResolver, CustomActionCollectionPageActionOnRowClickResolver, IColumnValue, SchemaConfig } from '../types';
|
|
3
|
-
import { Section } from '@wix/patterns';
|
|
3
|
+
import { Section, useOptimisticActions } from '@wix/patterns';
|
|
4
4
|
import { BadgeSkin, IconElement } from '@wix/design-system';
|
|
5
5
|
export interface PatternsWizardOverridesContextProps {
|
|
6
6
|
actions?: Record<string, CustomActionCellPrimaryActionResolver | CustomActionCellSecondaryActionResolver | CustomBulkActionsActionResolver | CustomEntityPageActionResolver | CustomActionCollectionPageActionResolver | CustomActionCollectionPageActionOnRowClickResolver>;
|
|
@@ -20,6 +20,7 @@ export interface PatternsWizardOverridesContextProps {
|
|
|
20
20
|
}[]>;
|
|
21
21
|
customDataSources?: Record<string, (collectionId: string, context: any) => Promise<SchemaConfig>>;
|
|
22
22
|
sections?: Record<string, (item: any) => Section>;
|
|
23
|
+
optimisticActions?: Record<string, Parameters<typeof useOptimisticActions>[1]>;
|
|
23
24
|
}
|
|
24
25
|
export declare const PatternsWizardOverridesProvider: React.FC<{
|
|
25
26
|
children: ReactNode;
|
|
@@ -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;
|
|
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,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;KAC1B,EAAE,CACJ,CAAC;IACF,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;IAClD,iBAAiB,CAAC,EAAE,MAAM,CACxB,MAAM,EACN,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;CACH;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 +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"}
|
|
@@ -66,6 +66,10 @@ export type CollectionConfig = BaseCollectionConfig & {
|
|
|
66
66
|
reflectQueryInUrl?: boolean;
|
|
67
67
|
selectAllScope?: 'page' | 'all';
|
|
68
68
|
selectionUpdateMode?: 'preserve' | 'clear';
|
|
69
|
+
optimisticActions?: {
|
|
70
|
+
id: string;
|
|
71
|
+
};
|
|
72
|
+
paginationMode?: 'cursor' | 'offset';
|
|
69
73
|
};
|
|
70
74
|
export interface BaseCollectionComponentConfig {
|
|
71
75
|
collection: CollectionConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionPageConfig.d.ts","sourceRoot":"","sources":["../../../src/types/CollectionPageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,4BAA4B,CAAC;QAC9C,gBAAgB,CAAC,EAAE,8BAA8B,CAAC;KACnD,CAAC;IACF,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,yBACf,SAAQ,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