@beam3_dev/api_module 0.0.60 → 0.0.62
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 +349 -335
- 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,34 @@ 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(
|
|
378
|
+
s,
|
|
379
|
+
(r) => {
|
|
380
|
+
const i = JSON.parse(o);
|
|
381
|
+
console.log("getCSRFToken() / response => ", i), t?.(i.csrf);
|
|
382
|
+
},
|
|
383
|
+
(r) => {
|
|
384
|
+
n?.({ error, headers, xhr });
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
} catch (o) {
|
|
388
|
+
n?.("erreur", o);
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
async function G(e, t = void 0, n = void 0, s = void 0) {
|
|
373
392
|
const o = e.space;
|
|
374
393
|
if (t === void 0) {
|
|
375
394
|
console.log("Le paramètre docid est obligatoire");
|
|
376
395
|
return;
|
|
377
396
|
}
|
|
378
|
-
const
|
|
379
|
-
f(
|
|
380
|
-
onComplete(i, a,
|
|
397
|
+
const r = o + `/resources/v1/modeler/documents/${t}`;
|
|
398
|
+
f(r, {
|
|
399
|
+
onComplete(i, a, c) {
|
|
381
400
|
const d = JSON.parse(i);
|
|
382
401
|
n && n(d);
|
|
383
402
|
},
|
|
@@ -390,7 +409,7 @@ function k(e, t = void 0, n = void 0) {
|
|
|
390
409
|
if (e.objID && e.objID !== "") {
|
|
391
410
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
392
411
|
console.log("_3DSpace_get_csrf / url", s), f(s, {
|
|
393
|
-
onComplete(o,
|
|
412
|
+
onComplete(o, r, i) {
|
|
394
413
|
const a = JSON.parse(o);
|
|
395
414
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
396
415
|
},
|
|
@@ -413,12 +432,12 @@ function C(e, t = void 0, n = void 0) {
|
|
|
413
432
|
if (e.space) {
|
|
414
433
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
415
434
|
f(s, {
|
|
416
|
-
onComplete(o,
|
|
435
|
+
onComplete(o, r, i) {
|
|
417
436
|
const a = JSON.parse(o);
|
|
418
437
|
console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
|
|
419
438
|
},
|
|
420
|
-
onFailure(o,
|
|
421
|
-
n && n({ response: o, headers:
|
|
439
|
+
onFailure(o, r, i) {
|
|
440
|
+
n && n({ response: o, headers: r, xhr: i });
|
|
422
441
|
}
|
|
423
442
|
});
|
|
424
443
|
} else
|
|
@@ -438,12 +457,12 @@ function U(e, t = void 0, n = void 0) {
|
|
|
438
457
|
headers: {
|
|
439
458
|
ENO_CSRF_TOKEN: e.token
|
|
440
459
|
},
|
|
441
|
-
onComplete(
|
|
442
|
-
const a = JSON.parse(
|
|
460
|
+
onComplete(r) {
|
|
461
|
+
const a = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
443
462
|
console.log("le ticket est dans la callback"), t && t(a);
|
|
444
463
|
},
|
|
445
|
-
onFailure(
|
|
446
|
-
console.warn("☠️ error => ",
|
|
464
|
+
onFailure(r, i) {
|
|
465
|
+
console.warn("☠️ error => ", r, i), n && n(r, i);
|
|
447
466
|
}
|
|
448
467
|
});
|
|
449
468
|
},
|
|
@@ -452,9 +471,9 @@ function U(e, t = void 0, n = void 0) {
|
|
|
452
471
|
}
|
|
453
472
|
);
|
|
454
473
|
}
|
|
455
|
-
function
|
|
456
|
-
const
|
|
457
|
-
n || (n = e.token), f(
|
|
474
|
+
function Ne(e, t, n, s = void 0, o = void 0) {
|
|
475
|
+
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
476
|
+
n || (n = e.token), f(r, {
|
|
458
477
|
method: "PUT",
|
|
459
478
|
headers: {
|
|
460
479
|
ENO_CSRF_TOKEN: n
|
|
@@ -463,10 +482,10 @@ function be(e, t, n, s = void 0, o = void 0) {
|
|
|
463
482
|
let a = JSON.parse(i);
|
|
464
483
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
465
484
|
try {
|
|
466
|
-
const
|
|
467
|
-
s && s(
|
|
468
|
-
} catch (
|
|
469
|
-
o && o(
|
|
485
|
+
const c = a.data[0].dataelements.ticketURL;
|
|
486
|
+
s && s(c);
|
|
487
|
+
} catch (c) {
|
|
488
|
+
o && o(c);
|
|
470
489
|
}
|
|
471
490
|
},
|
|
472
491
|
onFailure(i) {
|
|
@@ -474,30 +493,30 @@ function be(e, t, n, s = void 0, o = void 0) {
|
|
|
474
493
|
}
|
|
475
494
|
});
|
|
476
495
|
}
|
|
477
|
-
function
|
|
496
|
+
function K(e, t, n, s, o, r = void 0, i = void 0) {
|
|
478
497
|
k(
|
|
479
498
|
e,
|
|
480
499
|
t,
|
|
481
500
|
(a) => {
|
|
482
|
-
|
|
501
|
+
W(
|
|
483
502
|
e,
|
|
484
503
|
t,
|
|
485
504
|
n,
|
|
486
505
|
s,
|
|
487
506
|
o,
|
|
488
507
|
a.csrf.value,
|
|
489
|
-
|
|
508
|
+
r,
|
|
490
509
|
i
|
|
491
510
|
);
|
|
492
511
|
}
|
|
493
512
|
);
|
|
494
513
|
}
|
|
495
|
-
function
|
|
496
|
-
const
|
|
497
|
-
f(
|
|
514
|
+
function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
515
|
+
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
516
|
+
f(c, {
|
|
498
517
|
method: "PUT",
|
|
499
518
|
headers: {
|
|
500
|
-
ENO_CSRF_TOKEN:
|
|
519
|
+
ENO_CSRF_TOKEN: r
|
|
501
520
|
},
|
|
502
521
|
onComplete(d, l, p) {
|
|
503
522
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
@@ -507,7 +526,7 @@ function K(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
507
526
|
let S = "temp_" + Date.now(), _ = {
|
|
508
527
|
method: "PUT",
|
|
509
528
|
headers: {
|
|
510
|
-
ENO_CSRF_TOKEN:
|
|
529
|
+
ENO_CSRF_TOKEN: r
|
|
511
530
|
},
|
|
512
531
|
data: JSON.stringify({
|
|
513
532
|
data: [
|
|
@@ -547,12 +566,12 @@ function K(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
547
566
|
}
|
|
548
567
|
});
|
|
549
568
|
}
|
|
550
|
-
async function
|
|
551
|
-
const i = e.space, a = e.token,
|
|
569
|
+
async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
570
|
+
const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
552
571
|
type: "text/plain"
|
|
553
572
|
}), p = {
|
|
554
573
|
url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
555
|
-
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${
|
|
574
|
+
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
|
|
556
575
|
};
|
|
557
576
|
if (!i && i !== "") {
|
|
558
577
|
console.log("le store._3DSpace est vide");
|
|
@@ -570,7 +589,7 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
570
589
|
method: "POST",
|
|
571
590
|
data: d,
|
|
572
591
|
onComplete(T) {
|
|
573
|
-
if (
|
|
592
|
+
if (c !== "" && a !== "") {
|
|
574
593
|
const D = {
|
|
575
594
|
method: "POST",
|
|
576
595
|
headers: {
|
|
@@ -597,7 +616,7 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
597
616
|
}
|
|
598
617
|
]
|
|
599
618
|
},
|
|
600
|
-
tempId:
|
|
619
|
+
tempId: A()
|
|
601
620
|
}
|
|
602
621
|
]
|
|
603
622
|
}),
|
|
@@ -606,7 +625,7 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
606
625
|
onComplete: _,
|
|
607
626
|
onFailure: y
|
|
608
627
|
};
|
|
609
|
-
|
|
628
|
+
c !== "" && f(p.url_Post, D);
|
|
610
629
|
} else
|
|
611
630
|
console.warn("le store est vide");
|
|
612
631
|
},
|
|
@@ -617,21 +636,21 @@ async function Ne(e, t, n, s, o = void 0, c = void 0) {
|
|
|
617
636
|
}
|
|
618
637
|
function y(T, D) {
|
|
619
638
|
console.log("Erreur -- response ", T, `
|
|
620
|
-
headers `, D),
|
|
639
|
+
headers `, D), r && r(T);
|
|
621
640
|
}
|
|
622
641
|
f(h.ticketURL, S);
|
|
623
642
|
}
|
|
624
643
|
});
|
|
625
644
|
}
|
|
626
|
-
function b(e, t = void 0, n = void 0, s = void 0, o = void 0,
|
|
645
|
+
function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
|
|
627
646
|
const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
628
647
|
f(i, {
|
|
629
648
|
method: "GET",
|
|
630
649
|
onComplete(a) {
|
|
631
|
-
const
|
|
650
|
+
const c = JSON.parse(a);
|
|
632
651
|
let d = "", l, p, u;
|
|
633
652
|
if (t) {
|
|
634
|
-
let m =
|
|
653
|
+
let m = c.collabspaces.find((g) => g.title === t);
|
|
635
654
|
if (m) {
|
|
636
655
|
l = t;
|
|
637
656
|
let g = m.couples;
|
|
@@ -647,7 +666,7 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
|
647
666
|
let _ = g.filter(
|
|
648
667
|
(y) => y.role.name === h
|
|
649
668
|
);
|
|
650
|
-
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) :
|
|
669
|
+
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : r(_);
|
|
651
670
|
}
|
|
652
671
|
});
|
|
653
672
|
}) : g.forEach((h) => {
|
|
@@ -657,12 +676,12 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
|
657
676
|
let S = g.filter(
|
|
658
677
|
(_) => _.role.name === n
|
|
659
678
|
);
|
|
660
|
-
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) :
|
|
679
|
+
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : r(S);
|
|
661
680
|
}
|
|
662
681
|
}));
|
|
663
682
|
}
|
|
664
683
|
}
|
|
665
|
-
l && p && u ? (d = u + "." + p + "." + l, o(d)) :
|
|
684
|
+
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
685
|
},
|
|
667
686
|
onFailure(a) {
|
|
668
687
|
console.log("Erreur de récupération du contexte de sécurité. => ", a);
|
|
@@ -671,16 +690,24 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
|
671
690
|
}
|
|
672
691
|
async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
673
692
|
const o = e.objID;
|
|
674
|
-
(!o || o === "") && console.warn(
|
|
693
|
+
delete e.token, (!o || o === "") && console.warn(
|
|
675
694
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
676
695
|
), (e.space === "" || !e.space) && console.warn(
|
|
677
696
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
678
|
-
), (e.token === "" || !e.token) &&
|
|
697
|
+
), (e.token === "" || !e.token) && (J(
|
|
698
|
+
e,
|
|
699
|
+
(r) => {
|
|
700
|
+
e.token = r;
|
|
701
|
+
},
|
|
702
|
+
(r) => {
|
|
703
|
+
console.log("☠️ error => ", r);
|
|
704
|
+
}
|
|
705
|
+
), console.warn(
|
|
679
706
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
680
|
-
), console.log("_3DSpace_download_doc / credentials", e), U(
|
|
707
|
+
)), console.log("_3DSpace_download_doc / credentials", e), U(
|
|
681
708
|
e,
|
|
682
|
-
(
|
|
683
|
-
|
|
709
|
+
(r) => {
|
|
710
|
+
f(r, {
|
|
684
711
|
headers: {
|
|
685
712
|
ENO_CSRF_TOKEN: e.token
|
|
686
713
|
},
|
|
@@ -688,41 +715,41 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
|
688
715
|
const a = JSON.parse(i);
|
|
689
716
|
console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
|
|
690
717
|
},
|
|
691
|
-
onFailure(i, a,
|
|
692
|
-
n && (console.log("error http", i), n({ error: i, headers: a, xhr:
|
|
718
|
+
onFailure(i, a, c) {
|
|
719
|
+
n && (console.log("error http", i), n({ error: i, headers: a, xhr: c }));
|
|
693
720
|
}
|
|
694
721
|
});
|
|
695
722
|
},
|
|
696
|
-
(
|
|
697
|
-
n && n(
|
|
723
|
+
(r) => {
|
|
724
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
|
|
698
725
|
}
|
|
699
726
|
);
|
|
700
727
|
}
|
|
701
|
-
async function
|
|
728
|
+
async function X(e, t, n = void 0, s = void 0) {
|
|
702
729
|
let o = [];
|
|
703
730
|
for (let a = 0; a < t.length; a += 80) {
|
|
704
|
-
const
|
|
705
|
-
o.push(
|
|
731
|
+
const c = t.slice(a, a + 80);
|
|
732
|
+
o.push(c);
|
|
706
733
|
}
|
|
707
734
|
const i = (a) => {
|
|
708
|
-
|
|
735
|
+
V(
|
|
709
736
|
e,
|
|
710
737
|
o[a],
|
|
711
738
|
() => {
|
|
712
739
|
a++, a < o.length && i(a);
|
|
713
740
|
},
|
|
714
|
-
(
|
|
715
|
-
n && n(
|
|
741
|
+
(c) => {
|
|
742
|
+
n && n(c);
|
|
716
743
|
}
|
|
717
744
|
);
|
|
718
745
|
};
|
|
719
746
|
i(0);
|
|
720
747
|
}
|
|
721
|
-
function
|
|
722
|
-
const
|
|
723
|
-
t.forEach((
|
|
724
|
-
|
|
725
|
-
id:
|
|
748
|
+
function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
749
|
+
const r = [];
|
|
750
|
+
t.forEach((c) => {
|
|
751
|
+
r.push({
|
|
752
|
+
id: c
|
|
726
753
|
});
|
|
727
754
|
});
|
|
728
755
|
let i = JSON.stringify({
|
|
@@ -730,16 +757,16 @@ function X(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
730
757
|
name: "ENO_CSRF_TOKEN",
|
|
731
758
|
value: e.token
|
|
732
759
|
},
|
|
733
|
-
data:
|
|
760
|
+
data: r
|
|
734
761
|
});
|
|
735
762
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
736
763
|
f(a, {
|
|
737
764
|
method: "PUT",
|
|
738
765
|
data: i,
|
|
739
766
|
type: "json",
|
|
740
|
-
onComplete(
|
|
741
|
-
const d =
|
|
742
|
-
|
|
767
|
+
onComplete(c) {
|
|
768
|
+
const d = c.data;
|
|
769
|
+
c.success === !0 && (n && n(), d.forEach((l) => {
|
|
743
770
|
try {
|
|
744
771
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
745
772
|
f(u, {
|
|
@@ -759,15 +786,15 @@ function X(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
759
786
|
}
|
|
760
787
|
}));
|
|
761
788
|
},
|
|
762
|
-
onFailure(
|
|
763
|
-
console.log(
|
|
789
|
+
onFailure(c) {
|
|
790
|
+
console.log(c), o && o(c);
|
|
764
791
|
}
|
|
765
792
|
});
|
|
766
793
|
}
|
|
767
|
-
function
|
|
794
|
+
function De(e, t, n = void 0, s = void 0) {
|
|
768
795
|
return new Promise((o) => {
|
|
769
796
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
770
|
-
const
|
|
797
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
771
798
|
b(
|
|
772
799
|
e.space,
|
|
773
800
|
"ESPACE COMMUN",
|
|
@@ -801,12 +828,12 @@ function ke(e, t, n = void 0, s = void 0) {
|
|
|
801
828
|
s && s(a);
|
|
802
829
|
}
|
|
803
830
|
};
|
|
804
|
-
f(
|
|
831
|
+
f(r, i);
|
|
805
832
|
}
|
|
806
833
|
});
|
|
807
834
|
}
|
|
808
|
-
function
|
|
809
|
-
return new Promise((
|
|
835
|
+
function Fe(e, t, n, s = void 0, o = void 0) {
|
|
836
|
+
return new Promise((r) => {
|
|
810
837
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
811
838
|
const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
812
839
|
b(
|
|
@@ -814,9 +841,9 @@ function De(e, t, n, s = void 0, o = void 0) {
|
|
|
814
841
|
"ESPACE COMMUN",
|
|
815
842
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
816
843
|
void 0,
|
|
817
|
-
(
|
|
818
|
-
(
|
|
819
|
-
console.log("onError =>",
|
|
844
|
+
(c) => e.ctx = c,
|
|
845
|
+
(c) => {
|
|
846
|
+
console.log("onError =>", c);
|
|
820
847
|
}
|
|
821
848
|
);
|
|
822
849
|
let a = {
|
|
@@ -836,21 +863,21 @@ function De(e, t, n, s = void 0, o = void 0) {
|
|
|
836
863
|
]
|
|
837
864
|
}),
|
|
838
865
|
type: "json",
|
|
839
|
-
onComplete(
|
|
840
|
-
s && s(
|
|
866
|
+
onComplete(c) {
|
|
867
|
+
s && s(c);
|
|
841
868
|
},
|
|
842
|
-
onFailure(
|
|
843
|
-
o && o(
|
|
869
|
+
onFailure(c) {
|
|
870
|
+
o && o(c);
|
|
844
871
|
}
|
|
845
872
|
};
|
|
846
873
|
f(i, a);
|
|
847
874
|
}
|
|
848
875
|
});
|
|
849
876
|
}
|
|
850
|
-
function
|
|
877
|
+
function Ue(e, t, n = void 0, s = void 0) {
|
|
851
878
|
return new Promise((o) => {
|
|
852
879
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
853
|
-
const
|
|
880
|
+
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
854
881
|
b(
|
|
855
882
|
e.space,
|
|
856
883
|
"ESPACE COMMUN",
|
|
@@ -884,14 +911,14 @@ function Fe(e, t, n = void 0, s = void 0) {
|
|
|
884
911
|
s && s(a);
|
|
885
912
|
}
|
|
886
913
|
};
|
|
887
|
-
f(
|
|
914
|
+
f(r, i);
|
|
888
915
|
}
|
|
889
916
|
});
|
|
890
917
|
}
|
|
891
|
-
function
|
|
918
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
892
919
|
return new Promise((o) => {
|
|
893
920
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
894
|
-
const
|
|
921
|
+
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
895
922
|
b(
|
|
896
923
|
e.space,
|
|
897
924
|
"ESPACE COMMUN",
|
|
@@ -931,12 +958,12 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
931
958
|
s && s(a);
|
|
932
959
|
}
|
|
933
960
|
};
|
|
934
|
-
f(
|
|
961
|
+
f(r, i);
|
|
935
962
|
}
|
|
936
963
|
});
|
|
937
964
|
}
|
|
938
|
-
function
|
|
939
|
-
return new Promise((
|
|
965
|
+
function je(e, t, n, s = void 0, o = void 0) {
|
|
966
|
+
return new Promise((r) => {
|
|
940
967
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
941
968
|
const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
942
969
|
b(
|
|
@@ -944,9 +971,9 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
944
971
|
"ESPACE COMMUN",
|
|
945
972
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
946
973
|
void 0,
|
|
947
|
-
(
|
|
948
|
-
(
|
|
949
|
-
console.log("onError =>",
|
|
974
|
+
(c) => e.ctx = c,
|
|
975
|
+
(c) => {
|
|
976
|
+
console.log("onError =>", c);
|
|
950
977
|
}
|
|
951
978
|
);
|
|
952
979
|
let a = {
|
|
@@ -971,11 +998,11 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
971
998
|
notificationTimeout: 600
|
|
972
999
|
}),
|
|
973
1000
|
type: "json",
|
|
974
|
-
onComplete(
|
|
975
|
-
s && s(
|
|
1001
|
+
onComplete(c) {
|
|
1002
|
+
s && s(c);
|
|
976
1003
|
},
|
|
977
|
-
onFailure(
|
|
978
|
-
o && o(
|
|
1004
|
+
onFailure(c) {
|
|
1005
|
+
o && o(c);
|
|
979
1006
|
}
|
|
980
1007
|
};
|
|
981
1008
|
f(i, a);
|
|
@@ -983,20 +1010,7 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
983
1010
|
});
|
|
984
1011
|
}
|
|
985
1012
|
//!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) {
|
|
1013
|
+
function Re(e, t = void 0, n = void 0) {
|
|
1000
1014
|
const s = {
|
|
1001
1015
|
base: `${e.space}`,
|
|
1002
1016
|
uri: "/resources/bps/cspaces",
|
|
@@ -1008,27 +1022,27 @@ function Ae(e, t = void 0, n = void 0) {
|
|
|
1008
1022
|
Accept: "application/json,text/javascript,*/*",
|
|
1009
1023
|
"Content-Type": "application/ds-json"
|
|
1010
1024
|
},
|
|
1011
|
-
onComplete(
|
|
1012
|
-
const a = JSON.parse(
|
|
1025
|
+
onComplete(r, i) {
|
|
1026
|
+
const a = JSON.parse(r);
|
|
1013
1027
|
t && t(a, i);
|
|
1014
1028
|
},
|
|
1015
|
-
onFailure(
|
|
1016
|
-
n && n({ response:
|
|
1029
|
+
onFailure(r, i, a) {
|
|
1030
|
+
n && n({ response: r, headers: i, xhr: a });
|
|
1017
1031
|
}
|
|
1018
1032
|
});
|
|
1019
1033
|
}
|
|
1020
|
-
function
|
|
1034
|
+
function Ae(e, t, n, s) {
|
|
1021
1035
|
U(
|
|
1022
1036
|
e.space,
|
|
1023
1037
|
t,
|
|
1024
1038
|
(o) => {
|
|
1025
1039
|
f(o, {
|
|
1026
1040
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1027
|
-
onComplete: (
|
|
1028
|
-
n && n(
|
|
1041
|
+
onComplete: (r) => {
|
|
1042
|
+
n && n(r);
|
|
1029
1043
|
},
|
|
1030
|
-
onFailure: (
|
|
1031
|
-
console.log("error http",
|
|
1044
|
+
onFailure: (r) => {
|
|
1045
|
+
console.log("error http", r), s && s(r);
|
|
1032
1046
|
}
|
|
1033
1047
|
});
|
|
1034
1048
|
}
|
|
@@ -1036,29 +1050,29 @@ function Re(e, t, n, s) {
|
|
|
1036
1050
|
}
|
|
1037
1051
|
async function Ie(e, t, n = void 0, s = void 0) {
|
|
1038
1052
|
return new Promise((o) => {
|
|
1039
|
-
U(e, t, (
|
|
1040
|
-
f(
|
|
1041
|
-
onComplete: (i, a,
|
|
1042
|
-
onFailure: (i, a,
|
|
1043
|
-
s && s(i, a,
|
|
1053
|
+
U(e, t, (r) => {
|
|
1054
|
+
f(r, {
|
|
1055
|
+
onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
|
|
1056
|
+
onFailure: (i, a, c) => {
|
|
1057
|
+
s && s(i, a, c), console.log(i, a?.errormsg);
|
|
1044
1058
|
}
|
|
1045
1059
|
});
|
|
1046
1060
|
});
|
|
1047
1061
|
});
|
|
1048
1062
|
}
|
|
1049
1063
|
function ve(e, t, n, s = void 0, o = void 0) {
|
|
1050
|
-
const
|
|
1064
|
+
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1051
1065
|
k(
|
|
1052
1066
|
e,
|
|
1053
1067
|
n,
|
|
1054
1068
|
(i) => {
|
|
1055
|
-
const a = i.data[0].relateddata.files[0].id,
|
|
1056
|
-
|
|
1069
|
+
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;
|
|
1070
|
+
K(
|
|
1057
1071
|
e,
|
|
1058
1072
|
n,
|
|
1059
1073
|
a,
|
|
1060
|
-
c,
|
|
1061
1074
|
r,
|
|
1075
|
+
c,
|
|
1062
1076
|
(d) => {
|
|
1063
1077
|
s && s(d);
|
|
1064
1078
|
},
|
|
@@ -1095,21 +1109,21 @@ async function Pe(e, t = void 0, n = void 0) {
|
|
|
1095
1109
|
e,
|
|
1096
1110
|
(s) => {
|
|
1097
1111
|
const o = {};
|
|
1098
|
-
o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t(o);
|
|
1112
|
+
o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1099
1113
|
},
|
|
1100
1114
|
(s) => {
|
|
1101
|
-
n && n(s);
|
|
1115
|
+
n && n?.(s);
|
|
1102
1116
|
}
|
|
1103
1117
|
);
|
|
1104
1118
|
}
|
|
1105
1119
|
function Me(e, t = void 0, n = void 0) {
|
|
1106
1120
|
const s = [];
|
|
1107
|
-
e.objIds.forEach((o,
|
|
1121
|
+
e.objIds.forEach((o, r) => {
|
|
1108
1122
|
I(
|
|
1109
1123
|
e,
|
|
1110
1124
|
o.objId,
|
|
1111
1125
|
(i) => {
|
|
1112
|
-
s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID),
|
|
1126
|
+
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
1127
|
},
|
|
1114
1128
|
(i) => {
|
|
1115
1129
|
n && n(i);
|
|
@@ -1117,20 +1131,20 @@ function Me(e, t = void 0, n = void 0) {
|
|
|
1117
1131
|
);
|
|
1118
1132
|
});
|
|
1119
1133
|
}
|
|
1120
|
-
function
|
|
1121
|
-
|
|
1134
|
+
function B(e, t, n = void 0, s = void 0) {
|
|
1135
|
+
X(
|
|
1122
1136
|
e,
|
|
1123
1137
|
v,
|
|
1124
1138
|
(o) => {
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1139
|
+
const r = [...t];
|
|
1140
|
+
r.find((i) => i.objectID === o.objectId).data = o.data, x = r, $.push(o.data), n && n($);
|
|
1127
1141
|
},
|
|
1128
1142
|
(o) => {
|
|
1129
1143
|
s && (s(o), console.log(o));
|
|
1130
1144
|
}
|
|
1131
1145
|
);
|
|
1132
1146
|
}
|
|
1133
|
-
const
|
|
1147
|
+
const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
1134
1148
|
"swym",
|
|
1135
1149
|
"3dspace",
|
|
1136
1150
|
"drive",
|
|
@@ -1144,17 +1158,17 @@ const B = "FA35FB9B177A280065800EA0000F599C", Y = [
|
|
|
1144
1158
|
where: "ds6w:where",
|
|
1145
1159
|
who: "ds6w:who",
|
|
1146
1160
|
why: "ds6w:why"
|
|
1147
|
-
},
|
|
1148
|
-
objId:
|
|
1161
|
+
}, z = {
|
|
1162
|
+
objId: Y,
|
|
1149
1163
|
pred: "who",
|
|
1150
1164
|
order_by: "desc",
|
|
1151
1165
|
tag: "testTag"
|
|
1152
1166
|
};
|
|
1153
1167
|
function Le(e, t, n = void 0, s = void 0) {
|
|
1154
|
-
const { space: o, tenant:
|
|
1168
|
+
const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
|
|
1155
1169
|
uri: "/resources/6w/tags",
|
|
1156
1170
|
otpCTX: "SecurityContext=preferred",
|
|
1157
|
-
optTenant: `tenant=${
|
|
1171
|
+
optTenant: `tenant=${r}`
|
|
1158
1172
|
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1159
1173
|
tag: [
|
|
1160
1174
|
{
|
|
@@ -1165,7 +1179,7 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1165
1179
|
],
|
|
1166
1180
|
predicate: P[a],
|
|
1167
1181
|
object: {
|
|
1168
|
-
literal:
|
|
1182
|
+
literal: c
|
|
1169
1183
|
}
|
|
1170
1184
|
}
|
|
1171
1185
|
]
|
|
@@ -1181,12 +1195,12 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1181
1195
|
JSON.parse(u);
|
|
1182
1196
|
const m = {};
|
|
1183
1197
|
setTimeout(() => {
|
|
1184
|
-
|
|
1198
|
+
G(
|
|
1185
1199
|
e,
|
|
1186
1200
|
i,
|
|
1187
1201
|
(g) => {
|
|
1188
1202
|
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 },
|
|
1203
|
+
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
|
|
1190
1204
|
e,
|
|
1191
1205
|
t,
|
|
1192
1206
|
(y) => {
|
|
@@ -1210,19 +1224,19 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1210
1224
|
}
|
|
1211
1225
|
});
|
|
1212
1226
|
}
|
|
1213
|
-
function
|
|
1227
|
+
function q(e, t, n = void 0, s = void 0) {
|
|
1214
1228
|
console.log("obj ", t);
|
|
1215
|
-
const o = t.info.name,
|
|
1229
|
+
const o = t.info.name, r = {
|
|
1216
1230
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1217
1231
|
uri: "/federated/search"
|
|
1218
|
-
}, i = `${
|
|
1232
|
+
}, i = `${r.baseUrl}${r.uri}`, a = {
|
|
1219
1233
|
"Content-Type": "application/json",
|
|
1220
1234
|
Accept: "application/json,text/javascript,*/*"
|
|
1221
|
-
},
|
|
1235
|
+
}, c = A(), d = {
|
|
1222
1236
|
with_indexing_date: !0,
|
|
1223
1237
|
with_synthesis: !0,
|
|
1224
1238
|
with_nls: !1,
|
|
1225
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1239
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
|
|
1226
1240
|
locale: "fr",
|
|
1227
1241
|
select_predicate: [
|
|
1228
1242
|
"ds6w:label",
|
|
@@ -1260,7 +1274,7 @@ function z(e, t, n = void 0, s = void 0) {
|
|
|
1260
1274
|
}
|
|
1261
1275
|
},
|
|
1262
1276
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1263
|
-
order_by:
|
|
1277
|
+
order_by: z.order_by,
|
|
1264
1278
|
order_field: "relevance",
|
|
1265
1279
|
select_snippets: [
|
|
1266
1280
|
"ds6w:snippet",
|
|
@@ -1271,7 +1285,7 @@ function z(e, t, n = void 0, s = void 0) {
|
|
|
1271
1285
|
],
|
|
1272
1286
|
nresults: 40,
|
|
1273
1287
|
start: "0",
|
|
1274
|
-
source:
|
|
1288
|
+
source: H,
|
|
1275
1289
|
tenant: e.tenant,
|
|
1276
1290
|
login: {
|
|
1277
1291
|
"3dspace": {
|
|
@@ -1294,11 +1308,11 @@ function z(e, t, n = void 0, s = void 0) {
|
|
|
1294
1308
|
});
|
|
1295
1309
|
}
|
|
1296
1310
|
function Ee(e, t, n = void 0, s = void 0) {
|
|
1297
|
-
const { objId: o, pred:
|
|
1311
|
+
const { objId: o, pred: r, tag: i } = t, a = {
|
|
1298
1312
|
uri: "/resources/6w/tags",
|
|
1299
1313
|
otpCTX: "SecurityContext=preferred",
|
|
1300
1314
|
optTenant: `tenant=${e.tenant}`
|
|
1301
|
-
},
|
|
1315
|
+
}, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1302
1316
|
tag: [
|
|
1303
1317
|
{
|
|
1304
1318
|
subject: [
|
|
@@ -1306,14 +1320,14 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1306
1320
|
uri: `pid://${o}`
|
|
1307
1321
|
}
|
|
1308
1322
|
],
|
|
1309
|
-
predicate: P[
|
|
1323
|
+
predicate: P[r],
|
|
1310
1324
|
object: {
|
|
1311
1325
|
literal: i
|
|
1312
1326
|
}
|
|
1313
1327
|
}
|
|
1314
1328
|
]
|
|
1315
1329
|
};
|
|
1316
|
-
f(
|
|
1330
|
+
f(c, {
|
|
1317
1331
|
method: "DELETE",
|
|
1318
1332
|
data: JSON.stringify(d),
|
|
1319
1333
|
headers: {
|
|
@@ -1333,16 +1347,16 @@ function Je(e, t = "", n = void 0, s = void 0) {
|
|
|
1333
1347
|
const { space: o } = e;
|
|
1334
1348
|
if (t === "")
|
|
1335
1349
|
return;
|
|
1336
|
-
const
|
|
1350
|
+
const r = {
|
|
1337
1351
|
uri: "/resources/v1/modeler/documents"
|
|
1338
1352
|
}, i = {
|
|
1339
1353
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1340
1354
|
Accept: "application/json,text/javascript,*/*"
|
|
1341
|
-
}, a = `${o}${
|
|
1355
|
+
}, 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
1356
|
f(a, {
|
|
1343
1357
|
method: "POST",
|
|
1344
1358
|
headers: i,
|
|
1345
|
-
data:
|
|
1359
|
+
data: c,
|
|
1346
1360
|
onComplete(d) {
|
|
1347
1361
|
n && n(JSON.parse(d));
|
|
1348
1362
|
},
|
|
@@ -1355,7 +1369,7 @@ function Je(e, t = "", n = void 0, s = void 0) {
|
|
|
1355
1369
|
async function w(e, t = void 0, n = void 0) {
|
|
1356
1370
|
const s = e.space + "/api/index/tk";
|
|
1357
1371
|
return f(s, {
|
|
1358
|
-
onComplete(o,
|
|
1372
|
+
onComplete(o, r, i) {
|
|
1359
1373
|
const a = JSON.parse(o);
|
|
1360
1374
|
if (t)
|
|
1361
1375
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1376,11 +1390,11 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1376
1390
|
start: 0
|
|
1377
1391
|
}
|
|
1378
1392
|
};
|
|
1379
|
-
w(e, (
|
|
1393
|
+
w(e, (r) => {
|
|
1380
1394
|
f(s, {
|
|
1381
1395
|
method: "POST",
|
|
1382
1396
|
headers: {
|
|
1383
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1397
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1384
1398
|
"Content-type": "application/json;charset=UTF-8",
|
|
1385
1399
|
Accept: "application/json"
|
|
1386
1400
|
},
|
|
@@ -1405,19 +1419,19 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1405
1419
|
maxNbOfCommonElements: "5"
|
|
1406
1420
|
}
|
|
1407
1421
|
};
|
|
1408
|
-
w(e, (
|
|
1422
|
+
w(e, (r) => {
|
|
1409
1423
|
f(s, {
|
|
1410
1424
|
method: "POST",
|
|
1411
1425
|
headers: {
|
|
1412
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1426
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1413
1427
|
"Content-type": "application/json;charset=UTF-8",
|
|
1414
1428
|
Accept: "application/json"
|
|
1415
1429
|
},
|
|
1416
1430
|
data: JSON.stringify(o),
|
|
1417
1431
|
type: "json",
|
|
1418
1432
|
onComplete(i, a) {
|
|
1419
|
-
const
|
|
1420
|
-
t && t(
|
|
1433
|
+
const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1434
|
+
t && t(c, i);
|
|
1421
1435
|
},
|
|
1422
1436
|
onFailure(i, a) {
|
|
1423
1437
|
n && n(i, a);
|
|
@@ -1431,14 +1445,14 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1431
1445
|
uri: "/api/community/listmycommunities",
|
|
1432
1446
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1433
1447
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1434
|
-
}, o = `${s.base}${s.uri}${s.limit}${s.page}`,
|
|
1448
|
+
}, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1435
1449
|
w(e, (i) => {
|
|
1436
1450
|
f(o, {
|
|
1437
1451
|
method: "GET",
|
|
1438
1452
|
headers: {
|
|
1439
1453
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1440
1454
|
},
|
|
1441
|
-
onComplete(a,
|
|
1455
|
+
onComplete(a, c, d) {
|
|
1442
1456
|
const p = JSON.parse(a).result;
|
|
1443
1457
|
let u = 0;
|
|
1444
1458
|
p.forEach((m) => {
|
|
@@ -1450,25 +1464,25 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1450
1464
|
role: m.role,
|
|
1451
1465
|
access: m.access
|
|
1452
1466
|
};
|
|
1453
|
-
|
|
1467
|
+
Q(
|
|
1454
1468
|
e,
|
|
1455
1469
|
m.id,
|
|
1456
1470
|
(h) => {
|
|
1457
|
-
u++, g.members = h,
|
|
1471
|
+
u++, g.members = h, r.push(g), u === p.length && t && t(r);
|
|
1458
1472
|
},
|
|
1459
1473
|
(h) => n(h)
|
|
1460
1474
|
);
|
|
1461
1475
|
});
|
|
1462
1476
|
},
|
|
1463
|
-
onFailure(a,
|
|
1477
|
+
onFailure(a, c) {
|
|
1464
1478
|
const d = a;
|
|
1465
|
-
d.status =
|
|
1479
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1466
1480
|
}
|
|
1467
1481
|
});
|
|
1468
1482
|
});
|
|
1469
1483
|
}
|
|
1470
|
-
function
|
|
1471
|
-
const o = `${e.space}/api/community/listmembers`,
|
|
1484
|
+
function Q(e, t, n, s) {
|
|
1485
|
+
const o = `${e.space}/api/community/listmembers`, r = {
|
|
1472
1486
|
params: {
|
|
1473
1487
|
page: e.page ? e.page : 1,
|
|
1474
1488
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1483,14 +1497,14 @@ function q(e, t, n, s) {
|
|
|
1483
1497
|
Accept: "application/json",
|
|
1484
1498
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1485
1499
|
},
|
|
1486
|
-
data: JSON.stringify(
|
|
1500
|
+
data: JSON.stringify(r),
|
|
1487
1501
|
type: "json",
|
|
1488
|
-
onComplete(a,
|
|
1502
|
+
onComplete(a, c, d) {
|
|
1489
1503
|
n && n(a);
|
|
1490
1504
|
},
|
|
1491
|
-
onFailure(a,
|
|
1505
|
+
onFailure(a, c) {
|
|
1492
1506
|
const d = a;
|
|
1493
|
-
d.status =
|
|
1507
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1494
1508
|
}
|
|
1495
1509
|
});
|
|
1496
1510
|
});
|
|
@@ -1499,44 +1513,44 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1499
1513
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1500
1514
|
e.commu_id || (e.commu_id = s);
|
|
1501
1515
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1502
|
-
w(e, (
|
|
1516
|
+
w(e, (r) => {
|
|
1503
1517
|
f(o, {
|
|
1504
1518
|
method: "GET",
|
|
1505
1519
|
headers: {
|
|
1506
1520
|
"Content-type": "application/json;charset=UTF-8",
|
|
1507
1521
|
Accept: "application/json",
|
|
1508
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1522
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1509
1523
|
},
|
|
1510
1524
|
onComplete(i) {
|
|
1511
1525
|
const a = JSON.parse(i);
|
|
1512
1526
|
t && t(a);
|
|
1513
1527
|
},
|
|
1514
1528
|
onFailure(i, a) {
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1529
|
+
const c = i;
|
|
1530
|
+
c.status = a.status, c.response = a.errormsg, n && n(c);
|
|
1517
1531
|
}
|
|
1518
1532
|
});
|
|
1519
1533
|
});
|
|
1520
1534
|
}
|
|
1521
1535
|
function Ve(e, t, n = void 0, s = void 0) {
|
|
1522
|
-
const { listAllContacts: o, currentUser:
|
|
1536
|
+
const { listAllContacts: o, currentUser: r } = e;
|
|
1523
1537
|
console.log("__listAllContacts", o.hits);
|
|
1524
1538
|
const i = `${e.space}/api/directmessages`, a = {
|
|
1525
|
-
users: [
|
|
1526
|
-
},
|
|
1539
|
+
users: [r.login].concat(t.receipt)
|
|
1540
|
+
}, c = {
|
|
1527
1541
|
id_msg: "",
|
|
1528
1542
|
senderId: e.currentUser.login,
|
|
1529
1543
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1530
|
-
msg:
|
|
1544
|
+
msg: ee(t.msg)
|
|
1531
1545
|
};
|
|
1532
1546
|
let d = !1;
|
|
1533
|
-
|
|
1547
|
+
Z(
|
|
1534
1548
|
a.users,
|
|
1535
1549
|
(l) => {
|
|
1536
|
-
l !== void 0 && (
|
|
1550
|
+
l !== void 0 && (c.id_msg = l.id, d = !0, j(e, c));
|
|
1537
1551
|
},
|
|
1538
1552
|
(l) => {
|
|
1539
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l),
|
|
1553
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
|
|
1540
1554
|
}
|
|
1541
1555
|
), d === !1 && setTimeout(() => {
|
|
1542
1556
|
d === !1 && w(e, (l) => {
|
|
@@ -1551,7 +1565,7 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1551
1565
|
type: "json",
|
|
1552
1566
|
onComplete(p, u, m) {
|
|
1553
1567
|
const g = p;
|
|
1554
|
-
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g),
|
|
1568
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, j(e, c);
|
|
1555
1569
|
},
|
|
1556
1570
|
onFailure(p, u, m) {
|
|
1557
1571
|
const g = p;
|
|
@@ -1561,21 +1575,21 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1561
1575
|
});
|
|
1562
1576
|
}, 500);
|
|
1563
1577
|
}
|
|
1564
|
-
function
|
|
1578
|
+
function Z(e, t, n, s) {
|
|
1565
1579
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1566
|
-
w(e, (
|
|
1580
|
+
w(e, (r) => {
|
|
1567
1581
|
f(o, {
|
|
1568
1582
|
method: "GET",
|
|
1569
1583
|
headers: {
|
|
1570
1584
|
Accept: "application/json,text/javascript,*/*",
|
|
1571
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1585
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1572
1586
|
},
|
|
1573
1587
|
onComplete(i) {
|
|
1574
|
-
const a = JSON.parse(i),
|
|
1588
|
+
const a = JSON.parse(i), c = [];
|
|
1575
1589
|
a.result.forEach((p) => {
|
|
1576
|
-
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length &&
|
|
1590
|
+
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
|
|
1577
1591
|
});
|
|
1578
|
-
const d = t.sort(), l =
|
|
1592
|
+
const d = t.sort(), l = c.find((p) => {
|
|
1579
1593
|
const u = [];
|
|
1580
1594
|
return p.users.forEach((m) => {
|
|
1581
1595
|
u.push(m.login);
|
|
@@ -1596,7 +1610,7 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1596
1610
|
uri: "/api/community",
|
|
1597
1611
|
id_msg: `${t.id_msg}`,
|
|
1598
1612
|
endUri: "/instantmessages"
|
|
1599
|
-
},
|
|
1613
|
+
}, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
|
|
1600
1614
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1601
1615
|
accessState: null,
|
|
1602
1616
|
commentUri: null,
|
|
@@ -1606,8 +1620,8 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1606
1620
|
parentCommentUri: null,
|
|
1607
1621
|
richMessage: t.msg
|
|
1608
1622
|
};
|
|
1609
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1610
|
-
f(
|
|
1623
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
|
|
1624
|
+
f(r, {
|
|
1611
1625
|
method: "POST",
|
|
1612
1626
|
headers: {
|
|
1613
1627
|
"Content-Type": "application/json",
|
|
@@ -1616,25 +1630,25 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1616
1630
|
},
|
|
1617
1631
|
data: JSON.stringify(i),
|
|
1618
1632
|
type: "json",
|
|
1619
|
-
onComplete(
|
|
1620
|
-
const p =
|
|
1633
|
+
onComplete(c, d, l) {
|
|
1634
|
+
const p = c;
|
|
1621
1635
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1622
1636
|
},
|
|
1623
|
-
onFailure(
|
|
1624
|
-
const l =
|
|
1637
|
+
onFailure(c, d) {
|
|
1638
|
+
const l = c;
|
|
1625
1639
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1626
1640
|
}
|
|
1627
1641
|
});
|
|
1628
1642
|
});
|
|
1629
1643
|
}
|
|
1630
|
-
function
|
|
1644
|
+
function ee(e) {
|
|
1631
1645
|
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1632
1646
|
return `<p>${e} </p>
|
|
1633
1647
|
<br/>
|
|
1634
1648
|
<hr/>
|
|
1635
1649
|
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1636
1650
|
}
|
|
1637
|
-
const
|
|
1651
|
+
const te = {
|
|
1638
1652
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1639
1653
|
// titre du post
|
|
1640
1654
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1645,27 +1659,27 @@ const ee = {
|
|
|
1645
1659
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1646
1660
|
};
|
|
1647
1661
|
function Be(e, t, n = void 0, s = void 0) {
|
|
1648
|
-
const o = `${e.space}/api/idea/add`,
|
|
1649
|
-
(
|
|
1662
|
+
const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1663
|
+
(c) => c.id === t.community_id
|
|
1650
1664
|
), i = e.swymCommunities.find(
|
|
1651
|
-
(
|
|
1665
|
+
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1652
1666
|
), a = {
|
|
1653
1667
|
params: {
|
|
1654
1668
|
title: t.title,
|
|
1655
1669
|
// String, le nom de l'affaire
|
|
1656
|
-
community_id:
|
|
1670
|
+
community_id: r?.id !== void 0 ? r.id : i.id,
|
|
1657
1671
|
// String, l'id de la communauté
|
|
1658
|
-
message:
|
|
1672
|
+
message: ne(t.text_html),
|
|
1659
1673
|
// STRING => le contenue du message doit être au format HTML
|
|
1660
1674
|
published: 1
|
|
1661
1675
|
// 1 publier, 0 non publier
|
|
1662
1676
|
}
|
|
1663
1677
|
};
|
|
1664
|
-
w(e, (
|
|
1678
|
+
w(e, (c) => {
|
|
1665
1679
|
const d = {
|
|
1666
1680
|
"Content-type": "application/json;charset=UTF-8",
|
|
1667
1681
|
Accept: "application/json",
|
|
1668
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1682
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1669
1683
|
};
|
|
1670
1684
|
f(o, {
|
|
1671
1685
|
method: "POST",
|
|
@@ -1684,7 +1698,7 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1684
1698
|
});
|
|
1685
1699
|
}
|
|
1686
1700
|
function Ye(e, t, n = void 0, s = void 0) {
|
|
1687
|
-
const o = `${e.space}/api/idea/delete`,
|
|
1701
|
+
const o = `${e.space}/api/idea/delete`, r = {
|
|
1688
1702
|
params: {
|
|
1689
1703
|
community_id: t.community_id,
|
|
1690
1704
|
ideationIds: [t.idee_id]
|
|
@@ -1698,14 +1712,14 @@ function Ye(e, t, n = void 0, s = void 0) {
|
|
|
1698
1712
|
Accept: "application/json",
|
|
1699
1713
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1700
1714
|
},
|
|
1701
|
-
data: JSON.stringify(
|
|
1715
|
+
data: JSON.stringify(r),
|
|
1702
1716
|
type: "json",
|
|
1703
|
-
onComplete(a,
|
|
1717
|
+
onComplete(a, c, d) {
|
|
1704
1718
|
n && n(a);
|
|
1705
1719
|
},
|
|
1706
|
-
onFailure(a,
|
|
1720
|
+
onFailure(a, c, d) {
|
|
1707
1721
|
const l = a;
|
|
1708
|
-
l.status =
|
|
1722
|
+
l.status = c.status, l.response = c.errormsg, s && s(l);
|
|
1709
1723
|
}
|
|
1710
1724
|
});
|
|
1711
1725
|
});
|
|
@@ -1713,13 +1727,13 @@ function Ye(e, t, n = void 0, s = void 0) {
|
|
|
1713
1727
|
function He(e, t = "", n = void 0, s = void 0) {
|
|
1714
1728
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1715
1729
|
t === "" && (t = o);
|
|
1716
|
-
const
|
|
1730
|
+
const r = `${e.space}/api/idea/get`, i = {
|
|
1717
1731
|
params: {
|
|
1718
1732
|
id: t
|
|
1719
1733
|
}
|
|
1720
1734
|
};
|
|
1721
1735
|
w(e, (a) => {
|
|
1722
|
-
f(
|
|
1736
|
+
f(r, {
|
|
1723
1737
|
method: "POST",
|
|
1724
1738
|
headers: {
|
|
1725
1739
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1728,41 +1742,41 @@ function He(e, t = "", n = void 0, s = void 0) {
|
|
|
1728
1742
|
},
|
|
1729
1743
|
data: JSON.stringify(i),
|
|
1730
1744
|
type: "json",
|
|
1731
|
-
onComplete(
|
|
1732
|
-
const d =
|
|
1745
|
+
onComplete(c) {
|
|
1746
|
+
const d = c;
|
|
1733
1747
|
d.msg = d.result.message, n && n(d);
|
|
1734
1748
|
},
|
|
1735
|
-
onFailure(
|
|
1736
|
-
const d =
|
|
1749
|
+
onFailure(c) {
|
|
1750
|
+
const d = c;
|
|
1737
1751
|
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1738
1752
|
}
|
|
1739
1753
|
});
|
|
1740
1754
|
});
|
|
1741
1755
|
}
|
|
1742
|
-
function ze(e, t =
|
|
1756
|
+
function ze(e, t = te, n = void 0, s = void 0) {
|
|
1743
1757
|
const o = {
|
|
1744
1758
|
uri: "/api/idea/list",
|
|
1745
1759
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1746
1760
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1747
|
-
},
|
|
1761
|
+
}, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1748
1762
|
w(e, (i) => {
|
|
1749
|
-
f(
|
|
1763
|
+
f(r, {
|
|
1750
1764
|
method: "GET",
|
|
1751
1765
|
headers: {
|
|
1752
1766
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1753
1767
|
},
|
|
1754
1768
|
onComplete(a) {
|
|
1755
|
-
const
|
|
1756
|
-
n && n(
|
|
1769
|
+
const c = JSON.parse(a);
|
|
1770
|
+
n && n(c);
|
|
1757
1771
|
},
|
|
1758
|
-
onFailure(a,
|
|
1772
|
+
onFailure(a, c) {
|
|
1759
1773
|
const d = a;
|
|
1760
|
-
d.status =
|
|
1774
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1761
1775
|
}
|
|
1762
1776
|
});
|
|
1763
1777
|
});
|
|
1764
1778
|
}
|
|
1765
|
-
function
|
|
1779
|
+
function ne(e) {
|
|
1766
1780
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1767
1781
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1768
1782
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1845,13 +1859,13 @@ function qe(e, t = void 0, n = void 0) {
|
|
|
1845
1859
|
headers: {
|
|
1846
1860
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1847
1861
|
},
|
|
1848
|
-
onComplete(
|
|
1849
|
-
const
|
|
1850
|
-
t && t(
|
|
1862
|
+
onComplete(r, i, a) {
|
|
1863
|
+
const c = JSON.parse(r);
|
|
1864
|
+
t && t(c.result);
|
|
1851
1865
|
},
|
|
1852
|
-
onFailure(
|
|
1853
|
-
const
|
|
1854
|
-
n && n(
|
|
1866
|
+
onFailure(r, i, a) {
|
|
1867
|
+
const c = { erreur: JSON.parse(r), headers: i, xhr: a };
|
|
1868
|
+
n && n(c);
|
|
1855
1869
|
}
|
|
1856
1870
|
});
|
|
1857
1871
|
});
|
|
@@ -1860,11 +1874,11 @@ function Qe(e, t, n = void 0, s = void 0) {
|
|
|
1860
1874
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1861
1875
|
w(
|
|
1862
1876
|
e,
|
|
1863
|
-
(
|
|
1877
|
+
(r) => {
|
|
1864
1878
|
f(o, {
|
|
1865
1879
|
method: "GET",
|
|
1866
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1867
|
-
onComplete(i, a,
|
|
1880
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1881
|
+
onComplete(i, a, c) {
|
|
1868
1882
|
const d = JSON.parse(i);
|
|
1869
1883
|
n && n(d);
|
|
1870
1884
|
},
|
|
@@ -1881,29 +1895,29 @@ function Ze(e) {
|
|
|
1881
1895
|
return console.log(t), t;
|
|
1882
1896
|
}
|
|
1883
1897
|
export {
|
|
1884
|
-
|
|
1885
|
-
|
|
1898
|
+
A as UUID,
|
|
1899
|
+
ke as _3DSpace_Create_Doc,
|
|
1886
1900
|
C as _3DSpace_csrf,
|
|
1887
1901
|
I as _3DSpace_download_doc,
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1902
|
+
X as _3DSpace_download_multidoc,
|
|
1903
|
+
K as _3DSpace_file_update,
|
|
1904
|
+
W as _3DSpace_file_update_csr,
|
|
1905
|
+
Ne as _3DSpace_file_url_csr,
|
|
1892
1906
|
k as _3DSpace_get_csrf,
|
|
1893
|
-
|
|
1894
|
-
|
|
1907
|
+
G as _3DSpace_get_docInfo,
|
|
1908
|
+
V as _3DSpace_get_downloadTicket_multidoc,
|
|
1895
1909
|
b as _3DSpace_get_securityContexts,
|
|
1896
1910
|
U as _3DSpace_get_ticket,
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1911
|
+
je as _3DSpace_lifecycle_changeRevision,
|
|
1912
|
+
Fe as _3DSpace_lifecycle_changeState,
|
|
1913
|
+
Ue as _3DSpace_lifecycle_getGraph,
|
|
1914
|
+
$e as _3DSpace_lifecycle_getNextRevision,
|
|
1915
|
+
De as _3DSpace_lifecycle_getNextStates,
|
|
1902
1916
|
We as _3DSwim_getAllCommunities,
|
|
1903
|
-
|
|
1917
|
+
Q as _3DSwim_getMembersCommunity,
|
|
1904
1918
|
Ve as _3DSwym_buildDirectMessage,
|
|
1905
1919
|
Ye as _3DSwym_deleteIdea,
|
|
1906
|
-
|
|
1920
|
+
Z as _3DSwym_findCommunityToInstantMSG,
|
|
1907
1921
|
Ge as _3DSwym_getAllNews,
|
|
1908
1922
|
Ke as _3DSwym_getFamiliarPeople,
|
|
1909
1923
|
Xe as _3DSwym_getIdeaStatusMaturity,
|
|
@@ -1914,40 +1928,40 @@ export {
|
|
|
1914
1928
|
w as _3DSwym_get_version,
|
|
1915
1929
|
Be as _3DSwym_postIdea,
|
|
1916
1930
|
j as _3DSwym_sendMessageData,
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1931
|
+
Se as _AppMngt_get_info_user,
|
|
1932
|
+
he as _AppMngt_get_users,
|
|
1933
|
+
me as _getPlateformInfos,
|
|
1934
|
+
fe as _getPlatformServices,
|
|
1921
1935
|
f as _httpCallAuthenticated,
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1936
|
+
le as _setDraggable,
|
|
1937
|
+
ue as _setDroppable,
|
|
1938
|
+
pe as _setupTagger,
|
|
1925
1939
|
Le as addTagToDoc,
|
|
1926
|
-
|
|
1940
|
+
ge as compass_getListAdditionalApps,
|
|
1927
1941
|
L as couleurs,
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1942
|
+
_e as createUserGroups,
|
|
1943
|
+
B as dataMixing,
|
|
1944
|
+
Te as deleteUserGroups,
|
|
1945
|
+
re as findAdresse,
|
|
1946
|
+
Re as getAllContextSecurity,
|
|
1947
|
+
J as getCSRFToken,
|
|
1948
|
+
ie as getCommunes,
|
|
1949
|
+
ye as getComplementUG,
|
|
1950
|
+
Ae as getDataFrom3DSpace,
|
|
1951
|
+
ce as getDataFromGouvFr,
|
|
1938
1952
|
Pe as getDatasByTenant,
|
|
1939
1953
|
Me as getDatasFrom3DSpace,
|
|
1940
1954
|
Ie as getDownloadDocument,
|
|
1941
1955
|
Je as getInfoDocTags,
|
|
1942
|
-
|
|
1956
|
+
we as getUserGroupsList,
|
|
1943
1957
|
E as getUsersGroupRules,
|
|
1944
1958
|
xe as get_3DSpace_csrf,
|
|
1945
|
-
|
|
1946
|
-
|
|
1959
|
+
Ce as patchUserGroups,
|
|
1960
|
+
Oe as patchUserGroupsControl,
|
|
1947
1961
|
ve as pushDataIn3DSpace,
|
|
1948
|
-
|
|
1962
|
+
be as readUserGroupControl,
|
|
1949
1963
|
Ee as removeTagToDoc,
|
|
1950
1964
|
Ze as sayHello,
|
|
1951
|
-
|
|
1965
|
+
de as updateEvent
|
|
1952
1966
|
};
|
|
1953
1967
|
//# sourceMappingURL=wb3Api.js.map
|