@beam3_dev/api_module 0.0.39 → 0.0.41
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/wb3Api.js +337 -328
- package/dist/wb3Api.umd.cjs +5 -5
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
2
|
import { DateTime as b } from "luxon";
|
|
3
|
-
import { requirejs as O, widget as
|
|
3
|
+
import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function j() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
@@ -34,10 +34,10 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
38
|
-
const
|
|
37
|
+
async function oe(e, t = void 0, n = void 0) {
|
|
38
|
+
const s = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
|
-
"https://apicarto.ign.fr/api/codes-postaux/communes/" +
|
|
40
|
+
"https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
|
|
41
41
|
{
|
|
42
42
|
method: "GET",
|
|
43
43
|
headers: {
|
|
@@ -47,10 +47,10 @@ async function re(e, t = void 0, s = void 0) {
|
|
|
47
47
|
).then((i) => i.json()).then((i) => {
|
|
48
48
|
t && t(i);
|
|
49
49
|
}).catch((i) => {
|
|
50
|
-
|
|
50
|
+
n && n(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function re(e, t = void 0, n = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -59,19 +59,19 @@ async function ce(e, t = void 0, s = void 0) {
|
|
|
59
59
|
Accept: "application/json"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
).then((
|
|
63
|
-
t && t(
|
|
64
|
-
}).catch((
|
|
65
|
-
|
|
62
|
+
).then((s) => s.json()).then((s) => {
|
|
63
|
+
t && t(s);
|
|
64
|
+
}).catch((s) => {
|
|
65
|
+
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
69
|
-
let
|
|
70
|
-
const
|
|
68
|
+
async function ce(e, t = L) {
|
|
69
|
+
let n = b.now().year;
|
|
70
|
+
const s = e, i = [], c = (a) => {
|
|
71
71
|
for (let r in a)
|
|
72
72
|
i.push({ date: r, comment: a[r] });
|
|
73
73
|
};
|
|
74
|
-
for (let a =
|
|
74
|
+
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
76
76
|
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
|
|
77
77
|
{
|
|
@@ -84,9 +84,9 @@ async function de(e, t = L) {
|
|
|
84
84
|
c(r);
|
|
85
85
|
}).catch((r) => console.error("Erreur : " + r));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
89
|
+
} : s;
|
|
90
90
|
for (let r of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
92
|
(l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
|
|
@@ -100,43 +100,43 @@ async function de(e, t = L) {
|
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
async function de(e, t, n = !0) {
|
|
104
|
+
const s = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
|
-
O(["DS/WAFData/WAFData"], (
|
|
109
|
-
|
|
108
|
+
O(["DS/WAFData/WAFData"], (n) => {
|
|
109
|
+
n.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
114
|
-
|
|
112
|
+
function le(e, t, n) {
|
|
113
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
114
|
+
s.draggable(e, { data: t, start: n });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
widgetId:
|
|
117
|
+
function pe(e, t = void 0) {
|
|
118
|
+
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
119
|
+
let s;
|
|
120
|
+
s === void 0 && (s = n.createProxy({
|
|
121
|
+
widgetId: A.id,
|
|
122
122
|
filteringMode: "WithFilteringServices"
|
|
123
|
-
}), t !== void 0 &&
|
|
123
|
+
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
128
|
-
|
|
126
|
+
function ue(e, t) {
|
|
127
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
128
|
+
n.droppable(e, { drop: t });
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
async function
|
|
131
|
+
async function fe(e, t = void 0, n = void 0) {
|
|
132
132
|
O(
|
|
133
133
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
|
-
(
|
|
135
|
-
(!e || e === "") && (e =
|
|
136
|
-
|
|
134
|
+
(s) => {
|
|
135
|
+
(!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
136
|
+
s.getPlatformServices({
|
|
137
137
|
platformId: e,
|
|
138
138
|
onComplete: t,
|
|
139
|
-
onFailure:
|
|
139
|
+
onFailure: n
|
|
140
140
|
})
|
|
141
141
|
);
|
|
142
142
|
}
|
|
@@ -145,24 +145,24 @@ async function J(e, t = void 0, s = void 0) {
|
|
|
145
145
|
function me() {
|
|
146
146
|
let e = {};
|
|
147
147
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const
|
|
148
|
+
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
|
-
tenant:
|
|
153
|
-
user:
|
|
152
|
+
tenant: n,
|
|
153
|
+
user: s,
|
|
154
154
|
appsConfiguration: i,
|
|
155
155
|
appConf: c
|
|
156
156
|
};
|
|
157
157
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
158
158
|
}
|
|
159
|
-
function ge(e, t,
|
|
160
|
-
const
|
|
159
|
+
function ge(e, t, n) {
|
|
160
|
+
const s = {
|
|
161
161
|
base: `${e.space}`,
|
|
162
162
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
163
163
|
option: `?filter=${e.tenant}`
|
|
164
164
|
// facultatif
|
|
165
|
-
}, i = `${
|
|
165
|
+
}, i = `${s.base}${s.uri}${s.option}`;
|
|
166
166
|
f(i, {
|
|
167
167
|
method: "GET",
|
|
168
168
|
headers: {
|
|
@@ -178,33 +178,33 @@ function ge(e, t, s) {
|
|
|
178
178
|
},
|
|
179
179
|
onFailure(c, o) {
|
|
180
180
|
const a = c;
|
|
181
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
181
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function he(e, t = void 0,
|
|
186
|
-
let
|
|
187
|
-
f(
|
|
185
|
+
function he(e, t = void 0, n = void 0) {
|
|
186
|
+
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
|
+
f(s, {
|
|
188
188
|
onComplete(i, c, o) {
|
|
189
189
|
const a = JSON.parse(i);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
192
|
onFailure(i, c) {
|
|
193
193
|
const o = i;
|
|
194
|
-
o.msg = c.errormsg, o.errCode = c.errorcode,
|
|
194
|
+
o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function Se(e, t,
|
|
198
|
+
function Se(e, t, n = void 0, s = void 0) {
|
|
199
199
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
200
|
f(i, {
|
|
201
201
|
onComplete(c, o, a) {
|
|
202
202
|
const r = JSON.parse(c);
|
|
203
|
-
|
|
203
|
+
n && n(r);
|
|
204
204
|
},
|
|
205
205
|
onFailure(c, o) {
|
|
206
206
|
const a = c;
|
|
207
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
207
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -212,7 +212,7 @@ const U = {
|
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
|
-
function
|
|
215
|
+
function _e(e, t, n = void 0, s = void 0) {
|
|
216
216
|
const { space: i, currentUser: c } = e, a = `${i}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
218
|
}.URIUGr}`, r = {
|
|
@@ -232,16 +232,16 @@ function ye(e, t, s = void 0, n = void 0) {
|
|
|
232
232
|
headers: U,
|
|
233
233
|
data: JSON.stringify(r),
|
|
234
234
|
onComplete(d) {
|
|
235
|
-
|
|
235
|
+
n && n(JSON.parse(d));
|
|
236
236
|
},
|
|
237
237
|
onFailure(d, l) {
|
|
238
238
|
console.log(d);
|
|
239
239
|
const p = d;
|
|
240
|
-
p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p),
|
|
240
|
+
p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function ye(e, t, n = void 0, s = void 0) {
|
|
245
245
|
const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
|
|
246
246
|
f(d, {
|
|
247
247
|
opts: {
|
|
@@ -252,16 +252,16 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
onComplete(u) {
|
|
255
|
-
|
|
255
|
+
n && n(JSON.parse(u));
|
|
256
256
|
},
|
|
257
257
|
onFailure(u, m) {
|
|
258
258
|
const g = u;
|
|
259
|
-
g.msg = m.errormsg, g.errCode = m.errorcode,
|
|
259
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const { space:
|
|
263
|
+
function J(e, t = void 0, n = void 0) {
|
|
264
|
+
const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
267
|
}, d = `${c}${o}${a}`;
|
|
@@ -272,12 +272,12 @@ function E(e, t = void 0, s = void 0) {
|
|
|
272
272
|
},
|
|
273
273
|
onFailure(l, p) {
|
|
274
274
|
const u = l;
|
|
275
|
-
u.msg = p.errormsg, u.errCode = p.errorcode,
|
|
275
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
function we(e, t = void 0,
|
|
280
|
-
const { space:
|
|
279
|
+
function we(e, t = void 0, n = void 0) {
|
|
280
|
+
const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
281
281
|
"Content-Type": "application/json",
|
|
282
282
|
Accept: "application/json,text/javascript,*/*"
|
|
283
283
|
} };
|
|
@@ -287,20 +287,20 @@ function we(e, t = void 0, s = void 0) {
|
|
|
287
287
|
onComplete(l) {
|
|
288
288
|
const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
289
289
|
if (i && Object.keys(i).length > 0) {
|
|
290
|
-
const g = m.filter((
|
|
291
|
-
u.iam = S, u.UG = m, u.iamMember = h,
|
|
290
|
+
const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
|
|
291
|
+
u.iam = S, u.UG = m, u.iamMember = h, J(
|
|
292
292
|
e,
|
|
293
|
-
(
|
|
294
|
-
u.rules =
|
|
293
|
+
(_) => {
|
|
294
|
+
u.rules = _, t && t(u);
|
|
295
295
|
},
|
|
296
|
-
(
|
|
297
|
-
|
|
296
|
+
(_) => {
|
|
297
|
+
n && n(_);
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
},
|
|
302
302
|
onFailure(l) {
|
|
303
|
-
|
|
303
|
+
n && n(l);
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
} catch (l) {
|
|
@@ -308,12 +308,12 @@ function we(e, t = void 0, s = void 0) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function Te(e, t) {
|
|
311
|
-
const { space:
|
|
311
|
+
const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
312
|
f(i, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function Ce(e, t,
|
|
316
|
+
function Ce(e, t, n, s = void 0, i = void 0) {
|
|
317
317
|
const { space: c, tenant: o } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -322,36 +322,36 @@ function Ce(e, t, s, n = void 0, i = void 0) {
|
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
324
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
325
|
-
}, r =
|
|
325
|
+
}, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
|
|
326
326
|
f(d, {
|
|
327
327
|
headers: U,
|
|
328
328
|
method: "PATCH",
|
|
329
329
|
data: l,
|
|
330
330
|
type: "json",
|
|
331
331
|
onComplete(p) {
|
|
332
|
-
|
|
332
|
+
s && s(p);
|
|
333
333
|
},
|
|
334
334
|
onFailure(p) {
|
|
335
335
|
i && i(p);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function Oe(e, t,
|
|
339
|
+
function Oe(e, t, n, s = void 0, i = void 0) {
|
|
340
340
|
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
f(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: U,
|
|
344
|
-
data: JSON.stringify(
|
|
344
|
+
data: JSON.stringify(n),
|
|
345
345
|
type: "json",
|
|
346
346
|
onComplete(d) {
|
|
347
|
-
|
|
347
|
+
s && s(d);
|
|
348
348
|
},
|
|
349
349
|
onFailure(d) {
|
|
350
350
|
i && i(d);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function Ne(e, t,
|
|
354
|
+
function Ne(e, t, n = void 0, s = void 0) {
|
|
355
355
|
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
356
|
f(o, {
|
|
357
357
|
opts: {
|
|
@@ -362,14 +362,14 @@ function Ne(e, t, s = void 0, n = void 0) {
|
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
onComplete(d) {
|
|
365
|
-
|
|
365
|
+
n && n(JSON.parse(d));
|
|
366
366
|
},
|
|
367
367
|
onFailure(d) {
|
|
368
|
-
|
|
368
|
+
s && s(d);
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
async function
|
|
372
|
+
async function E(e, t = void 0, n = void 0, s = void 0) {
|
|
373
373
|
const i = e.space;
|
|
374
374
|
if (t === void 0) {
|
|
375
375
|
console.log("Le paramètre docid est obligatoire");
|
|
@@ -379,44 +379,44 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
|
|
|
379
379
|
f(c, {
|
|
380
380
|
onComplete(o, a, r) {
|
|
381
381
|
const d = JSON.parse(o);
|
|
382
|
-
|
|
382
|
+
n && n(d);
|
|
383
383
|
},
|
|
384
384
|
onFailure(o) {
|
|
385
|
-
|
|
385
|
+
s && s(o);
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
388
|
}
|
|
389
|
-
function F(e, t = void 0,
|
|
389
|
+
function F(e, t = void 0, n = void 0) {
|
|
390
390
|
if (e.objID && e.objID !== "") {
|
|
391
|
-
let
|
|
392
|
-
f(
|
|
391
|
+
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
392
|
+
f(s, {
|
|
393
393
|
onComplete(i, c, o) {
|
|
394
394
|
const a = JSON.parse(i);
|
|
395
|
-
e.token = a
|
|
395
|
+
console.log("info => ", a), e.token = a?.csrf?.value, t && t(e);
|
|
396
396
|
},
|
|
397
397
|
onFailure(i) {
|
|
398
|
-
|
|
398
|
+
n && n(i);
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
402
402
|
C(e);
|
|
403
403
|
}
|
|
404
|
-
function C(e, t = void 0,
|
|
404
|
+
function C(e, t = void 0, n = void 0) {
|
|
405
405
|
if (e.space) {
|
|
406
|
-
const
|
|
407
|
-
f(
|
|
406
|
+
const s = e.space + "/resources/v1/application/CSRF";
|
|
407
|
+
f(s, {
|
|
408
408
|
onComplete(i, c, o) {
|
|
409
409
|
const a = JSON.parse(i);
|
|
410
410
|
t && t(a.csrf.value);
|
|
411
411
|
},
|
|
412
412
|
onFailure(i, c, o) {
|
|
413
|
-
|
|
413
|
+
n && n({ response: i, headers: c, xhr: o });
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
} else
|
|
417
|
-
|
|
417
|
+
n && n("ERROR : url du 3DSpace non défini.");
|
|
418
418
|
}
|
|
419
|
-
function $(e, t,
|
|
419
|
+
function $(e, t, n = void 0, s = void 0) {
|
|
420
420
|
let i = e.space + `/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
421
421
|
F(
|
|
422
422
|
e,
|
|
@@ -432,31 +432,31 @@ function $(e, t, s = void 0, n = void 0) {
|
|
|
432
432
|
if (a.success === !0)
|
|
433
433
|
try {
|
|
434
434
|
const r = a.data[0].dataelements.ticketURL;
|
|
435
|
-
s && s(r);
|
|
436
|
-
} catch (r) {
|
|
437
435
|
n && n(r);
|
|
436
|
+
} catch (r) {
|
|
437
|
+
s && s(r);
|
|
438
438
|
}
|
|
439
439
|
},
|
|
440
440
|
onFailure(o, a) {
|
|
441
|
-
console.log("☠️ error => ", o, a),
|
|
441
|
+
console.log("☠️ error => ", o, a), s && s(o, a);
|
|
442
442
|
}
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
);
|
|
446
446
|
}
|
|
447
|
-
function be(e, t,
|
|
447
|
+
function be(e, t, n, s = void 0, i = void 0) {
|
|
448
448
|
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
449
449
|
f(c, {
|
|
450
450
|
method: "PUT",
|
|
451
451
|
headers: {
|
|
452
|
-
ENO_CSRF_TOKEN:
|
|
452
|
+
ENO_CSRF_TOKEN: n
|
|
453
453
|
},
|
|
454
454
|
onComplete(o) {
|
|
455
455
|
let a = JSON.parse(o);
|
|
456
456
|
if (a.success === !0)
|
|
457
457
|
try {
|
|
458
458
|
const r = a.data[0].dataelements.ticketURL;
|
|
459
|
-
|
|
459
|
+
s && s(r);
|
|
460
460
|
} catch (r) {
|
|
461
461
|
i && i(r);
|
|
462
462
|
}
|
|
@@ -466,16 +466,16 @@ function be(e, t, s, n = void 0, i = void 0) {
|
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function G(e, t, n, s, i, c = void 0, o = void 0) {
|
|
470
470
|
F(
|
|
471
471
|
e,
|
|
472
472
|
t,
|
|
473
473
|
(a) => {
|
|
474
|
-
|
|
474
|
+
K(
|
|
475
475
|
e,
|
|
476
476
|
t,
|
|
477
|
-
s,
|
|
478
477
|
n,
|
|
478
|
+
s,
|
|
479
479
|
i,
|
|
480
480
|
a.csrf.value,
|
|
481
481
|
c,
|
|
@@ -484,7 +484,7 @@ function K(e, t, s, n, i, c = void 0, o = void 0) {
|
|
|
484
484
|
}
|
|
485
485
|
);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function K(e, t, n, s, i, c, o = void 0, a = void 0) {
|
|
488
488
|
const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
489
489
|
f(r, {
|
|
490
490
|
method: "PUT",
|
|
@@ -493,10 +493,10 @@ function W(e, t, s, n, i, c, o = void 0, a = void 0) {
|
|
|
493
493
|
},
|
|
494
494
|
onComplete(d, l, p) {
|
|
495
495
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
496
|
-
m.append("__fcs__jobTicket", u.ticket), m.append("file_0",
|
|
496
|
+
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, i);
|
|
497
497
|
const g = {};
|
|
498
498
|
g.method = "POST", g.data = m, g.onComplete = function(h) {
|
|
499
|
-
let S = "temp_" + Date.now(),
|
|
499
|
+
let S = "temp_" + Date.now(), _ = {
|
|
500
500
|
method: "PUT",
|
|
501
501
|
headers: {
|
|
502
502
|
ENO_CSRF_TOKEN: c
|
|
@@ -508,7 +508,7 @@ function W(e, t, s, n, i, c, o = void 0, a = void 0) {
|
|
|
508
508
|
relateddata: {
|
|
509
509
|
files: [
|
|
510
510
|
{
|
|
511
|
-
id:
|
|
511
|
+
id: n,
|
|
512
512
|
dataelements: {
|
|
513
513
|
title: i,
|
|
514
514
|
receipt: h
|
|
@@ -522,16 +522,16 @@ function W(e, t, s, n, i, c, o = void 0, a = void 0) {
|
|
|
522
522
|
]
|
|
523
523
|
}),
|
|
524
524
|
type: "json",
|
|
525
|
-
onComplete(
|
|
526
|
-
o && o(
|
|
525
|
+
onComplete(y) {
|
|
526
|
+
o && o(y);
|
|
527
527
|
},
|
|
528
|
-
onFailure(
|
|
529
|
-
a && a(
|
|
528
|
+
onFailure(y) {
|
|
529
|
+
a && a(y);
|
|
530
530
|
}
|
|
531
531
|
};
|
|
532
532
|
f(
|
|
533
533
|
e.space + "/resources/v1/modeler/documents",
|
|
534
|
-
|
|
534
|
+
_
|
|
535
535
|
);
|
|
536
536
|
}, g.onFailure = function(h) {
|
|
537
537
|
a && a(h);
|
|
@@ -539,7 +539,7 @@ function W(e, t, s, n, i, c, o = void 0, a = void 0) {
|
|
|
539
539
|
}
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
async function Fe(e, t,
|
|
542
|
+
async function Fe(e, t, n, s, i = void 0, c = void 0) {
|
|
543
543
|
const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
544
544
|
type: "text/plain"
|
|
545
545
|
}), p = {
|
|
@@ -557,7 +557,7 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
|
|
|
557
557
|
},
|
|
558
558
|
onComplete(u, m, g) {
|
|
559
559
|
const h = JSON.parse(u).data[0].dataelements;
|
|
560
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
560
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
|
|
561
561
|
const S = {
|
|
562
562
|
method: "POST",
|
|
563
563
|
data: d,
|
|
@@ -575,15 +575,15 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
|
|
|
575
575
|
{
|
|
576
576
|
type: "Document",
|
|
577
577
|
dataelements: {
|
|
578
|
-
title: `Title_${
|
|
578
|
+
title: `Title_${n.toLowerCase().split(" ").join("_")}`,
|
|
579
579
|
policy: "Document Release",
|
|
580
|
-
description:
|
|
580
|
+
description: s
|
|
581
581
|
},
|
|
582
582
|
relateddata: {
|
|
583
583
|
files: [
|
|
584
584
|
{
|
|
585
585
|
dataelements: {
|
|
586
|
-
title: `${
|
|
586
|
+
title: `${n}.json`,
|
|
587
587
|
receipt: T
|
|
588
588
|
}
|
|
589
589
|
}
|
|
@@ -595,19 +595,19 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
|
|
|
595
595
|
}),
|
|
596
596
|
type: "json",
|
|
597
597
|
timeout: 0,
|
|
598
|
-
onComplete:
|
|
599
|
-
onFailure:
|
|
598
|
+
onComplete: _,
|
|
599
|
+
onFailure: y
|
|
600
600
|
};
|
|
601
601
|
r !== "" && f(p.url_Post, k);
|
|
602
602
|
} else
|
|
603
603
|
console.warn("le store est vide");
|
|
604
604
|
},
|
|
605
|
-
onFailure:
|
|
605
|
+
onFailure: y
|
|
606
606
|
};
|
|
607
|
-
function
|
|
607
|
+
function _(T) {
|
|
608
608
|
console.log("Success -- response ", T.data[0]), i && i(T);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function y(T, k) {
|
|
611
611
|
console.log("Erreur -- response ", T, `
|
|
612
612
|
headers `, k), c && c(T);
|
|
613
613
|
}
|
|
@@ -615,7 +615,7 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
|
|
|
615
615
|
}
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
|
-
function N(e, t = void 0,
|
|
618
|
+
function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
|
|
619
619
|
const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
620
620
|
f(o, {
|
|
621
621
|
method: "GET",
|
|
@@ -628,26 +628,26 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0) {
|
|
|
628
628
|
l = t;
|
|
629
629
|
let g = m.couples;
|
|
630
630
|
g = g.filter(
|
|
631
|
-
(h, S,
|
|
632
|
-
(
|
|
631
|
+
(h, S, _) => S === _.findIndex(
|
|
632
|
+
(y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
|
|
633
633
|
)
|
|
634
|
-
),
|
|
634
|
+
), n && (Array.isArray(n) ? n.forEach((h) => {
|
|
635
635
|
u || g.forEach((S) => {
|
|
636
|
-
if (h === S.role.name &&
|
|
637
|
-
u = h, p =
|
|
636
|
+
if (h === S.role.name && s === S.organization.title)
|
|
637
|
+
u = h, p = s;
|
|
638
638
|
else if (h === S.role.name) {
|
|
639
|
-
let
|
|
640
|
-
(
|
|
639
|
+
let _ = g.filter(
|
|
640
|
+
(y) => y.role.name === h
|
|
641
641
|
);
|
|
642
|
-
|
|
642
|
+
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : c(_);
|
|
643
643
|
}
|
|
644
644
|
});
|
|
645
645
|
}) : g.forEach((h) => {
|
|
646
|
-
if (
|
|
647
|
-
u =
|
|
648
|
-
else if (
|
|
646
|
+
if (n === h.role.name && s === h.organization.title)
|
|
647
|
+
u = n, p = s;
|
|
648
|
+
else if (n === h.role.name) {
|
|
649
649
|
let S = g.filter(
|
|
650
|
-
(
|
|
650
|
+
(_) => _.role.name === n
|
|
651
651
|
);
|
|
652
652
|
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
|
|
653
653
|
}
|
|
@@ -661,51 +661,60 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0) {
|
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
|
-
async function I(e, t
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
664
|
+
async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
665
|
+
const i = e.objID;
|
|
666
|
+
(i === void 0 || i === "") && console.warn(
|
|
667
|
+
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
668
|
+
), (e.space === "" || !e.space) && console.warn(
|
|
669
|
+
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
670
|
+
);
|
|
671
|
+
try {
|
|
672
|
+
$(
|
|
673
|
+
e,
|
|
674
|
+
i,
|
|
675
|
+
(c) => {
|
|
676
|
+
f(c, {
|
|
671
677
|
headers: {
|
|
672
678
|
ENO_CSRF_TOKEN: e.token
|
|
673
679
|
},
|
|
674
|
-
onComplete(
|
|
675
|
-
|
|
680
|
+
onComplete(o) {
|
|
681
|
+
const a = JSON.parse(o);
|
|
682
|
+
t && t(a);
|
|
676
683
|
},
|
|
677
|
-
onFailure(a) {
|
|
678
|
-
n && (console.log("error http",
|
|
684
|
+
onFailure(o, a, r) {
|
|
685
|
+
n && (console.log("error http", o), n({ error: o, headers: a, xhr: r }));
|
|
679
686
|
}
|
|
680
687
|
});
|
|
681
688
|
},
|
|
682
|
-
(
|
|
683
|
-
n && n(
|
|
689
|
+
(c) => {
|
|
690
|
+
n && n(c), console.log("*_3dspace_download_doc / error file URL *", c);
|
|
684
691
|
}
|
|
685
692
|
);
|
|
686
|
-
})
|
|
693
|
+
} catch (c) {
|
|
694
|
+
console.log("*_3dspace_download_doc / error file URL *", c);
|
|
695
|
+
}
|
|
687
696
|
}
|
|
688
|
-
async function
|
|
697
|
+
async function W(e, t, n = void 0, s = void 0) {
|
|
689
698
|
let i = [];
|
|
690
699
|
for (let a = 0; a < t.length; a += 80) {
|
|
691
700
|
const r = t.slice(a, a + 80);
|
|
692
701
|
i.push(r);
|
|
693
702
|
}
|
|
694
703
|
const o = (a) => {
|
|
695
|
-
|
|
704
|
+
X(
|
|
696
705
|
e,
|
|
697
706
|
i[a],
|
|
698
707
|
() => {
|
|
699
708
|
a++, a < i.length && o(a);
|
|
700
709
|
},
|
|
701
710
|
(r) => {
|
|
702
|
-
|
|
711
|
+
n && n(r);
|
|
703
712
|
}
|
|
704
713
|
);
|
|
705
714
|
};
|
|
706
715
|
o(0);
|
|
707
716
|
}
|
|
708
|
-
function
|
|
717
|
+
function X(e, t, n = void 0, s = void 0, i = void 0) {
|
|
709
718
|
const c = [];
|
|
710
719
|
t.forEach((r) => {
|
|
711
720
|
c.push({
|
|
@@ -726,12 +735,12 @@ function V(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
726
735
|
type: "json",
|
|
727
736
|
onComplete(r) {
|
|
728
737
|
const d = r.data;
|
|
729
|
-
r.success === !0 && (
|
|
738
|
+
r.success === !0 && (n && n(), d.forEach((l) => {
|
|
730
739
|
try {
|
|
731
740
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
732
741
|
f(u, {
|
|
733
742
|
onComplete: (m) => {
|
|
734
|
-
|
|
743
|
+
s && s({
|
|
735
744
|
objectId: l.id,
|
|
736
745
|
fileName: p,
|
|
737
746
|
data: JSON.parse(m)
|
|
@@ -751,7 +760,7 @@ function V(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
751
760
|
}
|
|
752
761
|
});
|
|
753
762
|
}
|
|
754
|
-
function ke(e, t,
|
|
763
|
+
function ke(e, t, n = void 0, s = void 0) {
|
|
755
764
|
return new Promise((i) => {
|
|
756
765
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
757
766
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
@@ -782,17 +791,17 @@ function ke(e, t, s = void 0, n = void 0) {
|
|
|
782
791
|
}),
|
|
783
792
|
type: "json",
|
|
784
793
|
onComplete(a) {
|
|
785
|
-
|
|
794
|
+
n && n(a);
|
|
786
795
|
},
|
|
787
796
|
onFailure(a) {
|
|
788
|
-
|
|
797
|
+
s && s(a);
|
|
789
798
|
}
|
|
790
799
|
};
|
|
791
800
|
f(c, o);
|
|
792
801
|
}
|
|
793
802
|
});
|
|
794
803
|
}
|
|
795
|
-
function Ue(e, t,
|
|
804
|
+
function Ue(e, t, n, s = void 0, i = void 0) {
|
|
796
805
|
return new Promise((c) => {
|
|
797
806
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
798
807
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -818,13 +827,13 @@ function Ue(e, t, s, n = void 0, i = void 0) {
|
|
|
818
827
|
data: [
|
|
819
828
|
{
|
|
820
829
|
id: t,
|
|
821
|
-
nextState:
|
|
830
|
+
nextState: n
|
|
822
831
|
}
|
|
823
832
|
]
|
|
824
833
|
}),
|
|
825
834
|
type: "json",
|
|
826
835
|
onComplete(r) {
|
|
827
|
-
|
|
836
|
+
s && s(r);
|
|
828
837
|
},
|
|
829
838
|
onFailure(r) {
|
|
830
839
|
i && i(r);
|
|
@@ -834,7 +843,7 @@ function Ue(e, t, s, n = void 0, i = void 0) {
|
|
|
834
843
|
}
|
|
835
844
|
});
|
|
836
845
|
}
|
|
837
|
-
function $e(e, t,
|
|
846
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
838
847
|
return new Promise((i) => {
|
|
839
848
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
840
849
|
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
@@ -865,17 +874,17 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
865
874
|
}),
|
|
866
875
|
type: "json",
|
|
867
876
|
onComplete(a) {
|
|
868
|
-
|
|
877
|
+
n && n(a);
|
|
869
878
|
},
|
|
870
879
|
onFailure(a) {
|
|
871
|
-
|
|
880
|
+
s && s(a);
|
|
872
881
|
}
|
|
873
882
|
};
|
|
874
883
|
f(c, o);
|
|
875
884
|
}
|
|
876
885
|
});
|
|
877
886
|
}
|
|
878
|
-
function
|
|
887
|
+
function De(e, t, n = void 0, s = void 0) {
|
|
879
888
|
return new Promise((i) => {
|
|
880
889
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
881
890
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
@@ -912,17 +921,17 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
912
921
|
}),
|
|
913
922
|
type: "json",
|
|
914
923
|
onComplete(a) {
|
|
915
|
-
|
|
924
|
+
n && n(a);
|
|
916
925
|
},
|
|
917
926
|
onFailure(a) {
|
|
918
|
-
|
|
927
|
+
s && s(a);
|
|
919
928
|
}
|
|
920
929
|
};
|
|
921
930
|
f(c, o);
|
|
922
931
|
}
|
|
923
932
|
});
|
|
924
933
|
}
|
|
925
|
-
function
|
|
934
|
+
function Re(e, t, n, s = void 0, i = void 0) {
|
|
926
935
|
return new Promise((c) => {
|
|
927
936
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
928
937
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -948,9 +957,9 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
948
957
|
data: [
|
|
949
958
|
{
|
|
950
959
|
physicalid: t,
|
|
951
|
-
proposedRevision:
|
|
960
|
+
proposedRevision: n,
|
|
952
961
|
modifiedAttributes: {
|
|
953
|
-
revision:
|
|
962
|
+
revision: n
|
|
954
963
|
}
|
|
955
964
|
}
|
|
956
965
|
],
|
|
@@ -959,7 +968,7 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
959
968
|
}),
|
|
960
969
|
type: "json",
|
|
961
970
|
onComplete(r) {
|
|
962
|
-
|
|
971
|
+
s && s(r);
|
|
963
972
|
},
|
|
964
973
|
onFailure(r) {
|
|
965
974
|
i && i(r);
|
|
@@ -970,23 +979,23 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
970
979
|
});
|
|
971
980
|
}
|
|
972
981
|
//!SECTION
|
|
973
|
-
async function
|
|
974
|
-
const
|
|
975
|
-
f(
|
|
982
|
+
async function Ae(e, t, n) {
|
|
983
|
+
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
984
|
+
f(s, {
|
|
976
985
|
onComplete(i) {
|
|
977
986
|
i = JSON.parse(i), t && t(i.csrf);
|
|
978
987
|
},
|
|
979
988
|
onFailure(i, c, o) {
|
|
980
|
-
|
|
989
|
+
n && n({ error: i, headers: c, xhr: o });
|
|
981
990
|
}
|
|
982
991
|
});
|
|
983
992
|
}
|
|
984
|
-
function je(e, t = void 0,
|
|
985
|
-
const
|
|
993
|
+
function je(e, t = void 0, n = void 0) {
|
|
994
|
+
const s = {
|
|
986
995
|
base: `${e.space}`,
|
|
987
996
|
uri: "/resources/bps/cspaces",
|
|
988
997
|
optTenant: `tenant=${e.tenant}`
|
|
989
|
-
}, i = `${
|
|
998
|
+
}, i = `${s.base}${s.uri}?${s.optTenant}`;
|
|
990
999
|
f(i, {
|
|
991
1000
|
method: "GET",
|
|
992
1001
|
headers: {
|
|
@@ -998,11 +1007,11 @@ function je(e, t = void 0, s = void 0) {
|
|
|
998
1007
|
t && t(a, o);
|
|
999
1008
|
},
|
|
1000
1009
|
onFailure(c, o, a) {
|
|
1001
|
-
|
|
1010
|
+
n && n({ response: c, headers: o, xhr: a });
|
|
1002
1011
|
}
|
|
1003
1012
|
});
|
|
1004
1013
|
}
|
|
1005
|
-
function Ie(e, t,
|
|
1014
|
+
function Ie(e, t, n, s) {
|
|
1006
1015
|
$(
|
|
1007
1016
|
e.space,
|
|
1008
1017
|
t,
|
|
@@ -1010,45 +1019,45 @@ function Ie(e, t, s, n) {
|
|
|
1010
1019
|
f(i, {
|
|
1011
1020
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1012
1021
|
onComplete: (c) => {
|
|
1013
|
-
|
|
1022
|
+
n && n(c);
|
|
1014
1023
|
},
|
|
1015
1024
|
onFailure: (c) => {
|
|
1016
|
-
console.log("error http", c),
|
|
1025
|
+
console.log("error http", c), s && s(c);
|
|
1017
1026
|
}
|
|
1018
1027
|
});
|
|
1019
1028
|
},
|
|
1020
1029
|
(i) => {
|
|
1021
|
-
console.log("error file URL", i),
|
|
1030
|
+
console.log("error file URL", i), s && s(i);
|
|
1022
1031
|
}
|
|
1023
1032
|
);
|
|
1024
1033
|
}
|
|
1025
|
-
async function ve(e, t,
|
|
1034
|
+
async function ve(e, t, n = void 0, s = void 0) {
|
|
1026
1035
|
return new Promise((i) => {
|
|
1027
1036
|
$(e.space, t, (c) => {
|
|
1028
1037
|
f(c, {
|
|
1029
|
-
onComplete: (o, a, r) => (i(JSON.parse(o)),
|
|
1038
|
+
onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
|
|
1030
1039
|
onFailure: (o, a, r) => {
|
|
1031
|
-
|
|
1040
|
+
s && s(o, a, r), console.log(o, a?.errormsg);
|
|
1032
1041
|
}
|
|
1033
1042
|
});
|
|
1034
1043
|
});
|
|
1035
1044
|
});
|
|
1036
1045
|
}
|
|
1037
|
-
function xe(e, t,
|
|
1046
|
+
function xe(e, t, n, s = void 0, i = void 0) {
|
|
1038
1047
|
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1039
1048
|
F(
|
|
1040
1049
|
e,
|
|
1041
|
-
|
|
1050
|
+
n,
|
|
1042
1051
|
(o) => {
|
|
1043
1052
|
const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
|
|
1044
|
-
|
|
1053
|
+
G(
|
|
1045
1054
|
e,
|
|
1046
|
-
|
|
1055
|
+
n,
|
|
1047
1056
|
a,
|
|
1048
1057
|
c,
|
|
1049
1058
|
r,
|
|
1050
1059
|
(d) => {
|
|
1051
|
-
|
|
1060
|
+
s && s(d);
|
|
1052
1061
|
},
|
|
1053
1062
|
(d) => {
|
|
1054
1063
|
i && i(d);
|
|
@@ -1058,75 +1067,75 @@ function xe(e, t, s, n = void 0, i = void 0) {
|
|
|
1058
1067
|
);
|
|
1059
1068
|
}
|
|
1060
1069
|
let v, x;
|
|
1061
|
-
const
|
|
1062
|
-
async function Pe(e, t = void 0,
|
|
1070
|
+
const D = [];
|
|
1071
|
+
async function Pe(e, t = void 0, n = void 0) {
|
|
1063
1072
|
e.objID && e.objID !== "" ? F(
|
|
1064
1073
|
e,
|
|
1065
|
-
(
|
|
1066
|
-
t && t(
|
|
1074
|
+
(s) => {
|
|
1075
|
+
t && t(s);
|
|
1067
1076
|
},
|
|
1068
|
-
(
|
|
1069
|
-
|
|
1077
|
+
(s) => {
|
|
1078
|
+
n && n(s);
|
|
1070
1079
|
}
|
|
1071
1080
|
) : e.objID === null && C(
|
|
1072
1081
|
e,
|
|
1073
|
-
(
|
|
1074
|
-
t && t({ rep:
|
|
1082
|
+
(s) => {
|
|
1083
|
+
t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
|
|
1075
1084
|
},
|
|
1076
|
-
(
|
|
1077
|
-
|
|
1085
|
+
(s) => {
|
|
1086
|
+
n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
|
|
1078
1087
|
}
|
|
1079
1088
|
);
|
|
1080
1089
|
}
|
|
1081
|
-
async function Me(e, t = void 0,
|
|
1090
|
+
async function Me(e, t = void 0, n = void 0) {
|
|
1082
1091
|
await I(
|
|
1083
1092
|
e,
|
|
1084
|
-
(
|
|
1093
|
+
(s) => {
|
|
1085
1094
|
const i = {};
|
|
1086
|
-
i.obj =
|
|
1095
|
+
i.obj = s, V(
|
|
1087
1096
|
e,
|
|
1088
1097
|
(c) => {
|
|
1089
1098
|
i.datas = c, t && t(i);
|
|
1090
1099
|
},
|
|
1091
1100
|
(c) => {
|
|
1092
|
-
|
|
1101
|
+
n && n(c);
|
|
1093
1102
|
}
|
|
1094
1103
|
);
|
|
1095
1104
|
},
|
|
1096
|
-
(
|
|
1097
|
-
|
|
1105
|
+
(s) => {
|
|
1106
|
+
n && n(s);
|
|
1098
1107
|
}
|
|
1099
1108
|
);
|
|
1100
1109
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const
|
|
1110
|
+
function V(e, t = void 0, n = void 0) {
|
|
1111
|
+
const s = [];
|
|
1103
1112
|
e.objIds.forEach((i, c) => {
|
|
1104
1113
|
I(
|
|
1105
1114
|
e,
|
|
1106
1115
|
i.objId,
|
|
1107
1116
|
(o) => {
|
|
1108
|
-
|
|
1117
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), Y(e, x)), c === e.objIds.length - 1 && t && t(s);
|
|
1109
1118
|
},
|
|
1110
1119
|
(o) => {
|
|
1111
|
-
|
|
1120
|
+
n && n(o);
|
|
1112
1121
|
}
|
|
1113
1122
|
);
|
|
1114
1123
|
});
|
|
1115
1124
|
}
|
|
1116
|
-
function
|
|
1117
|
-
|
|
1125
|
+
function Y(e, t, n = void 0, s = void 0) {
|
|
1126
|
+
W(
|
|
1118
1127
|
e,
|
|
1119
1128
|
v,
|
|
1120
1129
|
(i) => {
|
|
1121
1130
|
const c = [...t];
|
|
1122
|
-
c.find((o) => o.objectID === i.objectId).data = i.data, x = c,
|
|
1131
|
+
c.find((o) => o.objectID === i.objectId).data = i.data, x = c, D.push(i.data), n && n(D);
|
|
1123
1132
|
},
|
|
1124
1133
|
(i) => {
|
|
1125
|
-
|
|
1134
|
+
s && (s(i), console.log(i));
|
|
1126
1135
|
}
|
|
1127
1136
|
);
|
|
1128
1137
|
}
|
|
1129
|
-
const
|
|
1138
|
+
const B = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
1130
1139
|
"swym",
|
|
1131
1140
|
"3dspace",
|
|
1132
1141
|
"drive",
|
|
@@ -1140,13 +1149,13 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
|
1140
1149
|
where: "ds6w:where",
|
|
1141
1150
|
who: "ds6w:who",
|
|
1142
1151
|
why: "ds6w:why"
|
|
1143
|
-
},
|
|
1144
|
-
objId:
|
|
1152
|
+
}, z = {
|
|
1153
|
+
objId: B,
|
|
1145
1154
|
pred: "who",
|
|
1146
1155
|
order_by: "desc",
|
|
1147
1156
|
tag: "testTag"
|
|
1148
1157
|
};
|
|
1149
|
-
function Le(e, t,
|
|
1158
|
+
function Le(e, t, n = void 0, s = void 0) {
|
|
1150
1159
|
const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
|
|
1151
1160
|
uri: "/resources/6w/tags",
|
|
1152
1161
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1177,36 +1186,36 @@ function Le(e, t, s = void 0, n = void 0) {
|
|
|
1177
1186
|
JSON.parse(u);
|
|
1178
1187
|
const m = {};
|
|
1179
1188
|
setTimeout(() => {
|
|
1180
|
-
|
|
1189
|
+
E(
|
|
1181
1190
|
e,
|
|
1182
1191
|
o,
|
|
1183
1192
|
(g) => {
|
|
1184
|
-
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "",
|
|
1185
|
-
m.name = h, m.ext = S, m.createBy =
|
|
1193
|
+
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1194
|
+
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
|
|
1186
1195
|
e,
|
|
1187
1196
|
t,
|
|
1188
|
-
(
|
|
1189
|
-
|
|
1197
|
+
(y) => {
|
|
1198
|
+
n && n(y);
|
|
1190
1199
|
},
|
|
1191
|
-
(
|
|
1192
|
-
|
|
1200
|
+
(y) => {
|
|
1201
|
+
s && s(y);
|
|
1193
1202
|
}
|
|
1194
1203
|
);
|
|
1195
1204
|
},
|
|
1196
1205
|
(g, h) => {
|
|
1197
1206
|
const S = g;
|
|
1198
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1207
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
|
|
1199
1208
|
}
|
|
1200
1209
|
);
|
|
1201
1210
|
}, 2e3);
|
|
1202
1211
|
},
|
|
1203
1212
|
onFailure(u, m) {
|
|
1204
1213
|
const g = u;
|
|
1205
|
-
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1214
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1206
1215
|
}
|
|
1207
1216
|
});
|
|
1208
1217
|
}
|
|
1209
|
-
function
|
|
1218
|
+
function q(e, t, n = void 0, s = void 0) {
|
|
1210
1219
|
console.log("obj ", t);
|
|
1211
1220
|
const i = t.info.name, c = {
|
|
1212
1221
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
@@ -1256,7 +1265,7 @@ function Q(e, t, s = void 0, n = void 0) {
|
|
|
1256
1265
|
}
|
|
1257
1266
|
},
|
|
1258
1267
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1259
|
-
order_by:
|
|
1268
|
+
order_by: z.order_by,
|
|
1260
1269
|
order_field: "relevance",
|
|
1261
1270
|
select_snippets: [
|
|
1262
1271
|
"ds6w:snippet",
|
|
@@ -1267,7 +1276,7 @@ function Q(e, t, s = void 0, n = void 0) {
|
|
|
1267
1276
|
],
|
|
1268
1277
|
nresults: 40,
|
|
1269
1278
|
start: "0",
|
|
1270
|
-
source:
|
|
1279
|
+
source: H,
|
|
1271
1280
|
tenant: e.tenant,
|
|
1272
1281
|
login: {
|
|
1273
1282
|
"3dspace": {
|
|
@@ -1281,15 +1290,15 @@ function Q(e, t, s = void 0, n = void 0) {
|
|
|
1281
1290
|
data: JSON.stringify(d),
|
|
1282
1291
|
onComplete(l) {
|
|
1283
1292
|
const p = JSON.parse(l);
|
|
1284
|
-
|
|
1293
|
+
n(p);
|
|
1285
1294
|
},
|
|
1286
1295
|
onFailure(l, p) {
|
|
1287
1296
|
const u = l;
|
|
1288
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1297
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
|
|
1289
1298
|
}
|
|
1290
1299
|
});
|
|
1291
1300
|
}
|
|
1292
|
-
function Je(e, t,
|
|
1301
|
+
function Je(e, t, n = void 0, s = void 0) {
|
|
1293
1302
|
const { objId: i, pred: c, tag: o } = t, a = {
|
|
1294
1303
|
uri: "/resources/6w/tags",
|
|
1295
1304
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1317,15 +1326,15 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1317
1326
|
Accept: "application/json,text/javascript,*/*"
|
|
1318
1327
|
},
|
|
1319
1328
|
onComplete(l) {
|
|
1320
|
-
|
|
1329
|
+
n && n(l);
|
|
1321
1330
|
},
|
|
1322
1331
|
onFailure(l, p) {
|
|
1323
1332
|
const u = l;
|
|
1324
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1333
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
|
|
1325
1334
|
}
|
|
1326
1335
|
});
|
|
1327
1336
|
}
|
|
1328
|
-
function Ee(e, t = "",
|
|
1337
|
+
function Ee(e, t = "", n = void 0, s = void 0) {
|
|
1329
1338
|
const { space: i } = e;
|
|
1330
1339
|
if (t === "")
|
|
1331
1340
|
return;
|
|
@@ -1340,29 +1349,29 @@ function Ee(e, t = "", s = void 0, n = void 0) {
|
|
|
1340
1349
|
headers: o,
|
|
1341
1350
|
data: r,
|
|
1342
1351
|
onComplete(d) {
|
|
1343
|
-
|
|
1352
|
+
n && n(JSON.parse(d));
|
|
1344
1353
|
},
|
|
1345
1354
|
onFailure(d, l) {
|
|
1346
1355
|
const p = d;
|
|
1347
|
-
p.msg = l.error,
|
|
1356
|
+
p.msg = l.error, s && s(p);
|
|
1348
1357
|
}
|
|
1349
1358
|
});
|
|
1350
1359
|
}
|
|
1351
|
-
async function w(e, t = void 0,
|
|
1352
|
-
const
|
|
1353
|
-
return f(
|
|
1360
|
+
async function w(e, t = void 0, n = void 0) {
|
|
1361
|
+
const s = e.space + "/api/index/tk";
|
|
1362
|
+
return f(s, {
|
|
1354
1363
|
onComplete(i, c, o) {
|
|
1355
1364
|
const a = JSON.parse(i);
|
|
1356
1365
|
if (t)
|
|
1357
1366
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1358
1367
|
},
|
|
1359
1368
|
onFailure(i) {
|
|
1360
|
-
|
|
1369
|
+
n && n(i);
|
|
1361
1370
|
}
|
|
1362
1371
|
});
|
|
1363
1372
|
}
|
|
1364
|
-
function Ge(e, t = void 0,
|
|
1365
|
-
const
|
|
1373
|
+
function Ge(e, t = void 0, n = void 0) {
|
|
1374
|
+
const s = `${e.space}/api/exalead/whatsnew`, i = {
|
|
1366
1375
|
params: {
|
|
1367
1376
|
community_id: null,
|
|
1368
1377
|
hash_key: null,
|
|
@@ -1373,7 +1382,7 @@ function Ge(e, t = void 0, s = void 0) {
|
|
|
1373
1382
|
}
|
|
1374
1383
|
};
|
|
1375
1384
|
w(e, (c) => {
|
|
1376
|
-
f(
|
|
1385
|
+
f(s, {
|
|
1377
1386
|
method: "POST",
|
|
1378
1387
|
headers: {
|
|
1379
1388
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
@@ -1386,13 +1395,13 @@ function Ge(e, t = void 0, s = void 0) {
|
|
|
1386
1395
|
t && t(o, a);
|
|
1387
1396
|
},
|
|
1388
1397
|
onFailure(o, a) {
|
|
1389
|
-
|
|
1398
|
+
n && n(o, a);
|
|
1390
1399
|
}
|
|
1391
1400
|
});
|
|
1392
1401
|
});
|
|
1393
1402
|
}
|
|
1394
|
-
function Ke(e, t = void 0,
|
|
1395
|
-
const
|
|
1403
|
+
function Ke(e, t = void 0, n = void 0) {
|
|
1404
|
+
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1396
1405
|
params: {
|
|
1397
1406
|
idsToFilterArr: [],
|
|
1398
1407
|
mode: "offline",
|
|
@@ -1402,7 +1411,7 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1402
1411
|
}
|
|
1403
1412
|
};
|
|
1404
1413
|
w(e, (c) => {
|
|
1405
|
-
f(
|
|
1414
|
+
f(s, {
|
|
1406
1415
|
method: "POST",
|
|
1407
1416
|
headers: {
|
|
1408
1417
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
@@ -1416,18 +1425,18 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1416
1425
|
t && t(r, o);
|
|
1417
1426
|
},
|
|
1418
1427
|
onFailure(o, a) {
|
|
1419
|
-
|
|
1428
|
+
n && n(o, a);
|
|
1420
1429
|
}
|
|
1421
1430
|
});
|
|
1422
1431
|
});
|
|
1423
1432
|
}
|
|
1424
|
-
function We(e, t = void 0,
|
|
1425
|
-
const
|
|
1433
|
+
function We(e, t = void 0, n = void 0) {
|
|
1434
|
+
const s = {
|
|
1426
1435
|
base: e.space,
|
|
1427
1436
|
uri: "/api/community/listmycommunities",
|
|
1428
1437
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1429
1438
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1430
|
-
}, i = `${
|
|
1439
|
+
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
|
|
1431
1440
|
w(e, (o) => {
|
|
1432
1441
|
f(i, {
|
|
1433
1442
|
method: "GET",
|
|
@@ -1446,24 +1455,24 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1446
1455
|
role: m.role,
|
|
1447
1456
|
access: m.access
|
|
1448
1457
|
};
|
|
1449
|
-
|
|
1458
|
+
Q(
|
|
1450
1459
|
e,
|
|
1451
1460
|
m.id,
|
|
1452
1461
|
(h) => {
|
|
1453
1462
|
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1454
1463
|
},
|
|
1455
|
-
(h) =>
|
|
1464
|
+
(h) => n(h)
|
|
1456
1465
|
);
|
|
1457
1466
|
});
|
|
1458
1467
|
},
|
|
1459
1468
|
onFailure(a, r) {
|
|
1460
1469
|
const d = a;
|
|
1461
|
-
d.status = r.status, d.response = r.errormsg,
|
|
1470
|
+
d.status = r.status, d.response = r.errormsg, n && n(d);
|
|
1462
1471
|
}
|
|
1463
1472
|
});
|
|
1464
1473
|
});
|
|
1465
1474
|
}
|
|
1466
|
-
function
|
|
1475
|
+
function Q(e, t, n, s) {
|
|
1467
1476
|
const i = `${e.space}/api/community/listmembers`, c = {
|
|
1468
1477
|
params: {
|
|
1469
1478
|
page: e.page ? e.page : 1,
|
|
@@ -1482,18 +1491,18 @@ function Z(e, t, s, n) {
|
|
|
1482
1491
|
data: JSON.stringify(c),
|
|
1483
1492
|
type: "json",
|
|
1484
1493
|
onComplete(a, r, d) {
|
|
1485
|
-
|
|
1494
|
+
n && n(a);
|
|
1486
1495
|
},
|
|
1487
1496
|
onFailure(a, r) {
|
|
1488
1497
|
const d = a;
|
|
1489
|
-
d.status = r.status, d.response = r.errormsg,
|
|
1498
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1490
1499
|
}
|
|
1491
1500
|
});
|
|
1492
1501
|
});
|
|
1493
1502
|
}
|
|
1494
|
-
function Xe(e, t = void 0,
|
|
1495
|
-
const
|
|
1496
|
-
e.commu_id || (e.commu_id =
|
|
1503
|
+
function Xe(e, t = void 0, n = void 0) {
|
|
1504
|
+
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1505
|
+
e.commu_id || (e.commu_id = s);
|
|
1497
1506
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1498
1507
|
w(e, (c) => {
|
|
1499
1508
|
f(i, {
|
|
@@ -1509,12 +1518,12 @@ function Xe(e, t = void 0, s = void 0) {
|
|
|
1509
1518
|
},
|
|
1510
1519
|
onFailure(o, a) {
|
|
1511
1520
|
const r = o;
|
|
1512
|
-
r.status = a.status, r.response = a.errormsg,
|
|
1521
|
+
r.status = a.status, r.response = a.errormsg, n && n(r);
|
|
1513
1522
|
}
|
|
1514
1523
|
});
|
|
1515
1524
|
});
|
|
1516
1525
|
}
|
|
1517
|
-
function Ve(e, t,
|
|
1526
|
+
function Ve(e, t, n = void 0, s = void 0) {
|
|
1518
1527
|
const { listAllContacts: i, currentUser: c } = e;
|
|
1519
1528
|
console.log("__listAllContacts", i.hits);
|
|
1520
1529
|
const o = `${e.space}/api/directmessages`, a = {
|
|
@@ -1523,16 +1532,16 @@ function Ve(e, t, s = void 0, n = void 0) {
|
|
|
1523
1532
|
id_msg: "",
|
|
1524
1533
|
senderId: e.currentUser.login,
|
|
1525
1534
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1526
|
-
msg:
|
|
1535
|
+
msg: ee(t.msg)
|
|
1527
1536
|
};
|
|
1528
1537
|
let d = !1;
|
|
1529
|
-
|
|
1538
|
+
Z(
|
|
1530
1539
|
a.users,
|
|
1531
1540
|
(l) => {
|
|
1532
|
-
l !== void 0 && (r.id_msg = l.id, d = !0,
|
|
1541
|
+
l !== void 0 && (r.id_msg = l.id, d = !0, R(e, r));
|
|
1533
1542
|
},
|
|
1534
1543
|
(l) => {
|
|
1535
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1544
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
|
|
1536
1545
|
}
|
|
1537
1546
|
), d === !1 && setTimeout(() => {
|
|
1538
1547
|
d === !1 && w(e, (l) => {
|
|
@@ -1547,17 +1556,17 @@ function Ve(e, t, s = void 0, n = void 0) {
|
|
|
1547
1556
|
type: "json",
|
|
1548
1557
|
onComplete(p, u, m) {
|
|
1549
1558
|
const g = p;
|
|
1550
|
-
g.reponse = JSON.parse(m.response), g.status = m.status,
|
|
1559
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), r.id_msg = g.result.id, R(e, r);
|
|
1551
1560
|
},
|
|
1552
1561
|
onFailure(p, u, m) {
|
|
1553
1562
|
const g = p;
|
|
1554
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1563
|
+
g.msg = u.errormsg, g.status = u.status, s && s(g);
|
|
1555
1564
|
}
|
|
1556
1565
|
});
|
|
1557
1566
|
});
|
|
1558
1567
|
}, 500);
|
|
1559
1568
|
}
|
|
1560
|
-
function
|
|
1569
|
+
function Z(e, t, n, s) {
|
|
1561
1570
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1562
1571
|
w(e, (c) => {
|
|
1563
1572
|
f(i, {
|
|
@@ -1577,16 +1586,16 @@ function ee(e, t, s, n) {
|
|
|
1577
1586
|
u.push(m.login);
|
|
1578
1587
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1579
1588
|
});
|
|
1580
|
-
|
|
1589
|
+
n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
|
|
1581
1590
|
},
|
|
1582
1591
|
onFailure(o) {
|
|
1583
1592
|
const a = o;
|
|
1584
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1593
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
1585
1594
|
}
|
|
1586
1595
|
});
|
|
1587
1596
|
});
|
|
1588
1597
|
}
|
|
1589
|
-
function
|
|
1598
|
+
function R(e, t, n = void 0, s = void 0) {
|
|
1590
1599
|
const i = {
|
|
1591
1600
|
base: e.space,
|
|
1592
1601
|
uri: "/api/community",
|
|
@@ -1614,23 +1623,23 @@ function D(e, t, s = void 0, n = void 0) {
|
|
|
1614
1623
|
type: "json",
|
|
1615
1624
|
onComplete(r, d, l) {
|
|
1616
1625
|
const p = r;
|
|
1617
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1626
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1618
1627
|
},
|
|
1619
1628
|
onFailure(r, d) {
|
|
1620
1629
|
const l = r;
|
|
1621
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1630
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1622
1631
|
}
|
|
1623
1632
|
});
|
|
1624
1633
|
});
|
|
1625
1634
|
}
|
|
1626
|
-
function
|
|
1627
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1635
|
+
function ee(e) {
|
|
1636
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1628
1637
|
return `<p>${e} </p>
|
|
1629
1638
|
<br/>
|
|
1630
1639
|
<hr/>
|
|
1631
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1640
|
+
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1632
1641
|
}
|
|
1633
|
-
const
|
|
1642
|
+
const te = {
|
|
1634
1643
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1635
1644
|
// titre du post
|
|
1636
1645
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1640,7 +1649,7 @@ const ne = {
|
|
|
1640
1649
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1641
1650
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1642
1651
|
};
|
|
1643
|
-
function Ye(e, t,
|
|
1652
|
+
function Ye(e, t, n = void 0, s = void 0) {
|
|
1644
1653
|
const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1645
1654
|
(r) => r.id === t.community_id
|
|
1646
1655
|
), o = e.swymCommunities.find(
|
|
@@ -1651,7 +1660,7 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1651
1660
|
// String, le nom de l'affaire
|
|
1652
1661
|
community_id: c?.id !== void 0 ? c.id : o.id,
|
|
1653
1662
|
// String, l'id de la communauté
|
|
1654
|
-
message:
|
|
1663
|
+
message: ne(t.text_html),
|
|
1655
1664
|
// STRING => le contenue du message doit être au format HTML
|
|
1656
1665
|
published: 1
|
|
1657
1666
|
// 1 publier, 0 non publier
|
|
@@ -1670,16 +1679,16 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1670
1679
|
type: "json",
|
|
1671
1680
|
onComplete(l, p, u) {
|
|
1672
1681
|
const m = JSON.parse(l);
|
|
1673
|
-
m.status = u.status, m.response = u.response,
|
|
1682
|
+
m.status = u.status, m.response = u.response, n && n(m);
|
|
1674
1683
|
},
|
|
1675
1684
|
onFailure(l, p, u) {
|
|
1676
1685
|
const m = l;
|
|
1677
|
-
m.status = p.status, m.response = p.errormsg,
|
|
1686
|
+
m.status = p.status, m.response = p.errormsg, s && s(m);
|
|
1678
1687
|
}
|
|
1679
1688
|
});
|
|
1680
1689
|
});
|
|
1681
1690
|
}
|
|
1682
|
-
function Be(e, t,
|
|
1691
|
+
function Be(e, t, n = void 0, s = void 0) {
|
|
1683
1692
|
const i = `${e.space}/api/idea/delete`, c = {
|
|
1684
1693
|
params: {
|
|
1685
1694
|
community_id: t.community_id,
|
|
@@ -1697,16 +1706,16 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1697
1706
|
data: JSON.stringify(c),
|
|
1698
1707
|
type: "json",
|
|
1699
1708
|
onComplete(a, r, d) {
|
|
1700
|
-
|
|
1709
|
+
n && n(a);
|
|
1701
1710
|
},
|
|
1702
1711
|
onFailure(a, r, d) {
|
|
1703
1712
|
const l = a;
|
|
1704
|
-
l.status = r.status, l.response = r.errormsg,
|
|
1713
|
+
l.status = r.status, l.response = r.errormsg, s && s(l);
|
|
1705
1714
|
}
|
|
1706
1715
|
});
|
|
1707
1716
|
});
|
|
1708
1717
|
}
|
|
1709
|
-
function He(e, t = "",
|
|
1718
|
+
function He(e, t = "", n = void 0, s = void 0) {
|
|
1710
1719
|
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1711
1720
|
t === "" && (t = i);
|
|
1712
1721
|
const c = `${e.space}/api/idea/get`, o = {
|
|
@@ -1726,16 +1735,16 @@ function He(e, t = "", s = void 0, n = void 0) {
|
|
|
1726
1735
|
type: "json",
|
|
1727
1736
|
onComplete(r) {
|
|
1728
1737
|
const d = r;
|
|
1729
|
-
d.msg = d.result.message,
|
|
1738
|
+
d.msg = d.result.message, n && n(d);
|
|
1730
1739
|
},
|
|
1731
1740
|
onFailure(r) {
|
|
1732
1741
|
const d = r;
|
|
1733
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1742
|
+
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1734
1743
|
}
|
|
1735
1744
|
});
|
|
1736
1745
|
});
|
|
1737
1746
|
}
|
|
1738
|
-
function ze(e, t =
|
|
1747
|
+
function ze(e, t = te, n = void 0, s = void 0) {
|
|
1739
1748
|
const i = {
|
|
1740
1749
|
uri: "/api/idea/list",
|
|
1741
1750
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
@@ -1749,16 +1758,16 @@ function ze(e, t = ne, s = void 0, n = void 0) {
|
|
|
1749
1758
|
},
|
|
1750
1759
|
onComplete(a) {
|
|
1751
1760
|
const r = JSON.parse(a);
|
|
1752
|
-
|
|
1761
|
+
n && n(r);
|
|
1753
1762
|
},
|
|
1754
1763
|
onFailure(a, r) {
|
|
1755
1764
|
const d = a;
|
|
1756
|
-
d.status = r.status, d.response = r.errormsg,
|
|
1765
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1757
1766
|
}
|
|
1758
1767
|
});
|
|
1759
1768
|
});
|
|
1760
1769
|
}
|
|
1761
|
-
function
|
|
1770
|
+
function ne(e) {
|
|
1762
1771
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1763
1772
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1764
1773
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1833,12 +1842,12 @@ function se(e) {
|
|
|
1833
1842
|
<p>
|
|
1834
1843
|
</p>` : e;
|
|
1835
1844
|
}
|
|
1836
|
-
function qe(e, t = void 0,
|
|
1837
|
-
const
|
|
1845
|
+
function qe(e, t = void 0, n = void 0) {
|
|
1846
|
+
const s = e.space + "/api/user/getcurrent/";
|
|
1838
1847
|
w(
|
|
1839
1848
|
e,
|
|
1840
1849
|
(i) => {
|
|
1841
|
-
f(
|
|
1850
|
+
f(s, {
|
|
1842
1851
|
method: "GET",
|
|
1843
1852
|
headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
|
|
1844
1853
|
onComplete(c, o, a) {
|
|
@@ -1846,14 +1855,14 @@ function qe(e, t = void 0, s = void 0) {
|
|
|
1846
1855
|
t && t(r.result);
|
|
1847
1856
|
},
|
|
1848
1857
|
onFailure(c, o, a) {
|
|
1849
|
-
|
|
1858
|
+
n && n({ response: c, headers: o, xhr: a });
|
|
1850
1859
|
}
|
|
1851
1860
|
});
|
|
1852
1861
|
},
|
|
1853
|
-
|
|
1862
|
+
n
|
|
1854
1863
|
);
|
|
1855
1864
|
}
|
|
1856
|
-
function Qe(e, t,
|
|
1865
|
+
function Qe(e, t, n = void 0, s = void 0) {
|
|
1857
1866
|
const i = e.space + "/api/user/find/login/" + t;
|
|
1858
1867
|
w(
|
|
1859
1868
|
e,
|
|
@@ -1863,14 +1872,14 @@ function Qe(e, t, s = void 0, n = void 0) {
|
|
|
1863
1872
|
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1864
1873
|
onComplete(o, a, r) {
|
|
1865
1874
|
const d = JSON.parse(o);
|
|
1866
|
-
|
|
1875
|
+
n && n(d);
|
|
1867
1876
|
},
|
|
1868
1877
|
onFailure(o) {
|
|
1869
|
-
|
|
1878
|
+
s && s(o);
|
|
1870
1879
|
}
|
|
1871
1880
|
});
|
|
1872
1881
|
},
|
|
1873
|
-
|
|
1882
|
+
s
|
|
1874
1883
|
);
|
|
1875
1884
|
}
|
|
1876
1885
|
function Ze(e) {
|
|
@@ -1882,25 +1891,25 @@ export {
|
|
|
1882
1891
|
Fe as _3DSpace_Create_Doc,
|
|
1883
1892
|
C as _3DSpace_csrf,
|
|
1884
1893
|
I as _3DSpace_download_doc,
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1894
|
+
W as _3DSpace_download_multidoc,
|
|
1895
|
+
G as _3DSpace_file_update,
|
|
1896
|
+
K as _3DSpace_file_update_csr,
|
|
1888
1897
|
$ as _3DSpace_file_url,
|
|
1889
1898
|
be as _3DSpace_file_url_csr,
|
|
1890
1899
|
F as _3DSpace_get_csrf,
|
|
1891
|
-
|
|
1892
|
-
|
|
1900
|
+
E as _3DSpace_get_docInfo,
|
|
1901
|
+
X as _3DSpace_get_downloadTicket_multidoc,
|
|
1893
1902
|
N as _3DSpace_get_securityContexts,
|
|
1894
|
-
|
|
1903
|
+
Re as _3DSpace_lifecycle_changeRevision,
|
|
1895
1904
|
Ue as _3DSpace_lifecycle_changeState,
|
|
1896
1905
|
$e as _3DSpace_lifecycle_getGraph,
|
|
1897
|
-
|
|
1906
|
+
De as _3DSpace_lifecycle_getNextRevision,
|
|
1898
1907
|
ke as _3DSpace_lifecycle_getNextStates,
|
|
1899
1908
|
We as _3DSwim_getAllCommunities,
|
|
1900
|
-
|
|
1909
|
+
Q as _3DSwim_getMembersCommunity,
|
|
1901
1910
|
Ve as _3DSwym_buildDirectMessage,
|
|
1902
1911
|
Be as _3DSwym_deleteIdea,
|
|
1903
|
-
|
|
1912
|
+
Z as _3DSwym_findCommunityToInstantMSG,
|
|
1904
1913
|
Ge as _3DSwym_getAllNews,
|
|
1905
1914
|
Ke as _3DSwym_getFamiliarPeople,
|
|
1906
1915
|
Xe as _3DSwym_getIdeaStatusMaturity,
|
|
@@ -1910,34 +1919,34 @@ export {
|
|
|
1910
1919
|
Qe as _3DSwym_get_findUser,
|
|
1911
1920
|
w as _3DSwym_get_version,
|
|
1912
1921
|
Ye as _3DSwym_postIdea,
|
|
1913
|
-
|
|
1922
|
+
R as _3DSwym_sendMessageData,
|
|
1914
1923
|
Se as _AppMngt_get_info_user,
|
|
1915
1924
|
he as _AppMngt_get_users,
|
|
1916
1925
|
me as _getPlateformInfos,
|
|
1917
|
-
|
|
1926
|
+
fe as _getPlatformServices,
|
|
1918
1927
|
f as _httpCallAuthenticated,
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1928
|
+
le as _setDraggable,
|
|
1929
|
+
ue as _setDroppable,
|
|
1930
|
+
pe as _setupTagger,
|
|
1922
1931
|
Le as addTagToDoc,
|
|
1923
1932
|
ge as compass_getListAdditionalApps,
|
|
1924
1933
|
L as couleurs,
|
|
1925
|
-
|
|
1926
|
-
|
|
1934
|
+
_e as createUserGroups,
|
|
1935
|
+
Y as dataMixing,
|
|
1927
1936
|
Te as deleteUserGroups,
|
|
1928
|
-
|
|
1937
|
+
re as findAdresse,
|
|
1929
1938
|
je as getAllContextSecurity,
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1939
|
+
Ae as getCSRFToken,
|
|
1940
|
+
oe as getCommunes,
|
|
1941
|
+
ye as getComplementUG,
|
|
1933
1942
|
Ie as getDataFrom3DSpace,
|
|
1934
|
-
|
|
1943
|
+
ce as getDataFromGouvFr,
|
|
1935
1944
|
Me as getDatasByTenant,
|
|
1936
|
-
|
|
1945
|
+
V as getDatasFrom3DSpace,
|
|
1937
1946
|
ve as getDownloadDocument,
|
|
1938
1947
|
Ee as getInfoDocTags,
|
|
1939
1948
|
we as getUserGroupsList,
|
|
1940
|
-
|
|
1949
|
+
J as getUsersGroupRules,
|
|
1941
1950
|
Pe as get_3DSpace_csrf,
|
|
1942
1951
|
Ce as patchUserGroups,
|
|
1943
1952
|
Oe as patchUserGroupsControl,
|
|
@@ -1945,5 +1954,5 @@ export {
|
|
|
1945
1954
|
Ne as readUserGroupControl,
|
|
1946
1955
|
Je as removeTagToDoc,
|
|
1947
1956
|
Ze as sayHello,
|
|
1948
|
-
|
|
1957
|
+
de as updateEvent
|
|
1949
1958
|
};
|