@beam3_dev/api_module 0.0.172 → 0.0.174
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 +536 -538
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +4 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v4 as
|
|
1
|
+
import { v4 as E } from "uuid";
|
|
2
2
|
import { DateTime as v } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function P() {
|
|
5
|
+
return E();
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const K = {
|
|
8
8
|
b3M3Yellow: "#FFB300",
|
|
9
9
|
b3AboutageBlue: "#42A5F5",
|
|
10
10
|
b3UsinageGreen: "#689F38",
|
|
@@ -34,7 +34,7 @@ const E = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
37
|
+
async function me(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 fe(e, t = void 0, n = void 0) {
|
|
|
50
50
|
n && n(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function ge(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 me(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 he(e, t = K) {
|
|
69
69
|
let n = v.now().year;
|
|
70
|
-
const s = e, i = [],
|
|
71
|
-
for (let
|
|
72
|
-
i.push({ date:
|
|
70
|
+
const s = e, i = [], r = (a) => {
|
|
71
|
+
for (let c in a)
|
|
72
|
+
i.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -80,36 +80,36 @@ async function ge(e, t = E) {
|
|
|
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 i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(p) => p.start === v.fromISO(
|
|
92
|
+
(p) => p.start === v.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: v.fromISO(
|
|
96
|
-
end: v.fromISO(
|
|
94
|
+
name: "Férié : " + c.comment,
|
|
95
|
+
start: v.fromISO(c.date).toISODate(),
|
|
96
|
+
end: v.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 Se(e, t, n = !0) {
|
|
104
104
|
const s = e.events.findIndex((i) => i.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((i,
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
|
|
106
106
|
}
|
|
107
107
|
function m(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
109
109
|
n.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ye(e, t, n) {
|
|
113
113
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
114
114
|
s.draggable(e, {
|
|
115
115
|
data: t,
|
|
@@ -126,14 +126,14 @@ function _e(e, t = void 0) {
|
|
|
126
126
|
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function we(e, t) {
|
|
130
130
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
131
131
|
n.droppable(e, {
|
|
132
132
|
drop: t
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
async function
|
|
136
|
+
async function Ce(e, t = void 0, n = void 0) {
|
|
137
137
|
await O(
|
|
138
138
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
139
139
|
(s) => {
|
|
@@ -147,17 +147,17 @@ async function we(e, t = void 0, n = void 0) {
|
|
|
147
147
|
}
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function V() {
|
|
151
151
|
let e = {};
|
|
152
152
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
153
|
-
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(),
|
|
153
|
+
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
154
154
|
"com.3ds.wp.passport.cors"
|
|
155
155
|
);
|
|
156
156
|
e = {
|
|
157
157
|
tenant: n,
|
|
158
158
|
user: s,
|
|
159
159
|
appsConfiguration: i,
|
|
160
|
-
appConf:
|
|
160
|
+
appConf: r
|
|
161
161
|
};
|
|
162
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
163
163
|
}
|
|
@@ -166,9 +166,9 @@ function b(e, t = void 0, n = void 0) {
|
|
|
166
166
|
const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
167
167
|
m(s, {
|
|
168
168
|
onComplete(i) {
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
const o =
|
|
169
|
+
const r = typeof i == "string" ? JSON.parse(i) : i;
|
|
170
|
+
if (r && "platforms" in r) {
|
|
171
|
+
const o = r.platforms.find(
|
|
172
172
|
(a) => a.id === e.tenant.toUpperCase()
|
|
173
173
|
);
|
|
174
174
|
t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
|
|
@@ -181,14 +181,14 @@ function b(e, t = void 0, n = void 0) {
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Te(e, t = void 0, n = void 0) {
|
|
185
185
|
if (e.tenant) {
|
|
186
186
|
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
187
187
|
m(s, {
|
|
188
188
|
onComplete(i) {
|
|
189
|
-
const
|
|
190
|
-
if (console.log("serviceId=3dpassport",
|
|
191
|
-
const o = `${
|
|
189
|
+
const r = JSON.parse(i);
|
|
190
|
+
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
191
|
+
const o = `${r[0].services[0].url}`;
|
|
192
192
|
t && t(o);
|
|
193
193
|
}
|
|
194
194
|
},
|
|
@@ -198,7 +198,7 @@ function Ce(e, t = void 0, n = void 0) {
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Oe(e, t, n) {
|
|
202
202
|
const s = {
|
|
203
203
|
base: `${e.space}`,
|
|
204
204
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
@@ -211,41 +211,41 @@ function Te(e, t, n) {
|
|
|
211
211
|
"Content-Type": "application/json",
|
|
212
212
|
Accept: "application/json"
|
|
213
213
|
},
|
|
214
|
-
onComplete(
|
|
215
|
-
const
|
|
214
|
+
onComplete(r, o, a) {
|
|
215
|
+
const c = JSON.parse(r), d = c.data.map((p) => {
|
|
216
216
|
const l = p.attributes.name, f = p.id;
|
|
217
217
|
return { name: l, id: f };
|
|
218
218
|
});
|
|
219
|
-
t && t(d,
|
|
219
|
+
t && t(d, c);
|
|
220
220
|
},
|
|
221
|
-
onFailure(
|
|
222
|
-
const a =
|
|
221
|
+
onFailure(r, o) {
|
|
222
|
+
const a = r;
|
|
223
223
|
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function be(e, t = void 0, n = void 0) {
|
|
228
228
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
229
229
|
m(s, {
|
|
230
|
-
onComplete(i,
|
|
230
|
+
onComplete(i, r, o) {
|
|
231
231
|
const a = JSON.parse(i);
|
|
232
232
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
233
233
|
},
|
|
234
|
-
onFailure(i,
|
|
234
|
+
onFailure(i, r) {
|
|
235
235
|
const o = i;
|
|
236
|
-
o.msg =
|
|
236
|
+
o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Ne(e, t, n = void 0, s = void 0) {
|
|
241
241
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
242
242
|
m(i, {
|
|
243
|
-
onComplete(
|
|
244
|
-
const
|
|
245
|
-
n && n(
|
|
243
|
+
onComplete(r, o, a) {
|
|
244
|
+
const c = JSON.parse(r);
|
|
245
|
+
n && n(c);
|
|
246
246
|
},
|
|
247
|
-
onFailure(
|
|
248
|
-
const a =
|
|
247
|
+
onFailure(r, o) {
|
|
248
|
+
const a = r;
|
|
249
249
|
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
250
250
|
}
|
|
251
251
|
});
|
|
@@ -254,15 +254,15 @@ const U = {
|
|
|
254
254
|
"Content-Type": "application/json",
|
|
255
255
|
Accept: "application/json,text/javascript,*/*"
|
|
256
256
|
};
|
|
257
|
-
function
|
|
258
|
-
const { space: i, currentUser:
|
|
257
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
258
|
+
const { space: i, currentUser: r } = e, a = `${i}${{
|
|
259
259
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
260
|
-
}.URIUGr}`,
|
|
260
|
+
}.URIUGr}`, c = {
|
|
261
261
|
groups: [
|
|
262
262
|
{
|
|
263
263
|
title: t.title,
|
|
264
264
|
description: t.description,
|
|
265
|
-
members: t.members || [
|
|
265
|
+
members: t.members || [r.email, "samuel.mureau@beam3.fr"],
|
|
266
266
|
pending_members: [],
|
|
267
267
|
sharing: t.sharing,
|
|
268
268
|
visibility: t.visibility
|
|
@@ -272,7 +272,7 @@ function Ne(e, t, n = void 0, s = void 0) {
|
|
|
272
272
|
m(a, {
|
|
273
273
|
method: "POST",
|
|
274
274
|
headers: U,
|
|
275
|
-
data: JSON.stringify(
|
|
275
|
+
data: JSON.stringify(c),
|
|
276
276
|
onComplete(d) {
|
|
277
277
|
n && n(JSON.parse(d));
|
|
278
278
|
},
|
|
@@ -283,8 +283,8 @@ function Ne(e, t, n = void 0, s = void 0) {
|
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const { space: i, tenant:
|
|
286
|
+
function ve(e, t, n = void 0, s = void 0) {
|
|
287
|
+
const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
|
|
288
288
|
m(d, {
|
|
289
289
|
opts: {
|
|
290
290
|
method: "GET",
|
|
@@ -302,13 +302,13 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const { space: s, tenant: i } = e,
|
|
305
|
+
function B(e, t = void 0, n = void 0) {
|
|
306
|
+
const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
|
|
307
307
|
method: "GET",
|
|
308
308
|
Accept: "application/json,*/*,test/javascript"
|
|
309
|
-
}, d = `${
|
|
309
|
+
}, d = `${r}${o}${a}`;
|
|
310
310
|
m(d, {
|
|
311
|
-
OPTsH:
|
|
311
|
+
OPTsH: c,
|
|
312
312
|
onComplete(p) {
|
|
313
313
|
t && t(JSON.parse(p));
|
|
314
314
|
},
|
|
@@ -318,7 +318,7 @@ function V(e, t = void 0, n = void 0) {
|
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Ie(e, t = void 0, n = void 0) {
|
|
322
322
|
const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
323
323
|
"Content-Type": "application/json",
|
|
324
324
|
Accept: "application/json,text/javascript,*/*"
|
|
@@ -329,14 +329,14 @@ function ve(e, t = void 0, n = void 0) {
|
|
|
329
329
|
onComplete(p) {
|
|
330
330
|
const l = JSON.parse(p), f = {}, u = l.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
331
331
|
if (i && Object.keys(i).length > 0) {
|
|
332
|
-
const g = u.filter((
|
|
333
|
-
f.iam = S, f.UG = u, f.iamMember = h,
|
|
332
|
+
const g = u.filter((y) => y.owner === i.email), h = u.filter((y) => y.members.includes(i.email)), S = g.concat(h);
|
|
333
|
+
f.iam = S, f.UG = u, f.iamMember = h, B(
|
|
334
334
|
e,
|
|
335
|
-
(
|
|
336
|
-
f.rules =
|
|
335
|
+
(y) => {
|
|
336
|
+
f.rules = y, t && t(f);
|
|
337
337
|
},
|
|
338
|
-
(
|
|
339
|
-
n && n(
|
|
338
|
+
(y) => {
|
|
339
|
+
n && n(y);
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
}
|
|
@@ -349,14 +349,14 @@ function ve(e, t = void 0, n = void 0) {
|
|
|
349
349
|
console.log(p);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Ae(e, t) {
|
|
353
353
|
const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
354
354
|
m(i, {
|
|
355
355
|
method: "DELETE"
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
const { space:
|
|
358
|
+
function ke(e, t, n, s = void 0, i = void 0) {
|
|
359
|
+
const { space: r, tenant: o } = e, a = {
|
|
360
360
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
361
361
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
362
362
|
nextURICh: "/characteristics",
|
|
@@ -364,7 +364,7 @@ function Ae(e, t, n, s = void 0, i = void 0) {
|
|
|
364
364
|
nexURImem: "/members",
|
|
365
365
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
366
366
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
367
|
-
},
|
|
367
|
+
}, c = n, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
|
|
368
368
|
m(d, {
|
|
369
369
|
headers: U,
|
|
370
370
|
method: "PATCH",
|
|
@@ -378,8 +378,8 @@ function Ae(e, t, n, s = void 0, i = void 0) {
|
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
const { space:
|
|
381
|
+
function Ue(e, t, n, s = void 0, i = void 0) {
|
|
382
|
+
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
383
383
|
m(a, {
|
|
384
384
|
method: "PATCH",
|
|
385
385
|
headers: U,
|
|
@@ -393,7 +393,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
|
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Fe(e, t, n = void 0, s = void 0) {
|
|
397
397
|
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
398
398
|
m(o, {
|
|
399
399
|
opts: {
|
|
@@ -411,37 +411,37 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
async function
|
|
414
|
+
async function W(e, t, n) {
|
|
415
415
|
if (e.space) {
|
|
416
416
|
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
417
417
|
m(s, {
|
|
418
418
|
onComplete(i) {
|
|
419
419
|
i = JSON.parse(i), t && t(i.csrf);
|
|
420
420
|
},
|
|
421
|
-
onFailure(i,
|
|
422
|
-
n && n({ error: i, headers:
|
|
421
|
+
onFailure(i, r, o) {
|
|
422
|
+
n && n({ error: i, headers: r, xhr: o });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
var I = {};
|
|
428
|
-
function
|
|
428
|
+
function X(e, t) {
|
|
429
429
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
430
430
|
}
|
|
431
|
-
var
|
|
431
|
+
var Y = function(e, t, n, s) {
|
|
432
432
|
t = t || "&", n = n || "=";
|
|
433
433
|
var i = {};
|
|
434
434
|
if (typeof e != "string" || e.length === 0)
|
|
435
435
|
return i;
|
|
436
|
-
var
|
|
436
|
+
var r = /\+/g;
|
|
437
437
|
e = e.split(t);
|
|
438
438
|
var o = 1e3;
|
|
439
439
|
s && typeof s.maxKeys == "number" && (o = s.maxKeys);
|
|
440
440
|
var a = e.length;
|
|
441
441
|
o > 0 && a > o && (a = o);
|
|
442
|
-
for (var
|
|
443
|
-
var d = e[
|
|
444
|
-
p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f),
|
|
442
|
+
for (var c = 0; c < a; ++c) {
|
|
443
|
+
var d = e[c].replace(r, "%20"), p = d.indexOf(n), l, f, u, g;
|
|
444
|
+
p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f), X(i, u) ? Array.isArray(i[u]) ? i[u].push(g) : i[u] = [i[u], g] : i[u] = g;
|
|
445
445
|
}
|
|
446
446
|
return i;
|
|
447
447
|
}, $ = function(e) {
|
|
@@ -455,25 +455,25 @@ var X = function(e, t, n, s) {
|
|
|
455
455
|
default:
|
|
456
456
|
return "";
|
|
457
457
|
}
|
|
458
|
-
},
|
|
458
|
+
}, H = function(e, t, n, s) {
|
|
459
459
|
return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
|
|
460
|
-
var
|
|
460
|
+
var r = encodeURIComponent($(i)) + n;
|
|
461
461
|
return Array.isArray(e[i]) ? e[i].map(function(o) {
|
|
462
|
-
return
|
|
463
|
-
}).join(t) :
|
|
462
|
+
return r + encodeURIComponent($(o));
|
|
463
|
+
}).join(t) : r + encodeURIComponent($(e[i]));
|
|
464
464
|
}).filter(Boolean).join(t) : s ? encodeURIComponent($(s)) + n + encodeURIComponent($(e)) : "";
|
|
465
465
|
};
|
|
466
|
-
I.decode = I.parse =
|
|
467
|
-
I.encode = I.stringify =
|
|
468
|
-
async function
|
|
466
|
+
I.decode = I.parse = Y;
|
|
467
|
+
I.encode = I.stringify = H;
|
|
468
|
+
async function z(e, t = void 0, n = void 0, s = void 0) {
|
|
469
469
|
const i = e.space;
|
|
470
470
|
if (t === void 0) {
|
|
471
471
|
console.log("Le paramètre docid est obligatoire");
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
|
-
const
|
|
475
|
-
m(
|
|
476
|
-
onComplete(o, a,
|
|
474
|
+
const r = i + `/resources/v1/modeler/documents/${t}`;
|
|
475
|
+
m(r, {
|
|
476
|
+
onComplete(o, a, c) {
|
|
477
477
|
const d = JSON.parse(o);
|
|
478
478
|
n && n(d);
|
|
479
479
|
},
|
|
@@ -482,22 +482,22 @@ async function H(e, t = void 0, n = void 0, s = void 0) {
|
|
|
482
482
|
}
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
async function
|
|
485
|
+
async function je(e, t = void 0, n = void 0, s = void 0) {
|
|
486
486
|
const i = e.space;
|
|
487
487
|
if (t === void 0) {
|
|
488
488
|
console.log("Le paramètre docids est obligatoire");
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
|
-
let
|
|
491
|
+
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
|
|
492
492
|
$ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
|
|
493
493
|
});
|
|
494
|
-
m(
|
|
494
|
+
m(r, {
|
|
495
495
|
method: "POST",
|
|
496
496
|
headers: {
|
|
497
497
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
498
498
|
},
|
|
499
499
|
data: o,
|
|
500
|
-
onComplete(a,
|
|
500
|
+
onComplete(a, c, d) {
|
|
501
501
|
const p = JSON.parse(a);
|
|
502
502
|
n && n(p);
|
|
503
503
|
},
|
|
@@ -510,7 +510,7 @@ function A(e, t = void 0, n = void 0) {
|
|
|
510
510
|
if (e.objID && e.objID !== "") {
|
|
511
511
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
512
512
|
m(s, {
|
|
513
|
-
onComplete(i,
|
|
513
|
+
onComplete(i, r, o) {
|
|
514
514
|
const a = JSON.parse(i);
|
|
515
515
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
516
516
|
},
|
|
@@ -533,14 +533,14 @@ function T(e, t = void 0, n = void 0) {
|
|
|
533
533
|
if (e.space) {
|
|
534
534
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
535
535
|
m(s, {
|
|
536
|
-
onComplete(i,
|
|
536
|
+
onComplete(i, r, o) {
|
|
537
537
|
const a = JSON.parse(i);
|
|
538
538
|
t && t(a.csrf.value);
|
|
539
539
|
},
|
|
540
|
-
onFailure(i,
|
|
540
|
+
onFailure(i, r, o) {
|
|
541
541
|
n && n({
|
|
542
542
|
response: i,
|
|
543
|
-
headers:
|
|
543
|
+
headers: r,
|
|
544
544
|
xhr: o
|
|
545
545
|
});
|
|
546
546
|
}
|
|
@@ -558,12 +558,12 @@ function F(e, t = void 0, n = void 0) {
|
|
|
558
558
|
headers: {
|
|
559
559
|
ENO_CSRF_TOKEN: e.token
|
|
560
560
|
},
|
|
561
|
-
onComplete(
|
|
562
|
-
const
|
|
563
|
-
t && t(
|
|
561
|
+
onComplete(r, o) {
|
|
562
|
+
const c = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
563
|
+
t && t(c, o);
|
|
564
564
|
},
|
|
565
|
-
onFailure(
|
|
566
|
-
console.warn("☠️ error => ",
|
|
565
|
+
onFailure(r, o) {
|
|
566
|
+
console.warn("☠️ error => ", r, o), n && n(r, o);
|
|
567
567
|
}
|
|
568
568
|
});
|
|
569
569
|
},
|
|
@@ -572,9 +572,9 @@ function F(e, t = void 0, n = void 0) {
|
|
|
572
572
|
}
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
const
|
|
577
|
-
n || (n = e.token), m(
|
|
575
|
+
function xe(e, t, n, s = void 0, i = void 0) {
|
|
576
|
+
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
577
|
+
n || (n = e.token), m(r, {
|
|
578
578
|
method: "PUT",
|
|
579
579
|
headers: {
|
|
580
580
|
ENO_CSRF_TOKEN: n
|
|
@@ -583,10 +583,10 @@ function je(e, t, n, s = void 0, i = void 0) {
|
|
|
583
583
|
let a = JSON.parse(o);
|
|
584
584
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
585
585
|
try {
|
|
586
|
-
const
|
|
587
|
-
s && s(
|
|
588
|
-
} catch (
|
|
589
|
-
i && i(
|
|
586
|
+
const c = a.data[0].dataelements.ticketURL;
|
|
587
|
+
s && s(c);
|
|
588
|
+
} catch (c) {
|
|
589
|
+
i && i(c);
|
|
590
590
|
}
|
|
591
591
|
},
|
|
592
592
|
onFailure(o) {
|
|
@@ -594,28 +594,28 @@ function je(e, t, n, s = void 0, i = void 0) {
|
|
|
594
594
|
}
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
|
-
function
|
|
598
|
-
const a = () =>
|
|
597
|
+
function q(e, t, n, s, i, r = void 0, o = void 0) {
|
|
598
|
+
const a = () => Q(
|
|
599
599
|
e,
|
|
600
600
|
t,
|
|
601
601
|
n,
|
|
602
602
|
s,
|
|
603
603
|
i,
|
|
604
604
|
e.token,
|
|
605
|
-
|
|
605
|
+
r,
|
|
606
606
|
o
|
|
607
607
|
);
|
|
608
608
|
e.token ? a() : A(
|
|
609
609
|
e,
|
|
610
610
|
t,
|
|
611
|
-
(
|
|
612
|
-
e.token =
|
|
611
|
+
(c) => {
|
|
612
|
+
e.token = c.csrf.value, a();
|
|
613
613
|
}
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
const
|
|
618
|
-
m(
|
|
616
|
+
function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
617
|
+
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
618
|
+
m(c, {
|
|
619
619
|
method: "PUT",
|
|
620
620
|
headers: {
|
|
621
621
|
ENO_CSRF_TOKEN: e.token
|
|
@@ -625,7 +625,7 @@ function q(e, t, n, s, i, c, o = void 0, a = void 0) {
|
|
|
625
625
|
g.append("__fcs__jobTicket", u.ticket), g.append("file_0", s, i);
|
|
626
626
|
const h = {};
|
|
627
627
|
h.method = "POST", h.data = g, h.onComplete = function(S) {
|
|
628
|
-
let
|
|
628
|
+
let y = {
|
|
629
629
|
method: "PUT",
|
|
630
630
|
headers: {
|
|
631
631
|
SecurityContext: "ctx::" + e.ctx
|
|
@@ -647,16 +647,16 @@ function q(e, t, n, s, i, c, o = void 0, a = void 0) {
|
|
|
647
647
|
}]
|
|
648
648
|
}),
|
|
649
649
|
type: "json",
|
|
650
|
-
onComplete(
|
|
651
|
-
o && o(
|
|
650
|
+
onComplete(C) {
|
|
651
|
+
o && o(C);
|
|
652
652
|
},
|
|
653
|
-
onFailure(
|
|
654
|
-
a && a(
|
|
653
|
+
onFailure(C) {
|
|
654
|
+
a && a(C);
|
|
655
655
|
}
|
|
656
|
-
},
|
|
656
|
+
}, _ = e.tenant.toUpperCase();
|
|
657
657
|
m(
|
|
658
|
-
e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${
|
|
659
|
-
|
|
658
|
+
e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${_}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
|
|
659
|
+
y
|
|
660
660
|
);
|
|
661
661
|
}, h.onFailure = function(S) {
|
|
662
662
|
a && a(S);
|
|
@@ -664,31 +664,27 @@ function q(e, t, n, s, i, c, o = void 0, a = void 0) {
|
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
async function
|
|
668
|
-
const o = e.space, a = e.token,
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
data: d,
|
|
689
|
-
onComplete(w) {
|
|
690
|
-
if (r !== "" && a !== "") {
|
|
691
|
-
const k = {
|
|
667
|
+
async function Re(e, t, n, s, i = void 0, r = void 0) {
|
|
668
|
+
const o = e.space, a = e.token, c = e.ctx;
|
|
669
|
+
if (o !== "") {
|
|
670
|
+
let d = `${o}/resources/v1/modeler/documents/files/CheckinTicket`;
|
|
671
|
+
m(d, {
|
|
672
|
+
method: "PUT",
|
|
673
|
+
headers: {
|
|
674
|
+
ENO_CSRF_TOKEN: a
|
|
675
|
+
},
|
|
676
|
+
onComplete(p, l, f) {
|
|
677
|
+
let u = JSON.parse(p).data[0].dataelements, g = new FormData();
|
|
678
|
+
const h = new Blob([t], {
|
|
679
|
+
type: "text/plain"
|
|
680
|
+
});
|
|
681
|
+
g.append("__fcs__jobTicket", u.ticket), g.append("filename", h, n);
|
|
682
|
+
const S = (_) => _.indexOf(".") === -1 ? _ : _.split(".").slice(0, -1).join(".");
|
|
683
|
+
let y = {
|
|
684
|
+
method: "POST",
|
|
685
|
+
data: g,
|
|
686
|
+
onComplete(_) {
|
|
687
|
+
let C = P(), G = {
|
|
692
688
|
method: "POST",
|
|
693
689
|
headers: {
|
|
694
690
|
ENO_CSRF_TOKEN: a,
|
|
@@ -696,52 +692,54 @@ async function Pe(e, t, n, s, i = void 0, c = void 0) {
|
|
|
696
692
|
"Content-Type": "application/json"
|
|
697
693
|
},
|
|
698
694
|
data: JSON.stringify({
|
|
699
|
-
data: [
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
695
|
+
data: [
|
|
696
|
+
{
|
|
697
|
+
type: "Document",
|
|
698
|
+
dataelements: {
|
|
699
|
+
title: S(n),
|
|
700
|
+
description: s,
|
|
701
|
+
policy: "Document Release"
|
|
702
|
+
},
|
|
703
|
+
relateddata: {
|
|
704
|
+
files: [
|
|
705
|
+
{
|
|
706
|
+
dataelements: {
|
|
707
|
+
title: n,
|
|
708
|
+
receipt: _
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
tempId: C
|
|
714
|
+
}
|
|
715
|
+
]
|
|
716
716
|
}),
|
|
717
717
|
type: "json",
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
718
|
+
onComplete(k) {
|
|
719
|
+
i && i(k);
|
|
720
|
+
},
|
|
721
|
+
onFailure(k) {
|
|
722
|
+
r && r(k);
|
|
723
|
+
}
|
|
721
724
|
};
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
function y(w, k) {
|
|
732
|
-
console.log("Erreur -- response ", w, `
|
|
733
|
-
headers `, k), c && c(w);
|
|
725
|
+
m(o + "/resources/v1/modeler/documents/?SecurityContext=ctx::" + c, G);
|
|
726
|
+
},
|
|
727
|
+
onFailure(_) {
|
|
728
|
+
r && r(_);
|
|
729
|
+
},
|
|
730
|
+
timeout: 0
|
|
731
|
+
};
|
|
732
|
+
m(u.ticketURL, y);
|
|
734
733
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
});
|
|
734
|
+
});
|
|
735
|
+
}
|
|
738
736
|
}
|
|
739
|
-
function N(e, t = void 0, n = void 0, s = void 0, i = void 0,
|
|
737
|
+
function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
|
|
740
738
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
741
739
|
m(a, {
|
|
742
740
|
method: "GET",
|
|
743
|
-
onComplete(
|
|
744
|
-
const d = JSON.parse(
|
|
741
|
+
onComplete(c) {
|
|
742
|
+
const d = JSON.parse(c);
|
|
745
743
|
let p = "", l, f, u;
|
|
746
744
|
if (t) {
|
|
747
745
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -749,37 +747,37 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1
|
|
|
749
747
|
l = t;
|
|
750
748
|
let h = g.couples;
|
|
751
749
|
h = h.filter(
|
|
752
|
-
(S,
|
|
753
|
-
(
|
|
750
|
+
(S, y, _) => y === _.findIndex(
|
|
751
|
+
(C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
|
|
754
752
|
)
|
|
755
753
|
), n && (Array.isArray(n) ? n.forEach((S) => {
|
|
756
|
-
u || h.forEach((
|
|
757
|
-
if (S ===
|
|
754
|
+
u || h.forEach((y) => {
|
|
755
|
+
if (S === y.role.name && s === y.organization.title)
|
|
758
756
|
u = S, f = s;
|
|
759
|
-
else if (S ===
|
|
760
|
-
let
|
|
761
|
-
(
|
|
757
|
+
else if (S === y.role.name) {
|
|
758
|
+
let _ = h.filter(
|
|
759
|
+
(C) => C.role.name === S
|
|
762
760
|
);
|
|
763
|
-
|
|
761
|
+
_.length === 1 ? (u = _[0].role.name, f = _[0].organization.title) : r(_);
|
|
764
762
|
}
|
|
765
763
|
});
|
|
766
764
|
}) : h.forEach((S) => {
|
|
767
765
|
if (n === S.role.name && s === S.organization.title)
|
|
768
766
|
u = n, f = s;
|
|
769
767
|
else if (n === S.role.name) {
|
|
770
|
-
let
|
|
771
|
-
(
|
|
768
|
+
let y = h.filter(
|
|
769
|
+
(_) => _.role.name === n
|
|
772
770
|
);
|
|
773
|
-
|
|
771
|
+
y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : r(y);
|
|
774
772
|
}
|
|
775
773
|
}));
|
|
776
774
|
}
|
|
777
775
|
}
|
|
778
|
-
l && f && u ? (p = u + "." + f + "." + l, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) :
|
|
776
|
+
l && f && u ? (p = u + "." + f + "." + l, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : r && (p = u + "." + f + "." + l, r(p));
|
|
779
777
|
},
|
|
780
|
-
onFailure(
|
|
778
|
+
onFailure(c, d) {
|
|
781
779
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
782
|
-
err:
|
|
780
|
+
err: c,
|
|
783
781
|
headers: d
|
|
784
782
|
});
|
|
785
783
|
}
|
|
@@ -790,7 +788,7 @@ async function D(e, t = void 0, n = void 0) {
|
|
|
790
788
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
791
789
|
), n && n("_3DSpace_download_doc() / Le paramètre objectId est obligatoire")), (e.space === "" || !e.space) && (console.warn(
|
|
792
790
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
793
|
-
), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) &&
|
|
791
|
+
), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && W(
|
|
794
792
|
e,
|
|
795
793
|
(s) => {
|
|
796
794
|
e.token = s;
|
|
@@ -801,12 +799,12 @@ async function D(e, t = void 0, n = void 0) {
|
|
|
801
799
|
), new Promise((s, i) => {
|
|
802
800
|
F(
|
|
803
801
|
e,
|
|
804
|
-
(
|
|
805
|
-
e?.returnType === "blob" ? (console.log("ticketURL blob",
|
|
802
|
+
(r) => {
|
|
803
|
+
e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
|
|
806
804
|
t && t(o);
|
|
807
805
|
}).catch((o) => {
|
|
808
806
|
n && n(o);
|
|
809
|
-
})) : m(
|
|
807
|
+
})) : m(r, {
|
|
810
808
|
onComplete(o) {
|
|
811
809
|
let a;
|
|
812
810
|
try {
|
|
@@ -816,41 +814,41 @@ async function D(e, t = void 0, n = void 0) {
|
|
|
816
814
|
}
|
|
817
815
|
t && typeof t == "function" && t(a), s(a);
|
|
818
816
|
},
|
|
819
|
-
onFailure(o, a,
|
|
817
|
+
onFailure(o, a, c) {
|
|
820
818
|
n && (console.log("error http", o), n({
|
|
821
819
|
msg: JSON.parse(o),
|
|
822
820
|
headers: a,
|
|
823
|
-
xhr:
|
|
821
|
+
xhr: c
|
|
824
822
|
}), i({
|
|
825
823
|
msg: JSON.parse(o),
|
|
826
824
|
headers: a,
|
|
827
|
-
xhr:
|
|
825
|
+
xhr: c
|
|
828
826
|
}));
|
|
829
827
|
}
|
|
830
828
|
});
|
|
831
829
|
},
|
|
832
|
-
(
|
|
833
|
-
n && n(
|
|
830
|
+
(r) => {
|
|
831
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
|
|
834
832
|
}
|
|
835
833
|
);
|
|
836
834
|
});
|
|
837
835
|
}
|
|
838
|
-
async function
|
|
836
|
+
async function Z(e, t, n = void 0, s = void 0) {
|
|
839
837
|
let i = [];
|
|
840
838
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
841
839
|
for (let a = 0; a < t.length; a += 80) {
|
|
842
|
-
const
|
|
843
|
-
i.push(
|
|
840
|
+
const c = t.slice(a, a + 80);
|
|
841
|
+
i.push(c);
|
|
844
842
|
}
|
|
845
843
|
const o = (a) => {
|
|
846
|
-
|
|
844
|
+
ee(
|
|
847
845
|
e,
|
|
848
846
|
i[a],
|
|
849
847
|
() => {
|
|
850
848
|
a++, a < i.length && o(a);
|
|
851
849
|
},
|
|
852
|
-
(
|
|
853
|
-
n && n(
|
|
850
|
+
(c) => {
|
|
851
|
+
n && n(c);
|
|
854
852
|
}
|
|
855
853
|
);
|
|
856
854
|
};
|
|
@@ -862,11 +860,11 @@ async function Q(e, t, n = void 0, s = void 0) {
|
|
|
862
860
|
"La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
|
|
863
861
|
);
|
|
864
862
|
}
|
|
865
|
-
function
|
|
866
|
-
const
|
|
867
|
-
t.forEach((
|
|
868
|
-
|
|
869
|
-
id:
|
|
863
|
+
function ee(e, t, n = void 0, s = void 0, i = void 0) {
|
|
864
|
+
const r = [];
|
|
865
|
+
t.forEach((c) => {
|
|
866
|
+
r.push({
|
|
867
|
+
id: c
|
|
870
868
|
});
|
|
871
869
|
});
|
|
872
870
|
let o = JSON.stringify({
|
|
@@ -874,16 +872,16 @@ function Z(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
874
872
|
name: "ENO_CSRF_TOKEN",
|
|
875
873
|
value: e.token
|
|
876
874
|
},
|
|
877
|
-
data:
|
|
875
|
+
data: r
|
|
878
876
|
});
|
|
879
877
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
880
878
|
m(a, {
|
|
881
879
|
method: "PUT",
|
|
882
880
|
data: o,
|
|
883
881
|
type: "json",
|
|
884
|
-
onComplete(
|
|
885
|
-
const d =
|
|
886
|
-
|
|
882
|
+
onComplete(c) {
|
|
883
|
+
const d = c.data;
|
|
884
|
+
c.success === !0 && (n && n(), d.forEach((p) => {
|
|
887
885
|
try {
|
|
888
886
|
const l = p.dataelements.fileName, f = p.dataelements.ticketURL;
|
|
889
887
|
m(f, {
|
|
@@ -910,15 +908,15 @@ function Z(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
910
908
|
}
|
|
911
909
|
}));
|
|
912
910
|
},
|
|
913
|
-
onFailure(
|
|
914
|
-
console.log(
|
|
911
|
+
onFailure(c) {
|
|
912
|
+
console.log(c), i && i(c);
|
|
915
913
|
}
|
|
916
914
|
});
|
|
917
915
|
}
|
|
918
|
-
function
|
|
916
|
+
function Pe(e, t, n = void 0, s = void 0) {
|
|
919
917
|
return new Promise((i) => {
|
|
920
918
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
921
|
-
const
|
|
919
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
922
920
|
N(
|
|
923
921
|
e.space,
|
|
924
922
|
"ESPACE COMMUN",
|
|
@@ -950,12 +948,12 @@ function Re(e, t, n = void 0, s = void 0) {
|
|
|
950
948
|
s && s(a);
|
|
951
949
|
}
|
|
952
950
|
};
|
|
953
|
-
m(
|
|
951
|
+
m(r, o);
|
|
954
952
|
}
|
|
955
953
|
});
|
|
956
954
|
}
|
|
957
|
-
function
|
|
958
|
-
return new Promise((
|
|
955
|
+
function De(e, t, n, s = void 0, i = void 0) {
|
|
956
|
+
return new Promise((r) => {
|
|
959
957
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
960
958
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
961
959
|
N(
|
|
@@ -963,9 +961,9 @@ function xe(e, t, n, s = void 0, i = void 0) {
|
|
|
963
961
|
"ESPACE COMMUN",
|
|
964
962
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
965
963
|
void 0,
|
|
966
|
-
(
|
|
967
|
-
(
|
|
968
|
-
console.log("onError =>",
|
|
964
|
+
(c) => e.ctx = c,
|
|
965
|
+
(c) => {
|
|
966
|
+
console.log("onError =>", c);
|
|
969
967
|
}
|
|
970
968
|
);
|
|
971
969
|
let a = {
|
|
@@ -983,21 +981,21 @@ function xe(e, t, n, s = void 0, i = void 0) {
|
|
|
983
981
|
}]
|
|
984
982
|
}),
|
|
985
983
|
type: "json",
|
|
986
|
-
onComplete(
|
|
987
|
-
s && s(
|
|
984
|
+
onComplete(c) {
|
|
985
|
+
s && s(c);
|
|
988
986
|
},
|
|
989
|
-
onFailure(
|
|
990
|
-
i && i(
|
|
987
|
+
onFailure(c) {
|
|
988
|
+
i && i(c);
|
|
991
989
|
}
|
|
992
990
|
};
|
|
993
991
|
m(o, a);
|
|
994
992
|
}
|
|
995
993
|
});
|
|
996
994
|
}
|
|
997
|
-
function
|
|
995
|
+
function Le(e, t, n = void 0, s = void 0) {
|
|
998
996
|
return new Promise((i) => {
|
|
999
997
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1000
|
-
const
|
|
998
|
+
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
1001
999
|
N(
|
|
1002
1000
|
e.space,
|
|
1003
1001
|
"ESPACE COMMUN",
|
|
@@ -1029,14 +1027,14 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
1029
1027
|
s && s(a);
|
|
1030
1028
|
}
|
|
1031
1029
|
};
|
|
1032
|
-
m(
|
|
1030
|
+
m(r, o);
|
|
1033
1031
|
}
|
|
1034
1032
|
});
|
|
1035
1033
|
}
|
|
1036
|
-
function
|
|
1034
|
+
function Me(e, t, n = void 0, s = void 0) {
|
|
1037
1035
|
return new Promise((i) => {
|
|
1038
1036
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1039
|
-
const
|
|
1037
|
+
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
1040
1038
|
N(
|
|
1041
1039
|
e.space,
|
|
1042
1040
|
"ESPACE COMMUN",
|
|
@@ -1074,12 +1072,12 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1074
1072
|
s && s(a);
|
|
1075
1073
|
}
|
|
1076
1074
|
};
|
|
1077
|
-
m(
|
|
1075
|
+
m(r, o);
|
|
1078
1076
|
}
|
|
1079
1077
|
});
|
|
1080
1078
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return new Promise((
|
|
1079
|
+
function Je(e, t, n, s = void 0, i = void 0) {
|
|
1080
|
+
return new Promise((r) => {
|
|
1083
1081
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1084
1082
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
1085
1083
|
N(
|
|
@@ -1087,9 +1085,9 @@ function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
1087
1085
|
"ESPACE COMMUN",
|
|
1088
1086
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
1089
1087
|
void 0,
|
|
1090
|
-
(
|
|
1091
|
-
(
|
|
1092
|
-
console.log("onError =>",
|
|
1088
|
+
(c) => e.ctx = c,
|
|
1089
|
+
(c) => {
|
|
1090
|
+
console.log("onError =>", c);
|
|
1093
1091
|
}
|
|
1094
1092
|
);
|
|
1095
1093
|
let a = {
|
|
@@ -1112,21 +1110,21 @@ function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
1112
1110
|
notificationTimeout: 600
|
|
1113
1111
|
}),
|
|
1114
1112
|
type: "json",
|
|
1115
|
-
onComplete(
|
|
1116
|
-
s && s(
|
|
1113
|
+
onComplete(c) {
|
|
1114
|
+
s && s(c);
|
|
1117
1115
|
},
|
|
1118
|
-
onFailure(
|
|
1119
|
-
i && i(
|
|
1116
|
+
onFailure(c) {
|
|
1117
|
+
i && i(c);
|
|
1120
1118
|
}
|
|
1121
1119
|
};
|
|
1122
1120
|
m(o, a);
|
|
1123
1121
|
}
|
|
1124
1122
|
});
|
|
1125
1123
|
}
|
|
1126
|
-
function
|
|
1124
|
+
function Ge(e, t, n, s, i = void 0, r = void 0) {
|
|
1127
1125
|
return new Promise((o) => {
|
|
1128
1126
|
const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
|
|
1129
|
-
let
|
|
1127
|
+
let c = {
|
|
1130
1128
|
attributes: {
|
|
1131
1129
|
title: n,
|
|
1132
1130
|
description: s,
|
|
@@ -1135,7 +1133,7 @@ function Je(e, t, n, s, i = void 0, c = void 0) {
|
|
|
1135
1133
|
}, d = {
|
|
1136
1134
|
items: []
|
|
1137
1135
|
};
|
|
1138
|
-
t && (d.parentId = t), d.items.push(
|
|
1136
|
+
t && (d.parentId = t), d.items.push(c);
|
|
1139
1137
|
let p = {
|
|
1140
1138
|
method: "POST",
|
|
1141
1139
|
headers: {
|
|
@@ -1150,13 +1148,13 @@ function Je(e, t, n, s, i = void 0, c = void 0) {
|
|
|
1150
1148
|
i && i(l);
|
|
1151
1149
|
},
|
|
1152
1150
|
onFailure(l) {
|
|
1153
|
-
|
|
1151
|
+
r && r(l);
|
|
1154
1152
|
}
|
|
1155
1153
|
};
|
|
1156
1154
|
m(a, p);
|
|
1157
1155
|
});
|
|
1158
1156
|
}
|
|
1159
|
-
function
|
|
1157
|
+
function Ee(e, t, n, s, i = void 0, r = void 0) {
|
|
1160
1158
|
return console.log("credentials", e), new Promise((o) => {
|
|
1161
1159
|
`${e.space}`, JSON.stringify({
|
|
1162
1160
|
csrf: {
|
|
@@ -1178,7 +1176,7 @@ function Ge(e, t, n, s, i = void 0, c = void 0) {
|
|
|
1178
1176
|
});
|
|
1179
1177
|
}
|
|
1180
1178
|
//!SECTION
|
|
1181
|
-
function
|
|
1179
|
+
function Ke(e, t = void 0, n = void 0) {
|
|
1182
1180
|
const s = {
|
|
1183
1181
|
base: `${e.space}`,
|
|
1184
1182
|
uri: "/resources/bps/cspaces",
|
|
@@ -1190,57 +1188,57 @@ function Ee(e, t = void 0, n = void 0) {
|
|
|
1190
1188
|
Accept: "application/json,text/javascript,*/*",
|
|
1191
1189
|
"Content-Type": "application/ds-json"
|
|
1192
1190
|
},
|
|
1193
|
-
onComplete(
|
|
1194
|
-
const a = JSON.parse(
|
|
1191
|
+
onComplete(r, o) {
|
|
1192
|
+
const a = JSON.parse(r);
|
|
1195
1193
|
t && t(a, o);
|
|
1196
1194
|
},
|
|
1197
|
-
onFailure(
|
|
1198
|
-
n && n({ response:
|
|
1195
|
+
onFailure(r, o, a) {
|
|
1196
|
+
n && n({ response: r, headers: o, xhr: a });
|
|
1199
1197
|
}
|
|
1200
1198
|
});
|
|
1201
1199
|
}
|
|
1202
|
-
function
|
|
1200
|
+
function Ve(e, t, n, s) {
|
|
1203
1201
|
F(
|
|
1204
1202
|
e.space,
|
|
1205
1203
|
t,
|
|
1206
1204
|
(i) => {
|
|
1207
1205
|
m(i, {
|
|
1208
1206
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1209
|
-
onComplete: (
|
|
1210
|
-
n && n(
|
|
1207
|
+
onComplete: (r) => {
|
|
1208
|
+
n && n(r);
|
|
1211
1209
|
},
|
|
1212
|
-
onFailure: (
|
|
1213
|
-
console.log("error http",
|
|
1210
|
+
onFailure: (r) => {
|
|
1211
|
+
console.log("error http", r), s && s(r);
|
|
1214
1212
|
}
|
|
1215
1213
|
});
|
|
1216
1214
|
}
|
|
1217
1215
|
);
|
|
1218
1216
|
}
|
|
1219
|
-
async function
|
|
1217
|
+
async function Be(e, t, n = void 0, s = void 0) {
|
|
1220
1218
|
return new Promise((i) => {
|
|
1221
|
-
F(e, t, (
|
|
1222
|
-
m(
|
|
1223
|
-
onComplete: (o, a,
|
|
1224
|
-
onFailure: (o, a,
|
|
1225
|
-
s && s(o, a,
|
|
1219
|
+
F(e, t, (r) => {
|
|
1220
|
+
m(r, {
|
|
1221
|
+
onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
|
|
1222
|
+
onFailure: (o, a, c) => {
|
|
1223
|
+
s && s(o, a, c), console.log(o, a?.errormsg);
|
|
1226
1224
|
}
|
|
1227
1225
|
});
|
|
1228
1226
|
});
|
|
1229
1227
|
});
|
|
1230
1228
|
}
|
|
1231
|
-
function
|
|
1232
|
-
const
|
|
1229
|
+
function We(e, t, n, s = void 0, i = void 0) {
|
|
1230
|
+
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1233
1231
|
A(
|
|
1234
1232
|
e,
|
|
1235
1233
|
n,
|
|
1236
1234
|
(o) => {
|
|
1237
|
-
const a = o.data[0].relateddata.files[0].id,
|
|
1238
|
-
|
|
1235
|
+
const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
|
|
1236
|
+
q(
|
|
1239
1237
|
e,
|
|
1240
1238
|
n,
|
|
1241
1239
|
a,
|
|
1242
|
-
c,
|
|
1243
1240
|
r,
|
|
1241
|
+
c,
|
|
1244
1242
|
(d) => {
|
|
1245
1243
|
s && s(d);
|
|
1246
1244
|
},
|
|
@@ -1253,7 +1251,7 @@ function Be(e, t, n, s = void 0, i = void 0) {
|
|
|
1253
1251
|
}
|
|
1254
1252
|
let L, M;
|
|
1255
1253
|
const j = [];
|
|
1256
|
-
async function
|
|
1254
|
+
async function Xe(e, t = void 0, n = void 0) {
|
|
1257
1255
|
e.objID && e.objID !== "" ? A(
|
|
1258
1256
|
e,
|
|
1259
1257
|
(s) => {
|
|
@@ -1272,7 +1270,7 @@ async function We(e, t = void 0, n = void 0) {
|
|
|
1272
1270
|
}
|
|
1273
1271
|
);
|
|
1274
1272
|
}
|
|
1275
|
-
async function
|
|
1273
|
+
async function Ye(e, t = void 0, n = void 0) {
|
|
1276
1274
|
console.log("getDatasByTenant (getDocuments)", e), await D(
|
|
1277
1275
|
e,
|
|
1278
1276
|
(s) => {
|
|
@@ -1284,36 +1282,36 @@ async function Xe(e, t = void 0, n = void 0) {
|
|
|
1284
1282
|
}
|
|
1285
1283
|
);
|
|
1286
1284
|
}
|
|
1287
|
-
function
|
|
1285
|
+
function He(e, t = void 0, n = void 0) {
|
|
1288
1286
|
const s = [];
|
|
1289
1287
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1290
1288
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1291
1289
|
return;
|
|
1292
1290
|
}
|
|
1293
|
-
e.objIds.forEach((i,
|
|
1291
|
+
e.objIds.forEach((i, r) => {
|
|
1294
1292
|
D(
|
|
1295
1293
|
e,
|
|
1296
1294
|
i.objID,
|
|
1297
1295
|
(o) => {
|
|
1298
|
-
s.push({ [i.name]: o }), i.name === "dbProjets" && (L = o.affaires.map((a) => a.objectID),
|
|
1296
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (L = o.affaires.map((a) => a.objectID), te(e, M)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1299
1297
|
}
|
|
1300
1298
|
);
|
|
1301
1299
|
});
|
|
1302
1300
|
}
|
|
1303
|
-
function
|
|
1304
|
-
|
|
1301
|
+
function te(e, t, n = void 0, s = void 0) {
|
|
1302
|
+
Z(
|
|
1305
1303
|
e,
|
|
1306
1304
|
L,
|
|
1307
1305
|
(i) => {
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1306
|
+
const r = [...t];
|
|
1307
|
+
r.find((o) => o.objectID === i.objectId).data = i.data, M = r, j.push(i.data), n && n(j);
|
|
1310
1308
|
},
|
|
1311
1309
|
(i) => {
|
|
1312
1310
|
s && (s(i), console.log(i));
|
|
1313
1311
|
}
|
|
1314
1312
|
);
|
|
1315
1313
|
}
|
|
1316
|
-
const
|
|
1314
|
+
const ne = "FA35FB9B177A280065800EA0000F599C", se = [
|
|
1317
1315
|
"swym",
|
|
1318
1316
|
"3dspace",
|
|
1319
1317
|
"drive",
|
|
@@ -1327,17 +1325,17 @@ const te = "FA35FB9B177A280065800EA0000F599C", ne = [
|
|
|
1327
1325
|
where: "ds6w:where",
|
|
1328
1326
|
who: "ds6w:who",
|
|
1329
1327
|
why: "ds6w:why"
|
|
1330
|
-
},
|
|
1331
|
-
objId:
|
|
1328
|
+
}, ie = {
|
|
1329
|
+
objId: ne,
|
|
1332
1330
|
pred: "who",
|
|
1333
1331
|
order_by: "desc",
|
|
1334
1332
|
tag: "testTag"
|
|
1335
1333
|
};
|
|
1336
|
-
function
|
|
1337
|
-
const { space: i, tenant:
|
|
1334
|
+
function ze(e, t, n = void 0, s = void 0) {
|
|
1335
|
+
const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
|
|
1338
1336
|
uri: "/resources/6w/tags",
|
|
1339
1337
|
otpCTX: "SecurityContext=preferred",
|
|
1340
|
-
optTenant: `tenant=${
|
|
1338
|
+
optTenant: `tenant=${r}`
|
|
1341
1339
|
}, p = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, l = {
|
|
1342
1340
|
tag: [
|
|
1343
1341
|
{
|
|
@@ -1348,7 +1346,7 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1348
1346
|
],
|
|
1349
1347
|
predicate: J[a],
|
|
1350
1348
|
object: {
|
|
1351
|
-
literal:
|
|
1349
|
+
literal: c
|
|
1352
1350
|
}
|
|
1353
1351
|
}
|
|
1354
1352
|
]
|
|
@@ -1364,19 +1362,19 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1364
1362
|
JSON.parse(f);
|
|
1365
1363
|
const u = {};
|
|
1366
1364
|
setTimeout(() => {
|
|
1367
|
-
|
|
1365
|
+
z(
|
|
1368
1366
|
e,
|
|
1369
1367
|
o,
|
|
1370
1368
|
(g) => {
|
|
1371
|
-
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "",
|
|
1372
|
-
u.name = h, u.ext = S, u.createBy =
|
|
1369
|
+
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", y = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1370
|
+
u.name = h, u.ext = S, u.createBy = y, t.info = { ...u }, ae(
|
|
1373
1371
|
e,
|
|
1374
1372
|
t,
|
|
1375
|
-
(
|
|
1376
|
-
n && n(
|
|
1373
|
+
(_) => {
|
|
1374
|
+
n && n(_);
|
|
1377
1375
|
},
|
|
1378
|
-
(
|
|
1379
|
-
s && s(
|
|
1376
|
+
(_) => {
|
|
1377
|
+
s && s(_);
|
|
1380
1378
|
}
|
|
1381
1379
|
);
|
|
1382
1380
|
},
|
|
@@ -1393,19 +1391,19 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1393
1391
|
}
|
|
1394
1392
|
});
|
|
1395
1393
|
}
|
|
1396
|
-
function
|
|
1394
|
+
function ae(e, t, n = void 0, s = void 0) {
|
|
1397
1395
|
console.log("obj ", t);
|
|
1398
|
-
const i = t.info.name,
|
|
1396
|
+
const i = t.info.name, r = {
|
|
1399
1397
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1400
1398
|
uri: "/federated/search"
|
|
1401
|
-
}, o = `${
|
|
1399
|
+
}, o = `${r.baseUrl}${r.uri}`, a = {
|
|
1402
1400
|
"Content-Type": "application/json",
|
|
1403
1401
|
Accept: "application/json,text/javascript,*/*"
|
|
1404
|
-
},
|
|
1402
|
+
}, c = P(), d = {
|
|
1405
1403
|
with_indexing_date: !0,
|
|
1406
1404
|
with_synthesis: !0,
|
|
1407
1405
|
with_nls: !1,
|
|
1408
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1406
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
|
|
1409
1407
|
locale: "fr",
|
|
1410
1408
|
select_predicate: [
|
|
1411
1409
|
"ds6w:label",
|
|
@@ -1443,7 +1441,7 @@ function ie(e, t, n = void 0, s = void 0) {
|
|
|
1443
1441
|
}
|
|
1444
1442
|
},
|
|
1445
1443
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1446
|
-
order_by:
|
|
1444
|
+
order_by: ie.order_by,
|
|
1447
1445
|
order_field: "relevance",
|
|
1448
1446
|
select_snippets: [
|
|
1449
1447
|
"ds6w:snippet",
|
|
@@ -1454,7 +1452,7 @@ function ie(e, t, n = void 0, s = void 0) {
|
|
|
1454
1452
|
],
|
|
1455
1453
|
nresults: 40,
|
|
1456
1454
|
start: "0",
|
|
1457
|
-
source:
|
|
1455
|
+
source: se,
|
|
1458
1456
|
tenant: e.tenant,
|
|
1459
1457
|
login: {
|
|
1460
1458
|
"3dspace": {
|
|
@@ -1476,12 +1474,12 @@ function ie(e, t, n = void 0, s = void 0) {
|
|
|
1476
1474
|
}
|
|
1477
1475
|
});
|
|
1478
1476
|
}
|
|
1479
|
-
function
|
|
1480
|
-
const { objId: i, pred:
|
|
1477
|
+
function qe(e, t, n = void 0, s = void 0) {
|
|
1478
|
+
const { objId: i, pred: r, tag: o } = t, a = {
|
|
1481
1479
|
uri: "/resources/6w/tags",
|
|
1482
1480
|
otpCTX: "SecurityContext=preferred",
|
|
1483
1481
|
optTenant: `tenant=${e.tenant}`
|
|
1484
|
-
},
|
|
1482
|
+
}, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1485
1483
|
tag: [
|
|
1486
1484
|
{
|
|
1487
1485
|
subject: [
|
|
@@ -1489,14 +1487,14 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1489
1487
|
uri: `pid://${i}`
|
|
1490
1488
|
}
|
|
1491
1489
|
],
|
|
1492
|
-
predicate: J[
|
|
1490
|
+
predicate: J[r],
|
|
1493
1491
|
object: {
|
|
1494
1492
|
literal: o
|
|
1495
1493
|
}
|
|
1496
1494
|
}
|
|
1497
1495
|
]
|
|
1498
1496
|
};
|
|
1499
|
-
m(
|
|
1497
|
+
m(c, {
|
|
1500
1498
|
method: "DELETE",
|
|
1501
1499
|
data: JSON.stringify(d),
|
|
1502
1500
|
headers: {
|
|
@@ -1512,20 +1510,20 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1512
1510
|
}
|
|
1513
1511
|
});
|
|
1514
1512
|
}
|
|
1515
|
-
function
|
|
1513
|
+
function Qe(e, t = "", n = void 0, s = void 0) {
|
|
1516
1514
|
const { space: i } = e;
|
|
1517
1515
|
if (t === "")
|
|
1518
1516
|
return;
|
|
1519
|
-
const
|
|
1517
|
+
const r = {
|
|
1520
1518
|
uri: "/resources/v1/modeler/documents"
|
|
1521
1519
|
}, o = {
|
|
1522
1520
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1523
1521
|
Accept: "application/json,text/javascript,*/*"
|
|
1524
|
-
}, a = `${i}${
|
|
1522
|
+
}, a = `${i}${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}`;
|
|
1525
1523
|
m(a, {
|
|
1526
1524
|
method: "POST",
|
|
1527
1525
|
headers: o,
|
|
1528
|
-
data:
|
|
1526
|
+
data: c,
|
|
1529
1527
|
onComplete(d) {
|
|
1530
1528
|
n && n(JSON.parse(d));
|
|
1531
1529
|
},
|
|
@@ -1535,10 +1533,10 @@ function qe(e, t = "", n = void 0, s = void 0) {
|
|
|
1535
1533
|
}
|
|
1536
1534
|
});
|
|
1537
1535
|
}
|
|
1538
|
-
async function
|
|
1536
|
+
async function w(e, t = void 0, n = void 0) {
|
|
1539
1537
|
const s = e.space + "/api/index/tk";
|
|
1540
1538
|
return m(s, {
|
|
1541
|
-
onComplete(i,
|
|
1539
|
+
onComplete(i, r, o) {
|
|
1542
1540
|
const a = JSON.parse(i);
|
|
1543
1541
|
if (t)
|
|
1544
1542
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1548,7 +1546,7 @@ async function C(e, t = void 0, n = void 0) {
|
|
|
1548
1546
|
}
|
|
1549
1547
|
});
|
|
1550
1548
|
}
|
|
1551
|
-
function
|
|
1549
|
+
function Ze(e, t = void 0, n = void 0) {
|
|
1552
1550
|
const s = `${e.space}/api/exalead/whatsnew`, i = {
|
|
1553
1551
|
params: {
|
|
1554
1552
|
community_id: null,
|
|
@@ -1559,11 +1557,11 @@ function Qe(e, t = void 0, n = void 0) {
|
|
|
1559
1557
|
start: 0
|
|
1560
1558
|
}
|
|
1561
1559
|
};
|
|
1562
|
-
|
|
1560
|
+
w(e, (r) => {
|
|
1563
1561
|
m(s, {
|
|
1564
1562
|
method: "POST",
|
|
1565
1563
|
headers: {
|
|
1566
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1564
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1567
1565
|
"Content-type": "application/json;charset=UTF-8",
|
|
1568
1566
|
Accept: "application/json"
|
|
1569
1567
|
},
|
|
@@ -1578,7 +1576,7 @@ function Qe(e, t = void 0, n = void 0) {
|
|
|
1578
1576
|
});
|
|
1579
1577
|
});
|
|
1580
1578
|
}
|
|
1581
|
-
function
|
|
1579
|
+
function et(e, t = void 0, n = void 0) {
|
|
1582
1580
|
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1583
1581
|
params: {
|
|
1584
1582
|
idsToFilterArr: [],
|
|
@@ -1588,19 +1586,19 @@ function Ze(e, t = void 0, n = void 0) {
|
|
|
1588
1586
|
maxNbOfCommonElements: "5"
|
|
1589
1587
|
}
|
|
1590
1588
|
};
|
|
1591
|
-
|
|
1589
|
+
w(e, (r) => {
|
|
1592
1590
|
m(s, {
|
|
1593
1591
|
method: "POST",
|
|
1594
1592
|
headers: {
|
|
1595
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1593
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1596
1594
|
"Content-type": "application/json;charset=UTF-8",
|
|
1597
1595
|
Accept: "application/json"
|
|
1598
1596
|
},
|
|
1599
1597
|
data: JSON.stringify(i),
|
|
1600
1598
|
type: "json",
|
|
1601
1599
|
onComplete(o, a) {
|
|
1602
|
-
const
|
|
1603
|
-
t && t(
|
|
1600
|
+
const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1601
|
+
t && t(c, o);
|
|
1604
1602
|
},
|
|
1605
1603
|
onFailure(o, a) {
|
|
1606
1604
|
n && n(o, a);
|
|
@@ -1608,20 +1606,20 @@ function Ze(e, t = void 0, n = void 0) {
|
|
|
1608
1606
|
});
|
|
1609
1607
|
});
|
|
1610
1608
|
}
|
|
1611
|
-
function
|
|
1609
|
+
function tt(e, t = void 0, n = void 0) {
|
|
1612
1610
|
const s = {
|
|
1613
1611
|
base: e.space,
|
|
1614
1612
|
uri: "/api/community/listmycommunities",
|
|
1615
1613
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1616
1614
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1617
|
-
}, i = `${s.base}${s.uri}${s.limit}${s.page}`,
|
|
1618
|
-
|
|
1615
|
+
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1616
|
+
w(e, (o) => {
|
|
1619
1617
|
m(i, {
|
|
1620
1618
|
method: "GET",
|
|
1621
1619
|
headers: {
|
|
1622
1620
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1623
1621
|
},
|
|
1624
|
-
onComplete(a,
|
|
1622
|
+
onComplete(a, c, d) {
|
|
1625
1623
|
const l = JSON.parse(a).result;
|
|
1626
1624
|
let f = 0;
|
|
1627
1625
|
l.forEach((u) => {
|
|
@@ -1633,32 +1631,32 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1633
1631
|
role: u.role,
|
|
1634
1632
|
access: u.access
|
|
1635
1633
|
};
|
|
1636
|
-
|
|
1634
|
+
oe(
|
|
1637
1635
|
e,
|
|
1638
1636
|
u.id,
|
|
1639
1637
|
(h) => {
|
|
1640
|
-
f++, g.members = h,
|
|
1638
|
+
f++, g.members = h, r.push(g), f === l.length && t && t(r);
|
|
1641
1639
|
},
|
|
1642
1640
|
(h) => n(h)
|
|
1643
1641
|
);
|
|
1644
1642
|
});
|
|
1645
1643
|
},
|
|
1646
|
-
onFailure(a,
|
|
1644
|
+
onFailure(a, c) {
|
|
1647
1645
|
const d = a;
|
|
1648
|
-
d.status =
|
|
1646
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1649
1647
|
}
|
|
1650
1648
|
});
|
|
1651
1649
|
});
|
|
1652
1650
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const i = `${e.space}/api/community/listmembers`,
|
|
1651
|
+
function oe(e, t, n, s) {
|
|
1652
|
+
const i = `${e.space}/api/community/listmembers`, r = {
|
|
1655
1653
|
params: {
|
|
1656
1654
|
page: e.page ? e.page : 1,
|
|
1657
1655
|
limit: e.limit ? e.limit : 50,
|
|
1658
1656
|
community_id: t
|
|
1659
1657
|
}
|
|
1660
1658
|
};
|
|
1661
|
-
|
|
1659
|
+
w(e, (o) => {
|
|
1662
1660
|
m(i, {
|
|
1663
1661
|
method: "POST",
|
|
1664
1662
|
headers: {
|
|
@@ -1666,63 +1664,63 @@ function ae(e, t, n, s) {
|
|
|
1666
1664
|
Accept: "application/json",
|
|
1667
1665
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1668
1666
|
},
|
|
1669
|
-
data: JSON.stringify(
|
|
1667
|
+
data: JSON.stringify(r),
|
|
1670
1668
|
type: "json",
|
|
1671
|
-
onComplete(a,
|
|
1669
|
+
onComplete(a, c, d) {
|
|
1672
1670
|
n && n(a);
|
|
1673
1671
|
},
|
|
1674
|
-
onFailure(a,
|
|
1672
|
+
onFailure(a, c) {
|
|
1675
1673
|
const d = a;
|
|
1676
|
-
d.status =
|
|
1674
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1677
1675
|
}
|
|
1678
1676
|
});
|
|
1679
1677
|
});
|
|
1680
1678
|
}
|
|
1681
|
-
function
|
|
1679
|
+
function nt(e, t = void 0, n = void 0) {
|
|
1682
1680
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1683
1681
|
e.commu_id || (e.commu_id = s);
|
|
1684
1682
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1685
|
-
|
|
1683
|
+
w(e, (r) => {
|
|
1686
1684
|
m(i, {
|
|
1687
1685
|
method: "GET",
|
|
1688
1686
|
headers: {
|
|
1689
1687
|
"Content-type": "application/json;charset=UTF-8",
|
|
1690
1688
|
Accept: "application/json",
|
|
1691
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1689
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1692
1690
|
},
|
|
1693
1691
|
onComplete(o) {
|
|
1694
1692
|
const a = JSON.parse(o);
|
|
1695
1693
|
t && t(a);
|
|
1696
1694
|
},
|
|
1697
1695
|
onFailure(o, a) {
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1696
|
+
const c = o;
|
|
1697
|
+
c.status = a.status, c.response = a.errormsg, n && n(c);
|
|
1700
1698
|
}
|
|
1701
1699
|
});
|
|
1702
1700
|
});
|
|
1703
1701
|
}
|
|
1704
|
-
function
|
|
1705
|
-
const { listAllContacts: i, currentUser:
|
|
1702
|
+
function st(e, t, n = void 0, s = void 0) {
|
|
1703
|
+
const { listAllContacts: i, currentUser: r } = e;
|
|
1706
1704
|
console.log("__listAllContacts", i.hits);
|
|
1707
1705
|
const o = `${e.space}/api/directmessages`, a = {
|
|
1708
|
-
users: [
|
|
1709
|
-
},
|
|
1706
|
+
users: [r.login].concat(t.receipt)
|
|
1707
|
+
}, c = {
|
|
1710
1708
|
id_msg: "",
|
|
1711
1709
|
senderId: e.currentUser.login,
|
|
1712
1710
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1713
|
-
msg:
|
|
1711
|
+
msg: ce(t.msg)
|
|
1714
1712
|
};
|
|
1715
1713
|
let d = !1;
|
|
1716
|
-
|
|
1714
|
+
re(
|
|
1717
1715
|
a.users,
|
|
1718
1716
|
(p) => {
|
|
1719
|
-
p !== void 0 && (
|
|
1717
|
+
p !== void 0 && (c.id_msg = p.id, d = !0, x(e, c));
|
|
1720
1718
|
},
|
|
1721
1719
|
(p) => {
|
|
1722
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p),
|
|
1720
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), c.id_msg = "";
|
|
1723
1721
|
}
|
|
1724
1722
|
), d === !1 && setTimeout(() => {
|
|
1725
|
-
d === !1 &&
|
|
1723
|
+
d === !1 && w(e, (p) => {
|
|
1726
1724
|
m(o, {
|
|
1727
1725
|
method: "POST",
|
|
1728
1726
|
headers: {
|
|
@@ -1734,7 +1732,7 @@ function nt(e, t, n = void 0, s = void 0) {
|
|
|
1734
1732
|
type: "json",
|
|
1735
1733
|
onComplete(l, f, u) {
|
|
1736
1734
|
const g = l;
|
|
1737
|
-
g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g),
|
|
1735
|
+
g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, x(e, c);
|
|
1738
1736
|
},
|
|
1739
1737
|
onFailure(l, f, u) {
|
|
1740
1738
|
const g = l;
|
|
@@ -1744,21 +1742,21 @@ function nt(e, t, n = void 0, s = void 0) {
|
|
|
1744
1742
|
});
|
|
1745
1743
|
}, 500);
|
|
1746
1744
|
}
|
|
1747
|
-
function
|
|
1745
|
+
function re(e, t, n, s) {
|
|
1748
1746
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1749
|
-
|
|
1747
|
+
w(e, (r) => {
|
|
1750
1748
|
m(i, {
|
|
1751
1749
|
method: "GET",
|
|
1752
1750
|
headers: {
|
|
1753
1751
|
Accept: "application/json,text/javascript,*/*",
|
|
1754
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1752
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1755
1753
|
},
|
|
1756
1754
|
onComplete(o) {
|
|
1757
|
-
const a = JSON.parse(o),
|
|
1755
|
+
const a = JSON.parse(o), c = [];
|
|
1758
1756
|
a.result.forEach((l) => {
|
|
1759
|
-
l.users = l.users.sort((f, u) => f.login.localeCompare(u.login)), l.users.length === t.length &&
|
|
1757
|
+
l.users = l.users.sort((f, u) => f.login.localeCompare(u.login)), l.users.length === t.length && c.push(l);
|
|
1760
1758
|
});
|
|
1761
|
-
const d = t.sort(), p =
|
|
1759
|
+
const d = t.sort(), p = c.find((l) => {
|
|
1762
1760
|
const f = [];
|
|
1763
1761
|
return l.users.forEach((u) => {
|
|
1764
1762
|
f.push(u.login);
|
|
@@ -1773,13 +1771,13 @@ function oe(e, t, n, s) {
|
|
|
1773
1771
|
});
|
|
1774
1772
|
});
|
|
1775
1773
|
}
|
|
1776
|
-
function
|
|
1774
|
+
function x(e, t, n = void 0, s = void 0) {
|
|
1777
1775
|
const i = {
|
|
1778
1776
|
base: e.space,
|
|
1779
1777
|
uri: "/api/community",
|
|
1780
1778
|
id_msg: `${t.id_msg}`,
|
|
1781
1779
|
endUri: "/instantmessages"
|
|
1782
|
-
},
|
|
1780
|
+
}, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
|
|
1783
1781
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1784
1782
|
accessState: null,
|
|
1785
1783
|
commentUri: null,
|
|
@@ -1789,8 +1787,8 @@ function P(e, t, n = void 0, s = void 0) {
|
|
|
1789
1787
|
parentCommentUri: null,
|
|
1790
1788
|
richMessage: t.msg
|
|
1791
1789
|
};
|
|
1792
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1793
|
-
m(
|
|
1790
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
|
|
1791
|
+
m(r, {
|
|
1794
1792
|
method: "POST",
|
|
1795
1793
|
headers: {
|
|
1796
1794
|
"Content-Type": "application/json",
|
|
@@ -1799,25 +1797,25 @@ function P(e, t, n = void 0, s = void 0) {
|
|
|
1799
1797
|
},
|
|
1800
1798
|
data: JSON.stringify(o),
|
|
1801
1799
|
type: "json",
|
|
1802
|
-
onComplete(
|
|
1803
|
-
const l =
|
|
1800
|
+
onComplete(c, d, p) {
|
|
1801
|
+
const l = c;
|
|
1804
1802
|
l.status = p.status, l.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", l), n && n(l);
|
|
1805
1803
|
},
|
|
1806
|
-
onFailure(
|
|
1807
|
-
const p =
|
|
1804
|
+
onFailure(c, d) {
|
|
1805
|
+
const p = c;
|
|
1808
1806
|
p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
1809
1807
|
}
|
|
1810
1808
|
});
|
|
1811
1809
|
});
|
|
1812
1810
|
}
|
|
1813
|
-
function
|
|
1811
|
+
function ce(e) {
|
|
1814
1812
|
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1815
1813
|
return `<p>${e} </p>
|
|
1816
1814
|
<br/>
|
|
1817
1815
|
<hr/>
|
|
1818
1816
|
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1819
1817
|
}
|
|
1820
|
-
const
|
|
1818
|
+
const de = {
|
|
1821
1819
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1822
1820
|
// titre du post
|
|
1823
1821
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1827,28 +1825,28 @@ const ce = {
|
|
|
1827
1825
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1828
1826
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1829
1827
|
};
|
|
1830
|
-
function
|
|
1831
|
-
const i = `${e.space}/api/idea/add`,
|
|
1832
|
-
(
|
|
1828
|
+
function it(e, t, n = void 0, s = void 0) {
|
|
1829
|
+
const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1830
|
+
(c) => c.id === t.community_id
|
|
1833
1831
|
), o = e.swymCommunities.find(
|
|
1834
|
-
(
|
|
1832
|
+
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1835
1833
|
), a = {
|
|
1836
1834
|
params: {
|
|
1837
1835
|
title: t.title,
|
|
1838
1836
|
// String, le nom de l'affaire
|
|
1839
|
-
community_id:
|
|
1837
|
+
community_id: r?.id !== void 0 ? r.id : o.id,
|
|
1840
1838
|
// String, l'id de la communauté
|
|
1841
|
-
message:
|
|
1839
|
+
message: pe(t.text_html),
|
|
1842
1840
|
// STRING => le contenue du message doit être au format HTML
|
|
1843
1841
|
published: 1
|
|
1844
1842
|
// 1 publier, 0 non publier
|
|
1845
1843
|
}
|
|
1846
1844
|
};
|
|
1847
|
-
|
|
1845
|
+
w(e, (c) => {
|
|
1848
1846
|
const d = {
|
|
1849
1847
|
"Content-type": "application/json;charset=UTF-8",
|
|
1850
1848
|
Accept: "application/json",
|
|
1851
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1849
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1852
1850
|
};
|
|
1853
1851
|
m(i, {
|
|
1854
1852
|
method: "POST",
|
|
@@ -1866,14 +1864,14 @@ function st(e, t, n = void 0, s = void 0) {
|
|
|
1866
1864
|
});
|
|
1867
1865
|
});
|
|
1868
1866
|
}
|
|
1869
|
-
function
|
|
1870
|
-
const i = `${e.space}/api/idea/delete`,
|
|
1867
|
+
function at(e, t, n = void 0, s = void 0) {
|
|
1868
|
+
const i = `${e.space}/api/idea/delete`, r = {
|
|
1871
1869
|
params: {
|
|
1872
1870
|
community_id: t.community_id,
|
|
1873
1871
|
ideationIds: [t.idee_id]
|
|
1874
1872
|
}
|
|
1875
1873
|
};
|
|
1876
|
-
|
|
1874
|
+
w(e, (o) => {
|
|
1877
1875
|
m(i, {
|
|
1878
1876
|
method: "POST",
|
|
1879
1877
|
headers: {
|
|
@@ -1881,28 +1879,28 @@ function it(e, t, n = void 0, s = void 0) {
|
|
|
1881
1879
|
Accept: "application/json",
|
|
1882
1880
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1883
1881
|
},
|
|
1884
|
-
data: JSON.stringify(
|
|
1882
|
+
data: JSON.stringify(r),
|
|
1885
1883
|
type: "json",
|
|
1886
|
-
onComplete(a,
|
|
1884
|
+
onComplete(a, c, d) {
|
|
1887
1885
|
n && n(a);
|
|
1888
1886
|
},
|
|
1889
|
-
onFailure(a,
|
|
1887
|
+
onFailure(a, c, d) {
|
|
1890
1888
|
const p = a;
|
|
1891
|
-
p.status =
|
|
1889
|
+
p.status = c.status, p.response = c.errormsg, s && s(p);
|
|
1892
1890
|
}
|
|
1893
1891
|
});
|
|
1894
1892
|
});
|
|
1895
1893
|
}
|
|
1896
|
-
function
|
|
1894
|
+
function ot(e, t = "", n = void 0, s = void 0) {
|
|
1897
1895
|
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1898
1896
|
t === "" && (t = i);
|
|
1899
|
-
const
|
|
1897
|
+
const r = `${e.space}/api/idea/get`, o = {
|
|
1900
1898
|
params: {
|
|
1901
1899
|
id: t
|
|
1902
1900
|
}
|
|
1903
1901
|
};
|
|
1904
|
-
|
|
1905
|
-
m(
|
|
1902
|
+
w(e, (a) => {
|
|
1903
|
+
m(r, {
|
|
1906
1904
|
method: "POST",
|
|
1907
1905
|
headers: {
|
|
1908
1906
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1911,41 +1909,41 @@ function at(e, t = "", n = void 0, s = void 0) {
|
|
|
1911
1909
|
},
|
|
1912
1910
|
data: JSON.stringify(o),
|
|
1913
1911
|
type: "json",
|
|
1914
|
-
onComplete(
|
|
1915
|
-
const d =
|
|
1912
|
+
onComplete(c) {
|
|
1913
|
+
const d = c;
|
|
1916
1914
|
d.msg = d.result.message, n && n(d);
|
|
1917
1915
|
},
|
|
1918
|
-
onFailure(
|
|
1919
|
-
const d =
|
|
1916
|
+
onFailure(c) {
|
|
1917
|
+
const d = c;
|
|
1920
1918
|
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1921
1919
|
}
|
|
1922
1920
|
});
|
|
1923
1921
|
});
|
|
1924
1922
|
}
|
|
1925
|
-
function
|
|
1923
|
+
function rt(e, t = de, n = void 0, s = void 0) {
|
|
1926
1924
|
const i = {
|
|
1927
1925
|
uri: "/api/idea/list",
|
|
1928
1926
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1929
1927
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1930
|
-
},
|
|
1931
|
-
|
|
1932
|
-
m(
|
|
1928
|
+
}, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
|
|
1929
|
+
w(e, (o) => {
|
|
1930
|
+
m(r, {
|
|
1933
1931
|
method: "GET",
|
|
1934
1932
|
headers: {
|
|
1935
1933
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1936
1934
|
},
|
|
1937
1935
|
onComplete(a) {
|
|
1938
|
-
const
|
|
1939
|
-
n && n(
|
|
1936
|
+
const c = JSON.parse(a);
|
|
1937
|
+
n && n(c);
|
|
1940
1938
|
},
|
|
1941
|
-
onFailure(a,
|
|
1939
|
+
onFailure(a, c) {
|
|
1942
1940
|
const d = a;
|
|
1943
|
-
d.status =
|
|
1941
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1944
1942
|
}
|
|
1945
1943
|
});
|
|
1946
1944
|
});
|
|
1947
1945
|
}
|
|
1948
|
-
function
|
|
1946
|
+
function pe(e) {
|
|
1949
1947
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1950
1948
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1951
1949
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -2020,34 +2018,34 @@ function de(e) {
|
|
|
2020
2018
|
<p>
|
|
2021
2019
|
</p>` : e;
|
|
2022
2020
|
}
|
|
2023
|
-
function
|
|
2021
|
+
function ct(e, t = void 0, n = void 0) {
|
|
2024
2022
|
const s = e.space + "/api/user/getcurrent/";
|
|
2025
|
-
|
|
2023
|
+
w(e, (i) => {
|
|
2026
2024
|
m(s, {
|
|
2027
2025
|
method: "GET",
|
|
2028
2026
|
headers: {
|
|
2029
2027
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
2030
2028
|
},
|
|
2031
|
-
onComplete(
|
|
2032
|
-
const
|
|
2033
|
-
t && t(
|
|
2029
|
+
onComplete(r, o, a) {
|
|
2030
|
+
const c = JSON.parse(r);
|
|
2031
|
+
t && t(c.result);
|
|
2034
2032
|
},
|
|
2035
|
-
onFailure(
|
|
2036
|
-
const
|
|
2037
|
-
n && n(
|
|
2033
|
+
onFailure(r, o, a) {
|
|
2034
|
+
const c = { erreur: JSON.parse(r), headers: o, xhr: a };
|
|
2035
|
+
n && n(c);
|
|
2038
2036
|
}
|
|
2039
2037
|
});
|
|
2040
2038
|
});
|
|
2041
2039
|
}
|
|
2042
|
-
function
|
|
2040
|
+
function dt(e, t, n = void 0, s = void 0) {
|
|
2043
2041
|
const i = e.space + "/api/user/find/login/" + t;
|
|
2044
|
-
|
|
2042
|
+
w(
|
|
2045
2043
|
e,
|
|
2046
|
-
(
|
|
2044
|
+
(r) => {
|
|
2047
2045
|
m(i, {
|
|
2048
2046
|
method: "GET",
|
|
2049
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
2050
|
-
onComplete(o, a,
|
|
2047
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
2048
|
+
onComplete(o, a, c) {
|
|
2051
2049
|
const d = JSON.parse(o);
|
|
2052
2050
|
n && n(d);
|
|
2053
2051
|
},
|
|
@@ -2059,22 +2057,22 @@ function ct(e, t, n = void 0, s = void 0) {
|
|
|
2059
2057
|
s
|
|
2060
2058
|
);
|
|
2061
2059
|
}
|
|
2062
|
-
function
|
|
2060
|
+
function pt(e, t = void 0, n = void 0) {
|
|
2063
2061
|
e.tenant && b(e, (s) => {
|
|
2064
2062
|
console.log("serviceUrls", s);
|
|
2065
|
-
const i = s.services.find((
|
|
2063
|
+
const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2066
2064
|
return t && t(i), i;
|
|
2067
2065
|
});
|
|
2068
2066
|
}
|
|
2069
|
-
function
|
|
2067
|
+
function lt(e, t = void 0, n = void 0) {
|
|
2070
2068
|
e.tenant && b(e, (s) => {
|
|
2071
2069
|
console.log("serviceUrls", s);
|
|
2072
|
-
const i = s.services.find((a) => a.id === "3dpassport")?.url,
|
|
2070
|
+
const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
|
|
2073
2071
|
m(o, {
|
|
2074
2072
|
async onComplete(a) {
|
|
2075
2073
|
console.log("response", a);
|
|
2076
|
-
const
|
|
2077
|
-
await fetch(
|
|
2074
|
+
const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
|
|
2075
|
+
await fetch(c, {
|
|
2078
2076
|
method: "POST"
|
|
2079
2077
|
}).then((d) => d.json()).then(async (d) => {
|
|
2080
2078
|
t && t(d?.token);
|
|
@@ -2086,34 +2084,34 @@ function pt(e, t = void 0, n = void 0) {
|
|
|
2086
2084
|
});
|
|
2087
2085
|
});
|
|
2088
2086
|
}
|
|
2089
|
-
async function
|
|
2087
|
+
async function ut(e, t, n = void 0, s = void 0) {
|
|
2090
2088
|
e.tenant && b(e, (i) => {
|
|
2091
|
-
const o = `${i.services.find((
|
|
2089
|
+
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
|
|
2092
2090
|
fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
|
|
2093
2091
|
method: "POST"
|
|
2094
|
-
}).then((
|
|
2095
|
-
n && n(
|
|
2096
|
-
}).catch((
|
|
2097
|
-
s && s(
|
|
2092
|
+
}).then((c) => c.json()).then((c) => {
|
|
2093
|
+
n && n(c);
|
|
2094
|
+
}).catch((c) => {
|
|
2095
|
+
s && s(c);
|
|
2098
2096
|
});
|
|
2099
2097
|
});
|
|
2100
2098
|
}
|
|
2101
|
-
async function
|
|
2099
|
+
async function ft(e, t, n = void 0, s = void 0) {
|
|
2102
2100
|
e.tenant && b(e, (i) => {
|
|
2103
|
-
const o = `${i.services.find((
|
|
2101
|
+
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
|
|
2104
2102
|
fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
|
|
2105
2103
|
method: "GET"
|
|
2106
|
-
}).then((
|
|
2107
|
-
n && n(
|
|
2108
|
-
}).catch((
|
|
2109
|
-
s && s(
|
|
2104
|
+
}).then((c) => c.json()).then((c) => {
|
|
2105
|
+
n && n(c);
|
|
2106
|
+
}).catch((c) => {
|
|
2107
|
+
s && s(c);
|
|
2110
2108
|
});
|
|
2111
2109
|
});
|
|
2112
2110
|
}
|
|
2113
|
-
async function
|
|
2111
|
+
async function mt(e, t, n, s = void 0, i = void 0) {
|
|
2114
2112
|
if (e.tenant) {
|
|
2115
|
-
const
|
|
2116
|
-
fetch(`https://api.uixhome.fr/${
|
|
2113
|
+
const r = e.tenant.toLowerCase();
|
|
2114
|
+
fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${n}?t=${t}`, {
|
|
2117
2115
|
method: "POST"
|
|
2118
2116
|
}).then((o) => o.json()).then((o) => {
|
|
2119
2117
|
s && s(o);
|
|
@@ -2122,10 +2120,10 @@ async function ft(e, t, n, s = void 0, i = void 0) {
|
|
|
2122
2120
|
});
|
|
2123
2121
|
}
|
|
2124
2122
|
}
|
|
2125
|
-
async function
|
|
2123
|
+
async function gt(e, t, n, s = void 0, i = void 0) {
|
|
2126
2124
|
if (e.tenant) {
|
|
2127
|
-
const
|
|
2128
|
-
fetch(`https://api.uixhome.fr/${
|
|
2125
|
+
const r = e.tenant.toLowerCase();
|
|
2126
|
+
fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${n}/rows/?t=${t}`, {
|
|
2129
2127
|
method: "POST"
|
|
2130
2128
|
}).then((o) => o.json()).then((o) => {
|
|
2131
2129
|
s && s(o);
|
|
@@ -2134,46 +2132,46 @@ async function mt(e, t, n, s = void 0, i = void 0) {
|
|
|
2134
2132
|
});
|
|
2135
2133
|
}
|
|
2136
2134
|
}
|
|
2137
|
-
async function
|
|
2135
|
+
async function ht(e, t, n, s, i = void 0, r = void 0) {
|
|
2138
2136
|
e.tenant && b(e, (o) => {
|
|
2139
|
-
o.services.find((
|
|
2137
|
+
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2140
2138
|
const a = e.tenant.toLowerCase();
|
|
2141
2139
|
fetch(
|
|
2142
2140
|
`https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
|
|
2143
2141
|
{
|
|
2144
2142
|
method: "POST"
|
|
2145
2143
|
}
|
|
2146
|
-
).then((
|
|
2147
|
-
i && i(
|
|
2148
|
-
}).catch((
|
|
2149
|
-
|
|
2144
|
+
).then((c) => c.json()).then((c) => {
|
|
2145
|
+
i && i(c);
|
|
2146
|
+
}).catch((c) => {
|
|
2147
|
+
r && r(c);
|
|
2150
2148
|
});
|
|
2151
2149
|
});
|
|
2152
2150
|
}
|
|
2153
|
-
async function
|
|
2151
|
+
async function St(e, t, n, s, i, r = void 0, o = void 0) {
|
|
2154
2152
|
e.tenant && b(e, (a) => {
|
|
2155
2153
|
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2156
|
-
const
|
|
2154
|
+
const c = e.tenant.toLowerCase();
|
|
2157
2155
|
fetch(
|
|
2158
|
-
`https://api.uixhome.fr/${
|
|
2156
|
+
`https://api.uixhome.fr/${c}/iterop/businesstable/patch/${n}/rows?t=${t}&rowsToAdd=${s}&rowsToRemove=${i}`,
|
|
2159
2157
|
{
|
|
2160
2158
|
method: "POST"
|
|
2161
2159
|
}
|
|
2162
2160
|
).then((d) => d.json()).then((d) => {
|
|
2163
|
-
|
|
2161
|
+
r && r(d);
|
|
2164
2162
|
}).catch((d) => {
|
|
2165
2163
|
o && o(d);
|
|
2166
2164
|
});
|
|
2167
2165
|
});
|
|
2168
2166
|
}
|
|
2169
|
-
function
|
|
2167
|
+
function yt(e) {
|
|
2170
2168
|
const t = "Hello " + e;
|
|
2171
2169
|
return console.log(t), t;
|
|
2172
2170
|
}
|
|
2173
2171
|
function _t(e, t = void 0, n = void 0) {
|
|
2174
2172
|
return console.log("credentials", e), new Promise((s) => {
|
|
2175
2173
|
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
2176
|
-
const o =
|
|
2174
|
+
const o = V();
|
|
2177
2175
|
console.log("platformeInfo", o);
|
|
2178
2176
|
}
|
|
2179
2177
|
N(
|
|
@@ -2187,14 +2185,14 @@ function _t(e, t = void 0, n = void 0) {
|
|
|
2187
2185
|
},
|
|
2188
2186
|
!0
|
|
2189
2187
|
);
|
|
2190
|
-
const i = v.now().ts,
|
|
2191
|
-
m(
|
|
2188
|
+
const i = v.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2189
|
+
m(r, {
|
|
2192
2190
|
onComplete(o) {
|
|
2193
2191
|
if (Array.isArray(JSON.parse(o))) {
|
|
2194
2192
|
const a = JSON.parse(o);
|
|
2195
2193
|
console.log("serviceId=3dsearch", a);
|
|
2196
|
-
const
|
|
2197
|
-
m(
|
|
2194
|
+
const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
2195
|
+
m(c, {
|
|
2198
2196
|
method: "POST",
|
|
2199
2197
|
headers: {
|
|
2200
2198
|
Accept: "application/json",
|
|
@@ -2250,87 +2248,87 @@ function _t(e, t = void 0, n = void 0) {
|
|
|
2250
2248
|
});
|
|
2251
2249
|
}
|
|
2252
2250
|
export {
|
|
2253
|
-
|
|
2251
|
+
P as UUID,
|
|
2254
2252
|
_t as _3DSearch_usersGroup,
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2253
|
+
Re as _3DSpace_Create_Doc,
|
|
2254
|
+
Ee as _3DSpace_bookmark_addSubsciptions,
|
|
2255
|
+
Ge as _3DSpace_bookmark_newWorkspace,
|
|
2258
2256
|
T as _3DSpace_csrf,
|
|
2259
2257
|
D as _3DSpace_download_doc,
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2258
|
+
Z as _3DSpace_download_multidoc,
|
|
2259
|
+
q as _3DSpace_file_update,
|
|
2260
|
+
Q as _3DSpace_file_update_csr,
|
|
2261
|
+
xe as _3DSpace_file_url_csr,
|
|
2264
2262
|
A as _3DSpace_get_csrf,
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2263
|
+
z as _3DSpace_get_docInfo,
|
|
2264
|
+
ee as _3DSpace_get_downloadTicket_multidoc,
|
|
2265
|
+
je as _3DSpace_get_multiDocInfo,
|
|
2268
2266
|
N as _3DSpace_get_securityContexts,
|
|
2269
2267
|
F as _3DSpace_get_ticket,
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2268
|
+
Je as _3DSpace_lifecycle_changeRevision,
|
|
2269
|
+
De as _3DSpace_lifecycle_changeState,
|
|
2270
|
+
Le as _3DSpace_lifecycle_getGraph,
|
|
2271
|
+
Me as _3DSpace_lifecycle_getNextRevision,
|
|
2272
|
+
Pe as _3DSpace_lifecycle_getNextStates,
|
|
2273
|
+
st as _3DSwym_buildDirectMessage,
|
|
2274
|
+
at as _3DSwym_deleteIdea,
|
|
2275
|
+
re as _3DSwym_findCommunityToInstantMSG,
|
|
2276
|
+
tt as _3DSwym_getAllCommunities,
|
|
2277
|
+
Ze as _3DSwym_getAllNews,
|
|
2278
|
+
et as _3DSwym_getFamiliarPeople,
|
|
2279
|
+
nt as _3DSwym_getIdeaStatusMaturity,
|
|
2280
|
+
oe as _3DSwym_getMembersCommunity,
|
|
2281
|
+
ot as _3DSwym_getSWYMIdea,
|
|
2282
|
+
rt as _3DSwym_get_AllSWYMIdeas,
|
|
2283
|
+
ct as _3DSwym_get_currentUser,
|
|
2284
|
+
dt as _3DSwym_get_findUser,
|
|
2285
|
+
w as _3DSwym_get_version,
|
|
2286
|
+
it as _3DSwym_postIdea,
|
|
2287
|
+
x as _3DSwym_sendMessageData,
|
|
2288
|
+
Ne as _AppMngt_get_info_user,
|
|
2289
|
+
be as _AppMngt_get_users,
|
|
2290
|
+
St as _Iterop_AddOrRemoveRows,
|
|
2291
|
+
lt as _Iterop_Auth_CAS,
|
|
2292
|
+
ut as _Iterop_ListUsers,
|
|
2293
|
+
ft as _Iterop_getAllBusinessTables,
|
|
2294
|
+
mt as _Iterop_getOneBusinessTable,
|
|
2295
|
+
gt as _Iterop_getOneBusinessTableRows,
|
|
2296
|
+
ht as _Iterop_runProcess,
|
|
2297
|
+
V as _getPlateformInfos,
|
|
2298
|
+
Ce as _getPlatformServices,
|
|
2301
2299
|
b as _getServiceUrl,
|
|
2302
|
-
|
|
2303
|
-
|
|
2300
|
+
Te as _getServiceUrl_3DPassport,
|
|
2301
|
+
pt as _getServiceUrl_Iterop,
|
|
2304
2302
|
m as _httpCallAuthenticated,
|
|
2305
|
-
|
|
2306
|
-
|
|
2303
|
+
ye as _setDraggable,
|
|
2304
|
+
we as _setDroppable,
|
|
2307
2305
|
_e as _setupTagger,
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2306
|
+
ze as addTagToDoc,
|
|
2307
|
+
Oe as compass_getListAdditionalApps,
|
|
2308
|
+
K as couleurs,
|
|
2309
|
+
$e as createUserGroups,
|
|
2310
|
+
te as dataMixing,
|
|
2311
|
+
Ae as deleteUserGroups,
|
|
2312
|
+
ge as findAdresse,
|
|
2313
|
+
Ke as getAllContextSecurity,
|
|
2314
|
+
W as getCSRFToken,
|
|
2315
|
+
me as getCommunes,
|
|
2316
|
+
ve as getComplementUG,
|
|
2317
|
+
Ve as getDataFrom3DSpace,
|
|
2318
|
+
he as getDataFromGouvFr,
|
|
2319
|
+
Ye as getDatasByTenant,
|
|
2320
|
+
He as getDatasFrom3DSpace,
|
|
2321
|
+
Be as getDownloadDocument,
|
|
2322
|
+
Qe as getInfoDocTags,
|
|
2323
|
+
Ie as getUserGroupsList,
|
|
2324
|
+
B as getUsersGroupRules,
|
|
2325
|
+
Xe as get_3DSpace_csrf,
|
|
2326
|
+
ke as patchUserGroups,
|
|
2327
|
+
Ue as patchUserGroupsControl,
|
|
2328
|
+
We as pushDataIn3DSpace,
|
|
2329
|
+
Fe as readUserGroupControl,
|
|
2330
|
+
qe as removeTagToDoc,
|
|
2331
|
+
yt as sayHello,
|
|
2332
|
+
Se as updateEvent
|
|
2335
2333
|
};
|
|
2336
2334
|
//# sourceMappingURL=wb3Api.js.map
|