@fctc/widget-logic 4.4.10 → 4.5.1

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/hooks.js CHANGED
@@ -923,7 +923,7 @@ var useListData = ({
923
923
  if (!viewData || !action || !context) {
924
924
  return null;
925
925
  }
926
- const domainParsed = domain ? JSON.parse(JSON.stringify(domain)) : action?.domain ? Array.isArray(action.domain) ? [...action.domain] : (0, import_utils5.evalJSONDomain)(action.domain, context) : [];
926
+ const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
927
927
  const limit2 = pageLimit;
928
928
  const offset = debouncedPage * pageLimit;
929
929
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
@@ -934,7 +934,7 @@ var useListData = ({
934
934
  return {
935
935
  model: action?.res_model,
936
936
  specification,
937
- domain: domainParsed,
937
+ domain: domainParse,
938
938
  limit: limit2,
939
939
  offset,
940
940
  fields,
@@ -956,7 +956,7 @@ var useListData = ({
956
956
  const list = useGetListData2(
957
957
  { ...listDataProps },
958
958
  [
959
- JSON.stringify(listDataProps?.domain),
959
+ listDataProps?.domain,
960
960
  listDataProps?.groupby,
961
961
  listDataProps?.limit,
962
962
  listDataProps?.offset,
package/dist/hooks.mjs CHANGED
@@ -908,7 +908,7 @@ var useListData = ({
908
908
  if (!viewData || !action || !context) {
909
909
  return null;
910
910
  }
911
- const domainParsed = domain ? JSON.parse(JSON.stringify(domain)) : action?.domain ? Array.isArray(action.domain) ? [...action.domain] : evalJSONDomain(action.domain, context) : [];
911
+ const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
912
912
  const limit2 = pageLimit;
913
913
  const offset = debouncedPage * pageLimit;
914
914
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
@@ -919,7 +919,7 @@ var useListData = ({
919
919
  return {
920
920
  model: action?.res_model,
921
921
  specification,
922
- domain: domainParsed,
922
+ domain: domainParse,
923
923
  limit: limit2,
924
924
  offset,
925
925
  fields,
@@ -941,7 +941,7 @@ var useListData = ({
941
941
  const list = useGetListData2(
942
942
  { ...listDataProps },
943
943
  [
944
- JSON.stringify(listDataProps?.domain),
944
+ listDataProps?.domain,
945
945
  listDataProps?.groupby,
946
946
  listDataProps?.limit,
947
947
  listDataProps?.offset,
package/dist/index.js CHANGED
@@ -4973,7 +4973,7 @@ var useListData = ({
4973
4973
  if (!viewData || !action || !context) {
4974
4974
  return null;
4975
4975
  }
4976
- const domainParsed = domain ? JSON.parse(JSON.stringify(domain)) : action?.domain ? Array.isArray(action.domain) ? [...action.domain] : (0, import_utils5.evalJSONDomain)(action.domain, context) : [];
4976
+ const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
4977
4977
  const limit2 = pageLimit;
4978
4978
  const offset = debouncedPage * pageLimit;
4979
4979
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
@@ -4984,7 +4984,7 @@ var useListData = ({
4984
4984
  return {
4985
4985
  model: action?.res_model,
4986
4986
  specification,
4987
- domain: domainParsed,
4987
+ domain: domainParse,
4988
4988
  limit: limit2,
4989
4989
  offset,
4990
4990
  fields,
@@ -5006,7 +5006,7 @@ var useListData = ({
5006
5006
  const list = useGetListData2(
5007
5007
  { ...listDataProps },
5008
5008
  [
5009
- JSON.stringify(listDataProps?.domain),
5009
+ listDataProps?.domain,
5010
5010
  listDataProps?.groupby,
5011
5011
  listDataProps?.limit,
5012
5012
  listDataProps?.offset,
@@ -5360,6 +5360,7 @@ 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);
5363
5364
  const initValue = methods?.getValues(name);
5364
5365
  const contextObject = {
5365
5366
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -5558,6 +5559,10 @@ var many2oneFieldController = (props) => {
5558
5559
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
5559
5560
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
5560
5561
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
5562
+ console.log(
5563
+ "optionsObject?.values_included[field]?.name,",
5564
+ optionsObject?.values_included[field]?.name
5565
+ );
5561
5566
  methods?.setValue(
5562
5567
  optionsObject?.values_included[field]?.name,
5563
5568
  selectedOption?.[field],
package/dist/index.mjs CHANGED
@@ -5067,7 +5067,7 @@ var useListData = ({
5067
5067
  if (!viewData || !action || !context) {
5068
5068
  return null;
5069
5069
  }
5070
- const domainParsed = domain ? JSON.parse(JSON.stringify(domain)) : action?.domain ? Array.isArray(action.domain) ? [...action.domain] : evalJSONDomain(action.domain, context) : [];
5070
+ const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
5071
5071
  const limit2 = pageLimit;
5072
5072
  const offset = debouncedPage * pageLimit;
5073
5073
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
@@ -5078,7 +5078,7 @@ var useListData = ({
5078
5078
  return {
5079
5079
  model: action?.res_model,
5080
5080
  specification,
5081
- domain: domainParsed,
5081
+ domain: domainParse,
5082
5082
  limit: limit2,
5083
5083
  offset,
5084
5084
  fields,
@@ -5100,7 +5100,7 @@ var useListData = ({
5100
5100
  const list = useGetListData2(
5101
5101
  { ...listDataProps },
5102
5102
  [
5103
- JSON.stringify(listDataProps?.domain),
5103
+ listDataProps?.domain,
5104
5104
  listDataProps?.groupby,
5105
5105
  listDataProps?.limit,
5106
5106
  listDataProps?.offset,
@@ -5455,6 +5455,7 @@ 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);
5458
5459
  const initValue = methods?.getValues(name);
5459
5460
  const contextObject = {
5460
5461
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -5653,6 +5654,10 @@ var many2oneFieldController = (props) => {
5653
5654
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
5654
5655
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
5655
5656
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
5657
+ console.log(
5658
+ "optionsObject?.values_included[field]?.name,",
5659
+ optionsObject?.values_included[field]?.name
5660
+ );
5656
5661
  methods?.setValue(
5657
5662
  optionsObject?.values_included[field]?.name,
5658
5663
  selectedOption?.[field],
package/dist/widget.js CHANGED
@@ -4491,7 +4491,7 @@ var useListData = ({
4491
4491
  if (!viewData || !action || !context) {
4492
4492
  return null;
4493
4493
  }
4494
- const domainParsed = domain ? JSON.parse(JSON.stringify(domain)) : action?.domain ? Array.isArray(action.domain) ? [...action.domain] : (0, import_utils5.evalJSONDomain)(action.domain, context) : [];
4494
+ const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
4495
4495
  const limit2 = pageLimit;
4496
4496
  const offset = debouncedPage * pageLimit;
4497
4497
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
@@ -4502,7 +4502,7 @@ var useListData = ({
4502
4502
  return {
4503
4503
  model: action?.res_model,
4504
4504
  specification,
4505
- domain: domainParsed,
4505
+ domain: domainParse,
4506
4506
  limit: limit2,
4507
4507
  offset,
4508
4508
  fields,
@@ -4524,7 +4524,7 @@ var useListData = ({
4524
4524
  const list = useGetListData2(
4525
4525
  { ...listDataProps },
4526
4526
  [
4527
- JSON.stringify(listDataProps?.domain),
4527
+ listDataProps?.domain,
4528
4528
  listDataProps?.groupby,
4529
4529
  listDataProps?.limit,
4530
4530
  listDataProps?.offset,
@@ -4586,6 +4586,7 @@ 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);
4589
4590
  const initValue = methods?.getValues(name);
4590
4591
  const contextObject = {
4591
4592
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -4784,6 +4785,10 @@ var many2oneFieldController = (props) => {
4784
4785
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
4785
4786
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
4786
4787
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
4788
+ console.log(
4789
+ "optionsObject?.values_included[field]?.name,",
4790
+ optionsObject?.values_included[field]?.name
4791
+ );
4787
4792
  methods?.setValue(
4788
4793
  optionsObject?.values_included[field]?.name,
4789
4794
  selectedOption?.[field],
package/dist/widget.mjs CHANGED
@@ -4563,7 +4563,7 @@ var useListData = ({
4563
4563
  if (!viewData || !action || !context) {
4564
4564
  return null;
4565
4565
  }
4566
- const domainParsed = domain ? JSON.parse(JSON.stringify(domain)) : action?.domain ? Array.isArray(action.domain) ? [...action.domain] : evalJSONDomain(action.domain, context) : [];
4566
+ const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
4567
4567
  const limit2 = pageLimit;
4568
4568
  const offset = debouncedPage * pageLimit;
4569
4569
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
@@ -4574,7 +4574,7 @@ var useListData = ({
4574
4574
  return {
4575
4575
  model: action?.res_model,
4576
4576
  specification,
4577
- domain: domainParsed,
4577
+ domain: domainParse,
4578
4578
  limit: limit2,
4579
4579
  offset,
4580
4580
  fields,
@@ -4596,7 +4596,7 @@ var useListData = ({
4596
4596
  const list = useGetListData2(
4597
4597
  { ...listDataProps },
4598
4598
  [
4599
- JSON.stringify(listDataProps?.domain),
4599
+ listDataProps?.domain,
4600
4600
  listDataProps?.groupby,
4601
4601
  listDataProps?.limit,
4602
4602
  listDataProps?.offset,
@@ -4658,6 +4658,7 @@ 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);
4661
4662
  const initValue = methods?.getValues(name);
4662
4663
  const contextObject = {
4663
4664
  ...(typeof action?.context === "string" ? (0, utils_exports.evalJSONContext)(action?.context) : action?.context) || {},
@@ -4856,6 +4857,10 @@ var many2oneFieldController = (props) => {
4856
4857
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
4857
4858
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
4858
4859
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
4860
+ console.log(
4861
+ "optionsObject?.values_included[field]?.name,",
4862
+ optionsObject?.values_included[field]?.name
4863
+ );
4859
4864
  methods?.setValue(
4860
4865
  optionsObject?.values_included[field]?.name,
4861
4866
  selectedOption?.[field],
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
- {
2
- "name": "@fctc/widget-logic",
3
- "version": "4.4.10",
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.1",
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
+ }