@edifice.io/client 2.5.9-develop-b2school.20260212120233 → 2.5.9-develop-pedago.20260213101441
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/configure/Framework.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +230 -182
- package/dist/utilities/deviceDetection.d.ts +56 -0
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
|
-
var P = (
|
|
3
|
-
var
|
|
2
|
+
var P = (n, e, t) => e in n ? T(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var u = (n, e, t) => P(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import { MimeTypeUtils } from "@edifice.io/utilities";
|
|
6
|
+
import { UAParser } from "ua-parser-js";
|
|
6
7
|
const ERROR_CODE = {
|
|
7
8
|
SUCCESS: "0000",
|
|
8
9
|
UNKNOWN: "0010",
|
|
@@ -97,10 +98,10 @@ const ERROR_CODE = {
|
|
|
97
98
|
INFOTIP: "infotip",
|
|
98
99
|
RGPD_COOKIES: "rgpdCookies"
|
|
99
100
|
// TODO compléter
|
|
100
|
-
},
|
|
101
|
+
}, C = class C {
|
|
101
102
|
constructor(e) {
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
u(this, "name");
|
|
104
|
+
u(this, "listeners", /* @__PURE__ */ new Set());
|
|
104
105
|
this.name = e;
|
|
105
106
|
}
|
|
106
107
|
/**
|
|
@@ -109,8 +110,8 @@ const ERROR_CODE = {
|
|
|
109
110
|
* @returns the channel instance
|
|
110
111
|
*/
|
|
111
112
|
static getChannel(e) {
|
|
112
|
-
let t =
|
|
113
|
-
return t || (t = new
|
|
113
|
+
let t = C.channels.get(e);
|
|
114
|
+
return t || (t = new C(e), C.channels.set(e, t)), t;
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
117
|
* Add a listener and return a revocation function to remove it.
|
|
@@ -135,14 +136,14 @@ const ERROR_CODE = {
|
|
|
135
136
|
* Close this channel: remove listeners and unregister from global map.
|
|
136
137
|
*/
|
|
137
138
|
close() {
|
|
138
|
-
this.listeners.clear(),
|
|
139
|
+
this.listeners.clear(), C.channels.delete(this.name);
|
|
139
140
|
}
|
|
140
141
|
};
|
|
141
|
-
|
|
142
|
-
let SimpleChannel =
|
|
142
|
+
u(C, "channels", /* @__PURE__ */ new Map());
|
|
143
|
+
let SimpleChannel = C;
|
|
143
144
|
class Subscription {
|
|
144
145
|
constructor(e, t) {
|
|
145
|
-
|
|
146
|
+
u(this, "revoke");
|
|
146
147
|
this._channel = e, this.revoke = this.setReceiver((s) => t == null ? void 0 : t(s));
|
|
147
148
|
}
|
|
148
149
|
setReceiver(e) {
|
|
@@ -159,7 +160,7 @@ class Subject {
|
|
|
159
160
|
/* We maintain channels for sending messages.
|
|
160
161
|
* Receiving channels are instantiated per subscription.
|
|
161
162
|
*/
|
|
162
|
-
|
|
163
|
+
u(this, "publishChannels", /* @__PURE__ */ new Map());
|
|
163
164
|
}
|
|
164
165
|
getChannelName(e) {
|
|
165
166
|
return "Subject:" + e;
|
|
@@ -194,9 +195,9 @@ const ASYNC_DATA_NAME = {
|
|
|
194
195
|
class Promisified {
|
|
195
196
|
constructor() {
|
|
196
197
|
//-------------------------------------
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
u(this, "_resolution");
|
|
199
|
+
u(this, "_rejection");
|
|
200
|
+
u(this, "_promise", new Promise((e, t) => {
|
|
200
201
|
this._resolution = e, this._rejection = t;
|
|
201
202
|
}));
|
|
202
203
|
}
|
|
@@ -213,8 +214,8 @@ class Promisified {
|
|
|
213
214
|
class NotifyFramework {
|
|
214
215
|
constructor() {
|
|
215
216
|
//-------------------------------------
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
u(this, "promises", {});
|
|
218
|
+
u(this, "subject", new Subject());
|
|
218
219
|
}
|
|
219
220
|
asyncData(e) {
|
|
220
221
|
return typeof this.promises[e] > "u" && (this.promises[e] = new Promisified()), this.promises[e];
|
|
@@ -245,8 +246,8 @@ const notify = new NotifyFramework(), loadedScripts$1 = {};
|
|
|
245
246
|
class Http {
|
|
246
247
|
constructor(e) {
|
|
247
248
|
// Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
u(this, "axios");
|
|
250
|
+
u(this, "_latestResponse");
|
|
250
251
|
this.axios = axios.create(e);
|
|
251
252
|
}
|
|
252
253
|
setCdn(e) {
|
|
@@ -343,7 +344,7 @@ class Http {
|
|
|
343
344
|
}
|
|
344
345
|
class TransportFramework {
|
|
345
346
|
constructor() {
|
|
346
|
-
|
|
347
|
+
u(this, "_http", new Http());
|
|
347
348
|
}
|
|
348
349
|
get http() {
|
|
349
350
|
return this._http;
|
|
@@ -362,11 +363,11 @@ class ConfigurationFrameworkFactory {
|
|
|
362
363
|
const http$2 = transport.http;
|
|
363
364
|
class Session {
|
|
364
365
|
constructor() {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
u(this, "_me", null);
|
|
367
|
+
u(this, "_currentLanguage", "");
|
|
368
|
+
u(this, "_notLoggedIn", !0);
|
|
369
|
+
u(this, "_description");
|
|
370
|
+
u(this, "_profile");
|
|
370
371
|
}
|
|
371
372
|
get currentLanguage() {
|
|
372
373
|
return this._currentLanguage;
|
|
@@ -484,7 +485,7 @@ class Session {
|
|
|
484
485
|
}
|
|
485
486
|
class SessionFramework {
|
|
486
487
|
constructor() {
|
|
487
|
-
|
|
488
|
+
u(this, "session", new Session());
|
|
488
489
|
}
|
|
489
490
|
initialize() {
|
|
490
491
|
return this.session.initialize();
|
|
@@ -508,22 +509,22 @@ class SessionFramework {
|
|
|
508
509
|
const session = new SessionFramework();
|
|
509
510
|
class Theme {
|
|
510
511
|
constructor() {
|
|
511
|
-
|
|
512
|
-
|
|
512
|
+
u(this, "_conf");
|
|
513
|
+
u(this, "_loaded");
|
|
513
514
|
// legacy (readonly)
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
515
|
+
u(this, "skinName", "");
|
|
516
|
+
u(this, "themeName", "");
|
|
517
|
+
u(this, "skin", "raw");
|
|
518
|
+
u(this, "themeUrl", "/assets/themes/raw/default/");
|
|
519
|
+
u(this, "templateOverrides", {});
|
|
520
|
+
u(this, "portalTemplate", "/assets/themes/raw/portal.html");
|
|
521
|
+
u(this, "basePath", "");
|
|
522
|
+
u(this, "logoutCallback", "");
|
|
523
|
+
u(this, "skins", []);
|
|
524
|
+
u(this, "is1D", !1);
|
|
525
|
+
u(this, "is2D", !1);
|
|
526
|
+
u(this, "_onSkinReady", notify.onSkinReady());
|
|
527
|
+
u(this, "_onOverrideReady", notify.onOverridesReady());
|
|
527
528
|
}
|
|
528
529
|
initialize(e) {
|
|
529
530
|
return notify.onSessionReady().promise.then(() => this.load(e));
|
|
@@ -895,7 +896,7 @@ class Idiom {
|
|
|
895
896
|
class UserPreferences {
|
|
896
897
|
constructor() {
|
|
897
898
|
//-------------------------------------
|
|
898
|
-
|
|
899
|
+
u(this, "data", {});
|
|
899
900
|
}
|
|
900
901
|
get(e) {
|
|
901
902
|
return this.data[e];
|
|
@@ -922,10 +923,10 @@ class UserPreferences {
|
|
|
922
923
|
class User {
|
|
923
924
|
constructor() {
|
|
924
925
|
//-------------------------------------
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
926
|
+
u(this, "_me", null);
|
|
927
|
+
u(this, "_keepOpenOnLogout", !1);
|
|
928
|
+
u(this, "_preferences", new UserPreferences());
|
|
929
|
+
u(this, "_bookmarkedApps", []);
|
|
929
930
|
}
|
|
930
931
|
get keepOpenOnLogout() {
|
|
931
932
|
return this._keepOpenOnLogout;
|
|
@@ -999,9 +1000,9 @@ const http$1 = transport == null ? void 0 : transport.http;
|
|
|
999
1000
|
class AppConf {
|
|
1000
1001
|
constructor() {
|
|
1001
1002
|
//-------------------------------------
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1003
|
+
u(this, "_publicConf", {});
|
|
1004
|
+
u(this, "_currentApp");
|
|
1005
|
+
u(this, "_appConf", {});
|
|
1005
1006
|
}
|
|
1006
1007
|
/**
|
|
1007
1008
|
* Get the currently initialized App.
|
|
@@ -1039,8 +1040,8 @@ class AppConf {
|
|
|
1039
1040
|
class Analytics {
|
|
1040
1041
|
constructor() {
|
|
1041
1042
|
//-------------------------------------
|
|
1042
|
-
|
|
1043
|
-
|
|
1043
|
+
u(this, "_status", "void");
|
|
1044
|
+
u(this, "_params");
|
|
1044
1045
|
}
|
|
1045
1046
|
get status() {
|
|
1046
1047
|
return this._status;
|
|
@@ -1122,10 +1123,56 @@ class Analytics {
|
|
|
1122
1123
|
};
|
|
1123
1124
|
}
|
|
1124
1125
|
}
|
|
1126
|
+
function setCookie(n, e) {
|
|
1127
|
+
if (typeof document > "u") return;
|
|
1128
|
+
const t = location.protocol === "https:" ? "; Secure" : "";
|
|
1129
|
+
document.cookie = `${n}=${encodeURIComponent(e)}; path=/; SameSite=Strict${t}`;
|
|
1130
|
+
}
|
|
1131
|
+
function getCookie(n) {
|
|
1132
|
+
if (typeof document > "u") return null;
|
|
1133
|
+
const e = document.cookie.match(new RegExp("(^| )" + n + "=([^;]+)"));
|
|
1134
|
+
if (e)
|
|
1135
|
+
try {
|
|
1136
|
+
return decodeURIComponent(e[2]);
|
|
1137
|
+
} catch {
|
|
1138
|
+
return e[2];
|
|
1139
|
+
}
|
|
1140
|
+
return null;
|
|
1141
|
+
}
|
|
1142
|
+
function isPad() {
|
|
1143
|
+
return typeof window < "u" && "ongesturechange" in window;
|
|
1144
|
+
}
|
|
1145
|
+
function detectDevice() {
|
|
1146
|
+
if (typeof window > "u")
|
|
1147
|
+
return { osName: "", osVersion: "", deviceType: "", deviceName: "" };
|
|
1148
|
+
const n = UAParser(), e = isPad(), t = n.device.vendor || "", s = n.device.model || "", r = t && s ? `${t} ${s}` : s || t || "Unknown";
|
|
1149
|
+
let i = n.os.name || "Unknown", o = n.device.type || (e ? "tablet" : "desktop"), a = r;
|
|
1150
|
+
return e && i.toLowerCase() == "macos" && (i = "iPadOS", o = "tablet", a = "iPad"), {
|
|
1151
|
+
osName: i,
|
|
1152
|
+
osVersion: n.os.version || "Unknown",
|
|
1153
|
+
deviceType: o,
|
|
1154
|
+
deviceName: a
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
function readDeviceCookies() {
|
|
1158
|
+
const n = getCookie("osName"), e = getCookie("osVersion"), t = getCookie("deviceType"), s = getCookie("deviceName");
|
|
1159
|
+
return n && e && t && s ? { osName: n, osVersion: e, deviceType: t, deviceName: s } : null;
|
|
1160
|
+
}
|
|
1161
|
+
function setDeviceCookies() {
|
|
1162
|
+
try {
|
|
1163
|
+
const n = readDeviceCookies();
|
|
1164
|
+
if (n != null)
|
|
1165
|
+
return n;
|
|
1166
|
+
const e = detectDevice();
|
|
1167
|
+
return setCookie("osName", e.osName), setCookie("osVersion", e.osVersion), setCookie("deviceType", e.deviceType), setCookie("deviceName", e.deviceName), e;
|
|
1168
|
+
} catch (n) {
|
|
1169
|
+
return console.warn("Device detection failed, using Unknown values:", n), { osName: "Unknown", osVersion: "Unknown", deviceType: "Unknown", deviceName: "Unknown" };
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1125
1172
|
class ConfigurationFramework {
|
|
1126
1173
|
constructor() {
|
|
1127
1174
|
//-------------------------------------
|
|
1128
|
-
|
|
1175
|
+
u(this, "Platform", {
|
|
1129
1176
|
deploymentTag: "",
|
|
1130
1177
|
cdnDomain: "",
|
|
1131
1178
|
apps: new AppConf(),
|
|
@@ -1134,10 +1181,11 @@ class ConfigurationFramework {
|
|
|
1134
1181
|
idiom: new Idiom(),
|
|
1135
1182
|
listLanguages: () => transport.http.get("/languages")
|
|
1136
1183
|
});
|
|
1137
|
-
|
|
1184
|
+
u(this, "School", {
|
|
1138
1185
|
//apps; -> pinnedApps;
|
|
1139
1186
|
});
|
|
1140
|
-
|
|
1187
|
+
u(this, "User", new User());
|
|
1188
|
+
setDeviceCookies();
|
|
1141
1189
|
}
|
|
1142
1190
|
async initialize(e, t) {
|
|
1143
1191
|
if (!e) {
|
|
@@ -1180,12 +1228,12 @@ class ConfigurationFramework {
|
|
|
1180
1228
|
// }
|
|
1181
1229
|
}
|
|
1182
1230
|
const configure = new ConfigurationFramework(), http = transport == null ? void 0 : transport.http;
|
|
1183
|
-
var
|
|
1184
|
-
const me = (
|
|
1231
|
+
var D;
|
|
1232
|
+
const me = (D = session == null ? void 0 : session.session) == null ? void 0 : D.user;
|
|
1185
1233
|
class Notification {
|
|
1186
1234
|
constructor(e) {
|
|
1187
|
-
|
|
1188
|
-
|
|
1235
|
+
u(this, "_id");
|
|
1236
|
+
u(this, "model");
|
|
1189
1237
|
e.reported = e.reporters && e.reporters.length > 0, this._id = e._id, this.model = e;
|
|
1190
1238
|
}
|
|
1191
1239
|
isUnread() {
|
|
@@ -1205,14 +1253,14 @@ class Notification {
|
|
|
1205
1253
|
class TimelineApp {
|
|
1206
1254
|
constructor() {
|
|
1207
1255
|
//-------------------------------------
|
|
1208
|
-
|
|
1209
|
-
|
|
1256
|
+
u(this, "_notifications", []);
|
|
1257
|
+
u(this, "_notificationTypes", []);
|
|
1210
1258
|
// ex: ["BLOG"]
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1259
|
+
u(this, "_flashMessages", []);
|
|
1260
|
+
u(this, "_pageNumber", 0);
|
|
1261
|
+
u(this, "_lastPage", !1);
|
|
1262
|
+
u(this, "_loading", !1);
|
|
1263
|
+
u(this, "showMine", !1);
|
|
1216
1264
|
}
|
|
1217
1265
|
get notifications() {
|
|
1218
1266
|
return this._notifications;
|
|
@@ -1361,7 +1409,7 @@ const m = class m {
|
|
|
1361
1409
|
//
|
|
1362
1410
|
// PROTECTED HELPERS
|
|
1363
1411
|
//
|
|
1364
|
-
|
|
1412
|
+
u(this, "checkHttpResponse", (e) => {
|
|
1365
1413
|
if (this.http.latestResponse.status >= 300)
|
|
1366
1414
|
throw this.http.latestResponse.statusText;
|
|
1367
1415
|
return e;
|
|
@@ -1579,8 +1627,8 @@ const m = class m {
|
|
|
1579
1627
|
//
|
|
1580
1628
|
// STATIC REGISTRY
|
|
1581
1629
|
//
|
|
1582
|
-
|
|
1583
|
-
|
|
1630
|
+
u(m, "registry", new ServiceRegistry()), // Expose some useful functions
|
|
1631
|
+
u(m, "register", m.registry.register.bind(m.registry)), u(m, "findService", m.registry.findService.bind(m.registry)), u(m, "findMainService", m.registry.findMainService.bind(m.registry)), u(m, "isRegistered", m.registry.isRegistered.bind(m.registry));
|
|
1584
1632
|
let ResourceService = m;
|
|
1585
1633
|
const APP$3 = "scrapbook", RESOURCE$3 = "scrapbook";
|
|
1586
1634
|
class ScrapbookResourceService extends ResourceService {
|
|
@@ -1623,7 +1671,7 @@ class ScrapbookResourceService extends ResourceService {
|
|
|
1623
1671
|
}
|
|
1624
1672
|
ResourceService.register(
|
|
1625
1673
|
{ application: RESOURCE$3, resourceType: RESOURCE$3 },
|
|
1626
|
-
(
|
|
1674
|
+
(n) => new ScrapbookResourceService(n)
|
|
1627
1675
|
);
|
|
1628
1676
|
const APP$2 = "homeworks", RESOURCE$2 = "homeworks";
|
|
1629
1677
|
class HomeworksResourceService extends ResourceService {
|
|
@@ -1673,7 +1721,7 @@ class HomeworksResourceService extends ResourceService {
|
|
|
1673
1721
|
}
|
|
1674
1722
|
ResourceService.register(
|
|
1675
1723
|
{ application: RESOURCE$2, resourceType: RESOURCE$2 },
|
|
1676
|
-
(
|
|
1724
|
+
(n) => new HomeworksResourceService(n)
|
|
1677
1725
|
);
|
|
1678
1726
|
const APP$1 = "timelinegenerator", RESOURCE$1 = "timelinegenerator";
|
|
1679
1727
|
class TimelineGeneratorResourceService extends ResourceService {
|
|
@@ -1728,7 +1776,7 @@ class TimelineGeneratorResourceService extends ResourceService {
|
|
|
1728
1776
|
}
|
|
1729
1777
|
ResourceService.register(
|
|
1730
1778
|
{ application: RESOURCE$1, resourceType: RESOURCE$1 },
|
|
1731
|
-
(
|
|
1779
|
+
(n) => new TimelineGeneratorResourceService(n)
|
|
1732
1780
|
);
|
|
1733
1781
|
const APP = "collaborativeeditor", RESOURCE = "collaborativeeditor";
|
|
1734
1782
|
class CollaborativeEditorResourceService extends ResourceService {
|
|
@@ -1776,7 +1824,7 @@ class CollaborativeEditorResourceService extends ResourceService {
|
|
|
1776
1824
|
}
|
|
1777
1825
|
ResourceService.register(
|
|
1778
1826
|
{ application: RESOURCE, resourceType: RESOURCE },
|
|
1779
|
-
(
|
|
1827
|
+
(n) => new CollaborativeEditorResourceService(n)
|
|
1780
1828
|
);
|
|
1781
1829
|
const globalCache = {}, mutexPromise = {};
|
|
1782
1830
|
class CacheService {
|
|
@@ -1993,7 +2041,7 @@ class DirectoryService {
|
|
|
1993
2041
|
this.cache.clearCache("/directory/sharebookmark/all");
|
|
1994
2042
|
const i = r.map((h) => typeof h == "string" ? h : h.id), o = s.map((h) => typeof h == "string" ? h : h.id), a = t.map(async (h) => {
|
|
1995
2043
|
if (typeof h == "string") {
|
|
1996
|
-
const { displayName: y, groups: d, id: g, users: A } = await this.getBookMarkById(h), f = A.map((
|
|
2044
|
+
const { displayName: y, groups: d, id: g, users: A } = await this.getBookMarkById(h), f = A.map((v) => v.id), w = d.map((v) => v.id);
|
|
1997
2045
|
return {
|
|
1998
2046
|
displayName: y,
|
|
1999
2047
|
id: g,
|
|
@@ -2019,10 +2067,10 @@ const loadedScripts = {};
|
|
|
2019
2067
|
class HttpService {
|
|
2020
2068
|
constructor(e, t) {
|
|
2021
2069
|
// Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2070
|
+
u(this, "axios");
|
|
2071
|
+
u(this, "baseUrl");
|
|
2072
|
+
u(this, "headers", {});
|
|
2073
|
+
u(this, "_latestResponse");
|
|
2026
2074
|
this.context = e, this.axios = axios.create(t);
|
|
2027
2075
|
}
|
|
2028
2076
|
fixBaseUrl(e) {
|
|
@@ -3089,44 +3137,44 @@ class ShareService {
|
|
|
3089
3137
|
}
|
|
3090
3138
|
}
|
|
3091
3139
|
const defaultMappers = {
|
|
3092
|
-
csv: function({ type:
|
|
3093
|
-
return MimeTypeUtils.INSTANCE.isCsvLike(
|
|
3140
|
+
csv: function({ type: n, extension: e }) {
|
|
3141
|
+
return MimeTypeUtils.INSTANCE.isCsvLike(n, e);
|
|
3094
3142
|
},
|
|
3095
|
-
doc: function({ type:
|
|
3096
|
-
return MimeTypeUtils.INSTANCE.isWordLike(
|
|
3143
|
+
doc: function({ type: n, extension: e }) {
|
|
3144
|
+
return MimeTypeUtils.INSTANCE.isWordLike(n, e) ? !0 : n.indexOf("document") !== -1 && n.indexOf("wordprocessing") !== -1;
|
|
3097
3145
|
},
|
|
3098
|
-
xls: function({ type:
|
|
3099
|
-
return MimeTypeUtils.INSTANCE.isExcelLike(
|
|
3146
|
+
xls: function({ type: n, extension: e }) {
|
|
3147
|
+
return MimeTypeUtils.INSTANCE.isExcelLike(n, e) ? !0 : n.indexOf("document") !== -1 && n.indexOf("spreadsheet") !== -1 || n.indexOf("ms-excel") !== -1;
|
|
3100
3148
|
},
|
|
3101
|
-
img: function({ type:
|
|
3102
|
-
return
|
|
3149
|
+
img: function({ type: n }) {
|
|
3150
|
+
return n.indexOf("image") !== -1;
|
|
3103
3151
|
},
|
|
3104
|
-
pdf: function({ type:
|
|
3105
|
-
return
|
|
3152
|
+
pdf: function({ type: n }) {
|
|
3153
|
+
return n.indexOf("pdf") !== -1 || n === "application/x-download";
|
|
3106
3154
|
},
|
|
3107
|
-
ppt: function({ type:
|
|
3108
|
-
return MimeTypeUtils.INSTANCE.isPowerpointLike(
|
|
3155
|
+
ppt: function({ type: n, extension: e }) {
|
|
3156
|
+
return MimeTypeUtils.INSTANCE.isPowerpointLike(n, e) ? !0 : n.indexOf("document") !== -1 && n.indexOf("presentation") !== -1 || n.indexOf("powerpoint") !== -1;
|
|
3109
3157
|
},
|
|
3110
|
-
txt: function({ type:
|
|
3111
|
-
return MimeTypeUtils.INSTANCE.isTxtLike(
|
|
3158
|
+
txt: function({ type: n, extension: e }) {
|
|
3159
|
+
return MimeTypeUtils.INSTANCE.isTxtLike(n, e);
|
|
3112
3160
|
},
|
|
3113
|
-
md: function({ type:
|
|
3114
|
-
return MimeTypeUtils.INSTANCE.isMdLike(
|
|
3161
|
+
md: function({ type: n, extension: e }) {
|
|
3162
|
+
return MimeTypeUtils.INSTANCE.isMdLike(n, e);
|
|
3115
3163
|
},
|
|
3116
|
-
video: function({ type:
|
|
3117
|
-
return
|
|
3164
|
+
video: function({ type: n }) {
|
|
3165
|
+
return n.indexOf("video") !== -1;
|
|
3118
3166
|
},
|
|
3119
|
-
audio: function({ type:
|
|
3120
|
-
return
|
|
3167
|
+
audio: function({ type: n }) {
|
|
3168
|
+
return n.indexOf("audio") !== -1;
|
|
3121
3169
|
},
|
|
3122
|
-
zip: function({ type:
|
|
3123
|
-
return
|
|
3170
|
+
zip: function({ type: n }) {
|
|
3171
|
+
return n.indexOf("zip") !== -1 || n.indexOf("rar") !== -1 || n.indexOf("tar") !== -1 || n.indexOf("7z") !== -1;
|
|
3124
3172
|
}
|
|
3125
|
-
},
|
|
3173
|
+
}, _ = class _ {
|
|
3126
3174
|
/* Similar role notion as in infra-front > workspace > Model.ts */
|
|
3127
3175
|
static getRole(e) {
|
|
3128
3176
|
var t, s;
|
|
3129
|
-
return
|
|
3177
|
+
return _.role(
|
|
3130
3178
|
(t = e.metadata) == null ? void 0 : t["content-type"],
|
|
3131
3179
|
!1,
|
|
3132
3180
|
(s = e.metadata) == null ? void 0 : s.extension
|
|
@@ -3146,10 +3194,10 @@ const defaultMappers = {
|
|
|
3146
3194
|
}
|
|
3147
3195
|
};
|
|
3148
3196
|
// FIXME add edumedia support
|
|
3149
|
-
|
|
3197
|
+
u(_, "roleMappers", [
|
|
3150
3198
|
(e) => Object.keys(defaultMappers).find((s) => defaultMappers[s](e))
|
|
3151
3199
|
]);
|
|
3152
|
-
let DocumentHelper =
|
|
3200
|
+
let DocumentHelper = _;
|
|
3153
3201
|
class WorkspaceService {
|
|
3154
3202
|
constructor(e) {
|
|
3155
3203
|
this.context = e;
|
|
@@ -3315,8 +3363,8 @@ class WorkspaceService {
|
|
|
3315
3363
|
}
|
|
3316
3364
|
let ATTag;
|
|
3317
3365
|
class AnalyticsService {
|
|
3318
|
-
constructor(
|
|
3319
|
-
this.context =
|
|
3366
|
+
constructor(n) {
|
|
3367
|
+
this.context = n;
|
|
3320
3368
|
}
|
|
3321
3369
|
get http() {
|
|
3322
3370
|
return this.context.http();
|
|
@@ -3329,7 +3377,7 @@ class AnalyticsService {
|
|
|
3329
3377
|
* @param locationPath
|
|
3330
3378
|
* @param app
|
|
3331
3379
|
*/
|
|
3332
|
-
async trackPageLoad(
|
|
3380
|
+
async trackPageLoad(n, e) {
|
|
3333
3381
|
const [t] = await Promise.all([
|
|
3334
3382
|
// get Xiti configuration
|
|
3335
3383
|
this.getXitiConfig(e.name.toLowerCase()),
|
|
@@ -3339,7 +3387,7 @@ class AnalyticsService {
|
|
|
3339
3387
|
if (!t || !ATInternet) return;
|
|
3340
3388
|
let s = t.LIBELLE_SERVICE.default || null;
|
|
3341
3389
|
for (const r in t.LIBELLE_SERVICE)
|
|
3342
|
-
if (r !== "default" &&
|
|
3390
|
+
if (r !== "default" && n.indexOf(r) >= 0) {
|
|
3343
3391
|
s = t.LIBELLE_SERVICE[r];
|
|
3344
3392
|
break;
|
|
3345
3393
|
}
|
|
@@ -3366,7 +3414,7 @@ class AnalyticsService {
|
|
|
3366
3414
|
level2: t.STRUCT_UAI
|
|
3367
3415
|
}), ATTag.dispatch();
|
|
3368
3416
|
}
|
|
3369
|
-
async getXitiConfig(
|
|
3417
|
+
async getXitiConfig(n) {
|
|
3370
3418
|
const [e, t] = await Promise.all([
|
|
3371
3419
|
this.http.get("/analyticsConf"),
|
|
3372
3420
|
//FIXME change servers config to only keep the "all-in-one" query to /analyticsConf.
|
|
@@ -3374,7 +3422,7 @@ class AnalyticsService {
|
|
|
3374
3422
|
]);
|
|
3375
3423
|
if (!(e != null && e.type))
|
|
3376
3424
|
throw ERROR_CODE.MALFORMED_DATA;
|
|
3377
|
-
return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t,
|
|
3425
|
+
return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t, n)), e.xiti;
|
|
3378
3426
|
}
|
|
3379
3427
|
async loadXitiScript() {
|
|
3380
3428
|
if (typeof ATInternet > "u") {
|
|
@@ -3386,13 +3434,13 @@ class AnalyticsService {
|
|
|
3386
3434
|
eval(response);
|
|
3387
3435
|
}
|
|
3388
3436
|
}
|
|
3389
|
-
async getXitiTrackingParams(
|
|
3390
|
-
if (!
|
|
3437
|
+
async getXitiTrackingParams(n, e) {
|
|
3438
|
+
if (!n.structureMap || !e) return;
|
|
3391
3439
|
const t = await this.session.getUser(), s = await this.session.getUserProfile();
|
|
3392
3440
|
let r;
|
|
3393
3441
|
if (!(t != null && t.structures)) return;
|
|
3394
3442
|
for (const l of t.structures) {
|
|
3395
|
-
const p =
|
|
3443
|
+
const p = n.structureMap[l];
|
|
3396
3444
|
if (p && p.collectiviteId && p.UAI) {
|
|
3397
3445
|
r = p;
|
|
3398
3446
|
break;
|
|
@@ -3423,15 +3471,15 @@ class AnalyticsService {
|
|
|
3423
3471
|
OUTIL: o.OUTIL ? o.OUTIL : "",
|
|
3424
3472
|
STRUCT_ID: r.collectiviteId,
|
|
3425
3473
|
STRUCT_UAI: r.UAI,
|
|
3426
|
-
PROJET: r.projetId ? r.projetId :
|
|
3427
|
-
EXPLOITANT:
|
|
3428
|
-
PLATFORME: r.plateformeId ? r.plateformeId :
|
|
3474
|
+
PROJET: r.projetId ? r.projetId : n.ID_PROJET,
|
|
3475
|
+
EXPLOITANT: n.ID_EXPLOITANT,
|
|
3476
|
+
PLATFORME: r.plateformeId ? r.plateformeId : n.ID_PLATEFORME,
|
|
3429
3477
|
ID_PERSO: a(t.userId),
|
|
3430
3478
|
PROFILE: s && s.length > 0 ? c[s[0]] ?? "" : ""
|
|
3431
3479
|
};
|
|
3432
3480
|
}
|
|
3433
3481
|
}
|
|
3434
|
-
const
|
|
3482
|
+
const R = class R {
|
|
3435
3483
|
// in minutes. Applies to recorded videos.
|
|
3436
3484
|
constructor(e) {
|
|
3437
3485
|
this.context = e;
|
|
@@ -3452,8 +3500,8 @@ const C = class C {
|
|
|
3452
3500
|
APP$4.VIDEO
|
|
3453
3501
|
);
|
|
3454
3502
|
return {
|
|
3455
|
-
maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ??
|
|
3456
|
-
maxDuration: (e == null ? void 0 : e["max-videoduration-minutes"]) ??
|
|
3503
|
+
maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ?? R.MAX_WEIGHT,
|
|
3504
|
+
maxDuration: (e == null ? void 0 : e["max-videoduration-minutes"]) ?? R.MAX_DURATION,
|
|
3457
3505
|
acceptVideoUploadExtensions: ((t = e == null ? void 0 : e["accept-videoupload-extensions"]) == null ? void 0 : t.map(
|
|
3458
3506
|
(s) => s.toUpperCase()
|
|
3459
3507
|
)) ?? []
|
|
@@ -3510,9 +3558,9 @@ const C = class C {
|
|
|
3510
3558
|
throw new Error("Video cannot be uploaded.");
|
|
3511
3559
|
}
|
|
3512
3560
|
};
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
let VideoService =
|
|
3561
|
+
u(R, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
|
|
3562
|
+
u(R, "MAX_DURATION", 3);
|
|
3563
|
+
let VideoService = R;
|
|
3516
3564
|
class EmbedderService {
|
|
3517
3565
|
constructor(e) {
|
|
3518
3566
|
this.context = e;
|
|
@@ -3607,7 +3655,7 @@ class AbstractBehaviourService {
|
|
|
3607
3655
|
//-----------------
|
|
3608
3656
|
//--- Utilities ---
|
|
3609
3657
|
//-----------------
|
|
3610
|
-
|
|
3658
|
+
u(this, "_cache");
|
|
3611
3659
|
this.context = e, this._cache = new CacheService(this.context);
|
|
3612
3660
|
}
|
|
3613
3661
|
getApplication() {
|
|
@@ -3641,8 +3689,8 @@ class AbstractBehaviourService {
|
|
|
3641
3689
|
class ActualitesBehaviour extends AbstractBehaviourService {
|
|
3642
3690
|
constructor() {
|
|
3643
3691
|
super(...arguments);
|
|
3644
|
-
|
|
3645
|
-
|
|
3692
|
+
u(this, "APP", "actualites");
|
|
3693
|
+
u(this, "RESOURCE", "actualites");
|
|
3646
3694
|
}
|
|
3647
3695
|
async loadResources() {
|
|
3648
3696
|
return (await this.httpGet(
|
|
@@ -3665,8 +3713,8 @@ class ActualitesBehaviour extends AbstractBehaviourService {
|
|
|
3665
3713
|
class BlogBehaviour extends AbstractBehaviourService {
|
|
3666
3714
|
constructor() {
|
|
3667
3715
|
super(...arguments);
|
|
3668
|
-
|
|
3669
|
-
|
|
3716
|
+
u(this, "APP", "blog");
|
|
3717
|
+
u(this, "RESOURCE", "blog");
|
|
3670
3718
|
}
|
|
3671
3719
|
loadResources() {
|
|
3672
3720
|
return new Promise(async (t, s) => {
|
|
@@ -3695,8 +3743,8 @@ class BlogBehaviour extends AbstractBehaviourService {
|
|
|
3695
3743
|
class CollaborativewallBehaviour extends AbstractBehaviourService {
|
|
3696
3744
|
constructor() {
|
|
3697
3745
|
super(...arguments);
|
|
3698
|
-
|
|
3699
|
-
|
|
3746
|
+
u(this, "APP", "collaborativewall");
|
|
3747
|
+
u(this, "RESOURCE", "collaborativewall");
|
|
3700
3748
|
}
|
|
3701
3749
|
async loadResources() {
|
|
3702
3750
|
return (await this.httpGet(
|
|
@@ -3718,8 +3766,8 @@ class CollaborativewallBehaviour extends AbstractBehaviourService {
|
|
|
3718
3766
|
class CommunityBehaviour extends AbstractBehaviourService {
|
|
3719
3767
|
constructor() {
|
|
3720
3768
|
super(...arguments);
|
|
3721
|
-
|
|
3722
|
-
|
|
3769
|
+
u(this, "APP", "community");
|
|
3770
|
+
u(this, "RESOURCE", "community");
|
|
3723
3771
|
}
|
|
3724
3772
|
async loadResources() {
|
|
3725
3773
|
return (await this.httpGet(
|
|
@@ -3743,8 +3791,8 @@ class CommunityBehaviour extends AbstractBehaviourService {
|
|
|
3743
3791
|
class ExercizerBehaviour extends AbstractBehaviourService {
|
|
3744
3792
|
constructor() {
|
|
3745
3793
|
super(...arguments);
|
|
3746
|
-
|
|
3747
|
-
|
|
3794
|
+
u(this, "APP", "exercizer");
|
|
3795
|
+
u(this, "RESOURCE", "exercizer");
|
|
3748
3796
|
}
|
|
3749
3797
|
async loadResources() {
|
|
3750
3798
|
return (await this.httpGet(
|
|
@@ -3769,8 +3817,8 @@ class ExercizerBehaviour extends AbstractBehaviourService {
|
|
|
3769
3817
|
class FormulaireBehaviour extends AbstractBehaviourService {
|
|
3770
3818
|
constructor() {
|
|
3771
3819
|
super(...arguments);
|
|
3772
|
-
|
|
3773
|
-
|
|
3820
|
+
u(this, "APP", "formulaire");
|
|
3821
|
+
u(this, "RESOURCE", "formulaire");
|
|
3774
3822
|
}
|
|
3775
3823
|
async loadResources() {
|
|
3776
3824
|
return (await this.httpGet(
|
|
@@ -3790,8 +3838,8 @@ class FormulaireBehaviour extends AbstractBehaviourService {
|
|
|
3790
3838
|
class ForumBehaviour extends AbstractBehaviourService {
|
|
3791
3839
|
constructor() {
|
|
3792
3840
|
super(...arguments);
|
|
3793
|
-
|
|
3794
|
-
|
|
3841
|
+
u(this, "APP", "forum");
|
|
3842
|
+
u(this, "RESOURCE", "forum");
|
|
3795
3843
|
}
|
|
3796
3844
|
async loadResources() {
|
|
3797
3845
|
return (await this.httpGet("/forum/categories")).map(
|
|
@@ -3811,8 +3859,8 @@ class ForumBehaviour extends AbstractBehaviourService {
|
|
|
3811
3859
|
class HomeworksBehaviour extends AbstractBehaviourService {
|
|
3812
3860
|
constructor() {
|
|
3813
3861
|
super(...arguments);
|
|
3814
|
-
|
|
3815
|
-
|
|
3862
|
+
u(this, "APP", "homeworks");
|
|
3863
|
+
u(this, "RESOURCE", "homeworks");
|
|
3816
3864
|
}
|
|
3817
3865
|
async loadResources() {
|
|
3818
3866
|
return (await this.httpGet("/homeworks/list")).filter((t) => t.owner && t.trashed === 0).map((t) => this.dataToResource({
|
|
@@ -3830,8 +3878,8 @@ class HomeworksBehaviour extends AbstractBehaviourService {
|
|
|
3830
3878
|
class MagnetoBehaviour extends AbstractBehaviourService {
|
|
3831
3879
|
constructor() {
|
|
3832
3880
|
super(...arguments);
|
|
3833
|
-
|
|
3834
|
-
|
|
3881
|
+
u(this, "APP", "magneto");
|
|
3882
|
+
u(this, "RESOURCE", "magneto");
|
|
3835
3883
|
}
|
|
3836
3884
|
async loadResources() {
|
|
3837
3885
|
const { all: t } = await this.httpGet(
|
|
@@ -3852,8 +3900,8 @@ class MagnetoBehaviour extends AbstractBehaviourService {
|
|
|
3852
3900
|
class MindmapBehaviour extends AbstractBehaviourService {
|
|
3853
3901
|
constructor() {
|
|
3854
3902
|
super(...arguments);
|
|
3855
|
-
|
|
3856
|
-
|
|
3903
|
+
u(this, "APP", "mindmap");
|
|
3904
|
+
u(this, "RESOURCE", "mindmap");
|
|
3857
3905
|
}
|
|
3858
3906
|
async loadResources() {
|
|
3859
3907
|
return (await this.httpGet("/mindmap/list/all")).map(
|
|
@@ -3873,8 +3921,8 @@ class MindmapBehaviour extends AbstractBehaviourService {
|
|
|
3873
3921
|
class PagesBehaviour extends AbstractBehaviourService {
|
|
3874
3922
|
constructor() {
|
|
3875
3923
|
super(...arguments);
|
|
3876
|
-
|
|
3877
|
-
|
|
3924
|
+
u(this, "APP", "pages");
|
|
3925
|
+
u(this, "RESOURCE", "pages");
|
|
3878
3926
|
}
|
|
3879
3927
|
async loadResources() {
|
|
3880
3928
|
const t = await this.httpGet("/pages/list/all"), s = [];
|
|
@@ -3912,8 +3960,8 @@ class PagesBehaviour extends AbstractBehaviourService {
|
|
|
3912
3960
|
class PollBehaviour extends AbstractBehaviourService {
|
|
3913
3961
|
constructor() {
|
|
3914
3962
|
super(...arguments);
|
|
3915
|
-
|
|
3916
|
-
|
|
3963
|
+
u(this, "APP", "poll");
|
|
3964
|
+
u(this, "RESOURCE", "poll");
|
|
3917
3965
|
}
|
|
3918
3966
|
async loadResources() {
|
|
3919
3967
|
return (await this.httpGet("/poll/list/all")).map((s) => {
|
|
@@ -3934,8 +3982,8 @@ class PollBehaviour extends AbstractBehaviourService {
|
|
|
3934
3982
|
class ScrapbookBehaviour extends AbstractBehaviourService {
|
|
3935
3983
|
constructor() {
|
|
3936
3984
|
super(...arguments);
|
|
3937
|
-
|
|
3938
|
-
|
|
3985
|
+
u(this, "APP", "scrapbook");
|
|
3986
|
+
u(this, "RESOURCE", "scrapbook");
|
|
3939
3987
|
}
|
|
3940
3988
|
async loadResources() {
|
|
3941
3989
|
return (await this.httpGet(
|
|
@@ -3958,8 +4006,8 @@ class ScrapbookBehaviour extends AbstractBehaviourService {
|
|
|
3958
4006
|
class TimelinegeneratorBehaviour extends AbstractBehaviourService {
|
|
3959
4007
|
constructor() {
|
|
3960
4008
|
super(...arguments);
|
|
3961
|
-
|
|
3962
|
-
|
|
4009
|
+
u(this, "APP", "timelinegenerator");
|
|
4010
|
+
u(this, "RESOURCE", "timelinegenerator");
|
|
3963
4011
|
}
|
|
3964
4012
|
loadResources() {
|
|
3965
4013
|
return new Promise(async (t, s) => {
|
|
@@ -3989,8 +4037,8 @@ class TimelinegeneratorBehaviour extends AbstractBehaviourService {
|
|
|
3989
4037
|
class WikiBehaviour extends AbstractBehaviourService {
|
|
3990
4038
|
constructor() {
|
|
3991
4039
|
super(...arguments);
|
|
3992
|
-
|
|
3993
|
-
|
|
4040
|
+
u(this, "APP", "wiki");
|
|
4041
|
+
u(this, "RESOURCE", "wiki");
|
|
3994
4042
|
}
|
|
3995
4043
|
async loadResources() {
|
|
3996
4044
|
return (await this.httpGet(
|
|
@@ -4013,8 +4061,8 @@ class WikiBehaviour extends AbstractBehaviourService {
|
|
|
4013
4061
|
class WorkspaceBehaviour extends AbstractBehaviourService {
|
|
4014
4062
|
constructor() {
|
|
4015
4063
|
super(...arguments);
|
|
4016
|
-
|
|
4017
|
-
|
|
4064
|
+
u(this, "APP", "workspace");
|
|
4065
|
+
u(this, "RESOURCE", "workspace");
|
|
4018
4066
|
}
|
|
4019
4067
|
loadResources({ search: t, asset_id: s }) {
|
|
4020
4068
|
return new Promise(async (r, i) => {
|
|
@@ -4132,13 +4180,13 @@ const b = class b {
|
|
|
4132
4180
|
//
|
|
4133
4181
|
// STATIC REGISTRY
|
|
4134
4182
|
//
|
|
4135
|
-
|
|
4136
|
-
|
|
4183
|
+
u(b, "registry", new ServiceRegistry()), // Expose some useful functions
|
|
4184
|
+
u(b, "findBehaviour", b.registry.findService.bind(b.registry)), u(b, "hasBehaviour", b.registry.isRegistered.bind(b.registry)), u(b, "resourceProducingApps", []);
|
|
4137
4185
|
let SnipletsService = b;
|
|
4138
4186
|
const SEND_ALL = "*";
|
|
4139
4187
|
class WebBroker {
|
|
4140
4188
|
constructor(e) {
|
|
4141
|
-
|
|
4189
|
+
u(this, "subscription");
|
|
4142
4190
|
this.odeServices = e;
|
|
4143
4191
|
}
|
|
4144
4192
|
get http() {
|
|
@@ -4170,10 +4218,10 @@ class WebBroker {
|
|
|
4170
4218
|
}
|
|
4171
4219
|
class DataService {
|
|
4172
4220
|
constructor(e) {
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4221
|
+
u(this, "_webBroker");
|
|
4222
|
+
u(this, "app");
|
|
4223
|
+
u(this, "user");
|
|
4224
|
+
u(this, "profile");
|
|
4177
4225
|
this.odeServices = e;
|
|
4178
4226
|
}
|
|
4179
4227
|
get conf() {
|
|
@@ -4335,20 +4383,20 @@ class AudienceService {
|
|
|
4335
4383
|
}
|
|
4336
4384
|
class OdeServices {
|
|
4337
4385
|
constructor() {
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4386
|
+
u(this, "_analytics");
|
|
4387
|
+
u(this, "_cache");
|
|
4388
|
+
u(this, "_conf");
|
|
4389
|
+
u(this, "_data");
|
|
4390
|
+
u(this, "_directory");
|
|
4391
|
+
u(this, "_http");
|
|
4392
|
+
u(this, "_idiom");
|
|
4393
|
+
u(this, "_notify");
|
|
4394
|
+
u(this, "_rights");
|
|
4395
|
+
u(this, "_session");
|
|
4396
|
+
u(this, "_share");
|
|
4397
|
+
u(this, "_video");
|
|
4398
|
+
u(this, "_workspace");
|
|
4399
|
+
u(this, "_embedder");
|
|
4352
4400
|
this._analytics = new AnalyticsService(this), this._cache = new CacheService(this), this._conf = new ConfService(this), this._data = new DataService(this), this._directory = new DirectoryService(this), this._http = new HttpService(this), this._idiom = new IdiomService(this), this._notify = NotifyFrameworkFactory.instance(), this._rights = new RightService(this), this._session = new SessionService(this), this._share = new ShareService(this), this._video = new VideoService(this), this._workspace = new WorkspaceService(this), this._embedder = new EmbedderService(this);
|
|
4353
4401
|
}
|
|
4354
4402
|
initialize() {
|
|
@@ -4481,9 +4529,9 @@ class TransportFrameworkFactory {
|
|
|
4481
4529
|
return transport;
|
|
4482
4530
|
}
|
|
4483
4531
|
}
|
|
4484
|
-
const isActionAvailable = (
|
|
4532
|
+
const isActionAvailable = (n, e) => {
|
|
4485
4533
|
const t = e == null ? void 0 : e.filter(
|
|
4486
|
-
(s) => s.id ===
|
|
4534
|
+
(s) => s.id === n && s.available
|
|
4487
4535
|
);
|
|
4488
4536
|
return t && t.length > 0;
|
|
4489
4537
|
}, firstLevelWidgets = [
|
|
@@ -4550,10 +4598,10 @@ const isActionAvailable = (u, e) => {
|
|
|
4550
4598
|
class WidgetFramework {
|
|
4551
4599
|
constructor() {
|
|
4552
4600
|
//-------------------------------------
|
|
4553
|
-
|
|
4554
|
-
|
|
4601
|
+
u(this, "_initialized");
|
|
4602
|
+
u(this, "_widgets", []);
|
|
4555
4603
|
////////////////////////////////////// USER PREFERENCES
|
|
4556
|
-
|
|
4604
|
+
u(this, "_userPrefs", {});
|
|
4557
4605
|
}
|
|
4558
4606
|
initialize(e, t) {
|
|
4559
4607
|
return this._initialized || (this._initialized = new Promisified(), notify.onSessionReady().promise.then((s) => {
|
|
@@ -4617,8 +4665,8 @@ class WidgetFramework {
|
|
|
4617
4665
|
class Widget {
|
|
4618
4666
|
//-------------------------------------
|
|
4619
4667
|
constructor(e) {
|
|
4620
|
-
|
|
4621
|
-
|
|
4668
|
+
u(this, "_schoolConf", {});
|
|
4669
|
+
u(this, "_userPref");
|
|
4622
4670
|
this._platformConf = e, this._userPref = null;
|
|
4623
4671
|
}
|
|
4624
4672
|
get platformConf() {
|