@fctc/widget-logic 4.4.8 → 4.5.0

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/dist/index.js CHANGED
@@ -5360,7 +5360,6 @@ var many2oneFieldController = (props) => {
5360
5360
  const [tempSelectedOption, setTempSelectedOption] = (0, import_react16.useState)(null);
5361
5361
  const [domainModal, setDomainModal] = (0, import_react16.useState)(null);
5362
5362
  const [domainObject, setDomainObject] = (0, import_react16.useState)(null);
5363
- console.log("domainObject", domainObject, typeof domainObject);
5364
5363
  const initValue = methods?.getValues(name);
5365
5364
  const contextObject = {
5366
5365
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -5422,14 +5421,9 @@ var many2oneFieldController = (props) => {
5422
5421
  );
5423
5422
  (0, import_react16.useEffect)(() => {
5424
5423
  const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
5425
- const parsedDomain = typeof newDomain === "string" ? JSON.parse(
5426
- newDomain.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"')
5427
- ) : newDomain;
5428
- setDomainObject((prev) => {
5429
- const prevStr = JSON.stringify(prev);
5430
- const nextStr = JSON.stringify(parsedDomain);
5431
- return prevStr === nextStr ? prev : parsedDomain;
5432
- });
5424
+ setDomainObject(
5425
+ (prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
5426
+ );
5433
5427
  }, [domain, parsedFormValues]);
5434
5428
  (0, import_react16.useEffect)(() => {
5435
5429
  if (!propValue && tempSelectedOption) {
package/dist/index.mjs CHANGED
@@ -5455,7 +5455,6 @@ var many2oneFieldController = (props) => {
5455
5455
  const [tempSelectedOption, setTempSelectedOption] = useState7(null);
5456
5456
  const [domainModal, setDomainModal] = useState7(null);
5457
5457
  const [domainObject, setDomainObject] = useState7(null);
5458
- console.log("domainObject", domainObject, typeof domainObject);
5459
5458
  const initValue = methods?.getValues(name);
5460
5459
  const contextObject = {
5461
5460
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -5517,14 +5516,9 @@ var many2oneFieldController = (props) => {
5517
5516
  );
5518
5517
  useEffect10(() => {
5519
5518
  const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
5520
- const parsedDomain = typeof newDomain === "string" ? JSON.parse(
5521
- newDomain.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"')
5522
- ) : newDomain;
5523
- setDomainObject((prev) => {
5524
- const prevStr = JSON.stringify(prev);
5525
- const nextStr = JSON.stringify(parsedDomain);
5526
- return prevStr === nextStr ? prev : parsedDomain;
5527
- });
5519
+ setDomainObject(
5520
+ (prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
5521
+ );
5528
5522
  }, [domain, parsedFormValues]);
5529
5523
  useEffect10(() => {
5530
5524
  if (!propValue && tempSelectedOption) {
package/dist/widget.js CHANGED
@@ -4586,7 +4586,6 @@ var many2oneFieldController = (props) => {
4586
4586
  const [tempSelectedOption, setTempSelectedOption] = (0, import_react16.useState)(null);
4587
4587
  const [domainModal, setDomainModal] = (0, import_react16.useState)(null);
4588
4588
  const [domainObject, setDomainObject] = (0, import_react16.useState)(null);
4589
- console.log("domainObject", domainObject, typeof domainObject);
4590
4589
  const initValue = methods?.getValues(name);
4591
4590
  const contextObject = {
4592
4591
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -4648,14 +4647,9 @@ var many2oneFieldController = (props) => {
4648
4647
  );
4649
4648
  (0, import_react16.useEffect)(() => {
4650
4649
  const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
4651
- const parsedDomain = typeof newDomain === "string" ? JSON.parse(
4652
- newDomain.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"')
4653
- ) : newDomain;
4654
- setDomainObject((prev) => {
4655
- const prevStr = JSON.stringify(prev);
4656
- const nextStr = JSON.stringify(parsedDomain);
4657
- return prevStr === nextStr ? prev : parsedDomain;
4658
- });
4650
+ setDomainObject(
4651
+ (prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
4652
+ );
4659
4653
  }, [domain, parsedFormValues]);
4660
4654
  (0, import_react16.useEffect)(() => {
4661
4655
  if (!propValue && tempSelectedOption) {
package/dist/widget.mjs CHANGED
@@ -4658,7 +4658,6 @@ var many2oneFieldController = (props) => {
4658
4658
  const [tempSelectedOption, setTempSelectedOption] = useState7(null);
4659
4659
  const [domainModal, setDomainModal] = useState7(null);
4660
4660
  const [domainObject, setDomainObject] = useState7(null);
4661
- console.log("domainObject", domainObject, typeof domainObject);
4662
4661
  const initValue = methods?.getValues(name);
4663
4662
  const contextObject = {
4664
4663
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -4720,14 +4719,9 @@ var many2oneFieldController = (props) => {
4720
4719
  );
4721
4720
  useEffect10(() => {
4722
4721
  const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
4723
- const parsedDomain = typeof newDomain === "string" ? JSON.parse(
4724
- newDomain.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"')
4725
- ) : newDomain;
4726
- setDomainObject((prev) => {
4727
- const prevStr = JSON.stringify(prev);
4728
- const nextStr = JSON.stringify(parsedDomain);
4729
- return prevStr === nextStr ? prev : parsedDomain;
4730
- });
4722
+ setDomainObject(
4723
+ (prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
4724
+ );
4731
4725
  }, [domain, parsedFormValues]);
4732
4726
  useEffect10(() => {
4733
4727
  if (!propValue && tempSelectedOption) {
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
- {
2
- "name": "@fctc/widget-logic",
3
- "version": "4.4.8",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./hooks": {
14
- "types": "./dist/hooks.d.ts",
15
- "import": "./dist/hooks.mjs",
16
- "require": "./dist/hooks.cjs"
17
- },
18
- "./widget": {
19
- "types": "./dist/widget.d.ts",
20
- "import": "./dist/widget.mjs",
21
- "require": "./dist/widget.cjs"
22
- },
23
- "./icons": {
24
- "types": "./dist/icons.d.ts",
25
- "import": "./dist/icons.mjs",
26
- "require": "./dist/icons.cjs"
27
- },
28
- "./utils": {
29
- "types": "./dist/utils.d.ts",
30
- "import": "./dist/utils.mjs",
31
- "require": "./dist/utils.cjs"
32
- },
33
- "./store": {
34
- "types": "./dist/store.d.ts",
35
- "import": "./dist/store.mjs",
36
- "require": "./dist/store.cjs"
37
- },
38
- "./config": {
39
- "types": "./dist/config.d.ts",
40
- "import": "./dist/config.mjs",
41
- "require": "./dist/config.cjs"
42
- },
43
- "./constants": {
44
- "types": "./dist/constants.d.ts",
45
- "import": "./dist/constants.mjs",
46
- "require": "./dist/constants.cjs"
47
- },
48
- "./environment": {
49
- "types": "./dist/environment.d.ts",
50
- "import": "./dist/environment.mjs",
51
- "require": "./dist/environment.cjs"
52
- },
53
- "./provider": {
54
- "types": "./dist/provider.d.ts",
55
- "import": "./dist/provider.mjs",
56
- "require": "./dist/provider.cjs"
57
- },
58
- "./services": {
59
- "types": "./dist/services.d.ts",
60
- "import": "./dist/services.mjs",
61
- "require": "./dist/services.cjs"
62
- },
63
- "./types": {
64
- "types": "./dist/types.d.ts",
65
- "import": "./dist/types.mjs",
66
- "require": "./dist/types.cjs"
67
- }
68
- },
69
- "files": [
70
- "dist"
71
- ],
72
- "scripts": {
73
- "build": "tsup",
74
- "test": "jest"
75
- },
76
- "dependencies": {
77
- "@fctc/interface-logic": "^3.8.10",
78
- "@headlessui/react": "^2.2.6",
79
- "@tanstack/react-query": "^5.84.0",
80
- "i18next": "^25.3.2",
81
- "i18next-browser-languagedetector": "^8.2.0",
82
- "react-i18next": "^15.6.1",
83
- "react-tooltip": "^5.29.1"
84
- },
85
- "devDependencies": {
86
- "@types/react": "^18.3.1",
87
- "jest": "^29.7.0",
88
- "react": "18.0.0",
89
- "tsup": "^8.0.0",
90
- "typescript": "^5.8.2"
91
- },
92
- "packageManager": "yarn@1.22.0",
93
- "peerDependencies": {}
94
- }
1
+ {
2
+ "name": "@fctc/widget-logic",
3
+ "version": "4.5.0",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./hooks": {
14
+ "types": "./dist/hooks.d.ts",
15
+ "import": "./dist/hooks.mjs",
16
+ "require": "./dist/hooks.cjs"
17
+ },
18
+ "./widget": {
19
+ "types": "./dist/widget.d.ts",
20
+ "import": "./dist/widget.mjs",
21
+ "require": "./dist/widget.cjs"
22
+ },
23
+ "./icons": {
24
+ "types": "./dist/icons.d.ts",
25
+ "import": "./dist/icons.mjs",
26
+ "require": "./dist/icons.cjs"
27
+ },
28
+ "./utils": {
29
+ "types": "./dist/utils.d.ts",
30
+ "import": "./dist/utils.mjs",
31
+ "require": "./dist/utils.cjs"
32
+ },
33
+ "./store": {
34
+ "types": "./dist/store.d.ts",
35
+ "import": "./dist/store.mjs",
36
+ "require": "./dist/store.cjs"
37
+ },
38
+ "./config": {
39
+ "types": "./dist/config.d.ts",
40
+ "import": "./dist/config.mjs",
41
+ "require": "./dist/config.cjs"
42
+ },
43
+ "./constants": {
44
+ "types": "./dist/constants.d.ts",
45
+ "import": "./dist/constants.mjs",
46
+ "require": "./dist/constants.cjs"
47
+ },
48
+ "./environment": {
49
+ "types": "./dist/environment.d.ts",
50
+ "import": "./dist/environment.mjs",
51
+ "require": "./dist/environment.cjs"
52
+ },
53
+ "./provider": {
54
+ "types": "./dist/provider.d.ts",
55
+ "import": "./dist/provider.mjs",
56
+ "require": "./dist/provider.cjs"
57
+ },
58
+ "./services": {
59
+ "types": "./dist/services.d.ts",
60
+ "import": "./dist/services.mjs",
61
+ "require": "./dist/services.cjs"
62
+ },
63
+ "./types": {
64
+ "types": "./dist/types.d.ts",
65
+ "import": "./dist/types.mjs",
66
+ "require": "./dist/types.cjs"
67
+ }
68
+ },
69
+ "files": [
70
+ "dist"
71
+ ],
72
+ "scripts": {
73
+ "build": "tsup",
74
+ "test": "jest"
75
+ },
76
+ "dependencies": {
77
+ "@fctc/interface-logic": "^3.9.0",
78
+ "@headlessui/react": "^2.2.6",
79
+ "@tanstack/react-query": "^5.84.0",
80
+ "i18next": "^25.3.2",
81
+ "i18next-browser-languagedetector": "^8.2.0",
82
+ "react-i18next": "^15.6.1",
83
+ "react-tooltip": "^5.29.1"
84
+ },
85
+ "devDependencies": {
86
+ "@types/react": "^18.3.1",
87
+ "jest": "^29.7.0",
88
+ "react": "18.0.0",
89
+ "tsup": "^8.0.0",
90
+ "typescript": "^5.8.2"
91
+ },
92
+ "packageManager": "yarn@1.22.0",
93
+ "peerDependencies": {}
94
+ }