@fctc/interface-logic 3.0.1 → 3.0.3
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 +33 -68
- package/dist/configs.mjs +33 -68
- package/dist/constants.d.mts +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/environment.d.mts +5 -8
- package/dist/environment.d.ts +5 -8
- package/dist/environment.js +35 -70
- package/dist/environment.mjs +35 -70
- package/dist/hooks.d.mts +17 -1
- package/dist/hooks.d.ts +17 -1
- package/dist/hooks.js +110 -1
- package/dist/hooks.mjs +108 -1
- package/dist/provider.d.mts +6 -5
- package/dist/provider.d.ts +6 -5
- package/dist/provider.js +178 -104
- package/dist/provider.mjs +178 -104
- package/dist/services.d.mts +14 -0
- package/dist/services.d.ts +14 -0
- package/dist/services.js +64 -1
- package/dist/services.mjs +64 -1
- package/dist/{local-storage-BPvoMGYJ.d.mts → session-storage-ARp_lhTD.d.mts} +6 -1
- package/dist/{local-storage-BPvoMGYJ.d.ts → session-storage-ARp_lhTD.d.ts} +6 -1
- package/dist/utils.d.mts +1 -15
- package/dist/utils.d.ts +1 -15
- package/dist/utils.js +0 -43
- package/dist/utils.mjs +0 -42
- package/package.json +1 -1
package/dist/services.d.mts
CHANGED
|
@@ -408,6 +408,20 @@ declare function useViewService(): {
|
|
|
408
408
|
service: string;
|
|
409
409
|
xNode: string;
|
|
410
410
|
}) => any;
|
|
411
|
+
getDataCloseSession: ({ model, ids, xNode, service, }: {
|
|
412
|
+
model: string;
|
|
413
|
+
ids: any;
|
|
414
|
+
service: string;
|
|
415
|
+
xNode: string;
|
|
416
|
+
}) => any;
|
|
417
|
+
getDetailEntity: ({ model, ids, method, xNode, service, kwargs, }: {
|
|
418
|
+
model: string;
|
|
419
|
+
ids: any;
|
|
420
|
+
method: string;
|
|
421
|
+
service: string;
|
|
422
|
+
xNode: string;
|
|
423
|
+
kwargs: any;
|
|
424
|
+
}) => any;
|
|
411
425
|
};
|
|
412
426
|
|
|
413
427
|
export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
|
package/dist/services.d.ts
CHANGED
|
@@ -408,6 +408,20 @@ declare function useViewService(): {
|
|
|
408
408
|
service: string;
|
|
409
409
|
xNode: string;
|
|
410
410
|
}) => any;
|
|
411
|
+
getDataCloseSession: ({ model, ids, xNode, service, }: {
|
|
412
|
+
model: string;
|
|
413
|
+
ids: any;
|
|
414
|
+
service: string;
|
|
415
|
+
xNode: string;
|
|
416
|
+
}) => any;
|
|
417
|
+
getDetailEntity: ({ model, ids, method, xNode, service, kwargs, }: {
|
|
418
|
+
model: string;
|
|
419
|
+
ids: any;
|
|
420
|
+
method: string;
|
|
421
|
+
service: string;
|
|
422
|
+
xNode: string;
|
|
423
|
+
kwargs: any;
|
|
424
|
+
}) => any;
|
|
411
425
|
};
|
|
412
426
|
|
|
413
427
|
export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
|
package/dist/services.js
CHANGED
|
@@ -3105,6 +3105,12 @@ var import_react_query85 = require("@tanstack/react-query");
|
|
|
3105
3105
|
// src/hooks/view/use-check-payment.ts
|
|
3106
3106
|
var import_react_query86 = require("@tanstack/react-query");
|
|
3107
3107
|
|
|
3108
|
+
// src/hooks/view/use-get-data-close-session.ts
|
|
3109
|
+
var import_react_query87 = require("@tanstack/react-query");
|
|
3110
|
+
|
|
3111
|
+
// src/hooks/view/use-get-detail-entity.ts
|
|
3112
|
+
var import_react_query88 = require("@tanstack/react-query");
|
|
3113
|
+
|
|
3108
3114
|
// src/provider/service-provider.tsx
|
|
3109
3115
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3110
3116
|
var ServiceContext = (0, import_react4.createContext)(null);
|
|
@@ -5365,6 +5371,61 @@ function useViewService() {
|
|
|
5365
5371
|
},
|
|
5366
5372
|
[env]
|
|
5367
5373
|
);
|
|
5374
|
+
const getDataCloseSession = (0, import_react14.useCallback)(
|
|
5375
|
+
({
|
|
5376
|
+
model,
|
|
5377
|
+
ids,
|
|
5378
|
+
xNode,
|
|
5379
|
+
service
|
|
5380
|
+
}) => {
|
|
5381
|
+
const jsonData = {
|
|
5382
|
+
model,
|
|
5383
|
+
ids,
|
|
5384
|
+
method: "get_closing_control_data" /* GET_CLOSING_CONTROL_DATA */
|
|
5385
|
+
};
|
|
5386
|
+
return env?.requests.post(
|
|
5387
|
+
"/call" /* CALL_PATH */,
|
|
5388
|
+
jsonData,
|
|
5389
|
+
{
|
|
5390
|
+
headers: {
|
|
5391
|
+
"Content-Type": "application/json",
|
|
5392
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5393
|
+
}
|
|
5394
|
+
},
|
|
5395
|
+
service
|
|
5396
|
+
);
|
|
5397
|
+
},
|
|
5398
|
+
[env]
|
|
5399
|
+
);
|
|
5400
|
+
const getDetailEntity = (0, import_react14.useCallback)(
|
|
5401
|
+
({
|
|
5402
|
+
model,
|
|
5403
|
+
ids,
|
|
5404
|
+
method,
|
|
5405
|
+
xNode,
|
|
5406
|
+
service,
|
|
5407
|
+
kwargs
|
|
5408
|
+
}) => {
|
|
5409
|
+
const jsonData = {
|
|
5410
|
+
model,
|
|
5411
|
+
ids,
|
|
5412
|
+
method,
|
|
5413
|
+
kwargs
|
|
5414
|
+
};
|
|
5415
|
+
return env?.requests.post(
|
|
5416
|
+
"/call" /* CALL_PATH */,
|
|
5417
|
+
jsonData,
|
|
5418
|
+
{
|
|
5419
|
+
headers: {
|
|
5420
|
+
"Content-Type": "application/json",
|
|
5421
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5422
|
+
}
|
|
5423
|
+
},
|
|
5424
|
+
service
|
|
5425
|
+
);
|
|
5426
|
+
},
|
|
5427
|
+
[env]
|
|
5428
|
+
);
|
|
5368
5429
|
return {
|
|
5369
5430
|
getView,
|
|
5370
5431
|
getMenu,
|
|
@@ -5396,7 +5457,9 @@ function useViewService() {
|
|
|
5396
5457
|
getOrderLine,
|
|
5397
5458
|
getProductImage,
|
|
5398
5459
|
addEntity,
|
|
5399
|
-
checkPayment
|
|
5460
|
+
checkPayment,
|
|
5461
|
+
getDataCloseSession,
|
|
5462
|
+
getDetailEntity
|
|
5400
5463
|
};
|
|
5401
5464
|
}
|
|
5402
5465
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/services.mjs
CHANGED
|
@@ -3061,6 +3061,12 @@ import { useMutation as useMutation63 } from "@tanstack/react-query";
|
|
|
3061
3061
|
// src/hooks/view/use-check-payment.ts
|
|
3062
3062
|
import { useMutation as useMutation64 } from "@tanstack/react-query";
|
|
3063
3063
|
|
|
3064
|
+
// src/hooks/view/use-get-data-close-session.ts
|
|
3065
|
+
import { useMutation as useMutation65 } from "@tanstack/react-query";
|
|
3066
|
+
|
|
3067
|
+
// src/hooks/view/use-get-detail-entity.ts
|
|
3068
|
+
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
3069
|
+
|
|
3064
3070
|
// src/provider/service-provider.tsx
|
|
3065
3071
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3066
3072
|
var ServiceContext = createContext2(null);
|
|
@@ -5321,6 +5327,61 @@ function useViewService() {
|
|
|
5321
5327
|
},
|
|
5322
5328
|
[env]
|
|
5323
5329
|
);
|
|
5330
|
+
const getDataCloseSession = useCallback10(
|
|
5331
|
+
({
|
|
5332
|
+
model,
|
|
5333
|
+
ids,
|
|
5334
|
+
xNode,
|
|
5335
|
+
service
|
|
5336
|
+
}) => {
|
|
5337
|
+
const jsonData = {
|
|
5338
|
+
model,
|
|
5339
|
+
ids,
|
|
5340
|
+
method: "get_closing_control_data" /* GET_CLOSING_CONTROL_DATA */
|
|
5341
|
+
};
|
|
5342
|
+
return env?.requests.post(
|
|
5343
|
+
"/call" /* CALL_PATH */,
|
|
5344
|
+
jsonData,
|
|
5345
|
+
{
|
|
5346
|
+
headers: {
|
|
5347
|
+
"Content-Type": "application/json",
|
|
5348
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5349
|
+
}
|
|
5350
|
+
},
|
|
5351
|
+
service
|
|
5352
|
+
);
|
|
5353
|
+
},
|
|
5354
|
+
[env]
|
|
5355
|
+
);
|
|
5356
|
+
const getDetailEntity = useCallback10(
|
|
5357
|
+
({
|
|
5358
|
+
model,
|
|
5359
|
+
ids,
|
|
5360
|
+
method,
|
|
5361
|
+
xNode,
|
|
5362
|
+
service,
|
|
5363
|
+
kwargs
|
|
5364
|
+
}) => {
|
|
5365
|
+
const jsonData = {
|
|
5366
|
+
model,
|
|
5367
|
+
ids,
|
|
5368
|
+
method,
|
|
5369
|
+
kwargs
|
|
5370
|
+
};
|
|
5371
|
+
return env?.requests.post(
|
|
5372
|
+
"/call" /* CALL_PATH */,
|
|
5373
|
+
jsonData,
|
|
5374
|
+
{
|
|
5375
|
+
headers: {
|
|
5376
|
+
"Content-Type": "application/json",
|
|
5377
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5378
|
+
}
|
|
5379
|
+
},
|
|
5380
|
+
service
|
|
5381
|
+
);
|
|
5382
|
+
},
|
|
5383
|
+
[env]
|
|
5384
|
+
);
|
|
5324
5385
|
return {
|
|
5325
5386
|
getView,
|
|
5326
5387
|
getMenu,
|
|
@@ -5352,7 +5413,9 @@ function useViewService() {
|
|
|
5352
5413
|
getOrderLine,
|
|
5353
5414
|
getProductImage,
|
|
5354
5415
|
addEntity,
|
|
5355
|
-
checkPayment
|
|
5416
|
+
checkPayment,
|
|
5417
|
+
getDataCloseSession,
|
|
5418
|
+
getDetailEntity
|
|
5356
5419
|
};
|
|
5357
5420
|
}
|
|
5358
5421
|
export {
|
|
@@ -7,4 +7,9 @@ declare const localStorageUtils: () => {
|
|
|
7
7
|
};
|
|
8
8
|
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
declare const sessionStorageUtils: () => {
|
|
11
|
+
getBrowserSession: () => Promise<string | null>;
|
|
12
|
+
};
|
|
13
|
+
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
14
|
+
|
|
15
|
+
export type { LocalStorageUtilsType as L, SessionStorageUtilsType as S };
|
|
@@ -7,4 +7,9 @@ declare const localStorageUtils: () => {
|
|
|
7
7
|
};
|
|
8
8
|
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
declare const sessionStorageUtils: () => {
|
|
11
|
+
getBrowserSession: () => Promise<string | null>;
|
|
12
|
+
};
|
|
13
|
+
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
14
|
+
|
|
15
|
+
export type { LocalStorageUtilsType as L, SessionStorageUtilsType as S };
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
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
|
-
|
|
15
1
|
declare class WesapError extends Error {
|
|
16
2
|
code: number;
|
|
17
3
|
constructor(message: string, code: number);
|
|
@@ -105,4 +91,4 @@ declare const useField: (props: any) => {
|
|
|
105
91
|
nameField: string | null;
|
|
106
92
|
};
|
|
107
93
|
|
|
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,
|
|
94
|
+
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 };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
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
|
-
|
|
15
1
|
declare class WesapError extends Error {
|
|
16
2
|
code: number;
|
|
17
3
|
constructor(message: string, code: number);
|
|
@@ -105,4 +91,4 @@ declare const useField: (props: any) => {
|
|
|
105
91
|
nameField: string | null;
|
|
106
92
|
};
|
|
107
93
|
|
|
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,
|
|
94
|
+
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 };
|
package/dist/utils.js
CHANGED
|
@@ -54,7 +54,6 @@ __export(utils_exports, {
|
|
|
54
54
|
mergeObjects: () => mergeObjects,
|
|
55
55
|
removeUndefinedFields: () => removeUndefinedFields,
|
|
56
56
|
resequence: () => resequence,
|
|
57
|
-
sessionStorageUtils: () => sessionStorageUtils,
|
|
58
57
|
stringToColor: () => stringToColor,
|
|
59
58
|
toQueryString: () => toQueryString,
|
|
60
59
|
updateTokenParamInOriginalRequest: () => updateTokenParamInOriginalRequest,
|
|
@@ -2939,47 +2938,6 @@ var useField = (props) => {
|
|
|
2939
2938
|
nameField
|
|
2940
2939
|
};
|
|
2941
2940
|
};
|
|
2942
|
-
|
|
2943
|
-
// src/utils/storage/session-storage.ts
|
|
2944
|
-
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2945
|
-
const getMenuFocus = () => {
|
|
2946
|
-
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2947
|
-
return menuFocus ? JSON.parse(menuFocus) : {
|
|
2948
|
-
id: void 0,
|
|
2949
|
-
service: ""
|
|
2950
|
-
};
|
|
2951
|
-
};
|
|
2952
|
-
const setMenuFocus = (menuTree) => {
|
|
2953
|
-
sessionStorage.setItem("menuFocus", JSON.stringify({ ...menuTree }));
|
|
2954
|
-
};
|
|
2955
|
-
const getActionData = () => {
|
|
2956
|
-
const actionData = sessionStorage.getItem("actionData");
|
|
2957
|
-
return actionData ? JSON.parse(actionData) : {};
|
|
2958
|
-
};
|
|
2959
|
-
const setActionData = (actData) => {
|
|
2960
|
-
sessionStorage.setItem("actionData", JSON.stringify(actData));
|
|
2961
|
-
};
|
|
2962
|
-
const getViewData = () => {
|
|
2963
|
-
const viewData = sessionStorage.getItem("viewData");
|
|
2964
|
-
return viewData ? JSON.parse(viewData) : {};
|
|
2965
|
-
};
|
|
2966
|
-
const getBrowserSession = () => {
|
|
2967
|
-
const actionData = sessionStorage.getItem("browserSession");
|
|
2968
|
-
return actionData ? JSON.parse(actionData) : null;
|
|
2969
|
-
};
|
|
2970
|
-
const setViewData = (viewData) => {
|
|
2971
|
-
sessionStorage.setItem("viewData", JSON.stringify(viewData));
|
|
2972
|
-
};
|
|
2973
|
-
return {
|
|
2974
|
-
getMenuFocus,
|
|
2975
|
-
setMenuFocus,
|
|
2976
|
-
setActionData,
|
|
2977
|
-
getActionData,
|
|
2978
|
-
getViewData,
|
|
2979
|
-
setViewData,
|
|
2980
|
-
getBrowserSession
|
|
2981
|
-
};
|
|
2982
|
-
})();
|
|
2983
2941
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2984
2942
|
0 && (module.exports = {
|
|
2985
2943
|
WesapError,
|
|
@@ -3006,7 +2964,6 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
|
3006
2964
|
mergeObjects,
|
|
3007
2965
|
removeUndefinedFields,
|
|
3008
2966
|
resequence,
|
|
3009
|
-
sessionStorageUtils,
|
|
3010
2967
|
stringToColor,
|
|
3011
2968
|
toQueryString,
|
|
3012
2969
|
updateTokenParamInOriginalRequest,
|
package/dist/utils.mjs
CHANGED
|
@@ -2873,47 +2873,6 @@ var useField = (props) => {
|
|
|
2873
2873
|
nameField
|
|
2874
2874
|
};
|
|
2875
2875
|
};
|
|
2876
|
-
|
|
2877
|
-
// src/utils/storage/session-storage.ts
|
|
2878
|
-
var sessionStorageUtils = /* @__PURE__ */ (() => {
|
|
2879
|
-
const getMenuFocus = () => {
|
|
2880
|
-
const menuFocus = sessionStorage.getItem("menuFocus");
|
|
2881
|
-
return menuFocus ? JSON.parse(menuFocus) : {
|
|
2882
|
-
id: void 0,
|
|
2883
|
-
service: ""
|
|
2884
|
-
};
|
|
2885
|
-
};
|
|
2886
|
-
const setMenuFocus = (menuTree) => {
|
|
2887
|
-
sessionStorage.setItem("menuFocus", JSON.stringify({ ...menuTree }));
|
|
2888
|
-
};
|
|
2889
|
-
const getActionData = () => {
|
|
2890
|
-
const actionData = sessionStorage.getItem("actionData");
|
|
2891
|
-
return actionData ? JSON.parse(actionData) : {};
|
|
2892
|
-
};
|
|
2893
|
-
const setActionData = (actData) => {
|
|
2894
|
-
sessionStorage.setItem("actionData", JSON.stringify(actData));
|
|
2895
|
-
};
|
|
2896
|
-
const getViewData = () => {
|
|
2897
|
-
const viewData = sessionStorage.getItem("viewData");
|
|
2898
|
-
return viewData ? JSON.parse(viewData) : {};
|
|
2899
|
-
};
|
|
2900
|
-
const getBrowserSession = () => {
|
|
2901
|
-
const actionData = sessionStorage.getItem("browserSession");
|
|
2902
|
-
return actionData ? JSON.parse(actionData) : null;
|
|
2903
|
-
};
|
|
2904
|
-
const setViewData = (viewData) => {
|
|
2905
|
-
sessionStorage.setItem("viewData", JSON.stringify(viewData));
|
|
2906
|
-
};
|
|
2907
|
-
return {
|
|
2908
|
-
getMenuFocus,
|
|
2909
|
-
setMenuFocus,
|
|
2910
|
-
setActionData,
|
|
2911
|
-
getActionData,
|
|
2912
|
-
getViewData,
|
|
2913
|
-
setViewData,
|
|
2914
|
-
getBrowserSession
|
|
2915
|
-
};
|
|
2916
|
-
})();
|
|
2917
2876
|
export {
|
|
2918
2877
|
WesapError,
|
|
2919
2878
|
checkIsImageLink,
|
|
@@ -2939,7 +2898,6 @@ export {
|
|
|
2939
2898
|
mergeObjects,
|
|
2940
2899
|
removeUndefinedFields,
|
|
2941
2900
|
resequence,
|
|
2942
|
-
sessionStorageUtils,
|
|
2943
2901
|
stringToColor,
|
|
2944
2902
|
toQueryString,
|
|
2945
2903
|
updateTokenParamInOriginalRequest,
|