@steedos-widgets/amis-object 6.3.12-beta.9 → 6.10.1-beta.8

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.
@@ -1,4 +1,5 @@
1
- import React, { createContext, useState, useEffect, createElement } from 'react';
1
+ import * as React from 'react';
2
+ import React__default, { createContext, useState, useEffect } from 'react';
2
3
  import * as _$1 from 'lodash';
3
4
  import _$1__default, { isEmpty, isArray as isArray$3, each, find, endsWith, cloneDeep, forEach, has, toArray, mergeWith, isString, union, map, slice, defaultsDeep as defaultsDeep$1, includes, clone, filter, omitBy, isNil, get as get$1, isObject as isObject$9, trimEnd, isBoolean, startsWith, isFunction as isFunction$4, compact, difference, keys, pick, first, values, pickBy, sampleSize, random, assign, isDate } from 'lodash';
4
5
  import { Dropdown, Image, Tabs, Spin, Badge, Skeleton, Modal as Modal$1, message, notification, Button, Space, Drawer as Drawer$1 } from 'antd';
@@ -6,137 +7,142 @@ import { resolveEventData, isPureVariable, resolveVariableAndFilter, setThemeCla
6
7
  import { Collapse as Collapse$1, Icon, DndContainer } from 'amis-ui';
7
8
  import ReactDOM, { createRoot } from 'react-dom';
8
9
 
9
- /******************************************************************************
10
- Copyright (c) Microsoft Corporation.
11
-
12
- Permission to use, copy, modify, and/or distribute this software for any
13
- purpose with or without fee is hereby granted.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
16
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
17
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
18
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
- PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise */
24
-
25
- var extendStatics = function(d, b) {
26
- extendStatics = Object.setPrototypeOf ||
27
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
29
- return extendStatics(d, b);
30
- };
31
-
32
- function __extends(d, b) {
33
- if (typeof b !== "function" && b !== null)
34
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
35
- extendStatics(d, b);
36
- function __() { this.constructor = d; }
37
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38
- }
39
-
40
- var __assign$2 = function() {
41
- __assign$2 = Object.assign || function __assign(t) {
42
- for (var s, i = 1, n = arguments.length; i < n; i++) {
43
- s = arguments[i];
44
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
45
- }
46
- return t;
47
- };
48
- return __assign$2.apply(this, arguments);
49
- };
50
-
51
- function __rest(s, e) {
52
- var t = {};
53
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
54
- t[p] = s[p];
55
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
56
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
57
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
58
- t[p[i]] = s[p[i]];
59
- }
60
- return t;
61
- }
62
-
63
- function __awaiter(thisArg, _arguments, P, generator) {
64
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
65
- return new (P || (P = Promise))(function (resolve, reject) {
66
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
68
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
69
- step((generator = generator.apply(thisArg, _arguments || [])).next());
70
- });
71
- }
72
-
73
- function __generator(thisArg, body) {
74
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
75
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
76
- function verb(n) { return function (v) { return step([n, v]); }; }
77
- function step(op) {
78
- if (f) throw new TypeError("Generator is already executing.");
79
- while (_) try {
80
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
81
- if (y = 0, t) op = [op[0] & 2, t.value];
82
- switch (op[0]) {
83
- case 0: case 1: t = op; break;
84
- case 4: _.label++; return { value: op[1], done: false };
85
- case 5: _.label++; y = op[1]; op = [0]; continue;
86
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
87
- default:
88
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
89
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
90
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
91
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
92
- if (t[2]) _.ops.pop();
93
- _.trys.pop(); continue;
94
- }
95
- op = body.call(thisArg, _);
96
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
97
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
98
- }
99
- }
100
-
101
- function __values(o) {
102
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
103
- if (m) return m.call(o);
104
- if (o && typeof o.length === "number") return {
105
- next: function () {
106
- if (o && i >= o.length) o = void 0;
107
- return { value: o && o[i++], done: !o };
108
- }
109
- };
110
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
111
- }
112
-
113
- function __read(o, n) {
114
- var m = typeof Symbol === "function" && o[Symbol.iterator];
115
- if (!m) return o;
116
- var i = m.call(o), r, ar = [], e;
117
- try {
118
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
119
- }
120
- catch (error) { e = { error: error }; }
121
- finally {
122
- try {
123
- if (r && !r.done && (m = i["return"])) m.call(i);
124
- }
125
- finally { if (e) throw e.error; }
126
- }
127
- return ar;
128
- }
129
-
130
- function __spreadArray(to, from, pack) {
131
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
132
- if (ar || !(i in from)) {
133
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
134
- ar[i] = from[i];
135
- }
136
- }
137
- return to.concat(ar || Array.prototype.slice.call(from));
10
+ /******************************************************************************
11
+ Copyright (c) Microsoft Corporation.
12
+
13
+ Permission to use, copy, modify, and/or distribute this software for any
14
+ purpose with or without fee is hereby granted.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
17
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
+ PERFORMANCE OF THIS SOFTWARE.
23
+ ***************************************************************************** */
24
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
25
+
26
+ var extendStatics = function(d, b) {
27
+ extendStatics = Object.setPrototypeOf ||
28
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
30
+ return extendStatics(d, b);
31
+ };
32
+
33
+ function __extends(d, b) {
34
+ if (typeof b !== "function" && b !== null)
35
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
36
+ extendStatics(d, b);
37
+ function __() { this.constructor = d; }
38
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39
+ }
40
+
41
+ var __assign$2 = function() {
42
+ __assign$2 = Object.assign || function __assign(t) {
43
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
44
+ s = arguments[i];
45
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
46
+ }
47
+ return t;
48
+ };
49
+ return __assign$2.apply(this, arguments);
50
+ };
51
+
52
+ function __rest(s, e) {
53
+ var t = {};
54
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
55
+ t[p] = s[p];
56
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
57
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
58
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
59
+ t[p[i]] = s[p[i]];
60
+ }
61
+ return t;
62
+ }
63
+
64
+ function __awaiter(thisArg, _arguments, P, generator) {
65
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
66
+ return new (P || (P = Promise))(function (resolve, reject) {
67
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
68
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
69
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
70
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
71
+ });
72
+ }
73
+
74
+ function __generator(thisArg, body) {
75
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
76
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
77
+ function verb(n) { return function (v) { return step([n, v]); }; }
78
+ function step(op) {
79
+ if (f) throw new TypeError("Generator is already executing.");
80
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
81
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
82
+ if (y = 0, t) op = [op[0] & 2, t.value];
83
+ switch (op[0]) {
84
+ case 0: case 1: t = op; break;
85
+ case 4: _.label++; return { value: op[1], done: false };
86
+ case 5: _.label++; y = op[1]; op = [0]; continue;
87
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
88
+ default:
89
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
90
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
91
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
92
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
93
+ if (t[2]) _.ops.pop();
94
+ _.trys.pop(); continue;
95
+ }
96
+ op = body.call(thisArg, _);
97
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
98
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
99
+ }
100
+ }
101
+
102
+ function __values(o) {
103
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
104
+ if (m) return m.call(o);
105
+ if (o && typeof o.length === "number") return {
106
+ next: function () {
107
+ if (o && i >= o.length) o = void 0;
108
+ return { value: o && o[i++], done: !o };
109
+ }
110
+ };
111
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
112
+ }
113
+
114
+ function __read(o, n) {
115
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
116
+ if (!m) return o;
117
+ var i = m.call(o), r, ar = [], e;
118
+ try {
119
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
120
+ }
121
+ catch (error) { e = { error: error }; }
122
+ finally {
123
+ try {
124
+ if (r && !r.done && (m = i["return"])) m.call(i);
125
+ }
126
+ finally { if (e) throw e.error; }
127
+ }
128
+ return ar;
138
129
  }
139
130
 
131
+ function __spreadArray(to, from, pack) {
132
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
133
+ if (ar || !(i in from)) {
134
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
135
+ ar[i] = from[i];
136
+ }
137
+ }
138
+ return to.concat(ar || Array.prototype.slice.call(from));
139
+ }
140
+
141
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
142
+ var e = new Error(message);
143
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
144
+ };
145
+
140
146
  function _typeof$1(obj) {
141
147
  "@babel/helpers - typeof";
142
148
 
@@ -4384,7 +4390,7 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
4384
4390
  * @Author: baozhoutao@steedos.com
4385
4391
  * @Date: 2022-10-28 14:15:09
4386
4392
  * @LastEditors: baozhoutao@steedos.com
4387
- * @LastEditTime: 2024-11-14 10:50:01
4393
+ * @LastEditTime: 2025-02-13 09:31:02
4388
4394
  * @Description:
4389
4395
  */
4390
4396
 
@@ -4443,7 +4449,7 @@ async function getLookupLinkOnClick$1(field, options) {
4443
4449
  "title": "&nbsp;",
4444
4450
  "headerClassName": "hidden",
4445
4451
  "size": "lg",
4446
- "width": "70%",
4452
+ "width": window.drawerWidth || "70%",
4447
4453
  "bodyClassName": "p-0 m-0 bg-gray-100",
4448
4454
  "closeOnEsc": true,
4449
4455
  "closeOnOutside": true,
@@ -5039,7 +5045,6 @@ async function getQuickEditSchema(object, columnField, options){
5039
5045
  {
5040
5046
  actionType: "custom",
5041
5047
  script: `
5042
- console.log("asdasd");
5043
5048
  let items = _.cloneDeep(event.data.items);
5044
5049
  let selectedItems = _.cloneDeep(event.data.selectedItems);
5045
5050
  if(event.data.isBatchEdit){
@@ -5536,7 +5541,7 @@ async function getColumnItemOnClick(field, options){
5536
5541
  "title": "&nbsp;",
5537
5542
  "headerClassName": "hidden",
5538
5543
  "size": "lg",
5539
- "width": "70%",
5544
+ "width": window.drawerWidth || "70%",
5540
5545
  "bodyClassName": "p-0 m-0 bg-gray-100",
5541
5546
  "closeOnEsc": true,
5542
5547
  "closeOnOutside": true,
@@ -6580,6 +6585,11 @@ async function getTableApi(mainObject, fields, options){
6580
6585
  }, 600);
6581
6586
  }
6582
6587
  }
6588
+
6589
+ // 列表搜索和快速搜索,有时在某些操作情况下还是会造成crud接口请求使用的过滤条件是上次的,这里强制把正确的过滤条件返回到crud,详细规则见:https://github.com/steedos/steedos-platform/issues/7112
6590
+ // lookup字段的弹出列表搜索不受这里影响,因为lookup字段的弹出列表搜索是单独的接口请求
6591
+ payload.data.__changedFilterFormValues = api.context.__changedFilterFormValues;
6592
+ payload.data.__changedSearchBoxValues = api.context.__changedSearchBoxValues;
6583
6593
  ${options.adaptor || ''}
6584
6594
  return payload;
6585
6595
  `;
@@ -6677,6 +6687,7 @@ function getReadonlyFormAdaptor(object, fields, options){
6677
6687
  payload.data.data = [emptyDoc];
6678
6688
  }
6679
6689
  else{
6690
+ console.log('无法找到记录', api, payload, context)
6680
6691
  return {
6681
6692
  status: 2,
6682
6693
  msg: "${instance.t('frontend_no_records_found')}"
@@ -6703,13 +6714,12 @@ function getReadonlyFormAdaptor(object, fields, options){
6703
6714
  console.error(e)
6704
6715
  }
6705
6716
  payload.data = data;
6706
- payload.data.__objectName = "${object.name}";
6707
6717
  payload.data.record = record;
6708
6718
  payload.data.NAME_FIELD_VALUE = ${nameLabel} || record.name;
6709
6719
  payload.data._master = {
6710
6720
  record: record,
6711
- objectName: "${object.name}",
6712
- recordId: record._id
6721
+ objectName: "\${objectName}",
6722
+ recordId: "\${recordId}"
6713
6723
  }
6714
6724
  window.postMessage(Object.assign({type: "record.loaded"}, {record: record}), "*")
6715
6725
  }
@@ -7618,6 +7628,11 @@ var __assign$1 = function() {
7618
7628
  return t;
7619
7629
  };
7620
7630
  return __assign$1.apply(this, arguments);
7631
+ };
7632
+
7633
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
7634
+ var e = new Error(message);
7635
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
7621
7636
  };
7622
7637
 
7623
7638
  /**
@@ -9311,15 +9326,38 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
9311
9326
  if (!ctx) {
9312
9327
  ctx = {};
9313
9328
  }
9329
+ const searchableFields = ctx.searchable_fields;
9330
+ const autoOpenFilter = !!ctx.auto_open_filter;
9314
9331
  const btnSearchId = "btn_filter_form_search_" + new Date().getTime();
9315
9332
  const filterFormSchema = await getObjectFieldsFilterFormSchema(ctx);
9316
9333
  const keywordsSearchBoxName = ctx.keywordsSearchBoxName || "__keywords";
9317
9334
  const onSearchScript = `
9318
- // console.log("===onSearchScript=form==");
9335
+ let isLookup = event.data.isLookup;
9336
+ let __lookupField = event.data.__lookupField;
9319
9337
  const scope = event.context.scoped;
9338
+ let crud = SteedosUI.getClosestAmisComponentByType(scope, "crud");
9320
9339
  var filterForm = scope.parent.parent.getComponents().find(function(n){
9321
9340
  return n.props.type === "form";
9322
9341
  });
9342
+ // 使用filterForm.getValues()的话,并不能拿到本地存储中的过滤条件,所以需要从event.data中取,因为本地存储中的过滤条件自动填充到表单上时filterForm.getValues()拿不到。
9343
+ let filterFormValues = event.data;
9344
+ filterFormValues = JSON.parse(JSON.stringify(filterFormValues)); //只取当层数据域中数据,去除__super层数据
9345
+ const changedFilterFormValues = _.pickBy(filterFormValues, function(n,k){return /^__searchable__/.test(k);});
9346
+ // 同步__changedFilterFormValues中的值
9347
+ // crud && crud.setData({__changedFilterFormValues: {}});
9348
+ let __changedFilterFormValuesKey = "__changedFilterFormValues";
9349
+ if(isLookup && __lookupField){
9350
+ let lookupTag = "__lookup__" + __lookupField.name + "__" + __lookupField.reference_to;
9351
+ if(__lookupField.reference_to_field){
9352
+ lookupTag += "__" + __lookupField.reference_to_field;
9353
+ }
9354
+ __changedFilterFormValuesKey += lookupTag;
9355
+ }
9356
+ if(crud){
9357
+ let crudData = crud.getData();
9358
+ crudData[__changedFilterFormValuesKey] = changedFilterFormValues;
9359
+ crud.setData(crudData);
9360
+ }
9323
9361
  filterForm.handleFormSubmit(event);
9324
9362
  // var filterFormValues = filterForm.getValues();
9325
9363
  // var listView = scope.parent.parent.parent.getComponents().find(function(n){
@@ -9368,11 +9406,8 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
9368
9406
  }
9369
9407
  filterService.setData({showFieldsFilter});
9370
9408
  // resizeWindow();//已迁移到搜索栏表单提交事件中执行,因为表单项change后也会触发表单提交了
9371
- // 使用filterForm.getValues()的话,并不能拿到本地存储中的过滤条件,所以需要从event.data中取。
9372
- let filterFormValues = event.data;
9373
9409
  let isFieldsFilterEmpty = SteedosUI.isFilterFormValuesEmpty(filterFormValues);
9374
- let crud = SteedosUI.getClosestAmisComponentByType(scope, "crud");
9375
- let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
9410
+ let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service", {name: "service_object_table_crud"});
9376
9411
  crudService && crudService.setData({isFieldsFilterEmpty, showFieldsFilter});
9377
9412
  `;
9378
9413
  const onCancelScript = `
@@ -9458,10 +9493,12 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
9458
9493
 
9459
9494
  // 移除搜索按钮上的红点
9460
9495
  // let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
9461
- let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
9496
+ let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service", {name: "service_object_table_crud"});
9462
9497
  crudService && crudService.setData({isFieldsFilterEmpty: true, showFieldsFilter: false});
9463
9498
  `;
9464
9499
  const dataProviderInited = `
9500
+ const searchableFields = ${JSON.stringify(searchableFields)};
9501
+ const autoOpenFilter = ${autoOpenFilter};
9465
9502
  const objectName = data.objectName;
9466
9503
  const isLookup = data.isLookup;
9467
9504
  const listName = data.listName;
@@ -9474,6 +9511,11 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
9474
9511
  if(defaultSearchableFields){
9475
9512
  defaultSearchableFields = defaultSearchableFields.split(",");
9476
9513
  }
9514
+ if(_.isEmpty(defaultSearchableFields) && searchableFields){
9515
+ if(searchableFields.length){
9516
+ defaultSearchableFields = _.map(searchableFields, 'field');
9517
+ }
9518
+ }
9477
9519
  if(_.isEmpty(defaultSearchableFields) && data.uiSchema){
9478
9520
  let listView = data.uiSchema.list_views[data.listName];
9479
9521
  const sFields = listView && listView.searchable_fields;
@@ -9492,7 +9534,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
9492
9534
  setData({ filterFormSearchableFields: defaultSearchableFields });
9493
9535
  if(isLookup){
9494
9536
  // looup字段过滤器不在本地缓存记住过滤条件,所以初始始终隐藏过滤器
9495
- setData({ showFieldsFilter: false });
9537
+ setData({ showFieldsFilter: autoOpenFilter });
9496
9538
  }
9497
9539
  else{
9498
9540
  const listViewPropsStoreKey = location.pathname + "/crud";
@@ -10757,7 +10799,7 @@ async function getObjectListHeaderFieldsFilterBar(objectSchema, listViewName, ct
10757
10799
  * @param {*} objectSchema 对象UISchema
10758
10800
  * @returns amisSchema
10759
10801
  */
10760
- function getObjectListHeader$1(objectSchema, listViewName, ctx) {
10802
+ function getObjectListHeader(objectSchema, listViewName, ctx) {
10761
10803
  if (!ctx) {
10762
10804
  ctx = {};
10763
10805
  }
@@ -12083,10 +12125,9 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
12083
12125
  }
12084
12126
 
12085
12127
  const onChangeScript = `
12086
- // console.log("==search=onChangeScript===");
12087
12128
  const scope = event.context.scoped;
12088
12129
  let crud = SteedosUI.getClosestAmisComponentByType(scope, "crud");
12089
- // let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
12130
+ // let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service", {name: "service_object_table_crud"});
12090
12131
  let __changedSearchBoxValues = {};
12091
12132
  __changedSearchBoxValues["${keywordsSearchBoxName}"] = event.data["${keywordsSearchBoxName}"];
12092
12133
  // crudService && crudService.setData({__changedSearchBoxValues: __changedSearchBoxValues});
@@ -12453,10 +12494,28 @@ async function getObjectFilter(objectSchema, fields, options) {
12453
12494
  let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
12454
12495
  let filterFormService = SteedosUI.getClosestAmisComponentByType(filterForm.context, "service");
12455
12496
  // 使用event.data的话,并不能拿到本地存储中的过滤条件,所以需要从filterFormService中取。
12456
- let filterFormValues = filterFormService.getData()
12497
+ let filterFormValues = filterFormService.getData();
12498
+ filterFormValues = JSON.parse(JSON.stringify(filterFormValues)); //只取当层数据域中数据,去除__super层数据
12457
12499
  let isFieldsFilterEmpty = SteedosUI.isFilterFormValuesEmpty(filterFormValues);
12458
12500
  let crud = SteedosUI.getClosestAmisComponentByType(scope, "crud");
12459
- let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
12501
+ const changedFilterFormValues = _.pickBy(filterFormValues, function(n,k){return /^__searchable__/.test(k);});
12502
+ // 这里不用crudService而用crud是因为lookup字段弹出的列表中的crudService中的变量无法传入crud的发送适配器中
12503
+ // crud && crud.setData({__changedFilterFormValues: changedFilterFormValues});
12504
+ let __changedFilterFormValuesKey = "__changedFilterFormValues";
12505
+ if(isLookup && __lookupField){
12506
+ let lookupTag = "__lookup__" + __lookupField.name + "__" + __lookupField.reference_to;
12507
+ if(__lookupField.reference_to_field){
12508
+ lookupTag += "__" + __lookupField.reference_to_field;
12509
+ }
12510
+ __changedFilterFormValuesKey += lookupTag;
12511
+ }
12512
+ if(crud){
12513
+ let crudData = crud.getData();
12514
+ crudData[__changedFilterFormValuesKey] = changedFilterFormValues;
12515
+ crud.setData(crudData);
12516
+ }
12517
+
12518
+ let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service", {name: "service_object_table_crud"});
12460
12519
  crudService && crudService.setData({isFieldsFilterEmpty});
12461
12520
  `;
12462
12521
  let onChangeScript = `
@@ -12471,7 +12530,7 @@ async function getObjectFilter(objectSchema, fields, options) {
12471
12530
  filterFormValues = JSON.parse(JSON.stringify(filterFormValues)); //只取当层数据域中数据,去除__super层数据
12472
12531
  let crud = SteedosUI.getClosestAmisComponentByType(scope, "crud");
12473
12532
  const changedFilterFormValues = _.pickBy(filterFormValues, function(n,k){return /^__searchable__/.test(k);});;
12474
- // let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
12533
+ // let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service", {name: "service_object_table_crud"});
12475
12534
  // crudService && crudService.setData({__changedFilterFormValues: changedFilterFormValues});
12476
12535
  // 这里不用crudService而用crud是因为lookup字段弹出的列表中的crudService中的变量无法传入crud的发送适配器中
12477
12536
  // crud && crud.setData({__changedFilterFormValues: changedFilterFormValues});
@@ -12827,7 +12886,7 @@ async function getObjectCRUD(objectSchema, fields, options){
12827
12886
  className: crudModeClassName,
12828
12887
  //目前crud的service层id不认用户自定义id,只支持默认规则id,许多地方的格式都写死了service_listview_${objectname}
12829
12888
  id: `service_${id}`,
12830
- name: `page`,
12889
+ name: "service_object_table_crud",
12831
12890
  data: options.amisData,
12832
12891
  body: body,
12833
12892
  //监听广播事件,重算crud高度
@@ -13094,7 +13153,7 @@ async function getObjectDetail(objectSchema, recordId, ctx){
13094
13153
  }
13095
13154
 
13096
13155
  amisSchema.body[0].body = await getFormSchemaWithDataFilter(amisSchema.body[0].body, { formDataFilter, onFormDataFilter, amisData, env });
13097
- // console.log('getObjectDetail=====>', amisSchema);
13156
+ // console.log('getObjectDetail=====>', amisSchema, objectSchema, recordId, ctx);
13098
13157
  return amisSchema;
13099
13158
  }
13100
13159
 
@@ -13174,8 +13233,8 @@ const getRecordPermissions = async (objectName, recordId)=>{
13174
13233
  /*
13175
13234
  * @Author: baozhoutao@steedos.com
13176
13235
  * @Date: 2022-07-05 15:55:39
13177
- * @LastEditors: baozhoutao@steedos.com
13178
- * @LastEditTime: 2024-02-18 14:46:50
13236
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
13237
+ * @LastEditTime: 2025-01-08 13:32:51
13179
13238
  * @Description:
13180
13239
  */
13181
13240
 
@@ -13249,7 +13308,7 @@ async function getObjectRelatedList(
13249
13308
 
13250
13309
  // 获取单个相关表
13251
13310
  async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObjectName, relatedKey, ctx){
13252
- let { top, perPage, appId, relatedLabel, className, columns, sort, filters, visible_on } = ctx;
13311
+ let { top, perPage, appId, relatedLabel, className, columns, sort, filters, visible_on, enableHeaderToolbar } = ctx;
13253
13312
  // console.log('getRecordDetailRelatedListSchema==>',objectName,recordId,relatedObjectName)
13254
13313
  const relatedObjectUiSchema = await getUISchema(relatedObjectName);
13255
13314
  if(!relatedObjectUiSchema){
@@ -13314,6 +13373,10 @@ async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObj
13314
13373
  let headerToolbar = [];
13315
13374
  if(!isMobile){
13316
13375
  headerToolbar.push("bulkActions");
13376
+ if (enableHeaderToolbar) {
13377
+ // 通过 enableHeaderToolbar = true 可以控制是否显示内置的带过滤器的headerToolbar
13378
+ headerToolbar = undefined;
13379
+ }
13317
13380
  }
13318
13381
  const options = {
13319
13382
  globalFilter,
@@ -13352,7 +13415,7 @@ async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObj
13352
13415
  amisSchema: {
13353
13416
  type: "service",
13354
13417
  id: componentId,
13355
- className: `steedos-record-related-list mb-4 last:mb-0 ${componentId} ${className}`,
13418
+ className: `steedos-record-related-list mb-4 last:mb-0 ${componentId} ${className} ${enableHeaderToolbar ? 'enable-header-toolbar' : ''}`,
13356
13419
  data: {
13357
13420
  relatedKey: relatedKey,
13358
13421
  listViewId: `amis-\${appId}-${relatedObjectName}-listview`,
@@ -13454,6 +13517,7 @@ async function getRelatedListSchema(
13454
13517
  listViewName,
13455
13518
  ctx
13456
13519
  ) {
13520
+ const { enableHeaderToolbar } = ctx;
13457
13521
  const uiSchema = await getUISchema(objectName);
13458
13522
  if(!uiSchema){
13459
13523
  return {}
@@ -13506,10 +13570,14 @@ async function getRelatedListSchema(
13506
13570
  delete ctx.filters;
13507
13571
 
13508
13572
  delete ctx.globalFilter;
13573
+ delete ctx.enableHeaderToolbar;
13509
13574
 
13510
13575
  const adaptor = `
13511
13576
  try{
13512
13577
  if(setDataToComponentId){
13578
+ // 子表列表在headerToolbar过滤器中设置过过滤条件的话,始终显示子表列表,无论是否查询到数据
13579
+ // 改为使用css样式控制子表列表放开headerToolbar时,始终显示crud,只隐藏crud内部的表格,从而始终显示headerToolbar不受这里逻辑影响
13580
+ // var headerToolbarFilterChanged = context.isFieldsFilterEmpty === false;
13513
13581
  if(payload.data.count){
13514
13582
  setTimeout(function(){
13515
13583
  // 设计器中获取不到window.$从而导致报错, 所以用纯js替换下。
@@ -13532,7 +13600,7 @@ async function getRelatedListSchema(
13532
13600
  "filters": listviewFilter,
13533
13601
  "filtersFunction": filtersFunction,
13534
13602
  "sort": listViewSort,
13535
- "filterVisible": false,
13603
+ "filterVisible": !!enableHeaderToolbar,
13536
13604
  "requestAdaptor": ctx.requestAdaptor,
13537
13605
  "adaptor": adaptor + ctx.adaptor || '',
13538
13606
  "ctx": ctx,
@@ -13583,8 +13651,8 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
13583
13651
  /*
13584
13652
  * @Author: baozhoutao@steedos.com
13585
13653
  * @Date: 2022-07-05 15:55:39
13586
- * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
13587
- * @LastEditTime: 2024-04-26 16:46:44
13654
+ * @LastEditors: baozhoutao@steedos.com
13655
+ * @LastEditTime: 2025-02-21 13:31:43
13588
13656
  * @Description:
13589
13657
  */
13590
13658
 
@@ -15027,6 +15095,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
15027
15095
  ctx.idFieldName = refObjectConfig.idFieldName;
15028
15096
  ctx.objectName = refObjectConfig.name;
15029
15097
 
15098
+ // 是否显示lookup字段左侧的过滤器(如果有的话),默认为true,目前只有lookup选人字段有左侧树过滤器
15099
+ const showLeftFilter = field.show_left_filter !== false;
15100
+
15030
15101
  let tableFields = [];
15031
15102
  const searchableFields = [];
15032
15103
 
@@ -15358,6 +15429,20 @@ async function lookupToAmisPicker(field, readonly, ctx){
15358
15429
  });
15359
15430
  payload.data.rows = updatedResult;
15360
15431
  }
15432
+ let __changedFilterFormValuesKey = "__changedFilterFormValues";
15433
+ let __lookupField = api.data.$self.__lookupField;
15434
+ if(__lookupField){
15435
+ let lookupTag = "__lookup__" + __lookupField.name + "__" + __lookupField.reference_to;
15436
+ if(__lookupField.reference_to_field){
15437
+ lookupTag += "__" + __lookupField.reference_to_field;
15438
+ }
15439
+ __changedFilterFormValuesKey += lookupTag;
15440
+ }
15441
+ let __changedFilterFormValues = api.context[__changedFilterFormValuesKey] || {};
15442
+ let __changedSearchBoxValues = api.context.__changedSearchBoxValues || {};
15443
+ // 列表搜索和快速搜索,有时在某些操作情况下还是会造成crud接口请求使用的过滤条件是上次的,这里强制把正确的过滤条件返回到crud,详细规则见:https://github.com/steedos/steedos-platform/issues/7112
15444
+ payload.data[__changedFilterFormValuesKey] = __changedFilterFormValues;
15445
+ payload.data.__changedSearchBoxValues = __changedSearchBoxValues;
15361
15446
  return payload;
15362
15447
  `;
15363
15448
  if(field.optionsFunction || field._optionsFunction){
@@ -15393,7 +15478,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
15393
15478
 
15394
15479
  pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, fieldsArr, ctx.formFactor, { isLookup: true, keywordsSearchBoxName });
15395
15480
 
15396
- if(referenceTo.objectName === "space_users" && field.reference_to_field === "user"){
15481
+ if(referenceTo.objectName === "space_users" && field.reference_to_field === "user" && showLeftFilter){
15397
15482
  pickerSchema.headerToolbar.push(getLookupSapceUserTreeSchema(isMobile));
15398
15483
  pickerSchema.className = pickerSchema.className || "" + " steedos-select-user";
15399
15484
  }
@@ -15413,7 +15498,10 @@ async function lookupToAmisPicker(field, readonly, ctx){
15413
15498
  pickerSchema.filter = await getObjectFilter(refObjectConfig, fields, {
15414
15499
  ...ctx,
15415
15500
  isLookup: true,
15416
- keywordsSearchBoxName
15501
+ keywordsSearchBoxName,
15502
+ searchable_fields: field.searchable_fields,
15503
+ auto_open_filter: field.auto_open_filter,
15504
+ show_left_filter: field.show_left_filter
15417
15505
  });
15418
15506
  }
15419
15507
  pickerSchema.data = Object.assign({}, pickerSchema.data, {
@@ -19183,7 +19271,7 @@ async function getListviewInitSchema(objectApiName, listViewName, ctx) {
19183
19271
  const defaults = ctx.defaults || {};
19184
19272
  if(!defaults.headerSchema){
19185
19273
  //传入isListviewInit是区别于对象列表类型的微页面,即getListPageInitSchema函数中该属性为false
19186
- const headerSchema = await getObjectListHeader$1(uiSchema, listViewName, {
19274
+ const headerSchema = await getObjectListHeader(uiSchema, listViewName, {
19187
19275
  onlySecordLine: true,
19188
19276
  isListviewInit: true
19189
19277
  });
@@ -21667,139 +21755,139 @@ const getInstanceInfo = async ({ instanceId, box }) => {
21667
21755
  };
21668
21756
 
21669
21757
  var index_esm$1 = /*#__PURE__*/Object.freeze({
21670
- __proto__: null,
21671
- Field: index,
21672
- Router: Router$1,
21673
- absoluteUrl: absoluteUrl,
21674
- amisRender: amisRender,
21675
- amisRootClick: amisRootClick,
21676
- cloneObject: cloneObject,
21677
- conditionsToFilters: conditionsToFilters,
21678
- createObject: createObject,
21679
- defaultsDeep: defaultsDeep,
21680
- deleteVariable: deleteVariable,
21681
- execute: execute,
21682
- executeButton: executeButton,
21683
- extendObject: extendObject,
21684
- fetchAPI: fetchAPI,
21685
- filtersToConditions: filtersToConditions,
21686
- getAmisInputTableSchema: getAmisInputTableSchema,
21687
- getApp: getApp,
21688
- getApps: getApps,
21689
- getAuthToken: getAuthToken,
21690
- getAuthorization: getAuthorization,
21691
- getButton: getButton,
21692
- getButtonVisible: getButtonVisible,
21693
- getButtonVisibleOn: getButtonVisibleOn,
21694
- getButtons: getButtons,
21695
- getCalendarSchema: getCalendarSchema,
21696
- getCreatedInfoTpl: getCreatedInfoTpl,
21697
- getDateTimeTpl: getDateTimeTpl,
21698
- getDateTpl: getDateTpl,
21699
- getDefaultRenderData: getDefaultRenderData,
21700
- getEnv: getEnv,
21701
- getEnvs: getEnvs,
21702
- getEvn: getEvn,
21703
- getField: getField,
21704
- getFieldTpl: getFieldTpl,
21705
- getFileSrc: getFileSrc,
21706
- getFlowFormSchema: getFlowFormSchema,
21707
- getFormPageInitSchema: getFormPageInitSchema,
21708
- getFormSchema: getFormSchema,
21709
- getGlobalNowData: getGlobalNowData$1,
21710
- getIdsPickerSchema: getIdsPickerSchema,
21711
- getImageSrc: getImageSrc,
21712
- getInstanceInfo: getInstanceInfo,
21713
- getListPageInitSchema: getListPageInitSchema,
21714
- getListSchema: getListSchema,
21715
- getListViewButtons: getListViewButtons,
21716
- getListViewColumns: getListViewColumns,
21717
- getListViewFilter: getListViewFilter,
21718
- getListViewItemButtons: getListViewItemButtons,
21719
- getListViewSort: getListViewSort,
21720
- getListviewInitSchema: getListviewInitSchema,
21721
- getLocationTpl: getLocationTpl,
21722
- getLookupSapceUserTreeSchema: getLookupSapceUserTreeSchema,
21723
- getLookupTpl: getLookupTpl,
21724
- getModifiedInfoTpl: getModifiedInfoTpl,
21725
- getNameTpl: getNameTpl,
21726
- getNameTplUrl: getNameTplUrl,
21727
- getNotifications: getNotifications,
21728
- getNumberTpl: getNumberTpl,
21729
- getObjectDetailButtons: getObjectDetailButtons,
21730
- getObjectDetailButtonsSchemas: getObjectDetailButtonsSchemas,
21731
- getObjectDetailMoreButtons: getObjectDetailMoreButtons,
21732
- getObjectFieldsFilterBarSchema: getObjectFieldsFilterBarSchema,
21733
- getObjectFieldsFilterButtonSchema: getObjectFieldsFilterButtonSchema,
21734
- getObjectFieldsFilterFormSchema: getObjectFieldsFilterFormSchema,
21735
- getObjectListHeader: getObjectListHeader$1,
21736
- getObjectListHeaderFieldsFilterBar: getObjectListHeaderFieldsFilterBar,
21737
- getObjectListHeaderFirstLine: getObjectListHeaderFirstLine,
21738
- getObjectListHeaderSecordLine: getObjectListHeaderSecordLine,
21739
- getObjectListViewButtonsSchemas: getObjectListViewButtonsSchemas,
21740
- getObjectRecordDetailHeader: getObjectRecordDetailHeader,
21741
- getObjectRecordDetailRelatedListButtonsSchemas: getObjectRecordDetailRelatedListButtonsSchemas,
21742
- getObjectRecordDetailRelatedListHeader: getObjectRecordDetailRelatedListHeader,
21743
- getObjectRelated: getObjectRelated,
21744
- getObjectRelatedList: getObjectRelatedList,
21745
- getObjectRelatedListButtons: getObjectRelatedListButtons,
21746
- getObjectRelatedListHeader: getObjectRelatedListHeader,
21747
- getObjectRelatedListsMiniSchema: getObjectRelatedListsMiniSchema,
21748
- getPage: getPage,
21749
- getPasswordTpl: getPasswordTpl,
21750
- getRecord: getRecord,
21751
- getRecordDetailHeaderSchema: getRecordDetailHeaderSchema,
21752
- getRecordDetailMiniSchema: getRecordDetailMiniSchema,
21753
- getRecordDetailRelatedListSchema: getRecordDetailRelatedListSchema,
21754
- getRecordDetailSchema: getRecordDetailSchema,
21755
- getRecordPageInitSchema: getRecordPageInitSchema,
21756
- getRecordPermissions: getRecordPermissions,
21757
- getRecordServiceSchema: getRecordServiceSchema,
21758
- getRefObjectNameFieldName: getRefObjectNameFieldName,
21759
- getReferenceTo: getReferenceTo,
21760
- getReferenceToFieldSchema: getReferenceToFieldSchema,
21761
- getReferenceToSync: getReferenceToSync,
21762
- getRelatedFieldTpl: getRelatedFieldTpl,
21763
- getRelatedFieldValue: getRelatedFieldValue,
21764
- getRelatedListSchema: getRelatedListSchema,
21765
- getRelatedsCount: getRelatedsCount,
21766
- getRootUrl: getRootUrl,
21767
- getSelectMap: getSelectMap,
21768
- getSelectTpl: getSelectTpl,
21769
- getSelectUserSchema: getSelectUserSchema,
21770
- getSpaceUsersPickerAmisSchema: getSpaceUsersPickerAmisSchema,
21771
- getSpaceUsersPickerSchema: getSpaceUsersPickerSchema,
21772
- getSteedosAuth: getSteedosAuth,
21773
- getSwitchTpl: getSwitchTpl,
21774
- getTableSchema: getTableSchema,
21775
- getTenantId: getTenantId,
21776
- getTimeTpl: getTimeTpl,
21777
- getUISchema: getUISchema,
21778
- getUISchemaSync: getUISchemaSync$1,
21779
- getUiFieldTpl: getUiFieldTpl,
21780
- getUiFileSizeTpl: getUiFileSizeTpl,
21781
- getUserId: getUserId,
21782
- getViewSchema: getViewSchema,
21783
- isExpression: isExpression$1,
21784
- isObject: isObject$8,
21785
- lookupToAmis: lookupToAmis,
21786
- lookupToAmisIdsPicker: lookupToAmisIdsPicker,
21787
- lookupToAmisPicker: lookupToAmisPicker,
21788
- lookupToAmisSelect: lookupToAmisSelect,
21789
- lookupToAmisSelectUser: lookupToAmisSelectUser,
21790
- markReadAll: markReadAll,
21791
- parseSingleExpression: parseSingleExpression$1,
21792
- registerRemoteAssets: registerRemoteAssets,
21793
- registerRenders: registerRenders,
21794
- setEnv: setEnv,
21795
- setEnvs: setEnvs,
21796
- setRootUrl: setRootUrl,
21797
- setSteedosAuth: setSteedosAuth,
21798
- setUISchemaFunction: setUISchemaFunction,
21799
- setVariable: setVariable,
21800
- standardButtonsTodo: standardButtonsTodo,
21801
- uuidv4: uuidv4,
21802
- i18next: instance
21758
+ __proto__: null,
21759
+ Field: index,
21760
+ Router: Router$1,
21761
+ absoluteUrl: absoluteUrl,
21762
+ amisRender: amisRender,
21763
+ amisRootClick: amisRootClick,
21764
+ cloneObject: cloneObject,
21765
+ conditionsToFilters: conditionsToFilters,
21766
+ createObject: createObject,
21767
+ defaultsDeep: defaultsDeep,
21768
+ deleteVariable: deleteVariable,
21769
+ execute: execute,
21770
+ executeButton: executeButton,
21771
+ extendObject: extendObject,
21772
+ fetchAPI: fetchAPI,
21773
+ filtersToConditions: filtersToConditions,
21774
+ getAmisInputTableSchema: getAmisInputTableSchema,
21775
+ getApp: getApp,
21776
+ getApps: getApps,
21777
+ getAuthToken: getAuthToken,
21778
+ getAuthorization: getAuthorization,
21779
+ getButton: getButton,
21780
+ getButtonVisible: getButtonVisible,
21781
+ getButtonVisibleOn: getButtonVisibleOn,
21782
+ getButtons: getButtons,
21783
+ getCalendarSchema: getCalendarSchema,
21784
+ getCreatedInfoTpl: getCreatedInfoTpl,
21785
+ getDateTimeTpl: getDateTimeTpl,
21786
+ getDateTpl: getDateTpl,
21787
+ getDefaultRenderData: getDefaultRenderData,
21788
+ getEnv: getEnv,
21789
+ getEnvs: getEnvs,
21790
+ getEvn: getEvn,
21791
+ getField: getField,
21792
+ getFieldTpl: getFieldTpl,
21793
+ getFileSrc: getFileSrc,
21794
+ getFlowFormSchema: getFlowFormSchema,
21795
+ getFormPageInitSchema: getFormPageInitSchema,
21796
+ getFormSchema: getFormSchema,
21797
+ getGlobalNowData: getGlobalNowData$1,
21798
+ getIdsPickerSchema: getIdsPickerSchema,
21799
+ getImageSrc: getImageSrc,
21800
+ getInstanceInfo: getInstanceInfo,
21801
+ getListPageInitSchema: getListPageInitSchema,
21802
+ getListSchema: getListSchema,
21803
+ getListViewButtons: getListViewButtons,
21804
+ getListViewColumns: getListViewColumns,
21805
+ getListViewFilter: getListViewFilter,
21806
+ getListViewItemButtons: getListViewItemButtons,
21807
+ getListViewSort: getListViewSort,
21808
+ getListviewInitSchema: getListviewInitSchema,
21809
+ getLocationTpl: getLocationTpl,
21810
+ getLookupSapceUserTreeSchema: getLookupSapceUserTreeSchema,
21811
+ getLookupTpl: getLookupTpl,
21812
+ getModifiedInfoTpl: getModifiedInfoTpl,
21813
+ getNameTpl: getNameTpl,
21814
+ getNameTplUrl: getNameTplUrl,
21815
+ getNotifications: getNotifications,
21816
+ getNumberTpl: getNumberTpl,
21817
+ getObjectDetailButtons: getObjectDetailButtons,
21818
+ getObjectDetailButtonsSchemas: getObjectDetailButtonsSchemas,
21819
+ getObjectDetailMoreButtons: getObjectDetailMoreButtons,
21820
+ getObjectFieldsFilterBarSchema: getObjectFieldsFilterBarSchema,
21821
+ getObjectFieldsFilterButtonSchema: getObjectFieldsFilterButtonSchema,
21822
+ getObjectFieldsFilterFormSchema: getObjectFieldsFilterFormSchema,
21823
+ getObjectListHeader: getObjectListHeader,
21824
+ getObjectListHeaderFieldsFilterBar: getObjectListHeaderFieldsFilterBar,
21825
+ getObjectListHeaderFirstLine: getObjectListHeaderFirstLine,
21826
+ getObjectListHeaderSecordLine: getObjectListHeaderSecordLine,
21827
+ getObjectListViewButtonsSchemas: getObjectListViewButtonsSchemas,
21828
+ getObjectRecordDetailHeader: getObjectRecordDetailHeader,
21829
+ getObjectRecordDetailRelatedListButtonsSchemas: getObjectRecordDetailRelatedListButtonsSchemas,
21830
+ getObjectRecordDetailRelatedListHeader: getObjectRecordDetailRelatedListHeader,
21831
+ getObjectRelated: getObjectRelated,
21832
+ getObjectRelatedList: getObjectRelatedList,
21833
+ getObjectRelatedListButtons: getObjectRelatedListButtons,
21834
+ getObjectRelatedListHeader: getObjectRelatedListHeader,
21835
+ getObjectRelatedListsMiniSchema: getObjectRelatedListsMiniSchema,
21836
+ getPage: getPage,
21837
+ getPasswordTpl: getPasswordTpl,
21838
+ getRecord: getRecord,
21839
+ getRecordDetailHeaderSchema: getRecordDetailHeaderSchema,
21840
+ getRecordDetailMiniSchema: getRecordDetailMiniSchema,
21841
+ getRecordDetailRelatedListSchema: getRecordDetailRelatedListSchema,
21842
+ getRecordDetailSchema: getRecordDetailSchema,
21843
+ getRecordPageInitSchema: getRecordPageInitSchema,
21844
+ getRecordPermissions: getRecordPermissions,
21845
+ getRecordServiceSchema: getRecordServiceSchema,
21846
+ getRefObjectNameFieldName: getRefObjectNameFieldName,
21847
+ getReferenceTo: getReferenceTo,
21848
+ getReferenceToFieldSchema: getReferenceToFieldSchema,
21849
+ getReferenceToSync: getReferenceToSync,
21850
+ getRelatedFieldTpl: getRelatedFieldTpl,
21851
+ getRelatedFieldValue: getRelatedFieldValue,
21852
+ getRelatedListSchema: getRelatedListSchema,
21853
+ getRelatedsCount: getRelatedsCount,
21854
+ getRootUrl: getRootUrl,
21855
+ getSelectMap: getSelectMap,
21856
+ getSelectTpl: getSelectTpl,
21857
+ getSelectUserSchema: getSelectUserSchema,
21858
+ getSpaceUsersPickerAmisSchema: getSpaceUsersPickerAmisSchema,
21859
+ getSpaceUsersPickerSchema: getSpaceUsersPickerSchema,
21860
+ getSteedosAuth: getSteedosAuth,
21861
+ getSwitchTpl: getSwitchTpl,
21862
+ getTableSchema: getTableSchema,
21863
+ getTenantId: getTenantId,
21864
+ getTimeTpl: getTimeTpl,
21865
+ getUISchema: getUISchema,
21866
+ getUISchemaSync: getUISchemaSync$1,
21867
+ getUiFieldTpl: getUiFieldTpl,
21868
+ getUiFileSizeTpl: getUiFileSizeTpl,
21869
+ getUserId: getUserId,
21870
+ getViewSchema: getViewSchema,
21871
+ isExpression: isExpression$1,
21872
+ isObject: isObject$8,
21873
+ lookupToAmis: lookupToAmis,
21874
+ lookupToAmisIdsPicker: lookupToAmisIdsPicker,
21875
+ lookupToAmisPicker: lookupToAmisPicker,
21876
+ lookupToAmisSelect: lookupToAmisSelect,
21877
+ lookupToAmisSelectUser: lookupToAmisSelectUser,
21878
+ markReadAll: markReadAll,
21879
+ parseSingleExpression: parseSingleExpression$1,
21880
+ registerRemoteAssets: registerRemoteAssets,
21881
+ registerRenders: registerRenders,
21882
+ setEnv: setEnv,
21883
+ setEnvs: setEnvs,
21884
+ setRootUrl: setRootUrl,
21885
+ setSteedosAuth: setSteedosAuth,
21886
+ setUISchemaFunction: setUISchemaFunction,
21887
+ setVariable: setVariable,
21888
+ standardButtonsTodo: standardButtonsTodo,
21889
+ uuidv4: uuidv4,
21890
+ i18next: instance
21803
21891
  });
21804
21892
 
21805
21893
  var getSchema = function (field, value, ctx) { return __awaiter(void 0, void 0, void 0, function () {
@@ -21935,7 +22023,7 @@ var AmisObjectFieldLookup = function (props) {
21935
22023
  }
21936
22024
  });
21937
22025
  }); };
21938
- return (React.createElement("div", { className: 'amis-object-field-lookup' }, schema ? (React.createElement("div", { className: "container p-0" }, render('body', schema, {
22026
+ return (React__default.createElement("div", { className: 'amis-object-field-lookup' }, schema ? (React__default.createElement("div", { className: "container p-0" }, render('body', schema, {
21939
22027
  // 这里的信息会作为 props 传递给子组件,一般情况下都不需要这个
21940
22028
  onChange: handleChange
21941
22029
  }))) : null));
@@ -21988,9 +22076,9 @@ var AmisObjectButton = function (props) {
21988
22076
  });
21989
22077
  };
21990
22078
  if (!button) {
21991
- return (React.createElement(React.Fragment, null,
21992
- React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "animate-spin w-4 h-4" },
21993
- React.createElement("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" }))));
22079
+ return (React__default.createElement(React__default.Fragment, null,
22080
+ React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "animate-spin w-4 h-4" },
22081
+ React__default.createElement("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" }))));
21994
22082
  }
21995
22083
  // console.log('AmisObjectButton===>', button, className);
21996
22084
  if (button.type === "amis_button") {
@@ -22024,7 +22112,7 @@ var AmisObjectButton = function (props) {
22024
22112
  schema.data = defaultsDeep$1({}, renderData, getDefaultRenderData(), schema.data);
22025
22113
  delete schema.data.event;
22026
22114
  }
22027
- return (React.createElement(React.Fragment, null, button && amisSchema ? (React.createElement(React.Fragment, null, render('body', schema, {
22115
+ return (React__default.createElement(React__default.Fragment, null, button && amisSchema ? (React__default.createElement(React__default.Fragment, null, render('body', schema, {
22028
22116
  // 这里的信息会作为 props 传递给子组件,一般情况下都不需要这个,
22029
22117
  data: renderData,
22030
22118
  onChange: function () {
@@ -22033,7 +22121,7 @@ var AmisObjectButton = function (props) {
22033
22121
  }))) : null));
22034
22122
  }
22035
22123
  else {
22036
- return (React.createElement("button", { onClick: buttonClick, className: "antd-Button antd-Button--default antd-Button--size-default steedos-object-button ".concat(className ? className : '') }, button.label));
22124
+ return (React__default.createElement("button", { onClick: buttonClick, className: "antd-Button antd-Button--default antd-Button--size-default steedos-object-button ".concat(className ? className : '') }, button.label));
22037
22125
  }
22038
22126
  };
22039
22127
 
@@ -22048,7 +22136,7 @@ var getMenu = function (render, buttons, btnClassName, props) {
22048
22136
  delete button.className;
22049
22137
  return {
22050
22138
  key: button.name,
22051
- label: (React.createElement(React.Fragment, null, render('body', button, props)))
22139
+ label: (React__default.createElement(React__default.Fragment, null, render('body', button, props)))
22052
22140
  };
22053
22141
  });
22054
22142
  };
@@ -22079,15 +22167,15 @@ var SteedosDropdownButton = function (props) {
22079
22167
  }
22080
22168
  }
22081
22169
  };
22082
- return (React.createElement(Dropdown, { menu: { items: menu }, trigger: trigger, onOpenChange: onOpenChange, placement: placement, overlayClassName: overlayClassName, arrow: arrow, getPopupContainer: function (button) {
22170
+ return (React__default.createElement(Dropdown, { menu: { items: menu }, trigger: trigger, onOpenChange: onOpenChange, placement: placement, overlayClassName: overlayClassName, arrow: arrow, getPopupContainer: function (button) {
22083
22171
  // 未配置getPopupContainer属性时,默认container为body,这里判断到dropdown button是在drawer中时,统一把container配置为drawer本身
22084
22172
  // 这样就可以解决drawer内点击dropdown button组件下拉菜单中的按钮时不应该自动关闭drawer的问题
22085
22173
  var drawerBody = window.$(button).closest(".amis-dialog-widget .antd-Drawer-body")[0];
22086
22174
  return drawerBody || document.querySelector("body");
22087
22175
  } },
22088
- React.createElement("button", { className: "slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small ".concat(className ? className : '') },
22089
- React.createElement("svg", { className: "w-4 h-4 fill-gray-500" },
22090
- React.createElement("use", { xlinkHref: "/assets/icons/utility-sprite/svg/symbols.svg#down" })))));
22176
+ React__default.createElement("button", { className: "slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small ".concat(className ? className : '') },
22177
+ React__default.createElement("svg", { className: "w-4 h-4 fill-gray-500" },
22178
+ React__default.createElement("use", { xlinkHref: "/assets/icons/utility-sprite/svg/symbols.svg#down" })))));
22091
22179
  };
22092
22180
 
22093
22181
  /*
@@ -22114,37 +22202,37 @@ var SteedosIcon = function (props) {
22114
22202
  // })
22115
22203
  // }, [xlinkHref])
22116
22204
  if (name.startsWith('http://') || name.startsWith('https://') || name.endsWith('.jpg') || name.endsWith('.png')) {
22117
- return React.createElement(Image, { alt: alt, height: height, width: width, className: className, preview: false, src: name });
22205
+ return React__default.createElement(Image, { alt: alt, height: height, width: width, className: className, preview: false, src: name });
22118
22206
  }
22119
22207
  if (name.indexOf('.') > -1) {
22120
22208
  var foo = name.split('.');
22121
22209
  category = foo[0];
22122
22210
  name = foo[1];
22123
22211
  }
22124
- return React.createElement("span", { className: "slds-icon_container slds-icon-".concat(category, "-").concat(name.replace("_", "-"), " ").concat(containerClassName) },
22125
- React.createElement("svg", { className: "slds-icon slds-icon_".concat(size, " slds-icon-text-").concat(colorVariant, " ").concat(className) },
22126
- React.createElement("use", { xlinkHref: "/assets/icons/".concat(category, "-sprite/svg/symbols.svg#").concat(name.replace("-", "_")) })));
22212
+ return React__default.createElement("span", { className: "slds-icon_container slds-icon-".concat(category, "-").concat(name.replace("_", "-"), " ").concat(containerClassName) },
22213
+ React__default.createElement("svg", { className: "slds-icon slds-icon_".concat(size, " slds-icon-text-").concat(colorVariant, " ").concat(className) },
22214
+ React__default.createElement("use", { xlinkHref: "/assets/icons/".concat(category, "-sprite/svg/symbols.svg#").concat(name.replace("-", "_")) })));
22127
22215
  };
22128
22216
 
22129
22217
  Tabs.TabPane;
22130
22218
  var HeaderDropdown = function (_a) {
22131
22219
  _a.overlayClassName; var restProps = __rest(_a, ["overlayClassName"]);
22132
- return (React.createElement(Dropdown, __assign$2({ overlayClassName: "header-dropdown", getPopupContainer: function (target) { return target.parentElement || document.body; } }, restProps, { arrow: true })));
22220
+ return (React__default.createElement(Dropdown, __assign$2({ overlayClassName: "header-dropdown", getPopupContainer: function (target) { return target.parentElement || document.body; } }, restProps, { arrow: true })));
22133
22221
  };
22134
22222
  var getOverlay = function (render, overlaySchema, data) {
22135
- return React.createElement(React.Fragment, null,
22136
- React.createElement(Spin, { delay: 300, spinning: false },
22137
- React.createElement("div", { className: "bg-white shadow" }, render('body', overlaySchema, {
22223
+ return React__default.createElement(React__default.Fragment, null,
22224
+ React__default.createElement(Spin, { delay: 300, spinning: false },
22225
+ React__default.createElement("div", { className: "bg-white shadow" }, render('body', overlaySchema, {
22138
22226
  // data: data
22139
22227
  // 这里的信息会作为 props 传递给子组件,一般情况下都不需要这个
22140
22228
  }))));
22141
22229
  };
22142
22230
  var SteedosDropdown = function (props) {
22143
22231
  var render = props.render, overlay = props.overlay, body = props.body, _a = props.trigger, trigger = _a === void 0 ? ['click'] : _a, _b = props.placement, placement = _b === void 0 ? 'bottomRight' : _b, overlayClassName = props.overlayClassName, className = props.className; props.data;
22144
- return (React.createElement(React.Fragment, null,
22145
- React.createElement(HeaderDropdown, { placement: placement, overlay: getOverlay(render, overlay), trigger: trigger, className: className, overlayClassName: overlayClassName },
22146
- React.createElement("div", null,
22147
- React.createElement(React.Fragment, null, render('body', body, {
22232
+ return (React__default.createElement(React__default.Fragment, null,
22233
+ React__default.createElement(HeaderDropdown, { placement: placement, overlay: getOverlay(render, overlay), trigger: trigger, className: className, overlayClassName: overlayClassName },
22234
+ React__default.createElement("div", null,
22235
+ React__default.createElement(React__default.Fragment, null, render('body', body, {
22148
22236
  // data: data
22149
22237
  }))))));
22150
22238
  };
@@ -22173,7 +22261,7 @@ function FromNow(_a) {
22173
22261
  setText(fromNow(date));
22174
22262
  }, 1000 * 60));
22175
22263
  }, [date]);
22176
- return (React.createElement(React.Fragment, null, text));
22264
+ return (React__default.createElement(React__default.Fragment, null, text));
22177
22265
  }
22178
22266
 
22179
22267
  /*
@@ -22185,7 +22273,7 @@ function FromNow(_a) {
22185
22273
  */
22186
22274
  var SteedosBadge = function (props) {
22187
22275
  var body = props.body, render = props.render, count = props.count, color = props.color, dot = props.dot, offset = props.offset, overflowCount = props.overflowCount, showZero = props.showZero, size = props.size, status = props.status, text = props.text, title = props.title;
22188
- return React.createElement(Badge, { count: count, color: color, dot: dot, offset: offset, overflowCount: overflowCount, showZero: showZero, size: size, status: status, text: text, title: title }, render('body', body, {}));
22276
+ return React__default.createElement(Badge, { count: count, color: color, dot: dot, offset: offset, overflowCount: overflowCount, showZero: showZero, size: size, status: status, text: text, title: title }, render('body', body, {}));
22189
22277
  };
22190
22278
 
22191
22279
  /*
@@ -22197,14 +22285,14 @@ var SteedosBadge = function (props) {
22197
22285
  */
22198
22286
  var SteedosBadgeRibbon = function (props) {
22199
22287
  var body = props.body, render = props.render, color = props.color, _a = props.placement, placement = _a === void 0 ? 'end' : _a, _b = props.text, text = _b === void 0 ? 'Badge.Ribbon' : _b;
22200
- return React.createElement(Badge.Ribbon, { color: color, placement: placement, text: text }, render('body', body, {}));
22288
+ return React__default.createElement(Badge.Ribbon, { color: color, placement: placement, text: text }, render('body', body, {}));
22201
22289
  };
22202
22290
 
22203
22291
  var SteedosLoading = function (props) {
22204
- return (React.createElement("div", { className: "w-full h-full flex items-center justify-center " },
22205
- React.createElement("svg", { className: "animate-spin -ml-1 mr-3 h-8 w-8 text-sky-500", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" },
22206
- React.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
22207
- React.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }))));
22292
+ return (React__default.createElement("div", { className: "w-full h-full flex items-center justify-center " },
22293
+ React__default.createElement("svg", { className: "animate-spin -ml-1 mr-3 h-8 w-8 text-sky-500", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" },
22294
+ React__default.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
22295
+ React__default.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }))));
22208
22296
  };
22209
22297
 
22210
22298
  /*
@@ -22222,9 +22310,9 @@ var SteedosSkeleton = function (props) {
22222
22310
  var active = config.active, avatar = config.avatar, loading = config.loading, paragraph = config.paragraph, round = config.round, title = config.title;
22223
22311
  loading = isBoolean(loading) ? loading : loading === 'true';
22224
22312
  // console.log("SteedosSkeleton====>", loading, config, typeof loading)
22225
- return React.createElement(React.Fragment, null,
22226
- React.createElement(Skeleton, { active: active, avatar: avatar, loading: loading, paragraph: paragraph, round: round, title: title }),
22227
- React.createElement("div", { className: loading ? 'hidden w-full h-full' : 'w-full h-full' }, body ? (React.createElement("div", { className: "steedos-skeleton-body ".concat(bodyClassName) }, render('body', body, {
22313
+ return React__default.createElement(React__default.Fragment, null,
22314
+ React__default.createElement(Skeleton, { active: active, avatar: avatar, loading: loading, paragraph: paragraph, round: round, title: title }),
22315
+ React__default.createElement("div", { className: loading ? 'hidden w-full h-full' : 'w-full h-full' }, body ? (React__default.createElement("div", { className: "steedos-skeleton-body ".concat(bodyClassName) }, render('body', body, {
22228
22316
  // 这里的信息会作为 props 传递给子组件,一般情况下都不需要这个
22229
22317
  }))) : null));
22230
22318
  };
@@ -22233,7 +22321,7 @@ var Collapse = /** @class */ (function (_super) {
22233
22321
  __extends(Collapse, _super);
22234
22322
  function Collapse() {
22235
22323
  var _this = _super !== null && _super.apply(this, arguments) || this;
22236
- _this.basicCollapse = React.createRef();
22324
+ _this.basicCollapse = React__default.createRef();
22237
22325
  return _this;
22238
22326
  }
22239
22327
  // @autobind
@@ -22281,7 +22369,7 @@ var Collapse = /** @class */ (function (_super) {
22281
22369
  Collapse.prototype.render = function () {
22282
22370
  var _a = this.props, id = _a.id, ns = _a.classPrefix, cx = _a.classnames, size = _a.size, wrapperComponent = _a.wrapperComponent, headingComponent = _a.headingComponent, className = _a.className, style = _a.style, headingClassName = _a.headingClassName, children = _a.children, titlePosition = _a.titlePosition, headerPosition = _a.headerPosition, title = _a.title, collapseTitle = _a.collapseTitle, collapseHeader = _a.collapseHeader, header = _a.header, body = _a.body, bodyClassName = _a.bodyClassName, render = _a.render, collapsable = _a.collapsable; _a.translate; var mountOnEnter = _a.mountOnEnter, unmountOnExit = _a.unmountOnExit, _b = _a.showArrow, showArrow = _b === void 0 ? true : _b, expandIcon = _a.expandIcon, disabled = _a.disabled, collapsed = _a.collapsed, propsUpdate = _a.propsUpdate, mobileUI = _a.mobileUI, divideLine = _a.divideLine, enableFieldSetStyle = _a.enableFieldSetStyle;
22283
22371
  var heading = title || header || '';
22284
- return (React.createElement(Collapse$1, { id: id, ref: this.basicCollapse, classnames: cx, classPrefix: ns, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit, size: size, wrapperComponent: wrapperComponent, headingComponent: headingComponent, className: className, style: style, headingClassName: headingClassName, bodyClassName: bodyClassName, headerPosition: titlePosition || headerPosition, collapsable: collapsable, collapsed: collapsed, showArrow: showArrow, disabled: disabled, propsUpdate: propsUpdate, expandIcon: expandIcon ? (typeof expandIcon.icon === 'object' ? (React.createElement(Icon, { cx: cx, icon: expandIcon.icon, className: cx('Collapse-icon-tranform') })) : (render('arrow-icon', expandIcon || '', {
22372
+ return (React__default.createElement(Collapse$1, { id: id, ref: this.basicCollapse, classnames: cx, classPrefix: ns, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit, size: size, wrapperComponent: wrapperComponent, headingComponent: headingComponent, className: className, style: style, headingClassName: headingClassName, bodyClassName: bodyClassName, headerPosition: titlePosition || headerPosition, collapsable: collapsable, collapsed: collapsed, showArrow: showArrow, disabled: disabled, propsUpdate: propsUpdate, expandIcon: expandIcon ? (typeof expandIcon.icon === 'object' ? (React__default.createElement(Icon, { cx: cx, icon: expandIcon.icon, className: cx('Collapse-icon-tranform') })) : (render('arrow-icon', expandIcon || '', {
22285
22373
  className: cx('Collapse-icon-tranform')
22286
22374
  }))) : null, collapseHeader: collapseTitle || collapseHeader
22287
22375
  ? render('heading', collapseTitle || collapseHeader)
@@ -22305,7 +22393,7 @@ var Collapse = /** @class */ (function (_super) {
22305
22393
  'size'
22306
22394
  ];
22307
22395
  return Collapse;
22308
- }(React.Component));
22396
+ }(React__default.Component));
22309
22397
  var FieldSetControl = /** @class */ (function (_super) {
22310
22398
  __extends(FieldSetControl, _super);
22311
22399
  function FieldSetControl(props) {
@@ -22325,12 +22413,12 @@ var FieldSetControl = /** @class */ (function (_super) {
22325
22413
  };
22326
22414
  mode && (props.mode = mode);
22327
22415
  horizontal && (props.horizontal = horizontal);
22328
- return (React.createElement("div", { className: cx("steedos-field-set-body Form--".concat(props.mode || formMode || 'normal'), formClassName) }, body ? render('body', body, props) : null));
22416
+ return (React__default.createElement("div", { className: cx("steedos-field-set-body Form--".concat(props.mode || formMode || 'normal'), formClassName) }, body ? render('body', body, props) : null));
22329
22417
  };
22330
22418
  FieldSetControl.prototype.render = function () {
22331
22419
  var _a = this.props; _a.controls; var className = _a.className; _a.mode; var body = _a.body, rest = __rest(_a, ["controls", "className", "mode", "body"]);
22332
22420
  var children = this.renderBody;
22333
- return (React.createElement(Collapse, __assign$2({}, rest, { body: body, className: className, children: children, wrapperComponent: "SteedosFieldSet", headingComponent: rest.titlePosition === 'bottom' ? 'div' : 'legend' })));
22421
+ return (React__default.createElement(Collapse, __assign$2({}, rest, { body: body, className: className, children: children, wrapperComponent: "SteedosFieldSet", headingComponent: rest.titlePosition === 'bottom' ? 'div' : 'legend' })));
22334
22422
  };
22335
22423
  FieldSetControl.defaultProps = {
22336
22424
  titlePosition: 'top',
@@ -22345,7 +22433,7 @@ var FieldSetControl = /** @class */ (function (_super) {
22345
22433
  'collapseTitle'
22346
22434
  ];
22347
22435
  return FieldSetControl;
22348
- }(React.Component));
22436
+ }(React__default.Component));
22349
22437
  // @Renderer({
22350
22438
  // type: 'SteedosFieldSet',
22351
22439
  // weight: -100,
@@ -24702,7 +24790,7 @@ var Container = /** @class */ (function (_super) {
24702
24790
  ? render('body', body, { disabled: disabled })
24703
24791
  : null;
24704
24792
  if (isWrapperBody) {
24705
- return (React.createElement("div", { className: cx('Container-body', bodyClassName) }, containerBody));
24793
+ return (React__default.createElement("div", { className: cx('Container-body', bodyClassName) }, containerBody));
24706
24794
  }
24707
24795
  else {
24708
24796
  return containerBody;
@@ -24717,9 +24805,9 @@ var Container = /** @class */ (function (_super) {
24717
24805
  ? resolveVariableAndFilter(draggableConfig, data, '| raw')
24718
24806
  : draggableConfig);
24719
24807
  var Component = wrapperComponent || 'div';
24720
- var contentDom = (React.createElement(Component, { className: cx('antd-Form antd-Form--horizontal steedos-amis-form Container', size && size !== 'none' ? "Container--".concat(size) : '', className, setThemeClassName(__assign$2(__assign$2({}, this.props), { name: 'baseControlClassName', id: id, themeCss: themeCss })), setThemeClassName(__assign$2(__assign$2({}, this.props), { name: 'wrapperCustomStyle', id: id, themeCss: wrapperCustomStyle }))), onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, style: buildStyle(style, data) },
24808
+ var contentDom = (React__default.createElement(Component, { className: cx('antd-Form antd-Form--horizontal steedos-amis-form Container', size && size !== 'none' ? "Container--".concat(size) : '', className, setThemeClassName(__assign$2(__assign$2({}, this.props), { name: 'baseControlClassName', id: id, themeCss: themeCss })), setThemeClassName(__assign$2(__assign$2({}, this.props), { name: 'wrapperCustomStyle', id: id, themeCss: wrapperCustomStyle }))), onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, style: buildStyle(style, data) },
24721
24809
  this.renderBody(),
24722
- React.createElement(CustomStyle, __assign$2({}, this.props, { config: {
24810
+ React__default.createElement(CustomStyle, __assign$2({}, this.props, { config: {
24723
24811
  wrapperCustomStyle: wrapperCustomStyle,
24724
24812
  id: id,
24725
24813
  themeCss: themeCss,
@@ -24729,7 +24817,7 @@ var Container = /** @class */ (function (_super) {
24729
24817
  }
24730
24818
  ]
24731
24819
  }, env: env }))));
24732
- return finalDraggable ? (React.createElement(DndContainer, __assign$2({}, finalDraggableConfig, { draggable: true }), contentDom)) : (contentDom);
24820
+ return finalDraggable ? (React__default.createElement(DndContainer, __assign$2({}, finalDraggableConfig, { draggable: true }), contentDom)) : (contentDom);
24733
24821
  };
24734
24822
  Container.propsList = ['body', 'className'];
24735
24823
  Container.defaultProps = {
@@ -24741,7 +24829,7 @@ var Container = /** @class */ (function (_super) {
24741
24829
  }
24742
24830
  };
24743
24831
  return Container;
24744
- }(React.Component));
24832
+ }(React__default.Component));
24745
24833
  // @Renderer({
24746
24834
  // type: 'container'
24747
24835
  // })
@@ -24963,7 +25051,7 @@ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, voi
24963
25051
  allData = createObject(data, defaultData);
24964
25052
  listViewSchemaProps = __assign$2(__assign$2({ top: top, perPage: perPage, defaults: defaults }, ctx), { listViewId: listViewId, setDataToComponentId: setDataToComponentId, filterVisible: filterVisible, showDisplayAs: showDisplayAs, displayAs: displayAs, headerToolbarItems: headerToolbarItems, rowClassNameExpr: rowClassNameExpr, hiddenColumnOperation: hiddenColumnOperation, columns: columns, crudDataFilter: crudDataFilter, onCrudDataFilter: onCrudDataFilter, amisData: allData, env: env, requestAdaptor: requestAdaptor, adaptor: adaptor });
24965
25053
  if (!headerSchema) {
24966
- headerSchema = getObjectListHeader$1(uiSchema, listName, ctx);
25054
+ headerSchema = getObjectListHeader(uiSchema, listName, ctx);
24967
25055
  }
24968
25056
  headerSchema.className = "steedos-object-listview-header " + headerSchema.className || "";
24969
25057
  serviceData = Object.assign({}, { showDisplayAs: showDisplayAs, displayAs: displayAs, recordPermissions: uiSchema.permissions, _id: null, $listviewId: listName, isObjectListview: true });
@@ -25081,7 +25169,17 @@ var AmisObjectTable = function (props) { return __awaiter(void 0, void 0, void 0
25081
25169
  }
25082
25170
  columns = getTableColumns(props.columns, includedFields, fieldsExtend) || [];
25083
25171
  defaults = {};
25084
- objectApiName = props.objectApiName || "space_users";
25172
+ objectApiName = "space_users";
25173
+ if (props.$$editor) {
25174
+ if (props.objectApiName) {
25175
+ objectApiName = props.objectApiName;
25176
+ }
25177
+ }
25178
+ else {
25179
+ if (props.data.objectName) {
25180
+ objectApiName = props.data.objectName;
25181
+ }
25182
+ }
25085
25183
  if (crudMode) {
25086
25184
  // 把crudMode属性传入到crud.mode属性值中
25087
25185
  // 如果只配置了crudMode属性,则后续内核代码会自动生成对应mode的默认属性值,比如card,listItem
@@ -25133,6 +25231,7 @@ var AmisObjectTable = function (props) { return __awaiter(void 0, void 0, void 0
25133
25231
  amisSchema.className = "steedos-object-table ".concat(uiSchema.enable_tree ? "is-steedos-tree-table" : "", " ").concat(amisSchema.className, " h-full flex flex-col ").concat(className);
25134
25232
  amisSchema.objectApiName = objectApiName; //设计器中切换对象时画布中显示的列未同步变更
25135
25233
  // console.timeEnd('AmisObjectTable')
25234
+ console.log("AmisObjectTable=====>", props, amisSchema);
25136
25235
  return [2 /*return*/, amisSchema];
25137
25236
  }
25138
25237
  });
@@ -25252,8 +25351,8 @@ var AmisRecordDetail = function (props) { return __awaiter(void 0, void 0, void
25252
25351
  if (body) {
25253
25352
  schema.body = body;
25254
25353
  }
25255
- // console.log(`AmisRecordDetail====schema==>`, schema);
25256
25354
  schema.data = Object.assign({}, $schema.data, schema.data);
25355
+ // console.log(`AmisRecordDetail====schema==>`, schema, props);
25257
25356
  return [2 /*return*/, schema];
25258
25357
  }
25259
25358
  });
@@ -25262,8 +25361,8 @@ var AmisRecordDetail = function (props) { return __awaiter(void 0, void 0, void
25262
25361
  /*
25263
25362
  * @Author: baozhoutao@steedos.com
25264
25363
  * @Date: 2022-12-08 10:32:17
25265
- * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
25266
- * @LastEditTime: 2024-04-25 19:21:15
25364
+ * @LastEditors: baozhoutao@steedos.com
25365
+ * @LastEditTime: 2025-02-21 13:59:44
25267
25366
  * @Description:
25268
25367
  */
25269
25368
  var AmisRecordService = function (props) { return __awaiter(void 0, void 0, void 0, function () {
@@ -25299,22 +25398,22 @@ var AmisRecordService = function (props) { return __awaiter(void 0, void 0, void
25299
25398
  formData.recordId = props.recordId;
25300
25399
  }
25301
25400
  schema.data = Object.assign({}, schema.data || {}, formData);
25302
- if (has(props, 'objectApiName')) {
25401
+ if (has(props, 'objectApiName') && props.$$editor) {
25303
25402
  schema.data.objectName = objectApiName;
25304
25403
  }
25305
- // console.log(`AmisRecordService====schema==>`, schema)
25404
+ // console.log(`AmisRecordService====schema==>`, schema, props)
25306
25405
  return [2 /*return*/, schema];
25307
25406
  }
25308
25407
  });
25309
25408
  }); };
25310
25409
 
25311
25410
  var AmisRecordDetailRelatedList = function (props) { return __awaiter(void 0, void 0, void 0, function () {
25312
- var $schema, objectApiName, recordId, relatedObjectApiName, data, relatedKey, top, perPage, hiddenEmptyTable, appId, relatedLabel, _a, className, columns, sort, filters, visible_on, requestAdaptor, adaptor, visibleOn, crud, crudDataFilter, onCrudDataFilter, env, formFactor, formData, schema;
25411
+ var $schema, objectApiName, recordId, relatedObjectApiName, data, relatedKey, top, perPage, hiddenEmptyTable, appId, relatedLabel, _a, className, columns, sort, filters, visible_on, requestAdaptor, adaptor, visibleOn, crud, crudDataFilter, onCrudDataFilter, env, enableHeaderToolbar, formFactor, formData, schema;
25313
25412
  var _b;
25314
25413
  return __generator(this, function (_c) {
25315
25414
  switch (_c.label) {
25316
25415
  case 0:
25317
- $schema = props.$schema, objectApiName = props.objectApiName, recordId = props.recordId, relatedObjectApiName = props.relatedObjectApiName, data = props.data, relatedKey = props.relatedKey, top = props.top, perPage = props.perPage, hiddenEmptyTable = props.hiddenEmptyTable, appId = props.appId, relatedLabel = props.relatedLabel, _a = props.className, className = _a === void 0 ? '' : _a, columns = props.columns, sort = props.sort, filters = props.filters, visible_on = props.visible_on, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor, visibleOn = props.visibleOn, crud = props.crud, crudDataFilter = props.crudDataFilter, onCrudDataFilter = props.onCrudDataFilter, env = props.env;
25416
+ $schema = props.$schema, objectApiName = props.objectApiName, recordId = props.recordId, relatedObjectApiName = props.relatedObjectApiName, data = props.data, relatedKey = props.relatedKey, top = props.top, perPage = props.perPage, hiddenEmptyTable = props.hiddenEmptyTable, appId = props.appId, relatedLabel = props.relatedLabel, _a = props.className, className = _a === void 0 ? '' : _a, columns = props.columns, sort = props.sort, filters = props.filters, visible_on = props.visible_on, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor, visibleOn = props.visibleOn, crud = props.crud, crudDataFilter = props.crudDataFilter, onCrudDataFilter = props.onCrudDataFilter, env = props.env, enableHeaderToolbar = props.enableHeaderToolbar;
25318
25417
  formFactor = props.formFactor;
25319
25418
  if (!formFactor) {
25320
25419
  formFactor = window.innerWidth < 768 ? 'SMALL' : 'LARGE';
@@ -25351,7 +25450,8 @@ var AmisRecordDetailRelatedList = function (props) { return __awaiter(void 0, vo
25351
25450
  crud: crud,
25352
25451
  crudDataFilter: crudDataFilter,
25353
25452
  onCrudDataFilter: onCrudDataFilter,
25354
- env: env
25453
+ env: env,
25454
+ enableHeaderToolbar: enableHeaderToolbar
25355
25455
  })];
25356
25456
  case 1:
25357
25457
  schema = (_c.sent()).amisSchema;
@@ -25491,12 +25591,13 @@ var AmisProvider = function (props) { return __awaiter(void 0, void 0, void 0, f
25491
25591
  * @Author: baozhoutao@steedos.com
25492
25592
  * @Date: 2022-09-01 14:44:57
25493
25593
  * @LastEditors: baozhoutao@steedos.com
25494
- * @LastEditTime: 2024-10-10 16:30:41
25594
+ * @LastEditTime: 2025-02-15 11:25:39
25495
25595
  * @Description:
25496
25596
  */
25497
25597
  var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
25498
25598
  var app, data, className, _a, showAppName, _b, appNameClassName, _c, customElements, _d, showAppIcon, isSpaceAdmin, formFactor, isMobile, on_click_script, mobile_blank_script, convertAppVisibleOnScript, pcInitApiAdaptorScript, mobileInitApiAdaptorScript, dialogSchema, badgeText, overlaySchema;
25499
25599
  return __generator(this, function (_e) {
25600
+ console.log("AmisAppLauncher", props);
25500
25601
  app = props.app, data = props.data, className = props.className, _a = props.showAppName, showAppName = _a === void 0 ? true : _a, _b = props.appNameClassName, appNameClassName = _b === void 0 ? '' : _b, _c = props.customElements, customElements = _c === void 0 ? [] : _c, _d = props.showAppIcon, showAppIcon = _d === void 0 ? true : _d;
25501
25602
  if (!app) {
25502
25603
  app = data.context.app;
@@ -25778,7 +25879,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
25778
25879
  ]
25779
25880
  }
25780
25881
  },
25781
- isMobile && isSpaceAdmin ? null : {
25882
+ isMobile || !isSpaceAdmin ? null : {
25782
25883
  "type": "button",
25783
25884
  "level": "link",
25784
25885
  "label": "+ 新建应用",
@@ -25837,7 +25938,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
25837
25938
  "type": "lookup",
25838
25939
  "required": true,
25839
25940
  "sort_no": 30,
25840
- "optionsFunction": "function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }",
25941
+ "optionsFunction": "function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }",
25841
25942
  "name": "icon",
25842
25943
  "inlineHelpText": "",
25843
25944
  "description": "",
@@ -26000,8 +26101,10 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
26000
26101
  return __generator(this, function (_f) {
26001
26102
  _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.className, className = _d === void 0 ? '' : _d, _e = props.indentSize, indentSize = _e === void 0 ? 12 : _e, selectedId = props.selectedId;
26002
26103
  if (!appId) {
26003
- appId = data.context.appId || 'admin';
26104
+ appId = data.context.appId;
26004
26105
  }
26106
+ // console.log(`AmisAppMenu appId`, appId)
26107
+ console.log("AmisAppMenu", appId, props);
26005
26108
  badgeText = "${keyvalues.badge.value | pick:".concat(appId, " | toInt}");
26006
26109
  if (appId == "approve_workflow") {
26007
26110
  badgeText = "${keyvalues.badge.value | pick:'workflow' | toInt}";
@@ -26021,14 +26124,15 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
26021
26124
  id: 'u:app-menu',
26022
26125
  schemaApi: {
26023
26126
  "method": "get",
26024
- "url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus"),
26025
- "adaptor": "\n try {\n // console.log('payload====>', payload)\n if(payload.nav_schema){\n payload.data = payload.nav_schema;\n return payload\n }\n\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n const tab_groups = payload.tab_groups;\n const locationPathname = window.location.pathname;\n var customTabId = \"\";\n var objectTabId = \"").concat(data.tabId, "\";\n var usedGroupNames = [];\n let allowEditApp = false;\n if(stacked){\n if(payload.allowEditApp){\n allowEditApp = true;\n }\n _.each(_.groupBy(payload.children, 'group'), (tabs, groupName) => {\n if (groupName === 'undefined' || groupName === '') {\n _.each(tabs, (tab) => {\n tab.iconClass = (tab.icon || 'account').replaceAll('_', '-');\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n data.nav.push({\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='whitespace-normal leading-6 no-underline group items-center rounded-md'><svg class=\"slds-icon_container slds-icon fill-gray-700 mr-2 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"searchKey\": tab.name,\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index,\n \"tabApiName\": tab.tabApiName,\n \"type\": tab.type,\n // active: selectedId === tab.id,\n })\n })\n } else {\n var tabGroup = _.find(tab_groups, {\"group_name\": groupName});\n usedGroupNames.push(groupName);\n data.nav.push({\n \"label\": groupName,\n 'default_open': tabGroup && tabGroup.default_open != false,\n \"unfolded\": tabGroup && tabGroup.default_open != false,\n \"isGroup\": true,\n \"children\": _.sortBy(_.map(tabs, (tab) => {\n tab.iconClass = (tab.icon || 'account').replaceAll('_', '-');\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n return {\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='whitespace-normal leading-6 block no-underline group items-center rounded-md'><svg class=\"slds-icon_container slds-icon fill-gray-700 mr-2 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"searchKey\": tab.name,\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index,\n \"tabApiName\": tab.tabApiName,\n \"type\": tab.type,\n // active: selectedId === tab.id,\n \"groupName\": groupName\n }\n }),(tab) => {return tab.index})\n }) \n }\n });\n \n }else{\n _.each(payload.children, (tab)=>{\n tab.iconClass = (tab.icon || 'account').replaceAll('_', '-');\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n data.nav.push({\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='whitespace-normal leading-6 no-underline group items-center rounded-md'><svg class=\"slds-icon_container slds-icon-standard-${ tab.iconClass } slds-icon !fill-white rounded-xl mr-2 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"searchKey\": tab.name,\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index,\n \"tabApiName\": tab.tabApiName,\n \"type\": tab.type,\n // active: selectedId === tab.id,\n });\n })\n }\n //\u4EE5\u4E0B\u4E3Anav\u7B2C\u4E00\u5C42\u6392\u5E8F\uFF0C\u5305\u62EC\u5206\u7EC4\u4E0E\u9009\u9879\u5361\n // let groupLength = ((payload.tab_groups && payload.tab_groups.length) || 0) + 1000;\n data.nav = _.sortBy(data.nav, function(tab){\n if(tab.isGroup){\n return _.findIndex(payload.tab_groups, function(group){\n return group.group_name === tab.label;\n });\n }else{\n // \u6CA1\u6709\u5206\u7EC4\u7684\u9009\u9879\u5361\u6309index\u6392\u5217\u5728\u6709\u5206\u7EC4\u7684\u9009\u9879\u5361\u524D\u65B9\n return (tab.index || 0) - 1000;\n }\n })\n if(allowEditApp){\n _.each(payload.tab_groups, (group)=>{\n if(!_.includes(usedGroupNames, group.group_name)){\n data.nav.push({\n \"label\": group.group_name,\n 'default_open': group && group.default_open != false,\n \"unfolded\": group && group.default_open != false,\n \"isGroup\": true,\n \"children\": []\n })\n }\n });\n }\n let editAppSearch = [];\n if(allowEditApp){\n editAppSearch = [{\n \"type\": \"grid\",\n \"className\": \"mx-3 mb-2\",\n \"columns\": [\n {\n \"md\": 10,\n \"columnClassName\": \"p-0\",\n \"body\": [\n {\n \"type\": \"search-box\",\n \"name\": \"keywords\",\n \"className\": \"!w-full\",\n \"placeholder\": \"\u641C\u7D22\u83DC\u5355\",\n \"autoFocus\": false,\n \"searchImediately\": true,\n \"clearable\": true,\n \"clearAndSubmit\": true,\n \"id\": \"s01\"\n }\n ]\n },\n {\n \"md\": 2,\n \"columnClassName\": \"p0 pl-0 steedos-app-menu-plus\",\n \"body\": [\n {\n \"type\": \"dropdown-button\",\n \"level\": \"link\",\n \"btnClassName\": \"text-gray-700\",\n \"icon\": \"fa fa-plus\",\n \"size\": \"md\",\n \"hideCaret\": true,\n \"align\": \"right\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"Api Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"o_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/objects/create_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"p_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/pages/create_page_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"required\": true,\n \"value\": \"t_${UUID(6)}\",\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n \n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"fLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u5916\u90E8\u94FE\u63A5\",\n \"name\": \"fUrl\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/tabs/create_link_tab_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.fLabel, icon: context.icon, url: context.fUrl}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"body\": [\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u9009\u9879\u5361\",\n \"config\": {\n \"type\": \"lookup\",\n \"reference_to\": \"tabs\",\n \"reference_to_field\": \"name\",\n \"required\": true,\n \"sort_no\": 30,\n \"name\": \"tabs\",\n \"multiple\": true,\n \"enable_enhanced_lookup\": true,\n \"amis\": {\n \"label\": false,\n \"embed\": true,\n }\n }\n }\n ],\n \"id\": \"u:709fd4d53437\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:ba7b707cddd8\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:2f3e5635b95d\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"size\": \"md\",\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/update_app_tabs_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', addTabNames: context.tabs}; return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5206\u7EC4\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5206\u7EC4\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"\u540D\u79F0\",\n \"name\": \"name\",\n \"id\": \"u:e5bd37f6699b\",\n \"placeholder\": \"\u5206\u7EC4\u540D\u79F0\",\n \"required\": true\n },\n {\n \"type\": \"checkbox\",\n \"option\": \"\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\",\n \"name\": \"defaultOpen\",\n \"id\": \"u:dae5884c1623\",\n \"required\": true\n }\n ],\n \"id\": \"u:304b5b04c573\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d85\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a05b\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/apps/create_app_group_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, name: context.name, defaultOpen: context.defaultOpen}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n },\n }\n ]\n }\n ]\n }\n ]\n }]\n }\n\n let menuItems = data.nav;\n\n if(context.keywords){\n // \u5982\u679CmenuItem\u7684children, children\u662F\u6570\u7EC4\u7ED3\u6784, \u6BCF\u4E00\u9879\u7684searchKey\u5305\u542Bcontext.keywords, \u5219\u663E\u793AmenuItem\u53CA\u5176\u7B26\u5408\u6761\u4EF6\u7684children;\n menuItems = _.filter(menuItems, (menuItem)=>{\n if(menuItem.children){\n const children = _.filter(menuItem.children, (child)=>{\n return _.includes(child.searchKey, context.keywords);\n });\n\n if(children.length > 0){\n menuItem.children = children;\n }\n\n return children.length > 0;\n }\n })\n };\n\n if(!menuItems || menuItems.length == 0){\n menuItems = data.nav;\n }\n\n payload.data = {\n \"type\":\"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": menuItems,\n \"keyvalues\": \"${ss:keyvalues}\",\n \"allowEditApp\": allowEditApp,\n \"tab_groups\": tab_groups\n },\n \"id\": \"appMenuService\",\n \"onEvent\": {\n \"@data.changed.steedos_keyvalues\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"args\": {\n \"value\": {\n \"keyvalues\": \"${event.data.keyvalues}\"\n }\n }\n }\n ]\n }\n },\n \"body\": [\n ...editAppSearch,\n {\n \"type\": \"nav\",\n \"expandPosition\": \"after\",\n \"searchable\": !allowEditApp && ").concat(stacked, ",\n \"searchConfig\": {\n \"placeholder\": \"\u641C\u7D22\u83DC\u5355\",\n \"matchFunc\": \"return link.searchKey && link.searchKey.indexOf(keyword)>=0;\"\n },\n className: \"").concat(className, " text-black steedos-app-menu ").concat(stacked ? 'stacked' : '', "\",\n \"stacked\": ").concat(stacked, ",\n \"overflow\": ").concat(JSON.stringify(overflow), ",\n \"indentSize\": ").concat(indentSize, ",\n \"draggable\": allowEditApp,\n \"dragOnSameLevel\": true,\n \"saveOrderApi\": {\n \"url\": \"/service/api/apps/update_app_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"\",\n \"requestAdaptor\": \"const menus = context.data;const tab_groups = [];const tab_items = {};_.each(menus, (menu) => { if (menu.isGroup) { tab_groups.push({ group_name: menu.label, default_open: menu.default_open, }); }else{tab_items[menu.tabApiName] = {group:''}}; if (menu.children) { _.each(menu.children, (menu2) => { tab_items[menu2.tabApiName] = { group: menu.label } }) }}); api.data={appId: context.app.id, tab_groups, tab_items}; return api;\",\n \"messages\": {}\n },\n \"itemActions\": [\n {\n \"type\": \"dropdown-button\",\n \"level\": \"link\",\n \"icon\": \"fa fa-ellipsis-h\",\n \"btnClassName\": \"!text-gray-700\",\n \"hideCaret\": true,\n \"className\": \"hidden hover-inline-flex\",\n \"visibleOn\": \"!!allowEditApp\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u7F16\u8F91\u5206\u7EC4\",\n \"data\": {\n \"appId\": \"\\${app.id}\",\n \"name\": \"\\${event.data.label}\",\n \"oldName\": \"\\${event.data.label}\",\n \"defaultOpen\": \"\\${event.data.default_open}\"\n },\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"\u540D\u79F0\",\n \"name\": \"name\",\n \"id\": \"u:e5bd37f6699b\",\n \"placeholder\": \"\u5206\u7EC4\u540D\u79F0\",\n \"required\": true\n },\n {\n \"type\": \"checkbox\",\n \"option\": \"\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\",\n \"name\": \"defaultOpen\",\n \"id\": \"u:dae5884c1623\",\n \"required\": true\n }\n ],\n \"id\": \"u:304b5b04c573\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d85\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a05b\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/apps/update_app_group_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"\",\n \"requestAdaptor\": \"api.data={appId: context.appId, name: context.name, defaultOpen: context.defaultOpen, oldName: context.oldName}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"this.type==='object'\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + event.data.id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href)\",\n \"expression\": \"${false}\"\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/graphql\",\n \"method\": \"post\",\n \"adaptor\": \"const objects = payload.data.objects; if(objects && objects.length > 0){ try{const objectId = objects[0]._id; FlowRouter.go('/app/admin/objects/view/'+objectId+'?side_object=objects&side_listview_id=all')}catch(e){payload.error=e.message;} }; return payload;\",\n \"requestAdaptor\": \"api.data={query: '{ objects(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id name}}'}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"this.type==='page'\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/graphql\",\n \"method\": \"post\",\n \"adaptor\": \"const tabs = payload.data.tabs; if(tabs && tabs.length > 0){ try{const pageId = tabs[0].page__expand._id; window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + pageId +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href)}catch(e){payload.error=e.message;} }; return payload;\",\n \"requestAdaptor\": \"api.data={query: '{ tabs(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id name page page__expand { _id } }}'}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"this.type==='url'\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/graphql\",\n \"method\": \"post\",\n \"adaptor\": \"if(payload.data.tabs && payload.data.tabs.length > 0){payload.data=payload.data.tabs[0]}; return payload\",\n \"requestAdaptor\": \"api.data={query: '{ tabs(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id oName:name fLabel:label fUrl:url icon }}'}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u7F16\u8F91\u5916\u90E8\u94FE\u63A5\",\n \"data\": {\n \"appId\": \"\\${app.id}\",\n \"&\": \"\\${event.data.responseResult}\"\n },\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"required\": true,\n \"disabled\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"fLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u5916\u90E8\u94FE\u63A5\",\n \"name\": \"fUrl\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/tabs/update_link_tab_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.appId, groupId: context.label, name: context.oName, label: context.fLabel, icon: context.icon, url: context.fUrl}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u79FB\u52A8\",\n \"visibleOn\": \"!!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"event.setData({appId: event.data.app.id, groups: [{label: event.data.app.name, value: 0, children: _.map(event.data.tab_groups, (tGroup)=>{return {label: tGroup.group_name, value: tGroup.group_name}})}] , tabApiName: event.data.tabApiName, groupName: event.data.groupName})\"\n },\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u79FB\u52A8\",\n \"data\": {\n \"appId\": \"\\${event.data.appId}\",\n \"groups\": \"\\${event.data.groups}\",\n \"tabApiName\": \"\\${event.data.tabApiName}\",\n \"groupName\": \"\\${event.data.groupName}\",\n \"oldGroupName\": \"\\${event.data.groupName}\",\n },\n \"body\": [\n {\n \"type\": \"tree-select\",\n \"label\": \"\",\n \"name\": \"groupName\",\n \"id\": \"u:26d0b458ff51\",\n \"multiple\": false,\n \"source\": \"\\${groups}\"\n }\n ],\n \"id\": \"u:d69cbb95089a\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:12261bf51dcb\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:b144775ea124\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/move_app_tab\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.appId, groupName: context.groupName, oldGroupName: context.oldGroupName, tabName: context.tabApiName}; return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u5220\u9664\",\n \"visibleOn\": \"!!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/delete_app_tab\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, tabName: context.tabApiName};return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n },\n \"id\": \"u:e54eed92d13f\",\n \"confirmText\": \"\u786E\u5B9A\u8981\u5220\u9664\u5417?\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u5220\u9664\",\n \"visibleOn\": \"!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"if(event.data.children && event.data.children.length > 0){doAction({'actionType': 'toast','args': { 'msgType': 'warning', 'msg': '\u5206\u7EC4\u4E0B\u6709\u6570\u636E,\u7981\u6B62\u5220\u9664'}});event.stopPropagation();};\"\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/delete_app_group\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupName: context.label};return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n },\n \"id\": \"u:e54eed92d13f\",\n \"confirmText\": \"\u786E\u5B9A\u8981\u5220\u9664\u5417?\"\n }\n ]\n },\n {\n \"type\": \"dropdown-button\",\n \"level\": \"link\",\n \"icon\": \"fa fa-plus\",\n \"hideCaret\": true,\n \"btnClassName\": \"!text-gray-700\",\n \"visibleOn\": \"!!allowEditApp && !!this.isGroup\",\n \"className\": \"hidden hover-inline-flex\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"Api Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"o_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/objects/create_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"p_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/pages/create_page_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"required\": true,\n \"value\": \"t_${UUID(6)}\",\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"fLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u5916\u90E8\u94FE\u63A5\",\n \"name\": \"fUrl\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/tabs/create_link_tab_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.fLabel, icon: context.icon, url: context.fUrl}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"body\": [\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u9009\u9879\u5361\",\n \"config\": {\n \"type\": \"lookup\",\n \"reference_to\": \"tabs\",\n \"reference_to_field\": \"name\",\n \"required\": true,\n \"sort_no\": 30,\n \"name\": \"tabs\",\n \"multiple\": true,\n \"enable_enhanced_lookup\": true,\n \"amis\": {\n \"label\": false,\n \"embed\": true,\n }\n }\n }\n ],\n \"id\": \"u:709fd4d53437\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:ba7b707cddd8\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:2f3e5635b95d\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"size\": \"md\",\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/update_app_tabs_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, addTabNames: context.tabs}; return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n }\n ]\n },\n ],\n \"source\": \"${items}\",\n //\u5DE6\u5C42\u663E\u793A\u65F6\u5BA1\u6279\u5355\u663E\u793Abadge\u6570\u91CF\n \"itemBadge\": {\n \"mode\": \"text\",\n \"text\": \"").concat(badgeText, "\",\n \"visibleOn\": \"${id == 'instance_tasks'}\",\n \"overflowCount\": 99,\n \"style\": stacked?{\n \"right\": \"20%\",\n \"margin-right\": \"-23px\",\n \"height\": \"20px\",\n \"border-radius\": \"10px\",\n \"font-size\": \"16px\",\n \"line-height\": \"18px\",\n \"top\": \"50%\"\n }:{\n \"transform\": \"translate(calc(50% - 17px), calc(-50% + 10px))\",\n \"border-radius\": \"6.5px\",\n \"height\": \"15px\",\n \"line-height\": \"13px\",\n \"padding\": \"0px 4px\",\n \"font-size\": \"12px\"\n }\n },\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"appMenuService\",\n \"args\": {\n \"value\": {\n \"tabId\": \"${event.data.item.id}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.item.id}\"\n },\n {\n \"actionType\": \"custom\",\n \"script\" : \"window.postMessage(Object.assign({type: 'nav.click', data: event.data.item}), '*');\"\n }\n ]\n },\n \"@tabId.changed\":{\n \"actions\":[\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"appMenuService\",\n \"args\": {\n \"value\": {\n \"tabId\": \"${event.data.tabId}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.tabId}\"\n },\n {\n \"actionType\": \"custom\",\n \"script\" : \"window.postMessage(Object.assign({type: 'nav.click', data: event.data.item}), '*');\"\n }\n ]\n }\n }\n }\n ]\n };\n } catch (error) {\n console.log(`error`, error)\n }\n // console.log('payload===2==>', payload)\n\n setTimeout(function(){\n $(\"[name='keywords']\").focus();\n }, 300);\n\n return payload;\n "),
26127
+ "url": "${context.rootUrl}/service/api/apps/${appId}/menus",
26128
+ "sendOn": "!!appId",
26129
+ "adaptor": "\n try {\n // console.log('payload====>', payload)\n if(payload.nav_schema){\n payload.data = payload.nav_schema;\n return payload\n }\n\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n const tab_groups = payload.tab_groups;\n const locationPathname = window.location.pathname;\n var customTabId = \"\";\n var objectTabId = \"").concat(data.tabId, "\";\n var usedGroupNames = [];\n let allowEditApp = false;\n if(stacked){\n if(payload.allowEditApp){\n allowEditApp = true;\n }\n _.each(_.groupBy(payload.children, 'group'), (tabs, groupName) => {\n if (groupName === 'undefined' || groupName === '') {\n _.each(tabs, (tab) => {\n tab.iconClass = (tab.icon || 'account').replaceAll('_', '-');\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n data.nav.push({\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='whitespace-normal leading-6 no-underline group items-center rounded-md'><svg class=\"slds-icon_container slds-icon fill-gray-700 mr-2 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"searchKey\": tab.name,\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index,\n \"tabApiName\": tab.tabApiName,\n \"type\": tab.type,\n // active: selectedId === tab.id,\n })\n })\n } else {\n var tabGroup = _.find(tab_groups, {\"group_name\": groupName});\n usedGroupNames.push(groupName);\n data.nav.push({\n \"label\": groupName,\n 'default_open': tabGroup && tabGroup.default_open != false,\n \"unfolded\": tabGroup && tabGroup.default_open != false,\n \"isGroup\": true,\n \"children\": _.sortBy(_.map(tabs, (tab) => {\n tab.iconClass = (tab.icon || 'account').replaceAll('_', '-');\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n return {\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='whitespace-normal leading-6 block no-underline group items-center rounded-md'><svg class=\"slds-icon_container slds-icon fill-gray-700 mr-2 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"searchKey\": tab.name,\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index,\n \"tabApiName\": tab.tabApiName,\n \"type\": tab.type,\n // active: selectedId === tab.id,\n \"groupName\": groupName\n }\n }),(tab) => {return tab.index})\n }) \n }\n });\n \n }else{\n _.each(payload.children, (tab)=>{\n tab.iconClass = (tab.icon || 'account').replaceAll('_', '-');\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n data.nav.push({\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='whitespace-normal leading-6 no-underline group items-center rounded-md'><svg class=\"slds-icon_container slds-icon-standard-${ tab.iconClass } slds-icon !fill-white rounded-xl mr-2 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"searchKey\": tab.name,\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index,\n \"tabApiName\": tab.tabApiName,\n \"type\": tab.type,\n // active: selectedId === tab.id,\n });\n })\n }\n //\u4EE5\u4E0B\u4E3Anav\u7B2C\u4E00\u5C42\u6392\u5E8F\uFF0C\u5305\u62EC\u5206\u7EC4\u4E0E\u9009\u9879\u5361\n // let groupLength = ((payload.tab_groups && payload.tab_groups.length) || 0) + 1000;\n data.nav = _.sortBy(data.nav, function(tab){\n if(tab.isGroup){\n return _.findIndex(payload.tab_groups, function(group){\n return group.group_name === tab.label;\n });\n }else{\n // \u6CA1\u6709\u5206\u7EC4\u7684\u9009\u9879\u5361\u6309index\u6392\u5217\u5728\u6709\u5206\u7EC4\u7684\u9009\u9879\u5361\u524D\u65B9\n return (tab.index || 0) - 1000;\n }\n })\n if(allowEditApp){\n _.each(payload.tab_groups, (group)=>{\n if(!_.includes(usedGroupNames, group.group_name)){\n data.nav.push({\n \"label\": group.group_name,\n 'default_open': group && group.default_open != false,\n \"unfolded\": group && group.default_open != false,\n \"isGroup\": true,\n \"children\": []\n })\n }\n });\n }\n let editAppSearch = [];\n if(allowEditApp){\n editAppSearch = [{\n \"type\": \"grid\",\n \"className\": \"mx-3 mb-2\",\n \"columns\": [\n {\n \"md\": 10,\n \"columnClassName\": \"p-0\",\n \"body\": [\n {\n \"type\": \"search-box\",\n \"name\": \"keywords\",\n \"className\": \"!w-full\",\n \"placeholder\": \"\u641C\u7D22\u83DC\u5355\",\n \"autoFocus\": false,\n \"searchImediately\": true,\n \"clearable\": true,\n \"clearAndSubmit\": true,\n \"id\": \"s01\"\n }\n ]\n },\n {\n \"md\": 2,\n \"columnClassName\": \"p0 pl-0 steedos-app-menu-plus\",\n \"body\": [\n {\n \"type\": \"dropdown-button\",\n \"level\": \"link\",\n \"btnClassName\": \"text-gray-700\",\n \"icon\": \"fa fa-plus\",\n \"size\": \"md\",\n \"hideCaret\": true,\n \"align\": \"right\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"Api Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"o_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/objects/create_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"p_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/pages/create_page_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"required\": true,\n \"value\": \"t_${UUID(6)}\",\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n \n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"fLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u5916\u90E8\u94FE\u63A5\",\n \"name\": \"fUrl\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/tabs/create_link_tab_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.fLabel, icon: context.icon, url: context.fUrl}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"body\": [\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u9009\u9879\u5361\",\n \"config\": {\n \"type\": \"lookup\",\n \"reference_to\": \"tabs\",\n \"reference_to_field\": \"name\",\n \"required\": true,\n \"sort_no\": 30,\n \"name\": \"tabs\",\n \"multiple\": true,\n \"enable_enhanced_lookup\": true,\n \"amis\": {\n \"label\": false,\n \"embed\": true,\n }\n }\n }\n ],\n \"id\": \"u:709fd4d53437\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:ba7b707cddd8\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:2f3e5635b95d\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"size\": \"md\",\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/update_app_tabs_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: '', addTabNames: context.tabs}; return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5206\u7EC4\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5206\u7EC4\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"\u540D\u79F0\",\n \"name\": \"name\",\n \"id\": \"u:e5bd37f6699b\",\n \"placeholder\": \"\u5206\u7EC4\u540D\u79F0\",\n \"required\": true\n },\n {\n \"type\": \"checkbox\",\n \"option\": \"\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\",\n \"name\": \"defaultOpen\",\n \"id\": \"u:dae5884c1623\",\n \"required\": true\n }\n ],\n \"id\": \"u:304b5b04c573\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d85\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a05b\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/apps/create_app_group_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, name: context.name, defaultOpen: context.defaultOpen}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n },\n }\n ]\n }\n ]\n }\n ]\n }]\n }\n\n let menuItems = data.nav;\n\n if(context.keywords){\n // \u5982\u679CmenuItem\u7684children, children\u662F\u6570\u7EC4\u7ED3\u6784, \u6BCF\u4E00\u9879\u7684searchKey\u5305\u542Bcontext.keywords, \u5219\u663E\u793AmenuItem\u53CA\u5176\u7B26\u5408\u6761\u4EF6\u7684children;\n menuItems = _.filter(menuItems, (menuItem)=>{\n if(menuItem.children){\n const children = _.filter(menuItem.children, (child)=>{\n return _.includes(child.searchKey, context.keywords);\n });\n\n if(children.length > 0){\n menuItem.children = children;\n }\n\n return children.length > 0;\n }\n })\n };\n\n if(!menuItems || menuItems.length == 0){\n menuItems = data.nav;\n }\n\n payload.data = {\n \"type\":\"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": menuItems,\n \"keyvalues\": \"${ss:keyvalues}\",\n \"allowEditApp\": allowEditApp,\n \"tab_groups\": tab_groups\n },\n \"id\": \"appMenuService\",\n \"onEvent\": {\n \"@data.changed.steedos_keyvalues\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"args\": {\n \"value\": {\n \"keyvalues\": \"${event.data.keyvalues}\"\n }\n }\n }\n ]\n }\n },\n \"body\": [\n ...editAppSearch,\n {\n \"type\": \"nav\",\n \"expandPosition\": \"after\",\n \"searchable\": !allowEditApp && ").concat(stacked, ",\n \"searchConfig\": {\n \"placeholder\": \"\u641C\u7D22\u83DC\u5355\",\n \"matchFunc\": \"return link.searchKey && link.searchKey.indexOf(keyword)>=0;\"\n },\n className: \"").concat(className, " text-black steedos-app-menu ").concat(stacked ? 'stacked' : '', "\",\n \"stacked\": ").concat(stacked, ",\n \"overflow\": ").concat(JSON.stringify(overflow), ",\n \"indentSize\": ").concat(indentSize, ",\n \"draggable\": allowEditApp,\n \"dragOnSameLevel\": true,\n \"saveOrderApi\": {\n \"url\": \"/service/api/apps/update_app_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"\",\n \"requestAdaptor\": \"const menus = context.data;const tab_groups = [];const tab_items = {};_.each(menus, (menu) => { if (menu.isGroup) { tab_groups.push({ group_name: menu.label, default_open: menu.default_open, }); }else{tab_items[menu.tabApiName] = {group:''}}; if (menu.children) { _.each(menu.children, (menu2) => { tab_items[menu2.tabApiName] = { group: menu.label } }) }}); api.data={appId: context.app.id, tab_groups, tab_items}; return api;\",\n \"messages\": {}\n },\n \"itemActions\": [\n {\n \"type\": \"dropdown-button\",\n \"level\": \"link\",\n \"icon\": \"fa fa-ellipsis-h\",\n \"btnClassName\": \"!text-gray-700\",\n \"hideCaret\": true,\n \"className\": \"hidden hover-inline-flex\",\n \"visibleOn\": \"!!allowEditApp\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u7F16\u8F91\u5206\u7EC4\",\n \"data\": {\n \"appId\": \"\\${app.id}\",\n \"name\": \"\\${event.data.label}\",\n \"oldName\": \"\\${event.data.label}\",\n \"defaultOpen\": \"\\${event.data.default_open}\"\n },\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"\u540D\u79F0\",\n \"name\": \"name\",\n \"id\": \"u:e5bd37f6699b\",\n \"placeholder\": \"\u5206\u7EC4\u540D\u79F0\",\n \"required\": true\n },\n {\n \"type\": \"checkbox\",\n \"option\": \"\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\",\n \"name\": \"defaultOpen\",\n \"id\": \"u:dae5884c1623\",\n \"required\": true\n }\n ],\n \"id\": \"u:304b5b04c573\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d85\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a05b\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/apps/update_app_group_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"\",\n \"requestAdaptor\": \"api.data={appId: context.appId, name: context.name, defaultOpen: context.defaultOpen, oldName: context.oldName}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"this.type==='object'\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + event.data.id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href)\",\n \"expression\": \"${false}\"\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/graphql\",\n \"method\": \"post\",\n \"adaptor\": \"const objects = payload.data.objects; if(objects && objects.length > 0){ try{const objectId = objects[0]._id; FlowRouter.go('/app/admin/objects/view/'+objectId+'?side_object=objects&side_listview_id=all')}catch(e){payload.error=e.message;} }; return payload;\",\n \"requestAdaptor\": \"api.data={query: '{ objects(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id name}}'}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"this.type==='page'\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/graphql\",\n \"method\": \"post\",\n \"adaptor\": \"const tabs = payload.data.tabs; if(tabs && tabs.length > 0){ try{const pageId = tabs[0].page__expand._id; window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + pageId +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href)}catch(e){payload.error=e.message;} }; return payload;\",\n \"requestAdaptor\": \"api.data={query: '{ tabs(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id name page page__expand { _id } }}'}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u7F16\u8F91\",\n \"visibleOn\": \"this.type==='url'\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/graphql\",\n \"method\": \"post\",\n \"adaptor\": \"if(payload.data.tabs && payload.data.tabs.length > 0){payload.data=payload.data.tabs[0]}; return payload\",\n \"requestAdaptor\": \"api.data={query: '{ tabs(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id oName:name fLabel:label fUrl:url icon }}'}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u7F16\u8F91\u5916\u90E8\u94FE\u63A5\",\n \"data\": {\n \"appId\": \"\\${app.id}\",\n \"&\": \"\\${event.data.responseResult}\"\n },\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"required\": true,\n \"disabled\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"fLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u5916\u90E8\u94FE\u63A5\",\n \"name\": \"fUrl\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/tabs/update_link_tab_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.appId, groupId: context.label, name: context.oName, label: context.fLabel, icon: context.icon, url: context.fUrl}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u79FB\u52A8\",\n \"visibleOn\": \"!!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"event.setData({appId: event.data.app.id, groups: [{label: event.data.app.name, value: 0, children: _.map(event.data.tab_groups, (tGroup)=>{return {label: tGroup.group_name, value: tGroup.group_name}})}] , tabApiName: event.data.tabApiName, groupName: event.data.groupName})\"\n },\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u79FB\u52A8\",\n \"data\": {\n \"appId\": \"\\${event.data.appId}\",\n \"groups\": \"\\${event.data.groups}\",\n \"tabApiName\": \"\\${event.data.tabApiName}\",\n \"groupName\": \"\\${event.data.groupName}\",\n \"oldGroupName\": \"\\${event.data.groupName}\",\n },\n \"body\": [\n {\n \"type\": \"tree-select\",\n \"label\": \"\",\n \"name\": \"groupName\",\n \"id\": \"u:26d0b458ff51\",\n \"multiple\": false,\n \"source\": \"\\${groups}\"\n }\n ],\n \"id\": \"u:d69cbb95089a\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:12261bf51dcb\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:b144775ea124\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/move_app_tab\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.appId, groupName: context.groupName, oldGroupName: context.oldGroupName, tabName: context.tabApiName}; return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u5220\u9664\",\n \"visibleOn\": \"!!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/delete_app_tab\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, tabName: context.tabApiName};return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n },\n \"id\": \"u:e54eed92d13f\",\n \"confirmText\": \"\u786E\u5B9A\u8981\u5220\u9664\u5417?\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u5220\u9664\",\n \"visibleOn\": \"!!this.isGroup\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"if(event.data.children && event.data.children.length > 0){doAction({'actionType': 'toast','args': { 'msgType': 'warning', 'msg': '\u5206\u7EC4\u4E0B\u6709\u6570\u636E,\u7981\u6B62\u5220\u9664'}});event.stopPropagation();};\"\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/delete_app_group\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupName: context.label};return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n },\n \"id\": \"u:e54eed92d13f\",\n \"confirmText\": \"\u786E\u5B9A\u8981\u5220\u9664\u5417?\"\n }\n ]\n },\n {\n \"type\": \"dropdown-button\",\n \"level\": \"link\",\n \"icon\": \"fa fa-plus\",\n \"hideCaret\": true,\n \"btnClassName\": \"!text-gray-700\",\n \"visibleOn\": \"!!allowEditApp && !!this.isGroup\",\n \"className\": \"hidden hover-inline-flex\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5BF9\u8C61\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"Api Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"o_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/objects/create_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5FAE\u9875\u9762\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"value\": \"p_${UUID(6)}\",\n \"required\": true,\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"oLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/pages/create_page_by_design\",\n \"method\": \"post\",\n \"adaptor\": \"window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +`&assetUrls=${Builder.settings.assetUrls}`+'&retUrl='+window.location.href);return {}\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.oLabel, icon: context.icon}; return api;\",\n \"messages\": {}\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"button\",\n \"label\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u65B0\u5EFA\u5916\u90E8\u94FE\u63A5\",\n \"body\": [\n {\n \"type\": \"input-text\",\n \"label\": \"API Name\",\n \"name\": \"oName\",\n \"id\": \"u:dae5884c1633\",\n \"placeholder\": \"\u552F\u4E00\u6807\u8BC6\",\n \"required\": true,\n \"value\": \"t_${UUID(6)}\",\n \"validateOnChange\": true,\n \"validations\": {\n \"isVariableName\": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/\n }\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u663E\u793A\u540D\u79F0\",\n \"name\": \"fLabel\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"input-text\",\n \"label\": \"\u5916\u90E8\u94FE\u63A5\",\n \"name\": \"fUrl\",\n \"id\": \"u:e5bd37f6691b\",\n \"required\": true\n },\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u56FE\u6807\",\n \"config\": {\n \"label\": \"\u56FE\u6807\",\n \"type\": \"lookup\",\n \"required\": true,\n \"sort_no\": 30,\n \"optionsFunction\": \"function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }\",\n \"name\": \"icon\",\n \"inlineHelpText\": \"\",\n \"description\": \"\",\n \"hidden\": false,\n \"readonly\": false,\n \"disabled\": false\n }\n }\n ],\n \"id\": \"u:38b76ff2792d\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:21d3cccf4d83\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:238e5731a053\"\n }\n ],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false,\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\",\n \"body\": [\n {\n \"type\": \"spinner\",\n \"id\": \"u:7b15becd491f\",\n \"overlay\": true\n }\n ],\n \"id\": \"u:38b76ff2798d\",\n \"actions\": [],\n \"showCloseButton\": false,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": false,\n \"showLoading\": false,\n \"draggable\": false\n }\n },\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"api\": {\n \"url\": \"/service/api/tabs/create_link_tab_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.fLabel, icon: context.icon, url: context.fUrl}; return api;\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n },\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"button\",\n \"label\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"ignoreError\": false,\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"type\": \"dialog\",\n \"title\": \"\u6DFB\u52A0\u73B0\u6709\u9009\u9879\u5361\",\n \"body\": [\n {\n \"type\": \"steedos-field\",\n \"label\": \"\u9009\u9879\u5361\",\n \"config\": {\n \"type\": \"lookup\",\n \"reference_to\": \"tabs\",\n \"reference_to_field\": \"name\",\n \"required\": true,\n \"sort_no\": 30,\n \"name\": \"tabs\",\n \"multiple\": true,\n \"enable_enhanced_lookup\": true,\n \"amis\": {\n \"label\": false,\n \"embed\": true,\n }\n }\n }\n ],\n \"id\": \"u:709fd4d53437\",\n \"actions\": [\n {\n \"type\": \"button\",\n \"actionType\": \"cancel\",\n \"label\": \"\u53D6\u6D88\",\n \"id\": \"u:ba7b707cddd8\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"confirm\",\n \"label\": \"\u786E\u5B9A\",\n \"primary\": true,\n \"id\": \"u:2f3e5635b95d\"\n }\n ],\n \"showCloseButton\": true,\n \"closeOnOutside\": false,\n \"closeOnEsc\": false,\n \"showErrorMsg\": true,\n \"showLoading\": true,\n \"draggable\": false,\n \"size\": \"md\",\n \"onEvent\": {\n \"confirm\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"ignoreError\": false,\n \"outputVar\": \"responseResult\",\n \"actionType\": \"ajax\",\n \"options\": {},\n \"api\": {\n \"url\": \"/service/api/apps/update_app_tabs_by_design\",\n \"method\": \"post\",\n \"requestAdaptor\": \"api.data={appId: context.app.id, groupId: context.label, addTabNames: context.tabs}; return api;\",\n \"adaptor\": \"\",\n \"messages\": {}\n }\n },\n {\n \"componentId\": \"u:app-menu\",\n \"groupType\": \"component\",\n \"actionType\": \"reload\"\n }\n ]\n }\n }\n }\n }\n ]\n }\n }\n }\n ]\n },\n ],\n \"source\": \"${items}\",\n //\u5DE6\u5C42\u663E\u793A\u65F6\u5BA1\u6279\u5355\u663E\u793Abadge\u6570\u91CF\n \"itemBadge\": {\n \"mode\": \"text\",\n \"text\": \"").concat(badgeText, "\",\n \"visibleOn\": \"${id == 'instance_tasks'}\",\n \"overflowCount\": 99,\n \"style\": stacked?{\n \"right\": \"20%\",\n \"margin-right\": \"-23px\",\n \"height\": \"20px\",\n \"border-radius\": \"10px\",\n \"font-size\": \"16px\",\n \"line-height\": \"18px\",\n \"top\": \"50%\"\n }:{\n \"transform\": \"translate(calc(50% - 17px), calc(-50% + 10px))\",\n \"border-radius\": \"6.5px\",\n \"height\": \"15px\",\n \"line-height\": \"13px\",\n \"padding\": \"0px 4px\",\n \"font-size\": \"12px\"\n }\n },\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"appMenuService\",\n \"args\": {\n \"value\": {\n \"tabId\": \"${event.data.item.id}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.item.id}\"\n },\n {\n \"actionType\": \"custom\",\n \"script\" : \"window.postMessage(Object.assign({type: 'nav.click', data: event.data.item}), '*');\"\n }\n ]\n },\n \"@tabId.changed\":{\n \"actions\":[\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"appMenuService\",\n \"args\": {\n \"value\": {\n \"tabId\": \"${event.data.tabId}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.tabId}\"\n },\n {\n \"actionType\": \"custom\",\n \"script\" : \"window.postMessage(Object.assign({type: 'nav.click', data: event.data.item}), '*');\"\n }\n ]\n }\n }\n }\n ]\n };\n } catch (error) {\n console.log(`error`, error)\n }\n console.log('payload===2==>', payload)\n\n setTimeout(function(){\n $(\"[name='keywords']\").focus();\n }, 300);\n\n return payload;\n "),
26026
26130
  "headers": {
26027
26131
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
26028
26132
  }
26029
26133
  }
26030
26134
  };
26031
- // console.log(`schema=====>`, schema)
26135
+ // console.log(`AmisAppMenu schema=====>`, schema)
26032
26136
  return [2 /*return*/, schema];
26033
26137
  });
26034
26138
  }); };
@@ -26092,7 +26196,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
26092
26196
  * @Author: baozhoutao@steedos.com
26093
26197
  * @Date: 2022-09-01 14:44:57
26094
26198
  * @LastEditors: baozhoutao@steedos.com
26095
- * @LastEditTime: 2024-10-10 16:36:14
26199
+ * @LastEditTime: 2025-01-13 11:17:07
26096
26200
  * @Description:
26097
26201
  */
26098
26202
  var beforeMarkReadAllScript = "\n var hasUnRead = !!db.notifications.find({'$or':[{'is_read': null},{'is_read': false}]}).count();\n // \u6CA1\u6709\u8BA2\u9605\u5230\u672A\u8BFB\u901A\u77E5\u65F6\u9700\u8981\u989D\u5916\u5355\u72EC\u89E6\u53D1\u91CD\u65B0\u8BF7\u6C42\u901A\u77E5\u5217\u8868\u53CA\u672A\u8BFB\u6570\u91CF\n // \u5982\u679C\u6709\u8BA2\u9605\u5230\u7684\u8BDD\uFF0C\u56E0\u4E3A\u76D1\u542C\u8BA2\u9605\u5230\u7684\u901A\u77E5\u8BB0\u5F55\u53D8\u5316\uFF0C\u6709\u53D8\u5316\u4F1A\u89E6\u53D1@data.changed.notifications\u4E8B\u4EF6\uFF0C\u4ECE\u800C\u4F1A\u81EA\u52A8\u89E6\u53D1\u91CD\u65B0\u8BF7\u6C42\u901A\u77E5\u5217\u8868\u53CA\u672A\u8BFB\u6570\u91CF\n event.data.needToReload = !hasUnRead;\n";
@@ -26116,7 +26220,7 @@ var getNotificationBadgeButton = function () {
26116
26220
  "name": "notifications",
26117
26221
  "items": {
26118
26222
  "type": "tpl",
26119
- "tpl": "<div class='flex items-center p-4 hover:bg-sky-50'>\n <img src='<%=data.context.rootUrl + \"/avatar/\" + data.from%>' alt='' class='h-10 w-10 flex-none rounded-full'>\n <div class='ml-4 flex-auto'>\n <div class='font-medium'>\n <span class='text-primary'><%=data.name%></span>\n </div>\n <div class='mt-1 text-gray-700'>\n <%=data.body%>\n </div>\n <div class='mt-1 text-gray-700'>\n <%=moment(data.created).locale(data.global.user.language).fromNow()%>\n <abbr class='slds-text-link slds-m-horizontal_xxx-small <%=data.is_read ? 'hidden' : ''%>' title='unread'>\u25CF</abbr>\n </div>\n </div>\n </div>",
26223
+ "tpl": "<div class='flex items-center p-2 hover:bg-sky-50'>\n <img src='<%=data.context.rootUrl + \"/avatar/\" + data.from%>' alt='' class='h-10 w-10 flex-none rounded-full'>\n <div class='ml-4 flex-auto'>\n <div class='font-medium'>\n <span class='text-primary'><%=data.name%></span>\n </div>\n <div class='mt-1 text-gray-700'>\n <%=data.body%>\n </div>\n <div class='mt-1 text-gray-700'>\n <%=moment(data.created).locale(data.global.user.language).fromNow()%>\n <abbr class='slds-text-link slds-m-horizontal_xxx-small <%=data.is_read ? 'hidden' : ''%>' title='unread'>\u25CF</abbr>\n </div>\n </div>\n </div>",
26120
26224
  "id": "u:07ece657c7b7",
26121
26225
  "onEvent": {
26122
26226
  "click": {
@@ -26647,17 +26751,17 @@ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0
26647
26751
  * @Author: baozhoutao@steedos.com
26648
26752
  * @Date: 2022-09-01 14:44:57
26649
26753
  * @LastEditors: baozhoutao@steedos.com
26650
- * @LastEditTime: 2024-01-16 13:45:42
26754
+ * @LastEditTime: 2025-02-15 14:11:21
26651
26755
  * @Description:
26652
26756
  */
26653
26757
  var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void 0, function () {
26654
- var logoSrc, customButtons, isMobile, schema;
26758
+ var logoSrc, customButtons, className, isMobile, schema;
26655
26759
  return __generator(this, function (_a) {
26656
- logoSrc = props.logoSrc, customButtons = props.customButtons;
26760
+ logoSrc = props.logoSrc, customButtons = props.customButtons, className = props.className;
26657
26761
  isMobile = window.innerWidth <= 768;
26658
26762
  schema = {
26659
26763
  "type": "wrapper",
26660
- "className": 'p-0',
26764
+ "className": 'p-0' + (className ? " ".concat(className) : ''),
26661
26765
  body: [
26662
26766
  {
26663
26767
  "type": "wrapper",
@@ -26823,7 +26927,7 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
26823
26927
  "actions": [
26824
26928
  {
26825
26929
  "actionType": "custom",
26826
- "script": "console.log(event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
26930
+ "script": "console.log('event.target===>', event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
26827
26931
  }
26828
26932
  ]
26829
26933
  }
@@ -26932,7 +27036,7 @@ function getLookupLinkOnClick(field, options) {
26932
27036
  "title": "&nbsp;",
26933
27037
  "headerClassName": "hidden",
26934
27038
  "size": "lg",
26935
- "width": "70%",
27039
+ "width": window.drawerWidth || "70%",
26936
27040
  "bodyClassName": "p-0 m-0 bg-gray-100",
26937
27041
  "closeOnEsc": true,
26938
27042
  "closeOnOutside": true,
@@ -27933,6 +28037,7 @@ function generateRandomString(length) {
27933
28037
  // 通用函数生成器
27934
28038
  var createFieldFunction = function (type) {
27935
28039
  return function (props) { return __awaiter(void 0, void 0, void 0, function () {
28040
+ var schema;
27936
28041
  var _a;
27937
28042
  return __generator(this, function (_b) {
27938
28043
  switch (_b.label) {
@@ -27995,22 +28100,13 @@ var createFieldFunction = function (type) {
27995
28100
  };
27996
28101
  }
27997
28102
  }
27998
- return [4 /*yield*/, AmisSteedosField(props)
27999
- // {
28000
- // type: "steedos-field",
28001
- // config: Object.assign({}, props.config || {}, {
28002
- // type: type
28003
- // })
28004
- // };
28005
- ];
28006
- case 1: return [2 /*return*/, _b.sent()
28007
- // {
28008
- // type: "steedos-field",
28009
- // config: Object.assign({}, props.config || {}, {
28010
- // type: type
28011
- // })
28012
- // };
28013
- ];
28103
+ return [4 /*yield*/, AmisSteedosField(props)];
28104
+ case 1:
28105
+ schema = _b.sent();
28106
+ if (has(props, '$$editor')) {
28107
+ delete schema.visibleOn;
28108
+ }
28109
+ return [2 /*return*/, schema];
28014
28110
  }
28015
28111
  });
28016
28112
  }); };
@@ -28083,7 +28179,7 @@ var AmisSteedosObject = function (props) {
28083
28179
  };
28084
28180
 
28085
28181
  var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
28086
- var formFactor, appId, objectApiName, display, data, _display, page, listSchema;
28182
+ var formFactor, appId, objectApiName, display, data, _display, page, listSchema, schema;
28087
28183
  return __generator(this, function (_b) {
28088
28184
  switch (_b.label) {
28089
28185
  case 0:
@@ -28110,41 +28206,27 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
28110
28206
  // "formFactor": formFactor,
28111
28207
  // "className": (displayAs === 'split')? 'w-full': 'p-0 flex-1 m-0 sm:border sm:shadow sm:rounded border-gray-300 border-solid bg-gray-100'
28112
28208
  };
28113
- // const defData = {
28114
- // ...$schema.data,
28115
- // objectName: objectApiName,
28116
- // listViewId: listViewId,
28117
- // // listName: listName || listviewId,
28118
- // appId: appId,
28119
- // // formFactor: formFactor,
28120
- // // displayAs: displayAs
28121
- // };
28122
- // if(listName){
28123
- // defData.listName = listName || listviewId
28124
- // }
28125
- // console.log("defData====>", defData)
28126
- // console.timeEnd('PageListView')
28127
- // const pageGridClassName = listSchema.pageGridClassName || 'h-full sm:p-3'
28128
- // const pageSplitClassName = listSchema.pageSplitClassName || 'p-0 flex flex-1 overflow-hidden h-full'
28129
- return [2 /*return*/, {
28130
- type: 'service',
28131
- className: {
28132
- "h-full": "true",
28133
- "page-list-grid": "${display != 'split'}",
28134
- "page-list-split": "${display == 'split'}"
28135
- },
28136
- body: listSchema
28137
- }];
28209
+ schema = {
28210
+ type: 'service',
28211
+ className: {
28212
+ "h-full": "true",
28213
+ "page-list-grid": "${display != 'split'}",
28214
+ "page-list-split": "${display == 'split'}"
28215
+ },
28216
+ body: listSchema
28217
+ };
28218
+ console.log("PageListView=====>", props, schema);
28219
+ return [2 /*return*/, schema];
28138
28220
  }
28139
28221
  });
28140
28222
  }); };
28141
28223
 
28142
28224
  var PageRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
28143
- var defaultFormFactor, appId, objectApiName, display, data, _display, recordSchema, recordPage;
28225
+ var defaultFormFactor, appId, objectApiName, recordId, display, data, _display, recordSchema, recordPage, schema;
28144
28226
  return __generator(this, function (_a) {
28145
28227
  switch (_a.label) {
28146
28228
  case 0:
28147
- defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display, data = props.data;
28229
+ defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, recordId = props.recordId, display = props.display, data = props.data;
28148
28230
  _display = data.display || display;
28149
28231
  if (_display) {
28150
28232
  Router$1.setTabDisplayAs(objectApiName, _display);
@@ -28160,15 +28242,16 @@ var PageRecordDetail = function (props) { return __awaiter(void 0, void 0, void
28160
28242
  "body": [
28161
28243
  {
28162
28244
  "type": "steedos-record-detail",
28163
- // "recordId": "${recordId}",
28164
- "objectApiName": "${objectName}",
28245
+ "recordId": has(props, 'recordId') ? recordId : data.recordId,
28246
+ "objectApiName": objectApiName,
28165
28247
  // className: "sm:m-3",
28166
28248
  appId: appId,
28167
28249
  }
28168
28250
  ],
28169
28251
  };
28170
28252
  _a.label = 2;
28171
- case 2: return [2 /*return*/, {
28253
+ case 2:
28254
+ schema = {
28172
28255
  type: 'service',
28173
28256
  "className": 'h-full',
28174
28257
  body: recordSchema,
@@ -28182,106 +28265,113 @@ var PageRecordDetail = function (props) { return __awaiter(void 0, void 0, void
28182
28265
  ]
28183
28266
  }
28184
28267
  }
28185
- }];
28268
+ };
28269
+ // console.log(`PageRecordDetail===>`, schema, props)
28270
+ return [2 /*return*/, schema];
28186
28271
  }
28187
28272
  });
28188
28273
  }); };
28189
28274
 
28190
28275
  var PageObject = function (props) { return __awaiter(void 0, void 0, void 0, function () {
28191
- var data, _a, $schema, uiSchema;
28276
+ var data, _a, $schema, objectName, uiSchema, schema;
28192
28277
  return __generator(this, function (_b) {
28193
28278
  switch (_b.label) {
28194
28279
  case 0:
28195
28280
  data = props.data, _a = props.$schema, $schema = _a === void 0 ? {} : _a;
28196
- return [4 /*yield*/, getUISchema($schema.data.objectName, false)];
28281
+ objectName = $schema.data.objectName;
28282
+ if (objectName.startsWith('$')) {
28283
+ objectName = data.objectName;
28284
+ }
28285
+ return [4 /*yield*/, getUISchema(objectName, false)];
28197
28286
  case 1:
28198
28287
  uiSchema = _b.sent();
28199
28288
  delete $schema.data.recordId;
28200
28289
  window.Steedos && window.Steedos.setDocumentTitle && window.Steedos.setDocumentTitle({ tabName: uiSchema.label || uiSchema.name });
28201
- // 最外层的data是render data, 会被updateProps data覆盖, 所以组件data需要单开一个数据域. 所以此处有2层service
28202
- return [2 /*return*/, {
28203
- type: "service",
28204
- data: $schema.data,
28205
- className: "h-full",
28206
- body: {
28207
- type: 'service',
28208
- className: {
28209
- 'h-full': "${display != 'split'}",
28210
- 'flex flex-1 overflow-hidden h-full': "${display == 'split'}"
28211
- },
28212
- data: {
28213
- uiSchema: uiSchema
28290
+ schema = {
28291
+ type: "service",
28292
+ data: $schema.data,
28293
+ className: "h-full",
28294
+ body: {
28295
+ type: 'service',
28296
+ className: {
28297
+ 'h-full': "${display != 'split'}",
28298
+ 'flex flex-1 overflow-hidden h-full': "${display == 'split'}"
28299
+ },
28300
+ data: {
28301
+ uiSchema: uiSchema
28302
+ },
28303
+ body: [
28304
+ {
28305
+ "type": "wrapper",
28306
+ "size": "none",
28307
+ "className": {
28308
+ "p-0 flex-shrink-0 min-w-[388px] w-fit lg:order-first lg:flex lg:flex-col": "${display == 'split'}",
28309
+ 'h-full': "${display != 'split'}",
28310
+ },
28311
+ "body": {
28312
+ "name": "".concat(data.objectName, "-listview-").concat(data.listViewId),
28313
+ "type": "steedos-page-listview",
28314
+ "showHeader": true,
28315
+ "objectApiName": data.objectName,
28316
+ "appId": data.appId,
28317
+ "display": data.display,
28318
+ "columnsTogglable": false
28319
+ },
28320
+ "visibleOn": "${pageType === 'list' || (pageType === 'record' && display == 'split')}"
28214
28321
  },
28215
- body: [
28216
- {
28217
- "type": "wrapper",
28218
- "size": "none",
28219
- "className": {
28220
- "p-0 flex-shrink-0 min-w-[388px] w-fit lg:order-first lg:flex lg:flex-col": "${display == 'split'}",
28221
- 'h-full': "${display != 'split'}",
28222
- },
28223
- "body": {
28224
- "name": "".concat(data.objectName, "-listview-").concat(data.listViewId),
28225
- "type": "steedos-page-listview",
28226
- "showHeader": true,
28227
- "objectApiName": data.objectName,
28228
- "appId": data.appId,
28229
- "display": data.display,
28230
- "columnsTogglable": false
28231
- },
28232
- "visibleOn": "${pageType === 'list' || (pageType === 'record' && display == 'split')}"
28322
+ {
28323
+ "type": "wrapper",
28324
+ "size": "none",
28325
+ "className": {
28326
+ "overflow-y-auto p-0 flex-1 focus:outline-none lg:order-last h-full": "${display == 'split'}",
28327
+ 'h-full': "${display != 'split'}",
28233
28328
  },
28234
- {
28235
- "type": "wrapper",
28236
- "size": "none",
28237
- "className": {
28238
- "overflow-y-auto p-0 flex-1 focus:outline-none lg:order-last h-full": "${display == 'split'}",
28239
- 'h-full': "${display != 'split'}",
28240
- },
28241
- "body": {
28242
- "name": "".concat(data.objectName, "-recordDetail-").concat(data.recordId),
28243
- "type": "steedos-page-record-detail",
28244
- "objectApiName": data.objectName,
28245
- "sideObject": data.sideObject,
28246
- "sideListviewId": data.sideListviewId,
28247
- // "recordId": recordId,
28248
- "display": data.display,
28249
- "appId": data.appId
28250
- },
28251
- "visibleOn": "${pageType === 'record'}"
28329
+ "body": {
28330
+ "name": "".concat(data.objectName, "-recordDetail-").concat(data.recordId),
28331
+ "type": "steedos-page-record-detail",
28332
+ "objectApiName": data.objectName,
28333
+ "sideObject": data.sideObject,
28334
+ "sideListviewId": data.sideListviewId,
28335
+ // "recordId": recordId,
28336
+ "display": data.display,
28337
+ "appId": data.appId
28252
28338
  },
28253
- {
28254
- "type": "tpl",
28255
- "tpl": "无效的页面类型: ${pageType}",
28256
- "visibleOn": "${pageType !== 'record' && pageType !== 'list'}"
28257
- }
28258
- ]
28259
- },
28260
- // onEvent: {
28261
- // "recordLoaded": {
28262
- // "actions": [
28263
- // {
28264
- // "actionType": "setValue",
28265
- // "args": {
28266
- // "value": {
28267
- // "steedos_selected_recordId": "${event.data.record._id}"
28268
- // }
28269
- // }
28270
- // }
28271
- // ]
28272
- // }
28273
- // }
28274
- }];
28339
+ "visibleOn": "${pageType === 'record'}"
28340
+ },
28341
+ {
28342
+ "type": "tpl",
28343
+ "tpl": "无效的页面类型: ${pageType}",
28344
+ "visibleOn": "${pageType !== 'record' && pageType !== 'list'}"
28345
+ }
28346
+ ]
28347
+ },
28348
+ // onEvent: {
28349
+ // "recordLoaded": {
28350
+ // "actions": [
28351
+ // {
28352
+ // "actionType": "setValue",
28353
+ // "args": {
28354
+ // "value": {
28355
+ // "steedos_selected_recordId": "${event.data.record._id}"
28356
+ // }
28357
+ // }
28358
+ // }
28359
+ // ]
28360
+ // }
28361
+ // }
28362
+ };
28363
+ console.log("PageObject=====>", props, schema);
28364
+ return [2 /*return*/, schema];
28275
28365
  }
28276
28366
  });
28277
28367
  }); };
28278
28368
 
28279
- var __assign=function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},StandardObjects={Base:{Actions:{standard_query:{visible:function(e,t,r){return !1}},standard_new:{visible:function(e,t,r){return "cms_files"!==e&&"instances"!==e&&(r?r.allowCreate:void 0)}},standard_edit:{visible:function(e,t,r){if(r)return r.allowEdit}},standard_delete:{visible:function(e,t,r){if(r)return r.allowDelete}},standard_import_data:{visible:function(e,t,r){var n=this.object;if(r)return r.allowCreate&&n.hasImportTemplates}},standard_approve:{visible:function(e,t,r){return !1}},standard_view_instance:{visible:function(e,t,r){return !1}},standard_submit_for_approval:{visible:function(e,t,r){return window.Steedos.ProcessManager.allowSubmit.apply(this,[e,t])},todo:function(e,t){return window.Steedos.ProcessManager.submit.apply(this,[e,t])}},standard_follow:{visible:function(e,t,r){return !1}},standard_delete_many:{visible:function(e,t,r){return !RegExp("\\w+/view/\\w+").test(location.pathname)&&(r?r.allowDelete:void 0)}},standard_export_excel:{visible:function(e,t,r){return !1}}}}},authRequest=function(e,t){var a=null;e=Steedos.absoluteUrl(e);try{var r=[{name:"Content-Type",value:"application/json"},{name:"Authorization",value:Steedos.getAuthorization()}],n={type:"get",url:e,dataType:"json",contentType:"application/json",beforeSend:function(t){if(r&&r.length)return r.forEach(function(e){return t.setRequestHeader(e.name,e.value)})},success:function(e){a=e;},error:function(e,t,r){var n,o;e.responseJSON&&e.responseJSON.error?(n=e.responseJSON.error,o=void(a={error:n}),o=n.reason||n.message||n,console.error(o)):console.error(e.responseJSON);}};return $.ajax(Object.assign({},n,t)),a}catch(e){console.error(e);}};function _extends(){return (_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}const newFunctionComponent=o=>e=>{const[t,r]=useState(!0);var n=()=>{r(!1);};return has(e,"ref")||(window.SteedosUI.refs[e.name]={show:()=>{r(!0);},close:n}),React.createElement(o,_extends({visible:t,onCancel:n,onClose:n},{width:"70%",style:{width:"70%",maxWidth:"950px",minWidth:"480px"}},e))},newComponentRender=(r,n)=>(e,t)=>{e.name||(e.name=r+"-"+(e.name||"default")),(t=t||document.getElementById(`steedos-${r}-root-`+e.name))||((t=document.createElement("div")).setAttribute("id",`steedos-${r}-root-`+e.name),document.body.appendChild(t));e=React.createElement(newFunctionComponent(n),e);createRoot(t).render(e);},Modal=assign(newComponentRender("modal",Modal$1),{info:Modal$1.info,success:Modal$1.success,error:Modal$1.error,warning:Modal$1.warning,confirm:Modal$1.confirm}),Drawer=newComponentRender("drawer",Drawer$1),getGraphqlFieldsQuery=e=>{const t=["_id"];return e.push("record_permissions"),each(e,e=>{-1<e.indexOf(".")&&(e=e.split(".")[0]),t.push(""+e);}),""+t.join(" ")},getFindOneQuery=(e,t,r)=>{e=e.replace(/\./g,"_");r=getGraphqlFieldsQuery(r);let n="";t=[`id: "${t}"`];return `{record:${e}__findOne${n=0<t.length?`(${t.join(",")})`:n}{${r}}}`},SObject={getRecord:async(e,t,r)=>{return (await fetchAPI("/graphql",{method:"post",body:JSON.stringify({query:getFindOneQuery(e,t,r)})})).data.record},getUISchema:async(e,t)=>getUISchema(e,t)},canSaveFilter=e=>!(!e._id||e.owner!==getSteedosAuth()?.userId),ListView={showFilter:(e,{listView:t,data:r})=>{canSaveFilter(t);r.filters&&(r.filters=filtersToConditions(r.filters));},getVisibleFilter:(e,t)=>{return t||(canSaveFilter(e)?e.filters:void 0)},getQueryFilter:(e,t)=>{return canSaveFilter(e)?ListView.getVisibleFilter(e,t):isEmpty(t)?e.filters:[e.filters,"and",t]},getFirstListView:async e=>{e=await window.getUISchema(e);return _.first(_.sortBy(_.values(e.list_views),"sort_no"))}},Router={getAppPath({appId:e}){return "/app/"+e},getPagePath(){},getObjectListViewPath({appId:e,objectName:t,listViewName:r}){return `/app/${e}/${t}/grid/`+r},getObjectDetailPath({appId:e,objectName:t,recordId:r}){return `/app/${e}/${t}/view/`+r},getObjectRelatedViewPath({appId:e,masterObjectName:t,masterRecordId:r,objectName:n,foreignKey:o}){return `/app/${e}/${t}/${r}/${n}/grid?related_field_name=`+o}};var withModalWrap=function(t,e){return function(e){return createElement(t,e)}},render=function(e,t,r,n){e=withModalWrap(e),e=createElement(e,__assign({},t));return ReactDOM.render(e,r)};const safeRunFunction=(t,r,n,o)=>{try{var a=window.Creator;if(!!(!a||!a.getObjectUrl)&&/\bSteedos\b|\bCreator\b|\bMeteor\b|\bSession\b/.test(t))return console.info("调用了Creator|Steedos|Meteor|Session变量的脚本不执行,直接按空值处理。"),"";let e=[];return isNil(r)||(e=isArray$3(r)?r:[r]),t.bind(o||{})(...e)}catch(e){return console.log(e),n}};function safeEval(js){try{return eval(js)}catch(e){console.error(e,js);}}const isExpression=function(e){var t,r;return "string"==typeof e&&(t=/^{{(function.+)}}$/,r=/^{{(.+=>.+)}}$/,!("string"!=typeof e||!e.match(/^{{(.+)}}$/)||e.match(t)||e.match(r)))},getMoment=()=>window.amisRequire?window.amisRequire("moment"):window.moment||void 0,getGlobalNowData=()=>{var e=new Date,t=getMoment();let r=t().utc(),n=(r.set("hours",0),r.set("minutes",0),r.set("seconds",0),r.set("milliseconds",0),r=r.toDate(),t());return n.set("year",1970),n.set("month",0),n.set("date",1),n.set("hours",n.hours()+n.utcOffset()/60),n.set("seconds",0),n.set("milliseconds",0),n=n.toDate(),{now:e,today:r,timeNow:n}},parseSingleExpression=function(t,e,r,n){var o,a;if(n&&Object.assign(n,getGlobalNowData()),a=function(e,t){return "#"!==t&&t?"string"==typeof t?_.get(e,t):void console.error("path has to be a string"):e||{}}(e=void 0===e?{}:e,function(e){return "string"!=typeof e||1===(e=e.split(".")).length?"#":(e.pop(),e.join("."))}(r))||{},"string"!=typeof t)return t;o="__G_L_O_B_A_L__",e="\n return "+t.substring(2,t.length-2).replace(/\bformData\b/g,JSON.stringify(e).replace(/\bglobal\b/g,o)).replace(/\bglobal\b/g,JSON.stringify(n)).replace(new RegExp("\\b"+o+"\\b","g"),"global").replace(/rootValue/g,JSON.stringify(a));try{return Function(e)()}catch(e){return console.log(e,t,r),t}};var Expression=Object.freeze({__proto__:null,isExpression:isExpression,getGlobalNowData:getGlobalNowData,parseSingleExpression:parseSingleExpression});const getCompatibleDefaultValueExpression=(express,multiple)=>{const reg=/^\{\w+(\.*\w+)*\}$/,reg2=/^{{[\s\S]*}}$/;let result=express;if(reg.test(express)&&(result=-1<express.indexOf("userId")||-1<express.indexOf("spaceId")||-1<express.indexOf("user.")||-1<express.indexOf("now")||-1<express.indexOf("today")||-1<express.indexOf("timeNow")?`{${express}}`.replace("{{","{{global."):`{${express}}`.replace("{{","{{formData."),multiple&&(result=result.replace(/\{\{(.+)\}\}/,"{{[$1]}}"))),reg2.test(express)&&(-1<express.indexOf("function")||-1<express.indexOf("=>"))){let regex=/\{\{([\s\S]*)\}\}/,matches=regex.exec(express);if(matches&&1<matches.length){let functionCode=matches[1];result=eval("("+functionCode+")")();}}return result},getFieldDefaultValue=(e,t)=>{if(!e)return null;let r=e.defaultValue;e._defaultValue&&(r=safeEval(`(${e._defaultValue})`)),isFunction$4(r)&&(r=safeRunFunction(r,[],null,{name:e.name})),isString(r)&&(r=getCompatibleDefaultValueExpression(r,e.multiple));var n=isExpression(r);switch(n&&("date"===e.type?r=r.replace(/\bglobal.now\b/g,"global.today"):"time"===e.type&&(r=r.replace(/\bglobal.now\b/g,"global.timeNow")),r=parseSingleExpression(r,{},"#",t)),e.type){case"select":var o=e.data_type||"text";!r||n||e.multiple||("text"!==o||isString(r)?"number"===o&&isString(r)?r=Number(r):"boolean"===o&&isString(r)&&(r="true"===r.toLowerCase()||"1"===r):r=String(r));break;case"number":isString(r)&&(r=Number(r));break;case"boolean":isString(r)?r="true"===r.toLowerCase()||"1"===r:isBoolean(r)||(r=!1);break;case"time":if(isDate(r))return moment(r).format("1970-01-01THH:mm:00.000[Z]");case"date":if(isDate(r))return moment(r).format("YYYY-MM-DDT00:00:00.000[Z]");case"datetime":if(isDate(r))return moment(r).format("YYYY-MM-DDTHH:mm:00.000Z")}return r};function getTreeOptions(t,e){const o=e?.valueField||"value";e?.labelField;const r=e?.unfoldedNum||1,n=[],a=(e,t,r,n)=>{return e.children&&"object"==typeof e.children[0]?e.children:r?(e=_.filter(t,e=>_.includes(r,e[o])),_.each(e,e=>{1<=n?(e.unfolded=!0,e.children&&(e.children=a(e,t,e.children,n-1))):e.children&&(e.children=a(e,t,e.children,n));}),e):void 0};for(var s=t,i=0;i<s.length;i++)if(s[i].noParent=0,s[i].unfolded=!1,s[i].parent){let e=1;for(var l=0;l<s.length;l++)s[i].parent==s[l][o]&&(e=0);1==e&&(s[i].noParent=1);}else s[i].noParent=1;return _.each(t,e=>{1==e.noParent&&(1<=r?(e.unfolded=!0,n.push(Object.assign({},e,{children:a(e,t,e.children,r-1)}))):n.push(Object.assign({},e,{children:a(e,t,e.children,r)})));}),n}function getClosestAmisComponentByType(t,r,n){let o=(n=n||{}).name;var e=n.direction||"up";let a=t.getComponents().find(function(e){return e.props.type===r&&(!o||e.props.name===o)});if(a)return a;if("down"===e){if(t.children&&t.children.length){for(let e=0;e<t.children.length&&!(a=getClosestAmisComponentByType(t.children[e],r,n));e++);return a}}else if("up"===e&&t.parent)return getClosestAmisComponentByType(t.parent,r,n)}function isFilterFormValuesEmpty(e){let t=!0;var e=_.pickBy(e,function(e,t){return /^__searchable__/g.test(t)});return _.isEmpty(e)||(e=_.omitBy(e,function(e){return _.isNil(e)||_.isObject(e)&&_.isEmpty(e)||_.isArray(e)&&_.isEmpty(e.filter(function(e){return !_.isNil(e)}))||_.isString(e)&&0===e.length}),_.isEmpty(e)||(t=!1)),t}const SteedosUI$1=Object.assign({},{render:render,Router:Router,ListView:ListView,Object:SObject,Modal:Modal,Drawer:Drawer,refs:{},getRef(e){return SteedosUI$1.refs[e]},router:{go:(e,t)=>{var r=window.FlowRouter;if(t)return r?r.go(t):window.open(t);r?r.reload():console.warn("暂不支持自动跳转",e);},reload:()=>{console.log("reload");}},message:message,notification:notification,components:{Button:Button,Space:Space},getRefId:({type:e,appId:t,name:r})=>{switch(e){case"listview":return `amis-${t}-${r}-listview`;case"form":return `amis-${t}-${r}-form`;case"detail":return `amis-${t}-${r}-detail`;default:return `amis-${t}-${r}-`+e}},reloadRecord:()=>{if(window.FlowRouter)return window.FlowRouter.reload()},getFieldDefaultValue:getFieldDefaultValue,getTreeOptions:getTreeOptions,getClosestAmisComponentByType:getClosestAmisComponentByType,isFilterFormValuesEmpty:isFilterFormValuesEmpty,getSearchFilter:e=>{var o=[];return _.each(e,(e,t)=>{var r,n;_.isEmpty(e)&&!_.isBoolean(e)||(_.startsWith(t,"__searchable__between__")?o.push([""+t.replace("__searchable__between__",""),"between",e]):_.startsWith(t,"__searchable__")&&(_.isString(e)?o.push([""+t.replace("__searchable__",""),"contains",e]):_.isObject(e)&&e.o?(n=[[(r=""+t.replace("__searchable__",""))+"/o","=",e.o]],e.ids.length&&n.push([r+"/ids","=",e.ids]),o.push(n)):o.push([""+t.replace("__searchable__",""),"=",e])));}),o},getKeywordsSearchFilter:(e,t)=>{const o=[];var a;return e&&t&&(a=e.split(/\s+/),a=compact(a),t.forEach(function(r,e){let n=[];1==a.length?n=[r,"contains",a[0]]:a.forEach(function(e,t){n.push([r,"contains",e]),t<a.length-1&&n.push("or");}),n.length&&(o.push(n),e<t.length-1&&o.push("or"));})),o},getFormulaVariables:(e,t=!0)=>{const r=[];return isEmpty(e)||(r.push({label:"表单字段",children:[]}),lodash.forEach(e,function(e){r[0].children.push({label:e.label,value:e.value});})),t&&r.push({label:"全局变量",children:[{label:"用户ID",value:"global['userId']"},{label:"工作区ID",value:"global['spaceId']"},{label:"用户",children:[{label:"姓名",value:"global['user']['name']"},{label:"邮件",value:"global['user']['email']"},{label:"语言",value:"global['user']['language']"},{label:"简档",value:"global['user']['profile']"},{label:"权限集",value:"global['user']['roles']"},{label:"主部门ID",value:"global['user']['organization']['_id']"},{label:"部门(含上级)",value:"global['user']['organizations_parents']"},{label:"主分部ID",value:"global['user']['company_id']"},{label:"分部(多选)",value:"global['user']['company_ids']"},{label:"人员ID",value:"global['user']['spaceUserId']"},{label:"是否是工作区管理员",value:"global['user']['is_space_admin']"}]}]}),r}});var getBuilderContext=function(){return "undefined"==typeof window?{}:Builder.settings.context||Builder.settings},Steedos$1=__assign({getRootUrl:function(e){var t=getBuilderContext();return t.rootUrl||("undefined"!=typeof window?window.localStorage.getItem("steedos:rootUrl"):"")||e},absoluteUrl:function(e){return void 0===e&&(e=""),"".concat(Steedos$1.getRootUrl()).concat(e)},getTenantId:function(){try{var e=getBuilderContext().tenantId;return (e=window.location.search&&!e?new URLSearchParams(window.location.search).get("X-Space-Id"):e)?e:null}catch(e){console.error(e);}},getAuthorization:function(){try{var e=getBuilderContext(),t=e.tenantId,r=e.authToken;return t&&r?"Bearer ".concat(t,",").concat(r):null}catch(e){console.error(e);}},authRequest:authRequest,StandardObjects:StandardObjects},Expression);"undefined"==typeof window||window.Steedos||(window.Steedos=Steedos$1),"undefined"==typeof window||window.SteedosUI||(window.SteedosUI=SteedosUI$1);
28369
+ var __assign=function(){return (__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},StandardObjects={Base:{Actions:{standard_query:{visible:function(e,t,r){return !1}},standard_new:{visible:function(e,t,r){return "cms_files"!==e&&"instances"!==e&&(r?r.allowCreate:void 0)}},standard_edit:{visible:function(e,t,r){if(r)return r.allowEdit}},standard_delete:{visible:function(e,t,r){if(r)return r.allowDelete}},standard_import_data:{visible:function(e,t,r){var o=this.object;if(r)return r.allowCreate&&o.hasImportTemplates}},standard_approve:{visible:function(e,t,r){return !1}},standard_view_instance:{visible:function(e,t,r){return !1}},standard_submit_for_approval:{visible:function(e,t,r){return window.Steedos.ProcessManager.allowSubmit.apply(this,[e,t])},todo:function(e,t){return window.Steedos.ProcessManager.submit.apply(this,[e,t])}},standard_follow:{visible:function(e,t,r){return !1}},standard_delete_many:{visible:function(e,t,r){return !RegExp("\\w+/view/\\w+").test(location.pathname)&&(r?r.allowDelete:void 0)}},standard_export_excel:{visible:function(e,t,r){return !1}}}}},authRequest=function(e,t){var n=null;e=Steedos.absoluteUrl(e);try{var r=[{name:"Content-Type",value:"application/json"},{name:"Authorization",value:Steedos.getAuthorization()}],o={type:"get",url:e,dataType:"json",contentType:"application/json",beforeSend:function(t){if(r&&r.length)return r.forEach(function(e){return t.setRequestHeader(e.name,e.value)})},success:function(e){n=e;},error:function(e,t,r){var o,a;e.responseJSON&&e.responseJSON.error?(o=e.responseJSON.error,a=void(n={error:o}),a=o.reason||o.message||o,console.error(a)):console.error(e.responseJSON);}};return $.ajax(Object.assign({},o,t)),n}catch(e){console.error(e);}};function _extends(){return (_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r,o=arguments[t];for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);}return e}).apply(this,arguments)}const newFunctionComponent=a=>e=>{const[t,r]=useState(!0);var o=()=>{r(!1);};return has(e,"ref")||(window.SteedosUI.refs[e.name]={show:()=>{r(!0);},close:o}),React__default.createElement(a,_extends({visible:t,onCancel:o,onClose:o},{width:"70%",style:{width:"70%",maxWidth:"950px",minWidth:"480px"}},e))},newComponentRender=(r,o)=>(e,t)=>{e.name||(e.name=r+"-"+(e.name||"default")),(t=t||document.getElementById(`steedos-${r}-root-`+e.name))||((t=document.createElement("div")).setAttribute("id",`steedos-${r}-root-`+e.name),document.body.appendChild(t));e=React__default.createElement(newFunctionComponent(o),e);createRoot(t).render(e);},Modal=assign(newComponentRender("modal",Modal$1),{info:Modal$1.info,success:Modal$1.success,error:Modal$1.error,warning:Modal$1.warning,confirm:Modal$1.confirm}),Drawer=newComponentRender("drawer",Drawer$1),getGraphqlFieldsQuery=e=>{const t=["_id"];return e.push("record_permissions"),each(e,e=>{-1<e.indexOf(".")&&(e=e.split(".")[0]),t.push(""+e);}),""+t.join(" ")},getFindOneQuery=(e,t,r)=>{e=e.replace(/\./g,"_");r=getGraphqlFieldsQuery(r);let o="";t=[`id: "${t}"`];return `{record:${e}__findOne${o=0<t.length?`(${t.join(",")})`:o}{${r}}}`},SObject={getRecord:async(e,t,r)=>{return (await fetchAPI("/graphql",{method:"post",body:JSON.stringify({query:getFindOneQuery(e,t,r)})})).data.record},getUISchema:async(e,t)=>getUISchema(e,t)},canSaveFilter=e=>!(!e._id||e.owner!==getSteedosAuth()?.userId),ListView={showFilter:(e,{listView:t,data:r})=>{canSaveFilter(t),r.filters&&(r.filters=filtersToConditions(r.filters));},getVisibleFilter:(e,t)=>{return t||(canSaveFilter(e)?e.filters:void 0)},getQueryFilter:(e,t)=>{return canSaveFilter(e)?ListView.getVisibleFilter(e,t):isEmpty(t)?e.filters:[e.filters,"and",t]},getFirstListView:async e=>{e=await window.getUISchema(e);return _.first(_.sortBy(_.values(e.list_views),"sort_no"))}},Router={getAppPath({appId:e}){return "/app/"+e},getPagePath(){},getObjectListViewPath({appId:e,objectName:t,listViewName:r}){return `/app/${e}/${t}/grid/`+r},getObjectDetailPath({appId:e,objectName:t,recordId:r}){return `/app/${e}/${t}/view/`+r},getObjectRelatedViewPath({appId:e,masterObjectName:t,masterRecordId:r,objectName:o,foreignKey:a}){return `/app/${e}/${t}/${r}/${o}/grid?related_field_name=`+a}};var withModalWrap=function(t,e){return function(e){return React.createElement(t,e)}},render=function(e,t,r,o){e=withModalWrap(e),e=React.createElement(e,__assign({},t));return ReactDOM.render(e,r)};const safeRunFunction=(t,r,o,a)=>{try{let e=[];return isNil(r)||(e=isArray$3(r)?r:[r]),t.bind(a||{})(...e)}catch(e){return console.log(e),o}};function safeEval(js){try{return eval(js)}catch(e){console.error(e,js);}}const isExpression=function(e){var t,r;return "string"==typeof e&&(t=/^{{(function.+)}}$/,r=/^{{(.+=>.+)}}$/,!("string"!=typeof e||!e.match(/^{{(.+)}}$/)||e.match(t)||e.match(r)))},getMoment=()=>window.amisRequire?window.amisRequire("moment"):window.moment||void 0,getGlobalNowData=()=>{var e=new Date,t=getMoment();let r=t().utc(),o=(r.set("hours",0),r.set("minutes",0),r.set("seconds",0),r.set("milliseconds",0),r=r.toDate(),t());return o.set("year",1970),o.set("month",0),o.set("date",1),o.set("hours",o.hours()+o.utcOffset()/60),o.set("seconds",0),o.set("milliseconds",0),o=o.toDate(),{now:e,today:r,timeNow:o}},parseSingleExpression=function(t,e,r,o){var a,n;if(o&&Object.assign(o,getGlobalNowData()),n=function(e,t){return "#"!==t&&t?"string"==typeof t?_.get(e,t):void console.error("path has to be a string"):e||{}}(e=void 0===e?{}:e,function(e){return "string"!=typeof e||1===(e=e.split(".")).length?"#":(e.pop(),e.join("."))}(r))||{},"string"!=typeof t)return t;a="__G_L_O_B_A_L__",e="\n return "+t.substring(2,t.length-2).replace(/\bformData\b/g,JSON.stringify(e).replace(/\bglobal\b/g,a)).replace(/\bglobal\b/g,JSON.stringify(o)).replace(new RegExp("\\b"+a+"\\b","g"),"global").replace(/rootValue/g,JSON.stringify(n));try{return Function(e)()}catch(e){return console.log(e,t,r),t}};var Expression=Object.freeze({__proto__:null,isExpression:isExpression,getGlobalNowData:getGlobalNowData,parseSingleExpression:parseSingleExpression});const getCompatibleDefaultValueExpression=(express,multiple)=>{const reg=/^\{\w+(\.*\w+)*\}$/,reg2=/^{{[\s\S]*}}$/;let result=express;if(reg.test(express)&&(result=-1<express.indexOf("userId")||-1<express.indexOf("spaceId")||-1<express.indexOf("user.")||-1<express.indexOf("now")||-1<express.indexOf("today")||-1<express.indexOf("timeNow")?`{${express}}`.replace("{{","{{global."):`{${express}}`.replace("{{","{{formData."),multiple&&(result=result.replace(/\{\{(.+)\}\}/,"{{[$1]}}"))),reg2.test(express)&&(-1<express.indexOf("function")||-1<express.indexOf("=>"))){let regex=/\{\{([\s\S]*)\}\}/,matches=regex.exec(express);if(matches&&1<matches.length){let functionCode=matches[1];result=eval("("+functionCode+")")();}}return result},getFieldDefaultValue=(e,t)=>{if(!e)return null;let r=e.defaultValue;e._defaultValue&&(r=safeEval(`(${e._defaultValue})`)),isFunction$4(r)&&(r=safeRunFunction(r,[],null,{name:e.name})),_$1.isString(r)&&(r=getCompatibleDefaultValueExpression(r,e.multiple));var o=isExpression(r);switch(o&&("date"===e.type?r=r.replace(/\bglobal.now\b/g,"global.today"):"time"===e.type&&(r=r.replace(/\bglobal.now\b/g,"global.timeNow")),r=parseSingleExpression(r,{},"#",t)),e.type){case"select":var a=e.data_type||"text";!r||o||e.multiple||("text"!==a||isString(r)?"number"===a&&isString(r)?r=Number(r):"boolean"===a&&isString(r)&&(r="true"===r.toLowerCase()||"1"===r):r=String(r));break;case"number":isString(r)&&(r=Number(r));break;case"boolean":isString(r)?r="true"===r.toLowerCase()||"1"===r:isBoolean(r)||(r=!1);break;case"time":if(isDate(r))return moment(r).format("1970-01-01THH:mm:00.000[Z]");case"date":if(isDate(r))return moment(r).format("YYYY-MM-DDT00:00:00.000[Z]");case"datetime":if(isDate(r))return moment(r).format("YYYY-MM-DDTHH:mm:00.000Z")}return r};function getTreeOptions(t,e){const a=e?.valueField||"value",r=(e?.labelField,e?.unfoldedNum||1),o=[],n=(e,t,r,o)=>{return e.children&&"object"==typeof e.children[0]?e.children:r?(e=_.filter(t,e=>_.includes(r,e[a])),_.each(e,e=>{1<=o?(e.unfolded=!0,e.children&&(e.children=n(e,t,e.children,o-1))):e.children&&(e.children=n(e,t,e.children,o));}),e):void 0};for(var s=t,i=0;i<s.length;i++)if(s[i].noParent=0,s[i].unfolded=!1,s[i].parent){let e=1;for(var l=0;l<s.length;l++)s[i].parent==s[l][a]&&(e=0);1==e&&(s[i].noParent=1);}else s[i].noParent=1;return _.each(t,e=>{1==e.noParent&&(1<=r?(e.unfolded=!0,o.push(Object.assign({},e,{children:n(e,t,e.children,r-1)}))):o.push(Object.assign({},e,{children:n(e,t,e.children,r)})));}),o}function getClosestAmisComponentByType(t,r,o){let a=(o=o||{}).name;var e=o.direction||"up";let n=t.getComponents().find(function(e){return e.props.type===r&&(!a||e.props.name===a)});if(n)return n;if("down"===e){if(t.children&&t.children.length){for(let e=0;e<t.children.length&&!(n=getClosestAmisComponentByType(t.children[e],r,o));e++);return n}}else if("up"===e&&t.parent)return getClosestAmisComponentByType(t.parent,r,o)}function isFilterFormValuesEmpty(e){let t=!0;var e=_.pickBy(e,function(e,t){return /^__searchable__/g.test(t)});return _.isEmpty(e)||(e=_.omitBy(e,function(e){return _.isNil(e)||_.isObject(e)&&_.isEmpty(e)||_.isArray(e)&&_.isEmpty(e.filter(function(e){return !_.isNil(e)}))||_.isString(e)&&0===e.length}),_.isEmpty(e)||(t=!1)),t}const SteedosUI$1=Object.assign({},{render:render,Router:Router,ListView:ListView,Object:SObject,Modal:Modal,Drawer:Drawer,refs:{},getRef(e){return SteedosUI$1.refs[e]},router:{go:(e,t)=>{var r=window.FlowRouter;if(t)return r?r.go(t):window.open(t);r?r.reload():console.warn("暂不支持自动跳转",e);},reload:()=>{console.log("reload");}},message:message,notification:notification,components:{Button:Button,Space:Space},getRefId:({type:e,appId:t,name:r})=>{switch(e){case"listview":return `amis-${t}-${r}-listview`;case"form":return `amis-${t}-${r}-form`;case"detail":return `amis-${t}-${r}-detail`;default:return `amis-${t}-${r}-`+e}},reloadRecord:()=>{if(window.FlowRouter)return window.FlowRouter.reload()},getFieldDefaultValue:getFieldDefaultValue,getTreeOptions:getTreeOptions,getClosestAmisComponentByType:getClosestAmisComponentByType,isFilterFormValuesEmpty:isFilterFormValuesEmpty,getSearchFilter:e=>{var a=[];return _.each(e,(e,t)=>{var r,o;_.isEmpty(e)&&!_.isBoolean(e)||(_.startsWith(t,"__searchable__between__")?a.push([""+t.replace("__searchable__between__",""),"between",e]):_.startsWith(t,"__searchable__")&&(_.isString(e)?a.push([""+t.replace("__searchable__",""),"contains",e]):_.isObject(e)&&e.o?(o=[[(r=""+t.replace("__searchable__",""))+"/o","=",e.o]],e.ids.length&&o.push([r+"/ids","=",e.ids]),a.push(o)):a.push([""+t.replace("__searchable__",""),"=",e])));}),a},getKeywordsSearchFilter:(e,t)=>{const a=[];var n;return e&&t&&(n=e.split(/\s+/),n=compact(n),t.forEach(function(r,e){let o=[];1==n.length?o=[r,"contains",n[0]]:n.forEach(function(e,t){o.push([r,"contains",e]),t<n.length-1&&o.push("or");}),o.length&&(a.push(o),e<t.length-1&&a.push("or"));})),a},getFormulaVariables:(e,t=!0)=>{const r=[];return isEmpty(e)||(r.push({label:"表单字段",children:[]}),lodash.forEach(e,function(e){r[0].children.push({label:e.label,value:e.value});})),t&&r.push({label:"全局变量",children:[{label:"用户ID",value:"global['userId']"},{label:"工作区ID",value:"global['spaceId']"},{label:"用户",children:[{label:"姓名",value:"global['user']['name']"},{label:"邮件",value:"global['user']['email']"},{label:"语言",value:"global['user']['language']"},{label:"简档",value:"global['user']['profile']"},{label:"权限集",value:"global['user']['roles']"},{label:"主部门ID",value:"global['user']['organization']['_id']"},{label:"部门(含上级)",value:"global['user']['organizations_parents']"},{label:"主分部ID",value:"global['user']['company_id']"},{label:"分部(多选)",value:"global['user']['company_ids']"},{label:"人员ID",value:"global['user']['spaceUserId']"},{label:"是否是工作区管理员",value:"global['user']['is_space_admin']"}]}]}),r}});var _STANDARD_SPRITE_IDS="account,account_info,action_list_component,actions_and_buttons,activation_target,activations,address,agent_home,agent_session,aggregation_policy,all,announcement,answer_best,answer_private,answer_public,apex,apex_plugin,app,approval,apps,apps_admin,article,asset_action,asset_action_source,asset_audit,asset_downtime_period,asset_object,asset_relationship,asset_state_period,asset_warranty,assigned_resource,assignment,attach,avatar,avatar_loading,bot,bot_training,branch_merge,brand,budget,budget_allocation,bundle_config,bundle_policy,business_hours,buyer_account,buyer_group,calculated_insights,calibration,call,call_coaching,call_history,campaign,campaign_members,cancel_checkout,canvas,capacity_plan,care_request_reviewer,carousel,case,case_change_status,case_comment,case_email,case_log_a_call,case_milestone,case_transcript,case_wrap_up,catalog,category,change_request,channel_program_history,channel_program_levels,channel_program_members,channel_programs,chart,checkout,choice,client,cms,coaching,code_playground,code_set,code_set_bundle,collection,collection_variable,connected_apps,constant,contact,contact_list,contact_request,contract,contract_line_item,contract_payment,coupon_codes,currency,currency_input,custom,custom_component_task,custom_notification,customer_360,customer_lifecycle_analytics,customer_portal_users,customers,dashboard,dashboard_component,dashboard_ea,data_integration_hub,data_mapping,data_model,data_streams,datadotcom,dataset,date_input,date_time,decision,default,delegated_account,device,discounts,display_rich_text,display_text,document,document_reference,drafts,duration_downscale,dynamic_record_choice,education,einstein_replies,email,email_chatter,employee,employee_asset,employee_contact,employee_job,employee_job_position,employee_organization,empty,endorsement,entitlement,entitlement_policy,entitlement_process,entitlement_template,entity,entity_milestone,environment_hub,event,events,expense,expense_report,expense_report_entry,feed,feedback,field_sales,file,filter,filter_criteria,filter_criteria_rule,first_non_empty,flow,folder,forecasts,form,formula,fulfillment_order,generic_loading,global_constant,goals,group_loading,groups,guidance_center,hierarchy,high_velocity_sales,historical_adherence,holiday_operating_hours,home,household,identifier,immunization,incident,individual,insights,instore_locations,investment_account,invocable_action,iot_context,iot_orchestrations,javascript_button,job_family,job_position,job_profile,kanban,key_dates,knowledge,lead,lead_insights,lead_list,letterhead,lightning_component,lightning_usage,link,list_email,live_chat,live_chat_visitor,location,location_permit,log_a_call,logging,loop,macros,maintenance_asset,maintenance_plan,maintenance_work_rule,marketing_actions,med_rec_recommendation,med_rec_statement_recommendation,medication,medication_dispense,medication_ingredient,medication_reconciliation,medication_statement,merge,messaging_conversation,messaging_session,messaging_user,metrics,multi_picklist,multi_select_checkbox,network_contract,news,note,number_input,observation_component,omni_supervisor,operating_hours,opportunity,opportunity_contact_role,opportunity_splits,orchestrator,order_item,orders,outcome,output,partner_fund_allocation,partner_fund_claim,partner_fund_request,partner_marketing_budget,partners,password,past_chat,patient_medication_dosage,payment_gateway,people,performance,person_account,person_language,person_name,photo,picklist_choice,picklist_type,planogram,poll,portal,portal_roles,portal_roles_and_subordinates,post,practitioner_role,price_book_entries,price_books,pricebook,pricing_workspace,problem,procedure,procedure_detail,process,process_exception,product,product_consumed,product_consumed_state,product_item,product_item_transaction,product_quantity_rules,product_request,product_request_line_item,product_required,product_service_campaign,product_service_campaign_item,product_transfer,product_transfer_state,product_warranty_term,product_workspace,products,promotion_segments,promotions,promotions_workspace,propagation_policy,proposition,qualifications,question_best,question_feed,queue,quick_text,quip,quip_sheet,quotes,radio_button,read_receipts,recent,recipe,record,record_create,record_delete,record_lookup,record_signature_task,record_update,recycle_bin,related_list,relationship,reply_text,report,report_type,resource_absence,resource_capacity,resource_preference,resource_skill,restriction_policy,return_order,return_order_line_item,reward,rtc_presence,sales_cadence,sales_cadence_target,sales_channel,sales_path,sales_value,salesforce_cms,scan_card,schedule_objective,scheduling_constraint,scheduling_policy,screen,search,section,segments,selling_model,serialized_product,serialized_product_transaction,service_appointment,service_appointment_capacity_usage,service_contract,service_crew,service_crew_member,service_report,service_request,service_request_detail,service_resource,service_territory,service_territory_location,service_territory_member,service_territory_policy,settings,shift,shift_pattern,shift_pattern_entry,shift_preference,shift_scheduling_operation,shift_template,shift_type,shipment,skill,skill_entity,skill_requirement,slack,slider,sms,snippet,snippets,sobject,sobject_collection,social,solution,sort,sort_policy,sossession,stage,stage_collection,steps,store,store_group,story,strategy,survey,swarm_request,swarm_session,system_and_global_variable,tableau,task,task2,team_member,template,text,text_template,textarea,textbox,thanks,thanks_loading,timesheet,timesheet_entry,timeslot,today,toggle,topic,topic2,tour,tour_check,trailhead,trailhead_alt,travel_mode,unified_health_score,unmatched,user,user_role,variable,variation_attribute_setup,variation_products,video,visit_templates,visits,visualforce_page,voice_call,waits,warranty_term,webcart,work_capacity_limit,work_capacity_usage,work_contract,work_forecast,work_order,work_order_item,work_plan,work_plan_rule,work_plan_template,work_plan_template_entry,work_queue,work_step,work_step_template,work_type,work_type_group,workforce_engagement";const sldsIcons={standard:_STANDARD_SPRITE_IDS.split(",")};var organizationsTree={getSearchableFields:function(e){var a=["text","textarea","autonumber","url","email"];var n=[],s=e.context.uiSchema;return s&&_$1.each(s.fields,function(e){var t,r,o;t=e,r=s.NAME_FIELD_KEY,(o=!1!==(o=t.searchable)&&t.name===r?!0:o)&&-1<a.indexOf(t.type)&&n.push(e.name);}),n},getApiRequestAdaptor:function(e,t,r){var o="__keywords";if((r=void 0===r?{}:r).isLookup){if("loadOptions"===t.op)return a=[["_id","=",t.value]],Object.assign({},e,{method:"post",url:"/graphql",data:{query:"{rows:organizations(filters: "+JSON.stringify(a)+', top: 5000, skip: 0, sort: "sort_no desc"){_id,fullname,name,sort_no,_display:_ui{sort_no},parent,children}}'}});(r=t.__lookupField)?o="__keywords_lookup__".concat(r.name.replace(/\./g,"_"),"__to__").concat(r.reference_to):(o="",console.error("lookup字段快速搜索异常,作用域中未找到变量__lookupField"));}var t=this.getSearchableFields(e),a=[],n=JSON.parse(JSON.stringify(e.context)),r=SteedosUI$1.getSearchFilter(n)||[],r=(0<r.length&&(a=0<a.length?[a,"and",r]:r),t&&t.forEach(function(e){var t=n[e];_$1.isString(t)?a.push([e,"contains",t]):(_$1.isArray(t)||_$1.isBoolean(t)||t)&&a.push([e,"=",t]);}),SteedosUI$1.getKeywordsSearchFilter(n[o],t)),o=(r&&0<r.length&&a.push(r),e.data={},0<a.length&&Object.assign(e.data,{filters:JSON.stringify(a)}),e.body&&e.body.queryFields);return o&&Object.assign(e.data,{fields:o}),e.body.$self&&(e.body.$self.context&&e.body.$self.context.rootUrl,e.url="/service/api/organizations/root"),e},getApiAdaptor:function(e,t,r,o,a){return (a=void 0===a?{}:a).isLookup&&"loadOptions"===o.op?(a=_$1.map(e.data.rows,function(e){return delete e.children,delete e.parent,e}),e.data.rows=a):(o=r.data&&r.data.filters,e.data=__assign(__assign({},e.data),{isFilter:!!o}),e.data.__rootQueryFields=r.data&&r.data.fields,(e.data.rows||[]).forEach(function(e){e.__rootQueryFields=r.data&&r.data.fields;})),e},getDeferApiRequestAdaptor:function(e,t,r){var o=[],a=JSON.parse(JSON.stringify(e.context))._id,a=(a&&(o=[["parent","=",a]]),t&&t.__rootQueryFields||"_id,fullname,name,sort_no,hidden,_display:_ui{sort_no,hidden},parent,children");return Object.assign({},e,{data:{query:"{rows:organizations(filters: "+JSON.stringify(o)+', top: 5000, skip: 0, sort: "sort_no desc"){'+a+"}}"}})},getDeferApiAdaptor:function(e,t,r,o,a){var n=e.data;return n.children||(n.rows=n.rows.map(function(e){return e.defer=!(!e.children||!e.children.length),delete e.children,e}),n.children=n.rows,delete n.rows,delete n.count),e}},getBuilderContext=function(){return "undefined"==typeof window?{}:Builder.settings.context||Builder.settings},Steedos$1=__assign({resources:{sldsIcons:sldsIcons},organizationsTree:organizationsTree,getRootUrl:function(e){var t=getBuilderContext();return t.rootUrl||("undefined"!=typeof window?window.localStorage.getItem("steedos:rootUrl"):"")||e},absoluteUrl:function(e){return void 0===e&&(e=""),"".concat(Steedos$1.getRootUrl()).concat(e)},getTenantId:function(){try{var e=getBuilderContext().tenantId;return (e=window.location.search&&!e?new URLSearchParams(window.location.search).get("X-Space-Id"):e)?e:null}catch(e){console.error(e);}},getAuthorization:function(){try{var e=getBuilderContext(),t=e.tenantId,r=e.authToken;return t&&r?"Bearer ".concat(t,",").concat(r):null}catch(e){console.error(e);}},authRequest:authRequest,StandardObjects:StandardObjects},Expression);"undefined"!=typeof window&&(window.Steedos?window.Steedos=Object.assign(Steedos$1,window.Steedos):window.Steedos=Steedos$1),"undefined"!=typeof window&&(window.SteedosUI?window.SteedosUI=Object.assign(SteedosUI$1,window.SteedosUI):window.SteedosUI=SteedosUI$1);
28280
28370
 
28281
28371
  var index_esm = /*#__PURE__*/Object.freeze({
28282
- __proto__: null,
28283
- Steedos: Steedos$1,
28284
- SteedosUI: SteedosUI$1
28372
+ __proto__: null,
28373
+ Steedos: Steedos$1,
28374
+ SteedosUI: SteedosUI$1
28285
28375
  });
28286
28376
 
28287
28377
  export { AmisAppLauncher, AmisAppMenu, AmisGlobalFooter, AmisGlobalHeader, AmisGlobalHeaderToolbar, AmisInputTable, AmisInstanceDetail, index_esm$1 as AmisLib, AmisLogo, AmisObjectButton, AmisObjectCalendar, AmisObjectFieldLookup, AmisObjectForm, AmisObjectListView, AmisObjectTable, AmisProvider, AmisRecordDetail, AmisRecordDetailHeader, AmisRecordDetailMini, AmisRecordDetailRelatedList, AmisRecordDetailRelatedLists, AmisRecordService, AmisSelectFlow, AmisSelectUser, AmisSteedosField, AmisSteedosFieldGroup, AmisSteedosObject, FromNow, PageListView, PageObject, PageRecordDetail, SteedosBadge, SteedosBadgeRibbon, SteedosDropdown, SteedosDropdownButton, SteedosFieldAutonumber, SteedosFieldBoolean, SteedosFieldCode, SteedosFieldColor, SteedosFieldCurrency, SteedosFieldDate, SteedosFieldDatetime, SteedosFieldEmail, SteedosFieldFile, SteedosFieldFormula, SteedosFieldHtml, SteedosFieldImage, SteedosFieldLocation, SteedosFieldLookup, SteedosFieldMarkdown, SteedosFieldMasterDetail, SteedosFieldNumber, SteedosFieldPassword, SteedosFieldPercent, SteedosFieldSelect, SteedosFieldSet, SteedosFieldSummary, SteedosFieldText, SteedosFieldTextarea, SteedosFieldTime, SteedosFieldToggle, SteedosFieldUrl, SteedosIcon, index_esm as SteedosLib, SteedosLoading, SteedosObject, SteedosSkeleton };