drapcode-utility 1.5.7 → 1.5.8
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/build/utils/util.d.ts +1 -1
- package/build/utils/util.js +7 -1
- package/package.json +3 -3
package/build/utils/util.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const arraysEqual: (array1: any, array2: any) => boolean;
|
|
|
20
20
|
export declare const convertItemToArray: (itemValue: any) => any[];
|
|
21
21
|
export declare const validateAlphanumericString: (str: string) => false | "String should contain only numbers and letters";
|
|
22
22
|
export declare const formatCustomCSSClasses: (customClasses: any) => string;
|
|
23
|
-
export declare const replaceDataValueIntoExpression: (expression: string, data: any, user: any, tenant: any, sessionValue: any, envConstants: any, sessionFormValue: any, localStorageValue: any, cookiesValue: any) => string;
|
|
23
|
+
export declare const replaceDataValueIntoExpression: (expression: string, data: any, user: any, tenant: any, userSetting: any, sessionValue: any, envConstants: any, sessionFormValue: any, localStorageValue: any, cookiesValue: any) => string;
|
|
24
24
|
export declare const parseJsonString: (str: string) => any;
|
|
25
25
|
export declare const parseValueFromData: (data: any, fieldName: string) => any;
|
|
26
26
|
export declare const unflattenObject: (obj: any) => {};
|
package/build/utils/util.js
CHANGED
|
@@ -291,7 +291,7 @@ var formatCustomCSSClasses = function (customClasses) {
|
|
|
291
291
|
return projectCustomCSSClassesData;
|
|
292
292
|
};
|
|
293
293
|
exports.formatCustomCSSClasses = formatCustomCSSClasses;
|
|
294
|
-
var replaceDataValueIntoExpression = function (expression, data, user, tenant, sessionValue, envConstants, sessionFormValue, localStorageValue, cookiesValue) {
|
|
294
|
+
var replaceDataValueIntoExpression = function (expression, data, user, tenant, userSetting, sessionValue, envConstants, sessionFormValue, localStorageValue, cookiesValue) {
|
|
295
295
|
var _a;
|
|
296
296
|
var contentList = (_a = expression
|
|
297
297
|
.match(/{{(.*?)}}/g)) === null || _a === void 0 ? void 0 : _a.map(function (b) { return b.replace(/{{(.*?)}}/g, "$1"); });
|
|
@@ -310,6 +310,12 @@ var replaceDataValueIntoExpression = function (expression, data, user, tenant, s
|
|
|
310
310
|
dataOfItem = (0, exports.parseValueFromData)(tenant, prop);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
+
else if (prop.includes("current_settings")) {
|
|
314
|
+
prop = prop.replace("current_settings.", "");
|
|
315
|
+
if (Object.keys(userSetting).length > 0) {
|
|
316
|
+
dataOfItem = (0, exports.parseValueFromData)(userSetting, prop);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
313
319
|
else if (prop.includes("current_session")) {
|
|
314
320
|
prop = prop.replace("current_session.", "");
|
|
315
321
|
if (Object.keys(sessionValue).length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drapcode-utility",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@types/voca": "^1.4.2",
|
|
38
38
|
"axios": "^1.1.2",
|
|
39
39
|
"dompurify": "^3.1.7",
|
|
40
|
-
"drapcode-constant": "^1.4.
|
|
41
|
-
"drapcode-logger": "^1.1.
|
|
40
|
+
"drapcode-constant": "^1.4.9",
|
|
41
|
+
"drapcode-logger": "^1.1.9",
|
|
42
42
|
"drapcode-redis": "^1.0.6",
|
|
43
43
|
"exiftool-vendored": "^28.2.1",
|
|
44
44
|
"express": "^4.17.1",
|