@steedos/service-pages 2.4.15-beta.1 → 2.4.15-beta.11
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: {},
|
|
@@ -351,14 +352,32 @@
|
|
|
351
352
|
if (updateProps && self.pageName) {
|
|
352
353
|
try {
|
|
353
354
|
if (SteedosUI.refs[self.pageName]) {
|
|
355
|
+
let queryParams = FlowRouter.current().queryParams
|
|
356
|
+
|
|
357
|
+
if(_.isArray(queryParams.side_object)){
|
|
358
|
+
if(queryParams.side_object.length >= 1){
|
|
359
|
+
queryParams.side_object = queryParams.side_object[0]
|
|
360
|
+
}else{
|
|
361
|
+
queryParams.side_object = ''
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if(_.isArray(queryParams.side_listview_id)){
|
|
366
|
+
if(queryParams.side_listview_id.length >= 1){
|
|
367
|
+
queryParams.side_listview_id = queryParams.side_listview_id[0]
|
|
368
|
+
}else{
|
|
369
|
+
queryParams.side_listview_id = ''
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
|
|
354
373
|
updatePropsData = {
|
|
355
374
|
objectName: objectName,
|
|
356
375
|
pageType: regions.pageType,
|
|
357
376
|
listViewId: regions.listViewId,
|
|
358
|
-
...
|
|
377
|
+
...queryParams
|
|
359
378
|
};
|
|
360
|
-
if(
|
|
361
|
-
updatePropsData.listName=
|
|
379
|
+
if(queryParams.side_listview_id){
|
|
380
|
+
updatePropsData.listName=queryParams.side_listview_id
|
|
362
381
|
}else if(regions.listViewId){
|
|
363
382
|
updatePropsData.listName=regions.listViewId
|
|
364
383
|
}
|
|
@@ -447,11 +466,36 @@
|
|
|
447
466
|
}
|
|
448
467
|
|
|
449
468
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
469
|
+
if(_.isArray(data.side_object)){
|
|
470
|
+
if(data.side_object.length >= 1){
|
|
471
|
+
data.side_object = data.side_object[0]
|
|
472
|
+
}else{
|
|
473
|
+
data.side_object = ''
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if(_.isArray(data.side_listview_id)){
|
|
478
|
+
if(data.side_listview_id.length >= 1){
|
|
479
|
+
data.side_listview_id = data.side_listview_id[0]
|
|
480
|
+
}else{
|
|
481
|
+
data.side_listview_id = ''
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
450
485
|
if(FlowRouter.current().queryParams.side_listview_id){
|
|
451
486
|
data.listName = FlowRouter.current().queryParams.side_listview_id;
|
|
452
487
|
}else if(data.listViewId){
|
|
453
488
|
data.listName = data.listViewId;
|
|
454
489
|
}
|
|
490
|
+
|
|
491
|
+
if(_.isArray(data.listName)){
|
|
492
|
+
if(data.listName.length >= 1){
|
|
493
|
+
data.listName = data.listName[0]
|
|
494
|
+
}else{
|
|
495
|
+
data.listName = ''
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
455
499
|
return Steedos.Page.render($("#" + rootId)[0], page, Object.assign({}, options, data, {recordId}));
|
|
456
500
|
}
|
|
457
501
|
} catch (error) {
|
|
@@ -806,175 +850,64 @@
|
|
|
806
850
|
name: "globalHeader",
|
|
807
851
|
body: [
|
|
808
852
|
{
|
|
809
|
-
"type": "
|
|
810
|
-
"
|
|
811
|
-
body: [
|
|
812
|
-
{
|
|
813
|
-
"type": "wrapper",
|
|
814
|
-
"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",
|
|
815
|
-
body: [
|
|
816
|
-
{
|
|
817
|
-
"type": "wrapper",
|
|
818
|
-
"className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center steedos-header-container-line-one',
|
|
819
|
-
"body": [
|
|
820
|
-
{
|
|
821
|
-
type: "wrapper",
|
|
822
|
-
className: 'p-0 flex flex-1 items-center',
|
|
823
|
-
body: [
|
|
824
|
-
{
|
|
825
|
-
"type": "button",
|
|
826
|
-
"className": "toggle-sidebar flex items-center pr-4",
|
|
827
|
-
"hiddenOn": "${!isMobile}",
|
|
828
|
-
"onEvent": {
|
|
829
|
-
"click": {
|
|
830
|
-
"actions": [
|
|
831
|
-
{
|
|
832
|
-
"actionType": "custom",
|
|
833
|
-
"script": "document.body.classList.toggle('sidebar-open')",
|
|
834
|
-
}
|
|
835
|
-
]
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
"body": [
|
|
839
|
-
{
|
|
840
|
-
"type": "steedos-icon",
|
|
841
|
-
"category": "utility",
|
|
842
|
-
"name": "rows",
|
|
843
|
-
"colorVariant": "default",
|
|
844
|
-
"id": "u:afc3a08e8cf3",
|
|
845
|
-
"className": "slds-button_icon slds-global-header__icon"
|
|
846
|
-
}
|
|
847
|
-
],
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
"className": 'block h-10 w-auto mr-4',
|
|
851
|
-
"type": "tpl",
|
|
852
|
-
"tpl": `<a href='/app' class='flex items-center '><img class='block h-10 w-auto' src='${logoSrc}'></a>`,
|
|
853
|
-
},
|
|
854
|
-
],
|
|
855
|
-
},
|
|
856
|
-
{
|
|
857
|
-
"type": "steedos-global-header",
|
|
858
|
-
"label": "Global Header",
|
|
859
|
-
className: 'flex flex-nowrap gap-x-3 items-center',
|
|
860
|
-
logoutScript: "window.Steedos.logout();",
|
|
861
|
-
customButtons: [
|
|
862
|
-
{
|
|
863
|
-
"type": "button",
|
|
864
|
-
"className": "toggle-sidebar",
|
|
865
|
-
"visibleOn": "${AND(app.showSidebar,!isMobile)}",
|
|
866
|
-
"onEvent": {
|
|
867
|
-
"click": {
|
|
868
|
-
"actions": [
|
|
869
|
-
{
|
|
870
|
-
"actionType": "custom",
|
|
871
|
-
"script": "document.body.classList.toggle('sidebar-open')",
|
|
872
|
-
}
|
|
873
|
-
]
|
|
874
|
-
}
|
|
875
|
-
},
|
|
876
|
-
"body": [
|
|
877
|
-
{
|
|
878
|
-
"type": "steedos-icon",
|
|
879
|
-
"category": "utility",
|
|
880
|
-
"name": "rows",
|
|
881
|
-
"colorVariant": "default",
|
|
882
|
-
"id": "u:afc3a08e8cf3",
|
|
883
|
-
"className": "slds-button_icon slds-global-header__icon"
|
|
884
|
-
}
|
|
885
|
-
],
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
"type": "steedos-app-launcher",
|
|
889
|
-
"showAppName": false,
|
|
890
|
-
"appId": "${app.id}",
|
|
891
|
-
"visibleOn": "${isMobile}",
|
|
892
|
-
},
|
|
893
|
-
]
|
|
894
|
-
}
|
|
895
|
-
],
|
|
896
|
-
},
|
|
897
|
-
|
|
898
|
-
{
|
|
899
|
-
"type": "grid",
|
|
900
|
-
"hiddenOn": "${isMobile}",
|
|
901
|
-
"className": 'steedos-context-bar flex flex-nowrap h-10 leading-5 pl-4 mb-[-3px] steedos-header-container-line-two',
|
|
902
|
-
"columns": [
|
|
903
|
-
{
|
|
904
|
-
"columnClassName": "items-center flex pb-0",
|
|
905
|
-
"body": [
|
|
906
|
-
{
|
|
907
|
-
"type": "steedos-app-launcher",
|
|
908
|
-
"showAppName": true,
|
|
909
|
-
"appId": "${app.id}",
|
|
910
|
-
}
|
|
911
|
-
],
|
|
912
|
-
"md": "auto",
|
|
913
|
-
"valign": "middle"
|
|
914
|
-
},
|
|
915
|
-
{
|
|
916
|
-
hiddenOn: "${app.showSidebar === true}",
|
|
917
|
-
"columnClassName": "flex overflow-hidden",
|
|
918
|
-
"body": [
|
|
919
|
-
{
|
|
920
|
-
"type": "steedos-app-menu",
|
|
921
|
-
"stacked": false,
|
|
922
|
-
showIcon: false,
|
|
923
|
-
"appId": "${app.id}",
|
|
924
|
-
hiddenOn: "${app.showSidebar === true}",
|
|
925
|
-
overflow: {
|
|
926
|
-
enable: false,
|
|
927
|
-
itemWidth: 80,
|
|
928
|
-
},
|
|
929
|
-
"id": "u:77851eb4aa89",
|
|
930
|
-
}
|
|
931
|
-
],
|
|
932
|
-
"id": "u:5367229505d8",
|
|
933
|
-
"md": "",
|
|
934
|
-
"valign": "middle",
|
|
935
|
-
}
|
|
936
|
-
],
|
|
937
|
-
},
|
|
938
|
-
],
|
|
939
|
-
},
|
|
940
|
-
|
|
941
|
-
{
|
|
942
|
-
|
|
943
|
-
"type": "button",
|
|
944
|
-
"className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
|
|
945
|
-
hiddenOn: "${app.showSidebar != true}",
|
|
946
|
-
body: [{
|
|
947
|
-
type: "wrapper",
|
|
948
|
-
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',
|
|
949
|
-
body: [
|
|
950
|
-
{
|
|
951
|
-
"type": "steedos-app-launcher",
|
|
952
|
-
"className": "px-4 pb-4",
|
|
953
|
-
"visibleOn": "${isMobile}",
|
|
954
|
-
"showAppName": true
|
|
955
|
-
},
|
|
956
|
-
{
|
|
957
|
-
"type": "steedos-app-menu",
|
|
958
|
-
"stacked": true,
|
|
959
|
-
"appId": "${app.id}",
|
|
960
|
-
},
|
|
961
|
-
]
|
|
962
|
-
}],
|
|
963
|
-
"onEvent": {
|
|
964
|
-
"click": {
|
|
965
|
-
"actions": [
|
|
966
|
-
{
|
|
967
|
-
"actionType": "custom",
|
|
968
|
-
"script": "console.log(event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
|
|
969
|
-
}
|
|
970
|
-
]
|
|
971
|
-
}
|
|
972
|
-
},
|
|
973
|
-
}
|
|
974
|
-
],
|
|
853
|
+
"type": "steedos-global-header",
|
|
854
|
+
"logoSrc": logoSrc
|
|
975
855
|
},
|
|
976
856
|
]
|
|
977
857
|
}
|
|
978
858
|
}
|
|
979
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
|
+
}
|
|
980
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.11",
|
|
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": "1d302a5690085072b66d6ced061a79e54cd84414",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"ejs": "^3.1.8"
|
|
14
14
|
}
|