@edifice.io/client 2.5.10-develop-pedago.20260217165817 → 2.5.10-develop-b2school.20260218115154
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 +0 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +182 -235
- package/package.json +3 -4
- package/dist/utilities/deviceDetection.d.ts +0 -56
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
|
-
var P = (
|
|
3
|
-
var
|
|
2
|
+
var P = (u, e, t) => e in u ? T(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
|
+
var n = (u, e, t) => P(u, 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";
|
|
7
6
|
const ERROR_CODE = {
|
|
8
7
|
SUCCESS: "0000",
|
|
9
8
|
UNKNOWN: "0010",
|
|
@@ -98,10 +97,10 @@ const ERROR_CODE = {
|
|
|
98
97
|
INFOTIP: "infotip",
|
|
99
98
|
RGPD_COOKIES: "rgpdCookies"
|
|
100
99
|
// TODO compléter
|
|
101
|
-
},
|
|
100
|
+
}, R = class R {
|
|
102
101
|
constructor(e) {
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
n(this, "name");
|
|
103
|
+
n(this, "listeners", /* @__PURE__ */ new Set());
|
|
105
104
|
this.name = e;
|
|
106
105
|
}
|
|
107
106
|
/**
|
|
@@ -110,8 +109,8 @@ const ERROR_CODE = {
|
|
|
110
109
|
* @returns the channel instance
|
|
111
110
|
*/
|
|
112
111
|
static getChannel(e) {
|
|
113
|
-
let t =
|
|
114
|
-
return t || (t = new
|
|
112
|
+
let t = R.channels.get(e);
|
|
113
|
+
return t || (t = new R(e), R.channels.set(e, t)), t;
|
|
115
114
|
}
|
|
116
115
|
/**
|
|
117
116
|
* Add a listener and return a revocation function to remove it.
|
|
@@ -136,14 +135,14 @@ const ERROR_CODE = {
|
|
|
136
135
|
* Close this channel: remove listeners and unregister from global map.
|
|
137
136
|
*/
|
|
138
137
|
close() {
|
|
139
|
-
this.listeners.clear(),
|
|
138
|
+
this.listeners.clear(), R.channels.delete(this.name);
|
|
140
139
|
}
|
|
141
140
|
};
|
|
142
|
-
|
|
143
|
-
let SimpleChannel =
|
|
141
|
+
n(R, "channels", /* @__PURE__ */ new Map());
|
|
142
|
+
let SimpleChannel = R;
|
|
144
143
|
class Subscription {
|
|
145
144
|
constructor(e, t) {
|
|
146
|
-
|
|
145
|
+
n(this, "revoke");
|
|
147
146
|
this._channel = e, this.revoke = this.setReceiver((s) => t == null ? void 0 : t(s));
|
|
148
147
|
}
|
|
149
148
|
setReceiver(e) {
|
|
@@ -160,7 +159,7 @@ class Subject {
|
|
|
160
159
|
/* We maintain channels for sending messages.
|
|
161
160
|
* Receiving channels are instantiated per subscription.
|
|
162
161
|
*/
|
|
163
|
-
|
|
162
|
+
n(this, "publishChannels", /* @__PURE__ */ new Map());
|
|
164
163
|
}
|
|
165
164
|
getChannelName(e) {
|
|
166
165
|
return "Subject:" + e;
|
|
@@ -195,9 +194,9 @@ const ASYNC_DATA_NAME = {
|
|
|
195
194
|
class Promisified {
|
|
196
195
|
constructor() {
|
|
197
196
|
//-------------------------------------
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
n(this, "_resolution");
|
|
198
|
+
n(this, "_rejection");
|
|
199
|
+
n(this, "_promise", new Promise((e, t) => {
|
|
201
200
|
this._resolution = e, this._rejection = t;
|
|
202
201
|
}));
|
|
203
202
|
}
|
|
@@ -214,8 +213,8 @@ class Promisified {
|
|
|
214
213
|
class NotifyFramework {
|
|
215
214
|
constructor() {
|
|
216
215
|
//-------------------------------------
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
n(this, "promises", {});
|
|
217
|
+
n(this, "subject", new Subject());
|
|
219
218
|
}
|
|
220
219
|
asyncData(e) {
|
|
221
220
|
return typeof this.promises[e] > "u" && (this.promises[e] = new Promisified()), this.promises[e];
|
|
@@ -246,8 +245,8 @@ const notify = new NotifyFramework(), loadedScripts$1 = {};
|
|
|
246
245
|
class Http {
|
|
247
246
|
constructor(e) {
|
|
248
247
|
// Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
n(this, "axios");
|
|
249
|
+
n(this, "_latestResponse");
|
|
251
250
|
this.axios = axios.create(e);
|
|
252
251
|
}
|
|
253
252
|
setCdn(e) {
|
|
@@ -344,7 +343,7 @@ class Http {
|
|
|
344
343
|
}
|
|
345
344
|
class TransportFramework {
|
|
346
345
|
constructor() {
|
|
347
|
-
|
|
346
|
+
n(this, "_http", new Http());
|
|
348
347
|
}
|
|
349
348
|
get http() {
|
|
350
349
|
return this._http;
|
|
@@ -363,11 +362,11 @@ class ConfigurationFrameworkFactory {
|
|
|
363
362
|
const http$2 = transport.http;
|
|
364
363
|
class Session {
|
|
365
364
|
constructor() {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
365
|
+
n(this, "_me", null);
|
|
366
|
+
n(this, "_currentLanguage", "");
|
|
367
|
+
n(this, "_notLoggedIn", !0);
|
|
368
|
+
n(this, "_description");
|
|
369
|
+
n(this, "_profile");
|
|
371
370
|
}
|
|
372
371
|
get currentLanguage() {
|
|
373
372
|
return this._currentLanguage;
|
|
@@ -485,7 +484,7 @@ class Session {
|
|
|
485
484
|
}
|
|
486
485
|
class SessionFramework {
|
|
487
486
|
constructor() {
|
|
488
|
-
|
|
487
|
+
n(this, "session", new Session());
|
|
489
488
|
}
|
|
490
489
|
initialize() {
|
|
491
490
|
return this.session.initialize();
|
|
@@ -509,22 +508,22 @@ class SessionFramework {
|
|
|
509
508
|
const session = new SessionFramework();
|
|
510
509
|
class Theme {
|
|
511
510
|
constructor() {
|
|
512
|
-
|
|
513
|
-
|
|
511
|
+
n(this, "_conf");
|
|
512
|
+
n(this, "_loaded");
|
|
514
513
|
// legacy (readonly)
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
514
|
+
n(this, "skinName", "");
|
|
515
|
+
n(this, "themeName", "");
|
|
516
|
+
n(this, "skin", "raw");
|
|
517
|
+
n(this, "themeUrl", "/assets/themes/raw/default/");
|
|
518
|
+
n(this, "templateOverrides", {});
|
|
519
|
+
n(this, "portalTemplate", "/assets/themes/raw/portal.html");
|
|
520
|
+
n(this, "basePath", "");
|
|
521
|
+
n(this, "logoutCallback", "");
|
|
522
|
+
n(this, "skins", []);
|
|
523
|
+
n(this, "is1D", !1);
|
|
524
|
+
n(this, "is2D", !1);
|
|
525
|
+
n(this, "_onSkinReady", notify.onSkinReady());
|
|
526
|
+
n(this, "_onOverrideReady", notify.onOverridesReady());
|
|
528
527
|
}
|
|
529
528
|
initialize(e) {
|
|
530
529
|
return notify.onSessionReady().promise.then(() => this.load(e));
|
|
@@ -896,7 +895,7 @@ class Idiom {
|
|
|
896
895
|
class UserPreferences {
|
|
897
896
|
constructor() {
|
|
898
897
|
//-------------------------------------
|
|
899
|
-
|
|
898
|
+
n(this, "data", {});
|
|
900
899
|
}
|
|
901
900
|
get(e) {
|
|
902
901
|
return this.data[e];
|
|
@@ -923,10 +922,10 @@ class UserPreferences {
|
|
|
923
922
|
class User {
|
|
924
923
|
constructor() {
|
|
925
924
|
//-------------------------------------
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
925
|
+
n(this, "_me", null);
|
|
926
|
+
n(this, "_keepOpenOnLogout", !1);
|
|
927
|
+
n(this, "_preferences", new UserPreferences());
|
|
928
|
+
n(this, "_bookmarkedApps", []);
|
|
930
929
|
}
|
|
931
930
|
get keepOpenOnLogout() {
|
|
932
931
|
return this._keepOpenOnLogout;
|
|
@@ -1000,9 +999,9 @@ const http$1 = transport == null ? void 0 : transport.http;
|
|
|
1000
999
|
class AppConf {
|
|
1001
1000
|
constructor() {
|
|
1002
1001
|
//-------------------------------------
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1002
|
+
n(this, "_publicConf", {});
|
|
1003
|
+
n(this, "_currentApp");
|
|
1004
|
+
n(this, "_appConf", {});
|
|
1006
1005
|
}
|
|
1007
1006
|
/**
|
|
1008
1007
|
* Get the currently initialized App.
|
|
@@ -1040,8 +1039,8 @@ class AppConf {
|
|
|
1040
1039
|
class Analytics {
|
|
1041
1040
|
constructor() {
|
|
1042
1041
|
//-------------------------------------
|
|
1043
|
-
|
|
1044
|
-
|
|
1042
|
+
n(this, "_status", "void");
|
|
1043
|
+
n(this, "_params");
|
|
1045
1044
|
}
|
|
1046
1045
|
get status() {
|
|
1047
1046
|
return this._status;
|
|
@@ -1123,61 +1122,10 @@ class Analytics {
|
|
|
1123
1122
|
};
|
|
1124
1123
|
}
|
|
1125
1124
|
}
|
|
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), {
|
|
1170
|
-
osName: "Unknown",
|
|
1171
|
-
osVersion: "Unknown",
|
|
1172
|
-
deviceType: "Unknown",
|
|
1173
|
-
deviceName: "Unknown"
|
|
1174
|
-
};
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
1125
|
class ConfigurationFramework {
|
|
1178
1126
|
constructor() {
|
|
1179
1127
|
//-------------------------------------
|
|
1180
|
-
|
|
1128
|
+
n(this, "Platform", {
|
|
1181
1129
|
deploymentTag: "",
|
|
1182
1130
|
cdnDomain: "",
|
|
1183
1131
|
apps: new AppConf(),
|
|
@@ -1186,11 +1134,10 @@ class ConfigurationFramework {
|
|
|
1186
1134
|
idiom: new Idiom(),
|
|
1187
1135
|
listLanguages: () => transport.http.get("/languages")
|
|
1188
1136
|
});
|
|
1189
|
-
|
|
1137
|
+
n(this, "School", {
|
|
1190
1138
|
//apps; -> pinnedApps;
|
|
1191
1139
|
});
|
|
1192
|
-
|
|
1193
|
-
setDeviceCookies();
|
|
1140
|
+
n(this, "User", new User());
|
|
1194
1141
|
}
|
|
1195
1142
|
async initialize(e, t) {
|
|
1196
1143
|
if (!e) {
|
|
@@ -1233,12 +1180,12 @@ class ConfigurationFramework {
|
|
|
1233
1180
|
// }
|
|
1234
1181
|
}
|
|
1235
1182
|
const configure = new ConfigurationFramework(), http = transport == null ? void 0 : transport.http;
|
|
1236
|
-
var
|
|
1237
|
-
const me = (
|
|
1183
|
+
var v;
|
|
1184
|
+
const me = (v = session == null ? void 0 : session.session) == null ? void 0 : v.user;
|
|
1238
1185
|
class Notification {
|
|
1239
1186
|
constructor(e) {
|
|
1240
|
-
|
|
1241
|
-
|
|
1187
|
+
n(this, "_id");
|
|
1188
|
+
n(this, "model");
|
|
1242
1189
|
e.reported = e.reporters && e.reporters.length > 0, this._id = e._id, this.model = e;
|
|
1243
1190
|
}
|
|
1244
1191
|
isUnread() {
|
|
@@ -1258,14 +1205,14 @@ class Notification {
|
|
|
1258
1205
|
class TimelineApp {
|
|
1259
1206
|
constructor() {
|
|
1260
1207
|
//-------------------------------------
|
|
1261
|
-
|
|
1262
|
-
|
|
1208
|
+
n(this, "_notifications", []);
|
|
1209
|
+
n(this, "_notificationTypes", []);
|
|
1263
1210
|
// ex: ["BLOG"]
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1211
|
+
n(this, "_flashMessages", []);
|
|
1212
|
+
n(this, "_pageNumber", 0);
|
|
1213
|
+
n(this, "_lastPage", !1);
|
|
1214
|
+
n(this, "_loading", !1);
|
|
1215
|
+
n(this, "showMine", !1);
|
|
1269
1216
|
}
|
|
1270
1217
|
get notifications() {
|
|
1271
1218
|
return this._notifications;
|
|
@@ -1414,7 +1361,7 @@ const m = class m {
|
|
|
1414
1361
|
//
|
|
1415
1362
|
// PROTECTED HELPERS
|
|
1416
1363
|
//
|
|
1417
|
-
|
|
1364
|
+
n(this, "checkHttpResponse", (e) => {
|
|
1418
1365
|
if (this.http.latestResponse.status >= 300)
|
|
1419
1366
|
throw this.http.latestResponse.statusText;
|
|
1420
1367
|
return e;
|
|
@@ -1632,8 +1579,8 @@ const m = class m {
|
|
|
1632
1579
|
//
|
|
1633
1580
|
// STATIC REGISTRY
|
|
1634
1581
|
//
|
|
1635
|
-
|
|
1636
|
-
|
|
1582
|
+
n(m, "registry", new ServiceRegistry()), // Expose some useful functions
|
|
1583
|
+
n(m, "register", m.registry.register.bind(m.registry)), n(m, "findService", m.registry.findService.bind(m.registry)), n(m, "findMainService", m.registry.findMainService.bind(m.registry)), n(m, "isRegistered", m.registry.isRegistered.bind(m.registry));
|
|
1637
1584
|
let ResourceService = m;
|
|
1638
1585
|
const APP$3 = "scrapbook", RESOURCE$3 = "scrapbook";
|
|
1639
1586
|
class ScrapbookResourceService extends ResourceService {
|
|
@@ -1676,7 +1623,7 @@ class ScrapbookResourceService extends ResourceService {
|
|
|
1676
1623
|
}
|
|
1677
1624
|
ResourceService.register(
|
|
1678
1625
|
{ application: RESOURCE$3, resourceType: RESOURCE$3 },
|
|
1679
|
-
(
|
|
1626
|
+
(u) => new ScrapbookResourceService(u)
|
|
1680
1627
|
);
|
|
1681
1628
|
const APP$2 = "homeworks", RESOURCE$2 = "homeworks";
|
|
1682
1629
|
class HomeworksResourceService extends ResourceService {
|
|
@@ -1726,7 +1673,7 @@ class HomeworksResourceService extends ResourceService {
|
|
|
1726
1673
|
}
|
|
1727
1674
|
ResourceService.register(
|
|
1728
1675
|
{ application: RESOURCE$2, resourceType: RESOURCE$2 },
|
|
1729
|
-
(
|
|
1676
|
+
(u) => new HomeworksResourceService(u)
|
|
1730
1677
|
);
|
|
1731
1678
|
const APP$1 = "timelinegenerator", RESOURCE$1 = "timelinegenerator";
|
|
1732
1679
|
class TimelineGeneratorResourceService extends ResourceService {
|
|
@@ -1781,7 +1728,7 @@ class TimelineGeneratorResourceService extends ResourceService {
|
|
|
1781
1728
|
}
|
|
1782
1729
|
ResourceService.register(
|
|
1783
1730
|
{ application: RESOURCE$1, resourceType: RESOURCE$1 },
|
|
1784
|
-
(
|
|
1731
|
+
(u) => new TimelineGeneratorResourceService(u)
|
|
1785
1732
|
);
|
|
1786
1733
|
const APP = "collaborativeeditor", RESOURCE = "collaborativeeditor";
|
|
1787
1734
|
class CollaborativeEditorResourceService extends ResourceService {
|
|
@@ -1829,7 +1776,7 @@ class CollaborativeEditorResourceService extends ResourceService {
|
|
|
1829
1776
|
}
|
|
1830
1777
|
ResourceService.register(
|
|
1831
1778
|
{ application: RESOURCE, resourceType: RESOURCE },
|
|
1832
|
-
(
|
|
1779
|
+
(u) => new CollaborativeEditorResourceService(u)
|
|
1833
1780
|
);
|
|
1834
1781
|
const globalCache = {}, mutexPromise = {};
|
|
1835
1782
|
class CacheService {
|
|
@@ -2046,7 +1993,7 @@ class DirectoryService {
|
|
|
2046
1993
|
this.cache.clearCache("/directory/sharebookmark/all");
|
|
2047
1994
|
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) => {
|
|
2048
1995
|
if (typeof h == "string") {
|
|
2049
|
-
const { displayName: y, groups: d, id: g, users: A } = await this.getBookMarkById(h), f = A.map((
|
|
1996
|
+
const { displayName: y, groups: d, id: g, users: A } = await this.getBookMarkById(h), f = A.map((_) => _.id), w = d.map((_) => _.id);
|
|
2050
1997
|
return {
|
|
2051
1998
|
displayName: y,
|
|
2052
1999
|
id: g,
|
|
@@ -2072,10 +2019,10 @@ const loadedScripts = {};
|
|
|
2072
2019
|
class HttpService {
|
|
2073
2020
|
constructor(e, t) {
|
|
2074
2021
|
// Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2022
|
+
n(this, "axios");
|
|
2023
|
+
n(this, "baseUrl");
|
|
2024
|
+
n(this, "headers", {});
|
|
2025
|
+
n(this, "_latestResponse");
|
|
2079
2026
|
this.context = e, this.axios = axios.create(t);
|
|
2080
2027
|
}
|
|
2081
2028
|
fixBaseUrl(e) {
|
|
@@ -3142,44 +3089,44 @@ class ShareService {
|
|
|
3142
3089
|
}
|
|
3143
3090
|
}
|
|
3144
3091
|
const defaultMappers = {
|
|
3145
|
-
csv: function({ type:
|
|
3146
|
-
return MimeTypeUtils.INSTANCE.isCsvLike(
|
|
3092
|
+
csv: function({ type: u, extension: e }) {
|
|
3093
|
+
return MimeTypeUtils.INSTANCE.isCsvLike(u, e);
|
|
3147
3094
|
},
|
|
3148
|
-
doc: function({ type:
|
|
3149
|
-
return MimeTypeUtils.INSTANCE.isWordLike(
|
|
3095
|
+
doc: function({ type: u, extension: e }) {
|
|
3096
|
+
return MimeTypeUtils.INSTANCE.isWordLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("wordprocessing") !== -1;
|
|
3150
3097
|
},
|
|
3151
|
-
xls: function({ type:
|
|
3152
|
-
return MimeTypeUtils.INSTANCE.isExcelLike(
|
|
3098
|
+
xls: function({ type: u, extension: e }) {
|
|
3099
|
+
return MimeTypeUtils.INSTANCE.isExcelLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("spreadsheet") !== -1 || u.indexOf("ms-excel") !== -1;
|
|
3153
3100
|
},
|
|
3154
|
-
img: function({ type:
|
|
3155
|
-
return
|
|
3101
|
+
img: function({ type: u }) {
|
|
3102
|
+
return u.indexOf("image") !== -1;
|
|
3156
3103
|
},
|
|
3157
|
-
pdf: function({ type:
|
|
3158
|
-
return
|
|
3104
|
+
pdf: function({ type: u }) {
|
|
3105
|
+
return u.indexOf("pdf") !== -1 || u === "application/x-download";
|
|
3159
3106
|
},
|
|
3160
|
-
ppt: function({ type:
|
|
3161
|
-
return MimeTypeUtils.INSTANCE.isPowerpointLike(
|
|
3107
|
+
ppt: function({ type: u, extension: e }) {
|
|
3108
|
+
return MimeTypeUtils.INSTANCE.isPowerpointLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("presentation") !== -1 || u.indexOf("powerpoint") !== -1;
|
|
3162
3109
|
},
|
|
3163
|
-
txt: function({ type:
|
|
3164
|
-
return MimeTypeUtils.INSTANCE.isTxtLike(
|
|
3110
|
+
txt: function({ type: u, extension: e }) {
|
|
3111
|
+
return MimeTypeUtils.INSTANCE.isTxtLike(u, e);
|
|
3165
3112
|
},
|
|
3166
|
-
md: function({ type:
|
|
3167
|
-
return MimeTypeUtils.INSTANCE.isMdLike(
|
|
3113
|
+
md: function({ type: u, extension: e }) {
|
|
3114
|
+
return MimeTypeUtils.INSTANCE.isMdLike(u, e);
|
|
3168
3115
|
},
|
|
3169
|
-
video: function({ type:
|
|
3170
|
-
return
|
|
3116
|
+
video: function({ type: u }) {
|
|
3117
|
+
return u.indexOf("video") !== -1;
|
|
3171
3118
|
},
|
|
3172
|
-
audio: function({ type:
|
|
3173
|
-
return
|
|
3119
|
+
audio: function({ type: u }) {
|
|
3120
|
+
return u.indexOf("audio") !== -1;
|
|
3174
3121
|
},
|
|
3175
|
-
zip: function({ type:
|
|
3176
|
-
return
|
|
3122
|
+
zip: function({ type: u }) {
|
|
3123
|
+
return u.indexOf("zip") !== -1 || u.indexOf("rar") !== -1 || u.indexOf("tar") !== -1 || u.indexOf("7z") !== -1;
|
|
3177
3124
|
}
|
|
3178
|
-
},
|
|
3125
|
+
}, D = class D {
|
|
3179
3126
|
/* Similar role notion as in infra-front > workspace > Model.ts */
|
|
3180
3127
|
static getRole(e) {
|
|
3181
3128
|
var t, s;
|
|
3182
|
-
return
|
|
3129
|
+
return D.role(
|
|
3183
3130
|
(t = e.metadata) == null ? void 0 : t["content-type"],
|
|
3184
3131
|
!1,
|
|
3185
3132
|
(s = e.metadata) == null ? void 0 : s.extension
|
|
@@ -3199,10 +3146,10 @@ const defaultMappers = {
|
|
|
3199
3146
|
}
|
|
3200
3147
|
};
|
|
3201
3148
|
// FIXME add edumedia support
|
|
3202
|
-
|
|
3149
|
+
n(D, "roleMappers", [
|
|
3203
3150
|
(e) => Object.keys(defaultMappers).find((s) => defaultMappers[s](e))
|
|
3204
3151
|
]);
|
|
3205
|
-
let DocumentHelper =
|
|
3152
|
+
let DocumentHelper = D;
|
|
3206
3153
|
class WorkspaceService {
|
|
3207
3154
|
constructor(e) {
|
|
3208
3155
|
this.context = e;
|
|
@@ -3368,8 +3315,8 @@ class WorkspaceService {
|
|
|
3368
3315
|
}
|
|
3369
3316
|
let ATTag;
|
|
3370
3317
|
class AnalyticsService {
|
|
3371
|
-
constructor(
|
|
3372
|
-
this.context =
|
|
3318
|
+
constructor(u) {
|
|
3319
|
+
this.context = u;
|
|
3373
3320
|
}
|
|
3374
3321
|
get http() {
|
|
3375
3322
|
return this.context.http();
|
|
@@ -3382,7 +3329,7 @@ class AnalyticsService {
|
|
|
3382
3329
|
* @param locationPath
|
|
3383
3330
|
* @param app
|
|
3384
3331
|
*/
|
|
3385
|
-
async trackPageLoad(
|
|
3332
|
+
async trackPageLoad(u, e) {
|
|
3386
3333
|
const [t] = await Promise.all([
|
|
3387
3334
|
// get Xiti configuration
|
|
3388
3335
|
this.getXitiConfig(e.name.toLowerCase()),
|
|
@@ -3392,7 +3339,7 @@ class AnalyticsService {
|
|
|
3392
3339
|
if (!t || !ATInternet) return;
|
|
3393
3340
|
let s = t.LIBELLE_SERVICE.default || null;
|
|
3394
3341
|
for (const r in t.LIBELLE_SERVICE)
|
|
3395
|
-
if (r !== "default" &&
|
|
3342
|
+
if (r !== "default" && u.indexOf(r) >= 0) {
|
|
3396
3343
|
s = t.LIBELLE_SERVICE[r];
|
|
3397
3344
|
break;
|
|
3398
3345
|
}
|
|
@@ -3419,7 +3366,7 @@ class AnalyticsService {
|
|
|
3419
3366
|
level2: t.STRUCT_UAI
|
|
3420
3367
|
}), ATTag.dispatch();
|
|
3421
3368
|
}
|
|
3422
|
-
async getXitiConfig(
|
|
3369
|
+
async getXitiConfig(u) {
|
|
3423
3370
|
const [e, t] = await Promise.all([
|
|
3424
3371
|
this.http.get("/analyticsConf"),
|
|
3425
3372
|
//FIXME change servers config to only keep the "all-in-one" query to /analyticsConf.
|
|
@@ -3427,7 +3374,7 @@ class AnalyticsService {
|
|
|
3427
3374
|
]);
|
|
3428
3375
|
if (!(e != null && e.type))
|
|
3429
3376
|
throw ERROR_CODE.MALFORMED_DATA;
|
|
3430
|
-
return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t,
|
|
3377
|
+
return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t, u)), e.xiti;
|
|
3431
3378
|
}
|
|
3432
3379
|
async loadXitiScript() {
|
|
3433
3380
|
if (typeof ATInternet > "u") {
|
|
@@ -3439,13 +3386,13 @@ class AnalyticsService {
|
|
|
3439
3386
|
eval(response);
|
|
3440
3387
|
}
|
|
3441
3388
|
}
|
|
3442
|
-
async getXitiTrackingParams(
|
|
3443
|
-
if (!
|
|
3389
|
+
async getXitiTrackingParams(u, e) {
|
|
3390
|
+
if (!u.structureMap || !e) return;
|
|
3444
3391
|
const t = await this.session.getUser(), s = await this.session.getUserProfile();
|
|
3445
3392
|
let r;
|
|
3446
3393
|
if (!(t != null && t.structures)) return;
|
|
3447
3394
|
for (const l of t.structures) {
|
|
3448
|
-
const p =
|
|
3395
|
+
const p = u.structureMap[l];
|
|
3449
3396
|
if (p && p.collectiviteId && p.UAI) {
|
|
3450
3397
|
r = p;
|
|
3451
3398
|
break;
|
|
@@ -3476,15 +3423,15 @@ class AnalyticsService {
|
|
|
3476
3423
|
OUTIL: o.OUTIL ? o.OUTIL : "",
|
|
3477
3424
|
STRUCT_ID: r.collectiviteId,
|
|
3478
3425
|
STRUCT_UAI: r.UAI,
|
|
3479
|
-
PROJET: r.projetId ? r.projetId :
|
|
3480
|
-
EXPLOITANT:
|
|
3481
|
-
PLATFORME: r.plateformeId ? r.plateformeId :
|
|
3426
|
+
PROJET: r.projetId ? r.projetId : u.ID_PROJET,
|
|
3427
|
+
EXPLOITANT: u.ID_EXPLOITANT,
|
|
3428
|
+
PLATFORME: r.plateformeId ? r.plateformeId : u.ID_PLATEFORME,
|
|
3482
3429
|
ID_PERSO: a(t.userId),
|
|
3483
3430
|
PROFILE: s && s.length > 0 ? c[s[0]] ?? "" : ""
|
|
3484
3431
|
};
|
|
3485
3432
|
}
|
|
3486
3433
|
}
|
|
3487
|
-
const
|
|
3434
|
+
const C = class C {
|
|
3488
3435
|
// in minutes. Applies to recorded videos.
|
|
3489
3436
|
constructor(e) {
|
|
3490
3437
|
this.context = e;
|
|
@@ -3505,8 +3452,8 @@ const R = class R {
|
|
|
3505
3452
|
APP$4.VIDEO
|
|
3506
3453
|
);
|
|
3507
3454
|
return {
|
|
3508
|
-
maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ??
|
|
3509
|
-
maxDuration: (e == null ? void 0 : e["max-videoduration-minutes"]) ??
|
|
3455
|
+
maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ?? C.MAX_WEIGHT,
|
|
3456
|
+
maxDuration: (e == null ? void 0 : e["max-videoduration-minutes"]) ?? C.MAX_DURATION,
|
|
3510
3457
|
acceptVideoUploadExtensions: ((t = e == null ? void 0 : e["accept-videoupload-extensions"]) == null ? void 0 : t.map(
|
|
3511
3458
|
(s) => s.toUpperCase()
|
|
3512
3459
|
)) ?? []
|
|
@@ -3563,9 +3510,9 @@ const R = class R {
|
|
|
3563
3510
|
throw new Error("Video cannot be uploaded.");
|
|
3564
3511
|
}
|
|
3565
3512
|
};
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
let VideoService =
|
|
3513
|
+
n(C, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
|
|
3514
|
+
n(C, "MAX_DURATION", 3);
|
|
3515
|
+
let VideoService = C;
|
|
3569
3516
|
class EmbedderService {
|
|
3570
3517
|
constructor(e) {
|
|
3571
3518
|
this.context = e;
|
|
@@ -3660,7 +3607,7 @@ class AbstractBehaviourService {
|
|
|
3660
3607
|
//-----------------
|
|
3661
3608
|
//--- Utilities ---
|
|
3662
3609
|
//-----------------
|
|
3663
|
-
|
|
3610
|
+
n(this, "_cache");
|
|
3664
3611
|
this.context = e, this._cache = new CacheService(this.context);
|
|
3665
3612
|
}
|
|
3666
3613
|
getApplication() {
|
|
@@ -3694,8 +3641,8 @@ class AbstractBehaviourService {
|
|
|
3694
3641
|
class ActualitesBehaviour extends AbstractBehaviourService {
|
|
3695
3642
|
constructor() {
|
|
3696
3643
|
super(...arguments);
|
|
3697
|
-
|
|
3698
|
-
|
|
3644
|
+
n(this, "APP", "actualites");
|
|
3645
|
+
n(this, "RESOURCE", "actualites");
|
|
3699
3646
|
}
|
|
3700
3647
|
async loadResources() {
|
|
3701
3648
|
return (await this.httpGet(
|
|
@@ -3718,8 +3665,8 @@ class ActualitesBehaviour extends AbstractBehaviourService {
|
|
|
3718
3665
|
class BlogBehaviour extends AbstractBehaviourService {
|
|
3719
3666
|
constructor() {
|
|
3720
3667
|
super(...arguments);
|
|
3721
|
-
|
|
3722
|
-
|
|
3668
|
+
n(this, "APP", "blog");
|
|
3669
|
+
n(this, "RESOURCE", "blog");
|
|
3723
3670
|
}
|
|
3724
3671
|
loadResources() {
|
|
3725
3672
|
return new Promise(async (t, s) => {
|
|
@@ -3748,8 +3695,8 @@ class BlogBehaviour extends AbstractBehaviourService {
|
|
|
3748
3695
|
class CollaborativewallBehaviour extends AbstractBehaviourService {
|
|
3749
3696
|
constructor() {
|
|
3750
3697
|
super(...arguments);
|
|
3751
|
-
|
|
3752
|
-
|
|
3698
|
+
n(this, "APP", "collaborativewall");
|
|
3699
|
+
n(this, "RESOURCE", "collaborativewall");
|
|
3753
3700
|
}
|
|
3754
3701
|
async loadResources() {
|
|
3755
3702
|
return (await this.httpGet(
|
|
@@ -3771,8 +3718,8 @@ class CollaborativewallBehaviour extends AbstractBehaviourService {
|
|
|
3771
3718
|
class CommunityBehaviour extends AbstractBehaviourService {
|
|
3772
3719
|
constructor() {
|
|
3773
3720
|
super(...arguments);
|
|
3774
|
-
|
|
3775
|
-
|
|
3721
|
+
n(this, "APP", "community");
|
|
3722
|
+
n(this, "RESOURCE", "community");
|
|
3776
3723
|
}
|
|
3777
3724
|
async loadResources() {
|
|
3778
3725
|
return (await this.httpGet(
|
|
@@ -3796,8 +3743,8 @@ class CommunityBehaviour extends AbstractBehaviourService {
|
|
|
3796
3743
|
class ExercizerBehaviour extends AbstractBehaviourService {
|
|
3797
3744
|
constructor() {
|
|
3798
3745
|
super(...arguments);
|
|
3799
|
-
|
|
3800
|
-
|
|
3746
|
+
n(this, "APP", "exercizer");
|
|
3747
|
+
n(this, "RESOURCE", "exercizer");
|
|
3801
3748
|
}
|
|
3802
3749
|
async loadResources() {
|
|
3803
3750
|
return (await this.httpGet(
|
|
@@ -3822,8 +3769,8 @@ class ExercizerBehaviour extends AbstractBehaviourService {
|
|
|
3822
3769
|
class FormulaireBehaviour extends AbstractBehaviourService {
|
|
3823
3770
|
constructor() {
|
|
3824
3771
|
super(...arguments);
|
|
3825
|
-
|
|
3826
|
-
|
|
3772
|
+
n(this, "APP", "formulaire");
|
|
3773
|
+
n(this, "RESOURCE", "formulaire");
|
|
3827
3774
|
}
|
|
3828
3775
|
async loadResources() {
|
|
3829
3776
|
return (await this.httpGet(
|
|
@@ -3843,8 +3790,8 @@ class FormulaireBehaviour extends AbstractBehaviourService {
|
|
|
3843
3790
|
class ForumBehaviour extends AbstractBehaviourService {
|
|
3844
3791
|
constructor() {
|
|
3845
3792
|
super(...arguments);
|
|
3846
|
-
|
|
3847
|
-
|
|
3793
|
+
n(this, "APP", "forum");
|
|
3794
|
+
n(this, "RESOURCE", "forum");
|
|
3848
3795
|
}
|
|
3849
3796
|
async loadResources() {
|
|
3850
3797
|
return (await this.httpGet("/forum/categories")).map(
|
|
@@ -3864,8 +3811,8 @@ class ForumBehaviour extends AbstractBehaviourService {
|
|
|
3864
3811
|
class HomeworksBehaviour extends AbstractBehaviourService {
|
|
3865
3812
|
constructor() {
|
|
3866
3813
|
super(...arguments);
|
|
3867
|
-
|
|
3868
|
-
|
|
3814
|
+
n(this, "APP", "homeworks");
|
|
3815
|
+
n(this, "RESOURCE", "homeworks");
|
|
3869
3816
|
}
|
|
3870
3817
|
async loadResources() {
|
|
3871
3818
|
return (await this.httpGet("/homeworks/list")).filter((t) => t.owner && t.trashed === 0).map((t) => this.dataToResource({
|
|
@@ -3883,8 +3830,8 @@ class HomeworksBehaviour extends AbstractBehaviourService {
|
|
|
3883
3830
|
class MagnetoBehaviour extends AbstractBehaviourService {
|
|
3884
3831
|
constructor() {
|
|
3885
3832
|
super(...arguments);
|
|
3886
|
-
|
|
3887
|
-
|
|
3833
|
+
n(this, "APP", "magneto");
|
|
3834
|
+
n(this, "RESOURCE", "magneto");
|
|
3888
3835
|
}
|
|
3889
3836
|
async loadResources() {
|
|
3890
3837
|
const { all: t } = await this.httpGet(
|
|
@@ -3905,8 +3852,8 @@ class MagnetoBehaviour extends AbstractBehaviourService {
|
|
|
3905
3852
|
class MindmapBehaviour extends AbstractBehaviourService {
|
|
3906
3853
|
constructor() {
|
|
3907
3854
|
super(...arguments);
|
|
3908
|
-
|
|
3909
|
-
|
|
3855
|
+
n(this, "APP", "mindmap");
|
|
3856
|
+
n(this, "RESOURCE", "mindmap");
|
|
3910
3857
|
}
|
|
3911
3858
|
async loadResources() {
|
|
3912
3859
|
return (await this.httpGet("/mindmap/list/all")).map(
|
|
@@ -3926,8 +3873,8 @@ class MindmapBehaviour extends AbstractBehaviourService {
|
|
|
3926
3873
|
class PagesBehaviour extends AbstractBehaviourService {
|
|
3927
3874
|
constructor() {
|
|
3928
3875
|
super(...arguments);
|
|
3929
|
-
|
|
3930
|
-
|
|
3876
|
+
n(this, "APP", "pages");
|
|
3877
|
+
n(this, "RESOURCE", "pages");
|
|
3931
3878
|
}
|
|
3932
3879
|
async loadResources() {
|
|
3933
3880
|
const t = await this.httpGet("/pages/list/all"), s = [];
|
|
@@ -3965,8 +3912,8 @@ class PagesBehaviour extends AbstractBehaviourService {
|
|
|
3965
3912
|
class PollBehaviour extends AbstractBehaviourService {
|
|
3966
3913
|
constructor() {
|
|
3967
3914
|
super(...arguments);
|
|
3968
|
-
|
|
3969
|
-
|
|
3915
|
+
n(this, "APP", "poll");
|
|
3916
|
+
n(this, "RESOURCE", "poll");
|
|
3970
3917
|
}
|
|
3971
3918
|
async loadResources() {
|
|
3972
3919
|
return (await this.httpGet("/poll/list/all")).map((s) => {
|
|
@@ -3987,8 +3934,8 @@ class PollBehaviour extends AbstractBehaviourService {
|
|
|
3987
3934
|
class ScrapbookBehaviour extends AbstractBehaviourService {
|
|
3988
3935
|
constructor() {
|
|
3989
3936
|
super(...arguments);
|
|
3990
|
-
|
|
3991
|
-
|
|
3937
|
+
n(this, "APP", "scrapbook");
|
|
3938
|
+
n(this, "RESOURCE", "scrapbook");
|
|
3992
3939
|
}
|
|
3993
3940
|
async loadResources() {
|
|
3994
3941
|
return (await this.httpGet(
|
|
@@ -4011,8 +3958,8 @@ class ScrapbookBehaviour extends AbstractBehaviourService {
|
|
|
4011
3958
|
class TimelinegeneratorBehaviour extends AbstractBehaviourService {
|
|
4012
3959
|
constructor() {
|
|
4013
3960
|
super(...arguments);
|
|
4014
|
-
|
|
4015
|
-
|
|
3961
|
+
n(this, "APP", "timelinegenerator");
|
|
3962
|
+
n(this, "RESOURCE", "timelinegenerator");
|
|
4016
3963
|
}
|
|
4017
3964
|
loadResources() {
|
|
4018
3965
|
return new Promise(async (t, s) => {
|
|
@@ -4042,8 +3989,8 @@ class TimelinegeneratorBehaviour extends AbstractBehaviourService {
|
|
|
4042
3989
|
class WikiBehaviour extends AbstractBehaviourService {
|
|
4043
3990
|
constructor() {
|
|
4044
3991
|
super(...arguments);
|
|
4045
|
-
|
|
4046
|
-
|
|
3992
|
+
n(this, "APP", "wiki");
|
|
3993
|
+
n(this, "RESOURCE", "wiki");
|
|
4047
3994
|
}
|
|
4048
3995
|
async loadResources() {
|
|
4049
3996
|
return (await this.httpGet(
|
|
@@ -4066,8 +4013,8 @@ class WikiBehaviour extends AbstractBehaviourService {
|
|
|
4066
4013
|
class WorkspaceBehaviour extends AbstractBehaviourService {
|
|
4067
4014
|
constructor() {
|
|
4068
4015
|
super(...arguments);
|
|
4069
|
-
|
|
4070
|
-
|
|
4016
|
+
n(this, "APP", "workspace");
|
|
4017
|
+
n(this, "RESOURCE", "workspace");
|
|
4071
4018
|
}
|
|
4072
4019
|
loadResources({ search: t, asset_id: s }) {
|
|
4073
4020
|
return new Promise(async (r, i) => {
|
|
@@ -4185,13 +4132,13 @@ const b = class b {
|
|
|
4185
4132
|
//
|
|
4186
4133
|
// STATIC REGISTRY
|
|
4187
4134
|
//
|
|
4188
|
-
|
|
4189
|
-
|
|
4135
|
+
n(b, "registry", new ServiceRegistry()), // Expose some useful functions
|
|
4136
|
+
n(b, "findBehaviour", b.registry.findService.bind(b.registry)), n(b, "hasBehaviour", b.registry.isRegistered.bind(b.registry)), n(b, "resourceProducingApps", []);
|
|
4190
4137
|
let SnipletsService = b;
|
|
4191
4138
|
const SEND_ALL = "*";
|
|
4192
4139
|
class WebBroker {
|
|
4193
4140
|
constructor(e) {
|
|
4194
|
-
|
|
4141
|
+
n(this, "subscription");
|
|
4195
4142
|
this.odeServices = e;
|
|
4196
4143
|
}
|
|
4197
4144
|
get http() {
|
|
@@ -4223,10 +4170,10 @@ class WebBroker {
|
|
|
4223
4170
|
}
|
|
4224
4171
|
class DataService {
|
|
4225
4172
|
constructor(e) {
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4173
|
+
n(this, "_webBroker");
|
|
4174
|
+
n(this, "app");
|
|
4175
|
+
n(this, "user");
|
|
4176
|
+
n(this, "profile");
|
|
4230
4177
|
this.odeServices = e;
|
|
4231
4178
|
}
|
|
4232
4179
|
get conf() {
|
|
@@ -4388,20 +4335,20 @@ class AudienceService {
|
|
|
4388
4335
|
}
|
|
4389
4336
|
class OdeServices {
|
|
4390
4337
|
constructor() {
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4338
|
+
n(this, "_analytics");
|
|
4339
|
+
n(this, "_cache");
|
|
4340
|
+
n(this, "_conf");
|
|
4341
|
+
n(this, "_data");
|
|
4342
|
+
n(this, "_directory");
|
|
4343
|
+
n(this, "_http");
|
|
4344
|
+
n(this, "_idiom");
|
|
4345
|
+
n(this, "_notify");
|
|
4346
|
+
n(this, "_rights");
|
|
4347
|
+
n(this, "_session");
|
|
4348
|
+
n(this, "_share");
|
|
4349
|
+
n(this, "_video");
|
|
4350
|
+
n(this, "_workspace");
|
|
4351
|
+
n(this, "_embedder");
|
|
4405
4352
|
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);
|
|
4406
4353
|
}
|
|
4407
4354
|
initialize() {
|
|
@@ -4534,9 +4481,9 @@ class TransportFrameworkFactory {
|
|
|
4534
4481
|
return transport;
|
|
4535
4482
|
}
|
|
4536
4483
|
}
|
|
4537
|
-
const isActionAvailable = (
|
|
4484
|
+
const isActionAvailable = (u, e) => {
|
|
4538
4485
|
const t = e == null ? void 0 : e.filter(
|
|
4539
|
-
(s) => s.id ===
|
|
4486
|
+
(s) => s.id === u && s.available
|
|
4540
4487
|
);
|
|
4541
4488
|
return t && t.length > 0;
|
|
4542
4489
|
}, firstLevelWidgets = [
|
|
@@ -4603,10 +4550,10 @@ const isActionAvailable = (n, e) => {
|
|
|
4603
4550
|
class WidgetFramework {
|
|
4604
4551
|
constructor() {
|
|
4605
4552
|
//-------------------------------------
|
|
4606
|
-
|
|
4607
|
-
|
|
4553
|
+
n(this, "_initialized");
|
|
4554
|
+
n(this, "_widgets", []);
|
|
4608
4555
|
////////////////////////////////////// USER PREFERENCES
|
|
4609
|
-
|
|
4556
|
+
n(this, "_userPrefs", {});
|
|
4610
4557
|
}
|
|
4611
4558
|
initialize(e, t) {
|
|
4612
4559
|
return this._initialized || (this._initialized = new Promisified(), notify.onSessionReady().promise.then((s) => {
|
|
@@ -4670,8 +4617,8 @@ class WidgetFramework {
|
|
|
4670
4617
|
class Widget {
|
|
4671
4618
|
//-------------------------------------
|
|
4672
4619
|
constructor(e) {
|
|
4673
|
-
|
|
4674
|
-
|
|
4620
|
+
n(this, "_schoolConf", {});
|
|
4621
|
+
n(this, "_userPref");
|
|
4675
4622
|
this._platformConf = e, this._userPref = null;
|
|
4676
4623
|
}
|
|
4677
4624
|
get platformConf() {
|