awing-library 2.1.2-dev.564 → 2.1.2-dev.565
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.
|
@@ -6,7 +6,7 @@ import { fireEvent, render, screen } from "@testing-library/react";
|
|
|
6
6
|
import { Constants } from "../../Commons/Constant.js";
|
|
7
7
|
import container from "./container.js";
|
|
8
8
|
var __webpack_modules__ = {
|
|
9
|
-
"
|
|
9
|
+
"../DataInput": function(module) {
|
|
10
10
|
module.exports = __WEBPACK_EXTERNAL_MODULE__DataInput_index_js_c7933a4f__;
|
|
11
11
|
},
|
|
12
12
|
"../helper": function(module) {
|
|
@@ -23,7 +23,7 @@ function __webpack_require__(moduleId) {
|
|
|
23
23
|
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
24
24
|
return module.exports;
|
|
25
25
|
}
|
|
26
|
-
var index_js_ = __webpack_require__("
|
|
26
|
+
var index_js_ = __webpack_require__("../DataInput");
|
|
27
27
|
jest.mock('../DataInput', ()=>({
|
|
28
28
|
__esModule: true,
|
|
29
29
|
default: jest.fn(),
|
|
@@ -91,7 +91,7 @@ jest.mock('@mui/material', ()=>({
|
|
|
91
91
|
children: children
|
|
92
92
|
})
|
|
93
93
|
}));
|
|
94
|
-
const mockInputFactory = __webpack_require__("
|
|
94
|
+
const mockInputFactory = __webpack_require__("../DataInput")["default"];
|
|
95
95
|
const mockCalculateValue = __webpack_require__("../helper").calculateValue;
|
|
96
96
|
const mockConvertFormulaToBinaryTree = __webpack_require__("../helper").convertFormulaToBinaryTree;
|
|
97
97
|
const mockReplaceFieldsValue = __webpack_require__("../helper").replaceFieldsValue;
|
|
@@ -5,7 +5,7 @@ import { act, fireEvent, render, screen, waitFor } from "@testing-library/react"
|
|
|
5
5
|
import containerOptimized from "./containerOptimized.js";
|
|
6
6
|
import { createFormStateManager } from "./formStateManager.js";
|
|
7
7
|
var __webpack_modules__ = {
|
|
8
|
-
"
|
|
8
|
+
"../DataInput": function(module) {
|
|
9
9
|
module.exports = __WEBPACK_EXTERNAL_MODULE__DataInput_index_js_c7933a4f__;
|
|
10
10
|
}
|
|
11
11
|
};
|
|
@@ -98,7 +98,7 @@ jest.mock('@mui/material', ()=>({
|
|
|
98
98
|
children: children
|
|
99
99
|
})
|
|
100
100
|
}));
|
|
101
|
-
const mockInputFactory = __webpack_require__("
|
|
101
|
+
const mockInputFactory = __webpack_require__("../DataInput")["default"];
|
|
102
102
|
describe('DataForm Optimized - Performance Tests', ()=>{
|
|
103
103
|
let inputRenderCounts = {};
|
|
104
104
|
const mockFields = [
|
package/dist/Helpers/query.d.ts
CHANGED
|
@@ -55,6 +55,12 @@ export type FilterExpression = FilterItem | FilterGroup;
|
|
|
55
55
|
export declare function convertArrayFiltersToCondition(filters: Array<FilterItem>, defaultOperator?: LogicalOperatorType): {
|
|
56
56
|
condition: string;
|
|
57
57
|
} | null;
|
|
58
|
+
/**
|
|
59
|
+
* Helper function to escape special characters for query strings
|
|
60
|
+
* @param val - The string value to escape
|
|
61
|
+
* @returns The escaped string
|
|
62
|
+
*/
|
|
63
|
+
export declare function escapeValue(val: string): string;
|
|
58
64
|
/**
|
|
59
65
|
* Converts a complex filter expression to a string condition
|
|
60
66
|
* @param filterExpression - Filter expression (can be nested with logical operators)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/Helpers/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,mBAAmB;IAC3B,EAAE,OAAO,CAAE,QAAQ;IACnB,QAAQ,aAAa,CAAE,qBAAqB;IAC5C,UAAU,eAAe,CAAE,cAAc;IACzC,QAAQ,aAAa,CAAE,YAAY;IACnC,EAAE,OAAO,CAAE,eAAe;IAC1B,GAAG,QAAQ,CAAE,wBAAwB;IACrC,EAAE,OAAO,CAAE,YAAY;IACvB,GAAG,QAAQ,CAAE,qBAAqB;IAClC,EAAE,OAAO,CAAE,WAAW;IACtB,OAAO,YAA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G"}
|
package/dist/Helpers/query.js
CHANGED
|
@@ -51,8 +51,10 @@ function convertArrayFiltersToCondition(filters, defaultOperator = "and") {
|
|
|
51
51
|
condition: conditionString
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
+
function escapeValue(val) {
|
|
55
|
+
return val.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\//g, '\\/').replace(/'/g, '\'\'');
|
|
56
|
+
}
|
|
54
57
|
function createSingleCondition(key, value, typeStr) {
|
|
55
|
-
const escapeValue = (val)=>val.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\//g, '\\/').replace(/'/g, '\'\'');
|
|
56
58
|
let condition;
|
|
57
59
|
switch(typeStr){
|
|
58
60
|
case "eq":
|
|
@@ -161,4 +163,4 @@ function convertFilterExpressionToCondition(filterExpression) {
|
|
|
161
163
|
if (params.length > 0) result.params = params;
|
|
162
164
|
return result;
|
|
163
165
|
}
|
|
164
|
-
export { query_FilterOperationType as FilterOperationType, query_LogicalOperatorType as LogicalOperatorType, convertArrayFiltersToCondition, convertFilterExpressionToCondition };
|
|
166
|
+
export { query_FilterOperationType as FilterOperationType, query_LogicalOperatorType as LogicalOperatorType, convertArrayFiltersToCondition, convertFilterExpressionToCondition, escapeValue };
|