@beam3_dev/api_module 0.0.91 → 0.0.92
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 +330 -328
- 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,7 +1,7 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
2
|
import { DateTime as N } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
|
|
4
|
-
function
|
|
4
|
+
function R() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
7
7
|
const L = {
|
|
@@ -67,9 +67,9 @@ async function re(e, t = void 0, s = void 0) {
|
|
|
67
67
|
}
|
|
68
68
|
async function ce(e, t = L) {
|
|
69
69
|
let s = N.now().year;
|
|
70
|
-
const n = e, i = [],
|
|
71
|
-
for (let
|
|
72
|
-
i.push({ date:
|
|
70
|
+
const n = e, i = [], r = (a) => {
|
|
71
|
+
for (let o in a)
|
|
72
|
+
i.push({ date: o, comment: a[o] });
|
|
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
|
-
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((o) => o.json()).then((o) => {
|
|
84
|
+
r(o);
|
|
85
|
+
}).catch((o) => console.error("Erreur : " + o));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = n.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : n;
|
|
90
|
-
for (let
|
|
90
|
+
for (let o of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start === N.fromISO(
|
|
92
|
+
(l) => l.start === N.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: N.fromISO(
|
|
96
|
-
end: N.fromISO(
|
|
94
|
+
name: "Férié : " + o.comment,
|
|
95
|
+
start: N.fromISO(o.date).toISODate(),
|
|
96
|
+
end: N.fromISO(o.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, r) => i.start - r.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(), r = 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: r
|
|
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(r, c, a) {
|
|
173
|
+
const o = JSON.parse(r), d = o.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, o);
|
|
178
178
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
181
|
-
a.msg =
|
|
179
|
+
onFailure(r, c) {
|
|
180
|
+
const a = r;
|
|
181
|
+
a.msg = c.errormsg, a.errCode = c.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, r, c) {
|
|
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, r) {
|
|
193
|
+
const c = i;
|
|
194
|
+
c.msg = r.errormsg, c.errCode = r.errorcode, s && s(c);
|
|
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(r, c, a) {
|
|
202
|
+
const o = JSON.parse(r);
|
|
203
|
+
s && s(o);
|
|
204
204
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
207
|
-
a.msg =
|
|
205
|
+
onFailure(r, c) {
|
|
206
|
+
const a = r;
|
|
207
|
+
a.msg = c.errormsg, a.errCode = c.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: r } = e, a = `${i}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, o = {
|
|
219
219
|
groups: [
|
|
220
220
|
{
|
|
221
221
|
title: t.title,
|
|
222
222
|
description: t.description,
|
|
223
|
-
members: t.members || [
|
|
223
|
+
members: t.members || [r.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(o),
|
|
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: r } = e, c = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${o}`;
|
|
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, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, o = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
|
-
}, d = `${
|
|
267
|
+
}, d = `${r}${c}${a}`;
|
|
268
268
|
m(d, {
|
|
269
|
-
OPTsH:
|
|
269
|
+
OPTsH: o,
|
|
270
270
|
onComplete(l) {
|
|
271
271
|
t && t(JSON.parse(l));
|
|
272
272
|
},
|
|
@@ -314,15 +314,15 @@ function Ce(e, t) {
|
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
function Te(e, t, s, n = void 0, i = void 0) {
|
|
317
|
-
const { space:
|
|
317
|
+
const { space: r, tenant: c } = 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:${c}`
|
|
325
|
+
}, o = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(o);
|
|
326
326
|
m(d, {
|
|
327
327
|
headers: D,
|
|
328
328
|
method: "PATCH",
|
|
@@ -337,7 +337,7 @@ function Te(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: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
m(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: D,
|
|
@@ -352,8 +352,8 @@ function Oe(e, t, s, n = void 0, i = void 0) {
|
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
function Ne(e, t, s = void 0, n = void 0) {
|
|
355
|
-
const { space: i } = e,
|
|
356
|
-
m(
|
|
355
|
+
const { space: i } = e, c = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
+
m(c, {
|
|
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, r, c) {
|
|
380
|
+
s && s({ error: i, headers: r, xhr: c });
|
|
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 r = i + `/resources/v1/modeler/documents/${t}`;
|
|
392
|
+
m(r, {
|
|
393
|
+
onComplete(c, a, o) {
|
|
394
|
+
const d = JSON.parse(c);
|
|
395
395
|
s && s(d);
|
|
396
396
|
},
|
|
397
|
-
onFailure(
|
|
398
|
-
n && n(
|
|
397
|
+
onFailure(c) {
|
|
398
|
+
n && n(c);
|
|
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, r, c) {
|
|
407
407
|
const a = JSON.parse(i);
|
|
408
408
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
409
|
},
|
|
@@ -426,15 +426,15 @@ 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, r, c) {
|
|
430
430
|
const a = JSON.parse(i);
|
|
431
431
|
t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(i,
|
|
433
|
+
onFailure(i, r, c) {
|
|
434
434
|
s && s({
|
|
435
435
|
response: i,
|
|
436
|
-
headers:
|
|
437
|
-
xhr:
|
|
436
|
+
headers: r,
|
|
437
|
+
xhr: c
|
|
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(r) {
|
|
455
|
+
const a = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
456
456
|
t && t(a);
|
|
457
457
|
},
|
|
458
|
-
onFailure(
|
|
459
|
-
console.warn("☠️ error => ",
|
|
458
|
+
onFailure(r, c) {
|
|
459
|
+
console.warn("☠️ error => ", r, c), s && s(r, c);
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
},
|
|
@@ -466,28 +466,28 @@ function A(e, t = void 0, s = void 0) {
|
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
468
|
function be(e, t, s, n = void 0, i = void 0) {
|
|
469
|
-
const
|
|
470
|
-
s || (s = e.token), m(
|
|
469
|
+
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
|
+
s || (s = e.token), m(r, {
|
|
471
471
|
method: "PUT",
|
|
472
472
|
headers: {
|
|
473
473
|
ENO_CSRF_TOKEN: s
|
|
474
474
|
},
|
|
475
|
-
onComplete(
|
|
476
|
-
let a = JSON.parse(
|
|
475
|
+
onComplete(c) {
|
|
476
|
+
let a = JSON.parse(c);
|
|
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 o = a.data[0].dataelements.ticketURL;
|
|
480
|
+
n && n(o);
|
|
481
|
+
} catch (o) {
|
|
482
|
+
i && i(o);
|
|
483
483
|
}
|
|
484
484
|
},
|
|
485
|
-
onFailure(
|
|
486
|
-
i && i(
|
|
485
|
+
onFailure(c) {
|
|
486
|
+
i && i(c);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function K(e, t, s, n, i,
|
|
490
|
+
function K(e, t, s, n, i, r = void 0, c = void 0) {
|
|
491
491
|
k(
|
|
492
492
|
e,
|
|
493
493
|
t,
|
|
@@ -499,18 +499,18 @@ function K(e, t, s, n, i, c = void 0, o = void 0) {
|
|
|
499
499
|
n,
|
|
500
500
|
i,
|
|
501
501
|
a.csrf.value,
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
r,
|
|
503
|
+
c
|
|
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, r, c = void 0, a = void 0) {
|
|
509
|
+
const o = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
|
+
m(o, {
|
|
511
511
|
method: "PUT",
|
|
512
512
|
headers: {
|
|
513
|
-
ENO_CSRF_TOKEN:
|
|
513
|
+
ENO_CSRF_TOKEN: r
|
|
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, c, o = 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: r
|
|
524
524
|
},
|
|
525
525
|
data: JSON.stringify({
|
|
526
526
|
data: [{
|
|
@@ -540,7 +540,7 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
|
|
|
540
540
|
}),
|
|
541
541
|
type: "json",
|
|
542
542
|
onComplete(y) {
|
|
543
|
-
|
|
543
|
+
c && c(y);
|
|
544
544
|
},
|
|
545
545
|
onFailure(y) {
|
|
546
546
|
a && a(y);
|
|
@@ -556,14 +556,14 @@ function X(e, t, s, n, i, c, o = 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, r = void 0) {
|
|
560
|
+
const c = e.space, a = e.token, o = 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: `${c}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
564
|
+
url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`
|
|
565
565
|
};
|
|
566
|
-
if (!
|
|
566
|
+
if (!c && c !== "") {
|
|
567
567
|
console.log("le store._3DSpace est vide");
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
@@ -579,7 +579,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
|
|
|
579
579
|
method: "POST",
|
|
580
580
|
data: d,
|
|
581
581
|
onComplete(C) {
|
|
582
|
-
if (
|
|
582
|
+
if (o !== "" && a !== "") {
|
|
583
583
|
const F = {
|
|
584
584
|
method: "POST",
|
|
585
585
|
headers: {
|
|
@@ -603,7 +603,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
|
|
|
603
603
|
}
|
|
604
604
|
}]
|
|
605
605
|
},
|
|
606
|
-
tempId:
|
|
606
|
+
tempId: R()
|
|
607
607
|
}]
|
|
608
608
|
}),
|
|
609
609
|
type: "json",
|
|
@@ -611,7 +611,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
|
|
|
611
611
|
onComplete: _,
|
|
612
612
|
onFailure: y
|
|
613
613
|
};
|
|
614
|
-
|
|
614
|
+
o !== "" && m(p.url_Post, F);
|
|
615
615
|
} else
|
|
616
616
|
console.warn("le store est vide");
|
|
617
617
|
},
|
|
@@ -622,18 +622,18 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
|
|
|
622
622
|
}
|
|
623
623
|
function y(C, F) {
|
|
624
624
|
console.log("Erreur -- response ", C, `
|
|
625
|
-
headers `, F),
|
|
625
|
+
headers `, F), r && r(C);
|
|
626
626
|
}
|
|
627
627
|
m(h.ticketURL, S);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function b(e, t = void 0, s = void 0, n = void 0, i = void 0,
|
|
631
|
+
function b(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !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(o) {
|
|
636
|
+
const d = JSON.parse(o);
|
|
637
637
|
let l = "", p, u, f;
|
|
638
638
|
if (t) {
|
|
639
639
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -652,7 +652,7 @@ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1
|
|
|
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) : r(y);
|
|
656
656
|
}
|
|
657
657
|
});
|
|
658
658
|
}) : h.forEach((S) => {
|
|
@@ -662,22 +662,22 @@ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !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) : r(_);
|
|
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 && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = f + "." + u + "." + p, r(l));
|
|
671
671
|
},
|
|
672
|
-
onFailure(
|
|
672
|
+
onFailure(o, d) {
|
|
673
673
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
674
|
-
err:
|
|
674
|
+
err: o,
|
|
675
675
|
headers: d
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
async function
|
|
680
|
+
async function v(e, t = void 0, s = void 0) {
|
|
681
681
|
return (!e.objID || e.objID === "") && console.warn(
|
|
682
682
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
683
683
|
), (e.space === "" || !e.space) && console.warn(
|
|
@@ -695,36 +695,36 @@ async function R(e, t = void 0, s = void 0) {
|
|
|
695
695
|
)), new Promise((n, i) => {
|
|
696
696
|
A(
|
|
697
697
|
e,
|
|
698
|
-
(
|
|
699
|
-
m(
|
|
698
|
+
(r) => {
|
|
699
|
+
m(r, {
|
|
700
700
|
headers: {
|
|
701
701
|
"Content-Type": "application/json",
|
|
702
702
|
Accept: "application/json"
|
|
703
703
|
},
|
|
704
704
|
onComplete(a) {
|
|
705
|
-
let
|
|
705
|
+
let o;
|
|
706
706
|
try {
|
|
707
|
-
|
|
707
|
+
o = JSON.parse(a);
|
|
708
708
|
} catch {
|
|
709
|
-
|
|
709
|
+
o = a;
|
|
710
710
|
}
|
|
711
|
-
t && t(
|
|
711
|
+
t && t(o), n(o);
|
|
712
712
|
},
|
|
713
|
-
onFailure(a,
|
|
713
|
+
onFailure(a, o, d) {
|
|
714
714
|
s && (console.log("error http", a), s({
|
|
715
715
|
msg: JSON.parse(a),
|
|
716
|
-
headers:
|
|
716
|
+
headers: o,
|
|
717
717
|
xhr: d
|
|
718
718
|
}), i({
|
|
719
719
|
msg: JSON.parse(a),
|
|
720
|
-
headers:
|
|
720
|
+
headers: o,
|
|
721
721
|
xhr: d
|
|
722
722
|
}));
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
725
|
},
|
|
726
|
-
(
|
|
727
|
-
s && s(
|
|
726
|
+
(r) => {
|
|
727
|
+
s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
|
|
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 o = t.slice(a, a + 80);
|
|
737
|
+
i.push(o);
|
|
738
738
|
}
|
|
739
|
-
const
|
|
739
|
+
const c = (a) => {
|
|
740
740
|
V(
|
|
741
741
|
e,
|
|
742
742
|
i[a],
|
|
743
743
|
() => {
|
|
744
|
-
a++, a < i.length &&
|
|
744
|
+
a++, a < i.length && c(a);
|
|
745
745
|
},
|
|
746
|
-
(
|
|
747
|
-
s && s(
|
|
746
|
+
(o) => {
|
|
747
|
+
s && s(o);
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
};
|
|
751
|
-
|
|
751
|
+
c(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 r = [];
|
|
757
|
+
t.forEach((o) => {
|
|
758
|
+
r.push({
|
|
759
|
+
id: o
|
|
760
760
|
});
|
|
761
761
|
});
|
|
762
|
-
let
|
|
762
|
+
let c = JSON.stringify({
|
|
763
763
|
csrf: {
|
|
764
764
|
name: "ENO_CSRF_TOKEN",
|
|
765
765
|
value: e.token
|
|
766
766
|
},
|
|
767
|
-
data:
|
|
767
|
+
data: r
|
|
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: c,
|
|
773
773
|
type: "json",
|
|
774
|
-
onComplete(
|
|
775
|
-
const d =
|
|
776
|
-
|
|
774
|
+
onComplete(o) {
|
|
775
|
+
const d = o.data;
|
|
776
|
+
o.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,15 +793,15 @@ 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(o) {
|
|
797
|
+
console.log(o), i && i(o);
|
|
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
803
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
804
|
-
const
|
|
804
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
805
805
|
b(
|
|
806
806
|
e.space,
|
|
807
807
|
"ESPACE COMMUN",
|
|
@@ -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 c = {
|
|
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(r, c);
|
|
837
837
|
}
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
840
|
function De(e, t, s, n = void 0, i = void 0) {
|
|
841
|
-
return new Promise((
|
|
841
|
+
return new Promise((r) => {
|
|
842
842
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
843
|
-
const
|
|
843
|
+
const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
844
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
|
+
(o) => e.ctx = o,
|
|
850
|
+
(o) => {
|
|
851
|
+
console.log("onError =>", o);
|
|
852
852
|
}
|
|
853
853
|
);
|
|
854
854
|
let a = {
|
|
@@ -866,21 +866,21 @@ 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(o) {
|
|
870
|
+
n && n(o);
|
|
871
871
|
},
|
|
872
|
-
onFailure(
|
|
873
|
-
i && i(
|
|
872
|
+
onFailure(o) {
|
|
873
|
+
i && i(o);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
m(
|
|
876
|
+
m(c, 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
882
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
883
|
-
const
|
|
883
|
+
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
884
884
|
b(
|
|
885
885
|
e.space,
|
|
886
886
|
"ESPACE COMMUN",
|
|
@@ -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 c = {
|
|
895
895
|
method: "POST",
|
|
896
896
|
headers: {
|
|
897
897
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -912,14 +912,14 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
912
912
|
n && n(a);
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
|
-
m(
|
|
915
|
+
m(r, c);
|
|
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
921
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
922
|
-
const
|
|
922
|
+
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
923
923
|
b(
|
|
924
924
|
e.space,
|
|
925
925
|
"ESPACE COMMUN",
|
|
@@ -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 c = {
|
|
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(r, c);
|
|
961
961
|
}
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
964
|
function Ue(e, t, s, n = void 0, i = void 0) {
|
|
965
|
-
return new Promise((
|
|
965
|
+
return new Promise((r) => {
|
|
966
966
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
967
|
-
const
|
|
967
|
+
const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
968
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
|
+
(o) => e.ctx = o,
|
|
974
|
+
(o) => {
|
|
975
|
+
console.log("onError =>", o);
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
978
|
let a = {
|
|
@@ -995,28 +995,30 @@ 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(o) {
|
|
999
|
+
n && n(o);
|
|
1000
1000
|
},
|
|
1001
|
-
onFailure(
|
|
1002
|
-
i && i(
|
|
1001
|
+
onFailure(o) {
|
|
1002
|
+
i && i(o);
|
|
1003
1003
|
}
|
|
1004
1004
|
};
|
|
1005
|
-
m(
|
|
1005
|
+
m(c, 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
1011
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1012
|
-
const
|
|
1013
|
-
`${e.space}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1012
|
+
const r = N.now().ts;
|
|
1013
|
+
`${e.space}`;
|
|
1014
|
+
const c = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
1015
|
+
m(c, {
|
|
1016
|
+
onComplete(a) {
|
|
1017
|
+
if (Array.isArray(JSON.parse(a))) {
|
|
1018
|
+
const o = JSON.parse(a);
|
|
1019
|
+
console.log("serviceId=3dsearch", o);
|
|
1020
|
+
const d = `${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e.tenant}×tamp=${r}`;
|
|
1021
|
+
m(d, {
|
|
1020
1022
|
method: "POST",
|
|
1021
1023
|
headers: {
|
|
1022
1024
|
Accept: "application/json",
|
|
@@ -1025,7 +1027,7 @@ function je(e, t, s = void 0, n = void 0) {
|
|
|
1025
1027
|
data: JSON.stringify({
|
|
1026
1028
|
with_indexing_date: !0,
|
|
1027
1029
|
with_nls: !1,
|
|
1028
|
-
label: `yus-${
|
|
1030
|
+
label: `yus-${r}`,
|
|
1029
1031
|
locale: "en",
|
|
1030
1032
|
select_predicate: [
|
|
1031
1033
|
"ds6w:label",
|
|
@@ -1051,17 +1053,17 @@ function je(e, t, s = void 0, n = void 0) {
|
|
|
1051
1053
|
tenant: e._platformId
|
|
1052
1054
|
}),
|
|
1053
1055
|
type: "json",
|
|
1054
|
-
onComplete(
|
|
1055
|
-
s && s(
|
|
1056
|
+
onComplete(l) {
|
|
1057
|
+
s && s(l);
|
|
1056
1058
|
},
|
|
1057
|
-
onFailure(
|
|
1058
|
-
n && n(
|
|
1059
|
+
onFailure(l) {
|
|
1060
|
+
n && n(l);
|
|
1059
1061
|
}
|
|
1060
1062
|
});
|
|
1061
1063
|
}
|
|
1062
1064
|
},
|
|
1063
|
-
onFailure(
|
|
1064
|
-
n && n(
|
|
1065
|
+
onFailure(a) {
|
|
1066
|
+
n && n(a);
|
|
1065
1067
|
}
|
|
1066
1068
|
}), JSON.stringify({
|
|
1067
1069
|
csrf: {
|
|
@@ -1084,7 +1086,7 @@ function je(e, t, s = void 0, n = void 0) {
|
|
|
1084
1086
|
});
|
|
1085
1087
|
}
|
|
1086
1088
|
//!SECTION
|
|
1087
|
-
function
|
|
1089
|
+
function Re(e, t = void 0, s = void 0) {
|
|
1088
1090
|
const n = {
|
|
1089
1091
|
base: `${e.space}`,
|
|
1090
1092
|
uri: "/resources/bps/cspaces",
|
|
@@ -1096,57 +1098,57 @@ function Ie(e, t = void 0, s = void 0) {
|
|
|
1096
1098
|
Accept: "application/json,text/javascript,*/*",
|
|
1097
1099
|
"Content-Type": "application/ds-json"
|
|
1098
1100
|
},
|
|
1099
|
-
onComplete(
|
|
1100
|
-
const a = JSON.parse(
|
|
1101
|
-
t && t(a,
|
|
1101
|
+
onComplete(r, c) {
|
|
1102
|
+
const a = JSON.parse(r);
|
|
1103
|
+
t && t(a, c);
|
|
1102
1104
|
},
|
|
1103
|
-
onFailure(
|
|
1104
|
-
s && s({ response:
|
|
1105
|
+
onFailure(r, c, a) {
|
|
1106
|
+
s && s({ response: r, headers: c, xhr: a });
|
|
1105
1107
|
}
|
|
1106
1108
|
});
|
|
1107
1109
|
}
|
|
1108
|
-
function
|
|
1110
|
+
function ve(e, t, s, n) {
|
|
1109
1111
|
A(
|
|
1110
1112
|
e.space,
|
|
1111
1113
|
t,
|
|
1112
1114
|
(i) => {
|
|
1113
1115
|
m(i, {
|
|
1114
1116
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1115
|
-
onComplete: (
|
|
1116
|
-
s && s(
|
|
1117
|
+
onComplete: (r) => {
|
|
1118
|
+
s && s(r);
|
|
1117
1119
|
},
|
|
1118
|
-
onFailure: (
|
|
1119
|
-
console.log("error http",
|
|
1120
|
+
onFailure: (r) => {
|
|
1121
|
+
console.log("error http", r), n && n(r);
|
|
1120
1122
|
}
|
|
1121
1123
|
});
|
|
1122
1124
|
}
|
|
1123
1125
|
);
|
|
1124
1126
|
}
|
|
1125
|
-
async function
|
|
1127
|
+
async function Ie(e, t, s = void 0, n = void 0) {
|
|
1126
1128
|
return new Promise((i) => {
|
|
1127
|
-
A(e, t, (
|
|
1128
|
-
m(
|
|
1129
|
-
onComplete: (
|
|
1130
|
-
onFailure: (
|
|
1131
|
-
n && n(
|
|
1129
|
+
A(e, t, (r) => {
|
|
1130
|
+
m(r, {
|
|
1131
|
+
onComplete: (c, a, o) => (i(JSON.parse(c)), s && s(JSON.parse(c), a, o), i),
|
|
1132
|
+
onFailure: (c, a, o) => {
|
|
1133
|
+
n && n(c, a, o), console.log(c, a?.errormsg);
|
|
1132
1134
|
}
|
|
1133
1135
|
});
|
|
1134
1136
|
});
|
|
1135
1137
|
});
|
|
1136
1138
|
}
|
|
1137
1139
|
function Pe(e, t, s, n = void 0, i = void 0) {
|
|
1138
|
-
const
|
|
1140
|
+
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1139
1141
|
k(
|
|
1140
1142
|
e,
|
|
1141
1143
|
s,
|
|
1142
|
-
(
|
|
1143
|
-
const a =
|
|
1144
|
+
(c) => {
|
|
1145
|
+
const a = c.data[0].relateddata.files[0].id, o = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
|
|
1144
1146
|
K(
|
|
1145
1147
|
e,
|
|
1146
1148
|
s,
|
|
1147
1149
|
a,
|
|
1148
|
-
c,
|
|
1149
1150
|
r,
|
|
1151
|
+
o,
|
|
1150
1152
|
(d) => {
|
|
1151
1153
|
n && n(d);
|
|
1152
1154
|
},
|
|
@@ -1157,7 +1159,7 @@ function Pe(e, t, s, n = void 0, i = void 0) {
|
|
|
1157
1159
|
}
|
|
1158
1160
|
);
|
|
1159
1161
|
}
|
|
1160
|
-
let
|
|
1162
|
+
let I, P;
|
|
1161
1163
|
const $ = [];
|
|
1162
1164
|
async function xe(e, t = void 0, s = void 0) {
|
|
1163
1165
|
e.objID && e.objID !== "" ? k(
|
|
@@ -1179,7 +1181,7 @@ async function xe(e, t = void 0, s = void 0) {
|
|
|
1179
1181
|
);
|
|
1180
1182
|
}
|
|
1181
1183
|
async function Me(e, t = void 0, s = void 0) {
|
|
1182
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1184
|
+
console.log("getDatasByTenant (getDocuments)", e), await v(
|
|
1183
1185
|
e,
|
|
1184
1186
|
(n) => {
|
|
1185
1187
|
const i = {};
|
|
@@ -1196,12 +1198,12 @@ function Le(e, t = void 0, s = void 0) {
|
|
|
1196
1198
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1197
1199
|
return;
|
|
1198
1200
|
}
|
|
1199
|
-
e.objIds.forEach((i,
|
|
1200
|
-
|
|
1201
|
+
e.objIds.forEach((i, r) => {
|
|
1202
|
+
v(
|
|
1201
1203
|
e,
|
|
1202
1204
|
i.objID,
|
|
1203
|
-
(
|
|
1204
|
-
n.push({ [i.name]:
|
|
1205
|
+
(c) => {
|
|
1206
|
+
n.push({ [i.name]: c }), i.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), B(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
|
|
1205
1207
|
}
|
|
1206
1208
|
);
|
|
1207
1209
|
});
|
|
@@ -1209,10 +1211,10 @@ function Le(e, t = void 0, s = void 0) {
|
|
|
1209
1211
|
function B(e, t, s = void 0, n = void 0) {
|
|
1210
1212
|
W(
|
|
1211
1213
|
e,
|
|
1212
|
-
|
|
1214
|
+
I,
|
|
1213
1215
|
(i) => {
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
+
const r = [...t];
|
|
1217
|
+
r.find((c) => c.objectID === i.objectId).data = i.data, P = r, $.push(i.data), s && s($);
|
|
1216
1218
|
},
|
|
1217
1219
|
(i) => {
|
|
1218
1220
|
n && (n(i), console.log(i));
|
|
@@ -1240,21 +1242,21 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
|
|
|
1240
1242
|
tag: "testTag"
|
|
1241
1243
|
};
|
|
1242
1244
|
function Je(e, t, s = void 0, n = void 0) {
|
|
1243
|
-
const { space: i, tenant:
|
|
1245
|
+
const { space: i, tenant: r } = e, { objId: c, pred: a, tag: o } = t, d = {
|
|
1244
1246
|
uri: "/resources/6w/tags",
|
|
1245
1247
|
otpCTX: "SecurityContext=preferred",
|
|
1246
|
-
optTenant: `tenant=${
|
|
1248
|
+
optTenant: `tenant=${r}`
|
|
1247
1249
|
}, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1248
1250
|
tag: [
|
|
1249
1251
|
{
|
|
1250
1252
|
subject: [
|
|
1251
1253
|
{
|
|
1252
|
-
uri: `pid://${
|
|
1254
|
+
uri: `pid://${c}`
|
|
1253
1255
|
}
|
|
1254
1256
|
],
|
|
1255
1257
|
predicate: x[a],
|
|
1256
1258
|
object: {
|
|
1257
|
-
literal:
|
|
1259
|
+
literal: o
|
|
1258
1260
|
}
|
|
1259
1261
|
}
|
|
1260
1262
|
]
|
|
@@ -1272,7 +1274,7 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1272
1274
|
setTimeout(() => {
|
|
1273
1275
|
G(
|
|
1274
1276
|
e,
|
|
1275
|
-
|
|
1277
|
+
c,
|
|
1276
1278
|
(g) => {
|
|
1277
1279
|
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;
|
|
1278
1280
|
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, z(
|
|
@@ -1301,17 +1303,17 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1301
1303
|
}
|
|
1302
1304
|
function z(e, t, s = void 0, n = void 0) {
|
|
1303
1305
|
console.log("obj ", t);
|
|
1304
|
-
const i = t.info.name,
|
|
1306
|
+
const i = t.info.name, r = {
|
|
1305
1307
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1306
1308
|
uri: "/federated/search"
|
|
1307
|
-
},
|
|
1309
|
+
}, c = `${r.baseUrl}${r.uri}`, a = {
|
|
1308
1310
|
"Content-Type": "application/json",
|
|
1309
1311
|
Accept: "application/json,text/javascript,*/*"
|
|
1310
|
-
},
|
|
1312
|
+
}, o = R(), d = {
|
|
1311
1313
|
with_indexing_date: !0,
|
|
1312
1314
|
with_synthesis: !0,
|
|
1313
1315
|
with_nls: !1,
|
|
1314
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1316
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,
|
|
1315
1317
|
locale: "fr",
|
|
1316
1318
|
select_predicate: [
|
|
1317
1319
|
"ds6w:label",
|
|
@@ -1368,7 +1370,7 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1368
1370
|
}
|
|
1369
1371
|
}
|
|
1370
1372
|
};
|
|
1371
|
-
console.log("dataPattern => ", d), m(
|
|
1373
|
+
console.log("dataPattern => ", d), m(c, {
|
|
1372
1374
|
method: "POST",
|
|
1373
1375
|
headers: a,
|
|
1374
1376
|
data: JSON.stringify(d),
|
|
@@ -1383,11 +1385,11 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1383
1385
|
});
|
|
1384
1386
|
}
|
|
1385
1387
|
function Ee(e, t, s = void 0, n = void 0) {
|
|
1386
|
-
const { objId: i, pred:
|
|
1388
|
+
const { objId: i, pred: r, tag: c } = t, a = {
|
|
1387
1389
|
uri: "/resources/6w/tags",
|
|
1388
1390
|
otpCTX: "SecurityContext=preferred",
|
|
1389
1391
|
optTenant: `tenant=${e.tenant}`
|
|
1390
|
-
},
|
|
1392
|
+
}, o = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1391
1393
|
tag: [
|
|
1392
1394
|
{
|
|
1393
1395
|
subject: [
|
|
@@ -1395,14 +1397,14 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1395
1397
|
uri: `pid://${i}`
|
|
1396
1398
|
}
|
|
1397
1399
|
],
|
|
1398
|
-
predicate: x[
|
|
1400
|
+
predicate: x[r],
|
|
1399
1401
|
object: {
|
|
1400
|
-
literal:
|
|
1402
|
+
literal: c
|
|
1401
1403
|
}
|
|
1402
1404
|
}
|
|
1403
1405
|
]
|
|
1404
1406
|
};
|
|
1405
|
-
m(
|
|
1407
|
+
m(o, {
|
|
1406
1408
|
method: "DELETE",
|
|
1407
1409
|
data: JSON.stringify(d),
|
|
1408
1410
|
headers: {
|
|
@@ -1422,16 +1424,16 @@ function Ge(e, t = "", s = void 0, n = void 0) {
|
|
|
1422
1424
|
const { space: i } = e;
|
|
1423
1425
|
if (t === "")
|
|
1424
1426
|
return;
|
|
1425
|
-
const
|
|
1427
|
+
const r = {
|
|
1426
1428
|
uri: "/resources/v1/modeler/documents"
|
|
1427
|
-
},
|
|
1429
|
+
}, c = {
|
|
1428
1430
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1429
1431
|
Accept: "application/json,text/javascript,*/*"
|
|
1430
|
-
}, a = `${i}${
|
|
1432
|
+
}, a = `${i}${r.uri}`, o = `$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}`;
|
|
1431
1433
|
m(a, {
|
|
1432
1434
|
method: "POST",
|
|
1433
|
-
headers:
|
|
1434
|
-
data:
|
|
1435
|
+
headers: c,
|
|
1436
|
+
data: o,
|
|
1435
1437
|
onComplete(d) {
|
|
1436
1438
|
s && s(JSON.parse(d));
|
|
1437
1439
|
},
|
|
@@ -1444,7 +1446,7 @@ function Ge(e, t = "", s = void 0, n = void 0) {
|
|
|
1444
1446
|
async function w(e, t = void 0, s = void 0) {
|
|
1445
1447
|
const n = e.space + "/api/index/tk";
|
|
1446
1448
|
return m(n, {
|
|
1447
|
-
onComplete(i,
|
|
1449
|
+
onComplete(i, r, c) {
|
|
1448
1450
|
const a = JSON.parse(i);
|
|
1449
1451
|
if (t)
|
|
1450
1452
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1465,21 +1467,21 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1465
1467
|
start: 0
|
|
1466
1468
|
}
|
|
1467
1469
|
};
|
|
1468
|
-
w(e, (
|
|
1470
|
+
w(e, (r) => {
|
|
1469
1471
|
m(n, {
|
|
1470
1472
|
method: "POST",
|
|
1471
1473
|
headers: {
|
|
1472
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1474
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1473
1475
|
"Content-type": "application/json;charset=UTF-8",
|
|
1474
1476
|
Accept: "application/json"
|
|
1475
1477
|
},
|
|
1476
1478
|
data: JSON.stringify(i),
|
|
1477
1479
|
type: "json",
|
|
1478
|
-
onComplete(
|
|
1479
|
-
t && t(
|
|
1480
|
+
onComplete(c, a) {
|
|
1481
|
+
t && t(c, a);
|
|
1480
1482
|
},
|
|
1481
|
-
onFailure(
|
|
1482
|
-
s && s(
|
|
1483
|
+
onFailure(c, a) {
|
|
1484
|
+
s && s(c, a);
|
|
1483
1485
|
}
|
|
1484
1486
|
});
|
|
1485
1487
|
});
|
|
@@ -1494,22 +1496,22 @@ function Xe(e, t = void 0, s = void 0) {
|
|
|
1494
1496
|
maxNbOfCommonElements: "5"
|
|
1495
1497
|
}
|
|
1496
1498
|
};
|
|
1497
|
-
w(e, (
|
|
1499
|
+
w(e, (r) => {
|
|
1498
1500
|
m(n, {
|
|
1499
1501
|
method: "POST",
|
|
1500
1502
|
headers: {
|
|
1501
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1503
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1502
1504
|
"Content-type": "application/json;charset=UTF-8",
|
|
1503
1505
|
Accept: "application/json"
|
|
1504
1506
|
},
|
|
1505
1507
|
data: JSON.stringify(i),
|
|
1506
1508
|
type: "json",
|
|
1507
|
-
onComplete(
|
|
1508
|
-
const
|
|
1509
|
-
t && t(
|
|
1509
|
+
onComplete(c, a) {
|
|
1510
|
+
const o = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1511
|
+
t && t(o, c);
|
|
1510
1512
|
},
|
|
1511
|
-
onFailure(
|
|
1512
|
-
s && s(
|
|
1513
|
+
onFailure(c, a) {
|
|
1514
|
+
s && s(c, a);
|
|
1513
1515
|
}
|
|
1514
1516
|
});
|
|
1515
1517
|
});
|
|
@@ -1520,14 +1522,14 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1520
1522
|
uri: "/api/community/listmycommunities",
|
|
1521
1523
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1522
1524
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1523
|
-
}, i = `${n.base}${n.uri}${n.limit}${n.page}`,
|
|
1524
|
-
w(e, (
|
|
1525
|
+
}, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
|
|
1526
|
+
w(e, (c) => {
|
|
1525
1527
|
m(i, {
|
|
1526
1528
|
method: "GET",
|
|
1527
1529
|
headers: {
|
|
1528
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1530
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1529
1531
|
},
|
|
1530
|
-
onComplete(a,
|
|
1532
|
+
onComplete(a, o, d) {
|
|
1531
1533
|
const p = JSON.parse(a).result;
|
|
1532
1534
|
let u = 0;
|
|
1533
1535
|
p.forEach((f) => {
|
|
@@ -1543,43 +1545,43 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1543
1545
|
e,
|
|
1544
1546
|
f.id,
|
|
1545
1547
|
(h) => {
|
|
1546
|
-
u++, g.members = h,
|
|
1548
|
+
u++, g.members = h, r.push(g), u === p.length && t && t(r);
|
|
1547
1549
|
},
|
|
1548
1550
|
(h) => s(h)
|
|
1549
1551
|
);
|
|
1550
1552
|
});
|
|
1551
1553
|
},
|
|
1552
|
-
onFailure(a,
|
|
1554
|
+
onFailure(a, o) {
|
|
1553
1555
|
const d = a;
|
|
1554
|
-
d.status =
|
|
1556
|
+
d.status = o.status, d.response = o.errormsg, s && s(d);
|
|
1555
1557
|
}
|
|
1556
1558
|
});
|
|
1557
1559
|
});
|
|
1558
1560
|
}
|
|
1559
1561
|
function Q(e, t, s, n) {
|
|
1560
|
-
const i = `${e.space}/api/community/listmembers`,
|
|
1562
|
+
const i = `${e.space}/api/community/listmembers`, r = {
|
|
1561
1563
|
params: {
|
|
1562
1564
|
page: e.page ? e.page : 1,
|
|
1563
1565
|
limit: e.limit ? e.limit : 50,
|
|
1564
1566
|
community_id: t
|
|
1565
1567
|
}
|
|
1566
1568
|
};
|
|
1567
|
-
w(e, (
|
|
1569
|
+
w(e, (c) => {
|
|
1568
1570
|
m(i, {
|
|
1569
1571
|
method: "POST",
|
|
1570
1572
|
headers: {
|
|
1571
1573
|
"Content-type": "application/json;charset=UTF-8",
|
|
1572
1574
|
Accept: "application/json",
|
|
1573
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1575
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1574
1576
|
},
|
|
1575
|
-
data: JSON.stringify(
|
|
1577
|
+
data: JSON.stringify(r),
|
|
1576
1578
|
type: "json",
|
|
1577
|
-
onComplete(a,
|
|
1579
|
+
onComplete(a, o, d) {
|
|
1578
1580
|
s && s(a);
|
|
1579
1581
|
},
|
|
1580
|
-
onFailure(a,
|
|
1582
|
+
onFailure(a, o) {
|
|
1581
1583
|
const d = a;
|
|
1582
|
-
d.status =
|
|
1584
|
+
d.status = o.status, d.response = o.errormsg, n && n(d);
|
|
1583
1585
|
}
|
|
1584
1586
|
});
|
|
1585
1587
|
});
|
|
@@ -1588,31 +1590,31 @@ function Ve(e, t = void 0, s = void 0) {
|
|
|
1588
1590
|
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1589
1591
|
e.commu_id || (e.commu_id = n);
|
|
1590
1592
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1591
|
-
w(e, (
|
|
1593
|
+
w(e, (r) => {
|
|
1592
1594
|
m(i, {
|
|
1593
1595
|
method: "GET",
|
|
1594
1596
|
headers: {
|
|
1595
1597
|
"Content-type": "application/json;charset=UTF-8",
|
|
1596
1598
|
Accept: "application/json",
|
|
1597
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1599
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1598
1600
|
},
|
|
1599
|
-
onComplete(
|
|
1600
|
-
const a = JSON.parse(
|
|
1601
|
+
onComplete(c) {
|
|
1602
|
+
const a = JSON.parse(c);
|
|
1601
1603
|
t && t(a);
|
|
1602
1604
|
},
|
|
1603
|
-
onFailure(
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1605
|
+
onFailure(c, a) {
|
|
1606
|
+
const o = c;
|
|
1607
|
+
o.status = a.status, o.response = a.errormsg, s && s(o);
|
|
1606
1608
|
}
|
|
1607
1609
|
});
|
|
1608
1610
|
});
|
|
1609
1611
|
}
|
|
1610
1612
|
function Be(e, t, s = void 0, n = void 0) {
|
|
1611
|
-
const { listAllContacts: i, currentUser:
|
|
1613
|
+
const { listAllContacts: i, currentUser: r } = e;
|
|
1612
1614
|
console.log("__listAllContacts", i.hits);
|
|
1613
|
-
const
|
|
1614
|
-
users: [
|
|
1615
|
-
},
|
|
1615
|
+
const c = `${e.space}/api/directmessages`, a = {
|
|
1616
|
+
users: [r.login].concat(t.receipt)
|
|
1617
|
+
}, o = {
|
|
1616
1618
|
id_msg: "",
|
|
1617
1619
|
senderId: e.currentUser.login,
|
|
1618
1620
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1622,14 +1624,14 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1622
1624
|
Z(
|
|
1623
1625
|
a.users,
|
|
1624
1626
|
(l) => {
|
|
1625
|
-
l !== void 0 && (
|
|
1627
|
+
l !== void 0 && (o.id_msg = l.id, d = !0, U(e, o));
|
|
1626
1628
|
},
|
|
1627
1629
|
(l) => {
|
|
1628
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l),
|
|
1630
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), o.id_msg = "";
|
|
1629
1631
|
}
|
|
1630
1632
|
), d === !1 && setTimeout(() => {
|
|
1631
1633
|
d === !1 && w(e, (l) => {
|
|
1632
|
-
m(
|
|
1634
|
+
m(c, {
|
|
1633
1635
|
method: "POST",
|
|
1634
1636
|
headers: {
|
|
1635
1637
|
"Content-Type": "application/json",
|
|
@@ -1640,7 +1642,7 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1640
1642
|
type: "json",
|
|
1641
1643
|
onComplete(p, u, f) {
|
|
1642
1644
|
const g = p;
|
|
1643
|
-
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g),
|
|
1645
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), o.id_msg = g.result.id, U(e, o);
|
|
1644
1646
|
},
|
|
1645
1647
|
onFailure(p, u, f) {
|
|
1646
1648
|
const g = p;
|
|
@@ -1652,19 +1654,19 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1652
1654
|
}
|
|
1653
1655
|
function Z(e, t, s, n) {
|
|
1654
1656
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1655
|
-
w(e, (
|
|
1657
|
+
w(e, (r) => {
|
|
1656
1658
|
m(i, {
|
|
1657
1659
|
method: "GET",
|
|
1658
1660
|
headers: {
|
|
1659
1661
|
Accept: "application/json,text/javascript,*/*",
|
|
1660
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1662
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1661
1663
|
},
|
|
1662
|
-
onComplete(
|
|
1663
|
-
const a = JSON.parse(
|
|
1664
|
+
onComplete(c) {
|
|
1665
|
+
const a = JSON.parse(c), o = [];
|
|
1664
1666
|
a.result.forEach((p) => {
|
|
1665
|
-
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length &&
|
|
1667
|
+
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && o.push(p);
|
|
1666
1668
|
});
|
|
1667
|
-
const d = t.sort(), l =
|
|
1669
|
+
const d = t.sort(), l = o.find((p) => {
|
|
1668
1670
|
const u = [];
|
|
1669
1671
|
return p.users.forEach((f) => {
|
|
1670
1672
|
u.push(f.login);
|
|
@@ -1672,8 +1674,8 @@ function Z(e, t, s, n) {
|
|
|
1672
1674
|
});
|
|
1673
1675
|
s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
|
|
1674
1676
|
},
|
|
1675
|
-
onFailure(
|
|
1676
|
-
const a =
|
|
1677
|
+
onFailure(c) {
|
|
1678
|
+
const a = c;
|
|
1677
1679
|
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
|
|
1678
1680
|
}
|
|
1679
1681
|
});
|
|
@@ -1685,7 +1687,7 @@ function U(e, t, s = void 0, n = void 0) {
|
|
|
1685
1687
|
uri: "/api/community",
|
|
1686
1688
|
id_msg: `${t.id_msg}`,
|
|
1687
1689
|
endUri: "/instantmessages"
|
|
1688
|
-
},
|
|
1690
|
+
}, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, c = {
|
|
1689
1691
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1690
1692
|
accessState: null,
|
|
1691
1693
|
commentUri: null,
|
|
@@ -1695,22 +1697,22 @@ function U(e, t, s = void 0, n = void 0) {
|
|
|
1695
1697
|
parentCommentUri: null,
|
|
1696
1698
|
richMessage: t.msg
|
|
1697
1699
|
};
|
|
1698
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1699
|
-
m(
|
|
1700
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
|
|
1701
|
+
m(r, {
|
|
1700
1702
|
method: "POST",
|
|
1701
1703
|
headers: {
|
|
1702
1704
|
"Content-Type": "application/json",
|
|
1703
1705
|
Accept: "application/json",
|
|
1704
1706
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1705
1707
|
},
|
|
1706
|
-
data: JSON.stringify(
|
|
1708
|
+
data: JSON.stringify(c),
|
|
1707
1709
|
type: "json",
|
|
1708
|
-
onComplete(
|
|
1709
|
-
const p =
|
|
1710
|
+
onComplete(o, d, l) {
|
|
1711
|
+
const p = o;
|
|
1710
1712
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1711
1713
|
},
|
|
1712
|
-
onFailure(
|
|
1713
|
-
const l =
|
|
1714
|
+
onFailure(o, d) {
|
|
1715
|
+
const l = o;
|
|
1714
1716
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1715
1717
|
}
|
|
1716
1718
|
});
|
|
@@ -1734,15 +1736,15 @@ const te = {
|
|
|
1734
1736
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1735
1737
|
};
|
|
1736
1738
|
function Ye(e, t, s = void 0, n = void 0) {
|
|
1737
|
-
const i = `${e.space}/api/idea/add`,
|
|
1738
|
-
(
|
|
1739
|
-
),
|
|
1740
|
-
(
|
|
1739
|
+
const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1740
|
+
(o) => o.id === t.community_id
|
|
1741
|
+
), c = e.swymCommunities.find(
|
|
1742
|
+
(o) => o.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1741
1743
|
), a = {
|
|
1742
1744
|
params: {
|
|
1743
1745
|
title: t.title,
|
|
1744
1746
|
// String, le nom de l'affaire
|
|
1745
|
-
community_id:
|
|
1747
|
+
community_id: r?.id !== void 0 ? r.id : c.id,
|
|
1746
1748
|
// String, l'id de la communauté
|
|
1747
1749
|
message: ne(t.text_html),
|
|
1748
1750
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1750,11 +1752,11 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1750
1752
|
// 1 publier, 0 non publier
|
|
1751
1753
|
}
|
|
1752
1754
|
};
|
|
1753
|
-
w(e, (
|
|
1755
|
+
w(e, (o) => {
|
|
1754
1756
|
const d = {
|
|
1755
1757
|
"Content-type": "application/json;charset=UTF-8",
|
|
1756
1758
|
Accept: "application/json",
|
|
1757
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1759
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1758
1760
|
};
|
|
1759
1761
|
m(i, {
|
|
1760
1762
|
method: "POST",
|
|
@@ -1773,28 +1775,28 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1773
1775
|
});
|
|
1774
1776
|
}
|
|
1775
1777
|
function qe(e, t, s = void 0, n = void 0) {
|
|
1776
|
-
const i = `${e.space}/api/idea/delete`,
|
|
1778
|
+
const i = `${e.space}/api/idea/delete`, r = {
|
|
1777
1779
|
params: {
|
|
1778
1780
|
community_id: t.community_id,
|
|
1779
1781
|
ideationIds: [t.idee_id]
|
|
1780
1782
|
}
|
|
1781
1783
|
};
|
|
1782
|
-
w(e, (
|
|
1784
|
+
w(e, (c) => {
|
|
1783
1785
|
m(i, {
|
|
1784
1786
|
method: "POST",
|
|
1785
1787
|
headers: {
|
|
1786
1788
|
"Content-type": "application/json;charset=UTF-8",
|
|
1787
1789
|
Accept: "application/json",
|
|
1788
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1790
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1789
1791
|
},
|
|
1790
|
-
data: JSON.stringify(
|
|
1792
|
+
data: JSON.stringify(r),
|
|
1791
1793
|
type: "json",
|
|
1792
|
-
onComplete(a,
|
|
1794
|
+
onComplete(a, o, d) {
|
|
1793
1795
|
s && s(a);
|
|
1794
1796
|
},
|
|
1795
|
-
onFailure(a,
|
|
1797
|
+
onFailure(a, o, d) {
|
|
1796
1798
|
const l = a;
|
|
1797
|
-
l.status =
|
|
1799
|
+
l.status = o.status, l.response = o.errormsg, n && n(l);
|
|
1798
1800
|
}
|
|
1799
1801
|
});
|
|
1800
1802
|
});
|
|
@@ -1802,27 +1804,27 @@ function qe(e, t, s = void 0, n = void 0) {
|
|
|
1802
1804
|
function He(e, t = "", s = void 0, n = void 0) {
|
|
1803
1805
|
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1804
1806
|
t === "" && (t = i);
|
|
1805
|
-
const
|
|
1807
|
+
const r = `${e.space}/api/idea/get`, c = {
|
|
1806
1808
|
params: {
|
|
1807
1809
|
id: t
|
|
1808
1810
|
}
|
|
1809
1811
|
};
|
|
1810
1812
|
w(e, (a) => {
|
|
1811
|
-
m(
|
|
1813
|
+
m(r, {
|
|
1812
1814
|
method: "POST",
|
|
1813
1815
|
headers: {
|
|
1814
1816
|
"Content-type": "application/json;charset=UTF-8",
|
|
1815
1817
|
Accept: "application/json",
|
|
1816
1818
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1817
1819
|
},
|
|
1818
|
-
data: JSON.stringify(
|
|
1820
|
+
data: JSON.stringify(c),
|
|
1819
1821
|
type: "json",
|
|
1820
|
-
onComplete(
|
|
1821
|
-
const d =
|
|
1822
|
+
onComplete(o) {
|
|
1823
|
+
const d = o;
|
|
1822
1824
|
d.msg = d.result.message, s && s(d);
|
|
1823
1825
|
},
|
|
1824
|
-
onFailure(
|
|
1825
|
-
const d =
|
|
1826
|
+
onFailure(o) {
|
|
1827
|
+
const d = o;
|
|
1826
1828
|
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1827
1829
|
}
|
|
1828
1830
|
});
|
|
@@ -1833,20 +1835,20 @@ function ze(e, t = te, s = void 0, n = void 0) {
|
|
|
1833
1835
|
uri: "/api/idea/list",
|
|
1834
1836
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1835
1837
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1836
|
-
},
|
|
1837
|
-
w(e, (
|
|
1838
|
-
m(
|
|
1838
|
+
}, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
|
|
1839
|
+
w(e, (c) => {
|
|
1840
|
+
m(r, {
|
|
1839
1841
|
method: "GET",
|
|
1840
1842
|
headers: {
|
|
1841
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1843
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1842
1844
|
},
|
|
1843
1845
|
onComplete(a) {
|
|
1844
|
-
const
|
|
1845
|
-
s && s(
|
|
1846
|
+
const o = JSON.parse(a);
|
|
1847
|
+
s && s(o);
|
|
1846
1848
|
},
|
|
1847
|
-
onFailure(a,
|
|
1849
|
+
onFailure(a, o) {
|
|
1848
1850
|
const d = a;
|
|
1849
|
-
d.status =
|
|
1851
|
+
d.status = o.status, d.response = o.errormsg, n && n(d);
|
|
1850
1852
|
}
|
|
1851
1853
|
});
|
|
1852
1854
|
});
|
|
@@ -1934,13 +1936,13 @@ function Qe(e, t = void 0, s = void 0) {
|
|
|
1934
1936
|
headers: {
|
|
1935
1937
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1936
1938
|
},
|
|
1937
|
-
onComplete(
|
|
1938
|
-
const
|
|
1939
|
-
t && t(
|
|
1939
|
+
onComplete(r, c, a) {
|
|
1940
|
+
const o = JSON.parse(r);
|
|
1941
|
+
t && t(o.result);
|
|
1940
1942
|
},
|
|
1941
|
-
onFailure(
|
|
1942
|
-
const
|
|
1943
|
-
s && s(
|
|
1943
|
+
onFailure(r, c, a) {
|
|
1944
|
+
const o = { erreur: JSON.parse(r), headers: c, xhr: a };
|
|
1945
|
+
s && s(o);
|
|
1944
1946
|
}
|
|
1945
1947
|
});
|
|
1946
1948
|
});
|
|
@@ -1949,16 +1951,16 @@ function Ze(e, t, s = void 0, n = void 0) {
|
|
|
1949
1951
|
const i = e.space + "/api/user/find/login/" + t;
|
|
1950
1952
|
w(
|
|
1951
1953
|
e,
|
|
1952
|
-
(
|
|
1954
|
+
(r) => {
|
|
1953
1955
|
m(i, {
|
|
1954
1956
|
method: "GET",
|
|
1955
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1956
|
-
onComplete(
|
|
1957
|
-
const d = JSON.parse(
|
|
1957
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1958
|
+
onComplete(c, a, o) {
|
|
1959
|
+
const d = JSON.parse(c);
|
|
1958
1960
|
s && s(d);
|
|
1959
1961
|
},
|
|
1960
|
-
onFailure(
|
|
1961
|
-
n && n(
|
|
1962
|
+
onFailure(c) {
|
|
1963
|
+
n && n(c);
|
|
1962
1964
|
}
|
|
1963
1965
|
});
|
|
1964
1966
|
},
|
|
@@ -1970,11 +1972,11 @@ function et(e) {
|
|
|
1970
1972
|
return console.log(t), t;
|
|
1971
1973
|
}
|
|
1972
1974
|
export {
|
|
1973
|
-
|
|
1975
|
+
R as UUID,
|
|
1974
1976
|
ke as _3DSpace_Create_Doc,
|
|
1975
1977
|
je as _3DSpace_bookmark_addSubsciptions,
|
|
1976
1978
|
T as _3DSpace_csrf,
|
|
1977
|
-
|
|
1979
|
+
v as _3DSpace_download_doc,
|
|
1978
1980
|
W as _3DSpace_download_multidoc,
|
|
1979
1981
|
K as _3DSpace_file_update,
|
|
1980
1982
|
X as _3DSpace_file_update_csr,
|
|
@@ -2019,15 +2021,15 @@ export {
|
|
|
2019
2021
|
B as dataMixing,
|
|
2020
2022
|
Ce as deleteUserGroups,
|
|
2021
2023
|
re as findAdresse,
|
|
2022
|
-
|
|
2024
|
+
Re as getAllContextSecurity,
|
|
2023
2025
|
E as getCSRFToken,
|
|
2024
2026
|
oe as getCommunes,
|
|
2025
2027
|
ye as getComplementUG,
|
|
2026
|
-
|
|
2028
|
+
ve as getDataFrom3DSpace,
|
|
2027
2029
|
ce as getDataFromGouvFr,
|
|
2028
2030
|
Me as getDatasByTenant,
|
|
2029
2031
|
Le as getDatasFrom3DSpace,
|
|
2030
|
-
|
|
2032
|
+
Ie as getDownloadDocument,
|
|
2031
2033
|
Ge as getInfoDocTags,
|
|
2032
2034
|
we as getUserGroupsList,
|
|
2033
2035
|
J as getUsersGroupRules,
|