@steedos-widgets/amis-object 1.1.0-beta.2 → 1.1.0

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.
@@ -235,7 +235,6 @@ export declare const AmisInstanceDetail: (props: any) => Promise<{
235
235
  args: {
236
236
  value: {
237
237
  new_judge: string;
238
- new_next_step: any;
239
238
  next_step: any;
240
239
  };
241
240
  judge?: undefined;
@@ -274,7 +273,10 @@ export declare const AmisInstanceDetail: (props: any) => Promise<{
274
273
  id: string;
275
274
  multiple: boolean;
276
275
  required: boolean;
277
- selectFirst: boolean;
276
+ autoFill: {
277
+ new_next_step: string;
278
+ next_users: any;
279
+ };
278
280
  source: {
279
281
  url: string;
280
282
  headers: {
@@ -290,30 +292,6 @@ export declare const AmisInstanceDetail: (props: any) => Promise<{
290
292
  judge: string;
291
293
  };
292
294
  };
293
- onEvent: {
294
- change: {
295
- weight: number;
296
- actions: ({
297
- componentId: string;
298
- args: {
299
- value: {
300
- new_next_step: string;
301
- };
302
- next_step?: undefined;
303
- };
304
- actionType: string;
305
- eventName?: undefined;
306
- } | {
307
- args: {
308
- next_step: string;
309
- value?: undefined;
310
- };
311
- actionType: string;
312
- eventName: string;
313
- componentId?: undefined;
314
- })[];
315
- };
316
- };
317
295
  }[];
318
296
  id: string;
319
297
  md?: undefined;
@@ -348,27 +326,29 @@ export declare const AmisInstanceDetail: (props: any) => Promise<{
348
326
  name: string;
349
327
  id: string;
350
328
  required: boolean;
351
- multiple: string;
352
- source: {
353
- url: string;
354
- method: string;
355
- sendOn: string;
356
- headers: {
357
- Authorization: string;
358
- };
359
- messages: {};
360
- requestAdaptor: string;
361
- adaptor: string;
362
- data: {
363
- "&": string;
364
- $scopeId: string;
365
- context: string;
366
- next_step: string;
329
+ hiddenOn: string;
330
+ amis: {
331
+ multiple: string;
332
+ source: {
333
+ url: string;
334
+ method: string;
335
+ sendOn: string;
336
+ headers: {
337
+ Authorization: string;
338
+ };
339
+ messages: {};
340
+ requestAdaptor: string;
341
+ adaptor: string;
342
+ data: {
343
+ "&": string;
344
+ $scopeId: string;
345
+ context: string;
346
+ next_step: string;
347
+ };
367
348
  };
349
+ labelField: string;
350
+ valueField: string;
368
351
  };
369
- labelField: string;
370
- valueField: string;
371
- hiddenOn: string;
372
352
  })[];
373
353
  id: string;
374
354
  md?: undefined;
@@ -378,6 +358,15 @@ export declare const AmisInstanceDetail: (props: any) => Promise<{
378
358
  className: string;
379
359
  subFormMode: string;
380
360
  hiddenOn: string;
361
+ } | {
362
+ type: string;
363
+ name: string;
364
+ label?: undefined;
365
+ id?: undefined;
366
+ minRows?: undefined;
367
+ maxRows?: undefined;
368
+ placeholder?: undefined;
369
+ requiredOn?: undefined;
381
370
  } | {
382
371
  type: string;
383
372
  label: boolean;
@@ -5,88 +5,4 @@
5
5
  * !max-h-[80vh]
6
6
  * !mb-6
7
7
  */
8
- export declare const AmisSelectFlow: (props: any) => {
9
- type: any;
10
- id: any;
11
- label: any;
12
- name: any;
13
- options: any[];
14
- multiple: any;
15
- delimiter: any;
16
- joinValues: any;
17
- extractValue: any;
18
- searchable: any;
19
- showOutline: any;
20
- initiallyOpen: any;
21
- unfoldedLevel: any;
22
- className: any;
23
- required: any;
24
- treeContainerClassName: any;
25
- source: {
26
- method: string;
27
- url: string;
28
- requestAdaptor: string;
29
- headers: {
30
- Authorization: string;
31
- };
32
- };
33
- showIcon: any;
34
- showRadio: any;
35
- onlyLeaf: boolean;
36
- onEvent: any;
37
- } | {
38
- type: string;
39
- id: string;
40
- body: ({
41
- type: any;
42
- id: any;
43
- label: any;
44
- name: any;
45
- options: any[];
46
- multiple: any;
47
- delimiter: any;
48
- joinValues: any;
49
- extractValue: any;
50
- searchable: any;
51
- showOutline: any;
52
- initiallyOpen: any;
53
- unfoldedLevel: any;
54
- className: any;
55
- required: any;
56
- treeContainerClassName: any;
57
- source: {
58
- method: string;
59
- url: string;
60
- requestAdaptor: string;
61
- headers: {
62
- Authorization: string;
63
- };
64
- };
65
- showIcon: any;
66
- showRadio: any;
67
- onlyLeaf: boolean;
68
- onEvent: any;
69
- } | {
70
- type: string;
71
- className: string;
72
- name: string;
73
- enhance: boolean;
74
- onEvent: {
75
- search: {
76
- actions: ({
77
- actionType: string;
78
- componentId: string;
79
- args: {
80
- value: {
81
- keywords: string;
82
- };
83
- };
84
- } | {
85
- componentId: string;
86
- actionType: string;
87
- args?: undefined;
88
- })[];
89
- };
90
- };
91
- })[];
92
- };
8
+ export declare const AmisSelectFlow: (props: any) => any;
@@ -688,6 +688,9 @@ body {
688
688
  .text-\[15px\] {
689
689
  font-size: 15px
690
690
  }
691
+ .text-xs {
692
+ font-size: 12px
693
+ }
691
694
  .font-semibold {
692
695
  font-weight: 600
693
696
  }
@@ -1436,17 +1436,10 @@ async function getSource$1(field, ctx) {
1436
1436
  data.$value = `$${valueField}`;
1437
1437
  // data["&"] = "$$";
1438
1438
 
1439
- const fieldValue = ctx.value;
1440
-
1441
1439
  const requestAdaptor = `
1442
1440
  var filters = [['parent', '=', null]];
1443
1441
  api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters));
1444
1442
  var defaultValue = api.data.$value;
1445
- var fieldValue = ${JSON.stringify(fieldValue)};
1446
- if(!defaultValue && fieldValue){
1447
- // 如果表单中没有字段值,则认字段上配置的value属性
1448
- defaultValue = fieldValue;
1449
- }
1450
1443
  var optionsFiltersOp = "${field.multiple ? "in" : "="}";
1451
1444
  var optionsFilters = [["user", optionsFiltersOp, []]];
1452
1445
  if (defaultValue) {
@@ -4639,21 +4632,20 @@ async function lookupToAmis(field, readonly, ctx){
4639
4632
  // return await lookupToAmisGroup(field, readonly, ctx);
4640
4633
  }
4641
4634
 
4642
- if(ctx.ids || ctx.idsTrackOn){
4643
- return await lookupToAmisIdsPicker(field, readonly, ctx);
4644
- }
4645
-
4646
4635
  let referenceTo = await getReferenceTo(field);
4647
4636
  if(!referenceTo){
4648
4637
  return await lookupToAmisSelect(field, readonly, ctx);
4649
4638
  }
4650
4639
 
4651
- const refObject = await getUISchema(referenceTo.objectName);
4652
-
4653
4640
  if(referenceTo.objectName === "space_users" && field.reference_to_field === "user"){
4641
+ if(ctx.idsDependOn || field.amis){
4642
+ return await lookupToAmisIdsPicker(field, readonly, ctx);
4643
+ }
4654
4644
  return await lookupToAmisSelectUser(field, readonly, ctx);
4655
4645
  }
4656
4646
 
4647
+ const refObject = await getUISchema(referenceTo.objectName);
4648
+
4657
4649
  // 此处不参考 steedos 的 enable_enhanced_lookup 规则. 如果默认是开启弹出选择,用户选择过程操作太繁琐, 所以默认是关闭弹出选择.
4658
4650
  // 由于amis picker 目前不支持联动, 配置了depend_on时, 使用使用select ,以支持联动
4659
4651
  // TODO: 确认 amis picker 支持联动时, 清理field.depend_on判断
@@ -4688,7 +4680,7 @@ async function getIdsPickerSchema(field, readonly, ctx){
4688
4680
  }
4689
4681
  const refObjectConfig = await getUISchema(referenceTo.objectName);
4690
4682
 
4691
- const { ids, idsTrackOn } = ctx;
4683
+ const { idsDependOn } = ctx;
4692
4684
 
4693
4685
  const fields = {
4694
4686
  [referenceTo.labelField.name]: referenceTo.labelField,
@@ -4702,14 +4694,9 @@ async function getIdsPickerSchema(field, readonly, ctx){
4702
4694
  source.data.$term = "$term";
4703
4695
  source.data.$self = "$$";
4704
4696
 
4705
- if(ids && ids.length){
4706
- source.sendOn = true;
4707
- }
4708
- else {
4709
- source.sendOn = false;
4710
- }
4711
- if(idsTrackOn){
4712
- source.sendOn = `\${${idsTrackOn} && ${idsTrackOn}.length}`;
4697
+ if(idsDependOn && source.url){
4698
+ source.sendOn = `\${${idsDependOn} && ${idsDependOn}.length}`;
4699
+ source.url = `${source.url}&depend_on_${idsDependOn}=\${${idsDependOn}|join}`;
4713
4700
  }
4714
4701
 
4715
4702
  source.requestAdaptor = `
@@ -4726,10 +4713,10 @@ async function getIdsPickerSchema(field, readonly, ctx){
4726
4713
  }
4727
4714
  }
4728
4715
 
4729
- var ids = ${JSON.stringify(ids)};
4730
- var idsTrackOn = "${idsTrackOn}";
4731
- if(idsTrackOn){
4732
- ids = api.data.$self[idsTrackOn];
4716
+ var ids;
4717
+ var idsDependOn = "${idsDependOn}";
4718
+ if(idsDependOn){
4719
+ ids = api.data.$self[idsDependOn];
4733
4720
  }
4734
4721
  if(ids && ids.length){
4735
4722
  filters.push(["${referenceTo.valueField.name}", "=", ids]);
@@ -7265,7 +7252,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
7265
7252
  initialView = "dayGridMonth";
7266
7253
  break;
7267
7254
  case "agenda":
7268
- initialView = "timeGridDay";
7255
+ initialView = "listWeek";
7269
7256
  break;
7270
7257
  }
7271
7258
  }
@@ -7487,6 +7474,30 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
7487
7474
  }
7488
7475
  ]
7489
7476
  },
7477
+ "eventDidMount": {
7478
+ "weight": 0,
7479
+ "actions": [
7480
+ {
7481
+ "componentId": "",
7482
+ "args": {
7483
+ },
7484
+ "actionType": "custom",
7485
+ "script": "console.log('eventDidMount'); console.log(event);"
7486
+ }
7487
+ ]
7488
+ },
7489
+ "eventWillUnmount": {
7490
+ "weight": 0,
7491
+ "actions": [
7492
+ {
7493
+ "componentId": "",
7494
+ "args": {
7495
+ },
7496
+ "actionType": "custom",
7497
+ "script": "console.log('eventWillUnmount'); console.log(event);"
7498
+ }
7499
+ ]
7500
+ },
7490
7501
  }
7491
7502
  };
7492
7503
  return amisSchema;
@@ -9317,7 +9328,6 @@ const getJudgeInput = async (instance) => {
9317
9328
  "args": {
9318
9329
  "value": {
9319
9330
  new_judge: "${event.data.value}",
9320
- new_next_step: undefined,
9321
9331
  next_step: undefined,
9322
9332
  }
9323
9333
  },
@@ -9369,7 +9379,11 @@ const getNextStepInput = async (instance) => {
9369
9379
  id: "u:next_step",
9370
9380
  multiple: false,
9371
9381
  required: true,
9372
- selectFirst: true,
9382
+ // selectFirst: true,
9383
+ autoFill: {
9384
+ "new_next_step": "${step}",
9385
+ "next_users": null
9386
+ },
9373
9387
  "source": {
9374
9388
  "url": "${context.rootUrl}/api/workflow/v2/nextStep?judge=${new_judge}",
9375
9389
  "headers": {
@@ -9381,10 +9395,12 @@ const getNextStepInput = async (instance) => {
9381
9395
  "requestAdaptor": "let { context, judge } = api.data; if(!judge){judge='approved'}\nconst formValues = SteedosUI.getRef(api.data.$scopeId).getComponentById(\"instance_form\").getValues();\n\napi.data = {\nflowVersionId: context.flowVersion._id,\n instanceId: context._id,\n flowId: context.flow._id,\n step: context.step,\n judge: judge,\n values: formValues\n}\n\n\n return api;",
9382
9396
  "adaptor": `
9383
9397
  payload.data = {
9398
+ value: payload.nextSteps.length === 1 ? payload.nextSteps[0]._id : null,
9384
9399
  options: _.map(payload.nextSteps, (item)=>{
9385
9400
  return {
9386
9401
  label: item.name,
9387
- value: item
9402
+ value: item._id,
9403
+ step: item
9388
9404
  }
9389
9405
  })
9390
9406
  };
@@ -9397,29 +9413,29 @@ const getNextStepInput = async (instance) => {
9397
9413
  "judge": "${new_judge}",
9398
9414
  }
9399
9415
  },
9400
- "onEvent": {
9401
- "change": {
9402
- "weight": 0,
9403
- "actions": [
9404
- {
9405
- "componentId": "instance_approval",
9406
- "args": {
9407
- "value": {
9408
- new_next_step: "${event.data.value}",
9409
- }
9410
- },
9411
- "actionType": "setValue"
9412
- },
9413
- {
9414
- "args": {
9415
- next_step: "${event.data.value}",
9416
- },
9417
- "actionType": "broadcast",
9418
- eventName: "approve_next_step_change"
9419
- },
9420
- ]
9421
- }
9422
- }
9416
+ // "onEvent": {
9417
+ // "change": {
9418
+ // "weight": 0,
9419
+ // "actions": [
9420
+ // {
9421
+ // "componentId": "instance_approval",
9422
+ // "args": {
9423
+ // "value": {
9424
+ // new_next_step: "${event.data.value}",
9425
+ // }
9426
+ // },
9427
+ // "actionType": "setValue"
9428
+ // },
9429
+ // // {
9430
+ // // "args": {
9431
+ // // next_step: "${event.data.value}",
9432
+ // // },
9433
+ // // "actionType": "broadcast",
9434
+ // // eventName: "approve_next_step_change"
9435
+ // // },
9436
+ // ]
9437
+ // }
9438
+ // }
9423
9439
  },
9424
9440
  ],
9425
9441
  id: "u:4d3a884b437c",
@@ -9457,56 +9473,44 @@ const getNextStepUsersInput = async (instance) => {
9457
9473
  body: [
9458
9474
  // TODO 处理下一步处理人默认值
9459
9475
  Object.assign({},
9460
- // await lookupToAmisPicker(
9461
- // {
9462
- // name: "next_users",
9463
- // label: false,
9464
- // reference_to: "space_users",
9465
- // reference_to_field: 'user',
9466
- // multiple: false,
9467
- // },
9468
- // false,
9469
- // {}
9470
- // ),
9471
9476
  {
9472
9477
  "type": "steedos-select-user"
9473
9478
  },
9474
-
9475
9479
  {
9476
9480
  name: "next_users",
9477
- // value: "",
9478
9481
  hiddenOn: "this.new_next_step.deal_type != 'pickupAtRuntime'",
9479
9482
  required: true
9480
9483
  }),
9481
9484
  {
9482
- type: "list-select",
9485
+ type: "steedos-select-user",
9483
9486
  label: "",
9484
9487
  name: "next_users",
9485
- // options: await getNextStepOptions(instance),
9486
9488
  id: "u:next_users",
9487
9489
  required: true,
9488
- multiple: "this.new_next_step.deal_type === 'counterSign'",
9489
- "source": {
9490
- "url": "${context.rootUrl}/api/workflow/v2/nextStepUsers",
9491
- "method": "post",
9492
- "sendOn": "!!this.new_next_step && this.new_next_step.step_type != 'end'",
9493
- "headers": {
9494
- "Authorization": "Bearer ${context.tenantId},${context.authToken}"
9495
- },
9496
- "messages": {
9490
+ hiddenOn: "this.new_next_step.deal_type === 'pickupAtRuntime'",
9491
+ amis: {
9492
+ multiple: "this.new_next_step.deal_type === 'counterSign'",
9493
+ "source": {
9494
+ "url": "${context.rootUrl}/api/workflow/v2/nextStepUsers",
9495
+ "method": "post",
9496
+ "sendOn": "!!this.new_next_step && this.new_next_step.step_type != 'end'",
9497
+ "headers": {
9498
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
9499
+ },
9500
+ "messages": {
9501
+ },
9502
+ "requestAdaptor": "\nconst { context, next_step, $scopeId } = api.data;\nconst formValues = SteedosUI.getRef($scopeId).getComponentById(\"instance_form\").getValues();\n\napi.data = {\n instanceId: context._id,\n nextStepId: next_step._id,\n values: formValues\n}\n\n\n return api;",
9503
+ "adaptor": "\npayload.data = {value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null, options: payload.nextStepUsers};\nreturn payload;",
9504
+ "data": {
9505
+ "&": "$$",
9506
+ "$scopeId": "$scopeId",
9507
+ "context": "${context}",
9508
+ "next_step": "${new_next_step}",
9509
+ }
9497
9510
  },
9498
- "requestAdaptor": "console.log('======requestAdaptor====');\nconst { context, next_step, $scopeId } = api.data;\nconst formValues = SteedosUI.getRef($scopeId).getComponentById(\"instance_form\").getValues();\n\napi.data = {\n instanceId: context._id,\n nextStepId: next_step._id,\n values: formValues\n}\n\n\n return api;",
9499
- "adaptor": "\npayload.data = payload.nextStepUsers;\nreturn payload;",
9500
- "data": {
9501
- "&": "$$",
9502
- "$scopeId": "$scopeId",
9503
- "context": "${context}",
9504
- "next_step": "${new_next_step}",
9505
- }
9506
- },
9507
- "labelField": "name",
9508
- "valueField": "id",
9509
- hiddenOn: "this.new_next_step.deal_type === 'pickupAtRuntime'"
9511
+ "labelField": "name",
9512
+ "valueField": "id",
9513
+ }
9510
9514
  }
9511
9515
  ],
9512
9516
  id: "u:81a4913c61cc",
@@ -9708,6 +9712,10 @@ const getApprovalDrawerSchema = async (instance) => {
9708
9712
  clearPersistDataAfterSubmit: true,
9709
9713
  persistData: `workflow_approve_form_${instance.approve._id}`,
9710
9714
  body: [
9715
+ {
9716
+ type: 'hidden',
9717
+ name: 'new_next_step'
9718
+ },
9711
9719
  await getJudgeInput(instance),
9712
9720
  {
9713
9721
  type: "textarea",
@@ -9738,7 +9746,7 @@ const getApprovalDrawerSchema = async (instance) => {
9738
9746
  // {
9739
9747
  // "actionType": "reload",
9740
9748
  // "componentId": "u:nex_users",
9741
- // "args": {t
9749
+ // "args": {
9742
9750
  // }
9743
9751
  // }
9744
9752
  // ]
@@ -10049,7 +10057,7 @@ const getInstanceApprovalHistory = async ()=>{
10049
10057
  * @Author: baozhoutao@steedos.com
10050
10058
  * @Date: 2022-09-07 16:20:45
10051
10059
  * @LastEditors: baozhoutao@steedos.com
10052
- * @LastEditTime: 2023-03-22 14:43:18
10060
+ * @LastEditTime: 2023-03-23 16:49:44
10053
10061
  * @Description:
10054
10062
  */
10055
10063
 
@@ -10613,7 +10621,6 @@ const getFormTableView = async (instance) => {
10613
10621
  trs: await getFormTrs(instance),
10614
10622
  id: "u:047f3669468b",
10615
10623
  };
10616
- console.log(`getFormTableView formSchema=====>`, formSchema);
10617
10624
  return formSchema;
10618
10625
  };
10619
10626
 
@@ -12236,15 +12243,14 @@ var AmisRecordDetailRelatedLists = function (props) { return __awaiter(void 0, v
12236
12243
  }); };
12237
12244
 
12238
12245
  var AmisSelectUser = function (props) { return __awaiter(void 0, void 0, void 0, function () {
12239
- var $schema, ids, idsTrackOn, _a, readonly, _b, selectFirst, amis, _c, ctx, value, amisSchema, steedosField, options, error_1;
12240
- return __generator(this, function (_d) {
12241
- switch (_d.label) {
12246
+ var $schema, idsDependOn, _a, readonly, amis, _b, ctx, amisSchema, steedosField, options, error_1;
12247
+ return __generator(this, function (_c) {
12248
+ switch (_c.label) {
12242
12249
  case 0:
12243
- $schema = props.$schema, props.data, ids = props.ids, idsTrackOn = props.idsTrackOn, _a = props.readonly, readonly = _a === void 0 ? false : _a, _b = props.selectFirst, selectFirst = _b === void 0 ? false : _b, amis = props.amis, _c = props.ctx, ctx = _c === void 0 ? {} : _c;
12244
- value = $schema.value;
12245
- _d.label = 1;
12250
+ $schema = props.$schema, props.data, idsDependOn = props.idsDependOn, _a = props.readonly, readonly = _a === void 0 ? false : _a, amis = props.amis, _b = props.ctx, ctx = _b === void 0 ? {} : _b;
12251
+ _c.label = 1;
12246
12252
  case 1:
12247
- _d.trys.push([1, 3, , 4]);
12253
+ _c.trys.push([1, 3, , 4]);
12248
12254
  steedosField = {
12249
12255
  type: "lookup",
12250
12256
  reference_to: "users",
@@ -12253,20 +12259,16 @@ var AmisSelectUser = function (props) { return __awaiter(void 0, void 0, void 0,
12253
12259
  multiple: $schema.multiple,
12254
12260
  required: $schema.required,
12255
12261
  searchable: $schema.searchable,
12256
- onEvent: $schema.onEvent,
12257
12262
  filters: $schema.filters,
12258
12263
  amis: amis
12259
12264
  };
12260
- options = Object.assign.apply(Object, __spreadArray(__spreadArray([{}], __read(ctx), false), [{ ids: ids, idsTrackOn: idsTrackOn, selectFirst: selectFirst }], false));
12261
- if (value) {
12262
- options.value = value;
12263
- }
12265
+ options = Object.assign.apply(Object, __spreadArray(__spreadArray([{}], __read(ctx), false), [{ idsDependOn: idsDependOn }], false));
12264
12266
  return [4 /*yield*/, index.convertSFieldToAmisField(steedosField, readonly, options)];
12265
12267
  case 2:
12266
- amisSchema = _d.sent();
12268
+ amisSchema = _c.sent();
12267
12269
  return [3 /*break*/, 4];
12268
12270
  case 3:
12269
- error_1 = _d.sent();
12271
+ error_1 = _c.sent();
12270
12272
  console.log("error", error_1);
12271
12273
  return [3 /*break*/, 4];
12272
12274
  case 4: return [2 /*return*/, amisSchema];
@@ -13026,28 +13028,34 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
13026
13028
  * @Author: baozhoutao@steedos.com
13027
13029
  * @Date: 2023-01-14 16:41:24
13028
13030
  * @LastEditors: baozhoutao@steedos.com
13029
- * @LastEditTime: 2023-02-23 09:48:53
13031
+ * @LastEditTime: 2023-03-23 11:37:25
13030
13032
  * @Description:
13031
13033
  */
13032
13034
  var getSelectFlowSchema = function (id, props) {
13033
- var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? 'query' : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? 'input-tree' : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName;
13034
- return {
13035
- "type": mode,
13036
- "id": id,
13037
- "label": label,
13038
- "name": name,
13039
- "options": [],
13040
- "multiple": multiple,
13041
- "delimiter": delimiter,
13042
- "joinValues": joinValues,
13043
- "extractValue": extractValue,
13044
- "searchable": searchable,
13045
- "showOutline": showOutline,
13046
- "initiallyOpen": initiallyOpen,
13047
- "unfoldedLevel": unfoldedLevel,
13048
- "className": className,
13049
- "required": required,
13050
- "treeContainerClassName": treeContainerClassName,
13035
+ var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? 'query' : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? 'input-tree' : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName, _h = props.amis, amis = _h === void 0 ? {} : _h;
13036
+ return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName,
13037
+ // "menuTpl": {
13038
+ // type: "tpl",
13039
+ // tpl: "<div class='flex justify-between'><span>${label}</span><span class='rounded p-1 text-xs text-center w-14 ${children != null ? \'hidden\' : \'\'}'><button onClick='console.log(11111)'><i class='fa-regular fa-star'></i></button></span></div>",
13040
+ // "onEvent": {
13041
+ // "click": {
13042
+ // "weight": 0,
13043
+ // "actions": [
13044
+ // {
13045
+ // "args": {
13046
+ // "api": {
13047
+ // "url": "/aaa",
13048
+ // "method": "get",
13049
+ // "messages": {
13050
+ // }
13051
+ // }
13052
+ // },
13053
+ // "actionType": "download"
13054
+ // }
13055
+ // ]
13056
+ // }
13057
+ // }
13058
+ // },
13051
13059
  "source": {
13052
13060
  "method": "post",
13053
13061
  "url": "${context.rootUrl}/graphql?keywords=${keywords}",
@@ -13055,12 +13063,7 @@ var getSelectFlowSchema = function (id, props) {
13055
13063
  "headers": {
13056
13064
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
13057
13065
  }
13058
- },
13059
- "showIcon": showIcon,
13060
- "showRadio": showRadio,
13061
- "onlyLeaf": true,
13062
- "onEvent": onEvent,
13063
- };
13066
+ }, "showIcon": showIcon, "showRadio": showRadio, "onlyLeaf": true, "onEvent": onEvent }, amis);
13064
13067
  };
13065
13068
  /**
13066
13069
  *