@fctc/interface-logic 2.9.8 → 3.0.0

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/configs.mjs CHANGED
@@ -2170,7 +2170,7 @@ var sessionStorageUtils = () => {
2170
2170
  service: ""
2171
2171
  };
2172
2172
  };
2173
- const setMenuFocus2 = (menuTree) => {
2173
+ const setMenuFocus = (menuTree) => {
2174
2174
  sessionStorage.setItem("menuFocus", JSON.stringify({ ...menuTree }));
2175
2175
  };
2176
2176
  const getActionData = () => {
@@ -2193,7 +2193,7 @@ var sessionStorageUtils = () => {
2193
2193
  };
2194
2194
  return {
2195
2195
  getMenuFocus,
2196
- setMenuFocus: setMenuFocus2,
2196
+ setMenuFocus,
2197
2197
  setActionData,
2198
2198
  getActionData,
2199
2199
  getViewData,
@@ -2202,944 +2202,6 @@ var sessionStorageUtils = () => {
2202
2202
  };
2203
2203
  };
2204
2204
 
2205
- // src/provider/react-query-provider.tsx
2206
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
2207
- import { jsx } from "react/jsx-runtime";
2208
-
2209
- // src/provider/redux-provider.tsx
2210
- import { Provider } from "react-redux";
2211
-
2212
- // src/store/index.ts
2213
- import { useDispatch, useSelector } from "react-redux";
2214
-
2215
- // src/store/reducers/breadcrums-slice/index.ts
2216
- import { createSlice } from "@reduxjs/toolkit";
2217
- var initialState = {
2218
- breadCrumbs: []
2219
- };
2220
- var breadcrumbsSlice = createSlice({
2221
- name: "breadcrumbs",
2222
- initialState,
2223
- reducers: {
2224
- setBreadCrumbs: (state, action) => {
2225
- state.breadCrumbs = [...state.breadCrumbs, action.payload];
2226
- }
2227
- }
2228
- });
2229
- var { setBreadCrumbs } = breadcrumbsSlice.actions;
2230
- var breadcrums_slice_default = breadcrumbsSlice.reducer;
2231
-
2232
- // src/store/reducers/env-slice/index.ts
2233
- import { createSlice as createSlice2 } from "@reduxjs/toolkit";
2234
- var initialState2 = {
2235
- baseUrl: "",
2236
- companies: [],
2237
- user: {},
2238
- db: "",
2239
- refreshTokenEndpoint: "",
2240
- config: null,
2241
- envFile: null,
2242
- requests: null,
2243
- defaultCompany: {
2244
- id: null,
2245
- logo: "",
2246
- secondary_color: "",
2247
- primary_color: ""
2248
- },
2249
- context: {
2250
- uid: null,
2251
- allowed_company_ids: [],
2252
- lang: "vi_VN",
2253
- tz: "Asia/Saigon"
2254
- }
2255
- };
2256
- var envSlice = createSlice2({
2257
- name: "env",
2258
- initialState: initialState2,
2259
- reducers: {
2260
- setEnv: (state, action) => {
2261
- Object.assign(state, action.payload);
2262
- },
2263
- setUid: (state, action) => {
2264
- state.context.uid = action.payload;
2265
- },
2266
- setAllowCompanies: (state, action) => {
2267
- state.context.allowed_company_ids = action.payload;
2268
- },
2269
- setCompanies: (state, action) => {
2270
- state.companies = action.payload;
2271
- },
2272
- setDefaultCompany: (state, action) => {
2273
- state.defaultCompany = action.payload;
2274
- },
2275
- setLang: (state, action) => {
2276
- state.context.lang = action.payload;
2277
- },
2278
- setUser: (state, action) => {
2279
- state.user = action.payload;
2280
- },
2281
- setConfig: (state, action) => {
2282
- state.config = action.payload;
2283
- },
2284
- setEnvFile: (state, action) => {
2285
- state.envFile = action.payload;
2286
- }
2287
- }
2288
- });
2289
- var {
2290
- setEnv,
2291
- setUid,
2292
- setLang,
2293
- setAllowCompanies,
2294
- setCompanies,
2295
- setDefaultCompany,
2296
- setUser,
2297
- setConfig,
2298
- setEnvFile
2299
- } = envSlice.actions;
2300
- var env_slice_default = envSlice.reducer;
2301
-
2302
- // src/store/reducers/excel-slice/index.ts
2303
- import { createSlice as createSlice3 } from "@reduxjs/toolkit";
2304
- var initialState3 = {
2305
- dataParse: null,
2306
- idFile: null,
2307
- isFileLoaded: false,
2308
- loadingImport: false,
2309
- selectedFile: null,
2310
- errorData: null
2311
- };
2312
- var excelSlice = createSlice3({
2313
- name: "excel",
2314
- initialState: initialState3,
2315
- reducers: {
2316
- setDataParse: (state, action) => {
2317
- state.dataParse = action.payload;
2318
- },
2319
- setIdFile: (state, action) => {
2320
- state.idFile = action.payload;
2321
- },
2322
- setIsFileLoaded: (state, action) => {
2323
- state.isFileLoaded = action.payload;
2324
- },
2325
- setLoadingImport: (state, action) => {
2326
- state.loadingImport = action.payload;
2327
- },
2328
- setSelectedFile: (state, action) => {
2329
- state.selectedFile = action.payload;
2330
- },
2331
- setErrorData: (state, action) => {
2332
- state.errorData = action.payload;
2333
- }
2334
- }
2335
- });
2336
- var {
2337
- setDataParse,
2338
- setIdFile,
2339
- setIsFileLoaded,
2340
- setLoadingImport,
2341
- setSelectedFile,
2342
- setErrorData
2343
- } = excelSlice.actions;
2344
- var excel_slice_default = excelSlice.reducer;
2345
-
2346
- // src/store/reducers/form-slice/index.ts
2347
- import { createSlice as createSlice4 } from "@reduxjs/toolkit";
2348
- var initialState4 = {
2349
- viewDataStore: {},
2350
- isShowingModalDetail: false,
2351
- isShowModalTranslate: false,
2352
- formSubmitComponent: {},
2353
- fieldTranslation: null,
2354
- listSubject: {},
2355
- dataUser: {}
2356
- };
2357
- var formSlice = createSlice4({
2358
- name: "form",
2359
- initialState: initialState4,
2360
- reducers: {
2361
- setViewDataStore: (state, action) => {
2362
- state.viewDataStore = action.payload;
2363
- },
2364
- setIsShowingModalDetail: (state, action) => {
2365
- state.isShowingModalDetail = action.payload;
2366
- },
2367
- setIsShowModalTranslate: (state, action) => {
2368
- state.isShowModalTranslate = action.payload;
2369
- },
2370
- setFormSubmitComponent: (state, action) => {
2371
- state.formSubmitComponent[action.payload.key] = action.payload.component;
2372
- },
2373
- setFieldTranslate: (state, action) => {
2374
- state.fieldTranslation = action.payload;
2375
- },
2376
- setListSubject: (state, action) => {
2377
- state.listSubject = action.payload;
2378
- },
2379
- setDataUser: (state, action) => {
2380
- state.dataUser = action.payload;
2381
- }
2382
- }
2383
- });
2384
- var {
2385
- setViewDataStore,
2386
- setIsShowingModalDetail,
2387
- setIsShowModalTranslate,
2388
- setFormSubmitComponent,
2389
- setFieldTranslate,
2390
- setListSubject,
2391
- setDataUser
2392
- } = formSlice.actions;
2393
- var form_slice_default = formSlice.reducer;
2394
-
2395
- // src/store/reducers/header-slice/index.ts
2396
- import { createSlice as createSlice5 } from "@reduxjs/toolkit";
2397
- var headerSlice = createSlice5({
2398
- name: "header",
2399
- initialState: {
2400
- value: { allowedCompanyIds: [] }
2401
- },
2402
- reducers: {
2403
- setHeader: (state, action) => {
2404
- state.value = { ...state.value, ...action.payload };
2405
- },
2406
- setAllowedCompanyIds: (state, action) => {
2407
- state.value.allowedCompanyIds = action.payload;
2408
- }
2409
- }
2410
- });
2411
- var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
2412
- var header_slice_default = headerSlice.reducer;
2413
-
2414
- // src/store/reducers/list-slice/index.ts
2415
- import { createSlice as createSlice6 } from "@reduxjs/toolkit";
2416
- var initialState5 = {
2417
- pageLimit: 10,
2418
- fields: {},
2419
- order: "",
2420
- selectedRowKeys: [],
2421
- selectedRadioKey: 0,
2422
- indexRowTableModal: -2,
2423
- isUpdateTableModal: false,
2424
- footerGroupTable: {},
2425
- transferDetail: null,
2426
- page: 0,
2427
- domainTable: []
2428
- };
2429
- var listSlice = createSlice6({
2430
- name: "list",
2431
- initialState: initialState5,
2432
- reducers: {
2433
- setPageLimit: (state, action) => {
2434
- state.pageLimit = action.payload;
2435
- },
2436
- setFields: (state, action) => {
2437
- state.fields = action.payload;
2438
- },
2439
- setOrder: (state, action) => {
2440
- state.order = action.payload;
2441
- },
2442
- setSelectedRowKeys: (state, action) => {
2443
- state.selectedRowKeys = action.payload;
2444
- },
2445
- setSelectedRadioKey: (state, action) => {
2446
- state.selectedRadioKey = action.payload;
2447
- },
2448
- setIndexRowTableModal: (state, action) => {
2449
- state.indexRowTableModal = action.payload;
2450
- },
2451
- setTransferDetail: (state, action) => {
2452
- state.transferDetail = action.payload;
2453
- },
2454
- setIsUpdateTableModal: (state, action) => {
2455
- state.isUpdateTableModal = action.payload;
2456
- },
2457
- setPage: (state, action) => {
2458
- state.page = action.payload;
2459
- },
2460
- setDomainTable: (state, action) => {
2461
- state.domainTable = action.payload;
2462
- }
2463
- }
2464
- });
2465
- var {
2466
- setPageLimit,
2467
- setFields,
2468
- setOrder,
2469
- setSelectedRowKeys,
2470
- setIndexRowTableModal,
2471
- setIsUpdateTableModal,
2472
- setPage,
2473
- setSelectedRadioKey,
2474
- setTransferDetail,
2475
- setDomainTable
2476
- } = listSlice.actions;
2477
- var list_slice_default = listSlice.reducer;
2478
-
2479
- // src/store/reducers/login-slice/index.ts
2480
- import { createSlice as createSlice7 } from "@reduxjs/toolkit";
2481
- var initialState6 = {
2482
- db: "",
2483
- redirectTo: "/",
2484
- forgotPasswordUrl: "/"
2485
- };
2486
- var loginSlice = createSlice7({
2487
- name: "login",
2488
- initialState: initialState6,
2489
- reducers: {
2490
- setDb: (state, action) => {
2491
- state.db = action.payload;
2492
- },
2493
- setRedirectTo: (state, action) => {
2494
- state.redirectTo = action.payload;
2495
- },
2496
- setForgotPasswordUrl: (state, action) => {
2497
- state.forgotPasswordUrl = action.payload;
2498
- }
2499
- }
2500
- });
2501
- var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
2502
- var login_slice_default = loginSlice.reducer;
2503
-
2504
- // src/store/reducers/navbar-slice/index.ts
2505
- import { createSlice as createSlice8 } from "@reduxjs/toolkit";
2506
- var initialState7 = {
2507
- menuFocus: {},
2508
- menuAction: {},
2509
- navbarWidth: 250,
2510
- menuList: []
2511
- };
2512
- var navbarSlice = createSlice8({
2513
- name: "navbar",
2514
- initialState: initialState7,
2515
- reducers: {
2516
- setMenuFocus: (state, action) => {
2517
- state.menuFocus = action.payload;
2518
- },
2519
- setMenuFocusAction: (state, action) => {
2520
- state.menuAction = action.payload;
2521
- },
2522
- setNavbarWidth: (state, action) => {
2523
- state.navbarWidth = action.payload;
2524
- },
2525
- setMenuList: (state, action) => {
2526
- state.menuList = action.payload;
2527
- }
2528
- }
2529
- });
2530
- var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSlice.actions;
2531
- var navbar_slice_default = navbarSlice.reducer;
2532
-
2533
- // src/store/reducers/profile-slice/index.ts
2534
- import { createSlice as createSlice9 } from "@reduxjs/toolkit";
2535
- var initialState8 = {
2536
- profile: {}
2537
- };
2538
- var profileSlice = createSlice9({
2539
- name: "profile",
2540
- initialState: initialState8,
2541
- reducers: {
2542
- setProfile: (state, action) => {
2543
- state.profile = action.payload;
2544
- }
2545
- }
2546
- });
2547
- var { setProfile } = profileSlice.actions;
2548
- var profile_slice_default = profileSlice.reducer;
2549
-
2550
- // src/store/reducers/search-slice/index.ts
2551
- import { createSlice as createSlice10 } from "@reduxjs/toolkit";
2552
- var initialState9 = {
2553
- groupByDomain: null,
2554
- searchBy: [],
2555
- searchString: "",
2556
- hoveredIndexSearchList: null,
2557
- selectedTags: [],
2558
- firstDomain: null,
2559
- searchMap: {},
2560
- filterBy: [],
2561
- groupBy: []
2562
- };
2563
- var searchSlice = createSlice10({
2564
- name: "search",
2565
- initialState: initialState9,
2566
- reducers: {
2567
- setGroupByDomain: (state, action) => {
2568
- state.groupByDomain = action.payload;
2569
- },
2570
- setSearchBy: (state, action) => {
2571
- state.searchBy = action.payload;
2572
- },
2573
- setSearchString: (state, action) => {
2574
- state.searchString = action.payload;
2575
- },
2576
- setHoveredIndexSearchList: (state, action) => {
2577
- state.hoveredIndexSearchList = action.payload;
2578
- },
2579
- setSelectedTags: (state, action) => {
2580
- state.selectedTags = action.payload;
2581
- },
2582
- setFirstDomain: (state, action) => {
2583
- state.firstDomain = action.payload;
2584
- },
2585
- setFilterBy: (state, action) => {
2586
- state.filterBy = action.payload;
2587
- },
2588
- setGroupBy: (state, action) => {
2589
- state.groupBy = action.payload;
2590
- },
2591
- setSearchMap: (state, action) => {
2592
- state.searchMap = action.payload;
2593
- },
2594
- updateSearchMap: (state, action) => {
2595
- if (!state.searchMap[action.payload.key]) {
2596
- state.searchMap[action.payload.key] = [];
2597
- }
2598
- state.searchMap[action.payload.key].push(action.payload.value);
2599
- },
2600
- removeKeyFromSearchMap: (state, action) => {
2601
- const { key, item } = action.payload;
2602
- const values = state.searchMap[key];
2603
- if (!values) return;
2604
- if (item) {
2605
- const filtered = values.filter((value) => value.name !== item.name);
2606
- if (filtered.length > 0) {
2607
- state.searchMap[key] = filtered;
2608
- } else {
2609
- delete state.searchMap[key];
2610
- }
2611
- } else {
2612
- delete state.searchMap[key];
2613
- }
2614
- },
2615
- clearSearchMap: (state) => {
2616
- state.searchMap = {};
2617
- }
2618
- }
2619
- });
2620
- var {
2621
- setGroupByDomain,
2622
- setSelectedTags,
2623
- setSearchString,
2624
- setHoveredIndexSearchList,
2625
- setFirstDomain,
2626
- setSearchBy,
2627
- setFilterBy,
2628
- setSearchMap,
2629
- updateSearchMap,
2630
- removeKeyFromSearchMap,
2631
- setGroupBy,
2632
- clearSearchMap
2633
- } = searchSlice.actions;
2634
- var search_slice_default = searchSlice.reducer;
2635
-
2636
- // src/store/store.ts
2637
- import { configureStore } from "@reduxjs/toolkit";
2638
-
2639
- // node_modules/redux/dist/redux.mjs
2640
- function formatProdErrorMessage(code) {
2641
- return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
2642
- }
2643
- var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
2644
- var ActionTypes = {
2645
- INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
2646
- REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
2647
- PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
2648
- };
2649
- var actionTypes_default = ActionTypes;
2650
- function isPlainObject(obj) {
2651
- if (typeof obj !== "object" || obj === null)
2652
- return false;
2653
- let proto = obj;
2654
- while (Object.getPrototypeOf(proto) !== null) {
2655
- proto = Object.getPrototypeOf(proto);
2656
- }
2657
- return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
2658
- }
2659
- function miniKindOf(val) {
2660
- if (val === void 0)
2661
- return "undefined";
2662
- if (val === null)
2663
- return "null";
2664
- const type = typeof val;
2665
- switch (type) {
2666
- case "boolean":
2667
- case "string":
2668
- case "number":
2669
- case "symbol":
2670
- case "function": {
2671
- return type;
2672
- }
2673
- }
2674
- if (Array.isArray(val))
2675
- return "array";
2676
- if (isDate(val))
2677
- return "date";
2678
- if (isError(val))
2679
- return "error";
2680
- const constructorName = ctorName(val);
2681
- switch (constructorName) {
2682
- case "Symbol":
2683
- case "Promise":
2684
- case "WeakMap":
2685
- case "WeakSet":
2686
- case "Map":
2687
- case "Set":
2688
- return constructorName;
2689
- }
2690
- return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
2691
- }
2692
- function ctorName(val) {
2693
- return typeof val.constructor === "function" ? val.constructor.name : null;
2694
- }
2695
- function isError(val) {
2696
- return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
2697
- }
2698
- function isDate(val) {
2699
- if (val instanceof Date)
2700
- return true;
2701
- return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
2702
- }
2703
- function kindOf(val) {
2704
- let typeOfVal = typeof val;
2705
- if (process.env.NODE_ENV !== "production") {
2706
- typeOfVal = miniKindOf(val);
2707
- }
2708
- return typeOfVal;
2709
- }
2710
- function warning(message) {
2711
- if (typeof console !== "undefined" && typeof console.error === "function") {
2712
- console.error(message);
2713
- }
2714
- try {
2715
- throw new Error(message);
2716
- } catch (e) {
2717
- }
2718
- }
2719
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
2720
- const reducerKeys = Object.keys(reducers);
2721
- const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
2722
- if (reducerKeys.length === 0) {
2723
- return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
2724
- }
2725
- if (!isPlainObject(inputState)) {
2726
- return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
2727
- }
2728
- const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
2729
- unexpectedKeys.forEach((key) => {
2730
- unexpectedKeyCache[key] = true;
2731
- });
2732
- if (action && action.type === actionTypes_default.REPLACE)
2733
- return;
2734
- if (unexpectedKeys.length > 0) {
2735
- return `Unexpected ${unexpectedKeys.length > 1 ? "keys" : "key"} "${unexpectedKeys.join('", "')}" found in ${argumentName}. Expected to find one of the known reducer keys instead: "${reducerKeys.join('", "')}". Unexpected keys will be ignored.`;
2736
- }
2737
- }
2738
- function assertReducerShape(reducers) {
2739
- Object.keys(reducers).forEach((key) => {
2740
- const reducer = reducers[key];
2741
- const initialState10 = reducer(void 0, {
2742
- type: actionTypes_default.INIT
2743
- });
2744
- if (typeof initialState10 === "undefined") {
2745
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : `The slice reducer for key "${key}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);
2746
- }
2747
- if (typeof reducer(void 0, {
2748
- type: actionTypes_default.PROBE_UNKNOWN_ACTION()
2749
- }) === "undefined") {
2750
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : `The slice reducer for key "${key}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);
2751
- }
2752
- });
2753
- }
2754
- function combineReducers(reducers) {
2755
- const reducerKeys = Object.keys(reducers);
2756
- const finalReducers = {};
2757
- for (let i = 0; i < reducerKeys.length; i++) {
2758
- const key = reducerKeys[i];
2759
- if (process.env.NODE_ENV !== "production") {
2760
- if (typeof reducers[key] === "undefined") {
2761
- warning(`No reducer provided for key "${key}"`);
2762
- }
2763
- }
2764
- if (typeof reducers[key] === "function") {
2765
- finalReducers[key] = reducers[key];
2766
- }
2767
- }
2768
- const finalReducerKeys = Object.keys(finalReducers);
2769
- let unexpectedKeyCache;
2770
- if (process.env.NODE_ENV !== "production") {
2771
- unexpectedKeyCache = {};
2772
- }
2773
- let shapeAssertionError;
2774
- try {
2775
- assertReducerShape(finalReducers);
2776
- } catch (e) {
2777
- shapeAssertionError = e;
2778
- }
2779
- return function combination(state = {}, action) {
2780
- if (shapeAssertionError) {
2781
- throw shapeAssertionError;
2782
- }
2783
- if (process.env.NODE_ENV !== "production") {
2784
- const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
2785
- if (warningMessage) {
2786
- warning(warningMessage);
2787
- }
2788
- }
2789
- let hasChanged = false;
2790
- const nextState = {};
2791
- for (let i = 0; i < finalReducerKeys.length; i++) {
2792
- const key = finalReducerKeys[i];
2793
- const reducer = finalReducers[key];
2794
- const previousStateForKey = state[key];
2795
- const nextStateForKey = reducer(previousStateForKey, action);
2796
- if (typeof nextStateForKey === "undefined") {
2797
- const actionType = action && action.type;
2798
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(14) : `When called with an action of type ${actionType ? `"${String(actionType)}"` : "(unknown type)"}, the slice reducer for key "${key}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);
2799
- }
2800
- nextState[key] = nextStateForKey;
2801
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
2802
- }
2803
- hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
2804
- return hasChanged ? nextState : state;
2805
- };
2806
- }
2807
-
2808
- // src/store/store.ts
2809
- var rootReducer = combineReducers({
2810
- env: env_slice_default,
2811
- header: header_slice_default,
2812
- navbar: navbar_slice_default,
2813
- list: list_slice_default,
2814
- search: search_slice_default,
2815
- form: form_slice_default,
2816
- breadcrumbs: breadcrums_slice_default,
2817
- login: login_slice_default,
2818
- excel: excel_slice_default,
2819
- profile: profile_slice_default
2820
- });
2821
- var envStore = configureStore({
2822
- reducer: rootReducer,
2823
- middleware: (getDefaultMiddleware) => getDefaultMiddleware({
2824
- serializableCheck: false
2825
- })
2826
- });
2827
-
2828
- // src/provider/redux-provider.tsx
2829
- import { jsx as jsx2 } from "react/jsx-runtime";
2830
-
2831
- // src/provider/main-provider.tsx
2832
- import { jsx as jsx3 } from "react/jsx-runtime";
2833
-
2834
- // src/provider/version-gate-provider.tsx
2835
- import { useEffect as useEffect2, useState as useState2 } from "react";
2836
- import { useQueryClient } from "@tanstack/react-query";
2837
-
2838
- // src/services/action-service/index.ts
2839
- import { useCallback } from "react";
2840
-
2841
- // src/services/auth-service/index.ts
2842
- import { useCallback as useCallback2 } from "react";
2843
-
2844
- // src/services/company-service/index.ts
2845
- import { useCallback as useCallback3 } from "react";
2846
-
2847
- // src/services/excel-service/index.ts
2848
- import { useCallback as useCallback4 } from "react";
2849
-
2850
- // src/services/form-service/index.ts
2851
- import { useCallback as useCallback5 } from "react";
2852
-
2853
- // src/services/kanban-service/index.ts
2854
- import { useCallback as useCallback6 } from "react";
2855
-
2856
- // src/services/model-service/index.ts
2857
- import { useCallback as useCallback7 } from "react";
2858
-
2859
- // src/services/user-service/index.ts
2860
- import { useCallback as useCallback8 } from "react";
2861
-
2862
- // src/services/view-service/index.ts
2863
- import { useCallback as useCallback9 } from "react";
2864
-
2865
- // src/provider/version-gate-provider.tsx
2866
- import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
2867
-
2868
- // src/provider/env-provider.tsx
2869
- import { createContext, useContext, useState as useState3, useCallback as useCallback10 } from "react";
2870
- import { jsx as jsx5 } from "react/jsx-runtime";
2871
- var EnvContext = createContext(null);
2872
- function useEnv() {
2873
- const context = useContext(EnvContext);
2874
- if (!context) {
2875
- throw new Error("useEnv must be used within an EnvProvider");
2876
- }
2877
- return context;
2878
- }
2879
-
2880
- // src/provider/service-provider.tsx
2881
- import { createContext as createContext2, useContext as useContext2 } from "react";
2882
-
2883
- // src/hooks/auth/use-forgot-password.ts
2884
- import { useMutation } from "@tanstack/react-query";
2885
-
2886
- // src/hooks/auth/use-forgotpassword-sso.ts
2887
- import { useMutation as useMutation2 } from "@tanstack/react-query";
2888
-
2889
- // src/hooks/auth/use-get-provider.ts
2890
- import { useMutation as useMutation3 } from "@tanstack/react-query";
2891
-
2892
- // src/hooks/auth/use-isvalid-token.ts
2893
- import { useMutation as useMutation4 } from "@tanstack/react-query";
2894
-
2895
- // src/hooks/auth/use-login-credential.tsx
2896
- import { useMutation as useMutation5 } from "@tanstack/react-query";
2897
-
2898
- // src/hooks/auth/use-login-socical.ts
2899
- import { useMutation as useMutation6 } from "@tanstack/react-query";
2900
-
2901
- // src/hooks/auth/use-reset-password.ts
2902
- import { useMutation as useMutation7 } from "@tanstack/react-query";
2903
-
2904
- // src/hooks/auth/use-reset-password-sso.ts
2905
- import { useMutation as useMutation8 } from "@tanstack/react-query";
2906
-
2907
- // src/hooks/auth/use-update-password.ts
2908
- import { useMutation as useMutation9 } from "@tanstack/react-query";
2909
-
2910
- // src/hooks/auth/use-logout.ts
2911
- import { useMutation as useMutation10 } from "@tanstack/react-query";
2912
-
2913
- // src/hooks/auth/use-get-access-by-code.ts
2914
- import { useMutation as useMutation11 } from "@tanstack/react-query";
2915
-
2916
- // src/hooks/auth/use-validate-action-token.ts
2917
- import { useMutation as useMutation12 } from "@tanstack/react-query";
2918
-
2919
- // src/hooks/company/use-get-company-info.ts
2920
- import { useMutation as useMutation13 } from "@tanstack/react-query";
2921
-
2922
- // src/hooks/company/use-get-current-company.ts
2923
- import { useMutation as useMutation14 } from "@tanstack/react-query";
2924
-
2925
- // src/hooks/company/use-get-list-company.ts
2926
- import { useQuery } from "@tanstack/react-query";
2927
-
2928
- // src/hooks/excel/use-export-excel.ts
2929
- import { useMutation as useMutation15 } from "@tanstack/react-query";
2930
-
2931
- // src/hooks/excel/use-get-field-export.ts
2932
- import { useMutation as useMutation16 } from "@tanstack/react-query";
2933
-
2934
- // src/hooks/excel/use-get-file-excel.ts
2935
- import { useQuery as useQuery2 } from "@tanstack/react-query";
2936
-
2937
- // src/hooks/excel/use-parse-preview.ts
2938
- import { useMutation as useMutation17 } from "@tanstack/react-query";
2939
-
2940
- // src/hooks/excel/use-upload-file-excel.ts
2941
- import { useMutation as useMutation18 } from "@tanstack/react-query";
2942
-
2943
- // src/hooks/excel/use-upload-id-file.ts
2944
- import { useMutation as useMutation19 } from "@tanstack/react-query";
2945
-
2946
- // src/hooks/excel/uss-execute-import.ts
2947
- import { useMutation as useMutation20 } from "@tanstack/react-query";
2948
-
2949
- // src/hooks/form/use-change-status.ts
2950
- import { useMutation as useMutation21 } from "@tanstack/react-query";
2951
-
2952
- // src/hooks/form/use-delete-comment.ts
2953
- import { useMutation as useMutation22 } from "@tanstack/react-query";
2954
-
2955
- // src/hooks/form/use-get-comment.ts
2956
- import { useQuery as useQuery3 } from "@tanstack/react-query";
2957
-
2958
- // src/hooks/form/use-get-form-view.ts
2959
- import { useQuery as useQuery4 } from "@tanstack/react-query";
2960
-
2961
- // src/hooks/form/use-get-image.ts
2962
- import { useQuery as useQuery5 } from "@tanstack/react-query";
2963
-
2964
- // src/hooks/form/use-send-comment.ts
2965
- import { useMutation as useMutation23 } from "@tanstack/react-query";
2966
-
2967
- // src/hooks/form/use-upload-image.ts
2968
- import { useMutation as useMutation24 } from "@tanstack/react-query";
2969
-
2970
- // src/hooks/form/use-upload-file.ts
2971
- import { useMutation as useMutation25 } from "@tanstack/react-query";
2972
-
2973
- // src/hooks/model/use-delete.ts
2974
- import { useMutation as useMutation26 } from "@tanstack/react-query";
2975
-
2976
- // src/hooks/model/use-get-all.ts
2977
- import { useQuery as useQuery6 } from "@tanstack/react-query";
2978
-
2979
- // src/hooks/model/use-get-conversion-rate.ts
2980
- import { useQuery as useQuery7 } from "@tanstack/react-query";
2981
-
2982
- // src/hooks/model/use-get-currency.ts
2983
- import { useQuery as useQuery8 } from "@tanstack/react-query";
2984
-
2985
- // src/hooks/model/use-get-detail.ts
2986
- import { useMutation as useMutation27 } from "@tanstack/react-query";
2987
-
2988
- // src/hooks/model/use-get-field-onchange.ts
2989
- import { useQuery as useQuery9 } from "@tanstack/react-query";
2990
-
2991
- // src/hooks/model/use-get-list-my-bank-account.ts
2992
- import { useQuery as useQuery10 } from "@tanstack/react-query";
2993
-
2994
- // src/hooks/model/use-onchange-form.ts
2995
- import { useMutation as useMutation28 } from "@tanstack/react-query";
2996
-
2997
- // src/hooks/model/use-save.ts
2998
- import { useMutation as useMutation29 } from "@tanstack/react-query";
2999
-
3000
- // src/hooks/user/use-get-profile.ts
3001
- import { useMutation as useMutation30 } from "@tanstack/react-query";
3002
-
3003
- // src/hooks/user/use-get-user.ts
3004
- import { useMutation as useMutation31 } from "@tanstack/react-query";
3005
-
3006
- // src/hooks/user/use-switch-locale.ts
3007
- import { useMutation as useMutation32 } from "@tanstack/react-query";
3008
-
3009
- // src/hooks/view/use-button.ts
3010
- import { useMutation as useMutation33 } from "@tanstack/react-query";
3011
-
3012
- // src/hooks/view/use-duplicate-record.ts
3013
- import { useMutation as useMutation34 } from "@tanstack/react-query";
3014
-
3015
- // src/hooks/view/use-get-action-detail.ts
3016
- import { useQuery as useQuery11 } from "@tanstack/react-query";
3017
-
3018
- // src/hooks/view/use-get-calendar.ts
3019
- import { useQuery as useQuery12 } from "@tanstack/react-query";
3020
-
3021
- // src/hooks/view/use-get-groups.ts
3022
- import { useQuery as useQuery13 } from "@tanstack/react-query";
3023
-
3024
- // src/hooks/view/use-get-list-data.ts
3025
- import { useQuery as useQuery14 } from "@tanstack/react-query";
3026
-
3027
- // src/hooks/view/use-get-menu.ts
3028
- import { useQuery as useQuery15 } from "@tanstack/react-query";
3029
-
3030
- // src/hooks/view/use-get-print-report.ts
3031
- import { useMutation as useMutation35 } from "@tanstack/react-query";
3032
-
3033
- // src/hooks/view/use-get-progress-bar.ts
3034
- import { useQuery as useQuery16 } from "@tanstack/react-query";
3035
-
3036
- // src/hooks/view/use-get-selection.ts
3037
- import { useQuery as useQuery17 } from "@tanstack/react-query";
3038
-
3039
- // src/hooks/view/use-get-view.ts
3040
- import { useQuery as useQuery18 } from "@tanstack/react-query";
3041
-
3042
- // src/hooks/view/use-load-action.ts
3043
- import { useMutation as useMutation36 } from "@tanstack/react-query";
3044
-
3045
- // src/hooks/view/use-load-message.ts
3046
- import { useQuery as useQuery19 } from "@tanstack/react-query";
3047
-
3048
- // src/hooks/view/use-print.ts
3049
- import { useMutation as useMutation37 } from "@tanstack/react-query";
3050
-
3051
- // src/hooks/view/use-remove-row.ts
3052
- import { useMutation as useMutation38 } from "@tanstack/react-query";
3053
-
3054
- // src/hooks/view/use-resequence.ts
3055
- import { useQuery as useQuery20 } from "@tanstack/react-query";
3056
-
3057
- // src/hooks/view/use-run-action.ts
3058
- import { useMutation as useMutation39 } from "@tanstack/react-query";
3059
-
3060
- // src/hooks/view/use-signin-sso.ts
3061
- import { useMutation as useMutation40 } from "@tanstack/react-query";
3062
-
3063
- // src/hooks/view/use-verify-2FA.ts
3064
- import { useMutation as useMutation41 } from "@tanstack/react-query";
3065
-
3066
- // src/hooks/view/uset-get-2FA-method.ts
3067
- import { useMutation as useMutation42 } from "@tanstack/react-query";
3068
-
3069
- // src/hooks/view/use-grant-access.ts
3070
- import { useMutation as useMutation43 } from "@tanstack/react-query";
3071
-
3072
- // src/hooks/view/use-remove-totp-setup.ts
3073
- import { useMutation as useMutation44 } from "@tanstack/react-query";
3074
-
3075
- // src/hooks/view/use-request-setup-totp.ts
3076
- import { useMutation as useMutation45 } from "@tanstack/react-query";
3077
-
3078
- // src/hooks/view/use-settings-web-read-2fa.ts
3079
- import { useMutation as useMutation46 } from "@tanstack/react-query";
3080
-
3081
- // src/hooks/view/use-verify-totp.ts
3082
- import { useMutation as useMutation47 } from "@tanstack/react-query";
3083
-
3084
- // src/hooks/view/use-get-a-session.ts
3085
- import { useMutation as useMutation48 } from "@tanstack/react-query";
3086
-
3087
- // src/hooks/view/use-update-closed-session.ts
3088
- import { useMutation as useMutation49 } from "@tanstack/react-query";
3089
-
3090
- // src/hooks/view/use-manage-session.ts
3091
- import { useMutation as useMutation50 } from "@tanstack/react-query";
3092
-
3093
- // src/hooks/view/use-handle-closing-session.ts
3094
- import { useMutation as useMutation51 } from "@tanstack/react-query";
3095
-
3096
- // src/hooks/view/use-create-session.ts
3097
- import { useMutation as useMutation52 } from "@tanstack/react-query";
3098
-
3099
- // src/hooks/view/use-get-pos.ts
3100
- import { useMutation as useMutation53 } from "@tanstack/react-query";
3101
-
3102
- // src/hooks/view/use-create-entity.ts
3103
- import { useMutation as useMutation54 } from "@tanstack/react-query";
3104
-
3105
- // src/hooks/view/use-get-list.ts
3106
- import { useMutation as useMutation55 } from "@tanstack/react-query";
3107
-
3108
- // src/hooks/view/use-update-entity.ts
3109
- import { useMutation as useMutation56 } from "@tanstack/react-query";
3110
-
3111
- // src/hooks/view/use-delete-entity.ts
3112
- import { useMutation as useMutation57 } from "@tanstack/react-query";
3113
-
3114
- // src/hooks/view/use-load-data-pos-session.ts
3115
- import { useMutation as useMutation58 } from "@tanstack/react-query";
3116
-
3117
- // src/hooks/view/use-manage-on-change.ts
3118
- import { useMutation as useMutation59 } from "@tanstack/react-query";
3119
-
3120
- // src/hooks/view/use-gen-serial-number.ts
3121
- import { useMutation as useMutation60 } from "@tanstack/react-query";
3122
-
3123
- // src/hooks/view/use-get-order-line.ts
3124
- import { useMutation as useMutation61 } from "@tanstack/react-query";
3125
-
3126
- // src/hooks/view/use-get-product-image.ts
3127
- import { useMutation as useMutation62 } from "@tanstack/react-query";
3128
-
3129
- // src/hooks/view/use-add-entity.ts
3130
- import { useMutation as useMutation63 } from "@tanstack/react-query";
3131
-
3132
- // src/hooks/view/use-check-payment.ts
3133
- import { useMutation as useMutation64 } from "@tanstack/react-query";
3134
-
3135
- // src/provider/service-provider.tsx
3136
- import { jsx as jsx6 } from "react/jsx-runtime";
3137
- var ServiceContext = createContext2(null);
3138
-
3139
- // src/provider/meta-provider.tsx
3140
- import { useEffect as useEffect3 } from "react";
3141
- import { Fragment as Fragment2, jsx as jsx7 } from "react/jsx-runtime";
3142
-
3143
2205
  // src/configs/axios-client.ts
3144
2206
  var axiosClient = {
3145
2207
  init(config) {
@@ -3149,9 +2211,8 @@ var axiosClient = {
3149
2211
  const database = config?.config?.database;
3150
2212
  let isRefreshing = false;
3151
2213
  let failedQueue = [];
3152
- const { env } = useEnv();
3153
2214
  const xNode = config?.xNode;
3154
- const service = sessionStorageUtils().getMenuFocus().service || env?.default_service;
2215
+ const service = sessionStorage2.getMenuFocus().service || config?.default_service;
3155
2216
  const processQueue = (error, token = null) => {
3156
2217
  failedQueue?.forEach((prom) => {
3157
2218
  if (error) {
@@ -3162,7 +2223,6 @@ var axiosClient = {
3162
2223
  });
3163
2224
  failedQueue = [];
3164
2225
  };
3165
- console.log("config", config, service);
3166
2226
  const instance = axios.create({
3167
2227
  adapter: axios.defaults.adapter,
3168
2228
  baseURL: config?.baseUrl,