@fctc/interface-logic 3.0.3 → 3.0.5
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.d.mts +6 -6
- package/dist/configs.d.ts +6 -6
- package/dist/configs.js +68 -34
- package/dist/configs.mjs +68 -34
- package/dist/environment.d.mts +8 -5
- package/dist/environment.d.ts +8 -5
- package/dist/environment.js +70 -36
- package/dist/environment.mjs +70 -36
- package/dist/hooks.d.mts +7 -3
- package/dist/hooks.d.ts +7 -3
- package/dist/hooks.js +41 -25
- package/dist/hooks.mjs +41 -25
- package/dist/{session-storage-ARp_lhTD.d.mts → local-storage-BPvoMGYJ.d.mts} +1 -6
- package/dist/{session-storage-ARp_lhTD.d.ts → local-storage-BPvoMGYJ.d.ts} +1 -6
- package/dist/provider.d.mts +4 -3
- package/dist/provider.d.ts +4 -3
- package/dist/provider.js +143 -95
- package/dist/provider.mjs +143 -95
- package/dist/services.d.mts +3 -3
- package/dist/services.d.ts +3 -3
- package/dist/services.js +35 -19
- package/dist/services.mjs +35 -19
- package/dist/utils.d.mts +15 -1
- package/dist/utils.d.ts +15 -1
- package/dist/utils.js +43 -0
- package/dist/utils.mjs +42 -0
- package/package.json +1 -1
package/dist/environment.mjs
CHANGED
|
@@ -2162,24 +2162,56 @@ var localStorageUtils = () => {
|
|
|
2162
2162
|
};
|
|
2163
2163
|
|
|
2164
2164
|
// src/utils/storage/session-storage.ts
|
|
2165
|
-
var sessionStorageUtils = () => {
|
|
2166
|
-
const
|
|
2167
|
-
|
|
2165
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2166
|
+
const getMenuFocus = () => {
|
|
2167
|
+
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2168
|
+
return menuFocus ? JSON.parse(menuFocus) : {
|
|
2169
|
+
id: void 0,
|
|
2170
|
+
service: ""
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
const setMenuFocus = (menuTree) => {
|
|
2174
|
+
sessionStorage.setItem("menuFocus", JSON.stringify({ ...menuTree }));
|
|
2175
|
+
};
|
|
2176
|
+
const getActionData = () => {
|
|
2177
|
+
const actionData = sessionStorage.getItem("actionData");
|
|
2178
|
+
return actionData ? JSON.parse(actionData) : {};
|
|
2179
|
+
};
|
|
2180
|
+
const setActionData = (actData) => {
|
|
2181
|
+
sessionStorage.setItem("actionData", JSON.stringify(actData));
|
|
2182
|
+
};
|
|
2183
|
+
const getViewData = () => {
|
|
2184
|
+
const viewData = sessionStorage.getItem("viewData");
|
|
2185
|
+
return viewData ? JSON.parse(viewData) : {};
|
|
2186
|
+
};
|
|
2187
|
+
const getBrowserSession = () => {
|
|
2188
|
+
const actionData = sessionStorage.getItem("browserSession");
|
|
2189
|
+
return actionData ? JSON.parse(actionData) : null;
|
|
2190
|
+
};
|
|
2191
|
+
const setViewData = (viewData) => {
|
|
2192
|
+
sessionStorage.setItem("viewData", JSON.stringify(viewData));
|
|
2168
2193
|
};
|
|
2169
2194
|
return {
|
|
2195
|
+
getMenuFocus,
|
|
2196
|
+
setMenuFocus,
|
|
2197
|
+
setActionData,
|
|
2198
|
+
getActionData,
|
|
2199
|
+
getViewData,
|
|
2200
|
+
setViewData,
|
|
2170
2201
|
getBrowserSession
|
|
2171
2202
|
};
|
|
2172
|
-
};
|
|
2203
|
+
})();
|
|
2173
2204
|
|
|
2174
2205
|
// src/configs/axios-client.ts
|
|
2175
2206
|
var axiosClient = {
|
|
2176
2207
|
init(config) {
|
|
2177
2208
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2178
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
2209
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2179
2210
|
const db = config?.db;
|
|
2180
2211
|
const database = config?.config?.database;
|
|
2181
2212
|
let isRefreshing = false;
|
|
2182
2213
|
let failedQueue = [];
|
|
2214
|
+
const xNode = config?.xNode;
|
|
2183
2215
|
const processQueue = (error, token = null) => {
|
|
2184
2216
|
failedQueue?.forEach((prom) => {
|
|
2185
2217
|
if (error) {
|
|
@@ -2334,46 +2366,48 @@ var axiosClient = {
|
|
|
2334
2366
|
function formatUrl(url, db2) {
|
|
2335
2367
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2336
2368
|
}
|
|
2337
|
-
const getBaseUrl = (baseUrl,
|
|
2338
|
-
|
|
2339
|
-
|
|
2369
|
+
const getBaseUrl = (baseUrl, hardService) => {
|
|
2370
|
+
return `${baseUrl.replace(/\/$/, "")}/${hardService ?? (sessionStorage2.getMenuFocus().service || config?.default_service)}/api/v2`;
|
|
2371
|
+
};
|
|
2372
|
+
const getHeaders = (header) => {
|
|
2373
|
+
const headers = {
|
|
2374
|
+
...header,
|
|
2375
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
2376
|
+
};
|
|
2377
|
+
return headers;
|
|
2340
2378
|
};
|
|
2341
2379
|
const responseBody = (response) => response;
|
|
2342
2380
|
const requests = {
|
|
2343
|
-
get: (url, headers,
|
|
2344
|
-
formatUrl(getBaseUrl(config?.baseUrl,
|
|
2345
|
-
headers
|
|
2381
|
+
get: (url, headers, hardService) => instance.get(
|
|
2382
|
+
formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
|
|
2383
|
+
getHeaders(headers)
|
|
2346
2384
|
).then(responseBody),
|
|
2347
|
-
post: async (url, body, headers,
|
|
2348
|
-
formatUrl(getBaseUrl(config?.baseUrl,
|
|
2385
|
+
post: async (url, body, headers, hardService) => instance.post(
|
|
2386
|
+
formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
|
|
2349
2387
|
body,
|
|
2350
|
-
headers
|
|
2388
|
+
getHeaders(headers)
|
|
2351
2389
|
).then(responseBody),
|
|
2352
|
-
post_excel: (url, body, headers
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
headers
|
|
2358
|
-
"Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
|
|
2359
|
-
Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2360
|
-
...headers
|
|
2361
|
-
}
|
|
2390
|
+
post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
|
|
2391
|
+
responseType: "arraybuffer",
|
|
2392
|
+
headers: {
|
|
2393
|
+
"Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
|
|
2394
|
+
Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2395
|
+
...headers
|
|
2362
2396
|
}
|
|
2363
|
-
).then(responseBody),
|
|
2364
|
-
put: (url, body, headers,
|
|
2365
|
-
formatUrl(getBaseUrl(config?.baseUrl,
|
|
2397
|
+
}).then(responseBody),
|
|
2398
|
+
put: (url, body, headers, hardService) => instance.put(
|
|
2399
|
+
formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
|
|
2366
2400
|
body,
|
|
2367
|
-
headers
|
|
2401
|
+
getHeaders(headers)
|
|
2368
2402
|
).then(responseBody),
|
|
2369
|
-
patch: (url, body, headers,
|
|
2370
|
-
formatUrl(getBaseUrl(config?.baseUrl,
|
|
2403
|
+
patch: (url, body, headers, hardService) => instance.patch(
|
|
2404
|
+
formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
|
|
2371
2405
|
body,
|
|
2372
|
-
headers
|
|
2406
|
+
getHeaders(headers)
|
|
2373
2407
|
).then(responseBody),
|
|
2374
|
-
delete: (url, headers,
|
|
2375
|
-
formatUrl(getBaseUrl(config?.baseUrl,
|
|
2376
|
-
headers
|
|
2408
|
+
delete: (url, headers, hardService) => instance.delete(
|
|
2409
|
+
formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
|
|
2410
|
+
getHeaders(headers)
|
|
2377
2411
|
).then(responseBody)
|
|
2378
2412
|
};
|
|
2379
2413
|
return requests;
|
|
@@ -2400,7 +2434,7 @@ var EnvStore = class {
|
|
|
2400
2434
|
emitter;
|
|
2401
2435
|
localStorageUtil;
|
|
2402
2436
|
sessionStorageUtil;
|
|
2403
|
-
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils
|
|
2437
|
+
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils) {
|
|
2404
2438
|
this.state = {
|
|
2405
2439
|
baseUrl: "",
|
|
2406
2440
|
requests: null,
|
|
@@ -2489,7 +2523,7 @@ var EnvStore = class {
|
|
|
2489
2523
|
var env = null;
|
|
2490
2524
|
function initEnv({
|
|
2491
2525
|
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
2492
|
-
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
2526
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
2493
2527
|
}) {
|
|
2494
2528
|
if (!env) {
|
|
2495
2529
|
env = new EnvStore(localStorageUtil, sessionStorageUtil);
|
package/dist/hooks.d.mts
CHANGED
|
@@ -42,9 +42,13 @@ declare const useValidateActionToken: () => _tanstack_react_query.UseMutationRes
|
|
|
42
42
|
actionToken: string;
|
|
43
43
|
}, unknown>;
|
|
44
44
|
|
|
45
|
-
declare const useGetCompanyInfo: (
|
|
45
|
+
declare const useGetCompanyInfo: ({ service }: {
|
|
46
|
+
service?: string;
|
|
47
|
+
}) => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
|
|
46
48
|
|
|
47
|
-
declare const useGetCurrentCompany: (
|
|
49
|
+
declare const useGetCurrentCompany: ({ service }: {
|
|
50
|
+
service?: string;
|
|
51
|
+
}) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
48
52
|
|
|
49
53
|
declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
50
54
|
|
|
@@ -224,7 +228,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
|
|
|
224
228
|
xNode?: string;
|
|
225
229
|
}, unknown>;
|
|
226
230
|
|
|
227
|
-
declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
231
|
+
declare const useGetProfile: (path?: string, service?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
228
232
|
|
|
229
233
|
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
230
234
|
id: any;
|
package/dist/hooks.d.ts
CHANGED
|
@@ -42,9 +42,13 @@ declare const useValidateActionToken: () => _tanstack_react_query.UseMutationRes
|
|
|
42
42
|
actionToken: string;
|
|
43
43
|
}, unknown>;
|
|
44
44
|
|
|
45
|
-
declare const useGetCompanyInfo: (
|
|
45
|
+
declare const useGetCompanyInfo: ({ service }: {
|
|
46
|
+
service?: string;
|
|
47
|
+
}) => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
|
|
46
48
|
|
|
47
|
-
declare const useGetCurrentCompany: (
|
|
49
|
+
declare const useGetCurrentCompany: ({ service }: {
|
|
50
|
+
service?: string;
|
|
51
|
+
}) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
48
52
|
|
|
49
53
|
declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
50
54
|
|
|
@@ -224,7 +228,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
|
|
|
224
228
|
xNode?: string;
|
|
225
229
|
}, unknown>;
|
|
226
230
|
|
|
227
|
-
declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
231
|
+
declare const useGetProfile: (path?: string, service?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
228
232
|
|
|
229
233
|
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
230
234
|
id: any;
|
package/dist/hooks.js
CHANGED
|
@@ -3389,15 +3389,22 @@ function useAuthService() {
|
|
|
3389
3389
|
var import_react8 = require("react");
|
|
3390
3390
|
function useCompanyService() {
|
|
3391
3391
|
const { env } = useEnv();
|
|
3392
|
-
const getCurrentCompany = (0, import_react8.useCallback)(
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
"
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3392
|
+
const getCurrentCompany = (0, import_react8.useCallback)(
|
|
3393
|
+
async (service) => {
|
|
3394
|
+
return await env.requests.get(
|
|
3395
|
+
"/company" /* COMPANY_PATH */,
|
|
3396
|
+
{
|
|
3397
|
+
headers: {
|
|
3398
|
+
"Content-Type": "application/json"
|
|
3399
|
+
}
|
|
3400
|
+
},
|
|
3401
|
+
service
|
|
3402
|
+
);
|
|
3403
|
+
},
|
|
3404
|
+
[env]
|
|
3405
|
+
);
|
|
3399
3406
|
const getInfoCompany = (0, import_react8.useCallback)(
|
|
3400
|
-
async (id) => {
|
|
3407
|
+
async (id, service) => {
|
|
3401
3408
|
const jsonData = {
|
|
3402
3409
|
ids: [id],
|
|
3403
3410
|
model: "res.company" /* COMPANY */,
|
|
@@ -3412,11 +3419,16 @@ function useCompanyService() {
|
|
|
3412
3419
|
}
|
|
3413
3420
|
}
|
|
3414
3421
|
};
|
|
3415
|
-
return await env.requests.post(
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3422
|
+
return await env.requests.post(
|
|
3423
|
+
"/call" /* CALL_PATH */,
|
|
3424
|
+
jsonData,
|
|
3425
|
+
{
|
|
3426
|
+
headers: {
|
|
3427
|
+
"Content-Type": "application/json"
|
|
3428
|
+
}
|
|
3429
|
+
},
|
|
3430
|
+
service
|
|
3431
|
+
);
|
|
3420
3432
|
},
|
|
3421
3433
|
[env]
|
|
3422
3434
|
);
|
|
@@ -4256,12 +4268,16 @@ var import_react13 = require("react");
|
|
|
4256
4268
|
function useUserService() {
|
|
4257
4269
|
const { env } = useEnv();
|
|
4258
4270
|
const getProfile = (0, import_react13.useCallback)(
|
|
4259
|
-
async (path) => {
|
|
4260
|
-
return env?.requests?.get(
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4271
|
+
async (path, service) => {
|
|
4272
|
+
return env?.requests?.get(
|
|
4273
|
+
path ?? "/userinfo" /* PROFILE_PATH */,
|
|
4274
|
+
{
|
|
4275
|
+
headers: {
|
|
4276
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
4277
|
+
}
|
|
4278
|
+
},
|
|
4279
|
+
service
|
|
4280
|
+
);
|
|
4265
4281
|
},
|
|
4266
4282
|
[env]
|
|
4267
4283
|
);
|
|
@@ -5464,20 +5480,20 @@ var use_validate_action_token_default = useValidateActionToken;
|
|
|
5464
5480
|
|
|
5465
5481
|
// src/hooks/company/use-get-company-info.ts
|
|
5466
5482
|
var import_react_query15 = require("@tanstack/react-query");
|
|
5467
|
-
var useGetCompanyInfo = () => {
|
|
5483
|
+
var useGetCompanyInfo = ({ service }) => {
|
|
5468
5484
|
const { getInfoCompany } = useCompanyService();
|
|
5469
5485
|
return (0, import_react_query15.useMutation)({
|
|
5470
|
-
mutationFn: (id) => getInfoCompany(id)
|
|
5486
|
+
mutationFn: (id) => getInfoCompany(id, service)
|
|
5471
5487
|
});
|
|
5472
5488
|
};
|
|
5473
5489
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5474
5490
|
|
|
5475
5491
|
// src/hooks/company/use-get-current-company.ts
|
|
5476
5492
|
var import_react_query16 = require("@tanstack/react-query");
|
|
5477
|
-
var useGetCurrentCompany = () => {
|
|
5493
|
+
var useGetCurrentCompany = ({ service }) => {
|
|
5478
5494
|
const { getCurrentCompany } = useCompanyService();
|
|
5479
5495
|
return (0, import_react_query16.useMutation)({
|
|
5480
|
-
mutationFn: () => getCurrentCompany()
|
|
5496
|
+
mutationFn: () => getCurrentCompany(service)
|
|
5481
5497
|
});
|
|
5482
5498
|
};
|
|
5483
5499
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
@@ -6120,10 +6136,10 @@ var use_save_default = useSave;
|
|
|
6120
6136
|
|
|
6121
6137
|
// src/hooks/user/use-get-profile.ts
|
|
6122
6138
|
var import_react_query42 = require("@tanstack/react-query");
|
|
6123
|
-
var useGetProfile = (path) => {
|
|
6139
|
+
var useGetProfile = (path, service) => {
|
|
6124
6140
|
const { getProfile } = useUserService();
|
|
6125
6141
|
return (0, import_react_query42.useMutation)({
|
|
6126
|
-
mutationFn: () => getProfile(path)
|
|
6142
|
+
mutationFn: () => getProfile(path, service)
|
|
6127
6143
|
});
|
|
6128
6144
|
};
|
|
6129
6145
|
var use_get_profile_default = useGetProfile;
|
package/dist/hooks.mjs
CHANGED
|
@@ -3266,15 +3266,22 @@ function useAuthService() {
|
|
|
3266
3266
|
import { useCallback as useCallback4 } from "react";
|
|
3267
3267
|
function useCompanyService() {
|
|
3268
3268
|
const { env } = useEnv();
|
|
3269
|
-
const getCurrentCompany = useCallback4(
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
"
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3269
|
+
const getCurrentCompany = useCallback4(
|
|
3270
|
+
async (service) => {
|
|
3271
|
+
return await env.requests.get(
|
|
3272
|
+
"/company" /* COMPANY_PATH */,
|
|
3273
|
+
{
|
|
3274
|
+
headers: {
|
|
3275
|
+
"Content-Type": "application/json"
|
|
3276
|
+
}
|
|
3277
|
+
},
|
|
3278
|
+
service
|
|
3279
|
+
);
|
|
3280
|
+
},
|
|
3281
|
+
[env]
|
|
3282
|
+
);
|
|
3276
3283
|
const getInfoCompany = useCallback4(
|
|
3277
|
-
async (id) => {
|
|
3284
|
+
async (id, service) => {
|
|
3278
3285
|
const jsonData = {
|
|
3279
3286
|
ids: [id],
|
|
3280
3287
|
model: "res.company" /* COMPANY */,
|
|
@@ -3289,11 +3296,16 @@ function useCompanyService() {
|
|
|
3289
3296
|
}
|
|
3290
3297
|
}
|
|
3291
3298
|
};
|
|
3292
|
-
return await env.requests.post(
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3299
|
+
return await env.requests.post(
|
|
3300
|
+
"/call" /* CALL_PATH */,
|
|
3301
|
+
jsonData,
|
|
3302
|
+
{
|
|
3303
|
+
headers: {
|
|
3304
|
+
"Content-Type": "application/json"
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3307
|
+
service
|
|
3308
|
+
);
|
|
3297
3309
|
},
|
|
3298
3310
|
[env]
|
|
3299
3311
|
);
|
|
@@ -4133,12 +4145,16 @@ import { useCallback as useCallback9 } from "react";
|
|
|
4133
4145
|
function useUserService() {
|
|
4134
4146
|
const { env } = useEnv();
|
|
4135
4147
|
const getProfile = useCallback9(
|
|
4136
|
-
async (path) => {
|
|
4137
|
-
return env?.requests?.get(
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4148
|
+
async (path, service) => {
|
|
4149
|
+
return env?.requests?.get(
|
|
4150
|
+
path ?? "/userinfo" /* PROFILE_PATH */,
|
|
4151
|
+
{
|
|
4152
|
+
headers: {
|
|
4153
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
4154
|
+
}
|
|
4155
|
+
},
|
|
4156
|
+
service
|
|
4157
|
+
);
|
|
4142
4158
|
},
|
|
4143
4159
|
[env]
|
|
4144
4160
|
);
|
|
@@ -5341,20 +5357,20 @@ var use_validate_action_token_default = useValidateActionToken;
|
|
|
5341
5357
|
|
|
5342
5358
|
// src/hooks/company/use-get-company-info.ts
|
|
5343
5359
|
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
5344
|
-
var useGetCompanyInfo = () => {
|
|
5360
|
+
var useGetCompanyInfo = ({ service }) => {
|
|
5345
5361
|
const { getInfoCompany } = useCompanyService();
|
|
5346
5362
|
return useMutation13({
|
|
5347
|
-
mutationFn: (id) => getInfoCompany(id)
|
|
5363
|
+
mutationFn: (id) => getInfoCompany(id, service)
|
|
5348
5364
|
});
|
|
5349
5365
|
};
|
|
5350
5366
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5351
5367
|
|
|
5352
5368
|
// src/hooks/company/use-get-current-company.ts
|
|
5353
5369
|
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
5354
|
-
var useGetCurrentCompany = () => {
|
|
5370
|
+
var useGetCurrentCompany = ({ service }) => {
|
|
5355
5371
|
const { getCurrentCompany } = useCompanyService();
|
|
5356
5372
|
return useMutation14({
|
|
5357
|
-
mutationFn: () => getCurrentCompany()
|
|
5373
|
+
mutationFn: () => getCurrentCompany(service)
|
|
5358
5374
|
});
|
|
5359
5375
|
};
|
|
5360
5376
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
@@ -5997,10 +6013,10 @@ var use_save_default = useSave;
|
|
|
5997
6013
|
|
|
5998
6014
|
// src/hooks/user/use-get-profile.ts
|
|
5999
6015
|
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
6000
|
-
var useGetProfile = (path) => {
|
|
6016
|
+
var useGetProfile = (path, service) => {
|
|
6001
6017
|
const { getProfile } = useUserService();
|
|
6002
6018
|
return useMutation30({
|
|
6003
|
-
mutationFn: () => getProfile(path)
|
|
6019
|
+
mutationFn: () => getProfile(path, service)
|
|
6004
6020
|
});
|
|
6005
6021
|
};
|
|
6006
6022
|
var use_get_profile_default = useGetProfile;
|
|
@@ -7,9 +7,4 @@ declare const localStorageUtils: () => {
|
|
|
7
7
|
};
|
|
8
8
|
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
getBrowserSession: () => Promise<string | null>;
|
|
12
|
-
};
|
|
13
|
-
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
14
|
-
|
|
15
|
-
export type { LocalStorageUtilsType as L, SessionStorageUtilsType as S };
|
|
10
|
+
export type { LocalStorageUtilsType as L };
|
|
@@ -7,9 +7,4 @@ declare const localStorageUtils: () => {
|
|
|
7
7
|
};
|
|
8
8
|
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
getBrowserSession: () => Promise<string | null>;
|
|
12
|
-
};
|
|
13
|
-
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
14
|
-
|
|
15
|
-
export type { LocalStorageUtilsType as L, SessionStorageUtilsType as S };
|
|
10
|
+
export type { LocalStorageUtilsType as L };
|
package/dist/provider.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { L as LocalStorageUtilsType
|
|
3
|
+
import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.mjs';
|
|
4
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useGetDataCloseSession, useGetDetailEntity } from './hooks.mjs';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './view-type-xxw9OeSR.mjs';
|
|
@@ -42,13 +42,14 @@ interface EnvConfig {
|
|
|
42
42
|
db?: string;
|
|
43
43
|
refreshTokenEndpoint?: string;
|
|
44
44
|
localStorageUtils?: LocalStorageUtilsType;
|
|
45
|
-
sessionStorageUtils?:
|
|
45
|
+
sessionStorageUtils?: any;
|
|
46
46
|
envFile?: any;
|
|
47
|
+
xNode?: string;
|
|
47
48
|
}
|
|
48
49
|
declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
49
50
|
children: React.ReactNode;
|
|
50
51
|
localStorageUtils?: LocalStorageUtilsType;
|
|
51
|
-
sessionStorageUtils?:
|
|
52
|
+
sessionStorageUtils?: any;
|
|
52
53
|
}): react_jsx_runtime.JSX.Element;
|
|
53
54
|
declare function useEnv(): {
|
|
54
55
|
env: EnvConfig;
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { L as LocalStorageUtilsType
|
|
3
|
+
import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.js';
|
|
4
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useGetDataCloseSession, useGetDetailEntity } from './hooks.js';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './view-type-xxw9OeSR.js';
|
|
@@ -42,13 +42,14 @@ interface EnvConfig {
|
|
|
42
42
|
db?: string;
|
|
43
43
|
refreshTokenEndpoint?: string;
|
|
44
44
|
localStorageUtils?: LocalStorageUtilsType;
|
|
45
|
-
sessionStorageUtils?:
|
|
45
|
+
sessionStorageUtils?: any;
|
|
46
46
|
envFile?: any;
|
|
47
|
+
xNode?: string;
|
|
47
48
|
}
|
|
48
49
|
declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
49
50
|
children: React.ReactNode;
|
|
50
51
|
localStorageUtils?: LocalStorageUtilsType;
|
|
51
|
-
sessionStorageUtils?:
|
|
52
|
+
sessionStorageUtils?: any;
|
|
52
53
|
}): react_jsx_runtime.JSX.Element;
|
|
53
54
|
declare function useEnv(): {
|
|
54
55
|
env: EnvConfig;
|