@edifice.io/client 2.1.0 → 2.1.1-develop-integration.20250213121025
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/index.cjs +1 -1
- package/dist/index.js +163 -163
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var v = Object.defineProperty;
|
|
2
|
-
var T = (
|
|
3
|
-
var
|
|
2
|
+
var T = (u, e, t) => e in u ? v(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
|
+
var o = (u, e, t) => T(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import { MimeTypeUtils } from "@edifice.io/utilities";
|
|
6
6
|
const ERROR_CODE = {
|
|
@@ -99,7 +99,7 @@ const ERROR_CODE = {
|
|
|
99
99
|
};
|
|
100
100
|
class Subscription {
|
|
101
101
|
constructor(e, t) {
|
|
102
|
-
|
|
102
|
+
o(this, "revoke");
|
|
103
103
|
this._channel = e, this.revoke = this.setReceiver(
|
|
104
104
|
(s) => t == null ? void 0 : t(s.data)
|
|
105
105
|
);
|
|
@@ -117,7 +117,7 @@ class Subject {
|
|
|
117
117
|
* => We maintain here channels for *sending* messages.
|
|
118
118
|
* *Receiving* channels will be instantiated while subscribing.
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
o(this, "publishChannels", /* @__PURE__ */ new Map());
|
|
121
121
|
}
|
|
122
122
|
getChannelName(e) {
|
|
123
123
|
return "Subject:" + e;
|
|
@@ -152,9 +152,9 @@ const ASYNC_DATA_NAME = {
|
|
|
152
152
|
class Promisified {
|
|
153
153
|
constructor() {
|
|
154
154
|
//-------------------------------------
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
o(this, "_resolution");
|
|
156
|
+
o(this, "_rejection");
|
|
157
|
+
o(this, "_promise", new Promise((e, t) => {
|
|
158
158
|
this._resolution = e, this._rejection = t;
|
|
159
159
|
}));
|
|
160
160
|
}
|
|
@@ -171,8 +171,8 @@ class Promisified {
|
|
|
171
171
|
class NotifyFramework {
|
|
172
172
|
constructor() {
|
|
173
173
|
//-------------------------------------
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
o(this, "promises", {});
|
|
175
|
+
o(this, "subject", new Subject());
|
|
176
176
|
}
|
|
177
177
|
asyncData(e) {
|
|
178
178
|
return typeof this.promises[e] > "u" && (this.promises[e] = new Promisified()), this.promises[e];
|
|
@@ -203,8 +203,8 @@ const notify = new NotifyFramework(), loadedScripts$1 = {};
|
|
|
203
203
|
class Http {
|
|
204
204
|
constructor(e) {
|
|
205
205
|
// Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
o(this, "axios");
|
|
207
|
+
o(this, "_latestResponse");
|
|
208
208
|
this.axios = axios.create(e);
|
|
209
209
|
}
|
|
210
210
|
setCdn(e) {
|
|
@@ -301,7 +301,7 @@ class Http {
|
|
|
301
301
|
}
|
|
302
302
|
class TransportFramework {
|
|
303
303
|
constructor() {
|
|
304
|
-
|
|
304
|
+
o(this, "_http", new Http());
|
|
305
305
|
}
|
|
306
306
|
get http() {
|
|
307
307
|
return this._http;
|
|
@@ -320,11 +320,11 @@ class ConfigurationFrameworkFactory {
|
|
|
320
320
|
const http$2 = transport.http;
|
|
321
321
|
class Session {
|
|
322
322
|
constructor() {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
323
|
+
o(this, "_me", null);
|
|
324
|
+
o(this, "_currentLanguage", "");
|
|
325
|
+
o(this, "_notLoggedIn", !0);
|
|
326
|
+
o(this, "_description");
|
|
327
|
+
o(this, "_profile");
|
|
328
328
|
}
|
|
329
329
|
get currentLanguage() {
|
|
330
330
|
return this._currentLanguage;
|
|
@@ -442,7 +442,7 @@ class Session {
|
|
|
442
442
|
}
|
|
443
443
|
class SessionFramework {
|
|
444
444
|
constructor() {
|
|
445
|
-
|
|
445
|
+
o(this, "session", new Session());
|
|
446
446
|
}
|
|
447
447
|
initialize() {
|
|
448
448
|
return this.session.initialize();
|
|
@@ -466,22 +466,22 @@ class SessionFramework {
|
|
|
466
466
|
const session = new SessionFramework();
|
|
467
467
|
class Theme {
|
|
468
468
|
constructor() {
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
o(this, "_conf");
|
|
470
|
+
o(this, "_loaded");
|
|
471
471
|
// legacy (readonly)
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
472
|
+
o(this, "skinName", "");
|
|
473
|
+
o(this, "themeName", "");
|
|
474
|
+
o(this, "skin", "raw");
|
|
475
|
+
o(this, "themeUrl", "/assets/themes/raw/default/");
|
|
476
|
+
o(this, "templateOverrides", {});
|
|
477
|
+
o(this, "portalTemplate", "/assets/themes/raw/portal.html");
|
|
478
|
+
o(this, "basePath", "");
|
|
479
|
+
o(this, "logoutCallback", "/");
|
|
480
|
+
o(this, "skins", []);
|
|
481
|
+
o(this, "is1D", !1);
|
|
482
|
+
o(this, "is2D", !1);
|
|
483
|
+
o(this, "_onSkinReady", notify.onSkinReady());
|
|
484
|
+
o(this, "_onOverrideReady", notify.onOverridesReady());
|
|
485
485
|
}
|
|
486
486
|
initialize(e) {
|
|
487
487
|
return notify.onSessionReady().promise.then(() => this.load(e));
|
|
@@ -853,7 +853,7 @@ class Idiom {
|
|
|
853
853
|
class UserPreferences {
|
|
854
854
|
constructor() {
|
|
855
855
|
//-------------------------------------
|
|
856
|
-
|
|
856
|
+
o(this, "data", {});
|
|
857
857
|
}
|
|
858
858
|
get(e) {
|
|
859
859
|
return this.data[e];
|
|
@@ -880,10 +880,10 @@ class UserPreferences {
|
|
|
880
880
|
class User {
|
|
881
881
|
constructor() {
|
|
882
882
|
//-------------------------------------
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
883
|
+
o(this, "_me", null);
|
|
884
|
+
o(this, "_keepOpenOnLogout", !1);
|
|
885
|
+
o(this, "_preferences", new UserPreferences());
|
|
886
|
+
o(this, "_bookmarkedApps", []);
|
|
887
887
|
}
|
|
888
888
|
get keepOpenOnLogout() {
|
|
889
889
|
return this._keepOpenOnLogout;
|
|
@@ -957,9 +957,9 @@ const http$1 = transport == null ? void 0 : transport.http;
|
|
|
957
957
|
class AppConf {
|
|
958
958
|
constructor() {
|
|
959
959
|
//-------------------------------------
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
960
|
+
o(this, "_publicConf", {});
|
|
961
|
+
o(this, "_currentApp");
|
|
962
|
+
o(this, "_appConf", {});
|
|
963
963
|
}
|
|
964
964
|
/**
|
|
965
965
|
* Get the currently initialized App.
|
|
@@ -997,8 +997,8 @@ class AppConf {
|
|
|
997
997
|
class Analytics {
|
|
998
998
|
constructor() {
|
|
999
999
|
//-------------------------------------
|
|
1000
|
-
|
|
1001
|
-
|
|
1000
|
+
o(this, "_status", "void");
|
|
1001
|
+
o(this, "_params");
|
|
1002
1002
|
}
|
|
1003
1003
|
get status() {
|
|
1004
1004
|
return this._status;
|
|
@@ -1083,7 +1083,7 @@ class Analytics {
|
|
|
1083
1083
|
class ConfigurationFramework {
|
|
1084
1084
|
constructor() {
|
|
1085
1085
|
//-------------------------------------
|
|
1086
|
-
|
|
1086
|
+
o(this, "Platform", {
|
|
1087
1087
|
deploymentTag: "",
|
|
1088
1088
|
cdnDomain: "",
|
|
1089
1089
|
apps: new AppConf(),
|
|
@@ -1092,10 +1092,10 @@ class ConfigurationFramework {
|
|
|
1092
1092
|
idiom: new Idiom(),
|
|
1093
1093
|
listLanguages: () => transport.http.get("/languages")
|
|
1094
1094
|
});
|
|
1095
|
-
|
|
1095
|
+
o(this, "School", {
|
|
1096
1096
|
//apps; -> pinnedApps;
|
|
1097
1097
|
});
|
|
1098
|
-
|
|
1098
|
+
o(this, "User", new User());
|
|
1099
1099
|
}
|
|
1100
1100
|
async initialize(e, t) {
|
|
1101
1101
|
if (!e) {
|
|
@@ -1142,8 +1142,8 @@ var _;
|
|
|
1142
1142
|
const me = (_ = session == null ? void 0 : session.session) == null ? void 0 : _.user;
|
|
1143
1143
|
class Notification {
|
|
1144
1144
|
constructor(e) {
|
|
1145
|
-
|
|
1146
|
-
|
|
1145
|
+
o(this, "_id");
|
|
1146
|
+
o(this, "model");
|
|
1147
1147
|
e.reported = e.reporters && e.reporters.length > 0, this._id = e._id, this.model = e;
|
|
1148
1148
|
}
|
|
1149
1149
|
isUnread() {
|
|
@@ -1163,14 +1163,14 @@ class Notification {
|
|
|
1163
1163
|
class TimelineApp {
|
|
1164
1164
|
constructor() {
|
|
1165
1165
|
//-------------------------------------
|
|
1166
|
-
|
|
1167
|
-
|
|
1166
|
+
o(this, "_notifications", []);
|
|
1167
|
+
o(this, "_notificationTypes", []);
|
|
1168
1168
|
// ex: ["BLOG"]
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1169
|
+
o(this, "_flashMessages", []);
|
|
1170
|
+
o(this, "_pageNumber", 0);
|
|
1171
|
+
o(this, "_lastPage", !1);
|
|
1172
|
+
o(this, "_loading", !1);
|
|
1173
|
+
o(this, "showMine", !1);
|
|
1174
1174
|
}
|
|
1175
1175
|
get notifications() {
|
|
1176
1176
|
return this._notifications;
|
|
@@ -1319,7 +1319,7 @@ const f = class f {
|
|
|
1319
1319
|
//
|
|
1320
1320
|
// PROTECTED HELPERS
|
|
1321
1321
|
//
|
|
1322
|
-
|
|
1322
|
+
o(this, "checkHttpResponse", (e) => {
|
|
1323
1323
|
if (this.http.latestResponse.status >= 300)
|
|
1324
1324
|
throw this.http.latestResponse.statusText;
|
|
1325
1325
|
return e;
|
|
@@ -1537,8 +1537,8 @@ const f = class f {
|
|
|
1537
1537
|
//
|
|
1538
1538
|
// STATIC REGISTRY
|
|
1539
1539
|
//
|
|
1540
|
-
|
|
1541
|
-
|
|
1540
|
+
o(f, "registry", new ServiceRegistry()), // Expose some useful functions
|
|
1541
|
+
o(f, "register", f.registry.register.bind(f.registry)), o(f, "findService", f.registry.findService.bind(f.registry)), o(f, "findMainService", f.registry.findMainService.bind(f.registry)), o(f, "isRegistered", f.registry.isRegistered.bind(f.registry));
|
|
1542
1542
|
let ResourceService = f;
|
|
1543
1543
|
const APP$2 = "scrapbook", RESOURCE$2 = "scrapbook";
|
|
1544
1544
|
class ScrapbookResourceService extends ResourceService {
|
|
@@ -1581,7 +1581,7 @@ class ScrapbookResourceService extends ResourceService {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
ResourceService.register(
|
|
1583
1583
|
{ application: RESOURCE$2, resourceType: RESOURCE$2 },
|
|
1584
|
-
(
|
|
1584
|
+
(u) => new ScrapbookResourceService(u)
|
|
1585
1585
|
);
|
|
1586
1586
|
const APP$1 = "homeworks", RESOURCE$1 = "homeworks";
|
|
1587
1587
|
class HomeworksResourceService extends ResourceService {
|
|
@@ -1629,7 +1629,7 @@ class HomeworksResourceService extends ResourceService {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
ResourceService.register(
|
|
1631
1631
|
{ application: RESOURCE$1, resourceType: RESOURCE$1 },
|
|
1632
|
-
(
|
|
1632
|
+
(u) => new HomeworksResourceService(u)
|
|
1633
1633
|
);
|
|
1634
1634
|
const APP = "timelinegenerator", RESOURCE = "timelinegenerator";
|
|
1635
1635
|
class TimelineGeneratorResourceService extends ResourceService {
|
|
@@ -1684,7 +1684,7 @@ class TimelineGeneratorResourceService extends ResourceService {
|
|
|
1684
1684
|
}
|
|
1685
1685
|
ResourceService.register(
|
|
1686
1686
|
{ application: RESOURCE, resourceType: RESOURCE },
|
|
1687
|
-
(
|
|
1687
|
+
(u) => new TimelineGeneratorResourceService(u)
|
|
1688
1688
|
);
|
|
1689
1689
|
const globalCache = {}, mutexPromise = {};
|
|
1690
1690
|
class CacheService {
|
|
@@ -1922,10 +1922,10 @@ const loadedScripts = {};
|
|
|
1922
1922
|
class HttpService {
|
|
1923
1923
|
constructor(e, t) {
|
|
1924
1924
|
// Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1925
|
+
o(this, "axios");
|
|
1926
|
+
o(this, "baseUrl");
|
|
1927
|
+
o(this, "headers", {});
|
|
1928
|
+
o(this, "_latestResponse");
|
|
1929
1929
|
this.context = e, this.axios = axios.create(t);
|
|
1930
1930
|
}
|
|
1931
1931
|
fixBaseUrl(e) {
|
|
@@ -2921,38 +2921,38 @@ class ShareService {
|
|
|
2921
2921
|
}
|
|
2922
2922
|
}
|
|
2923
2923
|
const defaultMappers = {
|
|
2924
|
-
csv: function({ type:
|
|
2925
|
-
return MimeTypeUtils.INSTANCE.isCsvLike(
|
|
2924
|
+
csv: function({ type: u, extension: e }) {
|
|
2925
|
+
return MimeTypeUtils.INSTANCE.isCsvLike(u, e);
|
|
2926
2926
|
},
|
|
2927
|
-
doc: function({ type:
|
|
2928
|
-
return MimeTypeUtils.INSTANCE.isWordLike(
|
|
2927
|
+
doc: function({ type: u, extension: e }) {
|
|
2928
|
+
return MimeTypeUtils.INSTANCE.isWordLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("wordprocessing") !== -1;
|
|
2929
2929
|
},
|
|
2930
|
-
xls: function({ type:
|
|
2931
|
-
return MimeTypeUtils.INSTANCE.isExcelLike(
|
|
2930
|
+
xls: function({ type: u, extension: e }) {
|
|
2931
|
+
return MimeTypeUtils.INSTANCE.isExcelLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("spreadsheet") !== -1 || u.indexOf("ms-excel") !== -1;
|
|
2932
2932
|
},
|
|
2933
|
-
img: function({ type:
|
|
2934
|
-
return
|
|
2933
|
+
img: function({ type: u }) {
|
|
2934
|
+
return u.indexOf("image") !== -1;
|
|
2935
2935
|
},
|
|
2936
|
-
pdf: function({ type:
|
|
2937
|
-
return
|
|
2936
|
+
pdf: function({ type: u }) {
|
|
2937
|
+
return u.indexOf("pdf") !== -1 || u === "application/x-download";
|
|
2938
2938
|
},
|
|
2939
|
-
ppt: function({ type:
|
|
2940
|
-
return MimeTypeUtils.INSTANCE.isPowerpointLike(
|
|
2939
|
+
ppt: function({ type: u, extension: e }) {
|
|
2940
|
+
return MimeTypeUtils.INSTANCE.isPowerpointLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("presentation") !== -1 || u.indexOf("powerpoint") !== -1;
|
|
2941
2941
|
},
|
|
2942
|
-
txt: function({ type:
|
|
2943
|
-
return MimeTypeUtils.INSTANCE.isTxtLike(
|
|
2942
|
+
txt: function({ type: u, extension: e }) {
|
|
2943
|
+
return MimeTypeUtils.INSTANCE.isTxtLike(u, e);
|
|
2944
2944
|
},
|
|
2945
|
-
md: function({ type:
|
|
2946
|
-
return MimeTypeUtils.INSTANCE.isMdLike(
|
|
2945
|
+
md: function({ type: u, extension: e }) {
|
|
2946
|
+
return MimeTypeUtils.INSTANCE.isMdLike(u, e);
|
|
2947
2947
|
},
|
|
2948
|
-
video: function({ type:
|
|
2949
|
-
return
|
|
2948
|
+
video: function({ type: u }) {
|
|
2949
|
+
return u.indexOf("video") !== -1;
|
|
2950
2950
|
},
|
|
2951
|
-
audio: function({ type:
|
|
2952
|
-
return
|
|
2951
|
+
audio: function({ type: u }) {
|
|
2952
|
+
return u.indexOf("audio") !== -1;
|
|
2953
2953
|
},
|
|
2954
|
-
zip: function({ type:
|
|
2955
|
-
return
|
|
2954
|
+
zip: function({ type: u }) {
|
|
2955
|
+
return u.indexOf("zip") !== -1 || u.indexOf("rar") !== -1 || u.indexOf("tar") !== -1 || u.indexOf("7z") !== -1;
|
|
2956
2956
|
}
|
|
2957
2957
|
}, R = class R {
|
|
2958
2958
|
/* Similar role notion as in infra-front > workspace > Model.ts */
|
|
@@ -2978,7 +2978,7 @@ const defaultMappers = {
|
|
|
2978
2978
|
}
|
|
2979
2979
|
};
|
|
2980
2980
|
// FIXME add edumedia support
|
|
2981
|
-
|
|
2981
|
+
o(R, "roleMappers", [
|
|
2982
2982
|
(e) => Object.keys(defaultMappers).find((s) => defaultMappers[s](e))
|
|
2983
2983
|
]);
|
|
2984
2984
|
let DocumentHelper = R;
|
|
@@ -3099,8 +3099,8 @@ class WorkspaceService {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
let ATTag;
|
|
3101
3101
|
class AnalyticsService {
|
|
3102
|
-
constructor(
|
|
3103
|
-
this.context =
|
|
3102
|
+
constructor(u) {
|
|
3103
|
+
this.context = u;
|
|
3104
3104
|
}
|
|
3105
3105
|
get http() {
|
|
3106
3106
|
return this.context.http();
|
|
@@ -3113,7 +3113,7 @@ class AnalyticsService {
|
|
|
3113
3113
|
* @param locationPath
|
|
3114
3114
|
* @param app
|
|
3115
3115
|
*/
|
|
3116
|
-
async trackPageLoad(
|
|
3116
|
+
async trackPageLoad(u, e) {
|
|
3117
3117
|
const [t] = await Promise.all([
|
|
3118
3118
|
// get Xiti configuration
|
|
3119
3119
|
this.getXitiConfig(e.name.toLowerCase()),
|
|
@@ -3123,7 +3123,7 @@ class AnalyticsService {
|
|
|
3123
3123
|
if (!t || !ATInternet) return;
|
|
3124
3124
|
let s = t.LIBELLE_SERVICE.default || null;
|
|
3125
3125
|
for (const r in t.LIBELLE_SERVICE)
|
|
3126
|
-
if (r !== "default" &&
|
|
3126
|
+
if (r !== "default" && u.indexOf(r) >= 0) {
|
|
3127
3127
|
s = t.LIBELLE_SERVICE[r];
|
|
3128
3128
|
break;
|
|
3129
3129
|
}
|
|
@@ -3150,7 +3150,7 @@ class AnalyticsService {
|
|
|
3150
3150
|
level2: t.STRUCT_UAI
|
|
3151
3151
|
}), ATTag.dispatch();
|
|
3152
3152
|
}
|
|
3153
|
-
async getXitiConfig(
|
|
3153
|
+
async getXitiConfig(u) {
|
|
3154
3154
|
const [e, t] = await Promise.all([
|
|
3155
3155
|
this.http.get("/analyticsConf"),
|
|
3156
3156
|
//FIXME change servers config to only keep the "all-in-one" query to /analyticsConf.
|
|
@@ -3158,7 +3158,7 @@ class AnalyticsService {
|
|
|
3158
3158
|
]);
|
|
3159
3159
|
if (!(e != null && e.type))
|
|
3160
3160
|
throw ERROR_CODE.MALFORMED_DATA;
|
|
3161
|
-
return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t,
|
|
3161
|
+
return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t, u)), e.xiti;
|
|
3162
3162
|
}
|
|
3163
3163
|
async loadXitiScript() {
|
|
3164
3164
|
if (typeof ATInternet > "u") {
|
|
@@ -3170,13 +3170,13 @@ class AnalyticsService {
|
|
|
3170
3170
|
eval(response);
|
|
3171
3171
|
}
|
|
3172
3172
|
}
|
|
3173
|
-
async getXitiTrackingParams(
|
|
3174
|
-
if (!
|
|
3173
|
+
async getXitiTrackingParams(u, e) {
|
|
3174
|
+
if (!u.structureMap || !e) return;
|
|
3175
3175
|
const t = await this.session.getUser(), s = await this.session.getUserProfile();
|
|
3176
3176
|
let r;
|
|
3177
3177
|
if (!(t != null && t.structures)) return;
|
|
3178
3178
|
for (const h of t.structures) {
|
|
3179
|
-
const l =
|
|
3179
|
+
const l = u.structureMap[h];
|
|
3180
3180
|
if (l && l.collectiviteId && l.UAI) {
|
|
3181
3181
|
r = l;
|
|
3182
3182
|
break;
|
|
@@ -3207,9 +3207,9 @@ class AnalyticsService {
|
|
|
3207
3207
|
OUTIL: n.OUTIL ? n.OUTIL : "",
|
|
3208
3208
|
STRUCT_ID: r.collectiviteId,
|
|
3209
3209
|
STRUCT_UAI: r.UAI,
|
|
3210
|
-
PROJET: r.projetId ? r.projetId :
|
|
3211
|
-
EXPLOITANT:
|
|
3212
|
-
PLATFORME: r.plateformeId ? r.plateformeId :
|
|
3210
|
+
PROJET: r.projetId ? r.projetId : u.ID_PROJET,
|
|
3211
|
+
EXPLOITANT: u.ID_EXPLOITANT,
|
|
3212
|
+
PLATFORME: r.plateformeId ? r.plateformeId : u.ID_PLATEFORME,
|
|
3213
3213
|
ID_PERSO: a(t.userId),
|
|
3214
3214
|
PROFILE: s && s.length > 0 ? c[s[0]] ?? "" : ""
|
|
3215
3215
|
};
|
|
@@ -3294,8 +3294,8 @@ const w = class w {
|
|
|
3294
3294
|
throw new Error("Video cannot be uploaded.");
|
|
3295
3295
|
}
|
|
3296
3296
|
};
|
|
3297
|
-
|
|
3298
|
-
|
|
3297
|
+
o(w, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
|
|
3298
|
+
o(w, "MAX_DURATION", 3);
|
|
3299
3299
|
let VideoService = w;
|
|
3300
3300
|
class EmbedderService {
|
|
3301
3301
|
constructor(e) {
|
|
@@ -3391,7 +3391,7 @@ class AbstractBehaviourService {
|
|
|
3391
3391
|
//-----------------
|
|
3392
3392
|
//--- Utilities ---
|
|
3393
3393
|
//-----------------
|
|
3394
|
-
|
|
3394
|
+
o(this, "_cache");
|
|
3395
3395
|
this.context = e, this._cache = new CacheService(this.context);
|
|
3396
3396
|
}
|
|
3397
3397
|
getApplication() {
|
|
@@ -3425,8 +3425,8 @@ class AbstractBehaviourService {
|
|
|
3425
3425
|
class ActualitesBehaviour extends AbstractBehaviourService {
|
|
3426
3426
|
constructor() {
|
|
3427
3427
|
super(...arguments);
|
|
3428
|
-
|
|
3429
|
-
|
|
3428
|
+
o(this, "APP", "actualites");
|
|
3429
|
+
o(this, "RESOURCE", "actualites");
|
|
3430
3430
|
}
|
|
3431
3431
|
async loadResources() {
|
|
3432
3432
|
return (await this.httpGet(
|
|
@@ -3449,8 +3449,8 @@ class ActualitesBehaviour extends AbstractBehaviourService {
|
|
|
3449
3449
|
class BlogBehaviour extends AbstractBehaviourService {
|
|
3450
3450
|
constructor() {
|
|
3451
3451
|
super(...arguments);
|
|
3452
|
-
|
|
3453
|
-
|
|
3452
|
+
o(this, "APP", "blog");
|
|
3453
|
+
o(this, "RESOURCE", "blog");
|
|
3454
3454
|
}
|
|
3455
3455
|
loadResources() {
|
|
3456
3456
|
return new Promise(async (t, s) => {
|
|
@@ -3479,8 +3479,8 @@ class BlogBehaviour extends AbstractBehaviourService {
|
|
|
3479
3479
|
class CollaborativewallBehaviour extends AbstractBehaviourService {
|
|
3480
3480
|
constructor() {
|
|
3481
3481
|
super(...arguments);
|
|
3482
|
-
|
|
3483
|
-
|
|
3482
|
+
o(this, "APP", "collaborativewall");
|
|
3483
|
+
o(this, "RESOURCE", "collaborativewall");
|
|
3484
3484
|
}
|
|
3485
3485
|
async loadResources() {
|
|
3486
3486
|
return (await this.httpGet(
|
|
@@ -3502,8 +3502,8 @@ class CollaborativewallBehaviour extends AbstractBehaviourService {
|
|
|
3502
3502
|
class CommunityBehaviour extends AbstractBehaviourService {
|
|
3503
3503
|
constructor() {
|
|
3504
3504
|
super(...arguments);
|
|
3505
|
-
|
|
3506
|
-
|
|
3505
|
+
o(this, "APP", "community");
|
|
3506
|
+
o(this, "RESOURCE", "community");
|
|
3507
3507
|
}
|
|
3508
3508
|
async loadResources() {
|
|
3509
3509
|
return (await this.httpGet(
|
|
@@ -3527,8 +3527,8 @@ class CommunityBehaviour extends AbstractBehaviourService {
|
|
|
3527
3527
|
class ExercizerBehaviour extends AbstractBehaviourService {
|
|
3528
3528
|
constructor() {
|
|
3529
3529
|
super(...arguments);
|
|
3530
|
-
|
|
3531
|
-
|
|
3530
|
+
o(this, "APP", "exercizer");
|
|
3531
|
+
o(this, "RESOURCE", "exercizer");
|
|
3532
3532
|
}
|
|
3533
3533
|
async loadResources() {
|
|
3534
3534
|
return (await this.httpGet(
|
|
@@ -3553,8 +3553,8 @@ class ExercizerBehaviour extends AbstractBehaviourService {
|
|
|
3553
3553
|
class FormulaireBehaviour extends AbstractBehaviourService {
|
|
3554
3554
|
constructor() {
|
|
3555
3555
|
super(...arguments);
|
|
3556
|
-
|
|
3557
|
-
|
|
3556
|
+
o(this, "APP", "formulaire");
|
|
3557
|
+
o(this, "RESOURCE", "formulaire");
|
|
3558
3558
|
}
|
|
3559
3559
|
async loadResources() {
|
|
3560
3560
|
return (await this.httpGet(
|
|
@@ -3574,8 +3574,8 @@ class FormulaireBehaviour extends AbstractBehaviourService {
|
|
|
3574
3574
|
class ForumBehaviour extends AbstractBehaviourService {
|
|
3575
3575
|
constructor() {
|
|
3576
3576
|
super(...arguments);
|
|
3577
|
-
|
|
3578
|
-
|
|
3577
|
+
o(this, "APP", "forum");
|
|
3578
|
+
o(this, "RESOURCE", "forum");
|
|
3579
3579
|
}
|
|
3580
3580
|
async loadResources() {
|
|
3581
3581
|
return (await this.httpGet("/forum/categories")).map(
|
|
@@ -3595,8 +3595,8 @@ class ForumBehaviour extends AbstractBehaviourService {
|
|
|
3595
3595
|
class HomeworksBehaviour extends AbstractBehaviourService {
|
|
3596
3596
|
constructor() {
|
|
3597
3597
|
super(...arguments);
|
|
3598
|
-
|
|
3599
|
-
|
|
3598
|
+
o(this, "APP", "homeworks");
|
|
3599
|
+
o(this, "RESOURCE", "homeworks");
|
|
3600
3600
|
}
|
|
3601
3601
|
async loadResources() {
|
|
3602
3602
|
return (await this.httpGet("/homeworks/list")).filter((t) => t.owner && t.trashed === 0).map((t) => this.dataToResource({
|
|
@@ -3614,8 +3614,8 @@ class HomeworksBehaviour extends AbstractBehaviourService {
|
|
|
3614
3614
|
class MagnetoBehaviour extends AbstractBehaviourService {
|
|
3615
3615
|
constructor() {
|
|
3616
3616
|
super(...arguments);
|
|
3617
|
-
|
|
3618
|
-
|
|
3617
|
+
o(this, "APP", "magneto");
|
|
3618
|
+
o(this, "RESOURCE", "magneto");
|
|
3619
3619
|
}
|
|
3620
3620
|
async loadResources() {
|
|
3621
3621
|
const { all: t } = await this.httpGet(
|
|
@@ -3636,8 +3636,8 @@ class MagnetoBehaviour extends AbstractBehaviourService {
|
|
|
3636
3636
|
class MindmapBehaviour extends AbstractBehaviourService {
|
|
3637
3637
|
constructor() {
|
|
3638
3638
|
super(...arguments);
|
|
3639
|
-
|
|
3640
|
-
|
|
3639
|
+
o(this, "APP", "mindmap");
|
|
3640
|
+
o(this, "RESOURCE", "mindmap");
|
|
3641
3641
|
}
|
|
3642
3642
|
async loadResources() {
|
|
3643
3643
|
return (await this.httpGet("/mindmap/list/all")).map(
|
|
@@ -3657,8 +3657,8 @@ class MindmapBehaviour extends AbstractBehaviourService {
|
|
|
3657
3657
|
class PagesBehaviour extends AbstractBehaviourService {
|
|
3658
3658
|
constructor() {
|
|
3659
3659
|
super(...arguments);
|
|
3660
|
-
|
|
3661
|
-
|
|
3660
|
+
o(this, "APP", "pages");
|
|
3661
|
+
o(this, "RESOURCE", "pages");
|
|
3662
3662
|
}
|
|
3663
3663
|
async loadResources() {
|
|
3664
3664
|
const t = await this.httpGet("/pages/list/all"), s = [];
|
|
@@ -3696,8 +3696,8 @@ class PagesBehaviour extends AbstractBehaviourService {
|
|
|
3696
3696
|
class PollBehaviour extends AbstractBehaviourService {
|
|
3697
3697
|
constructor() {
|
|
3698
3698
|
super(...arguments);
|
|
3699
|
-
|
|
3700
|
-
|
|
3699
|
+
o(this, "APP", "poll");
|
|
3700
|
+
o(this, "RESOURCE", "poll");
|
|
3701
3701
|
}
|
|
3702
3702
|
async loadResources() {
|
|
3703
3703
|
return (await this.httpGet("/poll/list/all")).map((s) => {
|
|
@@ -3718,8 +3718,8 @@ class PollBehaviour extends AbstractBehaviourService {
|
|
|
3718
3718
|
class ScrapbookBehaviour extends AbstractBehaviourService {
|
|
3719
3719
|
constructor() {
|
|
3720
3720
|
super(...arguments);
|
|
3721
|
-
|
|
3722
|
-
|
|
3721
|
+
o(this, "APP", "scrapbook");
|
|
3722
|
+
o(this, "RESOURCE", "scrapbook");
|
|
3723
3723
|
}
|
|
3724
3724
|
async loadResources() {
|
|
3725
3725
|
return (await this.httpGet(
|
|
@@ -3742,8 +3742,8 @@ class ScrapbookBehaviour extends AbstractBehaviourService {
|
|
|
3742
3742
|
class TimelinegeneratorBehaviour extends AbstractBehaviourService {
|
|
3743
3743
|
constructor() {
|
|
3744
3744
|
super(...arguments);
|
|
3745
|
-
|
|
3746
|
-
|
|
3745
|
+
o(this, "APP", "timelinegenerator");
|
|
3746
|
+
o(this, "RESOURCE", "timelinegenerator");
|
|
3747
3747
|
}
|
|
3748
3748
|
loadResources() {
|
|
3749
3749
|
return new Promise(async (t, s) => {
|
|
@@ -3773,8 +3773,8 @@ class TimelinegeneratorBehaviour extends AbstractBehaviourService {
|
|
|
3773
3773
|
class WikiBehaviour extends AbstractBehaviourService {
|
|
3774
3774
|
constructor() {
|
|
3775
3775
|
super(...arguments);
|
|
3776
|
-
|
|
3777
|
-
|
|
3776
|
+
o(this, "APP", "wiki");
|
|
3777
|
+
o(this, "RESOURCE", "wiki");
|
|
3778
3778
|
}
|
|
3779
3779
|
async loadResources() {
|
|
3780
3780
|
return (await this.httpGet(
|
|
@@ -3797,8 +3797,8 @@ class WikiBehaviour extends AbstractBehaviourService {
|
|
|
3797
3797
|
class WorkspaceBehaviour extends AbstractBehaviourService {
|
|
3798
3798
|
constructor() {
|
|
3799
3799
|
super(...arguments);
|
|
3800
|
-
|
|
3801
|
-
|
|
3800
|
+
o(this, "APP", "workspace");
|
|
3801
|
+
o(this, "RESOURCE", "workspace");
|
|
3802
3802
|
}
|
|
3803
3803
|
loadResources({ search: t, asset_id: s }) {
|
|
3804
3804
|
return new Promise(async (r, i) => {
|
|
@@ -3913,13 +3913,13 @@ const y = class y {
|
|
|
3913
3913
|
//
|
|
3914
3914
|
// STATIC REGISTRY
|
|
3915
3915
|
//
|
|
3916
|
-
|
|
3917
|
-
|
|
3916
|
+
o(y, "registry", new ServiceRegistry()), // Expose some useful functions
|
|
3917
|
+
o(y, "findBehaviour", y.registry.findService.bind(y.registry)), o(y, "hasBehaviour", y.registry.isRegistered.bind(y.registry)), o(y, "resourceProducingApps", []);
|
|
3918
3918
|
let SnipletsService = y;
|
|
3919
3919
|
const SEND_ALL = "*";
|
|
3920
3920
|
class WebBroker {
|
|
3921
3921
|
constructor(e) {
|
|
3922
|
-
|
|
3922
|
+
o(this, "subscription");
|
|
3923
3923
|
this.odeServices = e;
|
|
3924
3924
|
}
|
|
3925
3925
|
get http() {
|
|
@@ -3951,10 +3951,10 @@ class WebBroker {
|
|
|
3951
3951
|
}
|
|
3952
3952
|
class DataService {
|
|
3953
3953
|
constructor(e) {
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3954
|
+
o(this, "_webBroker");
|
|
3955
|
+
o(this, "app");
|
|
3956
|
+
o(this, "user");
|
|
3957
|
+
o(this, "profile");
|
|
3958
3958
|
this.odeServices = e;
|
|
3959
3959
|
}
|
|
3960
3960
|
get conf() {
|
|
@@ -4116,20 +4116,20 @@ class AudienceService {
|
|
|
4116
4116
|
}
|
|
4117
4117
|
class OdeServices {
|
|
4118
4118
|
constructor() {
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4119
|
+
o(this, "_analytics");
|
|
4120
|
+
o(this, "_cache");
|
|
4121
|
+
o(this, "_conf");
|
|
4122
|
+
o(this, "_data");
|
|
4123
|
+
o(this, "_directory");
|
|
4124
|
+
o(this, "_http");
|
|
4125
|
+
o(this, "_idiom");
|
|
4126
|
+
o(this, "_notify");
|
|
4127
|
+
o(this, "_rights");
|
|
4128
|
+
o(this, "_session");
|
|
4129
|
+
o(this, "_share");
|
|
4130
|
+
o(this, "_video");
|
|
4131
|
+
o(this, "_workspace");
|
|
4132
|
+
o(this, "_embedder");
|
|
4133
4133
|
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);
|
|
4134
4134
|
}
|
|
4135
4135
|
initialize() {
|
|
@@ -4262,9 +4262,9 @@ class TransportFrameworkFactory {
|
|
|
4262
4262
|
return transport;
|
|
4263
4263
|
}
|
|
4264
4264
|
}
|
|
4265
|
-
const isActionAvailable = (
|
|
4265
|
+
const isActionAvailable = (u, e) => {
|
|
4266
4266
|
const t = e == null ? void 0 : e.filter(
|
|
4267
|
-
(s) => s.id ===
|
|
4267
|
+
(s) => s.id === u && s.available
|
|
4268
4268
|
);
|
|
4269
4269
|
return t && t.length > 0;
|
|
4270
4270
|
}, firstLevelWidgets = [
|
|
@@ -4331,10 +4331,10 @@ const isActionAvailable = (o, e) => {
|
|
|
4331
4331
|
class WidgetFramework {
|
|
4332
4332
|
constructor() {
|
|
4333
4333
|
//-------------------------------------
|
|
4334
|
-
|
|
4335
|
-
|
|
4334
|
+
o(this, "_initialized");
|
|
4335
|
+
o(this, "_widgets", []);
|
|
4336
4336
|
////////////////////////////////////// USER PREFERENCES
|
|
4337
|
-
|
|
4337
|
+
o(this, "_userPrefs", {});
|
|
4338
4338
|
}
|
|
4339
4339
|
initialize(e, t) {
|
|
4340
4340
|
return this._initialized || (this._initialized = new Promisified(), notify.onSessionReady().promise.then((s) => {
|
|
@@ -4398,8 +4398,8 @@ class WidgetFramework {
|
|
|
4398
4398
|
class Widget {
|
|
4399
4399
|
//-------------------------------------
|
|
4400
4400
|
constructor(e) {
|
|
4401
|
-
|
|
4402
|
-
|
|
4401
|
+
o(this, "_schoolConf", {});
|
|
4402
|
+
o(this, "_userPref");
|
|
4403
4403
|
this._platformConf = e, this._userPref = null;
|
|
4404
4404
|
}
|
|
4405
4405
|
get platformConf() {
|