ag-common 0.0.681 → 0.0.682
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.
|
@@ -125,10 +125,15 @@ const DarkModeAux = ({ iconSize = '2.5rem', className, mode, onSubmit, style, dm
|
|
|
125
125
|
else {
|
|
126
126
|
className = '';
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
try {
|
|
129
|
+
document.getElementsByTagName('html')[0].classList.remove('dark-mode');
|
|
130
|
+
document.getElementsByTagName('html')[0].classList.remove('light-mode');
|
|
131
|
+
if (className) {
|
|
132
|
+
document.getElementsByTagName('html')[0].classList.add(className);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch (e) {
|
|
136
|
+
//
|
|
132
137
|
}
|
|
133
138
|
dm.setDarkmode(newDarkMode);
|
|
134
139
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(newDarkMode);
|
|
@@ -30,11 +30,21 @@ const DropdownListDialog = (p) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
30
30
|
wrapper.style.left = `${p.position.x}px`;
|
|
31
31
|
const root = (0, client_1.createRoot)(wrapper);
|
|
32
32
|
root.render(react_1.default.createElement(index_1.DropdownList, Object.assign({}, p, { open: true, onClose: () => {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
try {
|
|
34
|
+
root.unmount();
|
|
35
|
+
wrapper.remove();
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
//
|
|
39
|
+
}
|
|
35
40
|
}, onChange: (v, i) => {
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
try {
|
|
42
|
+
root.unmount();
|
|
43
|
+
wrapper.remove();
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
//
|
|
47
|
+
}
|
|
38
48
|
res(!v ? undefined : [v, i]);
|
|
39
49
|
} }), "\u00A0"));
|
|
40
50
|
});
|
|
@@ -22,8 +22,13 @@ const ModalDialog = (content, opt) => __awaiter(void 0, void 0, void 0, function
|
|
|
22
22
|
const root = (0, client_1.createRoot)(wrapper);
|
|
23
23
|
root.render(react_1.default.createElement(Modal_1.Modal, { open: true, setOpen: (o) => {
|
|
24
24
|
if (!o) {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
try {
|
|
26
|
+
root.unmount();
|
|
27
|
+
wrapper.remove();
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
//
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
res('ok');
|
|
29
34
|
}, topPosition: "center", position: "center", style: opt === null || opt === void 0 ? void 0 : opt.style }, content));
|
|
@@ -108,7 +108,12 @@ const useTooltip = () => {
|
|
|
108
108
|
document.body.appendChild(d);
|
|
109
109
|
return () => {
|
|
110
110
|
var _a;
|
|
111
|
-
|
|
111
|
+
try {
|
|
112
|
+
(_a = document.querySelector(`#${globalId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
//
|
|
116
|
+
}
|
|
112
117
|
};
|
|
113
118
|
}, []);
|
|
114
119
|
const setPos = (p) => {
|
package/package.json
CHANGED