szld-libs 0.4.47 → 0.4.50
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/style.css +1 -1
- package/dist/szld-components.es.js +18420 -17772
- package/dist/szld-components.umd.js +217 -101
- package/es/components/DynamicForm/index.d.ts +1 -0
- package/es/components/DynamicForm/myRichText/index.d.ts +2 -1
- package/es/components/DynamicForm/myRichText/index.js +1 -1
- package/es/components/DynamicForm/mySelect/index.js +23 -20
- package/es/components/DynamicFormMobile/func.js +4 -0
- package/es/components/DynamicFormMobile/myRichText/enmu.d.ts +5 -0
- package/es/components/DynamicFormMobile/myRichText/enmu.js +68 -0
- package/es/components/DynamicFormMobile/myRichText/index.d.ts +11 -0
- package/es/components/DynamicFormMobile/myRichText/index.js +291 -0
- package/es/components/DynamicFormMobile/myRichText/vite.svg +1 -0
- package/es/components/DynamicFormMobile/mySelect/index.css +9 -1
- package/es/components/DynamicFormMobile/mySelect/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/mySelect/index.js +55 -24
- package/es/components/DynamicFormMobile/myUpload/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/selectModel/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/useDynamicForm.d.ts +2 -2
- package/es/components/DynamicFormMobile/useDynamicForm.js +19 -4
- package/es/index.js +6 -4
- package/es/mock/index.js +2 -2
- package/lib/components/DynamicForm/index.d.ts +1 -0
- package/lib/components/DynamicForm/myRichText/index.d.ts +2 -1
- package/lib/components/DynamicForm/myRichText/index.js +1 -1
- package/lib/components/DynamicForm/mySelect/index.js +23 -20
- package/lib/components/DynamicFormMobile/func.js +4 -0
- package/lib/components/DynamicFormMobile/myRichText/enmu.d.ts +5 -0
- package/lib/components/DynamicFormMobile/myRichText/enmu.js +68 -0
- package/lib/components/DynamicFormMobile/myRichText/index.d.ts +11 -0
- package/lib/components/DynamicFormMobile/myRichText/index.js +290 -0
- package/lib/components/DynamicFormMobile/myRichText/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/mySelect/index.css +9 -1
- package/lib/components/DynamicFormMobile/mySelect/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/mySelect/index.js +55 -24
- package/lib/components/DynamicFormMobile/myUpload/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/selectModel/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/useDynamicForm.d.ts +2 -2
- package/lib/components/DynamicFormMobile/useDynamicForm.js +19 -4
- package/lib/index.js +6 -4
- package/lib/mock/index.js +2 -2
- package/package.json +2 -1
- package/es/utils/enum.d.ts +0 -4
- package/es/utils/enum.js +0 -10
- package/lib/utils/enum.d.ts +0 -4
- package/lib/utils/enum.js +0 -10
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { handleGetList, handleGetControlPanelConfig } from "../../../utils/szxkFunc";
|
|
2
3
|
import { handleSelectOptions, findRowByValue } from "../../DynamicForm/func";
|
|
3
4
|
import { Toast, Field, Popup, Checkbox, Picker } from "react-vant";
|
|
4
5
|
import { useState, useEffect } from "react";
|
|
5
6
|
import { Flex } from "antd";
|
|
6
|
-
import { handleGetList, handleGetControlPanelConfig } from "../../../utils/szxkFunc";
|
|
7
7
|
const checkboxGroup = "index-module_checkbox-group_4684b";
|
|
8
8
|
const checkboxGroupHeader = "index-module_checkbox-group-header_192bd";
|
|
9
9
|
const checkboxGroupContent = "index-module_checkbox-group-content_f81a1";
|
|
10
10
|
const checkboxItem = "index-module_checkbox-item_1b36c";
|
|
11
11
|
const checkboxGroupCancel = "index-module_checkbox-group-cancel_c5cfb";
|
|
12
|
+
const checkboxGroupCheckAll = "index-module_checkbox-group-check-all_1e608";
|
|
13
|
+
const item = "index-module_item_4fef5";
|
|
12
14
|
const styles = {
|
|
13
15
|
"checkbox-group": "index-module_checkbox-group_4684b",
|
|
14
16
|
checkboxGroup,
|
|
@@ -19,10 +21,13 @@ const styles = {
|
|
|
19
21
|
"checkbox-item": "index-module_checkbox-item_1b36c",
|
|
20
22
|
checkboxItem,
|
|
21
23
|
"checkbox-group-cancel": "index-module_checkbox-group-cancel_c5cfb",
|
|
22
|
-
checkboxGroupCancel
|
|
24
|
+
checkboxGroupCancel,
|
|
25
|
+
"checkbox-group-check-all": "index-module_checkbox-group-check-all_1e608",
|
|
26
|
+
checkboxGroupCheckAll,
|
|
27
|
+
item
|
|
23
28
|
};
|
|
24
29
|
const MySelect = ({
|
|
25
|
-
item,
|
|
30
|
+
item: item2,
|
|
26
31
|
readonly,
|
|
27
32
|
style,
|
|
28
33
|
commonRequestWidthParams,
|
|
@@ -37,29 +42,34 @@ const MySelect = ({
|
|
|
37
42
|
getTitle,
|
|
38
43
|
attrid
|
|
39
44
|
}) => {
|
|
45
|
+
var _a;
|
|
40
46
|
const [options, setOptions] = useState([]);
|
|
41
47
|
const [instanceList, setInstanceList] = useState([]);
|
|
48
|
+
const [isAllChecked, setIsAllChecked] = useState(false);
|
|
49
|
+
const [showPopup, setShowPopup] = useState(false);
|
|
50
|
+
const [selectedValues, setSelectedValues] = useState([]);
|
|
51
|
+
const [confirmValues, setConfirmValues] = useState([]);
|
|
42
52
|
useEffect(() => {
|
|
43
|
-
if (
|
|
53
|
+
if (item2.input === "mult-select" && value && Array.isArray(value)) {
|
|
44
54
|
setSelectedValues(value || []);
|
|
45
55
|
setConfirmValues(value || []);
|
|
46
56
|
}
|
|
47
57
|
}, [value]);
|
|
48
58
|
useEffect(() => {
|
|
49
59
|
handleLoadOptions();
|
|
50
|
-
}, [
|
|
60
|
+
}, [item2.inputType, item2.classify, item2.data, item2.options]);
|
|
51
61
|
const handleLoadOptions = async () => {
|
|
52
|
-
if (
|
|
53
|
-
const keyField =
|
|
62
|
+
if (item2.inputType === "instance-url" && (item2 == null ? void 0 : item2["instance-source-number"]) && attrid) {
|
|
63
|
+
const keyField = item2 == null ? void 0 : item2["key-field"];
|
|
54
64
|
if (!keyField) {
|
|
55
65
|
Toast("请配置key-field");
|
|
56
66
|
return;
|
|
57
67
|
}
|
|
58
68
|
const params = {
|
|
59
|
-
"source-number":
|
|
69
|
+
"source-number": item2 == null ? void 0 : item2["instance-source-number"]
|
|
60
70
|
};
|
|
61
71
|
let list2 = await handleGetList(params, commonRequestWidthParams);
|
|
62
|
-
const controlPanelConfig = await handleGetControlPanelConfig(
|
|
72
|
+
const controlPanelConfig = await handleGetControlPanelConfig(item2 == null ? void 0 : item2["instance-source-number"], commonRequest);
|
|
63
73
|
if (controlPanelConfig) {
|
|
64
74
|
const nonUniversalHeader = (controlPanelConfig == null ? void 0 : controlPanelConfig["non-universal-header"]) || [];
|
|
65
75
|
const labelConfig = (nonUniversalHeader == null ? void 0 : nonUniversalHeader["label"]) || [];
|
|
@@ -88,14 +98,11 @@ const MySelect = ({
|
|
|
88
98
|
interfaceTypeSysDict,
|
|
89
99
|
actionUrlKey,
|
|
90
100
|
actionUrlExtraParams,
|
|
91
|
-
item
|
|
101
|
+
item: item2
|
|
92
102
|
});
|
|
93
103
|
setOptions(list);
|
|
94
104
|
};
|
|
95
|
-
|
|
96
|
-
const [selectedValues, setSelectedValues] = useState([]);
|
|
97
|
-
const [confirmValues, setConfirmValues] = useState([]);
|
|
98
|
-
return /* @__PURE__ */ jsx(Fragment, { children: item.input === "mult-select" ? /* @__PURE__ */ jsxs("div", { style: { width: "100%", ...style }, children: [
|
|
105
|
+
return /* @__PURE__ */ jsx(Fragment, { children: item2.input === "mult-select" ? /* @__PURE__ */ jsxs("div", { style: { width: "100%", ...style }, children: [
|
|
99
106
|
/* @__PURE__ */ jsx(
|
|
100
107
|
Field,
|
|
101
108
|
{
|
|
@@ -109,7 +116,7 @@ const MySelect = ({
|
|
|
109
116
|
setSelectedValues([...confirmValues]);
|
|
110
117
|
setShowPopup(true);
|
|
111
118
|
},
|
|
112
|
-
placeholder: langId === "10001" ? (
|
|
119
|
+
placeholder: langId === "10001" ? (item2 == null ? void 0 : item2["default-prompt"]) || "请选择" : (item2 == null ? void 0 : item2["default-prompt"]) || "Please select"
|
|
113
120
|
}
|
|
114
121
|
),
|
|
115
122
|
/* @__PURE__ */ jsx(
|
|
@@ -135,14 +142,38 @@ const MySelect = ({
|
|
|
135
142
|
}
|
|
136
143
|
)
|
|
137
144
|
] }),
|
|
145
|
+
(item2 == null ? void 0 : item2["custom-operation"]) && item2.input === "mult-select" && ((_a = item2 == null ? void 0 : item2["operation-types"]) == null ? void 0 : _a.includes("check-all")) && /* @__PURE__ */ jsx("div", { className: styles["checkbox-group-check-all"], children: /* @__PURE__ */ jsx(
|
|
146
|
+
Checkbox,
|
|
147
|
+
{
|
|
148
|
+
className: styles["item"],
|
|
149
|
+
shape: "square",
|
|
150
|
+
checked: isAllChecked,
|
|
151
|
+
onChange: (v) => {
|
|
152
|
+
setIsAllChecked(v);
|
|
153
|
+
setSelectedValues(v ? options.map((item22) => item22.value) : []);
|
|
154
|
+
},
|
|
155
|
+
children: langId === "10001" ? "全选" : "check all"
|
|
156
|
+
}
|
|
157
|
+
) }),
|
|
138
158
|
/* @__PURE__ */ jsx(
|
|
139
159
|
"div",
|
|
140
160
|
{
|
|
141
161
|
style: {
|
|
142
|
-
height: " calc(60vh -
|
|
162
|
+
height: " calc(60vh - 126px)"
|
|
143
163
|
},
|
|
144
164
|
className: styles["checkbox-group-content"],
|
|
145
|
-
children: /* @__PURE__ */ jsx(
|
|
165
|
+
children: /* @__PURE__ */ jsx(
|
|
166
|
+
Checkbox.Group,
|
|
167
|
+
{
|
|
168
|
+
iconSize: "18",
|
|
169
|
+
onChange: (v) => {
|
|
170
|
+
setSelectedValues(v);
|
|
171
|
+
setIsAllChecked((v == null ? void 0 : v.length) === (options == null ? void 0 : options.length));
|
|
172
|
+
},
|
|
173
|
+
value: selectedValues,
|
|
174
|
+
children: options.map((item22) => /* @__PURE__ */ jsx(Checkbox, { shape: "square", className: styles["checkbox-item"], name: item22.value, children: item22.label }, item22.value))
|
|
175
|
+
}
|
|
176
|
+
)
|
|
146
177
|
}
|
|
147
178
|
)
|
|
148
179
|
] })
|
|
@@ -158,8 +189,8 @@ const MySelect = ({
|
|
|
158
189
|
text: "label"
|
|
159
190
|
},
|
|
160
191
|
onConfirm: (val) => {
|
|
161
|
-
if (attrid && (instanceList == null ? void 0 : instanceList.length) > 0 && (
|
|
162
|
-
const keyField =
|
|
192
|
+
if (attrid && (instanceList == null ? void 0 : instanceList.length) > 0 && (item2 == null ? void 0 : item2.inputType) === "instance-url") {
|
|
193
|
+
const keyField = item2 == null ? void 0 : item2["key-field"];
|
|
163
194
|
const row = findRowByValue(instanceList, String(val));
|
|
164
195
|
const keys = Object.keys(keyField || {});
|
|
165
196
|
const newObj = keys == null ? void 0 : keys.reduce((prev, cur) => {
|
|
@@ -174,16 +205,16 @@ const MySelect = ({
|
|
|
174
205
|
onChange(val);
|
|
175
206
|
},
|
|
176
207
|
children: (val, _, actions) => {
|
|
177
|
-
var
|
|
208
|
+
var _a2;
|
|
178
209
|
val = val || value;
|
|
179
210
|
let str = "";
|
|
180
211
|
if (Array.isArray(val)) {
|
|
181
212
|
str = (val == null ? void 0 : val.map((v) => {
|
|
182
|
-
var
|
|
183
|
-
return ((
|
|
213
|
+
var _a3;
|
|
214
|
+
return ((_a3 = options.find((x) => x.value === v)) == null ? void 0 : _a3.label) || v;
|
|
184
215
|
}).join(",")) || "";
|
|
185
216
|
}
|
|
186
|
-
str = ((
|
|
217
|
+
str = ((_a2 = options.find((v) => v.value === val)) == null ? void 0 : _a2.label) || val;
|
|
187
218
|
return /* @__PURE__ */ jsx(
|
|
188
219
|
Field,
|
|
189
220
|
{
|
|
@@ -191,7 +222,7 @@ const MySelect = ({
|
|
|
191
222
|
isLink: true,
|
|
192
223
|
readOnly: true,
|
|
193
224
|
clickable: true,
|
|
194
|
-
placeholder: langId === "10001" ? (
|
|
225
|
+
placeholder: langId === "10001" ? (item2 == null ? void 0 : item2["default-prompt"]) || "请选择" : (item2 == null ? void 0 : item2["default-prompt"]) || "Please select",
|
|
195
226
|
value: str,
|
|
196
227
|
onClick: () => {
|
|
197
228
|
if (readonly)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IformConfigItem, IformItemStyle } from '../DynamicForm/index.d';
|
|
3
|
-
import { AxiosResponse } from 'axios';
|
|
4
2
|
import { FormListFieldData, UploadFile } from 'antd';
|
|
3
|
+
import { IformConfigItem, IformItemStyle } from '../DynamicForm/index.d';
|
|
5
4
|
import { FormInstance } from 'react-vant';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
6
|
interface IDynamicFormProps {
|
|
7
7
|
commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
8
8
|
commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
2
|
import { MinusSquareOutlined, PlusSquareOutlined, CloseOutlined, InfoCircleOutlined } from "@ant-design/icons";
|
|
3
|
-
import {
|
|
3
|
+
import { App, Col, Collapse, Card, Flex, Button, DatePicker, Tooltip } from "antd";
|
|
4
4
|
import { handleUrlOptions, getJson, base64ToString } from "../../utils/method";
|
|
5
|
+
import { handleSetFormItemInitialValue, handleGetPlaceholder } from "./func";
|
|
5
6
|
import SelectModelBackfillFormItem from "./selectModelBackfillFormItem";
|
|
7
|
+
import { Form, Input, DatetimePicker } from "react-vant";
|
|
6
8
|
import { useRef, useEffect, useCallback, Fragment } from "react";
|
|
7
9
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
8
10
|
import SelectModel from "./selectModel";
|
|
9
11
|
import MyCheckbox from "./myCheckbox";
|
|
10
12
|
import MyCascader from "./myCascader";
|
|
13
|
+
import MyCalendar from "./myCalendar";
|
|
14
|
+
import MyRichText from "./myRichText";
|
|
11
15
|
import dayjs from "dayjs";
|
|
12
16
|
import RadioCard from "./radioCard";
|
|
13
17
|
import MySelect from "./mySelect";
|
|
14
18
|
import MyUpload from "./myUpload";
|
|
15
19
|
import MyRadio from "./myRadio";
|
|
16
|
-
import { App, Col, Collapse, Card, Flex, Button, DatePicker, Tooltip } from "antd";
|
|
17
|
-
import { Form, Input, DatetimePicker } from "react-vant";
|
|
18
|
-
import MyCalendar from "./myCalendar";
|
|
19
20
|
dayjs.extend(isoWeek);
|
|
20
21
|
function useDynamicForm(props) {
|
|
21
22
|
const {
|
|
@@ -757,6 +758,20 @@ function useDynamicForm(props) {
|
|
|
757
758
|
commonRequestWidthParams
|
|
758
759
|
}
|
|
759
760
|
);
|
|
761
|
+
case "rich-text":
|
|
762
|
+
return /* @__PURE__ */ jsx(
|
|
763
|
+
MyRichText,
|
|
764
|
+
{
|
|
765
|
+
langId,
|
|
766
|
+
readonly,
|
|
767
|
+
item: item.json,
|
|
768
|
+
onChange: (val) => {
|
|
769
|
+
form.setFieldValue(item.attrid, val);
|
|
770
|
+
},
|
|
771
|
+
value: formatValue,
|
|
772
|
+
style: { width: defaultWidth, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
773
|
+
}
|
|
774
|
+
);
|
|
760
775
|
default:
|
|
761
776
|
return /* @__PURE__ */ jsx(
|
|
762
777
|
Input,
|
package/es/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { handleAttrList, handleSubmitForm } from "./utils/method";
|
|
3
|
-
import { BackHeader,
|
|
3
|
+
import { BackHeader, DynamicFormMobile } from "./main";
|
|
4
4
|
import { BrowserRouter } from "react-router-dom";
|
|
5
|
-
import { ConfigProvider, App
|
|
5
|
+
import { ConfigProvider, App } from "antd";
|
|
6
|
+
import { Form } from "react-vant";
|
|
6
7
|
import { useRef, useState, useEffect } from "react";
|
|
7
8
|
import ReactDOM from "react-dom/client";
|
|
8
9
|
import zhCN from "antd/es/locale/zh_CN";
|
|
@@ -33,13 +34,14 @@ const Demo = () => {
|
|
|
33
34
|
/* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
|
|
34
35
|
/* @__PURE__ */ jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxs(Form, { form, onValuesChange, layout: "vertical", onFinish, children: [
|
|
35
36
|
/* @__PURE__ */ jsx(
|
|
36
|
-
|
|
37
|
+
DynamicFormMobile,
|
|
37
38
|
{
|
|
38
39
|
formConfig: list,
|
|
39
40
|
readonly: false,
|
|
40
41
|
form,
|
|
41
42
|
relatedid: "guid",
|
|
42
43
|
colNum: 1,
|
|
44
|
+
defaultWidth: 358,
|
|
43
45
|
commonRequestWidthParams: () => {
|
|
44
46
|
return new Promise((resolve, reject) => {
|
|
45
47
|
});
|
|
@@ -54,7 +56,7 @@ const Demo = () => {
|
|
|
54
56
|
langId
|
|
55
57
|
}
|
|
56
58
|
),
|
|
57
|
-
/* @__PURE__ */ jsx(Form.Item, { name: "submit", style: { marginLeft: "auto" }
|
|
59
|
+
/* @__PURE__ */ jsx(Form.Item, { name: "submit", style: { marginLeft: "auto" } })
|
|
58
60
|
] }) }),
|
|
59
61
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
60
62
|
"2. 测试循环滚动组件",
|
package/es/mock/index.js
CHANGED
|
@@ -8,10 +8,10 @@ const attrList = [
|
|
|
8
8
|
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
9
9
|
attrname: "Dates",
|
|
10
10
|
attrtype: 0,
|
|
11
|
-
info: '{"input":"
|
|
11
|
+
info: '{"input":"mult-select","dataType":"string","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"inputType":"local","length":500,"must":true}',
|
|
12
12
|
info_base64: 0,
|
|
13
13
|
createtime: "2026-02-11 15:12:26",
|
|
14
|
-
attrvalue: "
|
|
14
|
+
attrvalue: "",
|
|
15
15
|
serialnum: 1,
|
|
16
16
|
children: []
|
|
17
17
|
}
|
|
@@ -4,7 +4,8 @@ interface IMyRichTextProps {
|
|
|
4
4
|
readonly: boolean;
|
|
5
5
|
style: React.CSSProperties;
|
|
6
6
|
value: string;
|
|
7
|
+
langId?: string;
|
|
7
8
|
onChange: (val: string) => void;
|
|
8
9
|
}
|
|
9
|
-
declare const MyRichText: ({ item, readonly, style, value, onChange }: IMyRichTextProps) => import("react").JSX.Element | null;
|
|
10
|
+
declare const MyRichText: ({ item, readonly, style, value, langId, onChange }: IMyRichTextProps) => import("react").JSX.Element | null;
|
|
10
11
|
export default MyRichText;
|
|
@@ -10,7 +10,7 @@ const StarterKit = require("@tiptap/starter-kit");
|
|
|
10
10
|
const Color = require("@tiptap/extension-color");
|
|
11
11
|
const react = require("react");
|
|
12
12
|
const icons = require("@ant-design/icons");
|
|
13
|
-
const MyRichText = ({ item, readonly, style, value, onChange }) => {
|
|
13
|
+
const MyRichText = ({ item, readonly, style, value, langId, onChange }) => {
|
|
14
14
|
const [color, setColor] = react.useState("#1677ff");
|
|
15
15
|
react.useEffect(() => {
|
|
16
16
|
const styleSheet = document.createElement("style");
|
|
@@ -122,27 +122,30 @@ const MySelect = ({
|
|
|
122
122
|
}
|
|
123
123
|
handleChange(val);
|
|
124
124
|
},
|
|
125
|
-
popupRender: (menu) =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
130
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
131
|
-
/* @__PURE__ */ jsxRuntime.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
125
|
+
popupRender: (menu) => {
|
|
126
|
+
var _a;
|
|
127
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
128
|
+
menu,
|
|
129
|
+
(item == null ? void 0 : item["custom-operation"]) && item.input === "mult-select" && ((_a = item == null ? void 0 : item["operation-types"]) == null ? void 0 : _a.includes("check-all")) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Divider, { style: { margin: "8px 0" } }),
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { justify: "space-between", children: [
|
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
133
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
134
|
+
antd.Checkbox,
|
|
135
|
+
{
|
|
136
|
+
checked: checkedAll,
|
|
137
|
+
onChange: (e) => {
|
|
138
|
+
const val = e.target.checked ? options == null ? void 0 : options.map((v) => v.value) : [];
|
|
139
|
+
setCheckedAll(e.target.checked);
|
|
140
|
+
handleChange(val);
|
|
141
|
+
},
|
|
142
|
+
children: langId === "10001" ? "全选" : "check all"
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
] })
|
|
143
146
|
] })
|
|
144
|
-
] })
|
|
145
|
-
|
|
147
|
+
] });
|
|
148
|
+
}
|
|
146
149
|
}
|
|
147
150
|
);
|
|
148
151
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const dayjs = require("dayjs");
|
|
4
4
|
const antd = require("antd");
|
|
5
|
+
const method = require("../../utils/method");
|
|
5
6
|
const handleGetPlaceholder = (itemWithJson, langId) => {
|
|
6
7
|
const { input = "" } = (itemWithJson == null ? void 0 : itemWithJson.json) || {};
|
|
7
8
|
let placeholderCn = "请输入", placeholderEn = "Please input";
|
|
@@ -85,6 +86,9 @@ const handleSetFormItemInitialValue = (itemWithJson) => {
|
|
|
85
86
|
if (inputType === "time-picker" && !initialValue && ((_g = itemWithJson.json) == null ? void 0 : _g["auto-generate"]) && ((_h = itemWithJson.json) == null ? void 0 : _h["auto-generate-type"]) === "currenttimestamp") {
|
|
86
87
|
initialValue = dayjs().unix().toString();
|
|
87
88
|
}
|
|
89
|
+
if (inputType === "rich-text" && initialValue) {
|
|
90
|
+
initialValue = method.base64ToString(initialValue);
|
|
91
|
+
}
|
|
88
92
|
if (itemWithJson.attrtype === 1) {
|
|
89
93
|
initialValue = handleGetSingleAttrListObj(itemWithJson.children || []);
|
|
90
94
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fontSizes = [
|
|
4
|
+
{ value: "12px", label: "12px" },
|
|
5
|
+
{ value: "14px", label: "14px" },
|
|
6
|
+
{ value: "16px", label: "16px" },
|
|
7
|
+
{ value: "18px", label: "18px" },
|
|
8
|
+
{ value: "20px", label: "20px" },
|
|
9
|
+
{ value: "24px", label: "24px" },
|
|
10
|
+
{ value: "28px", label: "28px" },
|
|
11
|
+
{ value: "32px", label: "32px" },
|
|
12
|
+
{ value: "36px", label: "36px" }
|
|
13
|
+
];
|
|
14
|
+
const colors = [
|
|
15
|
+
"#000000",
|
|
16
|
+
"#ffffff",
|
|
17
|
+
"#333333",
|
|
18
|
+
"#666666",
|
|
19
|
+
"#999999",
|
|
20
|
+
"#cccccc",
|
|
21
|
+
"#ff0000",
|
|
22
|
+
"#cc0000",
|
|
23
|
+
"#ff3333",
|
|
24
|
+
"#ff6666",
|
|
25
|
+
"#ff9999",
|
|
26
|
+
"#ffcccc",
|
|
27
|
+
"#ff6600",
|
|
28
|
+
"#cc5200",
|
|
29
|
+
"#ff8533",
|
|
30
|
+
"#ffad66",
|
|
31
|
+
"#ffd4a3",
|
|
32
|
+
"#ffff00",
|
|
33
|
+
"#cccc00",
|
|
34
|
+
"#ffff33",
|
|
35
|
+
"#ffff66",
|
|
36
|
+
"#ffff99",
|
|
37
|
+
"#00cc00",
|
|
38
|
+
"#009900",
|
|
39
|
+
"#33ff33",
|
|
40
|
+
"#66ff66",
|
|
41
|
+
"#99ff99",
|
|
42
|
+
"#00cccc",
|
|
43
|
+
"#009999",
|
|
44
|
+
"#33ffff",
|
|
45
|
+
"#66ffff",
|
|
46
|
+
"#99ffff",
|
|
47
|
+
"#0066ff",
|
|
48
|
+
"#004dcc",
|
|
49
|
+
"#3385ff",
|
|
50
|
+
"#66a3ff",
|
|
51
|
+
"#99c1ff",
|
|
52
|
+
"#9900ff",
|
|
53
|
+
"#7300cc",
|
|
54
|
+
"#b333ff",
|
|
55
|
+
"#cc66ff",
|
|
56
|
+
"#e0a3ff",
|
|
57
|
+
"#ff0099",
|
|
58
|
+
"#cc007a",
|
|
59
|
+
"#ff33aa",
|
|
60
|
+
"#ff66bb",
|
|
61
|
+
"#ff99cc",
|
|
62
|
+
"#996633",
|
|
63
|
+
"#734d29",
|
|
64
|
+
"#b3804d",
|
|
65
|
+
"#cc9966"
|
|
66
|
+
];
|
|
67
|
+
exports.colors = colors;
|
|
68
|
+
exports.fontSizes = fontSizes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IMyRichTextProps {
|
|
3
|
+
item: any;
|
|
4
|
+
readonly: boolean;
|
|
5
|
+
style: React.CSSProperties;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (val: string) => void;
|
|
8
|
+
langId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const MyRichText: ({ item, readonly, style, value, langId, onChange }: IMyRichTextProps) => import("react").JSX.Element | null;
|
|
11
|
+
export default MyRichText;
|