@fctc/edu-logic-lib 1.0.1 → 1.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.
Files changed (43) hide show
  1. package/dist/config.js +259 -4
  2. package/dist/config.mjs +255 -6
  3. package/dist/constants.js +154 -30
  4. package/dist/constants.mjs +140 -29
  5. package/dist/environment.js +841 -7
  6. package/dist/environment.mjs +840 -14
  7. package/dist/hooks.d.mts +2 -0
  8. package/dist/hooks.d.ts +2 -0
  9. package/dist/hooks.js +4372 -283
  10. package/dist/hooks.mjs +4275 -237
  11. package/dist/index.d.mts +23 -0
  12. package/dist/index.d.ts +23 -0
  13. package/dist/index.js +5323 -0
  14. package/dist/index.mjs +5165 -0
  15. package/dist/models.js +3200 -18
  16. package/dist/models.mjs +3192 -18
  17. package/dist/provider.js +3179 -33
  18. package/dist/provider.mjs +3171 -33
  19. package/dist/services.js +4028 -9
  20. package/dist/services.mjs +4031 -25
  21. package/dist/store.js +582 -128
  22. package/dist/store.mjs +502 -111
  23. package/dist/types.js +2 -1
  24. package/dist/types.mjs +1 -0
  25. package/dist/utils.js +2346 -20
  26. package/dist/utils.mjs +2343 -33
  27. package/package.json +9 -6
  28. package/dist/chunk-6BLY7NZ6.mjs +0 -124
  29. package/dist/chunk-6QXB3XX7.mjs +0 -258
  30. package/dist/chunk-ELARQVCE.mjs +0 -2364
  31. package/dist/chunk-FVGPSTJ7.js +0 -124
  32. package/dist/chunk-GGOFXFSX.js +0 -2364
  33. package/dist/chunk-IXDDYGKE.js +0 -61
  34. package/dist/chunk-MJLXGYQ4.mjs +0 -102
  35. package/dist/chunk-MLJQPO4Q.mjs +0 -61
  36. package/dist/chunk-QLUONJPQ.mjs +0 -604
  37. package/dist/chunk-RZBHZYXG.js +0 -604
  38. package/dist/chunk-S7B3VKMJ.mjs +0 -95
  39. package/dist/chunk-S7YF2I23.js +0 -95
  40. package/dist/chunk-U4CC2BBB.js +0 -1074
  41. package/dist/chunk-UY6GNZNB.js +0 -258
  42. package/dist/chunk-W4W2L2NA.js +0 -102
  43. package/dist/chunk-WYXAE5LI.mjs +0 -1074
@@ -1,61 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/constants/api/key-constant.ts
2
- var KeyConstants = /* @__PURE__ */ ((KeyConstants2) => {
3
- KeyConstants2["PROFILE"] = "userinfo";
4
- KeyConstants2["CURRENT_COMPANY"] = "current_company";
5
- KeyConstants2["LIST_COMPANY"] = "list_company";
6
- KeyConstants2["COMPANY_INFO"] = "company_info";
7
- KeyConstants2["MENU"] = "menus";
8
- KeyConstants2["GET_VIEW_BY_ACTION"] = "get_view_by_action";
9
- KeyConstants2["ACTION_DETAIL"] = "action_detail";
10
- KeyConstants2["GET_DATA_SELECTION"] = "get_data_select";
11
- KeyConstants2["WEB_SAVE"] = "web_save";
12
- KeyConstants2["WEB_READ"] = "web_read";
13
- KeyConstants2["GET_PROVIDER"] = "get_provider";
14
- return KeyConstants2;
15
- })(KeyConstants || {});
16
-
17
- // src/constants/api/method-constant.ts
18
- var MethodConstants = /* @__PURE__ */ ((MethodConstants2) => {
19
- MethodConstants2["WEB_SEARCH_READ"] = "web_search_read";
20
- MethodConstants2["WEB_READ_GROUP"] = "web_read_group";
21
- MethodConstants2["WEB_READ"] = "web_read";
22
- MethodConstants2["WEB_SAVE"] = "web_save";
23
- MethodConstants2["UNLINK"] = "unlink";
24
- MethodConstants2["ONCHANGE"] = "onchange";
25
- MethodConstants2["GET_ONCHANGE_FIELDS"] = "get_fields_onchange";
26
- MethodConstants2["GET_FIELD_VIEW"] = "get_fields_view_v2";
27
- return MethodConstants2;
28
- })(MethodConstants || {});
29
-
30
- // src/constants/api/uri-constant.ts
31
- var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
32
- UriConstants2["AUTH_TOKEN_PATH"] = "/authentication/oauth2/token";
33
- UriConstants2["GENTOKEN_SOCIAL"] = "/token/generate";
34
- UriConstants2["CALL_PATH"] = "/call";
35
- UriConstants2["COMPANY_PATH"] = "/company";
36
- UriConstants2["PROFILE_PATH"] = "/userinfo";
37
- UriConstants2["RESET_PASSWORD_PATH"] = "/reset_password";
38
- UriConstants2["CHANGE_PASSWORD_PATH"] = "/change_password";
39
- UriConstants2["UPDATE_PASSWORD_PATH"] = "/change_password_parent";
40
- UriConstants2["LOAD_ACTION"] = `/load_action`;
41
- UriConstants2["REPORT_PATH"] = `/report`;
42
- UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
43
- UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
44
- UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
45
- UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
46
- UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
47
- UriConstants2["DELETE_MESSAGE"] = `/chatter/message/update_content`;
48
- UriConstants2["IMAGE_PATH"] = `/web/image`;
49
- UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
50
- UriConstants2["TOKEN"] = `/check_token`;
51
- UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
52
- UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
53
- UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
54
- return UriConstants2;
55
- })(UriConstants || {});
56
-
57
-
58
-
59
-
60
-
61
- exports.KeyConstants = KeyConstants; exports.MethodConstants = MethodConstants; exports.UriConstants = UriConstants;
@@ -1,102 +0,0 @@
1
- import {
2
- axiosClient
3
- } from "./chunk-6QXB3XX7.mjs";
4
- import {
5
- envStore,
6
- setAllowCompanies,
7
- setCompanies,
8
- setDefaultCompany,
9
- setEnv,
10
- setLang,
11
- setUid,
12
- setUser
13
- } from "./chunk-QLUONJPQ.mjs";
14
-
15
- // src/environment/EnvStore.ts
16
- var EnvStore = class {
17
- envStore;
18
- baseUrl;
19
- requests;
20
- context;
21
- defaultCompany;
22
- config;
23
- companies;
24
- user;
25
- db;
26
- localStorageUtils;
27
- sessionStorageUtils;
28
- constructor(envStore2, localStorageUtils, sessionStorageUtils) {
29
- this.envStore = envStore2;
30
- this.localStorageUtils = localStorageUtils;
31
- this.sessionStorageUtils = sessionStorageUtils;
32
- this.setup();
33
- }
34
- setup() {
35
- const env2 = this.envStore.getState().env;
36
- this.baseUrl = env2?.baseUrl;
37
- this.requests = env2?.requests;
38
- this.context = env2?.context;
39
- this.defaultCompany = env2?.defaultCompany;
40
- this.config = env2?.config;
41
- this.companies = env2?.companies || [];
42
- this.user = env2?.user;
43
- this.db = env2?.db;
44
- }
45
- setupEnv(envConfig) {
46
- const dispatch = this.envStore.dispatch;
47
- const env2 = {
48
- ...envConfig,
49
- localStorageUtils: this.localStorageUtils,
50
- sessionStorageUtils: this.sessionStorageUtils
51
- };
52
- const requests = axiosClient.init(env2);
53
- dispatch(setEnv({ ...env2, requests }));
54
- this.setup();
55
- }
56
- setUid(uid) {
57
- const dispatch = this.envStore.dispatch;
58
- dispatch(setUid(uid));
59
- this.setup();
60
- }
61
- setLang(lang) {
62
- const dispatch = this.envStore.dispatch;
63
- dispatch(setLang(lang));
64
- this.setup();
65
- }
66
- setAllowCompanies(allowCompanies) {
67
- const dispatch = this.envStore.dispatch;
68
- dispatch(setAllowCompanies(allowCompanies));
69
- this.setup();
70
- }
71
- setCompanies(companies) {
72
- const dispatch = this.envStore.dispatch;
73
- dispatch(setCompanies(companies));
74
- this.setup();
75
- }
76
- setDefaultCompany(company) {
77
- const dispatch = this.envStore.dispatch;
78
- dispatch(setDefaultCompany(company));
79
- this.setup();
80
- }
81
- setUserInfo(userInfo) {
82
- const dispatch = this.envStore.dispatch;
83
- dispatch(setUser(userInfo));
84
- this.setup();
85
- }
86
- };
87
- var env = null;
88
- function initEnv({}) {
89
- env = new EnvStore(envStore);
90
- return env;
91
- }
92
- function getEnv() {
93
- if (!env) env = new EnvStore(envStore);
94
- return env;
95
- }
96
-
97
- export {
98
- EnvStore,
99
- env,
100
- initEnv,
101
- getEnv
102
- };
@@ -1,61 +0,0 @@
1
- // src/constants/api/key-constant.ts
2
- var KeyConstants = /* @__PURE__ */ ((KeyConstants2) => {
3
- KeyConstants2["PROFILE"] = "userinfo";
4
- KeyConstants2["CURRENT_COMPANY"] = "current_company";
5
- KeyConstants2["LIST_COMPANY"] = "list_company";
6
- KeyConstants2["COMPANY_INFO"] = "company_info";
7
- KeyConstants2["MENU"] = "menus";
8
- KeyConstants2["GET_VIEW_BY_ACTION"] = "get_view_by_action";
9
- KeyConstants2["ACTION_DETAIL"] = "action_detail";
10
- KeyConstants2["GET_DATA_SELECTION"] = "get_data_select";
11
- KeyConstants2["WEB_SAVE"] = "web_save";
12
- KeyConstants2["WEB_READ"] = "web_read";
13
- KeyConstants2["GET_PROVIDER"] = "get_provider";
14
- return KeyConstants2;
15
- })(KeyConstants || {});
16
-
17
- // src/constants/api/method-constant.ts
18
- var MethodConstants = /* @__PURE__ */ ((MethodConstants2) => {
19
- MethodConstants2["WEB_SEARCH_READ"] = "web_search_read";
20
- MethodConstants2["WEB_READ_GROUP"] = "web_read_group";
21
- MethodConstants2["WEB_READ"] = "web_read";
22
- MethodConstants2["WEB_SAVE"] = "web_save";
23
- MethodConstants2["UNLINK"] = "unlink";
24
- MethodConstants2["ONCHANGE"] = "onchange";
25
- MethodConstants2["GET_ONCHANGE_FIELDS"] = "get_fields_onchange";
26
- MethodConstants2["GET_FIELD_VIEW"] = "get_fields_view_v2";
27
- return MethodConstants2;
28
- })(MethodConstants || {});
29
-
30
- // src/constants/api/uri-constant.ts
31
- var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
32
- UriConstants2["AUTH_TOKEN_PATH"] = "/authentication/oauth2/token";
33
- UriConstants2["GENTOKEN_SOCIAL"] = "/token/generate";
34
- UriConstants2["CALL_PATH"] = "/call";
35
- UriConstants2["COMPANY_PATH"] = "/company";
36
- UriConstants2["PROFILE_PATH"] = "/userinfo";
37
- UriConstants2["RESET_PASSWORD_PATH"] = "/reset_password";
38
- UriConstants2["CHANGE_PASSWORD_PATH"] = "/change_password";
39
- UriConstants2["UPDATE_PASSWORD_PATH"] = "/change_password_parent";
40
- UriConstants2["LOAD_ACTION"] = `/load_action`;
41
- UriConstants2["REPORT_PATH"] = `/report`;
42
- UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
43
- UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
44
- UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
45
- UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
46
- UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
47
- UriConstants2["DELETE_MESSAGE"] = `/chatter/message/update_content`;
48
- UriConstants2["IMAGE_PATH"] = `/web/image`;
49
- UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
50
- UriConstants2["TOKEN"] = `/check_token`;
51
- UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
52
- UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
53
- UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
54
- return UriConstants2;
55
- })(UriConstants || {});
56
-
57
- export {
58
- KeyConstants,
59
- MethodConstants,
60
- UriConstants
61
- };