@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;
@@ -3778,6 +3778,8 @@ function getSaveDataTpl(fields){
3778
3778
  delete formData.editFormInited;
3779
3779
  delete formData.isLookup;
3780
3780
  delete formData.selectedRowResponseResult;
3781
+ delete formData.instance_state;
3782
+ delete formData.instances;
3781
3783
  ${getScriptForReadonlyFields(fields)}
3782
3784
  ${getScriptForRemoveUrlPrefixForImgFields(fields)}
3783
3785
  ${getScriptForSimplifiedValueForFileFields(fields)}
@@ -8189,7 +8191,30 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
8189
8191
  "value": crudKeywords,
8190
8192
  "clearable": true,
8191
8193
  "clearAndSubmit": true,
8192
- "searchImediately": false
8194
+ "searchImediately": false,
8195
+ "onEvent": {
8196
+ "blur": {
8197
+ "actions": [
8198
+ {
8199
+ "actionType": "custom",
8200
+ "script": `
8201
+ try {
8202
+ const scope = event.context.scoped;
8203
+ const filterCrud = scope.parent.getComponents().find(function(n) {
8204
+ return n.props.type === "crud";
8205
+ });
8206
+ if (filterCrud && typeof filterCrud.reload === 'function') {
8207
+ const keyWords = { '${keywordsSearchBoxName}': event.data.value };
8208
+ filterCrud.reload(null, keyWords);
8209
+ }
8210
+ } catch (error) {
8211
+ console.error('An error occurred:', error);
8212
+ }
8213
+ `
8214
+ }
8215
+ ]
8216
+ }
8217
+ }
8193
8218
  }
8194
8219
  ]
8195
8220
  }
@@ -8667,6 +8692,8 @@ async function lookupToAmisTreeSelect(field, readonly, ctx) {
8667
8692
  return amisSchema;
8668
8693
  }
8669
8694
 
8695
+ const keywordsSearchBoxName = `__keywords_lookup`;
8696
+
8670
8697
  const getReferenceTo = async (field)=>{
8671
8698
  let referenceTo = field.reference_to;
8672
8699
  if(!referenceTo){
@@ -8910,8 +8937,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
8910
8937
 
8911
8938
  source.data.$term = "$term";
8912
8939
  source.data.$self = "$$";
8913
-
8914
- let keywordsSearchBoxName = `__keywords_lookup__${field.name}__to__${refObjectConfig.name}`;
8915
8940
 
8916
8941
  source.requestAdaptor = `
8917
8942
  const selfData = JSON.parse(JSON.stringify(api.data.$self));
@@ -10664,9 +10689,38 @@ async function getFieldSearchable(perField, permissionFields, ctx){
10664
10689
 
10665
10690
  const amisField = await convertSFieldToAmisField(_field, false, Object.assign({}, ctx, {fieldNamePrefix: fieldNamePrefix, required: false, showSystemFields: true, inFilterForm: true}));
10666
10691
  if(amisField){
10667
- return Object.assign({}, amisField,{
10668
- submitOnChange: true
10669
- });
10692
+ const changeActionsFields = ['select', 'boolean', 'toggle', 'date', 'datetime', 'time', 'number', 'currency', 'lookup', 'master_detail'];
10693
+ const isChangeActions = changeActionsFields.indexOf(field.type) > -1;
10694
+ let additionalProps = {
10695
+ submitOnChange: false
10696
+ };
10697
+ if (isChangeActions) {
10698
+ additionalProps.submitOnChange = true;
10699
+ } else {
10700
+ additionalProps.onEvent = {
10701
+ blur: {
10702
+ actions: [
10703
+ {
10704
+ actionType: "custom",
10705
+ script: `
10706
+ try {
10707
+ const scope = event.context.scoped;
10708
+ const filterForm = scope.parent.parent.parent.getComponents().find(function(n) {
10709
+ return n.props.type === "form";
10710
+ });
10711
+ if (filterForm && typeof filterForm.handleFormSubmit === 'function') {
10712
+ filterForm.handleFormSubmit(event);
10713
+ }
10714
+ } catch (error) {
10715
+ console.error('An error occurred:', error);
10716
+ }
10717
+ `
10718
+ }
10719
+ ]
10720
+ }
10721
+ };
10722
+ }
10723
+ return Object.assign({}, amisField, additionalProps);
10670
10724
  }
10671
10725
  }
10672
10726
  }
@@ -14967,6 +15021,7 @@ async function getTableApi(mainObject, fields, options){
14967
15021
  if(options.isRelated){
14968
15022
  api.url += "&recordId=${_master.recordId}";
14969
15023
  }
15024
+ api.cache = 3000;
14970
15025
 
14971
15026
  api.data.$term = "$term";
14972
15027
  api.data.term = "$term";
@@ -19787,12 +19842,12 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
19787
19842
  /*
19788
19843
  * @Author: baozhoutao@steedos.com
19789
19844
  * @Date: 2022-09-01 14:44:57
19790
- * @LastEditors: baozhoutao@steedos.com
19791
- * @LastEditTime: 2023-04-27 13:26:12
19845
+ * @LastEditors: 涂佳俊 tujiajun@steedos.com
19846
+ * @LastEditTime: 2023-11-23 14:33:45
19792
19847
  * @Description:
19793
19848
  */
19794
19849
  var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19795
- var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, schema;
19850
+ var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, footerNavEach, footerNavScript, menuNavScript, schema;
19796
19851
  return __generator(this, function (_e) {
19797
19852
  _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;
19798
19853
  if (!appId) {
@@ -19800,6 +19855,9 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
19800
19855
  }
19801
19856
  isMobile = window.innerWidth <= 768;
19802
19857
  className = 'steedos-global-footer';
19858
+ 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 ";
19859
+ 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 ");
19860
+ 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 ";
19803
19861
  schema = {};
19804
19862
  if (links) {
19805
19863
  schema = {
@@ -19824,13 +19882,14 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
19824
19882
  schemaApi: {
19825
19883
  "method": "get",
19826
19884
  "url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
19827
- "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 "),
19885
+ "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 "),
19828
19886
  "headers": {
19829
19887
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
19830
19888
  }
19831
19889
  }
19832
19890
  };
19833
19891
  }
19892
+ console.log("payload===>", schema);
19834
19893
  return [2 /*return*/, schema];
19835
19894
  });
19836
19895
  }); };
@@ -20535,8 +20594,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
20535
20594
  /*
20536
20595
  * @Author: baozhoutao@steedos.com
20537
20596
  * @Date: 2023-01-14 16:41:24
20538
- * @LastEditors: liaodaxue
20539
- * @LastEditTime: 2023-11-17 10:53:59
20597
+ * @LastEditors: 涂佳俊 tujiajun@steedos.com
20598
+ * @LastEditTime: 2023-11-23 18:27:18
20540
20599
  * @Description:
20541
20600
  */
20542
20601
  var getSelectFlowSchema = function (id, props) {
@@ -20687,7 +20746,7 @@ var getSelectFlowSchema = function (id, props) {
20687
20746
  } : '', source: {
20688
20747
  method: "post",
20689
20748
  url: "${context.rootUrl}/graphql?keywords=${keywords}",
20690
- 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 "),
20749
+ 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 "),
20691
20750
  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 ",
20692
20751
  "headers": {
20693
20752
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"