@beam3_dev/api_module 0.0.87 → 0.0.89
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 +381 -374
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +5 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as N } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function R() {
|
|
5
5
|
return M();
|
|
@@ -66,10 +66,10 @@ async function re(e, t = void 0, s = void 0) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function ce(e, t = L) {
|
|
69
|
-
let s =
|
|
70
|
-
const n = e, i = [],
|
|
71
|
-
for (let
|
|
72
|
-
i.push({ date:
|
|
69
|
+
let s = N.now().year;
|
|
70
|
+
const n = e, i = [], c = (a) => {
|
|
71
|
+
for (let r in a)
|
|
72
|
+
i.push({ date: r, comment: a[r] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = s; a <= s + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -80,20 +80,20 @@ async function ce(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
r
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((r) => r.json()).then((r) => {
|
|
84
|
+
c(r);
|
|
85
|
+
}).catch((r) => console.error("Erreur : " + r));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = n.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : n;
|
|
90
|
-
for (let
|
|
90
|
+
for (let r of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start ===
|
|
92
|
+
(l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
94
|
+
name: "Férié : " + r.comment,
|
|
95
|
+
start: N.fromISO(r.date).toISODate(),
|
|
96
|
+
end: N.fromISO(r.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
|
|
|
102
102
|
}
|
|
103
103
|
async function de(e, t, s = !0) {
|
|
104
104
|
const n = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
105
|
-
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i,
|
|
105
|
+
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
|
|
106
106
|
}
|
|
107
107
|
function m(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (s) => {
|
|
@@ -145,14 +145,14 @@ async function fe(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 s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(),
|
|
148
|
+
const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
152
|
tenant: s,
|
|
153
153
|
user: n,
|
|
154
154
|
appsConfiguration: i,
|
|
155
|
-
appConf:
|
|
155
|
+
appConf: c
|
|
156
156
|
};
|
|
157
157
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
158
158
|
}
|
|
@@ -169,42 +169,42 @@ function ge(e, t, s) {
|
|
|
169
169
|
"Content-Type": "application/json",
|
|
170
170
|
Accept: "application/json"
|
|
171
171
|
},
|
|
172
|
-
onComplete(
|
|
173
|
-
const
|
|
172
|
+
onComplete(c, o, a) {
|
|
173
|
+
const r = JSON.parse(c), d = r.data.map((l) => {
|
|
174
174
|
const p = l.attributes.name, u = l.id;
|
|
175
175
|
return { name: p, id: u };
|
|
176
176
|
});
|
|
177
|
-
t && t(d,
|
|
177
|
+
t && t(d, r);
|
|
178
178
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
181
|
-
a.msg =
|
|
179
|
+
onFailure(c, o) {
|
|
180
|
+
const a = c;
|
|
181
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
function he(e, t = void 0, s = void 0) {
|
|
186
186
|
let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
187
|
m(n, {
|
|
188
|
-
onComplete(i,
|
|
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
|
-
onFailure(i,
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
onFailure(i, c) {
|
|
193
|
+
const o = i;
|
|
194
|
+
o.msg = c.errormsg, o.errCode = c.errorcode, s && s(o);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
function Se(e, t, s = void 0, n = void 0) {
|
|
199
199
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
200
|
m(i, {
|
|
201
|
-
onComplete(
|
|
202
|
-
const
|
|
203
|
-
s && s(
|
|
201
|
+
onComplete(c, o, a) {
|
|
202
|
+
const r = JSON.parse(c);
|
|
203
|
+
s && s(r);
|
|
204
204
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
207
|
-
a.msg =
|
|
205
|
+
onFailure(c, o) {
|
|
206
|
+
const a = c;
|
|
207
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -213,14 +213,14 @@ const D = {
|
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
215
|
function _e(e, t, s = void 0, n = void 0) {
|
|
216
|
-
const { space: i, currentUser:
|
|
216
|
+
const { space: i, currentUser: c } = e, a = `${i}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, r = {
|
|
219
219
|
groups: [
|
|
220
220
|
{
|
|
221
221
|
title: t.title,
|
|
222
222
|
description: t.description,
|
|
223
|
-
members: t.members || [
|
|
223
|
+
members: t.members || [c.email, "samuel.mureau@beam3.fr"],
|
|
224
224
|
pending_members: [],
|
|
225
225
|
sharing: t.sharing,
|
|
226
226
|
visibility: t.visibility
|
|
@@ -230,7 +230,7 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
230
230
|
m(a, {
|
|
231
231
|
method: "POST",
|
|
232
232
|
headers: D,
|
|
233
|
-
data: JSON.stringify(
|
|
233
|
+
data: JSON.stringify(r),
|
|
234
234
|
onComplete(d) {
|
|
235
235
|
s && s(JSON.parse(d));
|
|
236
236
|
},
|
|
@@ -242,7 +242,7 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
function ye(e, t, s = void 0, n = void 0) {
|
|
245
|
-
const { space: i, tenant:
|
|
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
|
m(d, {
|
|
247
247
|
opts: {
|
|
248
248
|
method: "GET",
|
|
@@ -261,12 +261,12 @@ function ye(e, t, s = void 0, n = void 0) {
|
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
function J(e, t = void 0, s = void 0) {
|
|
264
|
-
const { space: n, tenant: i } = e,
|
|
264
|
+
const { space: n, tenant: i } = e, c = n, 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
|
-
}, d = `${
|
|
267
|
+
}, d = `${c}${o}${a}`;
|
|
268
268
|
m(d, {
|
|
269
|
-
OPTsH:
|
|
269
|
+
OPTsH: r,
|
|
270
270
|
onComplete(l) {
|
|
271
271
|
t && t(JSON.parse(l));
|
|
272
272
|
},
|
|
@@ -307,22 +307,22 @@ function we(e, t = void 0, s = void 0) {
|
|
|
307
307
|
console.log(l);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Ce(e, t) {
|
|
311
311
|
const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
312
|
m(i, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
const { space:
|
|
316
|
+
function Te(e, t, s, n = void 0, i = void 0) {
|
|
317
|
+
const { space: c, tenant: o } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
320
320
|
nextURICh: "/characteristics",
|
|
321
321
|
nextURIGr: "/group",
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
|
-
OPTsTenant: `tenant=dstenant:${
|
|
325
|
-
},
|
|
324
|
+
OPTsTenant: `tenant=dstenant:${o}`
|
|
325
|
+
}, r = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
|
|
326
326
|
m(d, {
|
|
327
327
|
headers: D,
|
|
328
328
|
method: "PATCH",
|
|
@@ -337,7 +337,7 @@ function Ce(e, t, s, n = void 0, i = void 0) {
|
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
function Oe(e, t, s, n = void 0, i = void 0) {
|
|
340
|
-
const { space:
|
|
340
|
+
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
m(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: D,
|
|
@@ -351,9 +351,9 @@ function Oe(e, t, s, n = void 0, i = void 0) {
|
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
const { space: i } = e,
|
|
356
|
-
m(
|
|
354
|
+
function Ne(e, t, s = void 0, n = void 0) {
|
|
355
|
+
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
+
m(o, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
359
359
|
headers: {
|
|
@@ -376,8 +376,8 @@ async function E(e, t, s) {
|
|
|
376
376
|
onComplete(i) {
|
|
377
377
|
i = JSON.parse(i), t && t(i.csrf);
|
|
378
378
|
},
|
|
379
|
-
onFailure(i,
|
|
380
|
-
s && s({ error: i, headers:
|
|
379
|
+
onFailure(i, c, o) {
|
|
380
|
+
s && s({ error: i, headers: c, xhr: o });
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
}
|
|
@@ -388,14 +388,14 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
|
|
|
388
388
|
console.log("Le paramètre docid est obligatoire");
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
const
|
|
392
|
-
m(
|
|
393
|
-
onComplete(
|
|
394
|
-
const d = JSON.parse(
|
|
391
|
+
const c = i + `/resources/v1/modeler/documents/${t}`;
|
|
392
|
+
m(c, {
|
|
393
|
+
onComplete(o, a, r) {
|
|
394
|
+
const d = JSON.parse(o);
|
|
395
395
|
s && s(d);
|
|
396
396
|
},
|
|
397
|
-
onFailure(
|
|
398
|
-
n && n(
|
|
397
|
+
onFailure(o) {
|
|
398
|
+
n && n(o);
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
}
|
|
@@ -403,7 +403,7 @@ function k(e, t = void 0, s = void 0) {
|
|
|
403
403
|
if (e.objID && e.objID !== "") {
|
|
404
404
|
let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
405
|
m(n, {
|
|
406
|
-
onComplete(i,
|
|
406
|
+
onComplete(i, c, o) {
|
|
407
407
|
const a = JSON.parse(i);
|
|
408
408
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
409
|
},
|
|
@@ -412,7 +412,7 @@ function k(e, t = void 0, s = void 0) {
|
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
} else
|
|
415
|
-
|
|
415
|
+
T(
|
|
416
416
|
e,
|
|
417
417
|
(n) => {
|
|
418
418
|
console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
|
|
@@ -422,19 +422,19 @@ function k(e, t = void 0, s = void 0) {
|
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function T(e, t = void 0, s = void 0) {
|
|
426
426
|
if (e.space) {
|
|
427
427
|
const n = e.space + "/resources/v1/application/CSRF";
|
|
428
428
|
m(n, {
|
|
429
|
-
onComplete(i,
|
|
429
|
+
onComplete(i, c, o) {
|
|
430
430
|
const a = JSON.parse(i);
|
|
431
431
|
t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(i,
|
|
433
|
+
onFailure(i, c, o) {
|
|
434
434
|
s && s({
|
|
435
435
|
response: i,
|
|
436
|
-
headers:
|
|
437
|
-
xhr:
|
|
436
|
+
headers: c,
|
|
437
|
+
xhr: o
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
});
|
|
@@ -451,12 +451,12 @@ function A(e, t = void 0, s = void 0) {
|
|
|
451
451
|
headers: {
|
|
452
452
|
ENO_CSRF_TOKEN: e.token
|
|
453
453
|
},
|
|
454
|
-
onComplete(
|
|
455
|
-
const a = JSON.parse(
|
|
454
|
+
onComplete(c) {
|
|
455
|
+
const a = JSON.parse(c).data[0].dataelements.ticketURL;
|
|
456
456
|
t && t(a);
|
|
457
457
|
},
|
|
458
|
-
onFailure(
|
|
459
|
-
console.warn("☠️ error => ",
|
|
458
|
+
onFailure(c, o) {
|
|
459
|
+
console.warn("☠️ error => ", c, o), s && s(c, o);
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
},
|
|
@@ -465,29 +465,29 @@ function A(e, t = void 0, s = void 0) {
|
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
470
|
-
s || (s = e.token), m(
|
|
468
|
+
function be(e, t, s, n = void 0, i = void 0) {
|
|
469
|
+
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
|
+
s || (s = e.token), m(c, {
|
|
471
471
|
method: "PUT",
|
|
472
472
|
headers: {
|
|
473
473
|
ENO_CSRF_TOKEN: s
|
|
474
474
|
},
|
|
475
|
-
onComplete(
|
|
476
|
-
let a = JSON.parse(
|
|
475
|
+
onComplete(o) {
|
|
476
|
+
let a = JSON.parse(o);
|
|
477
477
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
478
478
|
try {
|
|
479
|
-
const
|
|
480
|
-
n && n(
|
|
481
|
-
} catch (
|
|
482
|
-
i && i(
|
|
479
|
+
const r = a.data[0].dataelements.ticketURL;
|
|
480
|
+
n && n(r);
|
|
481
|
+
} catch (r) {
|
|
482
|
+
i && i(r);
|
|
483
483
|
}
|
|
484
484
|
},
|
|
485
|
-
onFailure(
|
|
486
|
-
i && i(
|
|
485
|
+
onFailure(o) {
|
|
486
|
+
i && i(o);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function K(e, t, s, n, i,
|
|
490
|
+
function K(e, t, s, n, i, c = void 0, o = void 0) {
|
|
491
491
|
k(
|
|
492
492
|
e,
|
|
493
493
|
t,
|
|
@@ -499,18 +499,18 @@ function K(e, t, s, n, i, r = void 0, c = void 0) {
|
|
|
499
499
|
n,
|
|
500
500
|
i,
|
|
501
501
|
a.csrf.value,
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
c,
|
|
503
|
+
o
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function X(e, t, s, n, i,
|
|
509
|
-
const
|
|
510
|
-
m(
|
|
508
|
+
function X(e, t, s, n, i, c, o = void 0, a = void 0) {
|
|
509
|
+
const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
|
+
m(r, {
|
|
511
511
|
method: "PUT",
|
|
512
512
|
headers: {
|
|
513
|
-
ENO_CSRF_TOKEN:
|
|
513
|
+
ENO_CSRF_TOKEN: c
|
|
514
514
|
},
|
|
515
515
|
onComplete(d, l, p) {
|
|
516
516
|
const u = JSON.parse(d).data[0].dataelements, f = new FormData();
|
|
@@ -520,7 +520,7 @@ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
|
|
|
520
520
|
let S = "temp_" + Date.now(), _ = {
|
|
521
521
|
method: "PUT",
|
|
522
522
|
headers: {
|
|
523
|
-
ENO_CSRF_TOKEN:
|
|
523
|
+
ENO_CSRF_TOKEN: c
|
|
524
524
|
},
|
|
525
525
|
data: JSON.stringify({
|
|
526
526
|
data: [{
|
|
@@ -540,7 +540,7 @@ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
|
|
|
540
540
|
}),
|
|
541
541
|
type: "json",
|
|
542
542
|
onComplete(y) {
|
|
543
|
-
|
|
543
|
+
o && o(y);
|
|
544
544
|
},
|
|
545
545
|
onFailure(y) {
|
|
546
546
|
a && a(y);
|
|
@@ -556,14 +556,14 @@ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
async function ke(e, t, s, n, i = void 0,
|
|
560
|
-
const
|
|
559
|
+
async function ke(e, t, s, n, i = void 0, c = void 0) {
|
|
560
|
+
const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
561
561
|
type: "text/plain"
|
|
562
562
|
}), p = {
|
|
563
|
-
url_Ticket: `${
|
|
564
|
-
url_Post: `${
|
|
563
|
+
url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
564
|
+
url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
|
|
565
565
|
};
|
|
566
|
-
if (!
|
|
566
|
+
if (!o && o !== "") {
|
|
567
567
|
console.log("le store._3DSpace est vide");
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
@@ -578,8 +578,8 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
|
|
|
578
578
|
const S = {
|
|
579
579
|
method: "POST",
|
|
580
580
|
data: d,
|
|
581
|
-
onComplete(
|
|
582
|
-
if (
|
|
581
|
+
onComplete(C) {
|
|
582
|
+
if (r !== "" && a !== "") {
|
|
583
583
|
const F = {
|
|
584
584
|
method: "POST",
|
|
585
585
|
headers: {
|
|
@@ -599,7 +599,7 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
|
|
|
599
599
|
files: [{
|
|
600
600
|
dataelements: {
|
|
601
601
|
title: `${s}.json`,
|
|
602
|
-
receipt:
|
|
602
|
+
receipt: C
|
|
603
603
|
}
|
|
604
604
|
}]
|
|
605
605
|
},
|
|
@@ -611,29 +611,29 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
|
|
|
611
611
|
onComplete: _,
|
|
612
612
|
onFailure: y
|
|
613
613
|
};
|
|
614
|
-
|
|
614
|
+
r !== "" && m(p.url_Post, F);
|
|
615
615
|
} else
|
|
616
616
|
console.warn("le store est vide");
|
|
617
617
|
},
|
|
618
618
|
onFailure: y
|
|
619
619
|
};
|
|
620
|
-
function _(
|
|
621
|
-
console.log("Success -- response ",
|
|
620
|
+
function _(C) {
|
|
621
|
+
console.log("Success -- response ", C.data[0]), i && i(C);
|
|
622
622
|
}
|
|
623
|
-
function y(
|
|
624
|
-
console.log("Erreur -- response ",
|
|
625
|
-
headers `, F),
|
|
623
|
+
function y(C, F) {
|
|
624
|
+
console.log("Erreur -- response ", C, `
|
|
625
|
+
headers `, F), c && c(C);
|
|
626
626
|
}
|
|
627
627
|
m(h.ticketURL, S);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1) {
|
|
632
632
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
633
633
|
m(a, {
|
|
634
634
|
method: "GET",
|
|
635
|
-
onComplete(
|
|
636
|
-
const d = JSON.parse(
|
|
635
|
+
onComplete(r) {
|
|
636
|
+
const d = JSON.parse(r);
|
|
637
637
|
let l = "", p, u, f;
|
|
638
638
|
if (t) {
|
|
639
639
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -642,7 +642,7 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1
|
|
|
642
642
|
let h = g.couples;
|
|
643
643
|
h = h.filter(
|
|
644
644
|
(S, _, y) => _ === y.findIndex(
|
|
645
|
-
(
|
|
645
|
+
(C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
|
|
646
646
|
)
|
|
647
647
|
), s && (Array.isArray(s) ? s.forEach((S) => {
|
|
648
648
|
f || h.forEach((_) => {
|
|
@@ -650,9 +650,9 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1
|
|
|
650
650
|
f = S, u = n;
|
|
651
651
|
else if (S === _.role.name) {
|
|
652
652
|
let y = h.filter(
|
|
653
|
-
(
|
|
653
|
+
(C) => C.role.name === S
|
|
654
654
|
);
|
|
655
|
-
y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) :
|
|
655
|
+
y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
|
|
656
656
|
}
|
|
657
657
|
});
|
|
658
658
|
}) : h.forEach((S) => {
|
|
@@ -662,16 +662,16 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1
|
|
|
662
662
|
let _ = h.filter(
|
|
663
663
|
(y) => y.role.name === s
|
|
664
664
|
);
|
|
665
|
-
_.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) :
|
|
665
|
+
_.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
|
|
666
666
|
}
|
|
667
667
|
}));
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials &&
|
|
670
|
+
p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = f + "." + u + "." + p, c(l));
|
|
671
671
|
},
|
|
672
|
-
onFailure(
|
|
672
|
+
onFailure(r, d) {
|
|
673
673
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
674
|
-
err:
|
|
674
|
+
err: r,
|
|
675
675
|
headers: d
|
|
676
676
|
});
|
|
677
677
|
}
|
|
@@ -695,36 +695,36 @@ async function I(e, t = void 0, s = void 0) {
|
|
|
695
695
|
)), new Promise((n, i) => {
|
|
696
696
|
A(
|
|
697
697
|
e,
|
|
698
|
-
(
|
|
699
|
-
m(
|
|
698
|
+
(c) => {
|
|
699
|
+
m(c, {
|
|
700
700
|
headers: {
|
|
701
701
|
"Content-Type": "application/json",
|
|
702
702
|
Accept: "application/json"
|
|
703
703
|
},
|
|
704
704
|
onComplete(a) {
|
|
705
|
-
let
|
|
705
|
+
let r;
|
|
706
706
|
try {
|
|
707
|
-
|
|
707
|
+
r = JSON.parse(a);
|
|
708
708
|
} catch {
|
|
709
|
-
|
|
709
|
+
r = a;
|
|
710
710
|
}
|
|
711
|
-
t && t(
|
|
711
|
+
t && t(r), n(r);
|
|
712
712
|
},
|
|
713
|
-
onFailure(a,
|
|
713
|
+
onFailure(a, r, d) {
|
|
714
714
|
s && (console.log("error http", a), s({
|
|
715
715
|
msg: JSON.parse(a),
|
|
716
|
-
headers:
|
|
716
|
+
headers: r,
|
|
717
717
|
xhr: d
|
|
718
718
|
}), i({
|
|
719
719
|
msg: JSON.parse(a),
|
|
720
|
-
headers:
|
|
720
|
+
headers: r,
|
|
721
721
|
xhr: d
|
|
722
722
|
}));
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
725
|
},
|
|
726
|
-
(
|
|
727
|
-
s && s(
|
|
726
|
+
(c) => {
|
|
727
|
+
s && s(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
730
|
});
|
|
@@ -733,47 +733,47 @@ async function W(e, t, s = void 0, n = void 0) {
|
|
|
733
733
|
let i = [];
|
|
734
734
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
735
735
|
for (let a = 0; a < t.length; a += 80) {
|
|
736
|
-
const
|
|
737
|
-
i.push(
|
|
736
|
+
const r = t.slice(a, a + 80);
|
|
737
|
+
i.push(r);
|
|
738
738
|
}
|
|
739
|
-
const
|
|
739
|
+
const o = (a) => {
|
|
740
740
|
V(
|
|
741
741
|
e,
|
|
742
742
|
i[a],
|
|
743
743
|
() => {
|
|
744
|
-
a++, a < i.length &&
|
|
744
|
+
a++, a < i.length && o(a);
|
|
745
745
|
},
|
|
746
|
-
(
|
|
747
|
-
s && s(
|
|
746
|
+
(r) => {
|
|
747
|
+
s && s(r);
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
};
|
|
751
|
-
|
|
751
|
+
o(0);
|
|
752
752
|
} else
|
|
753
753
|
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
754
754
|
}
|
|
755
755
|
function V(e, t, s = void 0, n = void 0, i = void 0) {
|
|
756
|
-
const
|
|
757
|
-
t.forEach((
|
|
758
|
-
|
|
759
|
-
id:
|
|
756
|
+
const c = [];
|
|
757
|
+
t.forEach((r) => {
|
|
758
|
+
c.push({
|
|
759
|
+
id: r
|
|
760
760
|
});
|
|
761
761
|
});
|
|
762
|
-
let
|
|
762
|
+
let o = JSON.stringify({
|
|
763
763
|
csrf: {
|
|
764
764
|
name: "ENO_CSRF_TOKEN",
|
|
765
765
|
value: e.token
|
|
766
766
|
},
|
|
767
|
-
data:
|
|
767
|
+
data: c
|
|
768
768
|
});
|
|
769
769
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
770
770
|
m(a, {
|
|
771
771
|
method: "PUT",
|
|
772
|
-
data:
|
|
772
|
+
data: o,
|
|
773
773
|
type: "json",
|
|
774
|
-
onComplete(
|
|
775
|
-
const d =
|
|
776
|
-
|
|
774
|
+
onComplete(r) {
|
|
775
|
+
const d = r.data;
|
|
776
|
+
r.success === !0 && (s && s(), d.forEach((l) => {
|
|
777
777
|
try {
|
|
778
778
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
779
779
|
m(u, {
|
|
@@ -793,16 +793,16 @@ function V(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
793
793
|
}
|
|
794
794
|
}));
|
|
795
795
|
},
|
|
796
|
-
onFailure(
|
|
797
|
-
console.log(
|
|
796
|
+
onFailure(r) {
|
|
797
|
+
console.log(r), i && i(r);
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
801
|
function Fe(e, t, s = void 0, n = void 0) {
|
|
802
802
|
return new Promise((i) => {
|
|
803
|
-
if (e.token === "" &&
|
|
804
|
-
const
|
|
805
|
-
|
|
803
|
+
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
804
|
+
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
805
|
+
b(
|
|
806
806
|
e.space,
|
|
807
807
|
"ESPACE COMMUN",
|
|
808
808
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -812,7 +812,7 @@ function Fe(e, t, s = void 0, n = void 0) {
|
|
|
812
812
|
console.log("onError =>", a);
|
|
813
813
|
}
|
|
814
814
|
);
|
|
815
|
-
let
|
|
815
|
+
let o = {
|
|
816
816
|
method: "POST",
|
|
817
817
|
headers: {
|
|
818
818
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -833,22 +833,22 @@ function Fe(e, t, s = void 0, n = void 0) {
|
|
|
833
833
|
n && n(a);
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
|
-
m(
|
|
836
|
+
m(c, o);
|
|
837
837
|
}
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
840
|
function De(e, t, s, n = void 0, i = void 0) {
|
|
841
|
-
return new Promise((
|
|
842
|
-
if (e.token === "" &&
|
|
843
|
-
const
|
|
844
|
-
|
|
841
|
+
return new Promise((c) => {
|
|
842
|
+
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
843
|
+
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
844
|
+
b(
|
|
845
845
|
e.space,
|
|
846
846
|
"ESPACE COMMUN",
|
|
847
847
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
848
848
|
void 0,
|
|
849
|
-
(
|
|
850
|
-
(
|
|
851
|
-
console.log("onError =>",
|
|
849
|
+
(r) => e.ctx = r,
|
|
850
|
+
(r) => {
|
|
851
|
+
console.log("onError =>", r);
|
|
852
852
|
}
|
|
853
853
|
);
|
|
854
854
|
let a = {
|
|
@@ -866,22 +866,22 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
866
866
|
}]
|
|
867
867
|
}),
|
|
868
868
|
type: "json",
|
|
869
|
-
onComplete(
|
|
870
|
-
n && n(
|
|
869
|
+
onComplete(r) {
|
|
870
|
+
n && n(r);
|
|
871
871
|
},
|
|
872
|
-
onFailure(
|
|
873
|
-
i && i(
|
|
872
|
+
onFailure(r) {
|
|
873
|
+
i && i(r);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
m(
|
|
876
|
+
m(o, a);
|
|
877
877
|
}
|
|
878
878
|
});
|
|
879
879
|
}
|
|
880
880
|
function Ae(e, t, s = void 0, n = void 0) {
|
|
881
881
|
return new Promise((i) => {
|
|
882
|
-
if (e.token === "" &&
|
|
883
|
-
const
|
|
884
|
-
|
|
882
|
+
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
883
|
+
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
884
|
+
b(
|
|
885
885
|
e.space,
|
|
886
886
|
"ESPACE COMMUN",
|
|
887
887
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -891,7 +891,7 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
891
891
|
console.log("onError =>", a);
|
|
892
892
|
}
|
|
893
893
|
);
|
|
894
|
-
let
|
|
894
|
+
let o = {
|
|
895
895
|
method: "POST",
|
|
896
896
|
headers: {
|
|
897
897
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -912,15 +912,15 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
912
912
|
n && n(a);
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
|
-
m(
|
|
915
|
+
m(c, o);
|
|
916
916
|
}
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
function $e(e, t, s = void 0, n = void 0) {
|
|
920
920
|
return new Promise((i) => {
|
|
921
|
-
if (e.token === "" &&
|
|
922
|
-
const
|
|
923
|
-
|
|
921
|
+
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
922
|
+
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
923
|
+
b(
|
|
924
924
|
e.space,
|
|
925
925
|
"ESPACE COMMUN",
|
|
926
926
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -930,7 +930,7 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
930
930
|
console.log("onError =>", a);
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
let
|
|
933
|
+
let o = {
|
|
934
934
|
method: "POST",
|
|
935
935
|
headers: {
|
|
936
936
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -957,22 +957,22 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
957
957
|
n && n(a);
|
|
958
958
|
}
|
|
959
959
|
};
|
|
960
|
-
m(
|
|
960
|
+
m(c, o);
|
|
961
961
|
}
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
964
|
function Ue(e, t, s, n = void 0, i = void 0) {
|
|
965
|
-
return new Promise((
|
|
966
|
-
if (e.token === "" &&
|
|
967
|
-
const
|
|
968
|
-
|
|
965
|
+
return new Promise((c) => {
|
|
966
|
+
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
967
|
+
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
968
|
+
b(
|
|
969
969
|
e.space,
|
|
970
970
|
"ESPACE COMMUN",
|
|
971
971
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
972
972
|
void 0,
|
|
973
|
-
(
|
|
974
|
-
(
|
|
975
|
-
console.log("onError =>",
|
|
973
|
+
(r) => e.ctx = r,
|
|
974
|
+
(r) => {
|
|
975
|
+
console.log("onError =>", r);
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
978
|
let a = {
|
|
@@ -995,66 +995,73 @@ function Ue(e, t, s, n = void 0, i = void 0) {
|
|
|
995
995
|
notificationTimeout: 600
|
|
996
996
|
}),
|
|
997
997
|
type: "json",
|
|
998
|
-
onComplete(
|
|
999
|
-
n && n(
|
|
998
|
+
onComplete(r) {
|
|
999
|
+
n && n(r);
|
|
1000
1000
|
},
|
|
1001
|
-
onFailure(
|
|
1002
|
-
i && i(
|
|
1001
|
+
onFailure(r) {
|
|
1002
|
+
i && i(r);
|
|
1003
1003
|
}
|
|
1004
1004
|
};
|
|
1005
|
-
m(
|
|
1005
|
+
m(o, a);
|
|
1006
1006
|
}
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
1009
|
function je(e, t, s = void 0, n = void 0) {
|
|
1010
1010
|
return new Promise((i) => {
|
|
1011
|
-
if (e.token === "" &&
|
|
1012
|
-
const
|
|
1013
|
-
`${e.space}
|
|
1014
|
-
const c = `${e._3DSearch}/federated/search?xrequestedwith=xmlhttprequest&tenant=${e._platformId}×tamp=${r}`;
|
|
1015
|
-
let a = {
|
|
1016
|
-
method: "POST",
|
|
1017
|
-
headers: {
|
|
1018
|
-
Accept: "application/json",
|
|
1019
|
-
"Content-Type": "application/json"
|
|
1020
|
-
},
|
|
1021
|
-
data: JSON.stringify({
|
|
1022
|
-
with_indexing_date: !0,
|
|
1023
|
-
with_nls: !1,
|
|
1024
|
-
label: `yus-${r}`,
|
|
1025
|
-
locale: "en",
|
|
1026
|
-
select_predicate: [
|
|
1027
|
-
"ds6w:label",
|
|
1028
|
-
"ds6w:type",
|
|
1029
|
-
"ds6w:description",
|
|
1030
|
-
"ds6w:identifier",
|
|
1031
|
-
"ds6w:responsible",
|
|
1032
|
-
"ds6wg:fullname"
|
|
1033
|
-
],
|
|
1034
|
-
select_file: [
|
|
1035
|
-
"icon",
|
|
1036
|
-
"thumbnail_2d"
|
|
1037
|
-
],
|
|
1038
|
-
query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
|
|
1039
|
-
order_by: "desc",
|
|
1040
|
-
order_field: "relevance",
|
|
1041
|
-
nresults: 1e3,
|
|
1042
|
-
start: "0",
|
|
1043
|
-
source: [
|
|
1044
|
-
"3dspace",
|
|
1045
|
-
"usersgroup"
|
|
1046
|
-
],
|
|
1047
|
-
tenant: e._platformId
|
|
1048
|
-
}),
|
|
1049
|
-
type: "json",
|
|
1011
|
+
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1012
|
+
const c = N.now().ts;
|
|
1013
|
+
`${e.space}`, m(`https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e._platformId}`, {
|
|
1050
1014
|
onComplete(o) {
|
|
1051
|
-
|
|
1015
|
+
if (Array.isArray(JSON.parse(o))) {
|
|
1016
|
+
const r = `${JSON.parse(o)[0].service[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e._platformId}×tamp=${c}`;
|
|
1017
|
+
m(r, {
|
|
1018
|
+
method: "POST",
|
|
1019
|
+
headers: {
|
|
1020
|
+
Accept: "application/json",
|
|
1021
|
+
"Content-Type": "application/json"
|
|
1022
|
+
},
|
|
1023
|
+
data: JSON.stringify({
|
|
1024
|
+
with_indexing_date: !0,
|
|
1025
|
+
with_nls: !1,
|
|
1026
|
+
label: `yus-${c}`,
|
|
1027
|
+
locale: "en",
|
|
1028
|
+
select_predicate: [
|
|
1029
|
+
"ds6w:label",
|
|
1030
|
+
"ds6w:type",
|
|
1031
|
+
"ds6w:description",
|
|
1032
|
+
"ds6w:identifier",
|
|
1033
|
+
"ds6w:responsible",
|
|
1034
|
+
"ds6wg:fullname"
|
|
1035
|
+
],
|
|
1036
|
+
select_file: [
|
|
1037
|
+
"icon",
|
|
1038
|
+
"thumbnail_2d"
|
|
1039
|
+
],
|
|
1040
|
+
query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
|
|
1041
|
+
order_by: "desc",
|
|
1042
|
+
order_field: "relevance",
|
|
1043
|
+
nresults: 1e3,
|
|
1044
|
+
start: "0",
|
|
1045
|
+
source: [
|
|
1046
|
+
"3dspace",
|
|
1047
|
+
"usersgroup"
|
|
1048
|
+
],
|
|
1049
|
+
tenant: e._platformId
|
|
1050
|
+
}),
|
|
1051
|
+
type: "json",
|
|
1052
|
+
onComplete(d) {
|
|
1053
|
+
s && s(d);
|
|
1054
|
+
},
|
|
1055
|
+
onFailure(d) {
|
|
1056
|
+
n && n(d);
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1052
1060
|
},
|
|
1053
1061
|
onFailure(o) {
|
|
1054
1062
|
n && n(o);
|
|
1055
1063
|
}
|
|
1056
|
-
}
|
|
1057
|
-
JSON.stringify({
|
|
1064
|
+
}), JSON.stringify({
|
|
1058
1065
|
csrf: {
|
|
1059
1066
|
name: "ENO_CSRF_TOKEN",
|
|
1060
1067
|
value: e.token
|
|
@@ -1070,7 +1077,7 @@ function je(e, t, s = void 0, n = void 0) {
|
|
|
1070
1077
|
},
|
|
1071
1078
|
tenant: e.tenant
|
|
1072
1079
|
}]
|
|
1073
|
-
})
|
|
1080
|
+
});
|
|
1074
1081
|
}
|
|
1075
1082
|
});
|
|
1076
1083
|
}
|
|
@@ -1087,12 +1094,12 @@ function Re(e, t = void 0, s = void 0) {
|
|
|
1087
1094
|
Accept: "application/json,text/javascript,*/*",
|
|
1088
1095
|
"Content-Type": "application/ds-json"
|
|
1089
1096
|
},
|
|
1090
|
-
onComplete(
|
|
1091
|
-
const a = JSON.parse(
|
|
1092
|
-
t && t(a,
|
|
1097
|
+
onComplete(c, o) {
|
|
1098
|
+
const a = JSON.parse(c);
|
|
1099
|
+
t && t(a, o);
|
|
1093
1100
|
},
|
|
1094
|
-
onFailure(
|
|
1095
|
-
s && s({ response:
|
|
1101
|
+
onFailure(c, o, a) {
|
|
1102
|
+
s && s({ response: c, headers: o, xhr: a });
|
|
1096
1103
|
}
|
|
1097
1104
|
});
|
|
1098
1105
|
}
|
|
@@ -1103,11 +1110,11 @@ function Ie(e, t, s, n) {
|
|
|
1103
1110
|
(i) => {
|
|
1104
1111
|
m(i, {
|
|
1105
1112
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1106
|
-
onComplete: (
|
|
1107
|
-
s && s(
|
|
1113
|
+
onComplete: (c) => {
|
|
1114
|
+
s && s(c);
|
|
1108
1115
|
},
|
|
1109
|
-
onFailure: (
|
|
1110
|
-
console.log("error http",
|
|
1116
|
+
onFailure: (c) => {
|
|
1117
|
+
console.log("error http", c), n && n(c);
|
|
1111
1118
|
}
|
|
1112
1119
|
});
|
|
1113
1120
|
}
|
|
@@ -1115,29 +1122,29 @@ function Ie(e, t, s, n) {
|
|
|
1115
1122
|
}
|
|
1116
1123
|
async function ve(e, t, s = void 0, n = void 0) {
|
|
1117
1124
|
return new Promise((i) => {
|
|
1118
|
-
A(e, t, (
|
|
1119
|
-
m(
|
|
1120
|
-
onComplete: (
|
|
1121
|
-
onFailure: (
|
|
1122
|
-
n && n(
|
|
1125
|
+
A(e, t, (c) => {
|
|
1126
|
+
m(c, {
|
|
1127
|
+
onComplete: (o, a, r) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, r), i),
|
|
1128
|
+
onFailure: (o, a, r) => {
|
|
1129
|
+
n && n(o, a, r), console.log(o, a?.errormsg);
|
|
1123
1130
|
}
|
|
1124
1131
|
});
|
|
1125
1132
|
});
|
|
1126
1133
|
});
|
|
1127
1134
|
}
|
|
1128
1135
|
function Pe(e, t, s, n = void 0, i = void 0) {
|
|
1129
|
-
const
|
|
1136
|
+
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1130
1137
|
k(
|
|
1131
1138
|
e,
|
|
1132
1139
|
s,
|
|
1133
|
-
(
|
|
1134
|
-
const a =
|
|
1140
|
+
(o) => {
|
|
1141
|
+
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;
|
|
1135
1142
|
K(
|
|
1136
1143
|
e,
|
|
1137
1144
|
s,
|
|
1138
1145
|
a,
|
|
1146
|
+
c,
|
|
1139
1147
|
r,
|
|
1140
|
-
o,
|
|
1141
1148
|
(d) => {
|
|
1142
1149
|
n && n(d);
|
|
1143
1150
|
},
|
|
@@ -1159,7 +1166,7 @@ async function xe(e, t = void 0, s = void 0) {
|
|
|
1159
1166
|
(n) => {
|
|
1160
1167
|
s && s(n);
|
|
1161
1168
|
}
|
|
1162
|
-
) : (e.objID === null || e.objID === "") &&
|
|
1169
|
+
) : (e.objID === null || e.objID === "") && T(
|
|
1163
1170
|
e,
|
|
1164
1171
|
(n) => {
|
|
1165
1172
|
t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
|
|
@@ -1187,12 +1194,12 @@ function Le(e, t = void 0, s = void 0) {
|
|
|
1187
1194
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1188
1195
|
return;
|
|
1189
1196
|
}
|
|
1190
|
-
e.objIds.forEach((i,
|
|
1197
|
+
e.objIds.forEach((i, c) => {
|
|
1191
1198
|
I(
|
|
1192
1199
|
e,
|
|
1193
1200
|
i.objID,
|
|
1194
|
-
(
|
|
1195
|
-
n.push({ [i.name]:
|
|
1201
|
+
(o) => {
|
|
1202
|
+
n.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
|
|
1196
1203
|
}
|
|
1197
1204
|
);
|
|
1198
1205
|
});
|
|
@@ -1202,8 +1209,8 @@ function B(e, t, s = void 0, n = void 0) {
|
|
|
1202
1209
|
e,
|
|
1203
1210
|
v,
|
|
1204
1211
|
(i) => {
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1212
|
+
const c = [...t];
|
|
1213
|
+
c.find((o) => o.objectID === i.objectId).data = i.data, P = c, $.push(i.data), s && s($);
|
|
1207
1214
|
},
|
|
1208
1215
|
(i) => {
|
|
1209
1216
|
n && (n(i), console.log(i));
|
|
@@ -1231,21 +1238,21 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
|
|
|
1231
1238
|
tag: "testTag"
|
|
1232
1239
|
};
|
|
1233
1240
|
function Je(e, t, s = void 0, n = void 0) {
|
|
1234
|
-
const { space: i, tenant:
|
|
1241
|
+
const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
|
|
1235
1242
|
uri: "/resources/6w/tags",
|
|
1236
1243
|
otpCTX: "SecurityContext=preferred",
|
|
1237
|
-
optTenant: `tenant=${
|
|
1244
|
+
optTenant: `tenant=${c}`
|
|
1238
1245
|
}, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1239
1246
|
tag: [
|
|
1240
1247
|
{
|
|
1241
1248
|
subject: [
|
|
1242
1249
|
{
|
|
1243
|
-
uri: `pid://${
|
|
1250
|
+
uri: `pid://${o}`
|
|
1244
1251
|
}
|
|
1245
1252
|
],
|
|
1246
1253
|
predicate: x[a],
|
|
1247
1254
|
object: {
|
|
1248
|
-
literal:
|
|
1255
|
+
literal: r
|
|
1249
1256
|
}
|
|
1250
1257
|
}
|
|
1251
1258
|
]
|
|
@@ -1263,7 +1270,7 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1263
1270
|
setTimeout(() => {
|
|
1264
1271
|
G(
|
|
1265
1272
|
e,
|
|
1266
|
-
|
|
1273
|
+
o,
|
|
1267
1274
|
(g) => {
|
|
1268
1275
|
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;
|
|
1269
1276
|
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, z(
|
|
@@ -1292,17 +1299,17 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1292
1299
|
}
|
|
1293
1300
|
function z(e, t, s = void 0, n = void 0) {
|
|
1294
1301
|
console.log("obj ", t);
|
|
1295
|
-
const i = t.info.name,
|
|
1302
|
+
const i = t.info.name, c = {
|
|
1296
1303
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1297
1304
|
uri: "/federated/search"
|
|
1298
|
-
},
|
|
1305
|
+
}, o = `${c.baseUrl}${c.uri}`, a = {
|
|
1299
1306
|
"Content-Type": "application/json",
|
|
1300
1307
|
Accept: "application/json,text/javascript,*/*"
|
|
1301
|
-
},
|
|
1308
|
+
}, r = R(), d = {
|
|
1302
1309
|
with_indexing_date: !0,
|
|
1303
1310
|
with_synthesis: !0,
|
|
1304
1311
|
with_nls: !1,
|
|
1305
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1312
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
|
|
1306
1313
|
locale: "fr",
|
|
1307
1314
|
select_predicate: [
|
|
1308
1315
|
"ds6w:label",
|
|
@@ -1359,7 +1366,7 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1359
1366
|
}
|
|
1360
1367
|
}
|
|
1361
1368
|
};
|
|
1362
|
-
console.log("dataPattern => ", d), m(
|
|
1369
|
+
console.log("dataPattern => ", d), m(o, {
|
|
1363
1370
|
method: "POST",
|
|
1364
1371
|
headers: a,
|
|
1365
1372
|
data: JSON.stringify(d),
|
|
@@ -1374,11 +1381,11 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1374
1381
|
});
|
|
1375
1382
|
}
|
|
1376
1383
|
function Ee(e, t, s = void 0, n = void 0) {
|
|
1377
|
-
const { objId: i, pred:
|
|
1384
|
+
const { objId: i, pred: c, tag: o } = t, a = {
|
|
1378
1385
|
uri: "/resources/6w/tags",
|
|
1379
1386
|
otpCTX: "SecurityContext=preferred",
|
|
1380
1387
|
optTenant: `tenant=${e.tenant}`
|
|
1381
|
-
},
|
|
1388
|
+
}, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1382
1389
|
tag: [
|
|
1383
1390
|
{
|
|
1384
1391
|
subject: [
|
|
@@ -1386,14 +1393,14 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1386
1393
|
uri: `pid://${i}`
|
|
1387
1394
|
}
|
|
1388
1395
|
],
|
|
1389
|
-
predicate: x[
|
|
1396
|
+
predicate: x[c],
|
|
1390
1397
|
object: {
|
|
1391
|
-
literal:
|
|
1398
|
+
literal: o
|
|
1392
1399
|
}
|
|
1393
1400
|
}
|
|
1394
1401
|
]
|
|
1395
1402
|
};
|
|
1396
|
-
m(
|
|
1403
|
+
m(r, {
|
|
1397
1404
|
method: "DELETE",
|
|
1398
1405
|
data: JSON.stringify(d),
|
|
1399
1406
|
headers: {
|
|
@@ -1413,16 +1420,16 @@ function Ge(e, t = "", s = void 0, n = void 0) {
|
|
|
1413
1420
|
const { space: i } = e;
|
|
1414
1421
|
if (t === "")
|
|
1415
1422
|
return;
|
|
1416
|
-
const
|
|
1423
|
+
const c = {
|
|
1417
1424
|
uri: "/resources/v1/modeler/documents"
|
|
1418
|
-
},
|
|
1425
|
+
}, o = {
|
|
1419
1426
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1420
1427
|
Accept: "application/json,text/javascript,*/*"
|
|
1421
|
-
}, a = `${i}${
|
|
1428
|
+
}, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
|
|
1422
1429
|
m(a, {
|
|
1423
1430
|
method: "POST",
|
|
1424
|
-
headers:
|
|
1425
|
-
data:
|
|
1431
|
+
headers: o,
|
|
1432
|
+
data: r,
|
|
1426
1433
|
onComplete(d) {
|
|
1427
1434
|
s && s(JSON.parse(d));
|
|
1428
1435
|
},
|
|
@@ -1435,7 +1442,7 @@ function Ge(e, t = "", s = void 0, n = void 0) {
|
|
|
1435
1442
|
async function w(e, t = void 0, s = void 0) {
|
|
1436
1443
|
const n = e.space + "/api/index/tk";
|
|
1437
1444
|
return m(n, {
|
|
1438
|
-
onComplete(i,
|
|
1445
|
+
onComplete(i, c, o) {
|
|
1439
1446
|
const a = JSON.parse(i);
|
|
1440
1447
|
if (t)
|
|
1441
1448
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1456,21 +1463,21 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1456
1463
|
start: 0
|
|
1457
1464
|
}
|
|
1458
1465
|
};
|
|
1459
|
-
w(e, (
|
|
1466
|
+
w(e, (c) => {
|
|
1460
1467
|
m(n, {
|
|
1461
1468
|
method: "POST",
|
|
1462
1469
|
headers: {
|
|
1463
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1470
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1464
1471
|
"Content-type": "application/json;charset=UTF-8",
|
|
1465
1472
|
Accept: "application/json"
|
|
1466
1473
|
},
|
|
1467
1474
|
data: JSON.stringify(i),
|
|
1468
1475
|
type: "json",
|
|
1469
|
-
onComplete(
|
|
1470
|
-
t && t(
|
|
1476
|
+
onComplete(o, a) {
|
|
1477
|
+
t && t(o, a);
|
|
1471
1478
|
},
|
|
1472
|
-
onFailure(
|
|
1473
|
-
s && s(
|
|
1479
|
+
onFailure(o, a) {
|
|
1480
|
+
s && s(o, a);
|
|
1474
1481
|
}
|
|
1475
1482
|
});
|
|
1476
1483
|
});
|
|
@@ -1485,22 +1492,22 @@ function Xe(e, t = void 0, s = void 0) {
|
|
|
1485
1492
|
maxNbOfCommonElements: "5"
|
|
1486
1493
|
}
|
|
1487
1494
|
};
|
|
1488
|
-
w(e, (
|
|
1495
|
+
w(e, (c) => {
|
|
1489
1496
|
m(n, {
|
|
1490
1497
|
method: "POST",
|
|
1491
1498
|
headers: {
|
|
1492
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1499
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1493
1500
|
"Content-type": "application/json;charset=UTF-8",
|
|
1494
1501
|
Accept: "application/json"
|
|
1495
1502
|
},
|
|
1496
1503
|
data: JSON.stringify(i),
|
|
1497
1504
|
type: "json",
|
|
1498
|
-
onComplete(
|
|
1499
|
-
const
|
|
1500
|
-
t && t(
|
|
1505
|
+
onComplete(o, a) {
|
|
1506
|
+
const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1507
|
+
t && t(r, o);
|
|
1501
1508
|
},
|
|
1502
|
-
onFailure(
|
|
1503
|
-
s && s(
|
|
1509
|
+
onFailure(o, a) {
|
|
1510
|
+
s && s(o, a);
|
|
1504
1511
|
}
|
|
1505
1512
|
});
|
|
1506
1513
|
});
|
|
@@ -1511,14 +1518,14 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1511
1518
|
uri: "/api/community/listmycommunities",
|
|
1512
1519
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1513
1520
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1514
|
-
}, i = `${n.base}${n.uri}${n.limit}${n.page}`,
|
|
1515
|
-
w(e, (
|
|
1521
|
+
}, i = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
|
|
1522
|
+
w(e, (o) => {
|
|
1516
1523
|
m(i, {
|
|
1517
1524
|
method: "GET",
|
|
1518
1525
|
headers: {
|
|
1519
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1526
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1520
1527
|
},
|
|
1521
|
-
onComplete(a,
|
|
1528
|
+
onComplete(a, r, d) {
|
|
1522
1529
|
const p = JSON.parse(a).result;
|
|
1523
1530
|
let u = 0;
|
|
1524
1531
|
p.forEach((f) => {
|
|
@@ -1534,43 +1541,43 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1534
1541
|
e,
|
|
1535
1542
|
f.id,
|
|
1536
1543
|
(h) => {
|
|
1537
|
-
u++, g.members = h,
|
|
1544
|
+
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1538
1545
|
},
|
|
1539
1546
|
(h) => s(h)
|
|
1540
1547
|
);
|
|
1541
1548
|
});
|
|
1542
1549
|
},
|
|
1543
|
-
onFailure(a,
|
|
1550
|
+
onFailure(a, r) {
|
|
1544
1551
|
const d = a;
|
|
1545
|
-
d.status =
|
|
1552
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1546
1553
|
}
|
|
1547
1554
|
});
|
|
1548
1555
|
});
|
|
1549
1556
|
}
|
|
1550
1557
|
function Q(e, t, s, n) {
|
|
1551
|
-
const i = `${e.space}/api/community/listmembers`,
|
|
1558
|
+
const i = `${e.space}/api/community/listmembers`, c = {
|
|
1552
1559
|
params: {
|
|
1553
1560
|
page: e.page ? e.page : 1,
|
|
1554
1561
|
limit: e.limit ? e.limit : 50,
|
|
1555
1562
|
community_id: t
|
|
1556
1563
|
}
|
|
1557
1564
|
};
|
|
1558
|
-
w(e, (
|
|
1565
|
+
w(e, (o) => {
|
|
1559
1566
|
m(i, {
|
|
1560
1567
|
method: "POST",
|
|
1561
1568
|
headers: {
|
|
1562
1569
|
"Content-type": "application/json;charset=UTF-8",
|
|
1563
1570
|
Accept: "application/json",
|
|
1564
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1571
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1565
1572
|
},
|
|
1566
|
-
data: JSON.stringify(
|
|
1573
|
+
data: JSON.stringify(c),
|
|
1567
1574
|
type: "json",
|
|
1568
|
-
onComplete(a,
|
|
1575
|
+
onComplete(a, r, d) {
|
|
1569
1576
|
s && s(a);
|
|
1570
1577
|
},
|
|
1571
|
-
onFailure(a,
|
|
1578
|
+
onFailure(a, r) {
|
|
1572
1579
|
const d = a;
|
|
1573
|
-
d.status =
|
|
1580
|
+
d.status = r.status, d.response = r.errormsg, n && n(d);
|
|
1574
1581
|
}
|
|
1575
1582
|
});
|
|
1576
1583
|
});
|
|
@@ -1579,31 +1586,31 @@ function Ve(e, t = void 0, s = void 0) {
|
|
|
1579
1586
|
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1580
1587
|
e.commu_id || (e.commu_id = n);
|
|
1581
1588
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1582
|
-
w(e, (
|
|
1589
|
+
w(e, (c) => {
|
|
1583
1590
|
m(i, {
|
|
1584
1591
|
method: "GET",
|
|
1585
1592
|
headers: {
|
|
1586
1593
|
"Content-type": "application/json;charset=UTF-8",
|
|
1587
1594
|
Accept: "application/json",
|
|
1588
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1595
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1589
1596
|
},
|
|
1590
|
-
onComplete(
|
|
1591
|
-
const a = JSON.parse(
|
|
1597
|
+
onComplete(o) {
|
|
1598
|
+
const a = JSON.parse(o);
|
|
1592
1599
|
t && t(a);
|
|
1593
1600
|
},
|
|
1594
|
-
onFailure(
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1601
|
+
onFailure(o, a) {
|
|
1602
|
+
const r = o;
|
|
1603
|
+
r.status = a.status, r.response = a.errormsg, s && s(r);
|
|
1597
1604
|
}
|
|
1598
1605
|
});
|
|
1599
1606
|
});
|
|
1600
1607
|
}
|
|
1601
1608
|
function Be(e, t, s = void 0, n = void 0) {
|
|
1602
|
-
const { listAllContacts: i, currentUser:
|
|
1609
|
+
const { listAllContacts: i, currentUser: c } = e;
|
|
1603
1610
|
console.log("__listAllContacts", i.hits);
|
|
1604
|
-
const
|
|
1605
|
-
users: [
|
|
1606
|
-
},
|
|
1611
|
+
const o = `${e.space}/api/directmessages`, a = {
|
|
1612
|
+
users: [c.login].concat(t.receipt)
|
|
1613
|
+
}, r = {
|
|
1607
1614
|
id_msg: "",
|
|
1608
1615
|
senderId: e.currentUser.login,
|
|
1609
1616
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1613,14 +1620,14 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1613
1620
|
Z(
|
|
1614
1621
|
a.users,
|
|
1615
1622
|
(l) => {
|
|
1616
|
-
l !== void 0 && (
|
|
1623
|
+
l !== void 0 && (r.id_msg = l.id, d = !0, U(e, r));
|
|
1617
1624
|
},
|
|
1618
1625
|
(l) => {
|
|
1619
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l),
|
|
1626
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), r.id_msg = "";
|
|
1620
1627
|
}
|
|
1621
1628
|
), d === !1 && setTimeout(() => {
|
|
1622
1629
|
d === !1 && w(e, (l) => {
|
|
1623
|
-
m(
|
|
1630
|
+
m(o, {
|
|
1624
1631
|
method: "POST",
|
|
1625
1632
|
headers: {
|
|
1626
1633
|
"Content-Type": "application/json",
|
|
@@ -1631,7 +1638,7 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1631
1638
|
type: "json",
|
|
1632
1639
|
onComplete(p, u, f) {
|
|
1633
1640
|
const g = p;
|
|
1634
|
-
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g),
|
|
1641
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), r.id_msg = g.result.id, U(e, r);
|
|
1635
1642
|
},
|
|
1636
1643
|
onFailure(p, u, f) {
|
|
1637
1644
|
const g = p;
|
|
@@ -1643,19 +1650,19 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1643
1650
|
}
|
|
1644
1651
|
function Z(e, t, s, n) {
|
|
1645
1652
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1646
|
-
w(e, (
|
|
1653
|
+
w(e, (c) => {
|
|
1647
1654
|
m(i, {
|
|
1648
1655
|
method: "GET",
|
|
1649
1656
|
headers: {
|
|
1650
1657
|
Accept: "application/json,text/javascript,*/*",
|
|
1651
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1658
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1652
1659
|
},
|
|
1653
|
-
onComplete(
|
|
1654
|
-
const a = JSON.parse(
|
|
1660
|
+
onComplete(o) {
|
|
1661
|
+
const a = JSON.parse(o), r = [];
|
|
1655
1662
|
a.result.forEach((p) => {
|
|
1656
|
-
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length &&
|
|
1663
|
+
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
|
|
1657
1664
|
});
|
|
1658
|
-
const d = t.sort(), l =
|
|
1665
|
+
const d = t.sort(), l = r.find((p) => {
|
|
1659
1666
|
const u = [];
|
|
1660
1667
|
return p.users.forEach((f) => {
|
|
1661
1668
|
u.push(f.login);
|
|
@@ -1663,8 +1670,8 @@ function Z(e, t, s, n) {
|
|
|
1663
1670
|
});
|
|
1664
1671
|
s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
|
|
1665
1672
|
},
|
|
1666
|
-
onFailure(
|
|
1667
|
-
const a =
|
|
1673
|
+
onFailure(o) {
|
|
1674
|
+
const a = o;
|
|
1668
1675
|
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
|
|
1669
1676
|
}
|
|
1670
1677
|
});
|
|
@@ -1676,7 +1683,7 @@ function U(e, t, s = void 0, n = void 0) {
|
|
|
1676
1683
|
uri: "/api/community",
|
|
1677
1684
|
id_msg: `${t.id_msg}`,
|
|
1678
1685
|
endUri: "/instantmessages"
|
|
1679
|
-
},
|
|
1686
|
+
}, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
|
|
1680
1687
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1681
1688
|
accessState: null,
|
|
1682
1689
|
commentUri: null,
|
|
@@ -1686,22 +1693,22 @@ function U(e, t, s = void 0, n = void 0) {
|
|
|
1686
1693
|
parentCommentUri: null,
|
|
1687
1694
|
richMessage: t.msg
|
|
1688
1695
|
};
|
|
1689
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1690
|
-
m(
|
|
1696
|
+
console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
|
|
1697
|
+
m(c, {
|
|
1691
1698
|
method: "POST",
|
|
1692
1699
|
headers: {
|
|
1693
1700
|
"Content-Type": "application/json",
|
|
1694
1701
|
Accept: "application/json",
|
|
1695
1702
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1696
1703
|
},
|
|
1697
|
-
data: JSON.stringify(
|
|
1704
|
+
data: JSON.stringify(o),
|
|
1698
1705
|
type: "json",
|
|
1699
|
-
onComplete(
|
|
1700
|
-
const p =
|
|
1706
|
+
onComplete(r, d, l) {
|
|
1707
|
+
const p = r;
|
|
1701
1708
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1702
1709
|
},
|
|
1703
|
-
onFailure(
|
|
1704
|
-
const l =
|
|
1710
|
+
onFailure(r, d) {
|
|
1711
|
+
const l = r;
|
|
1705
1712
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1706
1713
|
}
|
|
1707
1714
|
});
|
|
@@ -1725,15 +1732,15 @@ const te = {
|
|
|
1725
1732
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1726
1733
|
};
|
|
1727
1734
|
function Ye(e, t, s = void 0, n = void 0) {
|
|
1728
|
-
const i = `${e.space}/api/idea/add`,
|
|
1729
|
-
(
|
|
1730
|
-
),
|
|
1731
|
-
(
|
|
1735
|
+
const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1736
|
+
(r) => r.id === t.community_id
|
|
1737
|
+
), o = e.swymCommunities.find(
|
|
1738
|
+
(r) => r.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1732
1739
|
), a = {
|
|
1733
1740
|
params: {
|
|
1734
1741
|
title: t.title,
|
|
1735
1742
|
// String, le nom de l'affaire
|
|
1736
|
-
community_id:
|
|
1743
|
+
community_id: c?.id !== void 0 ? c.id : o.id,
|
|
1737
1744
|
// String, l'id de la communauté
|
|
1738
1745
|
message: ne(t.text_html),
|
|
1739
1746
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1741,11 +1748,11 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1741
1748
|
// 1 publier, 0 non publier
|
|
1742
1749
|
}
|
|
1743
1750
|
};
|
|
1744
|
-
w(e, (
|
|
1751
|
+
w(e, (r) => {
|
|
1745
1752
|
const d = {
|
|
1746
1753
|
"Content-type": "application/json;charset=UTF-8",
|
|
1747
1754
|
Accept: "application/json",
|
|
1748
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1755
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1749
1756
|
};
|
|
1750
1757
|
m(i, {
|
|
1751
1758
|
method: "POST",
|
|
@@ -1764,28 +1771,28 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1764
1771
|
});
|
|
1765
1772
|
}
|
|
1766
1773
|
function qe(e, t, s = void 0, n = void 0) {
|
|
1767
|
-
const i = `${e.space}/api/idea/delete`,
|
|
1774
|
+
const i = `${e.space}/api/idea/delete`, c = {
|
|
1768
1775
|
params: {
|
|
1769
1776
|
community_id: t.community_id,
|
|
1770
1777
|
ideationIds: [t.idee_id]
|
|
1771
1778
|
}
|
|
1772
1779
|
};
|
|
1773
|
-
w(e, (
|
|
1780
|
+
w(e, (o) => {
|
|
1774
1781
|
m(i, {
|
|
1775
1782
|
method: "POST",
|
|
1776
1783
|
headers: {
|
|
1777
1784
|
"Content-type": "application/json;charset=UTF-8",
|
|
1778
1785
|
Accept: "application/json",
|
|
1779
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1786
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1780
1787
|
},
|
|
1781
|
-
data: JSON.stringify(
|
|
1788
|
+
data: JSON.stringify(c),
|
|
1782
1789
|
type: "json",
|
|
1783
|
-
onComplete(a,
|
|
1790
|
+
onComplete(a, r, d) {
|
|
1784
1791
|
s && s(a);
|
|
1785
1792
|
},
|
|
1786
|
-
onFailure(a,
|
|
1793
|
+
onFailure(a, r, d) {
|
|
1787
1794
|
const l = a;
|
|
1788
|
-
l.status =
|
|
1795
|
+
l.status = r.status, l.response = r.errormsg, n && n(l);
|
|
1789
1796
|
}
|
|
1790
1797
|
});
|
|
1791
1798
|
});
|
|
@@ -1793,27 +1800,27 @@ function qe(e, t, s = void 0, n = void 0) {
|
|
|
1793
1800
|
function He(e, t = "", s = void 0, n = void 0) {
|
|
1794
1801
|
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1795
1802
|
t === "" && (t = i);
|
|
1796
|
-
const
|
|
1803
|
+
const c = `${e.space}/api/idea/get`, o = {
|
|
1797
1804
|
params: {
|
|
1798
1805
|
id: t
|
|
1799
1806
|
}
|
|
1800
1807
|
};
|
|
1801
1808
|
w(e, (a) => {
|
|
1802
|
-
m(
|
|
1809
|
+
m(c, {
|
|
1803
1810
|
method: "POST",
|
|
1804
1811
|
headers: {
|
|
1805
1812
|
"Content-type": "application/json;charset=UTF-8",
|
|
1806
1813
|
Accept: "application/json",
|
|
1807
1814
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1808
1815
|
},
|
|
1809
|
-
data: JSON.stringify(
|
|
1816
|
+
data: JSON.stringify(o),
|
|
1810
1817
|
type: "json",
|
|
1811
|
-
onComplete(
|
|
1812
|
-
const d =
|
|
1818
|
+
onComplete(r) {
|
|
1819
|
+
const d = r;
|
|
1813
1820
|
d.msg = d.result.message, s && s(d);
|
|
1814
1821
|
},
|
|
1815
|
-
onFailure(
|
|
1816
|
-
const d =
|
|
1822
|
+
onFailure(r) {
|
|
1823
|
+
const d = r;
|
|
1817
1824
|
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1818
1825
|
}
|
|
1819
1826
|
});
|
|
@@ -1824,20 +1831,20 @@ function ze(e, t = te, s = void 0, n = void 0) {
|
|
|
1824
1831
|
uri: "/api/idea/list",
|
|
1825
1832
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1826
1833
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1827
|
-
},
|
|
1828
|
-
w(e, (
|
|
1829
|
-
m(
|
|
1834
|
+
}, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
|
|
1835
|
+
w(e, (o) => {
|
|
1836
|
+
m(c, {
|
|
1830
1837
|
method: "GET",
|
|
1831
1838
|
headers: {
|
|
1832
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1839
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1833
1840
|
},
|
|
1834
1841
|
onComplete(a) {
|
|
1835
|
-
const
|
|
1836
|
-
s && s(
|
|
1842
|
+
const r = JSON.parse(a);
|
|
1843
|
+
s && s(r);
|
|
1837
1844
|
},
|
|
1838
|
-
onFailure(a,
|
|
1845
|
+
onFailure(a, r) {
|
|
1839
1846
|
const d = a;
|
|
1840
|
-
d.status =
|
|
1847
|
+
d.status = r.status, d.response = r.errormsg, n && n(d);
|
|
1841
1848
|
}
|
|
1842
1849
|
});
|
|
1843
1850
|
});
|
|
@@ -1925,13 +1932,13 @@ function Qe(e, t = void 0, s = void 0) {
|
|
|
1925
1932
|
headers: {
|
|
1926
1933
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1927
1934
|
},
|
|
1928
|
-
onComplete(
|
|
1929
|
-
const
|
|
1930
|
-
t && t(
|
|
1935
|
+
onComplete(c, o, a) {
|
|
1936
|
+
const r = JSON.parse(c);
|
|
1937
|
+
t && t(r.result);
|
|
1931
1938
|
},
|
|
1932
|
-
onFailure(
|
|
1933
|
-
const
|
|
1934
|
-
s && s(
|
|
1939
|
+
onFailure(c, o, a) {
|
|
1940
|
+
const r = { erreur: JSON.parse(c), headers: o, xhr: a };
|
|
1941
|
+
s && s(r);
|
|
1935
1942
|
}
|
|
1936
1943
|
});
|
|
1937
1944
|
});
|
|
@@ -1940,16 +1947,16 @@ function Ze(e, t, s = void 0, n = void 0) {
|
|
|
1940
1947
|
const i = e.space + "/api/user/find/login/" + t;
|
|
1941
1948
|
w(
|
|
1942
1949
|
e,
|
|
1943
|
-
(
|
|
1950
|
+
(c) => {
|
|
1944
1951
|
m(i, {
|
|
1945
1952
|
method: "GET",
|
|
1946
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1947
|
-
onComplete(
|
|
1948
|
-
const d = JSON.parse(
|
|
1953
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1954
|
+
onComplete(o, a, r) {
|
|
1955
|
+
const d = JSON.parse(o);
|
|
1949
1956
|
s && s(d);
|
|
1950
1957
|
},
|
|
1951
|
-
onFailure(
|
|
1952
|
-
n && n(
|
|
1958
|
+
onFailure(o) {
|
|
1959
|
+
n && n(o);
|
|
1953
1960
|
}
|
|
1954
1961
|
});
|
|
1955
1962
|
},
|
|
@@ -1964,16 +1971,16 @@ export {
|
|
|
1964
1971
|
R as UUID,
|
|
1965
1972
|
ke as _3DSpace_Create_Doc,
|
|
1966
1973
|
je as _3DSpace_bookmark_addSubsciptions,
|
|
1967
|
-
|
|
1974
|
+
T as _3DSpace_csrf,
|
|
1968
1975
|
I as _3DSpace_download_doc,
|
|
1969
1976
|
W as _3DSpace_download_multidoc,
|
|
1970
1977
|
K as _3DSpace_file_update,
|
|
1971
1978
|
X as _3DSpace_file_update_csr,
|
|
1972
|
-
|
|
1979
|
+
be as _3DSpace_file_url_csr,
|
|
1973
1980
|
k as _3DSpace_get_csrf,
|
|
1974
1981
|
G as _3DSpace_get_docInfo,
|
|
1975
1982
|
V as _3DSpace_get_downloadTicket_multidoc,
|
|
1976
|
-
|
|
1983
|
+
b as _3DSpace_get_securityContexts,
|
|
1977
1984
|
A as _3DSpace_get_ticket,
|
|
1978
1985
|
Ue as _3DSpace_lifecycle_changeRevision,
|
|
1979
1986
|
De as _3DSpace_lifecycle_changeState,
|
|
@@ -2008,7 +2015,7 @@ export {
|
|
|
2008
2015
|
L as couleurs,
|
|
2009
2016
|
_e as createUserGroups,
|
|
2010
2017
|
B as dataMixing,
|
|
2011
|
-
|
|
2018
|
+
Ce as deleteUserGroups,
|
|
2012
2019
|
re as findAdresse,
|
|
2013
2020
|
Re as getAllContextSecurity,
|
|
2014
2021
|
E as getCSRFToken,
|
|
@@ -2023,10 +2030,10 @@ export {
|
|
|
2023
2030
|
we as getUserGroupsList,
|
|
2024
2031
|
J as getUsersGroupRules,
|
|
2025
2032
|
xe as get_3DSpace_csrf,
|
|
2026
|
-
|
|
2033
|
+
Te as patchUserGroups,
|
|
2027
2034
|
Oe as patchUserGroupsControl,
|
|
2028
2035
|
Pe as pushDataIn3DSpace,
|
|
2029
|
-
|
|
2036
|
+
Ne as readUserGroupControl,
|
|
2030
2037
|
Ee as removeTagToDoc,
|
|
2031
2038
|
et as sayHello,
|
|
2032
2039
|
de as updateEvent
|