@fctc/widget-logic 3.2.9 → 3.3.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 +7 -5
- package/dist/index.mjs +7 -5
- package/dist/widget.js +7 -5
- package/dist/widget.mjs +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5370,14 +5370,16 @@ var many2oneFieldController = (props) => {
|
|
|
5370
5370
|
setDomainModal(domainObject);
|
|
5371
5371
|
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
5372
5372
|
}, [selectOptions]);
|
|
5373
|
+
const parsedFormValues = (0, import_react16.useMemo)(
|
|
5374
|
+
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
5375
|
+
[formValues, contextObject]
|
|
5376
|
+
);
|
|
5373
5377
|
(0, import_react16.useEffect)(() => {
|
|
5378
|
+
const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
|
|
5374
5379
|
setDomainObject(
|
|
5375
|
-
(
|
|
5376
|
-
domain,
|
|
5377
|
-
JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {}
|
|
5378
|
-
)
|
|
5380
|
+
(prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
|
|
5379
5381
|
);
|
|
5380
|
-
}, [domain]);
|
|
5382
|
+
}, [domain, parsedFormValues]);
|
|
5381
5383
|
(0, import_react16.useEffect)(() => {
|
|
5382
5384
|
if (!propValue && tempSelectedOption) {
|
|
5383
5385
|
methods.setValue(name, null);
|
package/dist/index.mjs
CHANGED
|
@@ -5451,14 +5451,16 @@ var many2oneFieldController = (props) => {
|
|
|
5451
5451
|
setDomainModal(domainObject);
|
|
5452
5452
|
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
5453
5453
|
}, [selectOptions]);
|
|
5454
|
+
const parsedFormValues = useMemo8(
|
|
5455
|
+
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
5456
|
+
[formValues, contextObject]
|
|
5457
|
+
);
|
|
5454
5458
|
useEffect10(() => {
|
|
5459
|
+
const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
|
|
5455
5460
|
setDomainObject(
|
|
5456
|
-
(
|
|
5457
|
-
domain,
|
|
5458
|
-
JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {}
|
|
5459
|
-
)
|
|
5461
|
+
(prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
|
|
5460
5462
|
);
|
|
5461
|
-
}, [domain]);
|
|
5463
|
+
}, [domain, parsedFormValues]);
|
|
5462
5464
|
useEffect10(() => {
|
|
5463
5465
|
if (!propValue && tempSelectedOption) {
|
|
5464
5466
|
methods.setValue(name, null);
|
package/dist/widget.js
CHANGED
|
@@ -4615,14 +4615,16 @@ var many2oneFieldController = (props) => {
|
|
|
4615
4615
|
setDomainModal(domainObject);
|
|
4616
4616
|
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
4617
4617
|
}, [selectOptions]);
|
|
4618
|
+
const parsedFormValues = (0, import_react16.useMemo)(
|
|
4619
|
+
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
4620
|
+
[formValues, contextObject]
|
|
4621
|
+
);
|
|
4618
4622
|
(0, import_react16.useEffect)(() => {
|
|
4623
|
+
const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
|
|
4619
4624
|
setDomainObject(
|
|
4620
|
-
(
|
|
4621
|
-
domain,
|
|
4622
|
-
JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {}
|
|
4623
|
-
)
|
|
4625
|
+
(prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
|
|
4624
4626
|
);
|
|
4625
|
-
}, [domain]);
|
|
4627
|
+
}, [domain, parsedFormValues]);
|
|
4626
4628
|
(0, import_react16.useEffect)(() => {
|
|
4627
4629
|
if (!propValue && tempSelectedOption) {
|
|
4628
4630
|
methods.setValue(name, null);
|
package/dist/widget.mjs
CHANGED
|
@@ -4673,14 +4673,16 @@ var many2oneFieldController = (props) => {
|
|
|
4673
4673
|
setDomainModal(domainObject);
|
|
4674
4674
|
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
4675
4675
|
}, [selectOptions]);
|
|
4676
|
+
const parsedFormValues = useMemo8(
|
|
4677
|
+
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
4678
|
+
[formValues, contextObject]
|
|
4679
|
+
);
|
|
4676
4680
|
useEffect10(() => {
|
|
4681
|
+
const newDomain = (0, utils_exports.evalJSONDomain)(domain, parsedFormValues);
|
|
4677
4682
|
setDomainObject(
|
|
4678
|
-
(
|
|
4679
|
-
domain,
|
|
4680
|
-
JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {}
|
|
4681
|
-
)
|
|
4683
|
+
(prev) => JSON.stringify(prev) === JSON.stringify(newDomain) ? prev : newDomain
|
|
4682
4684
|
);
|
|
4683
|
-
}, [domain]);
|
|
4685
|
+
}, [domain, parsedFormValues]);
|
|
4684
4686
|
useEffect10(() => {
|
|
4685
4687
|
if (!propValue && tempSelectedOption) {
|
|
4686
4688
|
methods.setValue(name, null);
|