@vocollege/app 0.0.58 → 0.0.60
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/{types.d.ts → global.d.ts} +4 -0
- package/dist/{types.js → global.js} +0 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -3
- package/dist/interceptor.js +14 -9
- package/dist/modules/Services/I18n/I18n.js +1 -1
- package/dist/modules/Services/I18n/strings.json +515 -25
- package/dist/modules/Services/Vapor/Vapor.js +3 -1
- package/dist/modules/VoApi/GraphClient.d.ts +3 -2
- package/dist/modules/VoApi/GraphClient.js +51 -13
- package/dist/modules/VoApi/VoApi.d.ts +4 -1
- package/dist/modules/VoApi/VoApi.js +18 -2
- package/dist/modules/VoApi/graphql.d.ts +5 -0
- package/dist/modules/VoApi/graphql.js +12 -3
- package/dist/modules/VoApi/index.js +5 -1
- package/dist/modules/VoApi/mutations/acl.js +5 -5
- package/dist/modules/VoApi/mutations/applications.d.ts +3 -0
- package/dist/modules/VoApi/mutations/applications.js +12 -0
- package/dist/modules/VoApi/mutations/articles.js +3 -3
- package/dist/modules/VoApi/mutations/books.d.ts +3 -0
- package/dist/modules/VoApi/mutations/books.js +12 -0
- package/dist/modules/VoApi/mutations/cards.js +3 -3
- package/dist/modules/VoApi/mutations/events.js +3 -3
- package/dist/modules/VoApi/mutations/navigation.js +3 -3
- package/dist/modules/VoApi/mutations/pages.js +3 -3
- package/dist/modules/VoApi/mutations/queues.js +3 -3
- package/dist/modules/VoApi/mutations/sections.js +3 -3
- package/dist/modules/VoApi/mutations/settings.js +1 -1
- package/dist/modules/VoApi/mutations/users.js +3 -3
- package/dist/modules/VoApi/mutations/vodocs.js +9 -9
- package/dist/modules/VoApi/mutations/vogroups.d.ts +1 -0
- package/dist/modules/VoApi/mutations/vogroups.js +10 -9
- package/dist/modules/VoApi/queries/acl.js +4 -4
- package/dist/modules/VoApi/queries/applications.d.ts +2 -0
- package/dist/modules/VoApi/queries/applications.js +11 -0
- package/dist/modules/VoApi/queries/articles.js +2 -2
- package/dist/modules/VoApi/queries/books.d.ts +4 -0
- package/dist/modules/VoApi/queries/books.js +13 -0
- package/dist/modules/VoApi/queries/cards.js +2 -2
- package/dist/modules/VoApi/queries/events.js +2 -2
- package/dist/modules/VoApi/queries/help.d.ts +1 -0
- package/dist/modules/VoApi/queries/help.js +11 -0
- package/dist/modules/VoApi/queries/navigation.js +4 -4
- package/dist/modules/VoApi/queries/pages.js +2 -2
- package/dist/modules/VoApi/queries/queues.js +2 -2
- package/dist/modules/VoApi/queries/search.d.ts +2 -0
- package/dist/modules/VoApi/queries/search.js +5 -3
- package/dist/modules/VoApi/queries/sections.js +2 -2
- package/dist/modules/VoApi/queries/settings.js +1 -1
- package/dist/modules/VoApi/queries/users.d.ts +1 -0
- package/dist/modules/VoApi/queries/users.js +5 -4
- package/dist/modules/VoApi/queries/vodocs.js +3 -3
- package/dist/modules/VoApi/queries/vogroups.js +7 -7
- package/dist/modules/VoApp.d.ts +1 -0
- package/dist/modules/VoApp.js +17 -0
- package/dist/modules/VoAuth.d.ts +2 -1
- package/dist/modules/VoAuth.js +119 -38
- package/dist/modules/VoBase.js +2 -2
- package/dist/modules/VoConfig.js +9 -0
- package/dist/modules/VoDocs/VoDocs.js +7 -2
- package/dist/modules/VoGroups.d.ts +7 -0
- package/dist/modules/VoGroups.js +40 -0
- package/dist/modules/VoHelpers.d.ts +36 -1
- package/dist/modules/VoHelpers.js +320 -48
- package/dist/modules/VoRouter.js +10 -2
- package/dist/modules/VoUtils_REMOVE.js +9 -5
- package/package.json +17 -9
- package/src/global.ts +44 -0
- package/src/index.ts +3 -2
- package/src/interceptor.ts +15 -8
- package/src/modules/Services/I18n/strings.json +514 -24
- package/src/modules/Services/Vapor/Vapor.ts +2 -1
- package/src/modules/VoApi/GraphClient.ts +66 -8
- package/src/modules/VoApi/VoApi.ts +23 -3
- package/src/modules/VoApi/graphql.ts +5 -0
- package/src/modules/VoApi/mutations/applications.ts +27 -0
- package/src/modules/VoApi/mutations/books.ts +27 -0
- package/src/modules/VoApi/mutations/users.ts +5 -0
- package/src/modules/VoApi/mutations/vodocs.ts +2 -0
- package/src/modules/VoApi/mutations/vogroups.ts +21 -7
- package/src/modules/VoApi/queries/applications.ts +71 -0
- package/src/modules/VoApi/queries/articles.ts +1 -1
- package/src/modules/VoApi/queries/books.ts +113 -0
- package/src/modules/VoApi/queries/cards.ts +14 -1
- package/src/modules/VoApi/queries/events.ts +1 -1
- package/src/modules/VoApi/queries/help.ts +12 -0
- package/src/modules/VoApi/queries/navigation.ts +3 -4
- package/src/modules/VoApi/queries/pages.ts +1 -1
- package/src/modules/VoApi/queries/queues.ts +18 -1
- package/src/modules/VoApi/queries/search.ts +98 -1
- package/src/modules/VoApi/queries/sections.ts +1 -1
- package/src/modules/VoApi/queries/users.ts +74 -8
- package/src/modules/VoApi/queries/vodocs.ts +8 -4
- package/src/modules/VoApi/queries/vogroups.ts +40 -11
- package/src/modules/VoApp.ts +25 -8
- package/src/modules/VoAuth.ts +134 -37
- package/src/modules/VoConfig.ts +11 -0
- package/src/modules/VoDocs/VoDocs.ts +5 -0
- package/src/modules/VoGroups.ts +34 -0
- package/src/modules/VoHelpers.ts +254 -42
- package/src/modules/VoRouter.ts +10 -3
- package/src/types.ts +0 -38
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ import VoAuth from "./modules/VoAuth";
|
|
|
4
4
|
import VoRouter from "./modules/VoRouter";
|
|
5
5
|
import VoConfig from "./modules/VoConfig";
|
|
6
6
|
import VoDocs from "./modules/VoDocs";
|
|
7
|
+
import VoGroups from "./modules/VoGroups";
|
|
7
8
|
import "./interceptor";
|
|
8
|
-
export { VoApi, VoApp, VoAuth, VoRouter, VoConfig, VoDocs };
|
|
9
|
+
export { VoApi, VoApp, VoAuth, VoRouter, VoConfig, VoDocs, VoGroups };
|
|
9
10
|
export * from "./modules/VoApi";
|
|
10
11
|
export * from "./modules/VoHelpers";
|
|
11
12
|
export * from "./modules/Services";
|
|
12
|
-
export * from "./
|
|
13
|
+
export * from "./global";
|
|
13
14
|
export default VoApp;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -13,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
18
|
};
|
|
15
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.VoDocs = exports.VoConfig = exports.VoRouter = exports.VoAuth = exports.VoApp = exports.VoApi = void 0;
|
|
20
|
+
exports.VoGroups = exports.VoDocs = exports.VoConfig = exports.VoRouter = exports.VoAuth = exports.VoApp = exports.VoApi = void 0;
|
|
17
21
|
var VoApi_1 = __importDefault(require("./modules/VoApi"));
|
|
18
22
|
exports.VoApi = VoApi_1.default;
|
|
19
23
|
var VoApp_1 = __importDefault(require("./modules/VoApp"));
|
|
@@ -26,9 +30,11 @@ var VoConfig_1 = __importDefault(require("./modules/VoConfig"));
|
|
|
26
30
|
exports.VoConfig = VoConfig_1.default;
|
|
27
31
|
var VoDocs_1 = __importDefault(require("./modules/VoDocs"));
|
|
28
32
|
exports.VoDocs = VoDocs_1.default;
|
|
33
|
+
var VoGroups_1 = __importDefault(require("./modules/VoGroups"));
|
|
34
|
+
exports.VoGroups = VoGroups_1.default;
|
|
29
35
|
require("./interceptor");
|
|
30
36
|
__exportStar(require("./modules/VoApi"), exports);
|
|
31
37
|
__exportStar(require("./modules/VoHelpers"), exports);
|
|
32
38
|
__exportStar(require("./modules/Services"), exports);
|
|
33
|
-
__exportStar(require("./
|
|
39
|
+
__exportStar(require("./global"), exports);
|
|
34
40
|
exports.default = VoApp_1.default;
|
package/dist/interceptor.js
CHANGED
|
@@ -42,6 +42,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42
42
|
var axios_1 = __importDefault(require("axios"));
|
|
43
43
|
var VoAuth_1 = __importDefault(require("./modules/VoAuth"));
|
|
44
44
|
var VoRouter_1 = __importDefault(require("./modules/VoRouter"));
|
|
45
|
+
// import VoApp from "./modules/VoApp";
|
|
45
46
|
var react_toastify_1 = require("react-toastify");
|
|
46
47
|
// Custom.
|
|
47
48
|
var I18n_1 = __importDefault(require("./modules/Services/I18n"));
|
|
@@ -89,7 +90,6 @@ var I18n_1 = __importDefault(require("./modules/Services/I18n"));
|
|
|
89
90
|
switch (_a) {
|
|
90
91
|
case 400: return [3 /*break*/, 1];
|
|
91
92
|
case 401: return [3 /*break*/, 1];
|
|
92
|
-
case 403: return [3 /*break*/, 1];
|
|
93
93
|
}
|
|
94
94
|
return [3 /*break*/, 5];
|
|
95
95
|
case 1:
|
|
@@ -117,14 +117,19 @@ var I18n_1 = __importDefault(require("./modules/Services/I18n"));
|
|
|
117
117
|
// console.error("Interceptor", error);
|
|
118
118
|
// return Promise.reject(error);
|
|
119
119
|
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
120
|
+
switch (status) {
|
|
121
|
+
// case 403:
|
|
122
|
+
// reject(error);
|
|
123
|
+
// break;
|
|
124
|
+
case 419:
|
|
125
|
+
react_toastify_1.toast.error(I18n_1.default.get.messages.sessionExpired);
|
|
126
|
+
setTimeout(function () {
|
|
127
|
+
redirect();
|
|
128
|
+
}, 5000);
|
|
129
|
+
break;
|
|
130
|
+
default:
|
|
131
|
+
reject(error);
|
|
132
|
+
break;
|
|
128
133
|
}
|
|
129
134
|
console.error("Interceptor", error);
|
|
130
135
|
})];
|
|
@@ -24,7 +24,7 @@ var I18n = /** @class */ (function () {
|
|
|
24
24
|
}
|
|
25
25
|
var result = str;
|
|
26
26
|
for (var placeholder in placeholders) {
|
|
27
|
-
result = result.replace("::"
|
|
27
|
+
result = result.replace("::".concat(placeholder), placeholders[placeholder]);
|
|
28
28
|
}
|
|
29
29
|
return result;
|
|
30
30
|
};
|