@steedos/service-pages 2.4.0-beta.4 → 2.4.0-beta.41
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/main/default/client/builder.client.js +1 -39
- package/main/default/client/page.render.client.js +127 -250
- package/main/default/objects/pages/buttons/customPage.button.js +2 -1
- package/main/default/objects/pages/buttons/deploy.button.js +2 -1
- package/main/default/objects/pages/buttons/disable.button.js +2 -1
- package/main/default/objects/pages/buttons/enable.button.js +2 -1
- package/main/default/objects/pages/buttons/resetSchema.button.js +2 -1
- package/main/default/objects/pages/buttons/showDesign.button.js +1 -1
- package/main/default/objects/pages/fields/object_name.field.yml +3 -3
- package/main/default/objects/pages/fields/render_engine.field.yml +2 -2
- package/main/default/routes/page_design.router.js +3 -14
- package/main/default/triggers/pages_init.trigger.js +17 -1
- package/package.json +2 -2
- package/public/js/requirejs/@steedos/filters.js +0 -8
- package/public/js/requirejs/@steedos-builder/react.js +0 -8
- package/public/js/requirejs/@steedos-builder/sdk.js +0 -8
- package/public/js/requirejs/builder-react.js +0 -4
- package/public/js/requirejs/builder-sdk.js +0 -3
- package/public/js/requirejs/filters.js +0 -4
- package/public/js/requirejs/lodash.js +0 -3
- package/public/js/requirejs/react-dom.js +0 -3
- package/public/js/requirejs/react.js +0 -3
- package/public/js/requirejs/require.js +0 -2147
- package/public/logo.png +0 -0
|
@@ -42,55 +42,17 @@
|
|
|
42
42
|
return _innerWaitForThing(obj, path, func);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
// window.SteedosMonacoEnvironment = window.MonacoEnvironment = {
|
|
46
|
-
// getWorkerUrl: function(workerId, label) {
|
|
47
|
-
// return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
48
|
-
// self.MonacoEnvironment = {
|
|
49
|
-
// baseUrl: '/unpkg.com/monaco-editor/min/'
|
|
50
|
-
// };
|
|
51
|
-
// importScripts('/unpkg.com/monaco-editor/min/vs/base/worker/workerMain.js');`
|
|
52
|
-
// )}`;
|
|
53
|
-
// }
|
|
54
|
-
// };
|
|
55
|
-
|
|
56
|
-
// Object.defineProperty(window, 'MonacoEnvironment', {set: ()=>{}, get: ()=>window.SteedosMonacoEnvironment})
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (window.define)
|
|
60
|
-
window.define.amd = undefined;
|
|
61
|
-
|
|
62
|
-
// window.ReactDOM = ReactDom;
|
|
63
|
-
window.React17 = window.React;
|
|
64
|
-
window.ReactDOM17 = window.ReactDOM;
|
|
65
|
-
|
|
66
|
-
// const BuilderSDK = BuilderReact;
|
|
67
|
-
|
|
68
|
-
// window.BuilderReact = BuilderReact;
|
|
69
|
-
// window.BuilderSDK = BuilderSDK;
|
|
70
|
-
|
|
71
|
-
window.Builder = BuilderReact.Builder;
|
|
72
|
-
|
|
73
|
-
window.BuilderComponent = BuilderReact.BuilderComponent;
|
|
74
|
-
|
|
75
|
-
// window.builder = BuilderReact.builder;
|
|
76
|
-
|
|
77
45
|
Promise.all([
|
|
78
46
|
waitForThing(Creator, 'USER_CONTEXT'),
|
|
79
47
|
]).then(()=>{
|
|
80
48
|
Builder.set({
|
|
81
|
-
rootUrl: __meteor_runtime_config__.ROOT_URL,
|
|
82
|
-
unpkgUrl: Steedos.absoluteUrl('/unpkg.com'),
|
|
83
49
|
context: {
|
|
84
|
-
rootUrl:
|
|
50
|
+
rootUrl: Builder.settings.rootUrl,
|
|
85
51
|
tenantId: Creator.USER_CONTEXT.spaceId,
|
|
86
52
|
userId: Creator.USER_CONTEXT.userId,
|
|
87
53
|
authToken: Creator.USER_CONTEXT.user.authToken
|
|
88
54
|
}
|
|
89
55
|
})
|
|
90
|
-
// if(Meteor.settings.public.page && Meteor.settings.public.page.assetUrls){
|
|
91
|
-
// const defaultAssetsUrls = Meteor.settings.public.page.assetUrls.split(',')
|
|
92
|
-
// Builder.registerRemoteAssets(defaultAssetsUrls)
|
|
93
|
-
// }
|
|
94
56
|
|
|
95
57
|
window.postMessage({ type: "Builder.loaded" })
|
|
96
58
|
})
|
|
@@ -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,13 @@
|
|
|
58
36
|
|
|
59
37
|
Steedos.Page.getPage = function (type, appId, objectApiName, recordId, pageId) {
|
|
60
38
|
let objectInfo = null;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
39
|
+
let searchParams = FlowRouter.current().queryParams;
|
|
40
|
+
|
|
41
|
+
const display = searchParams['display']
|
|
42
|
+
const listViewId = searchParams['listview_id']
|
|
43
|
+
const sideObject = searchParams['side_object']
|
|
44
|
+
const sideListviewId = searchParams['side_listview_id']
|
|
45
|
+
|
|
67
46
|
if(!objectApiName){
|
|
68
47
|
objectApiName = ''
|
|
69
48
|
}
|
|
@@ -74,71 +53,41 @@
|
|
|
74
53
|
pageId = ''
|
|
75
54
|
}
|
|
76
55
|
const formFactor = Steedos.isMobile() ? "SMALL" : "LARGE";
|
|
77
|
-
|
|
78
|
-
if
|
|
79
|
-
|
|
56
|
+
|
|
57
|
+
if(type != 'list' && type != 'record'){
|
|
58
|
+
const page = Steedos.authRequest(`/api/pageSchema/${type}?app=${appId}&objectApiName=${objectApiName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`, { async: false });
|
|
59
|
+
if (page && page.schema) {
|
|
60
|
+
return page;
|
|
61
|
+
}
|
|
80
62
|
}
|
|
81
|
-
|
|
63
|
+
|
|
64
|
+
if(type === 'list'){
|
|
82
65
|
return {
|
|
83
66
|
render_engine: 'amis',
|
|
84
67
|
name: 'steedosListviewPage',
|
|
85
|
-
schema:
|
|
86
|
-
"type": "page",
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
showHeader: true,
|
|
94
|
-
"label": "列表视图",
|
|
95
|
-
"objectApiName": "${objectName}",
|
|
96
|
-
"columnsTogglable": false,
|
|
97
|
-
"listName": "all",
|
|
98
|
-
"id": "u:be7c6341cd11"
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"regions": [
|
|
102
|
-
"body"
|
|
103
|
-
],
|
|
104
|
-
"id": "u:7b47b6042b0d"
|
|
68
|
+
schema:{
|
|
69
|
+
"type": "steedos-page-listview",
|
|
70
|
+
"showHeader": true,
|
|
71
|
+
"objectApiName": objectApiName,
|
|
72
|
+
"appId": appId,
|
|
73
|
+
"display": display,
|
|
74
|
+
"columnsTogglable": false,
|
|
75
|
+
"listName": "all",
|
|
105
76
|
}
|
|
106
77
|
}
|
|
107
78
|
}else if(type === 'record'){
|
|
108
79
|
return {
|
|
109
80
|
render_engine: 'amis',
|
|
110
81
|
name: 'steedosRecordPage',
|
|
111
|
-
bodyClassName: 'p-3',
|
|
112
82
|
schema: {
|
|
113
|
-
"type": "page",
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
appId: appId,
|
|
122
|
-
"id": "u:48d2c28eb755",
|
|
123
|
-
onEvent: {
|
|
124
|
-
"recordLoaded": {
|
|
125
|
-
"actions": [
|
|
126
|
-
{
|
|
127
|
-
"actionType": "reload",
|
|
128
|
-
"data": {
|
|
129
|
-
"name": `\${record.${objectInfo?.NAME_FIELD_KEY || 'name'}}`
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
"regions": [
|
|
138
|
-
"body"
|
|
139
|
-
],
|
|
140
|
-
"id": "u:d138f5276481"
|
|
141
|
-
}
|
|
83
|
+
"type": "steedos-page-record-detail",
|
|
84
|
+
"objectApiName": objectApiName,
|
|
85
|
+
"sideObject": sideObject,
|
|
86
|
+
"sideListviewId": sideListviewId,
|
|
87
|
+
"recordId": recordId,
|
|
88
|
+
"display": display,
|
|
89
|
+
"appId": appId,
|
|
90
|
+
}
|
|
142
91
|
}
|
|
143
92
|
|
|
144
93
|
}else if(type === 'related_list'){
|
|
@@ -221,24 +170,21 @@
|
|
|
221
170
|
},
|
|
222
171
|
body: [
|
|
223
172
|
{
|
|
224
|
-
"type": "panel",
|
|
225
|
-
"title": {
|
|
226
173
|
"type": "breadcrumb",
|
|
227
|
-
"source": "${$breadcrumb}"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
174
|
+
"source": "${$breadcrumb}",
|
|
175
|
+
"className": "mx-4 my-2",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: 'steedos-object-related-listview',
|
|
179
|
+
objectApiName: masterObject.name,
|
|
180
|
+
recordId: FlowRouter.getParam("record_id"),
|
|
181
|
+
relatedObjectApiName: objectApiName,
|
|
182
|
+
foreign_key: relatedKey,
|
|
183
|
+
relatedKey: relatedKey,
|
|
184
|
+
hiddenOn: "!!!this.$loaded",
|
|
185
|
+
"className": "mx-4",
|
|
186
|
+
// top: 5
|
|
187
|
+
}
|
|
242
188
|
,
|
|
243
189
|
// {
|
|
244
190
|
// type: 'steedos-object-related-listview',
|
|
@@ -257,55 +203,7 @@
|
|
|
257
203
|
}
|
|
258
204
|
|
|
259
205
|
Steedos.Page.render = function (root, page, data, options = {}) {
|
|
260
|
-
|
|
261
|
-
"inputs": [],
|
|
262
|
-
// "title": "loading",
|
|
263
|
-
"blocks": [
|
|
264
|
-
{
|
|
265
|
-
"@type": "@builder.io/sdk:Element",
|
|
266
|
-
"@version": 2,
|
|
267
|
-
"layerName": "Box",
|
|
268
|
-
"id": "builder-8070f86b1aed4e78a5878fa5c0d79e49",
|
|
269
|
-
"children": [
|
|
270
|
-
{
|
|
271
|
-
"@type": "@builder.io/sdk:Element",
|
|
272
|
-
"@version": 2,
|
|
273
|
-
"layerName": "Loading...\n...",
|
|
274
|
-
"id": "builder-4b16375a68dc4e49b4844843091bf91d",
|
|
275
|
-
"component": {
|
|
276
|
-
"name": "Text",
|
|
277
|
-
"options": {
|
|
278
|
-
"text": "<p>Loading...</p>\n"
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
"responsiveStyles": {
|
|
282
|
-
"large": {
|
|
283
|
-
"display": "flex",
|
|
284
|
-
"flexDirection": "column",
|
|
285
|
-
"position": "relative",
|
|
286
|
-
"flexShrink": "0",
|
|
287
|
-
"boxSizing": "border-box",
|
|
288
|
-
"marginTop": "20px",
|
|
289
|
-
"lineHeight": "normal",
|
|
290
|
-
"height": "auto",
|
|
291
|
-
"textAlign": "center"
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
"responsiveStyles": {
|
|
297
|
-
"large": {
|
|
298
|
-
"display": "flex",
|
|
299
|
-
"flexDirection": "column",
|
|
300
|
-
"position": "relative",
|
|
301
|
-
"flexShrink": "0",
|
|
302
|
-
"boxSizing": "border-box"
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
]
|
|
307
|
-
};
|
|
308
|
-
|
|
206
|
+
console.log(`Steedos.Page.render`, root, page)
|
|
309
207
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
310
208
|
|
|
311
209
|
let schema = typeof page.schema === 'string' ? JSON.parse(page.schema) : page.schema;
|
|
@@ -329,92 +227,32 @@
|
|
|
329
227
|
now: new Date(),
|
|
330
228
|
// mode: mode //由表单提供
|
|
331
229
|
},
|
|
332
|
-
scopeId: schema.name || schema.id
|
|
230
|
+
scopeId: schema.name || schema.id,
|
|
231
|
+
$scopeId : schema.name || schema.id
|
|
333
232
|
}
|
|
334
233
|
});
|
|
335
234
|
|
|
336
235
|
schema = lodash.defaultsDeep(defData , schema);
|
|
337
236
|
|
|
338
|
-
const pageContentData = {
|
|
339
|
-
"blocks": [
|
|
340
|
-
{
|
|
341
|
-
"@type": "@builder.io/sdk:Element",
|
|
342
|
-
"@version": 2,
|
|
343
|
-
"id": `builder-${page._id}`,
|
|
344
|
-
"component": {
|
|
345
|
-
"name": upperFirst(page.render_engine),
|
|
346
|
-
"options": {
|
|
347
|
-
"schema": schema,
|
|
348
|
-
"data": data,
|
|
349
|
-
"name": page.name,
|
|
350
|
-
"pageType": page.type
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
}
|
|
354
|
-
],
|
|
355
|
-
"inputs": [
|
|
356
|
-
]
|
|
357
|
-
}
|
|
358
|
-
|
|
359
237
|
const findComponent = (obj, componentName)=>{
|
|
360
238
|
return lodash.find(obj, {name : componentName})
|
|
361
239
|
}
|
|
362
240
|
|
|
363
241
|
if(!lodash.isFunction(root)){
|
|
364
242
|
//渲染loading
|
|
365
|
-
render(BuilderComponent, {
|
|
366
|
-
model: "page", content: {
|
|
367
|
-
"data": loadingContentData
|
|
368
|
-
}
|
|
369
|
-
}, root)
|
|
370
243
|
}
|
|
371
244
|
|
|
372
245
|
Promise.all([
|
|
373
|
-
waitForThing(window, '
|
|
246
|
+
waitForThing(window, 'renderAmis'),
|
|
374
247
|
waitForThing(Builder.components, upperFirst(page.render_engine), findComponent)
|
|
375
248
|
]).then(()=>{
|
|
376
249
|
//渲染page
|
|
377
250
|
if(!lodash.isFunction(root)){
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}else{
|
|
384
|
-
if(root === SteedosUI.Drawer){
|
|
385
|
-
data.drawerName = data.drawerName || lodash.uniqueId(`drawer-${page.object_name}`);
|
|
386
|
-
SteedosUI.Drawer(Object.assign({
|
|
387
|
-
name: data.drawerName,
|
|
388
|
-
title: data.title,
|
|
389
|
-
destroyOnClose: true,
|
|
390
|
-
maskClosable: false,
|
|
391
|
-
footer: null,
|
|
392
|
-
bodyStyle: {padding: "0px", paddingTop: "12px"},
|
|
393
|
-
children: React17.createElement(BuilderComponent, {
|
|
394
|
-
model: "page", content: {
|
|
395
|
-
"data": pageContentData
|
|
396
|
-
}
|
|
397
|
-
})
|
|
398
|
-
}, options.props)).show();
|
|
399
|
-
}else{
|
|
400
|
-
data.modalName = data.modalName || lodash.uniqueId(`modal-${page.object_name}`);
|
|
401
|
-
SteedosUI.Modal(Object.assign({
|
|
402
|
-
name: data.modalName,
|
|
403
|
-
title: data.title,
|
|
404
|
-
destroyOnClose: true,
|
|
405
|
-
maskClosable: false,
|
|
406
|
-
keyboard: false, // 禁止 esc 关闭
|
|
407
|
-
footer: null,
|
|
408
|
-
bodyStyle: {padding: "0px", paddingTop: "12px"},
|
|
409
|
-
children: React17.createElement(BuilderComponent, {
|
|
410
|
-
model: "page", content: {
|
|
411
|
-
"data": pageContentData
|
|
412
|
-
}
|
|
413
|
-
})
|
|
414
|
-
}, options.props)).show();
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
251
|
+
renderAmis(
|
|
252
|
+
root,
|
|
253
|
+
schema,
|
|
254
|
+
data,
|
|
255
|
+
)
|
|
418
256
|
}
|
|
419
257
|
});
|
|
420
258
|
}
|
|
@@ -473,6 +311,7 @@
|
|
|
473
311
|
if (!modalRoot) {
|
|
474
312
|
modalRoot = document.createElement('div');
|
|
475
313
|
modalRoot.setAttribute('id', rootId);
|
|
314
|
+
modalRoot.setAttribute('class', 'h-full')
|
|
476
315
|
$(".page-list-view-root")[0].appendChild(modalRoot);
|
|
477
316
|
}
|
|
478
317
|
|
|
@@ -499,6 +338,7 @@
|
|
|
499
338
|
if (!modalRoot) {
|
|
500
339
|
modalRoot = document.createElement('div');
|
|
501
340
|
modalRoot.setAttribute('id', rootId);
|
|
341
|
+
modalRoot.setAttribute('class', 'h-full')
|
|
502
342
|
$(".page-record-view-root")[0].appendChild(modalRoot);
|
|
503
343
|
}
|
|
504
344
|
|
|
@@ -727,11 +567,12 @@
|
|
|
727
567
|
let logoSrc = '';
|
|
728
568
|
const space = db.spaces.findOne(Steedos.getSpaceId())
|
|
729
569
|
if(space?.avatar){
|
|
730
|
-
logoSrc = Steedos.absoluteUrl(space.avatar)
|
|
570
|
+
logoSrc = Steedos.absoluteUrl('api/files/avatars/'+space.avatar)
|
|
731
571
|
}else if(space?.avatar_square){
|
|
732
|
-
logoSrc = Steedos.absoluteUrl(space.avatar_square)
|
|
572
|
+
logoSrc = Steedos.absoluteUrl('api/files/avatars/'+space.avatar_square)
|
|
733
573
|
}else{
|
|
734
574
|
var settings = Session.get("tenant_settings");
|
|
575
|
+
var avatar_url = "";
|
|
735
576
|
if(settings){
|
|
736
577
|
avatar_url = settings?.logo_square_url;
|
|
737
578
|
}
|
|
@@ -747,19 +588,28 @@
|
|
|
747
588
|
}
|
|
748
589
|
|
|
749
590
|
Steedos.Page.Header.render = function(appId, tabId){
|
|
750
|
-
|
|
751
|
-
if
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
591
|
+
let app = _.find(Session.get('app_menus'), {id: appId}) || {}
|
|
592
|
+
if(_.isEmpty(app)){
|
|
593
|
+
return ;
|
|
594
|
+
}
|
|
595
|
+
if (appId === 'admin' || (window.innerWidth < 768))
|
|
596
|
+
app.showSidebar = true;
|
|
597
|
+
if (app.showSidebar)
|
|
598
|
+
document.body.classList.add('sidebar')
|
|
599
|
+
else
|
|
600
|
+
document.body.classList.remove("sidebar")
|
|
601
|
+
if (window.innerWidth >= 768)
|
|
602
|
+
document.body.classList.add('sidebar-open')
|
|
603
|
+
if(app.showSidebar && window.location.pathname.startsWith("/workflow")){
|
|
604
|
+
app = {id: 'workflow'}
|
|
605
|
+
}
|
|
606
|
+
if(window.location.pathname.startsWith("/workflow")){
|
|
607
|
+
document.body.classList.remove("sidebar-open")
|
|
758
608
|
}
|
|
759
|
-
|
|
760
609
|
try {
|
|
761
610
|
const data = {
|
|
762
|
-
app
|
|
611
|
+
app,
|
|
612
|
+
isMobile: window.innerWidth <= 768
|
|
763
613
|
};
|
|
764
614
|
const page = Steedos.Page.Header.getPage(appId, tabId);
|
|
765
615
|
var rootId = "steedosGlobalHeaderRoot";
|
|
@@ -777,7 +627,7 @@
|
|
|
777
627
|
}
|
|
778
628
|
}
|
|
779
629
|
Steedos.Page.Header.getPage = function(appId, tabId){
|
|
780
|
-
const logoSrc = getSpaceLogo
|
|
630
|
+
const logoSrc = Tracker.nonreactive(getSpaceLogo);
|
|
781
631
|
return {
|
|
782
632
|
render_engine: 'amis',
|
|
783
633
|
name: 'steedosGlobalHeaderPage',
|
|
@@ -791,26 +641,45 @@
|
|
|
791
641
|
body: [
|
|
792
642
|
{
|
|
793
643
|
"type": "wrapper",
|
|
794
|
-
"className": "p-0
|
|
644
|
+
"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",
|
|
795
645
|
body: [
|
|
796
646
|
{
|
|
797
647
|
"type": "wrapper",
|
|
798
|
-
"className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center',
|
|
648
|
+
"className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center steedos-header-container-line-one',
|
|
799
649
|
"body": [
|
|
800
650
|
{
|
|
801
651
|
type: "wrapper",
|
|
802
652
|
className: 'p-0 flex flex-1 items-center',
|
|
803
653
|
body: [
|
|
804
654
|
{
|
|
805
|
-
"type": "
|
|
806
|
-
"
|
|
807
|
-
"
|
|
808
|
-
"
|
|
655
|
+
"type": "button",
|
|
656
|
+
"className": "toggle-sidebar flex items-center pr-4",
|
|
657
|
+
"hiddenOn": "${!isMobile}",
|
|
658
|
+
"onEvent": {
|
|
659
|
+
"click": {
|
|
660
|
+
"actions": [
|
|
661
|
+
{
|
|
662
|
+
"actionType": "custom",
|
|
663
|
+
"script": "document.body.classList.toggle('sidebar-open')",
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"body": [
|
|
669
|
+
{
|
|
670
|
+
"type": "steedos-icon",
|
|
671
|
+
"category": "utility",
|
|
672
|
+
"name": "rows",
|
|
673
|
+
"colorVariant": "default",
|
|
674
|
+
"id": "u:afc3a08e8cf3",
|
|
675
|
+
"className": "slds-button_icon slds-global-header__icon"
|
|
676
|
+
}
|
|
677
|
+
],
|
|
809
678
|
},
|
|
810
679
|
{
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
680
|
+
"className": 'block h-10 w-auto mr-4',
|
|
681
|
+
"type": "tpl",
|
|
682
|
+
"tpl": `<a href='/app' class='flex items-center '><img class='block h-10 w-auto' src='${logoSrc}'></a>`,
|
|
814
683
|
},
|
|
815
684
|
],
|
|
816
685
|
},
|
|
@@ -823,7 +692,7 @@
|
|
|
823
692
|
{
|
|
824
693
|
"type": "button",
|
|
825
694
|
"className": "toggle-sidebar",
|
|
826
|
-
"
|
|
695
|
+
"visibleOn": "${AND(app.showSidebar,!isMobile)}",
|
|
827
696
|
"onEvent": {
|
|
828
697
|
"click": {
|
|
829
698
|
"actions": [
|
|
@@ -851,11 +720,11 @@
|
|
|
851
720
|
|
|
852
721
|
{
|
|
853
722
|
"type": "grid",
|
|
854
|
-
hiddenOn: "${
|
|
855
|
-
"className": 'steedos-context-bar
|
|
723
|
+
"hiddenOn": "${isMobile}",
|
|
724
|
+
"className": 'steedos-context-bar flex flex-nowrap h-10 leading-5 pl-4 mb-[-3px] steedos-header-container-line-two',
|
|
856
725
|
"columns": [
|
|
857
726
|
{
|
|
858
|
-
"columnClassName": "items-center
|
|
727
|
+
"columnClassName": "items-center flex pb-0",
|
|
859
728
|
"body": [
|
|
860
729
|
{
|
|
861
730
|
"type": "steedos-app-launcher",
|
|
@@ -867,13 +736,15 @@
|
|
|
867
736
|
"valign": "middle"
|
|
868
737
|
},
|
|
869
738
|
{
|
|
870
|
-
|
|
739
|
+
hiddenOn: "${app.showSidebar === true}",
|
|
740
|
+
"columnClassName": "flex overflow-hidden",
|
|
871
741
|
"body": [
|
|
872
742
|
{
|
|
873
743
|
"type": "steedos-app-menu",
|
|
874
744
|
"stacked": false,
|
|
875
745
|
showIcon: false,
|
|
876
746
|
"appId": "${app.id}",
|
|
747
|
+
hiddenOn: "${app.showSidebar === true}",
|
|
877
748
|
overflow: {
|
|
878
749
|
enable: false,
|
|
879
750
|
itemWidth: 80,
|
|
@@ -893,17 +764,23 @@
|
|
|
893
764
|
{
|
|
894
765
|
|
|
895
766
|
"type": "button",
|
|
896
|
-
"className": 'p-0 absolute inset-0 mt-[50px]',
|
|
767
|
+
"className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
|
|
897
768
|
hiddenOn: "${app.showSidebar != true}",
|
|
898
769
|
body: [{
|
|
899
770
|
type: "wrapper",
|
|
900
|
-
className: 'sidebar-wrapper
|
|
771
|
+
className: 'sidebar-wrapper px-0 pt-4 pb-16 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',
|
|
901
772
|
body: [
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
773
|
+
{
|
|
774
|
+
"type": "steedos-app-launcher",
|
|
775
|
+
"className": "px-4 pb-4",
|
|
776
|
+
"visibleOn": "${isMobile}",
|
|
777
|
+
"showAppName": true
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"type": "steedos-app-menu",
|
|
781
|
+
"stacked": true,
|
|
782
|
+
"appId": "${app.id}",
|
|
783
|
+
},
|
|
907
784
|
]
|
|
908
785
|
}],
|
|
909
786
|
"onEvent": {
|
|
@@ -30,7 +30,8 @@ module.exports = {
|
|
|
30
30
|
};
|
|
31
31
|
Steedos.authRequest(url, options);
|
|
32
32
|
},
|
|
33
|
-
customPageVisible: function (object_name, record_id, permission,
|
|
33
|
+
customPageVisible: function (object_name, record_id, permission, data) {
|
|
34
|
+
var record = data && data.record;
|
|
34
35
|
return record && record.is_system;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -31,7 +31,8 @@ module.exports = {
|
|
|
31
31
|
};
|
|
32
32
|
Steedos.authRequest(url, options);
|
|
33
33
|
},
|
|
34
|
-
deployVisible: function (object_name, record_id, permission,
|
|
34
|
+
deployVisible: function (object_name, record_id, permission, data) {
|
|
35
|
+
var record = data && data.record;
|
|
35
36
|
return record && !record.is_system;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -24,7 +24,8 @@ module.exports = {
|
|
|
24
24
|
};
|
|
25
25
|
Steedos.authRequest(url, options);
|
|
26
26
|
},
|
|
27
|
-
disableVisible: function (object_name, record_id, permission,
|
|
27
|
+
disableVisible: function (object_name, record_id, permission, data) {
|
|
28
|
+
var record = data && data.record;
|
|
28
29
|
return record && record.is_active && !record.is_system
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -24,7 +24,8 @@ module.exports = {
|
|
|
24
24
|
};
|
|
25
25
|
Steedos.authRequest(url, options);
|
|
26
26
|
},
|
|
27
|
-
enableVisible: function (object_name, record_id, permission,
|
|
27
|
+
enableVisible: function (object_name, record_id, permission, data) {
|
|
28
|
+
var record = data && data.record;
|
|
28
29
|
return record && !record.is_active && !record.is_system
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -41,7 +41,8 @@ module.exports = {
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
|
-
resetSchemaVisible: function (object_name, record_id, permission,
|
|
44
|
+
resetSchemaVisible: function (object_name, record_id, permission, data) {
|
|
45
|
+
var record = data && data.record;
|
|
45
46
|
return record && !record.is_system && record.type === 'form';
|
|
46
47
|
}
|
|
47
48
|
}
|