@steedos-widgets/amis-object 1.2.32 → 1.2.33

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
  }
@@ -1287,6 +1287,9 @@ fieldset.antd-Collapse > legend{
1287
1287
  -moz-column-gap: 1rem;
1288
1288
  column-gap: 1rem;
1289
1289
  }
1290
+ .steedos-object-form .steedos-markdown .antd-Tabs-pane.is-active {
1291
+ display: block;
1292
+ }
1290
1293
  }
1291
1294
 
1292
1295
  @media (max-width: 767px) {
@@ -1413,11 +1416,18 @@ fieldset.antd-Collapse > legend{
1413
1416
  height: unset;
1414
1417
  }
1415
1418
 
1419
+ #steedosGlobalFooterRoot .antd-Nav {
1420
+ height: 4rem;
1421
+ position: fixed;
1422
+ bottom: 0;
1423
+ z-index: 20;
1424
+ width: 100%;
1425
+ }
1416
1426
  .steedos-global-footer {
1417
1427
  border-top: 1px solid rgb(203 213 225);
1418
1428
  }
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 {
1429
+ .steedos-global-footer .antd-Nav-Menu-item-tooltip-wrap > .antd-Nav-Menu-item,
1430
+ .steedos-global-footer .antd-Nav-Menu-overflow-item > .antd-Nav-Menu-submenu-title {
1421
1431
  padding-bottom: 5px;
1422
1432
  padding-left: 0;
1423
1433
  padding-right: 0;
@@ -1451,6 +1461,9 @@ fieldset.antd-Collapse > legend{
1451
1461
  .steedos-global-footer-popup .antd-Nav-Menu-item-wrap {
1452
1462
  align-items: center;
1453
1463
  }
1464
+ .steedos-global-footer-popup .antd-Nav-Menu-item-link {
1465
+ max-width: unset;
1466
+ }
1454
1467
  .steedos-global-footer .antd-Nav-Menu-submenu-title {
1455
1468
  height: 100% !important;
1456
1469
  display: flex;
@@ -1462,8 +1475,9 @@ fieldset.antd-Collapse > legend{
1462
1475
  .steedos-global-footer-popup {
1463
1476
  width: 100%;
1464
1477
  top: 54px !important;
1465
- bottom: 64px;
1466
- position: fixed;
1478
+ bottom: 64px !important;
1479
+ left: 0 !important;
1480
+ position: fixed !important;
1467
1481
  }
1468
1482
  .steedos-global-footer-popup .antd-Nav-Menu {
1469
1483
  height: 100%;
@@ -1486,6 +1500,8 @@ fieldset.antd-Collapse > legend{
1486
1500
  }
1487
1501
  .steedos-global-footer-root .antd-Nav-Menu-horizontal.antd-Nav-Menu-light {
1488
1502
  background-color: rgb(243 244 246);
1503
+ justify-content: space-evenly;
1504
+ height: 100%;
1489
1505
  }
1490
1506
  @media (max-width: 767px) {
1491
1507
  .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" : "="}";
@@ -9215,6 +9229,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
9215
9229
  modalTitle: instance.t('frontend_form_please_select') + " " + refObjectConfig.label,
9216
9230
  labelField: referenceTo.labelField.name,
9217
9231
  valueField: referenceTo.valueField.name,
9232
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
9233
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
9218
9234
  modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
9219
9235
  source: source,
9220
9236
  size: "lg",
@@ -9395,6 +9411,8 @@ async function lookupToAmisSelect(field, readonly, ctx){
9395
9411
  joinValues: false,
9396
9412
  extractValue: true,
9397
9413
  clearable: true,
9414
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
9415
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
9398
9416
  // labelField: labelField,
9399
9417
  // valueField: valueField,
9400
9418
  source: apiInfo,
@@ -9579,6 +9597,8 @@ async function getIdsPickerSchema(field, readonly, ctx){
9579
9597
  valueField: referenceTo.valueField.name,
9580
9598
  modalMode: 'dialog',
9581
9599
  source: source,
9600
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
9601
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
9582
9602
  size: "lg",
9583
9603
  pickerSchema: pickerSchema,
9584
9604
  joinValues: false,
@@ -9607,7 +9627,7 @@ async function getIdsPickerSchema(field, readonly, ctx){
9607
9627
  * @Author: baozhoutao@steedos.com
9608
9628
  * @Date: 2023-01-13 17:27:54
9609
9629
  * @LastEditors: liaodaxue
9610
- * @LastEditTime: 2023-06-30 10:29:52
9630
+ * @LastEditTime: 2023-07-24 15:23:12
9611
9631
  * @Description:
9612
9632
  */
9613
9633
 
@@ -9629,21 +9649,39 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
9629
9649
  }
9630
9650
  }else {
9631
9651
  return {
9632
- "type": "group",
9652
+ "type": "control",
9653
+ "label": field.label,
9633
9654
  "body": [
9634
9655
  {
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
- }
9656
+ "type": "tabs",
9657
+ "tabsMode": "strong",
9658
+ "className": "steedos-markdown",
9659
+ "tabs": [
9660
+ {
9661
+ "title": "Write",
9662
+ "tab": [
9663
+ {
9664
+ "type": "editor",
9665
+ "name": field.name,
9666
+ "language": "markdown",
9667
+ }
9668
+ ]
9669
+ },
9670
+ {
9671
+ "title": "Preview",
9672
+ "tab": [
9673
+ {
9674
+ "type": "markdown",
9675
+ "name": field.name,
9676
+ "options": {
9677
+ "linkify": true,
9678
+ "html": true,
9679
+ "breaks": true
9680
+ }
9681
+ }
9682
+ ]
9683
+ }
9684
+ ]
9647
9685
  }
9648
9686
  ]
9649
9687
  }
@@ -10718,10 +10756,25 @@ async function getQuickEditSchema(field, options){
10718
10756
  return quickEditSchema;
10719
10757
  }
10720
10758
 
10759
+ function getFieldWidth(width){
10760
+ const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
10761
+ if(typeof width == 'string'){
10762
+ if(isNaN(width)){
10763
+ return width;
10764
+ }else {
10765
+ return Number(width);
10766
+ }
10767
+ }else if(typeof width == 'number'){
10768
+ return width;
10769
+ }else {
10770
+ return defaultWidth;
10771
+ }
10772
+ }
10773
+
10721
10774
  async function getTableColumns$1(fields, options){
10722
10775
  const columns = [{name: '_index',type: 'text', width: 32, placeholder: ""}];
10723
10776
  const allowEdit = options.permissions?.allowEdit && options.permissions?.modifyAllRecords && !options.isLookup && options.enable_inline_edit != false;
10724
- const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
10777
+
10725
10778
  for (const field of fields) {
10726
10779
  //增加quickEdit属性,实现快速编辑
10727
10780
  const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
@@ -10769,7 +10822,7 @@ async function getTableColumns$1(fields, options){
10769
10822
  type: "switch",
10770
10823
  name: field.name,
10771
10824
  label: field.label,
10772
- width: field.width || defaultWidth,
10825
+ width: getFieldWidth(field.width),
10773
10826
  toggled: field.toggled,
10774
10827
  static: true,
10775
10828
  className:"whitespace-nowrap",
@@ -10780,7 +10833,7 @@ async function getTableColumns$1(fields, options){
10780
10833
  type: "switch",
10781
10834
  name: field.name,
10782
10835
  label: field.label,
10783
- width: field.width || defaultWidth,
10836
+ width: getFieldWidth(field.width),
10784
10837
  toggled: field.toggled,
10785
10838
  quickEdit: quickEditSchema,
10786
10839
  static: true,
@@ -10800,7 +10853,7 @@ async function getTableColumns$1(fields, options){
10800
10853
  label: field.label,
10801
10854
  map: map,
10802
10855
  sortable: field.sortable,
10803
- width: field.width || defaultWidth,
10856
+ width: getFieldWidth(field.width),
10804
10857
  toggled: field.toggled,
10805
10858
  className,
10806
10859
  static: true,
@@ -10834,7 +10887,7 @@ async function getTableColumns$1(fields, options){
10834
10887
  label: field.label,
10835
10888
  sortable: field.sortable,
10836
10889
  // searchable: field.searchable,
10837
- width: field.width || defaultWidth,
10890
+ width: getFieldWidth(field.width),
10838
10891
  type: type,
10839
10892
  tpl: tpl,
10840
10893
  toggled: field.toggled,
@@ -11132,14 +11185,7 @@ async function getTableOperation(ctx){
11132
11185
  onOpenApi: {
11133
11186
  url: `\${context.rootUrl}/service/api/@\${objectName}/recordPermissions/\${_id}`,
11134
11187
  method: "get",
11135
- data: {
11136
- $: "$$",
11137
- objectName: "${objectName}",
11138
- listViewId: "${listViewId}",
11139
- appId: "${appId}",
11140
- formFactor: "${formFactor}",
11141
- context: `\${context}`
11142
- },
11188
+ requestAdaptor: "api.data={}; return api;",
11143
11189
  headers: {
11144
11190
  Authorization: "Bearer ${context.tenantId},${context.authToken}"
11145
11191
  },
@@ -18363,15 +18409,14 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
18363
18409
  * @Description:
18364
18410
  */
18365
18411
  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;
18412
+ var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, schema;
18367
18413
  return __generator(this, function (_e) {
18368
18414
  _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
18415
  if (!appId) {
18370
18416
  appId = data.context.appId || 'admin';
18371
18417
  }
18372
18418
  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';
18419
+ className = 'steedos-global-footer';
18375
18420
  schema = {};
18376
18421
  if (links) {
18377
18422
  schema = {
@@ -18380,7 +18425,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
18380
18425
  body: [
18381
18426
  {
18382
18427
  "type": "nav",
18383
- "className": links.length == 1 ? "".concat(className1) : "".concat(className),
18428
+ "className": className,
18384
18429
  "stacked": stacked,
18385
18430
  "overflow": overflow,
18386
18431
  "indentSize": indentSize,
@@ -18396,7 +18441,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
18396
18441
  schemaApi: {
18397
18442
  "method": "get",
18398
18443
  "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 "),
18444
+ "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
18445
  "headers": {
18401
18446
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
18402
18447
  }