@steedos-widgets/amis-object 3.6.7 → 3.6.9
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/AmisAppLauncher.d.ts +1 -32
- package/dist/amis-object.cjs.css +4 -0
- package/dist/amis-object.cjs.js +14 -17
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +4 -0
- package/dist/amis-object.esm.js +14 -17
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +4 -0
- package/dist/amis-object.umd.js +4 -4
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +21 -21
- package/package.json +3 -3
|
@@ -5,38 +5,7 @@ export declare const AmisAppLauncher: (props: any) => Promise<{
|
|
|
5
5
|
type: string;
|
|
6
6
|
actionType: string;
|
|
7
7
|
className: string;
|
|
8
|
-
body:
|
|
9
|
-
type: string;
|
|
10
|
-
className: string;
|
|
11
|
-
tpl: string;
|
|
12
|
-
badge: {
|
|
13
|
-
visibleOn: string;
|
|
14
|
-
offset: number[];
|
|
15
|
-
style: {
|
|
16
|
-
width: string;
|
|
17
|
-
height: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
hiddenOn?: undefined;
|
|
21
|
-
icon?: undefined;
|
|
22
|
-
visibleOn?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
type: string;
|
|
25
|
-
className: string;
|
|
26
|
-
tpl: string;
|
|
27
|
-
hiddenOn: string;
|
|
28
|
-
badge?: undefined;
|
|
29
|
-
icon?: undefined;
|
|
30
|
-
visibleOn?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
type: string;
|
|
33
|
-
icon: string;
|
|
34
|
-
visibleOn: string;
|
|
35
|
-
className: string;
|
|
36
|
-
tpl?: undefined;
|
|
37
|
-
badge?: undefined;
|
|
38
|
-
hiddenOn?: undefined;
|
|
39
|
-
})[];
|
|
8
|
+
body: any[];
|
|
40
9
|
dialog: {
|
|
41
10
|
size: string;
|
|
42
11
|
title: {
|
package/dist/amis-object.cjs.css
CHANGED
package/dist/amis-object.cjs.js
CHANGED
|
@@ -22143,9 +22143,9 @@ var AmisProvider = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
22143
22143
|
* @Description:
|
|
22144
22144
|
*/
|
|
22145
22145
|
var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
22146
|
-
var app, data, className, _a, showAppName, _b, appNameClassName, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema, badgeText;
|
|
22147
|
-
return __generator(this, function (
|
|
22148
|
-
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;
|
|
22146
|
+
var app, data, className, _a, showAppName, _b, appNameClassName, _c, customElements, _d, showAppIcon, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema, badgeText;
|
|
22147
|
+
return __generator(this, function (_e) {
|
|
22148
|
+
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, _c = props.customElements, customElements = _c === void 0 ? [] : _c, _d = props.showAppIcon, showAppIcon = _d === void 0 ? true : _d;
|
|
22149
22149
|
if (!app) {
|
|
22150
22150
|
app = data.context.app;
|
|
22151
22151
|
}
|
|
@@ -22439,7 +22439,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22439
22439
|
"type": "button",
|
|
22440
22440
|
"actionType": "dialog",
|
|
22441
22441
|
"className": "flex items-center",
|
|
22442
|
-
"body": [
|
|
22442
|
+
"body": __spreadArray([
|
|
22443
22443
|
{
|
|
22444
22444
|
"type": "tpl",
|
|
22445
22445
|
"className": "flex items-center",
|
|
@@ -22451,21 +22451,16 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22451
22451
|
"width": "8px",
|
|
22452
22452
|
"height": "8px"
|
|
22453
22453
|
}
|
|
22454
|
-
}
|
|
22454
|
+
},
|
|
22455
|
+
"hiddenOn": "".concat(!showAppIcon)
|
|
22455
22456
|
},
|
|
22456
22457
|
{
|
|
22457
22458
|
type: 'tpl',
|
|
22458
22459
|
className: "text-xl ml-4 mr-4 text-black nowrap ".concat(appNameClassName, " "),
|
|
22459
22460
|
tpl: '${app.name}',
|
|
22460
22461
|
hiddenOn: "".concat(!!app || !!!showAppName)
|
|
22461
|
-
},
|
|
22462
|
-
{
|
|
22463
|
-
"type": "icon",
|
|
22464
|
-
"icon": "angle-down",
|
|
22465
|
-
"visibleOn": "".concat(isMobile),
|
|
22466
|
-
"className": "absolute right-0"
|
|
22467
22462
|
}
|
|
22468
|
-
],
|
|
22463
|
+
], __read(customElements), false),
|
|
22469
22464
|
"dialog": {
|
|
22470
22465
|
"size": "xl",
|
|
22471
22466
|
"title": {
|
|
@@ -22563,7 +22558,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
|
|
|
22563
22558
|
isMobile = window.innerWidth <= 768;
|
|
22564
22559
|
className = 'steedos-global-footer';
|
|
22565
22560
|
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 ";
|
|
22566
|
-
footerNavScript = "\n _.each(_.slice(payload.children, 0, 3), (tab,index)=>{\n ".concat(footerNavEach, "\n })\n data.nav.push({\n
|
|
22561
|
+
footerNavScript = "\n _.each(_.slice(payload.children, 0, 3), (tab,index)=>{\n ".concat(footerNavEach, "\n })\n if (!").concat(data.app.is_hide_mobile_menu, ") {\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 ");
|
|
22567
22562
|
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 ";
|
|
22568
22563
|
schema = {};
|
|
22569
22564
|
if (links) {
|
|
@@ -22589,7 +22584,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
|
|
|
22589
22584
|
schemaApi: {
|
|
22590
22585
|
"method": "get",
|
|
22591
22586
|
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
|
|
22592
|
-
"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 \"title\": {\n \"type\": \"steedos-app-launcher\",\n \"showAppName\": true,\n \"appId\": \"").concat(appId, "\",\n },\n \"className\": \"steedos-global-footer-menu-page\",\n \"visibleOn\": \"${isMenuNavVisible}\",\n \"body\": [\n {\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 };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
|
|
22587
|
+
"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 \"title\": {\n \"type\": \"steedos-app-launcher\",\n \"showAppName\": true,\n \"showAppIcon\": false,\n \"appNameClassName\": \"!mx-0\",\n \"appId\": \"").concat(appId, "\",\n \"customElements\": [\n {\n \"type\": \"icon\",\n \"icon\": \"angle-down\",\n \"className\": \"absolute right-0\"\n }\n ]\n },\n \"className\": \"steedos-global-footer-menu-page\",\n \"visibleOn\": \"${isMenuNavVisible}\",\n \"body\": [\n {\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 };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
|
|
22593
22588
|
"headers": {
|
|
22594
22589
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
22595
22590
|
}
|
|
@@ -22650,10 +22645,12 @@ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0
|
|
|
22650
22645
|
"className": "slds-button_icon slds-global-header__icon"
|
|
22651
22646
|
}
|
|
22652
22647
|
],
|
|
22653
|
-
"label": instance.t('frontend_help')
|
|
22648
|
+
"label": instance.t('frontend_help'),
|
|
22649
|
+
"className": "steedos-header-toolbar-help"
|
|
22654
22650
|
},
|
|
22655
22651
|
{
|
|
22656
22652
|
"type": "dropdown-button",
|
|
22653
|
+
"className": "steedos-header-toolbar-setup",
|
|
22657
22654
|
"visibleOn": "${window:innerWidth > 768}",
|
|
22658
22655
|
"label": false,
|
|
22659
22656
|
"trigger": "click",
|
|
@@ -22920,7 +22917,7 @@ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0
|
|
|
22920
22917
|
}
|
|
22921
22918
|
],
|
|
22922
22919
|
"id": "u:857e8161c96b",
|
|
22923
|
-
"className": "antd-Action",
|
|
22920
|
+
"className": "antd-Action steedos-header-toolbar-notifications",
|
|
22924
22921
|
"open": false
|
|
22925
22922
|
},
|
|
22926
22923
|
{
|
|
@@ -23070,7 +23067,7 @@ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0
|
|
|
23070
23067
|
],
|
|
23071
23068
|
}
|
|
23072
23069
|
],
|
|
23073
|
-
"className": "antd-Action"
|
|
23070
|
+
"className": "antd-Action steedos-header-toolbar-user"
|
|
23074
23071
|
}
|
|
23075
23072
|
], false)
|
|
23076
23073
|
}];
|