@fctc/edu-logic-lib 1.0.6 → 1.0.8

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 (79) hide show
  1. package/dist/base-model-type-DvO53Lwi.d.mts +7 -0
  2. package/dist/base-model-type-DvO53Lwi.d.ts +7 -0
  3. package/dist/chunk-4K3QAEZ6.js +90 -0
  4. package/dist/chunk-6BLY7NZ6.mjs +120 -0
  5. package/dist/chunk-6QXB3XX7.mjs +256 -0
  6. package/dist/chunk-7JD5GMIZ.js +2 -0
  7. package/dist/chunk-AYUH66EE.mjs +62 -0
  8. package/dist/chunk-CZHZLKNA.mjs +585 -0
  9. package/dist/chunk-EK43MEN4.js +635 -0
  10. package/dist/chunk-ELARQVCE.mjs +2344 -0
  11. package/dist/chunk-FVGPSTJ7.js +122 -0
  12. package/dist/chunk-GGOFXFSX.js +2362 -0
  13. package/dist/chunk-IXDDYGKE.js +61 -0
  14. package/dist/chunk-MLJQPO4Q.mjs +57 -0
  15. package/dist/chunk-OADBRQ4A.js +32 -0
  16. package/dist/chunk-OBR6UTC5.mjs +1 -0
  17. package/dist/chunk-OFUXC2LA.mjs +86 -0
  18. package/dist/chunk-P2IGWJDZ.js +1068 -0
  19. package/dist/chunk-QLUONJPQ.mjs +519 -0
  20. package/dist/chunk-RWRHCIQI.mjs +1059 -0
  21. package/dist/chunk-RZBHZYXG.js +582 -0
  22. package/dist/chunk-S7B3VKMJ.mjs +85 -0
  23. package/dist/chunk-S7YF2I23.js +95 -0
  24. package/dist/chunk-UY6GNZNB.js +262 -0
  25. package/dist/chunk-XYVK476U.mjs +29 -0
  26. package/dist/chunk-YOV6KAT2.js +66 -0
  27. package/dist/config.d.mts +15 -0
  28. package/dist/config.d.ts +15 -0
  29. package/dist/config.js +11 -0
  30. package/dist/config.mjs +2 -0
  31. package/dist/constants.d.mts +120 -0
  32. package/dist/constants.d.ts +120 -0
  33. package/dist/constants.js +55 -0
  34. package/dist/constants.mjs +2 -0
  35. package/dist/context-type-D5XefoL-.d.mts +8 -0
  36. package/dist/context-type-D5XefoL-.d.ts +8 -0
  37. package/dist/environment.d.mts +37 -0
  38. package/dist/environment.d.ts +37 -0
  39. package/dist/environment.js +25 -0
  40. package/dist/environment.mjs +4 -0
  41. package/dist/hooks.d.mts +218 -0
  42. package/dist/hooks.d.ts +218 -0
  43. package/dist/hooks.js +194 -0
  44. package/dist/hooks.mjs +9 -0
  45. package/dist/index-C_nK1Mii.d.mts +19 -0
  46. package/dist/index-C_nK1Mii.d.ts +19 -0
  47. package/dist/index.d.mts +23 -1294
  48. package/dist/index.d.ts +23 -1294
  49. package/dist/index.js +626 -5320
  50. package/dist/index.mjs +12 -5165
  51. package/dist/models.d.mts +35 -0
  52. package/dist/models.d.ts +35 -0
  53. package/dist/models.js +26 -0
  54. package/dist/models.mjs +9 -0
  55. package/dist/provider.d.mts +16 -0
  56. package/dist/provider.d.ts +16 -0
  57. package/dist/provider.js +25 -0
  58. package/dist/provider.mjs +8 -0
  59. package/dist/services.d.mts +160 -0
  60. package/dist/services.d.ts +160 -0
  61. package/dist/services.js +44 -0
  62. package/dist/services.mjs +7 -0
  63. package/dist/store.d.mts +505 -0
  64. package/dist/store.d.ts +505 -0
  65. package/dist/store.js +254 -0
  66. package/dist/store.mjs +1 -0
  67. package/dist/types.d.mts +12 -0
  68. package/dist/types.d.ts +12 -0
  69. package/dist/types.js +4 -0
  70. package/dist/types.mjs +1 -0
  71. package/dist/use-get-selection-DFh6sc49.d.mts +26 -0
  72. package/dist/use-get-selection-DFh6sc49.d.ts +26 -0
  73. package/dist/utils.d.mts +52 -0
  74. package/dist/utils.d.ts +52 -0
  75. package/dist/utils.js +66 -0
  76. package/dist/utils.mjs +1 -0
  77. package/dist/view-type-BTzRpkT7.d.mts +106 -0
  78. package/dist/view-type-BTzRpkT7.d.ts +106 -0
  79. package/package.json +68 -31
@@ -0,0 +1,61 @@
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;
@@ -0,0 +1,57 @@
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 };
@@ -0,0 +1,32 @@
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;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,86 @@
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 };