@steedos-widgets/amis-object 1.2.5 → 1.2.6-beta.10

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.
@@ -4894,13 +4894,16 @@ async function lookupToAmisPicker(field, readonly, ctx){
4894
4894
  var sort = orderBy + ' ' + orderDir;
4895
4895
  sort = orderBy ? sort : "${sort}";
4896
4896
  var allowSearchFields = ${JSON.stringify(searchableFields)};
4897
+ let fieldValue;
4897
4898
  if(api.data.$term){
4898
4899
  filters = [["name", "contains", "'+ api.data.$term +'"]];
4899
4900
  }else if(selfData.op === 'loadOptions' && selfData.value){
4900
4901
  if(selfData.value?.indexOf(',') > 0){
4901
- filters = [["${referenceTo.valueField.name}", "=", selfData.value.split(',')]];
4902
+ fieldValue = selfData.value.split(',');
4903
+ filters = [["${referenceTo.valueField.name}", "=", fieldValue]];
4902
4904
  }else{
4903
- filters = [["${referenceTo.valueField.name}", "=", selfData.value]];
4905
+ fieldValue = selfData.value;
4906
+ filters = [["${referenceTo.valueField.name}", "=", fieldValue]];
4904
4907
  }
4905
4908
  }
4906
4909
 
@@ -4954,6 +4957,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
4954
4957
  if(enable_tree){
4955
4958
  pageSize = 10000;
4956
4959
  }
4960
+ if(fieldValue && _.isArray(fieldValue) && fieldValue.length > pageSize){
4961
+ pageSize = fieldValue.length;
4962
+ }
4957
4963
  api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', pageSize).replace('{__skip}', skip).replace('{__sort}', sort.trim());
4958
4964
  return api;
4959
4965
  `;
@@ -6035,7 +6041,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
6035
6041
  columnsTogglable: false,
6036
6042
  strictMode:false,
6037
6043
  affixHeader: false, // 是否固定表头, 不固定表头, 否则form有y轴滚动条时, 表头会跟随滚动条滚动.
6038
- // needConfirm: true, 此属性设置为false后,导致table不能编辑。
6044
+ needConfirm: false,
6039
6045
  editable: !readonly,
6040
6046
  addable: !readonly,
6041
6047
  removable: !readonly,
@@ -6389,12 +6395,12 @@ function getScriptForRewriteValueForFileFields(fields){
6389
6395
  });
6390
6396
  }
6391
6397
  }else{
6392
- data[item] = {
6398
+ data[item] = [{
6393
6399
  value: fileFieldValue,
6394
6400
  name: fileFieldDisplayValue.name,
6395
6401
  url: fileFieldDisplayValue.url + "?download=true",
6396
6402
  state: "uploaded"
6397
- };
6403
+ }];
6398
6404
  }
6399
6405
  }
6400
6406
  })
@@ -7121,6 +7127,13 @@ async function getTableColumns$1(fields, options){
7121
7127
  }else if(field.type === 'html'){
7122
7128
  type = 'markdown';
7123
7129
  }
7130
+ let className = "";
7131
+ if(field.type === 'textarea'){
7132
+ className = 'min-w-56';
7133
+ }
7134
+ if(field.wrap === false){
7135
+ className += " whitespace-nowrap";
7136
+ }
7124
7137
  if(!field.hidden && !field.extra){
7125
7138
  columns.push(Object.assign({}, {
7126
7139
  name: field.name,
@@ -7131,7 +7144,7 @@ async function getTableColumns$1(fields, options){
7131
7144
  type: type,
7132
7145
  tpl: tpl,
7133
7146
  toggled: field.toggled,
7134
- className: field.type === 'textarea' ? 'min-w-56 whitespace-pre-wrap textarea' : "whitespace-nowrap",
7147
+ className,
7135
7148
  html: field.type === 'html' ? true : null
7136
7149
  // toggled: true
7137
7150
  }, field.amis, {name: field.name}));
@@ -7627,7 +7640,6 @@ async function getTableApi(mainObject, fields, options){
7627
7640
  if(_.isEmpty(filters)){
7628
7641
  filters = userFilters;
7629
7642
  }else{
7630
- filters.push('and');
7631
7643
  filters.push(userFilters)
7632
7644
  }
7633
7645
  }
@@ -8055,7 +8067,6 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8055
8067
  // ObjectForm会认作用域下的变量值
8056
8068
  // TODO: 待组件支持initValues属性后应该改掉,不应该通过data直接传值
8057
8069
  // TODO: 全天事件属性传入doc了但是没有生效,需要手动在ObjectForm中勾选全天事件
8058
- event.data = doc;
8059
8070
  const title = "新建 ${objectSchema.label}";
8060
8071
  doAction(
8061
8072
  {
@@ -8068,6 +8079,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8068
8079
  "type": "steedos-object-form",
8069
8080
  "objectApiName": "\${objectName}",
8070
8081
  "mode": "edit",
8082
+ "defaultData": doc,
8071
8083
  "onEvent": {
8072
8084
  "submitSucc": {
8073
8085
  "weight": 0,
@@ -12959,12 +12971,11 @@ var AmisRecordDetailHeader = function (props) { return __awaiter(void 0, void 0,
12959
12971
  * @Description:
12960
12972
  */
12961
12973
  var AmisRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
12962
- var className, appId, _a, objectApiName, body, schema;
12974
+ var className, $schema, appId, _a, objectApiName, body, schema;
12963
12975
  return __generator(this, function (_b) {
12964
12976
  switch (_b.label) {
12965
12977
  case 0:
12966
- console.log("AmisRecordDetail======>", props);
12967
- className = props.className, props.$schema, appId = props.appId, _a = props.objectApiName, objectApiName = _a === void 0 ? "space_users" : _a, props.recordId, props.onEvent, props.defaultData, body = props.body;
12978
+ className = props.className, $schema = props.$schema, appId = props.appId, _a = props.objectApiName, objectApiName = _a === void 0 ? "space_users" : _a, props.recordId, props.onEvent, props.defaultData, body = props.body;
12968
12979
  return [4 /*yield*/, getRecordDetailSchema(objectApiName, appId)];
12969
12980
  case 1:
12970
12981
  schema = (_b.sent()).amisSchema;
@@ -12974,11 +12985,14 @@ var AmisRecordDetail = function (props) { return __awaiter(void 0, void 0, void
12974
12985
  // recordDetailData.recordId = recordId;
12975
12986
  // }
12976
12987
  // schema.data = Object.assign({}, schema.data, recordDetailData);
12988
+ if (___default.has(props, "recordId") && $schema.recordId !== "${recordId}") {
12989
+ schema.data.recordId = props.recordId;
12990
+ }
12977
12991
  schema.className = className;
12978
12992
  if (body) {
12979
12993
  schema.body = body;
12980
12994
  }
12981
- console.log("AmisRecordDetail====schema==>", schema);
12995
+ // console.log(`AmisRecordDetail====schema==>`, schema)
12982
12996
  return [2 /*return*/, schema];
12983
12997
  }
12984
12998
  });
@@ -13494,6 +13508,58 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
13494
13508
  });
13495
13509
  }); };
13496
13510
 
13511
+ /*
13512
+ * @Author: baozhoutao@steedos.com
13513
+ * @Date: 2022-09-01 14:44:57
13514
+ * @LastEditors: baozhoutao@steedos.com
13515
+ * @LastEditTime: 2023-04-11 13:51:50
13516
+ * @Description:
13517
+ */
13518
+ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
13519
+ var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, className1, schema;
13520
+ return __generator(this, function (_e) {
13521
+ _a = props.stacked, stacked = _a === void 0 ? false : _a, overflow = props.overflow, appId = props.appId, data = props.data, _b = props.links, links = _b === void 0 ? null : _b, _c = props.showIcon, showIcon = _c === void 0 ? true : _c, _d = props.indentSize, indentSize = _d === void 0 ? 12 : _d, selectedId = props.selectedId;
13522
+ if (!appId) {
13523
+ appId = data.context.appId || 'admin';
13524
+ }
13525
+ isMobile = window.innerWidth <= 768;
13526
+ className = 'fixed bottom-0 z-20 flex justify-evenly w-full h-16 bg-gray-100 steedos-global-footer';
13527
+ className1 = 'fixed bottom-0 z-20 flex justify-center w-full h-16 bg-gray-100 steedos-global-footer';
13528
+ schema = {};
13529
+ if (links) {
13530
+ schema = {
13531
+ type: 'service',
13532
+ mobile: {
13533
+ body: [
13534
+ {
13535
+ "type": "nav",
13536
+ "className": links.length == 1 ? "".concat(className1) : "".concat(className),
13537
+ "stacked": stacked,
13538
+ "overflow": overflow,
13539
+ "indentSize": indentSize,
13540
+ "links": links
13541
+ }
13542
+ ]
13543
+ }
13544
+ };
13545
+ }
13546
+ else if (isMobile) {
13547
+ schema = {
13548
+ type: 'service',
13549
+ schemaApi: {
13550
+ "method": "get",
13551
+ "url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
13552
+ "adaptor": "\n try {\n\n if(payload.children.length == 0){\n payload.data = {};\n return payload\n }\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n _.each(payload.children, (tab)=>{\n const classIcon = tab.icon.replace(/_/g,\"-\");\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[13px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target\n // active: selectedId === tab.id,\n });\n })\n\n payload.data = {\n \"type\": \"nav\",\n className: payload.children.length ==1 ? '").concat(className1, "' : '").concat(className, "',\n \"stacked\": ").concat(stacked, ",\n \"overflow\": {\n \"enable\": true,\n \"maxVisibleCount\": 4,\n \"overflowPopoverClassName\": \"steedos-global-footer-popup\",\n \"overflowLabel\":{\n \"type\": 'tpl',\n \"tpl\": `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[13px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\" flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#lead_list\"></use></svg>\u83DC\u5355</span>`,\n \"className\":'h-full flex items-center'\n },\n \"overflowIndicator\":\"\"\n },\n \"indentSize\": ").concat(indentSize, ",\n \"links\": data.nav,\n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
13553
+ "headers": {
13554
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
13555
+ }
13556
+ }
13557
+ };
13558
+ }
13559
+ return [2 /*return*/, schema];
13560
+ });
13561
+ }); };
13562
+
13497
13563
  /*
13498
13564
  * @Author: baozhoutao@steedos.com
13499
13565
  * @Date: 2022-09-01 14:44:57
@@ -13501,7 +13567,7 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
13501
13567
  * @LastEditTime: 2023-03-17 14:09:53
13502
13568
  * @Description:
13503
13569
  */
13504
- var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void 0, function () {
13570
+ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0, void 0, function () {
13505
13571
  var _a, className, data, _b, logoutScript, _c, customButtons, avatarSrc;
13506
13572
  var _d, _e;
13507
13573
  return __generator(this, function (_f) {
@@ -13513,7 +13579,7 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
13513
13579
  return [2 /*return*/, {
13514
13580
  "type": "wrapper",
13515
13581
  "id": "u:9c3d279be31a",
13516
- "className": "steedos-global-header leading-3\t".concat(className),
13582
+ "className": "steedos-global-header-toolbar leading-3\t".concat(className),
13517
13583
  "size": "xs",
13518
13584
  "body": __spreadArray(__spreadArray([], __read(customButtons), false), [
13519
13585
  {
@@ -13811,25 +13877,25 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
13811
13877
  },
13812
13878
  "level": "link"
13813
13879
  },
13814
- // {
13815
- // "type": "button",
13816
- // "label": "关于",
13817
- // "className": "flex",
13818
- // "onEvent": {
13819
- // "click": {
13820
- // "actions": [
13821
- // {
13822
- // "args": {
13823
- // "url": "/app/admin/page/creator_about",
13824
- // "blank": false
13825
- // },
13826
- // "actionType": "link"
13827
- // }
13828
- // ]
13829
- // }
13830
- // },
13831
- // "level": "link"
13832
- // },
13880
+ {
13881
+ "type": "button",
13882
+ "label": "关于",
13883
+ "className": "flex",
13884
+ "onEvent": {
13885
+ "click": {
13886
+ "actions": [
13887
+ {
13888
+ "args": {
13889
+ "url": "/app/-/page/about",
13890
+ "blank": false
13891
+ },
13892
+ "actionType": "link"
13893
+ }
13894
+ ]
13895
+ }
13896
+ },
13897
+ "level": "link"
13898
+ },
13833
13899
  {
13834
13900
  "type": "button",
13835
13901
  "label": "注销",
@@ -13858,6 +13924,194 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
13858
13924
  });
13859
13925
  }); };
13860
13926
 
13927
+ /*
13928
+ * @Author: baozhoutao@steedos.com
13929
+ * @Date: 2022-09-01 14:44:57
13930
+ * @LastEditors: baozhoutao@steedos.com
13931
+ * @LastEditTime: 2023-04-11 13:51:50
13932
+ * @Description:
13933
+ */
13934
+ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void 0, function () {
13935
+ var logoSrc, isMobile, schema;
13936
+ return __generator(this, function (_a) {
13937
+ logoSrc = props.logoSrc;
13938
+ isMobile = window.innerWidth <= 768;
13939
+ schema = {
13940
+ "type": "wrapper",
13941
+ "className": 'p-0',
13942
+ body: [
13943
+ {
13944
+ "type": "wrapper",
13945
+ "className": "bg-white sticky p-0 top-0 z-40 w-full flex-none backdrop-blur transition-colors duration-500 lg:z-50 sm:shadow border-b-[3px] border-sky-500 border-solid steedos-header-container",
13946
+ body: [
13947
+ {
13948
+ "type": "wrapper",
13949
+ "className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center steedos-header-container-line-one',
13950
+ "body": [
13951
+ {
13952
+ type: "wrapper",
13953
+ className: 'p-0 flex flex-1 items-center',
13954
+ body: [
13955
+ {
13956
+ "type": "button",
13957
+ "className": "toggle-sidebar flex items-center pr-4",
13958
+ "hiddenOn": "true",
13959
+ "onEvent": {
13960
+ "click": {
13961
+ "actions": [
13962
+ {
13963
+ "actionType": "custom",
13964
+ "script": "document.body.classList.toggle('sidebar-open')",
13965
+ }
13966
+ ]
13967
+ }
13968
+ },
13969
+ "body": [
13970
+ {
13971
+ "type": "steedos-icon",
13972
+ "category": "utility",
13973
+ "name": "rows",
13974
+ "colorVariant": "default",
13975
+ "id": "u:afc3a08e8cf3",
13976
+ "className": "slds-button_icon slds-global-header__icon"
13977
+ }
13978
+ ],
13979
+ },
13980
+ {
13981
+ "className": 'block h-10 w-auto mr-4',
13982
+ "type": "tpl",
13983
+ "tpl": "<a href='/app' class='flex items-center '><img class='block h-10 w-auto' src='".concat(logoSrc, "'></a>"),
13984
+ },
13985
+ ],
13986
+ },
13987
+ {
13988
+ "type": "steedos-global-header-toolbar",
13989
+ "label": "Global Header",
13990
+ className: 'flex flex-nowrap gap-x-3 items-center',
13991
+ logoutScript: "window.signOut();",
13992
+ customButtons: [
13993
+ {
13994
+ "type": "button",
13995
+ "className": "toggle-sidebar",
13996
+ "visibleOn": "${AND(app.showSidebar,!" + isMobile + ")}",
13997
+ "onEvent": {
13998
+ "click": {
13999
+ "actions": [
14000
+ {
14001
+ "actionType": "custom",
14002
+ "script": "document.body.classList.toggle('sidebar-open')",
14003
+ }
14004
+ ]
14005
+ }
14006
+ },
14007
+ "body": [
14008
+ {
14009
+ "type": "steedos-icon",
14010
+ "category": "utility",
14011
+ "name": "rows",
14012
+ "colorVariant": "default",
14013
+ "id": "u:afc3a08e8cf3",
14014
+ "className": "slds-button_icon slds-global-header__icon"
14015
+ }
14016
+ ],
14017
+ },
14018
+ {
14019
+ "type": "steedos-app-launcher",
14020
+ "showAppName": false,
14021
+ "appId": "${app.id}",
14022
+ "visibleOn": "${isMobile}"
14023
+ }
14024
+ ]
14025
+ }
14026
+ ],
14027
+ },
14028
+ {
14029
+ "type": "grid",
14030
+ "className": 'steedos-context-bar flex flex-nowrap h-10 leading-5 pl-4 mb-[-3px] steedos-header-container-line-two',
14031
+ "hiddenOn": "${" + isMobile + "}",
14032
+ "columns": [
14033
+ {
14034
+ "columnClassName": "items-center flex pb-0",
14035
+ "body": [
14036
+ {
14037
+ "type": "steedos-app-launcher",
14038
+ "showAppName": true,
14039
+ "appId": "${app.id}",
14040
+ }
14041
+ ],
14042
+ "md": "auto",
14043
+ "valign": "middle"
14044
+ },
14045
+ {
14046
+ "columnClassName": "flex overflow-hidden",
14047
+ "hiddenOn": "${app.showSidebar === true}",
14048
+ "body": [
14049
+ {
14050
+ "visibleOn": "${AND(!app.showSidebar,!" + isMobile + ")}",
14051
+ "type": "steedos-app-menu",
14052
+ "stacked": false,
14053
+ showIcon: false,
14054
+ "appId": "${app.id}",
14055
+ overflow: {
14056
+ enable: false,
14057
+ itemWidth: 80,
14058
+ },
14059
+ "id": "u:77851eb4aa89",
14060
+ }
14061
+ ],
14062
+ "id": "u:5367229505d8",
14063
+ "md": "",
14064
+ "valign": "middle",
14065
+ }
14066
+ ],
14067
+ },
14068
+ ],
14069
+ },
14070
+ {
14071
+ "type": "button",
14072
+ "className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
14073
+ hiddenOn: "${OR(app.showSidebar != true,isMobile)}",
14074
+ body: [
14075
+ {
14076
+ type: "wrapper",
14077
+ className: 'sidebar-wrapper px-0 pt-4 pb-16 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col border-r overflow-y-auto bg-white border-slate-200 block -translate-x-0 sm:w-[220px] w-64',
14078
+ body: [
14079
+ {
14080
+ "type": "steedos-app-launcher",
14081
+ "className": "px-4 pb-4",
14082
+ "visibleOn": "${isMobile}",
14083
+ "showAppName": true
14084
+ },
14085
+ {
14086
+ "type": "steedos-app-menu",
14087
+ "stacked": true,
14088
+ "appId": "${app.id}",
14089
+ },
14090
+ ]
14091
+ },
14092
+ {
14093
+ "type": "wrapper",
14094
+ "className": 'sidebar-overlay',
14095
+ "hiddenOn": "${!isMobile}",
14096
+ }
14097
+ ],
14098
+ "onEvent": {
14099
+ "click": {
14100
+ "actions": [
14101
+ {
14102
+ "actionType": "custom",
14103
+ "script": "console.log(event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
14104
+ }
14105
+ ]
14106
+ }
14107
+ },
14108
+ },
14109
+ ],
14110
+ };
14111
+ return [2 /*return*/, schema];
14112
+ });
14113
+ }); };
14114
+
13861
14115
  var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void 0, function () {
13862
14116
  var steedosField, field, _a, readonly, _b, ctx, config, $schema, schema, error_1;
13863
14117
  return __generator(this, function (_c) {
@@ -13906,39 +14160,42 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
13906
14160
  * @Author: baozhoutao@steedos.com
13907
14161
  * @Date: 2023-01-14 16:41:24
13908
14162
  * @LastEditors: baozhoutao@steedos.com
13909
- * @LastEditTime: 2023-03-23 18:00:25
14163
+ * @LastEditTime: 2023-04-21 11:50:26
13910
14164
  * @Description:
13911
14165
  */
13912
14166
  var getSelectFlowSchema = function (id, props) {
13913
14167
  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;
13914
14168
  console.log("=====onEvent", onEvent);
13915
- 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, "menuTpl": {
13916
- // type: "button",
13917
- type: "tpl",
13918
- tpl: "<div class='flex justify-between'><span>${label}</span><span class='rounded p-1 text-xs text-center w-14 ${children != null ? \'hidden\' : \'\'}'><button><i class='fa-regular fa-star'></i></button></span></div>",
13919
- "onEvent": {
13920
- "click": {
13921
- "weight": 0,
13922
- "actions": [
13923
- {
13924
- actionType: 'custom',
13925
- script: "console.log('====event', event), event.preventDefault(); event.stopPropagation()"
13926
- },
13927
- {
13928
- "args": {
13929
- "api": {
13930
- "url": "/aaa",
13931
- "method": "get",
13932
- "messages": {}
13933
- }
13934
- },
13935
- "actionType": "download",
13936
- "stopPropagation": true
13937
- }
13938
- ]
13939
- }
13940
- }
13941
- }, "source": {
14169
+ 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,
14170
+ // "menuTpl": {
14171
+ // // type: "button",
14172
+ // type: "tpl",
14173
+ // tpl: "<div class='flex justify-between'><span>${label}</span><span class='rounded p-1 text-xs text-center w-14 ${children != null ? \'hidden\' : \'\'}'><button><i class='fa-regular fa-star'></i></button></span></div>",
14174
+ // "onEvent": {
14175
+ // "click": {
14176
+ // "weight": 0,
14177
+ // "actions": [
14178
+ // {
14179
+ // actionType: 'custom',
14180
+ // script: "console.log('====event', event), event.preventDefault(); event.stopPropagation()"
14181
+ // },
14182
+ // {
14183
+ // "args": {
14184
+ // "api": {
14185
+ // "url": "/aaa",
14186
+ // "method": "get",
14187
+ // "messages": {
14188
+ // }
14189
+ // }
14190
+ // },
14191
+ // "actionType": "download",
14192
+ // "stopPropagation": true
14193
+ // }
14194
+ // ]
14195
+ // }
14196
+ // }
14197
+ // },
14198
+ "source": {
13942
14199
  "method": "post",
13943
14200
  "url": "${context.rootUrl}/graphql?keywords=${keywords}",
13944
14201
  "requestAdaptor": "\n const keywords = api.body.keywords || '';\n const appId = '".concat(data.app_id || '', "';\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\"){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
@@ -14191,7 +14448,9 @@ var index_esm = /*#__PURE__*/Object.freeze({
14191
14448
 
14192
14449
  exports.AmisAppLauncher = AmisAppLauncher;
14193
14450
  exports.AmisAppMenu = AmisAppMenu;
14451
+ exports.AmisGlobalFooter = AmisGlobalFooter;
14194
14452
  exports.AmisGlobalHeader = AmisGlobalHeader;
14453
+ exports.AmisGlobalHeaderToolbar = AmisGlobalHeaderToolbar;
14195
14454
  exports.AmisInstanceDetail = AmisInstanceDetail;
14196
14455
  exports.AmisLib = index_esm$1;
14197
14456
  exports.AmisLogo = AmisLogo;