@cloudbase/weda-ui 3.8.2 → 3.9.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 (61) hide show
  1. package/dist/configs/components/dataView.d.ts +15 -0
  2. package/dist/configs/components/dataView.js +104 -6
  3. package/dist/configs/components/listView.d.ts +31 -0
  4. package/dist/configs/components/listView.js +145 -24
  5. package/dist/configs/components/wd-form.d.ts +2 -0
  6. package/dist/configs/components/wd-location.d.ts +13 -0
  7. package/dist/configs/components/wd-location.js +10 -0
  8. package/dist/configs/components/wd-markdown.d.ts +110 -0
  9. package/dist/configs/components/wd-markdown.js +171 -0
  10. package/dist/configs/components/wd-menu-layout.d.ts +13 -10
  11. package/dist/configs/components/wd-menu-layout.js +12 -1
  12. package/dist/configs/components/wd-menu-nav-tab-layou.d.ts +27 -0
  13. package/dist/configs/components/wd-menu-nav-tab-layou.js +31 -0
  14. package/dist/configs/components/wd-side-tab.js +1 -0
  15. package/dist/configs/components/wd-table.d.ts +3 -1
  16. package/dist/configs/components/wd-table.js +1 -0
  17. package/dist/configs/components/wd-top-tab.js +1 -0
  18. package/dist/configs/components/wd-upload-image.js +1 -1
  19. package/dist/configs/components/web-view.d.ts +6 -15
  20. package/dist/configs/components/web-view.js +12 -15
  21. package/dist/configs/index.d.ts +404 -40
  22. package/dist/configs/index.js +4 -0
  23. package/dist/configs/type-utils/error.d.ts +1 -0
  24. package/dist/configs/type-utils/error.js +3 -0
  25. package/dist/configs/utils/layout.d.ts +1 -1
  26. package/dist/configs/utils/layout.js +219 -7
  27. package/dist/style/index.scss +1 -1
  28. package/dist/web/components/dataView/index.js +5 -3
  29. package/dist/web/components/form/location/components/LocationH5/location.h5.js +19 -3
  30. package/dist/web/components/form/location/components/LocationPC/location.PC.js +7 -1
  31. package/dist/web/components/index.d.ts +2 -0
  32. package/dist/web/components/index.js +4 -0
  33. package/dist/web/components/listView/index.js +48 -13
  34. package/dist/web/components/listView/interface.d.ts +4 -0
  35. package/dist/web/components/listView/useQueryParams.d.ts +11 -0
  36. package/dist/web/components/listView/useQueryParams.js +23 -0
  37. package/dist/web/components/richTextView/index.js +4 -38
  38. package/dist/web/components/richTextView/useImgTransform.d.ts +1 -0
  39. package/dist/web/components/richTextView/useImgTransform.js +47 -0
  40. package/dist/web/components/slot/index.js +2 -1
  41. package/dist/web/components/wd-form/index.d.ts +1 -0
  42. package/dist/web/components/wd-location/wd-location.js +2 -2
  43. package/dist/web/components/wd-markdown/github-markdown-light.css +1139 -0
  44. package/dist/web/components/wd-markdown/index.d.ts +4 -0
  45. package/dist/web/components/wd-markdown/index.js +3 -0
  46. package/dist/web/components/wd-markdown/style.d.ts +3 -0
  47. package/dist/web/components/wd-markdown/style.js +3 -0
  48. package/dist/web/components/wd-markdown/wd-markdown.d.ts +7 -0
  49. package/dist/web/components/wd-markdown/wd-markdown.js +96 -0
  50. package/dist/web/components/wd-menu-layout/components/H5Menu.js +4 -1
  51. package/dist/web/components/wd-menu-layout/components/NavTabMenu.d.ts +3 -0
  52. package/dist/web/components/wd-menu-layout/components/NavTabMenu.js +7 -0
  53. package/dist/web/components/wd-menu-layout/wd-menu-layout.js +5 -2
  54. package/dist/web/components/wd-menu-nav-tab-layout/index.d.ts +6 -0
  55. package/dist/web/components/wd-menu-nav-tab-layout/index.js +5 -0
  56. package/dist/web/components/wd-table/components/FieldRender/index.js +5 -2
  57. package/dist/web/utils/error.d.ts +13 -0
  58. package/dist/web/utils/error.js +11 -0
  59. package/dist/web/utils/getModelParams.d.ts +2 -0
  60. package/dist/web/utils/getModelParams.js +73 -4
  61. package/package.json +4 -1
@@ -78,6 +78,7 @@ declare const config: {
78
78
  'x-component': string;
79
79
  'x-component-props': {
80
80
  dataContainerType: string;
81
+ methodName: string;
81
82
  };
82
83
  'x-props': {
83
84
  'data-hidebind': boolean;
@@ -96,6 +97,15 @@ declare const config: {
96
97
  schema: {
97
98
  'x-component-props': string;
98
99
  };
100
+ } | {
101
+ type: string;
102
+ target: string;
103
+ schema: {
104
+ 'x-component-props': {
105
+ dataSourceName: string;
106
+ };
107
+ };
108
+ condition?: undefined;
99
109
  })[];
100
110
  description: string;
101
111
  };
@@ -176,6 +186,9 @@ declare const config: {
176
186
  description: string;
177
187
  };
178
188
  isSupportApis: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
189
+ selectFieldType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
190
+ selectFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
191
+ supportManyRelated: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
179
192
  };
180
193
  };
181
194
  events: ({
@@ -192,11 +205,13 @@ declare const config: {
192
205
  requestid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
193
206
  message: import("@sinclair/typebox").TString;
194
207
  code: import("@sinclair/typebox").TString;
208
+ original: import("@sinclair/typebox").TAny;
195
209
  }>;
196
210
  }>;
197
211
  })[];
198
212
  properties: import("@sinclair/typebox").TObject<{
199
213
  record: import("@sinclair/typebox").TObject<{}>;
214
+ dataSourceVersion: import("@sinclair/typebox").TString;
200
215
  }>;
201
216
  methods: ({
202
217
  name: string;
@@ -153,7 +153,7 @@ whiteSpace = 'pre-line'
153
153
  const $attached_template = `
154
154
  {{#with $self as |$self|}}
155
155
  {{#with 'sys_user' as |_datasourceName| }}
156
- {{#with 'wedaGetRecords' as |_methodName| }}
156
+ {{#with 'wedaGetRecordsV2' as |_methodName| }}
157
157
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
158
158
  ${rawTemplate}
159
159
  {{/with}}
@@ -164,10 +164,28 @@ ${rawTemplate}
164
164
 
165
165
  [attributes]
166
166
  isSupportApis = false
167
- ':queryCondition'='[{"$and":[{"$and":[{"type":{"$eq":0}}]}]}]'
167
+ supportManyRelated=true
168
+ ':queryCondition'='{
169
+ "where": {
170
+ "$and": [
171
+ {
172
+ "$and": [
173
+ {
174
+ "type": {
175
+ "$eq": 0
176
+ }
177
+ }
178
+ ]
179
+ }
180
+ ]
181
+ },
182
+ "relateWhere": {}
183
+ }'
168
184
  [attributes.datasource]
169
185
  type='datamodal'
170
186
  name='sys_user'
187
+ [attributes.datasource.extra]
188
+ methodName='wedaGetRecordsV2'
171
189
  `;
172
190
  const attributes_template = `
173
191
  {{#with $self as |$self|}}
@@ -194,7 +212,7 @@ const attributes_template = `
194
212
  }"
195
213
  {{else}}
196
214
  {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') $self.attributes.datasource.name $self.attributes.bindConnectMetadata.datasource.name) as |_datasourceName| }}
197
- {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecords' $self.attributes.connectorMethod.name) as |_methodName| }}
215
+ {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecordsV2' $self.attributes.connectorMethod.name) as |_methodName| }}
198
216
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
199
217
  ${rawTemplate}
200
218
  {{/with}}
@@ -214,7 +232,7 @@ ${rawTemplate}
214
232
 
215
233
  {{else}}
216
234
  {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') $self.attributes.datasource.name $self.attributes.bindConnectMetadata.datasource.name) as |_datasourceName| }}
217
- {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecords' $self.attributes.connectorMethod.name) as |_methodName| }}
235
+ {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecordsV2' $self.attributes.connectorMethod.name) as |_methodName| }}
218
236
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
219
237
  ${rawTemplate}
220
238
  {{/with}}
@@ -227,7 +245,7 @@ ${rawTemplate}
227
245
  const query_condition_template = `
228
246
  {{#with $self as |$self|}}
229
247
  {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') $self.attributes.datasource.name $self.attributes.bindConnectMetadata.datasource.name) as |_datasourceName| }}
230
- {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecords' $self.attributes.connectorMethod.name) as |_methodName| }}
248
+ {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecordsV2' $self.attributes.connectorMethod.name) as |_methodName| }}
231
249
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
232
250
  ${rawTemplate}
233
251
  {{/with}}
@@ -243,6 +261,10 @@ const properties = Type.Object({
243
261
  title: '数据记录',
244
262
  description: '数据记录',
245
263
  }),
264
+ dataSourceVersion: Type.String({
265
+ title: '数据源协议版本',
266
+ description: '数据源类型为数据模型时,数据详情支持的数据源协议版本',
267
+ }),
246
268
  });
247
269
  const config = {
248
270
  $schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
@@ -271,7 +293,7 @@ const config = {
271
293
  'x-linkages': [
272
294
  {
273
295
  type: 'value:state',
274
- target: '*(orderType,queryCondition,orderBy,datasource)',
296
+ target: '*(orderType,queryCondition,orderBy,datasource,selectFieldType)',
275
297
  condition: "{{$self.value ==='data-model'}}",
276
298
  state: {
277
299
  display: true,
@@ -378,6 +400,7 @@ const config = {
378
400
  'x-component': 'datasource-selector',
379
401
  'x-component-props': {
380
402
  dataContainerType: 'dataView',
403
+ methodName: 'wedaGetRecordsV2',
381
404
  },
382
405
  'x-props': {
383
406
  'data-hidebind': true,
@@ -398,6 +421,15 @@ const config = {
398
421
  'x-component-props': '{{{selectedDataSourceName: $value && $value.name}}}',
399
422
  },
400
423
  },
424
+ {
425
+ type: 'value:schema',
426
+ target: 'selectFields',
427
+ schema: {
428
+ 'x-component-props': {
429
+ dataSourceName: '{{$self.value && $self.value.name}}',
430
+ },
431
+ },
432
+ },
401
433
  ],
402
434
  description: '展示模型数据的数据来源',
403
435
  },
@@ -537,6 +569,72 @@ const config = {
537
569
  },
538
570
  ],
539
571
  })),
572
+ selectFieldType: Type.Optional(Type.StringEnum({
573
+ title: '字段查询范围',
574
+ type: 'string',
575
+ enum: [
576
+ { label: '全部字段', value: 'all' },
577
+ { label: '本表字段', value: 'main' },
578
+ { label: '自定义', value: 'custom' },
579
+ ],
580
+ 'x-runtime-default': 'main',
581
+ 'x-props': { clearable: true },
582
+ description: '默认查询本表字段',
583
+ 'x-index': 40,
584
+ 'x-category': '数据',
585
+ 'x-linkages': [
586
+ {
587
+ type: 'value:visible',
588
+ target: 'selectFields',
589
+ condition: '{{$self.value === "custom"}}',
590
+ },
591
+ ],
592
+ })),
593
+ selectFields: Type.Optional(Type.Array(Type.String(), {
594
+ title: '自定义查询字段',
595
+ type: 'array',
596
+ 'x-props': { clearable: true },
597
+ 'x-index': 50,
598
+ 'x-category': '数据',
599
+ 'x-component': 'mutilp-data-source-field-select',
600
+ 'x-component-props': {
601
+ dataSourceName: '',
602
+ splitRelation: true,
603
+ enableSetProcedure: false,
604
+ enableConfigTitle: false,
605
+ },
606
+ })),
607
+ supportManyRelated: Type.Optional(Type.Boolean({
608
+ title: '支持v2协议',
609
+ description: '标记是否支持v2协议',
610
+ 'x-category': '数据',
611
+ 'x-index': 60,
612
+ display: false,
613
+ default: false,
614
+ 'x-platforms': [''],
615
+ 'x-linkages': [
616
+ {
617
+ type: 'value:schema',
618
+ schema: {
619
+ type: 'object',
620
+ 'x-component': 'datasource-condition-where-query-editor',
621
+ 'x-component-props': {
622
+ propertyPath: 'queryCondition',
623
+ dataSourcePath: 'datasource.name',
624
+ preWherePath: 'where',
625
+ enableKeyIsRelation: true,
626
+ },
627
+ },
628
+ condition: '{{ Boolean($self.value) }}',
629
+ target: '*(queryCondition)',
630
+ },
631
+ {
632
+ type: 'value:visible',
633
+ target: 'selectFieldType',
634
+ condition: '{{ Boolean($self.value) }}',
635
+ },
636
+ ],
637
+ })),
540
638
  },
541
639
  },
542
640
  events: [
@@ -113,6 +113,7 @@ declare const _default: {
113
113
  'x-component': string;
114
114
  'x-component-props': {
115
115
  dataContainerType: string;
116
+ methodName: string;
116
117
  };
117
118
  'x-props': {
118
119
  'data-hidebind': boolean;
@@ -165,6 +166,18 @@ declare const _default: {
165
166
  enum?: undefined;
166
167
  };
167
168
  state?: undefined;
169
+ } | {
170
+ type: string;
171
+ target: string;
172
+ schema: {
173
+ 'x-component-props': {
174
+ dataSourceName: string;
175
+ };
176
+ enum?: undefined;
177
+ 'x-props'?: undefined;
178
+ };
179
+ condition?: undefined;
180
+ state?: undefined;
168
181
  })[];
169
182
  description: string;
170
183
  };
@@ -332,6 +345,8 @@ declare const _default: {
332
345
  }[];
333
346
  description: string;
334
347
  };
348
+ selectFieldType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
349
+ selectFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
335
350
  pagination: {
336
351
  'x-index': number;
337
352
  title: string;
@@ -371,6 +386,18 @@ declare const _default: {
371
386
  description: string;
372
387
  display: boolean;
373
388
  };
389
+ pageIndex: {
390
+ 'x-index': number;
391
+ title: string;
392
+ type: string;
393
+ default: number;
394
+ 'x-group': string;
395
+ 'x-props': {
396
+ min: number;
397
+ };
398
+ description: string;
399
+ display: boolean;
400
+ };
374
401
  enableTotal: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
375
402
  total: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
376
403
  emptyText: {
@@ -414,6 +441,7 @@ declare const _default: {
414
441
  description: string;
415
442
  };
416
443
  isSupportApis: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
444
+ supportManyRelated: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
417
445
  };
418
446
  };
419
447
  events: ({
@@ -430,6 +458,7 @@ declare const _default: {
430
458
  requestid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
431
459
  message: import("@sinclair/typebox").TString;
432
460
  code: import("@sinclair/typebox").TString;
461
+ original: import("@sinclair/typebox").TAny;
433
462
  }>;
434
463
  }>;
435
464
  } | {
@@ -452,7 +481,9 @@ declare const _default: {
452
481
  requestid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
453
482
  message: import("@sinclair/typebox").TString;
454
483
  code: import("@sinclair/typebox").TString;
484
+ original: import("@sinclair/typebox").TAny;
455
485
  }>;
486
+ dataSourceVersion: import("@sinclair/typebox").TString;
456
487
  }>;
457
488
  methods: ({
458
489
  name: string;
@@ -1,5 +1,16 @@
1
1
  import { Type } from '../type-utils';
2
2
  import { genericErrorType } from '../type-utils/error';
3
+ const stringTemplate = `
4
+ {{#with (helper_utils 'get' _field 'name') as |_name|}}
5
+ {{#with (helper_utils '||' (helper_utils 'get' _field 'format') '_fake') as |_format|}}
6
+ {{#if (helper_utils 'isEqual' _format 'x-enum')}}
7
+ ':text'='app.utils.formatEnum($w.item_{{$self.id}}.{{_name}}, \`{{helper_utils 'get' _field 'x-option-name'}}\`, app)'
8
+ {{else}}
9
+ ':text'='$w.item_{{$self.id}}.{{_name}}'
10
+ {{/if}}
11
+ {{/with}}
12
+ {{/with}}
13
+ `;
3
14
  const rawTemplate = `
4
15
  [extra.commonStyle.padding]
5
16
  bottom='8PX'
@@ -56,8 +67,8 @@ gap='4PX'
56
67
  [[template.items.items.items]]
57
68
  component = 'WdText'
58
69
  [template.items.items.items.attributes]
59
- {{#with (helper_utils 'get' _stringFields '[0].name') as |_name0|}}
60
- ':text'='$w.item_{{$self.id}}.{{_name0}}'
70
+ {{#with (helper_utils 'get' _stringFields '[0]') as |_field|}}
71
+ ${stringTemplate}
61
72
  {{/with}}
62
73
  level='title-8'
63
74
  textAlign = 'left'
@@ -67,8 +78,8 @@ component = 'WdText'
67
78
  [template.items.items.items.extra.commonStyle.text]
68
79
  color='var(--wd-color-text-placeholder)'
69
80
  [template.items.items.items.attributes]
70
- {{#with (helper_utils 'get' _stringFields '[1].name') as |_name1|}}
71
- ':text'='$w.item_{{$self.id}}.{{_name1}}'
81
+ {{#with (helper_utils 'get' _stringFields '[1]') as |_field|}}
82
+ ${stringTemplate}
72
83
  {{/with}}
73
84
  level='body-sm'
74
85
  overflow=true
@@ -138,8 +149,8 @@ wordBreak = 'break-all'
138
149
  [[template.items.items.items]]
139
150
  component = 'WdText'
140
151
  [template.items.items.items.attributes]
141
- {{#with (helper_utils 'get' _stringFields '[0].name') as |_name0|}}
142
- ':text'='$w.item_{{$self.id}}.{{_name0}}'
152
+ {{#with (helper_utils 'get' _stringFields '[0]') as |_field|}}
153
+ ${stringTemplate}
143
154
  {{/with}}
144
155
  level='title-8'
145
156
  textAlign = 'left'
@@ -170,8 +181,8 @@ color='var(--wd-color-text-placeholder)'
170
181
  [[template.items.items.items.items]]
171
182
  component='WdText'
172
183
  [template.items.items.items.items.attributes]
173
- {{#with (helper_utils 'get' _stringFields (helper_utils 'join' (helper_utils 'concat' '[' (helper_utils '+' @index 1) '].name') '')) as |_name|}}
174
- ':text'='$w.item_{{$self.id}}.{{_name}}'
184
+ {{#with (helper_utils 'get' _stringFields (helper_utils 'join' (helper_utils 'concat' '[' (helper_utils '+' @index 1) ']') '')) as |_field|}}
185
+ ${stringTemplate}
175
186
  {{/with}}
176
187
  overflow=true
177
188
  level='body-sm'
@@ -280,8 +291,8 @@ component = 'WdText'
280
291
  [template.items.items.items.attributes]
281
292
  level='title-8'
282
293
  textAlign = 'left'
283
- {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) '[0].name') as |_name0|}}
284
- ':text'='$w.item_{{$self.id}}.{{_name0}}'
294
+ {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) '[0]') as |_field|}}
295
+ ${stringTemplate}
285
296
  {{/with}}
286
297
 
287
298
  [[template.items.items.items]]
@@ -290,8 +301,8 @@ component = 'WdText'
290
301
  maxLines = '2'
291
302
  level='body-sm'
292
303
  overflow=true
293
- {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) '[1].name') as |_name1|}}
294
- ':text'='$w.item_{{$self.id}}.{{_name1}}'
304
+ {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) '[1]') as |_field|}}
305
+ ${stringTemplate}
295
306
  {{/with}}
296
307
  textAlign = 'left'
297
308
  [template.items.items.items.extra.commonStyle.text]
@@ -420,8 +431,8 @@ level='body-sm'
420
431
  level='body-sm'
421
432
  overflow=true
422
433
  {{/if}}
423
- {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) (helper_utils 'join' (helper_utils 'concat' '[' @index '].name') '')) as |_name|}}
424
- ':text'='$w.item_{{$self.id}}.{{_name}}'
434
+ {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) (helper_utils 'join' (helper_utils 'concat' '[' @index ']') '')) as |_field|}}
435
+ ${stringTemplate}
425
436
  {{/with}}
426
437
  [template.items.items.items.items.items.extra.commonStyle.text]
427
438
  {{#if (helper_utils '!==' @index 0)}}
@@ -537,8 +548,8 @@ maxLines='2'
537
548
  overflow=true
538
549
  textAlign = 'left'
539
550
  text='商品名称'
540
- {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) '[0].name') as |_name0|}}
541
- ':text'='$w.item_{{$self.id}}.{{_name0}}'
551
+ {{#with (helper_utils 'get' (helper_utils 'reject' _stringFields (helper_utils 'concat' 'format' 'x-image')) '[0]') as |_field|}}
552
+ ${stringTemplate}
542
553
  {{/with}}
543
554
 
544
555
  [[template.items.items.items.items.items]]
@@ -576,8 +587,8 @@ component = 'WdText'
576
587
  [template.items.items.items.items.items.items.items.attributes]
577
588
  level='body-md'
578
589
  text='48.00'
579
- {{#with (helper_utils 'get' (helper_utils 'filter' (helper_utils 'filter' _fields (helper_utils 'concat' 'type' 'number')) (helper_utils 'concat' 'format' '')) '[0].name') as |_name0|}}
580
- ':text'='$w.item_{{$self.id}}.{{_name0}}'
590
+ {{#with (helper_utils 'get' (helper_utils 'filter' (helper_utils 'filter' _fields (helper_utils 'concat' 'type' 'number')) (helper_utils 'concat' 'format' '')) '[0]') as | _field|}}
591
+ ${stringTemplate}
581
592
  {{/with}}
582
593
  textAlign = 'left'
583
594
  [template.items.items.items.items.items.items.items.extra.commonStyle.text]
@@ -615,7 +626,7 @@ component = 'Container'
615
626
  const $attached_template = `
616
627
  {{#with $self as |$self|}}
617
628
  {{#with 'sys_user' as |_datasourceName| }}
618
- {{#with 'wedaGetRecords' as |_methodName| }}
629
+ {{#with 'wedaGetRecordsV2' as |_methodName| }}
619
630
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
620
631
  ${rawTemplate}
621
632
  {{/with}}
@@ -626,10 +637,28 @@ ${rawTemplate}
626
637
  [attributes]
627
638
  isSupportApis = false
628
639
  isSetStatus=true
629
- ':queryCondition'='[{"$and":[{"$and":[{"type":{"$eq":0}}]}]}]'
640
+ supportManyRelated=true
641
+ ':queryCondition'='{
642
+ "where": {
643
+ "$and": [
644
+ {
645
+ "$and": [
646
+ {
647
+ "type": {
648
+ "$eq": 0
649
+ }
650
+ }
651
+ ]
652
+ }
653
+ ]
654
+ },
655
+ "relateWhere": {}
656
+ }'
630
657
  [attributes.datasource]
631
658
  type='datamodal'
632
659
  name='sys_user'
660
+ [attributes.datasource.extra]
661
+ methodName='wedaGetRecordsV2'
633
662
  `;
634
663
  const attributes_template = `
635
664
  {{#with $self as |$self|}}
@@ -662,7 +691,7 @@ const attributes_template = `
662
691
  {{/with}}
663
692
  {{else}}
664
693
  {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') $self.attributes.datasource.name $self.attributes.bindConnectMetadata.datasource.name) as |_datasourceName| }}
665
- {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecords' $self.attributes.connectorMethod.name) as |_methodName| }}
694
+ {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecordsV2' $self.attributes.connectorMethod.name) as |_methodName| }}
666
695
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
667
696
  ${rawTemplate}
668
697
  {{/with}}
@@ -681,7 +710,7 @@ const expression_template = `
681
710
  {{/with}}
682
711
  {{else}}
683
712
  {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') $self.attributes.datasource.name $self.attributes.bindConnectMetadata.datasource.name) as |_datasourceName| }}
684
- {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecords' $self.attributes.connectorMethod.name) as |_methodName| }}
713
+ {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecordsV2' $self.attributes.connectorMethod.name) as |_methodName| }}
685
714
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
686
715
  ${rawTemplate}
687
716
  {{/with}}
@@ -695,7 +724,7 @@ ${rawTemplate}
695
724
  const query_condition_template = `
696
725
  {{#with $self as |$self|}}
697
726
  {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') $self.attributes.datasource.name $self.attributes.bindConnectMetadata.datasource.name) as |_datasourceName| }}
698
- {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecords' $self.attributes.connectorMethod.name) as |_methodName| }}
727
+ {{#with (helper_utils '?:' (helper_utils 'isEqual' $self.attributes.dataSourceType 'data-model') 'wedaGetRecordsV2' $self.attributes.connectorMethod.name) as |_methodName| }}
699
728
  {{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
700
729
  ${rawTemplate}
701
730
  {{/with}}
@@ -729,6 +758,10 @@ const properties = Type.Object({
729
758
  description: '每页大小',
730
759
  }),
731
760
  error: genericErrorType,
761
+ dataSourceVersion: Type.String({
762
+ title: '数据源协议版本',
763
+ description: '数据源类型为数据模型时,数据列表支持的数据源协议版本',
764
+ }),
732
765
  });
733
766
  export default {
734
767
  $schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
@@ -846,7 +879,7 @@ export default {
846
879
  },
847
880
  {
848
881
  type: 'value:state',
849
- target: '*(orderType,queryCondition,orderBy,datasource)',
882
+ target: '*(orderType,queryCondition,orderBy,datasource,selectFieldType)',
850
883
  condition: "{{$self.value ==='data-model'}}",
851
884
  state: {
852
885
  display: true,
@@ -955,6 +988,7 @@ export default {
955
988
  'x-component': 'datasource-selector',
956
989
  'x-component-props': {
957
990
  dataContainerType: 'listView',
991
+ methodName: 'wedaGetRecordsV2',
958
992
  },
959
993
  'x-props': {
960
994
  'data-hidebind': true,
@@ -1007,6 +1041,15 @@ export default {
1007
1041
  'x-props': "{{{disabled: false, tooltip: ''}}}",
1008
1042
  },
1009
1043
  },
1044
+ {
1045
+ type: 'value:schema',
1046
+ target: 'selectFields',
1047
+ schema: {
1048
+ 'x-component-props': {
1049
+ dataSourceName: '{{$self.value && $self.value.name}}',
1050
+ },
1051
+ },
1052
+ },
1010
1053
  ],
1011
1054
  description: '展示模型数据的数据来源',
1012
1055
  },
@@ -1213,6 +1256,41 @@ export default {
1213
1256
  ],
1214
1257
  description: '设置升序或降序',
1215
1258
  },
1259
+ selectFieldType: Type.Optional(Type.StringEnum({
1260
+ title: '字段查询范围',
1261
+ type: 'string',
1262
+ enum: [
1263
+ { label: '全部字段', value: 'all' },
1264
+ { label: '本表字段', value: 'main' },
1265
+ { label: '自定义', value: 'custom' },
1266
+ ],
1267
+ 'x-runtime-default': 'main',
1268
+ 'x-props': { clearable: true },
1269
+ description: '默认查询本表字段',
1270
+ 'x-index': 41,
1271
+ 'x-group': '数据',
1272
+ 'x-linkages': [
1273
+ {
1274
+ type: 'value:visible',
1275
+ target: 'selectFields',
1276
+ condition: '{{$self.value === "custom"}}',
1277
+ },
1278
+ ],
1279
+ })),
1280
+ selectFields: Type.Optional(Type.Array(Type.String(), {
1281
+ title: '自定义查询字段',
1282
+ type: 'array',
1283
+ 'x-props': { clearable: true },
1284
+ 'x-index': 42,
1285
+ 'x-group': '数据',
1286
+ 'x-component': 'mutilp-data-source-field-select',
1287
+ 'x-component-props': {
1288
+ dataSourceName: '',
1289
+ splitRelation: true,
1290
+ enableSetProcedure: false,
1291
+ enableConfigTitle: false,
1292
+ },
1293
+ })),
1216
1294
  pagination: {
1217
1295
  'x-index': 50,
1218
1296
  title: '分页方式',
@@ -1273,6 +1351,18 @@ export default {
1273
1351
  description: '设置单次加载的数据条数',
1274
1352
  display: true,
1275
1353
  },
1354
+ pageIndex: {
1355
+ 'x-index': 61,
1356
+ title: '页码',
1357
+ type: 'number',
1358
+ default: 1,
1359
+ 'x-group': '分页器',
1360
+ 'x-props': {
1361
+ min: 1,
1362
+ },
1363
+ description: '初始页码',
1364
+ display: true,
1365
+ },
1276
1366
  enableTotal: Type.Optional(Type.Boolean({
1277
1367
  title: '启用动态分页',
1278
1368
  type: 'boolean',
@@ -1382,6 +1472,37 @@ export default {
1382
1472
  },
1383
1473
  ],
1384
1474
  })),
1475
+ supportManyRelated: Type.Optional(Type.Boolean({
1476
+ title: '支持v2协议',
1477
+ description: '标记是否支持v2协议',
1478
+ 'x-group': '数据',
1479
+ 'x-index': 130,
1480
+ display: false,
1481
+ default: false,
1482
+ 'x-platforms': [''],
1483
+ 'x-linkages': [
1484
+ {
1485
+ type: 'value:schema',
1486
+ schema: {
1487
+ type: 'object',
1488
+ 'x-component': 'datasource-condition-where-query-editor',
1489
+ 'x-component-props': {
1490
+ propertyPath: 'queryCondition',
1491
+ dataSourcePath: 'datasource.name',
1492
+ preWherePath: 'where',
1493
+ enableKeyIsRelation: true,
1494
+ },
1495
+ },
1496
+ condition: '{{ Boolean($self.value) }}',
1497
+ target: '*(queryCondition)',
1498
+ },
1499
+ {
1500
+ type: 'value:visible',
1501
+ target: 'selectFieldType',
1502
+ condition: '{{ Boolean($self.value) }}',
1503
+ },
1504
+ ],
1505
+ })),
1385
1506
  },
1386
1507
  },
1387
1508
  events: [
@@ -34,6 +34,7 @@ declare const events: [{
34
34
  requestid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
35
35
  message: import("@sinclair/typebox").TString;
36
36
  code: import("@sinclair/typebox").TString;
37
+ original: import("@sinclair/typebox").TAny;
37
38
  }>;
38
39
  }>;
39
40
  }];
@@ -204,6 +205,7 @@ declare const _default: {
204
205
  requestid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
205
206
  message: import("@sinclair/typebox").TString;
206
207
  code: import("@sinclair/typebox").TString;
208
+ original: import("@sinclair/typebox").TAny;
207
209
  }>;
208
210
  }>;
209
211
  }];
@@ -183,6 +183,19 @@ declare const config: {
183
183
  readonly name: string;
184
184
  readonly title: string;
185
185
  readonly description: string;
186
+ }, {
187
+ readonly title: "地图组件错误事件";
188
+ readonly name: "error";
189
+ readonly description: "地图加载失败,或地图组件使用异常时触发";
190
+ readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
191
+ readonly detail: import("@sinclair/typebox").TObject<{
192
+ error: import("@sinclair/typebox").TObject<{
193
+ requestid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
194
+ message: import("@sinclair/typebox").TString;
195
+ code: import("@sinclair/typebox").TString;
196
+ original: import("@sinclair/typebox").TAny;
197
+ }>;
198
+ }>;
186
199
  }];
187
200
  readonly meta: {
188
201
  readonly description: "用于在表单中进行地图选点定位。";