@wix/auto-patterns 1.38.0 → 1.39.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 +72 -18
- package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +41 -10
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js +50 -14
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +28 -10
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +18 -6
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsPage.js +16 -6
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsPage.js.map +1 -1
- package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts +1 -1
- package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsRoute/AutoPatternsPage.d.ts.map +1 -1
- package/mcp-docs/wix_fqdn_custom_data_source.md +360 -196
- package/package.json +11 -11
package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js
CHANGED
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.AutoPatternsCollectionComponent = void 0;
|
|
5
|
-
var
|
|
6
|
-
var _AutoPatternsTable = require("../AutoPatternsTable/AutoPatternsTable");
|
|
7
|
-
var _AutoPatternsGrid = require("../AutoPatternsGrid/AutoPatternsGrid");
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
6
|
var _providers = require("../../providers");
|
|
9
7
|
var _SkeletonCollection = require("../AutoPatternsCollectionPageContent/SkeletonCollection");
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
8
|
var _jsxFileName = "/home/builduser/work/8f3ab5a55e62623a/packages/auto-patterns/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.tsx";
|
|
12
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
const AutoPatternsTableGridSwitch = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch'))).then(module => ({
|
|
12
|
+
default: module.AutoPatternsTableGridSwitch
|
|
13
|
+
})));
|
|
14
|
+
const AutoPatternsTable = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('../AutoPatternsTable/AutoPatternsTable'))).then(module => ({
|
|
15
|
+
default: module.AutoPatternsTable
|
|
16
|
+
})));
|
|
17
|
+
const AutoPatternsGrid = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('../AutoPatternsGrid/AutoPatternsGrid'))).then(module => ({
|
|
18
|
+
default: module.AutoPatternsGrid
|
|
19
|
+
})));
|
|
14
20
|
const AutoPatternsCollectionComponent = ({
|
|
15
21
|
component,
|
|
16
22
|
index
|
|
@@ -37,44 +43,92 @@ const AutoPatternsCollectionComponent = ({
|
|
|
37
43
|
...tableConfig,
|
|
38
44
|
...gridConfig
|
|
39
45
|
};
|
|
40
|
-
componentToRender = /*#__PURE__*/_react.default.createElement(
|
|
41
|
-
|
|
46
|
+
componentToRender = /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
47
|
+
fallback: /*#__PURE__*/_react.default.createElement(_SkeletonCollection.SkeletonCollection, {
|
|
48
|
+
componentType: "Table",
|
|
49
|
+
__self: void 0,
|
|
50
|
+
__source: {
|
|
51
|
+
fileName: _jsxFileName,
|
|
52
|
+
lineNumber: 52,
|
|
53
|
+
columnNumber: 29
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
42
56
|
__self: void 0,
|
|
43
57
|
__source: {
|
|
44
58
|
fileName: _jsxFileName,
|
|
45
|
-
lineNumber:
|
|
59
|
+
lineNumber: 52,
|
|
46
60
|
columnNumber: 9
|
|
47
61
|
}
|
|
48
|
-
}
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(AutoPatternsTableGridSwitch, {
|
|
63
|
+
configuration: config,
|
|
64
|
+
__self: void 0,
|
|
65
|
+
__source: {
|
|
66
|
+
fileName: _jsxFileName,
|
|
67
|
+
lineNumber: 53,
|
|
68
|
+
columnNumber: 11
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
49
71
|
} else if (tableConfig) {
|
|
50
72
|
const config = {
|
|
51
73
|
...sharedConfig,
|
|
52
74
|
...tableConfig
|
|
53
75
|
};
|
|
54
|
-
componentToRender = /*#__PURE__*/_react.default.createElement(
|
|
76
|
+
componentToRender = /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
77
|
+
fallback: /*#__PURE__*/_react.default.createElement(_SkeletonCollection.SkeletonCollection, {
|
|
78
|
+
componentType: "Table",
|
|
79
|
+
__self: void 0,
|
|
80
|
+
__source: {
|
|
81
|
+
fileName: _jsxFileName,
|
|
82
|
+
lineNumber: 59,
|
|
83
|
+
columnNumber: 29
|
|
84
|
+
}
|
|
85
|
+
}),
|
|
86
|
+
__self: void 0,
|
|
87
|
+
__source: {
|
|
88
|
+
fileName: _jsxFileName,
|
|
89
|
+
lineNumber: 59,
|
|
90
|
+
columnNumber: 9
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(AutoPatternsTable, {
|
|
55
93
|
configuration: config,
|
|
56
94
|
__self: void 0,
|
|
57
95
|
__source: {
|
|
58
96
|
fileName: _jsxFileName,
|
|
59
|
-
lineNumber:
|
|
60
|
-
columnNumber:
|
|
97
|
+
lineNumber: 60,
|
|
98
|
+
columnNumber: 11
|
|
61
99
|
}
|
|
62
|
-
});
|
|
100
|
+
}));
|
|
63
101
|
} else if (gridConfig) {
|
|
64
102
|
componentType = 'Grid';
|
|
65
103
|
const config = {
|
|
66
104
|
...sharedConfig,
|
|
67
105
|
...gridConfig
|
|
68
106
|
};
|
|
69
|
-
componentToRender = /*#__PURE__*/_react.default.createElement(
|
|
107
|
+
componentToRender = /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
108
|
+
fallback: /*#__PURE__*/_react.default.createElement(_SkeletonCollection.SkeletonCollection, {
|
|
109
|
+
componentType: "Grid",
|
|
110
|
+
__self: void 0,
|
|
111
|
+
__source: {
|
|
112
|
+
fileName: _jsxFileName,
|
|
113
|
+
lineNumber: 67,
|
|
114
|
+
columnNumber: 29
|
|
115
|
+
}
|
|
116
|
+
}),
|
|
117
|
+
__self: void 0,
|
|
118
|
+
__source: {
|
|
119
|
+
fileName: _jsxFileName,
|
|
120
|
+
lineNumber: 67,
|
|
121
|
+
columnNumber: 9
|
|
122
|
+
}
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement(AutoPatternsGrid, {
|
|
70
124
|
configuration: config,
|
|
71
125
|
__self: void 0,
|
|
72
126
|
__source: {
|
|
73
127
|
fileName: _jsxFileName,
|
|
74
|
-
lineNumber:
|
|
75
|
-
columnNumber:
|
|
128
|
+
lineNumber: 68,
|
|
129
|
+
columnNumber: 11
|
|
76
130
|
}
|
|
77
|
-
});
|
|
131
|
+
}));
|
|
78
132
|
}
|
|
79
133
|
return {
|
|
80
134
|
componentToRender,
|
|
@@ -93,14 +147,14 @@ const AutoPatternsCollectionComponent = ({
|
|
|
93
147
|
__self: void 0,
|
|
94
148
|
__source: {
|
|
95
149
|
fileName: _jsxFileName,
|
|
96
|
-
lineNumber:
|
|
150
|
+
lineNumber: 84,
|
|
97
151
|
columnNumber: 21
|
|
98
152
|
}
|
|
99
153
|
}),
|
|
100
154
|
__self: void 0,
|
|
101
155
|
__source: {
|
|
102
156
|
fileName: _jsxFileName,
|
|
103
|
-
lineNumber:
|
|
157
|
+
lineNumber: 81,
|
|
104
158
|
columnNumber: 9
|
|
105
159
|
}
|
|
106
160
|
}, componentToRender) : null);
|
package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_providers","_SkeletonCollection","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AutoPatternsTableGridSwitch","lazy","Promise","resolve","then","module","AutoPatternsTable","AutoPatternsGrid","AutoPatternsCollectionComponent","component","index","layout","sharedConfig","memoized","useMemo","_layout$find","_layout$find2","length","componentToRender","componentType","tableConfig","find","item","type","table","gridConfig","grid","config","createElement","Suspense","fallback","SkeletonCollection","__self","__source","fileName","lineNumber","columnNumber","configuration","Fragment","SchemaProvider","key","collection","collectionId","skeleton","exports"],"sources":["../../../../src/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.tsx"],"sourcesContent":["import React, { useMemo, lazy, Suspense } from 'react';\nimport { CollectionComponentConfig } from '../../types';\nimport { SchemaProvider } from '../../providers';\nimport { SkeletonCollection } from '../AutoPatternsCollectionPageContent/SkeletonCollection';\n\nconst AutoPatternsTableGridSwitch = lazy(() =>\n import('../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch').then(\n (module) => ({ default: module.AutoPatternsTableGridSwitch }),\n ),\n);\nconst AutoPatternsTable = lazy(() =>\n import('../AutoPatternsTable/AutoPatternsTable').then((module) => ({\n default: module.AutoPatternsTable,\n })),\n);\nconst AutoPatternsGrid = lazy(() =>\n import('../AutoPatternsGrid/AutoPatternsGrid').then((module) => ({\n default: module.AutoPatternsGrid,\n })),\n);\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 <Suspense fallback={<SkeletonCollection componentType=\"Table\" />}>\n <AutoPatternsTableGridSwitch configuration={config} />\n </Suspense>\n );\n } else if (tableConfig) {\n const config = { ...sharedConfig, ...tableConfig };\n componentToRender = (\n <Suspense fallback={<SkeletonCollection componentType=\"Table\" />}>\n <AutoPatternsTable configuration={config} />\n </Suspense>\n );\n } else if (gridConfig) {\n componentType = 'Grid';\n const config = { ...sharedConfig, ...gridConfig };\n componentToRender = (\n <Suspense fallback={<SkeletonCollection componentType=\"Grid\" />}>\n <AutoPatternsGrid configuration={config} />\n </Suspense>\n );\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":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAA6F,IAAAG,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAA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B;QAAC8B,aAAa,EAAEV,MAAO;QAAAK,MAAA;QAAAC,QAAA;UAAAC,QAAA,EAAAvD,YAAA;UAAAwD,UAAA;UAAAC,YAAA;QAAA;MAAA,CAAE,CAClC,CACX;IACH;IAEA,OAAO;MAAElB,iBAAiB;MAAEC;IAAc,CAAC;EAC7C,CAAC,EAAE,CAACR,MAAM,EAAEC,YAAY,CAAC,CAAC;EAE1B,MAAM;IAAEM,iBAAiB;IAAEC;EAAc,CAAC,GAAGN,QAAQ;EAErD,oBACEvC,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAAAtD,MAAA,CAAAY,OAAA,CAAAoD,QAAA,QACGpB,iBAAiB,gBAChB5C,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACnD,UAAA,CAAA8D,cAAc;IACbC,GAAG,EAAE,GAAG5B,YAAY,CAAC6B,UAAU,CAACC,YAAY,IAAIhC,KAAK,EAAG;IACxD+B,UAAU,EAAE7B,YAAY,CAAC6B,UAAW;IACpCE,QAAQ,eAAErE,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAAClD,mBAAA,CAAAqD,kBAAkB;MAACZ,aAAa,EAAEA,aAAc;MAAAa,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAvD,YAAA;QAAAwD,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CAAE;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAvD,YAAA;MAAAwD,UAAA;MAAAC,YAAA;IAAA;EAAA,GAE9DlB,iBACa,CAAC,GACf,IACJ,CAAC;AAEP,CAAC;AAAC0B,OAAA,CAAApC,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -1,32 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
exports.__esModule = true;
|
|
5
4
|
exports.AutoPatternsEntityPage = void 0;
|
|
6
|
-
var _react =
|
|
7
|
-
var
|
|
8
|
-
var _EditModeEntityPage = require("./EditModeEntityPage");
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _SkeletonEntity = require("./SkeletonEntity");
|
|
9
7
|
var _jsxFileName = "/home/builduser/work/8f3ab5a55e62623a/packages/auto-patterns/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx";
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
const ViewModeEntityPage = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./ViewModeEntityPage'))).then(module => ({
|
|
11
|
+
default: module.ViewModeEntityPage
|
|
12
|
+
})));
|
|
13
|
+
const EditModeEntityPage = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./EditModeEntityPage'))).then(module => ({
|
|
14
|
+
default: module.EditModeEntityPage
|
|
15
|
+
})));
|
|
10
16
|
const AutoPatternsEntityPage = ({
|
|
11
17
|
configuration
|
|
12
18
|
}) => {
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
const fallback = /*#__PURE__*/_react.default.createElement(_SkeletonEntity.SkeletonEntity, {
|
|
20
|
+
entityPage: configuration,
|
|
21
|
+
__self: void 0,
|
|
22
|
+
__source: {
|
|
23
|
+
fileName: _jsxFileName,
|
|
24
|
+
lineNumber: 23,
|
|
25
|
+
columnNumber: 20
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return configuration.mode === 'view' ? /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
29
|
+
fallback: fallback,
|
|
15
30
|
__self: void 0,
|
|
16
31
|
__source: {
|
|
17
32
|
fileName: _jsxFileName,
|
|
18
|
-
lineNumber:
|
|
33
|
+
lineNumber: 26,
|
|
19
34
|
columnNumber: 5
|
|
20
35
|
}
|
|
21
|
-
}
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(ViewModeEntityPage, {
|
|
22
37
|
configuration: configuration,
|
|
23
38
|
__self: void 0,
|
|
24
39
|
__source: {
|
|
25
40
|
fileName: _jsxFileName,
|
|
26
|
-
lineNumber:
|
|
41
|
+
lineNumber: 27,
|
|
42
|
+
columnNumber: 7
|
|
43
|
+
}
|
|
44
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
45
|
+
fallback: fallback,
|
|
46
|
+
__self: void 0,
|
|
47
|
+
__source: {
|
|
48
|
+
fileName: _jsxFileName,
|
|
49
|
+
lineNumber: 30,
|
|
27
50
|
columnNumber: 5
|
|
28
51
|
}
|
|
29
|
-
}
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(EditModeEntityPage, {
|
|
53
|
+
configuration: configuration,
|
|
54
|
+
__self: void 0,
|
|
55
|
+
__source: {
|
|
56
|
+
fileName: _jsxFileName,
|
|
57
|
+
lineNumber: 31,
|
|
58
|
+
columnNumber: 7
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
30
61
|
};
|
|
31
62
|
|
|
32
63
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_SkeletonEntity","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ViewModeEntityPage","lazy","Promise","resolve","then","module","EditModeEntityPage","AutoPatternsEntityPage","configuration","fallback","createElement","SkeletonEntity","entityPage","__self","__source","fileName","lineNumber","columnNumber","mode","Suspense","exports"],"sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport { EntityPageConfig } from '../../types';\nimport { SkeletonEntity } from './SkeletonEntity';\n\nconst ViewModeEntityPage = lazy(() =>\n import('./ViewModeEntityPage').then((module) => ({\n default: module.ViewModeEntityPage,\n })),\n);\nconst EditModeEntityPage = lazy(() =>\n import('./EditModeEntityPage').then((module) => ({\n default: module.EditModeEntityPage,\n })),\n);\n\nexport interface AutoPatternsEntityPageProps {\n configuration: EntityPageConfig;\n}\n\nexport const AutoPatternsEntityPage: React.FC<AutoPatternsEntityPageProps> = ({\n configuration,\n}) => {\n const fallback = <SkeletonEntity entityPage={configuration} />;\n\n return configuration.mode === 'view' ? (\n <Suspense fallback={fallback}>\n <ViewModeEntityPage configuration={configuration} />\n </Suspense>\n ) : (\n <Suspense fallback={fallback}>\n <EditModeEntityPage configuration={configuration} />\n </Suspense>\n );\n};\n\n/*\n Key structure explanation:\n\n Main cards: main-section-card-{layoutIndex}\n Sidebar cards: sidebar-section-card-{layoutIndex}\n\n Layout content:\n {sectionId}-card-{cardIndex}-content-{contentIndex}\n\n Nested children:\n {sectionId}-card-{cardIndex}-content-{parentContentIndex}-level-{level}-child-{childIndex}\n\n This ensures uniqueness across all levels and sections.\n*/\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAAkD,IAAAE,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,C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,YAAA;IAAA;EAAA,CAAE,CAC3C,CACX;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbAG,OAAA,CAAAb,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
exports.__esModule = true;
|
|
5
4
|
exports.AutoPatternsPage = void 0;
|
|
6
|
-
var _react =
|
|
7
|
-
var _AutoPatternsCollectionPage = require("../AutoPatternsCollectionPage");
|
|
8
|
-
var _AutoPatternsEntityPage = require("../AutoPatternsEntityPage");
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
6
|
var _SchemaContext = require("../../providers/SchemaContext");
|
|
10
7
|
var _SkeletonEntity = require("../AutoPatternsEntityPage/SkeletonEntity");
|
|
11
8
|
var _jsxFileName = "/home/builduser/work/8f3ab5a55e62623a/packages/auto-patterns/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.tsx";
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
const AutoPatternsCollectionPage = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('../AutoPatternsCollectionPage'))).then(module => ({
|
|
12
|
+
default: module.AutoPatternsCollectionPage
|
|
13
|
+
})));
|
|
14
|
+
const AutoPatternsEntityPage = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('../AutoPatternsEntityPage'))).then(module => ({
|
|
15
|
+
default: module.AutoPatternsEntityPage
|
|
16
|
+
})));
|
|
12
17
|
const AutoPatternsPage = ({
|
|
13
18
|
pageConfig
|
|
14
19
|
}) => {
|
|
@@ -20,15 +25,30 @@ const AutoPatternsPage = ({
|
|
|
20
25
|
switch (type) {
|
|
21
26
|
case 'collectionPage':
|
|
22
27
|
if (collectionPage) {
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
29
|
+
fallback: /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
__self: void 0,
|
|
31
|
+
__source: {
|
|
32
|
+
fileName: _jsxFileName,
|
|
33
|
+
lineNumber: 28,
|
|
34
|
+
columnNumber: 31
|
|
35
|
+
}
|
|
36
|
+
}),
|
|
37
|
+
__self: void 0,
|
|
38
|
+
__source: {
|
|
39
|
+
fileName: _jsxFileName,
|
|
40
|
+
lineNumber: 28,
|
|
41
|
+
columnNumber: 11
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(AutoPatternsCollectionPage, {
|
|
24
44
|
configuration: collectionPage,
|
|
25
45
|
__self: void 0,
|
|
26
46
|
__source: {
|
|
27
47
|
fileName: _jsxFileName,
|
|
28
|
-
lineNumber:
|
|
29
|
-
columnNumber:
|
|
48
|
+
lineNumber: 29,
|
|
49
|
+
columnNumber: 13
|
|
30
50
|
}
|
|
31
|
-
});
|
|
51
|
+
}));
|
|
32
52
|
}
|
|
33
53
|
break;
|
|
34
54
|
case 'entityPage':
|
|
@@ -40,25 +60,41 @@ const AutoPatternsPage = ({
|
|
|
40
60
|
__self: void 0,
|
|
41
61
|
__source: {
|
|
42
62
|
fileName: _jsxFileName,
|
|
43
|
-
lineNumber:
|
|
63
|
+
lineNumber: 39,
|
|
44
64
|
columnNumber: 23
|
|
45
65
|
}
|
|
46
66
|
}),
|
|
47
67
|
__self: void 0,
|
|
48
68
|
__source: {
|
|
49
69
|
fileName: _jsxFileName,
|
|
50
|
-
lineNumber:
|
|
70
|
+
lineNumber: 37,
|
|
51
71
|
columnNumber: 11
|
|
52
72
|
}
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
54
|
-
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
74
|
+
fallback: /*#__PURE__*/_react.default.createElement(_SkeletonEntity.SkeletonEntity, {
|
|
75
|
+
entityPage: entityPage,
|
|
76
|
+
__self: void 0,
|
|
77
|
+
__source: {
|
|
78
|
+
fileName: _jsxFileName,
|
|
79
|
+
lineNumber: 41,
|
|
80
|
+
columnNumber: 33
|
|
81
|
+
}
|
|
82
|
+
}),
|
|
55
83
|
__self: void 0,
|
|
56
84
|
__source: {
|
|
57
85
|
fileName: _jsxFileName,
|
|
58
|
-
lineNumber:
|
|
86
|
+
lineNumber: 41,
|
|
59
87
|
columnNumber: 13
|
|
60
88
|
}
|
|
61
|
-
}
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement(AutoPatternsEntityPage, {
|
|
90
|
+
configuration: entityPage,
|
|
91
|
+
__self: void 0,
|
|
92
|
+
__source: {
|
|
93
|
+
fileName: _jsxFileName,
|
|
94
|
+
lineNumber: 42,
|
|
95
|
+
columnNumber: 15
|
|
96
|
+
}
|
|
97
|
+
})));
|
|
62
98
|
}
|
|
63
99
|
break;
|
|
64
100
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_SchemaContext","_SkeletonEntity","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AutoPatternsCollectionPage","lazy","Promise","resolve","then","module","AutoPatternsEntityPage","AutoPatternsPage","pageConfig","type","collectionPage","entityPage","createElement","Suspense","fallback","__self","__source","fileName","lineNumber","columnNumber","configuration","SchemaProvider","collection","skeleton","SkeletonEntity","exports"],"sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsPage.tsx"],"sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport { PageConfig } from '../../types';\nimport { SchemaProvider } from '../../providers/SchemaContext';\nimport { SkeletonEntity } from '../AutoPatternsEntityPage/SkeletonEntity';\n\nconst AutoPatternsCollectionPage = lazy(() =>\n import('../AutoPatternsCollectionPage').then((module) => ({\n default: module.AutoPatternsCollectionPage,\n })),\n);\nconst AutoPatternsEntityPage = lazy(() =>\n import('../AutoPatternsEntityPage').then((module) => ({\n default: module.AutoPatternsEntityPage,\n })),\n);\n\nexport interface AutoPatternsPageProps {\n pageConfig: PageConfig;\n}\n\nexport const AutoPatternsPage = ({ pageConfig }: AutoPatternsPageProps) => {\n const { type, collectionPage, entityPage } = pageConfig;\n\n switch (type) {\n case 'collectionPage':\n if (collectionPage) {\n return (\n <Suspense fallback={<div />}>\n <AutoPatternsCollectionPage configuration={collectionPage} />\n </Suspense>\n );\n }\n break;\n case 'entityPage':\n if (entityPage) {\n return (\n <SchemaProvider\n collection={entityPage}\n skeleton={<SkeletonEntity entityPage={entityPage} />}\n >\n <Suspense fallback={<SkeletonEntity entityPage={entityPage} />}>\n <AutoPatternsEntityPage configuration={entityPage} />\n </Suspense>\n </SchemaProvider>\n );\n }\n break;\n default:\n break;\n }\n\n return null;\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAA0E,IAAAG,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OA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UAAU,EAAEA,UAAW;YAAAI,MAAA;YAAAC,QAAA;cAAAC,QAAA,EAAAtC,YAAA;cAAAuC,UAAA;cAAAC,YAAA;YAAA;UAAA,CAAE,CAAE;UAAAJ,MAAA;UAAAC,QAAA;YAAAC,QAAA,EAAAtC,YAAA;YAAAuC,UAAA;YAAAC,YAAA;UAAA;QAAA,gBAErD7C,MAAA,CAAAY,OAAA,CAAA0B,aAAA,CAACtC,MAAA,CAAAuC,QAAQ;UAACC,QAAQ,eAAExC,MAAA,CAAAY,OAAA,CAAA0B,aAAA,CAAClC,eAAA,CAAA8C,cAAc;YAACb,UAAU,EAAEA,UAAW;YAAAI,MAAA;YAAAC,QAAA;cAAAC,QAAA,EAAAtC,YAAA;cAAAuC,UAAA;cAAAC,YAAA;YAAA;UAAA,CAAE,CAAE;UAAAJ,MAAA;UAAAC,QAAA;YAAAC,QAAA,EAAAtC,YAAA;YAAAuC,UAAA;YAAAC,YAAA;UAAA;QAAA,gBAC7D7C,MAAA,CAAAY,OAAA,CAAA0B,aAAA,CAACN,sBAAsB;UAACc,aAAa,EAAET,UAAW;UAAAI,MAAA;UAAAC,QAAA;YAAAC,QAAA,EAAAtC,YAAA;YAAAuC,UAAA;YAAAC,YAAA;UAAA;QAAA,CAAE,CAC5C,CACI,CAAC;MAErB;MACA;IACF;MACE;EACJ;EAEA,OAAO,IAAI;AACb,CAAC;AAACM,OAAA,CAAAlB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AutoPatternsTable } from '../AutoPatternsTable/AutoPatternsTable';
|
|
3
|
-
import { AutoPatternsGrid } from '../AutoPatternsGrid/AutoPatternsGrid';
|
|
1
|
+
import React, { useMemo, lazy, Suspense } from 'react';
|
|
4
2
|
import { SchemaProvider } from '../../providers';
|
|
5
3
|
import { SkeletonCollection } from '../AutoPatternsCollectionPageContent/SkeletonCollection';
|
|
6
|
-
|
|
4
|
+
const AutoPatternsTableGridSwitch = /*#__PURE__*/lazy(() => import('../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch').then(module => ({
|
|
5
|
+
default: module.AutoPatternsTableGridSwitch
|
|
6
|
+
})));
|
|
7
|
+
const AutoPatternsTable = /*#__PURE__*/lazy(() => import('../AutoPatternsTable/AutoPatternsTable').then(module => ({
|
|
8
|
+
default: module.AutoPatternsTable
|
|
9
|
+
})));
|
|
10
|
+
const AutoPatternsGrid = /*#__PURE__*/lazy(() => import('../AutoPatternsGrid/AutoPatternsGrid').then(module => ({
|
|
11
|
+
default: module.AutoPatternsGrid
|
|
12
|
+
})));
|
|
7
13
|
export const AutoPatternsCollectionComponent = _ref => {
|
|
8
14
|
let {
|
|
9
15
|
component,
|
|
@@ -31,26 +37,38 @@ export const AutoPatternsCollectionComponent = _ref => {
|
|
|
31
37
|
...tableConfig,
|
|
32
38
|
...gridConfig
|
|
33
39
|
};
|
|
34
|
-
componentToRender = /*#__PURE__*/React.createElement(
|
|
40
|
+
componentToRender = /*#__PURE__*/React.createElement(Suspense, {
|
|
41
|
+
fallback: /*#__PURE__*/React.createElement(SkeletonCollection, {
|
|
42
|
+
componentType: "Table"
|
|
43
|
+
})
|
|
44
|
+
}, /*#__PURE__*/React.createElement(AutoPatternsTableGridSwitch, {
|
|
35
45
|
configuration: config
|
|
36
|
-
});
|
|
46
|
+
}));
|
|
37
47
|
} else if (tableConfig) {
|
|
38
48
|
const config = {
|
|
39
49
|
...sharedConfig,
|
|
40
50
|
...tableConfig
|
|
41
51
|
};
|
|
42
|
-
componentToRender = /*#__PURE__*/React.createElement(
|
|
52
|
+
componentToRender = /*#__PURE__*/React.createElement(Suspense, {
|
|
53
|
+
fallback: /*#__PURE__*/React.createElement(SkeletonCollection, {
|
|
54
|
+
componentType: "Table"
|
|
55
|
+
})
|
|
56
|
+
}, /*#__PURE__*/React.createElement(AutoPatternsTable, {
|
|
43
57
|
configuration: config
|
|
44
|
-
});
|
|
58
|
+
}));
|
|
45
59
|
} else if (gridConfig) {
|
|
46
60
|
componentType = 'Grid';
|
|
47
61
|
const config = {
|
|
48
62
|
...sharedConfig,
|
|
49
63
|
...gridConfig
|
|
50
64
|
};
|
|
51
|
-
componentToRender = /*#__PURE__*/React.createElement(
|
|
65
|
+
componentToRender = /*#__PURE__*/React.createElement(Suspense, {
|
|
66
|
+
fallback: /*#__PURE__*/React.createElement(SkeletonCollection, {
|
|
67
|
+
componentType: "Grid"
|
|
68
|
+
})
|
|
69
|
+
}, /*#__PURE__*/React.createElement(AutoPatternsGrid, {
|
|
52
70
|
configuration: config
|
|
53
|
-
});
|
|
71
|
+
}));
|
|
54
72
|
}
|
|
55
73
|
return {
|
|
56
74
|
componentToRender,
|
package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useMemo","lazy","Suspense","SchemaProvider","SkeletonCollection","AutoPatternsTableGridSwitch","then","module","default","AutoPatternsTable","AutoPatternsGrid","AutoPatternsCollectionComponent","_ref","component","index","layout","sharedConfig","memoized","_layout$find","_layout$find2","length","componentToRender","componentType","tableConfig","find","item","type","table","gridConfig","grid","config","createElement","fallback","configuration","Fragment","key","collection","collectionId","skeleton"],"sources":["../../../../src/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.tsx"],"sourcesContent":["import React, { useMemo, lazy, Suspense } from 'react';\nimport { CollectionComponentConfig } from '../../types';\nimport { SchemaProvider } from '../../providers';\nimport { SkeletonCollection } from '../AutoPatternsCollectionPageContent/SkeletonCollection';\n\nconst AutoPatternsTableGridSwitch = lazy(() =>\n import('../AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch').then(\n (module) => ({ default: module.AutoPatternsTableGridSwitch }),\n ),\n);\nconst AutoPatternsTable = lazy(() =>\n import('../AutoPatternsTable/AutoPatternsTable').then((module) => ({\n default: module.AutoPatternsTable,\n })),\n);\nconst AutoPatternsGrid = lazy(() =>\n import('../AutoPatternsGrid/AutoPatternsGrid').then((module) => ({\n default: module.AutoPatternsGrid,\n })),\n);\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 <Suspense fallback={<SkeletonCollection componentType=\"Table\" />}>\n <AutoPatternsTableGridSwitch configuration={config} />\n </Suspense>\n );\n } else if (tableConfig) {\n const config = { ...sharedConfig, ...tableConfig };\n componentToRender = (\n <Suspense fallback={<SkeletonCollection componentType=\"Table\" />}>\n <AutoPatternsTable configuration={config} />\n </Suspense>\n );\n } else if (gridConfig) {\n componentType = 'Grid';\n const config = { ...sharedConfig, ...gridConfig };\n componentToRender = (\n <Suspense fallback={<SkeletonCollection componentType=\"Grid\" />}>\n <AutoPatternsGrid configuration={config} />\n </Suspense>\n );\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":"AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AAE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c,CAAC;EAC7C,CAAC,EAAE,CAACP,MAAM,EAAEC,YAAY,CAAC,CAAC;EAE1B,MAAM;IAAEK,iBAAiB;IAAEC;EAAc,CAAC,GAAGL,QAAQ;EAErD,oBACElB,KAAA,CAAAgC,aAAA,CAAAhC,KAAA,CAAAmC,QAAA,QACGb,iBAAiB,gBAChBtB,KAAA,CAAAgC,aAAA,CAAC5B,cAAc;IACbgC,GAAG,EAAE,GAAGnB,YAAY,CAACoB,UAAU,CAACC,YAAY,IAAIvB,KAAK,EAAG;IACxDsB,UAAU,EAAEpB,YAAY,CAACoB,UAAW;IACpCE,QAAQ,eAAEvC,KAAA,CAAAgC,aAAA,CAAC3B,kBAAkB;MAACkB,aAAa,EAAEA;IAAc,CAAE;EAAE,GAE9DD,iBACa,CAAC,GACf,IACJ,CAAC;AAEP,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
2
|
+
import { SkeletonEntity } from './SkeletonEntity';
|
|
3
|
+
const ViewModeEntityPage = /*#__PURE__*/lazy(() => import('./ViewModeEntityPage').then(module => ({
|
|
4
|
+
default: module.ViewModeEntityPage
|
|
5
|
+
})));
|
|
6
|
+
const EditModeEntityPage = /*#__PURE__*/lazy(() => import('./EditModeEntityPage').then(module => ({
|
|
7
|
+
default: module.EditModeEntityPage
|
|
8
|
+
})));
|
|
4
9
|
export const AutoPatternsEntityPage = _ref => {
|
|
5
10
|
let {
|
|
6
11
|
configuration
|
|
7
12
|
} = _ref;
|
|
8
|
-
|
|
13
|
+
const fallback = /*#__PURE__*/React.createElement(SkeletonEntity, {
|
|
14
|
+
entityPage: configuration
|
|
15
|
+
});
|
|
16
|
+
return configuration.mode === 'view' ? /*#__PURE__*/React.createElement(Suspense, {
|
|
17
|
+
fallback: fallback
|
|
18
|
+
}, /*#__PURE__*/React.createElement(ViewModeEntityPage, {
|
|
9
19
|
configuration: configuration
|
|
10
|
-
}) : /*#__PURE__*/React.createElement(
|
|
20
|
+
})) : /*#__PURE__*/React.createElement(Suspense, {
|
|
21
|
+
fallback: fallback
|
|
22
|
+
}, /*#__PURE__*/React.createElement(EditModeEntityPage, {
|
|
11
23
|
configuration: configuration
|
|
12
|
-
});
|
|
24
|
+
}));
|
|
13
25
|
};
|
|
14
26
|
|
|
15
27
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ViewModeEntityPage","EditModeEntityPage","AutoPatternsEntityPage","_ref","configuration","
|
|
1
|
+
{"version":3,"names":["React","lazy","Suspense","SkeletonEntity","ViewModeEntityPage","then","module","default","EditModeEntityPage","AutoPatternsEntityPage","_ref","configuration","fallback","createElement","entityPage","mode"],"sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport { EntityPageConfig } from '../../types';\nimport { SkeletonEntity } from './SkeletonEntity';\n\nconst ViewModeEntityPage = lazy(() =>\n import('./ViewModeEntityPage').then((module) => ({\n default: module.ViewModeEntityPage,\n })),\n);\nconst EditModeEntityPage = lazy(() =>\n import('./EditModeEntityPage').then((module) => ({\n default: module.EditModeEntityPage,\n })),\n);\n\nexport interface AutoPatternsEntityPageProps {\n configuration: EntityPageConfig;\n}\n\nexport const AutoPatternsEntityPage: React.FC<AutoPatternsEntityPageProps> = ({\n configuration,\n}) => {\n const fallback = <SkeletonEntity entityPage={configuration} />;\n\n return configuration.mode === 'view' ? (\n <Suspense fallback={fallback}>\n <ViewModeEntityPage configuration={configuration} />\n </Suspense>\n ) : (\n <Suspense fallback={fallback}>\n <EditModeEntityPage configuration={configuration} />\n </Suspense>\n );\n};\n\n/*\n Key structure explanation:\n\n Main cards: main-section-card-{layoutIndex}\n Sidebar cards: sidebar-section-card-{layoutIndex}\n\n Layout content:\n {sectionId}-card-{cardIndex}-content-{contentIndex}\n\n Nested children:\n {sectionId}-card-{cardIndex}-content-{parentContentIndex}-level-{level}-child-{childIndex}\n\n This ensures uniqueness across all levels and sections.\n*/\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AAE7C,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,MAAMC,kBAAkB,gBAAGH,IAAI,CAAC,MAC9B,MAAM,CAAC,sBAAsB,CAAC,CAACI,IAAI,CAAEC,MAAM,KAAM;EAC/CC,OAAO,EAAED,MAAM,CAACF;AAClB,CAAC,CAAC,CACJ,CAAC;AACD,MAAMI,kBAAkB,gBAAGP,IAAI,CAAC,MAC9B,MAAM,CAAC,sBAAsB,CAAC,CAACI,IAAI,CAAEC,MAAM,KAAM;EAC/CC,OAAO,EAAED,MAAM,CAACE;AAClB,CAAC,CAAC,CACJ,CAAC;AAMD,OAAO,MAAMC,sBAA6D,GAAGC,IAAA,IAEvE;EAAA,IAFwE;IAC5EC;EACF,CAAC,GAAAD,IAAA;EACC,MAAME,QAAQ,gBAAGZ,KAAA,CAAAa,aAAA,CAACV,cAAc;IAACW,UAAU,EAAEH;EAAc,CAAE,CAAC;EAE9D,OAAOA,aAAa,CAACI,IAAI,KAAK,MAAM,gBAClCf,KAAA,CAAAa,aAAA,CAACX,QAAQ;IAACU,QAAQ,EAAEA;EAAS,gBAC3BZ,KAAA,CAAAa,aAAA,CAACT,kBAAkB;IAACO,aAAa,EAAEA;EAAc,CAAE,CAC3C,CAAC,gBAEXX,KAAA,CAAAa,aAAA,CAACX,QAAQ;IAACU,QAAQ,EAAEA;EAAS,gBAC3BZ,KAAA,CAAAa,aAAA,CAACL,kBAAkB;IAACG,aAAa,EAAEA;EAAc,CAAE,CAC3C,CACX;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AutoPatternsCollectionPage } from '../AutoPatternsCollectionPage';
|
|
3
|
-
import { AutoPatternsEntityPage } from '../AutoPatternsEntityPage';
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
4
2
|
import { SchemaProvider } from '../../providers/SchemaContext';
|
|
5
3
|
import { SkeletonEntity } from '../AutoPatternsEntityPage/SkeletonEntity';
|
|
4
|
+
const AutoPatternsCollectionPage = /*#__PURE__*/lazy(() => import('../AutoPatternsCollectionPage').then(module => ({
|
|
5
|
+
default: module.AutoPatternsCollectionPage
|
|
6
|
+
})));
|
|
7
|
+
const AutoPatternsEntityPage = /*#__PURE__*/lazy(() => import('../AutoPatternsEntityPage').then(module => ({
|
|
8
|
+
default: module.AutoPatternsEntityPage
|
|
9
|
+
})));
|
|
6
10
|
export const AutoPatternsPage = _ref => {
|
|
7
11
|
let {
|
|
8
12
|
pageConfig
|
|
@@ -15,9 +19,11 @@ export const AutoPatternsPage = _ref => {
|
|
|
15
19
|
switch (type) {
|
|
16
20
|
case 'collectionPage':
|
|
17
21
|
if (collectionPage) {
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
22
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
23
|
+
fallback: /*#__PURE__*/React.createElement("div", null)
|
|
24
|
+
}, /*#__PURE__*/React.createElement(AutoPatternsCollectionPage, {
|
|
19
25
|
configuration: collectionPage
|
|
20
|
-
});
|
|
26
|
+
}));
|
|
21
27
|
}
|
|
22
28
|
break;
|
|
23
29
|
case 'entityPage':
|
|
@@ -27,9 +33,13 @@ export const AutoPatternsPage = _ref => {
|
|
|
27
33
|
skeleton: /*#__PURE__*/React.createElement(SkeletonEntity, {
|
|
28
34
|
entityPage: entityPage
|
|
29
35
|
})
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Suspense, {
|
|
37
|
+
fallback: /*#__PURE__*/React.createElement(SkeletonEntity, {
|
|
38
|
+
entityPage: entityPage
|
|
39
|
+
})
|
|
30
40
|
}, /*#__PURE__*/React.createElement(AutoPatternsEntityPage, {
|
|
31
41
|
configuration: entityPage
|
|
32
|
-
}));
|
|
42
|
+
})));
|
|
33
43
|
}
|
|
34
44
|
break;
|
|
35
45
|
default:
|