@fctc/interface-logic 3.0.0 → 3.0.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/configs.js +4 -5
- package/dist/configs.mjs +4 -5
- package/dist/environment.d.mts +7 -6
- package/dist/environment.d.ts +7 -6
- package/dist/environment.js +6 -7
- package/dist/environment.mjs +6 -7
- package/dist/provider.d.mts +2 -3
- package/dist/provider.d.ts +2 -3
- package/dist/provider.js +5 -6
- package/dist/provider.mjs +5 -6
- package/dist/utils.d.mts +14 -2
- package/dist/utils.d.ts +14 -2
- package/dist/utils.js +2 -2
- package/dist/utils.mjs +2 -2
- package/package.json +1 -1
- package/dist/session-storage-Cy6Flv_N.d.mts +0 -16
- package/dist/session-storage-Cy6Flv_N.d.ts +0 -16
package/dist/configs.js
CHANGED
|
@@ -2198,7 +2198,7 @@ var localStorageUtils = () => {
|
|
|
2198
2198
|
};
|
|
2199
2199
|
|
|
2200
2200
|
// src/utils/storage/session-storage.ts
|
|
2201
|
-
var sessionStorageUtils = () => {
|
|
2201
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2202
2202
|
const getMenuFocus = () => {
|
|
2203
2203
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2204
2204
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2236,19 +2236,18 @@ var sessionStorageUtils = () => {
|
|
|
2236
2236
|
setViewData,
|
|
2237
2237
|
getBrowserSession
|
|
2238
2238
|
};
|
|
2239
|
-
};
|
|
2239
|
+
})();
|
|
2240
2240
|
|
|
2241
2241
|
// src/configs/axios-client.ts
|
|
2242
2242
|
var axiosClient = {
|
|
2243
2243
|
init(config) {
|
|
2244
2244
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2245
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
2245
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2246
2246
|
const db = config?.db;
|
|
2247
2247
|
const database = config?.config?.database;
|
|
2248
2248
|
let isRefreshing = false;
|
|
2249
2249
|
let failedQueue = [];
|
|
2250
2250
|
const xNode = config?.xNode;
|
|
2251
|
-
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
2252
2251
|
const processQueue = (error, token = null) => {
|
|
2253
2252
|
failedQueue?.forEach((prom) => {
|
|
2254
2253
|
if (error) {
|
|
@@ -2404,7 +2403,7 @@ var axiosClient = {
|
|
|
2404
2403
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2405
2404
|
}
|
|
2406
2405
|
const getBaseUrl = (baseUrl) => {
|
|
2407
|
-
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
2406
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2408
2407
|
};
|
|
2409
2408
|
const getHeaders = (header) => {
|
|
2410
2409
|
const headers = {
|
package/dist/configs.mjs
CHANGED
|
@@ -2162,7 +2162,7 @@ var localStorageUtils = () => {
|
|
|
2162
2162
|
};
|
|
2163
2163
|
|
|
2164
2164
|
// src/utils/storage/session-storage.ts
|
|
2165
|
-
var sessionStorageUtils = () => {
|
|
2165
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2166
2166
|
const getMenuFocus = () => {
|
|
2167
2167
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2168
2168
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2200,19 +2200,18 @@ var sessionStorageUtils = () => {
|
|
|
2200
2200
|
setViewData,
|
|
2201
2201
|
getBrowserSession
|
|
2202
2202
|
};
|
|
2203
|
-
};
|
|
2203
|
+
})();
|
|
2204
2204
|
|
|
2205
2205
|
// src/configs/axios-client.ts
|
|
2206
2206
|
var axiosClient = {
|
|
2207
2207
|
init(config) {
|
|
2208
2208
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2209
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
2209
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2210
2210
|
const db = config?.db;
|
|
2211
2211
|
const database = config?.config?.database;
|
|
2212
2212
|
let isRefreshing = false;
|
|
2213
2213
|
let failedQueue = [];
|
|
2214
2214
|
const xNode = config?.xNode;
|
|
2215
|
-
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
2216
2215
|
const processQueue = (error, token = null) => {
|
|
2217
2216
|
failedQueue?.forEach((prom) => {
|
|
2218
2217
|
if (error) {
|
|
@@ -2368,7 +2367,7 @@ var axiosClient = {
|
|
|
2368
2367
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2369
2368
|
}
|
|
2370
2369
|
const getBaseUrl = (baseUrl) => {
|
|
2371
|
-
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
2370
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2372
2371
|
};
|
|
2373
2372
|
const getHeaders = (header) => {
|
|
2374
2373
|
const headers = {
|
package/dist/environment.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.mjs';
|
|
2
|
-
import { S as SessionStorageUtilsType } from './session-storage-Cy6Flv_N.mjs';
|
|
3
2
|
|
|
4
3
|
interface EnvConfig {
|
|
4
|
+
env?: any;
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
requests?: any;
|
|
7
7
|
context?: {
|
|
@@ -16,23 +16,24 @@ interface EnvConfig {
|
|
|
16
16
|
secondary_color?: string;
|
|
17
17
|
primary_color?: string;
|
|
18
18
|
};
|
|
19
|
+
database?: string;
|
|
20
|
+
xNode?: string;
|
|
21
|
+
default_service?: string;
|
|
19
22
|
config?: any;
|
|
20
23
|
companies?: any[];
|
|
21
24
|
user?: any;
|
|
22
25
|
db?: string;
|
|
23
|
-
database?: string;
|
|
24
26
|
refreshTokenEndpoint?: string;
|
|
25
27
|
localStorageUtils?: LocalStorageUtilsType;
|
|
26
|
-
sessionStorageUtils?:
|
|
28
|
+
sessionStorageUtils?: any;
|
|
27
29
|
envFile?: any;
|
|
28
|
-
xNode?: string;
|
|
29
30
|
}
|
|
30
31
|
declare class EnvStore {
|
|
31
32
|
private state;
|
|
32
33
|
private emitter;
|
|
33
34
|
private localStorageUtil;
|
|
34
35
|
private sessionStorageUtil;
|
|
35
|
-
constructor(localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?:
|
|
36
|
+
constructor(localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?: any);
|
|
36
37
|
getEnv(): EnvConfig;
|
|
37
38
|
onUpdate(callback: (env: EnvConfig) => void): void;
|
|
38
39
|
setupEnv(envConfig: Partial<EnvConfig>): EnvConfig;
|
|
@@ -47,7 +48,7 @@ declare class EnvStore {
|
|
|
47
48
|
}
|
|
48
49
|
declare function initEnv({ localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
49
50
|
localStorageUtils?: LocalStorageUtilsType;
|
|
50
|
-
sessionStorageUtils?:
|
|
51
|
+
sessionStorageUtils?: any;
|
|
51
52
|
}): EnvStore;
|
|
52
53
|
declare function getEnv(): any;
|
|
53
54
|
|
package/dist/environment.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.js';
|
|
2
|
-
import { S as SessionStorageUtilsType } from './session-storage-Cy6Flv_N.js';
|
|
3
2
|
|
|
4
3
|
interface EnvConfig {
|
|
4
|
+
env?: any;
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
requests?: any;
|
|
7
7
|
context?: {
|
|
@@ -16,23 +16,24 @@ interface EnvConfig {
|
|
|
16
16
|
secondary_color?: string;
|
|
17
17
|
primary_color?: string;
|
|
18
18
|
};
|
|
19
|
+
database?: string;
|
|
20
|
+
xNode?: string;
|
|
21
|
+
default_service?: string;
|
|
19
22
|
config?: any;
|
|
20
23
|
companies?: any[];
|
|
21
24
|
user?: any;
|
|
22
25
|
db?: string;
|
|
23
|
-
database?: string;
|
|
24
26
|
refreshTokenEndpoint?: string;
|
|
25
27
|
localStorageUtils?: LocalStorageUtilsType;
|
|
26
|
-
sessionStorageUtils?:
|
|
28
|
+
sessionStorageUtils?: any;
|
|
27
29
|
envFile?: any;
|
|
28
|
-
xNode?: string;
|
|
29
30
|
}
|
|
30
31
|
declare class EnvStore {
|
|
31
32
|
private state;
|
|
32
33
|
private emitter;
|
|
33
34
|
private localStorageUtil;
|
|
34
35
|
private sessionStorageUtil;
|
|
35
|
-
constructor(localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?:
|
|
36
|
+
constructor(localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?: any);
|
|
36
37
|
getEnv(): EnvConfig;
|
|
37
38
|
onUpdate(callback: (env: EnvConfig) => void): void;
|
|
38
39
|
setupEnv(envConfig: Partial<EnvConfig>): EnvConfig;
|
|
@@ -47,7 +48,7 @@ declare class EnvStore {
|
|
|
47
48
|
}
|
|
48
49
|
declare function initEnv({ localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
49
50
|
localStorageUtils?: LocalStorageUtilsType;
|
|
50
|
-
sessionStorageUtils?:
|
|
51
|
+
sessionStorageUtils?: any;
|
|
51
52
|
}): EnvStore;
|
|
52
53
|
declare function getEnv(): any;
|
|
53
54
|
|
package/dist/environment.js
CHANGED
|
@@ -2200,7 +2200,7 @@ var localStorageUtils = () => {
|
|
|
2200
2200
|
};
|
|
2201
2201
|
|
|
2202
2202
|
// src/utils/storage/session-storage.ts
|
|
2203
|
-
var sessionStorageUtils = () => {
|
|
2203
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2204
2204
|
const getMenuFocus = () => {
|
|
2205
2205
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2206
2206
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2238,19 +2238,18 @@ var sessionStorageUtils = () => {
|
|
|
2238
2238
|
setViewData,
|
|
2239
2239
|
getBrowserSession
|
|
2240
2240
|
};
|
|
2241
|
-
};
|
|
2241
|
+
})();
|
|
2242
2242
|
|
|
2243
2243
|
// src/configs/axios-client.ts
|
|
2244
2244
|
var axiosClient = {
|
|
2245
2245
|
init(config) {
|
|
2246
2246
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2247
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
2247
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2248
2248
|
const db = config?.db;
|
|
2249
2249
|
const database = config?.config?.database;
|
|
2250
2250
|
let isRefreshing = false;
|
|
2251
2251
|
let failedQueue = [];
|
|
2252
2252
|
const xNode = config?.xNode;
|
|
2253
|
-
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
2254
2253
|
const processQueue = (error, token = null) => {
|
|
2255
2254
|
failedQueue?.forEach((prom) => {
|
|
2256
2255
|
if (error) {
|
|
@@ -2406,7 +2405,7 @@ var axiosClient = {
|
|
|
2406
2405
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2407
2406
|
}
|
|
2408
2407
|
const getBaseUrl = (baseUrl) => {
|
|
2409
|
-
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
2408
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2410
2409
|
};
|
|
2411
2410
|
const getHeaders = (header) => {
|
|
2412
2411
|
const headers = {
|
|
@@ -2473,7 +2472,7 @@ var EnvStore = class {
|
|
|
2473
2472
|
emitter;
|
|
2474
2473
|
localStorageUtil;
|
|
2475
2474
|
sessionStorageUtil;
|
|
2476
|
-
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils
|
|
2475
|
+
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils) {
|
|
2477
2476
|
this.state = {
|
|
2478
2477
|
baseUrl: "",
|
|
2479
2478
|
requests: null,
|
|
@@ -2562,7 +2561,7 @@ var EnvStore = class {
|
|
|
2562
2561
|
var env = null;
|
|
2563
2562
|
function initEnv({
|
|
2564
2563
|
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
2565
|
-
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
2564
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
2566
2565
|
}) {
|
|
2567
2566
|
if (!env) {
|
|
2568
2567
|
env = new EnvStore(localStorageUtil, sessionStorageUtil);
|
package/dist/environment.mjs
CHANGED
|
@@ -2162,7 +2162,7 @@ var localStorageUtils = () => {
|
|
|
2162
2162
|
};
|
|
2163
2163
|
|
|
2164
2164
|
// src/utils/storage/session-storage.ts
|
|
2165
|
-
var sessionStorageUtils = () => {
|
|
2165
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2166
2166
|
const getMenuFocus = () => {
|
|
2167
2167
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2168
2168
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2200,19 +2200,18 @@ var sessionStorageUtils = () => {
|
|
|
2200
2200
|
setViewData,
|
|
2201
2201
|
getBrowserSession
|
|
2202
2202
|
};
|
|
2203
|
-
};
|
|
2203
|
+
})();
|
|
2204
2204
|
|
|
2205
2205
|
// src/configs/axios-client.ts
|
|
2206
2206
|
var axiosClient = {
|
|
2207
2207
|
init(config) {
|
|
2208
2208
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2209
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
2209
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2210
2210
|
const db = config?.db;
|
|
2211
2211
|
const database = config?.config?.database;
|
|
2212
2212
|
let isRefreshing = false;
|
|
2213
2213
|
let failedQueue = [];
|
|
2214
2214
|
const xNode = config?.xNode;
|
|
2215
|
-
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
2216
2215
|
const processQueue = (error, token = null) => {
|
|
2217
2216
|
failedQueue?.forEach((prom) => {
|
|
2218
2217
|
if (error) {
|
|
@@ -2368,7 +2367,7 @@ var axiosClient = {
|
|
|
2368
2367
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2369
2368
|
}
|
|
2370
2369
|
const getBaseUrl = (baseUrl) => {
|
|
2371
|
-
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
2370
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2372
2371
|
};
|
|
2373
2372
|
const getHeaders = (header) => {
|
|
2374
2373
|
const headers = {
|
|
@@ -2435,7 +2434,7 @@ var EnvStore = class {
|
|
|
2435
2434
|
emitter;
|
|
2436
2435
|
localStorageUtil;
|
|
2437
2436
|
sessionStorageUtil;
|
|
2438
|
-
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils
|
|
2437
|
+
constructor(localStorageUtil = localStorageUtils(), sessionStorageUtil = sessionStorageUtils) {
|
|
2439
2438
|
this.state = {
|
|
2440
2439
|
baseUrl: "",
|
|
2441
2440
|
requests: null,
|
|
@@ -2524,7 +2523,7 @@ var EnvStore = class {
|
|
|
2524
2523
|
var env = null;
|
|
2525
2524
|
function initEnv({
|
|
2526
2525
|
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
2527
|
-
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
2526
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
2528
2527
|
}) {
|
|
2529
2528
|
if (!env) {
|
|
2530
2529
|
env = new EnvStore(localStorageUtil, sessionStorageUtil);
|
package/dist/provider.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.mjs';
|
|
4
|
-
import { S as SessionStorageUtilsType } from './session-storage-Cy6Flv_N.mjs';
|
|
5
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 } from './hooks.mjs';
|
|
6
5
|
import '@tanstack/react-query';
|
|
7
6
|
import './view-type-xxw9OeSR.mjs';
|
|
@@ -43,14 +42,14 @@ interface EnvConfig {
|
|
|
43
42
|
db?: string;
|
|
44
43
|
refreshTokenEndpoint?: string;
|
|
45
44
|
localStorageUtils?: LocalStorageUtilsType;
|
|
46
|
-
sessionStorageUtils?:
|
|
45
|
+
sessionStorageUtils?: any;
|
|
47
46
|
envFile?: any;
|
|
48
47
|
xNode?: string;
|
|
49
48
|
}
|
|
50
49
|
declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
51
50
|
children: React.ReactNode;
|
|
52
51
|
localStorageUtils?: LocalStorageUtilsType;
|
|
53
|
-
sessionStorageUtils?:
|
|
52
|
+
sessionStorageUtils?: any;
|
|
54
53
|
}): react_jsx_runtime.JSX.Element;
|
|
55
54
|
declare function useEnv(): {
|
|
56
55
|
env: EnvConfig;
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.js';
|
|
4
|
-
import { S as SessionStorageUtilsType } from './session-storage-Cy6Flv_N.js';
|
|
5
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 } from './hooks.js';
|
|
6
5
|
import '@tanstack/react-query';
|
|
7
6
|
import './view-type-xxw9OeSR.js';
|
|
@@ -43,14 +42,14 @@ interface EnvConfig {
|
|
|
43
42
|
db?: string;
|
|
44
43
|
refreshTokenEndpoint?: string;
|
|
45
44
|
localStorageUtils?: LocalStorageUtilsType;
|
|
46
|
-
sessionStorageUtils?:
|
|
45
|
+
sessionStorageUtils?: any;
|
|
47
46
|
envFile?: any;
|
|
48
47
|
xNode?: string;
|
|
49
48
|
}
|
|
50
49
|
declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
51
50
|
children: React.ReactNode;
|
|
52
51
|
localStorageUtils?: LocalStorageUtilsType;
|
|
53
|
-
sessionStorageUtils?:
|
|
52
|
+
sessionStorageUtils?: any;
|
|
54
53
|
}): react_jsx_runtime.JSX.Element;
|
|
55
54
|
declare function useEnv(): {
|
|
56
55
|
env: EnvConfig;
|
package/dist/provider.js
CHANGED
|
@@ -2920,7 +2920,7 @@ var localStorageUtils = () => {
|
|
|
2920
2920
|
};
|
|
2921
2921
|
|
|
2922
2922
|
// src/utils/storage/session-storage.ts
|
|
2923
|
-
var sessionStorageUtils = () => {
|
|
2923
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2924
2924
|
const getMenuFocus = () => {
|
|
2925
2925
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2926
2926
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2958,7 +2958,7 @@ var sessionStorageUtils = () => {
|
|
|
2958
2958
|
setViewData,
|
|
2959
2959
|
getBrowserSession
|
|
2960
2960
|
};
|
|
2961
|
-
};
|
|
2961
|
+
})();
|
|
2962
2962
|
|
|
2963
2963
|
// src/services/action-service/index.ts
|
|
2964
2964
|
function useActionService() {
|
|
@@ -5291,13 +5291,12 @@ var import_axios = __toESM(require("axios"));
|
|
|
5291
5291
|
var axiosClient = {
|
|
5292
5292
|
init(config) {
|
|
5293
5293
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
5294
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
5294
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
5295
5295
|
const db = config?.db;
|
|
5296
5296
|
const database = config?.config?.database;
|
|
5297
5297
|
let isRefreshing = false;
|
|
5298
5298
|
let failedQueue = [];
|
|
5299
5299
|
const xNode = config?.xNode;
|
|
5300
|
-
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
5301
5300
|
const processQueue = (error, token = null) => {
|
|
5302
5301
|
failedQueue?.forEach((prom) => {
|
|
5303
5302
|
if (error) {
|
|
@@ -5453,7 +5452,7 @@ var axiosClient = {
|
|
|
5453
5452
|
return url + (db2 ? "?db=" + db2 : "");
|
|
5454
5453
|
}
|
|
5455
5454
|
const getBaseUrl = (baseUrl) => {
|
|
5456
|
-
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
5455
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
5457
5456
|
};
|
|
5458
5457
|
const getHeaders = (header) => {
|
|
5459
5458
|
const headers = {
|
|
@@ -5527,7 +5526,7 @@ var EnvContext = (0, import_react12.createContext)(null);
|
|
|
5527
5526
|
function EnvProvider({
|
|
5528
5527
|
children,
|
|
5529
5528
|
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
5530
|
-
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
5529
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
5531
5530
|
}) {
|
|
5532
5531
|
const [env, setEnvState] = (0, import_react12.useState)({
|
|
5533
5532
|
...initialEnvState,
|
package/dist/provider.mjs
CHANGED
|
@@ -2877,7 +2877,7 @@ var localStorageUtils = () => {
|
|
|
2877
2877
|
};
|
|
2878
2878
|
|
|
2879
2879
|
// src/utils/storage/session-storage.ts
|
|
2880
|
-
var sessionStorageUtils = () => {
|
|
2880
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2881
2881
|
const getMenuFocus = () => {
|
|
2882
2882
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2883
2883
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2915,7 +2915,7 @@ var sessionStorageUtils = () => {
|
|
|
2915
2915
|
setViewData,
|
|
2916
2916
|
getBrowserSession
|
|
2917
2917
|
};
|
|
2918
|
-
};
|
|
2918
|
+
})();
|
|
2919
2919
|
|
|
2920
2920
|
// src/services/action-service/index.ts
|
|
2921
2921
|
function useActionService() {
|
|
@@ -5248,13 +5248,12 @@ import axios from "axios";
|
|
|
5248
5248
|
var axiosClient = {
|
|
5249
5249
|
init(config) {
|
|
5250
5250
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
5251
|
-
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils
|
|
5251
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
5252
5252
|
const db = config?.db;
|
|
5253
5253
|
const database = config?.config?.database;
|
|
5254
5254
|
let isRefreshing = false;
|
|
5255
5255
|
let failedQueue = [];
|
|
5256
5256
|
const xNode = config?.xNode;
|
|
5257
|
-
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
5258
5257
|
const processQueue = (error, token = null) => {
|
|
5259
5258
|
failedQueue?.forEach((prom) => {
|
|
5260
5259
|
if (error) {
|
|
@@ -5410,7 +5409,7 @@ var axiosClient = {
|
|
|
5410
5409
|
return url + (db2 ? "?db=" + db2 : "");
|
|
5411
5410
|
}
|
|
5412
5411
|
const getBaseUrl = (baseUrl) => {
|
|
5413
|
-
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
5412
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
5414
5413
|
};
|
|
5415
5414
|
const getHeaders = (header) => {
|
|
5416
5415
|
const headers = {
|
|
@@ -5484,7 +5483,7 @@ var EnvContext = createContext(null);
|
|
|
5484
5483
|
function EnvProvider({
|
|
5485
5484
|
children,
|
|
5486
5485
|
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
5487
|
-
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
5486
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
5488
5487
|
}) {
|
|
5489
5488
|
const [env, setEnvState] = useState3({
|
|
5490
5489
|
...initialEnvState,
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
declare const sessionStorageUtils: {
|
|
2
|
+
getMenuFocus: () => IMenu;
|
|
3
|
+
setMenuFocus: (menuTree: IMenu) => void;
|
|
4
|
+
setActionData: (actData: any) => void;
|
|
5
|
+
getActionData: () => any | null;
|
|
6
|
+
getViewData: () => any | null;
|
|
7
|
+
setViewData: (viewData: any) => void;
|
|
8
|
+
getBrowserSession: () => string | null;
|
|
9
|
+
};
|
|
10
|
+
interface IMenu {
|
|
11
|
+
id: number | undefined;
|
|
12
|
+
service: string;
|
|
13
|
+
}
|
|
2
14
|
|
|
3
15
|
declare class WesapError extends Error {
|
|
4
16
|
code: number;
|
|
@@ -93,4 +105,4 @@ declare const useField: (props: any) => {
|
|
|
93
105
|
nameField: string | null;
|
|
94
106
|
};
|
|
95
107
|
|
|
96
|
-
export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };
|
|
108
|
+
export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, sessionStorageUtils, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
declare const sessionStorageUtils: {
|
|
2
|
+
getMenuFocus: () => IMenu;
|
|
3
|
+
setMenuFocus: (menuTree: IMenu) => void;
|
|
4
|
+
setActionData: (actData: any) => void;
|
|
5
|
+
getActionData: () => any | null;
|
|
6
|
+
getViewData: () => any | null;
|
|
7
|
+
setViewData: (viewData: any) => void;
|
|
8
|
+
getBrowserSession: () => string | null;
|
|
9
|
+
};
|
|
10
|
+
interface IMenu {
|
|
11
|
+
id: number | undefined;
|
|
12
|
+
service: string;
|
|
13
|
+
}
|
|
2
14
|
|
|
3
15
|
declare class WesapError extends Error {
|
|
4
16
|
code: number;
|
|
@@ -93,4 +105,4 @@ declare const useField: (props: any) => {
|
|
|
93
105
|
nameField: string | null;
|
|
94
106
|
};
|
|
95
107
|
|
|
96
|
-
export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };
|
|
108
|
+
export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, sessionStorageUtils, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };
|
package/dist/utils.js
CHANGED
|
@@ -2941,7 +2941,7 @@ var useField = (props) => {
|
|
|
2941
2941
|
};
|
|
2942
2942
|
|
|
2943
2943
|
// src/utils/storage/session-storage.ts
|
|
2944
|
-
var sessionStorageUtils = () => {
|
|
2944
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2945
2945
|
const getMenuFocus = () => {
|
|
2946
2946
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2947
2947
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2979,7 +2979,7 @@ var sessionStorageUtils = () => {
|
|
|
2979
2979
|
setViewData,
|
|
2980
2980
|
getBrowserSession
|
|
2981
2981
|
};
|
|
2982
|
-
};
|
|
2982
|
+
})();
|
|
2983
2983
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2984
2984
|
0 && (module.exports = {
|
|
2985
2985
|
WesapError,
|
package/dist/utils.mjs
CHANGED
|
@@ -2875,7 +2875,7 @@ var useField = (props) => {
|
|
|
2875
2875
|
};
|
|
2876
2876
|
|
|
2877
2877
|
// src/utils/storage/session-storage.ts
|
|
2878
|
-
var sessionStorageUtils = () => {
|
|
2878
|
+
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2879
2879
|
const getMenuFocus = () => {
|
|
2880
2880
|
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2881
2881
|
return menuFocus ? JSON.parse(menuFocus) : {
|
|
@@ -2913,7 +2913,7 @@ var sessionStorageUtils = () => {
|
|
|
2913
2913
|
setViewData,
|
|
2914
2914
|
getBrowserSession
|
|
2915
2915
|
};
|
|
2916
|
-
};
|
|
2916
|
+
})();
|
|
2917
2917
|
export {
|
|
2918
2918
|
WesapError,
|
|
2919
2919
|
checkIsImageLink,
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const sessionStorageUtils: () => {
|
|
2
|
-
getMenuFocus: () => IMenu;
|
|
3
|
-
setMenuFocus: (menuTree: IMenu) => void;
|
|
4
|
-
setActionData: (actData: any) => void;
|
|
5
|
-
getActionData: () => any | null;
|
|
6
|
-
getViewData: () => any | null;
|
|
7
|
-
setViewData: (viewData: any) => void;
|
|
8
|
-
getBrowserSession: () => string | null;
|
|
9
|
-
};
|
|
10
|
-
interface IMenu {
|
|
11
|
-
id: number | undefined;
|
|
12
|
-
service: string;
|
|
13
|
-
}
|
|
14
|
-
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
15
|
-
|
|
16
|
-
export { type SessionStorageUtilsType as S, sessionStorageUtils as s };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const sessionStorageUtils: () => {
|
|
2
|
-
getMenuFocus: () => IMenu;
|
|
3
|
-
setMenuFocus: (menuTree: IMenu) => void;
|
|
4
|
-
setActionData: (actData: any) => void;
|
|
5
|
-
getActionData: () => any | null;
|
|
6
|
-
getViewData: () => any | null;
|
|
7
|
-
setViewData: (viewData: any) => void;
|
|
8
|
-
getBrowserSession: () => string | null;
|
|
9
|
-
};
|
|
10
|
-
interface IMenu {
|
|
11
|
-
id: number | undefined;
|
|
12
|
-
service: string;
|
|
13
|
-
}
|
|
14
|
-
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
15
|
-
|
|
16
|
-
export { type SessionStorageUtilsType as S, sessionStorageUtils as s };
|