@cloudbase/weda-ui 3.7.14 → 3.8.1

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.
Files changed (33) hide show
  1. package/dist/configs/components/wd-code-editor.d.ts +2 -2
  2. package/dist/configs/components/wd-input-email.d.ts +7 -0
  3. package/dist/configs/components/wd-input-phone.d.ts +7 -0
  4. package/dist/configs/components/wd-input-url.d.ts +7 -0
  5. package/dist/configs/components/wd-input.d.ts +17 -3
  6. package/dist/configs/components/wd-input.js +1 -0
  7. package/dist/configs/components/wd-rating.js +1 -1
  8. package/dist/configs/components/wd-select-multiple.d.ts +2 -0
  9. package/dist/configs/components/wd-select-multiple.js +4 -8
  10. package/dist/configs/components/wd-textarea.d.ts +2 -2
  11. package/dist/configs/index.d.ts +64 -6
  12. package/dist/configs/type-utils/type-form.d.ts +11 -2
  13. package/dist/configs/type-utils/type-form.js +16 -16
  14. package/dist/enum/index.js +4 -0
  15. package/dist/web/components/form/selectMultiple/h5.d.ts +1 -1
  16. package/dist/web/components/form/selectMultiple/h5.js +2 -1
  17. package/dist/web/components/form/selectMultiple/index.js +2 -1
  18. package/dist/web/components/form/selectMultiple/request.js +4 -6
  19. package/dist/web/components/form/uploader/uploader.h5.js +6 -1
  20. package/dist/web/components/form/uploaderFile/uploadFile.h5.js +4 -1
  21. package/dist/web/components/form-input-hooks/index.js +2 -1
  22. package/dist/web/components/form-select/index.d.ts +1 -1
  23. package/dist/web/components/richText/index.js +2 -2
  24. package/dist/web/components/wd-code-editor/lang/index.d.ts +4 -1
  25. package/dist/web/components/wd-code-editor/lang/index.js +5 -0
  26. package/dist/web/components/wd-form-item/wd-input-group.js +2 -2
  27. package/dist/web/components/wd-input/wd-input.d.ts +8 -1
  28. package/dist/web/components/wd-input/wd-input.js +12 -2
  29. package/dist/web/components/wd-input-email/wd-input-email.d.ts +7 -0
  30. package/dist/web/components/wd-input-phone/wd-input-phone.d.ts +8 -1
  31. package/dist/web/components/wd-input-url/wd-input-url.d.ts +7 -0
  32. package/dist/web/components/wd-select-multiple/wd-select-multiple.js +2 -2
  33. package/package.json +4 -2
@@ -7,7 +7,7 @@ declare const data: import("@sinclair/typebox").TObject<{
7
7
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
8
8
  format: import("@sinclair/typebox").TString;
9
9
  message: import("@sinclair/typebox").TString;
10
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
10
+ pattern: import("@sinclair/typebox").TString;
11
11
  }>>>;
12
12
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
13
13
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -38,7 +38,7 @@ declare const config: {
38
38
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
39
39
  format: import("@sinclair/typebox").TString;
40
40
  message: import("@sinclair/typebox").TString;
41
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
41
+ pattern: import("@sinclair/typebox").TString;
42
42
  }>>>;
43
43
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
44
44
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -192,6 +192,13 @@ declare const config: {
192
192
  detail: import("@sinclair/typebox").TObject<{
193
193
  originValue: import("@sinclair/typebox").TString;
194
194
  }>;
195
+ }, {
196
+ name: string;
197
+ title: string;
198
+ description: string;
199
+ detail: import("@sinclair/typebox").TObject<{
200
+ type: import("@sinclair/typebox").TString;
201
+ }>;
195
202
  }];
196
203
  readonly meta: {
197
204
  readonly description: "用于输入邮箱地址,会强制校验输入内容是否符合邮箱格式。";
@@ -190,6 +190,13 @@ declare const config: {
190
190
  detail: import("@sinclair/typebox").TObject<{
191
191
  originValue: import("@sinclair/typebox").TString;
192
192
  }>;
193
+ }, {
194
+ name: string;
195
+ title: string;
196
+ description: string;
197
+ detail: import("@sinclair/typebox").TObject<{
198
+ type: import("@sinclair/typebox").TString;
199
+ }>;
193
200
  }];
194
201
  readonly meta: {
195
202
  readonly description: "用于输入电话号码,会强制校验输入内容是否符合电话格式。";
@@ -192,6 +192,13 @@ declare const config: {
192
192
  detail: import("@sinclair/typebox").TObject<{
193
193
  originValue: import("@sinclair/typebox").TString;
194
194
  }>;
195
+ }, {
196
+ name: string;
197
+ title: string;
198
+ description: string;
199
+ detail: import("@sinclair/typebox").TObject<{
200
+ type: import("@sinclair/typebox").TString;
201
+ }>;
195
202
  }];
196
203
  readonly meta: {
197
204
  readonly description: "用于输入URL地址,会强制校验输入内容是否符合URL格式。";
@@ -25,7 +25,7 @@ declare const WD_INPUT_DATA: {
25
25
  rules: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
26
26
  format: import("@sinclair/typebox").TString;
27
27
  message: import("@sinclair/typebox").TString;
28
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
28
+ pattern: import("@sinclair/typebox").TString;
29
29
  }>>;
30
30
  status: import("@sinclair/typebox").TUnsafe<string>;
31
31
  required: import("@sinclair/typebox").TBoolean;
@@ -69,7 +69,7 @@ declare const data: import("@sinclair/typebox").TObject<{
69
69
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
70
70
  format: import("@sinclair/typebox").TString;
71
71
  message: import("@sinclair/typebox").TString;
72
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
72
+ pattern: import("@sinclair/typebox").TString;
73
73
  }>>>;
74
74
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
75
75
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -119,6 +119,13 @@ declare const events: [{
119
119
  detail: import("@sinclair/typebox").TObject<{
120
120
  originValue: import("@sinclair/typebox").TString;
121
121
  }>;
122
+ }, {
123
+ name: string;
124
+ title: string;
125
+ description: string;
126
+ detail: import("@sinclair/typebox").TObject<{
127
+ type: import("@sinclair/typebox").TString;
128
+ }>;
122
129
  }];
123
130
  declare const config: {
124
131
  readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
@@ -147,7 +154,7 @@ declare const config: {
147
154
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
148
155
  format: import("@sinclair/typebox").TString;
149
156
  message: import("@sinclair/typebox").TString;
150
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
157
+ pattern: import("@sinclair/typebox").TString;
151
158
  }>>>;
152
159
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
153
160
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -274,6 +281,13 @@ declare const config: {
274
281
  detail: import("@sinclair/typebox").TObject<{
275
282
  originValue: import("@sinclair/typebox").TString;
276
283
  }>;
284
+ }, {
285
+ name: string;
286
+ title: string;
287
+ description: string;
288
+ detail: import("@sinclair/typebox").TObject<{
289
+ type: import("@sinclair/typebox").TString;
290
+ }>;
277
291
  }];
278
292
  readonly meta: {
279
293
  readonly description: "用于单行内容的输入。";
@@ -89,6 +89,7 @@ const events = Tuple([
89
89
  FORM_ITEM_EVENTS.blur,
90
90
  FORM_ITEM_EVENTS.confirm,
91
91
  FORM_ITEM_EVENTS.clear,
92
+ FORM_ITEM_EVENTS.inputAdornmentClick,
92
93
  ]);
93
94
  const properties = Type.Pick(ItemData, [
94
95
  'name',
@@ -1,9 +1,9 @@
1
1
  import { defineConfig, Type, Tuple } from '../type-utils';
2
2
  import { FORM_ITEM_DATA_TITLE, FORM_ITEM_METHODS, FORM_ITEM_META, ItemData, } from '../type-utils/type-form';
3
+ import { X_RUNTIME_DEFAULT } from '../type-utils/x-runtime-default';
3
4
  import { WD_ICON_ENUM } from '../../enum';
4
5
  import { getClasses } from '../type-utils/classes';
5
6
  import { templateInitNameWithId } from './common/init-name-with-id';
6
- import { X_RUNTIME_DEFAULT } from '../type-utils/x-runtime-default';
7
7
  // 属性分类
8
8
  const X_CATEGORY = {
9
9
  COMMON: '通用',
@@ -36,6 +36,7 @@ declare const data: import("@sinclair/typebox").TObject<{
36
36
  disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
37
37
  }>>>;
38
38
  tipBlock: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
39
+ where: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
39
40
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
40
41
  staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
41
42
  ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -82,6 +83,7 @@ declare const config: {
82
83
  disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
83
84
  }>>>;
84
85
  tipBlock: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
86
+ where: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
85
87
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
86
88
  staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
87
89
  ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -22,6 +22,7 @@ const data = Type.Partial(Type.Object({
22
22
  name: FORM_ITEM_DATA.name,
23
23
  range: FORM_ITEM_DATA.range,
24
24
  tipBlock: FORM_ITEM_DATA.tipBlock,
25
+ where: FORM_ITEM_DATA.where,
25
26
  value: FORM_ITEM_DATA._valueInSelectMultiple,
26
27
  staticSearchable: FORM_ITEM_DATA.staticSearchable,
27
28
  ignoreCase: FORM_ITEM_DATA.ignoreCase,
@@ -45,19 +46,14 @@ const data = Type.Partial(Type.Object({
45
46
  'x-linkages': [
46
47
  {
47
48
  type: 'value:visible',
48
- target: 'range',
49
- condition: "{{$self.value!='many-many'&&$self.value!='one-many'}}",
49
+ target: '*(range,ignoreCase,staticSearchable)',
50
+ condition: "{{!($self.value=='many-many'||$self.value=='one-many')}}",
50
51
  },
51
52
  {
52
53
  type: 'value:visible',
53
- target: 'tipBlock',
54
+ target: '*(tipBlock,where)',
54
55
  condition: "{{$self.value=='many-many'||$self.value=='one-many'}}",
55
56
  },
56
- // {
57
- // type: 'value:visible',
58
- // target: 'where',
59
- // condition: "{{$self.value=='many-many'||$self.value=='one-many'}}",
60
- // },
61
57
  ],
62
58
  'x-category': X_CATEGORY.COMMON,
63
59
  'x-index': 43,
@@ -14,7 +14,7 @@ declare const data: import("@sinclair/typebox").TObject<{
14
14
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
15
15
  format: import("@sinclair/typebox").TString;
16
16
  message: import("@sinclair/typebox").TString;
17
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
17
+ pattern: import("@sinclair/typebox").TString;
18
18
  }>>>;
19
19
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
20
20
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -50,7 +50,7 @@ declare const config: {
50
50
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
51
51
  format: import("@sinclair/typebox").TString;
52
52
  message: import("@sinclair/typebox").TString;
53
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
53
+ pattern: import("@sinclair/typebox").TString;
54
54
  }>>>;
55
55
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
56
56
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -8,7 +8,7 @@ export declare const components: {
8
8
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
9
9
  format: import("@sinclair/typebox").TString;
10
10
  message: import("@sinclair/typebox").TString;
11
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
11
+ pattern: import("@sinclair/typebox").TString;
12
12
  }>>>;
13
13
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
14
14
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -13110,7 +13110,7 @@ export declare const components: {
13110
13110
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
13111
13111
  format: import("@sinclair/typebox").TString;
13112
13112
  message: import("@sinclair/typebox").TString;
13113
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
13113
+ pattern: import("@sinclair/typebox").TString;
13114
13114
  }>>>;
13115
13115
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
13116
13116
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -13349,7 +13349,7 @@ export declare const components: {
13349
13349
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
13350
13350
  format: import("@sinclair/typebox").TString;
13351
13351
  message: import("@sinclair/typebox").TString;
13352
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
13352
+ pattern: import("@sinclair/typebox").TString;
13353
13353
  }>>>;
13354
13354
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
13355
13355
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -13476,6 +13476,13 @@ export declare const components: {
13476
13476
  detail: import("@sinclair/typebox").TObject<{
13477
13477
  originValue: import("@sinclair/typebox").TString;
13478
13478
  }>;
13479
+ }, {
13480
+ name: string;
13481
+ title: string;
13482
+ description: string;
13483
+ detail: import("@sinclair/typebox").TObject<{
13484
+ type: import("@sinclair/typebox").TString;
13485
+ }>;
13479
13486
  }];
13480
13487
  readonly meta: {
13481
13488
  readonly description: "用于单行内容的输入。";
@@ -14369,6 +14376,13 @@ export declare const components: {
14369
14376
  detail: import("@sinclair/typebox").TObject<{
14370
14377
  originValue: import("@sinclair/typebox").TString;
14371
14378
  }>;
14379
+ }, {
14380
+ name: string;
14381
+ title: string;
14382
+ description: string;
14383
+ detail: import("@sinclair/typebox").TObject<{
14384
+ type: import("@sinclair/typebox").TString;
14385
+ }>;
14372
14386
  }];
14373
14387
  readonly meta: {
14374
14388
  readonly description: "用于输入邮箱地址,会强制校验输入内容是否符合邮箱格式。";
@@ -14613,6 +14627,13 @@ export declare const components: {
14613
14627
  detail: import("@sinclair/typebox").TObject<{
14614
14628
  originValue: import("@sinclair/typebox").TString;
14615
14629
  }>;
14630
+ }, {
14631
+ name: string;
14632
+ title: string;
14633
+ description: string;
14634
+ detail: import("@sinclair/typebox").TObject<{
14635
+ type: import("@sinclair/typebox").TString;
14636
+ }>;
14616
14637
  }];
14617
14638
  readonly meta: {
14618
14639
  readonly description: "用于输入URL地址,会强制校验输入内容是否符合URL格式。";
@@ -14980,6 +15001,7 @@ export declare const components: {
14980
15001
  disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
14981
15002
  }>>>;
14982
15003
  tipBlock: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
15004
+ where: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
14983
15005
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
14984
15006
  staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
14985
15007
  ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -18174,6 +18196,13 @@ export declare const components: {
18174
18196
  detail: import("@sinclair/typebox").TObject<{
18175
18197
  originValue: import("@sinclair/typebox").TString;
18176
18198
  }>;
18199
+ }, {
18200
+ name: string;
18201
+ title: string;
18202
+ description: string;
18203
+ detail: import("@sinclair/typebox").TObject<{
18204
+ type: import("@sinclair/typebox").TString;
18205
+ }>;
18177
18206
  }];
18178
18207
  readonly meta: {
18179
18208
  readonly description: "用于输入电话号码,会强制校验输入内容是否符合电话格式。";
@@ -20071,7 +20100,7 @@ declare const _default: {
20071
20100
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
20072
20101
  format: import("@sinclair/typebox").TString;
20073
20102
  message: import("@sinclair/typebox").TString;
20074
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20103
+ pattern: import("@sinclair/typebox").TString;
20075
20104
  }>>>;
20076
20105
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
20077
20106
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -33173,7 +33202,7 @@ declare const _default: {
33173
33202
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
33174
33203
  format: import("@sinclair/typebox").TString;
33175
33204
  message: import("@sinclair/typebox").TString;
33176
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
33205
+ pattern: import("@sinclair/typebox").TString;
33177
33206
  }>>>;
33178
33207
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
33179
33208
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -33412,7 +33441,7 @@ declare const _default: {
33412
33441
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
33413
33442
  format: import("@sinclair/typebox").TString;
33414
33443
  message: import("@sinclair/typebox").TString;
33415
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
33444
+ pattern: import("@sinclair/typebox").TString;
33416
33445
  }>>>;
33417
33446
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
33418
33447
  required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -33539,6 +33568,13 @@ declare const _default: {
33539
33568
  detail: import("@sinclair/typebox").TObject<{
33540
33569
  originValue: import("@sinclair/typebox").TString;
33541
33570
  }>;
33571
+ }, {
33572
+ name: string;
33573
+ title: string;
33574
+ description: string;
33575
+ detail: import("@sinclair/typebox").TObject<{
33576
+ type: import("@sinclair/typebox").TString;
33577
+ }>;
33542
33578
  }];
33543
33579
  readonly meta: {
33544
33580
  readonly description: "用于单行内容的输入。";
@@ -34432,6 +34468,13 @@ declare const _default: {
34432
34468
  detail: import("@sinclair/typebox").TObject<{
34433
34469
  originValue: import("@sinclair/typebox").TString;
34434
34470
  }>;
34471
+ }, {
34472
+ name: string;
34473
+ title: string;
34474
+ description: string;
34475
+ detail: import("@sinclair/typebox").TObject<{
34476
+ type: import("@sinclair/typebox").TString;
34477
+ }>;
34435
34478
  }];
34436
34479
  readonly meta: {
34437
34480
  readonly description: "用于输入邮箱地址,会强制校验输入内容是否符合邮箱格式。";
@@ -34676,6 +34719,13 @@ declare const _default: {
34676
34719
  detail: import("@sinclair/typebox").TObject<{
34677
34720
  originValue: import("@sinclair/typebox").TString;
34678
34721
  }>;
34722
+ }, {
34723
+ name: string;
34724
+ title: string;
34725
+ description: string;
34726
+ detail: import("@sinclair/typebox").TObject<{
34727
+ type: import("@sinclair/typebox").TString;
34728
+ }>;
34679
34729
  }];
34680
34730
  readonly meta: {
34681
34731
  readonly description: "用于输入URL地址,会强制校验输入内容是否符合URL格式。";
@@ -35043,6 +35093,7 @@ declare const _default: {
35043
35093
  disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
35044
35094
  }>>>;
35045
35095
  tipBlock: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
35096
+ where: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
35046
35097
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
35047
35098
  staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
35048
35099
  ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -38237,6 +38288,13 @@ declare const _default: {
38237
38288
  detail: import("@sinclair/typebox").TObject<{
38238
38289
  originValue: import("@sinclair/typebox").TString;
38239
38290
  }>;
38291
+ }, {
38292
+ name: string;
38293
+ title: string;
38294
+ description: string;
38295
+ detail: import("@sinclair/typebox").TObject<{
38296
+ type: import("@sinclair/typebox").TString;
38297
+ }>;
38240
38298
  }];
38241
38299
  readonly meta: {
38242
38300
  readonly description: "用于输入电话号码,会强制校验输入内容是否符合电话格式。";
@@ -148,7 +148,7 @@ export declare const FORM_ITEM_DATA: {
148
148
  rules: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
149
149
  format: import("@sinclair/typebox").TString;
150
150
  message: import("@sinclair/typebox").TString;
151
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
151
+ pattern: import("@sinclair/typebox").TString;
152
152
  }>>;
153
153
  validateStatus: import("@sinclair/typebox").TUnsafe<string>;
154
154
  locationRange: import("@sinclair/typebox").TUnsafe<number>;
@@ -274,6 +274,14 @@ export declare const FORM_ITEM_EVENTS: {
274
274
  name: string;
275
275
  title: string;
276
276
  };
277
+ inputAdornmentClick: {
278
+ name: string;
279
+ title: string;
280
+ description: string;
281
+ detail: import("@sinclair/typebox").TObject<{
282
+ type: import("@sinclair/typebox").TString;
283
+ }>;
284
+ };
277
285
  };
278
286
  export declare const FORM_ITEM_METHODS: {
279
287
  setValue: {
@@ -546,7 +554,7 @@ export declare const ItemData: import("@sinclair/typebox").TObject<{
546
554
  rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
547
555
  format: import("@sinclair/typebox").TString;
548
556
  message: import("@sinclair/typebox").TString;
549
- pattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
557
+ pattern: import("@sinclair/typebox").TString;
550
558
  }>>>;
551
559
  validateStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
552
560
  locationRange: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number>>;
@@ -620,6 +628,7 @@ export interface WdInputGroupProps extends Pick<ItemDataType, 'before' | 'after'
620
628
  children?: React.ReactNode | undefined;
621
629
  /** 样式根元素,比如 input,textarea */
622
630
  classRoot?: string;
631
+ onClick?: (type: 'beforeText' | 'afterText' | 'prefix' | 'suffix') => void;
623
632
  }
624
633
  export interface WdInputWrapProps extends Pick<ItemDataType, 'before' | 'after' | 'block' | 'size' | 'disabled' | 'prefixType' | 'prefixIcon' | 'prefixSrc' | 'suffixType' | 'suffixIcon' | 'suffixSrc' | 'clearable' | 'readOnly'> {
625
634
  /** 子元素 */
@@ -1365,11 +1365,11 @@ export const FORM_ITEM_DATA = {
1365
1365
  title: '提示信息',
1366
1366
  default: '请输入正确格式的内容',
1367
1367
  }),
1368
- pattern: Type.Optional(Type.String({
1368
+ pattern: Type.String({
1369
1369
  title: '正则',
1370
1370
  'x-component': 'textarea',
1371
1371
  'x-helper-text': '支持匹配正则字面量如 /^weda$/i,或匹配字符串如 ^weda$',
1372
- })),
1372
+ }),
1373
1373
  }, {
1374
1374
  title: 'tabs',
1375
1375
  default: {
@@ -1603,23 +1603,13 @@ export const FORM_ITEM_DATA = {
1603
1603
  'x-linkages': [
1604
1604
  {
1605
1605
  type: 'value:visible',
1606
- target: 'range',
1607
- condition: "{{$self.value!='father-son'&&$self.value!='related'&&$self.value!='x-enum'}}",
1608
- },
1609
- {
1610
- type: 'value:visible',
1611
- target: 'ignoreCase',
1612
- condition: "{{$self.value!='father-son'&&$self.value!='related'&&$self.value!='many-one'&&$self.value!='one-one'&&$self.value!='one-one-r'&&$form.values.staticSearchable==true}}",
1613
- },
1614
- {
1615
- type: 'value:visible',
1616
- target: 'tipBlock',
1617
- condition: "{{$self.value=='father-son'||$self.value=='related'||$self.value=='x-enum'||$self.value=='many-one'||$self.value=='one-one'||$self.value=='one-one-r'}}",
1606
+ target: '*(range,ignoreCase,staticSearchable)',
1607
+ condition: "{{!($self.value=='x-enum'||$self.value=='father-son'||$self.value=='related'||$self.value=='many-one'||$self.value=='one-one'||$self.value=='one-one-r')}}",
1618
1608
  },
1619
1609
  {
1620
1610
  type: 'value:visible',
1621
- target: 'where',
1622
- condition: "{{$self.value=='father-son'||$self.value=='related'}}",
1611
+ target: '*(tipBlock,where)',
1612
+ condition: "{{$self.value=='father-son'||$self.value=='related'||$self.value=='many-one'||$self.value=='one-one'||$self.value=='one-one-r'}}",
1623
1613
  },
1624
1614
  ],
1625
1615
  display: false,
@@ -1787,6 +1777,16 @@ export const FORM_ITEM_EVENTS = {
1787
1777
  name: 'error',
1788
1778
  title: '上传失败',
1789
1779
  },
1780
+ inputAdornmentClick: {
1781
+ name: 'inputAdornmentClick',
1782
+ title: '输入框周围文字/图标点击',
1783
+ description: "点击的元素类型,[ 'beforeText' | 'afterText' | 'prefix' | 'suffix']",
1784
+ detail: Type.Object({
1785
+ type: Type.String({
1786
+ description: "[ 'beforeText' | 'afterText' | 'prefix' | 'suffix']分别表示前缀文字,后缀文字,前缀图标,后缀图标",
1787
+ }),
1788
+ }),
1789
+ },
1790
1790
  };
1791
1791
  // 表单方法集合
1792
1792
  export const FORM_ITEM_METHODS = {
@@ -953,6 +953,8 @@ export const WD_SELECT_FORMAT = [
953
953
  { label: 'related', value: 'related' },
954
954
  { label: 'x-enum', value: 'x-enum' },
955
955
  { label: 'many-one', value: 'many-one' },
956
+ { label: 'one-one', value: 'one-one' },
957
+ { label: 'one-one-r', value: 'one-one-r' },
956
958
  ];
957
959
  // 地区选择
958
960
  export const WD_REGION_TYPE = [
@@ -1210,6 +1212,8 @@ export const WD_CODE_EDITOR_LANGUAGE = [
1210
1212
  { label: 'MongoDB', value: 'mongodb' },
1211
1213
  { label: 'SQL', value: 'sql' },
1212
1214
  { label: 'MySQL', value: 'mysql' },
1215
+ { label: 'JSON', value: 'json' },
1216
+ { label: 'Markdown', value: 'markdown' },
1213
1217
  ];
1214
1218
  export const WD_CODE_EDITOR_THEME = [
1215
1219
  { label: '暗黑', value: 'githubDark' },
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { PropsType } from './index';
3
- export default function SelectH5({ events, name, placeholder, disabled, range, primaryField, dataSourceName, format, onChange, onSearchValueInput, defaultValue, readOnly, ignoreCase, staticSearchable, }: PropsType): JSX.Element;
3
+ export default function SelectH5({ events, name, placeholder, disabled, range, primaryField, dataSourceName, format, onChange, onSearchValueInput, defaultValue, readOnly, ignoreCase, staticSearchable, where, }: PropsType): JSX.Element;
@@ -3,11 +3,12 @@ import { defaultProps } from './index';
3
3
  import { emptyObject } from '../../../utils/constant';
4
4
  import { PureSelectH5 } from './dropdown-select/ui';
5
5
  import { useSyncValue } from '../../../utils/hooks/useSyncValue';
6
- export default function SelectH5({ events = emptyObject, name, placeholder, disabled = false, range = defaultProps.range, primaryField, dataSourceName, format, onChange, onSearchValueInput, defaultValue, readOnly, ignoreCase, staticSearchable, }) {
6
+ export default function SelectH5({ events = emptyObject, name, placeholder, disabled = false, range = defaultProps.range, primaryField, dataSourceName, format, onChange, onSearchValueInput, defaultValue, readOnly, ignoreCase, staticSearchable, where, }) {
7
7
  const [selectedValue, setSelectedValue] = useSyncValue(defaultValue);
8
8
  let params = { controlledValue: range };
9
9
  if (format === 'many-many' || format === 'one-many') {
10
10
  params = {
11
+ where,
11
12
  format,
12
13
  dataSourceName,
13
14
  primaryField,
@@ -54,11 +54,12 @@ export const defaultProps = {
54
54
  requiredFlag: false,
55
55
  range: [],
56
56
  };
57
- function SelectPc({ dataSourceName, format, primaryField, defaultValue, placeholder = '请选择', events = emptyObject, disabled = false, range = defaultProps.range, size = defaultProps.size, onChange, onSearchValueInput, readOnly, ignoreCase, staticSearchable, }) {
57
+ function SelectPc({ dataSourceName, format, primaryField, defaultValue, placeholder = '请选择', events = emptyObject, disabled = false, range = defaultProps.range, size = defaultProps.size, onChange, onSearchValueInput, readOnly, ignoreCase, staticSearchable, where, }) {
58
58
  const [selectedValue, setSelectedValue] = useSyncValue(defaultValue);
59
59
  let params = { controlledValue: range };
60
60
  if (format === 'many-many' || format === 'one-many') {
61
61
  params = {
62
+ where,
62
63
  format,
63
64
  dataSourceName,
64
65
  primaryField,
@@ -22,16 +22,14 @@ export const requestFatherRelatedOption = async (params, pageNo, type, searchVal
22
22
  if (isEmpty(dataSourceName)) {
23
23
  return empty;
24
24
  }
25
- let realWhere;
25
+ let realWhere = [];
26
26
  if (type === RequestOptionType.SEARCH) {
27
- realWhere = [{ key: primaryField, val: searchValue, rel: 'search' }];
27
+ realWhere = [{ [primaryField]: { $search: searchValue } }];
28
28
  }
29
29
  else if (type === RequestOptionType.EQUAL) {
30
- realWhere = [{ key: '_id', val: searchValue, rel: 'eq' }];
31
- }
32
- else {
33
- realWhere = [].concat(getWhereList(where));
30
+ realWhere = [{ _id: { $eq: searchValue } }];
34
31
  }
32
+ realWhere = [{ $and: [...getWhereList(where), ...realWhere] }];
35
33
  const data = await callDataSource({
36
34
  dataSourceName: dataSourceName,
37
35
  methodName: 'wedaGetRecords',
@@ -23,6 +23,7 @@ export function ImageUploaderH5({ title: label, maxUploadCount, maxSize = 10, ac
23
23
  'weda-ui': true,
24
24
  [className]: className,
25
25
  });
26
+ const inputRef = React.useRef(null);
26
27
  // 上传中
27
28
  const [uploading, setUploading] = React.useState(false);
28
29
  //上传进度
@@ -173,7 +174,11 @@ export function ImageUploaderH5({ title: label, maxUploadCount, maxSize = 10, ac
173
174
  };
174
175
  return (_jsx("div", { className: cls, id: id, style: style, children: _jsxs("div", { className: classNames('weui-uploader weui-cells weui-cells_form weda-formcells', layout, layoutCls), children: [_jsx("div", { className: classNames('weui-uploader__hd', layout), children: _jsx(UploaderLabel, { layout: layout, label: label, labelVisible: labelVisible, currentCount: fileIdList.length, maxCount: finalMaxImgCount, requiredFlag: requiredFlag }) }), _jsxs("div", { className: "weui-uploader__bd", children: [_jsxs("ul", { className: "weui-uploader__files", id: "uploaderFiles", children: [(fileIdList !== null && fileIdList !== void 0 ? fileIdList : []).map((f) => (_jsx(SingleImage, { src: f, deleteBySrc: deleteFile, disabled: disabled || readOnly || sourceType === 'album', imgTypeCls: imgTypeCls }, f))), fileIdList.length < 1 && readOnly && _jsx(_Fragment, { children: "\u2014" }), uploading && (_jsx("li", { className: `weui-uploader__file weui-uploader__file_status ${imgTypeCls}`, children: _jsxs("div", { className: "weui-uploader__file-content", children: [progress, "%"] }) }))] }), showAdd && !readOnly && (_jsx("div", { className: `weui-uploader__input-box ${imgTypeCls}`, children: !disabled &&
175
176
  sourceType !== 'album' &&
176
- (sourceType === 'camera' ? (_jsx("input", { "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), capture: true, onChange: uploadChange })) : (_jsx("input", { "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), onChange: uploadChange }))) }))] })] }) }));
177
+ (sourceType === 'camera' ? (_jsx("input", { ref: inputRef, onClick: () => {
178
+ inputRef.current && (inputRef.current.value = '');
179
+ }, "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), capture: true, onChange: uploadChange })) : (_jsx("input", { ref: inputRef, onClick: () => {
180
+ inputRef.current && (inputRef.current.value = '');
181
+ }, "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), onChange: uploadChange }))) }))] })] }) }));
177
182
  }
178
183
  function SingleImage({ src, deleteBySrc, disabled, imgTypeCls, }) {
179
184
  const cls = classNames({
@@ -48,6 +48,7 @@ events = emptyObject, defaultValue, uploadPath = 'weda-uploader', single = true,
48
48
  // 两次默认值不同, 需要刷新
49
49
  const prevDefaultRef = React.useRef([]);
50
50
  const fileRef = React.useRef(fileIDList);
51
+ const inputRef = React.useRef(null);
51
52
  const maxSizeLimit = maxSize;
52
53
  const formType = ((_a = getParentForm($node)) === null || _a === void 0 ? void 0 : _a.formType) || 'create';
53
54
  const changeTypeRef = React.useRef('');
@@ -131,7 +132,9 @@ events = emptyObject, defaultValue, uploadPath = 'weda-uploader', single = true,
131
132
  isEdit,
132
133
  events,
133
134
  fileSizeObj,
134
- }, children: _jsx("div", { "data-testid": "uploadFileH5", className: cls, id: id, style: style, children: _jsxs("div", { className: classNames(`${CLASS_PREFIX}`), children: [isEdit && (_jsx("div", { className: classNames(`${CLASS_PREFIX}__hd`, layout), children: _jsx("div", { children: btnDisabled ? (readOnly ? null : (_jsx(WdButton, { variant: "outline", className: classNames(`${CLASS_PREFIX}__btn--weak`), disabled: btnDisabled, text: btnTitle }))) : (_jsxs("div", { children: [_jsx("input", { id: "uploaderInput", type: "file", "data-testid": "button-up", className: "weui-uploader-mobile__input", accept: accepts.join(','), multiple: !single, onChange: async (e) => {
135
+ }, children: _jsx("div", { "data-testid": "uploadFileH5", className: cls, id: id, style: style, children: _jsxs("div", { className: classNames(`${CLASS_PREFIX}`), children: [isEdit && (_jsx("div", { className: classNames(`${CLASS_PREFIX}__hd`, layout), children: _jsx("div", { children: btnDisabled ? (readOnly ? null : (_jsx(WdButton, { variant: "outline", className: classNames(`${CLASS_PREFIX}__btn--weak`), disabled: btnDisabled, text: btnTitle }))) : (_jsxs("div", { children: [_jsx("input", { ref: inputRef, id: "uploaderInput", type: "file", "data-testid": "button-up", className: "weui-uploader-mobile__input", accept: accepts.join(','), multiple: !single, onClick: () => {
136
+ inputRef.current && (inputRef.current.value = '');
137
+ }, onChange: async (e) => {
135
138
  var _a, _b, _c, _d, _e, _f, _g, _h;
136
139
  let fileList = [...e.target.files];
137
140
  if (single && fileList.length > 1) {
@@ -169,7 +169,8 @@ export function useFormInputTrait(inputParams) {
169
169
  const isPass = rules.some((item) => {
170
170
  if (!item.format && !item.pattern && !item.func) {
171
171
  // console.log(item)
172
- throw new Error('验证规则必须配置 format/pattern');
172
+ // throw new Error('验证规则必须配置 format/pattern');
173
+ return true;
173
174
  }
174
175
  if (item.format) {
175
176
  const typeFunc = validType[item.format];
@@ -21,8 +21,8 @@ declare const FormSelect: React.ForwardRefExoticComponent<CommonPropsType & impo
21
21
  label: string;
22
22
  }[];
23
23
  dataSourceName: string;
24
- tipBlock: string;
25
24
  where: any[];
25
+ tipBlock: string;
26
26
  labelVisible: boolean;
27
27
  requiredFlag: boolean;
28
28
  requiredMsg: string;
@@ -152,14 +152,14 @@ initialContent, placeholder, iconPack, maxSize, cloudPath, visible, }) {
152
152
  loadEditorPromise = new Promise((resolve) => {
153
153
  const script = document.createElement('script');
154
154
  script.src =
155
- 'https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/richtext@3.7.3/_files/static/richtext/exeditor3.min.js';
155
+ 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/richtext/3.9.1/exeditor3.min.js';
156
156
  script.onload = () => {
157
157
  resolve('');
158
158
  };
159
159
  document.body.appendChild(script);
160
160
  const link = document.createElement('link');
161
161
  link.setAttribute('rel', 'stylesheet');
162
- link.setAttribute('href', 'https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_files/static/richtext/exeditor3.min.css');
162
+ link.setAttribute('href', 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/richtext/3.9.1/exeditor3.min.css');
163
163
  const head = document.getElementsByTagName('head');
164
164
  if (head.length) {
165
165
  head[0].appendChild(link);
@@ -1,5 +1,6 @@
1
1
  import { javascript } from '@codemirror/lang-javascript';
2
2
  import { sql } from '@codemirror/lang-sql';
3
+ import { json } from '@codemirror/lang-json';
3
4
  import { mongodb } from './mongodb';
4
5
  export declare const langs: {
5
6
  javascript: typeof javascript;
@@ -9,9 +10,11 @@ export declare const langs: {
9
10
  mongodb: typeof mongodb;
10
11
  sql: typeof sql;
11
12
  mysql: () => import("@codemirror/language").LanguageSupport;
13
+ json: typeof json;
14
+ markdown: () => import("@codemirror/language").LanguageSupport;
12
15
  };
13
16
  /** Language list */
14
- export declare const langNames: ("javascript" | "typescript" | "mongodb" | "sql" | "mysql" | "jsx" | "tsx")[];
17
+ export declare const langNames: ("json" | "javascript" | "typescript" | "mongodb" | "sql" | "mysql" | "markdown" | "jsx" | "tsx")[];
15
18
  export type LanguageName = keyof typeof langs;
16
19
  export declare function loadLanguage(name: LanguageName): import("@codemirror/language").LanguageSupport;
17
20
  export declare function format(value: any): Promise<any>;
@@ -1,5 +1,8 @@
1
+ import { languages } from '@codemirror/language-data';
1
2
  import { javascript } from '@codemirror/lang-javascript';
2
3
  import { sql, MySQL } from '@codemirror/lang-sql';
4
+ import { json } from '@codemirror/lang-json';
5
+ import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
3
6
  import jsbeautifier from 'js-beautify';
4
7
  import { mongodb } from './mongodb';
5
8
  export const langs = {
@@ -10,6 +13,8 @@ export const langs = {
10
13
  mongodb,
11
14
  sql,
12
15
  mysql: () => sql({ dialect: MySQL }),
16
+ json,
17
+ markdown: () => markdown({ base: markdownLanguage, codeLanguages: languages }),
13
18
  };
14
19
  /** Language list */
15
20
  export const langNames = Object.keys(langs);
@@ -6,7 +6,7 @@ import { useSize, useStringProp } from '../../utils/hooks/useFormLegacy';
6
6
  * 输入类组件包裹,添加前后文字
7
7
  */
8
8
  export const WdInputGroup = (props) => {
9
- const { children, classRoot = '', readOnly } = props;
9
+ const { children, classRoot = '', readOnly, onClick } = props;
10
10
  const { classPrefix } = useConfig();
11
11
  const { before, after } = useStringProp(props);
12
12
  const size = useSize(props);
@@ -19,7 +19,7 @@ export const WdInputGroup = (props) => {
19
19
  const afterCls = `${inputGroup}__addon ${inputGroup}__addon-right ${root}__text-after`;
20
20
  const contentCls = `${inputGroup}__content`;
21
21
  if (!readOnly && (before || after)) {
22
- return (_jsxs("div", { className: inputGroupCls, children: [before && _jsx("div", { className: beforeCls, children: before }), _jsx("div", { className: contentCls, children: children }), after && _jsx("div", { className: afterCls, children: after })] }));
22
+ return (_jsxs("div", { className: inputGroupCls, children: [before && (_jsx("div", { className: beforeCls, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick('beforeText'), children: before })), _jsx("div", { className: contentCls, children: children }), after && (_jsx("div", { className: afterCls, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick('afterText'), children: after }))] }));
23
23
  }
24
24
  return _jsx(_Fragment, { children: children });
25
25
  };
@@ -40,8 +40,8 @@ export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType &
40
40
  borderedH5?: boolean;
41
41
  borderedPc?: boolean;
42
42
  rules?: {
43
- pattern?: string;
44
43
  format: string;
44
+ pattern: string;
45
45
  message: string;
46
46
  }[];
47
47
  requiredFlag?: boolean;
@@ -78,6 +78,13 @@ export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType &
78
78
  detail: import("@sinclair/typebox").TObject<{
79
79
  originValue: import("@sinclair/typebox").TString;
80
80
  }>;
81
+ }, {
82
+ name: string;
83
+ title: string;
84
+ description: string;
85
+ detail: import("@sinclair/typebox").TObject<{
86
+ type: import("@sinclair/typebox").TString;
87
+ }>;
81
88
  }]>> & {
82
89
  wrapClassName?: string;
83
90
  classRoot?: string;
@@ -159,12 +159,22 @@ export const WdInput = forwardRef(function WdInput(props, ref) {
159
159
  layout: props.layout,
160
160
  readBeforeAfter: !isUnionValue,
161
161
  };
162
- const inputGroupProps = { before, after, classRoot, size };
162
+ const inputAdornmentClick = (type) => {
163
+ var _a;
164
+ (_a = events === null || events === void 0 ? void 0 : events.inputAdornmentClick) === null || _a === void 0 ? void 0 : _a.call(events, { type });
165
+ };
166
+ const inputGroupProps = {
167
+ before,
168
+ after,
169
+ classRoot,
170
+ size,
171
+ onClick: inputAdornmentClick,
172
+ };
163
173
  if (!visible)
164
174
  return null;
165
175
  return (_jsx(WdFormItem, { ...formItemProps, children: _jsx(WdInputGroup, { ...inputGroupProps, children: _jsxs("div", { className: `${cls} ${template === 'greySearchBox'
166
176
  ? 'wd-input-input-search template search-box color-grey is-pc-bordered'
167
177
  : ''} ${template === 'whiteSearchBox'
168
178
  ? 'wd-input-input-search template search-box color-white is-pc-bordered'
169
- : ''} ${isH5 ? 'is-h5-borderless' : ''}`, ref: wrapRef, onFocus: () => { var _a, _b; return (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add('is-focused'); }, onBlur: () => { var _a, _b; return (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.remove('is-focused'); }, children: [prefixType && (_jsx("div", { className: prefixCls, children: _jsx(WdIcon, { size: iconSize, name: prefixIcon, type: prefixType, src: prefixSrc, className: prefixIconCls }) })), _jsx("div", { className: contentCls, children: _jsx("input", { id: inputId, className: inputCls, type: inputType, placeholder: placeholder, value: currentInputValue !== null && currentInputValue !== void 0 ? currentInputValue : '', disabled: disabled, name: name, autoFocus: focus, autoComplete: "off", maxLength: maxLength, onChange: onChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onCompositionStart: handleZhStart, onCompositionEnd: handleZhEnd, ...startWithOnProps }) }), hasClearIcon && (_jsx("div", { className: suffixCls, children: _jsx(WdIcon, { size: iconSize, className: `${classPrefix}-icon__trigger`, name: "td:close-circle-filled", onMouseDown: onClear }) })), !hasClearIcon && suffixType && (_jsx("div", { className: suffixCls, children: _jsx(WdIcon, { size: iconSize, name: suffixIcon, type: suffixType, src: suffixSrc, className: suffixIconCls }) })), counterVisible && (_jsxs("span", { className: countCls, children: [counter, "/", maxLength] }))] }) }) }));
179
+ : ''} ${isH5 ? 'is-h5-borderless' : ''}`, ref: wrapRef, onFocus: () => { var _a, _b; return (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add('is-focused'); }, onBlur: () => { var _a, _b; return (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.remove('is-focused'); }, children: [prefixType && (_jsx("div", { className: prefixCls, onClick: () => inputAdornmentClick('prefix'), children: _jsx(WdIcon, { size: iconSize, name: prefixIcon, type: prefixType, src: prefixSrc, className: prefixIconCls }) })), _jsx("div", { className: contentCls, children: _jsx("input", { id: inputId, className: inputCls, type: inputType, placeholder: placeholder, value: currentInputValue !== null && currentInputValue !== void 0 ? currentInputValue : '', disabled: disabled, name: name, autoFocus: focus, autoComplete: "off", maxLength: maxLength, onChange: onChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onCompositionStart: handleZhStart, onCompositionEnd: handleZhEnd, ...startWithOnProps }) }), hasClearIcon && (_jsx("div", { className: suffixCls, children: _jsx(WdIcon, { size: iconSize, className: `${classPrefix}-icon__trigger`, name: "td:close-circle-filled", onMouseDown: onClear }) })), !hasClearIcon && suffixType && (_jsx("div", { className: suffixCls, onClick: () => inputAdornmentClick('suffix'), children: _jsx(WdIcon, { size: iconSize, name: suffixIcon, type: suffixType, src: suffixSrc, className: suffixIconCls }) })), counterVisible && (_jsxs("span", { className: countCls, children: [counter, "/", maxLength] }))] }) }) }));
170
180
  });
@@ -70,5 +70,12 @@ export declare const WdInputEmail: React.ForwardRefExoticComponent<CommonPropsTy
70
70
  detail: import("@sinclair/typebox").TObject<{
71
71
  originValue: import("@sinclair/typebox").TString;
72
72
  }>;
73
+ }, {
74
+ name: string;
75
+ title: string;
76
+ description: string;
77
+ detail: import("@sinclair/typebox").TObject<{
78
+ type: import("@sinclair/typebox").TString;
79
+ }>;
73
80
  }]>> & React.RefAttributes<unknown>>;
74
81
  export type WdInputEmailProps = CommonPropsType & DataType & EventsType & {};
@@ -35,6 +35,13 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
35
35
  detail: import("@sinclair/typebox").TObject<{
36
36
  originValue: import("@sinclair/typebox").TString;
37
37
  }>;
38
+ }, {
39
+ name: string;
40
+ title: string;
41
+ description: string;
42
+ detail: import("@sinclair/typebox").TObject<{
43
+ type: import("@sinclair/typebox").TString;
44
+ }>;
38
45
  }]>> & import("type-fest").Simplify<{
39
46
  type?: string;
40
47
  label?: string;
@@ -71,8 +78,8 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
71
78
  borderedH5?: boolean;
72
79
  borderedPc?: boolean;
73
80
  rules?: {
74
- pattern?: string;
75
81
  format: string;
82
+ pattern: string;
76
83
  message: string;
77
84
  }[];
78
85
  requiredFlag?: boolean;
@@ -35,6 +35,13 @@ export declare const WdInputUrl: React.ForwardRefExoticComponent<CommonPropsType
35
35
  detail: import("@sinclair/typebox").TObject<{
36
36
  originValue: import("@sinclair/typebox").TString;
37
37
  }>;
38
+ }, {
39
+ name: string;
40
+ title: string;
41
+ description: string;
42
+ detail: import("@sinclair/typebox").TObject<{
43
+ type: import("@sinclair/typebox").TString;
44
+ }>;
38
45
  }]>> & import("type-fest").Simplify<{
39
46
  label?: string;
40
47
  template?: string;
@@ -16,7 +16,7 @@ import { useDebouncedCallback, useSyncedRef } from '@react-hookz/web';
16
16
  * 下拉多选-标准化
17
17
  */
18
18
  export const WdSelectMultiple = forwardRef(function WdSelectMultiple(props, ref) {
19
- const { classRoot = 'select-multiple', clearable = X_RUNTIME_DEFAULT.clearable, placeholder, range, enumName, format, primaryField, tipBlock = X_RUNTIME_DEFAULT.tipBlock, viewId, dataSourceName, events = emptyObject, ignoreCase = X_RUNTIME_DEFAULT.ignoreCase, staticSearchable = X_RUNTIME_DEFAULT.staticSearchable, } = props;
19
+ const { classRoot = 'select-multiple', clearable = X_RUNTIME_DEFAULT.clearable, placeholder, range, enumName, format, primaryField, tipBlock = X_RUNTIME_DEFAULT.tipBlock, viewId, dataSourceName, events = emptyObject, ignoreCase = X_RUNTIME_DEFAULT.ignoreCase, staticSearchable = X_RUNTIME_DEFAULT.staticSearchable, where = X_RUNTIME_DEFAULT.where, } = props;
20
20
  const [options, setOptions] = useState([]);
21
21
  const [innerHandle, setInnerHandle] = useState({});
22
22
  const traitProps = { ...props, inputRef: ref, setInnerHandle };
@@ -74,5 +74,5 @@ export const WdSelectMultiple = forwardRef(function WdSelectMultiple(props, ref)
74
74
  }, [debouncedTriggerSearchEvent]);
75
75
  if (!visible)
76
76
  return null;
77
- return (_jsx(WdFormItem, { ...formItemProps, children: _jsx(WdInputGroup, { ...inputGroupProps, children: _jsx(WdInputWrap, { ...inputWrapProps, children: _jsx(RecycleProvider, { readOnly: readOnly, recycleBack: setOptions, children: _jsx(SelectMultiple, { events: delayEvents, labelVisible: false, defaultValue: value, enumName: enumName, format: format, placeholder: placeholder, primaryField: primaryField, range: range, size: "full", tipBlock: tipBlock, viewId: viewId, dataSourceName: dataSourceName, readOnly: readOnly, disabled: disabled, mode: "selector", decorator: null, ignoreCase: ignoreCase, staticSearchable: staticSearchable, onChange: onChange, onSearchValueInput: onSearchValueInput }) }) }) }) }));
77
+ return (_jsx(WdFormItem, { ...formItemProps, children: _jsx(WdInputGroup, { ...inputGroupProps, children: _jsx(WdInputWrap, { ...inputWrapProps, children: _jsx(RecycleProvider, { readOnly: readOnly, recycleBack: setOptions, children: _jsx(SelectMultiple, { events: delayEvents, labelVisible: false, defaultValue: value, enumName: enumName, format: format, placeholder: placeholder, primaryField: primaryField, range: range, size: "full", tipBlock: tipBlock, viewId: viewId, dataSourceName: dataSourceName, readOnly: readOnly, disabled: disabled, mode: "selector", decorator: null, ignoreCase: ignoreCase, staticSearchable: staticSearchable, where: where, onChange: onChange, onSearchValueInput: onSearchValueInput }) }) }) }) }));
78
78
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.7.14",
3
+ "version": "3.8.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",
@@ -85,7 +85,10 @@
85
85
  "@cloudbase/weda-client": "^1.1.4",
86
86
  "@codemirror/autocomplete": "^6.16.0",
87
87
  "@codemirror/lang-javascript": "^6.2.2",
88
+ "@codemirror/lang-json": "^6.0.1",
89
+ "@codemirror/lang-markdown": "^6.2.5",
88
90
  "@codemirror/lang-sql": "^6.6.4",
91
+ "@codemirror/language-data": "^6.5.1",
89
92
  "@loadable/component": "^5.15.3",
90
93
  "@react-hookz/web": "^23.0.0",
91
94
  "@sinclair/typebox": "^0.29.6",
@@ -96,7 +99,6 @@
96
99
  "@use-gesture/react": "^10.2.27",
97
100
  "await-to-js": "3.0.0",
98
101
  "bootstrap": "^5.2.3",
99
- "codemirror": "^6.0.1",
100
102
  "compressorjs": "^1.2.1",
101
103
  "dayjs": "^1.10.7",
102
104
  "destr": "^2.0.1",