szld-libs 0.2.96 → 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 +67 -59
- package/dist/szld-components.umd.js +3 -3
- package/es/components/DynamicForm/func.js +10 -8
- package/es/components/DynamicForm/useDynamicForm.d.ts +1 -1
- package/es/hooks/useRenderAttrSetDetail.d.ts +24 -0
- package/es/hooks/useRenderAttrSetDetail.js +186 -0
- package/es/index.js +32 -263
- package/es/mock/index.d.ts +306 -0
- package/es/mock/index.js +387 -0
- package/es/mock/vite.svg +1 -0
- 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/utils/szxkFunc.d.ts +8 -0
- package/es/utils/szxkFunc.js +7 -1
- package/es/vite-env.d.ts +11 -0
- package/lib/components/DynamicForm/func.js +10 -8
- package/lib/components/DynamicForm/useDynamicForm.d.ts +1 -1
- package/lib/hooks/useRenderAttrSetDetail.d.ts +24 -0
- package/lib/hooks/useRenderAttrSetDetail.js +185 -0
- package/lib/index.js +29 -260
- package/lib/mock/index.d.ts +306 -0
- package/lib/mock/index.js +387 -0
- package/lib/mock/vite.svg +1 -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/utils/szxkFunc.d.ts +8 -0
- package/lib/utils/szxkFunc.js +6 -0
- package/lib/vite-env.d.ts +11 -0
- package/package.json +3 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const encryptParamStrings = ["AppID", "Password", "PageName", "Controlname", "InterfaceType", "SessionID"];
|
|
4
|
+
const TOKEN = "TOKEN";
|
|
5
|
+
const USERINFO = "USERINFO";
|
|
6
|
+
const OEID = "OEID";
|
|
7
|
+
exports.OEID = OEID;
|
|
8
|
+
exports.TOKEN = TOKEN;
|
|
9
|
+
exports.USERINFO = USERINFO;
|
|
10
|
+
exports.encryptParamStrings = encryptParamStrings;
|
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/utils/szxkFunc.d.ts
CHANGED
|
@@ -28,3 +28,11 @@ export declare const handleGetAttrDetail: (params: {
|
|
|
28
28
|
* @returns 处理后的属性集列表,每个属性项包含attrvalue
|
|
29
29
|
*/
|
|
30
30
|
export declare const handleObjDetailToSignleAttrList: (attrList: any[], detail: any) => any[];
|
|
31
|
+
/**
|
|
32
|
+
* 设置表格行的颜色
|
|
33
|
+
*/
|
|
34
|
+
export declare const handleSetTableRowColor: (record: any, index: number | undefined) => {
|
|
35
|
+
style: {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
package/lib/utils/szxkFunc.js
CHANGED
|
@@ -28,6 +28,12 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
|
28
28
|
attrvalue: detail[item.attrid] || ""
|
|
29
29
|
}));
|
|
30
30
|
};
|
|
31
|
+
const handleSetTableRowColor = (record, index) => ({
|
|
32
|
+
style: {
|
|
33
|
+
backgroundColor: index !== void 0 && index % 2 === 1 ? "var(--bg-color-2)" : "var(--bg-color-3)"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
31
36
|
exports.handleGetAttrDetail = handleGetAttrDetail;
|
|
32
37
|
exports.handleGetAttrList = handleGetAttrList;
|
|
33
38
|
exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
|
|
39
|
+
exports.handleSetTableRowColor = handleSetTableRowColor;
|
package/lib/vite-env.d.ts
CHANGED
|
@@ -12,3 +12,14 @@ interface ICustomModal {
|
|
|
12
12
|
footer?: React.ReactNode;
|
|
13
13
|
modalStyle?: React.CSSProperties;
|
|
14
14
|
}
|
|
15
|
+
interface IFileRes {
|
|
16
|
+
FileId: string;
|
|
17
|
+
FileName: string;
|
|
18
|
+
FileExt: string;
|
|
19
|
+
FilePath: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface Window {
|
|
23
|
+
CONFIG: any;
|
|
24
|
+
CONFIG_STR: string;
|
|
25
|
+
}
|
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
|
},
|