@steedos-widgets/amis-object 1.3.11 → 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 +25 -47
- package/dist/amis-object.cjs.js +10 -6
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +25 -47
- package/dist/amis-object.esm.js +10 -6
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +25 -47
- package/dist/amis-object.umd.js +9 -9
- 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
|
}
|
|
@@ -2007,7 +2008,7 @@ body.steedos {
|
|
|
2007
2008
|
height: unset;
|
|
2008
2009
|
}
|
|
2009
2010
|
|
|
2010
|
-
#steedosGlobalFooterRoot .
|
|
2011
|
+
#steedosGlobalFooterRoot .steedos-global-footer {
|
|
2011
2012
|
height: 4rem;
|
|
2012
2013
|
position: fixed;
|
|
2013
2014
|
bottom: 0;
|
|
@@ -2047,44 +2048,12 @@ body.steedos {
|
|
|
2047
2048
|
.steedos-global-footer .antd-Nav-Menu-item.antd-Nav-Menu-item-selected {
|
|
2048
2049
|
background: transparent;
|
|
2049
2050
|
}
|
|
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
2051
|
.steedos-global-footer .antd-Nav-Menu-submenu-title {
|
|
2057
2052
|
height: 100% !important;
|
|
2058
2053
|
display: flex;
|
|
2059
2054
|
align-items: center;
|
|
2060
2055
|
}
|
|
2061
|
-
.
|
|
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 {
|
|
2056
|
+
ç .antd-Nav-Menu-item-label-subTitle {
|
|
2088
2057
|
max-width: 100% !important;
|
|
2089
2058
|
}
|
|
2090
2059
|
.steedos-global-footer-root .antd-Nav-Menu-horizontal.antd-Nav-Menu-light {
|
|
@@ -2100,6 +2069,15 @@ body.steedos {
|
|
|
2100
2069
|
.steedos-global-footer ul {
|
|
2101
2070
|
order: unset !important;
|
|
2102
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
|
+
}
|
|
2103
2081
|
|
|
2104
2082
|
.sidebar-wrapper {
|
|
2105
2083
|
transition: 0.5s ease transform;
|
package/dist/amis-object.cjs.js
CHANGED
|
@@ -8667,6 +8667,8 @@ async function lookupToAmisTreeSelect(field, readonly, ctx) {
|
|
|
8667
8667
|
return amisSchema;
|
|
8668
8668
|
}
|
|
8669
8669
|
|
|
8670
|
+
const keywordsSearchBoxName = `__keywords_lookup`;
|
|
8671
|
+
|
|
8670
8672
|
const getReferenceTo = async (field)=>{
|
|
8671
8673
|
let referenceTo = field.reference_to;
|
|
8672
8674
|
if(!referenceTo){
|
|
@@ -8910,8 +8912,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
8910
8912
|
|
|
8911
8913
|
source.data.$term = "$term";
|
|
8912
8914
|
source.data.$self = "$$";
|
|
8913
|
-
|
|
8914
|
-
let keywordsSearchBoxName = `__keywords_lookup__${field.name}__to__${refObjectConfig.name}`;
|
|
8915
8915
|
|
|
8916
8916
|
source.requestAdaptor = `
|
|
8917
8917
|
const selfData = JSON.parse(JSON.stringify(api.data.$self));
|
|
@@ -19787,12 +19787,12 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
19787
19787
|
/*
|
|
19788
19788
|
* @Author: baozhoutao@steedos.com
|
|
19789
19789
|
* @Date: 2022-09-01 14:44:57
|
|
19790
|
-
* @LastEditors:
|
|
19791
|
-
* @LastEditTime: 2023-
|
|
19790
|
+
* @LastEditors: 涂佳俊 tujiajun@steedos.com
|
|
19791
|
+
* @LastEditTime: 2023-11-23 14:33:45
|
|
19792
19792
|
* @Description:
|
|
19793
19793
|
*/
|
|
19794
19794
|
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;
|
|
19795
|
+
var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, footerNavEach, footerNavScript, menuNavScript, schema;
|
|
19796
19796
|
return __generator(this, function (_e) {
|
|
19797
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;
|
|
19798
19798
|
if (!appId) {
|
|
@@ -19800,6 +19800,9 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
|
|
|
19800
19800
|
}
|
|
19801
19801
|
isMobile = window.innerWidth <= 768;
|
|
19802
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 ";
|
|
19803
19806
|
schema = {};
|
|
19804
19807
|
if (links) {
|
|
19805
19808
|
schema = {
|
|
@@ -19824,13 +19827,14 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
|
|
|
19824
19827
|
schemaApi: {
|
|
19825
19828
|
"method": "get",
|
|
19826
19829
|
"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
|
|
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 "),
|
|
19828
19831
|
"headers": {
|
|
19829
19832
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
19830
19833
|
}
|
|
19831
19834
|
}
|
|
19832
19835
|
};
|
|
19833
19836
|
}
|
|
19837
|
+
console.log("payload===>", schema);
|
|
19834
19838
|
return [2 /*return*/, schema];
|
|
19835
19839
|
});
|
|
19836
19840
|
}); };
|