@edifice.io/client 2.5.1 → 2.5.2-develop-b2school-actualites.20251127174432

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.js CHANGED
@@ -97,7 +97,7 @@ const ERROR_CODE = {
97
97
  INFOTIP: "infotip",
98
98
  RGPD_COOKIES: "rgpdCookies"
99
99
  // TODO compléter
100
- }, b = class b {
100
+ }, R = class R {
101
101
  constructor(e) {
102
102
  n(this, "name");
103
103
  n(this, "listeners", /* @__PURE__ */ new Set());
@@ -109,8 +109,8 @@ const ERROR_CODE = {
109
109
  * @returns the channel instance
110
110
  */
111
111
  static getChannel(e) {
112
- let t = b.channels.get(e);
113
- return t || (t = new b(e), b.channels.set(e, t)), t;
112
+ let t = R.channels.get(e);
113
+ return t || (t = new R(e), R.channels.set(e, t)), t;
114
114
  }
115
115
  /**
116
116
  * Add a listener and return a revocation function to remove it.
@@ -135,11 +135,11 @@ const ERROR_CODE = {
135
135
  * Close this channel: remove listeners and unregister from global map.
136
136
  */
137
137
  close() {
138
- this.listeners.clear(), b.channels.delete(this.name);
138
+ this.listeners.clear(), R.channels.delete(this.name);
139
139
  }
140
140
  };
141
- n(b, "channels", /* @__PURE__ */ new Map());
142
- let SimpleChannel = b;
141
+ n(R, "channels", /* @__PURE__ */ new Map());
142
+ let SimpleChannel = R;
143
143
  class Subscription {
144
144
  constructor(e, t) {
145
145
  n(this, "revoke");
@@ -1096,8 +1096,8 @@ class Analytics {
1096
1096
  if (!o || !o.LIBELLE_SERVICE || !r.UAI) return;
1097
1097
  function a(h) {
1098
1098
  let l = "";
1099
- for (let E = 0; E < h.length; E++)
1100
- l += h.charCodeAt(E);
1099
+ for (let p = 0; p < h.length; p++)
1100
+ l += h.charCodeAt(p);
1101
1101
  return l;
1102
1102
  }
1103
1103
  const c = {
@@ -1180,8 +1180,8 @@ class ConfigurationFramework {
1180
1180
  // }
1181
1181
  }
1182
1182
  const configure = new ConfigurationFramework(), http = transport == null ? void 0 : transport.http;
1183
- var D;
1184
- const me = (D = session == null ? void 0 : session.session) == null ? void 0 : D.user;
1183
+ var v;
1184
+ const me = (v = session == null ? void 0 : session.session) == null ? void 0 : v.user;
1185
1185
  class Notification {
1186
1186
  constructor(e) {
1187
1187
  n(this, "_id");
@@ -1904,13 +1904,13 @@ class ConfService {
1904
1904
  conf: t,
1905
1905
  publicTheme: s
1906
1906
  }) {
1907
- var E;
1908
- const r = await this.http.get("/theme"), i = (E = t == null ? void 0 : t.overriding) == null ? void 0 : E.find(
1909
- (p) => (
1907
+ var p;
1908
+ const r = await this.http.get("/theme"), i = (p = t == null ? void 0 : t.overriding) == null ? void 0 : p.find(
1909
+ (d) => (
1910
1910
  // Fix #WB2-2660:
1911
1911
  // If Public access => get the neo theme
1912
1912
  // Else get the theme from the user preference
1913
- s ? p.parent === "theme-open-ent" && p.bootstrapVersion === "ode-bootstrap-neo" : p.child === (r == null ? void 0 : r.themeName)
1913
+ s ? d.parent === "theme-open-ent" && d.bootstrapVersion === "ode-bootstrap-neo" : d.child === (r == null ? void 0 : r.themeName)
1914
1914
  )
1915
1915
  ), o = s ? "default" : (r == null ? void 0 : r.skinName) || (i == null ? void 0 : i.skins[0]), a = (r == null ? void 0 : r.skin) || `/assets/themes/${i == null ? void 0 : i.child}/skins/${o}/`, c = i == null ? void 0 : i.skins, h = i == null ? void 0 : i.bootstrapVersion.split("-").slice(-1)[0], l = (i == null ? void 0 : i.parent) === "panda";
1916
1916
  return {
@@ -1962,25 +1962,26 @@ class DirectoryService {
1962
1962
  }));
1963
1963
  }
1964
1964
  async getBookMarkById(e) {
1965
- const { groups: t, id: s, name: r, users: i } = await this.http.get(
1965
+ const { groups: t, id: s, name: r, users: i, notVisibleCount: o } = await this.http.get(
1966
1966
  `/directory/sharebookmark/${e}`
1967
1967
  );
1968
1968
  return {
1969
1969
  id: s,
1970
1970
  displayName: r,
1971
- groups: t.map(({ name: o, id: a, nbUsers: c }) => ({
1972
- nbUsers: c,
1973
- displayName: o,
1974
- id: a
1971
+ notVisibleCount: o,
1972
+ groups: t.map(({ name: a, id: c, nbUsers: h }) => ({
1973
+ nbUsers: h,
1974
+ displayName: a,
1975
+ id: c
1975
1976
  })),
1976
- users: i.map(({ displayName: o, id: a, profile: c }) => ({
1977
- profile: c,
1978
- displayName: o,
1977
+ users: i.map(({ displayName: a, id: c, profile: h }) => ({
1978
+ profile: h,
1979
+ displayName: a,
1979
1980
  // these info are missing from api
1980
1981
  firstName: "",
1981
1982
  lastName: "",
1982
1983
  login: "",
1983
- id: a
1984
+ id: c
1984
1985
  }))
1985
1986
  };
1986
1987
  }
@@ -1990,25 +1991,25 @@ class DirectoryService {
1990
1991
  users: r
1991
1992
  }) {
1992
1993
  this.cache.clearCache("/directory/sharebookmark/all");
1993
- const i = r.map((p) => typeof p == "string" ? p : p.id), o = s.map((p) => typeof p == "string" ? p : p.id), a = t.map(async (p) => {
1994
- if (typeof p == "string") {
1995
- const { displayName: d, groups: g, id: A, users: f } = await this.getBookMarkById(p), y = f.map((_) => _.id), F = g.map((_) => _.id);
1994
+ const i = r.map((d) => typeof d == "string" ? d : d.id), o = s.map((d) => typeof d == "string" ? d : d.id), a = t.map(async (d) => {
1995
+ if (typeof d == "string") {
1996
+ const { displayName: b, groups: E, id: g, users: A } = await this.getBookMarkById(d), f = A.map((F) => F.id), y = E.map((F) => F.id);
1996
1997
  return {
1997
- displayName: d,
1998
- id: A,
1999
- members: [...F, ...y]
1998
+ displayName: b,
1999
+ id: g,
2000
+ members: [...y, ...f]
2000
2001
  };
2001
2002
  } else
2002
- return Promise.resolve(p);
2003
- }), h = (await Promise.all(a)).map((p) => p.members).reduce((p, d) => [...p, ...d], []), l = {
2003
+ return Promise.resolve(d);
2004
+ }), h = (await Promise.all(a)).map((d) => d.members).reduce((d, b) => [...d, ...b], []), l = {
2004
2005
  name: e,
2005
2006
  members: [...i, ...o, ...h]
2006
- }, { id: E } = await this.http.postJson(
2007
+ }, { id: p } = await this.http.postJson(
2007
2008
  "/directory/sharebookmark",
2008
2009
  l
2009
2010
  );
2010
2011
  return {
2011
- id: E,
2012
+ id: p,
2012
2013
  displayName: e,
2013
2014
  members: l.members
2014
2015
  };
@@ -2295,7 +2296,7 @@ class RightService {
2295
2296
  return e.map((s) => this.parseResourceRight(s)).filter((s) => s !== void 0);
2296
2297
  }
2297
2298
  /**
2298
- * Check wether a user has the expected right for a ressource
2299
+ * Check wether a user has the expected right for a resource
2299
2300
  * @param user the userId and groupId concerned by the check
2300
2301
  * @param expect the expected right to check
2301
2302
  * @param rights array of Right for the resource
@@ -2892,83 +2893,85 @@ class ShareService {
2892
2893
  get cache() {
2893
2894
  return this.context.cache();
2894
2895
  }
2895
- async searchShareSubjects(e, t, s) {
2896
- const r = StringUtils.removeAccents(s).toLowerCase(), i = await this.cache.httpGetJson(
2897
- `/${e}/share/json/${t}?search=${s}`
2898
- ), o = i.users.visibles.filter(({ username: l, firstName: E, lastName: p, login: d }) => {
2896
+ async searchShareSubjects(e, t, s, r) {
2897
+ const i = StringUtils.removeAccents(s).toLowerCase(), o = await this.cache.httpGetJson(
2898
+ r || `/${e}/share/json/${t}?search=${s}`
2899
+ ), a = o.users.visibles.filter(({ username: p, firstName: d, lastName: b, login: E }) => {
2899
2900
  const g = StringUtils.removeAccents(
2900
- p || ""
2901
+ b || ""
2901
2902
  ).toLowerCase(), A = StringUtils.removeAccents(
2902
- E || ""
2903
+ d || ""
2903
2904
  ).toLowerCase(), f = StringUtils.removeAccents(
2904
- l || ""
2905
- ).toLowerCase(), y = StringUtils.removeAccents(d || "").toLowerCase();
2906
- return f.includes(r) || A.includes(r) || g.includes(r) || y.includes(r);
2907
- }).map((l) => ({
2908
- avatarUrl: this.directory.getAvatarUrl(l.id, "user"),
2909
- directoryUrl: this.directory.getDirectoryUrl(l.id, "user"),
2910
- displayName: l.username,
2911
- id: l.id,
2912
- profile: l.profile,
2905
+ p || ""
2906
+ ).toLowerCase(), y = StringUtils.removeAccents(E || "").toLowerCase();
2907
+ return f.includes(i) || A.includes(i) || g.includes(i) || y.includes(i);
2908
+ }).map((p) => ({
2909
+ avatarUrl: this.directory.getAvatarUrl(p.id, "user"),
2910
+ directoryUrl: this.directory.getDirectoryUrl(p.id, "user"),
2911
+ displayName: p.username,
2912
+ id: p.id,
2913
+ profile: p.profile,
2913
2914
  type: "user"
2914
- })), a = i.groups.visibles.filter(({ name: l }) => StringUtils.removeAccents(l || "").toLowerCase().includes(r)).map((l) => ({
2915
- avatarUrl: this.directory.getAvatarUrl(l.id, "group"),
2916
- directoryUrl: this.directory.getDirectoryUrl(l.id, "group"),
2917
- displayName: l.name,
2918
- id: l.id,
2915
+ })), c = o.groups.visibles.filter(({ name: p }) => StringUtils.removeAccents(p || "").toLowerCase().includes(i)).map((p) => ({
2916
+ avatarUrl: this.directory.getAvatarUrl(p.id, "group"),
2917
+ directoryUrl: this.directory.getDirectoryUrl(p.id, "group"),
2918
+ displayName: p.name,
2919
+ id: p.id,
2919
2920
  type: "group",
2920
- structureName: l.structureName
2921
+ structureName: p.structureName
2921
2922
  }));
2922
- return [...(await this.directory.getBookMarks()).filter(({ displayName: l }) => StringUtils.removeAccents(
2923
- l || ""
2924
- ).toLowerCase().includes(r)).map((l) => ({
2923
+ return [...(await this.directory.getBookMarks()).filter(({ displayName: p }) => StringUtils.removeAccents(
2924
+ p || ""
2925
+ ).toLowerCase().includes(i)).map((p) => ({
2925
2926
  avatarUrl: "",
2926
2927
  directoryUrl: "",
2927
2928
  profile: "",
2928
- displayName: l.displayName,
2929
- id: l.id,
2929
+ displayName: p.displayName,
2930
+ id: p.id,
2930
2931
  type: "sharebookmark"
2931
- })), ...o, ...a];
2932
+ })), ...a, ...c];
2932
2933
  }
2933
- async getShareMapping(e) {
2934
- const t = await this.cache.httpGetJson(
2935
- `/${e}/rights/sharing`
2934
+ async getShareMapping(e, t) {
2935
+ const s = await this.cache.httpGetJson(
2936
+ t || `/${e}/rights/sharing`
2936
2937
  );
2937
- for (const s of Object.keys(t))
2938
- if (s.includes(".")) {
2939
- const r = s.split(".")[1], i = t[s];
2940
- delete t[s], t[r] = i;
2938
+ for (const r of Object.keys(s))
2939
+ if (r.includes(".")) {
2940
+ const i = r.split(".")[1], o = s[r];
2941
+ delete s[r], s[i] = o;
2941
2942
  }
2942
- return t;
2943
+ return s;
2943
2944
  }
2944
2945
  getActionsAvailableFor({ id: e, type: t }, s, r) {
2945
2946
  const o = (t === "user" ? s.users.checked[e] : s.groups.checked[e]) || [], a = Object.keys(r), c = [];
2946
2947
  for (const h of a)
2947
2948
  r[h].filter(
2948
- (p) => o.includes(p)
2949
+ (d) => o.includes(d)
2949
2950
  ).length > 0 && c.push(h);
2950
2951
  return c;
2951
2952
  }
2952
- async getRightsForResource(e, t) {
2953
- const s = await this.directory.getBookMarks(), r = `/${e}/share/json/${t}?search=`, i = await this.cache.httpGetJson(r), o = await this.getShareMapping(e), a = await this.cache.httpGetJson(
2953
+ async getRightsForResource(e, t, s) {
2954
+ const r = await this.directory.getBookMarks(), i = `/${e}/share/json/${t}?search=`, o = await this.cache.httpGetJson(
2955
+ (s == null ? void 0 : s.getResourceRights) || i
2956
+ ), a = await this.getShareMapping(e, s == null ? void 0 : s.getShareMapping), c = await this.cache.httpGetJson(
2954
2957
  "/infra/public/json/sharing-rights.json"
2955
- ), c = Object.keys(i.users.checked).map((d) => i.users.visibles.find(
2956
- (A) => A.id === d
2957
- )).filter((d) => d !== void 0).map((d) => {
2958
+ ), h = Object.keys(o.users.checked).map((E) => o.users.visibles.find(
2959
+ (A) => A.id === E
2960
+ )).filter((E) => E !== void 0).map((E) => {
2958
2961
  const g = this.getActionsAvailableFor(
2959
- { id: d.id, type: "user" },
2960
- i,
2961
- o
2962
+ { id: E.id, type: "user" },
2963
+ o,
2964
+ a
2962
2965
  );
2963
2966
  return {
2964
- id: d.id,
2967
+ id: E.id,
2965
2968
  type: "user",
2966
- displayName: d.username,
2967
- profile: d.profile,
2968
- avatarUrl: this.directory.getAvatarUrl(d.id, "user"),
2969
- directoryUrl: this.directory.getDirectoryUrl(d.id, "user"),
2969
+ displayName: E.username,
2970
+ profile: E.profile,
2971
+ avatarUrl: this.directory.getAvatarUrl(E.id, "user"),
2972
+ directoryUrl: this.directory.getDirectoryUrl(E.id, "user"),
2970
2973
  actions: g.map((f) => {
2971
- const y = a[f];
2974
+ const y = c[f];
2972
2975
  return {
2973
2976
  displayName: f,
2974
2977
  id: f,
@@ -2976,23 +2979,23 @@ class ShareService {
2976
2979
  };
2977
2980
  })
2978
2981
  };
2979
- }).sort((d, g) => (d.displayName || "").localeCompare(g.displayName)), h = Object.keys(i.groups.checked).map((d) => i.groups.visibles.find(
2980
- (A) => A.id === d
2981
- )).filter((d) => d !== void 0).map((d) => {
2982
+ }).sort((E, g) => (E.displayName || "").localeCompare(g.displayName)), l = Object.keys(o.groups.checked).map((E) => o.groups.visibles.find(
2983
+ (A) => A.id === E
2984
+ )).filter((E) => E !== void 0).map((E) => {
2982
2985
  const g = this.getActionsAvailableFor(
2983
- { id: d.id, type: "group" },
2984
- i,
2985
- o
2986
+ { id: E.id, type: "group" },
2987
+ o,
2988
+ a
2986
2989
  );
2987
2990
  return {
2988
- id: d.id,
2991
+ id: E.id,
2989
2992
  type: "group",
2990
- displayName: d.name,
2993
+ displayName: E.name,
2991
2994
  profile: void 0,
2992
- avatarUrl: this.directory.getAvatarUrl(d.id, "group"),
2993
- directoryUrl: this.directory.getDirectoryUrl(d.id, "group"),
2995
+ avatarUrl: this.directory.getAvatarUrl(E.id, "group"),
2996
+ directoryUrl: this.directory.getDirectoryUrl(E.id, "group"),
2994
2997
  actions: g.map((f) => {
2995
- const y = a[f];
2998
+ const y = c[f];
2996
2999
  return {
2997
3000
  displayName: f,
2998
3001
  id: f,
@@ -3000,58 +3003,67 @@ class ShareService {
3000
3003
  };
3001
3004
  })
3002
3005
  };
3003
- }).sort((d, g) => (d.displayName || "").localeCompare(g.displayName)), l = [...c, ...h], E = i.groups.visibles.map(
3004
- ({ groupDisplayName: d, id: g, name: A, labels: f }) => ({
3006
+ }).sort((E, g) => (E.displayName || "").localeCompare(g.displayName)), p = [...h, ...l], d = o.groups.visibles.map(
3007
+ ({ groupDisplayName: E, id: g, name: A, labels: f }) => ({
3005
3008
  labels: f,
3006
- displayName: d || A,
3009
+ displayName: E || A,
3007
3010
  id: g
3008
3011
  })
3009
- ), p = i.users.visibles.map(
3010
- ({ id: d, profile: g, username: A, firstName: f, lastName: y, login: F }) => ({
3012
+ ), b = o.users.visibles.map(
3013
+ ({ id: E, profile: g, username: A, firstName: f, lastName: y, login: D }) => ({
3011
3014
  displayName: A,
3012
3015
  firstName: f,
3013
3016
  lastName: y,
3014
- login: F,
3017
+ login: D,
3015
3018
  profile: g,
3016
- id: d
3019
+ id: E
3017
3020
  })
3018
3021
  );
3019
3022
  return {
3020
- rights: l,
3021
- visibleBookmarks: s,
3022
- visibleGroups: E,
3023
- visibleUsers: p
3023
+ rights: p,
3024
+ visibleBookmarks: r,
3025
+ visibleGroups: d,
3026
+ visibleUsers: b
3024
3027
  };
3025
3028
  }
3026
- async saveRights(e, t, s) {
3027
- const r = await this.getShareMapping(e), i = {
3028
- bookmarks: {},
3029
+ async getPutSharePayload(e, t, s) {
3030
+ const r = {
3031
+ users: {},
3029
3032
  groups: {},
3030
- users: {}
3031
- };
3032
- for (const c of s) {
3033
- const h = c.actions.map((E) => r[E.id]).reduce((E, p) => Array.isArray(p) ? [...E, ...p] : E, []), l = [...new Set(h)];
3034
- l.length > 0 && (c.type === "user" ? i.users[c.id] = l : c.type === "group" ? i.groups[c.id] = l : i.bookmarks[c.id] = l);
3033
+ bookmarks: {}
3034
+ }, i = await this.getShareMapping(e, s);
3035
+ for (const o of t) {
3036
+ const a = o.actions.map((h) => i[h.id]).reduce((h, l) => Array.isArray(l) ? [...h, ...l] : h, []), c = [...new Set(a)];
3037
+ c.length > 0 && (o.type === "user" ? r.users[o.id] = c : o.type === "group" ? r.groups[o.id] = c : r.bookmarks[o.id] = c);
3035
3038
  }
3036
- const o = `/${e}/share/resource/${t}`;
3037
- return this.cache.clearCache(`/${e}/share/json/${t}?search=`), await this.http.putJson(o, i);
3039
+ return r;
3038
3040
  }
3039
- async getActionsForApp(e) {
3040
- const t = await this.cache.httpGetJson(
3041
+ async saveRights(e, t, s, r) {
3042
+ const i = await this.getPutSharePayload(
3043
+ e,
3044
+ s,
3045
+ r == null ? void 0 : r.getShareMapping
3046
+ ), o = (r == null ? void 0 : r.saveResourceRights) || `/${e}/share/resource/${t}`;
3047
+ return this.cache.clearCache(
3048
+ (r == null ? void 0 : r.getResourceRights) || `/${e}/share/json/${t}?search=`
3049
+ ), await this.http.putJson(o, i);
3050
+ }
3051
+ async getActionsForApp(e, t) {
3052
+ const s = await this.cache.httpGetJson(
3041
3053
  "/infra/public/json/sharing-rights.json"
3042
- ), s = await this.getShareMapping(e);
3043
- return Object.keys(t).map((i) => {
3044
- const o = t[i];
3054
+ ), r = await this.getShareMapping(e, t);
3055
+ return Object.keys(s).map((o) => {
3056
+ const a = s[o];
3045
3057
  return {
3046
- displayName: i,
3047
- id: i,
3048
- priority: o.priority,
3049
- requires: o.requires
3058
+ displayName: o,
3059
+ id: o,
3060
+ priority: a.priority,
3061
+ requires: a.requires
3050
3062
  };
3051
- }).filter((i) => {
3052
- var o;
3053
- return ((o = s[i.id]) == null ? void 0 : o.length) > 0;
3054
- }).sort((i, o) => i.priority - o.priority);
3063
+ }).filter((o) => {
3064
+ var a;
3065
+ return ((a = r[o.id]) == null ? void 0 : a.length) > 0;
3066
+ }).sort((o, a) => o.priority - a.priority);
3055
3067
  }
3056
3068
  }
3057
3069
  const defaultMappers = {
@@ -3088,11 +3100,11 @@ const defaultMappers = {
3088
3100
  zip: function({ type: u }) {
3089
3101
  return u.indexOf("zip") !== -1 || u.indexOf("rar") !== -1 || u.indexOf("tar") !== -1 || u.indexOf("7z") !== -1;
3090
3102
  }
3091
- }, C = class C {
3103
+ }, _ = class _ {
3092
3104
  /* Similar role notion as in infra-front > workspace > Model.ts */
3093
3105
  static getRole(e) {
3094
3106
  var t, s;
3095
- return C.role(
3107
+ return _.role(
3096
3108
  (t = e.metadata) == null ? void 0 : t["content-type"],
3097
3109
  !1,
3098
3110
  (s = e.metadata) == null ? void 0 : s.extension
@@ -3112,10 +3124,10 @@ const defaultMappers = {
3112
3124
  }
3113
3125
  };
3114
3126
  // FIXME add edumedia support
3115
- n(C, "roleMappers", [
3127
+ n(_, "roleMappers", [
3116
3128
  (e) => Object.keys(defaultMappers).find((s) => defaultMappers[s](e))
3117
3129
  ]);
3118
- let DocumentHelper = C;
3130
+ let DocumentHelper = _;
3119
3131
  class WorkspaceService {
3120
3132
  constructor(e) {
3121
3133
  this.context = e;
@@ -3371,8 +3383,8 @@ class AnalyticsService {
3371
3383
  if (!o || !o.LIBELLE_SERVICE || !r.UAI) return;
3372
3384
  function a(h) {
3373
3385
  let l = "";
3374
- for (let E = 0; E < h.length; E++)
3375
- l += h.charCodeAt(E);
3386
+ for (let p = 0; p < h.length; p++)
3387
+ l += h.charCodeAt(p);
3376
3388
  return l;
3377
3389
  }
3378
3390
  const c = {
@@ -3397,7 +3409,7 @@ class AnalyticsService {
3397
3409
  };
3398
3410
  }
3399
3411
  }
3400
- const R = class R {
3412
+ const C = class C {
3401
3413
  // in minutes. Applies to recorded videos.
3402
3414
  constructor(e) {
3403
3415
  this.context = e;
@@ -3418,8 +3430,8 @@ const R = class R {
3418
3430
  APP$4.VIDEO
3419
3431
  );
3420
3432
  return {
3421
- maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ?? R.MAX_WEIGHT,
3422
- maxDuration: (e == null ? void 0 : e["max-videoduration-minutes"]) ?? R.MAX_DURATION,
3433
+ maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ?? C.MAX_WEIGHT,
3434
+ maxDuration: (e == null ? void 0 : e["max-videoduration-minutes"]) ?? C.MAX_DURATION,
3423
3435
  acceptVideoUploadExtensions: ((t = e == null ? void 0 : e["accept-videoupload-extensions"]) == null ? void 0 : t.map(
3424
3436
  (s) => s.toUpperCase()
3425
3437
  )) ?? []
@@ -3452,33 +3464,33 @@ const R = class R {
3452
3464
  if (c.state == "running") {
3453
3465
  let h = 0, l = 1;
3454
3466
  do {
3455
- const E = l + h;
3467
+ const p = l + h;
3456
3468
  await new Promise(
3457
- (d) => setTimeout(d, E * 1e3)
3458
- ), h = l, l = Math.min(8, E);
3459
- const p = await this.http.get(
3469
+ (b) => setTimeout(b, p * 1e3)
3470
+ ), h = l, l = Math.min(8, p);
3471
+ const d = await this.http.get(
3460
3472
  `/video/status/${c.processid}`
3461
3473
  );
3462
- if (p.state == "succeed")
3463
- return p.videoworkspaceid && p.videosize && this.context.data().trackVideoSave(
3464
- p.videoworkspaceid,
3474
+ if (d.state == "succeed")
3475
+ return d.videoworkspaceid && d.videosize && this.context.data().trackVideoSave(
3476
+ d.videoworkspaceid,
3465
3477
  Math.round(r),
3466
- p.videosize,
3478
+ d.videosize,
3467
3479
  s,
3468
3480
  e.url,
3469
3481
  i,
3470
3482
  e.device
3471
- ), p;
3472
- if (p.state == "error")
3483
+ ), d;
3484
+ if (d.state == "error")
3473
3485
  break;
3474
3486
  } while (!0);
3475
3487
  }
3476
3488
  throw new Error("Video cannot be uploaded.");
3477
3489
  }
3478
3490
  };
3479
- n(R, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
3480
- n(R, "MAX_DURATION", 3);
3481
- let VideoService = R;
3491
+ n(C, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
3492
+ n(C, "MAX_DURATION", 3);
3493
+ let VideoService = C;
3482
3494
  class EmbedderService {
3483
3495
  constructor(e) {
3484
3496
  this.context = e;
@@ -3555,10 +3567,10 @@ class EmbedderService {
3555
3567
  let l = t.split(c)[1];
3556
3568
  if (!l)
3557
3569
  continue;
3558
- const E = s.split(a)[1].split("{")[0];
3559
- E && (l = l.split(E)[0]);
3560
- const p = new RegExp("\\" + a.replace(/}/, "\\}"), "g");
3561
- o = o.replace(p, l);
3570
+ const p = s.split(a)[1].split("{")[0];
3571
+ p && (l = l.split(p)[0]);
3572
+ const d = new RegExp("\\" + a.replace(/}/, "\\}"), "g");
3573
+ o = o.replace(d, l);
3562
3574
  }
3563
3575
  return o;
3564
3576
  }
@@ -4574,8 +4586,8 @@ class WidgetFramework {
4574
4586
  });
4575
4587
  const o = new Idiom();
4576
4588
  this._widgets = this._widgets.sort((c, h) => {
4577
- const l = o.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(), E = o.translate(`timeline.settings.${h.platformConf.name}`).toLowerCase();
4578
- return l < E ? -1 : l > E ? 1 : 0;
4589
+ const l = o.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(), p = o.translate(`timeline.settings.${h.platformConf.name}`).toLowerCase();
4590
+ return l < p ? -1 : l > p ? 1 : 0;
4579
4591
  });
4580
4592
  });
4581
4593
  }
@@ -25,7 +25,7 @@ export declare class RightService {
25
25
  */
26
26
  parseResourceRights(rights: RightStringified[]): ResourceRight[];
27
27
  /**
28
- * Check wether a user has the expected right for a ressource
28
+ * Check wether a user has the expected right for a resource
29
29
  * @param user the userId and groupId concerned by the check
30
30
  * @param expect the expected right to check
31
31
  * @param rights array of Right for the resource
@@ -1,18 +1,19 @@
1
1
  import { IOdeServices } from '../services/OdeServices';
2
- import { GetResourceRightPayload, PutShareResponse, ShareMapping, ShareRight, ShareRightAction, ShareRightActionDisplayName, ShareRightWithVisibles, ShareSubject } from './interface';
2
+ import { GetResourceRightPayload, PutSharePayload, PutShareResponse, ShareMapping, ShareRight, ShareRightAction, ShareRightActionDisplayName, ShareRightWithVisibles, ShareSubject, ShareUrls } from './interface';
3
3
  export declare class ShareService {
4
4
  protected context: IOdeServices;
5
5
  constructor(context: IOdeServices);
6
6
  get directory(): import('../directory/Service').DirectoryService;
7
7
  get http(): import('../transport/Service').HttpService;
8
8
  get cache(): import('../cache/Service').CacheService;
9
- searchShareSubjects(app: string, resourceId: string, searchText: string): Promise<ShareSubject[]>;
10
- getShareMapping(app: string): Promise<ShareMapping>;
9
+ searchShareSubjects(app: string, resourceId: string, searchText: string, urlResourceRights?: string): Promise<ShareSubject[]>;
10
+ getShareMapping(app: string, urlShareMapping?: string): Promise<ShareMapping>;
11
11
  getActionsAvailableFor({ id, type }: {
12
12
  id: string;
13
13
  type: 'user' | 'group';
14
14
  }, payload: GetResourceRightPayload, mapping: ShareMapping): ShareRightActionDisplayName[];
15
- getRightsForResource(app: string, resourceId: string): Promise<ShareRightWithVisibles>;
16
- saveRights(app: string, resourceId: string, rights: ShareRight[]): Promise<PutShareResponse>;
17
- getActionsForApp(app: string): Promise<ShareRightAction[]>;
15
+ getRightsForResource(app: string, resourceId: string, urls?: ShareUrls): Promise<ShareRightWithVisibles>;
16
+ getPutSharePayload(app: string, rights: ShareRight[], urlGetShareMapping?: string): Promise<PutSharePayload>;
17
+ saveRights(app: string, resourceId: string, rights: ShareRight[], urls?: ShareUrls): Promise<PutShareResponse>;
18
+ getActionsForApp(app: string, urlShareMapping?: string): Promise<ShareRightAction[]>;
18
19
  }