@fctc/interface-logic 1.9.1 → 1.9.2
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/environment.d.mts +33 -23
- package/dist/environment.d.ts +33 -23
- package/dist/environment.js +92 -673
- package/dist/environment.mjs +92 -673
- package/dist/hooks.js +223 -1054
- package/dist/hooks.mjs +98 -929
- package/dist/services.js +96 -670
- package/dist/services.mjs +96 -670
- package/package.json +1 -1
package/dist/hooks.js
CHANGED
|
@@ -2506,700 +2506,126 @@ var axiosClient = {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
};
|
|
2508
2508
|
|
|
2509
|
-
// src/
|
|
2510
|
-
var
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
breadCrumbs: []
|
|
2516
|
-
};
|
|
2517
|
-
var breadcrumbsSlice = (0, import_toolkit.createSlice)({
|
|
2518
|
-
name: "breadcrumbs",
|
|
2519
|
-
initialState,
|
|
2520
|
-
reducers: {
|
|
2521
|
-
setBreadCrumbs: (state, action) => {
|
|
2522
|
-
state.breadCrumbs = [...state.breadCrumbs, action.payload];
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
});
|
|
2526
|
-
var { setBreadCrumbs } = breadcrumbsSlice.actions;
|
|
2527
|
-
var breadcrums_slice_default = breadcrumbsSlice.reducer;
|
|
2528
|
-
|
|
2529
|
-
// src/store/reducers/env-slice/index.ts
|
|
2530
|
-
var import_toolkit2 = require("@reduxjs/toolkit");
|
|
2531
|
-
var initialState2 = {
|
|
2532
|
-
baseUrl: "",
|
|
2533
|
-
companies: [],
|
|
2534
|
-
user: {},
|
|
2535
|
-
db: "",
|
|
2536
|
-
refreshTokenEndpoint: "",
|
|
2537
|
-
config: null,
|
|
2538
|
-
envFile: null,
|
|
2539
|
-
requests: null,
|
|
2540
|
-
defaultCompany: {
|
|
2541
|
-
id: null,
|
|
2542
|
-
logo: "",
|
|
2543
|
-
secondary_color: "",
|
|
2544
|
-
primary_color: ""
|
|
2545
|
-
},
|
|
2546
|
-
context: {
|
|
2547
|
-
uid: null,
|
|
2548
|
-
allowed_company_ids: [],
|
|
2549
|
-
lang: "vi_VN",
|
|
2550
|
-
tz: "Asia/Saigon"
|
|
2551
|
-
}
|
|
2552
|
-
};
|
|
2553
|
-
var envSlice = (0, import_toolkit2.createSlice)({
|
|
2554
|
-
name: "env",
|
|
2555
|
-
initialState: initialState2,
|
|
2556
|
-
reducers: {
|
|
2557
|
-
setEnv: (state, action) => {
|
|
2558
|
-
Object.assign(state, action.payload);
|
|
2559
|
-
},
|
|
2560
|
-
setUid: (state, action) => {
|
|
2561
|
-
state.context.uid = action.payload;
|
|
2562
|
-
},
|
|
2563
|
-
setAllowCompanies: (state, action) => {
|
|
2564
|
-
state.context.allowed_company_ids = action.payload;
|
|
2565
|
-
},
|
|
2566
|
-
setCompanies: (state, action) => {
|
|
2567
|
-
state.companies = action.payload;
|
|
2568
|
-
},
|
|
2569
|
-
setDefaultCompany: (state, action) => {
|
|
2570
|
-
state.defaultCompany = action.payload;
|
|
2571
|
-
},
|
|
2572
|
-
setLang: (state, action) => {
|
|
2573
|
-
state.context.lang = action.payload;
|
|
2574
|
-
},
|
|
2575
|
-
setUser: (state, action) => {
|
|
2576
|
-
state.user = action.payload;
|
|
2577
|
-
},
|
|
2578
|
-
setConfig: (state, action) => {
|
|
2579
|
-
state.config = action.payload;
|
|
2580
|
-
},
|
|
2581
|
-
setEnvFile: (state, action) => {
|
|
2582
|
-
state.envFile = action.payload;
|
|
2583
|
-
}
|
|
2584
|
-
}
|
|
2585
|
-
});
|
|
2586
|
-
var {
|
|
2587
|
-
setEnv,
|
|
2588
|
-
setUid,
|
|
2589
|
-
setLang,
|
|
2590
|
-
setAllowCompanies,
|
|
2591
|
-
setCompanies,
|
|
2592
|
-
setDefaultCompany,
|
|
2593
|
-
setUser,
|
|
2594
|
-
setConfig,
|
|
2595
|
-
setEnvFile
|
|
2596
|
-
} = envSlice.actions;
|
|
2597
|
-
var env_slice_default = envSlice.reducer;
|
|
2598
|
-
|
|
2599
|
-
// src/store/reducers/excel-slice/index.ts
|
|
2600
|
-
var import_toolkit3 = require("@reduxjs/toolkit");
|
|
2601
|
-
var initialState3 = {
|
|
2602
|
-
dataParse: null,
|
|
2603
|
-
idFile: null,
|
|
2604
|
-
isFileLoaded: false,
|
|
2605
|
-
loadingImport: false,
|
|
2606
|
-
selectedFile: null,
|
|
2607
|
-
errorData: null
|
|
2608
|
-
};
|
|
2609
|
-
var excelSlice = (0, import_toolkit3.createSlice)({
|
|
2610
|
-
name: "excel",
|
|
2611
|
-
initialState: initialState3,
|
|
2612
|
-
reducers: {
|
|
2613
|
-
setDataParse: (state, action) => {
|
|
2614
|
-
state.dataParse = action.payload;
|
|
2615
|
-
},
|
|
2616
|
-
setIdFile: (state, action) => {
|
|
2617
|
-
state.idFile = action.payload;
|
|
2618
|
-
},
|
|
2619
|
-
setIsFileLoaded: (state, action) => {
|
|
2620
|
-
state.isFileLoaded = action.payload;
|
|
2621
|
-
},
|
|
2622
|
-
setLoadingImport: (state, action) => {
|
|
2623
|
-
state.loadingImport = action.payload;
|
|
2624
|
-
},
|
|
2625
|
-
setSelectedFile: (state, action) => {
|
|
2626
|
-
state.selectedFile = action.payload;
|
|
2627
|
-
},
|
|
2628
|
-
setErrorData: (state, action) => {
|
|
2629
|
-
state.errorData = action.payload;
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
});
|
|
2633
|
-
var {
|
|
2634
|
-
setDataParse,
|
|
2635
|
-
setIdFile,
|
|
2636
|
-
setIsFileLoaded,
|
|
2637
|
-
setLoadingImport,
|
|
2638
|
-
setSelectedFile,
|
|
2639
|
-
setErrorData
|
|
2640
|
-
} = excelSlice.actions;
|
|
2641
|
-
var excel_slice_default = excelSlice.reducer;
|
|
2642
|
-
|
|
2643
|
-
// src/store/reducers/form-slice/index.ts
|
|
2644
|
-
var import_toolkit4 = require("@reduxjs/toolkit");
|
|
2645
|
-
var initialState4 = {
|
|
2646
|
-
viewDataStore: {},
|
|
2647
|
-
isShowingModalDetail: false,
|
|
2648
|
-
isShowModalTranslate: false,
|
|
2649
|
-
formSubmitComponent: {},
|
|
2650
|
-
fieldTranslation: null,
|
|
2651
|
-
listSubject: {},
|
|
2652
|
-
dataUser: {}
|
|
2653
|
-
};
|
|
2654
|
-
var formSlice = (0, import_toolkit4.createSlice)({
|
|
2655
|
-
name: "form",
|
|
2656
|
-
initialState: initialState4,
|
|
2657
|
-
reducers: {
|
|
2658
|
-
setViewDataStore: (state, action) => {
|
|
2659
|
-
state.viewDataStore = action.payload;
|
|
2660
|
-
},
|
|
2661
|
-
setIsShowingModalDetail: (state, action) => {
|
|
2662
|
-
state.isShowingModalDetail = action.payload;
|
|
2663
|
-
},
|
|
2664
|
-
setIsShowModalTranslate: (state, action) => {
|
|
2665
|
-
state.isShowModalTranslate = action.payload;
|
|
2666
|
-
},
|
|
2667
|
-
setFormSubmitComponent: (state, action) => {
|
|
2668
|
-
state.formSubmitComponent[action.payload.key] = action.payload.component;
|
|
2669
|
-
},
|
|
2670
|
-
setFieldTranslate: (state, action) => {
|
|
2671
|
-
state.fieldTranslation = action.payload;
|
|
2672
|
-
},
|
|
2673
|
-
setListSubject: (state, action) => {
|
|
2674
|
-
state.listSubject = action.payload;
|
|
2675
|
-
},
|
|
2676
|
-
setDataUser: (state, action) => {
|
|
2677
|
-
state.dataUser = action.payload;
|
|
2678
|
-
}
|
|
2679
|
-
}
|
|
2680
|
-
});
|
|
2681
|
-
var {
|
|
2682
|
-
setViewDataStore,
|
|
2683
|
-
setIsShowingModalDetail,
|
|
2684
|
-
setIsShowModalTranslate,
|
|
2685
|
-
setFormSubmitComponent,
|
|
2686
|
-
setFieldTranslate,
|
|
2687
|
-
setListSubject,
|
|
2688
|
-
setDataUser
|
|
2689
|
-
} = formSlice.actions;
|
|
2690
|
-
var form_slice_default = formSlice.reducer;
|
|
2691
|
-
|
|
2692
|
-
// src/store/reducers/header-slice/index.ts
|
|
2693
|
-
var import_toolkit5 = require("@reduxjs/toolkit");
|
|
2694
|
-
var headerSlice = (0, import_toolkit5.createSlice)({
|
|
2695
|
-
name: "header",
|
|
2696
|
-
initialState: {
|
|
2697
|
-
value: { allowedCompanyIds: [] }
|
|
2698
|
-
},
|
|
2699
|
-
reducers: {
|
|
2700
|
-
setHeader: (state, action) => {
|
|
2701
|
-
state.value = { ...state.value, ...action.payload };
|
|
2702
|
-
},
|
|
2703
|
-
setAllowedCompanyIds: (state, action) => {
|
|
2704
|
-
state.value.allowedCompanyIds = action.payload;
|
|
2705
|
-
}
|
|
2706
|
-
}
|
|
2707
|
-
});
|
|
2708
|
-
var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
|
|
2709
|
-
var header_slice_default = headerSlice.reducer;
|
|
2710
|
-
|
|
2711
|
-
// src/store/reducers/list-slice/index.ts
|
|
2712
|
-
var import_toolkit6 = require("@reduxjs/toolkit");
|
|
2713
|
-
var initialState5 = {
|
|
2714
|
-
pageLimit: 10,
|
|
2715
|
-
fields: {},
|
|
2716
|
-
order: "",
|
|
2717
|
-
selectedRowKeys: [],
|
|
2718
|
-
selectedRadioKey: 0,
|
|
2719
|
-
indexRowTableModal: -2,
|
|
2720
|
-
isUpdateTableModal: false,
|
|
2721
|
-
footerGroupTable: {},
|
|
2722
|
-
transferDetail: null,
|
|
2723
|
-
page: 0,
|
|
2724
|
-
domainTable: []
|
|
2725
|
-
};
|
|
2726
|
-
var listSlice = (0, import_toolkit6.createSlice)({
|
|
2727
|
-
name: "list",
|
|
2728
|
-
initialState: initialState5,
|
|
2729
|
-
reducers: {
|
|
2730
|
-
setPageLimit: (state, action) => {
|
|
2731
|
-
state.pageLimit = action.payload;
|
|
2732
|
-
},
|
|
2733
|
-
setFields: (state, action) => {
|
|
2734
|
-
state.fields = action.payload;
|
|
2735
|
-
},
|
|
2736
|
-
setOrder: (state, action) => {
|
|
2737
|
-
state.order = action.payload;
|
|
2738
|
-
},
|
|
2739
|
-
setSelectedRowKeys: (state, action) => {
|
|
2740
|
-
state.selectedRowKeys = action.payload;
|
|
2741
|
-
},
|
|
2742
|
-
setSelectedRadioKey: (state, action) => {
|
|
2743
|
-
state.selectedRadioKey = action.payload;
|
|
2744
|
-
},
|
|
2745
|
-
setIndexRowTableModal: (state, action) => {
|
|
2746
|
-
state.indexRowTableModal = action.payload;
|
|
2747
|
-
},
|
|
2748
|
-
setTransferDetail: (state, action) => {
|
|
2749
|
-
state.transferDetail = action.payload;
|
|
2750
|
-
},
|
|
2751
|
-
setIsUpdateTableModal: (state, action) => {
|
|
2752
|
-
state.isUpdateTableModal = action.payload;
|
|
2753
|
-
},
|
|
2754
|
-
setPage: (state, action) => {
|
|
2755
|
-
state.page = action.payload;
|
|
2756
|
-
},
|
|
2757
|
-
setDomainTable: (state, action) => {
|
|
2758
|
-
state.domainTable = action.payload;
|
|
2759
|
-
}
|
|
2760
|
-
}
|
|
2761
|
-
});
|
|
2762
|
-
var {
|
|
2763
|
-
setPageLimit,
|
|
2764
|
-
setFields,
|
|
2765
|
-
setOrder,
|
|
2766
|
-
setSelectedRowKeys,
|
|
2767
|
-
setIndexRowTableModal,
|
|
2768
|
-
setIsUpdateTableModal,
|
|
2769
|
-
setPage,
|
|
2770
|
-
setSelectedRadioKey,
|
|
2771
|
-
setTransferDetail,
|
|
2772
|
-
setDomainTable
|
|
2773
|
-
} = listSlice.actions;
|
|
2774
|
-
var list_slice_default = listSlice.reducer;
|
|
2775
|
-
|
|
2776
|
-
// src/store/reducers/login-slice/index.ts
|
|
2777
|
-
var import_toolkit7 = require("@reduxjs/toolkit");
|
|
2778
|
-
var initialState6 = {
|
|
2779
|
-
db: "",
|
|
2780
|
-
redirectTo: "/",
|
|
2781
|
-
forgotPasswordUrl: "/"
|
|
2782
|
-
};
|
|
2783
|
-
var loginSlice = (0, import_toolkit7.createSlice)({
|
|
2784
|
-
name: "login",
|
|
2785
|
-
initialState: initialState6,
|
|
2786
|
-
reducers: {
|
|
2787
|
-
setDb: (state, action) => {
|
|
2788
|
-
state.db = action.payload;
|
|
2789
|
-
},
|
|
2790
|
-
setRedirectTo: (state, action) => {
|
|
2791
|
-
state.redirectTo = action.payload;
|
|
2792
|
-
},
|
|
2793
|
-
setForgotPasswordUrl: (state, action) => {
|
|
2794
|
-
state.forgotPasswordUrl = action.payload;
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
});
|
|
2798
|
-
var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
|
|
2799
|
-
var login_slice_default = loginSlice.reducer;
|
|
2800
|
-
|
|
2801
|
-
// src/store/reducers/navbar-slice/index.ts
|
|
2802
|
-
var import_toolkit8 = require("@reduxjs/toolkit");
|
|
2803
|
-
var initialState7 = {
|
|
2804
|
-
menuFocus: {},
|
|
2805
|
-
menuAction: {},
|
|
2806
|
-
navbarWidth: 250,
|
|
2807
|
-
menuList: []
|
|
2808
|
-
};
|
|
2809
|
-
var navbarSlice = (0, import_toolkit8.createSlice)({
|
|
2810
|
-
name: "navbar",
|
|
2811
|
-
initialState: initialState7,
|
|
2812
|
-
reducers: {
|
|
2813
|
-
setMenuFocus: (state, action) => {
|
|
2814
|
-
state.menuFocus = action.payload;
|
|
2815
|
-
},
|
|
2816
|
-
setMenuFocusAction: (state, action) => {
|
|
2817
|
-
state.menuAction = action.payload;
|
|
2818
|
-
},
|
|
2819
|
-
setNavbarWidth: (state, action) => {
|
|
2820
|
-
state.navbarWidth = action.payload;
|
|
2821
|
-
},
|
|
2822
|
-
setMenuList: (state, action) => {
|
|
2823
|
-
state.menuList = action.payload;
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
});
|
|
2827
|
-
var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSlice.actions;
|
|
2828
|
-
var navbar_slice_default = navbarSlice.reducer;
|
|
2829
|
-
|
|
2830
|
-
// src/store/reducers/profile-slice/index.ts
|
|
2831
|
-
var import_toolkit9 = require("@reduxjs/toolkit");
|
|
2832
|
-
var initialState8 = {
|
|
2833
|
-
profile: {}
|
|
2834
|
-
};
|
|
2835
|
-
var profileSlice = (0, import_toolkit9.createSlice)({
|
|
2836
|
-
name: "profile",
|
|
2837
|
-
initialState: initialState8,
|
|
2838
|
-
reducers: {
|
|
2839
|
-
setProfile: (state, action) => {
|
|
2840
|
-
state.profile = action.payload;
|
|
2509
|
+
// src/environment/EnvStore.ts
|
|
2510
|
+
var EventEmitter = class {
|
|
2511
|
+
listeners = {};
|
|
2512
|
+
on(event, callback) {
|
|
2513
|
+
if (!this.listeners[event]) {
|
|
2514
|
+
this.listeners[event] = [];
|
|
2841
2515
|
}
|
|
2516
|
+
this.listeners[event].push(callback);
|
|
2842
2517
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
// src/store/reducers/search-slice/index.ts
|
|
2848
|
-
var import_toolkit10 = require("@reduxjs/toolkit");
|
|
2849
|
-
var initialState9 = {
|
|
2850
|
-
groupByDomain: null,
|
|
2851
|
-
searchBy: [],
|
|
2852
|
-
searchString: "",
|
|
2853
|
-
hoveredIndexSearchList: null,
|
|
2854
|
-
selectedTags: [],
|
|
2855
|
-
firstDomain: null,
|
|
2856
|
-
searchMap: {},
|
|
2857
|
-
filterBy: [],
|
|
2858
|
-
groupBy: []
|
|
2859
|
-
};
|
|
2860
|
-
var searchSlice = (0, import_toolkit10.createSlice)({
|
|
2861
|
-
name: "search",
|
|
2862
|
-
initialState: initialState9,
|
|
2863
|
-
reducers: {
|
|
2864
|
-
setGroupByDomain: (state, action) => {
|
|
2865
|
-
state.groupByDomain = action.payload;
|
|
2866
|
-
},
|
|
2867
|
-
setSearchBy: (state, action) => {
|
|
2868
|
-
state.searchBy = action.payload;
|
|
2869
|
-
},
|
|
2870
|
-
setSearchString: (state, action) => {
|
|
2871
|
-
state.searchString = action.payload;
|
|
2872
|
-
},
|
|
2873
|
-
setHoveredIndexSearchList: (state, action) => {
|
|
2874
|
-
state.hoveredIndexSearchList = action.payload;
|
|
2875
|
-
},
|
|
2876
|
-
setSelectedTags: (state, action) => {
|
|
2877
|
-
state.selectedTags = action.payload;
|
|
2878
|
-
},
|
|
2879
|
-
setFirstDomain: (state, action) => {
|
|
2880
|
-
state.firstDomain = action.payload;
|
|
2881
|
-
},
|
|
2882
|
-
setFilterBy: (state, action) => {
|
|
2883
|
-
state.filterBy = action.payload;
|
|
2884
|
-
},
|
|
2885
|
-
setGroupBy: (state, action) => {
|
|
2886
|
-
state.groupBy = action.payload;
|
|
2887
|
-
},
|
|
2888
|
-
setSearchMap: (state, action) => {
|
|
2889
|
-
state.searchMap = action.payload;
|
|
2890
|
-
},
|
|
2891
|
-
updateSearchMap: (state, action) => {
|
|
2892
|
-
if (!state.searchMap[action.payload.key]) {
|
|
2893
|
-
state.searchMap[action.payload.key] = [];
|
|
2894
|
-
}
|
|
2895
|
-
state.searchMap[action.payload.key].push(action.payload.value);
|
|
2896
|
-
},
|
|
2897
|
-
removeKeyFromSearchMap: (state, action) => {
|
|
2898
|
-
const { key, item } = action.payload;
|
|
2899
|
-
const values = state.searchMap[key];
|
|
2900
|
-
if (!values) return;
|
|
2901
|
-
if (item) {
|
|
2902
|
-
const filtered = values.filter((value) => value.name !== item.name);
|
|
2903
|
-
if (filtered.length > 0) {
|
|
2904
|
-
state.searchMap[key] = filtered;
|
|
2905
|
-
} else {
|
|
2906
|
-
delete state.searchMap[key];
|
|
2907
|
-
}
|
|
2908
|
-
} else {
|
|
2909
|
-
delete state.searchMap[key];
|
|
2910
|
-
}
|
|
2911
|
-
},
|
|
2912
|
-
clearSearchMap: (state) => {
|
|
2913
|
-
state.searchMap = {};
|
|
2518
|
+
emit(event, data) {
|
|
2519
|
+
if (this.listeners[event]) {
|
|
2520
|
+
this.listeners[event].forEach((callback) => callback(data));
|
|
2914
2521
|
}
|
|
2915
2522
|
}
|
|
2916
|
-
});
|
|
2917
|
-
var {
|
|
2918
|
-
setGroupByDomain,
|
|
2919
|
-
setSelectedTags,
|
|
2920
|
-
setSearchString,
|
|
2921
|
-
setHoveredIndexSearchList,
|
|
2922
|
-
setFirstDomain,
|
|
2923
|
-
setSearchBy,
|
|
2924
|
-
setFilterBy,
|
|
2925
|
-
setSearchMap,
|
|
2926
|
-
updateSearchMap,
|
|
2927
|
-
removeKeyFromSearchMap,
|
|
2928
|
-
setGroupBy,
|
|
2929
|
-
clearSearchMap
|
|
2930
|
-
} = searchSlice.actions;
|
|
2931
|
-
var search_slice_default = searchSlice.reducer;
|
|
2932
|
-
|
|
2933
|
-
// src/store/store.ts
|
|
2934
|
-
var import_toolkit11 = require("@reduxjs/toolkit");
|
|
2935
|
-
|
|
2936
|
-
// node_modules/redux/dist/redux.mjs
|
|
2937
|
-
function formatProdErrorMessage(code) {
|
|
2938
|
-
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. `;
|
|
2939
|
-
}
|
|
2940
|
-
var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
|
|
2941
|
-
var ActionTypes = {
|
|
2942
|
-
INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
|
|
2943
|
-
REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
|
|
2944
|
-
PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
|
|
2945
2523
|
};
|
|
2946
|
-
var
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
const constructorName = ctorName(val);
|
|
2978
|
-
switch (constructorName) {
|
|
2979
|
-
case "Symbol":
|
|
2980
|
-
case "Promise":
|
|
2981
|
-
case "WeakMap":
|
|
2982
|
-
case "WeakSet":
|
|
2983
|
-
case "Map":
|
|
2984
|
-
case "Set":
|
|
2985
|
-
return constructorName;
|
|
2986
|
-
}
|
|
2987
|
-
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
2988
|
-
}
|
|
2989
|
-
function ctorName(val) {
|
|
2990
|
-
return typeof val.constructor === "function" ? val.constructor.name : null;
|
|
2991
|
-
}
|
|
2992
|
-
function isError(val) {
|
|
2993
|
-
return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
|
|
2994
|
-
}
|
|
2995
|
-
function isDate(val) {
|
|
2996
|
-
if (val instanceof Date)
|
|
2997
|
-
return true;
|
|
2998
|
-
return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
|
|
2999
|
-
}
|
|
3000
|
-
function kindOf(val) {
|
|
3001
|
-
let typeOfVal = typeof val;
|
|
3002
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3003
|
-
typeOfVal = miniKindOf(val);
|
|
3004
|
-
}
|
|
3005
|
-
return typeOfVal;
|
|
3006
|
-
}
|
|
3007
|
-
function warning(message) {
|
|
3008
|
-
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
3009
|
-
console.error(message);
|
|
3010
|
-
}
|
|
3011
|
-
try {
|
|
3012
|
-
throw new Error(message);
|
|
3013
|
-
} catch (e) {
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
|
-
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
|
3017
|
-
const reducerKeys = Object.keys(reducers);
|
|
3018
|
-
const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
|
|
3019
|
-
if (reducerKeys.length === 0) {
|
|
3020
|
-
return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
|
|
3021
|
-
}
|
|
3022
|
-
if (!isPlainObject(inputState)) {
|
|
3023
|
-
return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
|
|
3024
|
-
}
|
|
3025
|
-
const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
|
|
3026
|
-
unexpectedKeys.forEach((key) => {
|
|
3027
|
-
unexpectedKeyCache[key] = true;
|
|
3028
|
-
});
|
|
3029
|
-
if (action && action.type === actionTypes_default.REPLACE)
|
|
3030
|
-
return;
|
|
3031
|
-
if (unexpectedKeys.length > 0) {
|
|
3032
|
-
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.`;
|
|
3033
|
-
}
|
|
3034
|
-
}
|
|
3035
|
-
function assertReducerShape(reducers) {
|
|
3036
|
-
Object.keys(reducers).forEach((key) => {
|
|
3037
|
-
const reducer = reducers[key];
|
|
3038
|
-
const initialState10 = reducer(void 0, {
|
|
3039
|
-
type: actionTypes_default.INIT
|
|
3040
|
-
});
|
|
3041
|
-
if (typeof initialState10 === "undefined") {
|
|
3042
|
-
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.`);
|
|
3043
|
-
}
|
|
3044
|
-
if (typeof reducer(void 0, {
|
|
3045
|
-
type: actionTypes_default.PROBE_UNKNOWN_ACTION()
|
|
3046
|
-
}) === "undefined") {
|
|
3047
|
-
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.`);
|
|
3048
|
-
}
|
|
3049
|
-
});
|
|
3050
|
-
}
|
|
3051
|
-
function combineReducers(reducers) {
|
|
3052
|
-
const reducerKeys = Object.keys(reducers);
|
|
3053
|
-
const finalReducers = {};
|
|
3054
|
-
for (let i = 0; i < reducerKeys.length; i++) {
|
|
3055
|
-
const key = reducerKeys[i];
|
|
3056
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3057
|
-
if (typeof reducers[key] === "undefined") {
|
|
3058
|
-
warning(`No reducer provided for key "${key}"`);
|
|
3059
|
-
}
|
|
3060
|
-
}
|
|
3061
|
-
if (typeof reducers[key] === "function") {
|
|
3062
|
-
finalReducers[key] = reducers[key];
|
|
3063
|
-
}
|
|
3064
|
-
}
|
|
3065
|
-
const finalReducerKeys = Object.keys(finalReducers);
|
|
3066
|
-
let unexpectedKeyCache;
|
|
3067
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3068
|
-
unexpectedKeyCache = {};
|
|
2524
|
+
var EnvStore = class {
|
|
2525
|
+
state;
|
|
2526
|
+
emitter;
|
|
2527
|
+
localStorageUtil;
|
|
2528
|
+
sessionStorageUtil;
|
|
2529
|
+
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils()) {
|
|
2530
|
+
this.state = {
|
|
2531
|
+
baseUrl: "",
|
|
2532
|
+
requests: null,
|
|
2533
|
+
companies: [],
|
|
2534
|
+
user: {},
|
|
2535
|
+
config: null,
|
|
2536
|
+
envFile: null,
|
|
2537
|
+
defaultCompany: {
|
|
2538
|
+
id: null,
|
|
2539
|
+
logo: "",
|
|
2540
|
+
secondary_color: "",
|
|
2541
|
+
primary_color: ""
|
|
2542
|
+
},
|
|
2543
|
+
context: {
|
|
2544
|
+
uid: null,
|
|
2545
|
+
allowed_company_ids: [],
|
|
2546
|
+
lang: "vi_VN",
|
|
2547
|
+
tz: "Asia/Saigon"
|
|
2548
|
+
},
|
|
2549
|
+
localStorageUtils: localStorageUtil,
|
|
2550
|
+
sessionStorageUtils: sessionStorageUtil
|
|
2551
|
+
};
|
|
2552
|
+
this.emitter = new EventEmitter();
|
|
2553
|
+
this.localStorageUtil = localStorageUtil;
|
|
2554
|
+
this.sessionStorageUtil = sessionStorageUtil;
|
|
3069
2555
|
}
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
assertReducerShape(finalReducers);
|
|
3073
|
-
} catch (e) {
|
|
3074
|
-
shapeAssertionError = e;
|
|
2556
|
+
getEnv() {
|
|
2557
|
+
return { ...this.state };
|
|
3075
2558
|
}
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
throw shapeAssertionError;
|
|
3079
|
-
}
|
|
3080
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3081
|
-
const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
|
3082
|
-
if (warningMessage) {
|
|
3083
|
-
warning(warningMessage);
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
let hasChanged = false;
|
|
3087
|
-
const nextState = {};
|
|
3088
|
-
for (let i = 0; i < finalReducerKeys.length; i++) {
|
|
3089
|
-
const key = finalReducerKeys[i];
|
|
3090
|
-
const reducer = finalReducers[key];
|
|
3091
|
-
const previousStateForKey = state[key];
|
|
3092
|
-
const nextStateForKey = reducer(previousStateForKey, action);
|
|
3093
|
-
if (typeof nextStateForKey === "undefined") {
|
|
3094
|
-
const actionType = action && action.type;
|
|
3095
|
-
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.`);
|
|
3096
|
-
}
|
|
3097
|
-
nextState[key] = nextStateForKey;
|
|
3098
|
-
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
|
3099
|
-
}
|
|
3100
|
-
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
|
3101
|
-
return hasChanged ? nextState : state;
|
|
3102
|
-
};
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
// src/store/store.ts
|
|
3106
|
-
var rootReducer = combineReducers({
|
|
3107
|
-
env: env_slice_default,
|
|
3108
|
-
header: header_slice_default,
|
|
3109
|
-
navbar: navbar_slice_default,
|
|
3110
|
-
list: list_slice_default,
|
|
3111
|
-
search: search_slice_default,
|
|
3112
|
-
form: form_slice_default,
|
|
3113
|
-
breadcrumbs: breadcrums_slice_default,
|
|
3114
|
-
login: login_slice_default,
|
|
3115
|
-
excel: excel_slice_default,
|
|
3116
|
-
profile: profile_slice_default
|
|
3117
|
-
});
|
|
3118
|
-
var envStore = (0, import_toolkit11.configureStore)({
|
|
3119
|
-
reducer: rootReducer,
|
|
3120
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
3121
|
-
serializableCheck: false
|
|
3122
|
-
})
|
|
3123
|
-
});
|
|
3124
|
-
|
|
3125
|
-
// src/environment/EnvStore.ts
|
|
3126
|
-
var EnvStore = class {
|
|
3127
|
-
envStore;
|
|
3128
|
-
baseUrl;
|
|
3129
|
-
requests;
|
|
3130
|
-
context;
|
|
3131
|
-
defaultCompany;
|
|
3132
|
-
config;
|
|
3133
|
-
companies;
|
|
3134
|
-
user;
|
|
3135
|
-
db;
|
|
3136
|
-
localStorageUtils;
|
|
3137
|
-
sessionStorageUtils;
|
|
3138
|
-
refreshTokenEndpoint;
|
|
3139
|
-
constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3140
|
-
this.envStore = envStore2;
|
|
3141
|
-
this.localStorageUtils = localStorageUtils2;
|
|
3142
|
-
this.sessionStorageUtils = sessionStorageUtils2;
|
|
3143
|
-
this.setup();
|
|
3144
|
-
}
|
|
3145
|
-
setup() {
|
|
3146
|
-
const env2 = this.envStore.getState().env;
|
|
3147
|
-
this.baseUrl = env2?.baseUrl;
|
|
3148
|
-
this.requests = env2?.requests;
|
|
3149
|
-
this.context = env2?.context;
|
|
3150
|
-
this.defaultCompany = env2?.defaultCompany;
|
|
3151
|
-
this.config = env2?.config;
|
|
3152
|
-
this.companies = env2?.companies || [];
|
|
3153
|
-
this.user = env2?.user;
|
|
3154
|
-
this.db = env2?.db;
|
|
3155
|
-
this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
|
|
2559
|
+
onUpdate(callback) {
|
|
2560
|
+
this.emitter.on("update", callback);
|
|
3156
2561
|
}
|
|
3157
2562
|
setupEnv(envConfig) {
|
|
3158
|
-
|
|
3159
|
-
|
|
2563
|
+
this.state = {
|
|
2564
|
+
...this.state,
|
|
3160
2565
|
...envConfig,
|
|
3161
|
-
localStorageUtils: this.
|
|
3162
|
-
sessionStorageUtils: this.
|
|
2566
|
+
localStorageUtils: this.localStorageUtil,
|
|
2567
|
+
sessionStorageUtils: this.sessionStorageUtil
|
|
3163
2568
|
};
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
this.
|
|
2569
|
+
this.state.requests = axiosClient.init(this.state);
|
|
2570
|
+
this.emitter.emit("update", this.getEnv());
|
|
2571
|
+
return this.getEnv();
|
|
3167
2572
|
}
|
|
3168
2573
|
setUid(uid) {
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
2574
|
+
this.state = {
|
|
2575
|
+
...this.state,
|
|
2576
|
+
context: { ...this.state.context, uid }
|
|
2577
|
+
};
|
|
2578
|
+
this.emitter.emit("update", this.getEnv());
|
|
3172
2579
|
}
|
|
3173
2580
|
setLang(lang) {
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
2581
|
+
this.state = {
|
|
2582
|
+
...this.state,
|
|
2583
|
+
context: { ...this.state.context, lang }
|
|
2584
|
+
};
|
|
2585
|
+
this.emitter.emit("update", this.getEnv());
|
|
3177
2586
|
}
|
|
3178
|
-
setAllowCompanies(
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
2587
|
+
setAllowCompanies(allowed_company_ids) {
|
|
2588
|
+
this.state = {
|
|
2589
|
+
...this.state,
|
|
2590
|
+
context: { ...this.state.context, allowed_company_ids }
|
|
2591
|
+
};
|
|
2592
|
+
this.emitter.emit("update", this.getEnv());
|
|
3182
2593
|
}
|
|
3183
2594
|
setCompanies(companies) {
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
2595
|
+
this.state = { ...this.state, companies };
|
|
2596
|
+
this.emitter.emit("update", this.getEnv());
|
|
2597
|
+
}
|
|
2598
|
+
setDefaultCompany(defaultCompany) {
|
|
2599
|
+
this.state = { ...this.state, defaultCompany };
|
|
2600
|
+
this.emitter.emit("update", this.getEnv());
|
|
3187
2601
|
}
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
this.setup();
|
|
2602
|
+
setUserInfo(user) {
|
|
2603
|
+
this.state = { ...this.state, user };
|
|
2604
|
+
this.emitter.emit("update", this.getEnv());
|
|
3192
2605
|
}
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
2606
|
+
setConfig(config) {
|
|
2607
|
+
this.state = { ...this.state, config };
|
|
2608
|
+
this.emitter.emit("update", this.getEnv());
|
|
2609
|
+
}
|
|
2610
|
+
setEnvFile(envFile) {
|
|
2611
|
+
this.state = { ...this.state, envFile };
|
|
2612
|
+
this.emitter.emit("update", this.getEnv());
|
|
3197
2613
|
}
|
|
3198
2614
|
};
|
|
3199
2615
|
var env = null;
|
|
2616
|
+
function initEnv({
|
|
2617
|
+
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
2618
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils()
|
|
2619
|
+
}) {
|
|
2620
|
+
if (!env) {
|
|
2621
|
+
env = new EnvStore(localStorageUtil, sessionStorageUtil);
|
|
2622
|
+
}
|
|
2623
|
+
return env;
|
|
2624
|
+
}
|
|
3200
2625
|
function getEnv() {
|
|
3201
|
-
if (!env)
|
|
3202
|
-
env =
|
|
2626
|
+
if (!env) {
|
|
2627
|
+
env = initEnv({});
|
|
2628
|
+
}
|
|
3203
2629
|
return env;
|
|
3204
2630
|
}
|
|
3205
2631
|
|
|
@@ -4795,278 +4221,21 @@ var useIsValidToken = () => {
|
|
|
4795
4221
|
};
|
|
4796
4222
|
var use_isvalid_token_default = useIsValidToken;
|
|
4797
4223
|
|
|
4798
|
-
// src/hooks/auth/use-login-credential.
|
|
4799
|
-
var import_react_query7 = require("@tanstack/react-query");
|
|
4800
|
-
|
|
4801
|
-
// src/services/auth-service/backup.ts
|
|
4802
|
-
var import_react5 = require("react");
|
|
4803
|
-
|
|
4804
|
-
// src/provider/react-query-provider.tsx
|
|
4224
|
+
// src/hooks/auth/use-login-credential.ts
|
|
4805
4225
|
var import_react_query5 = require("@tanstack/react-query");
|
|
4806
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
4807
|
-
|
|
4808
|
-
// src/provider/redux-provider.tsx
|
|
4809
|
-
var import_react_redux2 = require("react-redux");
|
|
4810
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
4811
|
-
|
|
4812
|
-
// src/provider/main-provider.tsx
|
|
4813
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
4814
|
-
|
|
4815
|
-
// src/provider/version-gate-provider.tsx
|
|
4816
|
-
var import_react3 = require("react");
|
|
4817
|
-
var import_react_query6 = require("@tanstack/react-query");
|
|
4818
|
-
|
|
4819
|
-
// src/services/view-service/backup.ts
|
|
4820
|
-
var import_react2 = require("react");
|
|
4821
|
-
|
|
4822
|
-
// src/provider/version-gate-provider.tsx
|
|
4823
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
4824
|
-
|
|
4825
|
-
// src/provider/env-provider.tsx
|
|
4826
|
-
var import_react4 = require("react");
|
|
4827
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
4828
|
-
var EnvContext = (0, import_react4.createContext)(null);
|
|
4829
|
-
function useEnv() {
|
|
4830
|
-
const context = (0, import_react4.useContext)(EnvContext);
|
|
4831
|
-
if (!context) {
|
|
4832
|
-
throw new Error("useEnv must be used within an EnvProvider");
|
|
4833
|
-
}
|
|
4834
|
-
return context;
|
|
4835
|
-
}
|
|
4836
|
-
|
|
4837
|
-
// src/services/auth-service/backup.ts
|
|
4838
|
-
function useAuthService() {
|
|
4839
|
-
const { env: env2 } = useEnv();
|
|
4840
|
-
const login = (0, import_react5.useCallback)(
|
|
4841
|
-
async (body) => {
|
|
4842
|
-
const payload = Object.fromEntries(
|
|
4843
|
-
Object.entries({
|
|
4844
|
-
username: body.email,
|
|
4845
|
-
password: body.password,
|
|
4846
|
-
grant_type: env2?.config?.grantType || "",
|
|
4847
|
-
client_id: env2?.config?.clientId || "",
|
|
4848
|
-
client_secret: env2?.config?.clientSecret || ""
|
|
4849
|
-
}).filter(([_, value]) => !!value)
|
|
4850
|
-
);
|
|
4851
|
-
const encodedData = new URLSearchParams(payload).toString();
|
|
4852
|
-
return env2?.requests?.post(body.path, encodedData, {
|
|
4853
|
-
headers: {
|
|
4854
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
4855
|
-
}
|
|
4856
|
-
});
|
|
4857
|
-
},
|
|
4858
|
-
[env2]
|
|
4859
|
-
);
|
|
4860
|
-
const forgotPassword = (0, import_react5.useCallback)(
|
|
4861
|
-
async (email) => {
|
|
4862
|
-
const bodyData = {
|
|
4863
|
-
login: email,
|
|
4864
|
-
url: `${window.location.origin}/reset-password`
|
|
4865
|
-
};
|
|
4866
|
-
return env2?.requests?.post("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
4867
|
-
headers: {
|
|
4868
|
-
"Content-Type": "application/json"
|
|
4869
|
-
}
|
|
4870
|
-
});
|
|
4871
|
-
},
|
|
4872
|
-
[env2]
|
|
4873
|
-
);
|
|
4874
|
-
const forgotPasswordSSO = (0, import_react5.useCallback)(
|
|
4875
|
-
async ({
|
|
4876
|
-
email,
|
|
4877
|
-
with_context,
|
|
4878
|
-
method
|
|
4879
|
-
}) => {
|
|
4880
|
-
const body = {
|
|
4881
|
-
method,
|
|
4882
|
-
kwargs: {
|
|
4883
|
-
vals: {
|
|
4884
|
-
email
|
|
4885
|
-
}
|
|
4886
|
-
},
|
|
4887
|
-
with_context
|
|
4888
|
-
};
|
|
4889
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
4890
|
-
headers: {
|
|
4891
|
-
"Content-Type": "application/json"
|
|
4892
|
-
}
|
|
4893
|
-
});
|
|
4894
|
-
},
|
|
4895
|
-
[env2]
|
|
4896
|
-
);
|
|
4897
|
-
const resetPassword = (0, import_react5.useCallback)(
|
|
4898
|
-
async (data, token) => {
|
|
4899
|
-
const bodyData = {
|
|
4900
|
-
token,
|
|
4901
|
-
password: data.password,
|
|
4902
|
-
new_password: data.confirmPassword
|
|
4903
|
-
};
|
|
4904
|
-
return env2?.requests?.post("/change_password" /* CHANGE_PASSWORD_PATH */, bodyData, {
|
|
4905
|
-
headers: {
|
|
4906
|
-
"Content-Type": "application/json"
|
|
4907
|
-
}
|
|
4908
|
-
});
|
|
4909
|
-
},
|
|
4910
|
-
[env2]
|
|
4911
|
-
);
|
|
4912
|
-
const resetPasswordSSO = (0, import_react5.useCallback)(
|
|
4913
|
-
async ({
|
|
4914
|
-
method,
|
|
4915
|
-
password,
|
|
4916
|
-
with_context
|
|
4917
|
-
}) => {
|
|
4918
|
-
const bodyData = {
|
|
4919
|
-
method,
|
|
4920
|
-
kwargs: {
|
|
4921
|
-
vals: {
|
|
4922
|
-
password
|
|
4923
|
-
}
|
|
4924
|
-
},
|
|
4925
|
-
with_context
|
|
4926
|
-
};
|
|
4927
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, bodyData, {
|
|
4928
|
-
headers: {
|
|
4929
|
-
"Content-Type": "application/json"
|
|
4930
|
-
}
|
|
4931
|
-
});
|
|
4932
|
-
},
|
|
4933
|
-
[env2]
|
|
4934
|
-
);
|
|
4935
|
-
const updatePassword = (0, import_react5.useCallback)(
|
|
4936
|
-
async (data, token) => {
|
|
4937
|
-
const bodyData = {
|
|
4938
|
-
token,
|
|
4939
|
-
old_password: data.oldPassword,
|
|
4940
|
-
new_password: data.newPassword
|
|
4941
|
-
};
|
|
4942
|
-
return env2?.requests?.post("/change_password_parent" /* UPDATE_PASSWORD_PATH */, bodyData, {
|
|
4943
|
-
headers: {
|
|
4944
|
-
"Content-Type": "application/json"
|
|
4945
|
-
}
|
|
4946
|
-
});
|
|
4947
|
-
},
|
|
4948
|
-
[env2]
|
|
4949
|
-
);
|
|
4950
|
-
const isValidToken = (0, import_react5.useCallback)(
|
|
4951
|
-
async (token) => {
|
|
4952
|
-
const bodyData = {
|
|
4953
|
-
token
|
|
4954
|
-
};
|
|
4955
|
-
return env2?.requests?.post("/check_token" /* TOKEN */, bodyData, {
|
|
4956
|
-
headers: {
|
|
4957
|
-
"Content-Type": "application/json"
|
|
4958
|
-
}
|
|
4959
|
-
});
|
|
4960
|
-
},
|
|
4961
|
-
[env2]
|
|
4962
|
-
);
|
|
4963
|
-
const isValidActionToken = (0, import_react5.useCallback)(
|
|
4964
|
-
async (actionToken, path) => {
|
|
4965
|
-
return env2?.requests?.post(
|
|
4966
|
-
path,
|
|
4967
|
-
{},
|
|
4968
|
-
{
|
|
4969
|
-
headers: {
|
|
4970
|
-
"Content-Type": "application/json"
|
|
4971
|
-
},
|
|
4972
|
-
useActionToken: true,
|
|
4973
|
-
actionToken
|
|
4974
|
-
}
|
|
4975
|
-
);
|
|
4976
|
-
},
|
|
4977
|
-
[env2]
|
|
4978
|
-
);
|
|
4979
|
-
const loginSocial = (0, import_react5.useCallback)(
|
|
4980
|
-
async ({
|
|
4981
|
-
db,
|
|
4982
|
-
state,
|
|
4983
|
-
access_token
|
|
4984
|
-
}) => {
|
|
4985
|
-
return env2?.requests?.post(
|
|
4986
|
-
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
4987
|
-
{ state, access_token },
|
|
4988
|
-
{
|
|
4989
|
-
headers: {
|
|
4990
|
-
"Content-Type": "application/json"
|
|
4991
|
-
}
|
|
4992
|
-
}
|
|
4993
|
-
);
|
|
4994
|
-
},
|
|
4995
|
-
[env2]
|
|
4996
|
-
);
|
|
4997
|
-
const getProviders = (0, import_react5.useCallback)(
|
|
4998
|
-
async (db) => {
|
|
4999
|
-
return env2?.requests?.get("/oauth/providers", { params: { db } });
|
|
5000
|
-
},
|
|
5001
|
-
[env2]
|
|
5002
|
-
);
|
|
5003
|
-
const getAccessByCode = (0, import_react5.useCallback)(
|
|
5004
|
-
async (code) => {
|
|
5005
|
-
const data = new URLSearchParams();
|
|
5006
|
-
data.append("code", code);
|
|
5007
|
-
data.append("grant_type", "authorization_code");
|
|
5008
|
-
data.append("client_id", env2?.config?.clientId || "");
|
|
5009
|
-
data.append("redirect_uri", env2?.config?.redirectUri || "");
|
|
5010
|
-
return env2?.requests?.post(
|
|
5011
|
-
`${env2?.baseUrl?.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
5012
|
-
data,
|
|
5013
|
-
{
|
|
5014
|
-
headers: {
|
|
5015
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
5016
|
-
}
|
|
5017
|
-
}
|
|
5018
|
-
);
|
|
5019
|
-
},
|
|
5020
|
-
[env2]
|
|
5021
|
-
);
|
|
5022
|
-
const logout = (0, import_react5.useCallback)(
|
|
5023
|
-
async (data) => {
|
|
5024
|
-
console.log(data);
|
|
5025
|
-
return env2?.requests?.post(
|
|
5026
|
-
"/logout" /* LOGOUT */,
|
|
5027
|
-
{},
|
|
5028
|
-
{
|
|
5029
|
-
headers: {
|
|
5030
|
-
"Content-Type": "application/json"
|
|
5031
|
-
},
|
|
5032
|
-
withCredentials: true,
|
|
5033
|
-
useRefreshToken: true
|
|
5034
|
-
}
|
|
5035
|
-
);
|
|
5036
|
-
},
|
|
5037
|
-
[env2]
|
|
5038
|
-
);
|
|
5039
|
-
return {
|
|
5040
|
-
login,
|
|
5041
|
-
forgotPassword,
|
|
5042
|
-
forgotPasswordSSO,
|
|
5043
|
-
resetPassword,
|
|
5044
|
-
resetPasswordSSO,
|
|
5045
|
-
updatePassword,
|
|
5046
|
-
isValidToken,
|
|
5047
|
-
isValidActionToken,
|
|
5048
|
-
loginSocial,
|
|
5049
|
-
getProviders,
|
|
5050
|
-
getAccessByCode,
|
|
5051
|
-
logout
|
|
5052
|
-
};
|
|
5053
|
-
}
|
|
5054
|
-
|
|
5055
|
-
// src/hooks/auth/use-login-credential.tsx
|
|
5056
4226
|
var useLoginCredential = () => {
|
|
5057
|
-
|
|
5058
|
-
return (0, import_react_query7.useMutation)({
|
|
4227
|
+
return (0, import_react_query5.useMutation)({
|
|
5059
4228
|
mutationFn: (data) => {
|
|
5060
|
-
return login(data);
|
|
4229
|
+
return auth_service_default.login(data);
|
|
5061
4230
|
}
|
|
5062
4231
|
});
|
|
5063
4232
|
};
|
|
5064
4233
|
var use_login_credential_default = useLoginCredential;
|
|
5065
4234
|
|
|
5066
4235
|
// src/hooks/auth/use-login-socical.ts
|
|
5067
|
-
var
|
|
4236
|
+
var import_react_query6 = require("@tanstack/react-query");
|
|
5068
4237
|
var useLoginSocial = () => {
|
|
5069
|
-
return (0,
|
|
4238
|
+
return (0, import_react_query6.useMutation)({
|
|
5070
4239
|
mutationFn: (data) => {
|
|
5071
4240
|
return auth_service_default.loginSocial(data);
|
|
5072
4241
|
}
|
|
@@ -5075,9 +4244,9 @@ var useLoginSocial = () => {
|
|
|
5075
4244
|
var use_login_socical_default = useLoginSocial;
|
|
5076
4245
|
|
|
5077
4246
|
// src/hooks/auth/use-reset-password.ts
|
|
5078
|
-
var
|
|
4247
|
+
var import_react_query7 = require("@tanstack/react-query");
|
|
5079
4248
|
var useResetPassword = () => {
|
|
5080
|
-
return (0,
|
|
4249
|
+
return (0, import_react_query7.useMutation)({
|
|
5081
4250
|
mutationFn: (request) => {
|
|
5082
4251
|
return auth_service_default.resetPassword(request.data, request.token);
|
|
5083
4252
|
}
|
|
@@ -5086,9 +4255,9 @@ var useResetPassword = () => {
|
|
|
5086
4255
|
var use_reset_password_default = useResetPassword;
|
|
5087
4256
|
|
|
5088
4257
|
// src/hooks/auth/use-reset-password-sso.ts
|
|
5089
|
-
var
|
|
4258
|
+
var import_react_query8 = require("@tanstack/react-query");
|
|
5090
4259
|
var useResetPasswordSSO = () => {
|
|
5091
|
-
return (0,
|
|
4260
|
+
return (0, import_react_query8.useMutation)({
|
|
5092
4261
|
mutationFn: ({
|
|
5093
4262
|
method,
|
|
5094
4263
|
password,
|
|
@@ -5105,9 +4274,9 @@ var useResetPasswordSSO = () => {
|
|
|
5105
4274
|
var use_reset_password_sso_default = useResetPasswordSSO;
|
|
5106
4275
|
|
|
5107
4276
|
// src/hooks/auth/use-update-password.ts
|
|
5108
|
-
var
|
|
4277
|
+
var import_react_query9 = require("@tanstack/react-query");
|
|
5109
4278
|
var useUpdatePassword = () => {
|
|
5110
|
-
return (0,
|
|
4279
|
+
return (0, import_react_query9.useMutation)({
|
|
5111
4280
|
mutationFn: (request) => {
|
|
5112
4281
|
return auth_service_default.updatePassword(request.data, request.token);
|
|
5113
4282
|
}
|
|
@@ -5116,9 +4285,9 @@ var useUpdatePassword = () => {
|
|
|
5116
4285
|
var use_update_password_default = useUpdatePassword;
|
|
5117
4286
|
|
|
5118
4287
|
// src/hooks/auth/use-logout.ts
|
|
5119
|
-
var
|
|
4288
|
+
var import_react_query10 = require("@tanstack/react-query");
|
|
5120
4289
|
var useLogout = () => {
|
|
5121
|
-
return (0,
|
|
4290
|
+
return (0, import_react_query10.useMutation)({
|
|
5122
4291
|
mutationFn: (data) => {
|
|
5123
4292
|
return auth_service_default.logout(data);
|
|
5124
4293
|
}
|
|
@@ -5127,9 +4296,9 @@ var useLogout = () => {
|
|
|
5127
4296
|
var use_logout_default = useLogout;
|
|
5128
4297
|
|
|
5129
4298
|
// src/hooks/auth/use-get-access-by-code.ts
|
|
5130
|
-
var
|
|
4299
|
+
var import_react_query11 = require("@tanstack/react-query");
|
|
5131
4300
|
var useGetAccessByCode = () => {
|
|
5132
|
-
return (0,
|
|
4301
|
+
return (0, import_react_query11.useMutation)({
|
|
5133
4302
|
mutationFn: ({ code }) => {
|
|
5134
4303
|
return auth_service_default.getAccessByCode(code);
|
|
5135
4304
|
}
|
|
@@ -5138,9 +4307,9 @@ var useGetAccessByCode = () => {
|
|
|
5138
4307
|
var use_get_access_by_code_default = useGetAccessByCode;
|
|
5139
4308
|
|
|
5140
4309
|
// src/hooks/auth/use-validate-action-token.ts
|
|
5141
|
-
var
|
|
4310
|
+
var import_react_query12 = require("@tanstack/react-query");
|
|
5142
4311
|
var useValidateActionToken = () => {
|
|
5143
|
-
return (0,
|
|
4312
|
+
return (0, import_react_query12.useMutation)({
|
|
5144
4313
|
mutationFn: ({
|
|
5145
4314
|
actionToken,
|
|
5146
4315
|
path
|
|
@@ -5152,25 +4321,25 @@ var useValidateActionToken = () => {
|
|
|
5152
4321
|
var use_validate_action_token_default = useValidateActionToken;
|
|
5153
4322
|
|
|
5154
4323
|
// src/hooks/company/use-get-company-info.ts
|
|
5155
|
-
var
|
|
4324
|
+
var import_react_query13 = require("@tanstack/react-query");
|
|
5156
4325
|
var useGetCompanyInfo = () => {
|
|
5157
|
-
return (0,
|
|
4326
|
+
return (0, import_react_query13.useMutation)({
|
|
5158
4327
|
mutationFn: (id) => company_service_default.getInfoCompany(id)
|
|
5159
4328
|
});
|
|
5160
4329
|
};
|
|
5161
4330
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5162
4331
|
|
|
5163
4332
|
// src/hooks/company/use-get-current-company.ts
|
|
5164
|
-
var
|
|
4333
|
+
var import_react_query14 = require("@tanstack/react-query");
|
|
5165
4334
|
var useGetCurrentCompany = () => {
|
|
5166
|
-
return (0,
|
|
4335
|
+
return (0, import_react_query14.useMutation)({
|
|
5167
4336
|
mutationFn: () => company_service_default.getCurrentCompany()
|
|
5168
4337
|
});
|
|
5169
4338
|
};
|
|
5170
4339
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
5171
4340
|
|
|
5172
4341
|
// src/hooks/company/use-get-list-company.ts
|
|
5173
|
-
var
|
|
4342
|
+
var import_react_query15 = require("@tanstack/react-query");
|
|
5174
4343
|
var useGetListCompany = (companyIDs = []) => {
|
|
5175
4344
|
const companySpec = {
|
|
5176
4345
|
id: {},
|
|
@@ -5181,7 +4350,7 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
5181
4350
|
ids: companyIDs,
|
|
5182
4351
|
specification: companySpec
|
|
5183
4352
|
};
|
|
5184
|
-
return (0,
|
|
4353
|
+
return (0, import_react_query15.useQuery)({
|
|
5185
4354
|
queryKey: ["list_company" /* LIST_COMPANY */, companyIDs],
|
|
5186
4355
|
queryFn: () => model_service_default.getList(getListParams),
|
|
5187
4356
|
refetchOnWindowFocus: false
|
|
@@ -5190,9 +4359,9 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
5190
4359
|
var use_get_list_company_default = useGetListCompany;
|
|
5191
4360
|
|
|
5192
4361
|
// src/hooks/excel/use-export-excel.ts
|
|
5193
|
-
var
|
|
4362
|
+
var import_react_query16 = require("@tanstack/react-query");
|
|
5194
4363
|
var useExportExcel = () => {
|
|
5195
|
-
return (0,
|
|
4364
|
+
return (0, import_react_query16.useMutation)({
|
|
5196
4365
|
mutationFn: ({
|
|
5197
4366
|
model,
|
|
5198
4367
|
domain,
|
|
@@ -5217,9 +4386,9 @@ var useExportExcel = () => {
|
|
|
5217
4386
|
var use_export_excel_default = useExportExcel;
|
|
5218
4387
|
|
|
5219
4388
|
// src/hooks/excel/use-get-field-export.ts
|
|
5220
|
-
var
|
|
4389
|
+
var import_react_query17 = require("@tanstack/react-query");
|
|
5221
4390
|
var useGetFieldExport = () => {
|
|
5222
|
-
return (0,
|
|
4391
|
+
return (0, import_react_query17.useMutation)({
|
|
5223
4392
|
mutationFn: ({
|
|
5224
4393
|
ids,
|
|
5225
4394
|
model,
|
|
@@ -5248,9 +4417,9 @@ var useGetFieldExport = () => {
|
|
|
5248
4417
|
var use_get_field_export_default = useGetFieldExport;
|
|
5249
4418
|
|
|
5250
4419
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5251
|
-
var
|
|
4420
|
+
var import_react_query18 = require("@tanstack/react-query");
|
|
5252
4421
|
var useGetFileExcel = ({ model }) => {
|
|
5253
|
-
return (0,
|
|
4422
|
+
return (0, import_react_query18.useQuery)({
|
|
5254
4423
|
queryKey: [],
|
|
5255
4424
|
queryFn: () => excel_service_default.getFileExcel({
|
|
5256
4425
|
model
|
|
@@ -5266,9 +4435,9 @@ var useGetFileExcel = ({ model }) => {
|
|
|
5266
4435
|
var use_get_file_excel_default = useGetFileExcel;
|
|
5267
4436
|
|
|
5268
4437
|
// src/hooks/excel/use-parse-preview.ts
|
|
5269
|
-
var
|
|
4438
|
+
var import_react_query19 = require("@tanstack/react-query");
|
|
5270
4439
|
var useParsePreview = () => {
|
|
5271
|
-
return (0,
|
|
4440
|
+
return (0, import_react_query19.useMutation)({
|
|
5272
4441
|
mutationFn: ({
|
|
5273
4442
|
id,
|
|
5274
4443
|
selectedSheet,
|
|
@@ -5285,9 +4454,9 @@ var useParsePreview = () => {
|
|
|
5285
4454
|
var use_parse_preview_default = useParsePreview;
|
|
5286
4455
|
|
|
5287
4456
|
// src/hooks/excel/use-upload-file.ts
|
|
5288
|
-
var
|
|
4457
|
+
var import_react_query20 = require("@tanstack/react-query");
|
|
5289
4458
|
var useUploadFile = () => {
|
|
5290
|
-
return (0,
|
|
4459
|
+
return (0, import_react_query20.useMutation)({
|
|
5291
4460
|
mutationFn: ({ formData }) => excel_service_default.uploadFile({
|
|
5292
4461
|
formData
|
|
5293
4462
|
})
|
|
@@ -5296,9 +4465,9 @@ var useUploadFile = () => {
|
|
|
5296
4465
|
var use_upload_file_default = useUploadFile;
|
|
5297
4466
|
|
|
5298
4467
|
// src/hooks/excel/use-upload-id-file.ts
|
|
5299
|
-
var
|
|
4468
|
+
var import_react_query21 = require("@tanstack/react-query");
|
|
5300
4469
|
var useUploadIdFile = () => {
|
|
5301
|
-
return (0,
|
|
4470
|
+
return (0, import_react_query21.useMutation)({
|
|
5302
4471
|
mutationFn: ({ formData }) => excel_service_default.uploadIdFile({
|
|
5303
4472
|
formData
|
|
5304
4473
|
})
|
|
@@ -5307,9 +4476,9 @@ var useUploadIdFile = () => {
|
|
|
5307
4476
|
var use_upload_id_file_default = useUploadIdFile;
|
|
5308
4477
|
|
|
5309
4478
|
// src/hooks/excel/uss-execute-import.ts
|
|
5310
|
-
var
|
|
4479
|
+
var import_react_query22 = require("@tanstack/react-query");
|
|
5311
4480
|
var useExecuteImport = () => {
|
|
5312
|
-
return (0,
|
|
4481
|
+
return (0, import_react_query22.useMutation)({
|
|
5313
4482
|
mutationFn: ({
|
|
5314
4483
|
fields,
|
|
5315
4484
|
columns,
|
|
@@ -5330,9 +4499,9 @@ var useExecuteImport = () => {
|
|
|
5330
4499
|
var uss_execute_import_default = useExecuteImport;
|
|
5331
4500
|
|
|
5332
4501
|
// src/hooks/form/use-change-status.ts
|
|
5333
|
-
var
|
|
4502
|
+
var import_react_query23 = require("@tanstack/react-query");
|
|
5334
4503
|
var useChangeStatus = () => {
|
|
5335
|
-
return (0,
|
|
4504
|
+
return (0, import_react_query23.useMutation)({
|
|
5336
4505
|
mutationFn: ({ data }) => {
|
|
5337
4506
|
return form_service_default.changeStatus({
|
|
5338
4507
|
data
|
|
@@ -5343,9 +4512,9 @@ var useChangeStatus = () => {
|
|
|
5343
4512
|
var use_change_status_default = useChangeStatus;
|
|
5344
4513
|
|
|
5345
4514
|
// src/hooks/form/use-delete-comment.ts
|
|
5346
|
-
var
|
|
4515
|
+
var import_react_query24 = require("@tanstack/react-query");
|
|
5347
4516
|
var useDeleteComment = () => {
|
|
5348
|
-
return (0,
|
|
4517
|
+
return (0, import_react_query24.useMutation)({
|
|
5349
4518
|
mutationFn: ({ data }) => form_service_default.deleteComment({
|
|
5350
4519
|
data
|
|
5351
4520
|
})
|
|
@@ -5354,9 +4523,9 @@ var useDeleteComment = () => {
|
|
|
5354
4523
|
var use_delete_comment_default = useDeleteComment;
|
|
5355
4524
|
|
|
5356
4525
|
// src/hooks/form/use-get-comment.ts
|
|
5357
|
-
var
|
|
4526
|
+
var import_react_query25 = require("@tanstack/react-query");
|
|
5358
4527
|
var useGetComment = ({ data, queryKey }) => {
|
|
5359
|
-
return (0,
|
|
4528
|
+
return (0, import_react_query25.useQuery)({
|
|
5360
4529
|
queryKey,
|
|
5361
4530
|
queryFn: () => form_service_default.getComment({ data }).then((res) => {
|
|
5362
4531
|
if (res) {
|
|
@@ -5370,13 +4539,13 @@ var useGetComment = ({ data, queryKey }) => {
|
|
|
5370
4539
|
var use_get_comment_default = useGetComment;
|
|
5371
4540
|
|
|
5372
4541
|
// src/hooks/form/use-get-form-view.ts
|
|
5373
|
-
var
|
|
4542
|
+
var import_react_query26 = require("@tanstack/react-query");
|
|
5374
4543
|
var useGetFormView = ({
|
|
5375
4544
|
data,
|
|
5376
4545
|
queryKey,
|
|
5377
4546
|
enabled
|
|
5378
4547
|
}) => {
|
|
5379
|
-
return (0,
|
|
4548
|
+
return (0, import_react_query26.useQuery)({
|
|
5380
4549
|
queryKey,
|
|
5381
4550
|
queryFn: () => form_service_default.getFormView({ data }).then((res) => {
|
|
5382
4551
|
if (res) {
|
|
@@ -5390,13 +4559,13 @@ var useGetFormView = ({
|
|
|
5390
4559
|
var use_get_form_view_default = useGetFormView;
|
|
5391
4560
|
|
|
5392
4561
|
// src/hooks/form/use-get-image.ts
|
|
5393
|
-
var
|
|
4562
|
+
var import_react_query27 = require("@tanstack/react-query");
|
|
5394
4563
|
var useGetImage = ({
|
|
5395
4564
|
data,
|
|
5396
4565
|
queryKey,
|
|
5397
4566
|
src
|
|
5398
4567
|
}) => {
|
|
5399
|
-
return (0,
|
|
4568
|
+
return (0, import_react_query27.useQuery)({
|
|
5400
4569
|
queryKey,
|
|
5401
4570
|
queryFn: () => form_service_default.getImage({ data }).then((res) => {
|
|
5402
4571
|
if (res) {
|
|
@@ -5410,9 +4579,9 @@ var useGetImage = ({
|
|
|
5410
4579
|
var use_get_image_default = useGetImage;
|
|
5411
4580
|
|
|
5412
4581
|
// src/hooks/form/use-send-comment.ts
|
|
5413
|
-
var
|
|
4582
|
+
var import_react_query28 = require("@tanstack/react-query");
|
|
5414
4583
|
var useSendComment = () => {
|
|
5415
|
-
return (0,
|
|
4584
|
+
return (0, import_react_query28.useMutation)({
|
|
5416
4585
|
mutationFn: ({ data }) => form_service_default.sentComment({
|
|
5417
4586
|
data
|
|
5418
4587
|
})
|
|
@@ -5421,9 +4590,9 @@ var useSendComment = () => {
|
|
|
5421
4590
|
var use_send_comment_default = useSendComment;
|
|
5422
4591
|
|
|
5423
4592
|
// src/hooks/form/use-upload-image.ts
|
|
5424
|
-
var
|
|
4593
|
+
var import_react_query29 = require("@tanstack/react-query");
|
|
5425
4594
|
var useUploadImage = () => {
|
|
5426
|
-
return (0,
|
|
4595
|
+
return (0, import_react_query29.useMutation)({
|
|
5427
4596
|
mutationFn: ({ data }) => form_service_default.uploadImage({
|
|
5428
4597
|
data
|
|
5429
4598
|
})
|
|
@@ -5432,18 +4601,18 @@ var useUploadImage = () => {
|
|
|
5432
4601
|
var use_upload_image_default = useUploadImage;
|
|
5433
4602
|
|
|
5434
4603
|
// src/hooks/model/use-delete.ts
|
|
5435
|
-
var
|
|
4604
|
+
var import_react_query30 = require("@tanstack/react-query");
|
|
5436
4605
|
var useDelete = () => {
|
|
5437
|
-
return (0,
|
|
4606
|
+
return (0, import_react_query30.useMutation)({
|
|
5438
4607
|
mutationFn: ({ ids, model }) => model_service_default.delete({ ids, model })
|
|
5439
4608
|
});
|
|
5440
4609
|
};
|
|
5441
4610
|
var use_delete_default = useDelete;
|
|
5442
4611
|
|
|
5443
4612
|
// src/hooks/model/use-get-all.ts
|
|
5444
|
-
var
|
|
4613
|
+
var import_react_query31 = require("@tanstack/react-query");
|
|
5445
4614
|
var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
5446
|
-
return (0,
|
|
4615
|
+
return (0, import_react_query31.useQuery)({
|
|
5447
4616
|
queryKey,
|
|
5448
4617
|
queryFn: () => model_service_default.getAll({ data }).then((res) => {
|
|
5449
4618
|
if (res) {
|
|
@@ -5458,9 +4627,9 @@ var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
|
5458
4627
|
var use_get_all_default = useGetAll;
|
|
5459
4628
|
|
|
5460
4629
|
// src/hooks/model/use-get-conversion-rate.ts
|
|
5461
|
-
var
|
|
4630
|
+
var import_react_query32 = require("@tanstack/react-query");
|
|
5462
4631
|
var useGetConversionRate = () => {
|
|
5463
|
-
return (0,
|
|
4632
|
+
return (0, import_react_query32.useQuery)({
|
|
5464
4633
|
queryKey: ["currency-rate"],
|
|
5465
4634
|
queryFn: () => model_service_default.getConversionRate().then((res) => {
|
|
5466
4635
|
if (res) {
|
|
@@ -5473,9 +4642,9 @@ var useGetConversionRate = () => {
|
|
|
5473
4642
|
var use_get_conversion_rate_default = useGetConversionRate;
|
|
5474
4643
|
|
|
5475
4644
|
// src/hooks/model/use-get-currency.ts
|
|
5476
|
-
var
|
|
4645
|
+
var import_react_query33 = require("@tanstack/react-query");
|
|
5477
4646
|
var useGetCurrency = () => {
|
|
5478
|
-
return (0,
|
|
4647
|
+
return (0, import_react_query33.useQuery)({
|
|
5479
4648
|
queryKey: ["currency"],
|
|
5480
4649
|
queryFn: () => model_service_default.getCurrency().then((res) => {
|
|
5481
4650
|
if (res) {
|
|
@@ -5488,9 +4657,9 @@ var useGetCurrency = () => {
|
|
|
5488
4657
|
var use_get_currency_default = useGetCurrency;
|
|
5489
4658
|
|
|
5490
4659
|
// src/hooks/model/use-get-detail.ts
|
|
5491
|
-
var
|
|
4660
|
+
var import_react_query34 = require("@tanstack/react-query");
|
|
5492
4661
|
var useGetDetail = () => {
|
|
5493
|
-
return (0,
|
|
4662
|
+
return (0, import_react_query34.useMutation)({
|
|
5494
4663
|
mutationFn: ({
|
|
5495
4664
|
model,
|
|
5496
4665
|
ids,
|
|
@@ -5507,9 +4676,9 @@ var useGetDetail = () => {
|
|
|
5507
4676
|
var use_get_detail_default = useGetDetail;
|
|
5508
4677
|
|
|
5509
4678
|
// src/hooks/model/use-get-field-onchange.ts
|
|
5510
|
-
var
|
|
4679
|
+
var import_react_query35 = require("@tanstack/react-query");
|
|
5511
4680
|
var useGetFieldOnChange = ({ model }) => {
|
|
5512
|
-
return (0,
|
|
4681
|
+
return (0, import_react_query35.useQuery)({
|
|
5513
4682
|
queryKey: [`field-onchange-${model}`, model],
|
|
5514
4683
|
queryFn: () => model_service_default.getListFieldsOnchange({
|
|
5515
4684
|
model
|
|
@@ -5525,13 +4694,13 @@ var useGetFieldOnChange = ({ model }) => {
|
|
|
5525
4694
|
var use_get_field_onchange_default = useGetFieldOnChange;
|
|
5526
4695
|
|
|
5527
4696
|
// src/hooks/model/use-get-list-my-bank-account.ts
|
|
5528
|
-
var
|
|
4697
|
+
var import_react_query36 = require("@tanstack/react-query");
|
|
5529
4698
|
var useGetListMyBankAccount = ({
|
|
5530
4699
|
domain,
|
|
5531
4700
|
spectification,
|
|
5532
4701
|
model
|
|
5533
4702
|
}) => {
|
|
5534
|
-
return (0,
|
|
4703
|
+
return (0, import_react_query36.useQuery)({
|
|
5535
4704
|
queryKey: ["bank-account", model, domain],
|
|
5536
4705
|
queryFn: () => model_service_default.getListMyBankAccount({
|
|
5537
4706
|
domain,
|
|
@@ -5683,9 +4852,9 @@ var useOdooDataTransform = () => {
|
|
|
5683
4852
|
var use_odoo_data_transform_default = useOdooDataTransform;
|
|
5684
4853
|
|
|
5685
4854
|
// src/hooks/model/use-onchange-form.ts
|
|
5686
|
-
var
|
|
4855
|
+
var import_react_query37 = require("@tanstack/react-query");
|
|
5687
4856
|
var useOnChangeForm = () => {
|
|
5688
|
-
return (0,
|
|
4857
|
+
return (0, import_react_query37.useMutation)({
|
|
5689
4858
|
mutationFn: ({
|
|
5690
4859
|
ids,
|
|
5691
4860
|
model,
|
|
@@ -5706,9 +4875,9 @@ var useOnChangeForm = () => {
|
|
|
5706
4875
|
var use_onchange_form_default = useOnChangeForm;
|
|
5707
4876
|
|
|
5708
4877
|
// src/hooks/model/use-save.ts
|
|
5709
|
-
var
|
|
4878
|
+
var import_react_query38 = require("@tanstack/react-query");
|
|
5710
4879
|
var useSave = () => {
|
|
5711
|
-
return (0,
|
|
4880
|
+
return (0, import_react_query38.useMutation)({
|
|
5712
4881
|
mutationFn: ({
|
|
5713
4882
|
ids,
|
|
5714
4883
|
model,
|
|
@@ -5722,18 +4891,18 @@ var useSave = () => {
|
|
|
5722
4891
|
var use_save_default = useSave;
|
|
5723
4892
|
|
|
5724
4893
|
// src/hooks/user/use-get-profile.ts
|
|
5725
|
-
var
|
|
4894
|
+
var import_react_query39 = require("@tanstack/react-query");
|
|
5726
4895
|
var useGetProfile = (path) => {
|
|
5727
|
-
return (0,
|
|
4896
|
+
return (0, import_react_query39.useMutation)({
|
|
5728
4897
|
mutationFn: () => user_service_default.getProfile(path)
|
|
5729
4898
|
});
|
|
5730
4899
|
};
|
|
5731
4900
|
var use_get_profile_default = useGetProfile;
|
|
5732
4901
|
|
|
5733
4902
|
// src/hooks/user/use-get-user.ts
|
|
5734
|
-
var
|
|
4903
|
+
var import_react_query40 = require("@tanstack/react-query");
|
|
5735
4904
|
var useGetUser = () => {
|
|
5736
|
-
return (0,
|
|
4905
|
+
return (0, import_react_query40.useMutation)({
|
|
5737
4906
|
mutationFn: ({ id, context }) => user_service_default.getUser({
|
|
5738
4907
|
id,
|
|
5739
4908
|
context
|
|
@@ -5743,9 +4912,9 @@ var useGetUser = () => {
|
|
|
5743
4912
|
var use_get_user_default = useGetUser;
|
|
5744
4913
|
|
|
5745
4914
|
// src/hooks/user/use-switch-locale.ts
|
|
5746
|
-
var
|
|
4915
|
+
var import_react_query41 = require("@tanstack/react-query");
|
|
5747
4916
|
var useSwitchLocale = () => {
|
|
5748
|
-
return (0,
|
|
4917
|
+
return (0, import_react_query41.useMutation)({
|
|
5749
4918
|
mutationFn: ({ data }) => {
|
|
5750
4919
|
return user_service_default.switchUserLocale({
|
|
5751
4920
|
id: data.id,
|
|
@@ -5757,9 +4926,9 @@ var useSwitchLocale = () => {
|
|
|
5757
4926
|
var use_switch_locale_default = useSwitchLocale;
|
|
5758
4927
|
|
|
5759
4928
|
// src/hooks/view/use-button.ts
|
|
5760
|
-
var
|
|
4929
|
+
var import_react_query42 = require("@tanstack/react-query");
|
|
5761
4930
|
var useButton = () => {
|
|
5762
|
-
return (0,
|
|
4931
|
+
return (0, import_react_query42.useMutation)({
|
|
5763
4932
|
mutationFn: ({
|
|
5764
4933
|
model,
|
|
5765
4934
|
ids,
|
|
@@ -5779,9 +4948,9 @@ var useButton = () => {
|
|
|
5779
4948
|
var use_button_default = useButton;
|
|
5780
4949
|
|
|
5781
4950
|
// src/hooks/view/use-duplicate-record.ts
|
|
5782
|
-
var
|
|
4951
|
+
var import_react_query43 = require("@tanstack/react-query");
|
|
5783
4952
|
var useDuplicateRecord = () => {
|
|
5784
|
-
return (0,
|
|
4953
|
+
return (0, import_react_query43.useMutation)({
|
|
5785
4954
|
mutationFn: ({
|
|
5786
4955
|
id,
|
|
5787
4956
|
model,
|
|
@@ -5796,7 +4965,7 @@ var useDuplicateRecord = () => {
|
|
|
5796
4965
|
var use_duplicate_record_default = useDuplicateRecord;
|
|
5797
4966
|
|
|
5798
4967
|
// src/hooks/view/use-get-action-detail.ts
|
|
5799
|
-
var
|
|
4968
|
+
var import_react_query44 = require("@tanstack/react-query");
|
|
5800
4969
|
var useGetActionDetail = ({
|
|
5801
4970
|
aid,
|
|
5802
4971
|
context,
|
|
@@ -5810,7 +4979,7 @@ var useGetActionDetail = ({
|
|
|
5810
4979
|
model: model ?? "",
|
|
5811
4980
|
context
|
|
5812
4981
|
};
|
|
5813
|
-
return (0,
|
|
4982
|
+
return (0, import_react_query44.useQuery)({
|
|
5814
4983
|
queryKey,
|
|
5815
4984
|
queryFn: async () => {
|
|
5816
4985
|
if (aid) {
|
|
@@ -5831,9 +5000,9 @@ var useGetActionDetail = ({
|
|
|
5831
5000
|
var use_get_action_detail_default = useGetActionDetail;
|
|
5832
5001
|
|
|
5833
5002
|
// src/hooks/view/use-get-calendar.ts
|
|
5834
|
-
var
|
|
5003
|
+
var import_react_query45 = require("@tanstack/react-query");
|
|
5835
5004
|
var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
5836
|
-
return (0,
|
|
5005
|
+
return (0, import_react_query45.useQuery)({
|
|
5837
5006
|
queryKey,
|
|
5838
5007
|
queryFn: () => model_service_default.getListCalendar({ data: listDataProps }).then((res) => {
|
|
5839
5008
|
if (res) {
|
|
@@ -5849,12 +5018,12 @@ var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
|
5849
5018
|
var use_get_calendar_default = useGetCalendar;
|
|
5850
5019
|
|
|
5851
5020
|
// src/hooks/view/use-get-groups.ts
|
|
5852
|
-
var
|
|
5021
|
+
var import_react_query46 = require("@tanstack/react-query");
|
|
5853
5022
|
var useGetGroups = ({
|
|
5854
5023
|
model,
|
|
5855
5024
|
width_context
|
|
5856
5025
|
}) => {
|
|
5857
|
-
return (0,
|
|
5026
|
+
return (0, import_react_query46.useQuery)({
|
|
5858
5027
|
queryKey: [model, width_context],
|
|
5859
5028
|
queryFn: () => kanban_service_default.getGroups({
|
|
5860
5029
|
model,
|
|
@@ -5871,9 +5040,9 @@ var useGetGroups = ({
|
|
|
5871
5040
|
var use_get_groups_default = useGetGroups;
|
|
5872
5041
|
|
|
5873
5042
|
// src/hooks/view/use-get-list-data.ts
|
|
5874
|
-
var
|
|
5043
|
+
var import_react_query47 = require("@tanstack/react-query");
|
|
5875
5044
|
var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
5876
|
-
return (0,
|
|
5045
|
+
return (0, import_react_query47.useQuery)({
|
|
5877
5046
|
queryKey,
|
|
5878
5047
|
queryFn: () => model_service_default.getAll({ data: listDataProps }).then((res) => {
|
|
5879
5048
|
if (res) {
|
|
@@ -5889,9 +5058,9 @@ var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
|
5889
5058
|
var use_get_list_data_default = useGetListData;
|
|
5890
5059
|
|
|
5891
5060
|
// src/hooks/view/use-get-menu.ts
|
|
5892
|
-
var
|
|
5061
|
+
var import_react_query48 = require("@tanstack/react-query");
|
|
5893
5062
|
var useGetMenu = (context, enabled) => {
|
|
5894
|
-
return (0,
|
|
5063
|
+
return (0, import_react_query48.useQuery)({
|
|
5895
5064
|
queryKey: ["menus" /* MENU */, context],
|
|
5896
5065
|
queryFn: () => view_service_default.getMenu(context).then((res) => {
|
|
5897
5066
|
if (res && res?.records && res?.records?.length > 0) {
|
|
@@ -5907,9 +5076,9 @@ var useGetMenu = (context, enabled) => {
|
|
|
5907
5076
|
var use_get_menu_default = useGetMenu;
|
|
5908
5077
|
|
|
5909
5078
|
// src/hooks/view/use-get-print-report.ts
|
|
5910
|
-
var
|
|
5079
|
+
var import_react_query49 = require("@tanstack/react-query");
|
|
5911
5080
|
var useGetPrintReport = () => {
|
|
5912
|
-
return (0,
|
|
5081
|
+
return (0, import_react_query49.useMutation)({
|
|
5913
5082
|
mutationFn: ({ id }) => action_service_default.getPrintReportName({
|
|
5914
5083
|
id
|
|
5915
5084
|
})
|
|
@@ -5918,14 +5087,14 @@ var useGetPrintReport = () => {
|
|
|
5918
5087
|
var use_get_print_report_default = useGetPrintReport;
|
|
5919
5088
|
|
|
5920
5089
|
// src/hooks/view/use-get-progress-bar.ts
|
|
5921
|
-
var
|
|
5090
|
+
var import_react_query50 = require("@tanstack/react-query");
|
|
5922
5091
|
var useGetProGressBar = ({
|
|
5923
5092
|
field,
|
|
5924
5093
|
color,
|
|
5925
5094
|
model,
|
|
5926
5095
|
width_context
|
|
5927
5096
|
}) => {
|
|
5928
|
-
return (0,
|
|
5097
|
+
return (0, import_react_query50.useQuery)({
|
|
5929
5098
|
queryKey: [],
|
|
5930
5099
|
queryFn: () => kanban_service_default.getProgressBar({
|
|
5931
5100
|
field,
|
|
@@ -5944,13 +5113,13 @@ var useGetProGressBar = ({
|
|
|
5944
5113
|
var use_get_progress_bar_default = useGetProGressBar;
|
|
5945
5114
|
|
|
5946
5115
|
// src/hooks/view/use-get-selection.ts
|
|
5947
|
-
var
|
|
5116
|
+
var import_react_query51 = require("@tanstack/react-query");
|
|
5948
5117
|
var useGetSelection = ({
|
|
5949
5118
|
data,
|
|
5950
5119
|
queryKey,
|
|
5951
5120
|
enabled
|
|
5952
5121
|
}) => {
|
|
5953
|
-
return (0,
|
|
5122
|
+
return (0, import_react_query51.useQuery)({
|
|
5954
5123
|
queryKey,
|
|
5955
5124
|
queryFn: () => view_service_default.getSelectionItem({ data }),
|
|
5956
5125
|
enabled,
|
|
@@ -5960,9 +5129,9 @@ var useGetSelection = ({
|
|
|
5960
5129
|
var use_get_selection_default = useGetSelection;
|
|
5961
5130
|
|
|
5962
5131
|
// src/hooks/view/use-get-view.ts
|
|
5963
|
-
var
|
|
5132
|
+
var import_react_query52 = require("@tanstack/react-query");
|
|
5964
5133
|
var useGetView = (viewParams, actData) => {
|
|
5965
|
-
return (0,
|
|
5134
|
+
return (0, import_react_query52.useQuery)({
|
|
5966
5135
|
queryKey: ["get_view_by_action" /* GET_VIEW_BY_ACTION */, viewParams],
|
|
5967
5136
|
queryFn: () => view_service_default.getView(viewParams),
|
|
5968
5137
|
enabled: !!actData,
|
|
@@ -5973,9 +5142,9 @@ var useGetView = (viewParams, actData) => {
|
|
|
5973
5142
|
var use_get_view_default = useGetView;
|
|
5974
5143
|
|
|
5975
5144
|
// src/hooks/view/use-load-action.ts
|
|
5976
|
-
var
|
|
5145
|
+
var import_react_query53 = require("@tanstack/react-query");
|
|
5977
5146
|
var useLoadAction = () => {
|
|
5978
|
-
return (0,
|
|
5147
|
+
return (0, import_react_query53.useMutation)({
|
|
5979
5148
|
mutationFn: ({
|
|
5980
5149
|
idAction,
|
|
5981
5150
|
context
|
|
@@ -5990,9 +5159,9 @@ var useLoadAction = () => {
|
|
|
5990
5159
|
var use_load_action_default = useLoadAction;
|
|
5991
5160
|
|
|
5992
5161
|
// src/hooks/view/use-load-message.ts
|
|
5993
|
-
var
|
|
5162
|
+
var import_react_query54 = require("@tanstack/react-query");
|
|
5994
5163
|
var useLoadMessage = () => {
|
|
5995
|
-
return (0,
|
|
5164
|
+
return (0, import_react_query54.useQuery)({
|
|
5996
5165
|
queryKey: [`load-message-failure`],
|
|
5997
5166
|
queryFn: () => view_service_default.loadMessages(),
|
|
5998
5167
|
refetchOnWindowFocus: false
|
|
@@ -6001,9 +5170,9 @@ var useLoadMessage = () => {
|
|
|
6001
5170
|
var use_load_message_default = useLoadMessage;
|
|
6002
5171
|
|
|
6003
5172
|
// src/hooks/view/use-print.ts
|
|
6004
|
-
var
|
|
5173
|
+
var import_react_query55 = require("@tanstack/react-query");
|
|
6005
5174
|
var usePrint = () => {
|
|
6006
|
-
return (0,
|
|
5175
|
+
return (0, import_react_query55.useMutation)({
|
|
6007
5176
|
mutationFn: ({ id, report, db }) => action_service_default.print({
|
|
6008
5177
|
id,
|
|
6009
5178
|
report,
|
|
@@ -6014,9 +5183,9 @@ var usePrint = () => {
|
|
|
6014
5183
|
var use_print_default = usePrint;
|
|
6015
5184
|
|
|
6016
5185
|
// src/hooks/view/use-remove-row.ts
|
|
6017
|
-
var
|
|
5186
|
+
var import_react_query56 = require("@tanstack/react-query");
|
|
6018
5187
|
var useRemoveRow = () => {
|
|
6019
|
-
return (0,
|
|
5188
|
+
return (0, import_react_query56.useMutation)({
|
|
6020
5189
|
mutationFn: ({
|
|
6021
5190
|
model,
|
|
6022
5191
|
ids,
|
|
@@ -6031,9 +5200,9 @@ var useRemoveRow = () => {
|
|
|
6031
5200
|
var use_remove_row_default = useRemoveRow;
|
|
6032
5201
|
|
|
6033
5202
|
// src/hooks/view/use-resequence.ts
|
|
6034
|
-
var
|
|
5203
|
+
var import_react_query57 = require("@tanstack/react-query");
|
|
6035
5204
|
var useGetResequence = (model, resIds, context, offset) => {
|
|
6036
|
-
return (0,
|
|
5205
|
+
return (0, import_react_query57.useQuery)({
|
|
6037
5206
|
queryKey: [],
|
|
6038
5207
|
queryFn: () => view_service_default.getResequence({
|
|
6039
5208
|
model,
|
|
@@ -6048,9 +5217,9 @@ var useGetResequence = (model, resIds, context, offset) => {
|
|
|
6048
5217
|
var use_resequence_default = useGetResequence;
|
|
6049
5218
|
|
|
6050
5219
|
// src/hooks/view/use-run-action.ts
|
|
6051
|
-
var
|
|
5220
|
+
var import_react_query58 = require("@tanstack/react-query");
|
|
6052
5221
|
var useRunAction = () => {
|
|
6053
|
-
return (0,
|
|
5222
|
+
return (0, import_react_query58.useMutation)({
|
|
6054
5223
|
mutationFn: ({
|
|
6055
5224
|
idAction,
|
|
6056
5225
|
context
|
|
@@ -6063,9 +5232,9 @@ var useRunAction = () => {
|
|
|
6063
5232
|
var use_run_action_default = useRunAction;
|
|
6064
5233
|
|
|
6065
5234
|
// src/hooks/view/use-signin-sso.ts
|
|
6066
|
-
var
|
|
5235
|
+
var import_react_query59 = require("@tanstack/react-query");
|
|
6067
5236
|
var useSignInSSO = () => {
|
|
6068
|
-
return (0,
|
|
5237
|
+
return (0, import_react_query59.useMutation)({
|
|
6069
5238
|
mutationFn: ({
|
|
6070
5239
|
redirect_uri,
|
|
6071
5240
|
state,
|
|
@@ -6086,9 +5255,9 @@ var useSignInSSO = () => {
|
|
|
6086
5255
|
var use_signin_sso_default = useSignInSSO;
|
|
6087
5256
|
|
|
6088
5257
|
// src/hooks/view/use-verify-2FA.ts
|
|
6089
|
-
var
|
|
5258
|
+
var import_react_query60 = require("@tanstack/react-query");
|
|
6090
5259
|
var useVerify2FA = () => {
|
|
6091
|
-
return (0,
|
|
5260
|
+
return (0, import_react_query60.useMutation)({
|
|
6092
5261
|
mutationFn: ({
|
|
6093
5262
|
method,
|
|
6094
5263
|
with_context,
|
|
@@ -6109,9 +5278,9 @@ var useVerify2FA = () => {
|
|
|
6109
5278
|
var use_verify_2FA_default = useVerify2FA;
|
|
6110
5279
|
|
|
6111
5280
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
6112
|
-
var
|
|
5281
|
+
var import_react_query61 = require("@tanstack/react-query");
|
|
6113
5282
|
var useGet2FAMethods = () => {
|
|
6114
|
-
return (0,
|
|
5283
|
+
return (0, import_react_query61.useMutation)({
|
|
6115
5284
|
mutationFn: ({
|
|
6116
5285
|
method,
|
|
6117
5286
|
with_context
|
|
@@ -6126,9 +5295,9 @@ var useGet2FAMethods = () => {
|
|
|
6126
5295
|
var uset_get_2FA_method_default = useGet2FAMethods;
|
|
6127
5296
|
|
|
6128
5297
|
// src/hooks/view/use-get-fields-view-security.ts
|
|
6129
|
-
var
|
|
5298
|
+
var import_react_query62 = require("@tanstack/react-query");
|
|
6130
5299
|
var useGetFieldsViewSecurity = () => {
|
|
6131
|
-
return (0,
|
|
5300
|
+
return (0, import_react_query62.useMutation)({
|
|
6132
5301
|
mutationFn: ({
|
|
6133
5302
|
method,
|
|
6134
5303
|
token,
|
|
@@ -6145,9 +5314,9 @@ var useGetFieldsViewSecurity = () => {
|
|
|
6145
5314
|
var use_get_fields_view_security_default = useGetFieldsViewSecurity;
|
|
6146
5315
|
|
|
6147
5316
|
// src/hooks/view/use-grant-access.ts
|
|
6148
|
-
var
|
|
5317
|
+
var import_react_query63 = require("@tanstack/react-query");
|
|
6149
5318
|
var useGrantAccess = () => {
|
|
6150
|
-
return (0,
|
|
5319
|
+
return (0, import_react_query63.useMutation)({
|
|
6151
5320
|
mutationFn: ({
|
|
6152
5321
|
redirect_uri,
|
|
6153
5322
|
state,
|
|
@@ -6166,9 +5335,9 @@ var useGrantAccess = () => {
|
|
|
6166
5335
|
var use_grant_access_default = useGrantAccess;
|
|
6167
5336
|
|
|
6168
5337
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
6169
|
-
var
|
|
5338
|
+
var import_react_query64 = require("@tanstack/react-query");
|
|
6170
5339
|
var useRemoveTotpSetup = () => {
|
|
6171
|
-
return (0,
|
|
5340
|
+
return (0, import_react_query64.useMutation)({
|
|
6172
5341
|
mutationFn: ({ method, token }) => {
|
|
6173
5342
|
return view_service_default.removeTotpSetUp({
|
|
6174
5343
|
method,
|
|
@@ -6180,9 +5349,9 @@ var useRemoveTotpSetup = () => {
|
|
|
6180
5349
|
var use_remove_totp_setup_default = useRemoveTotpSetup;
|
|
6181
5350
|
|
|
6182
5351
|
// src/hooks/view/use-request-setup-totp.ts
|
|
6183
|
-
var
|
|
5352
|
+
var import_react_query65 = require("@tanstack/react-query");
|
|
6184
5353
|
var useRequestSetupTotp = () => {
|
|
6185
|
-
return (0,
|
|
5354
|
+
return (0, import_react_query65.useMutation)({
|
|
6186
5355
|
mutationFn: ({ method, token }) => {
|
|
6187
5356
|
return view_service_default.requestSetupTotp({
|
|
6188
5357
|
method,
|
|
@@ -6194,9 +5363,9 @@ var useRequestSetupTotp = () => {
|
|
|
6194
5363
|
var use_request_setup_totp_default = useRequestSetupTotp;
|
|
6195
5364
|
|
|
6196
5365
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
6197
|
-
var
|
|
5366
|
+
var import_react_query66 = require("@tanstack/react-query");
|
|
6198
5367
|
var useSettingsWebRead2fa = () => {
|
|
6199
|
-
return (0,
|
|
5368
|
+
return (0, import_react_query66.useMutation)({
|
|
6200
5369
|
mutationFn: ({
|
|
6201
5370
|
method,
|
|
6202
5371
|
token,
|
|
@@ -6215,9 +5384,9 @@ var useSettingsWebRead2fa = () => {
|
|
|
6215
5384
|
var use_settings_web_read_2fa_default = useSettingsWebRead2fa;
|
|
6216
5385
|
|
|
6217
5386
|
// src/hooks/view/use-verify-totp.ts
|
|
6218
|
-
var
|
|
5387
|
+
var import_react_query67 = require("@tanstack/react-query");
|
|
6219
5388
|
var useVerifyTotp = () => {
|
|
6220
|
-
return (0,
|
|
5389
|
+
return (0, import_react_query67.useMutation)({
|
|
6221
5390
|
mutationFn: ({
|
|
6222
5391
|
method,
|
|
6223
5392
|
action_token,
|