@fctc/widget-logic 1.9.6 → 1.9.8

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
@@ -5263,7 +5263,7 @@ var many2oneFieldController = (props) => {
5263
5263
  ...fieldContext,
5264
5264
  ...context
5265
5265
  };
5266
- const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
5266
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
5267
5267
  const data = {
5268
5268
  model: relation,
5269
5269
  domain: domainObject,
@@ -5279,7 +5279,7 @@ var many2oneFieldController = (props) => {
5279
5279
  data: dataOfSelection,
5280
5280
  refetch,
5281
5281
  isFetching
5282
- } = useGetSelection3({
5282
+ } = useGetSelection2({
5283
5283
  data,
5284
5284
  queryKey,
5285
5285
  enabled: false
@@ -5613,8 +5613,6 @@ var many2manyFieldController = (props) => {
5613
5613
  // src/widget/basic/many2many-tags-field/controller.ts
5614
5614
  var import_react16 = require("react");
5615
5615
  var import_constants4 = require("@fctc/interface-logic/constants");
5616
- var import_environment7 = require("@fctc/interface-logic/environment");
5617
- var import_hooks14 = require("@fctc/interface-logic/hooks");
5618
5616
  var import_utils7 = require("@fctc/interface-logic/utils");
5619
5617
  var many2manyTagsController = (props) => {
5620
5618
  const {
@@ -5626,7 +5624,8 @@ var many2manyTagsController = (props) => {
5626
5624
  placeholderNoOption
5627
5625
  } = props;
5628
5626
  const isUser = relation === "res.users" || relation === "res.partner";
5629
- const env = (0, import_environment7.getEnv)();
5627
+ const { env } = (0, provider_exports.useEnv)();
5628
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
5630
5629
  const addtionalFields = optionsFields ? (0, import_utils7.evalJSONContext)(optionsFields) : null;
5631
5630
  const domainObject = (0, import_react16.useMemo)(
5632
5631
  () => (0, import_utils7.evalJSONDomain)(domain, JSON.parse(JSON.stringify(formValues || {}))),
@@ -5645,7 +5644,7 @@ var many2manyTagsController = (props) => {
5645
5644
  enabled: true,
5646
5645
  context: env.context
5647
5646
  };
5648
- const { data: dataOfSelection } = (0, import_hooks14.useGetSelection)({
5647
+ const { data: dataOfSelection } = useGetSelection2({
5649
5648
  data,
5650
5649
  queryKey: [`data_${relation}`, domainObject]
5651
5650
  });
@@ -5665,7 +5664,6 @@ var many2manyTagsController = (props) => {
5665
5664
  options,
5666
5665
  customNoOptionsMessage,
5667
5666
  tranfer,
5668
- dataOfSelection,
5669
5667
  isUser
5670
5668
  };
5671
5669
  };
@@ -5738,7 +5736,7 @@ var durationController = (props) => {
5738
5736
  };
5739
5737
 
5740
5738
  // src/widget/basic/priority-field/controller.ts
5741
- var import_hooks15 = require("@fctc/interface-logic/hooks");
5739
+ var import_hooks14 = require("@fctc/interface-logic/hooks");
5742
5740
  var import_utils9 = require("@fctc/interface-logic/utils");
5743
5741
  var priorityFieldController = (props) => {
5744
5742
  const {
@@ -5758,7 +5756,7 @@ var priorityFieldController = (props) => {
5758
5756
  const contextObject = { ...context, ..._context };
5759
5757
  const defaultPriority = parseInt(value) + 1;
5760
5758
  const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
5761
- const { mutateAsync: fetchSave } = (0, import_hooks15.useSave)();
5759
+ const { mutateAsync: fetchSave } = (0, import_hooks14.useSave)();
5762
5760
  const savePriorities = async ({
5763
5761
  value: value2,
5764
5762
  resetPriority
@@ -7062,7 +7060,7 @@ var tableController = ({ data }) => {
7062
7060
 
7063
7061
  // src/widget/advance/table/table-group/controller.ts
7064
7062
  var import_react23 = require("react");
7065
- var import_hooks16 = require("@fctc/interface-logic/hooks");
7063
+ var import_hooks15 = require("@fctc/interface-logic/hooks");
7066
7064
  var import_store12 = require("@fctc/interface-logic/store");
7067
7065
 
7068
7066
  // src/environment.ts
@@ -7094,7 +7092,7 @@ var tableGroupController = (props) => {
7094
7092
  const { groupByDomain, selectedTags } = (0, import_store12.useAppSelector)(import_store12.selectSearch);
7095
7093
  const { selectedRowKeys } = (0, import_store12.useAppSelector)(import_store12.selectList);
7096
7094
  const appDispatch = (0, import_store12.useAppDispatch)();
7097
- const { toDataJS } = (0, import_hooks16.useOdooDataTransform)();
7095
+ const { toDataJS } = (0, import_hooks15.useOdooDataTransform)();
7098
7096
  const initVal = toDataJS(row, viewData, model);
7099
7097
  const [isShowGroup, setIsShowGroup] = (0, import_react23.useState)(false);
7100
7098
  const [colEmptyGroup, setColEmptyGroup] = (0, import_react23.useState)({
@@ -7141,7 +7139,7 @@ var tableGroupController = (props) => {
7141
7139
  isPlaceholderData,
7142
7140
  isLoading,
7143
7141
  isFetching
7144
- } = (0, import_hooks16.useGetListData)(listDataProps, queryKey, enabled);
7142
+ } = (0, import_hooks15.useGetListData)(listDataProps, queryKey, enabled);
7145
7143
  const {
7146
7144
  columns: columnsGroup,
7147
7145
  rows: rowsGroup,
package/dist/index.mjs CHANGED
@@ -5293,7 +5293,7 @@ var many2oneFieldController = (props) => {
5293
5293
  ...fieldContext,
5294
5294
  ...context
5295
5295
  };
5296
- const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
5296
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
5297
5297
  const data = {
5298
5298
  model: relation,
5299
5299
  domain: domainObject,
@@ -5309,7 +5309,7 @@ var many2oneFieldController = (props) => {
5309
5309
  data: dataOfSelection,
5310
5310
  refetch,
5311
5311
  isFetching
5312
- } = useGetSelection3({
5312
+ } = useGetSelection2({
5313
5313
  data,
5314
5314
  queryKey,
5315
5315
  enabled: false
@@ -5652,8 +5652,6 @@ var many2manyFieldController = (props) => {
5652
5652
  // src/widget/basic/many2many-tags-field/controller.ts
5653
5653
  import { useMemo as useMemo11 } from "react";
5654
5654
  import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
5655
- import { getEnv as getEnv7 } from "@fctc/interface-logic/environment";
5656
- import { useGetSelection as useGetSelection2 } from "@fctc/interface-logic/hooks";
5657
5655
  import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
5658
5656
  var many2manyTagsController = (props) => {
5659
5657
  const {
@@ -5665,7 +5663,8 @@ var many2manyTagsController = (props) => {
5665
5663
  placeholderNoOption
5666
5664
  } = props;
5667
5665
  const isUser = relation === "res.users" || relation === "res.partner";
5668
- const env = getEnv7();
5666
+ const { env } = (0, provider_exports.useEnv)();
5667
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
5669
5668
  const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
5670
5669
  const domainObject = useMemo11(
5671
5670
  () => evalJSONDomain4(domain, JSON.parse(JSON.stringify(formValues || {}))),
@@ -5704,7 +5703,6 @@ var many2manyTagsController = (props) => {
5704
5703
  options,
5705
5704
  customNoOptionsMessage,
5706
5705
  tranfer,
5707
- dataOfSelection,
5708
5706
  isUser
5709
5707
  };
5710
5708
  };
package/dist/widget.d.mts CHANGED
@@ -84,7 +84,6 @@ declare const many2manyFieldController: (props: IMany2ManyControllerProps) => {
84
84
 
85
85
  interface IMany2ManyTagFieldProps extends IInputFieldProps {
86
86
  options: any;
87
- widget: string;
88
87
  placeholderNoOption: string;
89
88
  }
90
89
 
@@ -92,7 +91,6 @@ declare const many2manyTagsController: (props: IMany2ManyTagFieldProps) => {
92
91
  options: any;
93
92
  customNoOptionsMessage: () => string;
94
93
  tranfer: (data: any) => any;
95
- dataOfSelection: any;
96
94
  isUser: boolean;
97
95
  };
98
96
 
package/dist/widget.d.ts CHANGED
@@ -84,7 +84,6 @@ declare const many2manyFieldController: (props: IMany2ManyControllerProps) => {
84
84
 
85
85
  interface IMany2ManyTagFieldProps extends IInputFieldProps {
86
86
  options: any;
87
- widget: string;
88
87
  placeholderNoOption: string;
89
88
  }
90
89
 
@@ -92,7 +91,6 @@ declare const many2manyTagsController: (props: IMany2ManyTagFieldProps) => {
92
91
  options: any;
93
92
  customNoOptionsMessage: () => string;
94
93
  tranfer: (data: any) => any;
95
- dataOfSelection: any;
96
94
  isUser: boolean;
97
95
  };
98
96
 
package/dist/widget.js CHANGED
@@ -4989,7 +4989,7 @@ var many2oneFieldController = (props) => {
4989
4989
  ...fieldContext,
4990
4990
  ...context
4991
4991
  };
4992
- const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
4992
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
4993
4993
  const data = {
4994
4994
  model: relation,
4995
4995
  domain: domainObject,
@@ -5005,7 +5005,7 @@ var many2oneFieldController = (props) => {
5005
5005
  data: dataOfSelection,
5006
5006
  refetch,
5007
5007
  isFetching
5008
- } = useGetSelection3({
5008
+ } = useGetSelection2({
5009
5009
  data,
5010
5010
  queryKey,
5011
5011
  enabled: false
@@ -5339,8 +5339,6 @@ var many2manyFieldController = (props) => {
5339
5339
  // src/widget/basic/many2many-tags-field/controller.ts
5340
5340
  var import_react16 = require("react");
5341
5341
  var import_constants4 = require("@fctc/interface-logic/constants");
5342
- var import_environment7 = require("@fctc/interface-logic/environment");
5343
- var import_hooks14 = require("@fctc/interface-logic/hooks");
5344
5342
  var import_utils7 = require("@fctc/interface-logic/utils");
5345
5343
  var many2manyTagsController = (props) => {
5346
5344
  const {
@@ -5352,7 +5350,8 @@ var many2manyTagsController = (props) => {
5352
5350
  placeholderNoOption
5353
5351
  } = props;
5354
5352
  const isUser = relation === "res.users" || relation === "res.partner";
5355
- const env = (0, import_environment7.getEnv)();
5353
+ const { env } = (0, provider_exports.useEnv)();
5354
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
5356
5355
  const addtionalFields = optionsFields ? (0, import_utils7.evalJSONContext)(optionsFields) : null;
5357
5356
  const domainObject = (0, import_react16.useMemo)(
5358
5357
  () => (0, import_utils7.evalJSONDomain)(domain, JSON.parse(JSON.stringify(formValues || {}))),
@@ -5371,7 +5370,7 @@ var many2manyTagsController = (props) => {
5371
5370
  enabled: true,
5372
5371
  context: env.context
5373
5372
  };
5374
- const { data: dataOfSelection } = (0, import_hooks14.useGetSelection)({
5373
+ const { data: dataOfSelection } = useGetSelection2({
5375
5374
  data,
5376
5375
  queryKey: [`data_${relation}`, domainObject]
5377
5376
  });
@@ -5391,7 +5390,6 @@ var many2manyTagsController = (props) => {
5391
5390
  options,
5392
5391
  customNoOptionsMessage,
5393
5392
  tranfer,
5394
- dataOfSelection,
5395
5393
  isUser
5396
5394
  };
5397
5395
  };
@@ -5464,7 +5462,7 @@ var durationController = (props) => {
5464
5462
  };
5465
5463
 
5466
5464
  // src/widget/basic/priority-field/controller.ts
5467
- var import_hooks15 = require("@fctc/interface-logic/hooks");
5465
+ var import_hooks14 = require("@fctc/interface-logic/hooks");
5468
5466
  var import_utils9 = require("@fctc/interface-logic/utils");
5469
5467
  var priorityFieldController = (props) => {
5470
5468
  const {
@@ -5484,7 +5482,7 @@ var priorityFieldController = (props) => {
5484
5482
  const contextObject = { ...context, ..._context };
5485
5483
  const defaultPriority = parseInt(value) + 1;
5486
5484
  const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
5487
- const { mutateAsync: fetchSave } = (0, import_hooks15.useSave)();
5485
+ const { mutateAsync: fetchSave } = (0, import_hooks14.useSave)();
5488
5486
  const savePriorities = async ({
5489
5487
  value: value2,
5490
5488
  resetPriority
@@ -6788,7 +6786,7 @@ var tableController = ({ data }) => {
6788
6786
 
6789
6787
  // src/widget/advance/table/table-group/controller.ts
6790
6788
  var import_react23 = require("react");
6791
- var import_hooks16 = require("@fctc/interface-logic/hooks");
6789
+ var import_hooks15 = require("@fctc/interface-logic/hooks");
6792
6790
  var import_store12 = require("@fctc/interface-logic/store");
6793
6791
 
6794
6792
  // src/environment.ts
@@ -6820,7 +6818,7 @@ var tableGroupController = (props) => {
6820
6818
  const { groupByDomain, selectedTags } = (0, import_store12.useAppSelector)(import_store12.selectSearch);
6821
6819
  const { selectedRowKeys } = (0, import_store12.useAppSelector)(import_store12.selectList);
6822
6820
  const appDispatch = (0, import_store12.useAppDispatch)();
6823
- const { toDataJS } = (0, import_hooks16.useOdooDataTransform)();
6821
+ const { toDataJS } = (0, import_hooks15.useOdooDataTransform)();
6824
6822
  const initVal = toDataJS(row, viewData, model);
6825
6823
  const [isShowGroup, setIsShowGroup] = (0, import_react23.useState)(false);
6826
6824
  const [colEmptyGroup, setColEmptyGroup] = (0, import_react23.useState)({
@@ -6867,7 +6865,7 @@ var tableGroupController = (props) => {
6867
6865
  isPlaceholderData,
6868
6866
  isLoading,
6869
6867
  isFetching
6870
- } = (0, import_hooks16.useGetListData)(listDataProps, queryKey, enabled);
6868
+ } = (0, import_hooks15.useGetListData)(listDataProps, queryKey, enabled);
6871
6869
  const {
6872
6870
  columns: columnsGroup,
6873
6871
  rows: rowsGroup,
package/dist/widget.mjs CHANGED
@@ -4995,7 +4995,7 @@ var many2oneFieldController = (props) => {
4995
4995
  ...fieldContext,
4996
4996
  ...context
4997
4997
  };
4998
- const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
4998
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
4999
4999
  const data = {
5000
5000
  model: relation,
5001
5001
  domain: domainObject,
@@ -5011,7 +5011,7 @@ var many2oneFieldController = (props) => {
5011
5011
  data: dataOfSelection,
5012
5012
  refetch,
5013
5013
  isFetching
5014
- } = useGetSelection3({
5014
+ } = useGetSelection2({
5015
5015
  data,
5016
5016
  queryKey,
5017
5017
  enabled: false
@@ -5354,8 +5354,6 @@ var many2manyFieldController = (props) => {
5354
5354
  // src/widget/basic/many2many-tags-field/controller.ts
5355
5355
  import { useMemo as useMemo11 } from "react";
5356
5356
  import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
5357
- import { getEnv as getEnv7 } from "@fctc/interface-logic/environment";
5358
- import { useGetSelection as useGetSelection2 } from "@fctc/interface-logic/hooks";
5359
5357
  import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
5360
5358
  var many2manyTagsController = (props) => {
5361
5359
  const {
@@ -5367,7 +5365,8 @@ var many2manyTagsController = (props) => {
5367
5365
  placeholderNoOption
5368
5366
  } = props;
5369
5367
  const isUser = relation === "res.users" || relation === "res.partner";
5370
- const env = getEnv7();
5368
+ const { env } = (0, provider_exports.useEnv)();
5369
+ const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
5371
5370
  const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
5372
5371
  const domainObject = useMemo11(
5373
5372
  () => evalJSONDomain4(domain, JSON.parse(JSON.stringify(formValues || {}))),
@@ -5406,7 +5405,6 @@ var many2manyTagsController = (props) => {
5406
5405
  options,
5407
5406
  customNoOptionsMessage,
5408
5407
  tranfer,
5409
- dataOfSelection,
5410
5408
  isUser
5411
5409
  };
5412
5410
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",