@esvndev/es-react-config-setting 1.0.37 → 1.0.39

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.css CHANGED
@@ -1,2 +1,2 @@
1
- :root{--layer-background-selected:#dbebff;--text-primary:#081b3a;--layer-background:#fff;--divider-bold:rgba(0,0,0,.15);--surface-background-subtle:#ebecf0;--layer-background-hover:#f1f2f4}.setting-modal .modal-title{color:var(--text-primary);display:block;font-size:1.125rem;font-weight:700;line-height:1.5}.flx{display:flex;flex-flow:row nowrap}.flx-col{flex-flow:column nowrap}.flx-sp-btw{justify-content:space-between}.setting-modal-body-custom{height:calc(100vh - 3.5rem - 55px)}.setting-modal{color:var(--text-primary);font-size:.875rem;font-weight:600;line-height:1.5;overflow:hidden}.setting-menu,.stack-navigation{margin-top:0!important}.stack-navigation{background-color:#ebecf0;padding-left:0!important;padding-right:0!important}.setting-section{padding-left:12px;padding-right:12px}.setting-menu__item{align-items:center;color:var(--text-primary);cursor:pointer;display:flex;font-size:.875rem;font-weight:500;font-weight:700;height:50px;justify-content:space-between;line-height:1.5;margin-top:0!important;padding:0 16px!important}.setting-menu__item:hover{background-color:var(--layer-background-hover)}.setting-menu__item.selected{background-color:var(--layer-background-selected)}.setting-menu__wrapper-content{align-items:center;display:flex;margin-right:2px}.setting-menu{background-color:var(--layer-background);border-right:1px solid var(--divider-bold);padding-left:0!important;padding-right:0!important}.setting-right,.setting-right .stack-page{background-color:var(--surface-background-subtle)}.stack-navigation .stack-page{background:var(--layer-background);inset:0;position:absolute}.setting-menu__icon{font-size:1.125rem;height:1.125rem;line-height:0;margin-right:10px;width:1.125rem}.setting-menu__name{margin:0}.truncate{word-wrap:break-word;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-section-label{color:var(--text-primary);display:flex;font-size:1rem;font-weight:600;height:32px;line-height:1.5;line-height:32px;padding:0 16px}.setting-section-content{background-color:transparent;margin:8px 0 24px}.setting-section-content__item.first{border-radius:8px 8px 0 0}.setting-section-content__item{background-color:var(--layer-background);box-sizing:border-box;cursor:pointer;padding:12px 16px 0}.setting-section-content__item.last{border-radius:0 0 8px 8px;padding:12px 16px}.setting-section-content__description,.setting-section-desc{color:var(--text-secondary);font-size:.8125rem;font-weight:400;line-height:1.5;line-height:1.4}.setting-section-desc{padding:0 16px}.setting-section-content__item.single{border-radius:8px;padding:12px 16px}.z-radio{color:var(--text-primary);width:fit-content}.t-right{text-align:right}.input-custom{height:34px!important;padding:.3rem .5rem!important;width:190px}.form-color{width:75px!important}
1
+ :root{--layer-background-selected:#dbebff;--text-primary:#081b3a;--layer-background:#fff;--divider-bold:rgba(0,0,0,.15);--surface-background-subtle:#ebecf0;--layer-background-hover:#f1f2f4}.setting-modal .modal-title{color:var(--text-primary);display:block;font-size:1.125rem;font-weight:700;line-height:1.5}.flx{display:flex;flex-flow:row nowrap}.flx-col{flex-flow:column nowrap}.flx-sp-btw{justify-content:space-between}.setting-modal-body-custom{height:calc(100vh - 3.5rem - 55px)}.setting-modal{color:var(--text-primary);font-size:.875rem;font-weight:600;line-height:1.5;overflow:hidden}.setting-menu,.stack-navigation{margin-top:0!important}.stack-navigation{background-color:#ebecf0;padding-left:0!important;padding-right:0!important}.setting-section{padding-left:12px;padding-right:12px}.setting-menu__item{align-items:center;color:var(--text-primary);cursor:pointer;display:flex;font-size:.875rem;font-weight:500;font-weight:700;height:50px;justify-content:space-between;line-height:1.5;margin-top:0!important;padding:0 16px!important}.setting-menu__item:hover{background-color:var(--layer-background-hover)}.setting-menu__item.selected{background-color:var(--layer-background-selected)}.setting-menu__wrapper-content{align-items:center;display:flex;margin-right:2px}.setting-menu{background-color:var(--layer-background);border-right:1px solid var(--divider-bold);padding-left:0!important;padding-right:0!important}.setting-right,.setting-right .stack-page{background-color:var(--surface-background-subtle)}.stack-navigation .stack-page{background:var(--layer-background);inset:0;position:absolute}.setting-menu__icon{font-size:1.125rem;height:1.125rem;line-height:0;margin-right:10px;width:1.125rem}.setting-menu__name{margin:0}.truncate{word-wrap:break-word;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-section-label{color:var(--text-primary);display:flex;font-size:1rem;font-weight:600;height:32px;line-height:1.5;line-height:32px;padding:0 16px}.setting-section-content{background-color:transparent;margin:8px 0 24px}.setting-section-content__item.first{border-radius:8px 8px 0 0}.setting-section-content__item{background-color:var(--layer-background);box-sizing:border-box;cursor:pointer;padding:12px 16px 0}.setting-section-content__item.last{border-radius:0 0 8px 8px;padding:12px 16px}.setting-section-content__description,.setting-section-desc{color:var(--text-secondary);font-size:.8125rem;font-weight:400;line-height:1.5;line-height:1.4}.setting-section-desc{padding:0 16px}.setting-section-content__item.single{border-radius:8px;padding:12px 16px}.z-radio{color:var(--text-primary);width:fit-content}.t-right{text-align:right}.input-custom{height:34px!important;padding:.3rem .5rem!important;width:190px!important}.form-color{width:75px!important}
2
2
  /*# sourceMappingURL=index.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["index.scss"],"names":[],"mappings":"AAAA,MACE,mCAAoC,CACpC,sBAAuB,CACvB,uBAAwB,CACxB,8BAAmC,CACnC,mCAAoC,CACpC,gCACF,CAEA,4BAKE,yBAA0B,CAF1B,aAAc,CAFd,kBAAmB,CAGnB,eAAiB,CAFjB,eAIF,CAEA,KACE,YAAa,CACb,oBACF,CAEA,SACE,uBACF,CAEA,YACE,6BACF,CAEA,2BACE,kCACF,CAEA,eAIE,yBAA0B,CAH1B,iBAAmB,CACnB,eAAgB,CAChB,eAAgB,CAEhB,eACF,CAEA,gCAEE,sBACF,CAEA,kBACE,wBAAyB,CACzB,wBAA4B,CAC5B,yBACF,CAEA,iBACE,iBAAkB,CAClB,kBACF,CAEA,oBAUE,kBAAmB,CAPnB,yBAA0B,CAC1B,cAAe,CAIf,YAAa,CAHb,iBAAmB,CACnB,eAAgB,CAKhB,eAAiB,CAVjB,WAAY,CAQZ,6BAA8B,CAF9B,eAAgB,CAKhB,sBAAwB,CAVxB,wBAWF,CAEA,0BACE,8CACF,CAEA,6BACE,iDACF,CAEA,+BAEE,kBAAmB,CADnB,YAAa,CAEb,gBACF,CAEA,cAEE,wCAAyC,CADzC,0CAA2C,CAE3C,wBAA0B,CAC1B,yBACF,CAEA,0CAEE,iDACF,CAEA,8BAGE,kCAAmC,CADnC,OAAQ,CADR,iBAGF,CAEA,oBACE,kBAAmB,CAEnB,eAAgB,CAChB,aAAc,CACd,iBAAkB,CAHlB,cAIF,CAEA,oBACE,QACF,CAEA,UAIE,oBAAqB,CADrB,eAAgB,CAFhB,sBAAuB,CACvB,kBAGF,CAEA,uBACE,yBAA0B,CAO1B,YAAa,CANb,cAAe,CACf,eAAgB,CAIhB,WAAY,CAHZ,eAAgB,CAEhB,gBAAiB,CADjB,cAIF,CAEA,yBACE,4BAA6B,CAC7B,iBACF,CAEA,qCACE,yBACF,CAEA,+BACE,wCAAyC,CACzC,qBAAsB,CACtB,cAAe,CACf,mBACF,CAEA,oCAEE,yBAA0B,CAD1B,iBAEF,CAUA,4DAHE,2BAA4B,CAJ5B,kBAAoB,CACpB,eAAgB,CAChB,eAAgB,CAChB,eAWF,CAPA,sBAEE,cAKF,CAEA,sCACE,iBAAkB,CAClB,iBACF,CAEA,SAEE,yBAA0B,CAD1B,iBAEF,CAEA,SACE,gBACF,CAEA,cAEE,qBAAuB,CACvB,6BAAiC,CAFjC,WAGF,CAEA,YACE,oBACF","file":"index.css","sourcesContent":[":root {\n --layer-background-selected: #dbebff;\n --text-primary: #081b3a;\n --layer-background: #fff;\n --divider-bold: rgba(0, 0, 0, 0.15);\n --surface-background-subtle: #ebecf0;\n --layer-background-hover: #f1f2f4;\n}\n\n.setting-modal .modal-title {\n font-size: 1.125rem;\n line-height: 1.5;\n display: block;\n font-weight: bold;\n color: var(--text-primary);\n}\n\n.flx {\n display: flex;\n flex-flow: row nowrap;\n}\n\n.flx-col {\n flex-flow: column nowrap;\n}\n\n.flx-sp-btw {\n justify-content: space-between;\n}\n\n.setting-modal-body-custom {\n height: calc(100vh - 3.5rem - 55px);\n}\n\n.setting-modal {\n font-size: 0.875rem;\n font-weight: 600;\n line-height: 1.5;\n color: var(--text-primary);\n overflow: hidden;\n}\n\n.setting-menu,\n.stack-navigation {\n margin-top: 0px !important;\n}\n\n.stack-navigation {\n background-color: #ebecf0;\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.setting-section {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n.setting-menu__item {\n height: 50px;\n padding: 0 16px !important;\n color: var(--text-primary);\n cursor: pointer;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.5;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-weight: bold;\n margin-top: 0 !important;\n}\n\n.setting-menu__item:hover {\n background-color: var(--layer-background-hover);\n}\n\n.setting-menu__item.selected {\n background-color: var(--layer-background-selected);\n}\n\n.setting-menu__wrapper-content {\n display: flex;\n align-items: center;\n margin-right: 2px;\n}\n\n.setting-menu {\n border-right: 1px solid var(--divider-bold);\n background-color: var(--layer-background);\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n\n.setting-right,\n.setting-right .stack-page {\n background-color: var(--surface-background-subtle);\n}\n\n.stack-navigation .stack-page {\n position: absolute;\n inset: 0;\n background: var(--layer-background);\n}\n\n.setting-menu__icon {\n font-size: 1.125rem;\n width: 1.125rem;\n height: 1.125rem;\n line-height: 0;\n margin-right: 10px;\n}\n\n.setting-menu__name {\n margin: 0;\n}\n\n.truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n word-wrap: break-word;\n}\n\n.setting-section-label {\n color: var(--text-primary);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.5;\n padding: 0 16px;\n line-height: 32px;\n height: 32px;\n display: flex;\n}\n\n.setting-section-content {\n background-color: transparent;\n margin: 8px 0 24px;\n}\n\n.setting-section-content__item.first {\n border-radius: 8px 8px 0 0;\n}\n\n.setting-section-content__item {\n background-color: var(--layer-background);\n box-sizing: border-box;\n cursor: pointer;\n padding: 12px 16px 0;\n}\n\n.setting-section-content__item.last {\n padding: 12px 16px;\n border-radius: 0 0 8px 8px;\n}\n\n.setting-section-content__description {\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.5;\n line-height: 1.4;\n color: var(--text-secondary);\n}\n\n.setting-section-desc {\n color: var(--text-secondary);\n padding: 0 16px;\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.5;\n line-height: 1.4;\n}\n\n.setting-section-content__item.single {\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.z-radio {\n width: fit-content;\n color: var(--text-primary);\n}\n\n.t-right {\n text-align: right;\n}\n\n.input-custom {\n width: 190px;\n height: 34px !important;\n padding: 0.3rem 0.5rem !important;\n}\n\n.form-color {\n width: 75px !important;\n}"]}
1
+ {"version":3,"sources":["index.scss"],"names":[],"mappings":"AAAA,MACE,mCAAoC,CACpC,sBAAuB,CACvB,uBAAwB,CACxB,8BAAmC,CACnC,mCAAoC,CACpC,gCACF,CAEA,4BAKE,yBAA0B,CAF1B,aAAc,CAFd,kBAAmB,CAGnB,eAAiB,CAFjB,eAIF,CAEA,KACE,YAAa,CACb,oBACF,CAEA,SACE,uBACF,CAEA,YACE,6BACF,CAEA,2BACE,kCACF,CAEA,eAIE,yBAA0B,CAH1B,iBAAmB,CACnB,eAAgB,CAChB,eAAgB,CAEhB,eACF,CAEA,gCAEE,sBACF,CAEA,kBACE,wBAAyB,CACzB,wBAA4B,CAC5B,yBACF,CAEA,iBACE,iBAAkB,CAClB,kBACF,CAEA,oBAUE,kBAAmB,CAPnB,yBAA0B,CAC1B,cAAe,CAIf,YAAa,CAHb,iBAAmB,CACnB,eAAgB,CAKhB,eAAiB,CAVjB,WAAY,CAQZ,6BAA8B,CAF9B,eAAgB,CAKhB,sBAAwB,CAVxB,wBAWF,CAEA,0BACE,8CACF,CAEA,6BACE,iDACF,CAEA,+BAEE,kBAAmB,CADnB,YAAa,CAEb,gBACF,CAEA,cAEE,wCAAyC,CADzC,0CAA2C,CAE3C,wBAA0B,CAC1B,yBACF,CAEA,0CAEE,iDACF,CAEA,8BAGE,kCAAmC,CADnC,OAAQ,CADR,iBAGF,CAEA,oBACE,kBAAmB,CAEnB,eAAgB,CAChB,aAAc,CACd,iBAAkB,CAHlB,cAIF,CAEA,oBACE,QACF,CAEA,UAIE,oBAAqB,CADrB,eAAgB,CAFhB,sBAAuB,CACvB,kBAGF,CAEA,uBACE,yBAA0B,CAO1B,YAAa,CANb,cAAe,CACf,eAAgB,CAIhB,WAAY,CAHZ,eAAgB,CAEhB,gBAAiB,CADjB,cAIF,CAEA,yBACE,4BAA6B,CAC7B,iBACF,CAEA,qCACE,yBACF,CAEA,+BACE,wCAAyC,CACzC,qBAAsB,CACtB,cAAe,CACf,mBACF,CAEA,oCAEE,yBAA0B,CAD1B,iBAEF,CAUA,4DAHE,2BAA4B,CAJ5B,kBAAoB,CACpB,eAAgB,CAChB,eAAgB,CAChB,eAWF,CAPA,sBAEE,cAKF,CAEA,sCACE,iBAAkB,CAClB,iBACF,CAEA,SAEE,yBAA0B,CAD1B,iBAEF,CAEA,SACE,gBACF,CAEA,cAEE,qBAAuB,CACvB,6BAAiC,CAFjC,qBAGF,CAEA,YACE,oBACF","file":"index.css","sourcesContent":[":root {\n --layer-background-selected: #dbebff;\n --text-primary: #081b3a;\n --layer-background: #fff;\n --divider-bold: rgba(0, 0, 0, 0.15);\n --surface-background-subtle: #ebecf0;\n --layer-background-hover: #f1f2f4;\n}\n\n.setting-modal .modal-title {\n font-size: 1.125rem;\n line-height: 1.5;\n display: block;\n font-weight: bold;\n color: var(--text-primary);\n}\n\n.flx {\n display: flex;\n flex-flow: row nowrap;\n}\n\n.flx-col {\n flex-flow: column nowrap;\n}\n\n.flx-sp-btw {\n justify-content: space-between;\n}\n\n.setting-modal-body-custom {\n height: calc(100vh - 3.5rem - 55px);\n}\n\n.setting-modal {\n font-size: 0.875rem;\n font-weight: 600;\n line-height: 1.5;\n color: var(--text-primary);\n overflow: hidden;\n}\n\n.setting-menu,\n.stack-navigation {\n margin-top: 0px !important;\n}\n\n.stack-navigation {\n background-color: #ebecf0;\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.setting-section {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n.setting-menu__item {\n height: 50px;\n padding: 0 16px !important;\n color: var(--text-primary);\n cursor: pointer;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.5;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-weight: bold;\n margin-top: 0 !important;\n}\n\n.setting-menu__item:hover {\n background-color: var(--layer-background-hover);\n}\n\n.setting-menu__item.selected {\n background-color: var(--layer-background-selected);\n}\n\n.setting-menu__wrapper-content {\n display: flex;\n align-items: center;\n margin-right: 2px;\n}\n\n.setting-menu {\n border-right: 1px solid var(--divider-bold);\n background-color: var(--layer-background);\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n\n.setting-right,\n.setting-right .stack-page {\n background-color: var(--surface-background-subtle);\n}\n\n.stack-navigation .stack-page {\n position: absolute;\n inset: 0;\n background: var(--layer-background);\n}\n\n.setting-menu__icon {\n font-size: 1.125rem;\n width: 1.125rem;\n height: 1.125rem;\n line-height: 0;\n margin-right: 10px;\n}\n\n.setting-menu__name {\n margin: 0;\n}\n\n.truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n word-wrap: break-word;\n}\n\n.setting-section-label {\n color: var(--text-primary);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.5;\n padding: 0 16px;\n line-height: 32px;\n height: 32px;\n display: flex;\n}\n\n.setting-section-content {\n background-color: transparent;\n margin: 8px 0 24px;\n}\n\n.setting-section-content__item.first {\n border-radius: 8px 8px 0 0;\n}\n\n.setting-section-content__item {\n background-color: var(--layer-background);\n box-sizing: border-box;\n cursor: pointer;\n padding: 12px 16px 0;\n}\n\n.setting-section-content__item.last {\n padding: 12px 16px;\n border-radius: 0 0 8px 8px;\n}\n\n.setting-section-content__description {\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.5;\n line-height: 1.4;\n color: var(--text-secondary);\n}\n\n.setting-section-desc {\n color: var(--text-secondary);\n padding: 0 16px;\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.5;\n line-height: 1.4;\n}\n\n.setting-section-content__item.single {\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.z-radio {\n width: fit-content;\n color: var(--text-primary);\n}\n\n.t-right {\n text-align: right;\n}\n\n.input-custom {\n width: 190px !important;\n height: 34px !important;\n padding: 0.3rem 0.5rem !important;\n}\n\n.form-color {\n width: 75px !important;\n}"]}
package/dist/index.js CHANGED
@@ -11445,6 +11445,54 @@ var Input = /*#__PURE__*/function (_React$Component) {
11445
11445
  Input.propTypes = propTypes;
11446
11446
  var Input$1 = Input;
11447
11447
 
11448
+ const BASE_URL = process.env.REACT_APP_BASE_URL;
11449
+ //#region using for token
11450
+ const getToken = () => {
11451
+ let accessToken = localStorage.getItem('access_token');
11452
+ if (!accessToken) {
11453
+ const userData = localStorage.getItem('userData');
11454
+ if (userData && userData.length) {
11455
+ accessToken = JSON.parse(userData).id_token;
11456
+ }
11457
+ }
11458
+ return accessToken;
11459
+ };
11460
+ //#endregion
11461
+ const GetSettingGroup = (callback) => {
11462
+ const _url = `${BASE_URL}/api/config/get-setting-group`;
11463
+ const options = {
11464
+ method: 'GET',
11465
+ headers: {
11466
+ 'Content-Type': 'application/json',
11467
+ Authorization: `Bearer ${getToken()}`,
11468
+ },
11469
+ };
11470
+ fetch(_url, options)
11471
+ .then(response => {
11472
+ if (!response.ok) {
11473
+ console.log(`HTTP error! Status: ${response.status}`);
11474
+ return null;
11475
+ }
11476
+ return response.text(); // hoặc .json() nếu muốn object
11477
+ })
11478
+ .then(text => {
11479
+ if (text) {
11480
+ try {
11481
+ JSON.parse(text); // Kiểm tra nếu là JSON hợp lệ
11482
+ console.log('Response JSON string:', text);
11483
+ }
11484
+ catch (err) {
11485
+ console.log('Invalid JSON:', err);
11486
+ }
11487
+ }
11488
+ callback({ state: true, data: text });
11489
+ })
11490
+ .catch(error => {
11491
+ console.log('Fetch error:', error);
11492
+ callback({ state: true, data: error });
11493
+ });
11494
+ };
11495
+
11448
11496
  const SettingApp = (props) => {
11449
11497
  const { isOpen, eventChange, eventClose } = { ...props };
11450
11498
  useForm({
@@ -11470,118 +11518,19 @@ const SettingApp = (props) => {
11470
11518
  //Sự kiện sau khi đã đóng cài đặt
11471
11519
  const handleFormClosed = () => {
11472
11520
  };
11473
- //Hàm chuyển đổi ngôn ngữ
11474
- const t = (l) => {
11475
- return l;
11476
- };
11477
11521
  const DynamicIcon = ({ name, className }) => {
11478
11522
  const LucideIcon = Icon[name];
11479
11523
  return LucideIcon ? jsxRuntime.jsx(LucideIcon, { className: className }) : null;
11480
11524
  };
11481
11525
  //#endregion
11482
11526
  const [settingData, setSettingData] = React.useState([]);
11483
- const [dataSettingGroup, setDataSettingGroup] = React.useState([{
11484
- id: 1,
11485
- name: t('Cài đặt chung'),
11486
- active: true,
11487
- icon: 'Settings',
11488
- data: [{
11489
- name: "Danh bạ",
11490
- description: "Danh sách danh sách danh sách danh sách",
11491
- data: [
11492
- {
11493
- id: "b7e1e7f0-1c2a-4e50-8fa2-17b91f5a3aa1",
11494
- name: "Hiển thị trạng thái truy cập",
11495
- description: "Ai được phép truy cập",
11496
- type: "checkbox"
11497
- },
11498
- {
11499
- id: "c3de6c47-d1fa-4e1e-a6a1-82b83ddc9e11",
11500
- name: "Hiển thị trạng thái truy cập",
11501
- description: "Ai được phép truy cập",
11502
- type: "radio"
11503
- },
11504
- {
11505
- id: "0d231d12-d137-4f04-a72e-fae5fc4bcf7d",
11506
- name: "Hiển thị trạng thái truy cập",
11507
- description: "Ai được phép truy cập",
11508
- type: "combobox",
11509
- option: [
11510
- { name: "Cho phép", value: 1 },
11511
- { name: "Không phép", value: 0 }
11512
- ]
11513
- },
11514
- {
11515
- id: "9385d2e6-1e3e-4856-917f-42a2e4d1a4b3",
11516
- name: "Nhập văn bản",
11517
- description: "Gõ nội dung cần nhập",
11518
- type: "text"
11519
- },
11520
- {
11521
- id: "64f3d53c-03c0-4b97-a30d-66c933eb2f96",
11522
- name: "Nhập số",
11523
- description: "Chỉ nhập giá trị số",
11524
- type: "number"
11525
- },
11526
- {
11527
- id: "acf86f69-0a8b-4e3f-8106-5406e4d6bc90",
11528
- name: "Chọn ngày",
11529
- description: "Lựa chọn ngày cụ thể",
11530
- type: "date"
11531
- },
11532
- {
11533
- id: "c3b1f3e4-6041-4ec1-b72a-c0b4e1a08fa0",
11534
- name: "Bật/tắt trạng thái",
11535
- description: "Chuyển đổi trạng thái",
11536
- type: "switch"
11537
- },
11538
- {
11539
- id: "62f4d1e3-745a-4955-9a5f-9260b271bfcf",
11540
- name: "Điều chỉnh giá trị",
11541
- description: "Kéo để chọn giá trị mong muốn",
11542
- type: "slider",
11543
- min: 0,
11544
- max: 100
11545
- },
11546
- {
11547
- id: "6b727c50-5426-4eb9-8e50-2c5e95726c6f",
11548
- name: "Tải tệp",
11549
- description: "Chọn tệp để tải lên",
11550
- type: "file"
11551
- },
11552
- {
11553
- id: "93b7e3c3-ef02-40e4-9c56-7190c3e23b64",
11554
- name: "Màu sắc",
11555
- description: "Chọn màu sắc yêu thích",
11556
- type: "color"
11557
- }
11558
- ]
11559
- }]
11560
- }, {
11561
- id: 2,
11562
- name: t('Quyền riêng tư'),
11563
- icon: "Lock"
11564
- }, {
11565
- id: 3,
11566
- name: t('Giao diện'),
11567
- icon: "Thermometer"
11568
- }, {
11569
- id: 4,
11570
- name: t('Thông báo'),
11571
- icon: "BecoxyNotification"
11572
- }, {
11573
- id: 5,
11574
- name: t('Tin nhắn'),
11575
- icon: "MessageCircle"
11576
- }, {
11577
- id: 6,
11578
- name: t('Ngôn ngữ'),
11579
- icon: "Flag"
11580
- }, {
11581
- id: 7,
11582
- name: t('Tiện ích'),
11583
- icon: "BookOpen"
11584
- }]);
11527
+ const [dataSettingGroup, setDataSettingGroup] = React.useState([]);
11528
+ //Load data of group config and setting by group
11529
+ React.useEffect(() => {
11530
+ GetSettingGroup((data) => {
11531
+ setDataSettingGroup(data);
11532
+ });
11533
+ }, []);
11585
11534
  //Sự kiện chọn nhóm cài đặt
11586
11535
  const switchSettingTab = (data) => {
11587
11536
  const updated = dataSettingGroup.map((item) => ({
@@ -11614,8 +11563,6 @@ const SettingApp = (props) => {
11614
11563
  return (jsxRuntime.jsx("div", { className: "date-input", title: data.description, children: jsxRuntime.jsx(Input$1, { type: "time", className: "t-right input-custom" }) }, data.id));
11615
11564
  case "datetime":
11616
11565
  return (jsxRuntime.jsx("div", { className: "date-input", title: data.description, children: jsxRuntime.jsx(Input$1, { type: "datetime", className: "t-right input-custom" }) }, data.id));
11617
- case "slider":
11618
- return (jsxRuntime.jsx("div", { className: "slider", title: data.description }, data.id));
11619
11566
  case "image":
11620
11567
  case "file":
11621
11568
  return (jsxRuntime.jsx("div", { className: "file-input", title: data.description, children: jsxRuntime.jsx(Input$1, { type: "file", className: "input-custom" }) }, data.id));