@steedos/service-pages 2.2.23 → 2.2.24
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/page.render.client.js +31 -23
- package/main/default/objects/page_assignments/fields/is_system.field.yml +3 -2
- package/main/default/objects/page_versions/fields/is_active.field.yml +0 -1
- package/main/default/objects/page_versions/fields/version.field.yml +0 -1
- package/main/default/objects/pages/fields/is_system.field.yml +3 -2
- package/package.json +2 -2
|
@@ -12,6 +12,9 @@ Steedos.Page = {
|
|
|
12
12
|
Form: {
|
|
13
13
|
StandardNew: {},
|
|
14
14
|
StandardEdit: {}
|
|
15
|
+
},
|
|
16
|
+
reload: function(){
|
|
17
|
+
FlowRouter.reload();
|
|
15
18
|
}
|
|
16
19
|
};
|
|
17
20
|
|
|
@@ -108,11 +111,13 @@ Steedos.Page.render = function (root, page, data) {
|
|
|
108
111
|
|
|
109
112
|
let schema = typeof page.schema === 'string' ? JSON.parse(page.schema) : page.schema;
|
|
110
113
|
const defData = Object.assign({}, data, {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
data: {
|
|
115
|
+
context: {
|
|
116
|
+
rootUrl: __meteor_runtime_config__.ROOT_URL,
|
|
117
|
+
tenantId: Creator.USER_CONTEXT.spaceId,
|
|
118
|
+
userId: Creator.USER_CONTEXT.userId,
|
|
119
|
+
authToken: Creator.USER_CONTEXT.user.authToken
|
|
120
|
+
}
|
|
116
121
|
}
|
|
117
122
|
})
|
|
118
123
|
|
|
@@ -165,7 +170,7 @@ Steedos.Page.render = function (root, page, data) {
|
|
|
165
170
|
return root;
|
|
166
171
|
};
|
|
167
172
|
|
|
168
|
-
Steedos.Page.App.render = function (template, pageName, app_id) {
|
|
173
|
+
Steedos.Page.App.render = function (template, pageName, app_id, options) {
|
|
169
174
|
if (!pageName) {
|
|
170
175
|
return;
|
|
171
176
|
}
|
|
@@ -185,9 +190,9 @@ Steedos.Page.App.render = function (template, pageName, app_id) {
|
|
|
185
190
|
const page = Steedos.Page.getPage('app', app_id, null, null, pageName);
|
|
186
191
|
if (page) {
|
|
187
192
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
188
|
-
return Steedos.Page.render(container, page, {
|
|
193
|
+
return Steedos.Page.render(container, page, Object.assign({}, options, {
|
|
189
194
|
appId: app_id
|
|
190
|
-
});
|
|
195
|
+
}));
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
|
|
@@ -197,7 +202,11 @@ Steedos.Page.App.render = function (template, pageName, app_id) {
|
|
|
197
202
|
return container
|
|
198
203
|
};
|
|
199
204
|
|
|
200
|
-
Steedos.Page.Listview.
|
|
205
|
+
Steedos.Page.Listview.getDefaultName = function (objectApiName, listViewName) {
|
|
206
|
+
return `listview_${objectApiName}_${listViewName}`;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
Steedos.Page.Listview.render = function (template, objectApiName, options) {
|
|
201
210
|
try {
|
|
202
211
|
if (!template.data.regions || !objectApiName) {
|
|
203
212
|
return;
|
|
@@ -216,14 +225,14 @@ Steedos.Page.Listview.render = function (template, objectApiName) {
|
|
|
216
225
|
}
|
|
217
226
|
|
|
218
227
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
219
|
-
return Steedos.Page.render($("#" + rootId)[0], page, data);
|
|
228
|
+
return Steedos.Page.render($("#" + rootId)[0], page, Object.assign({}, options, data));
|
|
220
229
|
}
|
|
221
230
|
} catch (error) {
|
|
222
231
|
|
|
223
232
|
}
|
|
224
233
|
};
|
|
225
234
|
|
|
226
|
-
Steedos.Page.Record.render = function (template, objectApiName, recordId) {
|
|
235
|
+
Steedos.Page.Record.render = function (template, objectApiName, recordId, options) {
|
|
227
236
|
try {
|
|
228
237
|
if (!template.data.regions || !objectApiName || !recordId) {
|
|
229
238
|
return;
|
|
@@ -241,14 +250,14 @@ Steedos.Page.Record.render = function (template, objectApiName, recordId) {
|
|
|
241
250
|
}
|
|
242
251
|
|
|
243
252
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
244
|
-
return Steedos.Page.render($("#" + rootId)[0], page, data);
|
|
253
|
+
return Steedos.Page.render($("#" + rootId)[0], page, Object.assign({}, options, data));
|
|
245
254
|
}
|
|
246
255
|
} catch (error) {
|
|
247
256
|
|
|
248
257
|
}
|
|
249
258
|
};
|
|
250
259
|
|
|
251
|
-
Steedos.Page.RelatedListview.render = function (template, objectApiName) {
|
|
260
|
+
Steedos.Page.RelatedListview.render = function (template, objectApiName, options) {
|
|
252
261
|
try {
|
|
253
262
|
if (!template.data.regions || !objectApiName) {
|
|
254
263
|
return;
|
|
@@ -267,23 +276,23 @@ Steedos.Page.RelatedListview.render = function (template, objectApiName) {
|
|
|
267
276
|
}
|
|
268
277
|
|
|
269
278
|
if (page.render_engine && page.render_engine != 'redash') {
|
|
270
|
-
return Steedos.Page.render($("#" + rootId)[0], page, data);
|
|
279
|
+
return Steedos.Page.render($("#" + rootId)[0], page, Object.assign({}, options, data));
|
|
271
280
|
}
|
|
272
281
|
} catch (error) {
|
|
273
282
|
|
|
274
283
|
}
|
|
275
284
|
};
|
|
276
285
|
|
|
277
|
-
Steedos.Page.Form.StandardNew.render = function (appId, objectApiName, title, initialValues) {
|
|
286
|
+
Steedos.Page.Form.StandardNew.render = function (appId, objectApiName, title, initialValues, options) {
|
|
278
287
|
const page = Steedos.Page.getPage('form', appId, objectApiName);
|
|
279
288
|
if (page && page.schema) {
|
|
280
289
|
const elementId = getModalElement(`${objectApiName}-standard_new`);
|
|
281
|
-
return Steedos.Page.render(elementId, page, {
|
|
290
|
+
return Steedos.Page.render(elementId, page, Object.assign({}, options, {
|
|
282
291
|
appId: appId,
|
|
283
292
|
objectName: objectApiName,
|
|
284
293
|
title: title,
|
|
285
|
-
initialValues: initialValues
|
|
286
|
-
});
|
|
294
|
+
initialValues: initialValues,
|
|
295
|
+
}));
|
|
287
296
|
}
|
|
288
297
|
|
|
289
298
|
SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
|
|
@@ -305,17 +314,16 @@ Steedos.Page.Form.StandardNew.render = function (appId, objectApiName, title, in
|
|
|
305
314
|
}, null, { iconPath: '/assets/icons' });
|
|
306
315
|
};
|
|
307
316
|
|
|
308
|
-
Steedos.Page.Form.StandardEdit.render = function (appId, objectApiName, title, recordId) {
|
|
309
|
-
|
|
317
|
+
Steedos.Page.Form.StandardEdit.render = function (appId, objectApiName, title, recordId, options) {
|
|
310
318
|
const page = Steedos.Page.getPage('form', appId, objectApiName, recordId);
|
|
311
319
|
if (page && page.schema) {
|
|
312
320
|
const elementId = getModalElement(`${objectApiName}-standard_edit`);
|
|
313
|
-
return Steedos.Page.render(elementId, page, {
|
|
321
|
+
return Steedos.Page.render(elementId, page, Object.assign({}, options, {
|
|
314
322
|
appId: appId,
|
|
315
323
|
objectName: objectApiName,
|
|
316
324
|
title: title,
|
|
317
325
|
recordId: recordId
|
|
318
|
-
});
|
|
326
|
+
}));
|
|
319
327
|
}
|
|
320
328
|
|
|
321
329
|
return SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
|
|
@@ -331,7 +339,7 @@ Steedos.Page.Form.StandardEdit.render = function (appId, objectApiName, title, r
|
|
|
331
339
|
SteedosUI.reloadRecord(objectApiName, recordId)
|
|
332
340
|
} else {
|
|
333
341
|
window.refreshDxSchedulerInstance()
|
|
334
|
-
window.refreshGrid();
|
|
342
|
+
window.refreshGrid(options.gridName);
|
|
335
343
|
}
|
|
336
344
|
}, 1);
|
|
337
345
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.24",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@builder.io/react": "^1.1.50"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "4650f826343d41eb0ccafabc73c721e24b04f50f"
|
|
15
15
|
}
|