@steedos/service-pages 2.4.0-beta.33 → 2.4.0-beta.35
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.
|
@@ -4,28 +4,6 @@
|
|
|
4
4
|
* @Description: 提供自定义page渲染能力, 供内部使用, 内容会迭代调整, 不对用户开放.
|
|
5
5
|
*/
|
|
6
6
|
;(function(){
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const withModalWrap = (component, provideProps) => {
|
|
10
|
-
return (props) => {
|
|
11
|
-
const ModalComponent = component;
|
|
12
|
-
return React.createElement(ModalComponent, props);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
const render = (component, componentProps, container, provideProps = {} ) => {
|
|
16
|
-
try {
|
|
17
|
-
const wrapComponent = withModalWrap(component, provideProps);
|
|
18
|
-
const contentEle = React.createElement(wrapComponent,{
|
|
19
|
-
...componentProps
|
|
20
|
-
});
|
|
21
|
-
setTimeout(()=>{
|
|
22
|
-
ReactDOM.render(contentEle, container);
|
|
23
|
-
}, 100)
|
|
24
|
-
} catch (error) {
|
|
25
|
-
console.log(`error`, error)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
7
|
Steedos.Page = {
|
|
30
8
|
App: {},
|
|
31
9
|
Record: {},
|
|
@@ -58,12 +36,6 @@
|
|
|
58
36
|
|
|
59
37
|
Steedos.Page.getPage = function (type, appId, objectApiName, recordId, pageId) {
|
|
60
38
|
let objectInfo = null;
|
|
61
|
-
if (type != 'list' && objectApiName) {
|
|
62
|
-
objectInfo = Creator.getObject(objectApiName);
|
|
63
|
-
if (objectInfo && objectInfo.version < 2) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
39
|
if(!objectApiName){
|
|
68
40
|
objectApiName = ''
|
|
69
41
|
}
|
|
@@ -254,7 +226,7 @@
|
|
|
254
226
|
}
|
|
255
227
|
|
|
256
228
|
Steedos.Page.render = function (root, page, data, options = {}) {
|
|
257
|
-
|
|
229
|
+
console.log(`Steedos.Page.render`, root, page)
|
|
258
230
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
259
231
|
|
|
260
232
|
let schema = typeof page.schema === 'string' ? JSON.parse(page.schema) : page.schema;
|
|
@@ -642,6 +614,7 @@
|
|
|
642
614
|
logoSrc = Steedos.absoluteUrl('api/files/avatars/'+space.avatar_square)
|
|
643
615
|
}else{
|
|
644
616
|
var settings = Session.get("tenant_settings");
|
|
617
|
+
var avatar_url = "";
|
|
645
618
|
if(settings){
|
|
646
619
|
avatar_url = settings?.logo_square_url;
|
|
647
620
|
}
|
|
@@ -658,6 +631,9 @@
|
|
|
658
631
|
|
|
659
632
|
Steedos.Page.Header.render = function(appId, tabId){
|
|
660
633
|
let app = _.find(Session.get('app_menus'), {id: appId}) || {}
|
|
634
|
+
if(_.isEmpty(app)){
|
|
635
|
+
return ;
|
|
636
|
+
}
|
|
661
637
|
if (appId === 'admin' || (window.innerWidth < 768))
|
|
662
638
|
app.showSidebar = true;
|
|
663
639
|
if (app.showSidebar)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.35",
|
|
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": "0d255db7ed202a8ccdc8b6b88b535b93ce93443d",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"ejs": "^3.1.8"
|
|
14
14
|
}
|