@fctc/edu-logic-lib 1.0.8 → 1.0.10

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 (47) hide show
  1. package/dist/config.js +257 -6
  2. package/dist/config.mjs +256 -2
  3. package/dist/constants.js +152 -53
  4. package/dist/constants.mjs +141 -2
  5. package/dist/environment.js +839 -16
  6. package/dist/environment.mjs +840 -4
  7. package/dist/hooks.js +4850 -180
  8. package/dist/hooks.mjs +4813 -9
  9. package/dist/index.js +5320 -626
  10. package/dist/index.mjs +5165 -12
  11. package/dist/models.js +1107 -18
  12. package/dist/models.mjs +1107 -9
  13. package/dist/provider.js +1115 -17
  14. package/dist/provider.mjs +1115 -8
  15. package/dist/services.js +1922 -31
  16. package/dist/services.mjs +1922 -7
  17. package/dist/store.js +576 -248
  18. package/dist/store.mjs +519 -1
  19. package/dist/types.js +0 -2
  20. package/dist/types.mjs +1 -1
  21. package/dist/utils.js +2355 -61
  22. package/dist/utils.mjs +2344 -1
  23. package/package.json +2 -1
  24. package/dist/chunk-4K3QAEZ6.js +0 -90
  25. package/dist/chunk-6BLY7NZ6.mjs +0 -120
  26. package/dist/chunk-6QXB3XX7.mjs +0 -256
  27. package/dist/chunk-7JD5GMIZ.js +0 -2
  28. package/dist/chunk-AYUH66EE.mjs +0 -62
  29. package/dist/chunk-CZHZLKNA.mjs +0 -585
  30. package/dist/chunk-EK43MEN4.js +0 -635
  31. package/dist/chunk-ELARQVCE.mjs +0 -2344
  32. package/dist/chunk-FVGPSTJ7.js +0 -122
  33. package/dist/chunk-GGOFXFSX.js +0 -2362
  34. package/dist/chunk-IXDDYGKE.js +0 -61
  35. package/dist/chunk-MLJQPO4Q.mjs +0 -57
  36. package/dist/chunk-OADBRQ4A.js +0 -32
  37. package/dist/chunk-OBR6UTC5.mjs +0 -1
  38. package/dist/chunk-OFUXC2LA.mjs +0 -86
  39. package/dist/chunk-P2IGWJDZ.js +0 -1068
  40. package/dist/chunk-QLUONJPQ.mjs +0 -519
  41. package/dist/chunk-RWRHCIQI.mjs +0 -1059
  42. package/dist/chunk-RZBHZYXG.js +0 -582
  43. package/dist/chunk-S7B3VKMJ.mjs +0 -85
  44. package/dist/chunk-S7YF2I23.js +0 -95
  45. package/dist/chunk-UY6GNZNB.js +0 -262
  46. package/dist/chunk-XYVK476U.mjs +0 -29
  47. package/dist/chunk-YOV6KAT2.js +0 -66
@@ -1,61 +0,0 @@
1
- 'use strict';
2
-
3
- // src/constants/api/key-constant.ts
4
- var KeyConstants = /* @__PURE__ */ ((KeyConstants2) => {
5
- KeyConstants2["PROFILE"] = "userinfo";
6
- KeyConstants2["CURRENT_COMPANY"] = "current_company";
7
- KeyConstants2["LIST_COMPANY"] = "list_company";
8
- KeyConstants2["COMPANY_INFO"] = "company_info";
9
- KeyConstants2["MENU"] = "menus";
10
- KeyConstants2["GET_VIEW_BY_ACTION"] = "get_view_by_action";
11
- KeyConstants2["ACTION_DETAIL"] = "action_detail";
12
- KeyConstants2["GET_DATA_SELECTION"] = "get_data_select";
13
- KeyConstants2["WEB_SAVE"] = "web_save";
14
- KeyConstants2["WEB_READ"] = "web_read";
15
- KeyConstants2["GET_PROVIDER"] = "get_provider";
16
- return KeyConstants2;
17
- })(KeyConstants || {});
18
-
19
- // src/constants/api/method-constant.ts
20
- var MethodConstants = /* @__PURE__ */ ((MethodConstants2) => {
21
- MethodConstants2["WEB_SEARCH_READ"] = "web_search_read";
22
- MethodConstants2["WEB_READ_GROUP"] = "web_read_group";
23
- MethodConstants2["WEB_READ"] = "web_read";
24
- MethodConstants2["WEB_SAVE"] = "web_save";
25
- MethodConstants2["UNLINK"] = "unlink";
26
- MethodConstants2["ONCHANGE"] = "onchange";
27
- MethodConstants2["GET_ONCHANGE_FIELDS"] = "get_fields_onchange";
28
- MethodConstants2["GET_FIELD_VIEW"] = "get_fields_view_v2";
29
- return MethodConstants2;
30
- })(MethodConstants || {});
31
-
32
- // src/constants/api/uri-constant.ts
33
- var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
34
- UriConstants2["AUTH_TOKEN_PATH"] = "/authentication/oauth2/token";
35
- UriConstants2["GENTOKEN_SOCIAL"] = "/token/generate";
36
- UriConstants2["CALL_PATH"] = "/call";
37
- UriConstants2["COMPANY_PATH"] = "/company";
38
- UriConstants2["PROFILE_PATH"] = "/userinfo";
39
- UriConstants2["RESET_PASSWORD_PATH"] = "/reset_password";
40
- UriConstants2["CHANGE_PASSWORD_PATH"] = "/change_password";
41
- UriConstants2["UPDATE_PASSWORD_PATH"] = "/change_password_parent";
42
- UriConstants2["LOAD_ACTION"] = `/load_action`;
43
- UriConstants2["REPORT_PATH"] = `/report`;
44
- UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
45
- UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
46
- UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
47
- UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
48
- UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
49
- UriConstants2["DELETE_MESSAGE"] = `/chatter/message/update_content`;
50
- UriConstants2["IMAGE_PATH"] = `/web/image`;
51
- UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
52
- UriConstants2["TOKEN"] = `/check_token`;
53
- UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
54
- UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
55
- UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
56
- return UriConstants2;
57
- })(UriConstants || {});
58
-
59
- exports.KeyConstants = KeyConstants;
60
- exports.MethodConstants = MethodConstants;
61
- exports.UriConstants = UriConstants;
@@ -1,57 +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 { KeyConstants, MethodConstants, UriConstants };
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkFVGPSTJ7_js = require('./chunk-FVGPSTJ7.js');
4
- var chunkP2IGWJDZ_js = require('./chunk-P2IGWJDZ.js');
5
-
6
- // src/models/company-model/index.ts
7
- var CompanyModel = class extends chunkFVGPSTJ7_js.base_model_default {
8
- constructor(init) {
9
- super(init);
10
- }
11
- async getCurrentCompany() {
12
- return await chunkP2IGWJDZ_js.company_service_default.getCurrentCompany();
13
- }
14
- async getUserCompany(id) {
15
- return await chunkP2IGWJDZ_js.company_service_default.getInfoCompany(id);
16
- }
17
- };
18
- var company_model_default = CompanyModel;
19
-
20
- // src/models/user-model/index.ts
21
- var UserModel = class extends chunkFVGPSTJ7_js.base_model_default {
22
- constructor(init) {
23
- super(init);
24
- }
25
- async getProfile() {
26
- return await chunkP2IGWJDZ_js.user_service_default.getProfile();
27
- }
28
- };
29
- var user_model_default = UserModel;
30
-
31
- exports.company_model_default = company_model_default;
32
- exports.user_model_default = user_model_default;
@@ -1 +0,0 @@
1
-
@@ -1,86 +0,0 @@
1
- import { setEnv, setUid, setLang, setAllowCompanies, setCompanies, setDefaultCompany, setUser, envStore } from './chunk-QLUONJPQ.mjs';
2
- import { axiosClient } from './chunk-6QXB3XX7.mjs';
3
-
4
- // src/environment/EnvStore.ts
5
- var EnvStore = class {
6
- envStore;
7
- baseUrl;
8
- requests;
9
- context;
10
- defaultCompany;
11
- config;
12
- companies;
13
- user;
14
- db;
15
- localStorageUtils;
16
- sessionStorageUtils;
17
- constructor(envStore2, localStorageUtils, sessionStorageUtils) {
18
- this.envStore = envStore2;
19
- this.localStorageUtils = localStorageUtils;
20
- this.sessionStorageUtils = sessionStorageUtils;
21
- this.setup();
22
- }
23
- setup() {
24
- const env2 = this.envStore.getState().env;
25
- this.baseUrl = env2?.baseUrl;
26
- this.requests = env2?.requests;
27
- this.context = env2?.context;
28
- this.defaultCompany = env2?.defaultCompany;
29
- this.config = env2?.config;
30
- this.companies = env2?.companies || [];
31
- this.user = env2?.user;
32
- this.db = env2?.db;
33
- }
34
- setupEnv(envConfig) {
35
- const dispatch = this.envStore.dispatch;
36
- const env2 = {
37
- ...envConfig,
38
- localStorageUtils: this.localStorageUtils,
39
- sessionStorageUtils: this.sessionStorageUtils
40
- };
41
- const requests = axiosClient.init(env2);
42
- dispatch(setEnv({ ...env2, requests }));
43
- this.setup();
44
- }
45
- setUid(uid) {
46
- const dispatch = this.envStore.dispatch;
47
- dispatch(setUid(uid));
48
- this.setup();
49
- }
50
- setLang(lang) {
51
- const dispatch = this.envStore.dispatch;
52
- dispatch(setLang(lang));
53
- this.setup();
54
- }
55
- setAllowCompanies(allowCompanies) {
56
- const dispatch = this.envStore.dispatch;
57
- dispatch(setAllowCompanies(allowCompanies));
58
- this.setup();
59
- }
60
- setCompanies(companies) {
61
- const dispatch = this.envStore.dispatch;
62
- dispatch(setCompanies(companies));
63
- this.setup();
64
- }
65
- setDefaultCompany(company) {
66
- const dispatch = this.envStore.dispatch;
67
- dispatch(setDefaultCompany(company));
68
- this.setup();
69
- }
70
- setUserInfo(userInfo) {
71
- const dispatch = this.envStore.dispatch;
72
- dispatch(setUser(userInfo));
73
- this.setup();
74
- }
75
- };
76
- var env = null;
77
- function initEnv({}) {
78
- env = new EnvStore(envStore);
79
- return env;
80
- }
81
- function getEnv() {
82
- if (!env) env = new EnvStore(envStore);
83
- return env;
84
- }
85
-
86
- export { EnvStore, env, getEnv, initEnv };