@wix/auto-patterns 1.21.0 → 1.22.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/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +109 -0
- package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -0
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +5 -14
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +19 -68
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/cjs/hooks/useActionCell.js +10 -2
- package/dist/cjs/hooks/useActionCell.js.map +1 -1
- package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
- package/dist/cjs/types/actions/actionCell.js.map +1 -1
- package/dist/docs/action_cell.md +13 -3
- package/dist/docs/app_config_structure.md +7 -1
- package/dist/docs/auto-patterns-guide.md +201 -13
- package/dist/docs/custom_overrides.md +181 -9
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +72 -0
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -0
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +1 -3
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +17 -48
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/esm/hooks/useActionCell.js +10 -2
- package/dist/esm/hooks/useActionCell.js.map +1 -1
- package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/esm/types/CollectionPageConfig.js.map +1 -1
- package/dist/esm/types/actions/actionCell.js.map +1 -1
- package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts +7 -0
- package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.d.ts.map +1 -1
- package/dist/types/hooks/useActionCell.d.ts.map +1 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts +1 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +7 -1
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
- package/dist/types/types/actions/actionCell.d.ts +1 -0
- package/dist/types/types/actions/actionCell.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AutoPatternsTableGridSwitch } from '../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch';
|
|
2
|
+
import { AutoPatternsTable } from '../AutoPatternsTable';
|
|
3
|
+
import { AutoPatternsGrid } from '../AutoPatternsGrid';
|
|
4
|
+
import { SchemaProvider } from '../../providers';
|
|
5
|
+
import { SkeletonCollection } from '../AutoPatternsCollectionPageContent/SkeletonCollection';
|
|
6
|
+
import React, { useMemo } from 'react';
|
|
7
|
+
export const AutoPatternsCollectionComponent = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
component,
|
|
10
|
+
index
|
|
11
|
+
} = _ref;
|
|
12
|
+
const {
|
|
13
|
+
layout,
|
|
14
|
+
...sharedConfig
|
|
15
|
+
} = component;
|
|
16
|
+
const memoized = useMemo(() => {
|
|
17
|
+
var _layout$find, _layout$find2;
|
|
18
|
+
if (!(layout != null && layout.length)) {
|
|
19
|
+
return {
|
|
20
|
+
componentToRender: null,
|
|
21
|
+
componentType: 'Table'
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const tableConfig = (_layout$find = layout.find(item => item.type === 'Table')) == null ? void 0 : _layout$find.table;
|
|
25
|
+
const gridConfig = (_layout$find2 = layout.find(item => item.type === 'Grid')) == null ? void 0 : _layout$find2.grid;
|
|
26
|
+
let componentType = 'Table';
|
|
27
|
+
let componentToRender = null;
|
|
28
|
+
if (tableConfig && gridConfig) {
|
|
29
|
+
const config = {
|
|
30
|
+
...sharedConfig,
|
|
31
|
+
...tableConfig,
|
|
32
|
+
...gridConfig
|
|
33
|
+
};
|
|
34
|
+
componentToRender = /*#__PURE__*/React.createElement(AutoPatternsTableGridSwitch, {
|
|
35
|
+
configuration: config
|
|
36
|
+
});
|
|
37
|
+
} else if (tableConfig) {
|
|
38
|
+
const config = {
|
|
39
|
+
...sharedConfig,
|
|
40
|
+
...tableConfig
|
|
41
|
+
};
|
|
42
|
+
componentToRender = /*#__PURE__*/React.createElement(AutoPatternsTable, {
|
|
43
|
+
configuration: config
|
|
44
|
+
});
|
|
45
|
+
} else if (gridConfig) {
|
|
46
|
+
componentType = 'Grid';
|
|
47
|
+
const config = {
|
|
48
|
+
...sharedConfig,
|
|
49
|
+
...gridConfig
|
|
50
|
+
};
|
|
51
|
+
componentToRender = /*#__PURE__*/React.createElement(AutoPatternsGrid, {
|
|
52
|
+
configuration: config
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
componentToRender,
|
|
57
|
+
componentType
|
|
58
|
+
};
|
|
59
|
+
}, [layout, sharedConfig]);
|
|
60
|
+
const {
|
|
61
|
+
componentToRender,
|
|
62
|
+
componentType
|
|
63
|
+
} = memoized;
|
|
64
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, componentToRender ? /*#__PURE__*/React.createElement(SchemaProvider, {
|
|
65
|
+
key: `${sharedConfig.collection.collectionId}-${index}`,
|
|
66
|
+
collection: sharedConfig.collection,
|
|
67
|
+
skeleton: /*#__PURE__*/React.createElement(SkeletonCollection, {
|
|
68
|
+
componentType: componentType
|
|
69
|
+
})
|
|
70
|
+
}, componentToRender) : null);
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=AutoPatternsCollectionComponent.js.map
|
package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AutoPatternsTableGridSwitch","AutoPatternsTable","AutoPatternsGrid","SchemaProvider","SkeletonCollection","React","useMemo","AutoPatternsCollectionComponent","_ref","component","index","layout","sharedConfig","memoized","_layout$find","_layout$find2","length","componentToRender","componentType","tableConfig","find","item","type","table","gridConfig","grid","config","createElement","configuration","Fragment","key","collection","collectionId","skeleton"],"sources":["../../../../src/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.tsx"],"sourcesContent":["import { CollectionComponentConfig } from '../../types';\nimport { AutoPatternsTableGridSwitch } from '../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch';\nimport { AutoPatternsTable } from '../AutoPatternsTable';\nimport { AutoPatternsGrid } from '../AutoPatternsGrid';\nimport { SchemaProvider } from '../../providers';\nimport { SkeletonCollection } from '../AutoPatternsCollectionPageContent/SkeletonCollection';\nimport React, { useMemo } from 'react';\n\nexport const AutoPatternsCollectionComponent = ({\n component,\n index,\n}: {\n component: CollectionComponentConfig;\n index: number;\n}) => {\n const { layout, ...sharedConfig } = component;\n\n const memoized = useMemo(() => {\n if (!layout?.length) {\n return {\n componentToRender: null,\n componentType: 'Table' as 'Table' | 'Grid',\n };\n }\n\n const tableConfig = layout.find((item) => item.type === 'Table')?.table;\n const gridConfig = layout.find((item) => item.type === 'Grid')?.grid;\n\n let componentType: 'Table' | 'Grid' = 'Table';\n let componentToRender: React.ReactNode = null;\n\n if (tableConfig && gridConfig) {\n const config = {\n ...sharedConfig,\n ...tableConfig,\n ...gridConfig,\n };\n componentToRender = (\n <AutoPatternsTableGridSwitch configuration={config} />\n );\n } else if (tableConfig) {\n const config = { ...sharedConfig, ...tableConfig };\n componentToRender = <AutoPatternsTable configuration={config} />;\n } else if (gridConfig) {\n componentType = 'Grid';\n const config = { ...sharedConfig, ...gridConfig };\n componentToRender = <AutoPatternsGrid configuration={config} />;\n }\n\n return { componentToRender, componentType };\n }, [layout, sharedConfig]);\n\n const { componentToRender, componentType } = memoized;\n\n return (\n <>\n {componentToRender ? (\n <SchemaProvider\n key={`${sharedConfig.collection.collectionId}-${index}`}\n collection={sharedConfig.collection}\n skeleton={<SkeletonCollection componentType={componentType} />}\n >\n {componentToRender}\n </SchemaProvider>\n ) : null}\n </>\n );\n};\n"],"mappings":"AACA,SAASA,2BAA2B,QAAQ,4DAA4D;AACxG,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,kBAAkB,QAAQ,yDAAyD;AAC5F,OAAOC,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,OAAO,MAAMC,+BAA+B,GAAGC,IAAA,IAMzC;EAAA,IAN0C;IAC9CC,SAAS;IACTC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAM;IAAEG,MAAM;IAAE,GAAGC;EAAa,CAAC,GAAGH,SAAS;EAE7C,MAAMI,QAAQ,GAAGP,OAAO,CAAC,MAAM;IAAA,IAAAQ,YAAA,EAAAC,aAAA;IAC7B,IAAI,EAACJ,MAAM,YAANA,MAAM,CAAEK,MAAM,GAAE;MACnB,OAAO;QACLC,iBAAiB,EAAE,IAAI;QACvBC,aAAa,EAAE;MACjB,CAAC;IACH;IAEA,MAAMC,WAAW,IAAAL,YAAA,GAAGH,MAAM,CAACS,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACC,IAAI,KAAK,OAAO,CAAC,qBAA5CR,YAAA,CAA8CS,KAAK;IACvE,MAAMC,UAA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IACxDqB,UAAU,EAAEnB,YAAY,CAACmB,UAAW;IACpCE,QAAQ,eAAE5B,KAAA,CAAAsB,aAAA,CAACvB,kBAAkB;MAACc,aAAa,EAAEA;IAAc,CAAE;EAAE,GAE9DD,iBACa,CAAC,GACf,IACJ,CAAC;AAEP,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CollectionPage } from '@wix/patterns/page';
|
|
3
3
|
import { AutoPatternsCollectionPageContent } from '../AutoPatternsCollectionPageContent';
|
|
4
|
-
import { usePatternsWizardOverridesContext } from '../../providers';
|
|
5
4
|
import { useCollectionPageActions } from '../../hooks/useCollectionPageActions';
|
|
6
5
|
export const AutoPatternsCollectionPage = _ref => {
|
|
7
6
|
let {
|
|
@@ -14,7 +13,6 @@ export const AutoPatternsCollectionPage = _ref => {
|
|
|
14
13
|
const actions = useCollectionPageActions({
|
|
15
14
|
collectionPageActions: configuration.actions
|
|
16
15
|
});
|
|
17
|
-
const context = usePatternsWizardOverridesContext();
|
|
18
16
|
return /*#__PURE__*/React.createElement(CollectionPage, {
|
|
19
17
|
height: "100vh",
|
|
20
18
|
dataHook: "auto-patterns-page"
|
|
@@ -23,7 +21,7 @@ export const AutoPatternsCollectionPage = _ref => {
|
|
|
23
21
|
subtitle: subtitle,
|
|
24
22
|
primaryAction: actions.primaryActions,
|
|
25
23
|
secondaryActions: actions.secondaryActions
|
|
26
|
-
}), /*#__PURE__*/React.createElement(CollectionPage.Content, null,
|
|
24
|
+
}), /*#__PURE__*/React.createElement(CollectionPage.Content, null, /*#__PURE__*/React.createElement(AutoPatternsCollectionPageContent, {
|
|
27
25
|
configuration: configuration
|
|
28
26
|
})));
|
|
29
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","CollectionPage","AutoPatternsCollectionPageContent","
|
|
1
|
+
{"version":3,"names":["React","CollectionPage","AutoPatternsCollectionPageContent","useCollectionPageActions","AutoPatternsCollectionPage","_ref","configuration","title","subtitle","actions","collectionPageActions","createElement","height","dataHook","Header","primaryAction","primaryActions","secondaryActions","Content"],"sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"sourcesContent":["import React from 'react';\nimport { CollectionPage } from '@wix/patterns/page';\nimport { AutoPatternsCollectionPageContent } from '../AutoPatternsCollectionPageContent';\nimport { CollectionPageConfig } from '../../types/CollectionPageConfig';\nimport { useCollectionPageActions } from '../../hooks/useCollectionPageActions';\n\nexport interface AutoPatternsCollectionPageProps {\n configuration: CollectionPageConfig;\n}\n\nexport const AutoPatternsCollectionPage: React.FC<\n AutoPatternsCollectionPageProps\n> = ({ configuration }) => {\n const { title, subtitle } = configuration;\n\n const actions = useCollectionPageActions({\n collectionPageActions: configuration.actions,\n });\n\n return (\n <CollectionPage height=\"100vh\" dataHook=\"auto-patterns-page\">\n <CollectionPage.Header\n title={title}\n subtitle={subtitle}\n primaryAction={actions.primaryActions}\n secondaryActions={actions.secondaryActions}\n />\n <CollectionPage.Content>\n <AutoPatternsCollectionPageContent configuration={configuration} />\n </CollectionPage.Content>\n </CollectionPage>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,iCAAiC,QAAQ,sCAAsC;AAExF,SAASC,wBAAwB,QAAQ,sCAAsC;AAM/E,OAAO,MAAMC,0BAEZ,GAAGC,IAAA,IAAuB;EAAA,IAAtB;IAAEC;EAAc,CAAC,GAAAD,IAAA;EACpB,MAAM;IAAEE,KAAK;IAAEC;EAAS,CAAC,GAAGF,aAAa;EAEzC,MAAMG,OAAO,GAAGN,wBAAwB,CAAC;IACvCO,qBAAqB,EAAEJ,aAAa,CAACG;EACvC,CAAC,CAAC;EAEF,oBACET,KAAA,CAAAW,aAAA,CAACV,cAAc;IAACW,MAAM,EAAC,OAAO;IAACC,QAAQ,EAAC;EAAoB,gBAC1Db,KAAA,CAAAW,aAAA,CAACV,cAAc,CAACa,MAAM;IACpBP,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBO,aAAa,EAAEN,OAAO,CAACO,cAAe;IACtCC,gBAAgB,EAAER,OAAO,CAACQ;EAAiB,CAC5C,CAAC,eACFjB,KAAA,CAAAW,aAAA,CAACV,cAAc,CAACiB,OAAO,qBACrBlB,KAAA,CAAAW,aAAA,CAACT,iCAAiC;IAACI,aAAa,EAAEA;EAAc,CAAE,CAC5C,CACV,CAAC;AAErB,CAAC","ignoreList":[]}
|
package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AutoPatternsTableGridSwitch } from '../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch';
|
|
5
|
-
import { SchemaProvider } from '../../providers';
|
|
6
|
-
import { SkeletonCollection } from './SkeletonCollection';
|
|
2
|
+
import { usePatternsWizardOverridesContext } from '../../providers';
|
|
3
|
+
import { AutoPatternsCollectionComponent } from '../AutoPatternsCollectionComponent/AutoPatternsCollectionComponent';
|
|
7
4
|
export const AutoPatternsCollectionPageContent = _ref => {
|
|
8
5
|
let {
|
|
9
6
|
configuration
|
|
@@ -11,53 +8,25 @@ export const AutoPatternsCollectionPageContent = _ref => {
|
|
|
11
8
|
const {
|
|
12
9
|
components
|
|
13
10
|
} = configuration;
|
|
11
|
+
const overrides = usePatternsWizardOverridesContext();
|
|
14
12
|
return /*#__PURE__*/React.createElement(React.Fragment, null, components.map((component, index) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (!(layout != null && layout.length)) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
const tableConfig = (_layout$find = layout.find(item => item.type === 'Table')) == null ? void 0 : _layout$find.table;
|
|
24
|
-
const gridConfig = (_layout$find2 = layout.find(item => item.type === 'Grid')) == null ? void 0 : _layout$find2.grid;
|
|
25
|
-
let componentType = 'Table';
|
|
26
|
-
let componentToRender = null;
|
|
27
|
-
if (tableConfig && gridConfig) {
|
|
28
|
-
const config = {
|
|
29
|
-
...sharedConfig,
|
|
30
|
-
...tableConfig,
|
|
31
|
-
...gridConfig
|
|
32
|
-
};
|
|
33
|
-
componentToRender = /*#__PURE__*/React.createElement(AutoPatternsTableGridSwitch, {
|
|
34
|
-
configuration: config
|
|
35
|
-
});
|
|
36
|
-
} else if (tableConfig) {
|
|
37
|
-
const config = {
|
|
38
|
-
...sharedConfig,
|
|
39
|
-
...tableConfig
|
|
40
|
-
};
|
|
41
|
-
componentToRender = /*#__PURE__*/React.createElement(AutoPatternsTable, {
|
|
42
|
-
configuration: config
|
|
13
|
+
if (component.type === 'collection') {
|
|
14
|
+
return /*#__PURE__*/React.createElement(AutoPatternsCollectionComponent, {
|
|
15
|
+
key: `collection-${component.collection.collectionId}-${index}`,
|
|
16
|
+
component: component,
|
|
17
|
+
index: index
|
|
43
18
|
});
|
|
44
|
-
} else if (
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
19
|
+
} else if (component.type === 'custom') {
|
|
20
|
+
var _overrides$slots;
|
|
21
|
+
const CustomComponent = overrides == null || (_overrides$slots = overrides.slots) == null ? void 0 : _overrides$slots[component.id];
|
|
22
|
+
if (!CustomComponent) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return /*#__PURE__*/React.createElement(CustomComponent, {
|
|
26
|
+
key: `custom-${component.id}-${index}`
|
|
52
27
|
});
|
|
53
28
|
}
|
|
54
|
-
return
|
|
55
|
-
key: `${sharedConfig.collection.collectionId}-${index}`,
|
|
56
|
-
collection: sharedConfig.collection,
|
|
57
|
-
skeleton: /*#__PURE__*/React.createElement(SkeletonCollection, {
|
|
58
|
-
componentType: componentType
|
|
59
|
-
})
|
|
60
|
-
}, componentToRender) : null;
|
|
29
|
+
return null;
|
|
61
30
|
}).filter(Boolean));
|
|
62
31
|
};
|
|
63
32
|
//# sourceMappingURL=AutoPatternsCollectionPageContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","usePatternsWizardOverridesContext","AutoPatternsCollectionComponent","AutoPatternsCollectionPageContent","_ref","configuration","components","overrides","createElement","Fragment","map","component","index","type","key","collection","collectionId","_overrides$slots","CustomComponent","slots","id","filter","Boolean"],"sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"sourcesContent":["import React from 'react';\nimport { CollectionPageConfig } from '../../types';\nimport { usePatternsWizardOverridesContext } from '../../providers';\nimport { AutoPatternsCollectionComponent } from '../AutoPatternsCollectionComponent/AutoPatternsCollectionComponent';\n\nexport interface AutoPatternsCollectionPageContentProps {\n configuration: CollectionPageConfig;\n}\n\nexport const AutoPatternsCollectionPageContent = ({\n configuration,\n}: AutoPatternsCollectionPageContentProps) => {\n const { components } = configuration;\n const overrides = usePatternsWizardOverridesContext();\n\n return (\n <>\n {components\n .map((component, index) => {\n if (component.type === 'collection') {\n return (\n <AutoPatternsCollectionComponent\n key={`collection-${component.collection.collectionId}-${index}`}\n component={component}\n index={index}\n />\n );\n } else if (component.type === 'custom') {\n const CustomComponent = overrides?.slots?.[component.id];\n\n if (!CustomComponent) {\n return null;\n }\n\n return <CustomComponent key={`custom-${component.id}-${index}`} />;\n }\n\n return null;\n })\n .filter(Boolean)}\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,iCAAiC,QAAQ,iBAAiB;AACnE,SAASC,+BAA+B,QAAQ,oEAAoE;AAMpH,OAAO,MAAMC,iCAAiC,GAAGC,IAAA,IAEH;EAAA,IAFI;IAChDC;EACsC,CAAC,GAAAD,IAAA;EACvC,MAAM;IAAEE;EAAW,CAAC,GAAGD,aAAa;EACpC,MAAME,SAAS,GAAGN,iCAAiC,CAAC,CAAC;EAErD,oBACED,KAAA,CAAAQ,aAAA,CAAAR,KAAA,CAAAS,QAAA,QACGH,UAAU,CACRI,GAAG,CAAC,CAACC,SAAS,EAAEC,KAAK,KAAK;IACzB,IAAID,SAAS,CAACE,IAAI,KAAK,YAAY,EAAE;MACnC,oBACEb,KAAA,CAAAQ,aAAA,CAACN,+BAA+B;QAC9BY,GAAG,EAAE,cAAcH,SAAS,CAACI,UAAU,CAACC,YAAY,IAAIJ,KAAK,EAAG;QAChED,SAAS,EAAEA,SAAU;QACrBC,KAAK,EAAEA;MAAM,CACd,CAAC;IAEN,CAAC,MAAM,IAAID,SAAS,CAACE,IAAI,KAAK,QAAQ,EAAE;MAAA,IAAAI,gBAAA;MACtC,MAAMC,eAAe,GAAGX,SAAS,aAAAU,gBAAA,GAATV,SAAS,CAAEY,KAAK,qBAAhBF,gBAAA,CAAmBN,SAAS,CAACS,EAAE,CAAC;MAExD,IAAI,CAACF,eAAe,EAAE;QACpB,OAAO,IAAI;MACb;MAEA,oBAAOlB,KAAA,CAAAQ,aAAA,CAACU,eAAe;QAACJ,GAAG,EAAE,UAAUH,SAAS,CAACS,EAAE,IAAIR,KAAK;MAAG,CAAE,CAAC;IACpE;IAEA,OAAO,IAAI;EACb,CAAC,CAAC,CACDS,MAAM,CAACC,OAAO,CACjB,CAAC;AAEP,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,7 @@ export const useActionCell = _ref => {
|
|
|
17
17
|
collectionId
|
|
18
18
|
});
|
|
19
19
|
const buildCellActions = useCallback((item, index, api) => {
|
|
20
|
-
var _config$primaryAction, _config$secondaryActi, _config$secondaryActi2, _config$secondaryActi3, _config$secondaryActi4;
|
|
20
|
+
var _config$primaryAction, _config$primaryAction2, _config$secondaryActi, _config$secondaryActi2, _config$secondaryActi3, _config$secondaryActi4;
|
|
21
21
|
const buildAction = actionConfig => {
|
|
22
22
|
if (actionConfig.type === 'divider') {
|
|
23
23
|
return {
|
|
@@ -71,6 +71,11 @@ export const useActionCell = _ref => {
|
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
const primaryAction = config != null && (_config$primaryAction = config.primaryAction) != null && _config$primaryAction.item ? buildAction(config.primaryAction.item) : undefined;
|
|
74
|
+
const primaryActionProps = {
|
|
75
|
+
...(config != null && (_config$primaryAction2 = config.primaryAction) != null && _config$primaryAction2.alwaysVisible ? {
|
|
76
|
+
visibility: 'always'
|
|
77
|
+
} : {})
|
|
78
|
+
};
|
|
74
79
|
const rawSecondaryActions = config != null && (_config$secondaryActi = config.secondaryActions) != null && _config$secondaryActi.items.length ? config.secondaryActions.items.map(buildAction).filter(Boolean) : [];
|
|
75
80
|
|
|
76
81
|
// Process secondary actions with inline count consideration
|
|
@@ -82,7 +87,10 @@ export const useActionCell = _ref => {
|
|
|
82
87
|
}
|
|
83
88
|
return {
|
|
84
89
|
...(primaryAction ? {
|
|
85
|
-
primaryAction
|
|
90
|
+
primaryAction: {
|
|
91
|
+
...primaryAction,
|
|
92
|
+
...primaryActionProps
|
|
93
|
+
}
|
|
86
94
|
} : {
|
|
87
95
|
primaryAction: undefined
|
|
88
96
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useActionsSDK","updateAction","customAction","resolveAction","deleteAction","cleanupActionsWithDividers","actions","inlineCount","clean","a","filter","x","i","ar","_ar","divider","length","slice","useActionCell","_ref","config","collectionId","sdk","buildCellActions","item","index","api","_config$primaryAction","_config$secondaryActi","_config$secondaryActi2","_config$secondaryActi3","_config$secondaryActi4","buildAction","actionConfig","type","actionToResolve","baseParams","actionParams","action","resolvedAction","label","tooltip","resolvedActionProps","text","disabledDescription","primaryAction","undefined","rawSecondaryActions","secondaryActions","items","map","Boolean","numOfVisibleSecondaryActions","alwaysShowSecondaryActions","inlineAlwaysVisible"],"sources":["../../../src/hooks/useActionCell.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport {\n ActionCellConfig,\n ActionCellItemConfig,\n ResolvedAction,\n} from '../types';\nimport { useActionsSDK } from './useActionsSDK';\nimport {\n updateAction,\n customAction,\n resolveAction,\n deleteAction,\n} from '../utils/actions';\nimport { DividerActionConfig } from '../types/actions/base';\n\nexport interface useActionCellParams {\n config?: ActionCellConfig;\n collectionId: string;\n}\n\nconst cleanupActionsWithDividers = (\n actions: any[],\n inlineCount?: number,\n): any[] => {\n const clean = (a: any[]) =>\n a.filter(\n (x, i, ar) =>\n x?.divider !== true ||\n (i > 0 && i < ar.length - 1 && ar[i - 1]?.divider !== true),\n );\n return !actions?.length || !inlineCount || inlineCount >= actions.length\n ? clean(actions || [])\n : [\n
|
|
1
|
+
{"version":3,"names":["useCallback","useActionsSDK","updateAction","customAction","resolveAction","deleteAction","cleanupActionsWithDividers","actions","inlineCount","clean","a","filter","x","i","ar","_ar","divider","length","slice","useActionCell","_ref","config","collectionId","sdk","buildCellActions","item","index","api","_config$primaryAction","_config$primaryAction2","_config$secondaryActi","_config$secondaryActi2","_config$secondaryActi3","_config$secondaryActi4","buildAction","actionConfig","type","actionToResolve","baseParams","actionParams","action","resolvedAction","label","tooltip","resolvedActionProps","text","disabledDescription","primaryAction","undefined","primaryActionProps","alwaysVisible","visibility","rawSecondaryActions","secondaryActions","items","map","Boolean","numOfVisibleSecondaryActions","alwaysShowSecondaryActions","inlineAlwaysVisible"],"sources":["../../../src/hooks/useActionCell.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport {\n ActionCellConfig,\n ActionCellItemConfig,\n ResolvedAction,\n} from '../types';\nimport { useActionsSDK } from './useActionsSDK';\nimport {\n updateAction,\n customAction,\n resolveAction,\n deleteAction,\n} from '../utils/actions';\nimport { DividerActionConfig } from '../types/actions/base';\n\nexport interface useActionCellParams {\n config?: ActionCellConfig;\n collectionId: string;\n}\n\nconst cleanupActionsWithDividers = (\n actions: any[],\n inlineCount?: number,\n): any[] => {\n const clean = (a: any[]) =>\n a.filter(\n (x, i, ar) =>\n x?.divider !== true ||\n (i > 0 && i < ar.length - 1 && ar[i - 1]?.divider !== true),\n );\n return !actions?.length || !inlineCount || inlineCount >= actions.length\n ? clean(actions || [])\n : [\n ...clean(actions.slice(0, inlineCount)),\n ...clean(actions.slice(inlineCount)),\n ];\n};\n\nexport const useActionCell = ({\n config,\n collectionId,\n}: useActionCellParams) => {\n const sdk = useActionsSDK({\n collectionId,\n });\n\n const buildCellActions = useCallback(\n (item, index, api) => {\n const buildAction = (\n actionConfig: ActionCellItemConfig | DividerActionConfig,\n ) => {\n if (actionConfig.type === 'divider') {\n return { divider: true };\n }\n\n let actionToResolve: Partial<ResolvedAction> | null = null;\n\n const baseParams = {\n actionParams: { item, index, api },\n sdk,\n };\n\n switch (actionConfig.type) {\n case 'update':\n actionToResolve = updateAction({\n action: actionConfig,\n ...baseParams,\n });\n break;\n\n case 'delete':\n actionToResolve = deleteAction({\n action: actionConfig,\n ...baseParams,\n });\n break;\n\n case 'custom':\n actionToResolve = customAction({\n action: actionConfig,\n ...baseParams,\n });\n break;\n\n default:\n return null;\n }\n\n if (!actionToResolve) {\n return null;\n }\n\n const resolvedAction = resolveAction(actionConfig, actionToResolve);\n const { label, tooltip, ...resolvedActionProps } = resolvedAction;\n\n return {\n ...resolvedActionProps,\n text: resolvedAction.label,\n disabledDescription: resolvedAction.tooltip,\n };\n };\n\n const primaryAction = config?.primaryAction?.item\n ? buildAction(config.primaryAction.item)\n : undefined;\n\n const primaryActionProps = {\n ...(config?.primaryAction?.alwaysVisible\n ? { visibility: 'always' }\n : {}),\n };\n\n const rawSecondaryActions = config?.secondaryActions?.items.length\n ? config.secondaryActions.items.map(buildAction).filter(Boolean)\n : [];\n\n // Process secondary actions with inline count consideration\n const secondaryActions = cleanupActionsWithDividers(\n rawSecondaryActions,\n config?.secondaryActions?.inlineCount,\n );\n\n const numOfVisibleSecondaryActions =\n config?.secondaryActions?.inlineCount;\n const alwaysShowSecondaryActions =\n config?.secondaryActions?.inlineAlwaysVisible;\n\n if (!primaryAction && !secondaryActions.length) {\n return {};\n }\n\n return {\n ...(primaryAction\n ? {\n primaryAction: {\n ...primaryAction,\n ...primaryActionProps,\n },\n }\n : { primaryAction: undefined }),\n ...(secondaryActions.length && { secondaryActions }),\n numOfVisibleSecondaryActions,\n alwaysShowSecondaryActions,\n };\n },\n [config, sdk],\n );\n\n return buildCellActions;\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AAMnC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SACEC,YAAY,EACZC,YAAY,EACZC,aAAa,EACbC,YAAY,QACP,kBAAkB;AAQzB,MAAMC,0BAA0B,GAAGA,CACjCC,OAAc,EACdC,WAAoB,KACV;EACV,MAAMC,KAAK,GAAIC,CAAQ,IACrBA,CAAC,CAACC,MAAM,CACN,CAACC,CAAC,EAAEC,CAAC,EAAEC,EAAE;IAAA,IAAAC,GAAA;IAAA,OACP,CAAAH,CAAC,oBAADA,CAAC,CAAEI,OAAO,MAAK,IAAI,IAClBH,CAAC,GAAG,CAAC,IAAIA,CAAC,GAAGC,EAAE,CAACG,MAAM,GAAG,CAAC,IAAI,EAAAF,GAAA,GAAAD,EAAE,CAACD,CAAC,GAAG,CAAC,CAAC,qBAATE,GAAA,CAAWC,OAAO,MAAK,IAAK;EAAA,CAC/D,CAAC;EACH,OAAO,EAACT,OAAO,YAAPA,OAAO,CAAEU,MAAM,KAAI,CAACT,WAAW,IAAIA,WAAW,IAAID,OAAO,CAACU,MAAM,GACpER,KAAK,CAACF,OAAO,IAAI,EAAE,CAAC,GACpB,CACA,GAAGE,KAAK,CAACF,OAAO,CAACW,KAAK,CAAC,CAAC,EAAEV,WAAW,CAAC,CAAC,EACvC,GAAGC,KAAK,CAACF,OAAO,CAACW,KAAK,CAACV,WAAW,CAAC,CAAC,CACrC;AACL,CAAC;AAED,OAAO,MAAMW,aAAa,GAAGC,IAAA,IAGF;EAAA,IAHG;IAC5BC,MAAM;IACNC;EACmB,CAAC,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MACF,CAAC,GACC;QAAEF,aAAa,EAAEC;MAAU,CAAC,CAAC;MACjC,IAAIK,gBAAgB,CAACpC,MAAM,IAAI;QAAEoC;MAAiB,CAAC,CAAC;MACpDI,4BAA4B;MAC5BC;IACF,CAAC;EACH,CAAC,EACD,CAACrC,MAAM,EAAEE,GAAG,CACd,CAAC;EAED,OAAOC,gBAAgB;AACzB,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 EntityPageMoreActionsActionParams,\n IColumnValue,\n SchemaConfig,\n} from '../types';\n\nimport { Section } from '@wix/patterns';\n\nimport { CustomActionParams, ResolvedAction } from '../utils/actions/types';\nimport {\n CollectionPageActionOnRowClickParams,\n CollectionPageActionParams,\n} from '../types/actions/collectionPageActions';\nimport { ActionCellActionParams } from '../types/actions/actionCell';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<\n string,\n (\n props: CustomActionParams<\n | EntityPageMoreActionsActionParams\n | CollectionPageActionParams\n | ActionCellActionParams\n | CollectionPageActionOnRowClickParams\n >,\n ) => ResolvedAction\n >;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n modals?: Record<string, React.FC<any>>;\n
|
|
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 EntityPageMoreActionsActionParams,\n IColumnValue,\n SchemaConfig,\n} from '../types';\n\nimport { Section } from '@wix/patterns';\n\nimport { CustomActionParams, ResolvedAction } from '../utils/actions/types';\nimport {\n CollectionPageActionOnRowClickParams,\n CollectionPageActionParams,\n} from '../types/actions/collectionPageActions';\nimport { ActionCellActionParams } from '../types/actions/actionCell';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<\n string,\n (\n props: CustomActionParams<\n | EntityPageMoreActionsActionParams\n | CollectionPageActionParams\n | ActionCellActionParams\n | CollectionPageActionOnRowClickParams\n >,\n ) => ResolvedAction\n >;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n modals?: Record<string, React.FC<any>>;\n emptyState?: Record<string, () => void>;\n components?: Record<string, React.FC<CustomComponentProps>>;\n slots?: Record<string, React.FC>;\n customDataSources?: Record<\n string,\n (collectionId: string, context: any) => Promise<SchemaConfig>\n >;\n sections?: Record<string, (item: any) => Section>;\n}\n\nconst PatternsWizardOverridesContext = createContext<\n PatternsWizardOverridesContextProps | undefined\n>(undefined);\n\nexport const PatternsWizardOverridesProvider: React.FC<{\n children: ReactNode;\n value: PatternsWizardOverridesContextProps;\n}> = ({ children, value }) => {\n return (\n <PatternsWizardOverridesContext.Provider value={value}>\n {children}\n </PatternsWizardOverridesContext.Provider>\n );\n};\n\nexport const usePatternsWizardOverridesContext = ():\n | PatternsWizardOverridesContextProps\n | undefined => {\n return useContext(PatternsWizardOverridesContext);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAyCnE,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":["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
|
|
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":"AA8KA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/actionCell.ts"],"sourcesContent":["import {\n CustomActionModalProps,\n CustomActionParams,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n CustomActionConfig,\n DeleteActionConfig,\n UpdateActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type ActionCellItemConfig =\n | UpdateActionConfig\n | CustomActionConfig\n | DeleteActionConfig;\n\nexport interface ActionCellPrimaryAction {\n item: ActionCellItemConfig;\n}\n\nexport interface ActionCellSecondaryActions {\n items: (ActionCellItemConfig | DividerActionConfig)[];\n inlineCount?: number;\n inlineAlwaysVisible?: boolean;\n}\n\nexport interface ActionCellConfig {\n primaryAction?: ActionCellPrimaryAction;\n secondaryActions?: ActionCellSecondaryActions;\n}\n\nexport interface ActionCellActionParams {\n item: any;\n}\n\nexport type CustomActionCellActionParams =\n CustomActionParams<ActionCellActionParams>;\n\nexport type CustomActionCellActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCellActionModalProps\n extends CustomActionModalProps {\n actionParams: ActionCellActionParams;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/actionCell.ts"],"sourcesContent":["import {\n CustomActionModalProps,\n CustomActionParams,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n CustomActionConfig,\n DeleteActionConfig,\n UpdateActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type ActionCellItemConfig =\n | UpdateActionConfig\n | CustomActionConfig\n | DeleteActionConfig;\n\nexport interface ActionCellPrimaryAction {\n item: ActionCellItemConfig;\n alwaysVisible?: boolean;\n}\n\nexport interface ActionCellSecondaryActions {\n items: (ActionCellItemConfig | DividerActionConfig)[];\n inlineCount?: number;\n inlineAlwaysVisible?: boolean;\n}\n\nexport interface ActionCellConfig {\n primaryAction?: ActionCellPrimaryAction;\n secondaryActions?: ActionCellSecondaryActions;\n}\n\nexport interface ActionCellActionParams {\n item: any;\n}\n\nexport type CustomActionCellActionParams =\n CustomActionParams<ActionCellActionParams>;\n\nexport type CustomActionCellActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCellActionModalProps\n extends CustomActionModalProps {\n actionParams: ActionCellActionParams;\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CollectionComponentConfig } from '../../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const AutoPatternsCollectionComponent: ({ component, index, }: {
|
|
4
|
+
component: CollectionComponentConfig;
|
|
5
|
+
index: number;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsCollectionComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAMxD,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,+BAA+B,GAAI,uBAG7C;IACD,SAAS,EAAE,yBAAyB,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;CACf,sBAqDA,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;
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CAqBhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsCollectionPageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,WAAW,sCAAsC;IACrD,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,iCAAiC,GAAI,oBAE/C,sCAAsC,sBA+BxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActionCell.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionCell.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,eAAO,MAAM,aAAa,GAAI,2BAG3B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"useActionCell.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionCell.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,eAAO,MAAM,aAAa,GAAI,2BAG3B,mBAAmB,4CA4GrB,CAAC"}
|
|
@@ -8,9 +8,9 @@ export interface PatternsWizardOverridesContextProps {
|
|
|
8
8
|
actions?: Record<string, (props: CustomActionParams<EntityPageMoreActionsActionParams | CollectionPageActionParams | ActionCellActionParams | CollectionPageActionOnRowClickParams>) => ResolvedAction>;
|
|
9
9
|
columns?: Record<string, (props: IColumnValue<any>) => void>;
|
|
10
10
|
modals?: Record<string, React.FC<any>>;
|
|
11
|
-
HeaderAddon?: React.FC;
|
|
12
11
|
emptyState?: Record<string, () => void>;
|
|
13
12
|
components?: Record<string, React.FC<CustomComponentProps>>;
|
|
13
|
+
slots?: Record<string, React.FC>;
|
|
14
14
|
customDataSources?: Record<string, (collectionId: string, context: any) => Promise<SchemaConfig>>;
|
|
15
15
|
sections?: Record<string, (item: any) => Section>;
|
|
16
16
|
}
|
|
@@ -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,iCAAiC,EACjC,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,oCAAoC,EACpC,0BAA0B,EAC3B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACN,CACE,KAAK,EAAE,kBAAkB,CACrB,iCAAiC,GACjC,0BAA0B,GAC1B,sBAAsB,GACtB,oCAAoC,CACvC,KACE,cAAc,CACpB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,
|
|
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,iCAAiC,EACjC,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,oCAAoC,EACpC,0BAA0B,EAC3B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACN,CACE,KAAK,EAAE,kBAAkB,CACrB,iCAAiC,GACjC,0BAA0B,GAC1B,sBAAsB,GACtB,oCAAoC,CACvC,KACE,cAAc,CACpB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CACxB,MAAM,EACN,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,YAAY,CAAC,CAC9D,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC;CACnD;AAMD,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,mCAAmC,CAAC;CAC5C,CAMA,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAC1C,mCAAmC,GACnC,SAEH,CAAC"}
|
|
@@ -25,9 +25,15 @@ export interface CollectionPageConfig {
|
|
|
25
25
|
};
|
|
26
26
|
components: ComponentConfig[];
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface CollectionComponentConfig extends BaseCollectionComponentConfig {
|
|
29
|
+
type: 'collection';
|
|
29
30
|
layout: LayoutItemConfig[];
|
|
30
31
|
}
|
|
32
|
+
export interface CustomComponentConfig {
|
|
33
|
+
type: 'custom';
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
export type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;
|
|
31
37
|
export interface LayoutItemConfig {
|
|
32
38
|
type: 'Table' | 'Grid';
|
|
33
39
|
table?: TableSpecificConfig;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"CollectionPageConfig.d.ts","sourceRoot":"","sources":["../../../src/types/CollectionPageConfig.ts"],"names":[],"mappings":"AAAA,OAAO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E,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC/D,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;CAAG;AAE9E,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;CACnD"}
|
|
@@ -3,6 +3,7 @@ import { CustomActionConfig, DeleteActionConfig, UpdateActionConfig, DividerActi
|
|
|
3
3
|
export type ActionCellItemConfig = UpdateActionConfig | CustomActionConfig | DeleteActionConfig;
|
|
4
4
|
export interface ActionCellPrimaryAction {
|
|
5
5
|
item: ActionCellItemConfig;
|
|
6
|
+
alwaysVisible?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface ActionCellSecondaryActions {
|
|
8
9
|
items: (ActionCellItemConfig | DividerActionConfig)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionCell.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/actionCell.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,oBAAoB,GAC5B,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"actionCell.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/actionCell.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,oBAAoB,GAC5B,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,EAAE,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,GAAG,CAAC;CACX;AAED,MAAM,MAAM,4BAA4B,GACtC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7C,MAAM,MAAM,8BAA8B,GAAG,CAC3C,MAAM,EAAE,4BAA4B,KACjC,cAAc,CAAC;AAEpB,MAAM,WAAW,gCACf,SAAQ,sBAAsB;IAC9B,YAAY,EAAE,sBAAsB,CAAC;CACtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matvey Oklander",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"@wix/crm": "^1.0.385",
|
|
56
56
|
"@wix/design-system": "^1.206.0",
|
|
57
57
|
"@wix/eslint-config-yoshi": "^6.151.0",
|
|
58
|
-
"@wix/fe-essentials-standalone": "^1.
|
|
58
|
+
"@wix/fe-essentials-standalone": "^1.1364.0",
|
|
59
59
|
"@wix/jest-yoshi-preset": "^6.151.0",
|
|
60
|
-
"@wix/patterns": "^1.
|
|
60
|
+
"@wix/patterns": "^1.239.0",
|
|
61
61
|
"@wix/sdk": "^1.15.24",
|
|
62
62
|
"@wix/sdk-testkit": ">=0.1.6",
|
|
63
|
-
"@wix/wix-data-items-common": "^1.0.
|
|
64
|
-
"@wix/wix-data-items-sdk": "^1.0.
|
|
63
|
+
"@wix/wix-data-items-common": "^1.0.192",
|
|
64
|
+
"@wix/wix-data-items-sdk": "^1.0.383",
|
|
65
65
|
"@wix/yoshi-flow-library": "^6.151.0",
|
|
66
66
|
"@wix/yoshi-style-dependencies": "^6.151.0",
|
|
67
67
|
"chance": "^1.1.13",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@wix/dashboard": "^1.3.33",
|
|
79
79
|
"@wix/design-system": "^1.204.0",
|
|
80
|
-
"@wix/patterns": "^1.
|
|
80
|
+
"@wix/patterns": "^1.239.0",
|
|
81
81
|
"react": "^16.8.0",
|
|
82
82
|
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
83
83
|
},
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"wallaby": {
|
|
126
126
|
"autoDetect": true
|
|
127
127
|
},
|
|
128
|
-
"falconPackageHash": "
|
|
128
|
+
"falconPackageHash": "e07bf7a954d3451adaa50b391f05325919675bd385a3a031b028d8ad"
|
|
129
129
|
}
|