awing-library 2.1.2-dev.557 → 2.1.2-dev.558

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,10 +6,10 @@ 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
- "../DataInput": function(module) {
9
+ "AWING/DataInput": function(module) {
10
10
  module.exports = __WEBPACK_EXTERNAL_MODULE__DataInput_index_js_c7933a4f__;
11
11
  },
12
- "../helper": function(module) {
12
+ "AWING/helper": function(module) {
13
13
  module.exports = __WEBPACK_EXTERNAL_MODULE__helper_js_663c9e82__;
14
14
  }
15
15
  };
@@ -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__("../DataInput");
26
+ var index_js_ = __webpack_require__("AWING/DataInput");
27
27
  jest.mock('../DataInput', ()=>({
28
28
  __esModule: true,
29
29
  default: jest.fn(),
@@ -91,10 +91,10 @@ jest.mock('@mui/material', ()=>({
91
91
  children: children
92
92
  })
93
93
  }));
94
- const mockInputFactory = __webpack_require__("../DataInput")["default"];
95
- const mockCalculateValue = __webpack_require__("../helper").calculateValue;
96
- const mockConvertFormulaToBinaryTree = __webpack_require__("../helper").convertFormulaToBinaryTree;
97
- const mockReplaceFieldsValue = __webpack_require__("../helper").replaceFieldsValue;
94
+ const mockInputFactory = __webpack_require__("AWING/DataInput")["default"];
95
+ const mockCalculateValue = __webpack_require__("AWING/helper").calculateValue;
96
+ const mockConvertFormulaToBinaryTree = __webpack_require__("AWING/helper").convertFormulaToBinaryTree;
97
+ const mockReplaceFieldsValue = __webpack_require__("AWING/helper").replaceFieldsValue;
98
98
  describe('DataForm Component', ()=>{
99
99
  const mockFields = [
100
100
  {
@@ -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
- "../DataInput": function(module) {
8
+ "AWING/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__("../DataInput")["default"];
101
+ const mockInputFactory = __webpack_require__("AWING/DataInput")["default"];
102
102
  describe('DataForm Optimized - Performance Tests', ()=>{
103
103
  let inputRenderCounts = {};
104
104
  const mockFields = [
@@ -1 +1 @@
1
- {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/AWING/DirectoryPermission/AddOrEdit/Container.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,SAAS,CAAC;AAEvE,QAAA,MAAM,mBAAmB,UAAW,cAAc,4CAgTjD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/AWING/DirectoryPermission/AddOrEdit/Container.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,SAAS,CAAC;AAEvE,QAAA,MAAM,mBAAmB,UAAW,cAAc,4CA8SjD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -39,9 +39,7 @@ const AddOrEditPermission = (props)=>{
39
39
  const [confirmExit, setConfirmExit] = useState(false);
40
40
  const [authenPermissions, setAuthenPermissions] = useState([]);
41
41
  const [explicitMatrixPermissions, setExplicitMatrixPermissions] = useState([]);
42
- const [explicitPermissions, setExplicitPermissions] = useState([
43
- defaultPermission
44
- ]);
42
+ const [explicitPermissions, setExplicitPermissions] = useState([]);
45
43
  const [schemasByWorkspace, setSchemasByWorkspace] = useState([]);
46
44
  const [currentPermission, setCurrentPermission] = useState(getDefaultCurrentPermission('Role'));
47
45
  const [objectTypeCodeSelected, setObjectTypeCodeSelected] = useState(isCampaignPermissions ? Constants.OBJECT_TYPE_CODE_CAMPAIGN : objectTypeCodeTab ?? '');
@@ -173,13 +171,11 @@ const AddOrEditPermission = (props)=>{
173
171
  objectTypeCodeSelected
174
172
  ]);
175
173
  useEffect(()=>{
176
- if (schemasFiltered.length) {
177
- if (!isCreate) setExplicitPermissions(()=>schemasFiltered.map((s)=>({
178
- schemaId: s.id,
179
- permissions: [],
180
- workflowStateIds: []
181
- })));
182
- } else setExplicitPermissions([
174
+ if (isCreate) schemasFiltered.length ? setExplicitPermissions((prev)=>schemasFiltered.map((s, index)=>({
175
+ schemaId: s.id,
176
+ permissions: prev[index]?.permissions ?? [],
177
+ workflowStateIds: []
178
+ }))) : setExplicitPermissions([
183
179
  defaultPermission
184
180
  ]);
185
181
  setSchemas(schemasFiltered);
@@ -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,YAAY,CAAE,qBAAqB;IAC1C,EAAE,OAAO,CAAE,YAAY;IACvB,WAAW,gBAAgB,CAAE,6BAA6B;IAC1D,KAAK,UAAU,CAAE,eAAe;IAChC,OAAO,YAAY,CAAE,gEAAgE;IACrF,MAAM,WAAW,CAAE,6BAA6B;IAChD,MAAM,WAAW;CACpB;AAED;;GAEG;AACH,oBAAY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;;;;;;;;;;;;;;;;;;;;;;GAoIG"}
@@ -52,7 +52,7 @@ function convertArrayFiltersToCondition(filters, defaultOperator = "and") {
52
52
  };
53
53
  }
54
54
  function createSingleCondition(key, value, typeStr) {
55
- const escapeValue = (val)=>val.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\//g, '\\/');
55
+ const escapeValue = (val)=>val.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\//g, '\\/').replace(/'/g, '\'\'');
56
56
  let condition;
57
57
  switch(typeStr){
58
58
  case "eq":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.2-dev.557",
3
+ "version": "2.1.2-dev.558",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {