@fctc/widget-logic 3.6.8 → 3.7.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 +28 -5
- package/dist/index.mjs +28 -5
- package/dist/widget.js +28 -5
- package/dist/widget.mjs +28 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5673,14 +5673,31 @@ var many2manyTagsController = (props) => {
|
|
|
5673
5673
|
formValues,
|
|
5674
5674
|
placeholderNoOption,
|
|
5675
5675
|
service,
|
|
5676
|
-
xNode
|
|
5676
|
+
xNode,
|
|
5677
|
+
context: fieldContext
|
|
5677
5678
|
} = props;
|
|
5678
5679
|
const isUser = relation === "res.users" || relation === "res.partner";
|
|
5679
5680
|
const { env } = (0, provider_exports.useEnv)();
|
|
5681
|
+
const { action } = useAppProvider();
|
|
5680
5682
|
const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
|
|
5683
|
+
const contextObject = {
|
|
5684
|
+
...(0, import_utils10.evalJSONContext)(action?.context) || {},
|
|
5685
|
+
...fieldContext ?? {},
|
|
5686
|
+
...env?.context
|
|
5687
|
+
};
|
|
5681
5688
|
const addtionalFields = optionsFields ? (0, import_utils10.evalJSONContext)(optionsFields) : null;
|
|
5682
5689
|
const domainObject = (0, import_react18.useMemo)(
|
|
5683
|
-
() => (0, import_utils10.evalJSONDomain)(
|
|
5690
|
+
() => (0, import_utils10.evalJSONDomain)(
|
|
5691
|
+
domain,
|
|
5692
|
+
JSON.parse(
|
|
5693
|
+
JSON.stringify({
|
|
5694
|
+
...formValues,
|
|
5695
|
+
...contextObject,
|
|
5696
|
+
context: contextObject,
|
|
5697
|
+
parent: { ...formValues }
|
|
5698
|
+
})
|
|
5699
|
+
)
|
|
5700
|
+
),
|
|
5684
5701
|
[domain]
|
|
5685
5702
|
);
|
|
5686
5703
|
const data = {
|
|
@@ -5693,14 +5710,20 @@ var many2manyTagsController = (props) => {
|
|
|
5693
5710
|
...widget && import_constants2.WIDGETAVATAR[widget] ? { image_256: {} } : {},
|
|
5694
5711
|
...widget && import_constants2.WIDGETCOLOR[widget] && addtionalFields?.color_field ? { color: {} } : {}
|
|
5695
5712
|
},
|
|
5696
|
-
enabled: true,
|
|
5697
5713
|
context: env.context
|
|
5698
5714
|
};
|
|
5699
5715
|
const { data: dataOfSelection } = useGetSelection3({
|
|
5700
5716
|
data,
|
|
5701
|
-
queryKey: [
|
|
5717
|
+
queryKey: [
|
|
5718
|
+
`data_${relation}`,
|
|
5719
|
+
domainObject,
|
|
5720
|
+
formValues?.id,
|
|
5721
|
+
action?.id,
|
|
5722
|
+
action?.res_model
|
|
5723
|
+
],
|
|
5702
5724
|
service,
|
|
5703
|
-
xNode
|
|
5725
|
+
xNode,
|
|
5726
|
+
enabled: true
|
|
5704
5727
|
});
|
|
5705
5728
|
const customNoOptionsMessage = () => placeholderNoOption;
|
|
5706
5729
|
const transfer = (data2) => {
|
package/dist/index.mjs
CHANGED
|
@@ -5754,14 +5754,31 @@ var many2manyTagsController = (props) => {
|
|
|
5754
5754
|
formValues,
|
|
5755
5755
|
placeholderNoOption,
|
|
5756
5756
|
service,
|
|
5757
|
-
xNode
|
|
5757
|
+
xNode,
|
|
5758
|
+
context: fieldContext
|
|
5758
5759
|
} = props;
|
|
5759
5760
|
const isUser = relation === "res.users" || relation === "res.partner";
|
|
5760
5761
|
const { env } = (0, provider_exports.useEnv)();
|
|
5762
|
+
const { action } = useAppProvider();
|
|
5761
5763
|
const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
|
|
5764
|
+
const contextObject = {
|
|
5765
|
+
...evalJSONContext5(action?.context) || {},
|
|
5766
|
+
...fieldContext ?? {},
|
|
5767
|
+
...env?.context
|
|
5768
|
+
};
|
|
5762
5769
|
const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
|
|
5763
5770
|
const domainObject = useMemo9(
|
|
5764
|
-
() => evalJSONDomain4(
|
|
5771
|
+
() => evalJSONDomain4(
|
|
5772
|
+
domain,
|
|
5773
|
+
JSON.parse(
|
|
5774
|
+
JSON.stringify({
|
|
5775
|
+
...formValues,
|
|
5776
|
+
...contextObject,
|
|
5777
|
+
context: contextObject,
|
|
5778
|
+
parent: { ...formValues }
|
|
5779
|
+
})
|
|
5780
|
+
)
|
|
5781
|
+
),
|
|
5765
5782
|
[domain]
|
|
5766
5783
|
);
|
|
5767
5784
|
const data = {
|
|
@@ -5774,14 +5791,20 @@ var many2manyTagsController = (props) => {
|
|
|
5774
5791
|
...widget && WIDGETAVATAR[widget] ? { image_256: {} } : {},
|
|
5775
5792
|
...widget && WIDGETCOLOR[widget] && addtionalFields?.color_field ? { color: {} } : {}
|
|
5776
5793
|
},
|
|
5777
|
-
enabled: true,
|
|
5778
5794
|
context: env.context
|
|
5779
5795
|
};
|
|
5780
5796
|
const { data: dataOfSelection } = useGetSelection3({
|
|
5781
5797
|
data,
|
|
5782
|
-
queryKey: [
|
|
5798
|
+
queryKey: [
|
|
5799
|
+
`data_${relation}`,
|
|
5800
|
+
domainObject,
|
|
5801
|
+
formValues?.id,
|
|
5802
|
+
action?.id,
|
|
5803
|
+
action?.res_model
|
|
5804
|
+
],
|
|
5783
5805
|
service,
|
|
5784
|
-
xNode
|
|
5806
|
+
xNode,
|
|
5807
|
+
enabled: true
|
|
5785
5808
|
});
|
|
5786
5809
|
const customNoOptionsMessage = () => placeholderNoOption;
|
|
5787
5810
|
const transfer = (data2) => {
|
package/dist/widget.js
CHANGED
|
@@ -4908,14 +4908,31 @@ var many2manyTagsController = (props) => {
|
|
|
4908
4908
|
formValues,
|
|
4909
4909
|
placeholderNoOption,
|
|
4910
4910
|
service,
|
|
4911
|
-
xNode
|
|
4911
|
+
xNode,
|
|
4912
|
+
context: fieldContext
|
|
4912
4913
|
} = props;
|
|
4913
4914
|
const isUser = relation === "res.users" || relation === "res.partner";
|
|
4914
4915
|
const { env } = (0, provider_exports.useEnv)();
|
|
4916
|
+
const { action } = useAppProvider();
|
|
4915
4917
|
const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
|
|
4918
|
+
const contextObject = {
|
|
4919
|
+
...(0, import_utils10.evalJSONContext)(action?.context) || {},
|
|
4920
|
+
...fieldContext ?? {},
|
|
4921
|
+
...env?.context
|
|
4922
|
+
};
|
|
4916
4923
|
const addtionalFields = optionsFields ? (0, import_utils10.evalJSONContext)(optionsFields) : null;
|
|
4917
4924
|
const domainObject = (0, import_react18.useMemo)(
|
|
4918
|
-
() => (0, import_utils10.evalJSONDomain)(
|
|
4925
|
+
() => (0, import_utils10.evalJSONDomain)(
|
|
4926
|
+
domain,
|
|
4927
|
+
JSON.parse(
|
|
4928
|
+
JSON.stringify({
|
|
4929
|
+
...formValues,
|
|
4930
|
+
...contextObject,
|
|
4931
|
+
context: contextObject,
|
|
4932
|
+
parent: { ...formValues }
|
|
4933
|
+
})
|
|
4934
|
+
)
|
|
4935
|
+
),
|
|
4919
4936
|
[domain]
|
|
4920
4937
|
);
|
|
4921
4938
|
const data = {
|
|
@@ -4928,14 +4945,20 @@ var many2manyTagsController = (props) => {
|
|
|
4928
4945
|
...widget && import_constants2.WIDGETAVATAR[widget] ? { image_256: {} } : {},
|
|
4929
4946
|
...widget && import_constants2.WIDGETCOLOR[widget] && addtionalFields?.color_field ? { color: {} } : {}
|
|
4930
4947
|
},
|
|
4931
|
-
enabled: true,
|
|
4932
4948
|
context: env.context
|
|
4933
4949
|
};
|
|
4934
4950
|
const { data: dataOfSelection } = useGetSelection3({
|
|
4935
4951
|
data,
|
|
4936
|
-
queryKey: [
|
|
4952
|
+
queryKey: [
|
|
4953
|
+
`data_${relation}`,
|
|
4954
|
+
domainObject,
|
|
4955
|
+
formValues?.id,
|
|
4956
|
+
action?.id,
|
|
4957
|
+
action?.res_model
|
|
4958
|
+
],
|
|
4937
4959
|
service,
|
|
4938
|
-
xNode
|
|
4960
|
+
xNode,
|
|
4961
|
+
enabled: true
|
|
4939
4962
|
});
|
|
4940
4963
|
const customNoOptionsMessage = () => placeholderNoOption;
|
|
4941
4964
|
const transfer = (data2) => {
|
package/dist/widget.mjs
CHANGED
|
@@ -4966,14 +4966,31 @@ var many2manyTagsController = (props) => {
|
|
|
4966
4966
|
formValues,
|
|
4967
4967
|
placeholderNoOption,
|
|
4968
4968
|
service,
|
|
4969
|
-
xNode
|
|
4969
|
+
xNode,
|
|
4970
|
+
context: fieldContext
|
|
4970
4971
|
} = props;
|
|
4971
4972
|
const isUser = relation === "res.users" || relation === "res.partner";
|
|
4972
4973
|
const { env } = (0, provider_exports.useEnv)();
|
|
4974
|
+
const { action } = useAppProvider();
|
|
4973
4975
|
const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
|
|
4976
|
+
const contextObject = {
|
|
4977
|
+
...evalJSONContext5(action?.context) || {},
|
|
4978
|
+
...fieldContext ?? {},
|
|
4979
|
+
...env?.context
|
|
4980
|
+
};
|
|
4974
4981
|
const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
|
|
4975
4982
|
const domainObject = useMemo9(
|
|
4976
|
-
() => evalJSONDomain4(
|
|
4983
|
+
() => evalJSONDomain4(
|
|
4984
|
+
domain,
|
|
4985
|
+
JSON.parse(
|
|
4986
|
+
JSON.stringify({
|
|
4987
|
+
...formValues,
|
|
4988
|
+
...contextObject,
|
|
4989
|
+
context: contextObject,
|
|
4990
|
+
parent: { ...formValues }
|
|
4991
|
+
})
|
|
4992
|
+
)
|
|
4993
|
+
),
|
|
4977
4994
|
[domain]
|
|
4978
4995
|
);
|
|
4979
4996
|
const data = {
|
|
@@ -4986,14 +5003,20 @@ var many2manyTagsController = (props) => {
|
|
|
4986
5003
|
...widget && WIDGETAVATAR[widget] ? { image_256: {} } : {},
|
|
4987
5004
|
...widget && WIDGETCOLOR[widget] && addtionalFields?.color_field ? { color: {} } : {}
|
|
4988
5005
|
},
|
|
4989
|
-
enabled: true,
|
|
4990
5006
|
context: env.context
|
|
4991
5007
|
};
|
|
4992
5008
|
const { data: dataOfSelection } = useGetSelection3({
|
|
4993
5009
|
data,
|
|
4994
|
-
queryKey: [
|
|
5010
|
+
queryKey: [
|
|
5011
|
+
`data_${relation}`,
|
|
5012
|
+
domainObject,
|
|
5013
|
+
formValues?.id,
|
|
5014
|
+
action?.id,
|
|
5015
|
+
action?.res_model
|
|
5016
|
+
],
|
|
4995
5017
|
service,
|
|
4996
|
-
xNode
|
|
5018
|
+
xNode,
|
|
5019
|
+
enabled: true
|
|
4997
5020
|
});
|
|
4998
5021
|
const customNoOptionsMessage = () => placeholderNoOption;
|
|
4999
5022
|
const transfer = (data2) => {
|