@beam3_dev/api_module 0.0.94 → 0.0.96
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 +310 -306
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +4 -4
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -34,7 +34,7 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
37
|
+
async function re(e, t = void 0, s = void 0) {
|
|
38
38
|
const n = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
40
|
"https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
|
|
@@ -44,13 +44,13 @@ async function oe(e, t = void 0, s = void 0) {
|
|
|
44
44
|
Accept: "application/json"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
).then((
|
|
48
|
-
t && t(
|
|
49
|
-
}).catch((
|
|
50
|
-
s && s(
|
|
47
|
+
).then((o) => o.json()).then((o) => {
|
|
48
|
+
t && t(o);
|
|
49
|
+
}).catch((o) => {
|
|
50
|
+
s && s(o), console.error("Erreur : " + o);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function ce(e, t = void 0, s = 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 re(e, t = void 0, s = void 0) {
|
|
|
65
65
|
s && s(n), console.error("Erreur : " + n);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function de(e, t = L) {
|
|
69
69
|
let s = b.now().year;
|
|
70
|
-
const n = e,
|
|
71
|
-
for (let
|
|
72
|
-
|
|
70
|
+
const n = e, o = [], r = (a) => {
|
|
71
|
+
for (let i in a)
|
|
72
|
+
o.push({ date: i, comment: a[i] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = s; a <= s + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -80,41 +80,41 @@ async function ce(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
r(
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((i) => i.json()).then((i) => {
|
|
84
|
+
r(i);
|
|
85
|
+
}).catch((i) => console.error("Erreur : " + i));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = n.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : n;
|
|
90
|
-
for (let
|
|
90
|
+
for (let i of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start === b.fromISO(
|
|
92
|
+
(l) => l.start === b.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: b.fromISO(
|
|
96
|
-
end: b.fromISO(
|
|
94
|
+
name: "Férié : " + i.comment,
|
|
95
|
+
start: b.fromISO(i.date).toISODate(),
|
|
96
|
+
end: b.fromISO(i.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
104
|
-
const n = e.events.findIndex((
|
|
105
|
-
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((
|
|
103
|
+
async function le(e, t, s = !0) {
|
|
104
|
+
const n = e.events.findIndex((o) => o.uuid === t.uuid);
|
|
105
|
+
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((o, r) => o.start - r.start), e;
|
|
106
106
|
}
|
|
107
107
|
function m(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (s) => {
|
|
109
109
|
s.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function pe(e, t, s) {
|
|
113
113
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
114
114
|
n.draggable(e, { data: t, start: s });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ue(e, t = void 0) {
|
|
118
118
|
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
|
|
119
119
|
let n;
|
|
120
120
|
n === void 0 && (n = s.createProxy({
|
|
@@ -123,12 +123,12 @@ function pe(e, t = void 0) {
|
|
|
123
123
|
}), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function fe(e, t) {
|
|
127
127
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
128
128
|
s.droppable(e, { drop: t });
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
async function
|
|
131
|
+
async function me(e, t = void 0, s = void 0) {
|
|
132
132
|
await O(
|
|
133
133
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
134
|
(n) => {
|
|
@@ -142,16 +142,16 @@ async function fe(e, t = void 0, s = void 0) {
|
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function J() {
|
|
146
146
|
let e = {};
|
|
147
147
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const s = t.getTenant(), n = t.getUser(),
|
|
148
|
+
const s = t.getTenant(), n = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
152
|
tenant: s,
|
|
153
153
|
user: n,
|
|
154
|
-
appsConfiguration:
|
|
154
|
+
appsConfiguration: o,
|
|
155
155
|
appConf: r
|
|
156
156
|
};
|
|
157
157
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
@@ -162,19 +162,19 @@ function ge(e, t, s) {
|
|
|
162
162
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
163
163
|
option: `?filter=${e.tenant}`
|
|
164
164
|
// facultatif
|
|
165
|
-
},
|
|
166
|
-
m(
|
|
165
|
+
}, o = `${n.base}${n.uri}${n.option}`;
|
|
166
|
+
m(o, {
|
|
167
167
|
method: "GET",
|
|
168
168
|
headers: {
|
|
169
169
|
"Content-Type": "application/json",
|
|
170
170
|
Accept: "application/json"
|
|
171
171
|
},
|
|
172
172
|
onComplete(r, c, a) {
|
|
173
|
-
const
|
|
173
|
+
const i = JSON.parse(r), d = i.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, i);
|
|
178
178
|
},
|
|
179
179
|
onFailure(r, c) {
|
|
180
180
|
const a = r;
|
|
@@ -185,22 +185,22 @@ function ge(e, t, s) {
|
|
|
185
185
|
function he(e, t = void 0, s = void 0) {
|
|
186
186
|
let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
187
|
m(n, {
|
|
188
|
-
onComplete(
|
|
189
|
-
const a = JSON.parse(
|
|
188
|
+
onComplete(o, r, c) {
|
|
189
|
+
const a = JSON.parse(o);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
|
-
onFailure(
|
|
193
|
-
const c =
|
|
192
|
+
onFailure(o, r) {
|
|
193
|
+
const c = o;
|
|
194
194
|
c.msg = r.errormsg, c.errCode = r.errorcode, s && s(c);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
function Se(e, t, s = void 0, n = void 0) {
|
|
199
|
-
let
|
|
200
|
-
m(
|
|
199
|
+
let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
|
+
m(o, {
|
|
201
201
|
onComplete(r, c, a) {
|
|
202
|
-
const
|
|
203
|
-
s && s(
|
|
202
|
+
const i = JSON.parse(r);
|
|
203
|
+
s && s(i);
|
|
204
204
|
},
|
|
205
205
|
onFailure(r, c) {
|
|
206
206
|
const a = r;
|
|
@@ -213,9 +213,9 @@ const D = {
|
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
215
|
function _e(e, t, s = void 0, n = void 0) {
|
|
216
|
-
const { space:
|
|
216
|
+
const { space: o, currentUser: r } = e, a = `${o}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, i = {
|
|
219
219
|
groups: [
|
|
220
220
|
{
|
|
221
221
|
title: t.title,
|
|
@@ -230,7 +230,7 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
230
230
|
m(a, {
|
|
231
231
|
method: "POST",
|
|
232
232
|
headers: D,
|
|
233
|
-
data: JSON.stringify(
|
|
233
|
+
data: JSON.stringify(i),
|
|
234
234
|
onComplete(d) {
|
|
235
235
|
s && s(JSON.parse(d));
|
|
236
236
|
},
|
|
@@ -242,7 +242,7 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
function ye(e, t, s = void 0, n = void 0) {
|
|
245
|
-
const { space:
|
|
245
|
+
const { space: o, tenant: r } = e, c = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${i}`;
|
|
246
246
|
m(d, {
|
|
247
247
|
opts: {
|
|
248
248
|
method: "GET",
|
|
@@ -260,13 +260,13 @@ function ye(e, t, s = void 0, n = void 0) {
|
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const { space: n, tenant:
|
|
263
|
+
function E(e, t = void 0, s = void 0) {
|
|
264
|
+
const { space: n, tenant: o } = e, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
267
|
}, d = `${r}${c}${a}`;
|
|
268
268
|
m(d, {
|
|
269
|
-
OPTsH:
|
|
269
|
+
OPTsH: i,
|
|
270
270
|
onComplete(l) {
|
|
271
271
|
t && t(JSON.parse(l));
|
|
272
272
|
},
|
|
@@ -277,7 +277,7 @@ function J(e, t = void 0, s = void 0) {
|
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
function we(e, t = void 0, s = void 0) {
|
|
280
|
-
const { space: n, currentUser:
|
|
280
|
+
const { space: n, currentUser: o } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
281
281
|
"Content-Type": "application/json",
|
|
282
282
|
Accept: "application/json,text/javascript,*/*"
|
|
283
283
|
} };
|
|
@@ -286,9 +286,9 @@ function we(e, t = void 0, s = void 0) {
|
|
|
286
286
|
opts: d,
|
|
287
287
|
onComplete(l) {
|
|
288
288
|
const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
289
|
-
if (
|
|
290
|
-
const g = f.filter((_) => _.owner ===
|
|
291
|
-
u.iam = S, u.UG = f, u.iamMember = h,
|
|
289
|
+
if (o && Object.keys(o).length > 0) {
|
|
290
|
+
const g = f.filter((_) => _.owner === o.email), h = f.filter((_) => _.members.includes(o.email)), S = g.concat(h);
|
|
291
|
+
u.iam = S, u.UG = f, u.iamMember = h, E(
|
|
292
292
|
e,
|
|
293
293
|
(_) => {
|
|
294
294
|
u.rules = _, t && t(u);
|
|
@@ -308,12 +308,12 @@ function we(e, t = void 0, s = void 0) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function Ce(e, t) {
|
|
311
|
-
const { space: s } = e,
|
|
312
|
-
m(
|
|
311
|
+
const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
|
+
m(o, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function Te(e, t, s, n = void 0,
|
|
316
|
+
function Te(e, t, s, n = void 0, o = void 0) {
|
|
317
317
|
const { space: r, tenant: c } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -322,7 +322,7 @@ function Te(e, t, s, n = void 0, i = void 0) {
|
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
324
|
OPTsTenant: `tenant=dstenant:${c}`
|
|
325
|
-
},
|
|
325
|
+
}, i = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(i);
|
|
326
326
|
m(d, {
|
|
327
327
|
headers: D,
|
|
328
328
|
method: "PATCH",
|
|
@@ -332,11 +332,11 @@ function Te(e, t, s, n = void 0, i = void 0) {
|
|
|
332
332
|
n && n(p);
|
|
333
333
|
},
|
|
334
334
|
onFailure(p) {
|
|
335
|
-
|
|
335
|
+
o && o(p);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function Oe(e, t, s, n = void 0,
|
|
339
|
+
function Oe(e, t, s, n = void 0, o = void 0) {
|
|
340
340
|
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
m(a, {
|
|
342
342
|
method: "PATCH",
|
|
@@ -347,12 +347,12 @@ function Oe(e, t, s, n = void 0, i = void 0) {
|
|
|
347
347
|
n && n(d);
|
|
348
348
|
},
|
|
349
349
|
onFailure(d) {
|
|
350
|
-
|
|
350
|
+
o && o(d);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
function Ne(e, t, s = void 0, n = void 0) {
|
|
355
|
-
const { space:
|
|
355
|
+
const { space: o } = e, c = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
356
|
m(c, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
@@ -369,28 +369,28 @@ function Ne(e, t, s = void 0, n = void 0) {
|
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
async function
|
|
372
|
+
async function G(e, t, s) {
|
|
373
373
|
if (e.space) {
|
|
374
374
|
const n = `${e.space}/resources/v1/application/CSRF`;
|
|
375
375
|
m(n, {
|
|
376
|
-
onComplete(
|
|
377
|
-
|
|
376
|
+
onComplete(o) {
|
|
377
|
+
o = JSON.parse(o), t && t(o.csrf);
|
|
378
378
|
},
|
|
379
|
-
onFailure(
|
|
380
|
-
s && s({ error:
|
|
379
|
+
onFailure(o, r, c) {
|
|
380
|
+
s && s({ error: o, headers: r, xhr: c });
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
async function
|
|
386
|
-
const
|
|
385
|
+
async function K(e, t = void 0, s = void 0, n = void 0) {
|
|
386
|
+
const o = e.space;
|
|
387
387
|
if (t === void 0) {
|
|
388
388
|
console.log("Le paramètre docid est obligatoire");
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
const r =
|
|
391
|
+
const r = o + `/resources/v1/modeler/documents/${t}`;
|
|
392
392
|
m(r, {
|
|
393
|
-
onComplete(c, a,
|
|
393
|
+
onComplete(c, a, i) {
|
|
394
394
|
const d = JSON.parse(c);
|
|
395
395
|
s && s(d);
|
|
396
396
|
},
|
|
@@ -403,12 +403,12 @@ function k(e, t = void 0, s = void 0) {
|
|
|
403
403
|
if (e.objID && e.objID !== "") {
|
|
404
404
|
let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
405
|
m(n, {
|
|
406
|
-
onComplete(
|
|
407
|
-
const a = JSON.parse(
|
|
406
|
+
onComplete(o, r, c) {
|
|
407
|
+
const a = JSON.parse(o);
|
|
408
408
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
409
|
},
|
|
410
|
-
onFailure(
|
|
411
|
-
s && s(
|
|
410
|
+
onFailure(o) {
|
|
411
|
+
s && s(o);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
} else
|
|
@@ -426,13 +426,13 @@ function T(e, t = void 0, s = void 0) {
|
|
|
426
426
|
if (e.space) {
|
|
427
427
|
const n = e.space + "/resources/v1/application/CSRF";
|
|
428
428
|
m(n, {
|
|
429
|
-
onComplete(
|
|
430
|
-
const a = JSON.parse(
|
|
429
|
+
onComplete(o, r, c) {
|
|
430
|
+
const a = JSON.parse(o);
|
|
431
431
|
t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(
|
|
433
|
+
onFailure(o, r, c) {
|
|
434
434
|
s && s({
|
|
435
|
-
response:
|
|
435
|
+
response: o,
|
|
436
436
|
headers: r,
|
|
437
437
|
xhr: c
|
|
438
438
|
});
|
|
@@ -445,7 +445,7 @@ function A(e, t = void 0, s = void 0) {
|
|
|
445
445
|
let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
446
446
|
k(
|
|
447
447
|
e,
|
|
448
|
-
(
|
|
448
|
+
(o) => {
|
|
449
449
|
m(n, {
|
|
450
450
|
method: "PUT",
|
|
451
451
|
headers: {
|
|
@@ -460,12 +460,12 @@ function A(e, t = void 0, s = void 0) {
|
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
},
|
|
463
|
-
(
|
|
464
|
-
console.warn("_3DSpace_get_ticket / error => ",
|
|
463
|
+
(o) => {
|
|
464
|
+
console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
function be(e, t, s, n = void 0,
|
|
468
|
+
function be(e, t, s, n = void 0, o = void 0) {
|
|
469
469
|
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
470
|
s || (s = e.token), m(r, {
|
|
471
471
|
method: "PUT",
|
|
@@ -476,28 +476,28 @@ function be(e, t, s, n = void 0, i = void 0) {
|
|
|
476
476
|
let a = JSON.parse(c);
|
|
477
477
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
478
478
|
try {
|
|
479
|
-
const
|
|
480
|
-
n && n(
|
|
481
|
-
} catch (
|
|
482
|
-
|
|
479
|
+
const i = a.data[0].dataelements.ticketURL;
|
|
480
|
+
n && n(i);
|
|
481
|
+
} catch (i) {
|
|
482
|
+
o && o(i);
|
|
483
483
|
}
|
|
484
484
|
},
|
|
485
485
|
onFailure(c) {
|
|
486
|
-
|
|
486
|
+
o && o(c);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function X(e, t, s, n, o, r = void 0, c = void 0) {
|
|
491
491
|
k(
|
|
492
492
|
e,
|
|
493
493
|
t,
|
|
494
494
|
(a) => {
|
|
495
|
-
|
|
495
|
+
V(
|
|
496
496
|
e,
|
|
497
497
|
t,
|
|
498
498
|
s,
|
|
499
499
|
n,
|
|
500
|
-
|
|
500
|
+
o,
|
|
501
501
|
a.csrf.value,
|
|
502
502
|
r,
|
|
503
503
|
c
|
|
@@ -505,16 +505,16 @@ function K(e, t, s, n, i, r = void 0, c = void 0) {
|
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
const
|
|
510
|
-
m(
|
|
508
|
+
function V(e, t, s, n, o, r, c = void 0, a = void 0) {
|
|
509
|
+
const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
|
+
m(i, {
|
|
511
511
|
method: "PUT",
|
|
512
512
|
headers: {
|
|
513
513
|
ENO_CSRF_TOKEN: r
|
|
514
514
|
},
|
|
515
515
|
onComplete(d, l, p) {
|
|
516
516
|
const u = JSON.parse(d).data[0].dataelements, f = new FormData();
|
|
517
|
-
f.append("__fcs__jobTicket", u.ticket), f.append("file_0", n,
|
|
517
|
+
f.append("__fcs__jobTicket", u.ticket), f.append("file_0", n, o);
|
|
518
518
|
const g = {};
|
|
519
519
|
g.method = "POST", g.data = f, g.onComplete = function(h) {
|
|
520
520
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -529,7 +529,7 @@ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
|
|
|
529
529
|
files: [{
|
|
530
530
|
id: s,
|
|
531
531
|
dataelements: {
|
|
532
|
-
title:
|
|
532
|
+
title: o,
|
|
533
533
|
receipt: h
|
|
534
534
|
},
|
|
535
535
|
updateAction: "REVISE"
|
|
@@ -556,12 +556,12 @@ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
async function ke(e, t, s, n,
|
|
560
|
-
const c = e.space, a = e.token,
|
|
559
|
+
async function ke(e, t, s, n, o = void 0, r = void 0) {
|
|
560
|
+
const c = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
561
561
|
type: "text/plain"
|
|
562
562
|
}), p = {
|
|
563
563
|
url_Ticket: `${c}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
564
|
-
url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${
|
|
564
|
+
url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
|
|
565
565
|
};
|
|
566
566
|
if (!c && c !== "") {
|
|
567
567
|
console.log("le store._3DSpace est vide");
|
|
@@ -579,7 +579,7 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
|
|
|
579
579
|
method: "POST",
|
|
580
580
|
data: d,
|
|
581
581
|
onComplete(C) {
|
|
582
|
-
if (
|
|
582
|
+
if (i !== "" && a !== "") {
|
|
583
583
|
const F = {
|
|
584
584
|
method: "POST",
|
|
585
585
|
headers: {
|
|
@@ -611,14 +611,14 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
|
|
|
611
611
|
onComplete: _,
|
|
612
612
|
onFailure: y
|
|
613
613
|
};
|
|
614
|
-
|
|
614
|
+
i !== "" && m(p.url_Post, F);
|
|
615
615
|
} else
|
|
616
616
|
console.warn("le store est vide");
|
|
617
617
|
},
|
|
618
618
|
onFailure: y
|
|
619
619
|
};
|
|
620
620
|
function _(C) {
|
|
621
|
-
console.log("Success -- response ", C.data[0]),
|
|
621
|
+
console.log("Success -- response ", C.data[0]), o && o(C);
|
|
622
622
|
}
|
|
623
623
|
function y(C, F) {
|
|
624
624
|
console.log("Erreur -- response ", C, `
|
|
@@ -628,12 +628,12 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
|
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function N(e, t = void 0, s = void 0, n = void 0,
|
|
631
|
+
function N(e, t = void 0, s = void 0, n = void 0, o = void 0, r = void 0, c = !1) {
|
|
632
632
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
633
633
|
m(a, {
|
|
634
634
|
method: "GET",
|
|
635
|
-
onComplete(
|
|
636
|
-
const d = JSON.parse(
|
|
635
|
+
onComplete(i) {
|
|
636
|
+
const d = JSON.parse(i);
|
|
637
637
|
let l = "", p, u, f;
|
|
638
638
|
if (t) {
|
|
639
639
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -667,11 +667,11 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1
|
|
|
667
667
|
}));
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
p && u && f ? (l = f + "." + u + "." + p,
|
|
670
|
+
p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = f + "." + u + "." + p, r(l));
|
|
671
671
|
},
|
|
672
|
-
onFailure(
|
|
672
|
+
onFailure(i, d) {
|
|
673
673
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
674
|
-
err:
|
|
674
|
+
err: i,
|
|
675
675
|
headers: d
|
|
676
676
|
});
|
|
677
677
|
}
|
|
@@ -682,7 +682,7 @@ async function v(e, t = void 0, s = void 0) {
|
|
|
682
682
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
683
683
|
), (e.space === "" || !e.space) && console.warn(
|
|
684
684
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
685
|
-
), (e.token === "" || !e.token) && (
|
|
685
|
+
), (e.token === "" || !e.token) && (G(
|
|
686
686
|
e,
|
|
687
687
|
(n) => {
|
|
688
688
|
e.token = n;
|
|
@@ -692,7 +692,7 @@ async function v(e, t = void 0, s = void 0) {
|
|
|
692
692
|
}
|
|
693
693
|
), console.warn(
|
|
694
694
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
695
|
-
)), new Promise((n,
|
|
695
|
+
)), new Promise((n, o) => {
|
|
696
696
|
A(
|
|
697
697
|
e,
|
|
698
698
|
(r) => {
|
|
@@ -702,49 +702,49 @@ async function v(e, t = void 0, s = void 0) {
|
|
|
702
702
|
Accept: "application/json"
|
|
703
703
|
},
|
|
704
704
|
onComplete(a) {
|
|
705
|
-
let
|
|
705
|
+
let i;
|
|
706
706
|
try {
|
|
707
|
-
|
|
707
|
+
i = JSON.parse(a);
|
|
708
708
|
} catch {
|
|
709
|
-
|
|
709
|
+
i = a;
|
|
710
710
|
}
|
|
711
|
-
t && t(
|
|
711
|
+
t && t(i), n(i);
|
|
712
712
|
},
|
|
713
|
-
onFailure(a,
|
|
713
|
+
onFailure(a, i, d) {
|
|
714
714
|
s && (console.log("error http", a), s({
|
|
715
715
|
msg: JSON.parse(a),
|
|
716
|
-
headers:
|
|
716
|
+
headers: i,
|
|
717
717
|
xhr: d
|
|
718
|
-
}),
|
|
718
|
+
}), o({
|
|
719
719
|
msg: JSON.parse(a),
|
|
720
|
-
headers:
|
|
720
|
+
headers: i,
|
|
721
721
|
xhr: d
|
|
722
722
|
}));
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
725
|
},
|
|
726
726
|
(r) => {
|
|
727
|
-
s && s(r), console.log("*_3dspace_download_doc / error file URL *", r),
|
|
727
|
+
s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
|
-
async function
|
|
733
|
-
let
|
|
732
|
+
async function W(e, t, s = void 0, n = void 0) {
|
|
733
|
+
let o = [];
|
|
734
734
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
735
735
|
for (let a = 0; a < t.length; a += 80) {
|
|
736
|
-
const
|
|
737
|
-
|
|
736
|
+
const i = t.slice(a, a + 80);
|
|
737
|
+
o.push(i);
|
|
738
738
|
}
|
|
739
739
|
const c = (a) => {
|
|
740
|
-
|
|
740
|
+
B(
|
|
741
741
|
e,
|
|
742
|
-
|
|
742
|
+
o[a],
|
|
743
743
|
() => {
|
|
744
|
-
a++, a <
|
|
744
|
+
a++, a < o.length && c(a);
|
|
745
745
|
},
|
|
746
|
-
(
|
|
747
|
-
s && s(
|
|
746
|
+
(i) => {
|
|
747
|
+
s && s(i);
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
};
|
|
@@ -752,11 +752,11 @@ async function V(e, t, s = void 0, n = void 0) {
|
|
|
752
752
|
} else
|
|
753
753
|
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function B(e, t, s = void 0, n = void 0, o = void 0) {
|
|
756
756
|
const r = [];
|
|
757
|
-
t.forEach((
|
|
757
|
+
t.forEach((i) => {
|
|
758
758
|
r.push({
|
|
759
|
-
id:
|
|
759
|
+
id: i
|
|
760
760
|
});
|
|
761
761
|
});
|
|
762
762
|
let c = JSON.stringify({
|
|
@@ -771,9 +771,9 @@ function W(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
771
771
|
method: "PUT",
|
|
772
772
|
data: c,
|
|
773
773
|
type: "json",
|
|
774
|
-
onComplete(
|
|
775
|
-
const d =
|
|
776
|
-
|
|
774
|
+
onComplete(i) {
|
|
775
|
+
const d = i.data;
|
|
776
|
+
i.success === !0 && (s && s(), d.forEach((l) => {
|
|
777
777
|
try {
|
|
778
778
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
779
779
|
m(u, {
|
|
@@ -789,17 +789,17 @@ function W(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
789
789
|
}
|
|
790
790
|
});
|
|
791
791
|
} catch (p) {
|
|
792
|
-
console.log(p),
|
|
792
|
+
console.log(p), o && o(p);
|
|
793
793
|
}
|
|
794
794
|
}));
|
|
795
795
|
},
|
|
796
|
-
onFailure(
|
|
797
|
-
console.log(
|
|
796
|
+
onFailure(i) {
|
|
797
|
+
console.log(i), o && o(i);
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
801
|
function Fe(e, t, s = void 0, n = void 0) {
|
|
802
|
-
return new Promise((
|
|
802
|
+
return new Promise((o) => {
|
|
803
803
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
804
804
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
805
805
|
N(
|
|
@@ -837,7 +837,7 @@ function Fe(e, t, s = void 0, n = void 0) {
|
|
|
837
837
|
}
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
|
-
function De(e, t, s, n = void 0,
|
|
840
|
+
function De(e, t, s, n = void 0, o = void 0) {
|
|
841
841
|
return new Promise((r) => {
|
|
842
842
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
843
843
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -846,9 +846,9 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
846
846
|
"ESPACE COMMUN",
|
|
847
847
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
848
848
|
void 0,
|
|
849
|
-
(
|
|
850
|
-
(
|
|
851
|
-
console.log("onError =>",
|
|
849
|
+
(i) => e.ctx = i,
|
|
850
|
+
(i) => {
|
|
851
|
+
console.log("onError =>", i);
|
|
852
852
|
}
|
|
853
853
|
);
|
|
854
854
|
let a = {
|
|
@@ -866,11 +866,11 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
866
866
|
}]
|
|
867
867
|
}),
|
|
868
868
|
type: "json",
|
|
869
|
-
onComplete(
|
|
870
|
-
n && n(
|
|
869
|
+
onComplete(i) {
|
|
870
|
+
n && n(i);
|
|
871
871
|
},
|
|
872
|
-
onFailure(
|
|
873
|
-
|
|
872
|
+
onFailure(i) {
|
|
873
|
+
o && o(i);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
876
|
m(c, a);
|
|
@@ -878,7 +878,7 @@ function De(e, t, s, n = void 0, i = void 0) {
|
|
|
878
878
|
});
|
|
879
879
|
}
|
|
880
880
|
function Ae(e, t, s = void 0, n = void 0) {
|
|
881
|
-
return new Promise((
|
|
881
|
+
return new Promise((o) => {
|
|
882
882
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
883
883
|
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
884
884
|
N(
|
|
@@ -917,7 +917,7 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
function $e(e, t, s = void 0, n = void 0) {
|
|
920
|
-
return new Promise((
|
|
920
|
+
return new Promise((o) => {
|
|
921
921
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
922
922
|
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
923
923
|
N(
|
|
@@ -961,7 +961,7 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
961
961
|
}
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
|
-
function Ue(e, t, s, n = void 0,
|
|
964
|
+
function Ue(e, t, s, n = void 0, o = void 0) {
|
|
965
965
|
return new Promise((r) => {
|
|
966
966
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
967
967
|
const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -970,9 +970,9 @@ function Ue(e, t, s, n = void 0, i = void 0) {
|
|
|
970
970
|
"ESPACE COMMUN",
|
|
971
971
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
972
972
|
void 0,
|
|
973
|
-
(
|
|
974
|
-
(
|
|
975
|
-
console.log("onError =>",
|
|
973
|
+
(i) => e.ctx = i,
|
|
974
|
+
(i) => {
|
|
975
|
+
console.log("onError =>", i);
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
978
|
let a = {
|
|
@@ -995,11 +995,11 @@ function Ue(e, t, s, n = void 0, i = void 0) {
|
|
|
995
995
|
notificationTimeout: 600
|
|
996
996
|
}),
|
|
997
997
|
type: "json",
|
|
998
|
-
onComplete(
|
|
999
|
-
n && n(
|
|
998
|
+
onComplete(i) {
|
|
999
|
+
n && n(i);
|
|
1000
1000
|
},
|
|
1001
|
-
onFailure(
|
|
1002
|
-
|
|
1001
|
+
onFailure(i) {
|
|
1002
|
+
o && o(i);
|
|
1003
1003
|
}
|
|
1004
1004
|
};
|
|
1005
1005
|
m(c, a);
|
|
@@ -1007,8 +1007,12 @@ function Ue(e, t, s, n = void 0, i = void 0) {
|
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
1009
|
function je(e, t, s = void 0, n = void 0) {
|
|
1010
|
-
return new Promise((
|
|
1011
|
-
if (e.token === "" && T(e),
|
|
1010
|
+
return console.log("credentials", e), new Promise((o) => {
|
|
1011
|
+
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
1012
|
+
const r = J();
|
|
1013
|
+
console.log("platformeInfo", r);
|
|
1014
|
+
}
|
|
1015
|
+
if (N(
|
|
1012
1016
|
e.space,
|
|
1013
1017
|
"ESPACE COMMUN",
|
|
1014
1018
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -1024,9 +1028,9 @@ function je(e, t, s = void 0, n = void 0) {
|
|
|
1024
1028
|
m(c, {
|
|
1025
1029
|
onComplete(a) {
|
|
1026
1030
|
if (Array.isArray(JSON.parse(a))) {
|
|
1027
|
-
const
|
|
1028
|
-
console.log("serviceId=3dsearch",
|
|
1029
|
-
const d = `${
|
|
1031
|
+
const i = JSON.parse(a);
|
|
1032
|
+
console.log("serviceId=3dsearch", i);
|
|
1033
|
+
const d = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e.tenant}×tamp=${r}`;
|
|
1030
1034
|
m(d, {
|
|
1031
1035
|
method: "POST",
|
|
1032
1036
|
headers: {
|
|
@@ -1107,8 +1111,8 @@ function Re(e, t = void 0, s = void 0) {
|
|
|
1107
1111
|
base: `${e.space}`,
|
|
1108
1112
|
uri: "/resources/bps/cspaces",
|
|
1109
1113
|
optTenant: `tenant=${e.tenant}`
|
|
1110
|
-
},
|
|
1111
|
-
m(
|
|
1114
|
+
}, o = `${n.base}${n.uri}?${n.optTenant}`;
|
|
1115
|
+
m(o, {
|
|
1112
1116
|
method: "GET",
|
|
1113
1117
|
headers: {
|
|
1114
1118
|
Accept: "application/json,text/javascript,*/*",
|
|
@@ -1127,8 +1131,8 @@ function ve(e, t, s, n) {
|
|
|
1127
1131
|
A(
|
|
1128
1132
|
e.space,
|
|
1129
1133
|
t,
|
|
1130
|
-
(
|
|
1131
|
-
m(
|
|
1134
|
+
(o) => {
|
|
1135
|
+
m(o, {
|
|
1132
1136
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1133
1137
|
onComplete: (r) => {
|
|
1134
1138
|
s && s(r);
|
|
@@ -1141,35 +1145,35 @@ function ve(e, t, s, n) {
|
|
|
1141
1145
|
);
|
|
1142
1146
|
}
|
|
1143
1147
|
async function Ie(e, t, s = void 0, n = void 0) {
|
|
1144
|
-
return new Promise((
|
|
1148
|
+
return new Promise((o) => {
|
|
1145
1149
|
A(e, t, (r) => {
|
|
1146
1150
|
m(r, {
|
|
1147
|
-
onComplete: (c, a,
|
|
1148
|
-
onFailure: (c, a,
|
|
1149
|
-
n && n(c, a,
|
|
1151
|
+
onComplete: (c, a, i) => (o(JSON.parse(c)), s && s(JSON.parse(c), a, i), o),
|
|
1152
|
+
onFailure: (c, a, i) => {
|
|
1153
|
+
n && n(c, a, i), console.log(c, a?.errormsg);
|
|
1150
1154
|
}
|
|
1151
1155
|
});
|
|
1152
1156
|
});
|
|
1153
1157
|
});
|
|
1154
1158
|
}
|
|
1155
|
-
function xe(e, t, s, n = void 0,
|
|
1159
|
+
function xe(e, t, s, n = void 0, o = void 0) {
|
|
1156
1160
|
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1157
1161
|
k(
|
|
1158
1162
|
e,
|
|
1159
1163
|
s,
|
|
1160
1164
|
(c) => {
|
|
1161
|
-
const a = c.data[0].relateddata.files[0].id,
|
|
1162
|
-
|
|
1165
|
+
const a = c.data[0].relateddata.files[0].id, i = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
|
|
1166
|
+
X(
|
|
1163
1167
|
e,
|
|
1164
1168
|
s,
|
|
1165
1169
|
a,
|
|
1166
1170
|
r,
|
|
1167
|
-
|
|
1171
|
+
i,
|
|
1168
1172
|
(d) => {
|
|
1169
1173
|
n && n(d);
|
|
1170
1174
|
},
|
|
1171
1175
|
(d) => {
|
|
1172
|
-
|
|
1176
|
+
o && o(d);
|
|
1173
1177
|
}
|
|
1174
1178
|
);
|
|
1175
1179
|
}
|
|
@@ -1200,8 +1204,8 @@ async function Me(e, t = void 0, s = void 0) {
|
|
|
1200
1204
|
console.log("getDatasByTenant (getDocuments)", e), await v(
|
|
1201
1205
|
e,
|
|
1202
1206
|
(n) => {
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1207
|
+
const o = {};
|
|
1208
|
+
o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1205
1209
|
},
|
|
1206
1210
|
(n) => {
|
|
1207
1211
|
s && s?.(n);
|
|
@@ -1214,30 +1218,30 @@ function Le(e, t = void 0, s = void 0) {
|
|
|
1214
1218
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1215
1219
|
return;
|
|
1216
1220
|
}
|
|
1217
|
-
e.objIds.forEach((
|
|
1221
|
+
e.objIds.forEach((o, r) => {
|
|
1218
1222
|
v(
|
|
1219
1223
|
e,
|
|
1220
|
-
|
|
1224
|
+
o.objID,
|
|
1221
1225
|
(c) => {
|
|
1222
|
-
n.push({ [
|
|
1226
|
+
n.push({ [o.name]: c }), o.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), Y(e, x)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
|
|
1223
1227
|
}
|
|
1224
1228
|
);
|
|
1225
1229
|
});
|
|
1226
1230
|
}
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1231
|
+
function Y(e, t, s = void 0, n = void 0) {
|
|
1232
|
+
W(
|
|
1229
1233
|
e,
|
|
1230
1234
|
I,
|
|
1231
|
-
(
|
|
1235
|
+
(o) => {
|
|
1232
1236
|
const r = [...t];
|
|
1233
|
-
r.find((c) => c.objectID ===
|
|
1237
|
+
r.find((c) => c.objectID === o.objectId).data = o.data, x = r, $.push(o.data), s && s($);
|
|
1234
1238
|
},
|
|
1235
|
-
(
|
|
1236
|
-
n && (n(
|
|
1239
|
+
(o) => {
|
|
1240
|
+
n && (n(o), console.log(o));
|
|
1237
1241
|
}
|
|
1238
1242
|
);
|
|
1239
1243
|
}
|
|
1240
|
-
const
|
|
1244
|
+
const q = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
1241
1245
|
"swym",
|
|
1242
1246
|
"3dspace",
|
|
1243
1247
|
"drive",
|
|
@@ -1251,18 +1255,18 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
|
|
|
1251
1255
|
where: "ds6w:where",
|
|
1252
1256
|
who: "ds6w:who",
|
|
1253
1257
|
why: "ds6w:why"
|
|
1254
|
-
},
|
|
1255
|
-
objId:
|
|
1258
|
+
}, z = {
|
|
1259
|
+
objId: q,
|
|
1256
1260
|
pred: "who",
|
|
1257
1261
|
order_by: "desc",
|
|
1258
1262
|
tag: "testTag"
|
|
1259
1263
|
};
|
|
1260
1264
|
function Je(e, t, s = void 0, n = void 0) {
|
|
1261
|
-
const { space:
|
|
1265
|
+
const { space: o, tenant: r } = e, { objId: c, pred: a, tag: i } = t, d = {
|
|
1262
1266
|
uri: "/resources/6w/tags",
|
|
1263
1267
|
otpCTX: "SecurityContext=preferred",
|
|
1264
1268
|
optTenant: `tenant=${r}`
|
|
1265
|
-
}, l = `${
|
|
1269
|
+
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1266
1270
|
tag: [
|
|
1267
1271
|
{
|
|
1268
1272
|
subject: [
|
|
@@ -1272,7 +1276,7 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1272
1276
|
],
|
|
1273
1277
|
predicate: P[a],
|
|
1274
1278
|
object: {
|
|
1275
|
-
literal:
|
|
1279
|
+
literal: i
|
|
1276
1280
|
}
|
|
1277
1281
|
}
|
|
1278
1282
|
]
|
|
@@ -1288,12 +1292,12 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1288
1292
|
JSON.parse(u);
|
|
1289
1293
|
const f = {};
|
|
1290
1294
|
setTimeout(() => {
|
|
1291
|
-
|
|
1295
|
+
K(
|
|
1292
1296
|
e,
|
|
1293
1297
|
c,
|
|
1294
1298
|
(g) => {
|
|
1295
1299
|
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;
|
|
1296
|
-
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f },
|
|
1300
|
+
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, Q(
|
|
1297
1301
|
e,
|
|
1298
1302
|
t,
|
|
1299
1303
|
(y) => {
|
|
@@ -1317,19 +1321,19 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1317
1321
|
}
|
|
1318
1322
|
});
|
|
1319
1323
|
}
|
|
1320
|
-
function
|
|
1324
|
+
function Q(e, t, s = void 0, n = void 0) {
|
|
1321
1325
|
console.log("obj ", t);
|
|
1322
|
-
const
|
|
1326
|
+
const o = t.info.name, r = {
|
|
1323
1327
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1324
1328
|
uri: "/federated/search"
|
|
1325
1329
|
}, c = `${r.baseUrl}${r.uri}`, a = {
|
|
1326
1330
|
"Content-Type": "application/json",
|
|
1327
1331
|
Accept: "application/json,text/javascript,*/*"
|
|
1328
|
-
},
|
|
1332
|
+
}, i = R(), d = {
|
|
1329
1333
|
with_indexing_date: !0,
|
|
1330
1334
|
with_synthesis: !0,
|
|
1331
1335
|
with_nls: !1,
|
|
1332
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1336
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
|
|
1333
1337
|
locale: "fr",
|
|
1334
1338
|
select_predicate: [
|
|
1335
1339
|
"ds6w:label",
|
|
@@ -1357,7 +1361,7 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1357
1361
|
],
|
|
1358
1362
|
with_synthesis_hierarchical: !0,
|
|
1359
1363
|
select_file: ["icon", "thumbnail_2d"],
|
|
1360
|
-
query:
|
|
1364
|
+
query: o,
|
|
1361
1365
|
specific_source_parameter: {
|
|
1362
1366
|
"3dspace": {
|
|
1363
1367
|
additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
|
|
@@ -1367,7 +1371,7 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1367
1371
|
}
|
|
1368
1372
|
},
|
|
1369
1373
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1370
|
-
order_by:
|
|
1374
|
+
order_by: z.order_by,
|
|
1371
1375
|
order_field: "relevance",
|
|
1372
1376
|
select_snippets: [
|
|
1373
1377
|
"ds6w:snippet",
|
|
@@ -1378,7 +1382,7 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1378
1382
|
],
|
|
1379
1383
|
nresults: 40,
|
|
1380
1384
|
start: "0",
|
|
1381
|
-
source:
|
|
1385
|
+
source: H,
|
|
1382
1386
|
tenant: e.tenant,
|
|
1383
1387
|
login: {
|
|
1384
1388
|
"3dspace": {
|
|
@@ -1401,16 +1405,16 @@ function z(e, t, s = void 0, n = void 0) {
|
|
|
1401
1405
|
});
|
|
1402
1406
|
}
|
|
1403
1407
|
function Ee(e, t, s = void 0, n = void 0) {
|
|
1404
|
-
const { objId:
|
|
1408
|
+
const { objId: o, pred: r, tag: c } = t, a = {
|
|
1405
1409
|
uri: "/resources/6w/tags",
|
|
1406
1410
|
otpCTX: "SecurityContext=preferred",
|
|
1407
1411
|
optTenant: `tenant=${e.tenant}`
|
|
1408
|
-
},
|
|
1412
|
+
}, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1409
1413
|
tag: [
|
|
1410
1414
|
{
|
|
1411
1415
|
subject: [
|
|
1412
1416
|
{
|
|
1413
|
-
uri: `pid://${
|
|
1417
|
+
uri: `pid://${o}`
|
|
1414
1418
|
}
|
|
1415
1419
|
],
|
|
1416
1420
|
predicate: P[r],
|
|
@@ -1420,7 +1424,7 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1420
1424
|
}
|
|
1421
1425
|
]
|
|
1422
1426
|
};
|
|
1423
|
-
m(
|
|
1427
|
+
m(i, {
|
|
1424
1428
|
method: "DELETE",
|
|
1425
1429
|
data: JSON.stringify(d),
|
|
1426
1430
|
headers: {
|
|
@@ -1437,7 +1441,7 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1437
1441
|
});
|
|
1438
1442
|
}
|
|
1439
1443
|
function Ge(e, t = "", s = void 0, n = void 0) {
|
|
1440
|
-
const { space:
|
|
1444
|
+
const { space: o } = e;
|
|
1441
1445
|
if (t === "")
|
|
1442
1446
|
return;
|
|
1443
1447
|
const r = {
|
|
@@ -1445,11 +1449,11 @@ function Ge(e, t = "", s = void 0, n = void 0) {
|
|
|
1445
1449
|
}, c = {
|
|
1446
1450
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1447
1451
|
Accept: "application/json,text/javascript,*/*"
|
|
1448
|
-
}, a = `${
|
|
1452
|
+
}, a = `${o}${r.uri}`, i = `$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}`;
|
|
1449
1453
|
m(a, {
|
|
1450
1454
|
method: "POST",
|
|
1451
1455
|
headers: c,
|
|
1452
|
-
data:
|
|
1456
|
+
data: i,
|
|
1453
1457
|
onComplete(d) {
|
|
1454
1458
|
s && s(JSON.parse(d));
|
|
1455
1459
|
},
|
|
@@ -1462,18 +1466,18 @@ function Ge(e, t = "", s = void 0, n = void 0) {
|
|
|
1462
1466
|
async function w(e, t = void 0, s = void 0) {
|
|
1463
1467
|
const n = e.space + "/api/index/tk";
|
|
1464
1468
|
return m(n, {
|
|
1465
|
-
onComplete(
|
|
1466
|
-
const a = JSON.parse(
|
|
1469
|
+
onComplete(o, r, c) {
|
|
1470
|
+
const a = JSON.parse(o);
|
|
1467
1471
|
if (t)
|
|
1468
1472
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1469
1473
|
},
|
|
1470
|
-
onFailure(
|
|
1471
|
-
s && s(
|
|
1474
|
+
onFailure(o) {
|
|
1475
|
+
s && s(o);
|
|
1472
1476
|
}
|
|
1473
1477
|
});
|
|
1474
1478
|
}
|
|
1475
1479
|
function Ke(e, t = void 0, s = void 0) {
|
|
1476
|
-
const n = `${e.space}/api/exalead/whatsnew`,
|
|
1480
|
+
const n = `${e.space}/api/exalead/whatsnew`, o = {
|
|
1477
1481
|
params: {
|
|
1478
1482
|
community_id: null,
|
|
1479
1483
|
hash_key: null,
|
|
@@ -1491,7 +1495,7 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1491
1495
|
"Content-type": "application/json;charset=UTF-8",
|
|
1492
1496
|
Accept: "application/json"
|
|
1493
1497
|
},
|
|
1494
|
-
data: JSON.stringify(
|
|
1498
|
+
data: JSON.stringify(o),
|
|
1495
1499
|
type: "json",
|
|
1496
1500
|
onComplete(c, a) {
|
|
1497
1501
|
t && t(c, a);
|
|
@@ -1503,7 +1507,7 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1503
1507
|
});
|
|
1504
1508
|
}
|
|
1505
1509
|
function Xe(e, t = void 0, s = void 0) {
|
|
1506
|
-
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`,
|
|
1510
|
+
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
|
|
1507
1511
|
params: {
|
|
1508
1512
|
idsToFilterArr: [],
|
|
1509
1513
|
mode: "offline",
|
|
@@ -1520,11 +1524,11 @@ function Xe(e, t = void 0, s = void 0) {
|
|
|
1520
1524
|
"Content-type": "application/json;charset=UTF-8",
|
|
1521
1525
|
Accept: "application/json"
|
|
1522
1526
|
},
|
|
1523
|
-
data: JSON.stringify(
|
|
1527
|
+
data: JSON.stringify(o),
|
|
1524
1528
|
type: "json",
|
|
1525
1529
|
onComplete(c, a) {
|
|
1526
|
-
const
|
|
1527
|
-
t && t(
|
|
1530
|
+
const i = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1531
|
+
t && t(i, c);
|
|
1528
1532
|
},
|
|
1529
1533
|
onFailure(c, a) {
|
|
1530
1534
|
s && s(c, a);
|
|
@@ -1538,14 +1542,14 @@ function Ve(e, t = void 0, s = void 0) {
|
|
|
1538
1542
|
uri: "/api/community/listmycommunities",
|
|
1539
1543
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1540
1544
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1541
|
-
},
|
|
1545
|
+
}, o = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
|
|
1542
1546
|
w(e, (c) => {
|
|
1543
|
-
m(
|
|
1547
|
+
m(o, {
|
|
1544
1548
|
method: "GET",
|
|
1545
1549
|
headers: {
|
|
1546
1550
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1547
1551
|
},
|
|
1548
|
-
onComplete(a,
|
|
1552
|
+
onComplete(a, i, d) {
|
|
1549
1553
|
const p = JSON.parse(a).result;
|
|
1550
1554
|
let u = 0;
|
|
1551
1555
|
p.forEach((f) => {
|
|
@@ -1557,7 +1561,7 @@ function Ve(e, t = void 0, s = void 0) {
|
|
|
1557
1561
|
role: f.role,
|
|
1558
1562
|
access: f.access
|
|
1559
1563
|
};
|
|
1560
|
-
|
|
1564
|
+
Z(
|
|
1561
1565
|
e,
|
|
1562
1566
|
f.id,
|
|
1563
1567
|
(h) => {
|
|
@@ -1567,15 +1571,15 @@ function Ve(e, t = void 0, s = void 0) {
|
|
|
1567
1571
|
);
|
|
1568
1572
|
});
|
|
1569
1573
|
},
|
|
1570
|
-
onFailure(a,
|
|
1574
|
+
onFailure(a, i) {
|
|
1571
1575
|
const d = a;
|
|
1572
|
-
d.status =
|
|
1576
|
+
d.status = i.status, d.response = i.errormsg, s && s(d);
|
|
1573
1577
|
}
|
|
1574
1578
|
});
|
|
1575
1579
|
});
|
|
1576
1580
|
}
|
|
1577
|
-
function
|
|
1578
|
-
const
|
|
1581
|
+
function Z(e, t, s, n) {
|
|
1582
|
+
const o = `${e.space}/api/community/listmembers`, r = {
|
|
1579
1583
|
params: {
|
|
1580
1584
|
page: e.page ? e.page : 1,
|
|
1581
1585
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1583,7 +1587,7 @@ function Q(e, t, s, n) {
|
|
|
1583
1587
|
}
|
|
1584
1588
|
};
|
|
1585
1589
|
w(e, (c) => {
|
|
1586
|
-
m(
|
|
1590
|
+
m(o, {
|
|
1587
1591
|
method: "POST",
|
|
1588
1592
|
headers: {
|
|
1589
1593
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1592,12 +1596,12 @@ function Q(e, t, s, n) {
|
|
|
1592
1596
|
},
|
|
1593
1597
|
data: JSON.stringify(r),
|
|
1594
1598
|
type: "json",
|
|
1595
|
-
onComplete(a,
|
|
1599
|
+
onComplete(a, i, d) {
|
|
1596
1600
|
s && s(a);
|
|
1597
1601
|
},
|
|
1598
|
-
onFailure(a,
|
|
1602
|
+
onFailure(a, i) {
|
|
1599
1603
|
const d = a;
|
|
1600
|
-
d.status =
|
|
1604
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1601
1605
|
}
|
|
1602
1606
|
});
|
|
1603
1607
|
});
|
|
@@ -1605,9 +1609,9 @@ function Q(e, t, s, n) {
|
|
|
1605
1609
|
function We(e, t = void 0, s = void 0) {
|
|
1606
1610
|
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1607
1611
|
e.commu_id || (e.commu_id = n);
|
|
1608
|
-
const
|
|
1612
|
+
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1609
1613
|
w(e, (r) => {
|
|
1610
|
-
m(
|
|
1614
|
+
m(o, {
|
|
1611
1615
|
method: "GET",
|
|
1612
1616
|
headers: {
|
|
1613
1617
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1619,31 +1623,31 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1619
1623
|
t && t(a);
|
|
1620
1624
|
},
|
|
1621
1625
|
onFailure(c, a) {
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1626
|
+
const i = c;
|
|
1627
|
+
i.status = a.status, i.response = a.errormsg, s && s(i);
|
|
1624
1628
|
}
|
|
1625
1629
|
});
|
|
1626
1630
|
});
|
|
1627
1631
|
}
|
|
1628
1632
|
function Be(e, t, s = void 0, n = void 0) {
|
|
1629
|
-
const { listAllContacts:
|
|
1630
|
-
console.log("__listAllContacts",
|
|
1633
|
+
const { listAllContacts: o, currentUser: r } = e;
|
|
1634
|
+
console.log("__listAllContacts", o.hits);
|
|
1631
1635
|
const c = `${e.space}/api/directmessages`, a = {
|
|
1632
1636
|
users: [r.login].concat(t.receipt)
|
|
1633
|
-
},
|
|
1637
|
+
}, i = {
|
|
1634
1638
|
id_msg: "",
|
|
1635
1639
|
senderId: e.currentUser.login,
|
|
1636
1640
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1637
|
-
msg:
|
|
1641
|
+
msg: te(t.msg)
|
|
1638
1642
|
};
|
|
1639
1643
|
let d = !1;
|
|
1640
|
-
|
|
1644
|
+
ee(
|
|
1641
1645
|
a.users,
|
|
1642
1646
|
(l) => {
|
|
1643
|
-
l !== void 0 && (
|
|
1647
|
+
l !== void 0 && (i.id_msg = l.id, d = !0, U(e, i));
|
|
1644
1648
|
},
|
|
1645
1649
|
(l) => {
|
|
1646
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l),
|
|
1650
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
|
|
1647
1651
|
}
|
|
1648
1652
|
), d === !1 && setTimeout(() => {
|
|
1649
1653
|
d === !1 && w(e, (l) => {
|
|
@@ -1658,7 +1662,7 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1658
1662
|
type: "json",
|
|
1659
1663
|
onComplete(p, u, f) {
|
|
1660
1664
|
const g = p;
|
|
1661
|
-
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g),
|
|
1665
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), i.id_msg = g.result.id, U(e, i);
|
|
1662
1666
|
},
|
|
1663
1667
|
onFailure(p, u, f) {
|
|
1664
1668
|
const g = p;
|
|
@@ -1668,21 +1672,21 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1668
1672
|
});
|
|
1669
1673
|
}, 500);
|
|
1670
1674
|
}
|
|
1671
|
-
function
|
|
1672
|
-
const
|
|
1675
|
+
function ee(e, t, s, n) {
|
|
1676
|
+
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1673
1677
|
w(e, (r) => {
|
|
1674
|
-
m(
|
|
1678
|
+
m(o, {
|
|
1675
1679
|
method: "GET",
|
|
1676
1680
|
headers: {
|
|
1677
1681
|
Accept: "application/json,text/javascript,*/*",
|
|
1678
1682
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1679
1683
|
},
|
|
1680
1684
|
onComplete(c) {
|
|
1681
|
-
const a = JSON.parse(c),
|
|
1685
|
+
const a = JSON.parse(c), i = [];
|
|
1682
1686
|
a.result.forEach((p) => {
|
|
1683
|
-
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length &&
|
|
1687
|
+
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && i.push(p);
|
|
1684
1688
|
});
|
|
1685
|
-
const d = t.sort(), l =
|
|
1689
|
+
const d = t.sort(), l = i.find((p) => {
|
|
1686
1690
|
const u = [];
|
|
1687
1691
|
return p.users.forEach((f) => {
|
|
1688
1692
|
u.push(f.login);
|
|
@@ -1698,12 +1702,12 @@ function Z(e, t, s, n) {
|
|
|
1698
1702
|
});
|
|
1699
1703
|
}
|
|
1700
1704
|
function U(e, t, s = void 0, n = void 0) {
|
|
1701
|
-
const
|
|
1705
|
+
const o = {
|
|
1702
1706
|
base: e.space,
|
|
1703
1707
|
uri: "/api/community",
|
|
1704
1708
|
id_msg: `${t.id_msg}`,
|
|
1705
1709
|
endUri: "/instantmessages"
|
|
1706
|
-
}, r = `${
|
|
1710
|
+
}, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, c = {
|
|
1707
1711
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1708
1712
|
accessState: null,
|
|
1709
1713
|
commentUri: null,
|
|
@@ -1723,25 +1727,25 @@ function U(e, t, s = void 0, n = void 0) {
|
|
|
1723
1727
|
},
|
|
1724
1728
|
data: JSON.stringify(c),
|
|
1725
1729
|
type: "json",
|
|
1726
|
-
onComplete(
|
|
1727
|
-
const p =
|
|
1730
|
+
onComplete(i, d, l) {
|
|
1731
|
+
const p = i;
|
|
1728
1732
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1729
1733
|
},
|
|
1730
|
-
onFailure(
|
|
1731
|
-
const l =
|
|
1734
|
+
onFailure(i, d) {
|
|
1735
|
+
const l = i;
|
|
1732
1736
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1733
1737
|
}
|
|
1734
1738
|
});
|
|
1735
1739
|
});
|
|
1736
1740
|
}
|
|
1737
|
-
function
|
|
1741
|
+
function te(e) {
|
|
1738
1742
|
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1739
1743
|
return `<p>${e} </p>
|
|
1740
1744
|
<br/>
|
|
1741
1745
|
<hr/>
|
|
1742
1746
|
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
|
|
1743
1747
|
}
|
|
1744
|
-
const
|
|
1748
|
+
const ne = {
|
|
1745
1749
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1746
1750
|
// titre du post
|
|
1747
1751
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1752,29 +1756,29 @@ const te = {
|
|
|
1752
1756
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1753
1757
|
};
|
|
1754
1758
|
function Ye(e, t, s = void 0, n = void 0) {
|
|
1755
|
-
const
|
|
1756
|
-
(
|
|
1759
|
+
const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1760
|
+
(i) => i.id === t.community_id
|
|
1757
1761
|
), c = e.swymCommunities.find(
|
|
1758
|
-
(
|
|
1762
|
+
(i) => i.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1759
1763
|
), a = {
|
|
1760
1764
|
params: {
|
|
1761
1765
|
title: t.title,
|
|
1762
1766
|
// String, le nom de l'affaire
|
|
1763
1767
|
community_id: r?.id !== void 0 ? r.id : c.id,
|
|
1764
1768
|
// String, l'id de la communauté
|
|
1765
|
-
message:
|
|
1769
|
+
message: se(t.text_html),
|
|
1766
1770
|
// STRING => le contenue du message doit être au format HTML
|
|
1767
1771
|
published: 1
|
|
1768
1772
|
// 1 publier, 0 non publier
|
|
1769
1773
|
}
|
|
1770
1774
|
};
|
|
1771
|
-
w(e, (
|
|
1775
|
+
w(e, (i) => {
|
|
1772
1776
|
const d = {
|
|
1773
1777
|
"Content-type": "application/json;charset=UTF-8",
|
|
1774
1778
|
Accept: "application/json",
|
|
1775
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1779
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1776
1780
|
};
|
|
1777
|
-
m(
|
|
1781
|
+
m(o, {
|
|
1778
1782
|
method: "POST",
|
|
1779
1783
|
headers: d,
|
|
1780
1784
|
data: JSON.stringify(a),
|
|
@@ -1791,14 +1795,14 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1791
1795
|
});
|
|
1792
1796
|
}
|
|
1793
1797
|
function qe(e, t, s = void 0, n = void 0) {
|
|
1794
|
-
const
|
|
1798
|
+
const o = `${e.space}/api/idea/delete`, r = {
|
|
1795
1799
|
params: {
|
|
1796
1800
|
community_id: t.community_id,
|
|
1797
1801
|
ideationIds: [t.idee_id]
|
|
1798
1802
|
}
|
|
1799
1803
|
};
|
|
1800
1804
|
w(e, (c) => {
|
|
1801
|
-
m(
|
|
1805
|
+
m(o, {
|
|
1802
1806
|
method: "POST",
|
|
1803
1807
|
headers: {
|
|
1804
1808
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1807,19 +1811,19 @@ function qe(e, t, s = void 0, n = void 0) {
|
|
|
1807
1811
|
},
|
|
1808
1812
|
data: JSON.stringify(r),
|
|
1809
1813
|
type: "json",
|
|
1810
|
-
onComplete(a,
|
|
1814
|
+
onComplete(a, i, d) {
|
|
1811
1815
|
s && s(a);
|
|
1812
1816
|
},
|
|
1813
|
-
onFailure(a,
|
|
1817
|
+
onFailure(a, i, d) {
|
|
1814
1818
|
const l = a;
|
|
1815
|
-
l.status =
|
|
1819
|
+
l.status = i.status, l.response = i.errormsg, n && n(l);
|
|
1816
1820
|
}
|
|
1817
1821
|
});
|
|
1818
1822
|
});
|
|
1819
1823
|
}
|
|
1820
1824
|
function He(e, t = "", s = void 0, n = void 0) {
|
|
1821
|
-
const
|
|
1822
|
-
t === "" && (t =
|
|
1825
|
+
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1826
|
+
t === "" && (t = o);
|
|
1823
1827
|
const r = `${e.space}/api/idea/get`, c = {
|
|
1824
1828
|
params: {
|
|
1825
1829
|
id: t
|
|
@@ -1835,23 +1839,23 @@ function He(e, t = "", s = void 0, n = void 0) {
|
|
|
1835
1839
|
},
|
|
1836
1840
|
data: JSON.stringify(c),
|
|
1837
1841
|
type: "json",
|
|
1838
|
-
onComplete(
|
|
1839
|
-
const d =
|
|
1842
|
+
onComplete(i) {
|
|
1843
|
+
const d = i;
|
|
1840
1844
|
d.msg = d.result.message, s && s(d);
|
|
1841
1845
|
},
|
|
1842
|
-
onFailure(
|
|
1843
|
-
const d =
|
|
1846
|
+
onFailure(i) {
|
|
1847
|
+
const d = i;
|
|
1844
1848
|
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1845
1849
|
}
|
|
1846
1850
|
});
|
|
1847
1851
|
});
|
|
1848
1852
|
}
|
|
1849
|
-
function ze(e, t =
|
|
1850
|
-
const
|
|
1853
|
+
function ze(e, t = ne, s = void 0, n = void 0) {
|
|
1854
|
+
const o = {
|
|
1851
1855
|
uri: "/api/idea/list",
|
|
1852
1856
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1853
1857
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1854
|
-
}, r = `${e.space}${
|
|
1858
|
+
}, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1855
1859
|
w(e, (c) => {
|
|
1856
1860
|
m(r, {
|
|
1857
1861
|
method: "GET",
|
|
@@ -1859,17 +1863,17 @@ function ze(e, t = te, s = void 0, n = void 0) {
|
|
|
1859
1863
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1860
1864
|
},
|
|
1861
1865
|
onComplete(a) {
|
|
1862
|
-
const
|
|
1863
|
-
s && s(
|
|
1866
|
+
const i = JSON.parse(a);
|
|
1867
|
+
s && s(i);
|
|
1864
1868
|
},
|
|
1865
|
-
onFailure(a,
|
|
1869
|
+
onFailure(a, i) {
|
|
1866
1870
|
const d = a;
|
|
1867
|
-
d.status =
|
|
1871
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1868
1872
|
}
|
|
1869
1873
|
});
|
|
1870
1874
|
});
|
|
1871
1875
|
}
|
|
1872
|
-
function
|
|
1876
|
+
function se(e) {
|
|
1873
1877
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1874
1878
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1875
1879
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1946,32 +1950,32 @@ function ne(e) {
|
|
|
1946
1950
|
}
|
|
1947
1951
|
function Qe(e, t = void 0, s = void 0) {
|
|
1948
1952
|
const n = e.space + "/api/user/getcurrent/";
|
|
1949
|
-
w(e, (
|
|
1953
|
+
w(e, (o) => {
|
|
1950
1954
|
m(n, {
|
|
1951
1955
|
method: "GET",
|
|
1952
1956
|
headers: {
|
|
1953
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1957
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1954
1958
|
},
|
|
1955
1959
|
onComplete(r, c, a) {
|
|
1956
|
-
const
|
|
1957
|
-
t && t(
|
|
1960
|
+
const i = JSON.parse(r);
|
|
1961
|
+
t && t(i.result);
|
|
1958
1962
|
},
|
|
1959
1963
|
onFailure(r, c, a) {
|
|
1960
|
-
const
|
|
1961
|
-
s && s(
|
|
1964
|
+
const i = { erreur: JSON.parse(r), headers: c, xhr: a };
|
|
1965
|
+
s && s(i);
|
|
1962
1966
|
}
|
|
1963
1967
|
});
|
|
1964
1968
|
});
|
|
1965
1969
|
}
|
|
1966
1970
|
function Ze(e, t, s = void 0, n = void 0) {
|
|
1967
|
-
const
|
|
1971
|
+
const o = e.space + "/api/user/find/login/" + t;
|
|
1968
1972
|
w(
|
|
1969
1973
|
e,
|
|
1970
1974
|
(r) => {
|
|
1971
|
-
m(
|
|
1975
|
+
m(o, {
|
|
1972
1976
|
method: "GET",
|
|
1973
1977
|
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1974
|
-
onComplete(c, a,
|
|
1978
|
+
onComplete(c, a, i) {
|
|
1975
1979
|
const d = JSON.parse(c);
|
|
1976
1980
|
s && s(d);
|
|
1977
1981
|
},
|
|
@@ -1993,13 +1997,13 @@ export {
|
|
|
1993
1997
|
je as _3DSpace_bookmark_addSubsciptions,
|
|
1994
1998
|
T as _3DSpace_csrf,
|
|
1995
1999
|
v as _3DSpace_download_doc,
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2000
|
+
W as _3DSpace_download_multidoc,
|
|
2001
|
+
X as _3DSpace_file_update,
|
|
2002
|
+
V as _3DSpace_file_update_csr,
|
|
1999
2003
|
be as _3DSpace_file_url_csr,
|
|
2000
2004
|
k as _3DSpace_get_csrf,
|
|
2001
|
-
|
|
2002
|
-
|
|
2005
|
+
K as _3DSpace_get_docInfo,
|
|
2006
|
+
B as _3DSpace_get_downloadTicket_multidoc,
|
|
2003
2007
|
N as _3DSpace_get_securityContexts,
|
|
2004
2008
|
A as _3DSpace_get_ticket,
|
|
2005
2009
|
Ue as _3DSpace_lifecycle_changeRevision,
|
|
@@ -2009,12 +2013,12 @@ export {
|
|
|
2009
2013
|
Fe as _3DSpace_lifecycle_getNextStates,
|
|
2010
2014
|
Be as _3DSwym_buildDirectMessage,
|
|
2011
2015
|
qe as _3DSwym_deleteIdea,
|
|
2012
|
-
|
|
2016
|
+
ee as _3DSwym_findCommunityToInstantMSG,
|
|
2013
2017
|
Ve as _3DSwym_getAllCommunities,
|
|
2014
2018
|
Ke as _3DSwym_getAllNews,
|
|
2015
2019
|
Xe as _3DSwym_getFamiliarPeople,
|
|
2016
2020
|
We as _3DSwym_getIdeaStatusMaturity,
|
|
2017
|
-
|
|
2021
|
+
Z as _3DSwym_getMembersCommunity,
|
|
2018
2022
|
He as _3DSwym_getSWYMIdea,
|
|
2019
2023
|
ze as _3DSwym_get_AllSWYMIdeas,
|
|
2020
2024
|
Qe as _3DSwym_get_currentUser,
|
|
@@ -2024,31 +2028,31 @@ export {
|
|
|
2024
2028
|
U as _3DSwym_sendMessageData,
|
|
2025
2029
|
Se as _AppMngt_get_info_user,
|
|
2026
2030
|
he as _AppMngt_get_users,
|
|
2027
|
-
|
|
2028
|
-
|
|
2031
|
+
J as _getPlateformInfos,
|
|
2032
|
+
me as _getPlatformServices,
|
|
2029
2033
|
m as _httpCallAuthenticated,
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2034
|
+
pe as _setDraggable,
|
|
2035
|
+
fe as _setDroppable,
|
|
2036
|
+
ue as _setupTagger,
|
|
2033
2037
|
Je as addTagToDoc,
|
|
2034
2038
|
ge as compass_getListAdditionalApps,
|
|
2035
2039
|
L as couleurs,
|
|
2036
2040
|
_e as createUserGroups,
|
|
2037
|
-
|
|
2041
|
+
Y as dataMixing,
|
|
2038
2042
|
Ce as deleteUserGroups,
|
|
2039
|
-
|
|
2043
|
+
ce as findAdresse,
|
|
2040
2044
|
Re as getAllContextSecurity,
|
|
2041
|
-
|
|
2042
|
-
|
|
2045
|
+
G as getCSRFToken,
|
|
2046
|
+
re as getCommunes,
|
|
2043
2047
|
ye as getComplementUG,
|
|
2044
2048
|
ve as getDataFrom3DSpace,
|
|
2045
|
-
|
|
2049
|
+
de as getDataFromGouvFr,
|
|
2046
2050
|
Me as getDatasByTenant,
|
|
2047
2051
|
Le as getDatasFrom3DSpace,
|
|
2048
2052
|
Ie as getDownloadDocument,
|
|
2049
2053
|
Ge as getInfoDocTags,
|
|
2050
2054
|
we as getUserGroupsList,
|
|
2051
|
-
|
|
2055
|
+
E as getUsersGroupRules,
|
|
2052
2056
|
Pe as get_3DSpace_csrf,
|
|
2053
2057
|
Te as patchUserGroups,
|
|
2054
2058
|
Oe as patchUserGroupsControl,
|
|
@@ -2056,6 +2060,6 @@ export {
|
|
|
2056
2060
|
Ne as readUserGroupControl,
|
|
2057
2061
|
Ee as removeTagToDoc,
|
|
2058
2062
|
et as sayHello,
|
|
2059
|
-
|
|
2063
|
+
le as updateEvent
|
|
2060
2064
|
};
|
|
2061
2065
|
//# sourceMappingURL=wb3Api.js.map
|