@fctc/widget-logic 4.2.0 → 4.2.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.d.mts CHANGED
@@ -781,7 +781,7 @@ declare const useGetSpecification: ({ model, viewData, fields, }: {
781
781
  specification: Record<string, any> | null;
782
782
  };
783
783
 
784
- declare const useListData: ({ action, context, viewData, model, service, xNode, mode, }: {
784
+ declare const useListData: ({ action, context, viewData, model, service, xNode, mode, limit, }: {
785
785
  action: ActionResultType;
786
786
  context: any;
787
787
  viewData?: ViewResponse;
@@ -789,6 +789,7 @@ declare const useListData: ({ action, context, viewData, model, service, xNode,
789
789
  service?: string;
790
790
  xNode?: string;
791
791
  mode?: string;
792
+ limit?: number;
792
793
  }) => {
793
794
  state: {
794
795
  specification: Record<string, any> | null;
package/dist/hooks.d.ts CHANGED
@@ -781,7 +781,7 @@ declare const useGetSpecification: ({ model, viewData, fields, }: {
781
781
  specification: Record<string, any> | null;
782
782
  };
783
783
 
784
- declare const useListData: ({ action, context, viewData, model, service, xNode, mode, }: {
784
+ declare const useListData: ({ action, context, viewData, model, service, xNode, mode, limit, }: {
785
785
  action: ActionResultType;
786
786
  context: any;
787
787
  viewData?: ViewResponse;
@@ -789,6 +789,7 @@ declare const useListData: ({ action, context, viewData, model, service, xNode,
789
789
  service?: string;
790
790
  xNode?: string;
791
791
  mode?: string;
792
+ limit?: number;
792
793
  }) => {
793
794
  state: {
794
795
  specification: Record<string, any> | null;
package/dist/hooks.js CHANGED
@@ -902,11 +902,12 @@ var useListData = ({
902
902
  model,
903
903
  service,
904
904
  xNode,
905
- mode
905
+ mode,
906
+ limit = 10
906
907
  }) => {
907
908
  const { useGetListData: useGetListData2 } = (0, provider_exports.useService)();
908
909
  const [page, setPage] = (0, import_react14.useState)(0);
909
- const [pageLimit, setPageLimit] = (0, import_react14.useState)(10);
910
+ const [pageLimit, setPageLimit] = (0, import_react14.useState)(limit);
910
911
  const [groupByList, setGroupByList] = (0, import_react14.useState)(null);
911
912
  const [domain, setDomain] = (0, import_react14.useState)(null);
912
913
  const [order, setOrder] = (0, import_react14.useState)("");
@@ -923,7 +924,7 @@ var useListData = ({
923
924
  return null;
924
925
  }
925
926
  const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
926
- const limit = pageLimit;
927
+ const limit2 = pageLimit;
927
928
  const offset = debouncedPage * pageLimit;
928
929
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
929
930
  const groupby = typeof groupByList === "object" ? [groupByList?.contexts?.[0]?.group_by] : [];
@@ -934,7 +935,7 @@ var useListData = ({
934
935
  model: action?.res_model,
935
936
  specification,
936
937
  domain: domainParse,
937
- limit,
938
+ limit: limit2,
938
939
  offset,
939
940
  fields,
940
941
  groupby,
package/dist/hooks.mjs CHANGED
@@ -887,11 +887,12 @@ var useListData = ({
887
887
  model,
888
888
  service,
889
889
  xNode,
890
- mode
890
+ mode,
891
+ limit = 10
891
892
  }) => {
892
893
  const { useGetListData: useGetListData2 } = (0, provider_exports.useService)();
893
894
  const [page, setPage] = useState5(0);
894
- const [pageLimit, setPageLimit] = useState5(10);
895
+ const [pageLimit, setPageLimit] = useState5(limit);
895
896
  const [groupByList, setGroupByList] = useState5(null);
896
897
  const [domain, setDomain] = useState5(null);
897
898
  const [order, setOrder] = useState5("");
@@ -908,7 +909,7 @@ var useListData = ({
908
909
  return null;
909
910
  }
910
911
  const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
911
- const limit = pageLimit;
912
+ const limit2 = pageLimit;
912
913
  const offset = debouncedPage * pageLimit;
913
914
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
914
915
  const groupby = typeof groupByList === "object" ? [groupByList?.contexts?.[0]?.group_by] : [];
@@ -919,7 +920,7 @@ var useListData = ({
919
920
  model: action?.res_model,
920
921
  specification,
921
922
  domain: domainParse,
922
- limit,
923
+ limit: limit2,
923
924
  offset,
924
925
  fields,
925
926
  groupby,
package/dist/index.js CHANGED
@@ -4952,11 +4952,12 @@ var useListData = ({
4952
4952
  model,
4953
4953
  service,
4954
4954
  xNode,
4955
- mode
4955
+ mode,
4956
+ limit = 10
4956
4957
  }) => {
4957
4958
  const { useGetListData: useGetListData2 } = (0, provider_exports.useService)();
4958
4959
  const [page, setPage] = (0, import_react14.useState)(0);
4959
- const [pageLimit, setPageLimit] = (0, import_react14.useState)(10);
4960
+ const [pageLimit, setPageLimit] = (0, import_react14.useState)(limit);
4960
4961
  const [groupByList, setGroupByList] = (0, import_react14.useState)(null);
4961
4962
  const [domain, setDomain] = (0, import_react14.useState)(null);
4962
4963
  const [order, setOrder] = (0, import_react14.useState)("");
@@ -4973,7 +4974,7 @@ var useListData = ({
4973
4974
  return null;
4974
4975
  }
4975
4976
  const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
4976
- const limit = pageLimit;
4977
+ const limit2 = pageLimit;
4977
4978
  const offset = debouncedPage * pageLimit;
4978
4979
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
4979
4980
  const groupby = typeof groupByList === "object" ? [groupByList?.contexts?.[0]?.group_by] : [];
@@ -4984,7 +4985,7 @@ var useListData = ({
4984
4985
  model: action?.res_model,
4985
4986
  specification,
4986
4987
  domain: domainParse,
4987
- limit,
4988
+ limit: limit2,
4988
4989
  offset,
4989
4990
  fields,
4990
4991
  groupby,
package/dist/index.mjs CHANGED
@@ -5046,11 +5046,12 @@ var useListData = ({
5046
5046
  model,
5047
5047
  service,
5048
5048
  xNode,
5049
- mode
5049
+ mode,
5050
+ limit = 10
5050
5051
  }) => {
5051
5052
  const { useGetListData: useGetListData2 } = (0, provider_exports.useService)();
5052
5053
  const [page, setPage] = useState5(0);
5053
- const [pageLimit, setPageLimit] = useState5(10);
5054
+ const [pageLimit, setPageLimit] = useState5(limit);
5054
5055
  const [groupByList, setGroupByList] = useState5(null);
5055
5056
  const [domain, setDomain] = useState5(null);
5056
5057
  const [order, setOrder] = useState5("");
@@ -5067,7 +5068,7 @@ var useListData = ({
5067
5068
  return null;
5068
5069
  }
5069
5070
  const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
5070
- const limit = pageLimit;
5071
+ const limit2 = pageLimit;
5071
5072
  const offset = debouncedPage * pageLimit;
5072
5073
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
5073
5074
  const groupby = typeof groupByList === "object" ? [groupByList?.contexts?.[0]?.group_by] : [];
@@ -5078,7 +5079,7 @@ var useListData = ({
5078
5079
  model: action?.res_model,
5079
5080
  specification,
5080
5081
  domain: domainParse,
5081
- limit,
5082
+ limit: limit2,
5082
5083
  offset,
5083
5084
  fields,
5084
5085
  groupby,
package/dist/widget.js CHANGED
@@ -4470,11 +4470,12 @@ var useListData = ({
4470
4470
  model,
4471
4471
  service,
4472
4472
  xNode,
4473
- mode
4473
+ mode,
4474
+ limit = 10
4474
4475
  }) => {
4475
4476
  const { useGetListData: useGetListData2 } = (0, provider_exports.useService)();
4476
4477
  const [page, setPage] = (0, import_react15.useState)(0);
4477
- const [pageLimit, setPageLimit] = (0, import_react15.useState)(10);
4478
+ const [pageLimit, setPageLimit] = (0, import_react15.useState)(limit);
4478
4479
  const [groupByList, setGroupByList] = (0, import_react15.useState)(null);
4479
4480
  const [domain, setDomain] = (0, import_react15.useState)(null);
4480
4481
  const [order, setOrder] = (0, import_react15.useState)("");
@@ -4491,7 +4492,7 @@ var useListData = ({
4491
4492
  return null;
4492
4493
  }
4493
4494
  const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : (0, import_utils5.evalJSONDomain)(action?.domain, context) : [];
4494
- const limit = pageLimit;
4495
+ const limit2 = pageLimit;
4495
4496
  const offset = debouncedPage * pageLimit;
4496
4497
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
4497
4498
  const groupby = typeof groupByList === "object" ? [groupByList?.contexts?.[0]?.group_by] : [];
@@ -4502,7 +4503,7 @@ var useListData = ({
4502
4503
  model: action?.res_model,
4503
4504
  specification,
4504
4505
  domain: domainParse,
4505
- limit,
4506
+ limit: limit2,
4506
4507
  offset,
4507
4508
  fields,
4508
4509
  groupby,
package/dist/widget.mjs CHANGED
@@ -4542,11 +4542,12 @@ var useListData = ({
4542
4542
  model,
4543
4543
  service,
4544
4544
  xNode,
4545
- mode
4545
+ mode,
4546
+ limit = 10
4546
4547
  }) => {
4547
4548
  const { useGetListData: useGetListData2 } = (0, provider_exports.useService)();
4548
4549
  const [page, setPage] = useState6(0);
4549
- const [pageLimit, setPageLimit] = useState6(10);
4550
+ const [pageLimit, setPageLimit] = useState6(limit);
4550
4551
  const [groupByList, setGroupByList] = useState6(null);
4551
4552
  const [domain, setDomain] = useState6(null);
4552
4553
  const [order, setOrder] = useState6("");
@@ -4563,7 +4564,7 @@ var useListData = ({
4563
4564
  return null;
4564
4565
  }
4565
4566
  const domainParse = domain ? [...domain] : action?.domain ? Array.isArray(action?.domain) ? [...action?.domain] : evalJSONDomain(action?.domain, context) : [];
4566
- const limit = pageLimit;
4567
+ const limit2 = pageLimit;
4567
4568
  const offset = debouncedPage * pageLimit;
4568
4569
  const fields = typeof groupByList === "object" ? groupByList?.fields : void 0;
4569
4570
  const groupby = typeof groupByList === "object" ? [groupByList?.contexts?.[0]?.group_by] : [];
@@ -4574,7 +4575,7 @@ var useListData = ({
4574
4575
  model: action?.res_model,
4575
4576
  specification,
4576
4577
  domain: domainParse,
4577
- limit,
4578
+ limit: limit2,
4578
4579
  offset,
4579
4580
  fields,
4580
4581
  groupby,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",