@gudhub/core 1.1.69 → 1.1.70
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,10 +4,13 @@ export class Interpritate {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
/*********************** GET INTERPRETATION OBJ ***********************/
|
|
7
|
-
|
|
7
|
+
// In this method we are looking for interpretation in data model according to interpretation src
|
|
8
|
+
// then we merged with default interpretation from defaultFieldDataModel
|
|
9
|
+
// if there are no current interpretation we use default interpretation
|
|
8
10
|
getInterpretationObj(fieldDataModel, defaultFieldDataModel, src, containerId) {
|
|
9
11
|
var currentIntrpr = {};
|
|
10
12
|
|
|
13
|
+
// Creating default interpretation
|
|
11
14
|
var defaultIntrprObj = defaultFieldDataModel.data_model.interpretation.find(function (interpritation) {
|
|
12
15
|
return interpritation.src == src;
|
|
13
16
|
}) || defaultFieldDataModel.data_model.interpretation.find(function (interpritation) {
|
|
@@ -50,28 +53,11 @@ export class Interpritate {
|
|
|
50
53
|
}, function (error) { });
|
|
51
54
|
|
|
52
55
|
} else {
|
|
53
|
-
|
|
54
|
-
resolve(this.getDefaultInterpretation(value, field));
|
|
56
|
+
console.error('Get Interpretation: data_type is undefined', dataType, field);
|
|
55
57
|
}
|
|
56
58
|
});
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
/*********************** GET DEFAULT INTERPRETATION ***********************/
|
|
60
|
-
|
|
61
|
-
getDefaultInterpretation(value, options) {
|
|
62
|
-
var result = value;
|
|
63
|
-
|
|
64
|
-
if (options) {
|
|
65
|
-
/*-- Iterating through options from data_model to find a nave for selected*/
|
|
66
|
-
options.forEach(item => {
|
|
67
|
-
if(item.value == value && value != '') {
|
|
68
|
-
result = item.name;
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
61
|
/********************* GET INTERPRETATION BY ID *********************/
|
|
76
62
|
|
|
77
63
|
// We add ability to pass value as argument, to reduce number of operations in this case (getFieldValue)
|
|
@@ -909,6 +909,15 @@ export default function generateModulesList(async_modules_path, file_server_url,
|
|
|
909
909
|
type: 'gh_element',
|
|
910
910
|
technology: 'class'
|
|
911
911
|
},
|
|
912
|
+
{
|
|
913
|
+
data_type: 'static_nested_list',
|
|
914
|
+
name: 'Static Nested List',
|
|
915
|
+
icon: 'scheduling',
|
|
916
|
+
js: 'https://gudhub.com/modules/nested-filter/dist/main.js',
|
|
917
|
+
css: 'https://gudhub.com/modules/nested-filter/dist/style.css',
|
|
918
|
+
type: 'gh_element',
|
|
919
|
+
technology: 'class'
|
|
920
|
+
},
|
|
912
921
|
/* AUTOMATION MODULES */
|
|
913
922
|
/*
|
|
914
923
|
We have next types for automations:
|