@beam3_dev/api_module 0.0.60 → 0.0.61
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 +340 -334
- 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 +4 -3
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
|
-
import { requirejs as O, widget as
|
|
4
|
-
function
|
|
3
|
+
import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
|
|
4
|
+
function A() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
7
7
|
const L = {
|
|
@@ -34,7 +34,7 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
37
|
+
async function ie(e, t = void 0, n = void 0) {
|
|
38
38
|
const s = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
40
|
"https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
|
|
@@ -50,7 +50,7 @@ async function oe(e, t = void 0, n = void 0) {
|
|
|
50
50
|
n && n(o), console.error("Erreur : " + o);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function re(e, t = void 0, n = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -65,11 +65,11 @@ async function ie(e, t = void 0, n = void 0) {
|
|
|
65
65
|
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function ce(e, t = L) {
|
|
69
69
|
let n = N.now().year;
|
|
70
|
-
const s = e, o = [],
|
|
71
|
-
for (let
|
|
72
|
-
o.push({ date:
|
|
70
|
+
const s = e, o = [], r = (a) => {
|
|
71
|
+
for (let c in a)
|
|
72
|
+
o.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -80,59 +80,59 @@ async function re(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
c
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((c) => c.json()).then((c) => {
|
|
84
|
+
r(c);
|
|
85
|
+
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : s;
|
|
90
|
-
for (let
|
|
90
|
+
for (let c of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start === N.fromISO(
|
|
92
|
+
(l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: N.fromISO(
|
|
96
|
-
end: N.fromISO(
|
|
94
|
+
name: "Férié : " + c.comment,
|
|
95
|
+
start: N.fromISO(c.date).toISODate(),
|
|
96
|
+
end: N.fromISO(c.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
103
|
+
async function de(e, t, n = !0) {
|
|
104
104
|
const s = e.events.findIndex((o) => o.uuid === t.uuid);
|
|
105
|
-
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o,
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, r) => o.start - r.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
109
109
|
n.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function le(e, t, n) {
|
|
113
113
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
114
114
|
s.draggable(e, { data: t, start: n });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function pe(e, t = void 0) {
|
|
118
118
|
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
119
119
|
let s;
|
|
120
120
|
s === void 0 && (s = n.createProxy({
|
|
121
|
-
widgetId:
|
|
121
|
+
widgetId: R.id,
|
|
122
122
|
filteringMode: "WithFilteringServices"
|
|
123
123
|
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function ue(e, t) {
|
|
127
127
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
128
128
|
n.droppable(e, { drop: t });
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
async function
|
|
131
|
+
async function fe(e, t = void 0, n = void 0) {
|
|
132
132
|
await O(
|
|
133
133
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
134
|
(s) => {
|
|
135
|
-
(!e || e === "") && (e =
|
|
135
|
+
(!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
|
|
136
136
|
s.getPlatformServices({
|
|
137
137
|
platformId: e,
|
|
138
138
|
onComplete: t,
|
|
@@ -142,21 +142,21 @@ async function ue(e, t = void 0, n = void 0) {
|
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function me() {
|
|
146
146
|
let e = {};
|
|
147
147
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(),
|
|
148
|
+
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
152
|
tenant: n,
|
|
153
153
|
user: s,
|
|
154
154
|
appsConfiguration: o,
|
|
155
|
-
appConf:
|
|
155
|
+
appConf: r
|
|
156
156
|
};
|
|
157
157
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ge(e, t, n) {
|
|
160
160
|
const s = {
|
|
161
161
|
base: `${e.space}`,
|
|
162
162
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
@@ -169,41 +169,41 @@ function me(e, t, n) {
|
|
|
169
169
|
"Content-Type": "application/json",
|
|
170
170
|
Accept: "application/json"
|
|
171
171
|
},
|
|
172
|
-
onComplete(
|
|
173
|
-
const
|
|
172
|
+
onComplete(r, i, a) {
|
|
173
|
+
const c = JSON.parse(r), d = c.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, c);
|
|
178
178
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
179
|
+
onFailure(r, i) {
|
|
180
|
+
const a = r;
|
|
181
181
|
a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function he(e, t = void 0, n = void 0) {
|
|
186
186
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
187
|
f(s, {
|
|
188
|
-
onComplete(o,
|
|
188
|
+
onComplete(o, r, i) {
|
|
189
189
|
const a = JSON.parse(o);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
|
-
onFailure(o,
|
|
192
|
+
onFailure(o, r) {
|
|
193
193
|
const i = o;
|
|
194
|
-
i.msg =
|
|
194
|
+
i.msg = r.errormsg, i.errCode = r.errorcode, n && n(i);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Se(e, t, n = void 0, s = void 0) {
|
|
199
199
|
let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
200
|
f(o, {
|
|
201
|
-
onComplete(
|
|
202
|
-
const
|
|
203
|
-
n && n(
|
|
201
|
+
onComplete(r, i, a) {
|
|
202
|
+
const c = JSON.parse(r);
|
|
203
|
+
n && n(c);
|
|
204
204
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
205
|
+
onFailure(r, i) {
|
|
206
|
+
const a = r;
|
|
207
207
|
a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
@@ -212,15 +212,15 @@ const F = {
|
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
|
-
function
|
|
216
|
-
const { space: o, currentUser:
|
|
215
|
+
function _e(e, t, n = void 0, s = void 0) {
|
|
216
|
+
const { space: o, currentUser: r } = e, a = `${o}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, c = {
|
|
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 Se(e, t, n = void 0, s = void 0) {
|
|
|
230
230
|
f(a, {
|
|
231
231
|
method: "POST",
|
|
232
232
|
headers: F,
|
|
233
|
-
data: JSON.stringify(
|
|
233
|
+
data: JSON.stringify(c),
|
|
234
234
|
onComplete(d) {
|
|
235
235
|
n && n(JSON.parse(d));
|
|
236
236
|
},
|
|
@@ -241,8 +241,8 @@ function Se(e, t, n = void 0, s = void 0) {
|
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
const { space: o, tenant:
|
|
244
|
+
function ye(e, t, n = void 0, s = void 0) {
|
|
245
|
+
const { space: o, tenant: r } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${i}${a}${c}`;
|
|
246
246
|
f(d, {
|
|
247
247
|
opts: {
|
|
248
248
|
method: "GET",
|
|
@@ -261,12 +261,12 @@ function _e(e, t, n = void 0, s = void 0) {
|
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
function E(e, t = void 0, n = void 0) {
|
|
264
|
-
const { space: s, tenant: o } = e,
|
|
264
|
+
const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
|
-
}, d = `${
|
|
267
|
+
}, d = `${r}${i}${a}`;
|
|
268
268
|
f(d, {
|
|
269
|
-
OPTsH:
|
|
269
|
+
OPTsH: c,
|
|
270
270
|
onComplete(l) {
|
|
271
271
|
t && t(JSON.parse(l));
|
|
272
272
|
},
|
|
@@ -276,7 +276,7 @@ function E(e, t = void 0, n = void 0) {
|
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function we(e, t = void 0, n = void 0) {
|
|
280
280
|
const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
281
281
|
"Content-Type": "application/json",
|
|
282
282
|
Accept: "application/json,text/javascript,*/*"
|
|
@@ -307,14 +307,14 @@ function ye(e, t = void 0, n = void 0) {
|
|
|
307
307
|
console.log(l);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Te(e, t) {
|
|
311
311
|
const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
312
|
f(o, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
const { space:
|
|
316
|
+
function Ce(e, t, n, s = void 0, o = void 0) {
|
|
317
|
+
const { space: r, tenant: i } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
320
320
|
nextURICh: "/characteristics",
|
|
@@ -322,7 +322,7 @@ function Te(e, t, n, s = void 0, o = void 0) {
|
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
324
|
OPTsTenant: `tenant=dstenant:${i}`
|
|
325
|
-
},
|
|
325
|
+
}, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
|
|
326
326
|
f(d, {
|
|
327
327
|
headers: F,
|
|
328
328
|
method: "PATCH",
|
|
@@ -336,8 +336,8 @@ function Te(e, t, n, s = void 0, o = void 0) {
|
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
const { space:
|
|
339
|
+
function Oe(e, t, n, s = void 0, o = void 0) {
|
|
340
|
+
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
f(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: F,
|
|
@@ -351,7 +351,7 @@ function Ce(e, t, n, s = void 0, o = void 0) {
|
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function be(e, t, n = void 0, s = void 0) {
|
|
355
355
|
const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
356
|
f(i, {
|
|
357
357
|
opts: {
|
|
@@ -369,15 +369,26 @@ function Oe(e, t, n = void 0, s = void 0) {
|
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
async
|
|
372
|
+
const J = async (e, t, n) => {
|
|
373
|
+
if (!e.space)
|
|
374
|
+
return;
|
|
375
|
+
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
376
|
+
try {
|
|
377
|
+
const o = await f(s), r = JSON.parse(o);
|
|
378
|
+
console.log("getCSRFToken() / response => ", r), t?.(r.csrf);
|
|
379
|
+
} catch ({ error: o, headers: r, xhr: i }) {
|
|
380
|
+
n?.({ error: o, headers: r, xhr: i });
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
async function G(e, t = void 0, n = void 0, s = void 0) {
|
|
373
384
|
const o = e.space;
|
|
374
385
|
if (t === void 0) {
|
|
375
386
|
console.log("Le paramètre docid est obligatoire");
|
|
376
387
|
return;
|
|
377
388
|
}
|
|
378
|
-
const
|
|
379
|
-
f(
|
|
380
|
-
onComplete(i, a,
|
|
389
|
+
const r = o + `/resources/v1/modeler/documents/${t}`;
|
|
390
|
+
f(r, {
|
|
391
|
+
onComplete(i, a, c) {
|
|
381
392
|
const d = JSON.parse(i);
|
|
382
393
|
n && n(d);
|
|
383
394
|
},
|
|
@@ -390,7 +401,7 @@ function k(e, t = void 0, n = void 0) {
|
|
|
390
401
|
if (e.objID && e.objID !== "") {
|
|
391
402
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
392
403
|
console.log("_3DSpace_get_csrf / url", s), f(s, {
|
|
393
|
-
onComplete(o,
|
|
404
|
+
onComplete(o, r, i) {
|
|
394
405
|
const a = JSON.parse(o);
|
|
395
406
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
396
407
|
},
|
|
@@ -413,12 +424,12 @@ function C(e, t = void 0, n = void 0) {
|
|
|
413
424
|
if (e.space) {
|
|
414
425
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
415
426
|
f(s, {
|
|
416
|
-
onComplete(o,
|
|
427
|
+
onComplete(o, r, i) {
|
|
417
428
|
const a = JSON.parse(o);
|
|
418
429
|
console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
|
|
419
430
|
},
|
|
420
|
-
onFailure(o,
|
|
421
|
-
n && n({ response: o, headers:
|
|
431
|
+
onFailure(o, r, i) {
|
|
432
|
+
n && n({ response: o, headers: r, xhr: i });
|
|
422
433
|
}
|
|
423
434
|
});
|
|
424
435
|
} else
|
|
@@ -438,12 +449,12 @@ function U(e, t = void 0, n = void 0) {
|
|
|
438
449
|
headers: {
|
|
439
450
|
ENO_CSRF_TOKEN: e.token
|
|
440
451
|
},
|
|
441
|
-
onComplete(
|
|
442
|
-
const a = JSON.parse(
|
|
452
|
+
onComplete(r) {
|
|
453
|
+
const a = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
443
454
|
console.log("le ticket est dans la callback"), t && t(a);
|
|
444
455
|
},
|
|
445
|
-
onFailure(
|
|
446
|
-
console.warn("☠️ error => ",
|
|
456
|
+
onFailure(r, i) {
|
|
457
|
+
console.warn("☠️ error => ", r, i), n && n(r, i);
|
|
447
458
|
}
|
|
448
459
|
});
|
|
449
460
|
},
|
|
@@ -452,9 +463,9 @@ function U(e, t = void 0, n = void 0) {
|
|
|
452
463
|
}
|
|
453
464
|
);
|
|
454
465
|
}
|
|
455
|
-
function
|
|
456
|
-
const
|
|
457
|
-
n || (n = e.token), f(
|
|
466
|
+
function Ne(e, t, n, s = void 0, o = void 0) {
|
|
467
|
+
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
468
|
+
n || (n = e.token), f(r, {
|
|
458
469
|
method: "PUT",
|
|
459
470
|
headers: {
|
|
460
471
|
ENO_CSRF_TOKEN: n
|
|
@@ -463,10 +474,10 @@ function be(e, t, n, s = void 0, o = void 0) {
|
|
|
463
474
|
let a = JSON.parse(i);
|
|
464
475
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
465
476
|
try {
|
|
466
|
-
const
|
|
467
|
-
s && s(
|
|
468
|
-
} catch (
|
|
469
|
-
o && o(
|
|
477
|
+
const c = a.data[0].dataelements.ticketURL;
|
|
478
|
+
s && s(c);
|
|
479
|
+
} catch (c) {
|
|
480
|
+
o && o(c);
|
|
470
481
|
}
|
|
471
482
|
},
|
|
472
483
|
onFailure(i) {
|
|
@@ -474,30 +485,30 @@ function be(e, t, n, s = void 0, o = void 0) {
|
|
|
474
485
|
}
|
|
475
486
|
});
|
|
476
487
|
}
|
|
477
|
-
function
|
|
488
|
+
function K(e, t, n, s, o, r = void 0, i = void 0) {
|
|
478
489
|
k(
|
|
479
490
|
e,
|
|
480
491
|
t,
|
|
481
492
|
(a) => {
|
|
482
|
-
|
|
493
|
+
W(
|
|
483
494
|
e,
|
|
484
495
|
t,
|
|
485
496
|
n,
|
|
486
497
|
s,
|
|
487
498
|
o,
|
|
488
499
|
a.csrf.value,
|
|
489
|
-
|
|
500
|
+
r,
|
|
490
501
|
i
|
|
491
502
|
);
|
|
492
503
|
}
|
|
493
504
|
);
|
|
494
505
|
}
|
|
495
|
-
function
|
|
496
|
-
const
|
|
497
|
-
f(
|
|
506
|
+
function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
507
|
+
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
508
|
+
f(c, {
|
|
498
509
|
method: "PUT",
|
|
499
510
|
headers: {
|
|
500
|
-
ENO_CSRF_TOKEN:
|
|
511
|
+
ENO_CSRF_TOKEN: r
|
|
501
512
|
},
|
|
502
513
|
onComplete(d, l, p) {
|
|
503
514
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
@@ -507,7 +518,7 @@ function K(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
507
518
|
let S = "temp_" + Date.now(), _ = {
|
|
508
519
|
method: "PUT",
|
|
509
520
|
headers: {
|
|
510
|
-
ENO_CSRF_TOKEN:
|
|
521
|
+
ENO_CSRF_TOKEN: r
|
|
511
522
|
},
|
|
512
523
|
data: JSON.stringify({
|
|
513
524
|
data: [
|
|
@@ -547,12 +558,12 @@ function K(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
547
558
|
}
|
|
548
559
|
});
|
|
549
560
|
}
|
|
550
|
-
async function
|
|
551
|
-
const i = e.space, a = e.token,
|
|
561
|
+
async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
562
|
+
const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
552
563
|
type: "text/plain"
|
|
553
564
|
}), p = {
|
|
554
565
|
url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
555
|
-
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${
|
|
566
|
+
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
|
|
556
567
|
};
|
|
557
568
|
if (!i && i !== "") {
|
|
558
569
|
console.log("le store._3DSpace est vide");
|
|
@@ -570,7 +581,7 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
570
581
|
method: "POST",
|
|
571
582
|
data: d,
|
|
572
583
|
onComplete(T) {
|
|
573
|
-
if (
|
|
584
|
+
if (c !== "" && a !== "") {
|
|
574
585
|
const D = {
|
|
575
586
|
method: "POST",
|
|
576
587
|
headers: {
|
|
@@ -597,7 +608,7 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
597
608
|
}
|
|
598
609
|
]
|
|
599
610
|
},
|
|
600
|
-
tempId:
|
|
611
|
+
tempId: A()
|
|
601
612
|
}
|
|
602
613
|
]
|
|
603
614
|
}),
|
|
@@ -606,7 +617,7 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
606
617
|
onComplete: _,
|
|
607
618
|
onFailure: y
|
|
608
619
|
};
|
|
609
|
-
|
|
620
|
+
c !== "" && f(p.url_Post, D);
|
|
610
621
|
} else
|
|
611
622
|
console.warn("le store est vide");
|
|
612
623
|
},
|
|
@@ -617,21 +628,21 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
617
628
|
}
|
|
618
629
|
function y(T, D) {
|
|
619
630
|
console.log("Erreur -- response ", T, `
|
|
620
|
-
headers `, D),
|
|
631
|
+
headers `, D), r && r(T);
|
|
621
632
|
}
|
|
622
633
|
f(h.ticketURL, S);
|
|
623
634
|
}
|
|
624
635
|
});
|
|
625
636
|
}
|
|
626
|
-
function b(e, t = void 0, n = void 0, s = void 0, o = void 0,
|
|
637
|
+
function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
|
|
627
638
|
const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
628
639
|
f(i, {
|
|
629
640
|
method: "GET",
|
|
630
641
|
onComplete(a) {
|
|
631
|
-
const
|
|
642
|
+
const c = JSON.parse(a);
|
|
632
643
|
let d = "", l, p, u;
|
|
633
644
|
if (t) {
|
|
634
|
-
let m =
|
|
645
|
+
let m = c.collabspaces.find((g) => g.title === t);
|
|
635
646
|
if (m) {
|
|
636
647
|
l = t;
|
|
637
648
|
let g = m.couples;
|
|
@@ -647,7 +658,7 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
|
647
658
|
let _ = g.filter(
|
|
648
659
|
(y) => y.role.name === h
|
|
649
660
|
);
|
|
650
|
-
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) :
|
|
661
|
+
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : r(_);
|
|
651
662
|
}
|
|
652
663
|
});
|
|
653
664
|
}) : g.forEach((h) => {
|
|
@@ -657,12 +668,12 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
|
657
668
|
let S = g.filter(
|
|
658
669
|
(_) => _.role.name === n
|
|
659
670
|
);
|
|
660
|
-
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) :
|
|
671
|
+
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : r(S);
|
|
661
672
|
}
|
|
662
673
|
}));
|
|
663
674
|
}
|
|
664
675
|
}
|
|
665
|
-
l && p && u ? (d = u + "." + p + "." + l, o(d)) :
|
|
676
|
+
l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : r && (d = u + "." + p + "." + l, r(d));
|
|
666
677
|
},
|
|
667
678
|
onFailure(a) {
|
|
668
679
|
console.log("Erreur de récupération du contexte de sécurité. => ", a);
|
|
@@ -675,12 +686,20 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
|
675
686
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
676
687
|
), (e.space === "" || !e.space) && console.warn(
|
|
677
688
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
678
|
-
), (e.token === "" || !e.token) &&
|
|
689
|
+
), delete e.token, (e.token === "" || !e.token) && (J(
|
|
690
|
+
e,
|
|
691
|
+
(r) => {
|
|
692
|
+
e.token = r;
|
|
693
|
+
},
|
|
694
|
+
(r) => {
|
|
695
|
+
console.log("☠️ error => ", r);
|
|
696
|
+
}
|
|
697
|
+
), console.warn(
|
|
679
698
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
680
|
-
), console.log("_3DSpace_download_doc / credentials", e), U(
|
|
699
|
+
)), console.log("_3DSpace_download_doc / credentials", e), U(
|
|
681
700
|
e,
|
|
682
|
-
(
|
|
683
|
-
|
|
701
|
+
(r) => {
|
|
702
|
+
f(r, {
|
|
684
703
|
headers: {
|
|
685
704
|
ENO_CSRF_TOKEN: e.token
|
|
686
705
|
},
|
|
@@ -688,41 +707,41 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
|
688
707
|
const a = JSON.parse(i);
|
|
689
708
|
console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
|
|
690
709
|
},
|
|
691
|
-
onFailure(i, a,
|
|
692
|
-
n && (console.log("error http", i), n({ error: i, headers: a, xhr:
|
|
710
|
+
onFailure(i, a, c) {
|
|
711
|
+
n && (console.log("error http", i), n({ error: i, headers: a, xhr: c }));
|
|
693
712
|
}
|
|
694
713
|
});
|
|
695
714
|
},
|
|
696
|
-
(
|
|
697
|
-
n && n(
|
|
715
|
+
(r) => {
|
|
716
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
|
|
698
717
|
}
|
|
699
718
|
);
|
|
700
719
|
}
|
|
701
|
-
async function
|
|
720
|
+
async function X(e, t, n = void 0, s = void 0) {
|
|
702
721
|
let o = [];
|
|
703
722
|
for (let a = 0; a < t.length; a += 80) {
|
|
704
|
-
const
|
|
705
|
-
o.push(
|
|
723
|
+
const c = t.slice(a, a + 80);
|
|
724
|
+
o.push(c);
|
|
706
725
|
}
|
|
707
726
|
const i = (a) => {
|
|
708
|
-
|
|
727
|
+
V(
|
|
709
728
|
e,
|
|
710
729
|
o[a],
|
|
711
730
|
() => {
|
|
712
731
|
a++, a < o.length && i(a);
|
|
713
732
|
},
|
|
714
|
-
(
|
|
715
|
-
n && n(
|
|
733
|
+
(c) => {
|
|
734
|
+
n && n(c);
|
|
716
735
|
}
|
|
717
736
|
);
|
|
718
737
|
};
|
|
719
738
|
i(0);
|
|
720
739
|
}
|
|
721
|
-
function
|
|
722
|
-
const
|
|
723
|
-
t.forEach((
|
|
724
|
-
|
|
725
|
-
id:
|
|
740
|
+
function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
741
|
+
const r = [];
|
|
742
|
+
t.forEach((c) => {
|
|
743
|
+
r.push({
|
|
744
|
+
id: c
|
|
726
745
|
});
|
|
727
746
|
});
|
|
728
747
|
let i = JSON.stringify({
|
|
@@ -730,16 +749,16 @@ function X(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
730
749
|
name: "ENO_CSRF_TOKEN",
|
|
731
750
|
value: e.token
|
|
732
751
|
},
|
|
733
|
-
data:
|
|
752
|
+
data: r
|
|
734
753
|
});
|
|
735
754
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
736
755
|
f(a, {
|
|
737
756
|
method: "PUT",
|
|
738
757
|
data: i,
|
|
739
758
|
type: "json",
|
|
740
|
-
onComplete(
|
|
741
|
-
const d =
|
|
742
|
-
|
|
759
|
+
onComplete(c) {
|
|
760
|
+
const d = c.data;
|
|
761
|
+
c.success === !0 && (n && n(), d.forEach((l) => {
|
|
743
762
|
try {
|
|
744
763
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
745
764
|
f(u, {
|
|
@@ -759,15 +778,15 @@ function X(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
759
778
|
}
|
|
760
779
|
}));
|
|
761
780
|
},
|
|
762
|
-
onFailure(
|
|
763
|
-
console.log(
|
|
781
|
+
onFailure(c) {
|
|
782
|
+
console.log(c), o && o(c);
|
|
764
783
|
}
|
|
765
784
|
});
|
|
766
785
|
}
|
|
767
|
-
function
|
|
786
|
+
function De(e, t, n = void 0, s = void 0) {
|
|
768
787
|
return new Promise((o) => {
|
|
769
788
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
770
|
-
const
|
|
789
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
771
790
|
b(
|
|
772
791
|
e.space,
|
|
773
792
|
"ESPACE COMMUN",
|
|
@@ -801,12 +820,12 @@ function ke(e, t, n = void 0, s = void 0) {
|
|
|
801
820
|
s && s(a);
|
|
802
821
|
}
|
|
803
822
|
};
|
|
804
|
-
f(
|
|
823
|
+
f(r, i);
|
|
805
824
|
}
|
|
806
825
|
});
|
|
807
826
|
}
|
|
808
|
-
function
|
|
809
|
-
return new Promise((
|
|
827
|
+
function Fe(e, t, n, s = void 0, o = void 0) {
|
|
828
|
+
return new Promise((r) => {
|
|
810
829
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
811
830
|
const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
812
831
|
b(
|
|
@@ -814,9 +833,9 @@ function De(e, t, n, s = void 0, o = void 0) {
|
|
|
814
833
|
"ESPACE COMMUN",
|
|
815
834
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
816
835
|
void 0,
|
|
817
|
-
(
|
|
818
|
-
(
|
|
819
|
-
console.log("onError =>",
|
|
836
|
+
(c) => e.ctx = c,
|
|
837
|
+
(c) => {
|
|
838
|
+
console.log("onError =>", c);
|
|
820
839
|
}
|
|
821
840
|
);
|
|
822
841
|
let a = {
|
|
@@ -836,21 +855,21 @@ function De(e, t, n, s = void 0, o = void 0) {
|
|
|
836
855
|
]
|
|
837
856
|
}),
|
|
838
857
|
type: "json",
|
|
839
|
-
onComplete(
|
|
840
|
-
s && s(
|
|
858
|
+
onComplete(c) {
|
|
859
|
+
s && s(c);
|
|
841
860
|
},
|
|
842
|
-
onFailure(
|
|
843
|
-
o && o(
|
|
861
|
+
onFailure(c) {
|
|
862
|
+
o && o(c);
|
|
844
863
|
}
|
|
845
864
|
};
|
|
846
865
|
f(i, a);
|
|
847
866
|
}
|
|
848
867
|
});
|
|
849
868
|
}
|
|
850
|
-
function
|
|
869
|
+
function Ue(e, t, n = void 0, s = void 0) {
|
|
851
870
|
return new Promise((o) => {
|
|
852
871
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
853
|
-
const
|
|
872
|
+
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
854
873
|
b(
|
|
855
874
|
e.space,
|
|
856
875
|
"ESPACE COMMUN",
|
|
@@ -884,14 +903,14 @@ function Fe(e, t, n = void 0, s = void 0) {
|
|
|
884
903
|
s && s(a);
|
|
885
904
|
}
|
|
886
905
|
};
|
|
887
|
-
f(
|
|
906
|
+
f(r, i);
|
|
888
907
|
}
|
|
889
908
|
});
|
|
890
909
|
}
|
|
891
|
-
function
|
|
910
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
892
911
|
return new Promise((o) => {
|
|
893
912
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
894
|
-
const
|
|
913
|
+
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
895
914
|
b(
|
|
896
915
|
e.space,
|
|
897
916
|
"ESPACE COMMUN",
|
|
@@ -931,12 +950,12 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
931
950
|
s && s(a);
|
|
932
951
|
}
|
|
933
952
|
};
|
|
934
|
-
f(
|
|
953
|
+
f(r, i);
|
|
935
954
|
}
|
|
936
955
|
});
|
|
937
956
|
}
|
|
938
|
-
function
|
|
939
|
-
return new Promise((
|
|
957
|
+
function je(e, t, n, s = void 0, o = void 0) {
|
|
958
|
+
return new Promise((r) => {
|
|
940
959
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
941
960
|
const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
942
961
|
b(
|
|
@@ -944,9 +963,9 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
944
963
|
"ESPACE COMMUN",
|
|
945
964
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
946
965
|
void 0,
|
|
947
|
-
(
|
|
948
|
-
(
|
|
949
|
-
console.log("onError =>",
|
|
966
|
+
(c) => e.ctx = c,
|
|
967
|
+
(c) => {
|
|
968
|
+
console.log("onError =>", c);
|
|
950
969
|
}
|
|
951
970
|
);
|
|
952
971
|
let a = {
|
|
@@ -971,11 +990,11 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
971
990
|
notificationTimeout: 600
|
|
972
991
|
}),
|
|
973
992
|
type: "json",
|
|
974
|
-
onComplete(
|
|
975
|
-
s && s(
|
|
993
|
+
onComplete(c) {
|
|
994
|
+
s && s(c);
|
|
976
995
|
},
|
|
977
|
-
onFailure(
|
|
978
|
-
o && o(
|
|
996
|
+
onFailure(c) {
|
|
997
|
+
o && o(c);
|
|
979
998
|
}
|
|
980
999
|
};
|
|
981
1000
|
f(i, a);
|
|
@@ -983,20 +1002,7 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
983
1002
|
});
|
|
984
1003
|
}
|
|
985
1004
|
//!SECTION
|
|
986
|
-
|
|
987
|
-
if (e.space) {
|
|
988
|
-
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
989
|
-
f(s, {
|
|
990
|
-
onComplete(o) {
|
|
991
|
-
o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
|
|
992
|
-
},
|
|
993
|
-
onFailure(o, c, i) {
|
|
994
|
-
n && n({ error: o, headers: c, xhr: i });
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
function Ae(e, t = void 0, n = void 0) {
|
|
1005
|
+
function Re(e, t = void 0, n = void 0) {
|
|
1000
1006
|
const s = {
|
|
1001
1007
|
base: `${e.space}`,
|
|
1002
1008
|
uri: "/resources/bps/cspaces",
|
|
@@ -1008,27 +1014,27 @@ function Ae(e, t = void 0, n = void 0) {
|
|
|
1008
1014
|
Accept: "application/json,text/javascript,*/*",
|
|
1009
1015
|
"Content-Type": "application/ds-json"
|
|
1010
1016
|
},
|
|
1011
|
-
onComplete(
|
|
1012
|
-
const a = JSON.parse(
|
|
1017
|
+
onComplete(r, i) {
|
|
1018
|
+
const a = JSON.parse(r);
|
|
1013
1019
|
t && t(a, i);
|
|
1014
1020
|
},
|
|
1015
|
-
onFailure(
|
|
1016
|
-
n && n({ response:
|
|
1021
|
+
onFailure(r, i, a) {
|
|
1022
|
+
n && n({ response: r, headers: i, xhr: a });
|
|
1017
1023
|
}
|
|
1018
1024
|
});
|
|
1019
1025
|
}
|
|
1020
|
-
function
|
|
1026
|
+
function Ae(e, t, n, s) {
|
|
1021
1027
|
U(
|
|
1022
1028
|
e.space,
|
|
1023
1029
|
t,
|
|
1024
1030
|
(o) => {
|
|
1025
1031
|
f(o, {
|
|
1026
1032
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1027
|
-
onComplete: (
|
|
1028
|
-
n && n(
|
|
1033
|
+
onComplete: (r) => {
|
|
1034
|
+
n && n(r);
|
|
1029
1035
|
},
|
|
1030
|
-
onFailure: (
|
|
1031
|
-
console.log("error http",
|
|
1036
|
+
onFailure: (r) => {
|
|
1037
|
+
console.log("error http", r), s && s(r);
|
|
1032
1038
|
}
|
|
1033
1039
|
});
|
|
1034
1040
|
}
|
|
@@ -1036,29 +1042,29 @@ function Re(e, t, n, s) {
|
|
|
1036
1042
|
}
|
|
1037
1043
|
async function Ie(e, t, n = void 0, s = void 0) {
|
|
1038
1044
|
return new Promise((o) => {
|
|
1039
|
-
U(e, t, (
|
|
1040
|
-
f(
|
|
1041
|
-
onComplete: (i, a,
|
|
1042
|
-
onFailure: (i, a,
|
|
1043
|
-
s && s(i, a,
|
|
1045
|
+
U(e, t, (r) => {
|
|
1046
|
+
f(r, {
|
|
1047
|
+
onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
|
|
1048
|
+
onFailure: (i, a, c) => {
|
|
1049
|
+
s && s(i, a, c), console.log(i, a?.errormsg);
|
|
1044
1050
|
}
|
|
1045
1051
|
});
|
|
1046
1052
|
});
|
|
1047
1053
|
});
|
|
1048
1054
|
}
|
|
1049
1055
|
function ve(e, t, n, s = void 0, o = void 0) {
|
|
1050
|
-
const
|
|
1056
|
+
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1051
1057
|
k(
|
|
1052
1058
|
e,
|
|
1053
1059
|
n,
|
|
1054
1060
|
(i) => {
|
|
1055
|
-
const a = i.data[0].relateddata.files[0].id,
|
|
1056
|
-
|
|
1061
|
+
const a = i.data[0].relateddata.files[0].id, c = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
|
|
1062
|
+
K(
|
|
1057
1063
|
e,
|
|
1058
1064
|
n,
|
|
1059
1065
|
a,
|
|
1060
|
-
c,
|
|
1061
1066
|
r,
|
|
1067
|
+
c,
|
|
1062
1068
|
(d) => {
|
|
1063
1069
|
s && s(d);
|
|
1064
1070
|
},
|
|
@@ -1095,21 +1101,21 @@ async function Pe(e, t = void 0, n = void 0) {
|
|
|
1095
1101
|
e,
|
|
1096
1102
|
(s) => {
|
|
1097
1103
|
const o = {};
|
|
1098
|
-
o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t(o);
|
|
1104
|
+
o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1099
1105
|
},
|
|
1100
1106
|
(s) => {
|
|
1101
|
-
n && n(s);
|
|
1107
|
+
n && n?.(s);
|
|
1102
1108
|
}
|
|
1103
1109
|
);
|
|
1104
1110
|
}
|
|
1105
1111
|
function Me(e, t = void 0, n = void 0) {
|
|
1106
1112
|
const s = [];
|
|
1107
|
-
e.objIds.forEach((o,
|
|
1113
|
+
e.objIds.forEach((o, r) => {
|
|
1108
1114
|
I(
|
|
1109
1115
|
e,
|
|
1110
1116
|
o.objId,
|
|
1111
1117
|
(i) => {
|
|
1112
|
-
s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID),
|
|
1118
|
+
s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID), B(e, x)), r === e.objIds.length - 1 && t && t(s);
|
|
1113
1119
|
},
|
|
1114
1120
|
(i) => {
|
|
1115
1121
|
n && n(i);
|
|
@@ -1117,20 +1123,20 @@ function Me(e, t = void 0, n = void 0) {
|
|
|
1117
1123
|
);
|
|
1118
1124
|
});
|
|
1119
1125
|
}
|
|
1120
|
-
function
|
|
1121
|
-
|
|
1126
|
+
function B(e, t, n = void 0, s = void 0) {
|
|
1127
|
+
X(
|
|
1122
1128
|
e,
|
|
1123
1129
|
v,
|
|
1124
1130
|
(o) => {
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1131
|
+
const r = [...t];
|
|
1132
|
+
r.find((i) => i.objectID === o.objectId).data = o.data, x = r, $.push(o.data), n && n($);
|
|
1127
1133
|
},
|
|
1128
1134
|
(o) => {
|
|
1129
1135
|
s && (s(o), console.log(o));
|
|
1130
1136
|
}
|
|
1131
1137
|
);
|
|
1132
1138
|
}
|
|
1133
|
-
const
|
|
1139
|
+
const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
1134
1140
|
"swym",
|
|
1135
1141
|
"3dspace",
|
|
1136
1142
|
"drive",
|
|
@@ -1144,17 +1150,17 @@ const B = "FA35FB9B177A280065800EA0000F599C", Y = [
|
|
|
1144
1150
|
where: "ds6w:where",
|
|
1145
1151
|
who: "ds6w:who",
|
|
1146
1152
|
why: "ds6w:why"
|
|
1147
|
-
},
|
|
1148
|
-
objId:
|
|
1153
|
+
}, z = {
|
|
1154
|
+
objId: Y,
|
|
1149
1155
|
pred: "who",
|
|
1150
1156
|
order_by: "desc",
|
|
1151
1157
|
tag: "testTag"
|
|
1152
1158
|
};
|
|
1153
1159
|
function Le(e, t, n = void 0, s = void 0) {
|
|
1154
|
-
const { space: o, tenant:
|
|
1160
|
+
const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
|
|
1155
1161
|
uri: "/resources/6w/tags",
|
|
1156
1162
|
otpCTX: "SecurityContext=preferred",
|
|
1157
|
-
optTenant: `tenant=${
|
|
1163
|
+
optTenant: `tenant=${r}`
|
|
1158
1164
|
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1159
1165
|
tag: [
|
|
1160
1166
|
{
|
|
@@ -1165,7 +1171,7 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1165
1171
|
],
|
|
1166
1172
|
predicate: P[a],
|
|
1167
1173
|
object: {
|
|
1168
|
-
literal:
|
|
1174
|
+
literal: c
|
|
1169
1175
|
}
|
|
1170
1176
|
}
|
|
1171
1177
|
]
|
|
@@ -1181,12 +1187,12 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1181
1187
|
JSON.parse(u);
|
|
1182
1188
|
const m = {};
|
|
1183
1189
|
setTimeout(() => {
|
|
1184
|
-
|
|
1190
|
+
G(
|
|
1185
1191
|
e,
|
|
1186
1192
|
i,
|
|
1187
1193
|
(g) => {
|
|
1188
1194
|
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;
|
|
1189
|
-
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m },
|
|
1195
|
+
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
|
|
1190
1196
|
e,
|
|
1191
1197
|
t,
|
|
1192
1198
|
(y) => {
|
|
@@ -1210,19 +1216,19 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1210
1216
|
}
|
|
1211
1217
|
});
|
|
1212
1218
|
}
|
|
1213
|
-
function
|
|
1219
|
+
function q(e, t, n = void 0, s = void 0) {
|
|
1214
1220
|
console.log("obj ", t);
|
|
1215
|
-
const o = t.info.name,
|
|
1221
|
+
const o = t.info.name, r = {
|
|
1216
1222
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1217
1223
|
uri: "/federated/search"
|
|
1218
|
-
}, i = `${
|
|
1224
|
+
}, i = `${r.baseUrl}${r.uri}`, a = {
|
|
1219
1225
|
"Content-Type": "application/json",
|
|
1220
1226
|
Accept: "application/json,text/javascript,*/*"
|
|
1221
|
-
},
|
|
1227
|
+
}, c = A(), d = {
|
|
1222
1228
|
with_indexing_date: !0,
|
|
1223
1229
|
with_synthesis: !0,
|
|
1224
1230
|
with_nls: !1,
|
|
1225
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1231
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
|
|
1226
1232
|
locale: "fr",
|
|
1227
1233
|
select_predicate: [
|
|
1228
1234
|
"ds6w:label",
|
|
@@ -1260,7 +1266,7 @@ function z(e, t, n = void 0, s = void 0) {
|
|
|
1260
1266
|
}
|
|
1261
1267
|
},
|
|
1262
1268
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1263
|
-
order_by:
|
|
1269
|
+
order_by: z.order_by,
|
|
1264
1270
|
order_field: "relevance",
|
|
1265
1271
|
select_snippets: [
|
|
1266
1272
|
"ds6w:snippet",
|
|
@@ -1271,7 +1277,7 @@ function z(e, t, n = void 0, s = void 0) {
|
|
|
1271
1277
|
],
|
|
1272
1278
|
nresults: 40,
|
|
1273
1279
|
start: "0",
|
|
1274
|
-
source:
|
|
1280
|
+
source: H,
|
|
1275
1281
|
tenant: e.tenant,
|
|
1276
1282
|
login: {
|
|
1277
1283
|
"3dspace": {
|
|
@@ -1294,11 +1300,11 @@ function z(e, t, n = void 0, s = void 0) {
|
|
|
1294
1300
|
});
|
|
1295
1301
|
}
|
|
1296
1302
|
function Ee(e, t, n = void 0, s = void 0) {
|
|
1297
|
-
const { objId: o, pred:
|
|
1303
|
+
const { objId: o, pred: r, tag: i } = t, a = {
|
|
1298
1304
|
uri: "/resources/6w/tags",
|
|
1299
1305
|
otpCTX: "SecurityContext=preferred",
|
|
1300
1306
|
optTenant: `tenant=${e.tenant}`
|
|
1301
|
-
},
|
|
1307
|
+
}, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1302
1308
|
tag: [
|
|
1303
1309
|
{
|
|
1304
1310
|
subject: [
|
|
@@ -1306,14 +1312,14 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1306
1312
|
uri: `pid://${o}`
|
|
1307
1313
|
}
|
|
1308
1314
|
],
|
|
1309
|
-
predicate: P[
|
|
1315
|
+
predicate: P[r],
|
|
1310
1316
|
object: {
|
|
1311
1317
|
literal: i
|
|
1312
1318
|
}
|
|
1313
1319
|
}
|
|
1314
1320
|
]
|
|
1315
1321
|
};
|
|
1316
|
-
f(
|
|
1322
|
+
f(c, {
|
|
1317
1323
|
method: "DELETE",
|
|
1318
1324
|
data: JSON.stringify(d),
|
|
1319
1325
|
headers: {
|
|
@@ -1333,16 +1339,16 @@ function Je(e, t = "", n = void 0, s = void 0) {
|
|
|
1333
1339
|
const { space: o } = e;
|
|
1334
1340
|
if (t === "")
|
|
1335
1341
|
return;
|
|
1336
|
-
const
|
|
1342
|
+
const r = {
|
|
1337
1343
|
uri: "/resources/v1/modeler/documents"
|
|
1338
1344
|
}, i = {
|
|
1339
1345
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1340
1346
|
Accept: "application/json,text/javascript,*/*"
|
|
1341
|
-
}, a = `${o}${
|
|
1347
|
+
}, a = `${o}${r.uri}`, c = `$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}`;
|
|
1342
1348
|
f(a, {
|
|
1343
1349
|
method: "POST",
|
|
1344
1350
|
headers: i,
|
|
1345
|
-
data:
|
|
1351
|
+
data: c,
|
|
1346
1352
|
onComplete(d) {
|
|
1347
1353
|
n && n(JSON.parse(d));
|
|
1348
1354
|
},
|
|
@@ -1355,7 +1361,7 @@ function Je(e, t = "", n = void 0, s = void 0) {
|
|
|
1355
1361
|
async function w(e, t = void 0, n = void 0) {
|
|
1356
1362
|
const s = e.space + "/api/index/tk";
|
|
1357
1363
|
return f(s, {
|
|
1358
|
-
onComplete(o,
|
|
1364
|
+
onComplete(o, r, i) {
|
|
1359
1365
|
const a = JSON.parse(o);
|
|
1360
1366
|
if (t)
|
|
1361
1367
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1376,11 +1382,11 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1376
1382
|
start: 0
|
|
1377
1383
|
}
|
|
1378
1384
|
};
|
|
1379
|
-
w(e, (
|
|
1385
|
+
w(e, (r) => {
|
|
1380
1386
|
f(s, {
|
|
1381
1387
|
method: "POST",
|
|
1382
1388
|
headers: {
|
|
1383
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1389
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1384
1390
|
"Content-type": "application/json;charset=UTF-8",
|
|
1385
1391
|
Accept: "application/json"
|
|
1386
1392
|
},
|
|
@@ -1405,19 +1411,19 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1405
1411
|
maxNbOfCommonElements: "5"
|
|
1406
1412
|
}
|
|
1407
1413
|
};
|
|
1408
|
-
w(e, (
|
|
1414
|
+
w(e, (r) => {
|
|
1409
1415
|
f(s, {
|
|
1410
1416
|
method: "POST",
|
|
1411
1417
|
headers: {
|
|
1412
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1418
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1413
1419
|
"Content-type": "application/json;charset=UTF-8",
|
|
1414
1420
|
Accept: "application/json"
|
|
1415
1421
|
},
|
|
1416
1422
|
data: JSON.stringify(o),
|
|
1417
1423
|
type: "json",
|
|
1418
1424
|
onComplete(i, a) {
|
|
1419
|
-
const
|
|
1420
|
-
t && t(
|
|
1425
|
+
const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1426
|
+
t && t(c, i);
|
|
1421
1427
|
},
|
|
1422
1428
|
onFailure(i, a) {
|
|
1423
1429
|
n && n(i, a);
|
|
@@ -1431,14 +1437,14 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1431
1437
|
uri: "/api/community/listmycommunities",
|
|
1432
1438
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1433
1439
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1434
|
-
}, o = `${s.base}${s.uri}${s.limit}${s.page}`,
|
|
1440
|
+
}, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1435
1441
|
w(e, (i) => {
|
|
1436
1442
|
f(o, {
|
|
1437
1443
|
method: "GET",
|
|
1438
1444
|
headers: {
|
|
1439
1445
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1440
1446
|
},
|
|
1441
|
-
onComplete(a,
|
|
1447
|
+
onComplete(a, c, d) {
|
|
1442
1448
|
const p = JSON.parse(a).result;
|
|
1443
1449
|
let u = 0;
|
|
1444
1450
|
p.forEach((m) => {
|
|
@@ -1450,25 +1456,25 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1450
1456
|
role: m.role,
|
|
1451
1457
|
access: m.access
|
|
1452
1458
|
};
|
|
1453
|
-
|
|
1459
|
+
Q(
|
|
1454
1460
|
e,
|
|
1455
1461
|
m.id,
|
|
1456
1462
|
(h) => {
|
|
1457
|
-
u++, g.members = h,
|
|
1463
|
+
u++, g.members = h, r.push(g), u === p.length && t && t(r);
|
|
1458
1464
|
},
|
|
1459
1465
|
(h) => n(h)
|
|
1460
1466
|
);
|
|
1461
1467
|
});
|
|
1462
1468
|
},
|
|
1463
|
-
onFailure(a,
|
|
1469
|
+
onFailure(a, c) {
|
|
1464
1470
|
const d = a;
|
|
1465
|
-
d.status =
|
|
1471
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1466
1472
|
}
|
|
1467
1473
|
});
|
|
1468
1474
|
});
|
|
1469
1475
|
}
|
|
1470
|
-
function
|
|
1471
|
-
const o = `${e.space}/api/community/listmembers`,
|
|
1476
|
+
function Q(e, t, n, s) {
|
|
1477
|
+
const o = `${e.space}/api/community/listmembers`, r = {
|
|
1472
1478
|
params: {
|
|
1473
1479
|
page: e.page ? e.page : 1,
|
|
1474
1480
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1483,14 +1489,14 @@ function q(e, t, n, s) {
|
|
|
1483
1489
|
Accept: "application/json",
|
|
1484
1490
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1485
1491
|
},
|
|
1486
|
-
data: JSON.stringify(
|
|
1492
|
+
data: JSON.stringify(r),
|
|
1487
1493
|
type: "json",
|
|
1488
|
-
onComplete(a,
|
|
1494
|
+
onComplete(a, c, d) {
|
|
1489
1495
|
n && n(a);
|
|
1490
1496
|
},
|
|
1491
|
-
onFailure(a,
|
|
1497
|
+
onFailure(a, c) {
|
|
1492
1498
|
const d = a;
|
|
1493
|
-
d.status =
|
|
1499
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1494
1500
|
}
|
|
1495
1501
|
});
|
|
1496
1502
|
});
|
|
@@ -1499,44 +1505,44 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1499
1505
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1500
1506
|
e.commu_id || (e.commu_id = s);
|
|
1501
1507
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1502
|
-
w(e, (
|
|
1508
|
+
w(e, (r) => {
|
|
1503
1509
|
f(o, {
|
|
1504
1510
|
method: "GET",
|
|
1505
1511
|
headers: {
|
|
1506
1512
|
"Content-type": "application/json;charset=UTF-8",
|
|
1507
1513
|
Accept: "application/json",
|
|
1508
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1514
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1509
1515
|
},
|
|
1510
1516
|
onComplete(i) {
|
|
1511
1517
|
const a = JSON.parse(i);
|
|
1512
1518
|
t && t(a);
|
|
1513
1519
|
},
|
|
1514
1520
|
onFailure(i, a) {
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1521
|
+
const c = i;
|
|
1522
|
+
c.status = a.status, c.response = a.errormsg, n && n(c);
|
|
1517
1523
|
}
|
|
1518
1524
|
});
|
|
1519
1525
|
});
|
|
1520
1526
|
}
|
|
1521
1527
|
function Ve(e, t, n = void 0, s = void 0) {
|
|
1522
|
-
const { listAllContacts: o, currentUser:
|
|
1528
|
+
const { listAllContacts: o, currentUser: r } = e;
|
|
1523
1529
|
console.log("__listAllContacts", o.hits);
|
|
1524
1530
|
const i = `${e.space}/api/directmessages`, a = {
|
|
1525
|
-
users: [
|
|
1526
|
-
},
|
|
1531
|
+
users: [r.login].concat(t.receipt)
|
|
1532
|
+
}, c = {
|
|
1527
1533
|
id_msg: "",
|
|
1528
1534
|
senderId: e.currentUser.login,
|
|
1529
1535
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1530
|
-
msg:
|
|
1536
|
+
msg: ee(t.msg)
|
|
1531
1537
|
};
|
|
1532
1538
|
let d = !1;
|
|
1533
|
-
|
|
1539
|
+
Z(
|
|
1534
1540
|
a.users,
|
|
1535
1541
|
(l) => {
|
|
1536
|
-
l !== void 0 && (
|
|
1542
|
+
l !== void 0 && (c.id_msg = l.id, d = !0, j(e, c));
|
|
1537
1543
|
},
|
|
1538
1544
|
(l) => {
|
|
1539
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l),
|
|
1545
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
|
|
1540
1546
|
}
|
|
1541
1547
|
), d === !1 && setTimeout(() => {
|
|
1542
1548
|
d === !1 && w(e, (l) => {
|
|
@@ -1551,7 +1557,7 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1551
1557
|
type: "json",
|
|
1552
1558
|
onComplete(p, u, m) {
|
|
1553
1559
|
const g = p;
|
|
1554
|
-
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g),
|
|
1560
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, j(e, c);
|
|
1555
1561
|
},
|
|
1556
1562
|
onFailure(p, u, m) {
|
|
1557
1563
|
const g = p;
|
|
@@ -1561,21 +1567,21 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1561
1567
|
});
|
|
1562
1568
|
}, 500);
|
|
1563
1569
|
}
|
|
1564
|
-
function
|
|
1570
|
+
function Z(e, t, n, s) {
|
|
1565
1571
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1566
|
-
w(e, (
|
|
1572
|
+
w(e, (r) => {
|
|
1567
1573
|
f(o, {
|
|
1568
1574
|
method: "GET",
|
|
1569
1575
|
headers: {
|
|
1570
1576
|
Accept: "application/json,text/javascript,*/*",
|
|
1571
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1577
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1572
1578
|
},
|
|
1573
1579
|
onComplete(i) {
|
|
1574
|
-
const a = JSON.parse(i),
|
|
1580
|
+
const a = JSON.parse(i), c = [];
|
|
1575
1581
|
a.result.forEach((p) => {
|
|
1576
|
-
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length &&
|
|
1582
|
+
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
|
|
1577
1583
|
});
|
|
1578
|
-
const d = t.sort(), l =
|
|
1584
|
+
const d = t.sort(), l = c.find((p) => {
|
|
1579
1585
|
const u = [];
|
|
1580
1586
|
return p.users.forEach((m) => {
|
|
1581
1587
|
u.push(m.login);
|
|
@@ -1596,7 +1602,7 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1596
1602
|
uri: "/api/community",
|
|
1597
1603
|
id_msg: `${t.id_msg}`,
|
|
1598
1604
|
endUri: "/instantmessages"
|
|
1599
|
-
},
|
|
1605
|
+
}, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
|
|
1600
1606
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1601
1607
|
accessState: null,
|
|
1602
1608
|
commentUri: null,
|
|
@@ -1606,8 +1612,8 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1606
1612
|
parentCommentUri: null,
|
|
1607
1613
|
richMessage: t.msg
|
|
1608
1614
|
};
|
|
1609
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1610
|
-
f(
|
|
1615
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
|
|
1616
|
+
f(r, {
|
|
1611
1617
|
method: "POST",
|
|
1612
1618
|
headers: {
|
|
1613
1619
|
"Content-Type": "application/json",
|
|
@@ -1616,25 +1622,25 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1616
1622
|
},
|
|
1617
1623
|
data: JSON.stringify(i),
|
|
1618
1624
|
type: "json",
|
|
1619
|
-
onComplete(
|
|
1620
|
-
const p =
|
|
1625
|
+
onComplete(c, d, l) {
|
|
1626
|
+
const p = c;
|
|
1621
1627
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1622
1628
|
},
|
|
1623
|
-
onFailure(
|
|
1624
|
-
const l =
|
|
1629
|
+
onFailure(c, d) {
|
|
1630
|
+
const l = c;
|
|
1625
1631
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1626
1632
|
}
|
|
1627
1633
|
});
|
|
1628
1634
|
});
|
|
1629
1635
|
}
|
|
1630
|
-
function
|
|
1636
|
+
function ee(e) {
|
|
1631
1637
|
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1632
1638
|
return `<p>${e} </p>
|
|
1633
1639
|
<br/>
|
|
1634
1640
|
<hr/>
|
|
1635
1641
|
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1636
1642
|
}
|
|
1637
|
-
const
|
|
1643
|
+
const te = {
|
|
1638
1644
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1639
1645
|
// titre du post
|
|
1640
1646
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1645,27 +1651,27 @@ const ee = {
|
|
|
1645
1651
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1646
1652
|
};
|
|
1647
1653
|
function Be(e, t, n = void 0, s = void 0) {
|
|
1648
|
-
const o = `${e.space}/api/idea/add`,
|
|
1649
|
-
(
|
|
1654
|
+
const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1655
|
+
(c) => c.id === t.community_id
|
|
1650
1656
|
), i = e.swymCommunities.find(
|
|
1651
|
-
(
|
|
1657
|
+
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1652
1658
|
), a = {
|
|
1653
1659
|
params: {
|
|
1654
1660
|
title: t.title,
|
|
1655
1661
|
// String, le nom de l'affaire
|
|
1656
|
-
community_id:
|
|
1662
|
+
community_id: r?.id !== void 0 ? r.id : i.id,
|
|
1657
1663
|
// String, l'id de la communauté
|
|
1658
|
-
message:
|
|
1664
|
+
message: ne(t.text_html),
|
|
1659
1665
|
// STRING => le contenue du message doit être au format HTML
|
|
1660
1666
|
published: 1
|
|
1661
1667
|
// 1 publier, 0 non publier
|
|
1662
1668
|
}
|
|
1663
1669
|
};
|
|
1664
|
-
w(e, (
|
|
1670
|
+
w(e, (c) => {
|
|
1665
1671
|
const d = {
|
|
1666
1672
|
"Content-type": "application/json;charset=UTF-8",
|
|
1667
1673
|
Accept: "application/json",
|
|
1668
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1674
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1669
1675
|
};
|
|
1670
1676
|
f(o, {
|
|
1671
1677
|
method: "POST",
|
|
@@ -1684,7 +1690,7 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1684
1690
|
});
|
|
1685
1691
|
}
|
|
1686
1692
|
function Ye(e, t, n = void 0, s = void 0) {
|
|
1687
|
-
const o = `${e.space}/api/idea/delete`,
|
|
1693
|
+
const o = `${e.space}/api/idea/delete`, r = {
|
|
1688
1694
|
params: {
|
|
1689
1695
|
community_id: t.community_id,
|
|
1690
1696
|
ideationIds: [t.idee_id]
|
|
@@ -1698,14 +1704,14 @@ function Ye(e, t, n = void 0, s = void 0) {
|
|
|
1698
1704
|
Accept: "application/json",
|
|
1699
1705
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1700
1706
|
},
|
|
1701
|
-
data: JSON.stringify(
|
|
1707
|
+
data: JSON.stringify(r),
|
|
1702
1708
|
type: "json",
|
|
1703
|
-
onComplete(a,
|
|
1709
|
+
onComplete(a, c, d) {
|
|
1704
1710
|
n && n(a);
|
|
1705
1711
|
},
|
|
1706
|
-
onFailure(a,
|
|
1712
|
+
onFailure(a, c, d) {
|
|
1707
1713
|
const l = a;
|
|
1708
|
-
l.status =
|
|
1714
|
+
l.status = c.status, l.response = c.errormsg, s && s(l);
|
|
1709
1715
|
}
|
|
1710
1716
|
});
|
|
1711
1717
|
});
|
|
@@ -1713,13 +1719,13 @@ function Ye(e, t, n = void 0, s = void 0) {
|
|
|
1713
1719
|
function He(e, t = "", n = void 0, s = void 0) {
|
|
1714
1720
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1715
1721
|
t === "" && (t = o);
|
|
1716
|
-
const
|
|
1722
|
+
const r = `${e.space}/api/idea/get`, i = {
|
|
1717
1723
|
params: {
|
|
1718
1724
|
id: t
|
|
1719
1725
|
}
|
|
1720
1726
|
};
|
|
1721
1727
|
w(e, (a) => {
|
|
1722
|
-
f(
|
|
1728
|
+
f(r, {
|
|
1723
1729
|
method: "POST",
|
|
1724
1730
|
headers: {
|
|
1725
1731
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1728,41 +1734,41 @@ function He(e, t = "", n = void 0, s = void 0) {
|
|
|
1728
1734
|
},
|
|
1729
1735
|
data: JSON.stringify(i),
|
|
1730
1736
|
type: "json",
|
|
1731
|
-
onComplete(
|
|
1732
|
-
const d =
|
|
1737
|
+
onComplete(c) {
|
|
1738
|
+
const d = c;
|
|
1733
1739
|
d.msg = d.result.message, n && n(d);
|
|
1734
1740
|
},
|
|
1735
|
-
onFailure(
|
|
1736
|
-
const d =
|
|
1741
|
+
onFailure(c) {
|
|
1742
|
+
const d = c;
|
|
1737
1743
|
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1738
1744
|
}
|
|
1739
1745
|
});
|
|
1740
1746
|
});
|
|
1741
1747
|
}
|
|
1742
|
-
function ze(e, t =
|
|
1748
|
+
function ze(e, t = te, n = void 0, s = void 0) {
|
|
1743
1749
|
const o = {
|
|
1744
1750
|
uri: "/api/idea/list",
|
|
1745
1751
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1746
1752
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1747
|
-
},
|
|
1753
|
+
}, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1748
1754
|
w(e, (i) => {
|
|
1749
|
-
f(
|
|
1755
|
+
f(r, {
|
|
1750
1756
|
method: "GET",
|
|
1751
1757
|
headers: {
|
|
1752
1758
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1753
1759
|
},
|
|
1754
1760
|
onComplete(a) {
|
|
1755
|
-
const
|
|
1756
|
-
n && n(
|
|
1761
|
+
const c = JSON.parse(a);
|
|
1762
|
+
n && n(c);
|
|
1757
1763
|
},
|
|
1758
|
-
onFailure(a,
|
|
1764
|
+
onFailure(a, c) {
|
|
1759
1765
|
const d = a;
|
|
1760
|
-
d.status =
|
|
1766
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1761
1767
|
}
|
|
1762
1768
|
});
|
|
1763
1769
|
});
|
|
1764
1770
|
}
|
|
1765
|
-
function
|
|
1771
|
+
function ne(e) {
|
|
1766
1772
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1767
1773
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1768
1774
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1845,13 +1851,13 @@ function qe(e, t = void 0, n = void 0) {
|
|
|
1845
1851
|
headers: {
|
|
1846
1852
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1847
1853
|
},
|
|
1848
|
-
onComplete(
|
|
1849
|
-
const
|
|
1850
|
-
t && t(
|
|
1854
|
+
onComplete(r, i, a) {
|
|
1855
|
+
const c = JSON.parse(r);
|
|
1856
|
+
t && t(c.result);
|
|
1851
1857
|
},
|
|
1852
|
-
onFailure(
|
|
1853
|
-
const
|
|
1854
|
-
n && n(
|
|
1858
|
+
onFailure(r, i, a) {
|
|
1859
|
+
const c = { erreur: JSON.parse(r), headers: i, xhr: a };
|
|
1860
|
+
n && n(c);
|
|
1855
1861
|
}
|
|
1856
1862
|
});
|
|
1857
1863
|
});
|
|
@@ -1860,11 +1866,11 @@ function Qe(e, t, n = void 0, s = void 0) {
|
|
|
1860
1866
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1861
1867
|
w(
|
|
1862
1868
|
e,
|
|
1863
|
-
(
|
|
1869
|
+
(r) => {
|
|
1864
1870
|
f(o, {
|
|
1865
1871
|
method: "GET",
|
|
1866
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1867
|
-
onComplete(i, a,
|
|
1872
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1873
|
+
onComplete(i, a, c) {
|
|
1868
1874
|
const d = JSON.parse(i);
|
|
1869
1875
|
n && n(d);
|
|
1870
1876
|
},
|
|
@@ -1881,29 +1887,29 @@ function Ze(e) {
|
|
|
1881
1887
|
return console.log(t), t;
|
|
1882
1888
|
}
|
|
1883
1889
|
export {
|
|
1884
|
-
|
|
1885
|
-
|
|
1890
|
+
A as UUID,
|
|
1891
|
+
ke as _3DSpace_Create_Doc,
|
|
1886
1892
|
C as _3DSpace_csrf,
|
|
1887
1893
|
I as _3DSpace_download_doc,
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1894
|
+
X as _3DSpace_download_multidoc,
|
|
1895
|
+
K as _3DSpace_file_update,
|
|
1896
|
+
W as _3DSpace_file_update_csr,
|
|
1897
|
+
Ne as _3DSpace_file_url_csr,
|
|
1892
1898
|
k as _3DSpace_get_csrf,
|
|
1893
|
-
|
|
1894
|
-
|
|
1899
|
+
G as _3DSpace_get_docInfo,
|
|
1900
|
+
V as _3DSpace_get_downloadTicket_multidoc,
|
|
1895
1901
|
b as _3DSpace_get_securityContexts,
|
|
1896
1902
|
U as _3DSpace_get_ticket,
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1903
|
+
je as _3DSpace_lifecycle_changeRevision,
|
|
1904
|
+
Fe as _3DSpace_lifecycle_changeState,
|
|
1905
|
+
Ue as _3DSpace_lifecycle_getGraph,
|
|
1906
|
+
$e as _3DSpace_lifecycle_getNextRevision,
|
|
1907
|
+
De as _3DSpace_lifecycle_getNextStates,
|
|
1902
1908
|
We as _3DSwim_getAllCommunities,
|
|
1903
|
-
|
|
1909
|
+
Q as _3DSwim_getMembersCommunity,
|
|
1904
1910
|
Ve as _3DSwym_buildDirectMessage,
|
|
1905
1911
|
Ye as _3DSwym_deleteIdea,
|
|
1906
|
-
|
|
1912
|
+
Z as _3DSwym_findCommunityToInstantMSG,
|
|
1907
1913
|
Ge as _3DSwym_getAllNews,
|
|
1908
1914
|
Ke as _3DSwym_getFamiliarPeople,
|
|
1909
1915
|
Xe as _3DSwym_getIdeaStatusMaturity,
|
|
@@ -1914,40 +1920,40 @@ export {
|
|
|
1914
1920
|
w as _3DSwym_get_version,
|
|
1915
1921
|
Be as _3DSwym_postIdea,
|
|
1916
1922
|
j as _3DSwym_sendMessageData,
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1923
|
+
Se as _AppMngt_get_info_user,
|
|
1924
|
+
he as _AppMngt_get_users,
|
|
1925
|
+
me as _getPlateformInfos,
|
|
1926
|
+
fe as _getPlatformServices,
|
|
1921
1927
|
f as _httpCallAuthenticated,
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1928
|
+
le as _setDraggable,
|
|
1929
|
+
ue as _setDroppable,
|
|
1930
|
+
pe as _setupTagger,
|
|
1925
1931
|
Le as addTagToDoc,
|
|
1926
|
-
|
|
1932
|
+
ge as compass_getListAdditionalApps,
|
|
1927
1933
|
L as couleurs,
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1934
|
+
_e as createUserGroups,
|
|
1935
|
+
B as dataMixing,
|
|
1936
|
+
Te as deleteUserGroups,
|
|
1937
|
+
re as findAdresse,
|
|
1938
|
+
Re as getAllContextSecurity,
|
|
1939
|
+
J as getCSRFToken,
|
|
1940
|
+
ie as getCommunes,
|
|
1941
|
+
ye as getComplementUG,
|
|
1942
|
+
Ae as getDataFrom3DSpace,
|
|
1943
|
+
ce as getDataFromGouvFr,
|
|
1938
1944
|
Pe as getDatasByTenant,
|
|
1939
1945
|
Me as getDatasFrom3DSpace,
|
|
1940
1946
|
Ie as getDownloadDocument,
|
|
1941
1947
|
Je as getInfoDocTags,
|
|
1942
|
-
|
|
1948
|
+
we as getUserGroupsList,
|
|
1943
1949
|
E as getUsersGroupRules,
|
|
1944
1950
|
xe as get_3DSpace_csrf,
|
|
1945
|
-
|
|
1946
|
-
|
|
1951
|
+
Ce as patchUserGroups,
|
|
1952
|
+
Oe as patchUserGroupsControl,
|
|
1947
1953
|
ve as pushDataIn3DSpace,
|
|
1948
|
-
|
|
1954
|
+
be as readUserGroupControl,
|
|
1949
1955
|
Ee as removeTagToDoc,
|
|
1950
1956
|
Ze as sayHello,
|
|
1951
|
-
|
|
1957
|
+
de as updateEvent
|
|
1952
1958
|
};
|
|
1953
1959
|
//# sourceMappingURL=wb3Api.js.map
|