@fctc/widget-logic 4.4.8 → 4.4.10

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 domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
926
+ const domainParsed = domain ? JSON.parse(JSON.stringify(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: domainParse,
937
+ domain: domainParsed,
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
- listDataProps?.domain,
959
+ JSON.stringify(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 domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
911
+ const domainParsed = domain ? JSON.parse(JSON.stringify(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: domainParse,
922
+ domain: domainParsed,
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
- listDataProps?.domain,
944
+ JSON.stringify(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 domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
4976
+ const domainParsed = domain ? JSON.parse(JSON.stringify(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: domainParse,
4987
+ domain: domainParsed,
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
- listDataProps?.domain,
5009
+ JSON.stringify(listDataProps?.domain),
5010
5010
  listDataProps?.groupby,
5011
5011
  listDataProps?.limit,
5012
5012
  listDataProps?.offset,
@@ -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) || {},
@@ -5559,10 +5558,6 @@ var many2oneFieldController = (props) => {
5559
5558
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
5560
5559
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
5561
5560
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
5562
- console.log(
5563
- "optionsObject?.values_included[field]?.name,",
5564
- optionsObject?.values_included[field]?.name
5565
- );
5566
5561
  methods?.setValue(
5567
5562
  optionsObject?.values_included[field]?.name,
5568
5563
  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 domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
5070
+ const domainParsed = domain ? JSON.parse(JSON.stringify(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: domainParse,
5081
+ domain: domainParsed,
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
- listDataProps?.domain,
5103
+ JSON.stringify(listDataProps?.domain),
5104
5104
  listDataProps?.groupby,
5105
5105
  listDataProps?.limit,
5106
5106
  listDataProps?.offset,
@@ -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) || {},
@@ -5654,10 +5653,6 @@ var many2oneFieldController = (props) => {
5654
5653
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
5655
5654
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
5656
5655
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
5657
- console.log(
5658
- "optionsObject?.values_included[field]?.name,",
5659
- optionsObject?.values_included[field]?.name
5660
- );
5661
5656
  methods?.setValue(
5662
5657
  optionsObject?.values_included[field]?.name,
5663
5658
  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 domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
4494
+ const domainParsed = domain ? JSON.parse(JSON.stringify(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: domainParse,
4505
+ domain: domainParsed,
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
- listDataProps?.domain,
4527
+ JSON.stringify(listDataProps?.domain),
4528
4528
  listDataProps?.groupby,
4529
4529
  listDataProps?.limit,
4530
4530
  listDataProps?.offset,
@@ -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) || {},
@@ -4785,10 +4784,6 @@ var many2oneFieldController = (props) => {
4785
4784
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
4786
4785
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
4787
4786
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
4788
- console.log(
4789
- "optionsObject?.values_included[field]?.name,",
4790
- optionsObject?.values_included[field]?.name
4791
- );
4792
4787
  methods?.setValue(
4793
4788
  optionsObject?.values_included[field]?.name,
4794
4789
  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 domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
4566
+ const domainParsed = domain ? JSON.parse(JSON.stringify(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: domainParse,
4577
+ domain: domainParsed,
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
- listDataProps?.domain,
4599
+ JSON.stringify(listDataProps?.domain),
4600
4600
  listDataProps?.groupby,
4601
4601
  listDataProps?.limit,
4602
4602
  listDataProps?.offset,
@@ -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) || {},
@@ -4857,10 +4856,6 @@ var many2oneFieldController = (props) => {
4857
4856
  const newValue = widget === MANY2ONE_EXTERNAL && optionsObject?.field_name ? selectedOption?.[optionsObject?.field_name] : selectedOption.value;
4858
4857
  if (widget === MANY2ONE_EXTERNAL && optionsObject?.values_included) {
4859
4858
  Object.keys(optionsObject?.values_included)?.forEach((field) => {
4860
- console.log(
4861
- "optionsObject?.values_included[field]?.name,",
4862
- optionsObject?.values_included[field]?.name
4863
- );
4864
4859
  methods?.setValue(
4865
4860
  optionsObject?.values_included[field]?.name,
4866
4861
  selectedOption?.[field],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "4.4.8",
3
+ "version": "4.4.10",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",