@steedos-widgets/amis-object 3.6.4-beta.3 → 3.6.4-beta.5

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,5 +1,5 @@
1
1
  :root {
2
- --body-bg: #f9fafb;
2
+ --body-bg: white;
3
3
  --body-color: #181818;
4
4
  --body-size: 14px;
5
5
  --Page-main-bg: transparent;
@@ -425,13 +425,6 @@ fieldset.antd-Collapse > legend{
425
425
  z-index: 1400;
426
426
  }
427
427
 
428
- .ant-dropdown-menu {
429
- border: 1px solid #e5e5e5;
430
- border-radius: 0.25rem;
431
- padding: 0.25rem 0;
432
- box-shadow: 0 2px 3px 0 rgb(0 0 0 / 16%);
433
- }
434
-
435
428
  .ant-dropdown-menu-item {
436
429
  padding: 0;
437
430
  }
@@ -512,6 +505,9 @@ fieldset.antd-Collapse > legend{
512
505
  }
513
506
  }
514
507
 
508
+ .antd-DropDown-menu-root {
509
+ border: 1px solid #c9c9c9;
510
+ }
515
511
  /* @tailwind base; */
516
512
  .container {
517
513
  width: 100%
@@ -1410,12 +1406,6 @@ fieldset.antd-Collapse > legend{
1410
1406
  }
1411
1407
  }
1412
1408
 
1413
- .ant-dropdown-menu {
1414
- border: 1px solid #e5e5e5;
1415
- border-radius: 0.25rem;
1416
- padding: 0.25rem 0;
1417
- box-shadow: 0 2px 3px 0 rgb(0 0 0%);
1418
- }
1419
1409
  .ant-dropdown-menu-item .antd-Button.antd-Button--default {
1420
1410
  border: none;
1421
1411
  border-width: 0;
@@ -2646,9 +2636,61 @@ body.sidebar #sidebar {
2646
2636
  color: #000;
2647
2637
  }
2648
2638
 
2639
+ .steedos-input-table .steedos-delete-button:hover {
2640
+ color: rgb(239 68 68) !important;
2641
+ }
2649
2642
  .steedos-input-table .antd-DropDown-popover .antd-PopOver-overlay {
2650
2643
  display: none;
2651
2644
  }
2645
+ .steedos-input-table .antd-Table-table .antd-Table-placeholder {
2646
+ display: none;
2647
+ }
2648
+ .steedos-input-table .antd-Table-table thead > tr > th {
2649
+ border-right: none;
2650
+ }
2651
+ .steedos-input-table.steedos-show-index tbody tr td:nth-child(1) {
2652
+ text-align: center;
2653
+ }
2654
+ .steedos-input-table .antd-OperationField {
2655
+ width: 50px;
2656
+ }
2657
+ .steedos-input-table.steedos-show-index.steedos-has-operations thead tr th:nth-child(2),
2658
+ .steedos-input-table.steedos-show-index.steedos-has-operations tbody tr td:nth-child(2) {
2659
+ padding: 0;
2660
+ }
2661
+ .steedos-input-table.steedos-show-index.steedos-has-operations td .antd-OperationField {
2662
+ text-align: center;
2663
+ margin-left: -46px;
2664
+ position: relative;
2665
+ visibility: hidden;
2666
+ }
2667
+ .steedos-input-table.steedos-show-index.steedos-has-operations tbody tr:hover td .antd-OperationField {
2668
+ background-color: var(--Table-onHover-bg);
2669
+ visibility: visible;
2670
+ }
2671
+ .steedos-input-table.steedos-has-operations.steedos-tree-mode td .antd-OperationField {
2672
+ display: inline-flex;
2673
+ visibility: hidden;
2674
+ justify-content: center;
2675
+ }
2676
+ .steedos-input-table.steedos-has-operations.steedos-tree-mode tbody tr:hover td .antd-OperationField {
2677
+ display: inline-flex;
2678
+ visibility: visible;
2679
+ justify-content: center;
2680
+ }
2681
+ .steedos-input-table.steedos-has-operations thead tr th:nth-child(1),
2682
+ .steedos-input-table.steedos-has-operations tbody tr td:nth-child(1) {
2683
+ padding: 0;
2684
+ }
2685
+ .steedos-input-table.steedos-has-operations td .antd-OperationField {
2686
+ text-align: center;
2687
+ display: none;
2688
+ }
2689
+ .steedos-input-table.steedos-has-operations tbody tr:hover td .antd-OperationField {
2690
+ background-color: var(--Table-onHover-bg);
2691
+ display: inline-flex;
2692
+ justify-content: center;
2693
+ }
2652
2694
 
2653
2695
 
2654
2696
  .steedos-record-selected {
@@ -4834,7 +4834,8 @@ instance
4834
4834
  }
4835
4835
  });
4836
4836
 
4837
- async function getQuickEditSchema(field, options){
4837
+ async function getQuickEditSchema(object, columnField, options){
4838
+ let field = object.fields[columnField.name];
4838
4839
  //判断在amis3.2以上环境下,放开批量编辑与lookup的单元格编辑
4839
4840
  let isAmisVersionforBatchEdit = false;
4840
4841
  if(window.amisRequire && window.amisRequire('amis')){
@@ -5302,7 +5303,7 @@ function getFieldWidth(width){
5302
5303
  }
5303
5304
  }
5304
5305
 
5305
- async function getTableColumns$1(fields, options){
5306
+ async function getTableColumns$1(object, fields, options){
5306
5307
  const columns = [];
5307
5308
  if(!options.isLookup && !options.isInputTable){
5308
5309
  if(!options.enable_tree){
@@ -5316,7 +5317,7 @@ async function getTableColumns$1(fields, options){
5316
5317
  continue;
5317
5318
  }
5318
5319
  //增加quickEdit属性,实现快速编辑
5319
- const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
5320
+ const quickEditSchema = allowEdit ? await getQuickEditSchema(object, field, options) : allowEdit;
5320
5321
  let className = "";
5321
5322
  const bowserType = getBowserType();
5322
5323
  if(bowserType === "Safari"){
@@ -5830,7 +5831,7 @@ async function getTableOperation(ctx){
5830
5831
  "label": "xxx",
5831
5832
  "buttons": operationButtons,
5832
5833
  "placement": "bottomRight",
5833
- "overlayClassName": "shadow !min-w-[160px]",
5834
+ "overlayClassName": "border rounded !min-w-[160px]",
5834
5835
  "trigger": ["click"],
5835
5836
  "id": "u:c2140a365019",
5836
5837
  onOpenApi: {
@@ -5888,7 +5889,7 @@ async function getDefaultCrudCard(columns, options) {
5888
5889
  return card;
5889
5890
  }
5890
5891
 
5891
- async function getTableSchema$1(fields, options){
5892
+ async function getTableSchema$1(object, fields, options){
5892
5893
  if(!options){
5893
5894
  options = {};
5894
5895
  }
@@ -5910,7 +5911,7 @@ async function getTableSchema$1(fields, options){
5910
5911
  columns = await getMobileTableColumns(fields, options);
5911
5912
  }
5912
5913
  else {
5913
- columns = await getTableColumns$1(fields, options);
5914
+ columns = await getTableColumns$1(object, fields, options);
5914
5915
 
5915
5916
  if(listSchema.mode === "cards"){
5916
5917
  let card = listSchema.card;
@@ -8908,6 +8909,7 @@ const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
8908
8909
  type: "steedos-dropdown-button",
8909
8910
  label: "",
8910
8911
  buttons: moreButtons,
8912
+ "overlayClassName": "border rounded !min-w-[160px]",
8911
8913
  className: 'slds-icon ml-1',
8912
8914
  visibleOn: moreButtonsVisibleOn
8913
8915
  };
@@ -11998,7 +12000,7 @@ async function getObjectCRUD(objectSchema, fields, options){
11998
12000
  crudId: listSchema.id || id, enable_tree: objectSchema.enable_tree
11999
12001
  }, options);
12000
12002
  tableOptions.amisData = createObject(options.amisData || {}, {});
12001
- const table = await getTableSchema$1(fields, tableOptions);
12003
+ const table = await getTableSchema$1(objectSchema, fields, tableOptions);
12002
12004
  // delete table.mode;
12003
12005
  //image与avatar需要在提交修改时特别处理
12004
12006
  const imageNames = _$1__default["default"].compact(_$1__default["default"].map(_$1__default["default"].filter(fields, (field) => ["image","avatar"].includes(field.type)), 'name'));
@@ -12265,7 +12267,7 @@ async function getObjectForm(objectSchema, ctx){
12265
12267
  body: {
12266
12268
  type: 'wrapper',
12267
12269
  className: 'p-0 m-0',
12268
- body: await getFormBody(fields, formFields, Object.assign({}, ctx, {fieldGroups: objectSchema.field_groups})),
12270
+ body: await getFormBody(fields, formFields, Object.assign({}, ctx, {fieldGroups: objectSchema.field_groups, omitReadonlyFields: true})),
12269
12271
  hiddenOn: "${editFormInited != true}",
12270
12272
  },
12271
12273
  panelClassName:'m-0 sm:rounded-lg shadow-none border-none',
@@ -12873,8 +12875,8 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
12873
12875
  /*
12874
12876
  * @Author: baozhoutao@steedos.com
12875
12877
  * @Date: 2022-07-05 15:55:39
12876
- * @LastEditors: baozhoutao@steedos.com
12877
- * @LastEditTime: 2024-02-18 16:05:21
12878
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
12879
+ * @LastEditTime: 2024-02-23 16:37:06
12878
12880
  * @Description:
12879
12881
  */
12880
12882
 
@@ -13222,6 +13224,7 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
13222
13224
  let fields = [];
13223
13225
  for (const column of columns) {
13224
13226
  if (_$1.isString(column)) {
13227
+ let columnField;
13225
13228
  if (column.indexOf('.') > 0) {
13226
13229
  const fieldName = column.split('.')[0];
13227
13230
  const displayName = column.split('.')[1];
@@ -13229,23 +13232,30 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
13229
13232
  if (filedInfo && (filedInfo.type === 'lookup' || filedInfo.type === 'master_detail') && _$1.isString(filedInfo.reference_to)) {
13230
13233
  const rfUiSchema = await getUISchema(filedInfo.reference_to);
13231
13234
  const rfFieldInfo = rfUiSchema.fields[displayName];
13232
- fields.push(Object.assign({}, rfFieldInfo, { name: `${fieldName}__expand.${displayName}`, expand: true, expandInfo: { fieldName, displayName } }, ctx));
13235
+ columnField = Object.assign({}, rfFieldInfo, { name: `${fieldName}__expand.${displayName}`, expand: true, expandInfo: { fieldName, displayName } }, ctx);
13233
13236
  }else if(filedInfo && filedInfo.type === 'object'){
13234
- fields.push(uiSchema.fields[column]);
13237
+ columnField = uiSchema.fields[column];
13235
13238
  }
13236
13239
  } else {
13237
13240
  if (uiSchema.fields[column]) {
13238
- fields.push(Object.assign({}, uiSchema.fields[column], ctx));
13241
+ columnField = Object.assign({}, uiSchema.fields[column], ctx);
13239
13242
  }
13240
13243
  else if(ctx.extra){
13241
13244
  // 配置列表视图extra_columns时允许字段是hidden的,hidden的字段在uiSchema.fields中不存在
13242
- fields.push({
13245
+ columnField = {
13243
13246
  extra: true,
13244
13247
  name: column
13245
- });
13248
+ };
13246
13249
  }
13247
13250
  }
13251
+ if(columnField){
13252
+ // 列上的字段不认uiSchema.fields中定义的amis属性
13253
+ columnField = Object.assign({}, columnField, {amis: undefined});
13254
+ fields.push(columnField);
13255
+ }
13256
+
13248
13257
  } else if (_$1.isObject(column)) {
13258
+ let columnField;
13249
13259
  if (column.field.indexOf('.') > 0) {
13250
13260
  const fieldName = column.field.split('.')[0];
13251
13261
  const displayName = column.field.split('.')[1];
@@ -13253,33 +13263,34 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
13253
13263
  if (filedInfo && (filedInfo.type === 'lookup' || filedInfo.type === 'master_detail') && _$1.isString(filedInfo.reference_to)) {
13254
13264
  const rfUiSchema = await getUISchema(filedInfo.reference_to);
13255
13265
  const rfFieldInfo = rfUiSchema.fields[displayName];
13256
- fields.push(Object.assign({}, rfFieldInfo, ctx,
13266
+ columnField = Object.assign({}, rfFieldInfo, ctx,
13257
13267
  { name: `${fieldName}__expand.${displayName}`, expand: true, expandInfo: { fieldName, displayName } },
13258
13268
  {
13259
13269
  width: column.width,
13260
- wrap: column.wrap, // wrap = true 是没效果的
13261
- amis: column.amis
13270
+ wrap: column.wrap // wrap = true 是没效果的
13262
13271
  }
13263
- ));
13272
+ );
13264
13273
  }
13265
13274
  } else {
13266
13275
  if (uiSchema.fields[column.field]) {
13267
- fields.push(
13268
- Object.assign({}, uiSchema.fields[column.field], ctx, {
13269
- width: column.width,
13270
- wrap: column.wrap, // wrap = true 是没效果的
13271
- amis: column.amis
13272
- })
13273
- );
13276
+ columnField = Object.assign({}, uiSchema.fields[column.field], ctx, {
13277
+ width: column.width,
13278
+ wrap: column.wrap // wrap = true 是没效果的
13279
+ });
13274
13280
  }
13275
13281
  else if(ctx.extra){
13276
13282
  // 配置列表视图extra_columns时允许字段是hidden的,hidden的字段在uiSchema.fields中不存在
13277
- fields.push({
13283
+ columnField = {
13278
13284
  extra: true,
13279
13285
  name: column.field
13280
- });
13286
+ };
13281
13287
  }
13282
13288
  }
13289
+ if(columnField){
13290
+ // 列上的字段不认uiSchema.fields中定义的amis属性,用列上配置的amis覆盖
13291
+ columnField = Object.assign({}, columnField, {amis: column.amis});
13292
+ fields.push(columnField);
13293
+ }
13283
13294
  }
13284
13295
  }
13285
13296
  return fields;
@@ -13393,7 +13404,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
13393
13404
  };
13394
13405
  const content = {
13395
13406
  "type": "tabs",
13396
- "className": "steedos-record-tabs bg-white p-4 mt-3 border-y",
13407
+ "className": "steedos-record-tabs bg-white p-4 mt-2",
13397
13408
  "contentClassName": "bg-none",
13398
13409
  "tabs": [
13399
13410
  detailed
@@ -14609,7 +14620,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
14609
14620
  if(refObjectConfig.name === 'organizations'){
14610
14621
  labelFieldName = 'name';
14611
14622
  }
14612
- pickerSchema = await getTableSchema$1(tableFields, {
14623
+ pickerSchema = await getTableSchema$1(refObjectConfig, tableFields, {
14613
14624
  labelFieldName,
14614
14625
  top: top,
14615
14626
  isLookup: true,
@@ -15217,7 +15228,7 @@ async function getIdsPickerSchema(field, readonly, ctx){
15217
15228
  actions: false
15218
15229
  });
15219
15230
  }else {
15220
- pickerSchema = await getTableSchema$1(tableFields, {
15231
+ pickerSchema = await getTableSchema$1(refObjectConfig, tableFields, {
15221
15232
  labelFieldName: refObjectConfig.NAME_FIELD_KEY,
15222
15233
  top: top,
15223
15234
  isLookup: true,
@@ -16364,15 +16375,15 @@ var index = /*#__PURE__*/Object.freeze({
16364
16375
  /*
16365
16376
  * @Author: baozhoutao@steedos.com
16366
16377
  * @Date: 2022-05-26 16:02:08
16367
- * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
16368
- * @LastEditTime: 2023-11-29 17:48:27
16378
+ * @LastEditors: yinlianghui@hotoa.com yinlianghui@hotoa.com
16379
+ * @LastEditTime: 2024-02-25 14:13:10
16369
16380
  * @Description:
16370
16381
  */
16371
16382
 
16372
16383
  const getFieldSchemaArray = (formFields, ctx) => {
16373
16384
  let fieldSchemaArray = [];
16374
16385
  fieldSchemaArray.length = 0;
16375
- const recordId = ctx && ctx.recordId;
16386
+ ctx && ctx.recordId;
16376
16387
 
16377
16388
  _$1__namespace.forEach(formFields, (field) => {
16378
16389
  if (!field.group || field.group == 'null' || field.group == '-')
@@ -16385,9 +16396,7 @@ const getFieldSchemaArray = (formFields, ctx) => {
16385
16396
  }
16386
16397
 
16387
16398
  let forceHidden = false;
16388
- if(!recordId && field.readonly && !ctx.isEditor){
16389
- // 新建记录时,只读字段先隐藏,后续支持显示后,即任务:https://github.com/steedos/steedos-platform/issues/3164 完成后再放开
16390
- // 表单只读时所有字段都是readonly,设计器中如果forceHidden会造成整个表单在只读的时候显示为空白了,所以要排除掉
16399
+ if(ctx.omitReadonlyFields && field.readonly){
16391
16400
  forceHidden = true;
16392
16401
  }
16393
16402
 
@@ -16847,10 +16856,32 @@ async function getInputTableColumns(props) {
16847
16856
  // 实测过,直接不生成对应的隐藏column并不会对input-table值造成丢失问题,隐藏的列字段值能正常维护
16848
16857
 
16849
16858
  let fieldPrefix = props.fieldPrefix;
16850
- let fields = props.fields || [];
16859
+ let fields = _$1.cloneDeep(props.fields || []);
16851
16860
  if (fieldPrefix) {
16852
16861
  fields = getTableFieldsWithoutFieldPrefix(fields, fieldPrefix);
16853
16862
  }
16863
+ if (inlineEditMode == true) {
16864
+ let popOverContainerSelector = "";
16865
+ let popOverContainer = props.popOverContainer && props.popOverContainer();
16866
+ //获取到当前input-table所处的popOverContainer(可能是modal-dialog中),
16867
+ //给所有的下拉框字段配置popOverContainerSelector,使下拉框组件的弹出框挂载到当前dialog上,防止被dialog遮挡
16868
+ if (popOverContainer) {
16869
+ let classList = Array.prototype.slice.call(popOverContainer.parentElement.classList);
16870
+ if (classList.includes('amis-dialog-widget')) {
16871
+ popOverContainerSelector = '.' + classList.join('.') + ' .antd-Modal-content';
16872
+ }
16873
+ }
16874
+ fields.forEach(function (field) {
16875
+ //lookup存在下拉框模式;弹出模式用的是picker组件,不认popOverContainerSelector属性,所以统一加上
16876
+ if (field.type == "select" || field.type == "lookup") {
16877
+ field.amis = {
16878
+ ...field.amis,
16879
+ popOverContainerSelector
16880
+ };
16881
+ }
16882
+ });
16883
+ }
16884
+
16854
16885
  if (columns && columns.length) {
16855
16886
  return columns.map(function (column) {
16856
16887
  let field, extendColumnProps = {};
@@ -16900,7 +16931,7 @@ async function getInputTableColumns(props) {
16900
16931
  }
16901
16932
  else {
16902
16933
  return fields.map(function (field) {
16903
- let tableCell = getInputTableCell(field, showAsInlineEditMode);
16934
+ let tableCell = getInputTableCell(field, showAsInlineEditMode);
16904
16935
  tableCell.className = " whitespace-nowrap ";
16905
16936
  return tableCell;
16906
16937
  }) || [];
@@ -17867,7 +17898,7 @@ async function getButtonDelete(props) {
17867
17898
  return {
17868
17899
  "type": "dropdown-button",
17869
17900
  "level": "link",
17870
- "btnClassName": "text-gray-400",
17901
+ "btnClassName": "text-gray-400 steedos-delete-button",
17871
17902
  "icon": "fa fa-trash-alt",
17872
17903
  "size": "xs",
17873
17904
  "hideCaret": true,
@@ -18030,11 +18061,11 @@ const getAmisInputTableSchema = async (props) => {
18030
18061
  }
18031
18062
  };
18032
18063
  if (buttonsForColumnOperations.length) {
18033
- inputTableSchema.columns.push({
18064
+ inputTableSchema.columns.unshift({
18034
18065
  "name": "__op__",
18035
18066
  "type": "operation",
18036
18067
  "buttons": buttonsForColumnOperations,
18037
- "width": buttonsForColumnOperations.length > 1 ? "60px" : "20px"
18068
+ "width": 1
18038
18069
  });
18039
18070
  }
18040
18071
  // if (showAsInlineEditMode) {
@@ -18083,6 +18114,18 @@ const getAmisInputTableSchema = async (props) => {
18083
18114
  }
18084
18115
  let className = "steedos-input-table";
18085
18116
 
18117
+ if (props.showIndex) {
18118
+ className += " steedos-show-index";
18119
+ }
18120
+
18121
+ if (buttonsForColumnOperations.length) {
18122
+ className += " steedos-has-operations";
18123
+ }
18124
+
18125
+ if (props.enableTree) {
18126
+ className += " steedos-tree-mode";
18127
+ }
18128
+
18086
18129
  if (typeof props.className == "object") {
18087
18130
  className = {
18088
18131
  [className]: "true",
@@ -22414,9 +22457,9 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
22414
22457
  if (!appId) {
22415
22458
  appId = data.context.appId || 'admin';
22416
22459
  }
22417
- badgeText = "${ss:keyvalues.badge.value | pick:".concat(appId, " | toInt}");
22460
+ badgeText = "${keyvalues.badge.value | pick:".concat(appId, " | toInt}");
22418
22461
  if (appId == "approve_workflow") {
22419
- badgeText = "${ss:keyvalues.badge.value | pick:'workflow' | toInt}";
22462
+ badgeText = "${keyvalues.badge.value | pick:'workflow' | toInt}";
22420
22463
  }
22421
22464
  if (links) {
22422
22465
  return [2 /*return*/, {
@@ -22433,7 +22476,7 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
22433
22476
  schemaApi: {
22434
22477
  "method": "get",
22435
22478
  "url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus"),
22436
- "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 if(stacked){\n _.each(_.groupBy(payload.children, 'group'), (tabs, groupName) => {\n if (groupName === 'undefined' || groupName === '') {\n _.each(tabs, (tab) => {\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='fill-slate-500 whitespace-normal leading-6 block -ml-px no-underline group flex items-center text-[14px] rounded-md'><svg class=\"mr-1 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 \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index\n // active: selectedId === tab.id,\n })\n })\n } else {\n var tabGroup = _.find(tab_groups, {\"group_name\": groupName});\n data.nav.push({\n \"label\": groupName,\n \"unfolded\": tabGroup && tabGroup.default_open != false,\n \"isGroup\": true,\n \"children\": _.sortBy(_.map(tabs, (tab) => {\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='fill-slate-500 whitespace-normal leading-6 block -ml-px no-underline group flex items-center text-[14px] rounded-md'><svg class=\"mr-1 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 \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index\n // active: selectedId === tab.id,\n }\n }),(tab) => {return tab.index})\n }) \n }\n });\n \n }else{\n _.each(payload.children, (tab)=>{\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='fill-slate-500 whitespace-normal leading-6 block -ml-px no-underline group flex items-center text-[14px] rounded-md'><svg class=\"mr-1 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 \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index\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 payload.data = {\n \"type\":\"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": data.nav\n },\n \"id\": \"appMenuService\",\n \"body\":{\n \"type\": \"nav\",\n className: \"").concat(className, " text-black\",\n \"stacked\": ").concat(stacked, ",\n \"overflow\": ").concat(JSON.stringify(overflow), ",\n \"indentSize\": ").concat(indentSize, ",\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 } catch (error) {\n console.log(`error`, error)\n }\n // console.log('payload===2==>', payload)\n return payload;\n "),
22479
+ "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 if(stacked){\n _.each(_.groupBy(payload.children, 'group'), (tabs, groupName) => {\n if (groupName === 'undefined' || groupName === '') {\n _.each(tabs, (tab) => {\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='fill-slate-500 whitespace-normal leading-6 block -ml-px no-underline group flex items-center text-[14px] rounded-md'><svg class=\"mr-1 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 \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index\n // active: selectedId === tab.id,\n })\n })\n } else {\n var tabGroup = _.find(tab_groups, {\"group_name\": groupName});\n data.nav.push({\n \"label\": groupName,\n \"unfolded\": tabGroup && tabGroup.default_open != false,\n \"isGroup\": true,\n \"children\": _.sortBy(_.map(tabs, (tab) => {\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='fill-slate-500 whitespace-normal leading-6 block -ml-px no-underline group flex items-center text-[14px] rounded-md'><svg class=\"mr-1 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 \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index\n // active: selectedId === tab.id,\n }\n }),(tab) => {return tab.index})\n }) \n }\n });\n \n }else{\n _.each(payload.children, (tab)=>{\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='fill-slate-500 whitespace-normal leading-6 block -ml-px no-underline group flex items-center text-[14px] rounded-md'><svg class=\"mr-1 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 \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\",\n \"index\": tab.index\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 payload.data = {\n \"type\":\"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": data.nav,\n \"keyvalues\": \"${ss:keyvalues}\"\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 \"type\": \"nav\",\n className: \"").concat(className, " text-black\",\n \"stacked\": ").concat(stacked, ",\n \"overflow\": ").concat(JSON.stringify(overflow), ",\n \"indentSize\": ").concat(indentSize, ",\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 } catch (error) {\n console.log(`error`, error)\n }\n // console.log('payload===2==>', payload)\n return payload;\n "),
22437
22480
  "headers": {
22438
22481
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
22439
22482
  }
@@ -22552,6 +22595,7 @@ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0
22552
22595
  },
22553
22596
  {
22554
22597
  "type": "dropdown-button",
22598
+ "visibleOn": "${window:innerWidth > 768}",
22555
22599
  "label": false,
22556
22600
  "trigger": "click",
22557
22601
  "level": "link",
@@ -24022,7 +24066,7 @@ var AmisInputTable = function (props) { return __awaiter(void 0, void 0, void 0,
24022
24066
  return __generator(this, function (_a) {
24023
24067
  switch (_a.label) {
24024
24068
  case 0:
24025
- props.$schema, props.fields, props.name, props.id, props.data, props.columns, props.amis, props.className, props.tableClassName, props.headerToolbar, props.footerToolbar, props.inlineEditMode, props.strictMode, props.dialog, props.primaryKey, props.showOperation, props.fieldPrefix, props.autoGeneratePrimaryKeyValue, props.mode, props.disabledOn, props.disabled, props.visibleOn, props.visible, props.hiddenOn, props.hidden, props.enableDialog;
24069
+ props.$schema, props.fields, props.name, props.id, props.data, props.columns, props.amis, props.className, props.tableClassName, props.headerToolbar, props.footerToolbar, props.inlineEditMode, props.strictMode, props.dialog, props.primaryKey, props.showOperation, props.fieldPrefix, props.autoGeneratePrimaryKeyValue, props.mode, props.disabledOn, props.disabled, props.visibleOn, props.visible, props.hiddenOn, props.hidden, props.enableDialog, props.enableTree;
24026
24070
  extendProps = {};
24027
24071
  if (props.disabledOn || props.disabled) {
24028
24072
  extendProps["addable"] = false;