@fctc/widget-logic 3.6.8 → 3.6.9

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
@@ -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)(domain, JSON.parse(JSON.stringify(formValues || {}))),
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 = {
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(domain, JSON.parse(JSON.stringify(formValues || {}))),
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 = {
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)(domain, JSON.parse(JSON.stringify(formValues || {}))),
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 = {
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(domain, JSON.parse(JSON.stringify(formValues || {}))),
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "3.6.8",
3
+ "version": "3.6.9",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",