@pisell/materials 1.0.498 → 1.0.500
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +5 -5
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +22 -22
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +21 -21
- package/es/components/dataSourceComponents/dataSourceForm/style.less +9 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +13 -10
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +16 -11
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +7 -3
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +2 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -2
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +3 -2
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +6 -2
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +6 -2
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.js +7 -2
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +7 -2
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +11 -5
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +11 -4
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +2 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +3 -7
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +7 -2
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +8 -3
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +9 -4
- package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Radio/ReadPretty.js +3 -2
- package/es/components/dataSourceComponents/fields/Select/ReadPretty.js +3 -2
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +6 -2
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.less +5 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.js +103 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Translation/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Translation/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Translation/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Translation/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Translation/index.less +61 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +15 -0
- package/es/components/dataSourceComponents/fields/Translation/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +377 -235
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +35 -11
- package/es/components/dataSourceComponents/fields/Upload/constants.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Upload/constants.js +9 -0
- package/es/components/dataSourceComponents/fields/Upload/index.less +56 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +12 -11
- package/es/components/dataSourceComponents/fields/Upload/types.d.ts +48 -0
- package/es/components/dataSourceComponents/fields/Upload/types.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +13 -13
- package/es/components/dataSourceComponents/fields/Upload/utils.js +240 -215
- package/es/components/dataSourceComponents/fields/index.d.ts +4 -2
- package/es/components/dataSourceComponents/fields/index.js +4 -1
- package/es/hooks/useTranslationOriginal.d.ts +2 -0
- package/es/hooks/useTranslationOriginal.js +9 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/locales/en-US.d.ts +6 -0
- package/es/locales/en-US.js +12 -2
- package/es/locales/zh-CN.d.ts +6 -0
- package/es/locales/zh-CN.js +7 -1
- package/es/locales/zh-TW.d.ts +6 -0
- package/es/locales/zh-TW.js +7 -1
- package/lib/components/dataSourceComponents/dataSourceForm/style.less +9 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +6 -3
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +11 -9
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +2 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +10 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +11 -2
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +11 -2
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.js +11 -1
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +11 -1
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +9 -4
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +11 -4
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +2 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -8
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +11 -1
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +12 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +9 -4
- package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Radio/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/Select/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +11 -2
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.less +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.js +107 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Translation/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Translation/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Translation/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Translation/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Translation/index.less +61 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +15 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +384 -247
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +24 -4
- package/lib/components/dataSourceComponents/fields/Upload/constants.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Upload/constants.js +47 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.less +56 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +12 -11
- package/lib/components/dataSourceComponents/fields/Upload/types.d.ts +48 -0
- package/lib/components/dataSourceComponents/fields/Upload/types.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +13 -13
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +207 -254
- package/lib/components/dataSourceComponents/fields/index.d.ts +4 -2
- package/lib/components/dataSourceComponents/fields/index.js +4 -1
- package/lib/hooks/useTranslationOriginal.d.ts +2 -0
- package/lib/hooks/useTranslationOriginal.js +41 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/locales/en-US.d.ts +6 -0
- package/lib/locales/en-US.js +8 -1
- package/lib/locales/zh-CN.d.ts +6 -0
- package/lib/locales/zh-CN.js +7 -1
- package/lib/locales/zh-TW.d.ts +6 -0
- package/lib/locales/zh-TW.js +7 -1
- package/lowcode/data-source-form/constants.ts +1 -0
- package/lowcode/data-source-form/utils.ts +16 -4
- package/lowcode/data-source-table/utils.tsx +2 -2
- package/lowcode/form-item-translation/meta.ts +249 -0
- package/lowcode/form-item-translation/snippets.ts +13 -0
- package/lowcode/form-item-upload/meta.ts +11 -0
- package/lowcode/submit-button/meta.ts +10 -0
- package/package.json +1 -1
|
@@ -16,256 +16,35 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// src/components/dataSourceComponents/fields/Upload/utils.
|
|
19
|
+
// src/components/dataSourceComponents/fields/Upload/utils.tsx
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
checkFileCount: () => checkFileCount,
|
|
23
|
+
createMultilingualData: () => createMultilingualData,
|
|
24
|
+
createMultilingualFileList: () => createMultilingualFileList,
|
|
25
|
+
genFileListByString: () => genFileListByString,
|
|
26
|
+
generateUid: () => generateUid,
|
|
27
|
+
getDefaultFileList: () => getDefaultFileList,
|
|
28
|
+
getFileMetadataParams: () => getFileMetadataParams,
|
|
29
|
+
getFileName: () => getFileName,
|
|
23
30
|
getFileType: () => getFileType,
|
|
31
|
+
getMediaMetadata: () => getMediaMetadata,
|
|
24
32
|
getPointSuffix: () => getPointSuffix,
|
|
25
|
-
getPresetTypes: () => getPresetTypes,
|
|
26
33
|
getSuffix: () => getSuffix
|
|
27
34
|
});
|
|
28
35
|
module.exports = __toCommonJS(utils_exports);
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
29
37
|
var import_locales = require("../../../../locales");
|
|
30
|
-
var
|
|
31
|
-
|
|
38
|
+
var import_constants = require("./constants");
|
|
39
|
+
var generateUid = () => {
|
|
40
|
+
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
32
41
|
};
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var presetTypeData = [
|
|
40
|
-
{
|
|
41
|
-
title: "文档",
|
|
42
|
-
key: "documents",
|
|
43
|
-
children: [
|
|
44
|
-
{
|
|
45
|
-
key: "pdf",
|
|
46
|
-
title: "PDF",
|
|
47
|
-
types: [".pdf"],
|
|
48
|
-
color: "red"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
key: "word",
|
|
52
|
-
title: "Word文档",
|
|
53
|
-
types: [".doc", ".docx"],
|
|
54
|
-
color: "blueDark"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
key: "excel",
|
|
58
|
-
title: "Excel工作簿",
|
|
59
|
-
types: [".xls", ".xlsx"],
|
|
60
|
-
color: "green600"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
key: "powerPoint",
|
|
64
|
-
title: "PowerPoint演示文稿",
|
|
65
|
-
types: [".ppt", ".pptx"],
|
|
66
|
-
color: "orangeDark"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
key: "textFile",
|
|
70
|
-
title: "文本文件",
|
|
71
|
-
types: [".txt"],
|
|
72
|
-
color: "gray700"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
key: "richFile",
|
|
76
|
-
title: "富文本格式",
|
|
77
|
-
types: [".rtf"],
|
|
78
|
-
color: "gray500"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
key: "csv",
|
|
82
|
-
title: "CSV",
|
|
83
|
-
types: [".csv"],
|
|
84
|
-
color: "green600"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
title: "图片",
|
|
90
|
-
key: "images",
|
|
91
|
-
children: [
|
|
92
|
-
{
|
|
93
|
-
key: "jpg",
|
|
94
|
-
title: "JPG",
|
|
95
|
-
types: [".jpg", ".jpeg"],
|
|
96
|
-
color: "img"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
key: "png",
|
|
100
|
-
title: "PNG",
|
|
101
|
-
types: [".png"],
|
|
102
|
-
color: "img"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
key: "gif",
|
|
106
|
-
title: "GIF",
|
|
107
|
-
types: [".gif"],
|
|
108
|
-
color: "img"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
key: "bmp",
|
|
112
|
-
title: "BMP",
|
|
113
|
-
types: [".bmp"],
|
|
114
|
-
color: "img"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
key: "tiff",
|
|
118
|
-
title: "TIFF",
|
|
119
|
-
types: ["tif", ".tiff"],
|
|
120
|
-
color: "img"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
key: "svg",
|
|
124
|
-
title: "SVG",
|
|
125
|
-
types: [".svg"],
|
|
126
|
-
color: "img"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
key: "webp",
|
|
130
|
-
title: "WEBP",
|
|
131
|
-
types: [".webp"],
|
|
132
|
-
color: "img"
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
title: "音频",
|
|
138
|
-
key: "audio",
|
|
139
|
-
children: [
|
|
140
|
-
{
|
|
141
|
-
key: "mp3",
|
|
142
|
-
title: "MP3",
|
|
143
|
-
types: [".mp3"],
|
|
144
|
-
color: "pink600"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: "wav",
|
|
148
|
-
title: "WAV",
|
|
149
|
-
types: [".wav"],
|
|
150
|
-
color: "pink600"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
key: "flac",
|
|
154
|
-
title: "FLAC",
|
|
155
|
-
color: "pink600",
|
|
156
|
-
types: [".flac"]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
key: "aac",
|
|
160
|
-
title: "AAC",
|
|
161
|
-
color: "pink600",
|
|
162
|
-
types: [".aac", ".m4a"]
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
key: "ogg",
|
|
166
|
-
title: "OGG",
|
|
167
|
-
types: [".ogg"],
|
|
168
|
-
color: "pink600"
|
|
169
|
-
}
|
|
170
|
-
]
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
title: "视频",
|
|
174
|
-
key: "video",
|
|
175
|
-
children: [
|
|
176
|
-
{
|
|
177
|
-
key: "mp4",
|
|
178
|
-
title: "MP4",
|
|
179
|
-
types: [".mp4"],
|
|
180
|
-
color: "blueDark"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
key: "avi",
|
|
184
|
-
title: "AVI",
|
|
185
|
-
types: [".avi"],
|
|
186
|
-
color: "blueDark"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
key: "mkv",
|
|
190
|
-
title: "MKV",
|
|
191
|
-
types: [".mkv"],
|
|
192
|
-
color: "blueDark"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
key: "mov",
|
|
196
|
-
title: "MOV",
|
|
197
|
-
types: [".mov"],
|
|
198
|
-
color: "blueDark"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
key: "wmv",
|
|
202
|
-
title: "WMV",
|
|
203
|
-
types: [".wmv"],
|
|
204
|
-
color: "blueDark"
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
key: "flv",
|
|
208
|
-
title: "FLV",
|
|
209
|
-
types: [".flv"],
|
|
210
|
-
color: "blueDark"
|
|
211
|
-
}
|
|
212
|
-
]
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
title: "压缩文件",
|
|
216
|
-
key: "compressedFiles",
|
|
217
|
-
children: [
|
|
218
|
-
{
|
|
219
|
-
key: "zip",
|
|
220
|
-
title: "ZIP",
|
|
221
|
-
types: [".zip"],
|
|
222
|
-
color: "gray700"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
key: "rar",
|
|
226
|
-
title: "RAR",
|
|
227
|
-
types: [".rar"],
|
|
228
|
-
color: "gray700"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
key: "7z",
|
|
232
|
-
title: "7Z",
|
|
233
|
-
types: [".7z"],
|
|
234
|
-
color: "gray700"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
key: "tar",
|
|
238
|
-
title: "TAR",
|
|
239
|
-
types: [".tar"],
|
|
240
|
-
color: "gray700"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
key: "gz",
|
|
244
|
-
title: "GZ",
|
|
245
|
-
types: [".gz"],
|
|
246
|
-
color: "gray700"
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
}
|
|
250
|
-
];
|
|
251
|
-
var allChildren = presetTypeData.map((item) => item.children).flat(1);
|
|
252
|
-
var presetTypeMap = allChildren.reduce(
|
|
253
|
-
(pre, cur) => {
|
|
254
|
-
return {
|
|
255
|
-
...pre,
|
|
256
|
-
[cur.key]: cur.types
|
|
257
|
-
};
|
|
258
|
-
},
|
|
259
|
-
{}
|
|
260
|
-
);
|
|
261
|
-
var getPresetTypes = (presetTypes) => {
|
|
262
|
-
if (!presetTypes)
|
|
263
|
-
return [];
|
|
264
|
-
const types = [];
|
|
265
|
-
presetTypes.forEach((item) => {
|
|
266
|
-
types.push(...presetTypeMap[item] || []);
|
|
267
|
-
});
|
|
268
|
-
return types;
|
|
42
|
+
var getSuffix = (name) => name.split(".").pop() || "";
|
|
43
|
+
var getPointSuffix = (name) => `.${getSuffix(name)}`;
|
|
44
|
+
var getFileType = (name) => getPointSuffix(getSuffix(name));
|
|
45
|
+
var getFileName = (url) => {
|
|
46
|
+
const parts = url.split("/");
|
|
47
|
+
return parts[parts.length - 1] || "";
|
|
269
48
|
};
|
|
270
49
|
var checkFileCount = ({
|
|
271
50
|
multiple,
|
|
@@ -273,28 +52,202 @@ var checkFileCount = ({
|
|
|
273
52
|
maxCount,
|
|
274
53
|
valueLength
|
|
275
54
|
}) => {
|
|
276
|
-
if (multiple)
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
55
|
+
if (!multiple)
|
|
56
|
+
return { success: true };
|
|
57
|
+
if (minCount === maxCount && valueLength !== minCount) {
|
|
58
|
+
return {
|
|
59
|
+
success: false,
|
|
60
|
+
message: (0, import_locales.getText)("pisell-upload-count-error")(minCount)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (minCount !== maxCount && (valueLength < minCount || valueLength > maxCount)) {
|
|
64
|
+
return {
|
|
65
|
+
success: false,
|
|
66
|
+
message: (0, import_locales.getText)("pisell-upload-count-error")(`${minCount}-${maxCount}`)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return { success: true };
|
|
70
|
+
};
|
|
71
|
+
var createVideoMetadata = async (file) => {
|
|
72
|
+
return new Promise((resolve) => {
|
|
73
|
+
const video = document.createElement("video");
|
|
74
|
+
const canvas = document.createElement("canvas");
|
|
75
|
+
video.preload = "metadata";
|
|
76
|
+
let hasMetadata = false;
|
|
77
|
+
let hasSeeked = false;
|
|
78
|
+
const tryResolve = () => {
|
|
79
|
+
if (!hasMetadata || !hasSeeked)
|
|
80
|
+
return;
|
|
81
|
+
canvas.width = video.videoWidth;
|
|
82
|
+
canvas.height = video.videoHeight;
|
|
83
|
+
const ctx = canvas.getContext("2d");
|
|
84
|
+
ctx == null ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
85
|
+
canvas.toBlob(
|
|
86
|
+
(blob) => {
|
|
87
|
+
const metadata = {
|
|
88
|
+
width: video.videoWidth,
|
|
89
|
+
height: video.videoHeight,
|
|
90
|
+
duration: video.duration,
|
|
91
|
+
bitrate: file.size / video.duration
|
|
92
|
+
};
|
|
93
|
+
if (blob) {
|
|
94
|
+
metadata.cover = new File([blob], `${file.name}-cover.jpg`, {
|
|
95
|
+
type: import_constants.IMAGE_TYPE
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
URL.revokeObjectURL(video.src);
|
|
99
|
+
resolve(metadata);
|
|
100
|
+
},
|
|
101
|
+
import_constants.IMAGE_TYPE,
|
|
102
|
+
import_constants.IMAGE_QUALITY
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
video.onloadedmetadata = () => {
|
|
106
|
+
hasMetadata = true;
|
|
107
|
+
tryResolve();
|
|
108
|
+
};
|
|
109
|
+
video.onseeked = () => {
|
|
110
|
+
hasSeeked = true;
|
|
111
|
+
tryResolve();
|
|
112
|
+
};
|
|
113
|
+
video.src = URL.createObjectURL(file);
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
var createAudioMetadata = async (file) => {
|
|
117
|
+
return new Promise((resolve) => {
|
|
118
|
+
const audio = document.createElement("audio");
|
|
119
|
+
audio.preload = "metadata";
|
|
120
|
+
audio.src = URL.createObjectURL(file);
|
|
121
|
+
audio.onloadedmetadata = () => {
|
|
122
|
+
URL.revokeObjectURL(audio.src);
|
|
123
|
+
resolve({
|
|
124
|
+
duration: audio.duration,
|
|
125
|
+
bitrate: file.size / audio.duration
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
var getMediaMetadata = async (file) => {
|
|
131
|
+
if (file.type.startsWith(import_constants.MEDIA_TYPES.VIDEO)) {
|
|
132
|
+
return createVideoMetadata(file);
|
|
133
|
+
}
|
|
134
|
+
if (file.type.startsWith(import_constants.MEDIA_TYPES.AUDIO)) {
|
|
135
|
+
return createAudioMetadata(file);
|
|
288
136
|
}
|
|
137
|
+
return null;
|
|
138
|
+
};
|
|
139
|
+
var genFileListByString = (value) => {
|
|
140
|
+
if (!value)
|
|
141
|
+
return [];
|
|
142
|
+
return [{
|
|
143
|
+
uid: generateUid(),
|
|
144
|
+
name: getFileName(value),
|
|
145
|
+
status: "done",
|
|
146
|
+
url: value
|
|
147
|
+
}];
|
|
148
|
+
};
|
|
149
|
+
var createMultilingualData = (value) => {
|
|
150
|
+
return import_constants.SUPPORTED_LANGUAGES.reduce((acc, lang) => {
|
|
151
|
+
acc[lang] = value;
|
|
152
|
+
return acc;
|
|
153
|
+
}, {});
|
|
154
|
+
};
|
|
155
|
+
var createMultilingualFileList = (value) => {
|
|
156
|
+
return import_constants.SUPPORTED_LANGUAGES.reduce((acc, lang) => {
|
|
157
|
+
acc[lang] = genFileListByString(value);
|
|
158
|
+
return acc;
|
|
159
|
+
}, {});
|
|
160
|
+
};
|
|
161
|
+
var handleMultilingualSingleFile = (value, index = 1) => ({
|
|
162
|
+
uid: `-${index}`,
|
|
163
|
+
name: getFileName(value),
|
|
164
|
+
status: "done",
|
|
165
|
+
url: value,
|
|
166
|
+
multilingualFileList: createMultilingualFileList(value),
|
|
167
|
+
multilingual: createMultilingualData(value)
|
|
168
|
+
});
|
|
169
|
+
var handleMultilingualObject = (value, index = 1) => {
|
|
170
|
+
const defaultUrl = value.original || value.en || value["zh-CN"] || value["zh-HK"];
|
|
289
171
|
return {
|
|
290
|
-
|
|
172
|
+
uid: `-${index}`,
|
|
173
|
+
name: getFileName(defaultUrl),
|
|
174
|
+
status: "done",
|
|
175
|
+
url: defaultUrl,
|
|
176
|
+
multilingual: value,
|
|
177
|
+
multilingualFileList: import_constants.SUPPORTED_LANGUAGES.reduce((acc, lang) => {
|
|
178
|
+
acc[lang] = genFileListByString(value[lang]);
|
|
179
|
+
return acc;
|
|
180
|
+
}, {})
|
|
291
181
|
};
|
|
292
182
|
};
|
|
183
|
+
var getDefaultFileList = (value, options) => {
|
|
184
|
+
if (!value)
|
|
185
|
+
return [];
|
|
186
|
+
if (Object.values(value).filter((item) => !!item).length === 0)
|
|
187
|
+
return [];
|
|
188
|
+
const { enableMultilingual, multiple } = options;
|
|
189
|
+
if (enableMultilingual) {
|
|
190
|
+
if ((0, import_utils.isString)(value)) {
|
|
191
|
+
return [handleMultilingualSingleFile(value)];
|
|
192
|
+
}
|
|
193
|
+
if (Array.isArray(value)) {
|
|
194
|
+
return value.map((item, index) => {
|
|
195
|
+
if ((0, import_utils.isString)(item)) {
|
|
196
|
+
return handleMultilingualSingleFile(item, index);
|
|
197
|
+
}
|
|
198
|
+
if ((0, import_utils.isPlainObject)(item)) {
|
|
199
|
+
return handleMultilingualObject(item, index);
|
|
200
|
+
}
|
|
201
|
+
return [];
|
|
202
|
+
}).flat();
|
|
203
|
+
}
|
|
204
|
+
if ((0, import_utils.isPlainObject)(value)) {
|
|
205
|
+
return [handleMultilingualObject(value)];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (multiple && Array.isArray(value)) {
|
|
209
|
+
return value.map((url, index) => ({
|
|
210
|
+
uid: `-${index}`,
|
|
211
|
+
name: getFileName(url),
|
|
212
|
+
status: "done",
|
|
213
|
+
url
|
|
214
|
+
}));
|
|
215
|
+
}
|
|
216
|
+
if ((0, import_utils.isString)(value)) {
|
|
217
|
+
return [{
|
|
218
|
+
uid: import_constants.DEFAULT_UID,
|
|
219
|
+
name: getFileName(value),
|
|
220
|
+
status: "done",
|
|
221
|
+
url: value
|
|
222
|
+
}];
|
|
223
|
+
}
|
|
224
|
+
return [];
|
|
225
|
+
};
|
|
226
|
+
var getFileMetadataParams = (file) => {
|
|
227
|
+
if (!file.metadata)
|
|
228
|
+
return {};
|
|
229
|
+
const metadataParams = {};
|
|
230
|
+
const metadataKeys = ["width", "height", "duration", "bitrate"];
|
|
231
|
+
metadataKeys.forEach((key) => {
|
|
232
|
+
var _a;
|
|
233
|
+
if (((_a = file.metadata) == null ? void 0 : _a[key]) !== void 0) {
|
|
234
|
+
metadataParams[`metadata[${key}]`] = file.metadata[key];
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
return metadataParams;
|
|
238
|
+
};
|
|
293
239
|
// Annotate the CommonJS export names for ESM import in node:
|
|
294
240
|
0 && (module.exports = {
|
|
295
241
|
checkFileCount,
|
|
242
|
+
createMultilingualData,
|
|
243
|
+
createMultilingualFileList,
|
|
244
|
+
genFileListByString,
|
|
245
|
+
generateUid,
|
|
246
|
+
getDefaultFileList,
|
|
247
|
+
getFileMetadataParams,
|
|
248
|
+
getFileName,
|
|
296
249
|
getFileType,
|
|
250
|
+
getMediaMetadata,
|
|
297
251
|
getPointSuffix,
|
|
298
|
-
getPresetTypes,
|
|
299
252
|
getSuffix
|
|
300
253
|
});
|
|
@@ -32,6 +32,7 @@ declare const formFieldMap: {
|
|
|
32
32
|
FormItemPercent: import("react").FC<any>;
|
|
33
33
|
FormItemTimePicker: import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
34
34
|
'FormItemInput.JSON': import("react").FC<any>;
|
|
35
|
+
'FormItemInput.Phone': import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
35
36
|
'FormItemInput.Email': import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
36
37
|
'FormItemInput.URL': import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
37
38
|
'FormItemInput.Password': import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -39,12 +40,13 @@ declare const formFieldMap: {
|
|
|
39
40
|
'FormItemCheckbox.Group': import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
40
41
|
FormItemDateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
41
42
|
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
43
|
+
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
42
44
|
};
|
|
43
45
|
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
|
|
44
46
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
45
47
|
} & {
|
|
46
48
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
47
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
49
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
48
50
|
JSON: import("react").FC<any>;
|
|
49
51
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
50
52
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -62,5 +64,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
62
64
|
valueField: string;
|
|
63
65
|
} & {
|
|
64
66
|
dataSource?: any;
|
|
65
|
-
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
67
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
66
68
|
export { getFieldComponent, formFieldMap };
|
|
@@ -43,6 +43,7 @@ var import_InputNumber = __toESM(require("./InputNumber"));
|
|
|
43
43
|
var import_TimePicker = __toESM(require("./TimePicker"));
|
|
44
44
|
var import_DateRangePicker = __toESM(require("./DateRangePicker"));
|
|
45
45
|
var import_Upload = __toESM(require("./Upload"));
|
|
46
|
+
var import_Translation = __toESM(require("./Translation"));
|
|
46
47
|
var formFieldMap = {
|
|
47
48
|
FormItemCheckbox: import_Checkbox.default,
|
|
48
49
|
FormItemColorPicker: import_ColorPicker.default,
|
|
@@ -54,13 +55,15 @@ var formFieldMap = {
|
|
|
54
55
|
FormItemPercent: import_InputNumber.default,
|
|
55
56
|
FormItemTimePicker: import_TimePicker.default,
|
|
56
57
|
"FormItemInput.JSON": import_Input.default.JSON,
|
|
58
|
+
"FormItemInput.Phone": import_Input.default.Phone,
|
|
57
59
|
"FormItemInput.Email": import_Input.default.Email,
|
|
58
60
|
"FormItemInput.URL": import_Input.default.URL,
|
|
59
61
|
"FormItemInput.Password": import_Input.default.Password,
|
|
60
62
|
"FormItemRadio.Group": import_Radio.default.Group,
|
|
61
63
|
"FormItemCheckbox.Group": import_Checkbox.default.Group,
|
|
62
64
|
FormItemDateRangePicker: import_DateRangePicker.default,
|
|
63
|
-
FormItemUpload: import_Upload.default
|
|
65
|
+
FormItemUpload: import_Upload.default,
|
|
66
|
+
FormItemTranslation: import_Translation.default
|
|
64
67
|
};
|
|
65
68
|
var getFieldComponent = (fieldComponent) => {
|
|
66
69
|
return formFieldMap[fieldComponent];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/hooks/useTranslationOriginal.ts
|
|
30
|
+
var useTranslationOriginal_exports = {};
|
|
31
|
+
__export(useTranslationOriginal_exports, {
|
|
32
|
+
default: () => useTranslationOriginal_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useTranslationOriginal_exports);
|
|
35
|
+
var import_useEngineContext = __toESM(require("./useEngineContext"));
|
|
36
|
+
var useTranslationOriginal = () => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const context = (0, import_useEngineContext.default)();
|
|
39
|
+
return ((_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.translationOriginal) || ((val) => val == null ? void 0 : val.original);
|
|
40
|
+
};
|
|
41
|
+
var useTranslationOriginal_default = useTranslationOriginal;
|
package/lib/index.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ export { default as FormItemRadio } from './components/dataSourceComponents/fiel
|
|
|
136
136
|
export { default as FormItemSelect } from './components/dataSourceComponents/fields/Select';
|
|
137
137
|
export { default as FormItemTimePicker } from './components/dataSourceComponents/fields/TimePicker';
|
|
138
138
|
export { default as FormItemUpload } from './components/dataSourceComponents/fields/Upload';
|
|
139
|
+
export { default as FormItemTranslation } from './components/dataSourceComponents/fields/Translation';
|
|
139
140
|
export { default as DataSourceTable } from './components/dataSourceComponents/dataSourceTable';
|
|
140
141
|
export { default as DataSourceWrapper } from './components/dataSourceComponents/dataSourceWrapper';
|
|
141
142
|
export { default as DataSourceTypography } from './components/dataSourceComponents/dataSourceShow/dataSourceTypography';
|
package/lib/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __export(src_exports, {
|
|
|
80
80
|
FormItemRadio: () => import_Radio.default,
|
|
81
81
|
FormItemSelect: () => import_Select.default,
|
|
82
82
|
FormItemTimePicker: () => import_TimePicker.default,
|
|
83
|
+
FormItemTranslation: () => import_Translation.default,
|
|
83
84
|
FormItemUpload: () => import_Upload.default,
|
|
84
85
|
Grid: () => import_antd12.Grid,
|
|
85
86
|
Icon: () => import_icon.default,
|
|
@@ -313,6 +314,7 @@ var import_Radio = __toESM(require("./components/dataSourceComponents/fields/Rad
|
|
|
313
314
|
var import_Select = __toESM(require("./components/dataSourceComponents/fields/Select"));
|
|
314
315
|
var import_TimePicker = __toESM(require("./components/dataSourceComponents/fields/TimePicker"));
|
|
315
316
|
var import_Upload = __toESM(require("./components/dataSourceComponents/fields/Upload"));
|
|
317
|
+
var import_Translation = __toESM(require("./components/dataSourceComponents/fields/Translation"));
|
|
316
318
|
var import_dataSourceTable = __toESM(require("./components/dataSourceComponents/dataSourceTable"));
|
|
317
319
|
var import_dataSourceWrapper = __toESM(require("./components/dataSourceComponents/dataSourceWrapper"));
|
|
318
320
|
var import_dataSourceTypography = __toESM(require("./components/dataSourceComponents/dataSourceShow/dataSourceTypography"));
|
|
@@ -371,6 +373,7 @@ var import_dataSourceQRCode = __toESM(require("./components/dataSourceComponents
|
|
|
371
373
|
FormItemRadio,
|
|
372
374
|
FormItemSelect,
|
|
373
375
|
FormItemTimePicker,
|
|
376
|
+
FormItemTranslation,
|
|
374
377
|
FormItemUpload,
|
|
375
378
|
Grid,
|
|
376
379
|
Icon,
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -152,6 +152,11 @@ declare const _default: {
|
|
|
152
152
|
'pisell-upload-setting-type-error': (type: string) => string;
|
|
153
153
|
'pisell-upload-count-error': (count: number) => string;
|
|
154
154
|
'pisell-upload-error': (name: string) => string;
|
|
155
|
+
'pisell-upload-multilingual-title': string;
|
|
156
|
+
'pisell-upload-multilingual-item-title-original': string;
|
|
157
|
+
'pisell-upload-multilingual-item-title-en': string;
|
|
158
|
+
'pisell-upload-multilingual-item-title-zh-CN': string;
|
|
159
|
+
'pisell-upload-multilingual-item-title-zh-HK': string;
|
|
155
160
|
'pisell-color-picker-default': string;
|
|
156
161
|
'pisell-action-get-data': string;
|
|
157
162
|
'pisell-action-delete-failed': string;
|
|
@@ -166,5 +171,6 @@ declare const _default: {
|
|
|
166
171
|
'pisell-delete-confirm-content': string;
|
|
167
172
|
'pisell-delete-confirm-ok': string;
|
|
168
173
|
'pisell-delete-confirm-cancel': string;
|
|
174
|
+
'pisell-translation-original': string;
|
|
169
175
|
};
|
|
170
176
|
export default _default;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -190,6 +190,11 @@ var en_US_default = {
|
|
|
190
190
|
"pisell-upload-setting-type-error": (type) => `${type} file type is not supported for upload.`,
|
|
191
191
|
"pisell-upload-count-error": (count) => `Please upload ${count} file`,
|
|
192
192
|
"pisell-upload-error": (name) => `${name} upload failed`,
|
|
193
|
+
"pisell-upload-multilingual-title": "Multilingual",
|
|
194
|
+
"pisell-upload-multilingual-item-title-original": "Original",
|
|
195
|
+
"pisell-upload-multilingual-item-title-en": "English",
|
|
196
|
+
"pisell-upload-multilingual-item-title-zh-CN": "简体中文",
|
|
197
|
+
"pisell-upload-multilingual-item-title-zh-HK": "繁體中文",
|
|
193
198
|
// 颜色组件
|
|
194
199
|
"pisell-color-picker-default": "Default",
|
|
195
200
|
// 获取数据
|
|
@@ -206,5 +211,7 @@ var en_US_default = {
|
|
|
206
211
|
"pisell-delete-confirm-title": "Confirm Delete",
|
|
207
212
|
"pisell-delete-confirm-content": "Are you sure you want to delete this record?",
|
|
208
213
|
"pisell-delete-confirm-ok": "OK",
|
|
209
|
-
"pisell-delete-confirm-cancel": "Cancel"
|
|
214
|
+
"pisell-delete-confirm-cancel": "Cancel",
|
|
215
|
+
"pisell-design-mode-action-disabled": "This operation is not allowed in edit mode",
|
|
216
|
+
"pisell-translation-original": "Original"
|
|
210
217
|
};
|