@steedos-widgets/amis-object 1.2.32 → 1.2.34

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.
@@ -360,18 +360,15 @@ fieldset.antd-Collapse > legend{
360
360
  .right-4 {
361
361
  right: 1rem
362
362
  }
363
- .bottom-0 {
364
- bottom: 0px
365
- }
366
363
  .top-0 {
367
364
  top: 0px
368
365
  }
369
- .z-20 {
370
- z-index: 20
371
- }
372
366
  .z-40 {
373
367
  z-index: 40
374
368
  }
369
+ .z-20 {
370
+ z-index: 20
371
+ }
375
372
  .z-10 {
376
373
  z-index: 10
377
374
  }
@@ -496,12 +493,12 @@ fieldset.antd-Collapse > legend{
496
493
  .h-12 {
497
494
  height: 3rem
498
495
  }
499
- .h-16 {
500
- height: 4rem
501
- }
502
496
  .h-10 {
503
497
  height: 2.5rem
504
498
  }
499
+ .\!h-10 {
500
+ height: 2.5rem !important
501
+ }
505
502
  .h-\[50px\] {
506
503
  height: 50px
507
504
  }
@@ -544,6 +541,9 @@ fieldset.antd-Collapse > legend{
544
541
  .w-10 {
545
542
  width: 2.5rem
546
543
  }
544
+ .\!w-10 {
545
+ width: 2.5rem !important
546
+ }
547
547
  .w-auto {
548
548
  width: auto
549
549
  }
@@ -632,9 +632,6 @@ fieldset.antd-Collapse > legend{
632
632
  .justify-between {
633
633
  justify-content: space-between
634
634
  }
635
- .justify-evenly {
636
- justify-content: space-evenly
637
- }
638
635
  .gap-x-3 {
639
636
  -moz-column-gap: 0.75rem;
640
637
  column-gap: 0.75rem
@@ -751,6 +748,9 @@ fieldset.antd-Collapse > legend{
751
748
  .fill-slate-500 {
752
749
  fill: #64748b
753
750
  }
751
+ .\!fill-slate-500 {
752
+ fill: #64748b !important
753
+ }
754
754
  .fill-gray-500 {
755
755
  fill: #6b7280
756
756
  }
@@ -814,9 +814,6 @@ fieldset.antd-Collapse > legend{
814
814
  .pl-1 {
815
815
  padding-left: 0.25rem
816
816
  }
817
- .pl-0 {
818
- padding-left: 0px
819
- }
820
817
  .pr-4 {
821
818
  padding-right: 1rem
822
819
  }
@@ -1169,6 +1166,11 @@ fieldset.antd-Collapse > legend{
1169
1166
  .steedos-record-detail-related-lists .steedos-record-related-list .steedos-object-table .antd-Table-footToolbar {
1170
1167
  display: none;
1171
1168
  }
1169
+ }
1170
+ .steedos-select-user > .antd-Form {
1171
+ margin-left: -200px;
1172
+ }
1173
+ @media (max-width: 576px) {
1172
1174
  .antd-Crud-toolbar {
1173
1175
  flex-basis: 0;
1174
1176
  flex-grow: 1;
@@ -1287,6 +1289,9 @@ fieldset.antd-Collapse > legend{
1287
1289
  -moz-column-gap: 1rem;
1288
1290
  column-gap: 1rem;
1289
1291
  }
1292
+ .steedos-object-form .steedos-markdown .antd-Tabs-pane.is-active {
1293
+ display: block;
1294
+ }
1290
1295
  }
1291
1296
 
1292
1297
  @media (max-width: 767px) {
@@ -1413,11 +1418,18 @@ fieldset.antd-Collapse > legend{
1413
1418
  height: unset;
1414
1419
  }
1415
1420
 
1421
+ #steedosGlobalFooterRoot .antd-Nav {
1422
+ height: 4rem;
1423
+ position: fixed;
1424
+ bottom: 0;
1425
+ z-index: 20;
1426
+ width: 100%;
1427
+ }
1416
1428
  .steedos-global-footer {
1417
1429
  border-top: 1px solid rgb(203 213 225);
1418
1430
  }
1419
- .steedos-global-footer.antd-Nav-Menu-horizontal > .antd-Nav-Menu-item-tooltip-wrap > .antd-Nav-Menu-item,
1420
- .steedos-global-footer.antd-Nav-Menu-horizontal > .antd-Nav-Menu-overflow-item > .antd-Nav-Menu-submenu-title {
1431
+ .steedos-global-footer .antd-Nav-Menu-item-tooltip-wrap > .antd-Nav-Menu-item,
1432
+ .steedos-global-footer .antd-Nav-Menu-overflow-item > .antd-Nav-Menu-submenu-title {
1421
1433
  padding-bottom: 5px;
1422
1434
  padding-left: 0;
1423
1435
  padding-right: 0;
@@ -1451,6 +1463,9 @@ fieldset.antd-Collapse > legend{
1451
1463
  .steedos-global-footer-popup .antd-Nav-Menu-item-wrap {
1452
1464
  align-items: center;
1453
1465
  }
1466
+ .steedos-global-footer-popup .antd-Nav-Menu-item-link {
1467
+ max-width: unset;
1468
+ }
1454
1469
  .steedos-global-footer .antd-Nav-Menu-submenu-title {
1455
1470
  height: 100% !important;
1456
1471
  display: flex;
@@ -1462,8 +1477,9 @@ fieldset.antd-Collapse > legend{
1462
1477
  .steedos-global-footer-popup {
1463
1478
  width: 100%;
1464
1479
  top: 54px !important;
1465
- bottom: 64px;
1466
- position: fixed;
1480
+ bottom: 64px !important;
1481
+ left: 0 !important;
1482
+ position: fixed !important;
1467
1483
  }
1468
1484
  .steedos-global-footer-popup .antd-Nav-Menu {
1469
1485
  height: 100%;
@@ -1486,6 +1502,8 @@ fieldset.antd-Collapse > legend{
1486
1502
  }
1487
1503
  .steedos-global-footer-root .antd-Nav-Menu-horizontal.antd-Nav-Menu-light {
1488
1504
  background-color: rgb(243 244 246);
1505
+ justify-content: space-evenly;
1506
+ height: 100%;
1489
1507
  }
1490
1508
  @media (max-width: 767px) {
1491
1509
  .steedos-object-listview .antd-Table-content {
@@ -8281,7 +8281,8 @@ const getSettingListviewToolbarButtonSchema = ()=>{
8281
8281
  "type": "dropdown-button",
8282
8282
  "trigger": "click",
8283
8283
  "icon": "fa fa-cog",
8284
- "tooltip": instance.t('frontend_button_listview_control_tooltip'),
8284
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
8285
+ // "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
8285
8286
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded border-gray-300 text-gray-500",
8286
8287
  "align": "right",
8287
8288
  "visibleOn": "${!isLookup}",
@@ -8321,11 +8322,12 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
8321
8322
  "rightIconClassName": "m-l-sm"
8322
8323
  }
8323
8324
  ];
8324
- const displayAsLabel = displayAs === 'split'? instance.t('frontend_display_type_is_split') : instance.t('frontend_display_type_is_table');
8325
+ displayAs === 'split'? instance.t('frontend_display_type_is_split') : instance.t('frontend_display_type_is_table');
8325
8326
  return {
8326
8327
  "type": "dropdown-button",
8327
8328
  "icon": "fa fa-table-columns",
8328
- "tooltip": `${instance.t('frontend_display_as')} ${displayAsLabel}`,
8329
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
8330
+ // "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
8329
8331
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded border-gray-300 text-gray-500",
8330
8332
  "align": "right",
8331
8333
  "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
@@ -8407,7 +8409,8 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
8407
8409
  // "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页
8408
8410
  "type": "button",
8409
8411
  "align": "right",
8410
- "tooltip": instance.t('frontend_button_reload_tooltip'),
8412
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
8413
+ // "tooltip": i18next.t('frontend_button_reload_tooltip'),
8411
8414
  "tooltipPlacement": "top",
8412
8415
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
8413
8416
  "label": "",
@@ -8429,7 +8432,8 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
8429
8432
  "icon": "fa fa-search",
8430
8433
  "type": "button",
8431
8434
  "tooltipPlacement": "top",
8432
- "tooltip": instance.t('frontend_button_search_tooltip'),
8435
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
8436
+ // "tooltip": i18next.t('frontend_button_search_tooltip'),
8433
8437
  "badge": {
8434
8438
  "offset": [
8435
8439
  -5,
@@ -8474,7 +8478,9 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
8474
8478
  {
8475
8479
  "type": "reload",
8476
8480
  "align": "right",
8477
- "tooltip": instance.t('frontend_button_reload_tooltip'),
8481
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
8482
+ // "tooltip": i18next.t('frontend_button_reload_tooltip'),
8483
+ "tooltip":"",
8478
8484
  "tooltipPlacement": "top",
8479
8485
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500"
8480
8486
  },
@@ -8484,8 +8490,9 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
8484
8490
  filterVisible ? {
8485
8491
  "label": instance.t('frontend_button_search_tooltip'),
8486
8492
  "icon": "fa fa-search",
8487
- "tooltip": instance.t('frontend_button_search_tooltip'),
8488
- "tooltipPlacement": "top",
8493
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
8494
+ // "tooltip": i18next.t('frontend_button_search_tooltip'),
8495
+ // "tooltipPlacement": "top",
8489
8496
  "type": "button",
8490
8497
  "badge": {
8491
8498
  "offset": [
@@ -8591,9 +8598,16 @@ async function getSource(field, ctx) {
8591
8598
  valueField = `${ctx.fieldNamePrefix}${valueField}`;
8592
8599
  }
8593
8600
  data.$value = `$${valueField}`;
8594
- // data["&"] = "$$";
8601
+ data['$'] = `$$`;
8595
8602
  const requestAdaptor = `
8596
8603
  var filters = [['parent', '=', null]];
8604
+ const filtersFunction = ${field.filtersFunction || field._filtersFunction};
8605
+ if(filtersFunction){
8606
+ const _filters = filtersFunction(filters, api.data.$);
8607
+ if(_filters && _filters.length > 0){
8608
+ filters.push(_filters);
8609
+ }
8610
+ }
8597
8611
  api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters));
8598
8612
  var defaultValue = api.data.$value;
8599
8613
  var optionsFiltersOp = "${field.multiple ? "in" : "="}";
@@ -8791,7 +8805,7 @@ function getLookupSapceUserTreeSchema(){
8791
8805
  const tree = [{
8792
8806
  "type": "input-tree",
8793
8807
  "className": "",
8794
- "inputClassName": "pl-0",
8808
+ "inputClassName": "p-0",
8795
8809
  "id": "u:7fd77b7915b0",
8796
8810
  "source": {
8797
8811
  "method": "post",
@@ -8852,7 +8866,7 @@ function getLookupSapceUserTreeSchema(){
8852
8866
  "left": "-200px",
8853
8867
  "width": "190px",
8854
8868
  "bottom": 0,
8855
- "top": "-14px",
8869
+ "top": "2px",
8856
8870
  "overflow": "auto",
8857
8871
  "min-height":"300px"
8858
8872
  },
@@ -9118,7 +9132,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
9118
9132
  "margin-left":"200px",
9119
9133
  "min-height": "300px"
9120
9134
  };
9135
+ pickerSchema.className = pickerSchema.className || "" + " steedos-select-user";
9121
9136
  }
9137
+
9122
9138
  pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, ctx.formFactor, { headerToolbarItems });
9123
9139
  const isAllowCreate = refObjectConfig.permissions.allowCreate;
9124
9140
  if (isAllowCreate) {
@@ -9215,6 +9231,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
9215
9231
  modalTitle: instance.t('frontend_form_please_select') + " " + refObjectConfig.label,
9216
9232
  labelField: referenceTo.labelField.name,
9217
9233
  valueField: referenceTo.valueField.name,
9234
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
9235
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
9218
9236
  modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
9219
9237
  source: source,
9220
9238
  size: "lg",
@@ -9395,6 +9413,8 @@ async function lookupToAmisSelect(field, readonly, ctx){
9395
9413
  joinValues: false,
9396
9414
  extractValue: true,
9397
9415
  clearable: true,
9416
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
9417
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
9398
9418
  // labelField: labelField,
9399
9419
  // valueField: valueField,
9400
9420
  source: apiInfo,
@@ -9579,6 +9599,8 @@ async function getIdsPickerSchema(field, readonly, ctx){
9579
9599
  valueField: referenceTo.valueField.name,
9580
9600
  modalMode: 'dialog',
9581
9601
  source: source,
9602
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
9603
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
9582
9604
  size: "lg",
9583
9605
  pickerSchema: pickerSchema,
9584
9606
  joinValues: false,
@@ -9607,7 +9629,7 @@ async function getIdsPickerSchema(field, readonly, ctx){
9607
9629
  * @Author: baozhoutao@steedos.com
9608
9630
  * @Date: 2023-01-13 17:27:54
9609
9631
  * @LastEditors: liaodaxue
9610
- * @LastEditTime: 2023-06-30 10:29:52
9632
+ * @LastEditTime: 2023-07-24 15:23:12
9611
9633
  * @Description:
9612
9634
  */
9613
9635
 
@@ -9629,21 +9651,39 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
9629
9651
  }
9630
9652
  }else {
9631
9653
  return {
9632
- "type": "group",
9654
+ "type": "control",
9655
+ "label": field.label,
9633
9656
  "body": [
9634
9657
  {
9635
- "type": "editor",
9636
- "name": field.name,
9637
- "language": "markdown",
9638
- },
9639
- {
9640
- "type": "markdown",
9641
- "name": field.name,
9642
- "options": {
9643
- "linkify": true,
9644
- "html": true,
9645
- "breaks": true
9646
- }
9658
+ "type": "tabs",
9659
+ "tabsMode": "strong",
9660
+ "className": "steedos-markdown",
9661
+ "tabs": [
9662
+ {
9663
+ "title": "Write",
9664
+ "tab": [
9665
+ {
9666
+ "type": "editor",
9667
+ "name": field.name,
9668
+ "language": "markdown",
9669
+ }
9670
+ ]
9671
+ },
9672
+ {
9673
+ "title": "Preview",
9674
+ "tab": [
9675
+ {
9676
+ "type": "markdown",
9677
+ "name": field.name,
9678
+ "options": {
9679
+ "linkify": true,
9680
+ "html": true,
9681
+ "breaks": true
9682
+ }
9683
+ }
9684
+ ]
9685
+ }
9686
+ ]
9647
9687
  }
9648
9688
  ]
9649
9689
  }
@@ -10589,26 +10629,45 @@ async function getQuickEditSchema(field, options){
10589
10629
  let labelField = quickEditSchema.body[0].labelField || "label";
10590
10630
  let valueField = quickEditSchema.body[0].valueField || "value";
10591
10631
  if (field.multiple) {
10632
+ /*
10633
+ 多选分两种情况。
10634
+ 第一种是减少选项时(判断新的数据是否比老的数据短),按照index删除_display中对应选项,保证回显没问题;
10635
+ 第二种是增加选项时,按照value的值,找到对应选项,并按照_display的规则为其赋值
10636
+ */
10592
10637
  TempDisplayField = `
10638
+ const preData = event.data.__super.${field.name};
10639
+ if(preData && event.data.${field.name}.length < preData.length){
10640
+ let deletedIndex;
10641
+ preData.forEach(function(item,index){
10642
+ if(_.indexOf(event.data.${field.name}, item) == -1) _display["${field.name}"].splice(index, 1);
10643
+ })
10644
+ }else{
10593
10645
  _display["${field.name}"] = [];
10594
- event.data.selectedItems.forEach(function(item,index){
10646
+ event.data.value.forEach(function(val,index){
10647
+ const item = _.find(event.data.selectedItems, { ${valueField}: val });
10595
10648
  _display["${field.name}"].push(
10596
10649
  {
10597
10650
  "label": item.${labelField},
10598
- "value": item.${valueField},
10651
+ "value": item[event.data.uiSchema.idFieldName],
10599
10652
  "objectName": "${field.reference_to}"
10600
10653
  }
10601
10654
  )
10602
10655
  })
10603
- `;
10656
+ }
10657
+
10658
+ `;
10604
10659
  } else {
10605
10660
  TempDisplayField = `
10661
+ if(event.data.value){
10606
10662
  _display["${field.name}"] = {
10607
10663
  "label": event.data.selectedItems.${labelField},
10608
- "value": event.data.selectedItems.${valueField},
10664
+ "value": event.data.selectedItems[event.data.uiSchema.idFieldName],
10609
10665
  "objectName": "${field.reference_to}"
10610
10666
  }
10611
- `;
10667
+ }else{
10668
+ _display["${field.name}"] = {}
10669
+ }
10670
+ `;
10612
10671
  }
10613
10672
  quickEditSchema.body[0].onEvent["change"] = quickEditOnEvent(TempDisplayField);
10614
10673
  break;
@@ -10718,10 +10777,25 @@ async function getQuickEditSchema(field, options){
10718
10777
  return quickEditSchema;
10719
10778
  }
10720
10779
 
10780
+ function getFieldWidth(width){
10781
+ const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
10782
+ if(typeof width == 'string'){
10783
+ if(isNaN(width)){
10784
+ return width;
10785
+ }else {
10786
+ return Number(width);
10787
+ }
10788
+ }else if(typeof width == 'number'){
10789
+ return width;
10790
+ }else {
10791
+ return defaultWidth;
10792
+ }
10793
+ }
10794
+
10721
10795
  async function getTableColumns$1(fields, options){
10722
10796
  const columns = [{name: '_index',type: 'text', width: 32, placeholder: ""}];
10723
10797
  const allowEdit = options.permissions?.allowEdit && options.permissions?.modifyAllRecords && !options.isLookup && options.enable_inline_edit != false;
10724
- const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
10798
+
10725
10799
  for (const field of fields) {
10726
10800
  //增加quickEdit属性,实现快速编辑
10727
10801
  const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
@@ -10769,7 +10843,7 @@ async function getTableColumns$1(fields, options){
10769
10843
  type: "switch",
10770
10844
  name: field.name,
10771
10845
  label: field.label,
10772
- width: field.width || defaultWidth,
10846
+ width: getFieldWidth(field.width),
10773
10847
  toggled: field.toggled,
10774
10848
  static: true,
10775
10849
  className:"whitespace-nowrap",
@@ -10780,7 +10854,7 @@ async function getTableColumns$1(fields, options){
10780
10854
  type: "switch",
10781
10855
  name: field.name,
10782
10856
  label: field.label,
10783
- width: field.width || defaultWidth,
10857
+ width: getFieldWidth(field.width),
10784
10858
  toggled: field.toggled,
10785
10859
  quickEdit: quickEditSchema,
10786
10860
  static: true,
@@ -10800,7 +10874,7 @@ async function getTableColumns$1(fields, options){
10800
10874
  label: field.label,
10801
10875
  map: map,
10802
10876
  sortable: field.sortable,
10803
- width: field.width || defaultWidth,
10877
+ width: getFieldWidth(field.width),
10804
10878
  toggled: field.toggled,
10805
10879
  className,
10806
10880
  static: true,
@@ -10834,7 +10908,7 @@ async function getTableColumns$1(fields, options){
10834
10908
  label: field.label,
10835
10909
  sortable: field.sortable,
10836
10910
  // searchable: field.searchable,
10837
- width: field.width || defaultWidth,
10911
+ width: getFieldWidth(field.width),
10838
10912
  type: type,
10839
10913
  tpl: tpl,
10840
10914
  toggled: field.toggled,
@@ -11132,14 +11206,7 @@ async function getTableOperation(ctx){
11132
11206
  onOpenApi: {
11133
11207
  url: `\${context.rootUrl}/service/api/@\${objectName}/recordPermissions/\${_id}`,
11134
11208
  method: "get",
11135
- data: {
11136
- $: "$$",
11137
- objectName: "${objectName}",
11138
- listViewId: "${listViewId}",
11139
- appId: "${appId}",
11140
- formFactor: "${formFactor}",
11141
- context: `\${context}`
11142
- },
11209
+ requestAdaptor: "api.data={}; return api;",
11143
11210
  headers: {
11144
11211
  Authorization: "Bearer ${context.tenantId},${context.authToken}"
11145
11212
  },
@@ -17834,7 +17901,7 @@ var AmisRecordDetailRelatedList = function (props) { return __awaiter(void 0, vo
17834
17901
  return [4 /*yield*/, getRecordDetailRelatedListSchema(objectApiName, recordId, relatedObjectApiName, relatedKey, { top: top, perPage: perPage, appId: appId, relatedLabel: relatedLabel, className: className, formFactor: formFactor, columns: columns, sort: sort, filters: filters, visible_on: visible_on, isRelated: true, hiddenEmptyTable: hiddenEmptyTable, requestAdaptor: requestAdaptor, adaptor: adaptor })];
17835
17902
  case 1:
17836
17903
  schema = (_c.sent()).amisSchema;
17837
- schema.data = Object.assign(schema.data, formData);
17904
+ schema.data = Object.assign(schema.data || {}, formData);
17838
17905
  if (___default.has(props, "recordId") && $schema.recordId !== "${recordId}") {
17839
17906
  schema.data = Object.assign(schema.data, {
17840
17907
  _master: {
@@ -18363,15 +18430,14 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
18363
18430
  * @Description:
18364
18431
  */
18365
18432
  var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
18366
- var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, className1, schema;
18433
+ var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, schema;
18367
18434
  return __generator(this, function (_e) {
18368
18435
  _a = props.stacked, stacked = _a === void 0 ? false : _a, overflow = props.overflow, appId = props.appId, data = props.data, _b = props.links, links = _b === void 0 ? null : _b, _c = props.showIcon, showIcon = _c === void 0 ? true : _c, _d = props.indentSize, indentSize = _d === void 0 ? 12 : _d, selectedId = props.selectedId;
18369
18436
  if (!appId) {
18370
18437
  appId = data.context.appId || 'admin';
18371
18438
  }
18372
18439
  isMobile = window.innerWidth <= 768;
18373
- className = 'fixed bottom-0 z-20 flex justify-evenly w-full h-16 bg-gray-100 steedos-global-footer';
18374
- className1 = 'fixed bottom-0 z-20 flex justify-center w-full h-16 bg-gray-100 steedos-global-footer';
18440
+ className = 'steedos-global-footer';
18375
18441
  schema = {};
18376
18442
  if (links) {
18377
18443
  schema = {
@@ -18380,7 +18446,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
18380
18446
  body: [
18381
18447
  {
18382
18448
  "type": "nav",
18383
- "className": links.length == 1 ? "".concat(className1) : "".concat(className),
18449
+ "className": className,
18384
18450
  "stacked": stacked,
18385
18451
  "overflow": overflow,
18386
18452
  "indentSize": indentSize,
@@ -18396,7 +18462,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
18396
18462
  schemaApi: {
18397
18463
  "method": "get",
18398
18464
  "url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
18399
- "adaptor": "\n try {\n if(payload.children.length == 0){\n payload.data = {};\n return payload\n }\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n const locationPathname = window.location.pathname;\n var customTabId = \"\";\n var objectTabId = \"\";\n let sum = 0;\n _.each(payload.children, (tab)=>{\n sum++;\n const classIcon = tab.icon.replace(/_/g,\"-\");\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n if(sum >= 5){\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg><span>${tab.name}</span><i class=\"fa fa-angle-right\" aria-hidden=\"true\" style=\"position: absolute;right: 20px;color: #bababa;\"></i></span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\"\n });\n }else{\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 truncate text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg><span class=\"truncate\" style=\"max-width: 20vw\">${tab.name}</span></span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\"\n });\n }\n })\n\n payload.data = {\n \"type\": \"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": data.nav\n },\n \"id\": \"footerService\",\n \"body\": {\n \"type\": \"nav\",\n className: payload.children.length ==1 ? '").concat(className1, "' : '").concat(className, "',\n \"stacked\": ").concat(stacked, ",\n \"overflow\": {\n \"enable\": true,\n \"maxVisibleCount\": 4,\n \"overflowPopoverClassName\": \"steedos-global-footer-popup\",\n \"overflowLabel\":{\n \"type\": 'tpl',\n \"tpl\": `<span class='fill-slate-500 truncate text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\" flex-shrink-0 h-10 w-10\" style=\"padding:7px\"><use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#rows\"></use></svg><span class=\"truncate\" style=\"max-width: 20vw\">").concat(instance.t('frontend_menu'), "</span></span>`,\n \"className\":'h-full flex items-center'\n },\n \"overflowIndicator\":\"\"\n },\n \"indentSize\": ").concat(indentSize, ",\n \"source\": \"${items}\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"footerService\",\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 },\n \"@tabId.changed\":{\n \"actions\":[\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"footerService\",\n \"args\": {\n \"value\": {\n \"tabId\": \"${event.data.tabId}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.tabId}\"\n }\n ]\n }\n }\n }\n \n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
18465
+ "adaptor": "\n try {\n if(payload.children.length == 0){\n payload.data = {};\n return payload\n }\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n const locationPathname = window.location.pathname;\n var customTabId = \"\";\n var objectTabId = \"\";\n let sum = 0;\n _.each(payload.children, (tab)=>{\n sum++;\n const classIcon = tab.icon.replace(/_/g,\"-\");\n if(locationPathname == tab.path){\n customTabId = tab.id;\n }else if(locationPathname.startsWith(tab.path + \"/\")){\n objectTabId = tab.id;\n }\n if(sum >= 5){\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg><span>${tab.name}</span><i class=\"fa fa-angle-right\" aria-hidden=\"true\" style=\"position: absolute;right: 20px;color: #bababa;\"></i></span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\"\n });\n }else{\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 truncate text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg><span class=\"truncate\" style=\"max-width: 20vw\">${tab.name}</span></span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target,\n \"id\": tab.id,\n \"activeOn\": \"\\\\${tabId == '\"+ tab.id +\"'}\"\n });\n }\n })\n\n payload.data = {\n \"type\": \"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": data.nav\n },\n \"id\": \"footerService\",\n \"body\": {\n \"type\": \"nav\",\n className: \"").concat(className, "\",\n \"stacked\": ").concat(stacked, ",\n \"overflow\": {\n \"enable\": true,\n \"maxVisibleCount\": 4,\n \"overflowPopoverClassName\": \"steedos-global-footer-popup\",\n \"overflowLabel\":{\n \"type\": 'tpl',\n \"tpl\": `<span class=' truncate text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"!fill-slate-500 flex-shrink-0 !h-10 !w-10\" style=\"padding:7px\"><use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#rows\"></use></svg><span class=\"truncate\" style=\"max-width: 20vw\">").concat(instance.t('frontend_menu'), "</span></span>`,\n \"className\":'h-full flex items-center'\n },\n \"overflowIndicator\":\"\"\n },\n \"indentSize\": ").concat(indentSize, ",\n \"source\": \"${items}\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"footerService\",\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 },\n \"@tabId.changed\":{\n \"actions\":[\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"footerService\",\n \"args\": {\n \"value\": {\n \"tabId\": \"${event.data.tabId}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.tabId}\"\n }\n ]\n }\n }\n }\n \n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
18400
18466
  "headers": {
18401
18467
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
18402
18468
  }