@fctc/widget-logic 3.5.5 → 3.5.6
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 +5 -6
- package/dist/index.mjs +5 -6
- package/dist/widget.js +5 -6
- package/dist/widget.mjs +5 -6
- package/package.json +94 -94
package/dist/index.js
CHANGED
|
@@ -5388,7 +5388,6 @@ var many2oneFieldController = (props) => {
|
|
|
5388
5388
|
(0, import_react16.useEffect)(() => {
|
|
5389
5389
|
setOptions(selectOptions);
|
|
5390
5390
|
setDomainModal(domainObject);
|
|
5391
|
-
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
5392
5391
|
}, [selectOptions]);
|
|
5393
5392
|
const parsedFormValues = (0, import_react16.useMemo)(
|
|
5394
5393
|
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
@@ -5402,7 +5401,7 @@ var many2oneFieldController = (props) => {
|
|
|
5402
5401
|
}, [domain, parsedFormValues]);
|
|
5403
5402
|
(0, import_react16.useEffect)(() => {
|
|
5404
5403
|
if (!propValue && tempSelectedOption) {
|
|
5405
|
-
methods
|
|
5404
|
+
methods?.setValue(name, null);
|
|
5406
5405
|
setTempSelectedOption(null);
|
|
5407
5406
|
} else if (propValue) {
|
|
5408
5407
|
setTempSelectedOption({
|
|
@@ -5439,14 +5438,14 @@ var many2oneFieldController = (props) => {
|
|
|
5439
5438
|
name,
|
|
5440
5439
|
{
|
|
5441
5440
|
id: newOption.value,
|
|
5442
|
-
display_name: newOption
|
|
5441
|
+
display_name: newOption?.label
|
|
5443
5442
|
},
|
|
5444
5443
|
{ shouldDirty: true }
|
|
5445
5444
|
);
|
|
5446
5445
|
setTempSelectedOption(newOption);
|
|
5447
5446
|
onChange && onChange(String(name), {
|
|
5448
|
-
id: newOption
|
|
5449
|
-
display_name: newOption
|
|
5447
|
+
id: newOption?.value,
|
|
5448
|
+
display_name: newOption?.label
|
|
5450
5449
|
});
|
|
5451
5450
|
methods.trigger(name);
|
|
5452
5451
|
}
|
|
@@ -5467,7 +5466,7 @@ var many2oneFieldController = (props) => {
|
|
|
5467
5466
|
const newValue = selectedOption.value;
|
|
5468
5467
|
methods.setValue(
|
|
5469
5468
|
name,
|
|
5470
|
-
{ id: newValue, display_name: selectedOption
|
|
5469
|
+
{ id: newValue, display_name: selectedOption?.label },
|
|
5471
5470
|
{ shouldDirty: true }
|
|
5472
5471
|
);
|
|
5473
5472
|
setTempSelectedOption(selectedOption);
|
package/dist/index.mjs
CHANGED
|
@@ -5469,7 +5469,6 @@ var many2oneFieldController = (props) => {
|
|
|
5469
5469
|
useEffect10(() => {
|
|
5470
5470
|
setOptions(selectOptions);
|
|
5471
5471
|
setDomainModal(domainObject);
|
|
5472
|
-
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
5473
5472
|
}, [selectOptions]);
|
|
5474
5473
|
const parsedFormValues = useMemo8(
|
|
5475
5474
|
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
@@ -5483,7 +5482,7 @@ var many2oneFieldController = (props) => {
|
|
|
5483
5482
|
}, [domain, parsedFormValues]);
|
|
5484
5483
|
useEffect10(() => {
|
|
5485
5484
|
if (!propValue && tempSelectedOption) {
|
|
5486
|
-
methods
|
|
5485
|
+
methods?.setValue(name, null);
|
|
5487
5486
|
setTempSelectedOption(null);
|
|
5488
5487
|
} else if (propValue) {
|
|
5489
5488
|
setTempSelectedOption({
|
|
@@ -5520,14 +5519,14 @@ var many2oneFieldController = (props) => {
|
|
|
5520
5519
|
name,
|
|
5521
5520
|
{
|
|
5522
5521
|
id: newOption.value,
|
|
5523
|
-
display_name: newOption
|
|
5522
|
+
display_name: newOption?.label
|
|
5524
5523
|
},
|
|
5525
5524
|
{ shouldDirty: true }
|
|
5526
5525
|
);
|
|
5527
5526
|
setTempSelectedOption(newOption);
|
|
5528
5527
|
onChange && onChange(String(name), {
|
|
5529
|
-
id: newOption
|
|
5530
|
-
display_name: newOption
|
|
5528
|
+
id: newOption?.value,
|
|
5529
|
+
display_name: newOption?.label
|
|
5531
5530
|
});
|
|
5532
5531
|
methods.trigger(name);
|
|
5533
5532
|
}
|
|
@@ -5548,7 +5547,7 @@ var many2oneFieldController = (props) => {
|
|
|
5548
5547
|
const newValue = selectedOption.value;
|
|
5549
5548
|
methods.setValue(
|
|
5550
5549
|
name,
|
|
5551
|
-
{ id: newValue, display_name: selectedOption
|
|
5550
|
+
{ id: newValue, display_name: selectedOption?.label },
|
|
5552
5551
|
{ shouldDirty: true }
|
|
5553
5552
|
);
|
|
5554
5553
|
setTempSelectedOption(selectedOption);
|
package/dist/widget.js
CHANGED
|
@@ -4622,7 +4622,6 @@ var many2oneFieldController = (props) => {
|
|
|
4622
4622
|
(0, import_react16.useEffect)(() => {
|
|
4623
4623
|
setOptions(selectOptions);
|
|
4624
4624
|
setDomainModal(domainObject);
|
|
4625
|
-
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
4626
4625
|
}, [selectOptions]);
|
|
4627
4626
|
const parsedFormValues = (0, import_react16.useMemo)(
|
|
4628
4627
|
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
@@ -4636,7 +4635,7 @@ var many2oneFieldController = (props) => {
|
|
|
4636
4635
|
}, [domain, parsedFormValues]);
|
|
4637
4636
|
(0, import_react16.useEffect)(() => {
|
|
4638
4637
|
if (!propValue && tempSelectedOption) {
|
|
4639
|
-
methods
|
|
4638
|
+
methods?.setValue(name, null);
|
|
4640
4639
|
setTempSelectedOption(null);
|
|
4641
4640
|
} else if (propValue) {
|
|
4642
4641
|
setTempSelectedOption({
|
|
@@ -4673,14 +4672,14 @@ var many2oneFieldController = (props) => {
|
|
|
4673
4672
|
name,
|
|
4674
4673
|
{
|
|
4675
4674
|
id: newOption.value,
|
|
4676
|
-
display_name: newOption
|
|
4675
|
+
display_name: newOption?.label
|
|
4677
4676
|
},
|
|
4678
4677
|
{ shouldDirty: true }
|
|
4679
4678
|
);
|
|
4680
4679
|
setTempSelectedOption(newOption);
|
|
4681
4680
|
onChange && onChange(String(name), {
|
|
4682
|
-
id: newOption
|
|
4683
|
-
display_name: newOption
|
|
4681
|
+
id: newOption?.value,
|
|
4682
|
+
display_name: newOption?.label
|
|
4684
4683
|
});
|
|
4685
4684
|
methods.trigger(name);
|
|
4686
4685
|
}
|
|
@@ -4701,7 +4700,7 @@ var many2oneFieldController = (props) => {
|
|
|
4701
4700
|
const newValue = selectedOption.value;
|
|
4702
4701
|
methods.setValue(
|
|
4703
4702
|
name,
|
|
4704
|
-
{ id: newValue, display_name: selectedOption
|
|
4703
|
+
{ id: newValue, display_name: selectedOption?.label },
|
|
4705
4704
|
{ shouldDirty: true }
|
|
4706
4705
|
);
|
|
4707
4706
|
setTempSelectedOption(selectedOption);
|
package/dist/widget.mjs
CHANGED
|
@@ -4680,7 +4680,6 @@ var many2oneFieldController = (props) => {
|
|
|
4680
4680
|
useEffect10(() => {
|
|
4681
4681
|
setOptions(selectOptions);
|
|
4682
4682
|
setDomainModal(domainObject);
|
|
4683
|
-
if (relation === "student.subject") (0, store_exports.setListSubject)(selectOptions);
|
|
4684
4683
|
}, [selectOptions]);
|
|
4685
4684
|
const parsedFormValues = useMemo8(
|
|
4686
4685
|
() => JSON.parse(JSON.stringify({ ...formValues, context: contextObject })) ?? {},
|
|
@@ -4694,7 +4693,7 @@ var many2oneFieldController = (props) => {
|
|
|
4694
4693
|
}, [domain, parsedFormValues]);
|
|
4695
4694
|
useEffect10(() => {
|
|
4696
4695
|
if (!propValue && tempSelectedOption) {
|
|
4697
|
-
methods
|
|
4696
|
+
methods?.setValue(name, null);
|
|
4698
4697
|
setTempSelectedOption(null);
|
|
4699
4698
|
} else if (propValue) {
|
|
4700
4699
|
setTempSelectedOption({
|
|
@@ -4731,14 +4730,14 @@ var many2oneFieldController = (props) => {
|
|
|
4731
4730
|
name,
|
|
4732
4731
|
{
|
|
4733
4732
|
id: newOption.value,
|
|
4734
|
-
display_name: newOption
|
|
4733
|
+
display_name: newOption?.label
|
|
4735
4734
|
},
|
|
4736
4735
|
{ shouldDirty: true }
|
|
4737
4736
|
);
|
|
4738
4737
|
setTempSelectedOption(newOption);
|
|
4739
4738
|
onChange && onChange(String(name), {
|
|
4740
|
-
id: newOption
|
|
4741
|
-
display_name: newOption
|
|
4739
|
+
id: newOption?.value,
|
|
4740
|
+
display_name: newOption?.label
|
|
4742
4741
|
});
|
|
4743
4742
|
methods.trigger(name);
|
|
4744
4743
|
}
|
|
@@ -4759,7 +4758,7 @@ var many2oneFieldController = (props) => {
|
|
|
4759
4758
|
const newValue = selectedOption.value;
|
|
4760
4759
|
methods.setValue(
|
|
4761
4760
|
name,
|
|
4762
|
-
{ id: newValue, display_name: selectedOption
|
|
4761
|
+
{ id: newValue, display_name: selectedOption?.label },
|
|
4763
4762
|
{ shouldDirty: true }
|
|
4764
4763
|
);
|
|
4765
4764
|
setTempSelectedOption(selectedOption);
|
package/package.json
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "3.5.
|
|
4
|
-
"types": "dist/index.d.ts",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./hooks": {
|
|
14
|
-
"types": "./dist/hooks.d.ts",
|
|
15
|
-
"import": "./dist/hooks.mjs",
|
|
16
|
-
"require": "./dist/hooks.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./widget": {
|
|
19
|
-
"types": "./dist/widget.d.ts",
|
|
20
|
-
"import": "./dist/widget.mjs",
|
|
21
|
-
"require": "./dist/widget.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./icons": {
|
|
24
|
-
"types": "./dist/icons.d.ts",
|
|
25
|
-
"import": "./dist/icons.mjs",
|
|
26
|
-
"require": "./dist/icons.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./utils": {
|
|
29
|
-
"types": "./dist/utils.d.ts",
|
|
30
|
-
"import": "./dist/utils.mjs",
|
|
31
|
-
"require": "./dist/utils.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./store": {
|
|
34
|
-
"types": "./dist/store.d.ts",
|
|
35
|
-
"import": "./dist/store.mjs",
|
|
36
|
-
"require": "./dist/store.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./config": {
|
|
39
|
-
"types": "./dist/config.d.ts",
|
|
40
|
-
"import": "./dist/config.mjs",
|
|
41
|
-
"require": "./dist/config.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./constants": {
|
|
44
|
-
"types": "./dist/constants.d.ts",
|
|
45
|
-
"import": "./dist/constants.mjs",
|
|
46
|
-
"require": "./dist/constants.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./environment": {
|
|
49
|
-
"types": "./dist/environment.d.ts",
|
|
50
|
-
"import": "./dist/environment.mjs",
|
|
51
|
-
"require": "./dist/environment.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./provider": {
|
|
54
|
-
"types": "./dist/provider.d.ts",
|
|
55
|
-
"import": "./dist/provider.mjs",
|
|
56
|
-
"require": "./dist/provider.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./services": {
|
|
59
|
-
"types": "./dist/services.d.ts",
|
|
60
|
-
"import": "./dist/services.mjs",
|
|
61
|
-
"require": "./dist/services.cjs"
|
|
62
|
-
},
|
|
63
|
-
"./types": {
|
|
64
|
-
"types": "./dist/types.d.ts",
|
|
65
|
-
"import": "./dist/types.mjs",
|
|
66
|
-
"require": "./dist/types.cjs"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"files": [
|
|
70
|
-
"dist"
|
|
71
|
-
],
|
|
72
|
-
"scripts": {
|
|
73
|
-
"build": "tsup",
|
|
74
|
-
"test": "jest"
|
|
75
|
-
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@fctc/interface-logic": "^3.1.8",
|
|
78
|
-
"@headlessui/react": "^2.2.6",
|
|
79
|
-
"@tanstack/react-query": "^5.84.0",
|
|
80
|
-
"i18next": "^25.3.2",
|
|
81
|
-
"i18next-browser-languagedetector": "^8.2.0",
|
|
82
|
-
"react-i18next": "^15.6.1",
|
|
83
|
-
"react-tooltip": "^5.29.1"
|
|
84
|
-
},
|
|
85
|
-
"devDependencies": {
|
|
86
|
-
"@types/react": "^18.3.1",
|
|
87
|
-
"jest": "^29.7.0",
|
|
88
|
-
"react": "18.0.0",
|
|
89
|
-
"tsup": "^8.0.0",
|
|
90
|
-
"typescript": "^5.8.2"
|
|
91
|
-
},
|
|
92
|
-
"packageManager": "yarn@1.22.0",
|
|
93
|
-
"peerDependencies": {}
|
|
94
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/widget-logic",
|
|
3
|
+
"version": "3.5.6",
|
|
4
|
+
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./hooks": {
|
|
14
|
+
"types": "./dist/hooks.d.ts",
|
|
15
|
+
"import": "./dist/hooks.mjs",
|
|
16
|
+
"require": "./dist/hooks.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./widget": {
|
|
19
|
+
"types": "./dist/widget.d.ts",
|
|
20
|
+
"import": "./dist/widget.mjs",
|
|
21
|
+
"require": "./dist/widget.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./icons": {
|
|
24
|
+
"types": "./dist/icons.d.ts",
|
|
25
|
+
"import": "./dist/icons.mjs",
|
|
26
|
+
"require": "./dist/icons.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./utils": {
|
|
29
|
+
"types": "./dist/utils.d.ts",
|
|
30
|
+
"import": "./dist/utils.mjs",
|
|
31
|
+
"require": "./dist/utils.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./store": {
|
|
34
|
+
"types": "./dist/store.d.ts",
|
|
35
|
+
"import": "./dist/store.mjs",
|
|
36
|
+
"require": "./dist/store.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./config": {
|
|
39
|
+
"types": "./dist/config.d.ts",
|
|
40
|
+
"import": "./dist/config.mjs",
|
|
41
|
+
"require": "./dist/config.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./constants": {
|
|
44
|
+
"types": "./dist/constants.d.ts",
|
|
45
|
+
"import": "./dist/constants.mjs",
|
|
46
|
+
"require": "./dist/constants.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./environment": {
|
|
49
|
+
"types": "./dist/environment.d.ts",
|
|
50
|
+
"import": "./dist/environment.mjs",
|
|
51
|
+
"require": "./dist/environment.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./provider": {
|
|
54
|
+
"types": "./dist/provider.d.ts",
|
|
55
|
+
"import": "./dist/provider.mjs",
|
|
56
|
+
"require": "./dist/provider.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./services": {
|
|
59
|
+
"types": "./dist/services.d.ts",
|
|
60
|
+
"import": "./dist/services.mjs",
|
|
61
|
+
"require": "./dist/services.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./types": {
|
|
64
|
+
"types": "./dist/types.d.ts",
|
|
65
|
+
"import": "./dist/types.mjs",
|
|
66
|
+
"require": "./dist/types.cjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"dist"
|
|
71
|
+
],
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "tsup",
|
|
74
|
+
"test": "jest"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@fctc/interface-logic": "^3.1.8",
|
|
78
|
+
"@headlessui/react": "^2.2.6",
|
|
79
|
+
"@tanstack/react-query": "^5.84.0",
|
|
80
|
+
"i18next": "^25.3.2",
|
|
81
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
82
|
+
"react-i18next": "^15.6.1",
|
|
83
|
+
"react-tooltip": "^5.29.1"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@types/react": "^18.3.1",
|
|
87
|
+
"jest": "^29.7.0",
|
|
88
|
+
"react": "18.0.0",
|
|
89
|
+
"tsup": "^8.0.0",
|
|
90
|
+
"typescript": "^5.8.2"
|
|
91
|
+
},
|
|
92
|
+
"packageManager": "yarn@1.22.0",
|
|
93
|
+
"peerDependencies": {}
|
|
94
|
+
}
|