@cloudbase/weda-ui 3.17.0 → 3.17.2
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/configs/components/wd-ad.d.ts +6 -1
- package/dist/configs/components/wd-ad.js +8 -1
- package/dist/configs/components/wd-table.d.ts +1 -1
- package/dist/configs/components/wd-table.js +1 -1
- package/dist/configs/components/wd-upload-image.d.ts +15 -3
- package/dist/configs/components/wd-upload-image.js +19 -1
- package/dist/configs/components/web-view.js +1 -1
- package/dist/configs/index.d.ts +34 -8
- package/dist/style/weda-ui.min.css +1 -1
- package/dist/web/components/richText/index.js +3 -1
- package/dist/web/components/wd-form/hooks/use-remote-value.js +18 -18
- package/dist/web/components/wd-modal/wd-modal.js +10 -13
- package/dist/web/components/wd-table/components/FieldRender/index.js +1 -11
- package/dist/web/components/wd-table/utils/index.js +14 -35
- package/package.json +2 -2
|
@@ -29,7 +29,12 @@ declare const config: {
|
|
|
29
29
|
readonly selector: ".wd-mp-ad";
|
|
30
30
|
readonly description: "可以为小程序端的广告编写样式";
|
|
31
31
|
}];
|
|
32
|
-
readonly methods: readonly [
|
|
32
|
+
readonly methods: readonly [{
|
|
33
|
+
readonly name: "show";
|
|
34
|
+
readonly label: "显示激励视频广告";
|
|
35
|
+
readonly 'x-platforms': readonly ["MP"];
|
|
36
|
+
readonly description: "显示激励视频广告。激励视频广告将从屏幕下方推入。";
|
|
37
|
+
}];
|
|
33
38
|
readonly events: readonly [{
|
|
34
39
|
readonly name: "load";
|
|
35
40
|
readonly title: "广告加载成功";
|
|
@@ -98,7 +98,14 @@ const config = defineConfig({
|
|
|
98
98
|
description: '可以为小程序端的广告编写样式',
|
|
99
99
|
},
|
|
100
100
|
],
|
|
101
|
-
methods: [
|
|
101
|
+
methods: [
|
|
102
|
+
{
|
|
103
|
+
name: 'show',
|
|
104
|
+
label: '显示激励视频广告',
|
|
105
|
+
'x-platforms': ['MP'],
|
|
106
|
+
description: '显示激励视频广告。激励视频广告将从屏幕下方推入。',
|
|
107
|
+
},
|
|
108
|
+
],
|
|
102
109
|
events: [
|
|
103
110
|
{ name: 'load', title: '广告加载成功', 'x-platforms': ['MP'] },
|
|
104
111
|
{ name: 'error', title: '广告加载失败', 'x-platforms': ['MP'] },
|
|
@@ -373,7 +373,7 @@ declare const config: {
|
|
|
373
373
|
recordIndex: import("@sinclair/typebox").TNumber;
|
|
374
374
|
columnIndex: import("@sinclair/typebox").TNumber;
|
|
375
375
|
}>;
|
|
376
|
-
readonly description: "
|
|
376
|
+
readonly description: "点击表格某一列时触发";
|
|
377
377
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
378
378
|
}, {
|
|
379
379
|
readonly title: "选中行改变";
|
|
@@ -62,7 +62,11 @@ declare const uploadInstance: import("@sinclair/typebox").TObject<{
|
|
|
62
62
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
63
63
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
64
64
|
}>>;
|
|
65
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
65
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
66
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
67
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
68
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
69
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
66
70
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
67
71
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
68
72
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -151,7 +155,11 @@ declare const config: {
|
|
|
151
155
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
152
156
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
153
157
|
}>>;
|
|
154
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
158
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
159
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
160
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
161
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
162
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
155
163
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
156
164
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
157
165
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -258,7 +266,11 @@ declare const config: {
|
|
|
258
266
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
259
267
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
260
268
|
}>>;
|
|
261
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
269
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
270
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
271
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
272
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
273
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
262
274
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
263
275
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
264
276
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -170,7 +170,25 @@ const uploadInstanceConfig = Type.Partial(Type.Composite([
|
|
|
170
170
|
}));
|
|
171
171
|
const uploadInstance = Type.Partial(Type.Object({
|
|
172
172
|
config: uploadInstanceConfig,
|
|
173
|
-
beforeUpload: Type.
|
|
173
|
+
beforeUpload: Type.Function([
|
|
174
|
+
Type.Object({
|
|
175
|
+
files: Type.Optional(Type.Array(Type.Unknown({
|
|
176
|
+
title: 'file 对象',
|
|
177
|
+
'x-platforms': ['WEB', 'MOBILEWEB', 'PCWEB'],
|
|
178
|
+
}))),
|
|
179
|
+
base64Uri: Type.Optional(Type.Array(Type.String({
|
|
180
|
+
title: 'base64',
|
|
181
|
+
}), {
|
|
182
|
+
'x-platforms': ['WEB', 'MOBILEWEB', 'PCWEB'],
|
|
183
|
+
})),
|
|
184
|
+
tmpFilePaths: Type.Optional(Type.Array(Type.String({
|
|
185
|
+
title: '图片临时地址',
|
|
186
|
+
}), { 'x-platforms': ['MP'] })),
|
|
187
|
+
}),
|
|
188
|
+
], Type.Any(), {
|
|
189
|
+
title: '上传前处理函数',
|
|
190
|
+
required: false,
|
|
191
|
+
}),
|
|
174
192
|
onUploadProgress: Type.Function([previewFileItem], Type.Any(), {
|
|
175
193
|
title: '上传过程中',
|
|
176
194
|
}),
|
|
@@ -8,7 +8,7 @@ const data = Type.Object({
|
|
|
8
8
|
required: true,
|
|
9
9
|
'x-index': 10,
|
|
10
10
|
'x-category': '基础属性',
|
|
11
|
-
'x-helper-text': `小程序端以真机调试效果为准。除关联公众号文章链接外,其他链接需配置业务域名才可生效,[
|
|
11
|
+
'x-helper-text': `小程序端以真机调试效果为准。除关联公众号文章链接外,其他链接需配置业务域名才可生效,[详情参考](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/super/WebView#%E4%B8%9A%E5%8A%A1%E5%9F%9F%E5%90%8D%E9%85%8D%E7%BD%AE)`,
|
|
12
12
|
}),
|
|
13
13
|
allow: Type.String({
|
|
14
14
|
title: 'allow',
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -1612,7 +1612,12 @@ export declare const components: {
|
|
|
1612
1612
|
readonly selector: ".wd-mp-ad";
|
|
1613
1613
|
readonly description: "可以为小程序端的广告编写样式";
|
|
1614
1614
|
}];
|
|
1615
|
-
readonly methods: readonly [
|
|
1615
|
+
readonly methods: readonly [{
|
|
1616
|
+
readonly name: "show";
|
|
1617
|
+
readonly label: "显示激励视频广告";
|
|
1618
|
+
readonly 'x-platforms': readonly ["MP"];
|
|
1619
|
+
readonly description: "显示激励视频广告。激励视频广告将从屏幕下方推入。";
|
|
1620
|
+
}];
|
|
1616
1621
|
readonly events: readonly [{
|
|
1617
1622
|
readonly name: "load";
|
|
1618
1623
|
readonly title: "广告加载成功";
|
|
@@ -11758,7 +11763,7 @@ export declare const components: {
|
|
|
11758
11763
|
recordIndex: import("@sinclair/typebox").TNumber;
|
|
11759
11764
|
columnIndex: import("@sinclair/typebox").TNumber;
|
|
11760
11765
|
}>;
|
|
11761
|
-
readonly description: "
|
|
11766
|
+
readonly description: "点击表格某一列时触发";
|
|
11762
11767
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
11763
11768
|
}, {
|
|
11764
11769
|
readonly title: "选中行改变";
|
|
@@ -15454,7 +15459,11 @@ export declare const components: {
|
|
|
15454
15459
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15455
15460
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15456
15461
|
}>>;
|
|
15457
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
15462
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
15463
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
15464
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
15465
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
15466
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
15458
15467
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
15459
15468
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
15460
15469
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -15561,7 +15570,11 @@ export declare const components: {
|
|
|
15561
15570
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15562
15571
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15563
15572
|
}>>;
|
|
15564
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
15573
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
15574
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
15575
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
15576
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
15577
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
15565
15578
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
15566
15579
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
15567
15580
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -21051,7 +21064,12 @@ declare const _default: {
|
|
|
21051
21064
|
readonly selector: ".wd-mp-ad";
|
|
21052
21065
|
readonly description: "可以为小程序端的广告编写样式";
|
|
21053
21066
|
}];
|
|
21054
|
-
readonly methods: readonly [
|
|
21067
|
+
readonly methods: readonly [{
|
|
21068
|
+
readonly name: "show";
|
|
21069
|
+
readonly label: "显示激励视频广告";
|
|
21070
|
+
readonly 'x-platforms': readonly ["MP"];
|
|
21071
|
+
readonly description: "显示激励视频广告。激励视频广告将从屏幕下方推入。";
|
|
21072
|
+
}];
|
|
21055
21073
|
readonly events: readonly [{
|
|
21056
21074
|
readonly name: "load";
|
|
21057
21075
|
readonly title: "广告加载成功";
|
|
@@ -31197,7 +31215,7 @@ declare const _default: {
|
|
|
31197
31215
|
recordIndex: import("@sinclair/typebox").TNumber;
|
|
31198
31216
|
columnIndex: import("@sinclair/typebox").TNumber;
|
|
31199
31217
|
}>;
|
|
31200
|
-
readonly description: "
|
|
31218
|
+
readonly description: "点击表格某一列时触发";
|
|
31201
31219
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
31202
31220
|
}, {
|
|
31203
31221
|
readonly title: "选中行改变";
|
|
@@ -34893,7 +34911,11 @@ declare const _default: {
|
|
|
34893
34911
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
34894
34912
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
34895
34913
|
}>>;
|
|
34896
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
34914
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
34915
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
34916
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
34917
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
34918
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
34897
34919
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
34898
34920
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
34899
34921
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -35000,7 +35022,11 @@ declare const _default: {
|
|
|
35000
35022
|
accepts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
35001
35023
|
customUploadPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
35002
35024
|
}>>;
|
|
35003
|
-
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
35025
|
+
beforeUpload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
35026
|
+
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
|
|
35027
|
+
base64Uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
35028
|
+
tmpFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
35029
|
+
}>], import("@sinclair/typebox").TAny>>;
|
|
35004
35030
|
onUploadProgress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TObject<{
|
|
35005
35031
|
progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
35006
35032
|
loading: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
@cloudbase/weda-ui v3.17.
|
|
2
|
+
@cloudbase/weda-ui v3.17.2
|
|
3
3
|
*/
|
|
4
4
|
@charset "UTF-8";@media (min-width:1024px){.weda-ui .weui-cells{font-size:1em}.weui .weui-cell_active:active{background-color:unset!important}}@font-face{font-family:lcap-icon;font-weight:400;font-style:normal;src:url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAkMAA0AAAAAFZgAAAi1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCXhEICpxYlmoLTgABNgIkA1gEIAWDMweDBRtzEVGUTVKf7GdCpjLGY/HIYGvbDpn6q7Qdj3xvUaZJUNFads3M7geYVSSiCgsZJYFkhEfn2DjU9//jpn8D1QTqVBQqSrtAVZAq1bwkpTOo0Hbz2tnYfkP3ZzAxpv6ZiSFf3OHh8/b+/oqzxIt4QmFX5ImmIe0SWAOEOJL2n9ZSO5PcCwErnTjzLxOYud0Az24IS8AOXSWgBtyL2lbFtkKxMAhSoPNdlrMFakJqTjuamX+3E3teqiTm6/UpPkH213oLGNahKuAtpQ0wbERrXcnzO1bBpK388B4D6I5fCT9kh69EbSy65RKsi/26+7qKtJv2oREq98FIbnbJO3TaMjBjPcwtqFDG9qp0XxcX/7ndSrUHxotP16TcVrHOGHgIM0PwK6JIMvN/BgpiRTDc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iSCSMhV8TToMmywXB/GhkcF5ziw45OB87l85aUMFg0NLu2/zrqV/BH9vE5gRJkaL8IilGuqC03JjHIZdlQAzgqTSpcqAx7mVejwNSGWWs4aGlmhqdGjnCFPBYAqTFrMVhmw/tErzDrt1E1nqkx9Os0wHbxR48t8+rYA9icsgyFzkc5s8Ne9hwCEXWH8WM82YAhjUzGZLCR46/+MZFkk2djoLT1IzKCbi3WV1hnUrcvSm+MZtRSpiYWanQU+67DN62G7tnPGP8h5DgBGvMgjgCILl0eQyJQoo5wKKqmimhpqqSOQIIIJQUQoYYQTQSRRRBNDLHGIkRBPAonZMHXOzF6Z99D0PpIk80xVIUlCBjmykYNc5CEfBShEJaqggBIqjzpSRkIGObKRg1zkIR8FKEQlqqCAEiqPulNOAgAA) format('woff2')}.wd-form--vertical-left .wedatea2td-form .weda-formcells__pc.horizontal,.wd-form--vertical-right .wedatea2td-form .weda-formcells__pc.horizontal,.wedatea2td-form--vertical .wd-form--horizontal-left .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form--horizontal-right .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form-item.wd-form-item--horizontal-left .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form-item.wd-form-item--horizontal-right .wd-form-item-wrap,.wedatea2td-form--vertical .wedatea2td-form .weda-formcells__pc.horizontal{flex-direction:column}.g-swiper-item>div>*{max-width:100%;max-height:100%;object-fit:cover;max-width:100%;object-fit:cover;max-width:100%;max-height:100%;object-fit:cover;width:100%;height:auto;max-width:100%;object-fit:cover}.form-detail-wrap .form-detail-content-wrap .form-detail-group-header-container{display:flex;align-items:center;justify-content:space-between}.weda-graphic-card .weda-graphic-card__col .weda-graphic-card__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weda-graphic-card .weda-graphic-card__col .weda-graphic-card__desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weda-menu .wedatea2td-menu--light .wedatea2td-menu__list li.is-selected>.wedatea2td-menu__item:hover,.wedatea2td-drawer .wedatea2td-menu--light .wedatea2td-menu__list li .wedatea2td-menu__item:hover{background-color:var(--weda-navigation-menu-hover-color)}.weda-menu-mobile .weda-menu__wrapper{display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 2px rgba(0,0,0,.05)}.weda-menu .wedatea2td-menu__text .menu-text,.weda-menu__drawer .wedatea2td-menu__text .menu-text{display:flex;justify-content:center;align-items:center}@media (max-width:1024px){.g-swiper .g-swiper__turn-next,.g-swiper .g-swiper__turn-pre{display:none}.modal-table-delete .wedatea2td-dialog__inner,.model-relation-selector-modal .wedatea2td-dialog__inner,.wedatea2td-dialog__inner{min-width:0;width:90%;margin:10px 0}.wedatea2td-form.model-form{width:100%}}.markdown-body .octicon{fill:currentColor}.markdown-body pre{word-wrap:normal}.wd-form-item.wd-pc-rich-text-root .ExEditor-basic,.wd-form-item.wd-pc-rich-text-root .exeditor-toolbar{background-color:inherit}.wd-add-relation-button-wrap{display:flex;align-items:center;color:var(--wd-color-brand,#0052d9);white-space:pre-wrap}.weda-import-csv-file-modal .file-json-map-wrap{display:flex;flex-direction:column;box-sizing:border-box}.weda-import-csv-file-modal .import-file-result-wrap .error-container{display:flex;flex-direction:column}.weda-import-csv-file-modal .import-file-result-wrap .error-content{flex:1}.wd-table-wrap-filter .wedatea2td-input:focus,.wd-table-wrap-filter .wedatea2td-input:hover,.wd-table-wrap-filter .wedatea2td-textarea-group:focus,.wd-table-wrap-filter .wedatea2td-textarea-group:hover,.wd-table-wrap-filter .wedatea2td-textarea:focus,.wd-table-wrap-filter .wedatea2td-textarea:hover,.wedatea2td-overlay .wedatea2td-checkbox:focus,.wedatea2td-overlay .wedatea2td-checkbox:hover,.wedatea2td-overlay input[type=checkbox]:focus,.wedatea2td-overlay input[type=checkbox]:hover{border-color:var(--wd-color-brand,#0052d9)}.weda-ui_mapChoose_search_input_clear{display:flex;justify-content:center}.form-select-map .wedatea2td-dialog__inner{box-shadow:none;min-width:100vw!important}.weda-ui-custom-calendar-op__end,.weda-ui-custom-calendar-op__start{display:flex;align-items:center}.weui-tag span{word-wrap:break-word;word-break:break-word}.weda-ui-user-select-container-list__start .depart-tree .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content,.weda-ui-user-select-container-list__start .depart-tree .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content .wedatea2td-tree__label,.weda-ui-user-select-container-list__start .wedatea2td-tree.wedatea2td-tree--checkbox-separate .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content .wedatea2td-tree__label .wedatea2td-tree__label-title{background-color:var(--wd-color-brand-light,#d4e3fc)}.weda-select-user-dept-breadcrumb{display:flex;align-items:center}.form-location-con_disabled{opacity:.4}body{font-size:var(--wd-font-base)}@font-face{font-family:wd-lcap-icon;font-weight:400;font-style:normal;src:url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAkMAA0AAAAAFZgAAAi1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCXhEICpxYlmoLTgABNgIkA1gEIAWDMweDBRtzEVGUTVKf7GdCpjLGY/HIYGvbDpn6q7Qdj3xvUaZJUNFads3M7geYVSSiCgsZJYFkhEfn2DjU9//jpn8D1QTqVBQqSrtAVZAq1bwkpTOo0Hbz2tnYfkP3ZzAxpv6ZiSFf3OHh8/b+/oqzxIt4QmFX5ImmIe0SWAOEOJL2n9ZSO5PcCwErnTjzLxOYud0Az24IS8AOXSWgBtyL2lbFtkKxMAhSoPNdlrMFakJqTjuamX+3E3teqiTm6/UpPkH213oLGNahKuAtpQ0wbERrXcnzO1bBpK388B4D6I5fCT9kh69EbSy65RKsi/26+7qKtJv2oREq98FIbnbJO3TaMjBjPcwtqFDG9qp0XxcX/7ndSrUHxotP16TcVrHOGHgIM0PwK6JIMvN/BgpiRTDc/CFwhO+x7ZDYI/ONMoO4NDIX3PYHqpDAWg0a1byp4P4j3ft6fX2jqrvbO6bLU5gtI53w8U4ueG4vS7h0Ze7t9hJUld5xMnw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WWs4aGlmhqdGjnCFPBYAqTFrMVhmw/tErzDrt1E1nqkx9Os0wHbxR48t8+rYA9icsgyFzkc5s8Ne9hwCEXWH8WM82YAhjUzGZLCR46/+MZFkk2djoLT1IzKCbi3WV1hnUrcvSm+MZtRSpiYWanQU+67DN62G7tnPGP8h5DgBGvMgjgCILl0eQyJQoo5wKKqmimhpqqSOQIIIJQUQoYYQTQSRRRBNDLHGIkRBPAonZMHXOzF6Z99D0PpIk80xVIUlCBjmykYNc5CEfBShEJaqggBIqjzpSRkIGObKRg1zkIR8FKEQlqqCAEiqPulNOAgAA) format("woff2")}.t-icon{speak:none;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wd-space-align-items--flex-start{align-items:flex-start;align-items:center;align-items:flex-end}.wd-space-justify-content--flex-start{justify-content:flex-start;justify-content:center;justify-content:flex-end}.wd-btn{--wd-btn-sm-padding:0.0625rem calc(var(--wd-space-base) * 2);--wd-btn-md-padding:0.25rem calc(var(--wd-space-base) * 4);--wd-btn-lg-padding:0.4375rem calc(var(--wd-space-base) * 6);--wd-btn-margin-top:0;--wd-btn-margin-top:0;--wd-btn-font-size-sm:var(--wd-font-size-2);--wd-btn-line-height-sm:1.5;--wd-btn-min-height-sm:24px;--wd-btn-font-size-md:var(--wd-font-size-3);--wd-btn-line-height-md:1.5;--wd-btn-min-height-md:32px;--wd-btn-font-size-lg:var(--wd-font-size-4);--wd-btn-line-height-lg:1.5;--wd-btn-min-height-lg:40px;--wd-btn-icon-space-sm:var(--wd-space-base);--wd-btn-icon-space-md:calc(var(--wd-space-base) * 2);--wd-btn-icon-space-lg:calc(var(--wd-space-base) * 3);--wd-btn-icon-size-sm:calc(var(--wd-btn-font-size-sm) + 0.125rem);--wd-btn-icon-size-md:calc(var(--wd-btn-font-size-md) + 0.125rem);--wd-btn-icon-size-lg:calc(var(--wd-btn-font-size-lg) + 0.25rem);--wd-btn-border-radius:var(--wd-border-radius);--wd-btn-color-text:var(--wd-color-text-default);--wd-btn-color-text-inverse:var(--wd-color-text-inverse);--wd-btn-color-text-hover:var(--wd-color-text-default);--wd-btn-color-text-active:var(--wd-color-text-default);--wd-btn-color-text-focus:var(--wd-color-text-default);--wd-btn-color-text-disabled:var(--wd-color-text-disabled);--wd-btn-color-brand:var(--wd-color-brand);--wd-btn-color-brand-hover:var(--wd-color-brand-hover);--wd-btn-color-brand-active:var(--wd-color-brand-active);--wd-btn-color-brand-focus:var(--wd-color-brand-focus);--wd-btn-color-brand-disabled:var(--wd-color-brand-disabled);--wd-btn-color-warning:var(--wd-color-warning);--wd-btn-color-warning-hover:var(--wd-color-warning-hover);--wd-btn-color-warning-active:var(--wd-color-warning-active);--wd-btn-color-warning-focus:var(--wd-color-warning-focus);--wd-btn-color-warning-disabled:var(--wd-color-warning-disabled);--wd-btn-color-error:var(--wd-color-error);--wd-btn-color-error-hover:var(--wd-color-error-hover);--wd-btn-color-error-active:var(--wd-color-error-active);--wd-btn-color-error-focus:var(--wd-color-error-focus);--wd-btn-color-error-disabled:var(--wd-color-error-disabled);--wd-btn-color-gray:var(
|
|
5
5
|
--wd-color-gray-1
|
|
@@ -68,6 +68,7 @@ initialContent, placeholder, iconPack, maxSize, cloudPath, visible, }) {
|
|
|
68
68
|
'is-disabled': disabled,
|
|
69
69
|
'is-readonly': readOnly,
|
|
70
70
|
});
|
|
71
|
+
const [ready, setReady] = React.useState(false);
|
|
71
72
|
const [, setRandomId] = React.useState('');
|
|
72
73
|
const [editorHeight, setEditorHeight] = React.useState(0);
|
|
73
74
|
const [syncedValue] = useSyncValue(xss(value, getWhitelist()));
|
|
@@ -266,6 +267,7 @@ initialContent, placeholder, iconPack, maxSize, cloudPath, visible, }) {
|
|
|
266
267
|
setEditorHeight(((_a = toolbarDomRef === null || toolbarDomRef === void 0 ? void 0 : toolbarDomRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0);
|
|
267
268
|
});
|
|
268
269
|
ref.current.editor = editor;
|
|
270
|
+
setReady(true);
|
|
269
271
|
return () => {
|
|
270
272
|
editor.destroy();
|
|
271
273
|
};
|
|
@@ -316,7 +318,7 @@ initialContent, placeholder, iconPack, maxSize, cloudPath, visible, }) {
|
|
|
316
318
|
}
|
|
317
319
|
}, 0);
|
|
318
320
|
}
|
|
319
|
-
}, [syncedValue, ref.current.editor]);
|
|
321
|
+
}, [syncedValue, ref.current.editor, ready]);
|
|
320
322
|
React.useEffect(() => {
|
|
321
323
|
var _a;
|
|
322
324
|
setEditorHeight(((_a = toolbarDomRef === null || toolbarDomRef === void 0 ? void 0 : toolbarDomRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0);
|
|
@@ -49,7 +49,7 @@ methodGetItem, paramGetItem, appCloud, isDataModel, allSelectFields = emptyObjec
|
|
|
49
49
|
}
|
|
50
50
|
return true;
|
|
51
51
|
}, [_id, dataSourceName, formType, isDataModel, methodGetItem, paramGetItem]);
|
|
52
|
-
const { querySuccess: triggerQuerySuccessEvent, queryEmpty, queryFail
|
|
52
|
+
const { querySuccess: triggerQuerySuccessEvent, queryEmpty, queryFail } = eventsRef.current;
|
|
53
53
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers -- 试了一下大概300 -400毫秒
|
|
54
54
|
const querySuccess = useDebouncedCallback(triggerQuerySuccessEvent, 500);
|
|
55
55
|
const { data: remoteValue, error, isLoading, mutate, } = useSWR(() => {
|
|
@@ -83,7 +83,7 @@ methodGetItem, paramGetItem, appCloud, isDataModel, allSelectFields = emptyObjec
|
|
|
83
83
|
};
|
|
84
84
|
}, async (params) => {
|
|
85
85
|
var _a, _b, _c, _d;
|
|
86
|
-
const { dataSourceName, _id, isDataModel, allSelectFields, value, datasourceType
|
|
86
|
+
const { dataSourceName, _id, isDataModel, allSelectFields, value, datasourceType } = params;
|
|
87
87
|
if (datasourceType === 'expression') {
|
|
88
88
|
return value !== null && value !== void 0 ? value : {};
|
|
89
89
|
}
|
|
@@ -185,15 +185,9 @@ const SINGLE_SELECT_FORMATS = [
|
|
|
185
185
|
const MULTI_SELECT_FORMATS = ['many-many', 'one-many'];
|
|
186
186
|
export function useInitValueFromRemote(dataSourceType, dataSourceProfile, fetchedInitialValues) {
|
|
187
187
|
return useSWR(() => {
|
|
188
|
-
if ((dataSourceType === 'expression' || dataSourceProfile) &&
|
|
189
|
-
fetchedInitialValues) {
|
|
188
|
+
if ((dataSourceType === 'expression' || dataSourceProfile) && fetchedInitialValues) {
|
|
190
189
|
logger.debug('datasourceProfile', dataSourceProfile, fetchedInitialValues, dataSourceType);
|
|
191
|
-
return [
|
|
192
|
-
'useInitValueFromRemote',
|
|
193
|
-
dataSourceType,
|
|
194
|
-
dataSourceProfile,
|
|
195
|
-
fetchedInitialValues,
|
|
196
|
-
];
|
|
190
|
+
return ['useInitValueFromRemote', dataSourceType, dataSourceProfile, fetchedInitialValues];
|
|
197
191
|
}
|
|
198
192
|
return null;
|
|
199
193
|
}, () => {
|
|
@@ -205,8 +199,7 @@ export function useInitValueFromRemote(dataSourceType, dataSourceProfile, fetche
|
|
|
205
199
|
var _a, _b, _c;
|
|
206
200
|
const format = (_c = (_b = (_a = dataSourceProfile.schema) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[field]) === null || _c === void 0 ? void 0 : _c.format;
|
|
207
201
|
acc[field] = fetchedInitialValues[field];
|
|
208
|
-
if ([...SINGLE_SELECT_FORMATS, 'father-son'].includes(format) &&
|
|
209
|
-
fetchedInitialValues[field]['_id']) {
|
|
202
|
+
if ([...SINGLE_SELECT_FORMATS, 'father-son'].includes(format) && fetchedInitialValues[field]['_id']) {
|
|
210
203
|
acc[field] = fetchedInitialValues[field]['_id'];
|
|
211
204
|
}
|
|
212
205
|
if (MULTI_SELECT_FORMATS.includes(format)) {
|
|
@@ -227,12 +220,7 @@ export function useRemoteParamsFromValue({ dataSourceProfile, formData, formType
|
|
|
227
220
|
if (!dataSourceProfile || !formData) {
|
|
228
221
|
return null;
|
|
229
222
|
}
|
|
230
|
-
return [
|
|
231
|
-
'useRemoteParamsFromValueParams',
|
|
232
|
-
dataSourceProfile,
|
|
233
|
-
formType,
|
|
234
|
-
formData,
|
|
235
|
-
];
|
|
223
|
+
return ['useRemoteParamsFromValueParams', dataSourceProfile, formType, formData];
|
|
236
224
|
}, () => {
|
|
237
225
|
const data = Object.keys(formData).reduce((acc, cur) => {
|
|
238
226
|
var _a, _b, _c, _d;
|
|
@@ -244,6 +232,18 @@ export function useRemoteParamsFromValue({ dataSourceProfile, formData, formType
|
|
|
244
232
|
if (MULTI_SELECT_FORMATS.includes(format)) {
|
|
245
233
|
acc[cur] = (_d = acc[cur]) === null || _d === void 0 ? void 0 : _d.map((_id) => ({ _id }));
|
|
246
234
|
}
|
|
235
|
+
if ('x-json' === format && typeof formData[cur] === 'string') {
|
|
236
|
+
try {
|
|
237
|
+
acc[cur] = formData[cur] ? JSON.parse(formData[cur]) : null;
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
const err = new WdCompError(`字段 ${cur} 的 JSON 格式错误,请检查`, {
|
|
241
|
+
code: 'WdForm.submit.jsonParse',
|
|
242
|
+
original: error,
|
|
243
|
+
});
|
|
244
|
+
console.warn(err.code, err);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
247
|
return acc;
|
|
248
248
|
}, {});
|
|
249
249
|
const result = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
3
|
-
import { forwardRef, useImperativeHandle, useEffect, useState, useCallback
|
|
3
|
+
import { forwardRef, useImperativeHandle, useEffect, useState, useCallback } from 'react';
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
5
|
import { useConfig } from '../../utils/config-context';
|
|
6
6
|
import { usePlatform } from '../../utils/platform';
|
|
7
|
-
let timer =
|
|
7
|
+
let timer = {};
|
|
8
8
|
const MASK_SHOW_TIME = 200;
|
|
9
9
|
const ESC_KEYBOARD_NUM = 27;
|
|
10
10
|
export const WdModal = forwardRef(function WdModal(props, ref) {
|
|
@@ -40,14 +40,14 @@ export const WdModal = forwardRef(function WdModal(props, ref) {
|
|
|
40
40
|
const dealShow = (isOpen) => {
|
|
41
41
|
setIsBdShow(isOpen);
|
|
42
42
|
setIsMaskShow(!isOpen);
|
|
43
|
-
timer && clearTimeout(timer);
|
|
43
|
+
timer[id] && clearTimeout(timer[id]);
|
|
44
44
|
if (isOpen) {
|
|
45
45
|
setMaskPreToShow(true);
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
// 延迟控制遮罩层消失,为了动画效果
|
|
49
49
|
// eslint-disable-next-line rulesdir/no-timer
|
|
50
|
-
timer = setTimeout(() => {
|
|
50
|
+
timer[id] = setTimeout(() => {
|
|
51
51
|
setMaskPreToShow(false);
|
|
52
52
|
}, MASK_SHOW_TIME);
|
|
53
53
|
}
|
|
@@ -88,8 +88,10 @@ export const WdModal = forwardRef(function WdModal(props, ref) {
|
|
|
88
88
|
}
|
|
89
89
|
return () => {
|
|
90
90
|
window === null || window === void 0 ? void 0 : window.removeEventListener('keydown', escKeyDown);
|
|
91
|
+
timer[id] && clearTimeout(timer[id]);
|
|
92
|
+
timer = {};
|
|
91
93
|
};
|
|
92
|
-
}, [escKeyDown, platform, props.closeType]);
|
|
94
|
+
}, [escKeyDown, id, platform, props.closeType]);
|
|
93
95
|
// Widget API,挂载组件只读属性和组件方法
|
|
94
96
|
useImperativeHandle(ref, () => {
|
|
95
97
|
return {
|
|
@@ -121,9 +123,7 @@ export const WdModal = forwardRef(function WdModal(props, ref) {
|
|
|
121
123
|
center_pc: !(style === null || style === void 0 ? void 0 : style.width) ? '680px' : 'auto',
|
|
122
124
|
}[`${positionInner || 'bottom'}_${platform}`],
|
|
123
125
|
};
|
|
124
|
-
if (props.template === 'activity' &&
|
|
125
|
-
platform === 'pc' &&
|
|
126
|
-
positionInner === 'center') {
|
|
126
|
+
if (props.template === 'activity' && platform === 'pc' && positionInner === 'center') {
|
|
127
127
|
styleList.width = '312px';
|
|
128
128
|
delete styleList.minWidth;
|
|
129
129
|
}
|
|
@@ -138,12 +138,9 @@ export const WdModal = forwardRef(function WdModal(props, ref) {
|
|
|
138
138
|
}
|
|
139
139
|
}, children: _jsxs("div", { style: { ...styleList, ...style }, className: classNames(modalBdClasses), onClick: (e) => {
|
|
140
140
|
e.stopPropagation();
|
|
141
|
-
}, children: [_jsx("div", { className: `${classPrefix}-modal-bd__hd`, style: headerFooterStlye, children: props.headerSlot }), _jsx("div", { className: `${classPrefix}-modal-bd__main`, children: props.contentSlot }), _jsx("div", { className: `${classPrefix}-modal-bd__ft ${['confirm', 'notice'].includes(props.template) &&
|
|
142
|
-
platform === 'h5'
|
|
141
|
+
}, children: [_jsx("div", { className: `${classPrefix}-modal-bd__hd`, style: headerFooterStlye, children: props.headerSlot }), _jsx("div", { className: `${classPrefix}-modal-bd__main`, children: props.contentSlot }), _jsx("div", { className: `${classPrefix}-modal-bd__ft ${['confirm', 'notice'].includes(props.template) && platform === 'h5'
|
|
143
142
|
? `${classPrefix}-modal-bd__ft-text-btn`
|
|
144
|
-
: ''} ${props.template === 'notice' && platform === 'h5'
|
|
145
|
-
? `${classPrefix}-modal-bd__ft-text-btn--vertical`
|
|
146
|
-
: ''}`, style: headerFooterStlye, children: props.footerSlot })] }) })] }));
|
|
143
|
+
: ''} ${props.template === 'notice' && platform === 'h5' ? `${classPrefix}-modal-bd__ft-text-btn--vertical` : ''}`, style: headerFooterStlye, children: props.footerSlot })] }) })] }));
|
|
147
144
|
};
|
|
148
145
|
return (_jsx("div", { id: id, className: classNames(classes, className), style: { display: (style === null || style === void 0 ? void 0 : style.display) || 'block' }, "data-testid": "wd-modal-test", children: maskPreToShow && renderNode() }));
|
|
149
146
|
});
|
|
@@ -246,17 +246,7 @@ export function getFieldRender(field = {}, extra = {}) {
|
|
|
246
246
|
const primaryField = ((_h = (_g = field === null || field === void 0 ? void 0 : field.parentDatasource) === null || _g === void 0 ? void 0 : _g.schema) === null || _h === void 0 ? void 0 : _h['x-primary-column']) || '';
|
|
247
247
|
const relatedField = (_j = extra === null || extra === void 0 ? void 0 : extra.columnSet) === null || _j === void 0 ? void 0 : _j.relatedField;
|
|
248
248
|
const rowId = extra === null || extra === void 0 ? void 0 : extra.rowId;
|
|
249
|
-
const
|
|
250
|
-
const propertyArr = Object.keys(properties);
|
|
251
|
-
const relatedKey = propertyArr.find((item) => {
|
|
252
|
-
var _a;
|
|
253
|
-
if (properties[item].format === 'many-one' || properties[item].format === 'many-many') {
|
|
254
|
-
return ((_a = properties[item]['x-parent']) === null || _a === void 0 ? void 0 : _a.parentFieldKey) === field.name;
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
});
|
|
249
|
+
const relatedKey = (_k = field === null || field === void 0 ? void 0 : field['x-parent']) === null || _k === void 0 ? void 0 : _k.parentFieldKey;
|
|
260
250
|
const param = {
|
|
261
251
|
datasource: parentDatasource,
|
|
262
252
|
isNewData: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDataSourceFieldsWithAuth } from '../../../utils/datasource';
|
|
2
|
-
import { TABLE_SLOT_PREFIX, GLOBAL_BUTTON, REL_DICT
|
|
3
|
-
import { callWedaApi, appCloudGetWedaUserId, getIsExitApi
|
|
2
|
+
import { TABLE_SLOT_PREFIX, GLOBAL_BUTTON, REL_DICT } from '../../../utils/constant';
|
|
3
|
+
import { callWedaApi, appCloudGetWedaUserId, getIsExitApi } from '../../../utils/tcb';
|
|
4
4
|
import { isObj, deepClone } from '../../../utils/tool';
|
|
5
5
|
import { errorHandler } from '../../../utils/error';
|
|
6
6
|
// 新接口没有返回关联表的主列字段,从旧接口中查询出来
|
|
@@ -55,9 +55,7 @@ export const whereList = (whereProxy) => {
|
|
|
55
55
|
}
|
|
56
56
|
let [rel, val] = [REL_DICT[item2 === null || item2 === void 0 ? void 0 : item2.rel], item2 === null || item2 === void 0 ? void 0 : item2.value];
|
|
57
57
|
// 去掉空字符串、undefined(接口不支持)、对象类型(接口不支持)
|
|
58
|
-
if (val === '' ||
|
|
59
|
-
val === undefined ||
|
|
60
|
-
Object.prototype.toString.call(val) === '[object Object]') {
|
|
58
|
+
if (val === '' || val === undefined || Object.prototype.toString.call(val) === '[object Object]') {
|
|
61
59
|
return;
|
|
62
60
|
}
|
|
63
61
|
if ('_begin_with' === rel) {
|
|
@@ -179,7 +177,7 @@ const getSearchValues = (searchValues) => {
|
|
|
179
177
|
return searchValues.map((item) => {
|
|
180
178
|
const obj = {};
|
|
181
179
|
const exp = {};
|
|
182
|
-
if (item.val && item.key && item.rel) {
|
|
180
|
+
if (item.val !== undefined && item.key !== undefined && item.rel !== undefined) {
|
|
183
181
|
exp[`$${item.rel}`] = item.val;
|
|
184
182
|
obj[item.key] = exp;
|
|
185
183
|
}
|
|
@@ -240,9 +238,7 @@ export const getQueryParams = ({ queryParams, wList, viewFieldsData, connectorPa
|
|
|
240
238
|
const searchValues = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.searchValues) || [];
|
|
241
239
|
let ConditionConfig;
|
|
242
240
|
if (supportManyRelated) {
|
|
243
|
-
ConditionConfig = (viewed === null || viewed === void 0 ? void 0 : viewed.ConditionConfig)
|
|
244
|
-
? [viewed === null || viewed === void 0 ? void 0 : viewed.ConditionConfig]
|
|
245
|
-
: [];
|
|
241
|
+
ConditionConfig = (viewed === null || viewed === void 0 ? void 0 : viewed.ConditionConfig) ? [viewed === null || viewed === void 0 ? void 0 : viewed.ConditionConfig] : [];
|
|
246
242
|
const formatSearchValues = getSearchValues(searchValues);
|
|
247
243
|
params.filter = getFilter(wList, formatSearchValues, SearchConfig, ConditionConfig);
|
|
248
244
|
params.select = selectParam(columns, authFields, {
|
|
@@ -252,12 +248,7 @@ export const getQueryParams = ({ queryParams, wList, viewFieldsData, connectorPa
|
|
|
252
248
|
}
|
|
253
249
|
else {
|
|
254
250
|
ConditionConfig = (viewed === null || viewed === void 0 ? void 0 : viewed.ConditionConfig) || {};
|
|
255
|
-
params.where = [
|
|
256
|
-
...searchValues,
|
|
257
|
-
...wList,
|
|
258
|
-
...SearchConfig,
|
|
259
|
-
ConditionConfig,
|
|
260
|
-
];
|
|
251
|
+
params.where = [...searchValues, ...wList, ...SearchConfig, ConditionConfig];
|
|
261
252
|
}
|
|
262
253
|
// 如果视图里存在排序设置则以视图为主
|
|
263
254
|
if (isViewTable && (viewed === null || viewed === void 0 ? void 0 : viewed.sortItem)) {
|
|
@@ -355,11 +346,8 @@ export const getViews = async (dbName, selectedView) => {
|
|
|
355
346
|
.condition) === null || _c === void 0 ? void 0 : _c.filter((item) => item.IsQuery).map((item) => {
|
|
356
347
|
var _a, _b;
|
|
357
348
|
// 当规则为包含/不包含当前用户时,设计态无法获取当前用户uid需要 运行态主动获取
|
|
358
|
-
if (item.Rel === 'eq-current-user' ||
|
|
359
|
-
item.
|
|
360
|
-
item.Val =
|
|
361
|
-
(appCloudGetWedaUserId === null || appCloudGetWedaUserId === void 0 ? void 0 : appCloudGetWedaUserId()) ||
|
|
362
|
-
((_b = (_a = window === null || window === void 0 ? void 0 : window._WedaHostConfig) === null || _a === void 0 ? void 0 : _a.wedaUser) === null || _b === void 0 ? void 0 : _b.userId);
|
|
349
|
+
if (item.Rel === 'eq-current-user' || item.Rel === 'ne-current-user') {
|
|
350
|
+
item.Val = (appCloudGetWedaUserId === null || appCloudGetWedaUserId === void 0 ? void 0 : appCloudGetWedaUserId()) || ((_b = (_a = window === null || window === void 0 ? void 0 : window._WedaHostConfig) === null || _a === void 0 ? void 0 : _a.wedaUser) === null || _b === void 0 ? void 0 : _b.userId);
|
|
363
351
|
}
|
|
364
352
|
return {
|
|
365
353
|
Key: item.Key,
|
|
@@ -384,8 +372,7 @@ export const getViews = async (dbName, selectedView) => {
|
|
|
384
372
|
}
|
|
385
373
|
// 根据x-layoutShow显示隐藏
|
|
386
374
|
item.fields = (_e = item.fields) === null || _e === void 0 ? void 0 : _e.filter((item) => item['x-layoutShow'] === true).sort((a, b) => a['x-index'] - b['x-index']);
|
|
387
|
-
if (!(window === null || window === void 0 ? void 0 : window._isPrivate) ||
|
|
388
|
-
describeRuntimeDataViewPropertiesListStatus) {
|
|
375
|
+
if (!(window === null || window === void 0 ? void 0 : window._isPrivate) || describeRuntimeDataViewPropertiesListStatus) {
|
|
389
376
|
// 设置字段权限,关联模型字段权限,接口没返回暂不进行校验:['x-viewType']
|
|
390
377
|
item.fields = (_f = getDataSourceFieldsWithAuth(item.fields, dataViewPropertiesList.ResourceCheckInfos)) === null || _f === void 0 ? void 0 : _f.filter((value) => value.readWriteAuth === 'rw' || value.readWriteAuth === 'r');
|
|
391
378
|
// 关联模型的主列字段
|
|
@@ -422,9 +409,7 @@ export const getFilterFields = (filterFields, authFields) => {
|
|
|
422
409
|
if (item) {
|
|
423
410
|
result.push({
|
|
424
411
|
...deepClone(item),
|
|
425
|
-
isRange: item.isRange === undefined
|
|
426
|
-
? (_b = (_a = i.filterTypeOption) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, 'scope')
|
|
427
|
-
: item.isRange,
|
|
412
|
+
isRange: item.isRange === undefined ? (_b = (_a = i.filterTypeOption) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, 'scope') : item.isRange,
|
|
428
413
|
title: (i === null || i === void 0 ? void 0 : i.label) || item.title,
|
|
429
414
|
filterConfig: i,
|
|
430
415
|
});
|
|
@@ -433,8 +418,7 @@ export const getFilterFields = (filterFields, authFields) => {
|
|
|
433
418
|
}
|
|
434
419
|
else {
|
|
435
420
|
// 筛选有权限的字段
|
|
436
|
-
result =
|
|
437
|
-
((_a = filterFieldsObj === null || filterFieldsObj === void 0 ? void 0 : filterFieldsObj.selected) === null || _a === void 0 ? void 0 : _a.map((i) => authFields.find((j) => (j === null || j === void 0 ? void 0 : j.name) === i))) || [];
|
|
421
|
+
result = ((_a = filterFieldsObj === null || filterFieldsObj === void 0 ? void 0 : filterFieldsObj.selected) === null || _a === void 0 ? void 0 : _a.map((i) => authFields.find((j) => (j === null || j === void 0 ? void 0 : j.name) === i))) || [];
|
|
438
422
|
result = result.filter((i) => isObj(i));
|
|
439
423
|
result = deepClone(result);
|
|
440
424
|
result = result.map((i) => {
|
|
@@ -474,9 +458,7 @@ export const getSortColumns = ({ fields, columnSets }) => {
|
|
|
474
458
|
return false;
|
|
475
459
|
}
|
|
476
460
|
const field = fields === null || fields === void 0 ? void 0 : fields.find((j) => i.key === j.name);
|
|
477
|
-
if ((field === null || field === void 0 ? void 0 : field.type) !== 'array' &&
|
|
478
|
-
(field === null || field === void 0 ? void 0 : field.type) !== 'object' &&
|
|
479
|
-
!(field === null || field === void 0 ? void 0 : field.name.includes('@'))) {
|
|
461
|
+
if ((field === null || field === void 0 ? void 0 : field.type) !== 'array' && (field === null || field === void 0 ? void 0 : field.type) !== 'object' && !(field === null || field === void 0 ? void 0 : field.name.includes('@'))) {
|
|
480
462
|
return true;
|
|
481
463
|
}
|
|
482
464
|
else {
|
|
@@ -585,14 +567,11 @@ export const getRecordKey = ({ dataSourceType, dataSourceData, key }) => {
|
|
|
585
567
|
if (dataSourceType !== DataSourceType.Expression) {
|
|
586
568
|
return '_id';
|
|
587
569
|
}
|
|
588
|
-
const tableExpressionData = Array.isArray(dataSourceData)
|
|
589
|
-
? dataSourceData
|
|
590
|
-
: [];
|
|
570
|
+
const tableExpressionData = Array.isArray(dataSourceData) ? dataSourceData : [];
|
|
591
571
|
const result = Object.assign({}, ...tableExpressionData);
|
|
592
572
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
593
573
|
const isExisted = Object.keys(result).filter((i) => i === key).length === 1;
|
|
594
|
-
const newListLength = new Set(tableExpressionData.map((item) => item === null || item === void 0 ? void 0 : item[key]))
|
|
595
|
-
.size;
|
|
574
|
+
const newListLength = new Set(tableExpressionData.map((item) => item === null || item === void 0 ? void 0 : item[key])).size;
|
|
596
575
|
const isUnique = newListLength === tableExpressionData.length;
|
|
597
576
|
if (isExisted && isUnique) {
|
|
598
577
|
return key;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/weda-ui",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index",
|
|
6
6
|
"miniprogram": "mpdist",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"@babel/preset-env": "^7.22.15",
|
|
148
148
|
"@babel/preset-react": "^7.22.15",
|
|
149
149
|
"@babel/preset-typescript": "^7.22.15",
|
|
150
|
-
"@cloudbase/cals": "^1.2.
|
|
150
|
+
"@cloudbase/cals": "^1.2.14",
|
|
151
151
|
"@cloudbase/lowcode-cli": "^0.22.2",
|
|
152
152
|
"@cloudbase/weda-cloud-sdk": "^1.0.99",
|
|
153
153
|
"@commitlint/cli": "^16.0.2",
|