@evlop/commons 1.0.236 → 1.0.238
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/actions/restApi.js +8 -1
- package/dist/src/actions/restApi.js.map +1 -1
- package/dist/src/adapters/getUserToken/index.js +7 -18
- package/dist/src/adapters/getUserToken/index.js.map +1 -1
- package/dist/src/adapters/getUserToken/index.native.js +9 -20
- package/dist/src/adapters/getUserToken/index.native.js.map +1 -1
- package/dist/src/classes/Model.js +5 -14
- package/dist/src/classes/Model.js.map +1 -1
- package/dist/src/components/hoc/withSettings.js +1 -12
- package/dist/src/components/hoc/withSettings.js.map +1 -1
- package/dist/src/components/hoc/withSettings.native.js +2 -13
- package/dist/src/components/hoc/withSettings.native.js.map +1 -1
- package/dist/src/constants/iconInfo/index.js +4 -5
- package/dist/src/constants/iconInfo/index.js.map +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
- package/dist/src/contexts/EDLContext.d.ts +7 -0
- package/dist/src/contexts/EDLContext.d.ts.map +1 -0
- package/dist/src/contexts/EDLContext.js +10 -0
- package/dist/src/contexts/EDLContext.js.map +1 -0
- package/dist/src/data-sources/collection.js +3 -12
- package/dist/src/data-sources/collection.js.map +1 -1
- package/dist/src/data-sources/collectionRecord.js +3 -12
- package/dist/src/data-sources/collectionRecord.js.map +1 -1
- package/dist/src/data-sources/listUrl.js +3 -12
- package/dist/src/data-sources/listUrl.js.map +1 -1
- package/dist/src/data-sources/url.js +3 -12
- package/dist/src/data-sources/url.js.map +1 -1
- package/dist/src/edl/BlockRenderer.d.ts +9 -0
- package/dist/src/edl/BlockRenderer.d.ts.map +1 -0
- package/dist/src/edl/BlockRenderer.js +102 -0
- package/dist/src/edl/BlockRenderer.js.map +1 -0
- package/dist/src/edl/DataSourceLoader.d.ts +7 -0
- package/dist/src/edl/DataSourceLoader.d.ts.map +1 -0
- package/dist/src/edl/DataSourceLoader.js +13 -0
- package/dist/src/edl/DataSourceLoader.js.map +1 -0
- package/dist/src/edl/elements/DataSource.d.ts +8 -0
- package/dist/src/edl/elements/DataSource.d.ts.map +1 -0
- package/dist/src/edl/elements/DataSource.js +19 -0
- package/dist/src/edl/elements/DataSource.js.map +1 -0
- package/dist/src/edl/elements/Fragment.d.ts +9 -0
- package/dist/src/edl/elements/Fragment.d.ts.map +1 -0
- package/dist/src/edl/elements/Fragment.js +14 -0
- package/dist/src/edl/elements/Fragment.js.map +1 -0
- package/dist/src/edl/elements/UseEffect.d.ts +10 -0
- package/dist/src/edl/elements/UseEffect.d.ts.map +1 -0
- package/dist/src/edl/elements/UseEffect.js +28 -0
- package/dist/src/edl/elements/UseEffect.js.map +1 -0
- package/dist/src/edl/elements/index.d.ts +17 -0
- package/dist/src/edl/elements/index.d.ts.map +1 -0
- package/dist/src/edl/elements/index.js +16 -0
- package/dist/src/edl/elements/index.js.map +1 -0
- package/dist/src/edl/index.d.ts +28 -0
- package/dist/src/edl/index.d.ts.map +1 -0
- package/dist/src/edl/index.js +107 -0
- package/dist/src/edl/index.js.map +1 -0
- package/dist/src/edl/localStorage.app.d.ts +6 -0
- package/dist/src/edl/localStorage.app.d.ts.map +1 -0
- package/dist/src/edl/localStorage.app.js +14 -0
- package/dist/src/edl/localStorage.app.js.map +1 -0
- package/dist/src/edl/localStorage.d.ts +6 -0
- package/dist/src/edl/localStorage.d.ts.map +1 -0
- package/dist/src/edl/localStorage.js +10 -0
- package/dist/src/edl/localStorage.js.map +1 -0
- package/dist/src/edl/parser.d.ts +3 -0
- package/dist/src/edl/parser.d.ts.map +1 -0
- package/dist/src/edl/parser.js +166 -0
- package/dist/src/edl/parser.js.map +1 -0
- package/dist/src/helpers/functions.js +1 -1
- package/dist/src/helpers/functions.js.map +1 -1
- package/dist/src/helpers/handlebarHelpers.js +1 -1
- package/dist/src/helpers/handlebarHelpers.js.map +1 -1
- package/dist/src/helpers/handlebarHelpers.test.d.ts.map +1 -1
- package/dist/src/helpers/handlebarHelpers.test.js +1 -1
- package/dist/src/helpers/handlebarHelpers.test.js.map +1 -1
- package/dist/src/helpers/iconHelper.js +7 -13
- package/dist/src/helpers/iconHelper.js.map +1 -1
- package/dist/src/helpers/pathHelper.js +1 -1
- package/dist/src/helpers/pathHelper.js.map +1 -1
- package/dist/src/helpers/themeHelpers.js +23 -3
- package/dist/src/helpers/themeHelpers.js.map +1 -1
- package/dist/src/hooks/useAction.js +3 -12
- package/dist/src/hooks/useAction.js.map +1 -1
- package/dist/src/hooks/useActionable.d.ts +1 -0
- package/dist/src/hooks/useActionable.d.ts.map +1 -1
- package/dist/src/hooks/useActionable.js +3 -1
- package/dist/src/hooks/useActionable.js.map +1 -1
- package/dist/src/hooks/useComponentConfigProps.js +1 -1
- package/dist/src/hooks/useComponentConfigProps.js.map +1 -1
- package/dist/src/hooks/useDataSource.js +1 -1
- package/dist/src/hooks/useDataSource.js.map +1 -1
- package/dist/src/hooks/useNavigator.js +1 -1
- package/dist/src/hooks/useNavigator.js.map +1 -1
- package/dist/src/hooks/useParams.js +1 -1
- package/dist/src/hooks/useParams.js.map +1 -1
- package/dist/src/hooks/useTranslation.js +2 -5
- package/dist/src/hooks/useTranslation.js.map +1 -1
- package/dist/src/middlewares/dataSourceMiddleware.js +11 -22
- package/dist/src/middlewares/dataSourceMiddleware.js.map +1 -1
- package/dist/src/middlewares/restApiMiddleware.js +5 -5
- package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
- package/dist/src/providers/I18nProvider.js +11 -14
- package/dist/src/providers/I18nProvider.js.map +1 -1
- package/dist/src/providers/Scope.js +4 -1
- package/dist/src/providers/Scope.js.map +1 -1
- package/dist/src/reducers/adminMenus.js +1 -1
- package/dist/src/reducers/adminMenus.js.map +1 -1
- package/dist/src/reducers/collection.js +66 -15
- package/dist/src/reducers/collection.js.map +1 -1
- package/dist/src/reducers/components.js +28 -7
- package/dist/src/reducers/components.js.map +1 -1
- package/dist/src/reducers/config/index.js +16 -4
- package/dist/src/reducers/config/index.js.map +1 -1
- package/dist/src/reducers/context.js +5 -16
- package/dist/src/reducers/context.js.map +1 -1
- package/dist/src/reducers/dataSource.js +14 -2
- package/dist/src/reducers/dataSource.js.map +1 -1
- package/dist/src/reducers/files.js +18 -4
- package/dist/src/reducers/files.js.map +1 -1
- package/dist/src/reducers/fonts.js +15 -6
- package/dist/src/reducers/fonts.js.map +1 -1
- package/dist/src/reducers/icons.js +3 -12
- package/dist/src/reducers/icons.js.map +1 -1
- package/dist/src/reducers/modals.js +1 -1
- package/dist/src/reducers/modals.js.map +1 -1
- package/dist/src/reducers/pages/index.js +69 -27
- package/dist/src/reducers/pages/index.js.map +1 -1
- package/dist/src/reducers/routes.js +19 -21
- package/dist/src/reducers/routes.js.map +1 -1
- package/dist/src/reducers/search.js +4 -1
- package/dist/src/reducers/search.js.map +1 -1
- package/dist/src/reducers/session.js +21 -4
- package/dist/src/reducers/session.js.map +1 -1
- package/dist/src/reducers/user.js +12 -2
- package/dist/src/reducers/user.js.map +1 -1
- package/dist/src/services/SessionManager.js +4 -1
- package/dist/src/services/SessionManager.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,166 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const lodash_1 = require("lodash");
|
4
|
+
const inbuiltVariables = ['context', 'data', 'setRuntimeData', 'setState', 'setStates', 'state', 'dispatchAction', 'createAction'];
|
5
|
+
const TemplateCompiler = {
|
6
|
+
compileStringTemplate: (variables) => {
|
7
|
+
const variableNamesString = `{ ${variables.join(', ')} }`;
|
8
|
+
return templateString => {
|
9
|
+
try {
|
10
|
+
// replace all the {expression} with ${ expression } and wrap the whole template in a function
|
11
|
+
const processedTemplate = templateString.replace(/{(\((?:(?!\)\}).)*\)|[^{}]*)}/g, "${ $1 }");
|
12
|
+
return new Function(variableNamesString, `return \`${processedTemplate}\`;`);
|
13
|
+
}
|
14
|
+
catch (e) { }
|
15
|
+
};
|
16
|
+
},
|
17
|
+
compileExpression: variables => {
|
18
|
+
const variableNamesString = `{ ${variables.join(', ')} }`;
|
19
|
+
return (expression) => {
|
20
|
+
try {
|
21
|
+
return new Function(variableNamesString, `return ${expression};`);
|
22
|
+
}
|
23
|
+
catch (e) { }
|
24
|
+
};
|
25
|
+
}
|
26
|
+
};
|
27
|
+
function generateUniqueId() {
|
28
|
+
return lodash_1.random(1000, 9999999999).toString(36);
|
29
|
+
}
|
30
|
+
const scriptTagRegex = /<(Script)([^>]*?)>(.*?)<\/\1>/gs;
|
31
|
+
const variableDeclarationRegex = /(const|var|let)\s+(\$[a-zA-Z0-9_]+)/g;
|
32
|
+
function extractScriptsAndVariables(inputString) {
|
33
|
+
// Initialize an empty object to store the scripts by their unique IDs
|
34
|
+
const scriptsById = {};
|
35
|
+
// Initialize an empty set to store all the unique variables, throughout all the scripts
|
36
|
+
const allVariables = new Set();
|
37
|
+
const cleanedString = inputString.replace(scriptTagRegex, (match, tagName, attributes, jsCode) => {
|
38
|
+
const uniqueId = generateUniqueId();
|
39
|
+
let variables = jsCode.match(variableDeclarationRegex) || [];
|
40
|
+
variables = lodash_1.map(variables, v => lodash_1.split(v, ' ')[1]);
|
41
|
+
variables.forEach(v => allVariables.add(v));
|
42
|
+
scriptsById[uniqueId] = { code: jsCode.trim(), variables: Array.from(variables) };
|
43
|
+
return `<${tagName} :scriptId="${uniqueId}"${attributes}/>`;
|
44
|
+
});
|
45
|
+
return { cleanedString, scriptsById, variables: Array.from(allVariables) };
|
46
|
+
}
|
47
|
+
function extractAsVariables(inputString) {
|
48
|
+
const asAttributeRegex = /:as="(\$[a-zA-Z0-9_]+)"/g;
|
49
|
+
const asVariables = new Set();
|
50
|
+
let asMatch;
|
51
|
+
while ((asMatch = asAttributeRegex.exec(inputString)) !== null) {
|
52
|
+
asVariables.add(asMatch[1]);
|
53
|
+
}
|
54
|
+
return Array.from(asVariables);
|
55
|
+
}
|
56
|
+
// This function takes a JSX string as input and returns an array of objects representing the parsed JSX structure.
|
57
|
+
function parseEDL(edlString, additionalVariables) {
|
58
|
+
// separate the scripts and extract variables from the edl string
|
59
|
+
const { cleanedString: _edlString, scriptsById, variables: scriptVariables } = extractScriptsAndVariables(edlString);
|
60
|
+
// Extract :as variables and include them in the union
|
61
|
+
const asVariables = extractAsVariables(edlString);
|
62
|
+
const variables = lodash_1.union(inbuiltVariables, additionalVariables, scriptVariables, asVariables);
|
63
|
+
const compileStringTemplate = TemplateCompiler.compileStringTemplate(variables);
|
64
|
+
const compileExpression = TemplateCompiler.compileExpression(variables);
|
65
|
+
// Initialize an empty array to store the final JSX objects
|
66
|
+
const jsxObjects = [];
|
67
|
+
// Initialize an empty stack to keep track of the nested JSX elements
|
68
|
+
const jsxStack = [];
|
69
|
+
// Define regular expressions to match opening and closing JSX tags and attributes
|
70
|
+
const openingTagRegex = /<([a-zA-Z0-9_]+)((?:\s+[a-zA-Z0-9_\-\.\:]+=(?:"[^"]*"|'[^']*'|`[^`]*`|\{\{(?:(?!\}\}).)*\}\}|\{\[(?:(?!\]\}).)*\]\}|\{\((?:(?!\)\}).)*\)\}|\{[^\}]*\}))*)\s*(\/)?>/s;
|
71
|
+
const closingTagRegex = /<\/([a-zA-Z0-9_]+)>/;
|
72
|
+
const attributeRegex = /([a-zA-Z0-9_\-\.\:]+)=("[^"]*"|'[^']*'|`[^`]*`|\{\{(?:(?!\}\}).)*\}\}|\{\[(?:(?!\]\}).)*\]\}|\{\((?:(?!\)\}).)*\)\}|\{[^\}]*\})/sg;
|
73
|
+
// Split the JSX string into tokens using opening or closing tag regex pattern
|
74
|
+
const openingOrClosingTagRegex = /(<(?:\/)?(?:[a-zA-Z0-9_]+)(?:(?:\s+[a-zA-Z0-9_\-\.\:]+=(?:"[^"]*"|'[^']*'|`[^`]*`|\{\{(?:(?!\}\}).)*\}\}|\{\[(?:(?!\]\}).)*\]\}|\{\((?:(?!\)\}).)*\)\}|\{[^\}]*\}))*)\s*(?:\/)?>)/s;
|
75
|
+
String(_edlString).split(openingOrClosingTagRegex).forEach(token => {
|
76
|
+
// If the token is an empty string, skip it
|
77
|
+
if (token.trim() === '') {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
// If the token is not an opening or closing JSX tag, treat it as plain text
|
81
|
+
if (token[0] !== '<') {
|
82
|
+
const parentNode = jsxStack[jsxStack.length - 1];
|
83
|
+
const stringTemplate = compileStringTemplate(token.trim());
|
84
|
+
if (parentNode) {
|
85
|
+
parentNode.children.push(stringTemplate);
|
86
|
+
}
|
87
|
+
else {
|
88
|
+
jsxObjects.push(stringTemplate);
|
89
|
+
}
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
// Check if the token matches a closing tag pattern
|
93
|
+
const closingTagMatch = token.match(closingTagRegex);
|
94
|
+
// If it's a closing tag, pop the last element from the JSX stack
|
95
|
+
if (closingTagMatch) {
|
96
|
+
jsxStack.pop();
|
97
|
+
return;
|
98
|
+
}
|
99
|
+
// Check if the token matches an opening tag pattern
|
100
|
+
const openingTagMatch = token.match(openingTagRegex);
|
101
|
+
// If it's an opening tag, parse its attributes and create a new JSX element object
|
102
|
+
if (openingTagMatch) {
|
103
|
+
const tagName = openingTagMatch[1];
|
104
|
+
const propsString = openingTagMatch[2];
|
105
|
+
const isSelfClosing = openingTagMatch[3] === '/';
|
106
|
+
// Extract the attributes from the opening tag using the attribute regex
|
107
|
+
const staticProps = {};
|
108
|
+
const variableProps = {};
|
109
|
+
let attributeMatch;
|
110
|
+
while ((attributeMatch = attributeRegex.exec(propsString)) !== null) {
|
111
|
+
let attributeName = attributeMatch[1];
|
112
|
+
if (attributeName === 'class') {
|
113
|
+
attributeName = 'className';
|
114
|
+
}
|
115
|
+
const value = attributeMatch[2].slice(1, -1);
|
116
|
+
// Check if the attribute value is dynamic (enclosed in curly braces) either variable or js expression
|
117
|
+
const isDynamicProp = attributeMatch[2].startsWith("{");
|
118
|
+
const isTemplateProp = attributeMatch[2].startsWith("`");
|
119
|
+
if (isDynamicProp) {
|
120
|
+
try {
|
121
|
+
// If the value is dynamic compile it so it can be ran against scope data
|
122
|
+
variableProps[attributeName] = compileExpression(value);
|
123
|
+
}
|
124
|
+
catch (error) {
|
125
|
+
// ignore the attribute if cannot be compiled
|
126
|
+
}
|
127
|
+
}
|
128
|
+
else if (isTemplateProp) {
|
129
|
+
variableProps[attributeName] = compileStringTemplate(value);
|
130
|
+
}
|
131
|
+
else {
|
132
|
+
// If the value is not dynamic, assign it directly to the props object
|
133
|
+
lodash_1.set(staticProps, attributeName, value);
|
134
|
+
}
|
135
|
+
}
|
136
|
+
// Get the shared prop names between static and variable props
|
137
|
+
const sharedPropNames = lodash_1.keys(variableProps).map(key => lodash_1.toPath(key)[0]).filter(key => staticProps[key]);
|
138
|
+
// Create a new JSX element object with the tag name, properties, and an empty children array
|
139
|
+
const newElement = { _id: generateUniqueId(), tag: tagName, staticProps, variableProps, children: [], sharedPropNames };
|
140
|
+
// If the tag is a Script tag, replace it with a UseEffect tag, and convert code to UseEffect function
|
141
|
+
if (newElement.tag === 'Script') {
|
142
|
+
const scriptId = newElement.staticProps[':scriptId'];
|
143
|
+
delete newElement.staticProps[':scriptId'];
|
144
|
+
const code = scriptsById[scriptId].code;
|
145
|
+
const exportVariables = scriptsById[scriptId].variables;
|
146
|
+
newElement.variableProps[':function'] = compileExpression(`()=>{ ${code} \n setRuntimeData({ ${exportVariables.join(', ')} }); }`);
|
147
|
+
}
|
148
|
+
// If there's a parent node, add the new element as a child to the parent node
|
149
|
+
if (jsxStack.length > 0) {
|
150
|
+
const parentNode = jsxStack[jsxStack.length - 1];
|
151
|
+
parentNode.children.push(newElement);
|
152
|
+
}
|
153
|
+
else {
|
154
|
+
// If there's no parent node, add the new element to the root-level jsxObjects array
|
155
|
+
jsxObjects.push(newElement);
|
156
|
+
}
|
157
|
+
// If the tag is not self-closing, push the new element onto the JSX stack
|
158
|
+
if (!isSelfClosing) {
|
159
|
+
jsxStack.push(newElement);
|
160
|
+
}
|
161
|
+
}
|
162
|
+
});
|
163
|
+
return jsxObjects;
|
164
|
+
}
|
165
|
+
exports.default = parseEDL;
|
166
|
+
//# sourceMappingURL=parser.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../src/edl/parser.ts"],"names":[],"mappings":";;AAAA,mCAAsE;AAEtE,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAEnI,MAAM,gBAAgB,GAAG;IACvB,qBAAqB,EAAE,CAAC,SAAS,EAAE,EAAE;QACnC,MAAM,mBAAmB,GAAG,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1D,OAAO,cAAc,CAAC,EAAE;YACtB,IAAG;gBACD,8FAA8F;gBAC9F,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,gCAAgC,EAAE,SAAS,CAAC,CAAC;gBAE9F,OAAO,IAAI,QAAQ,CAAC,mBAAmB,EAAE,YAAY,iBAAiB,KAAK,CAAC,CAAC;aAC9E;YAAC,OAAM,CAAC,EAAC,GAAE;QACd,CAAC,CAAA;IACH,CAAC;IACD,iBAAiB,EAAG,SAAS,CAAC,EAAE;QAE9B,MAAM,mBAAmB,GAAG,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1D,OAAO,CAAC,UAAU,EAAE,EAAE;YACpB,IAAG;gBACD,OAAO,IAAI,QAAQ,CAAC,mBAAmB,EAAE,UAAU,UAAU,GAAG,CAAC,CAAC;aACnE;YAAC,OAAM,CAAC,EAAC,GAAE;QACd,CAAC,CAAA;IACH,CAAC;CACF,CAAC;AAEF,SAAS,gBAAgB;IACvB,OAAO,eAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,cAAc,GAAG,iCAAiC,CAAC;AACzD,MAAM,wB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AW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC;gBAExD,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,iBAAiB,CAAC,SAAS,IAAI,wBAAwB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACpI;YAED,8EAA8E;YAC9E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACjD,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACtC;iBAAM;gBACL,oFAAoF;gBACpF,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC7B;YAED,0EAA0E;YAC1E,IAAI,CAAC,aAAa,EAAE;gBAClB,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC3B;SACF;IAEH,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC;AAGD,kBAAe,QAAQ,CAAC"}
|
@@ -5,7 +5,7 @@ function createNestedTree(items = [], parent = null) {
|
|
5
5
|
const result = items.filter(item => ((!parent && !item.parent) || item.parent === parent));
|
6
6
|
const remainingItems = items.filter(item => result.indexOf(item) === -1);
|
7
7
|
return result.map(item => {
|
8
|
-
const newItem =
|
8
|
+
const newItem = { ...item };
|
9
9
|
newItem.children = createNestedTree(remainingItems, newItem.id);
|
10
10
|
return newItem;
|
11
11
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/helpers/functions.tsx"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,CAAC,KAAK,GAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IACpD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA,EAAE,CAAA,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,M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AC,GAAG,EAAE,OAAa;QAC/B,KAAI,IAAI,GAAG,IAAI,GAAG,EAAE;YAChB,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,IAAI,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,sBAAsB;YAC3E,IAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBACvC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAE,uCAAuC;aAC/D;iBAAM;gBACP,GAAG,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAE,0CAA0C;aAC/D;SACJ;IACL,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,GAAG,CAAC;AACX,CAAC;AAhBD,wBAgBC"}
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const handlebars_min_js_1 = __importDefault(require("handlebars/dist/handlebars.min.js"));
|
7
7
|
const moment_1 = __importDefault(require("moment"));
|
8
8
|
const lodash_1 = require("lodash");
|
9
|
-
const i18ninstance_1 = __importDefault(require("
|
9
|
+
const i18ninstance_1 = __importDefault(require("./i18ninstance"));
|
10
10
|
handlebars_min_js_1.default.registerHelper('json', function (context) {
|
11
11
|
return JSON.stringify(context, null, 2);
|
12
12
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"handlebarHelpers.js","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.ts"],"names":[],"mappings":";;;;;AAAA,0FAA2D;AAC3D,oDAA4B;AAC5B,mCAA+B;AAC/B,
|
1
|
+
{"version":3,"file":"handlebarHelpers.js","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.ts"],"names":[],"mappings":";;;;;AAAA,0FAA2D;AAC3D,oDAA4B;AAC5B,mCAA+B;AAC/B,kEAA0C;AAE1C,2BA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CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"handlebarHelpers.test.d.ts","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.test.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"handlebarHelpers.test.d.ts","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.test.ts"],"names":[],"mappings":"AAGA,OAAO,oBAAoB,CAAC"}
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const chai_1 = require("chai");
|
7
7
|
const handlebars_min_js_1 = __importDefault(require("handlebars/dist/handlebars.min.js"));
|
8
8
|
const moment_1 = __importDefault(require("moment"));
|
9
|
-
const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
|
10
9
|
require("./handlebarHelpers");
|
10
|
+
const i18ninstance_1 = __importDefault(require("./i18ninstance"));
|
11
11
|
describe('Test handlebar temaplates', function () {
|
12
12
|
it('scan returns last value if none available before that', () => {
|
13
13
|
const stringValue = "{{scan a b c}}";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"handlebarHelpers.test.js","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.test.ts"],"names":[],"mappings":";;;;;AAAA,+BAA4B;AAC5B,0FAA2D;AAC3D,oDAA4B;AAC5B,
|
1
|
+
{"version":3,"file":"handlebarHelpers.test.js","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.test.ts"],"names":[],"mappings":";;;;;AAAA,+BAA4B;AAC5B,0FAA2D;AAC3D,oDAA4B;AAC5B,8BAA4B;AAC5B,kEAA0C;AAE1C,QAAQ,CAAC,2BAA2B,EAAE;IAClC,EAAE,CAAC,wDAAwD,EAAE,GAAE,EAAE;QAC7D,MAAM,WAAW,GAAG,gBAAgB,CAAC;QACrC,MAAM,QAAQ,GAAG,2BAAU,CAAC,OAAO,CA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;QACxC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAC"}
|
@@ -1,15 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
3
|
-
var t = {};
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
-
t[p] = s[p];
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
-
t[p[i]] = s[p[i]];
|
10
|
-
}
|
11
|
-
return t;
|
12
|
-
};
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
4
|
};
|
@@ -20,8 +9,13 @@ const axiosClient_1 = __importDefault(require("./axiosClient"));
|
|
20
9
|
exports.getIcons = lodash_1.memoize(() => axiosClient_1.default.get('https://cdn.evlop.com/assets-info/icons.min.json?v=9').then(r => {
|
21
10
|
const iconsMin = r.data;
|
22
11
|
const icons = Object.keys(iconsMin).reduce((acc, key) => {
|
23
|
-
const
|
24
|
-
return [...acc, ...Object.keys(c).map((name) => (
|
12
|
+
const { c, ...rest } = iconsMin[key];
|
13
|
+
return [...acc, ...Object.keys(c).map((name) => ({
|
14
|
+
id: `${key}:${name}`,
|
15
|
+
...rest,
|
16
|
+
n: name,
|
17
|
+
c: c[name],
|
18
|
+
}))];
|
25
19
|
}, []);
|
26
20
|
return icons;
|
27
21
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"iconHelper.js","sourceRoot":"","sources":["../../../src/helpers/iconHelper.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"iconHelper.js","sourceRoot":"","sources":["../../../src/helpers/iconHelper.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAiC;AACjC,gEAAwC;AAE3B,QAAA,QAAQ,GAAG,gBAAO,CAAC,GAAE,EAAE,CAAA,qBAAW,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE;IAChH,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAC,EAAE;QACnD,MAAM,EAAC,CAAC,EAAE,GAAG,IAAI,EAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAC,EAAE,CAAA,CAAC;gBAC3C,EAAE,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE;gBACpB,GAAG,IAAI;gBACP,CAAC,EAAE,IAAI;gBACP,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC;aACb,CAAC,CAAC,CAAC,CAAA;IACR,CAAC,EACA,EAAE,CAAC,CAAC;IACL,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC,CAAC,CAAA"}
|
@@ -8,7 +8,7 @@ const query_string_1 = __importDefault(require("query-string"));
|
|
8
8
|
function generatePath(pathTemplate, params) {
|
9
9
|
if (!pathTemplate || !params)
|
10
10
|
return pathTemplate;
|
11
|
-
const paramsCopy =
|
11
|
+
const paramsCopy = { ...params };
|
12
12
|
// Replace placeholders in the path
|
13
13
|
let path = String(pathTemplate).replace(/:\w+/g, (match) => {
|
14
14
|
const paramKey = match.substring(1); // Remove the ':' prefix
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pathHelper.js","sourceRoot":"","sources":["../../../src/helpers/pathHelper.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AAEvC,SAAgB,YAAY,CAAC,YAAoB,EAAE,MAAW;IAE1D,IAAI,CAAC,YAAY,IAAI,CAAC,MAAM;QAAE,OAAO,YAAY,CAAC;IAElD,MAAM,UAAU,
|
1
|
+
{"version":3,"file":"pathHelper.js","sourceRoot":"","sources":["../../../src/helpers/pathHelper.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AAEvC,SAAgB,YAAY,CAAC,YAAoB,EAAE,MAAW;IAE1D,IAAI,CAAC,YAAY,IAAI,CAAC,MAAM;QAAE,OAAO,YAAY,CAAC;IAElD,MAAM,UAAU,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAEjC,mCAAmC;IACnC,IAAI,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB;QAC7D,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;YACpC,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,0EAA0E;YACvG,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;SACpC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,mEAAmE;IACnE,MAAM,KAAK,GAAG,sBAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEhD,wCAAwC;IACxC,IAAI,KAAK,EAAE;QACP,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;KACvB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AA1BD,oCA0BC"}
|
@@ -138,7 +138,15 @@ const lightModeColorShades = {
|
|
138
138
|
800: 0.4,
|
139
139
|
900: 0.51,
|
140
140
|
};
|
141
|
-
const lightModeGrayColorShades =
|
141
|
+
const lightModeGrayColorShades = {
|
142
|
+
0: -1,
|
143
|
+
25: -0.97,
|
144
|
+
...lightModeColorShades,
|
145
|
+
950: 0.6,
|
146
|
+
1000: 0.7,
|
147
|
+
1050: 0.8,
|
148
|
+
1100: 0.9,
|
149
|
+
};
|
142
150
|
const darkModeColorShades = {
|
143
151
|
// darken
|
144
152
|
50: 0.9,
|
@@ -153,7 +161,15 @@ const darkModeColorShades = {
|
|
153
161
|
800: -0.75,
|
154
162
|
900: -0.9,
|
155
163
|
};
|
156
|
-
const darkModeGrayColorShades =
|
164
|
+
const darkModeGrayColorShades = {
|
165
|
+
0: 1,
|
166
|
+
25: 0.95,
|
167
|
+
...darkModeColorShades,
|
168
|
+
950: -0.925,
|
169
|
+
1000: -0.95,
|
170
|
+
1050: -0.97,
|
171
|
+
1100: -1,
|
172
|
+
};
|
157
173
|
const colorAlphaShades = {
|
158
174
|
"50": 0.05,
|
159
175
|
"100": 0.1,
|
@@ -216,7 +232,11 @@ function generateColorAlphaShades(color) {
|
|
216
232
|
}
|
217
233
|
exports.generateColorAlphaShades = generateColorAlphaShades;
|
218
234
|
function generateColorShadesWithName(colorName, color, dark = false) {
|
219
|
-
return
|
235
|
+
return {
|
236
|
+
...lodash_1.mapKeys(generateColorLightDarkShades(color, colorName, dark), (color, shade) => `${colorName}-${shade}`),
|
237
|
+
...lodash_1.mapKeys(generateColorLightDarkShades(color, colorName, dark), (color, shade) => `${colorName}-shade-${shade}`),
|
238
|
+
...lodash_1.mapKeys(generateColorAlphaShades(color), (color, shade) => `${colorName}-alpha-${shade}`),
|
239
|
+
};
|
220
240
|
}
|
221
241
|
exports.generateColorShadesWithName = generateColorShadesWithName;
|
222
242
|
// colors
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"themeHelpers.js","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":";;;AAAA,mCAAqE;AACrE,uCAAmF;AAEnF,MAAM,UAAU,GAAG,gBAAO,CAAC,q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AAK,EAAE,KAAK,EAAC,EAAE,CAAA,GAAG,SAAS,UAAU,KAAK,EAAE,CAAC;KAC3F,CAAA;AACH,CAAC;AAND,kEAMC;AAEH,SAAS;AACT,SAAgB,gBAAgB,CAAC,MAAqC,EAAE,OAAgB,KAAK;IACzF,OAAO,eAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,EAAE;QAC9C,eAAM,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,EAAE,2BAA2B,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;QAC5F,OAAO,MAAM,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAA;AACV,CAAC;AALD,4CAKC"}
|
@@ -1,13 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
4
|
};
|
@@ -30,11 +21,11 @@ const useAsyncAction = (action) => {
|
|
30
21
|
const createActionHandeller = useActionable_1.default();
|
31
22
|
const [isProcessing, setIsProcessing] = react_1.useState(false);
|
32
23
|
const actionHandeller = react_1.useMemo(() => action ? createActionHandeller(action) : null, [action, createActionHandeller]);
|
33
|
-
const handleAction = react_1.useCallback((event) =>
|
24
|
+
const handleAction = react_1.useCallback(async (event) => {
|
34
25
|
setIsProcessing(true);
|
35
26
|
let actionRes;
|
36
27
|
try {
|
37
|
-
actionRes =
|
28
|
+
actionRes = await actionHandeller(event);
|
38
29
|
}
|
39
30
|
catch (error) {
|
40
31
|
console.error(error);
|
@@ -43,7 +34,7 @@ const useAsyncAction = (action) => {
|
|
43
34
|
setIsProcessing(false);
|
44
35
|
return actionRes;
|
45
36
|
}
|
46
|
-
}
|
37
|
+
}, [actionHandeller]);
|
47
38
|
return [isProcessing, handleAction];
|
48
39
|
};
|
49
40
|
exports.useAsyncAction = useAsyncAction;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAction.js","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useAction.js","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAuD;AACvD,oEAAwD;AAExD,qCAAqC;AACrC;;;;GAIG;AAEI,MAAM,SAAS,GAAG,CAAC,MAAe,EAAC,EAAE;IACxC,MAAM,qBAAqB,GAAG,uBAAa,EAAE,CAAC;IAE9C,OAAO,eAAO,CAAC,GAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;AACxF,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB;AAEK,MAAM,cAAc,GAAG,CAAC,MAAe,EAAC,EAAE;IAC7C,MAAM,qBAAqB,GAAG,uBAAa,EAAE,CAAC;IAC9C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,gBAAQ,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,eAAe,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CA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BAAY,MAAM,GAAG,YAAY,GAAG,cAAc,GAAG,QAAQ,CAAC;AAE9D,eAAO,MAAM,0BAA0B,cAAe,GAAG,cAgDH,MAAM,GAAG,MAAM,EAAE,aAAa,GAAG,QAStF,CAAA;AAED;;GAEG;AACJ,eAAO,MAAM,aAAa,iBAd6B,MAAM,GAAG,MAAM,EAAE,aAAa,GAAG,QAkBvF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -39,7 +39,7 @@ const useActionableWithNavigator = (navigator) => {
|
|
39
39
|
if (typeof actionToUse === 'function')
|
40
40
|
return actionToUse(event);
|
41
41
|
if (typeof actionToUse === 'object') {
|
42
|
-
const { link, navigate, replace, navigationAction, push, page, params, dispatch: _reduxAction, reduxAction = _reduxAction, route, callback } = actionToUse;
|
42
|
+
const { link, navigate, replace, navigationAction, push, page, params, setParams, dispatch: _reduxAction, reduxAction = _reduxAction, route, callback } = actionToUse;
|
43
43
|
if (link)
|
44
44
|
return navigator.openURL(templateFunctionRef.current(link));
|
45
45
|
if (navigate)
|
@@ -50,6 +50,8 @@ const useActionableWithNavigator = (navigator) => {
|
|
50
50
|
return navigator.push(...lodash_1.castArray(JSON.parse(templateFunctionRef.current(JSON.stringify(push)))));
|
51
51
|
if (navigationAction)
|
52
52
|
return navigator.dispatch(JSON.parse(templateFunctionRef.current(JSON.stringify(navigationAction))));
|
53
|
+
if (setParams)
|
54
|
+
return navigator.setParams(JSON.parse(templateFunctionRef.current(JSON.stringify(setParams))));
|
53
55
|
if (page) {
|
54
56
|
const routeParams = params ? JSON.parse(templateFunctionRef.current(JSON.stringify(params))) : undefined;
|
55
57
|
return navigator.openPage(page, routeParams);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useActionable.js","sourceRoot":"","sources":["../../../src/hooks/useActionable.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAqD;AACrD,6CAA0C;AAC1C,mCAAuD;AACvD,iDAA4C;AAC5C,yCAAoC;AACpC,gEAAwC;
|
1
|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AC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;SACzH;QACD,OAAO,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,qBAAqB,CAAC;AAChC,CAAC,CAAA;AAzDY,QAAA,0BAA0B,8BAyDtC;AAED;;GAEG;AACG,MAAM,aAAa,GAAG,GAAE,EAAE;IAC7B,MAAM,SAAS,GAAG,2BAAY,EAAE,CAAC;IAEjC,OAAO,kCAA0B,CAAC,SAAS,CAAC,CAAA;AAChD,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEF,kBAAe,qBAAa,CAAC"}
|
@@ -15,7 +15,7 @@ const useComponentConfigProps = (config_name, props) => {
|
|
15
15
|
config[key] = componentConfig[key];
|
16
16
|
}
|
17
17
|
return config;
|
18
|
-
}, props ?
|
18
|
+
}, props ? { ...props } : {}), [componentConfig, props]);
|
19
19
|
};
|
20
20
|
exports.useComponentConfigProps = useComponentConfigProps;
|
21
21
|
exports.default = exports.useComponentConfigProps;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useComponentConfigProps.js","sourceRoot":"","sources":["../../../src/hooks/useComponentConfigProps.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAA8B;AAC9B,oDAAuB;AACvB,yDAAoD;AAE7C,MAAM,uBAAuB,GAAG,CAAC,WAAW,EAAE,KAAK,EAAC,EAAE;IAEzD,MAAM,EAAC,IAAI,EAAC,GAAG,mCAAgB,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,gBAAC,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAC,EAAE;QAClE,IAAG,eAAe,CAAC,GAAG,CAAC,KAAK,IAAI,EAAC;YAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;SACtC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC,EAAE,KAAK,CAAA,CAAC,
|
1
|
+
{"version":3,"file":"useComponentConfigProps.js","sourceRoot":"","sources":["../../../src/hooks/useComponentConfigProps.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAA8B;AAC9B,oDAAuB;AACvB,yDAAoD;AAE7C,MAAM,uBAAuB,GAAG,CAAC,WAAW,EAAE,KAAK,EAAC,EAAE;IAEzD,MAAM,EAAC,IAAI,EAAC,GAAG,mCAAgB,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,gBAAC,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAC,EAAE;QAClE,IAAG,eAAe,CAAC,GAAG,CAAC,KAAK,IAAI,EAAC;YAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;SACtC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC,EAAE,KAAK,CAAA,CAAC,CAAC,EAAC,GAAG,KAAK,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;AAC1D,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC;AAEF,kBAAe,+BAAuB,CAAC"}
|
@@ -28,7 +28,7 @@ const useDataSource = (source, options) => {
|
|
28
28
|
// prepare datasource options by filling values from scope using template
|
29
29
|
const dataSourceOptions = react_1.useMemo(() => {
|
30
30
|
const paramNames = lodash_1.sortedUniq(lodash_1.map(lodash_1.get(dataSource, 'configurationOptions'), 'name'));
|
31
|
-
const templatedValues = lodash_1.reduce(paramNames, (acc, paramName) => (
|
31
|
+
const templatedValues = lodash_1.reduce(paramNames, (acc, paramName) => ({ ...acc, [paramName]: template(lodash_1.get(_dataSourceOptions, paramName)) }), {});
|
32
32
|
return lodash_1.defaults(templatedValues, _dataSourceOptions);
|
33
33
|
}, [scope, template, dataSourceName, dataSource, _dataSourceOptions]);
|
34
34
|
const { memoize, isReady } = dataSourceOptions;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDataSource.js","sourceRoot":"","sources":["../../../src/hooks/useDataSource.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAiG;AACjG,iCAAwD;AACxD,6CAAuD;AACvD,wCAAwC;AACxC,0CAAmK;AACnK,yCAAsC;AACtC,gEAAwC;AAexC,MAAM,wBAAwB,GAAgC,EAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAA;AAErF,MAAM,aAAa,GAAG,CAAE,MAAkC,EAAG,OAA2B,EAAQ,EAAE;IACrG,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,qBAAW,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,mBAAQ,EAAE,CAAC;IAEzB,MAAM,EAAC,cAAc,EAAE,OAAO,EAAE,kBAAkB,EAAC,GAAG,eAAO,CAAC,GAAE,EAAE;QAC9D,IAAG,OAAO,MAAM,KAAK,QAAQ,EAAC;YAC1B,OAAO,EAAC,cAAc,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAQ,CAAC,aAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,wBAAwB,CAAC,EAAE,CAAC;SAC9G;aAAK;YACF,OAAO,EAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC,EAAC,CAAC;SACzF;IACL,CAAC,EAAE,CAAC,MAAM,EA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,EAAE,CAAC,CAAC;gBAC9C,YAAY,EAAE,YAAG,CAAC,YAAY,EAAE,cAAc,EAAE,CAAC,CAAC;gBAClD,IAAI,EAAE,YAAG,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;gBACnC,OAAO,EAAE,QAAQ;gBACjB,MAAM;gBACN,QAAQ;gBACR,IAAI;gBACJ,QAAQ;aACX,CAAC,CAAC;SACN;QACD,OAAO,YAAY,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC/C,CAAC,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;IAE/C,QAAO,cAAc,EAAC;QAClB,KAAK,QAAQ;YACT,OAAO,iBAAiB,CAAC,IAAI,CAAC;QAClC,KAAK,OAAO;YACR,OAAO,YAAG,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC9C;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAhHW,QAAA,aAAa,iBAgHxB"}
|
@@ -26,7 +26,7 @@ const useNavigatorWithNavigation = (history) => {
|
|
26
26
|
setParams: (params = {}) => history.replace({
|
27
27
|
pathname,
|
28
28
|
hash,
|
29
|
-
search: query_string_1.default.stringify(
|
29
|
+
search: query_string_1.default.stringify({ ...queryParams, ...params }),
|
30
30
|
})
|
31
31
|
});
|
32
32
|
}, [params, history, pathname, hash, search, state]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAgC;AAChC,iCAAmD;AACnD,6CAA0C;AAC1C,gEAAuC;AACvC,+CAAkE;AAClE,0CAA0C;AAEnC,MAAM,0BAA0B,GAAG,CAAC,OAAY,EAAC,EAAE;IACtD,MAAM,MAAM,GAAG,wBAAS,EAAE,CAAC;IAC3B,MAAM,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,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AqBtC;AAGM,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,MAAM,OAAO,GAAG,yBAAU,EAAE,CAAC;IAE7B,OAAO,kCAA0B,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC,CAAC;AAJW,QAAA,YAAY,gBAIvB;AAEW,QAAA,aAAa,GAAG,oBAAY,CAAC"}
|
@@ -10,7 +10,7 @@ const react_router_1 = require("react-router");
|
|
10
10
|
const useParams = () => {
|
11
11
|
const params = react_router_1.useParams();
|
12
12
|
const { state, search } = react_router_1.useLocation();
|
13
|
-
return react_1.useMemo(() => (
|
13
|
+
return react_1.useMemo(() => ({ ...params, ...state, ...query_string_1.default.parse(search) }), [params, state, search]);
|
14
14
|
};
|
15
15
|
exports.useParams = useParams;
|
16
16
|
//# sourceMappingURL=useParams.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useParams.js","sourceRoot":"","sources":["../../../src/hooks/useParams.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAgC;AAChC,gEAAuC;AACvC,+CAA8E;AAEvE,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,MAAM,MAAM,GAAG,wBAAoB,EAAE,CAAC;IACtC,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,0BAAW,EAAE,CAAC;IAEtC,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA
|
1
|
+
{"version":3,"file":"useParams.js","sourceRoot":"","sources":["../../../src/hooks/useParams.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAgC;AAChC,gEAAuC;AACvC,+CAA8E;AAEvE,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,MAAM,MAAM,GAAG,wBAAoB,EAAE,CAAC;IACtC,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,0BAAW,EAAE,CAAC;IAEtC,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,CAAC,EAAC,GAAG,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,sBAAW,CAAC,KAAK,CAAC,MAAM,CAAC,EAAC,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACvG,CAAC,CAAC;AALW,QAAA,SAAS,aAKpB"}
|