@fctc/interface-logic 1.2.9 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/index.d.mts +1709 -24
  2. package/dist/index.d.ts +1709 -24
  3. package/dist/index.js +14 -16
  4. package/dist/index.mjs +14 -16
  5. package/package.json +87 -87
  6. package/dist/base-model-type-DvO53Lwi.d.mts +0 -7
  7. package/dist/base-model-type-DvO53Lwi.d.ts +0 -7
  8. package/dist/config.d.mts +0 -16
  9. package/dist/config.d.ts +0 -16
  10. package/dist/config.js +0 -2386
  11. package/dist/config.mjs +0 -2349
  12. package/dist/constants.d.mts +0 -131
  13. package/dist/constants.d.ts +0 -131
  14. package/dist/constants.js +0 -205
  15. package/dist/constants.mjs +0 -166
  16. package/dist/context-type-D5XefoL-.d.mts +0 -8
  17. package/dist/context-type-D5XefoL-.d.ts +0 -8
  18. package/dist/environment.d.mts +0 -42
  19. package/dist/environment.d.ts +0 -42
  20. package/dist/environment.js +0 -3094
  21. package/dist/environment.mjs +0 -3054
  22. package/dist/hook.d.mts +0 -340
  23. package/dist/hook.d.ts +0 -340
  24. package/dist/hook.js +0 -6019
  25. package/dist/hook.mjs +0 -5915
  26. package/dist/index-C_nK1Mii.d.mts +0 -19
  27. package/dist/index-C_nK1Mii.d.ts +0 -19
  28. package/dist/model.d.mts +0 -35
  29. package/dist/model.d.ts +0 -35
  30. package/dist/model.js +0 -3356
  31. package/dist/model.mjs +0 -3317
  32. package/dist/provider.d.mts +0 -16
  33. package/dist/provider.d.ts +0 -16
  34. package/dist/provider.js +0 -3603
  35. package/dist/provider.mjs +0 -3564
  36. package/dist/services.d.mts +0 -258
  37. package/dist/services.d.ts +0 -258
  38. package/dist/services.js +0 -4662
  39. package/dist/services.mjs +0 -4617
  40. package/dist/session-storage-CxkkEmQh.d.mts +0 -15
  41. package/dist/session-storage-CxkkEmQh.d.ts +0 -15
  42. package/dist/store.d.mts +0 -643
  43. package/dist/store.d.ts +0 -643
  44. package/dist/store.js +0 -814
  45. package/dist/store.mjs +0 -709
  46. package/dist/types.d.mts +0 -12
  47. package/dist/types.d.ts +0 -12
  48. package/dist/types.js +0 -18
  49. package/dist/types.mjs +0 -0
  50. package/dist/use-get-selection-QZu1jKqa.d.mts +0 -15
  51. package/dist/use-get-selection-QZu1jKqa.d.ts +0 -15
  52. package/dist/utils.d.mts +0 -96
  53. package/dist/utils.d.ts +0 -96
  54. package/dist/utils.js +0 -3003
  55. package/dist/utils.mjs +0 -2935
  56. package/dist/view-type-DodWYWDH.d.mts +0 -107
  57. package/dist/view-type-DodWYWDH.d.ts +0 -107
package/dist/index.js CHANGED
@@ -3911,6 +3911,10 @@ var selectSearch = (state) => state.search;
3911
3911
  var selectSearchMap = (state) => state.search.searchMap;
3912
3912
  var search_slice_default = searchSlice.reducer;
3913
3913
 
3914
+ // src/store/index.ts
3915
+ var useAppDispatch = import_react_redux.useDispatch;
3916
+ var useAppSelector = import_react_redux.useSelector;
3917
+
3914
3918
  // src/store/store.ts
3915
3919
  var import_toolkit11 = require("@reduxjs/toolkit");
3916
3920
 
@@ -4103,10 +4107,6 @@ var envStore = (0, import_toolkit11.configureStore)({
4103
4107
  })
4104
4108
  });
4105
4109
 
4106
- // src/store/index.ts
4107
- var useAppDispatch = import_react_redux.useDispatch;
4108
- var useAppSelector = import_react_redux.useSelector;
4109
-
4110
4110
  // src/environment/EnvStore.ts
4111
4111
  var EnvStore = class {
4112
4112
  envStore;
@@ -5090,8 +5090,7 @@ var ModelService = {
5090
5090
  ids = [],
5091
5091
  data = {},
5092
5092
  specification = {},
5093
- context = {},
5094
- path
5093
+ context = {}
5095
5094
  }) {
5096
5095
  const env2 = getEnv();
5097
5096
  const jsonData = {
@@ -5104,7 +5103,7 @@ var ModelService = {
5104
5103
  specification
5105
5104
  }
5106
5105
  };
5107
- return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
5106
+ return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
5108
5107
  headers: {
5109
5108
  "Content-Type": "application/json"
5110
5109
  }
@@ -5222,9 +5221,9 @@ var model_service_default = ModelService;
5222
5221
 
5223
5222
  // src/services/user-service/index.ts
5224
5223
  var UserService = {
5225
- async getProfile(path) {
5224
+ async getProfile() {
5226
5225
  const env2 = getEnv();
5227
- return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
5226
+ return env2.requests.get("/userinfo" /* PROFILE_PATH */, {
5228
5227
  headers: {
5229
5228
  "Content-Type": "application/x-www-form-urlencoded"
5230
5229
  }
@@ -5606,10 +5605,10 @@ var ViewService = {
5606
5605
  });
5607
5606
  const url = `${path}?${params.toString()}`;
5608
5607
  return env2?.requests.get(url, {
5608
+ credentials: "include",
5609
5609
  headers: {
5610
5610
  "Content-Type": "application/json"
5611
- },
5612
- withCredentials: true
5611
+ }
5613
5612
  });
5614
5613
  },
5615
5614
  async grantAccess({
@@ -6423,18 +6422,17 @@ var useSave = () => {
6423
6422
  model,
6424
6423
  data,
6425
6424
  specification,
6426
- context,
6427
- path
6428
- }) => model_service_default.save({ ids, model, data, specification, context, path })
6425
+ context
6426
+ }) => model_service_default.save({ ids, model, data, specification, context })
6429
6427
  });
6430
6428
  };
6431
6429
  var use_save_default = useSave;
6432
6430
 
6433
6431
  // src/hooks/user/use-get-profile.ts
6434
6432
  var import_react_query38 = require("@tanstack/react-query");
6435
- var useGetProfile = (path) => {
6433
+ var useGetProfile = () => {
6436
6434
  return (0, import_react_query38.useMutation)({
6437
- mutationFn: () => user_service_default.getProfile(path)
6435
+ mutationFn: () => user_service_default.getProfile()
6438
6436
  });
6439
6437
  };
6440
6438
  var use_get_profile_default = useGetProfile;
package/dist/index.mjs CHANGED
@@ -3664,6 +3664,10 @@ var selectSearch = (state) => state.search;
3664
3664
  var selectSearchMap = (state) => state.search.searchMap;
3665
3665
  var search_slice_default = searchSlice.reducer;
3666
3666
 
3667
+ // src/store/index.ts
3668
+ var useAppDispatch = useDispatch;
3669
+ var useAppSelector = useSelector;
3670
+
3667
3671
  // src/store/store.ts
3668
3672
  import { configureStore } from "@reduxjs/toolkit";
3669
3673
 
@@ -3856,10 +3860,6 @@ var envStore = configureStore({
3856
3860
  })
3857
3861
  });
3858
3862
 
3859
- // src/store/index.ts
3860
- var useAppDispatch = useDispatch;
3861
- var useAppSelector = useSelector;
3862
-
3863
3863
  // src/environment/EnvStore.ts
3864
3864
  var EnvStore = class {
3865
3865
  envStore;
@@ -4843,8 +4843,7 @@ var ModelService = {
4843
4843
  ids = [],
4844
4844
  data = {},
4845
4845
  specification = {},
4846
- context = {},
4847
- path
4846
+ context = {}
4848
4847
  }) {
4849
4848
  const env2 = getEnv();
4850
4849
  const jsonData = {
@@ -4857,7 +4856,7 @@ var ModelService = {
4857
4856
  specification
4858
4857
  }
4859
4858
  };
4860
- return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
4859
+ return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4861
4860
  headers: {
4862
4861
  "Content-Type": "application/json"
4863
4862
  }
@@ -4975,9 +4974,9 @@ var model_service_default = ModelService;
4975
4974
 
4976
4975
  // src/services/user-service/index.ts
4977
4976
  var UserService = {
4978
- async getProfile(path) {
4977
+ async getProfile() {
4979
4978
  const env2 = getEnv();
4980
- return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
4979
+ return env2.requests.get("/userinfo" /* PROFILE_PATH */, {
4981
4980
  headers: {
4982
4981
  "Content-Type": "application/x-www-form-urlencoded"
4983
4982
  }
@@ -5359,10 +5358,10 @@ var ViewService = {
5359
5358
  });
5360
5359
  const url = `${path}?${params.toString()}`;
5361
5360
  return env2?.requests.get(url, {
5361
+ credentials: "include",
5362
5362
  headers: {
5363
5363
  "Content-Type": "application/json"
5364
- },
5365
- withCredentials: true
5364
+ }
5366
5365
  });
5367
5366
  },
5368
5367
  async grantAccess({
@@ -6176,18 +6175,17 @@ var useSave = () => {
6176
6175
  model,
6177
6176
  data,
6178
6177
  specification,
6179
- context,
6180
- path
6181
- }) => model_service_default.save({ ids, model, data, specification, context, path })
6178
+ context
6179
+ }) => model_service_default.save({ ids, model, data, specification, context })
6182
6180
  });
6183
6181
  };
6184
6182
  var use_save_default = useSave;
6185
6183
 
6186
6184
  // src/hooks/user/use-get-profile.ts
6187
6185
  import { useMutation as useMutation28 } from "@tanstack/react-query";
6188
- var useGetProfile = (path) => {
6186
+ var useGetProfile = () => {
6189
6187
  return useMutation28({
6190
- mutationFn: () => user_service_default.getProfile(path)
6188
+ mutationFn: () => user_service_default.getProfile()
6191
6189
  });
6192
6190
  };
6193
6191
  var use_get_profile_default = useGetProfile;
package/package.json CHANGED
@@ -1,87 +1,87 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "1.2.9",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./config": {
14
- "types": "./dist/index.d.ts",
15
- "import": "./dist/config.mjs",
16
- "require": "./dist/config.cjs"
17
- },
18
- "./constants": {
19
- "types": "./dist/constants.d.ts",
20
- "import": "./dist/constants.mjs",
21
- "require": "./dist/constants.cjs"
22
- },
23
- "./environment": {
24
- "types": "./dist/environment.d.ts",
25
- "import": "./dist/environment.mjs",
26
- "require": "./dist/environment.cjs"
27
- },
28
- "./hook": {
29
- "types": "./dist/hook.d.ts",
30
- "import": "./dist/hook.mjs",
31
- "require": "./dist/hook.cjs"
32
- },
33
- "./model": {
34
- "types": "./dist/model.d.ts",
35
- "import": "./dist/model.mjs",
36
- "require": "./dist/model.cjs"
37
- },
38
- "./provider": {
39
- "types": "./dist/provider.d.ts",
40
- "import": "./dist/provider.mjs",
41
- "require": "./dist/provider.cjs"
42
- },
43
- "./services": {
44
- "types": "./dist/services.d.ts",
45
- "import": "./dist/services.mjs",
46
- "require": "./dist/services.cjs"
47
- },
48
- "./store": {
49
- "types": "./dist/store.d.ts",
50
- "import": "./dist/store.mjs",
51
- "require": "./dist/store.cjs"
52
- },
53
- "./types": {
54
- "types": "./dist/types.d.ts",
55
- "import": "./dist/types.mjs",
56
- "require": "./dist/types.cjs"
57
- },
58
- "./utils": {
59
- "types": "./dist/utils.d.ts",
60
- "import": "./dist/utils.mjs",
61
- "require": "./dist/utils.cjs"
62
- }
63
- },
64
- "imports": {},
65
- "files": [
66
- "dist"
67
- ],
68
- "scripts": {
69
- "build": "tsup",
70
- "test": "jest"
71
- },
72
- "dependencies": {
73
- "@reduxjs/toolkit": "^2.8.2",
74
- "@tanstack/react-query": "^5.83.0",
75
- "axios": "^1.11.0",
76
- "moment": "^2.30.1",
77
- "react-redux": "^9.2.0"
78
- },
79
- "devDependencies": {
80
- "@types/react": "^18.3.1",
81
- "react": "18.0.0",
82
- "jest": "^29.7.0",
83
- "tsup": "^8.0.0",
84
- "typescript": "^5.8.2"
85
- },
86
- "packageManager": "yarn@1.22.0"
87
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "1.3.0",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./config": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/config.mjs",
16
+ "require": "./dist/config.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./model": {
34
+ "types": "./dist/model.d.ts",
35
+ "import": "./dist/model.mjs",
36
+ "require": "./dist/model.cjs"
37
+ },
38
+ "./provider": {
39
+ "types": "./dist/provider.d.ts",
40
+ "import": "./dist/provider.mjs",
41
+ "require": "./dist/provider.cjs"
42
+ },
43
+ "./services": {
44
+ "types": "./dist/services.d.ts",
45
+ "import": "./dist/services.mjs",
46
+ "require": "./dist/services.cjs"
47
+ },
48
+ "./store": {
49
+ "types": "./dist/store.d.ts",
50
+ "import": "./dist/store.mjs",
51
+ "require": "./dist/store.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ },
58
+ "./utils": {
59
+ "types": "./dist/utils.d.ts",
60
+ "import": "./dist/utils.mjs",
61
+ "require": "./dist/utils.cjs"
62
+ }
63
+ },
64
+ "imports": {},
65
+ "files": [
66
+ "dist"
67
+ ],
68
+ "scripts": {
69
+ "build": "tsup",
70
+ "test": "jest"
71
+ },
72
+ "dependencies": {
73
+ "@reduxjs/toolkit": "^2.8.2",
74
+ "@tanstack/react-query": "^5.83.0",
75
+ "axios": "^1.11.0",
76
+ "moment": "^2.30.1",
77
+ "react-redux": "^9.2.0"
78
+ },
79
+ "devDependencies": {
80
+ "@types/react": "^18.3.1",
81
+ "react": "18.0.0",
82
+ "jest": "^29.7.0",
83
+ "tsup": "^8.0.0",
84
+ "typescript": "^5.8.2"
85
+ },
86
+ "packageManager": "yarn@1.22.0"
87
+ }
@@ -1,7 +0,0 @@
1
- interface BaseModelInit {
2
- name: string;
3
- view: Record<string, any>;
4
- actContext?: Record<string, any>;
5
- }
6
-
7
- export type { BaseModelInit as B };
@@ -1,7 +0,0 @@
1
- interface BaseModelInit {
2
- name: string;
3
- view: Record<string, any>;
4
- actContext?: Record<string, any>;
5
- }
6
-
7
- export type { BaseModelInit as B };
package/dist/config.d.mts DELETED
@@ -1,16 +0,0 @@
1
- import { EnvStore } from './environment.mjs';
2
- import '@reduxjs/toolkit';
3
- import './session-storage-CxkkEmQh.mjs';
4
-
5
- declare const axiosClient: {
6
- init(config: EnvStore): {
7
- get: (url: string, headers: any) => Promise<any>;
8
- post: (url: string, body: any, headers: any) => Promise<any>;
9
- post_excel: (url: string, body: any, headers: any) => Promise<any>;
10
- put: (url: string, body: any, headers: any) => Promise<any>;
11
- patch: (url: string, body: any) => Promise<any>;
12
- delete: (url: string, body: any) => Promise<any>;
13
- };
14
- };
15
-
16
- export { axiosClient };
package/dist/config.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { EnvStore } from './environment.js';
2
- import '@reduxjs/toolkit';
3
- import './session-storage-CxkkEmQh.js';
4
-
5
- declare const axiosClient: {
6
- init(config: EnvStore): {
7
- get: (url: string, headers: any) => Promise<any>;
8
- post: (url: string, body: any, headers: any) => Promise<any>;
9
- post_excel: (url: string, body: any, headers: any) => Promise<any>;
10
- put: (url: string, body: any, headers: any) => Promise<any>;
11
- patch: (url: string, body: any) => Promise<any>;
12
- delete: (url: string, body: any) => Promise<any>;
13
- };
14
- };
15
-
16
- export { axiosClient };