@steedos/service-pages 2.4.15-beta.2 → 2.4.15-beta.4
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.
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
Record: {},
|
|
13
13
|
Listview: {},
|
|
14
14
|
Header: {},
|
|
15
|
+
Footer: {},
|
|
15
16
|
RelatedListview: {},
|
|
16
17
|
Form: {
|
|
17
18
|
StandardNew: {},
|
|
@@ -849,175 +850,64 @@
|
|
|
849
850
|
name: "globalHeader",
|
|
850
851
|
body: [
|
|
851
852
|
{
|
|
852
|
-
"type": "
|
|
853
|
-
"
|
|
854
|
-
body: [
|
|
855
|
-
{
|
|
856
|
-
"type": "wrapper",
|
|
857
|
-
"className": "bg-white sticky p-0 top-0 z-40 w-full flex-none backdrop-blur transition-colors duration-500 lg:z-50 sm:shadow border-b-[3px] border-sky-500 border-solid steedos-header-container",
|
|
858
|
-
body: [
|
|
859
|
-
{
|
|
860
|
-
"type": "wrapper",
|
|
861
|
-
"className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center steedos-header-container-line-one',
|
|
862
|
-
"body": [
|
|
863
|
-
{
|
|
864
|
-
type: "wrapper",
|
|
865
|
-
className: 'p-0 flex flex-1 items-center',
|
|
866
|
-
body: [
|
|
867
|
-
{
|
|
868
|
-
"type": "button",
|
|
869
|
-
"className": "toggle-sidebar flex items-center pr-4",
|
|
870
|
-
"hiddenOn": "${!isMobile}",
|
|
871
|
-
"onEvent": {
|
|
872
|
-
"click": {
|
|
873
|
-
"actions": [
|
|
874
|
-
{
|
|
875
|
-
"actionType": "custom",
|
|
876
|
-
"script": "document.body.classList.toggle('sidebar-open')",
|
|
877
|
-
}
|
|
878
|
-
]
|
|
879
|
-
}
|
|
880
|
-
},
|
|
881
|
-
"body": [
|
|
882
|
-
{
|
|
883
|
-
"type": "steedos-icon",
|
|
884
|
-
"category": "utility",
|
|
885
|
-
"name": "rows",
|
|
886
|
-
"colorVariant": "default",
|
|
887
|
-
"id": "u:afc3a08e8cf3",
|
|
888
|
-
"className": "slds-button_icon slds-global-header__icon"
|
|
889
|
-
}
|
|
890
|
-
],
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
"className": 'block h-10 w-auto mr-4',
|
|
894
|
-
"type": "tpl",
|
|
895
|
-
"tpl": `<a href='/app' class='flex items-center '><img class='block h-10 w-auto' src='${logoSrc}'></a>`,
|
|
896
|
-
},
|
|
897
|
-
],
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
"type": "steedos-global-header",
|
|
901
|
-
"label": "Global Header",
|
|
902
|
-
className: 'flex flex-nowrap gap-x-3 items-center',
|
|
903
|
-
logoutScript: "window.Steedos.logout();",
|
|
904
|
-
customButtons: [
|
|
905
|
-
{
|
|
906
|
-
"type": "button",
|
|
907
|
-
"className": "toggle-sidebar",
|
|
908
|
-
"visibleOn": "${AND(app.showSidebar,!isMobile)}",
|
|
909
|
-
"onEvent": {
|
|
910
|
-
"click": {
|
|
911
|
-
"actions": [
|
|
912
|
-
{
|
|
913
|
-
"actionType": "custom",
|
|
914
|
-
"script": "document.body.classList.toggle('sidebar-open')",
|
|
915
|
-
}
|
|
916
|
-
]
|
|
917
|
-
}
|
|
918
|
-
},
|
|
919
|
-
"body": [
|
|
920
|
-
{
|
|
921
|
-
"type": "steedos-icon",
|
|
922
|
-
"category": "utility",
|
|
923
|
-
"name": "rows",
|
|
924
|
-
"colorVariant": "default",
|
|
925
|
-
"id": "u:afc3a08e8cf3",
|
|
926
|
-
"className": "slds-button_icon slds-global-header__icon"
|
|
927
|
-
}
|
|
928
|
-
],
|
|
929
|
-
},
|
|
930
|
-
{
|
|
931
|
-
"type": "steedos-app-launcher",
|
|
932
|
-
"showAppName": false,
|
|
933
|
-
"appId": "${app.id}",
|
|
934
|
-
"visibleOn": "${isMobile}",
|
|
935
|
-
},
|
|
936
|
-
]
|
|
937
|
-
}
|
|
938
|
-
],
|
|
939
|
-
},
|
|
940
|
-
|
|
941
|
-
{
|
|
942
|
-
"type": "grid",
|
|
943
|
-
"hiddenOn": "${isMobile}",
|
|
944
|
-
"className": 'steedos-context-bar flex flex-nowrap h-10 leading-5 pl-4 mb-[-3px] steedos-header-container-line-two',
|
|
945
|
-
"columns": [
|
|
946
|
-
{
|
|
947
|
-
"columnClassName": "items-center flex pb-0",
|
|
948
|
-
"body": [
|
|
949
|
-
{
|
|
950
|
-
"type": "steedos-app-launcher",
|
|
951
|
-
"showAppName": true,
|
|
952
|
-
"appId": "${app.id}",
|
|
953
|
-
}
|
|
954
|
-
],
|
|
955
|
-
"md": "auto",
|
|
956
|
-
"valign": "middle"
|
|
957
|
-
},
|
|
958
|
-
{
|
|
959
|
-
hiddenOn: "${app.showSidebar === true}",
|
|
960
|
-
"columnClassName": "flex overflow-hidden",
|
|
961
|
-
"body": [
|
|
962
|
-
{
|
|
963
|
-
"type": "steedos-app-menu",
|
|
964
|
-
"stacked": false,
|
|
965
|
-
showIcon: false,
|
|
966
|
-
"appId": "${app.id}",
|
|
967
|
-
hiddenOn: "${app.showSidebar === true}",
|
|
968
|
-
overflow: {
|
|
969
|
-
enable: false,
|
|
970
|
-
itemWidth: 80,
|
|
971
|
-
},
|
|
972
|
-
"id": "u:77851eb4aa89",
|
|
973
|
-
}
|
|
974
|
-
],
|
|
975
|
-
"id": "u:5367229505d8",
|
|
976
|
-
"md": "",
|
|
977
|
-
"valign": "middle",
|
|
978
|
-
}
|
|
979
|
-
],
|
|
980
|
-
},
|
|
981
|
-
],
|
|
982
|
-
},
|
|
983
|
-
|
|
984
|
-
{
|
|
985
|
-
|
|
986
|
-
"type": "button",
|
|
987
|
-
"className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
|
|
988
|
-
hiddenOn: "${app.showSidebar != true}",
|
|
989
|
-
body: [{
|
|
990
|
-
type: "wrapper",
|
|
991
|
-
className: 'sidebar-wrapper px-0 pt-4 pb-24 fixed z-20 h-full ease-in-out duration-300 flex flex-col border-r overflow-y-auto bg-white border-slate-200 block -translate-x-0 sm:w-[220px] w-64',
|
|
992
|
-
body: [
|
|
993
|
-
{
|
|
994
|
-
"type": "steedos-app-launcher",
|
|
995
|
-
"className": "px-4 pb-4",
|
|
996
|
-
"visibleOn": "${isMobile}",
|
|
997
|
-
"showAppName": true
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
"type": "steedos-app-menu",
|
|
1001
|
-
"stacked": true,
|
|
1002
|
-
"appId": "${app.id}",
|
|
1003
|
-
},
|
|
1004
|
-
]
|
|
1005
|
-
}],
|
|
1006
|
-
"onEvent": {
|
|
1007
|
-
"click": {
|
|
1008
|
-
"actions": [
|
|
1009
|
-
{
|
|
1010
|
-
"actionType": "custom",
|
|
1011
|
-
"script": "console.log(event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
|
|
1012
|
-
}
|
|
1013
|
-
]
|
|
1014
|
-
}
|
|
1015
|
-
},
|
|
1016
|
-
}
|
|
1017
|
-
],
|
|
853
|
+
"type": "steedos-global-header",
|
|
854
|
+
"logoSrc": logoSrc
|
|
1018
855
|
},
|
|
1019
856
|
]
|
|
1020
857
|
}
|
|
1021
858
|
}
|
|
1022
859
|
}
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
Steedos.Page.Footer.render = function(appId, tabId){
|
|
864
|
+
let app = _.find(Session.get('app_menus'), {id: appId}) || {}
|
|
865
|
+
if(_.isEmpty(app)){
|
|
866
|
+
return ;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
try {
|
|
870
|
+
const data = {
|
|
871
|
+
app,
|
|
872
|
+
isMobile: window.innerWidth <= 768
|
|
873
|
+
};
|
|
874
|
+
const page = Steedos.Page.Footer.getPage(appId, tabId);
|
|
875
|
+
var rootId = "steedosGlobalFooterRoot";
|
|
876
|
+
var modalRoot = document.getElementById(rootId);
|
|
877
|
+
if (!modalRoot) {
|
|
878
|
+
modalRoot = document.createElement('div');
|
|
879
|
+
modalRoot.setAttribute('id', rootId);
|
|
880
|
+
modalRoot.setAttribute('class', 'h-full');
|
|
881
|
+
$(".steedos-global-footer-root")[0].appendChild(modalRoot);
|
|
882
|
+
}
|
|
883
|
+
if (page.render_engine && page.render_engine != 'redash') {
|
|
884
|
+
// console.log("Steedos.Page.Header.render", appId, tabId, page)
|
|
885
|
+
return Steedos.Page.render($("#" + rootId)[0], page, Object.assign({}, data));
|
|
886
|
+
}
|
|
887
|
+
} catch (error) {
|
|
888
|
+
console.error(`Steedos.Page.Footer.render`, error)
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
Steedos.Page.Footer.getPage = function(appId, tabId){
|
|
892
|
+
return {
|
|
893
|
+
render_engine: 'amis',
|
|
894
|
+
name: 'steedosGlobalFooterPage',
|
|
895
|
+
schema: {
|
|
896
|
+
"type": "service",
|
|
897
|
+
"name": "globalFooter",
|
|
898
|
+
"body": [
|
|
899
|
+
{
|
|
900
|
+
"type": "steedos-global-Footer",
|
|
901
|
+
overflow: {
|
|
902
|
+
enable: false,
|
|
903
|
+
maxVisibleCount: 4,
|
|
904
|
+
overflowPopoverClassName: "footer-popup"
|
|
905
|
+
},
|
|
906
|
+
"id": "u:77851eb4aa89",
|
|
907
|
+
"appId": "${app.id}"
|
|
908
|
+
},
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
1023
913
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "2.4.15-beta.
|
|
3
|
+
"version": "2.4.15-beta.4",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "e194dfdd0682b117f8442cd72db0c55414885f4c",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"ejs": "^3.1.8"
|
|
14
14
|
}
|