@beam3_dev/api_module 0.0.352 → 0.0.356
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 +461 -461
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +7 -7
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -35,19 +35,19 @@ const z = {
|
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
37
|
async function xe(e, n = void 0, t = void 0) {
|
|
38
|
-
const
|
|
38
|
+
const s = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
|
-
"https://apicarto.ign.fr/api/codes-postaux/communes/" +
|
|
40
|
+
"https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
|
|
41
41
|
{
|
|
42
42
|
method: "GET",
|
|
43
43
|
headers: {
|
|
44
44
|
Accept: "application/json"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
).then((
|
|
48
|
-
n && n(
|
|
49
|
-
}).catch((
|
|
50
|
-
t && t(
|
|
47
|
+
).then((i) => i.json()).then((i) => {
|
|
48
|
+
n && n(i);
|
|
49
|
+
}).catch((i) => {
|
|
50
|
+
t && t(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
async function Ue(e, n = void 0, t = void 0) {
|
|
@@ -59,17 +59,17 @@ async function Ue(e, n = void 0, t = void 0) {
|
|
|
59
59
|
Accept: "application/json"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
).then((
|
|
63
|
-
n && n(
|
|
64
|
-
}).catch((
|
|
65
|
-
t && t(
|
|
62
|
+
).then((s) => s.json()).then((s) => {
|
|
63
|
+
n && n(s);
|
|
64
|
+
}).catch((s) => {
|
|
65
|
+
t && t(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function Re(e, n = z) {
|
|
69
69
|
let t = T.now().year;
|
|
70
|
-
const
|
|
70
|
+
const s = e, i = [], r = (a) => {
|
|
71
71
|
for (let c in a)
|
|
72
|
-
|
|
72
|
+
i.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = t; a <= t + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -84,10 +84,10 @@ async function Re(e, n = z) {
|
|
|
84
84
|
r(c);
|
|
85
85
|
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
90
|
-
for (let c of
|
|
89
|
+
} : s;
|
|
90
|
+
for (let c of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
92
|
(u) => u.start === T.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
@@ -101,13 +101,13 @@ async function Re(e, n = z) {
|
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
103
|
function H(e, n, t) {
|
|
104
|
-
const { credentials:
|
|
105
|
-
for (let c = 0; c <
|
|
106
|
-
const d =
|
|
104
|
+
const { credentials: s, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
|
|
105
|
+
for (let c = 0; c < i.length; c += r) {
|
|
106
|
+
const d = i.slice(c, c + r);
|
|
107
107
|
a.push(d);
|
|
108
108
|
}
|
|
109
109
|
Q(
|
|
110
|
-
{ credentials:
|
|
110
|
+
{ credentials: s, chunks: a, initLoop: 0, fn: o },
|
|
111
111
|
(c) => {
|
|
112
112
|
n && n(c);
|
|
113
113
|
},
|
|
@@ -117,12 +117,12 @@ function H(e, n, t) {
|
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
119
|
function Q(e, n, t) {
|
|
120
|
-
const { credentials:
|
|
120
|
+
const { credentials: s, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
|
|
121
121
|
o(
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
s,
|
|
123
|
+
i[c],
|
|
124
124
|
() => {
|
|
125
|
-
c++, c <
|
|
125
|
+
c++, c < i.length && a(c);
|
|
126
126
|
},
|
|
127
127
|
(d) => {
|
|
128
128
|
n && n(d);
|
|
@@ -135,8 +135,8 @@ function Q(e, n, t) {
|
|
|
135
135
|
a(r);
|
|
136
136
|
}
|
|
137
137
|
async function Fe(e, n, t = !0) {
|
|
138
|
-
const
|
|
139
|
-
return
|
|
138
|
+
const s = e.events.findIndex((i) => i.uuid === n.uuid);
|
|
139
|
+
return s === -1 ? e.events.push(n) : t ? e.events[s] = n : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
|
|
140
140
|
}
|
|
141
141
|
function m(e, n) {
|
|
142
142
|
$(["DS/WAFData/WAFData"], (t) => {
|
|
@@ -144,8 +144,8 @@ function m(e, n) {
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
function Ne(e, n, t) {
|
|
147
|
-
$(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
148
|
-
|
|
147
|
+
$(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
148
|
+
s.draggable(e, {
|
|
149
149
|
data: n,
|
|
150
150
|
start: t
|
|
151
151
|
});
|
|
@@ -153,11 +153,11 @@ function Ne(e, n, t) {
|
|
|
153
153
|
}
|
|
154
154
|
function Ie(e, n = void 0) {
|
|
155
155
|
$(["DS/TagNavigatorProxy/TagNavigatorProxy"], (t) => {
|
|
156
|
-
let
|
|
157
|
-
|
|
156
|
+
let s;
|
|
157
|
+
s === void 0 && (s = t.createProxy({
|
|
158
158
|
widgetId: L.id,
|
|
159
159
|
filteringMode: "WithFilteringServices"
|
|
160
|
-
}), n !== void 0 &&
|
|
160
|
+
}), n !== void 0 && s.addEvent("onFilterSubjectsChange", n)), s.setSubjectsTags(e);
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
function ke(e, n) {
|
|
@@ -170,9 +170,9 @@ function ke(e, n) {
|
|
|
170
170
|
async function je(e, n = void 0, t = void 0) {
|
|
171
171
|
await $(
|
|
172
172
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
173
|
-
(
|
|
173
|
+
(s) => {
|
|
174
174
|
(!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), n && n(
|
|
175
|
-
|
|
175
|
+
s.getPlatformServices({
|
|
176
176
|
platformId: e,
|
|
177
177
|
onComplete: n,
|
|
178
178
|
onFailure: t
|
|
@@ -184,88 +184,88 @@ async function je(e, n = void 0, t = void 0) {
|
|
|
184
184
|
function Z() {
|
|
185
185
|
let e = {};
|
|
186
186
|
return $(["DS/PlatformAPI/PlatformAPI"], (n) => {
|
|
187
|
-
const t = n.getTenant(),
|
|
187
|
+
const t = n.getTenant(), s = n.getUser(), i = n.getAllApplicationConfigurations(), r = n.getApplicationConfiguration(
|
|
188
188
|
"com.3ds.wp.passport.cors"
|
|
189
189
|
);
|
|
190
190
|
e = {
|
|
191
191
|
tenant: t,
|
|
192
|
-
user:
|
|
193
|
-
appsConfiguration:
|
|
192
|
+
user: s,
|
|
193
|
+
appsConfiguration: i,
|
|
194
194
|
appConf: r
|
|
195
195
|
};
|
|
196
196
|
}), e;
|
|
197
197
|
}
|
|
198
198
|
function ve(e, n = void 0, t = void 0) {
|
|
199
199
|
if (e.tenant) {
|
|
200
|
-
const
|
|
201
|
-
m(
|
|
202
|
-
onComplete(
|
|
203
|
-
const r = typeof
|
|
200
|
+
const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
|
|
201
|
+
m(s, {
|
|
202
|
+
onComplete(i) {
|
|
203
|
+
const r = typeof i == "string" ? JSON.parse(i) : i;
|
|
204
204
|
r && "fields" in r ? n && n(r.fields) : t && t("_getMe return not find properties fields");
|
|
205
205
|
},
|
|
206
|
-
onFailure(
|
|
207
|
-
t && t("_getMe return error",
|
|
206
|
+
onFailure(i) {
|
|
207
|
+
t && t("_getMe return error", i);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
function J(e, n = void 0, t = void 0) {
|
|
213
213
|
if (e.tenant) {
|
|
214
|
-
const
|
|
215
|
-
m(
|
|
216
|
-
onComplete(
|
|
217
|
-
const r = typeof
|
|
214
|
+
const s = `https://${e.tenant.toLowerCase()}-eu1-compass.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?platform=${e.tenant.toUpperCase()}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
215
|
+
m(s, {
|
|
216
|
+
onComplete(i) {
|
|
217
|
+
const r = typeof i == "string" ? JSON.parse(i) : i;
|
|
218
218
|
if (r && "platforms" in r) {
|
|
219
219
|
const o = r.platforms.find((a) => a.id === e.tenant.toUpperCase());
|
|
220
220
|
n && o ? n(o) : t && t("_getServiceUrl return listServiceUrl = undefined");
|
|
221
221
|
} else
|
|
222
222
|
t && t("_getServiceUrl return oResponse = undefined");
|
|
223
223
|
},
|
|
224
|
-
onFailure(
|
|
225
|
-
t && t(
|
|
224
|
+
onFailure(i) {
|
|
225
|
+
t && t(i);
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
function De(e, n = void 0, t = void 0) {
|
|
231
231
|
if (e.tenant) {
|
|
232
|
-
const
|
|
233
|
-
m(
|
|
234
|
-
onComplete(
|
|
235
|
-
const r = JSON.parse(
|
|
232
|
+
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
233
|
+
m(s, {
|
|
234
|
+
onComplete(i) {
|
|
235
|
+
const r = JSON.parse(i);
|
|
236
236
|
if (Array.isArray(r) && r.length > 0) {
|
|
237
237
|
const o = `${r[0].services[0].url}`;
|
|
238
238
|
n && n(o);
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
|
-
onFailure(
|
|
242
|
-
t && t(
|
|
241
|
+
onFailure(i) {
|
|
242
|
+
t && t(i);
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
function Ae(e, n = void 0, t = void 0) {
|
|
248
248
|
if (e.tenant) {
|
|
249
|
-
const
|
|
250
|
-
m(
|
|
249
|
+
const s = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/instance?id=${e.tenant.toLowerCase()}`;
|
|
250
|
+
m(s, {
|
|
251
251
|
type: "json",
|
|
252
|
-
onComplete(
|
|
253
|
-
n && n(
|
|
252
|
+
onComplete(i) {
|
|
253
|
+
n && n(i);
|
|
254
254
|
},
|
|
255
|
-
onFailure(
|
|
256
|
-
t && t(
|
|
255
|
+
onFailure(i) {
|
|
256
|
+
t && t(i);
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
function Pe(e, n, t) {
|
|
262
|
-
const
|
|
262
|
+
const s = {
|
|
263
263
|
base: `${e.space}`,
|
|
264
264
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
265
265
|
option: `?filter=${e.tenant}`
|
|
266
266
|
// facultatif
|
|
267
|
-
},
|
|
268
|
-
m(
|
|
267
|
+
}, i = `${s.base}${s.uri}${s.option}`;
|
|
268
|
+
m(i, {
|
|
269
269
|
method: "GET",
|
|
270
270
|
headers: {
|
|
271
271
|
"Content-Type": "application/json",
|
|
@@ -285,28 +285,28 @@ function Pe(e, n, t) {
|
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
287
|
function Le(e, n = void 0, t = void 0) {
|
|
288
|
-
let
|
|
289
|
-
m(
|
|
290
|
-
onComplete(
|
|
291
|
-
const a = JSON.parse(
|
|
288
|
+
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
289
|
+
m(s, {
|
|
290
|
+
onComplete(i, r, o) {
|
|
291
|
+
const a = JSON.parse(i);
|
|
292
292
|
console.log("_AppMngt_get_users => ", a), n && n(a);
|
|
293
293
|
},
|
|
294
|
-
onFailure(
|
|
295
|
-
const o =
|
|
294
|
+
onFailure(i, r) {
|
|
295
|
+
const o = i;
|
|
296
296
|
o.msg = r.errormsg, o.errCode = r.errorcode, t && t(o);
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
function Je(e, n, t = void 0,
|
|
301
|
-
let
|
|
302
|
-
m(
|
|
300
|
+
function Je(e, n, t = void 0, s = void 0) {
|
|
301
|
+
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${n}`;
|
|
302
|
+
m(i, {
|
|
303
303
|
onComplete(r, o, a) {
|
|
304
304
|
const c = JSON.parse(r);
|
|
305
305
|
t && t(c);
|
|
306
306
|
},
|
|
307
307
|
onFailure(r, o) {
|
|
308
308
|
const a = r;
|
|
309
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
309
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
}
|
|
@@ -314,8 +314,8 @@ const R = {
|
|
|
314
314
|
"Content-Type": "application/json",
|
|
315
315
|
Accept: "application/json,text/javascript,*/*"
|
|
316
316
|
};
|
|
317
|
-
function Me(e, n, t = void 0,
|
|
318
|
-
const { space:
|
|
317
|
+
function Me(e, n, t = void 0, s = void 0) {
|
|
318
|
+
const { space: i, currentUser: r } = e, a = `${i}${{
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
320
320
|
}.URIUGr}`, c = {
|
|
321
321
|
groups: [
|
|
@@ -339,12 +339,12 @@ function Me(e, n, t = void 0, i = void 0) {
|
|
|
339
339
|
onFailure(d, u) {
|
|
340
340
|
console.log(d);
|
|
341
341
|
const p = d;
|
|
342
|
-
p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p),
|
|
342
|
+
p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
function Ge(e, n, t = void 0,
|
|
347
|
-
const { space:
|
|
346
|
+
function Ge(e, n, t = void 0, s = void 0) {
|
|
347
|
+
const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${n}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
|
|
348
348
|
m(d, {
|
|
349
349
|
opts: {
|
|
350
350
|
method: "GET",
|
|
@@ -358,12 +358,12 @@ function Ge(e, n, t = void 0, i = void 0) {
|
|
|
358
358
|
},
|
|
359
359
|
onFailure(f, l) {
|
|
360
360
|
const g = f;
|
|
361
|
-
g.msg = l.errormsg, g.errCode = l.errorcode,
|
|
361
|
+
g.msg = l.errormsg, g.errCode = l.errorcode, s && s(g);
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
function ee(e, n = void 0, t = void 0) {
|
|
366
|
-
const { _usersgroup:
|
|
366
|
+
const { _usersgroup: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
|
|
367
367
|
method: "GET",
|
|
368
368
|
Accept: "application/json,*/*,test/javascript"
|
|
369
369
|
}, d = `${r}${o}${a}`;
|
|
@@ -379,9 +379,9 @@ function ee(e, n = void 0, t = void 0) {
|
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
function Be(e, n = void 0, t = void 0) {
|
|
382
|
-
const { _usersgroup:
|
|
382
|
+
const { _usersgroup: s, currentUser: i, numMax: r } = e;
|
|
383
383
|
r || (r = 50);
|
|
384
|
-
const o = "/3drdfpersist/resources/v1/usersgroup", a = "?select=uri,title,owner,members", c = `&top=${r}`, d = `${
|
|
384
|
+
const o = "/3drdfpersist/resources/v1/usersgroup", a = "?select=uri,title,owner,members", c = `&top=${r}`, d = `${s}${o}${a}${c}`, p = { method: "GET", headers: {
|
|
385
385
|
"Content-Type": "application/json",
|
|
386
386
|
Accept: "application/json,text/javascript,*/*"
|
|
387
387
|
} };
|
|
@@ -390,8 +390,8 @@ function Be(e, n = void 0, t = void 0) {
|
|
|
390
390
|
opts: p,
|
|
391
391
|
onComplete(f) {
|
|
392
392
|
const l = JSON.parse(f), g = {}, h = l.groups.filter((y) => y.uri.startsWith("uuid:"));
|
|
393
|
-
if (
|
|
394
|
-
const y = h.filter((_) => _.owner ===
|
|
393
|
+
if (i && Object.keys(i).length > 0) {
|
|
394
|
+
const y = h.filter((_) => _.owner === i.email), S = h.filter((_) => _.members.includes(i.email)), w = y.concat(S);
|
|
395
395
|
g.iam = w, g.UG = h, g.iamMember = S, ee(
|
|
396
396
|
e,
|
|
397
397
|
(_) => {
|
|
@@ -421,19 +421,19 @@ function Be(e, n = void 0, t = void 0) {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
function Ee(e, n, t) {
|
|
424
|
-
const { _usersgroup:
|
|
425
|
-
if (!
|
|
424
|
+
const { _usersgroup: s, list_uris: i } = e;
|
|
425
|
+
if (!i || i.length === 0) {
|
|
426
426
|
t({ msg: "getUserGroupsByURIList: lists_uri is empty or undefined" });
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
429
|
const r = {
|
|
430
|
-
baseUrl:
|
|
430
|
+
baseUrl: s,
|
|
431
431
|
uri: "/3drdfpersist/resources/v1/usersgroup/groups",
|
|
432
432
|
opt: "?select=uri,title,owner,members"
|
|
433
433
|
}, o = `${r.baseUrl}${r.uri}${r.opt}`, a = {
|
|
434
434
|
method: "POST",
|
|
435
435
|
headers: R,
|
|
436
|
-
data: JSON.stringify({ groups:
|
|
436
|
+
data: JSON.stringify({ groups: i })
|
|
437
437
|
};
|
|
438
438
|
try {
|
|
439
439
|
m(o, {
|
|
@@ -466,21 +466,21 @@ function Ee(e, n, t) {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
function Ke(e, n, t) {
|
|
469
|
-
const { _usersgroup:
|
|
470
|
-
if (!
|
|
469
|
+
const { _usersgroup: s, list_emails: i } = e;
|
|
470
|
+
if (!i || i.length === 0) {
|
|
471
471
|
t({
|
|
472
472
|
msg: "getUserGroupsByEmailList: lists_email is empty or undefined"
|
|
473
473
|
});
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
476
|
const r = {
|
|
477
|
-
baseUrl:
|
|
477
|
+
baseUrl: s,
|
|
478
478
|
uri: "/3drdfpersist/resources/v1/usersgroup/users/locate",
|
|
479
479
|
opt: "?person_ident=email"
|
|
480
480
|
}, o = `${r.baseUrl}${r.uri}${r.opt}`, a = {
|
|
481
481
|
method: "POST",
|
|
482
482
|
headers: R,
|
|
483
|
-
data: JSON.stringify({ users:
|
|
483
|
+
data: JSON.stringify({ users: i })
|
|
484
484
|
};
|
|
485
485
|
try {
|
|
486
486
|
m(o, {
|
|
@@ -519,12 +519,12 @@ function Ke(e, n, t) {
|
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
function qe(e, n) {
|
|
522
|
-
const { space: t } = e,
|
|
523
|
-
m(
|
|
522
|
+
const { space: t } = e, i = `${t}/3drdfpersist/resources/v1/usersgroup/${n}`;
|
|
523
|
+
m(i, {
|
|
524
524
|
method: "DELETE"
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
|
-
function Xe(e, n, t,
|
|
527
|
+
function Xe(e, n, t, s = void 0, i = void 0) {
|
|
528
528
|
const { space: r, tenant: o } = e, a = {
|
|
529
529
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
530
530
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -540,14 +540,14 @@ function Xe(e, n, t, i = void 0, s = void 0) {
|
|
|
540
540
|
data: u,
|
|
541
541
|
type: "json",
|
|
542
542
|
onComplete(p) {
|
|
543
|
-
|
|
543
|
+
s && s(p);
|
|
544
544
|
},
|
|
545
545
|
onFailure(p) {
|
|
546
|
-
|
|
546
|
+
i && i(p);
|
|
547
547
|
}
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
|
-
function We(e, n, t,
|
|
550
|
+
function We(e, n, t, s = void 0, i = void 0) {
|
|
551
551
|
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
|
|
552
552
|
m(a, {
|
|
553
553
|
method: "PATCH",
|
|
@@ -555,15 +555,15 @@ function We(e, n, t, i = void 0, s = void 0) {
|
|
|
555
555
|
data: JSON.stringify(t),
|
|
556
556
|
type: "json",
|
|
557
557
|
onComplete(d) {
|
|
558
|
-
|
|
558
|
+
s && s(d);
|
|
559
559
|
},
|
|
560
560
|
onFailure(d) {
|
|
561
|
-
|
|
561
|
+
i && i(d);
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
-
function Ve(e, n, t = void 0,
|
|
566
|
-
const { space:
|
|
565
|
+
function Ve(e, n, t = void 0, s = void 0) {
|
|
566
|
+
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
|
|
567
567
|
m(o, {
|
|
568
568
|
opts: {
|
|
569
569
|
method: "GET",
|
|
@@ -576,19 +576,19 @@ function Ve(e, n, t = void 0, i = void 0) {
|
|
|
576
576
|
t && t(JSON.parse(d));
|
|
577
577
|
},
|
|
578
578
|
onFailure(d) {
|
|
579
|
-
|
|
579
|
+
s && s(d);
|
|
580
580
|
}
|
|
581
581
|
});
|
|
582
582
|
}
|
|
583
583
|
async function te(e, n, t) {
|
|
584
584
|
if (e.space) {
|
|
585
|
-
const
|
|
586
|
-
m(
|
|
587
|
-
onComplete(
|
|
588
|
-
|
|
585
|
+
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
586
|
+
m(s, {
|
|
587
|
+
onComplete(i) {
|
|
588
|
+
i = JSON.parse(i), n && n(i.csrf);
|
|
589
589
|
},
|
|
590
|
-
onFailure(
|
|
591
|
-
t && t({ error:
|
|
590
|
+
onFailure(i, r, o) {
|
|
591
|
+
t && t({ error: i, headers: r, xhr: o });
|
|
592
592
|
}
|
|
593
593
|
});
|
|
594
594
|
}
|
|
@@ -597,22 +597,22 @@ var U = {};
|
|
|
597
597
|
function ne(e, n) {
|
|
598
598
|
return Object.prototype.hasOwnProperty.call(e, n);
|
|
599
599
|
}
|
|
600
|
-
var se = function(e, n, t,
|
|
600
|
+
var se = function(e, n, t, s) {
|
|
601
601
|
n = n || "&", t = t || "=";
|
|
602
|
-
var
|
|
602
|
+
var i = {};
|
|
603
603
|
if (typeof e != "string" || e.length === 0)
|
|
604
|
-
return
|
|
604
|
+
return i;
|
|
605
605
|
var r = /\+/g;
|
|
606
606
|
e = e.split(n);
|
|
607
607
|
var o = 1e3;
|
|
608
|
-
|
|
608
|
+
s && typeof s.maxKeys == "number" && (o = s.maxKeys);
|
|
609
609
|
var a = e.length;
|
|
610
610
|
o > 0 && a > o && (a = o);
|
|
611
611
|
for (var c = 0; c < a; ++c) {
|
|
612
612
|
var d = e[c].replace(r, "%20"), u = d.indexOf(t), p, f, l, g;
|
|
613
|
-
u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), ne(
|
|
613
|
+
u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
|
|
614
614
|
}
|
|
615
|
-
return
|
|
615
|
+
return i;
|
|
616
616
|
}, x = function(e) {
|
|
617
617
|
switch (typeof e) {
|
|
618
618
|
case "string":
|
|
@@ -624,40 +624,40 @@ var se = function(e, n, t, i) {
|
|
|
624
624
|
default:
|
|
625
625
|
return "";
|
|
626
626
|
}
|
|
627
|
-
}, ie = function(e, n, t,
|
|
628
|
-
return n = n || "&", t = t || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(
|
|
629
|
-
var r = encodeURIComponent(x(
|
|
630
|
-
return Array.isArray(e[
|
|
627
|
+
}, ie = function(e, n, t, s) {
|
|
628
|
+
return n = n || "&", t = t || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
|
|
629
|
+
var r = encodeURIComponent(x(i)) + t;
|
|
630
|
+
return Array.isArray(e[i]) ? e[i].map(function(o) {
|
|
631
631
|
return r + encodeURIComponent(x(o));
|
|
632
|
-
}).join(n) : r + encodeURIComponent(x(e[
|
|
633
|
-
}).filter(Boolean).join(n) :
|
|
632
|
+
}).join(n) : r + encodeURIComponent(x(e[i]));
|
|
633
|
+
}).filter(Boolean).join(n) : s ? encodeURIComponent(x(s)) + t + encodeURIComponent(x(e)) : "";
|
|
634
634
|
};
|
|
635
635
|
U.decode = U.parse = se;
|
|
636
636
|
U.encode = U.stringify = ie;
|
|
637
|
-
async function M(e, n = void 0, t = void 0,
|
|
638
|
-
const
|
|
637
|
+
async function M(e, n = void 0, t = void 0, s = void 0) {
|
|
638
|
+
const i = e.space;
|
|
639
639
|
if (n === void 0) {
|
|
640
640
|
console.log("Le paramètre docid est obligatoire");
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
|
-
const r =
|
|
643
|
+
const r = i + `/resources/v1/modeler/documents/${n}`;
|
|
644
644
|
m(r, {
|
|
645
645
|
onComplete(o, a, c) {
|
|
646
646
|
const d = JSON.parse(o);
|
|
647
647
|
t && t(d);
|
|
648
648
|
},
|
|
649
649
|
onFailure(o) {
|
|
650
|
-
|
|
650
|
+
s && s(o);
|
|
651
651
|
}
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
|
-
async function Ye(e, n = void 0, t = void 0,
|
|
655
|
-
const
|
|
654
|
+
async function Ye(e, n = void 0, t = void 0, s = void 0) {
|
|
655
|
+
const i = e.space;
|
|
656
656
|
if (n === void 0) {
|
|
657
657
|
console.log("Le paramètre docids est obligatoire");
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
|
-
let r = `${
|
|
660
|
+
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = U.stringify({
|
|
661
661
|
$ids: n.toString().replace('"', "").replace("[", "").replace("]", "")
|
|
662
662
|
});
|
|
663
663
|
m(r, {
|
|
@@ -671,69 +671,69 @@ async function Ye(e, n = void 0, t = void 0, i = void 0) {
|
|
|
671
671
|
t && t(u);
|
|
672
672
|
},
|
|
673
673
|
onFailure(a) {
|
|
674
|
-
|
|
674
|
+
s && s(a);
|
|
675
675
|
}
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
678
|
function N(e, n = void 0, t = void 0) {
|
|
679
679
|
if (e.objID && e.objID !== "") {
|
|
680
|
-
let
|
|
681
|
-
m(
|
|
682
|
-
onComplete(
|
|
683
|
-
const a = JSON.parse(
|
|
680
|
+
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
681
|
+
m(s, {
|
|
682
|
+
onComplete(i, r, o) {
|
|
683
|
+
const a = JSON.parse(i);
|
|
684
684
|
e.success = !0, e.token = a?.csrf?.value, e.datas = a?.data[0], n && n(e);
|
|
685
685
|
},
|
|
686
|
-
onFailure(
|
|
687
|
-
t && t(
|
|
686
|
+
onFailure(i) {
|
|
687
|
+
t && t(i);
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
} else
|
|
691
691
|
b(
|
|
692
692
|
e,
|
|
693
|
-
(
|
|
694
|
-
console.log("_3DSpace_get_csrf / _3DSpace_csrf",
|
|
693
|
+
(s) => {
|
|
694
|
+
console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), e.token = s, n && n(e);
|
|
695
695
|
},
|
|
696
|
-
(
|
|
697
|
-
t && t(
|
|
696
|
+
(s) => {
|
|
697
|
+
t && t(s);
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
700
|
}
|
|
701
|
-
function ze(e
|
|
702
|
-
return new Promise((
|
|
701
|
+
function ze(e) {
|
|
702
|
+
return new Promise((n, t) => {
|
|
703
703
|
if (e.objID && e.objID !== "") {
|
|
704
|
-
let
|
|
705
|
-
m(
|
|
706
|
-
onComplete(
|
|
707
|
-
const
|
|
708
|
-
e.success = !0, e.csrf =
|
|
704
|
+
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
705
|
+
m(s, {
|
|
706
|
+
onComplete(i, r, o) {
|
|
707
|
+
const a = JSON.parse(i);
|
|
708
|
+
e.success = !0, e.csrf = a?.csrf?.value, e.datas = a?.data[0], n(e);
|
|
709
709
|
},
|
|
710
|
-
onFailure(
|
|
711
|
-
|
|
710
|
+
onFailure(i) {
|
|
711
|
+
t({ success: !1, credentials: e, error: i });
|
|
712
712
|
}
|
|
713
713
|
});
|
|
714
714
|
} else
|
|
715
715
|
b(
|
|
716
716
|
e,
|
|
717
|
-
(
|
|
718
|
-
e.success = !0, e.csrf =
|
|
717
|
+
(s) => {
|
|
718
|
+
e.success = !0, e.csrf = s, n(e);
|
|
719
719
|
},
|
|
720
|
-
(
|
|
721
|
-
|
|
720
|
+
(s) => {
|
|
721
|
+
t({ success: !1, credentials: e, error: s });
|
|
722
722
|
}
|
|
723
723
|
);
|
|
724
724
|
});
|
|
725
725
|
}
|
|
726
726
|
function b(e, n = void 0, t = void 0) {
|
|
727
727
|
if (e.space) {
|
|
728
|
-
const
|
|
729
|
-
m(
|
|
730
|
-
onComplete(
|
|
731
|
-
const a = JSON.parse(
|
|
728
|
+
const s = e.space + "/resources/v1/application/CSRF";
|
|
729
|
+
m(s, {
|
|
730
|
+
onComplete(i, r, o) {
|
|
731
|
+
const a = JSON.parse(i);
|
|
732
732
|
n && n(a.csrf.value);
|
|
733
733
|
},
|
|
734
|
-
onFailure(
|
|
734
|
+
onFailure(i, r, o) {
|
|
735
735
|
t && t({
|
|
736
|
-
response:
|
|
736
|
+
response: i,
|
|
737
737
|
headers: r,
|
|
738
738
|
xhr: o
|
|
739
739
|
});
|
|
@@ -743,11 +743,11 @@ function b(e, n = void 0, t = void 0) {
|
|
|
743
743
|
t && t("ERROR : url du 3DSpace non défini.");
|
|
744
744
|
}
|
|
745
745
|
function j(e, n = void 0, t = void 0) {
|
|
746
|
-
let
|
|
746
|
+
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
747
747
|
N(
|
|
748
748
|
e,
|
|
749
|
-
(
|
|
750
|
-
m(
|
|
749
|
+
(i) => {
|
|
750
|
+
m(s, {
|
|
751
751
|
method: "PUT",
|
|
752
752
|
headers: {
|
|
753
753
|
ENO_CSRF_TOKEN: e.token
|
|
@@ -761,12 +761,12 @@ function j(e, n = void 0, t = void 0) {
|
|
|
761
761
|
}
|
|
762
762
|
});
|
|
763
763
|
},
|
|
764
|
-
(
|
|
765
|
-
console.warn("_3DSpace_get_ticket / error => ",
|
|
764
|
+
(i) => {
|
|
765
|
+
console.warn("_3DSpace_get_ticket / error => ", i), t && t(i);
|
|
766
766
|
}
|
|
767
767
|
);
|
|
768
768
|
}
|
|
769
|
-
function He(e, n, t = void 0,
|
|
769
|
+
function He(e, n, t = void 0, s = void 0, i = void 0) {
|
|
770
770
|
const r = `${e.space}/resources/v1/modeler/documents/${n}/files/DownloadTicket`;
|
|
771
771
|
t || (t = e.token), m(r, {
|
|
772
772
|
method: "PUT",
|
|
@@ -778,23 +778,23 @@ function He(e, n, t = void 0, i = void 0, s = void 0) {
|
|
|
778
778
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
779
779
|
try {
|
|
780
780
|
const c = a.data[0].dataelements.ticketURL;
|
|
781
|
-
i && i(c);
|
|
782
|
-
} catch (c) {
|
|
783
781
|
s && s(c);
|
|
782
|
+
} catch (c) {
|
|
783
|
+
i && i(c);
|
|
784
784
|
}
|
|
785
785
|
},
|
|
786
786
|
onFailure(o) {
|
|
787
|
-
|
|
787
|
+
i && i(o);
|
|
788
788
|
}
|
|
789
789
|
});
|
|
790
790
|
}
|
|
791
|
-
function G(e, n, t,
|
|
791
|
+
function G(e, n, t, s, i, r = void 0, o = void 0) {
|
|
792
792
|
const a = () => oe(
|
|
793
793
|
e,
|
|
794
794
|
n,
|
|
795
795
|
t,
|
|
796
|
-
i,
|
|
797
796
|
s,
|
|
797
|
+
i,
|
|
798
798
|
e.token,
|
|
799
799
|
r,
|
|
800
800
|
o
|
|
@@ -810,7 +810,7 @@ function G(e, n, t, i, s, r = void 0, o = void 0) {
|
|
|
810
810
|
}
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
|
-
function oe(e, n, t,
|
|
813
|
+
function oe(e, n, t, s, i, r, o = void 0, a = void 0) {
|
|
814
814
|
const c = e.space + `/resources/v1/modeler/documents/files/CheckinTicket?tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`;
|
|
815
815
|
m(c, {
|
|
816
816
|
method: "PUT",
|
|
@@ -828,9 +828,9 @@ function oe(e, n, t, i, s, r, o = void 0, a = void 0) {
|
|
|
828
828
|
onComplete(d, u, p) {
|
|
829
829
|
const f = d.csrf, l = d.data[0].dataelements, g = new FormData();
|
|
830
830
|
let h;
|
|
831
|
-
|
|
831
|
+
s instanceof Blob ? h = s : h = new Blob([s], {
|
|
832
832
|
type: "text/plain"
|
|
833
|
-
}), g.append(l.ticketparamname, l.ticket), g.append("file_0", h,
|
|
833
|
+
}), g.append(l.ticketparamname, l.ticket), g.append("file_0", h, i);
|
|
834
834
|
const y = {};
|
|
835
835
|
y.method = "POST", y.data = g, y.onComplete = function(S) {
|
|
836
836
|
let w = {
|
|
@@ -846,7 +846,7 @@ function oe(e, n, t, i, s, r, o = void 0, a = void 0) {
|
|
|
846
846
|
files: [
|
|
847
847
|
{
|
|
848
848
|
dataelements: {
|
|
849
|
-
title:
|
|
849
|
+
title: i,
|
|
850
850
|
receipt: S
|
|
851
851
|
},
|
|
852
852
|
updateAction: "REVISE"
|
|
@@ -876,11 +876,11 @@ function oe(e, n, t, i, s, r, o = void 0, a = void 0) {
|
|
|
876
876
|
}
|
|
877
877
|
});
|
|
878
878
|
}
|
|
879
|
-
async function Qe(e, n, t = void 0,
|
|
879
|
+
async function Qe(e, n, t = void 0, s = void 0) {
|
|
880
880
|
e.space, e.token, e.ctx;
|
|
881
|
-
const
|
|
881
|
+
const i = e?.description, r = e?.title;
|
|
882
882
|
if (!n) {
|
|
883
|
-
console.warn("Error: docId undefined"),
|
|
883
|
+
console.warn("Error: docId undefined"), s && s("Error: docId undefined");
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
886
|
let o = `${e.space}/resources/v1/modeler/documents/${n}`;
|
|
@@ -888,7 +888,7 @@ async function Qe(e, n, t = void 0, i = void 0) {
|
|
|
888
888
|
data: [
|
|
889
889
|
{
|
|
890
890
|
dataelements: {
|
|
891
|
-
description:
|
|
891
|
+
description: i,
|
|
892
892
|
title: r
|
|
893
893
|
}
|
|
894
894
|
}
|
|
@@ -905,18 +905,18 @@ async function Qe(e, n, t = void 0, i = void 0) {
|
|
|
905
905
|
t && t(c);
|
|
906
906
|
},
|
|
907
907
|
onFailure(c) {
|
|
908
|
-
|
|
908
|
+
s && s(c);
|
|
909
909
|
}
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
|
-
async function Ze(e, n = void 0, t = void 0,
|
|
912
|
+
async function Ze(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0) {
|
|
913
913
|
let { tenant: o, cs_name: a } = e;
|
|
914
914
|
if (!o && !a) {
|
|
915
|
-
|
|
915
|
+
i && i("Credentials undefined");
|
|
916
916
|
return;
|
|
917
917
|
}
|
|
918
918
|
if (!n && !t) {
|
|
919
|
-
|
|
919
|
+
i && i("Définition du fichier undefined");
|
|
920
920
|
return;
|
|
921
921
|
}
|
|
922
922
|
const c = T.now().ts;
|
|
@@ -979,18 +979,18 @@ async function Ze(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0)
|
|
|
979
979
|
data: D,
|
|
980
980
|
type: "json",
|
|
981
981
|
onComplete(F, Ce, be) {
|
|
982
|
-
|
|
982
|
+
s && s(F);
|
|
983
983
|
},
|
|
984
984
|
onFailure(F) {
|
|
985
985
|
console.warn(
|
|
986
986
|
"_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
|
|
987
987
|
{ url: v, bodyRequest: D, err: F }
|
|
988
|
-
),
|
|
988
|
+
), i && i(F);
|
|
989
989
|
}
|
|
990
990
|
});
|
|
991
991
|
},
|
|
992
992
|
(_) => {
|
|
993
|
-
console.warn("pushFileInFcs", _),
|
|
993
|
+
console.warn("pushFileInFcs", _), i && i(_);
|
|
994
994
|
},
|
|
995
995
|
(_) => {
|
|
996
996
|
r && r({ fileName: n, progress: _ });
|
|
@@ -998,24 +998,24 @@ async function Ze(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0)
|
|
|
998
998
|
);
|
|
999
999
|
}
|
|
1000
1000
|
} catch (y) {
|
|
1001
|
-
|
|
1001
|
+
i && i(y);
|
|
1002
1002
|
}
|
|
1003
1003
|
},
|
|
1004
1004
|
onFailure(l) {
|
|
1005
|
-
console.warn("_3DSpace_Upload_Doc | onFailure"),
|
|
1005
|
+
console.warn("_3DSpace_Upload_Doc | onFailure"), i && i(l);
|
|
1006
1006
|
}
|
|
1007
1007
|
});
|
|
1008
1008
|
} catch {
|
|
1009
|
-
|
|
1009
|
+
i && i();
|
|
1010
1010
|
}
|
|
1011
1011
|
},
|
|
1012
1012
|
onFailure(u) {
|
|
1013
|
-
|
|
1013
|
+
i && i(u);
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
1017
|
}
|
|
1018
|
-
async function et(e, n, t,
|
|
1018
|
+
async function et(e, n, t, s = void 0, i = void 0) {
|
|
1019
1019
|
e.space, e.token, e.ctx, M(
|
|
1020
1020
|
e,
|
|
1021
1021
|
n,
|
|
@@ -1028,19 +1028,19 @@ async function et(e, n, t, i = void 0, s = void 0) {
|
|
|
1028
1028
|
t,
|
|
1029
1029
|
a,
|
|
1030
1030
|
(c) => {
|
|
1031
|
-
|
|
1031
|
+
s && s(c);
|
|
1032
1032
|
},
|
|
1033
1033
|
(c) => {
|
|
1034
|
-
|
|
1034
|
+
i && i(c);
|
|
1035
1035
|
}
|
|
1036
1036
|
);
|
|
1037
1037
|
},
|
|
1038
1038
|
(r) => {
|
|
1039
|
-
|
|
1039
|
+
i && i(r);
|
|
1040
1040
|
}
|
|
1041
1041
|
);
|
|
1042
1042
|
}
|
|
1043
|
-
async function tt(e, n, t,
|
|
1043
|
+
async function tt(e, n, t, s, i = void 0, r = void 0) {
|
|
1044
1044
|
ae(
|
|
1045
1045
|
e,
|
|
1046
1046
|
(o) => {
|
|
@@ -1054,9 +1054,9 @@ async function tt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
1054
1054
|
e,
|
|
1055
1055
|
c,
|
|
1056
1056
|
t,
|
|
1057
|
-
|
|
1057
|
+
s,
|
|
1058
1058
|
(d) => {
|
|
1059
|
-
d?.data.length ?
|
|
1059
|
+
d?.data.length ? i && i(d) : r && r({
|
|
1060
1060
|
success: !1,
|
|
1061
1061
|
msg: "Erreur lors de la mise en ralation entre la document et le fichier"
|
|
1062
1062
|
});
|
|
@@ -1073,8 +1073,8 @@ async function tt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
function ae(e, n = void 0, t = void 0) {
|
|
1075
1075
|
if (e?.space && e.token && e.ctx) {
|
|
1076
|
-
let
|
|
1077
|
-
m(
|
|
1076
|
+
let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
|
|
1077
|
+
m(s, {
|
|
1078
1078
|
method: "PUT",
|
|
1079
1079
|
headers: {
|
|
1080
1080
|
ENO_CSRF_TOKEN: e.token,
|
|
@@ -1082,21 +1082,21 @@ function ae(e, n = void 0, t = void 0) {
|
|
|
1082
1082
|
"Content-Type": "application/json",
|
|
1083
1083
|
SecurityContext: e.ctx
|
|
1084
1084
|
},
|
|
1085
|
-
onComplete(
|
|
1085
|
+
onComplete(i, r, o) {
|
|
1086
1086
|
try {
|
|
1087
|
-
|
|
1087
|
+
i = JSON.parse(i);
|
|
1088
1088
|
} catch {
|
|
1089
1089
|
}
|
|
1090
|
-
n && n(
|
|
1090
|
+
n && n(i);
|
|
1091
1091
|
},
|
|
1092
|
-
onFailure(
|
|
1093
|
-
t && t(
|
|
1092
|
+
onFailure(i) {
|
|
1093
|
+
t && t(i);
|
|
1094
1094
|
}
|
|
1095
1095
|
});
|
|
1096
1096
|
} else
|
|
1097
1097
|
console.log("Error de credentials", e);
|
|
1098
1098
|
}
|
|
1099
|
-
function B(e, n, t,
|
|
1099
|
+
function B(e, n, t, s = void 0, i = void 0, r = void 0) {
|
|
1100
1100
|
console.log("pushFileInFcs", { fcs__jobTicket: e, fileData: n, fileName: t });
|
|
1101
1101
|
let o = new FormData();
|
|
1102
1102
|
n instanceof Blob || (n = new Blob([n], {
|
|
@@ -1110,12 +1110,12 @@ function B(e, n, t, i = void 0, s = void 0, r = void 0) {
|
|
|
1110
1110
|
r && r(u);
|
|
1111
1111
|
}
|
|
1112
1112
|
}, c.onload = function() {
|
|
1113
|
-
c.status === 200 ?
|
|
1113
|
+
c.status === 200 ? s && s(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
|
|
1114
1114
|
}, c.onerror = function() {
|
|
1115
|
-
|
|
1115
|
+
i && i(c.statusText);
|
|
1116
1116
|
}, c.send(o);
|
|
1117
1117
|
}
|
|
1118
|
-
function re(e, n, t,
|
|
1118
|
+
function re(e, n, t, s = void 0, i = void 0, r = void 0) {
|
|
1119
1119
|
console.log("relatedDocAndFile", { credentials: e, receipt: n, filename: t });
|
|
1120
1120
|
const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
|
|
1121
1121
|
let a = "temp_" + T.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
|
|
@@ -1133,7 +1133,7 @@ function re(e, n, t, i = void 0, s = void 0, r = void 0) {
|
|
|
1133
1133
|
type: "Document",
|
|
1134
1134
|
dataelements: {
|
|
1135
1135
|
title: o(t),
|
|
1136
|
-
description:
|
|
1136
|
+
description: s
|
|
1137
1137
|
},
|
|
1138
1138
|
relateddata: {
|
|
1139
1139
|
files: [
|
|
@@ -1155,14 +1155,14 @@ function re(e, n, t, i = void 0, s = void 0, r = void 0) {
|
|
|
1155
1155
|
d = JSON.parse(d);
|
|
1156
1156
|
} catch {
|
|
1157
1157
|
}
|
|
1158
|
-
|
|
1158
|
+
i && i(d);
|
|
1159
1159
|
},
|
|
1160
1160
|
onFailure(d) {
|
|
1161
1161
|
r && r(d);
|
|
1162
1162
|
}
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
|
-
function I(e, n = void 0, t = void 0,
|
|
1165
|
+
function I(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
|
|
1166
1166
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
1167
1167
|
m(a, {
|
|
1168
1168
|
method: "GET",
|
|
@@ -1180,8 +1180,8 @@ function I(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0, o = !1
|
|
|
1180
1180
|
)
|
|
1181
1181
|
), t && (Array.isArray(t) ? t.forEach((y) => {
|
|
1182
1182
|
l || h.forEach((S) => {
|
|
1183
|
-
if (y === S.role.name &&
|
|
1184
|
-
l = y, f =
|
|
1183
|
+
if (y === S.role.name && s === S.organization.title)
|
|
1184
|
+
l = y, f = s;
|
|
1185
1185
|
else if (y === S.role.name) {
|
|
1186
1186
|
let w = h.filter(
|
|
1187
1187
|
(_) => _.role.name === y
|
|
@@ -1190,8 +1190,8 @@ function I(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0, o = !1
|
|
|
1190
1190
|
}
|
|
1191
1191
|
});
|
|
1192
1192
|
}) : h.forEach((y) => {
|
|
1193
|
-
if (t === y.role.name &&
|
|
1194
|
-
l = t, f =
|
|
1193
|
+
if (t === y.role.name && s === y.organization.title)
|
|
1194
|
+
l = t, f = s;
|
|
1195
1195
|
else if (t === y.role.name) {
|
|
1196
1196
|
let S = h.filter(
|
|
1197
1197
|
(w) => w.role.name === t
|
|
@@ -1201,7 +1201,7 @@ function I(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0, o = !1
|
|
|
1201
1201
|
}));
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
p && f && l ? (u = l + "." + f + "." + p,
|
|
1204
|
+
p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
|
|
1205
1205
|
},
|
|
1206
1206
|
onFailure(c, d) {
|
|
1207
1207
|
console.warn("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -1220,13 +1220,13 @@ async function E(e, n = void 0, t = void 0) {
|
|
|
1220
1220
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
1221
1221
|
), t && t("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
|
|
1222
1222
|
e,
|
|
1223
|
-
(
|
|
1224
|
-
e.token =
|
|
1223
|
+
(s) => {
|
|
1224
|
+
e.token = s;
|
|
1225
1225
|
},
|
|
1226
|
-
(
|
|
1227
|
-
console.log("☠️ error => ",
|
|
1226
|
+
(s) => {
|
|
1227
|
+
console.log("☠️ error => ", s);
|
|
1228
1228
|
}
|
|
1229
|
-
), new Promise((
|
|
1229
|
+
), new Promise((s, i) => {
|
|
1230
1230
|
j(
|
|
1231
1231
|
e,
|
|
1232
1232
|
(r) => {
|
|
@@ -1242,14 +1242,14 @@ async function E(e, n = void 0, t = void 0) {
|
|
|
1242
1242
|
} catch {
|
|
1243
1243
|
a = o;
|
|
1244
1244
|
}
|
|
1245
|
-
n && typeof n == "function" && n(a),
|
|
1245
|
+
n && typeof n == "function" && n(a), s(a);
|
|
1246
1246
|
},
|
|
1247
1247
|
onFailure(o, a, c) {
|
|
1248
1248
|
t && (console.log("error http", o), t({
|
|
1249
1249
|
msg: JSON.parse(o),
|
|
1250
1250
|
headers: a,
|
|
1251
1251
|
xhr: c
|
|
1252
|
-
}),
|
|
1252
|
+
}), i({
|
|
1253
1253
|
msg: JSON.parse(o),
|
|
1254
1254
|
headers: a,
|
|
1255
1255
|
xhr: c
|
|
@@ -1258,12 +1258,12 @@ async function E(e, n = void 0, t = void 0) {
|
|
|
1258
1258
|
});
|
|
1259
1259
|
},
|
|
1260
1260
|
(r) => {
|
|
1261
|
-
t && t(r), console.log("*_3dspace_download_doc / error file URL *", r),
|
|
1261
|
+
t && t(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
|
|
1262
1262
|
}
|
|
1263
1263
|
);
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
|
-
async function ce(e, n, t = void 0,
|
|
1266
|
+
async function ce(e, n, t = void 0, s = void 0) {
|
|
1267
1267
|
typeof n < "u" && Array.isArray(n) && n?.length > 0 ? H({
|
|
1268
1268
|
credentials: e,
|
|
1269
1269
|
myArray: n,
|
|
@@ -1273,11 +1273,11 @@ async function ce(e, n, t = void 0, i = void 0) {
|
|
|
1273
1273
|
t && t(r);
|
|
1274
1274
|
}) : (console.warn(
|
|
1275
1275
|
"La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
|
|
1276
|
-
),
|
|
1276
|
+
), s && s(
|
|
1277
1277
|
"La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
|
|
1278
1278
|
));
|
|
1279
1279
|
}
|
|
1280
|
-
function de(e, n, t = void 0,
|
|
1280
|
+
function de(e, n, t = void 0, s = void 0, i = void 0) {
|
|
1281
1281
|
const r = [];
|
|
1282
1282
|
n.forEach((c) => {
|
|
1283
1283
|
r.push({
|
|
@@ -1309,7 +1309,7 @@ function de(e, n, t = void 0, i = void 0, s = void 0) {
|
|
|
1309
1309
|
} catch {
|
|
1310
1310
|
h = l.blob();
|
|
1311
1311
|
}
|
|
1312
|
-
|
|
1312
|
+
s && s({
|
|
1313
1313
|
objectId: u.id,
|
|
1314
1314
|
headers: g,
|
|
1315
1315
|
fileName: p,
|
|
@@ -1321,17 +1321,17 @@ function de(e, n, t = void 0, i = void 0, s = void 0) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
});
|
|
1323
1323
|
} catch (p) {
|
|
1324
|
-
console.log(p),
|
|
1324
|
+
console.log(p), i && i(p);
|
|
1325
1325
|
}
|
|
1326
1326
|
}));
|
|
1327
1327
|
},
|
|
1328
1328
|
onFailure(c) {
|
|
1329
|
-
console.log(c),
|
|
1329
|
+
console.log(c), i && i(c);
|
|
1330
1330
|
}
|
|
1331
1331
|
});
|
|
1332
1332
|
}
|
|
1333
|
-
function nt(e, n, t = void 0,
|
|
1334
|
-
return new Promise((
|
|
1333
|
+
function nt(e, n, t = void 0, s = void 0) {
|
|
1334
|
+
return new Promise((i) => {
|
|
1335
1335
|
if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
|
|
1336
1336
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
1337
1337
|
let o = {
|
|
@@ -1354,14 +1354,14 @@ function nt(e, n, t = void 0, i = void 0) {
|
|
|
1354
1354
|
t && t(a);
|
|
1355
1355
|
},
|
|
1356
1356
|
onFailure(a) {
|
|
1357
|
-
|
|
1357
|
+
s && s(a);
|
|
1358
1358
|
}
|
|
1359
1359
|
};
|
|
1360
1360
|
m(r, o);
|
|
1361
1361
|
}
|
|
1362
1362
|
});
|
|
1363
1363
|
}
|
|
1364
|
-
function st(e, n, t,
|
|
1364
|
+
function st(e, n, t, s = void 0, i = void 0) {
|
|
1365
1365
|
return new Promise((r) => {
|
|
1366
1366
|
if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
|
|
1367
1367
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -1383,18 +1383,18 @@ function st(e, n, t, i = void 0, s = void 0) {
|
|
|
1383
1383
|
}),
|
|
1384
1384
|
type: "json",
|
|
1385
1385
|
onComplete(c) {
|
|
1386
|
-
|
|
1386
|
+
s && s(c);
|
|
1387
1387
|
},
|
|
1388
1388
|
onFailure(c) {
|
|
1389
|
-
|
|
1389
|
+
i && i(c);
|
|
1390
1390
|
}
|
|
1391
1391
|
};
|
|
1392
1392
|
m(o, a);
|
|
1393
1393
|
}
|
|
1394
1394
|
});
|
|
1395
1395
|
}
|
|
1396
|
-
function it(e, n, t = void 0,
|
|
1397
|
-
return new Promise((
|
|
1396
|
+
function it(e, n, t = void 0, s = void 0) {
|
|
1397
|
+
return new Promise((i) => {
|
|
1398
1398
|
if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
|
|
1399
1399
|
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
1400
1400
|
I(
|
|
@@ -1427,15 +1427,15 @@ function it(e, n, t = void 0, i = void 0) {
|
|
|
1427
1427
|
t && t(a);
|
|
1428
1428
|
},
|
|
1429
1429
|
onFailure(a) {
|
|
1430
|
-
|
|
1430
|
+
s && s(a);
|
|
1431
1431
|
}
|
|
1432
1432
|
};
|
|
1433
1433
|
m(r, o);
|
|
1434
1434
|
}
|
|
1435
1435
|
});
|
|
1436
1436
|
}
|
|
1437
|
-
function ot(e, n, t = void 0,
|
|
1438
|
-
return new Promise((
|
|
1437
|
+
function ot(e, n, t = void 0, s = void 0) {
|
|
1438
|
+
return new Promise((i) => {
|
|
1439
1439
|
if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
|
|
1440
1440
|
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
1441
1441
|
I(
|
|
@@ -1474,14 +1474,14 @@ function ot(e, n, t = void 0, i = void 0) {
|
|
|
1474
1474
|
t && t(a);
|
|
1475
1475
|
},
|
|
1476
1476
|
onFailure(a) {
|
|
1477
|
-
|
|
1477
|
+
s && s(a);
|
|
1478
1478
|
}
|
|
1479
1479
|
};
|
|
1480
1480
|
m(r, o);
|
|
1481
1481
|
}
|
|
1482
1482
|
});
|
|
1483
1483
|
}
|
|
1484
|
-
function at(e, n, t,
|
|
1484
|
+
function at(e, n, t, s = void 0, i = void 0) {
|
|
1485
1485
|
return new Promise((r) => {
|
|
1486
1486
|
if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
|
|
1487
1487
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -1518,10 +1518,10 @@ function at(e, n, t, i = void 0, s = void 0) {
|
|
|
1518
1518
|
}),
|
|
1519
1519
|
type: "json",
|
|
1520
1520
|
onComplete(c) {
|
|
1521
|
-
|
|
1521
|
+
s && s(c);
|
|
1522
1522
|
},
|
|
1523
1523
|
onFailure(c) {
|
|
1524
|
-
|
|
1524
|
+
i && i(c);
|
|
1525
1525
|
}
|
|
1526
1526
|
};
|
|
1527
1527
|
m(o, a);
|
|
@@ -1530,8 +1530,8 @@ function at(e, n, t, i = void 0, s = void 0) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
function ue(e) {
|
|
1532
1532
|
return new Promise((n, t) => {
|
|
1533
|
-
const
|
|
1534
|
-
m(
|
|
1533
|
+
const s = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
|
|
1534
|
+
m(s, {
|
|
1535
1535
|
method: "GET",
|
|
1536
1536
|
onComplete(r) {
|
|
1537
1537
|
n(r);
|
|
@@ -1542,8 +1542,8 @@ function ue(e) {
|
|
|
1542
1542
|
});
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
|
-
function rt(e, n, t = void 0,
|
|
1546
|
-
return new Promise(async (
|
|
1545
|
+
function rt(e, n, t = void 0, s = void 0) {
|
|
1546
|
+
return new Promise(async (i, r) => {
|
|
1547
1547
|
const { tenant: o, ctx: a, space: c } = e;
|
|
1548
1548
|
(!o || !a || !c) && r({ error: "Erreur de credentials", tenant: o, ctx: a, space: c });
|
|
1549
1549
|
const d = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=1&withAttributes=1&withCopyFrom=1&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
|
|
@@ -1568,10 +1568,10 @@ function rt(e, n, t = void 0, i = void 0) {
|
|
|
1568
1568
|
}),
|
|
1569
1569
|
type: "json",
|
|
1570
1570
|
onComplete(f) {
|
|
1571
|
-
t && t(f),
|
|
1571
|
+
t && t(f), i(f);
|
|
1572
1572
|
},
|
|
1573
1573
|
onFailure(f) {
|
|
1574
|
-
|
|
1574
|
+
s && s(f), r(f);
|
|
1575
1575
|
}
|
|
1576
1576
|
};
|
|
1577
1577
|
m(d, p);
|
|
@@ -1579,21 +1579,21 @@ function rt(e, n, t = void 0, i = void 0) {
|
|
|
1579
1579
|
}
|
|
1580
1580
|
function ct(e) {
|
|
1581
1581
|
return new Promise((n, t) => {
|
|
1582
|
-
const { _fedSearch:
|
|
1582
|
+
const { _fedSearch: s, currentTenant: i, ctx: r } = e;
|
|
1583
1583
|
r || t({
|
|
1584
1584
|
success: !1,
|
|
1585
1585
|
msg: "getBookmarksRoot: ctx is missing in credentials"
|
|
1586
|
-
}),
|
|
1586
|
+
}), s || t({
|
|
1587
1587
|
success: !1,
|
|
1588
1588
|
msg: "getBookmarksRoot: _fedSearch is missing in credentials"
|
|
1589
|
-
}),
|
|
1589
|
+
}), i || t({
|
|
1590
1590
|
success: !1,
|
|
1591
1591
|
msg: "getBookmarksRoot: currentTenant is missing in credentials"
|
|
1592
1592
|
});
|
|
1593
1593
|
const o = {
|
|
1594
|
-
base:
|
|
1594
|
+
base: s,
|
|
1595
1595
|
uri: "/search",
|
|
1596
|
-
opt: `?tenant=${
|
|
1596
|
+
opt: `?tenant=${i}`
|
|
1597
1597
|
}, a = {
|
|
1598
1598
|
select_predicate: [
|
|
1599
1599
|
"ds6w:label",
|
|
@@ -1628,7 +1628,7 @@ function ct(e) {
|
|
|
1628
1628
|
select_file: ["icon", "thumbnail_2d"],
|
|
1629
1629
|
query: 'flattenedtaxonomies:"types/Workspace"',
|
|
1630
1630
|
locale: "fr",
|
|
1631
|
-
tenant:
|
|
1631
|
+
tenant: i,
|
|
1632
1632
|
source: ["3dspace"],
|
|
1633
1633
|
indexmode: "true",
|
|
1634
1634
|
login: {
|
|
@@ -1663,8 +1663,8 @@ function ct(e) {
|
|
|
1663
1663
|
});
|
|
1664
1664
|
}
|
|
1665
1665
|
function dt(e, n) {
|
|
1666
|
-
return new Promise((t,
|
|
1667
|
-
const
|
|
1666
|
+
return new Promise((t, s) => {
|
|
1667
|
+
const i = `${e.space}/resources/v1/FolderManagement/Folder/${n}/folderTree?tenant=${e.tenant.toUpperCase()}`, r = {
|
|
1668
1668
|
expandList: "",
|
|
1669
1669
|
isRoot: "",
|
|
1670
1670
|
isPersonalFolder: !1,
|
|
@@ -1675,11 +1675,12 @@ function dt(e, n) {
|
|
|
1675
1675
|
nextStart: 0,
|
|
1676
1676
|
refine: ""
|
|
1677
1677
|
};
|
|
1678
|
-
m(
|
|
1678
|
+
m(i, {
|
|
1679
1679
|
method: "POST",
|
|
1680
1680
|
headers: {
|
|
1681
1681
|
Accept: "application/json",
|
|
1682
1682
|
"content-Type": "application/json",
|
|
1683
|
+
ENO_CSRF_TOKEN: e.csrf,
|
|
1683
1684
|
SecurityContext: `ctx::${e.ctx}`
|
|
1684
1685
|
},
|
|
1685
1686
|
data: JSON.stringify(r),
|
|
@@ -1690,16 +1691,15 @@ function dt(e, n) {
|
|
|
1690
1691
|
},
|
|
1691
1692
|
onFailure(o, a, c) {
|
|
1692
1693
|
const d = {};
|
|
1693
|
-
|
|
1694
|
-
throw onError(d), console.log("Coucou dans enfant"), new Error("Coucou dans enfant", { cause: o });
|
|
1694
|
+
d.error = o, d.headers = a, d.xhr = c, s(d);
|
|
1695
1695
|
}
|
|
1696
1696
|
});
|
|
1697
1697
|
});
|
|
1698
1698
|
}
|
|
1699
1699
|
function ut(e, n) {
|
|
1700
|
-
return new Promise((t,
|
|
1701
|
-
const
|
|
1702
|
-
m(
|
|
1700
|
+
return new Promise((t, s) => {
|
|
1701
|
+
const i = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark/${n}?$mask=dsbks:BksMask.Items`;
|
|
1702
|
+
m(i, {
|
|
1703
1703
|
headers: {
|
|
1704
1704
|
SecurityContext: `ctx::${e.ctx}`
|
|
1705
1705
|
},
|
|
@@ -1713,18 +1713,18 @@ function ut(e, n) {
|
|
|
1713
1713
|
t(o);
|
|
1714
1714
|
},
|
|
1715
1715
|
onFailure(r) {
|
|
1716
|
-
|
|
1716
|
+
s(r);
|
|
1717
1717
|
}
|
|
1718
1718
|
});
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
|
-
function pt(e, n, t,
|
|
1721
|
+
function pt(e, n, t, s, i = void 0, r = void 0) {
|
|
1722
1722
|
return new Promise((o) => {
|
|
1723
1723
|
const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
|
|
1724
1724
|
let c = {
|
|
1725
1725
|
attributes: {
|
|
1726
1726
|
title: t,
|
|
1727
|
-
description:
|
|
1727
|
+
description: s,
|
|
1728
1728
|
inheritedAccess: "no"
|
|
1729
1729
|
}
|
|
1730
1730
|
}, d = {
|
|
@@ -1742,7 +1742,7 @@ function pt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
1742
1742
|
data: JSON.stringify(d),
|
|
1743
1743
|
type: "json",
|
|
1744
1744
|
onComplete(p) {
|
|
1745
|
-
|
|
1745
|
+
i && i(p);
|
|
1746
1746
|
},
|
|
1747
1747
|
onFailure(p) {
|
|
1748
1748
|
r && r(p);
|
|
@@ -1751,7 +1751,7 @@ function pt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
1751
1751
|
m(a, u);
|
|
1752
1752
|
});
|
|
1753
1753
|
}
|
|
1754
|
-
function lt(e, n, t,
|
|
1754
|
+
function lt(e, n, t, s, i = void 0, r = void 0) {
|
|
1755
1755
|
return console.log("credentials", e), new Promise((o) => {
|
|
1756
1756
|
`${e.space}`, JSON.stringify({
|
|
1757
1757
|
csrf: {
|
|
@@ -1766,7 +1766,7 @@ function lt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
1766
1766
|
id: n,
|
|
1767
1767
|
dataelements: {
|
|
1768
1768
|
personList: t,
|
|
1769
|
-
eventsList:
|
|
1769
|
+
eventsList: s
|
|
1770
1770
|
},
|
|
1771
1771
|
tenant: e.tenant
|
|
1772
1772
|
}
|
|
@@ -1776,12 +1776,12 @@ function lt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
//!SECTION
|
|
1778
1778
|
function ft(e, n = void 0, t = void 0) {
|
|
1779
|
-
const
|
|
1779
|
+
const s = {
|
|
1780
1780
|
base: `${e.space}`,
|
|
1781
1781
|
uri: "/resources/bps/cspaces",
|
|
1782
1782
|
optTenant: `tenant=${e.tenant}`
|
|
1783
|
-
},
|
|
1784
|
-
m(
|
|
1783
|
+
}, i = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1784
|
+
m(i, {
|
|
1785
1785
|
method: "GET",
|
|
1786
1786
|
headers: {
|
|
1787
1787
|
Accept: "application/json,text/javascript,*/*",
|
|
@@ -1796,36 +1796,36 @@ function ft(e, n = void 0, t = void 0) {
|
|
|
1796
1796
|
}
|
|
1797
1797
|
});
|
|
1798
1798
|
}
|
|
1799
|
-
function mt(e, n, t,
|
|
1799
|
+
function mt(e, n, t, s) {
|
|
1800
1800
|
j(
|
|
1801
1801
|
e.space,
|
|
1802
1802
|
n,
|
|
1803
|
-
(
|
|
1804
|
-
m(
|
|
1803
|
+
(i) => {
|
|
1804
|
+
m(i, {
|
|
1805
1805
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1806
1806
|
onComplete: (r) => {
|
|
1807
1807
|
t && t(r);
|
|
1808
1808
|
},
|
|
1809
1809
|
onFailure: (r) => {
|
|
1810
|
-
console.log("error http", r),
|
|
1810
|
+
console.log("error http", r), s && s(r);
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
1813
|
}
|
|
1814
1814
|
);
|
|
1815
1815
|
}
|
|
1816
|
-
async function gt(e, n, t = void 0,
|
|
1817
|
-
return new Promise((
|
|
1816
|
+
async function gt(e, n, t = void 0, s = void 0) {
|
|
1817
|
+
return new Promise((i) => {
|
|
1818
1818
|
j(e, n, (r) => {
|
|
1819
1819
|
m(r, {
|
|
1820
|
-
onComplete: (o, a, c) => (
|
|
1820
|
+
onComplete: (o, a, c) => (i(JSON.parse(o)), t && t(JSON.parse(o), a, c), i),
|
|
1821
1821
|
onFailure: (o, a, c) => {
|
|
1822
|
-
|
|
1822
|
+
s && s(o, a, c), console.log(o, a?.errormsg);
|
|
1823
1823
|
}
|
|
1824
1824
|
});
|
|
1825
1825
|
});
|
|
1826
1826
|
});
|
|
1827
1827
|
}
|
|
1828
|
-
function ht(e, n, t,
|
|
1828
|
+
function ht(e, n, t, s = void 0, i = void 0) {
|
|
1829
1829
|
const r = new Blob([JSON.stringify(n)], { type: "text/plain" });
|
|
1830
1830
|
e = { ...e, objID: t }, N(
|
|
1831
1831
|
e,
|
|
@@ -1839,15 +1839,15 @@ function ht(e, n, t, i = void 0, s = void 0) {
|
|
|
1839
1839
|
r,
|
|
1840
1840
|
c,
|
|
1841
1841
|
(d) => {
|
|
1842
|
-
|
|
1842
|
+
s && s(d);
|
|
1843
1843
|
},
|
|
1844
1844
|
(d) => {
|
|
1845
|
-
|
|
1845
|
+
i && i(d);
|
|
1846
1846
|
}
|
|
1847
1847
|
);
|
|
1848
1848
|
},
|
|
1849
1849
|
(o) => {
|
|
1850
|
-
console.log("En cas d'erreur nous avons :", o), alert("Erreur lors de la sauvegarde, Veuillez réessayez"),
|
|
1850
|
+
console.log("En cas d'erreur nous avons :", o), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), i && i(o);
|
|
1851
1851
|
}
|
|
1852
1852
|
);
|
|
1853
1853
|
}
|
|
@@ -1856,60 +1856,60 @@ const A = [];
|
|
|
1856
1856
|
async function yt(e, n = void 0, t = void 0) {
|
|
1857
1857
|
e.objID && e.objID !== "" ? N(
|
|
1858
1858
|
e,
|
|
1859
|
-
(
|
|
1860
|
-
n && n(
|
|
1859
|
+
(s) => {
|
|
1860
|
+
n && n(s);
|
|
1861
1861
|
},
|
|
1862
|
-
(
|
|
1863
|
-
t && t(
|
|
1862
|
+
(s) => {
|
|
1863
|
+
t && t(s);
|
|
1864
1864
|
}
|
|
1865
1865
|
) : (e.objID === null || e.objID === "") && b(
|
|
1866
1866
|
e,
|
|
1867
|
-
(
|
|
1868
|
-
n && n({ rep:
|
|
1867
|
+
(s) => {
|
|
1868
|
+
n && n({ rep: s, msg: "Pas d'objID, ou invalide" });
|
|
1869
1869
|
},
|
|
1870
|
-
(
|
|
1871
|
-
t && t({ msg: "Pas d'objID et erreur sur le Space", err:
|
|
1870
|
+
(s) => {
|
|
1871
|
+
t && t({ msg: "Pas d'objID et erreur sur le Space", err: s });
|
|
1872
1872
|
}
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
1875
|
async function _t(e, n = void 0, t = void 0) {
|
|
1876
1876
|
console.log("getDatasByTenant (getDocuments)", e), await E(
|
|
1877
1877
|
e,
|
|
1878
|
-
(
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1878
|
+
(s) => {
|
|
1879
|
+
const i = {};
|
|
1880
|
+
i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), n && n?.(i);
|
|
1881
1881
|
},
|
|
1882
|
-
(
|
|
1883
|
-
t && t?.(
|
|
1882
|
+
(s) => {
|
|
1883
|
+
t && t?.(s);
|
|
1884
1884
|
}
|
|
1885
1885
|
);
|
|
1886
1886
|
}
|
|
1887
1887
|
function St(e, n = void 0, t = void 0) {
|
|
1888
|
-
const
|
|
1888
|
+
const s = [];
|
|
1889
1889
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1890
1890
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1891
1891
|
return;
|
|
1892
1892
|
}
|
|
1893
|
-
e.objIds.forEach((
|
|
1893
|
+
e.objIds.forEach((i, r) => {
|
|
1894
1894
|
E(
|
|
1895
1895
|
e,
|
|
1896
|
-
|
|
1896
|
+
i.objID,
|
|
1897
1897
|
(o) => {
|
|
1898
|
-
|
|
1898
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (K = o.affaires.map((a) => a.objectID), pe(e, q)), r === e.objIds.length - 1 && (n && n(s), delete e.objIds, delete e.datas);
|
|
1899
1899
|
}
|
|
1900
1900
|
);
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
|
-
function pe(e, n, t = void 0,
|
|
1903
|
+
function pe(e, n, t = void 0, s = void 0) {
|
|
1904
1904
|
ce(
|
|
1905
1905
|
e,
|
|
1906
1906
|
K,
|
|
1907
|
-
(
|
|
1907
|
+
(i) => {
|
|
1908
1908
|
const r = [...n];
|
|
1909
|
-
r.find((o) => o.objectID ===
|
|
1909
|
+
r.find((o) => o.objectID === i.objectId).data = i.data, q = r, A.push(i.data), t && t(A);
|
|
1910
1910
|
},
|
|
1911
|
-
(
|
|
1912
|
-
|
|
1911
|
+
(i) => {
|
|
1912
|
+
s && (s(i), console.log(i));
|
|
1913
1913
|
}
|
|
1914
1914
|
);
|
|
1915
1915
|
}
|
|
@@ -1933,12 +1933,12 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
|
|
|
1933
1933
|
order_by: "desc",
|
|
1934
1934
|
tag: "testTag"
|
|
1935
1935
|
};
|
|
1936
|
-
function wt(e, n, t = void 0,
|
|
1937
|
-
const { space:
|
|
1936
|
+
function wt(e, n, t = void 0, s = void 0) {
|
|
1937
|
+
const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = n, d = {
|
|
1938
1938
|
uri: "/resources/6w/tags",
|
|
1939
1939
|
otpCTX: "SecurityContext=preferred",
|
|
1940
1940
|
optTenant: `tenant=${r}`
|
|
1941
|
-
}, u = `${
|
|
1941
|
+
}, u = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1942
1942
|
tag: [
|
|
1943
1943
|
{
|
|
1944
1944
|
subject: [
|
|
@@ -1976,26 +1976,26 @@ function wt(e, n, t = void 0, i = void 0) {
|
|
|
1976
1976
|
t && t(w);
|
|
1977
1977
|
},
|
|
1978
1978
|
(w) => {
|
|
1979
|
-
|
|
1979
|
+
s && s(w);
|
|
1980
1980
|
}
|
|
1981
1981
|
);
|
|
1982
1982
|
},
|
|
1983
1983
|
(g, h) => {
|
|
1984
1984
|
const y = g;
|
|
1985
|
-
y.msg = h.errormsg, y.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", y),
|
|
1985
|
+
y.msg = h.errormsg, y.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", y), s && s(y);
|
|
1986
1986
|
}
|
|
1987
1987
|
);
|
|
1988
1988
|
}, 2e3);
|
|
1989
1989
|
},
|
|
1990
1990
|
onFailure(f, l) {
|
|
1991
1991
|
const g = f;
|
|
1992
|
-
g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1992
|
+
g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1993
1993
|
}
|
|
1994
1994
|
});
|
|
1995
1995
|
}
|
|
1996
|
-
function ge(e, n, t = void 0,
|
|
1996
|
+
function ge(e, n, t = void 0, s = void 0) {
|
|
1997
1997
|
console.log("obj ", n);
|
|
1998
|
-
const
|
|
1998
|
+
const i = n.info.name, r = {
|
|
1999
1999
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
2000
2000
|
uri: "/federated/search"
|
|
2001
2001
|
}, o = `${r.baseUrl}${r.uri}`, a = {
|
|
@@ -2033,7 +2033,7 @@ function ge(e, n, t = void 0, i = void 0) {
|
|
|
2033
2033
|
],
|
|
2034
2034
|
with_synthesis_hierarchical: !0,
|
|
2035
2035
|
select_file: ["icon", "thumbnail_2d"],
|
|
2036
|
-
query:
|
|
2036
|
+
query: i,
|
|
2037
2037
|
specific_source_parameter: {
|
|
2038
2038
|
"3dspace": {
|
|
2039
2039
|
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)'
|
|
@@ -2072,12 +2072,12 @@ function ge(e, n, t = void 0, i = void 0) {
|
|
|
2072
2072
|
},
|
|
2073
2073
|
onFailure(u, p) {
|
|
2074
2074
|
const f = u;
|
|
2075
|
-
f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f),
|
|
2075
|
+
f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
|
|
2076
2076
|
}
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
|
-
function Ct(e, n, t = void 0,
|
|
2080
|
-
const { objId:
|
|
2079
|
+
function Ct(e, n, t = void 0, s = void 0) {
|
|
2080
|
+
const { objId: i, pred: r, tag: o } = n, a = {
|
|
2081
2081
|
uri: "/resources/6w/tags",
|
|
2082
2082
|
otpCTX: "SecurityContext=preferred",
|
|
2083
2083
|
optTenant: `tenant=${e.tenant}`
|
|
@@ -2086,7 +2086,7 @@ function Ct(e, n, t = void 0, i = void 0) {
|
|
|
2086
2086
|
{
|
|
2087
2087
|
subject: [
|
|
2088
2088
|
{
|
|
2089
|
-
uri: `pid://${
|
|
2089
|
+
uri: `pid://${i}`
|
|
2090
2090
|
}
|
|
2091
2091
|
],
|
|
2092
2092
|
predicate: X[r],
|
|
@@ -2108,12 +2108,12 @@ function Ct(e, n, t = void 0, i = void 0) {
|
|
|
2108
2108
|
},
|
|
2109
2109
|
onFailure(u, p) {
|
|
2110
2110
|
const f = u;
|
|
2111
|
-
f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f),
|
|
2111
|
+
f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
|
|
2112
2112
|
}
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
function bt(e, n = "", t = void 0,
|
|
2116
|
-
const { space:
|
|
2115
|
+
function bt(e, n = "", t = void 0, s = void 0) {
|
|
2116
|
+
const { space: i } = e;
|
|
2117
2117
|
if (n === "")
|
|
2118
2118
|
return;
|
|
2119
2119
|
const r = {
|
|
@@ -2121,7 +2121,7 @@ function bt(e, n = "", t = void 0, i = void 0) {
|
|
|
2121
2121
|
}, o = {
|
|
2122
2122
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
2123
2123
|
Accept: "application/json,text/javascript,*/*"
|
|
2124
|
-
}, a = `${
|
|
2124
|
+
}, 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=${n}`;
|
|
2125
2125
|
m(a, {
|
|
2126
2126
|
method: "POST",
|
|
2127
2127
|
headers: o,
|
|
@@ -2131,25 +2131,25 @@ function bt(e, n = "", t = void 0, i = void 0) {
|
|
|
2131
2131
|
},
|
|
2132
2132
|
onFailure(d, u) {
|
|
2133
2133
|
const p = d;
|
|
2134
|
-
p.msg = u.error,
|
|
2134
|
+
p.msg = u.error, s && s(p);
|
|
2135
2135
|
}
|
|
2136
2136
|
});
|
|
2137
2137
|
}
|
|
2138
2138
|
async function C(e, n = void 0, t = void 0) {
|
|
2139
|
-
const
|
|
2140
|
-
return m(
|
|
2141
|
-
onComplete(
|
|
2142
|
-
const a = JSON.parse(
|
|
2139
|
+
const s = e._3DSwym + "/api/index/tk";
|
|
2140
|
+
return m(s, {
|
|
2141
|
+
onComplete(i, r, o) {
|
|
2142
|
+
const a = JSON.parse(i);
|
|
2143
2143
|
if (n)
|
|
2144
2144
|
return n(a), e.token = a?.result?.ServerToken;
|
|
2145
2145
|
},
|
|
2146
|
-
onFailure(
|
|
2147
|
-
t && t(
|
|
2146
|
+
onFailure(i) {
|
|
2147
|
+
t && t(i);
|
|
2148
2148
|
}
|
|
2149
2149
|
});
|
|
2150
2150
|
}
|
|
2151
2151
|
function Ot(e, n = void 0, t = void 0) {
|
|
2152
|
-
const
|
|
2152
|
+
const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
|
|
2153
2153
|
params: {
|
|
2154
2154
|
community_id: null,
|
|
2155
2155
|
hash_key: null,
|
|
@@ -2160,14 +2160,14 @@ function Ot(e, n = void 0, t = void 0) {
|
|
|
2160
2160
|
}
|
|
2161
2161
|
};
|
|
2162
2162
|
C(e, (r) => {
|
|
2163
|
-
m(
|
|
2163
|
+
m(s, {
|
|
2164
2164
|
method: "POST",
|
|
2165
2165
|
headers: {
|
|
2166
2166
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
2167
2167
|
"Content-type": "application/json;charset=UTF-8",
|
|
2168
2168
|
Accept: "application/json"
|
|
2169
2169
|
},
|
|
2170
|
-
data: JSON.stringify(
|
|
2170
|
+
data: JSON.stringify(i),
|
|
2171
2171
|
type: "json",
|
|
2172
2172
|
onComplete(o, a) {
|
|
2173
2173
|
n && n(o, a);
|
|
@@ -2179,7 +2179,7 @@ function Ot(e, n = void 0, t = void 0) {
|
|
|
2179
2179
|
});
|
|
2180
2180
|
}
|
|
2181
2181
|
function Tt(e, n = void 0, t = void 0) {
|
|
2182
|
-
const
|
|
2182
|
+
const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
2183
2183
|
params: {
|
|
2184
2184
|
idsToFilterArr: [],
|
|
2185
2185
|
mode: "offline",
|
|
@@ -2189,14 +2189,14 @@ function Tt(e, n = void 0, t = void 0) {
|
|
|
2189
2189
|
}
|
|
2190
2190
|
};
|
|
2191
2191
|
C(e, (r) => {
|
|
2192
|
-
m(
|
|
2192
|
+
m(s, {
|
|
2193
2193
|
method: "POST",
|
|
2194
2194
|
headers: {
|
|
2195
2195
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
2196
2196
|
"Content-type": "application/json;charset=UTF-8",
|
|
2197
2197
|
Accept: "application/json"
|
|
2198
2198
|
},
|
|
2199
|
-
data: JSON.stringify(
|
|
2199
|
+
data: JSON.stringify(i),
|
|
2200
2200
|
type: "json",
|
|
2201
2201
|
onComplete(o, a) {
|
|
2202
2202
|
const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
@@ -2209,14 +2209,14 @@ function Tt(e, n = void 0, t = void 0) {
|
|
|
2209
2209
|
});
|
|
2210
2210
|
}
|
|
2211
2211
|
function $t(e, n = void 0, t = void 0) {
|
|
2212
|
-
const
|
|
2212
|
+
const s = {
|
|
2213
2213
|
base: e._3DSwym,
|
|
2214
2214
|
uri: "/api/community/listmycommunities",
|
|
2215
2215
|
limit: `/limit/${e.limit ? e.limit : 500}`,
|
|
2216
2216
|
page: `/page/${e.page ? e.page : "1"}`
|
|
2217
|
-
},
|
|
2217
|
+
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
2218
2218
|
C(e, (o) => {
|
|
2219
|
-
m(
|
|
2219
|
+
m(i, {
|
|
2220
2220
|
method: "GET",
|
|
2221
2221
|
headers: {
|
|
2222
2222
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
@@ -2250,8 +2250,8 @@ function $t(e, n = void 0, t = void 0) {
|
|
|
2250
2250
|
});
|
|
2251
2251
|
});
|
|
2252
2252
|
}
|
|
2253
|
-
function he(e, n, t,
|
|
2254
|
-
const
|
|
2253
|
+
function he(e, n, t, s) {
|
|
2254
|
+
const i = `${e._3DSwym}/api/community/listmembers`, r = {
|
|
2255
2255
|
params: {
|
|
2256
2256
|
page: e.page ? e.page : 1,
|
|
2257
2257
|
limit: e.limit ? e.limit : 50,
|
|
@@ -2259,7 +2259,7 @@ function he(e, n, t, i) {
|
|
|
2259
2259
|
}
|
|
2260
2260
|
};
|
|
2261
2261
|
C(e, (o) => {
|
|
2262
|
-
m(
|
|
2262
|
+
m(i, {
|
|
2263
2263
|
method: "POST",
|
|
2264
2264
|
headers: {
|
|
2265
2265
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -2273,17 +2273,17 @@ function he(e, n, t, i) {
|
|
|
2273
2273
|
},
|
|
2274
2274
|
onFailure(a, c) {
|
|
2275
2275
|
const d = a;
|
|
2276
|
-
d.status = c.status, d.response = c.errormsg,
|
|
2276
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
2277
2277
|
}
|
|
2278
2278
|
});
|
|
2279
2279
|
});
|
|
2280
2280
|
}
|
|
2281
2281
|
function xt(e, n = void 0, t = void 0) {
|
|
2282
|
-
const
|
|
2283
|
-
e.commu_id || (e.commu_id =
|
|
2284
|
-
const
|
|
2282
|
+
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
2283
|
+
e.commu_id || (e.commu_id = s);
|
|
2284
|
+
const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
2285
2285
|
C(e, (r) => {
|
|
2286
|
-
m(
|
|
2286
|
+
m(i, {
|
|
2287
2287
|
method: "GET",
|
|
2288
2288
|
headers: {
|
|
2289
2289
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -2301,9 +2301,9 @@ function xt(e, n = void 0, t = void 0) {
|
|
|
2301
2301
|
});
|
|
2302
2302
|
});
|
|
2303
2303
|
}
|
|
2304
|
-
function Ut(e, n, t = void 0,
|
|
2305
|
-
const { listAllContacts:
|
|
2306
|
-
console.log("__listAllContacts",
|
|
2304
|
+
function Ut(e, n, t = void 0, s = void 0) {
|
|
2305
|
+
const { listAllContacts: i, currentUser: r, _3DSwym: o } = e;
|
|
2306
|
+
console.log("__listAllContacts", i.hits);
|
|
2307
2307
|
const a = `${o}/api/directmessages`, c = {
|
|
2308
2308
|
users: [r.login].concat(n.receipt)
|
|
2309
2309
|
}, d = {
|
|
@@ -2319,7 +2319,7 @@ function Ut(e, n, t = void 0, i = void 0) {
|
|
|
2319
2319
|
p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
|
|
2320
2320
|
},
|
|
2321
2321
|
(p) => {
|
|
2322
|
-
u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p),
|
|
2322
|
+
u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
|
|
2323
2323
|
}
|
|
2324
2324
|
), u === !1 && setTimeout(() => {
|
|
2325
2325
|
u === !1 && C(e, (p) => {
|
|
@@ -2338,16 +2338,16 @@ function Ut(e, n, t = void 0, i = void 0) {
|
|
|
2338
2338
|
},
|
|
2339
2339
|
onFailure(f, l, g) {
|
|
2340
2340
|
const h = f;
|
|
2341
|
-
h.msg = l.errormsg, h.status = l.status,
|
|
2341
|
+
h.msg = l.errormsg, h.status = l.status, s && s(h);
|
|
2342
2342
|
}
|
|
2343
2343
|
});
|
|
2344
2344
|
});
|
|
2345
2345
|
}, 500);
|
|
2346
2346
|
}
|
|
2347
|
-
function ye(e, n, t,
|
|
2348
|
-
const
|
|
2347
|
+
function ye(e, n, t, s) {
|
|
2348
|
+
const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
|
|
2349
2349
|
C(e, (r) => {
|
|
2350
|
-
m(
|
|
2350
|
+
m(i, {
|
|
2351
2351
|
method: "GET",
|
|
2352
2352
|
headers: {
|
|
2353
2353
|
Accept: "application/json,text/javascript,*/*",
|
|
@@ -2364,22 +2364,22 @@ function ye(e, n, t, i) {
|
|
|
2364
2364
|
f.push(l.login);
|
|
2365
2365
|
}), JSON.stringify(f) === JSON.stringify(d);
|
|
2366
2366
|
});
|
|
2367
|
-
t && u !== void 0 ? t(u) : (
|
|
2367
|
+
t && u !== void 0 ? t(u) : (s || u === void 0) && s(u);
|
|
2368
2368
|
},
|
|
2369
2369
|
onFailure(o) {
|
|
2370
2370
|
const a = o;
|
|
2371
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
2371
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
2372
2372
|
}
|
|
2373
2373
|
});
|
|
2374
2374
|
});
|
|
2375
2375
|
}
|
|
2376
|
-
function P(e, n, t = void 0,
|
|
2377
|
-
const
|
|
2376
|
+
function P(e, n, t = void 0, s = void 0) {
|
|
2377
|
+
const i = {
|
|
2378
2378
|
base: e._3DSwym,
|
|
2379
2379
|
uri: "/api/community",
|
|
2380
2380
|
id_msg: `${n.id_msg}`,
|
|
2381
2381
|
endUri: "/instantmessages"
|
|
2382
|
-
}, r = `${
|
|
2382
|
+
}, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
|
|
2383
2383
|
author: { login: n.senderId, displayName: n.senderName },
|
|
2384
2384
|
accessState: null,
|
|
2385
2385
|
commentUri: null,
|
|
@@ -2405,7 +2405,7 @@ function P(e, n, t = void 0, i = void 0) {
|
|
|
2405
2405
|
},
|
|
2406
2406
|
onFailure(c, d) {
|
|
2407
2407
|
const u = c;
|
|
2408
|
-
u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
2408
|
+
u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
|
|
2409
2409
|
}
|
|
2410
2410
|
});
|
|
2411
2411
|
});
|
|
@@ -2417,8 +2417,8 @@ function _e(e) {
|
|
|
2417
2417
|
<hr/>
|
|
2418
2418
|
<p><u>envoyer :</u>Le <b>${n} à ${t}</b></p>`;
|
|
2419
2419
|
}
|
|
2420
|
-
function Rt(e, n, t = void 0,
|
|
2421
|
-
const
|
|
2420
|
+
function Rt(e, n, t = void 0, s = void 0) {
|
|
2421
|
+
const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
2422
2422
|
(c) => c.id === n.community_id
|
|
2423
2423
|
), o = e.swymCommunities.find(
|
|
2424
2424
|
(c) => c.title.toLowerCase() === n.community_title.toLowerCase()
|
|
@@ -2440,7 +2440,7 @@ function Rt(e, n, t = void 0, i = void 0) {
|
|
|
2440
2440
|
Accept: "application/json",
|
|
2441
2441
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
2442
2442
|
};
|
|
2443
|
-
m(
|
|
2443
|
+
m(i, {
|
|
2444
2444
|
method: "POST",
|
|
2445
2445
|
headers: d,
|
|
2446
2446
|
data: JSON.stringify(a),
|
|
@@ -2451,16 +2451,16 @@ function Rt(e, n, t = void 0, i = void 0) {
|
|
|
2451
2451
|
},
|
|
2452
2452
|
onFailure(u, p, f) {
|
|
2453
2453
|
const l = u;
|
|
2454
|
-
l.status = p.status, l.response = p.errormsg,
|
|
2454
|
+
l.status = p.status, l.response = p.errormsg, s && s(l);
|
|
2455
2455
|
}
|
|
2456
2456
|
});
|
|
2457
2457
|
});
|
|
2458
2458
|
}
|
|
2459
2459
|
function Ft(e, n = void 0, t = void 0) {
|
|
2460
|
-
const
|
|
2460
|
+
const s = { base: e.space, uri: "/api/idea/add" };
|
|
2461
2461
|
if (!Array.isArray(e.swymCommunities)) {
|
|
2462
2462
|
const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
|
|
2463
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
2463
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
2464
2464
|
cause: o
|
|
2465
2465
|
});
|
|
2466
2466
|
}
|
|
@@ -2468,19 +2468,19 @@ function Ft(e, n = void 0, t = void 0) {
|
|
|
2468
2468
|
(o) => o.id === e.community_id
|
|
2469
2469
|
) === -1) {
|
|
2470
2470
|
const o = "la communauté n'existe pas dans la liste des communautés du Swym";
|
|
2471
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
2471
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
2472
2472
|
cause: o
|
|
2473
2473
|
});
|
|
2474
2474
|
}
|
|
2475
2475
|
if (e.community_id && e.community_id === "") {
|
|
2476
2476
|
const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
|
|
2477
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
2477
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
2478
2478
|
cause: o
|
|
2479
2479
|
});
|
|
2480
2480
|
}
|
|
2481
2481
|
if (e.title && e.title === "") {
|
|
2482
2482
|
const o = "☠️ title doit être un String.";
|
|
2483
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
2483
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
2484
2484
|
cause: o
|
|
2485
2485
|
});
|
|
2486
2486
|
}
|
|
@@ -2499,7 +2499,7 @@ function Ft(e, n = void 0, t = void 0) {
|
|
|
2499
2499
|
C(e, (o) => {
|
|
2500
2500
|
if (!o)
|
|
2501
2501
|
throw new Error(
|
|
2502
|
-
`☠️ token n'est pas disponible pour cette requête : ${
|
|
2502
|
+
`☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
|
|
2503
2503
|
{
|
|
2504
2504
|
cause: o
|
|
2505
2505
|
}
|
|
@@ -2518,7 +2518,7 @@ function Ft(e, n = void 0, t = void 0) {
|
|
|
2518
2518
|
},
|
|
2519
2519
|
onFailure(c, d, u) {
|
|
2520
2520
|
const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
|
|
2521
|
-
`Erreur sur cette requête : ${
|
|
2521
|
+
`Erreur sur cette requête : ${s.base + s.uri}`,
|
|
2522
2522
|
{
|
|
2523
2523
|
cause: { head: p, rep: f }
|
|
2524
2524
|
}
|
|
@@ -2526,18 +2526,18 @@ function Ft(e, n = void 0, t = void 0) {
|
|
|
2526
2526
|
t && t(l);
|
|
2527
2527
|
}
|
|
2528
2528
|
};
|
|
2529
|
-
m(
|
|
2529
|
+
m(s.base + s.uri, a);
|
|
2530
2530
|
});
|
|
2531
2531
|
}
|
|
2532
|
-
function Nt(e, n, t = void 0,
|
|
2533
|
-
const
|
|
2532
|
+
function Nt(e, n, t = void 0, s = void 0) {
|
|
2533
|
+
const i = `${e.space}/api/idea/delete`, r = {
|
|
2534
2534
|
params: {
|
|
2535
2535
|
community_id: n.community_id,
|
|
2536
2536
|
ideationIds: [n.idee_id]
|
|
2537
2537
|
}
|
|
2538
2538
|
};
|
|
2539
2539
|
C(e, (o) => {
|
|
2540
|
-
m(
|
|
2540
|
+
m(i, {
|
|
2541
2541
|
method: "POST",
|
|
2542
2542
|
headers: {
|
|
2543
2543
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -2551,13 +2551,13 @@ function Nt(e, n, t = void 0, i = void 0) {
|
|
|
2551
2551
|
},
|
|
2552
2552
|
onFailure(a, c, d) {
|
|
2553
2553
|
const u = a;
|
|
2554
|
-
u.status = c.status, u.response = c.errormsg,
|
|
2554
|
+
u.status = c.status, u.response = c.errormsg, s && s(u);
|
|
2555
2555
|
}
|
|
2556
2556
|
});
|
|
2557
2557
|
});
|
|
2558
2558
|
}
|
|
2559
2559
|
function It(e, n = void 0, t = void 0) {
|
|
2560
|
-
const { _3DSwym:
|
|
2560
|
+
const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
|
|
2561
2561
|
if (e.idPost === "") {
|
|
2562
2562
|
const a = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
|
|
2563
2563
|
throw new Error(`Erreur sur cette requête : ${r}`, { cause: a });
|
|
@@ -2572,7 +2572,7 @@ function It(e, n = void 0, t = void 0) {
|
|
|
2572
2572
|
headers: {
|
|
2573
2573
|
"Content-type": "application/json;charset=UTF-8",
|
|
2574
2574
|
Accept: "application/json",
|
|
2575
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2575
|
+
"X-DS-SWYM-CSRFTOKEN": i
|
|
2576
2576
|
},
|
|
2577
2577
|
data: JSON.stringify(o),
|
|
2578
2578
|
onComplete(a) {
|
|
@@ -2586,8 +2586,8 @@ function It(e, n = void 0, t = void 0) {
|
|
|
2586
2586
|
}
|
|
2587
2587
|
function kt(e, n, t) {
|
|
2588
2588
|
const {
|
|
2589
|
-
_3DSwym:
|
|
2590
|
-
_3DSwym_token:
|
|
2589
|
+
_3DSwym: s,
|
|
2590
|
+
_3DSwym_token: i,
|
|
2591
2591
|
idPost: r,
|
|
2592
2592
|
title: o,
|
|
2593
2593
|
community_id: a,
|
|
@@ -2595,14 +2595,14 @@ function kt(e, n, t) {
|
|
|
2595
2595
|
status_id: d,
|
|
2596
2596
|
message: u
|
|
2597
2597
|
} = e, p = {
|
|
2598
|
-
base: `${
|
|
2598
|
+
base: `${s}`,
|
|
2599
2599
|
uri: "/api/idea/edit"
|
|
2600
2600
|
}, l = {
|
|
2601
2601
|
method: "POST",
|
|
2602
2602
|
headers: {
|
|
2603
2603
|
"Content-type": "application/json;charset=UTF-8",
|
|
2604
2604
|
Accept: "application/json",
|
|
2605
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2605
|
+
"X-DS-SWYM-CSRFTOKEN": i
|
|
2606
2606
|
},
|
|
2607
2607
|
data: JSON.stringify({
|
|
2608
2608
|
params: {
|
|
@@ -2629,8 +2629,8 @@ function kt(e, n, t) {
|
|
|
2629
2629
|
};
|
|
2630
2630
|
m(p.base + p.uri, l);
|
|
2631
2631
|
}
|
|
2632
|
-
function jt(e, n, t = void 0,
|
|
2633
|
-
const { _3DSwym:
|
|
2632
|
+
function jt(e, n, t = void 0, s = void 0) {
|
|
2633
|
+
const { _3DSwym: i } = e;
|
|
2634
2634
|
let { community_id: r, limit: o, page: a, search: c } = n;
|
|
2635
2635
|
const d = [], u = 1;
|
|
2636
2636
|
let p = !1, f = 2;
|
|
@@ -2641,7 +2641,7 @@ function jt(e, n, t = void 0, i = void 0) {
|
|
|
2641
2641
|
limit: `/limit/${o}`,
|
|
2642
2642
|
page: `/page/${a}`
|
|
2643
2643
|
};
|
|
2644
|
-
let g = `${
|
|
2644
|
+
let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
|
|
2645
2645
|
C(e, (h) => {
|
|
2646
2646
|
const y = (S) => {
|
|
2647
2647
|
m(S, {
|
|
@@ -2652,7 +2652,7 @@ function jt(e, n, t = void 0, i = void 0) {
|
|
|
2652
2652
|
onComplete(w) {
|
|
2653
2653
|
const _ = { response: JSON.parse(w) };
|
|
2654
2654
|
if (f = Math.ceil(Number(_.response.nb_result) / 100), w && f >= a) {
|
|
2655
|
-
if (a++, l.page = `/page/${a}`, S = `${
|
|
2655
|
+
if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
|
|
2656
2656
|
d.push(_.response.result);
|
|
2657
2657
|
else {
|
|
2658
2658
|
const O = _.response.result.find(
|
|
@@ -2672,7 +2672,7 @@ function jt(e, n, t = void 0, i = void 0) {
|
|
|
2672
2672
|
},
|
|
2673
2673
|
onFailure(w, _) {
|
|
2674
2674
|
const O = w;
|
|
2675
|
-
O.status = _.status, O.response = _.errormsg,
|
|
2675
|
+
O.status = _.status, O.response = _.errormsg, s && s(O);
|
|
2676
2676
|
}
|
|
2677
2677
|
});
|
|
2678
2678
|
};
|
|
@@ -2755,9 +2755,9 @@ function Se(e) {
|
|
|
2755
2755
|
</p>` : e;
|
|
2756
2756
|
}
|
|
2757
2757
|
function vt(e, n = void 0, t = void 0) {
|
|
2758
|
-
const { tenant:
|
|
2759
|
-
if (
|
|
2760
|
-
const c = `${
|
|
2758
|
+
const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
|
|
2759
|
+
if (s && i && r && o && a) {
|
|
2760
|
+
const c = `${i}/api/idea/forward`;
|
|
2761
2761
|
m(c, {
|
|
2762
2762
|
method: "POST",
|
|
2763
2763
|
headers: {
|
|
@@ -2766,8 +2766,8 @@ function vt(e, n = void 0, t = void 0) {
|
|
|
2766
2766
|
"X-DS-SWYM-CSRFTOKEN": r
|
|
2767
2767
|
},
|
|
2768
2768
|
data: JSON.stringify({
|
|
2769
|
-
community_uri: `swym:prd:${
|
|
2770
|
-
content_uri: `swym:prd:${
|
|
2769
|
+
community_uri: `swym:prd:${s.toUpperCase()}:community:${o}`,
|
|
2770
|
+
content_uri: `swym:prd:${s.toUpperCase()}:idea:${a}`,
|
|
2771
2771
|
timeout: 3e4
|
|
2772
2772
|
}),
|
|
2773
2773
|
type: "json",
|
|
@@ -2788,7 +2788,7 @@ function vt(e, n = void 0, t = void 0) {
|
|
|
2788
2788
|
});
|
|
2789
2789
|
}
|
|
2790
2790
|
function Dt(e, n = void 0, t = void 0) {
|
|
2791
|
-
return new Promise((
|
|
2791
|
+
return new Promise((s, i) => {
|
|
2792
2792
|
try {
|
|
2793
2793
|
let r;
|
|
2794
2794
|
if (e._3DDashboard) {
|
|
@@ -2802,27 +2802,27 @@ function Dt(e, n = void 0, t = void 0) {
|
|
|
2802
2802
|
try {
|
|
2803
2803
|
p = JSON.parse(u);
|
|
2804
2804
|
} catch (f) {
|
|
2805
|
-
|
|
2805
|
+
i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
|
|
2806
2806
|
}
|
|
2807
|
-
p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", r = p,
|
|
2807
|
+
p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", r = p, s(p);
|
|
2808
2808
|
},
|
|
2809
2809
|
onFailure(a) {
|
|
2810
|
-
|
|
2810
|
+
i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
|
|
2811
2811
|
}
|
|
2812
2812
|
});
|
|
2813
2813
|
}
|
|
2814
|
-
r ?
|
|
2814
|
+
r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
|
|
2815
2815
|
} catch (r) {
|
|
2816
|
-
|
|
2816
|
+
i("ERROR | _3DSwym_get_currentUser => ", r);
|
|
2817
2817
|
}
|
|
2818
2818
|
});
|
|
2819
2819
|
}
|
|
2820
|
-
function At(e, n, t = void 0,
|
|
2821
|
-
const
|
|
2820
|
+
function At(e, n, t = void 0, s = void 0) {
|
|
2821
|
+
const i = e.space + "/api/user/find/login/" + n;
|
|
2822
2822
|
C(
|
|
2823
2823
|
e,
|
|
2824
2824
|
(r) => {
|
|
2825
|
-
m(
|
|
2825
|
+
m(i, {
|
|
2826
2826
|
method: "GET",
|
|
2827
2827
|
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
2828
2828
|
onComplete(o, a, c) {
|
|
@@ -2830,25 +2830,25 @@ function At(e, n, t = void 0, i = void 0) {
|
|
|
2830
2830
|
t && t(d);
|
|
2831
2831
|
},
|
|
2832
2832
|
onFailure(o) {
|
|
2833
|
-
|
|
2833
|
+
s && s(o);
|
|
2834
2834
|
}
|
|
2835
2835
|
});
|
|
2836
2836
|
},
|
|
2837
|
-
|
|
2837
|
+
s
|
|
2838
2838
|
);
|
|
2839
2839
|
}
|
|
2840
2840
|
function Pt(e, n = void 0, t = void 0) {
|
|
2841
2841
|
const {
|
|
2842
|
-
_3DSwym:
|
|
2843
|
-
_3DSwym_token:
|
|
2842
|
+
_3DSwym: s,
|
|
2843
|
+
_3DSwym_token: i,
|
|
2844
2844
|
subjectUri: r,
|
|
2845
2845
|
richMessage: o
|
|
2846
|
-
} = e, a = `${
|
|
2846
|
+
} = e, a = `${s}/commentproxy/subjects/${r}/comments`, d = {
|
|
2847
2847
|
method: "POST",
|
|
2848
2848
|
headers: {
|
|
2849
2849
|
"Content-type": "application/json;charset=UTF-8",
|
|
2850
2850
|
Accept: "application/json",
|
|
2851
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2851
|
+
"X-DS-SWYM-CSRFTOKEN": i
|
|
2852
2852
|
},
|
|
2853
2853
|
data: JSON.stringify({ richMessage: o }),
|
|
2854
2854
|
type: "json",
|
|
@@ -2865,16 +2865,16 @@ function Pt(e, n = void 0, t = void 0) {
|
|
|
2865
2865
|
m(a, d);
|
|
2866
2866
|
}
|
|
2867
2867
|
function Lt(e, n = void 0, t = void 0) {
|
|
2868
|
-
e.tenant && J(e, (
|
|
2869
|
-
const
|
|
2870
|
-
return n && n(
|
|
2868
|
+
e.tenant && J(e, (s) => {
|
|
2869
|
+
const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2870
|
+
return n && n(i), i;
|
|
2871
2871
|
});
|
|
2872
2872
|
}
|
|
2873
2873
|
function Jt(e, n = void 0, t = void 0) {
|
|
2874
|
-
e.tenant ? J(e, (
|
|
2875
|
-
const
|
|
2874
|
+
e.tenant ? J(e, (s) => {
|
|
2875
|
+
const i = s.services.find(
|
|
2876
2876
|
(a) => a.id === "3dpassport"
|
|
2877
|
-
)?.url, r =
|
|
2877
|
+
)?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?cors=false&service=${r}/auth/cas`;
|
|
2878
2878
|
m(o, {
|
|
2879
2879
|
async onComplete(a) {
|
|
2880
2880
|
const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
|
|
@@ -2892,32 +2892,32 @@ function Jt(e, n = void 0, t = void 0) {
|
|
|
2892
2892
|
}
|
|
2893
2893
|
function Mt(e, n = void 0, t = void 0) {
|
|
2894
2894
|
if (e.tenant) {
|
|
2895
|
-
const
|
|
2896
|
-
fetch(`https://api.uixhome.fr/${
|
|
2895
|
+
const s = e.tenant.toLowerCase();
|
|
2896
|
+
fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
|
|
2897
2897
|
method: "POST"
|
|
2898
|
-
}).then((
|
|
2899
|
-
n && n(
|
|
2900
|
-
}).catch((
|
|
2901
|
-
t && t(
|
|
2898
|
+
}).then((i) => i.json()).then((i) => {
|
|
2899
|
+
n && n(i);
|
|
2900
|
+
}).catch((i) => {
|
|
2901
|
+
t && t(i);
|
|
2902
2902
|
});
|
|
2903
2903
|
}
|
|
2904
2904
|
}
|
|
2905
|
-
async function Gt(e, n, t = void 0,
|
|
2905
|
+
async function Gt(e, n, t = void 0, s = void 0) {
|
|
2906
2906
|
if (e.tenant) {
|
|
2907
|
-
const
|
|
2907
|
+
const i = e.tenant.toLowerCase();
|
|
2908
2908
|
fetch(
|
|
2909
|
-
`https://api.uixhome.fr/${
|
|
2909
|
+
`https://api.uixhome.fr/${i}/iterop/repository/data/tables?t=${n}`,
|
|
2910
2910
|
{
|
|
2911
2911
|
method: "GET"
|
|
2912
2912
|
}
|
|
2913
2913
|
).then((r) => r.json()).then((r) => {
|
|
2914
2914
|
t && t(r);
|
|
2915
2915
|
}).catch((r) => {
|
|
2916
|
-
|
|
2916
|
+
s && s(r);
|
|
2917
2917
|
});
|
|
2918
2918
|
}
|
|
2919
2919
|
}
|
|
2920
|
-
function Bt(e, n, t,
|
|
2920
|
+
function Bt(e, n, t, s = void 0, i = void 0) {
|
|
2921
2921
|
if (e.tenant) {
|
|
2922
2922
|
const r = e.tenant.toLowerCase();
|
|
2923
2923
|
fetch(
|
|
@@ -2926,13 +2926,13 @@ function Bt(e, n, t, i = void 0, s = void 0) {
|
|
|
2926
2926
|
method: "POST"
|
|
2927
2927
|
}
|
|
2928
2928
|
).then((o) => o.json()).then((o) => {
|
|
2929
|
-
i && i(o);
|
|
2930
|
-
}).catch((o) => {
|
|
2931
2929
|
s && s(o);
|
|
2930
|
+
}).catch((o) => {
|
|
2931
|
+
i && i(o);
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
2934
|
}
|
|
2935
|
-
async function Et(e, n, t,
|
|
2935
|
+
async function Et(e, n, t, s = void 0, i = void 0) {
|
|
2936
2936
|
if (e.tenant) {
|
|
2937
2937
|
const r = e.tenant.toLowerCase();
|
|
2938
2938
|
fetch(
|
|
@@ -2944,32 +2944,32 @@ async function Et(e, n, t, i = void 0, s = void 0) {
|
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
2946
|
).then((o) => o.json()).then((o) => {
|
|
2947
|
-
i && i(o);
|
|
2948
|
-
}).catch((o) => {
|
|
2949
2947
|
s && s(o);
|
|
2948
|
+
}).catch((o) => {
|
|
2949
|
+
i && i(o);
|
|
2950
2950
|
});
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
|
-
async function Kt(e, n, t,
|
|
2953
|
+
async function Kt(e, n, t, s, i = void 0, r = void 0) {
|
|
2954
2954
|
if (e.tenant) {
|
|
2955
2955
|
const o = e.tenant.toLowerCase();
|
|
2956
2956
|
fetch(
|
|
2957
|
-
`https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${
|
|
2957
|
+
`https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${s}`,
|
|
2958
2958
|
{
|
|
2959
2959
|
method: "POST"
|
|
2960
2960
|
}
|
|
2961
2961
|
).then((a) => a.json()).then((a) => {
|
|
2962
|
-
|
|
2962
|
+
i && i(a);
|
|
2963
2963
|
}).catch((a) => {
|
|
2964
|
-
r && r(a, t,
|
|
2964
|
+
r && r(a, t, s);
|
|
2965
2965
|
});
|
|
2966
2966
|
}
|
|
2967
2967
|
}
|
|
2968
|
-
async function qt(e, n, t,
|
|
2968
|
+
async function qt(e, n, t, s, i, r = void 0, o = void 0) {
|
|
2969
2969
|
if (e.tenant) {
|
|
2970
2970
|
const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${t}?t=${n}&c=${encodeURIComponent(
|
|
2971
|
-
|
|
2972
|
-
)}&b=${encodeURIComponent(
|
|
2971
|
+
s
|
|
2972
|
+
)}&b=${encodeURIComponent(i)}`;
|
|
2973
2973
|
fetch(a, {
|
|
2974
2974
|
method: "POST"
|
|
2975
2975
|
}).then((c) => c.json()).then((c) => {
|
|
@@ -2978,21 +2978,21 @@ async function qt(e, n, t, i, s, r = void 0, o = void 0) {
|
|
|
2978
2978
|
o && o({
|
|
2979
2979
|
error: c,
|
|
2980
2980
|
tableId: t,
|
|
2981
|
-
columns:
|
|
2982
|
-
body:
|
|
2981
|
+
columns: s,
|
|
2982
|
+
body: i
|
|
2983
2983
|
});
|
|
2984
2984
|
});
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
|
-
async function Xt(e, n, t,
|
|
2987
|
+
async function Xt(e, n, t, s, i = void 0, r = void 0) {
|
|
2988
2988
|
if (e.tenant) {
|
|
2989
2989
|
const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${t}?t=${n}&b=${encodeURIComponent(
|
|
2990
|
-
|
|
2990
|
+
s
|
|
2991
2991
|
)}`;
|
|
2992
2992
|
fetch(o, {
|
|
2993
2993
|
method: "POST"
|
|
2994
2994
|
}).then((a) => a.json()).then((a) => {
|
|
2995
|
-
|
|
2995
|
+
i && i(a);
|
|
2996
2996
|
}).catch((a) => {
|
|
2997
2997
|
r && r({
|
|
2998
2998
|
error: a,
|
|
@@ -3001,7 +3001,7 @@ async function Xt(e, n, t, i, s = void 0, r = void 0) {
|
|
|
3001
3001
|
});
|
|
3002
3002
|
}
|
|
3003
3003
|
}
|
|
3004
|
-
async function Wt(e, n, t,
|
|
3004
|
+
async function Wt(e, n, t, s = void 0, i = void 0) {
|
|
3005
3005
|
if (e.tenant) {
|
|
3006
3006
|
const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${n}&b=${encodeURIComponent(
|
|
3007
3007
|
t
|
|
@@ -3009,31 +3009,31 @@ async function Wt(e, n, t, i = void 0, s = void 0) {
|
|
|
3009
3009
|
fetch(r, {
|
|
3010
3010
|
method: "POST"
|
|
3011
3011
|
}).then((o) => o.json()).then((o) => {
|
|
3012
|
-
|
|
3012
|
+
s && s(o);
|
|
3013
3013
|
}).catch((o) => {
|
|
3014
|
-
|
|
3014
|
+
i && i({
|
|
3015
3015
|
error: o,
|
|
3016
3016
|
url: r
|
|
3017
3017
|
});
|
|
3018
3018
|
});
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
3021
|
-
async function Vt(e, n, t,
|
|
3021
|
+
async function Vt(e, n, t, s, i = void 0, r = void 0) {
|
|
3022
3022
|
if (e.tenant) {
|
|
3023
3023
|
const o = e.tenant.toLowerCase();
|
|
3024
3024
|
fetch(
|
|
3025
|
-
`https://api.uixhome.fr/${o}/iterop/runtime/processes/${t}?t=${n}&b=${
|
|
3025
|
+
`https://api.uixhome.fr/${o}/iterop/runtime/processes/${t}?t=${n}&b=${s}`,
|
|
3026
3026
|
{
|
|
3027
3027
|
method: "POST"
|
|
3028
3028
|
}
|
|
3029
3029
|
).then((a) => a.json()).then((a) => {
|
|
3030
|
-
console.log("_Iterop_runProcess : OK"),
|
|
3030
|
+
console.log("_Iterop_runProcess : OK"), i && i(a);
|
|
3031
3031
|
}).catch((a) => {
|
|
3032
3032
|
r && r(a);
|
|
3033
3033
|
});
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
|
-
async function Yt(e, n, t,
|
|
3036
|
+
async function Yt(e, n, t, s = void 0, i = void 0) {
|
|
3037
3037
|
if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
|
|
3038
3038
|
const r = e.tenant.toLowerCase();
|
|
3039
3039
|
fetch(
|
|
@@ -3042,17 +3042,17 @@ async function Yt(e, n, t, i = void 0, s = void 0) {
|
|
|
3042
3042
|
method: "POST"
|
|
3043
3043
|
}
|
|
3044
3044
|
).then((o) => o.json()).then((o) => {
|
|
3045
|
-
i && i(o);
|
|
3046
|
-
}).catch((o) => {
|
|
3047
3045
|
s && s(o);
|
|
3046
|
+
}).catch((o) => {
|
|
3047
|
+
i && i(o);
|
|
3048
3048
|
});
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
|
-
async function zt(e, n, t,
|
|
3051
|
+
async function zt(e, n, t, s, i, r = void 0, o = void 0) {
|
|
3052
3052
|
if (e.tenant) {
|
|
3053
3053
|
const a = e.tenant.toLowerCase();
|
|
3054
3054
|
fetch(
|
|
3055
|
-
`https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${
|
|
3055
|
+
`https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${s}&b=${i}`,
|
|
3056
3056
|
{
|
|
3057
3057
|
method: "POST"
|
|
3058
3058
|
}
|
|
@@ -3063,23 +3063,23 @@ async function zt(e, n, t, i, s, r = void 0, o = void 0) {
|
|
|
3063
3063
|
});
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
3066
|
-
async function Ht(e, n, t,
|
|
3066
|
+
async function Ht(e, n, t, s, i = void 0, r = void 0) {
|
|
3067
3067
|
if (e.tenant) {
|
|
3068
3068
|
const o = e.tenant.toLowerCase();
|
|
3069
3069
|
fetch(
|
|
3070
|
-
`https://api.uixhome.fr/${o}/iterop/dependencytable/put/${t}/?t=${n}&b=${
|
|
3070
|
+
`https://api.uixhome.fr/${o}/iterop/dependencytable/put/${t}/?t=${n}&b=${s}`,
|
|
3071
3071
|
{
|
|
3072
3072
|
method: "POST"
|
|
3073
3073
|
}
|
|
3074
3074
|
).then((a) => a.json()).then((a) => {
|
|
3075
|
-
|
|
3075
|
+
i && i(a);
|
|
3076
3076
|
}).catch((a) => {
|
|
3077
3077
|
r && r(a);
|
|
3078
3078
|
});
|
|
3079
3079
|
}
|
|
3080
3080
|
}
|
|
3081
3081
|
//!SECTION
|
|
3082
|
-
async function Qt(e, n, t,
|
|
3082
|
+
async function Qt(e, n, t, s = void 0, i = void 0) {
|
|
3083
3083
|
if (e.tenant) {
|
|
3084
3084
|
const r = e.tenant.toLowerCase();
|
|
3085
3085
|
fetch(
|
|
@@ -3088,9 +3088,9 @@ async function Qt(e, n, t, i = void 0, s = void 0) {
|
|
|
3088
3088
|
method: "POST"
|
|
3089
3089
|
}
|
|
3090
3090
|
).then((o) => o.json()).then((o) => {
|
|
3091
|
-
i && i(o);
|
|
3092
|
-
}).catch((o) => {
|
|
3093
3091
|
s && s(o);
|
|
3092
|
+
}).catch((o) => {
|
|
3093
|
+
i && i(o);
|
|
3094
3094
|
});
|
|
3095
3095
|
}
|
|
3096
3096
|
}
|
|
@@ -3100,7 +3100,7 @@ function Zt(e) {
|
|
|
3100
3100
|
return console.log(n), n;
|
|
3101
3101
|
}
|
|
3102
3102
|
function en(e, n = void 0, t = void 0) {
|
|
3103
|
-
return console.log("credentials", e), new Promise((
|
|
3103
|
+
return console.log("credentials", e), new Promise((s) => {
|
|
3104
3104
|
if (e.token === "" && b(e), !e.space || e.space === "") {
|
|
3105
3105
|
const o = Z();
|
|
3106
3106
|
console.log("platformeInfo", o);
|
|
@@ -3116,7 +3116,7 @@ function en(e, n = void 0, t = void 0) {
|
|
|
3116
3116
|
},
|
|
3117
3117
|
!0
|
|
3118
3118
|
);
|
|
3119
|
-
const
|
|
3119
|
+
const i = T.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
3120
3120
|
m(r, {
|
|
3121
3121
|
onComplete(o) {
|
|
3122
3122
|
if (Array.isArray(JSON.parse(o))) {
|
|
@@ -3132,7 +3132,7 @@ function en(e, n = void 0, t = void 0) {
|
|
|
3132
3132
|
data: JSON.stringify({
|
|
3133
3133
|
with_indexing_date: !0,
|
|
3134
3134
|
with_nls: !1,
|
|
3135
|
-
label: `3DSearch-${
|
|
3135
|
+
label: `3DSearch-${i}`,
|
|
3136
3136
|
locale: "en",
|
|
3137
3137
|
select_predicate: [
|
|
3138
3138
|
"ds6w:label",
|