@gudhub/core 1.1.4 → 1.1.7
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/GUDHUB/AppProcessor/AppProcessor.js +10 -2
- package/GUDHUB/Storage/ModulesList.js +1 -6
- package/GUDHUB/Utils/AppsTemplateService/AppsTemplateService.js +2 -2
- package/GUDHUB/Utils/json_constructor/json_constructor.js +9 -1
- package/package.json +1 -1
- package/umd/library.min.js +5 -5
- package/umd/library.min.js.map +1 -1
|
@@ -258,10 +258,18 @@ export class AppProcessor {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
async updateApp(app) {
|
|
261
|
-
if (!app.
|
|
261
|
+
if (!app.views_list || !app.views_list.length || !app.show) {
|
|
262
262
|
const storageApp = await this.getApp(app.app_id);
|
|
263
|
-
|
|
263
|
+
|
|
264
|
+
if(!app.views_list || !app.views_list.length) {
|
|
265
|
+
app.views_list = storageApp.views_list;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if(typeof app.show === 'undefined') {
|
|
269
|
+
app.show = storageApp.show;
|
|
270
|
+
}
|
|
264
271
|
}
|
|
272
|
+
|
|
265
273
|
const updatedApp = await this.updateAppApi(app);
|
|
266
274
|
this.updatingAppInStorage(updatedApp);
|
|
267
275
|
return updatedApp;
|
|
@@ -155,11 +155,6 @@ export default function generateModulesList(async_modules_path, file_server_url)
|
|
|
155
155
|
url: file_server_url + '/' + async_modules_path + "calculator_data.js",
|
|
156
156
|
type: 'angular'
|
|
157
157
|
},
|
|
158
|
-
{
|
|
159
|
-
name: "calendar",
|
|
160
|
-
url: file_server_url + '/' + async_modules_path + "calendar_data.js",
|
|
161
|
-
type: 'angular'
|
|
162
|
-
},
|
|
163
158
|
{
|
|
164
159
|
name: "string_join",
|
|
165
160
|
url: file_server_url + '/' + async_modules_path + "string_joiner_data.js",
|
|
@@ -520,7 +515,7 @@ export default function generateModulesList(async_modules_path, file_server_url)
|
|
|
520
515
|
type: 'class'
|
|
521
516
|
},
|
|
522
517
|
{
|
|
523
|
-
name: '
|
|
518
|
+
name: 'calendar',
|
|
524
519
|
js: 'https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js',
|
|
525
520
|
css: 'https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css',
|
|
526
521
|
type: 'class'
|
|
@@ -362,7 +362,7 @@ export default class AppsTemplateService {
|
|
|
362
362
|
properties.forEach(prop => {
|
|
363
363
|
let propertyValue = object[prop];
|
|
364
364
|
|
|
365
|
-
if (propertyValue && typeof object != 'string') {
|
|
365
|
+
if (typeof propertyValue !== 'undefined' && typeof object != 'string') {
|
|
366
366
|
action(prop, propertyValue, object);
|
|
367
367
|
self.crawling(propertyValue, action);
|
|
368
368
|
}
|
|
@@ -387,7 +387,7 @@ export default class AppsTemplateService {
|
|
|
387
387
|
appsConnectingMap.apps.forEach(appMap => {
|
|
388
388
|
if (app.view_init === appMap.new_view_init) {
|
|
389
389
|
appsConnectingMap.views.forEach(view => {
|
|
390
|
-
if (appMap.old_view_init === view.
|
|
390
|
+
if (appMap.old_view_init === view.old_view_id) {
|
|
391
391
|
app.view_init = view.new_view_id;
|
|
392
392
|
}
|
|
393
393
|
})
|
|
@@ -39,7 +39,15 @@ export function compiler(scheme, item, util, variables) {
|
|
|
39
39
|
item
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
const
|
|
42
|
+
const sortedItems = filteredItems.sort((a, b) => {
|
|
43
|
+
if(scheme.sortType == 'desc') {
|
|
44
|
+
return b.fields.find(field => field.field_id == scheme.field_id_to_sort).field_value - a.fields.find(field => field.field_id == scheme.field_id_to_sort).field_value;
|
|
45
|
+
} else {
|
|
46
|
+
return a.fields.find(field => field.field_id == scheme.field_id_to_sort).field_value - b.fields.find(field => field.field_id == scheme.field_id_to_sort).field_value;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const arrayOfItemsWithProperties = sortedItems.map(async (item) => {
|
|
43
51
|
return getChildsPropertiesObject(scheme.childs, item, app);
|
|
44
52
|
});
|
|
45
53
|
return Promise.all(arrayOfItemsWithProperties);
|