@steedos-widgets/amis-object 1.3.11 → 1.3.13

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.
@@ -517,6 +517,9 @@ fieldset.antd-Collapse > legend{
517
517
  .-ml-px {
518
518
  margin-left: -1px
519
519
  }
520
+ .mr-3 {
521
+ margin-right: 0.75rem
522
+ }
520
523
  .mb-\[-3px\] {
521
524
  margin-bottom: -3px
522
525
  }
@@ -532,9 +535,6 @@ fieldset.antd-Collapse > legend{
532
535
  .-ml-1 {
533
536
  margin-left: -0.25rem
534
537
  }
535
- .mr-3 {
536
- margin-right: 0.75rem
537
- }
538
538
  .block {
539
539
  display: block
540
540
  }
@@ -704,6 +704,9 @@ fieldset.antd-Collapse > legend{
704
704
  .resize {
705
705
  resize: both
706
706
  }
707
+ .flex-row {
708
+ flex-direction: row
709
+ }
707
710
  .flex-col {
708
711
  flex-direction: column
709
712
  }
@@ -804,14 +807,14 @@ fieldset.antd-Collapse > legend{
804
807
  --tw-border-opacity: 1;
805
808
  border-color: rgb(209 213 219 / var(--tw-border-opacity))
806
809
  }
807
- .border-sky-500 {
808
- --tw-border-opacity: 1;
809
- border-color: rgb(14 165 233 / var(--tw-border-opacity))
810
- }
811
810
  .border-gray-200 {
812
811
  --tw-border-opacity: 1;
813
812
  border-color: rgb(229 231 235 / var(--tw-border-opacity))
814
813
  }
814
+ .border-sky-500 {
815
+ --tw-border-opacity: 1;
816
+ border-color: rgb(14 165 233 / var(--tw-border-opacity))
817
+ }
815
818
  .bg-white {
816
819
  --tw-bg-opacity: 1;
817
820
  background-color: rgb(255 255 255 / var(--tw-bg-opacity))
@@ -836,9 +839,6 @@ fieldset.antd-Collapse > legend{
836
839
  .fill-slate-500 {
837
840
  fill: #64748b
838
841
  }
839
- .\!fill-slate-500 {
840
- fill: #64748b !important
841
- }
842
842
  .fill-gray-500 {
843
843
  fill: #6b7280
844
844
  }
@@ -884,6 +884,10 @@ fieldset.antd-Collapse > legend{
884
884
  padding-top: 0.25rem;
885
885
  padding-bottom: 0.25rem
886
886
  }
887
+ .py-2\.5 {
888
+ padding-top: 0.625rem;
889
+ padding-bottom: 0.625rem
890
+ }
887
891
  .pt-4 {
888
892
  padding-top: 1rem
889
893
  }
@@ -941,9 +945,6 @@ fieldset.antd-Collapse > legend{
941
945
  .text-\[14px\] {
942
946
  font-size: 14px
943
947
  }
944
- .text-\[12px\] {
945
- font-size: 12px
946
- }
947
948
  .text-\[11px\] {
948
949
  font-size: 11px
949
950
  }
@@ -1038,6 +1039,10 @@ fieldset.antd-Collapse > legend{
1038
1039
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
1039
1040
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
1040
1041
  }
1042
+ .blur {
1043
+ --tw-blur: blur(8px);
1044
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
1045
+ }
1041
1046
  .filter {
1042
1047
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
1043
1048
  }
@@ -2007,7 +2012,7 @@ body.steedos {
2007
2012
  height: unset;
2008
2013
  }
2009
2014
 
2010
- #steedosGlobalFooterRoot .antd-Nav {
2015
+ #steedosGlobalFooterRoot .steedos-global-footer {
2011
2016
  height: 4rem;
2012
2017
  position: fixed;
2013
2018
  bottom: 0;
@@ -2047,44 +2052,12 @@ body.steedos {
2047
2052
  .steedos-global-footer .antd-Nav-Menu-item.antd-Nav-Menu-item-selected {
2048
2053
  background: transparent;
2049
2054
  }
2050
- .steedos-global-footer-popup .antd-Nav-Menu-item-wrap {
2051
- align-items: center;
2052
- }
2053
- .steedos-global-footer-popup .antd-Nav-Menu-item-link {
2054
- max-width: unset;
2055
- }
2056
2055
  .steedos-global-footer .antd-Nav-Menu-submenu-title {
2057
2056
  height: 100% !important;
2058
2057
  display: flex;
2059
2058
  align-items: center;
2060
2059
  }
2061
- .steedos-global-footer-popup .nav-label {
2062
- flex-direction: unset !important;
2063
- }
2064
- .steedos-global-footer-popup {
2065
- width: 100%;
2066
- top: 54px !important;
2067
- bottom: 64px !important;
2068
- left: 0 !important;
2069
- position: fixed !important;
2070
- }
2071
- .steedos-global-footer-popup .antd-Nav-Menu {
2072
- height: 100%;
2073
- overflow: auto;
2074
- box-shadow: none;
2075
- }
2076
- .steedos-global-footer-popup .antd-Nav-Menu-item {
2077
- padding-bottom: 10px;
2078
- padding-top: 10px;
2079
- border-bottom: 0.5px solid #e5e7eb;
2080
- }
2081
- .steedos-global-footer-popup .antd-Nav-Menu-item svg {
2082
- margin-right: 12px;
2083
- }
2084
- .steedos-global-footer-popup .nav-label {
2085
- font-size: 17px;
2086
- }
2087
- .steedos-global-footer-popup .antd-Nav-Menu-item-label-subTitle {
2060
+ ç .antd-Nav-Menu-item-label-subTitle {
2088
2061
  max-width: 100% !important;
2089
2062
  }
2090
2063
  .steedos-global-footer-root .antd-Nav-Menu-horizontal.antd-Nav-Menu-light {
@@ -2100,6 +2073,15 @@ body.steedos {
2100
2073
  .steedos-global-footer ul {
2101
2074
  order: unset !important;
2102
2075
  }
2076
+ .steedos-global-footer-menu-page {
2077
+ position: fixed;
2078
+ bottom: 64px;
2079
+ top: 53px;
2080
+ overflow: auto;
2081
+ height: unset;
2082
+ z-index: 1000;
2083
+ background-color: white;
2084
+ }
2103
2085
 
2104
2086
  .sidebar-wrapper {
2105
2087
  transition: 0.5s ease transform;
@@ -3750,6 +3750,8 @@ function getSaveDataTpl(fields){
3750
3750
  delete formData.editFormInited;
3751
3751
  delete formData.isLookup;
3752
3752
  delete formData.selectedRowResponseResult;
3753
+ delete formData.instance_state;
3754
+ delete formData.instances;
3753
3755
  ${getScriptForReadonlyFields(fields)}
3754
3756
  ${getScriptForRemoveUrlPrefixForImgFields(fields)}
3755
3757
  ${getScriptForSimplifiedValueForFileFields(fields)}
@@ -8161,7 +8163,30 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
8161
8163
  "value": crudKeywords,
8162
8164
  "clearable": true,
8163
8165
  "clearAndSubmit": true,
8164
- "searchImediately": false
8166
+ "searchImediately": false,
8167
+ "onEvent": {
8168
+ "blur": {
8169
+ "actions": [
8170
+ {
8171
+ "actionType": "custom",
8172
+ "script": `
8173
+ try {
8174
+ const scope = event.context.scoped;
8175
+ const filterCrud = scope.parent.getComponents().find(function(n) {
8176
+ return n.props.type === "crud";
8177
+ });
8178
+ if (filterCrud && typeof filterCrud.reload === 'function') {
8179
+ const keyWords = { '${keywordsSearchBoxName}': event.data.value };
8180
+ filterCrud.reload(null, keyWords);
8181
+ }
8182
+ } catch (error) {
8183
+ console.error('An error occurred:', error);
8184
+ }
8185
+ `
8186
+ }
8187
+ ]
8188
+ }
8189
+ }
8165
8190
  }
8166
8191
  ]
8167
8192
  }
@@ -8639,6 +8664,8 @@ async function lookupToAmisTreeSelect(field, readonly, ctx) {
8639
8664
  return amisSchema;
8640
8665
  }
8641
8666
 
8667
+ const keywordsSearchBoxName = `__keywords_lookup`;
8668
+
8642
8669
  const getReferenceTo = async (field)=>{
8643
8670
  let referenceTo = field.reference_to;
8644
8671
  if(!referenceTo){
@@ -8882,8 +8909,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
8882
8909
 
8883
8910
  source.data.$term = "$term";
8884
8911
  source.data.$self = "$$";
8885
-
8886
- let keywordsSearchBoxName = `__keywords_lookup__${field.name}__to__${refObjectConfig.name}`;
8887
8912
 
8888
8913
  source.requestAdaptor = `
8889
8914
  const selfData = JSON.parse(JSON.stringify(api.data.$self));
@@ -10636,9 +10661,38 @@ async function getFieldSearchable(perField, permissionFields, ctx){
10636
10661
 
10637
10662
  const amisField = await convertSFieldToAmisField(_field, false, Object.assign({}, ctx, {fieldNamePrefix: fieldNamePrefix, required: false, showSystemFields: true, inFilterForm: true}));
10638
10663
  if(amisField){
10639
- return Object.assign({}, amisField,{
10640
- submitOnChange: true
10641
- });
10664
+ const changeActionsFields = ['select', 'boolean', 'toggle', 'date', 'datetime', 'time', 'number', 'currency', 'lookup', 'master_detail'];
10665
+ const isChangeActions = changeActionsFields.indexOf(field.type) > -1;
10666
+ let additionalProps = {
10667
+ submitOnChange: false
10668
+ };
10669
+ if (isChangeActions) {
10670
+ additionalProps.submitOnChange = true;
10671
+ } else {
10672
+ additionalProps.onEvent = {
10673
+ blur: {
10674
+ actions: [
10675
+ {
10676
+ actionType: "custom",
10677
+ script: `
10678
+ try {
10679
+ const scope = event.context.scoped;
10680
+ const filterForm = scope.parent.parent.parent.getComponents().find(function(n) {
10681
+ return n.props.type === "form";
10682
+ });
10683
+ if (filterForm && typeof filterForm.handleFormSubmit === 'function') {
10684
+ filterForm.handleFormSubmit(event);
10685
+ }
10686
+ } catch (error) {
10687
+ console.error('An error occurred:', error);
10688
+ }
10689
+ `
10690
+ }
10691
+ ]
10692
+ }
10693
+ };
10694
+ }
10695
+ return Object.assign({}, amisField, additionalProps);
10642
10696
  }
10643
10697
  }
10644
10698
  }
@@ -14939,6 +14993,7 @@ async function getTableApi(mainObject, fields, options){
14939
14993
  if(options.isRelated){
14940
14994
  api.url += "&recordId=${_master.recordId}";
14941
14995
  }
14996
+ api.cache = 3000;
14942
14997
 
14943
14998
  api.data.$term = "$term";
14944
14999
  api.data.term = "$term";
@@ -19759,12 +19814,12 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
19759
19814
  /*
19760
19815
  * @Author: baozhoutao@steedos.com
19761
19816
  * @Date: 2022-09-01 14:44:57
19762
- * @LastEditors: baozhoutao@steedos.com
19763
- * @LastEditTime: 2023-04-27 13:26:12
19817
+ * @LastEditors: 涂佳俊 tujiajun@steedos.com
19818
+ * @LastEditTime: 2023-11-23 14:33:45
19764
19819
  * @Description:
19765
19820
  */
19766
19821
  var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19767
- var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, schema;
19822
+ var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, footerNavEach, footerNavScript, menuNavScript, schema;
19768
19823
  return __generator(this, function (_e) {
19769
19824
  _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;
19770
19825
  if (!appId) {
@@ -19772,6 +19827,9 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
19772
19827
  }
19773
19828
  isMobile = window.innerWidth <= 768;
19774
19829
  className = 'steedos-global-footer';
19830
+ footerNavEach = "\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 data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 truncate text-gray-700 block -ml-px no-underline group flex items-center text-[11px] 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 +\"' && !isMenuNavVisible}\"\n });\n ";
19831
+ footerNavScript = "\n if(payload.children.length <= 4){\n //\u82E5tab\u957F\u5EA6\u5728\u56DB\u4E2A\u4EE5\u5185\uFF0C\u53EA\u663E\u793A\u5728\u5E95\u90E8\n _.each(payload.children, (tab,index)=>{\n ".concat(footerNavEach, "\n })\n }else{\n //\u82E5tab\u957F\u5EA6\u8D85\u8FC7\u56DB\u4E2A\uFF0C\u7559\u4E0B\u524D\u4E09\u4E2Atab\u5728\u5E95\u90E8\uFF0C\u7136\u540E\u518D\u589E\u52A0\u4E00\u4E2A\u83DC\u5355tab\n _.each(_.slice(payload.children, 0, 3), (tab,index)=>{\n ").concat(footerNavEach, "\n })\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class=' truncate text-gray-700 block -ml-px no-underline group flex items-center text-[11px] 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 \"id\": \"__menu__\",\n \"activeOn\": \"\\\\${isMenuNavVisible}\",\n \"isMenu\": true,\n \"menuReRengder\": \"${isMenuNavVisible}\"//\u4E3A\u4E86menu\u80FD\u6B63\u5E38\u663E\u793A\u9AD8\u4EAE\uFF0C\u89E6\u53D1\u91CD\u65B0\u6E32\u67D3\n });\n }\n ");
19832
+ menuNavScript = "\n _.each(_.groupBy(payload.children, 'group'), (tabs, groupName) => {\n if (groupName === 'undefined' || groupName === '') {\n _.each(tabs, function(tab){\n const classIcon = tab.icon.replace(/_/g, \"-\");\n data.links.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-gray-700 block -ml-px no-underline group flex items-center text-lg font-medium rounded-md flex-row leading-3 nav-label'><svg class=\"mr-3 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 + `\"></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\": \"false\",\n \"className\": \"border-b border-gray-200 py-2.5\"\n });\n })\n } else {\n var tabGroup = _.find(tab_groups, { \"group_name\": groupName });\n data.links.push({\n \"label\": groupName,\n \"unfolded\": tabGroup && tabGroup.default_open != false,\n \"isGroup\": true,\n \"mode\": \"group\",\n \"children\": _.sortBy(_.map(tabs, (tab) => {\n const classIcon = tab.icon.replace(/_/g, \"-\");\n return {\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-gray-700 block -ml-px no-underline group flex items-center text-lg font-medium rounded-md flex-row leading-3 nav-label'><svg class=\"mr-3 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 + `\"></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\": \"false\",\n \"className\": \"border-b border-gray-200 py-2.5\"\n }\n }), function (tab){ return tab.index })\n })\n }\n });\n data.links = _.sortBy(data.links, 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 ";
19775
19833
  schema = {};
19776
19834
  if (links) {
19777
19835
  schema = {
@@ -19796,13 +19854,14 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
19796
19854
  schemaApi: {
19797
19855
  "method": "get",
19798
19856
  "url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
19799
- "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 payload.children = _.sortBy(payload.children, function(tab){\n return tab.index;\n })\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-gray-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 \"index\": tab.index\n });\n }else{\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 truncate text-gray-700 block -ml-px no-underline group flex items-center text-[11px] 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 \"index\": tab.index\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-gray-700 block -ml-px no-underline group flex items-center text-[11px] 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 "),
19857
+ "adaptor": "\n try {\n if(payload.children && payload.children.length == 0){\n payload.data = {};\n return payload\n }\n const data = { nav: [],links: [] };\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 const tab_groups = payload.tab_groups;\n payload.children = _.sortBy(payload.children, function(tab){\n return tab.index;\n })\n ").concat(footerNavScript, "\n ").concat(menuNavScript, "\n payload.data = {\n \"type\": \"service\",\n \"data\":{\n \"tabId\": customTabId || objectTabId,\n \"items\": data.nav,\n \"isMenuNavVisible\": false\n },\n \"id\": \"steedosMobileFooterService\",\n \"body\": [\n {\n \"type\": \"nav\",\n className: \"").concat(className, "\",\n \"stacked\": ").concat(stacked, ",\n \"indentSize\": ").concat(indentSize, ",\n \"source\": \"${items}\",\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"steedosMobileFooterService\",\n \"args\": {\n \"value\": {\n \"isMenuNavVisible\": \"${event.data.item.isMenu}\",\n \"tabId\": \"${event.data.item.id}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.item.id}\"\n }\n ]\n }\n }\n },\n {\n \"type\": \"page\",\n \"bodyClassName\": \"p-0\",\n \"className\": \"steedos-global-footer-menu-page\",\n \"visibleOn\": \"${isMenuNavVisible}\",\n \"body\": {\n \"type\": \"nav\",\n \"id\": \"u:58c2a9249e9d\",\n \"stacked\": true,\n \"links\": data.links,\n \"onEvent\": {\n \"click\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"steedosMobileFooterService\",\n \"args\": {\n \"value\": {\n \"isMenuNavVisible\": false,\n \"tabId\": \"${event.data.item.id}\",\n \"items\": data.nav\n }\n },\n \"expression\":\"${event.data.item.id}\"\n }\n ]\n }\n }\n }\n }\n ]\n \n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
19800
19858
  "headers": {
19801
19859
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
19802
19860
  }
19803
19861
  }
19804
19862
  };
19805
19863
  }
19864
+ console.log("payload===>", schema);
19806
19865
  return [2 /*return*/, schema];
19807
19866
  });
19808
19867
  }); };
@@ -20507,8 +20566,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
20507
20566
  /*
20508
20567
  * @Author: baozhoutao@steedos.com
20509
20568
  * @Date: 2023-01-14 16:41:24
20510
- * @LastEditors: liaodaxue
20511
- * @LastEditTime: 2023-11-17 10:53:59
20569
+ * @LastEditors: 涂佳俊 tujiajun@steedos.com
20570
+ * @LastEditTime: 2023-11-23 18:27:18
20512
20571
  * @Description:
20513
20572
  */
20514
20573
  var getSelectFlowSchema = function (id, props) {
@@ -20659,7 +20718,7 @@ var getSelectFlowSchema = function (id, props) {
20659
20718
  } : '', source: {
20660
20719
  method: "post",
20661
20720
  url: "${context.rootUrl}/graphql?keywords=${keywords}",
20662
- requestAdaptor: "\n const keywords = api.body.keywords || '';\n const appId = '".concat(data.app_id || "", "';\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\", allData: ").concat(allData, "){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
20721
+ requestAdaptor: "\n const keywords = api.body.keywords || '';\n let appId = '".concat(data.app_id || "", "';\n if(appId == \"approve_workflow\"){\n appId = \"\";\n }\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\", allData: ").concat(allData, "){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
20663
20722
  adaptor: "\n var options = payload.data.options;\n if (options) {\n var filteredOptions = options.filter(function(item) {\n return item.value == 'startFlows' || (item.children && item.children.length > 0);\n });\n payload.data.options = filteredOptions;\n }\n // if(payload.data.options.length === 1 && payload.data.options[0].children.length === 1){\n // payload.data.value = payload.data.options[0].children[0].value\n // }\n return payload;\n ",
20664
20723
  "headers": {
20665
20724
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"