@steedos-widgets/amis-object 1.3.10 → 1.3.12
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.
- package/dist/amis-object.cjs.css +40 -53
- package/dist/amis-object.cjs.js +24 -16
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +40 -53
- package/dist/amis-object.esm.js +24 -16
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +40 -53
- package/dist/amis-object.umd.js +16 -15
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +21 -21
- package/package.json +3 -3
package/dist/amis-object.cjs.css
CHANGED
|
@@ -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
|
}
|
|
@@ -1632,6 +1633,12 @@ body.steedos {
|
|
|
1632
1633
|
.antd-Select-popover .antd-Select-menu .antd-Select-option .antd-Checkbox--checkbox > span {
|
|
1633
1634
|
vertical-align: middle;
|
|
1634
1635
|
}
|
|
1636
|
+
.steedos-overflow-visible-dialog.antd-Modal .antd-Modal-content {
|
|
1637
|
+
max-height: unset;
|
|
1638
|
+
}
|
|
1639
|
+
.steedos-overflow-visible-dialog.antd-Modal .antd-Modal-content .antd-Modal-body {
|
|
1640
|
+
overflow: visible;
|
|
1641
|
+
}
|
|
1635
1642
|
}
|
|
1636
1643
|
.steedos-object-form .steedos-input-rich-text-readonly .antd-RichTextControl {
|
|
1637
1644
|
border: 0;
|
|
@@ -1839,6 +1846,15 @@ body.steedos {
|
|
|
1839
1846
|
.steedos-object-table .datetime-min-w {
|
|
1840
1847
|
min-width: 12em;
|
|
1841
1848
|
}
|
|
1849
|
+
.steedos-object-table .antd-Table-table thead tr th {
|
|
1850
|
+
height: 32px !important;
|
|
1851
|
+
}
|
|
1852
|
+
.steedos-object-table .antd-Table-table tbody tr {
|
|
1853
|
+
height: 46px;
|
|
1854
|
+
}
|
|
1855
|
+
.page-list-split .steedos-object-table .antd-Table-table tbody tr.antd-Table-placeholder {
|
|
1856
|
+
height: var(--Table-placeholder-height);
|
|
1857
|
+
}
|
|
1842
1858
|
}
|
|
1843
1859
|
.steedos-object-table.steedos-crud-mode-cards .antd-Crud {
|
|
1844
1860
|
height: 100%;
|
|
@@ -1943,12 +1959,6 @@ body.steedos {
|
|
|
1943
1959
|
float: none;
|
|
1944
1960
|
}
|
|
1945
1961
|
}
|
|
1946
|
-
.antd-Table-table thead tr th {
|
|
1947
|
-
height: 32px !important;
|
|
1948
|
-
}
|
|
1949
|
-
.antd-Table-table tbody tr {
|
|
1950
|
-
height: 46px;
|
|
1951
|
-
}
|
|
1952
1962
|
|
|
1953
1963
|
@media (max-width: 768px) {
|
|
1954
1964
|
.record-detail-header-name {
|
|
@@ -1998,7 +2008,7 @@ body.steedos {
|
|
|
1998
2008
|
height: unset;
|
|
1999
2009
|
}
|
|
2000
2010
|
|
|
2001
|
-
#steedosGlobalFooterRoot .
|
|
2011
|
+
#steedosGlobalFooterRoot .steedos-global-footer {
|
|
2002
2012
|
height: 4rem;
|
|
2003
2013
|
position: fixed;
|
|
2004
2014
|
bottom: 0;
|
|
@@ -2038,44 +2048,12 @@ body.steedos {
|
|
|
2038
2048
|
.steedos-global-footer .antd-Nav-Menu-item.antd-Nav-Menu-item-selected {
|
|
2039
2049
|
background: transparent;
|
|
2040
2050
|
}
|
|
2041
|
-
.steedos-global-footer-popup .antd-Nav-Menu-item-wrap {
|
|
2042
|
-
align-items: center;
|
|
2043
|
-
}
|
|
2044
|
-
.steedos-global-footer-popup .antd-Nav-Menu-item-link {
|
|
2045
|
-
max-width: unset;
|
|
2046
|
-
}
|
|
2047
2051
|
.steedos-global-footer .antd-Nav-Menu-submenu-title {
|
|
2048
2052
|
height: 100% !important;
|
|
2049
2053
|
display: flex;
|
|
2050
2054
|
align-items: center;
|
|
2051
2055
|
}
|
|
2052
|
-
.
|
|
2053
|
-
flex-direction: unset !important;
|
|
2054
|
-
}
|
|
2055
|
-
.steedos-global-footer-popup {
|
|
2056
|
-
width: 100%;
|
|
2057
|
-
top: 54px !important;
|
|
2058
|
-
bottom: 64px !important;
|
|
2059
|
-
left: 0 !important;
|
|
2060
|
-
position: fixed !important;
|
|
2061
|
-
}
|
|
2062
|
-
.steedos-global-footer-popup .antd-Nav-Menu {
|
|
2063
|
-
height: 100%;
|
|
2064
|
-
overflow: auto;
|
|
2065
|
-
box-shadow: none;
|
|
2066
|
-
}
|
|
2067
|
-
.steedos-global-footer-popup .antd-Nav-Menu-item {
|
|
2068
|
-
padding-bottom: 10px;
|
|
2069
|
-
padding-top: 10px;
|
|
2070
|
-
border-bottom: 0.5px solid #e5e7eb;
|
|
2071
|
-
}
|
|
2072
|
-
.steedos-global-footer-popup .antd-Nav-Menu-item svg {
|
|
2073
|
-
margin-right: 12px;
|
|
2074
|
-
}
|
|
2075
|
-
.steedos-global-footer-popup .nav-label {
|
|
2076
|
-
font-size: 17px;
|
|
2077
|
-
}
|
|
2078
|
-
.steedos-global-footer-popup .antd-Nav-Menu-item-label-subTitle {
|
|
2056
|
+
ç .antd-Nav-Menu-item-label-subTitle {
|
|
2079
2057
|
max-width: 100% !important;
|
|
2080
2058
|
}
|
|
2081
2059
|
.steedos-global-footer-root .antd-Nav-Menu-horizontal.antd-Nav-Menu-light {
|
|
@@ -2091,6 +2069,15 @@ body.steedos {
|
|
|
2091
2069
|
.steedos-global-footer ul {
|
|
2092
2070
|
order: unset !important;
|
|
2093
2071
|
}
|
|
2072
|
+
.steedos-global-footer-menu-page {
|
|
2073
|
+
position: fixed;
|
|
2074
|
+
bottom: 64px;
|
|
2075
|
+
top: 53px;
|
|
2076
|
+
overflow: auto;
|
|
2077
|
+
height: unset;
|
|
2078
|
+
z-index: 1000;
|
|
2079
|
+
background-color: white;
|
|
2080
|
+
}
|
|
2094
2081
|
|
|
2095
2082
|
.sidebar-wrapper {
|
|
2096
2083
|
transition: 0.5s ease transform;
|
package/dist/amis-object.cjs.js
CHANGED
|
@@ -7602,6 +7602,7 @@ const getSetListviewFiltersButtonSchema = ()=>{
|
|
|
7602
7602
|
}
|
|
7603
7603
|
}
|
|
7604
7604
|
],
|
|
7605
|
+
"className": "steedos-overflow-visible-dialog",
|
|
7605
7606
|
"showCloseButton": true,
|
|
7606
7607
|
"showErrorMsg": true,
|
|
7607
7608
|
"showLoading": true,
|
|
@@ -8188,7 +8189,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
8188
8189
|
"value": crudKeywords,
|
|
8189
8190
|
"clearable": true,
|
|
8190
8191
|
"clearAndSubmit": true,
|
|
8191
|
-
"searchImediately":
|
|
8192
|
+
"searchImediately": false
|
|
8192
8193
|
}
|
|
8193
8194
|
]
|
|
8194
8195
|
}
|
|
@@ -8666,6 +8667,8 @@ async function lookupToAmisTreeSelect(field, readonly, ctx) {
|
|
|
8666
8667
|
return amisSchema;
|
|
8667
8668
|
}
|
|
8668
8669
|
|
|
8670
|
+
const keywordsSearchBoxName = `__keywords_lookup`;
|
|
8671
|
+
|
|
8669
8672
|
const getReferenceTo = async (field)=>{
|
|
8670
8673
|
let referenceTo = field.reference_to;
|
|
8671
8674
|
if(!referenceTo){
|
|
@@ -8909,8 +8912,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
8909
8912
|
|
|
8910
8913
|
source.data.$term = "$term";
|
|
8911
8914
|
source.data.$self = "$$";
|
|
8912
|
-
|
|
8913
|
-
let keywordsSearchBoxName = `__keywords_lookup__${field.name}__to__${refObjectConfig.name}`;
|
|
8914
8915
|
|
|
8915
8916
|
source.requestAdaptor = `
|
|
8916
8917
|
const selfData = JSON.parse(JSON.stringify(api.data.$self));
|
|
@@ -10318,7 +10319,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
10318
10319
|
suffix: "%",
|
|
10319
10320
|
pipeIn: (value, data) => {
|
|
10320
10321
|
if(value){
|
|
10321
|
-
|
|
10322
|
+
// 因为例如 1.11 * 100 的值不是111,所以调整下。
|
|
10323
|
+
const result = value*100;
|
|
10324
|
+
return Number(result.toFixed(field.scale));
|
|
10322
10325
|
}
|
|
10323
10326
|
return value;
|
|
10324
10327
|
},
|
|
@@ -19381,12 +19384,12 @@ var AmisProvider = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
19381
19384
|
/*
|
|
19382
19385
|
* @Author: baozhoutao@steedos.com
|
|
19383
19386
|
* @Date: 2022-09-01 14:44:57
|
|
19384
|
-
* @LastEditors:
|
|
19385
|
-
* @LastEditTime: 2023-
|
|
19387
|
+
* @LastEditors: 涂佳俊 tujiajun@steedos.com
|
|
19388
|
+
* @LastEditTime: 2023-11-22 09:07:37
|
|
19386
19389
|
* @Description:
|
|
19387
19390
|
*/
|
|
19388
19391
|
var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
19389
|
-
var app, data, className, _a, showAppName, _b, appNameClassName, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema;
|
|
19392
|
+
var app, data, className, _a, showAppName, _b, appNameClassName, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema, badgeText;
|
|
19390
19393
|
return __generator(this, function (_c) {
|
|
19391
19394
|
app = props.app, data = props.data, className = props.className, _a = props.showAppName, showAppName = _a === void 0 ? true : _a, _b = props.appNameClassName, appNameClassName = _b === void 0 ? '' : _b;
|
|
19392
19395
|
if (!app) {
|
|
@@ -19397,6 +19400,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
19397
19400
|
on_click_script = "\n var evalFunString = \"(function(){\" + event.data.on_click + \"})()\";\n try{\n eval(evalFunString);\n }\n catch(e){\n console.error(\"catch some error when eval the on_click script for app link:\");\n console.error(e.message + \"\\r\\n\" + e.stack);\n }\n ";
|
|
19398
19401
|
mobile_blank_script = "\n if(event.data.path[0] == \"/\"){\n Steedos.openWindow(event.data.context.rootUrl + event.data.path)\n }else{\n Steedos.openWindow(event.data.path)\n }\n ";
|
|
19399
19402
|
dialogSchema = {};
|
|
19403
|
+
badgeText = "${IF(${id} == 'approve_workflow',${ss:keyvalues.badge.value|pick:'workflow'},${keyvalues.badge.value|pick:${id}}) | toInt}";
|
|
19400
19404
|
if (isMobile) {
|
|
19401
19405
|
dialogSchema = {
|
|
19402
19406
|
"type": "service",
|
|
@@ -19415,8 +19419,8 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
19415
19419
|
"tpl": "<div class='flex flex-col justify-center'><div class='text-center'><svg class='w-12 h-12 slds-icon slds-icon_container slds-icon-standard-${REPLACE(icon, '_', '-' )}' aria-hidden='true'><use xlink:href='/assets/icons/standard-sprite/svg/symbols.svg#${icon}'></use></svg></div><div class='text-center text-lg'>${name}</div></div>",
|
|
19416
19420
|
"badge": {
|
|
19417
19421
|
"mode": "text",
|
|
19418
|
-
"text":
|
|
19419
|
-
"visibleOn":
|
|
19422
|
+
"text": badgeText,
|
|
19423
|
+
"visibleOn": badgeText,
|
|
19420
19424
|
"overflowCount": 99,
|
|
19421
19425
|
"style": {
|
|
19422
19426
|
"right": "50%",
|
|
@@ -19531,8 +19535,8 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
19531
19535
|
"tpl": "<div class='slds-app-launcher__tile slds-text-link_reset'><div class='slds-app-launcher__tile-figure'><svg class='w-12 h-12 slds-icon slds-icon_container slds-icon-standard-${REPLACE(icon, '_', '-')}' aria-hidden='true'><use xlink:href='/assets/icons/standard-sprite/svg/symbols.svg#${icon}'></use></svg><span class='slds-assistive-text'>${name}</span></div><div class='slds-app-launcher__tile-body'><span class='slds-link text-blue-600 text-lg'><span title='${name}'>${name}</span></span><div style='display: -webkit-box; -webkit-line-clamp: 1;-webkit-box-orient: vertical;overflow: hidden;'><span title='${description}'>${description}</span></div></div></div>",
|
|
19532
19536
|
"badge": {
|
|
19533
19537
|
"mode": "text",
|
|
19534
|
-
"text":
|
|
19535
|
-
"visibleOn":
|
|
19538
|
+
"text": badgeText,
|
|
19539
|
+
"visibleOn": badgeText,
|
|
19536
19540
|
"className": "w-full",
|
|
19537
19541
|
"overflowCount": 99,
|
|
19538
19542
|
"style": {
|
|
@@ -19541,7 +19545,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
19541
19545
|
"height": "20px",
|
|
19542
19546
|
"border-radius": "10px",
|
|
19543
19547
|
"line-height": "18px",
|
|
19544
|
-
"margin-left": "${
|
|
19548
|
+
"margin-left": "${" + badgeText + ">9?(" + badgeText + ">99?'-21px':'-11px'):'0'}",
|
|
19545
19549
|
"right": "auto",
|
|
19546
19550
|
"font-size": "16px"
|
|
19547
19551
|
}
|
|
@@ -19783,12 +19787,12 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
19783
19787
|
/*
|
|
19784
19788
|
* @Author: baozhoutao@steedos.com
|
|
19785
19789
|
* @Date: 2022-09-01 14:44:57
|
|
19786
|
-
* @LastEditors:
|
|
19787
|
-
* @LastEditTime: 2023-
|
|
19790
|
+
* @LastEditors: 涂佳俊 tujiajun@steedos.com
|
|
19791
|
+
* @LastEditTime: 2023-11-23 14:33:45
|
|
19788
19792
|
* @Description:
|
|
19789
19793
|
*/
|
|
19790
19794
|
var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
19791
|
-
var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, schema;
|
|
19795
|
+
var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, footerNavEach, footerNavScript, menuNavScript, schema;
|
|
19792
19796
|
return __generator(this, function (_e) {
|
|
19793
19797
|
_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;
|
|
19794
19798
|
if (!appId) {
|
|
@@ -19796,6 +19800,9 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
|
|
|
19796
19800
|
}
|
|
19797
19801
|
isMobile = window.innerWidth <= 768;
|
|
19798
19802
|
className = 'steedos-global-footer';
|
|
19803
|
+
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 ";
|
|
19804
|
+
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 ");
|
|
19805
|
+
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 ";
|
|
19799
19806
|
schema = {};
|
|
19800
19807
|
if (links) {
|
|
19801
19808
|
schema = {
|
|
@@ -19820,13 +19827,14 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
|
|
|
19820
19827
|
schemaApi: {
|
|
19821
19828
|
"method": "get",
|
|
19822
19829
|
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
|
|
19823
|
-
"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
|
|
19830
|
+
"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 "),
|
|
19824
19831
|
"headers": {
|
|
19825
19832
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
19826
19833
|
}
|
|
19827
19834
|
}
|
|
19828
19835
|
};
|
|
19829
19836
|
}
|
|
19837
|
+
console.log("payload===>", schema);
|
|
19830
19838
|
return [2 /*return*/, schema];
|
|
19831
19839
|
});
|
|
19832
19840
|
}); };
|