@esvndev/es-react-config-setting 1.0.65 → 1.0.67
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 +9 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18784,7 +18784,6 @@ const GetSettingConfigByGroup = (obj, callback) => {
|
|
|
18784
18784
|
if (text) {
|
|
18785
18785
|
try {
|
|
18786
18786
|
JSON.parse(text); // Kiểm tra nếu là JSON hợp lệ
|
|
18787
|
-
console.log('Response JSON string:', text);
|
|
18788
18787
|
}
|
|
18789
18788
|
catch (err) {
|
|
18790
18789
|
console.log('Invalid JSON:', err);
|
|
@@ -18969,12 +18968,15 @@ const SettingApp = (props) => {
|
|
|
18969
18968
|
return (jsxRuntime.jsx("div", { className: "radio-group", title: data.description, children: data.option?.map((opt, index) => (jsxRuntime.jsxs("label", { children: [jsxRuntime.jsx(Input$1, { type: "radio", name: data.name, value: opt.value, checked: value === opt.value, onChange: (e) => change_save(root, data, e) }), opt.name] }, index))) }, data.id));
|
|
18970
18969
|
case "combobox":
|
|
18971
18970
|
let _data_option = [];
|
|
18972
|
-
|
|
18973
|
-
|
|
18974
|
-
|
|
18975
|
-
|
|
18976
|
-
|
|
18971
|
+
if (data.option) {
|
|
18972
|
+
try {
|
|
18973
|
+
_data_option = JSON.parse(data.option ?? '[]');
|
|
18974
|
+
}
|
|
18975
|
+
catch (ex) {
|
|
18976
|
+
console.log("Error config option setting", data);
|
|
18977
|
+
}
|
|
18977
18978
|
}
|
|
18979
|
+
data.option = _data_option;
|
|
18978
18980
|
return (jsxRuntime.jsx("div", { className: "combobox", title: data.description, children: jsxRuntime.jsxs(Input$1, { type: "select", className: "input-custom", name: data.name, value: value, onChange: (e) => change_save(root, data, e), children: [jsxRuntime.jsx("option", { value: "", children: "Ch\u1ECDn m\u1ED9t gi\u00E1 tr\u1ECB" }), data.option?.map((opt, index) => (jsxRuntime.jsx("option", { value: opt.value, children: opt.name }, index)))] }) }, data.id));
|
|
18979
18981
|
case "slider":
|
|
18980
18982
|
case "text":
|
|
@@ -18999,7 +19001,7 @@ const SettingApp = (props) => {
|
|
|
18999
19001
|
jsxRuntime.jsx("div", { className: "setting-section-desc", children: jsxRuntime.jsx("div", { className: "", children: jsxRuntime.jsx("span", { children: item.description }) }) })
|
|
19000
19002
|
: null, item.data ?
|
|
19001
19003
|
jsxRuntime.jsx("div", { className: "setting-section-content ", children: item.data.length > 0 ? item.data.map((_item, _index) => {
|
|
19002
|
-
return (jsxRuntime.jsxs("div", { className: 'flx flx-al-c flx-sp-btw setting-section-content__item ' + (item.data.length === 1 ? "single" : (_index === 0 ? 'first' : (_index === item.data.length - 1 ? 'last' : ""))), children: [jsxRuntime.jsxs("div", { className: "flx flx-col", style: { flex: "0 0 fit-content" }, children: [jsxRuntime.jsx("span", { children: _item.name }), jsxRuntime.jsx("span", { className: "setting-section-content__description", children: _item.description })] }), jsxRuntime.jsx("div", { style: { maxWidth: "50%" }, children: jsxRuntime.jsx("div", { style: { width: "100%", boxSizing: "border-box" }, children: _renderInput(item, _item) }) })] }));
|
|
19004
|
+
return (jsxRuntime.jsxs("div", { className: 'flx flx-al-c flx-sp-btw setting-section-content__item ' + (item.data.length === 1 ? "single" : (_index === 0 ? 'first' : (_index === item.data.length - 1 ? 'last' : ""))), children: [jsxRuntime.jsxs("div", { className: "flx flx-col", style: { flex: "0 0 fit-content", maxWidth: '50%' }, children: [jsxRuntime.jsx("span", { children: _item.name }), jsxRuntime.jsx("span", { className: "setting-section-content__description", children: _item.description })] }), jsxRuntime.jsx("div", { style: { maxWidth: "50%" }, children: jsxRuntime.jsx("div", { style: { width: "100%", boxSizing: "border-box" }, children: _renderInput(item, _item) }) })] }));
|
|
19003
19005
|
}) : null }) : null] }));
|
|
19004
19006
|
})
|
|
19005
19007
|
: null);
|