szld-libs 0.2.97 → 0.2.98
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/szld-components.es.js +9 -6
- package/dist/szld-components.umd.js +1 -1
- package/es/index.js +35 -8
- package/es/mock/index.d.ts +306 -0
- package/es/mock/index.js +387 -1
- package/es/services/index.d.ts +6 -0
- package/es/services/index.js +85 -0
- package/es/services/request.d.ts +6 -0
- package/es/services/request.js +140 -0
- package/es/services/status.d.ts +1 -0
- package/es/services/status.js +44 -0
- package/es/services/vite.svg +1 -0
- package/es/utils/enum.d.ts +4 -0
- package/es/utils/enum.js +10 -0
- package/es/utils/method.js +14 -10
- package/es/vite-env.d.ts +5 -0
- package/lib/index.js +32 -5
- package/lib/mock/index.d.ts +306 -0
- package/lib/mock/index.js +386 -0
- package/lib/services/index.d.ts +6 -0
- package/lib/services/index.js +85 -0
- package/lib/services/request.d.ts +6 -0
- package/lib/services/request.js +140 -0
- package/lib/services/status.d.ts +1 -0
- package/lib/services/status.js +44 -0
- package/lib/services/vite.svg +1 -0
- package/lib/utils/enum.d.ts +4 -0
- package/lib/utils/enum.js +10 -0
- package/lib/utils/method.js +14 -10
- package/lib/vite-env.d.ts +5 -0
- package/package.json +3 -1
package/lib/utils/method.js
CHANGED
|
@@ -178,16 +178,19 @@ const handleAttrList = (attrList, extraAttrs) => {
|
|
|
178
178
|
const combinationGroups = parsedAttrList.filter((item) => {
|
|
179
179
|
var _a;
|
|
180
180
|
return (_a = item.json) == null ? void 0 : _a.combination;
|
|
181
|
-
}).reduce(
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
}).reduce(
|
|
182
|
+
(groups, item) => {
|
|
183
|
+
const combinationId = item.json["combination-id"];
|
|
184
|
+
if (!combinationId)
|
|
185
|
+
return groups;
|
|
186
|
+
if (!groups[combinationId]) {
|
|
187
|
+
groups[combinationId] = [];
|
|
188
|
+
}
|
|
189
|
+
groups[combinationId].push(item);
|
|
184
190
|
return groups;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
groups[combinationId].push(item);
|
|
189
|
-
return groups;
|
|
190
|
-
}, {});
|
|
191
|
+
},
|
|
192
|
+
{}
|
|
193
|
+
);
|
|
191
194
|
const excludeAttrIds = /* @__PURE__ */ new Set();
|
|
192
195
|
Object.values(combinationGroups).forEach((group) => {
|
|
193
196
|
if ((group == null ? void 0 : group.length) === 0)
|
|
@@ -312,7 +315,8 @@ const handleAttrListToObj = (attrList) => {
|
|
|
312
315
|
data_list: [processLevel(item.children)]
|
|
313
316
|
};
|
|
314
317
|
} else if (item.attrtype === 1 && item.children.length > 0 && Array.isArray(item.children)) {
|
|
315
|
-
|
|
318
|
+
let { attrvalue = [], children = [] } = item || {};
|
|
319
|
+
attrvalue = Array.isArray(attrvalue) ? attrvalue : [attrvalue];
|
|
316
320
|
if (Array.isArray(attrvalue) && (attrvalue == null ? void 0 : attrvalue.length)) {
|
|
317
321
|
item.children = attrvalue.map((v) => {
|
|
318
322
|
return handleObjDetailToSignleAttrList((children == null ? void 0 : children[0]) || [], v);
|
package/lib/vite-env.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "szld-libs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.98",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
"dayjs": "^1.11.19",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
18
|
"pako": "^2.1.0",
|
|
19
|
+
"query-string": "^9.3.1",
|
|
19
20
|
"react": "^18.2.0",
|
|
20
21
|
"react-dom": "^18.2.0",
|
|
21
22
|
"react-resizable": "^3.0.5",
|
|
22
23
|
"react-router-dom": "^6.6.1",
|
|
24
|
+
"react-vant": "^3.3.5",
|
|
23
25
|
"react-window": "^1.8.9",
|
|
24
26
|
"szld-libs": "^0.2.55"
|
|
25
27
|
},
|