@beam3_dev/api_module 0.0.66 → 0.0.68
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 +281 -278
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +5 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as b } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function R() {
|
|
5
5
|
return M();
|
|
@@ -34,10 +34,10 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function ie(e, t = void 0,
|
|
38
|
-
const
|
|
37
|
+
async function ie(e, t = void 0, n = void 0) {
|
|
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: {
|
|
@@ -47,10 +47,10 @@ async function ie(e, t = void 0, s = void 0) {
|
|
|
47
47
|
).then((o) => o.json()).then((o) => {
|
|
48
48
|
t && t(o);
|
|
49
49
|
}).catch((o) => {
|
|
50
|
-
|
|
50
|
+
n && n(o), console.error("Erreur : " + o);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function re(e, t = void 0,
|
|
53
|
+
async function re(e, t = void 0, n = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -59,19 +59,19 @@ async function re(e, t = void 0, s = void 0) {
|
|
|
59
59
|
Accept: "application/json"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
).then((
|
|
63
|
-
t && t(
|
|
64
|
-
}).catch((
|
|
65
|
-
|
|
62
|
+
).then((s) => s.json()).then((s) => {
|
|
63
|
+
t && t(s);
|
|
64
|
+
}).catch((s) => {
|
|
65
|
+
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function ce(e, t = L) {
|
|
69
|
-
let
|
|
70
|
-
const
|
|
69
|
+
let n = b.now().year;
|
|
70
|
+
const s = e, o = [], c = (a) => {
|
|
71
71
|
for (let i in a)
|
|
72
72
|
o.push({ date: i, comment: a[i] });
|
|
73
73
|
};
|
|
74
|
-
for (let a =
|
|
74
|
+
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
76
76
|
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
|
|
77
77
|
{
|
|
@@ -84,59 +84,59 @@ async function ce(e, t = L) {
|
|
|
84
84
|
c(i);
|
|
85
85
|
}).catch((i) => console.error("Erreur : " + i));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
89
|
+
} : s;
|
|
90
90
|
for (let i of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start ===
|
|
92
|
+
(l) => l.start === b.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + i.comment,
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
95
|
+
start: b.fromISO(i.date).toISODate(),
|
|
96
|
+
end: b.fromISO(i.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function de(e, t,
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
async function de(e, t, n = !0) {
|
|
104
|
+
const s = e.events.findIndex((o) => o.uuid === t.uuid);
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, c) => o.start - c.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
|
-
O(["DS/WAFData/WAFData"], (
|
|
109
|
-
|
|
108
|
+
O(["DS/WAFData/WAFData"], (n) => {
|
|
109
|
+
n.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function le(e, t,
|
|
113
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
114
|
-
|
|
112
|
+
function le(e, t, n) {
|
|
113
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
114
|
+
s.draggable(e, { data: t, start: n });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
function pe(e, t = void 0) {
|
|
118
|
-
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (
|
|
119
|
-
let
|
|
120
|
-
|
|
118
|
+
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
119
|
+
let s;
|
|
120
|
+
s === void 0 && (s = n.createProxy({
|
|
121
121
|
widgetId: A.id,
|
|
122
122
|
filteringMode: "WithFilteringServices"
|
|
123
|
-
}), t !== void 0 &&
|
|
123
|
+
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
function ue(e, t) {
|
|
127
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
128
|
-
|
|
127
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
128
|
+
n.droppable(e, { drop: t });
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
async function fe(e, t = void 0,
|
|
131
|
+
async function fe(e, t = void 0, n = void 0) {
|
|
132
132
|
await O(
|
|
133
133
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
|
-
(
|
|
135
|
-
(!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices",
|
|
136
|
-
|
|
134
|
+
(s) => {
|
|
135
|
+
(!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
|
|
136
|
+
s.getPlatformServices({
|
|
137
137
|
platformId: e,
|
|
138
138
|
onComplete: t,
|
|
139
|
-
onFailure:
|
|
139
|
+
onFailure: n
|
|
140
140
|
})
|
|
141
141
|
));
|
|
142
142
|
}
|
|
@@ -145,24 +145,24 @@ async function fe(e, t = void 0, s = void 0) {
|
|
|
145
145
|
function me() {
|
|
146
146
|
let e = {};
|
|
147
147
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const
|
|
148
|
+
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
|
-
tenant:
|
|
153
|
-
user:
|
|
152
|
+
tenant: n,
|
|
153
|
+
user: s,
|
|
154
154
|
appsConfiguration: o,
|
|
155
155
|
appConf: c
|
|
156
156
|
};
|
|
157
157
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
158
158
|
}
|
|
159
|
-
function ge(e, t,
|
|
160
|
-
const
|
|
159
|
+
function ge(e, t, n) {
|
|
160
|
+
const s = {
|
|
161
161
|
base: `${e.space}`,
|
|
162
162
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
163
163
|
option: `?filter=${e.tenant}`
|
|
164
164
|
// facultatif
|
|
165
|
-
}, o = `${
|
|
165
|
+
}, o = `${s.base}${s.uri}${s.option}`;
|
|
166
166
|
f(o, {
|
|
167
167
|
method: "GET",
|
|
168
168
|
headers: {
|
|
@@ -178,33 +178,33 @@ function ge(e, t, s) {
|
|
|
178
178
|
},
|
|
179
179
|
onFailure(c, r) {
|
|
180
180
|
const a = c;
|
|
181
|
-
a.msg = r.errormsg, a.errCode = r.errorcode,
|
|
181
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function he(e, t = void 0,
|
|
186
|
-
let
|
|
187
|
-
f(
|
|
185
|
+
function he(e, t = void 0, n = void 0) {
|
|
186
|
+
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
|
+
f(s, {
|
|
188
188
|
onComplete(o, c, r) {
|
|
189
189
|
const a = JSON.parse(o);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
192
|
onFailure(o, c) {
|
|
193
193
|
const r = o;
|
|
194
|
-
r.msg = c.errormsg, r.errCode = c.errorcode,
|
|
194
|
+
r.msg = c.errormsg, r.errCode = c.errorcode, n && n(r);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function Se(e, t,
|
|
198
|
+
function Se(e, t, n = void 0, s = void 0) {
|
|
199
199
|
let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
200
|
f(o, {
|
|
201
201
|
onComplete(c, r, a) {
|
|
202
202
|
const i = JSON.parse(c);
|
|
203
|
-
|
|
203
|
+
n && n(i);
|
|
204
204
|
},
|
|
205
205
|
onFailure(c, r) {
|
|
206
206
|
const a = c;
|
|
207
|
-
a.msg = r.errormsg, a.errCode = r.errorcode,
|
|
207
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -212,7 +212,7 @@ const F = {
|
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
|
-
function _e(e, t,
|
|
215
|
+
function _e(e, t, n = void 0, s = void 0) {
|
|
216
216
|
const { space: o, currentUser: c } = e, a = `${o}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
218
|
}.URIUGr}`, i = {
|
|
@@ -232,16 +232,16 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
232
232
|
headers: F,
|
|
233
233
|
data: JSON.stringify(i),
|
|
234
234
|
onComplete(d) {
|
|
235
|
-
|
|
235
|
+
n && n(JSON.parse(d));
|
|
236
236
|
},
|
|
237
237
|
onFailure(d, l) {
|
|
238
238
|
console.log(d);
|
|
239
239
|
const p = d;
|
|
240
|
-
p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p),
|
|
240
|
+
p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
function ye(e, t,
|
|
244
|
+
function ye(e, t, n = void 0, s = void 0) {
|
|
245
245
|
const { space: o, tenant: c } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${i}`;
|
|
246
246
|
f(d, {
|
|
247
247
|
opts: {
|
|
@@ -252,16 +252,16 @@ function ye(e, t, s = void 0, n = void 0) {
|
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
onComplete(u) {
|
|
255
|
-
|
|
255
|
+
n && n(JSON.parse(u));
|
|
256
256
|
},
|
|
257
257
|
onFailure(u, m) {
|
|
258
258
|
const g = u;
|
|
259
|
-
g.msg = m.errormsg, g.errCode = m.errorcode,
|
|
259
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
function E(e, t = void 0,
|
|
264
|
-
const { space:
|
|
263
|
+
function E(e, t = void 0, n = void 0) {
|
|
264
|
+
const { space: s, tenant: o } = e, c = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
267
|
}, d = `${c}${r}${a}`;
|
|
@@ -272,12 +272,12 @@ function E(e, t = void 0, s = void 0) {
|
|
|
272
272
|
},
|
|
273
273
|
onFailure(l, p) {
|
|
274
274
|
const u = l;
|
|
275
|
-
u.msg = p.errormsg, u.errCode = p.errorcode,
|
|
275
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
function we(e, t = void 0,
|
|
280
|
-
const { space:
|
|
279
|
+
function we(e, t = void 0, n = void 0) {
|
|
280
|
+
const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
281
281
|
"Content-Type": "application/json",
|
|
282
282
|
Accept: "application/json,text/javascript,*/*"
|
|
283
283
|
} };
|
|
@@ -294,13 +294,13 @@ function we(e, t = void 0, s = void 0) {
|
|
|
294
294
|
u.rules = _, t && t(u);
|
|
295
295
|
},
|
|
296
296
|
(_) => {
|
|
297
|
-
|
|
297
|
+
n && n(_);
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
},
|
|
302
302
|
onFailure(l) {
|
|
303
|
-
|
|
303
|
+
n && n(l);
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
} catch (l) {
|
|
@@ -308,12 +308,12 @@ function we(e, t = void 0, s = void 0) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function Te(e, t) {
|
|
311
|
-
const { space:
|
|
311
|
+
const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
312
|
f(o, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function Ce(e, t,
|
|
316
|
+
function Ce(e, t, n, s = void 0, o = void 0) {
|
|
317
317
|
const { space: c, tenant: r } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -322,36 +322,36 @@ function Ce(e, t, s, n = void 0, o = void 0) {
|
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
324
|
OPTsTenant: `tenant=dstenant:${r}`
|
|
325
|
-
}, i =
|
|
325
|
+
}, i = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
|
|
326
326
|
f(d, {
|
|
327
327
|
headers: F,
|
|
328
328
|
method: "PATCH",
|
|
329
329
|
data: l,
|
|
330
330
|
type: "json",
|
|
331
331
|
onComplete(p) {
|
|
332
|
-
|
|
332
|
+
s && s(p);
|
|
333
333
|
},
|
|
334
334
|
onFailure(p) {
|
|
335
335
|
o && o(p);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function Oe(e, t,
|
|
339
|
+
function Oe(e, t, n, s = void 0, o = void 0) {
|
|
340
340
|
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
f(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: F,
|
|
344
|
-
data: JSON.stringify(
|
|
344
|
+
data: JSON.stringify(n),
|
|
345
345
|
type: "json",
|
|
346
346
|
onComplete(d) {
|
|
347
|
-
|
|
347
|
+
s && s(d);
|
|
348
348
|
},
|
|
349
349
|
onFailure(d) {
|
|
350
350
|
o && o(d);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Ne(e, t, n = void 0, s = void 0) {
|
|
355
355
|
const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
356
|
f(r, {
|
|
357
357
|
opts: {
|
|
@@ -362,27 +362,27 @@ function be(e, t, s = void 0, n = void 0) {
|
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
onComplete(d) {
|
|
365
|
-
|
|
365
|
+
n && n(JSON.parse(d));
|
|
366
366
|
},
|
|
367
367
|
onFailure(d) {
|
|
368
|
-
|
|
368
|
+
s && s(d);
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
async function J(e, t,
|
|
372
|
+
async function J(e, t, n) {
|
|
373
373
|
if (e.space) {
|
|
374
|
-
const
|
|
375
|
-
f(
|
|
374
|
+
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
375
|
+
f(s, {
|
|
376
376
|
onComplete(o) {
|
|
377
377
|
o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
|
|
378
378
|
},
|
|
379
379
|
onFailure(o, c, r) {
|
|
380
|
-
|
|
380
|
+
n && n({ error: o, headers: c, xhr: r });
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
async function G(e, t = void 0,
|
|
385
|
+
async function G(e, t = void 0, n = void 0, s = void 0) {
|
|
386
386
|
const o = e.space;
|
|
387
387
|
if (t === void 0) {
|
|
388
388
|
console.log("Le paramètre docid est obligatoire");
|
|
@@ -392,53 +392,53 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
|
|
|
392
392
|
f(c, {
|
|
393
393
|
onComplete(r, a, i) {
|
|
394
394
|
const d = JSON.parse(r);
|
|
395
|
-
|
|
395
|
+
n && n(d);
|
|
396
396
|
},
|
|
397
397
|
onFailure(r) {
|
|
398
|
-
|
|
398
|
+
s && s(r);
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
function k(e, t = void 0,
|
|
402
|
+
function k(e, t = void 0, n = void 0) {
|
|
403
403
|
if (e.objID && e.objID !== "") {
|
|
404
|
-
let
|
|
405
|
-
console.log("_3DSpace_get_csrf / url",
|
|
404
|
+
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
|
+
console.log("_3DSpace_get_csrf / url", s), f(s, {
|
|
406
406
|
onComplete(o, c, r) {
|
|
407
407
|
const a = JSON.parse(o);
|
|
408
408
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
409
|
},
|
|
410
410
|
onFailure(o) {
|
|
411
|
-
|
|
411
|
+
n && n(o);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
} else
|
|
415
415
|
C(
|
|
416
416
|
e,
|
|
417
|
-
(
|
|
418
|
-
console.log("_3DSpace_get_csrf / _3DSpace_csrf",
|
|
417
|
+
(s) => {
|
|
418
|
+
console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
|
|
419
419
|
},
|
|
420
|
-
(
|
|
421
|
-
|
|
420
|
+
(s) => {
|
|
421
|
+
n && n(s);
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
function C(e, t = void 0,
|
|
425
|
+
function C(e, t = void 0, n = void 0) {
|
|
426
426
|
if (e.space) {
|
|
427
|
-
const
|
|
428
|
-
f(
|
|
427
|
+
const s = e.space + "/resources/v1/application/CSRF";
|
|
428
|
+
f(s, {
|
|
429
429
|
onComplete(o, c, r) {
|
|
430
430
|
const a = JSON.parse(o);
|
|
431
431
|
console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
433
|
onFailure(o, c, r) {
|
|
434
|
-
|
|
434
|
+
n && n({ response: o, headers: c, xhr: r });
|
|
435
435
|
}
|
|
436
436
|
});
|
|
437
437
|
} else
|
|
438
|
-
|
|
438
|
+
n && n("ERROR : url du 3DSpace non défini.");
|
|
439
439
|
}
|
|
440
|
-
function U(e, t = void 0,
|
|
441
|
-
let
|
|
440
|
+
function U(e, t = void 0, n = void 0) {
|
|
441
|
+
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
442
442
|
k(
|
|
443
443
|
e,
|
|
444
444
|
(o) => {
|
|
@@ -446,7 +446,7 @@ function U(e, t = void 0, s = void 0) {
|
|
|
446
446
|
"_3DSpace_get_ticket / onComplete / ☠️ info => ",
|
|
447
447
|
o,
|
|
448
448
|
e.token
|
|
449
|
-
), f(
|
|
449
|
+
), f(s, {
|
|
450
450
|
method: "PUT",
|
|
451
451
|
headers: {
|
|
452
452
|
ENO_CSRF_TOKEN: e.token
|
|
@@ -456,28 +456,28 @@ function U(e, t = void 0, s = void 0) {
|
|
|
456
456
|
console.log("le ticket est dans la callback"), t && t(a);
|
|
457
457
|
},
|
|
458
458
|
onFailure(c, r) {
|
|
459
|
-
console.warn("☠️ error => ", c, r),
|
|
459
|
+
console.warn("☠️ error => ", c, r), n && n(c, r);
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
},
|
|
463
463
|
(o) => {
|
|
464
|
-
console.warn("_3DSpace_get_ticket / error => ", o),
|
|
464
|
+
console.warn("_3DSpace_get_ticket / error => ", o), n && n(o);
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function be(e, t, n, s = void 0, o = void 0) {
|
|
469
469
|
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
|
-
|
|
470
|
+
n || (n = e.token), f(c, {
|
|
471
471
|
method: "PUT",
|
|
472
472
|
headers: {
|
|
473
|
-
ENO_CSRF_TOKEN:
|
|
473
|
+
ENO_CSRF_TOKEN: n
|
|
474
474
|
},
|
|
475
475
|
onComplete(r) {
|
|
476
476
|
let a = JSON.parse(r);
|
|
477
477
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
478
478
|
try {
|
|
479
479
|
const i = a.data[0].dataelements.ticketURL;
|
|
480
|
-
|
|
480
|
+
s && s(i);
|
|
481
481
|
} catch (i) {
|
|
482
482
|
o && o(i);
|
|
483
483
|
}
|
|
@@ -487,7 +487,7 @@ function Ne(e, t, s, n = void 0, o = void 0) {
|
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function K(e, t,
|
|
490
|
+
function K(e, t, n, s, o, c = void 0, r = void 0) {
|
|
491
491
|
k(
|
|
492
492
|
e,
|
|
493
493
|
t,
|
|
@@ -495,8 +495,8 @@ function K(e, t, s, n, o, c = void 0, r = void 0) {
|
|
|
495
495
|
W(
|
|
496
496
|
e,
|
|
497
497
|
t,
|
|
498
|
-
s,
|
|
499
498
|
n,
|
|
499
|
+
s,
|
|
500
500
|
o,
|
|
501
501
|
a.csrf.value,
|
|
502
502
|
c,
|
|
@@ -505,7 +505,7 @@ function K(e, t, s, n, o, c = void 0, r = void 0) {
|
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function W(e, t,
|
|
508
|
+
function W(e, t, n, s, o, c, r = void 0, a = void 0) {
|
|
509
509
|
const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
510
|
f(i, {
|
|
511
511
|
method: "PUT",
|
|
@@ -514,7 +514,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
|
|
|
514
514
|
},
|
|
515
515
|
onComplete(d, l, p) {
|
|
516
516
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
517
|
-
m.append("__fcs__jobTicket", u.ticket), m.append("file_0",
|
|
517
|
+
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
|
|
518
518
|
const g = {};
|
|
519
519
|
g.method = "POST", g.data = m, g.onComplete = function(h) {
|
|
520
520
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -529,7 +529,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
|
|
|
529
529
|
relateddata: {
|
|
530
530
|
files: [
|
|
531
531
|
{
|
|
532
|
-
id:
|
|
532
|
+
id: n,
|
|
533
533
|
dataelements: {
|
|
534
534
|
title: o,
|
|
535
535
|
receipt: h
|
|
@@ -560,7 +560,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
|
|
|
560
560
|
}
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
|
-
async function ke(e, t,
|
|
563
|
+
async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
564
564
|
const r = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
565
565
|
type: "text/plain"
|
|
566
566
|
}), p = {
|
|
@@ -578,7 +578,7 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
|
|
|
578
578
|
},
|
|
579
579
|
onComplete(u, m, g) {
|
|
580
580
|
const h = JSON.parse(u).data[0].dataelements;
|
|
581
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
581
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
|
|
582
582
|
const S = {
|
|
583
583
|
method: "POST",
|
|
584
584
|
data: d,
|
|
@@ -596,15 +596,15 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
|
|
|
596
596
|
{
|
|
597
597
|
type: "Document",
|
|
598
598
|
dataelements: {
|
|
599
|
-
title: `Title_${
|
|
599
|
+
title: `Title_${n.toLowerCase().split(" ").join("_")}`,
|
|
600
600
|
policy: "Document Release",
|
|
601
|
-
description:
|
|
601
|
+
description: s
|
|
602
602
|
},
|
|
603
603
|
relateddata: {
|
|
604
604
|
files: [
|
|
605
605
|
{
|
|
606
606
|
dataelements: {
|
|
607
|
-
title: `${
|
|
607
|
+
title: `${n}.json`,
|
|
608
608
|
receipt: T
|
|
609
609
|
}
|
|
610
610
|
}
|
|
@@ -636,7 +636,7 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
|
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function N(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
640
640
|
const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
641
641
|
f(r, {
|
|
642
642
|
method: "GET",
|
|
@@ -652,10 +652,10 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
|
|
|
652
652
|
(h, S, _) => S === _.findIndex(
|
|
653
653
|
(y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
|
|
654
654
|
)
|
|
655
|
-
),
|
|
655
|
+
), n && (Array.isArray(n) ? n.forEach((h) => {
|
|
656
656
|
u || g.forEach((S) => {
|
|
657
|
-
if (h === S.role.name &&
|
|
658
|
-
u = h, p =
|
|
657
|
+
if (h === S.role.name && s === S.organization.title)
|
|
658
|
+
u = h, p = s;
|
|
659
659
|
else if (h === S.role.name) {
|
|
660
660
|
let _ = g.filter(
|
|
661
661
|
(y) => y.role.name === h
|
|
@@ -664,11 +664,11 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
|
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
666
|
}) : g.forEach((h) => {
|
|
667
|
-
if (
|
|
668
|
-
u =
|
|
669
|
-
else if (
|
|
667
|
+
if (n === h.role.name && s === h.organization.title)
|
|
668
|
+
u = n, p = s;
|
|
669
|
+
else if (n === h.role.name) {
|
|
670
670
|
let S = g.filter(
|
|
671
|
-
(_) => _.role.name ===
|
|
671
|
+
(_) => _.role.name === n
|
|
672
672
|
);
|
|
673
673
|
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
|
|
674
674
|
}
|
|
@@ -682,48 +682,51 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
|
|
|
682
682
|
}
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
async function I(e, t = void 0,
|
|
686
|
-
|
|
687
|
-
return (!n || n === "") && console.warn(
|
|
685
|
+
async function I(e, t = void 0, n = void 0) {
|
|
686
|
+
return (!e.objID || e.objID === "") && console.warn(
|
|
688
687
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
689
688
|
), (e.space === "" || !e.space) && console.warn(
|
|
690
689
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
691
690
|
), (e.token === "" || !e.token) && (J(
|
|
692
691
|
e,
|
|
693
|
-
(
|
|
694
|
-
e.token =
|
|
692
|
+
(o) => {
|
|
693
|
+
e.token = o;
|
|
695
694
|
},
|
|
696
|
-
(
|
|
697
|
-
console.log("☠️ error => ",
|
|
695
|
+
(o) => {
|
|
696
|
+
console.log("☠️ error => ", o);
|
|
698
697
|
}
|
|
699
698
|
), console.warn(
|
|
700
699
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
701
|
-
)), console.log("_3DSpace_download_doc / credentials", e), new Promise((
|
|
700
|
+
)), console.log("_3DSpace_download_doc / credentials", e), new Promise((o, c) => {
|
|
702
701
|
U(
|
|
703
702
|
e,
|
|
704
|
-
(
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
"Content-Type": "application/json",
|
|
708
|
-
Accept: "application/json",
|
|
703
|
+
(r) => {
|
|
704
|
+
setTimeout(() => {
|
|
705
|
+
const a = {
|
|
709
706
|
ENO_CSRF_TOKEN: e.token
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
707
|
+
};
|
|
708
|
+
f(r, {
|
|
709
|
+
headers: a,
|
|
710
|
+
onComplete(i) {
|
|
711
|
+
const d = JSON.parse(i);
|
|
712
|
+
console.log(
|
|
713
|
+
"_3DSpace_download_doc / reponse (liste d'objetsID) ",
|
|
714
|
+
d
|
|
715
|
+
), t && t(d), o(d);
|
|
716
|
+
},
|
|
717
|
+
onFailure(i, d, l) {
|
|
718
|
+
n && (console.log("error http", i), n({ msg: JSON.parse(i), headers: d, xhr: l }), c({ msg: JSON.parse(i), headers: d, xhr: l }));
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
}, 1e3);
|
|
719
722
|
},
|
|
720
|
-
(
|
|
721
|
-
|
|
723
|
+
(r) => {
|
|
724
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), c(r);
|
|
722
725
|
}
|
|
723
726
|
);
|
|
724
727
|
});
|
|
725
728
|
}
|
|
726
|
-
async function X(e, t,
|
|
729
|
+
async function X(e, t, n = void 0, s = void 0) {
|
|
727
730
|
let o = [];
|
|
728
731
|
for (let a = 0; a < t.length; a += 80) {
|
|
729
732
|
const i = t.slice(a, a + 80);
|
|
@@ -737,13 +740,13 @@ async function X(e, t, s = void 0, n = void 0) {
|
|
|
737
740
|
a++, a < o.length && r(a);
|
|
738
741
|
},
|
|
739
742
|
(i) => {
|
|
740
|
-
|
|
743
|
+
n && n(i);
|
|
741
744
|
}
|
|
742
745
|
);
|
|
743
746
|
};
|
|
744
747
|
r(0);
|
|
745
748
|
}
|
|
746
|
-
function V(e, t,
|
|
749
|
+
function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
747
750
|
const c = [];
|
|
748
751
|
t.forEach((i) => {
|
|
749
752
|
c.push({
|
|
@@ -764,12 +767,12 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
|
|
|
764
767
|
type: "json",
|
|
765
768
|
onComplete(i) {
|
|
766
769
|
const d = i.data;
|
|
767
|
-
i.success === !0 && (
|
|
770
|
+
i.success === !0 && (n && n(), d.forEach((l) => {
|
|
768
771
|
try {
|
|
769
772
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
770
773
|
f(u, {
|
|
771
774
|
onComplete: (m) => {
|
|
772
|
-
|
|
775
|
+
s && s({
|
|
773
776
|
objectId: l.id,
|
|
774
777
|
fileName: p,
|
|
775
778
|
data: JSON.parse(m)
|
|
@@ -789,11 +792,11 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
|
|
|
789
792
|
}
|
|
790
793
|
});
|
|
791
794
|
}
|
|
792
|
-
function De(e, t,
|
|
795
|
+
function De(e, t, n = void 0, s = void 0) {
|
|
793
796
|
return new Promise((o) => {
|
|
794
797
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
795
798
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
796
|
-
|
|
799
|
+
N(
|
|
797
800
|
e.space,
|
|
798
801
|
"ESPACE COMMUN",
|
|
799
802
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -820,21 +823,21 @@ function De(e, t, s = void 0, n = void 0) {
|
|
|
820
823
|
}),
|
|
821
824
|
type: "json",
|
|
822
825
|
onComplete(a) {
|
|
823
|
-
|
|
826
|
+
n && n(a);
|
|
824
827
|
},
|
|
825
828
|
onFailure(a) {
|
|
826
|
-
|
|
829
|
+
s && s(a);
|
|
827
830
|
}
|
|
828
831
|
};
|
|
829
832
|
f(c, r);
|
|
830
833
|
}
|
|
831
834
|
});
|
|
832
835
|
}
|
|
833
|
-
function Fe(e, t,
|
|
836
|
+
function Fe(e, t, n, s = void 0, o = void 0) {
|
|
834
837
|
return new Promise((c) => {
|
|
835
838
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
836
839
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
837
|
-
|
|
840
|
+
N(
|
|
838
841
|
e.space,
|
|
839
842
|
"ESPACE COMMUN",
|
|
840
843
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -856,13 +859,13 @@ function Fe(e, t, s, n = void 0, o = void 0) {
|
|
|
856
859
|
data: [
|
|
857
860
|
{
|
|
858
861
|
id: t,
|
|
859
|
-
nextState:
|
|
862
|
+
nextState: n
|
|
860
863
|
}
|
|
861
864
|
]
|
|
862
865
|
}),
|
|
863
866
|
type: "json",
|
|
864
867
|
onComplete(i) {
|
|
865
|
-
|
|
868
|
+
s && s(i);
|
|
866
869
|
},
|
|
867
870
|
onFailure(i) {
|
|
868
871
|
o && o(i);
|
|
@@ -872,11 +875,11 @@ function Fe(e, t, s, n = void 0, o = void 0) {
|
|
|
872
875
|
}
|
|
873
876
|
});
|
|
874
877
|
}
|
|
875
|
-
function Ue(e, t,
|
|
878
|
+
function Ue(e, t, n = void 0, s = void 0) {
|
|
876
879
|
return new Promise((o) => {
|
|
877
880
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
878
881
|
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
879
|
-
|
|
882
|
+
N(
|
|
880
883
|
e.space,
|
|
881
884
|
"ESPACE COMMUN",
|
|
882
885
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -903,21 +906,21 @@ function Ue(e, t, s = void 0, n = void 0) {
|
|
|
903
906
|
}),
|
|
904
907
|
type: "json",
|
|
905
908
|
onComplete(a) {
|
|
906
|
-
|
|
909
|
+
n && n(a);
|
|
907
910
|
},
|
|
908
911
|
onFailure(a) {
|
|
909
|
-
|
|
912
|
+
s && s(a);
|
|
910
913
|
}
|
|
911
914
|
};
|
|
912
915
|
f(c, r);
|
|
913
916
|
}
|
|
914
917
|
});
|
|
915
918
|
}
|
|
916
|
-
function $e(e, t,
|
|
919
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
917
920
|
return new Promise((o) => {
|
|
918
921
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
919
922
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
920
|
-
|
|
923
|
+
N(
|
|
921
924
|
e.space,
|
|
922
925
|
"ESPACE COMMUN",
|
|
923
926
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -950,21 +953,21 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
950
953
|
}),
|
|
951
954
|
type: "json",
|
|
952
955
|
onComplete(a) {
|
|
953
|
-
|
|
956
|
+
n && n(a);
|
|
954
957
|
},
|
|
955
958
|
onFailure(a) {
|
|
956
|
-
|
|
959
|
+
s && s(a);
|
|
957
960
|
}
|
|
958
961
|
};
|
|
959
962
|
f(c, r);
|
|
960
963
|
}
|
|
961
964
|
});
|
|
962
965
|
}
|
|
963
|
-
function je(e, t,
|
|
966
|
+
function je(e, t, n, s = void 0, o = void 0) {
|
|
964
967
|
return new Promise((c) => {
|
|
965
968
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
966
969
|
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
967
|
-
|
|
970
|
+
N(
|
|
968
971
|
e.space,
|
|
969
972
|
"ESPACE COMMUN",
|
|
970
973
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -986,9 +989,9 @@ function je(e, t, s, n = void 0, o = void 0) {
|
|
|
986
989
|
data: [
|
|
987
990
|
{
|
|
988
991
|
physicalid: t,
|
|
989
|
-
proposedRevision:
|
|
992
|
+
proposedRevision: n,
|
|
990
993
|
modifiedAttributes: {
|
|
991
|
-
revision:
|
|
994
|
+
revision: n
|
|
992
995
|
}
|
|
993
996
|
}
|
|
994
997
|
],
|
|
@@ -997,7 +1000,7 @@ function je(e, t, s, n = void 0, o = void 0) {
|
|
|
997
1000
|
}),
|
|
998
1001
|
type: "json",
|
|
999
1002
|
onComplete(i) {
|
|
1000
|
-
|
|
1003
|
+
s && s(i);
|
|
1001
1004
|
},
|
|
1002
1005
|
onFailure(i) {
|
|
1003
1006
|
o && o(i);
|
|
@@ -1008,12 +1011,12 @@ function je(e, t, s, n = void 0, o = void 0) {
|
|
|
1008
1011
|
});
|
|
1009
1012
|
}
|
|
1010
1013
|
//!SECTION
|
|
1011
|
-
function Ae(e, t = void 0,
|
|
1012
|
-
const
|
|
1014
|
+
function Ae(e, t = void 0, n = void 0) {
|
|
1015
|
+
const s = {
|
|
1013
1016
|
base: `${e.space}`,
|
|
1014
1017
|
uri: "/resources/bps/cspaces",
|
|
1015
1018
|
optTenant: `tenant=${e.tenant}`
|
|
1016
|
-
}, o = `${
|
|
1019
|
+
}, o = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1017
1020
|
f(o, {
|
|
1018
1021
|
method: "GET",
|
|
1019
1022
|
headers: {
|
|
@@ -1025,11 +1028,11 @@ function Ae(e, t = void 0, s = void 0) {
|
|
|
1025
1028
|
t && t(a, r);
|
|
1026
1029
|
},
|
|
1027
1030
|
onFailure(c, r, a) {
|
|
1028
|
-
|
|
1031
|
+
n && n({ response: c, headers: r, xhr: a });
|
|
1029
1032
|
}
|
|
1030
1033
|
});
|
|
1031
1034
|
}
|
|
1032
|
-
function Re(e, t,
|
|
1035
|
+
function Re(e, t, n, s) {
|
|
1033
1036
|
U(
|
|
1034
1037
|
e.space,
|
|
1035
1038
|
t,
|
|
@@ -1037,42 +1040,42 @@ function Re(e, t, s, n) {
|
|
|
1037
1040
|
f(o, {
|
|
1038
1041
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1039
1042
|
onComplete: (c) => {
|
|
1040
|
-
|
|
1043
|
+
n && n(c);
|
|
1041
1044
|
},
|
|
1042
1045
|
onFailure: (c) => {
|
|
1043
|
-
console.log("error http", c),
|
|
1046
|
+
console.log("error http", c), s && s(c);
|
|
1044
1047
|
}
|
|
1045
1048
|
});
|
|
1046
1049
|
}
|
|
1047
1050
|
);
|
|
1048
1051
|
}
|
|
1049
|
-
async function Ie(e, t,
|
|
1052
|
+
async function Ie(e, t, n = void 0, s = void 0) {
|
|
1050
1053
|
return new Promise((o) => {
|
|
1051
1054
|
U(e, t, (c) => {
|
|
1052
1055
|
f(c, {
|
|
1053
|
-
onComplete: (r, a, i) => (o(JSON.parse(r)),
|
|
1056
|
+
onComplete: (r, a, i) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, i), o),
|
|
1054
1057
|
onFailure: (r, a, i) => {
|
|
1055
|
-
|
|
1058
|
+
s && s(r, a, i), console.log(r, a?.errormsg);
|
|
1056
1059
|
}
|
|
1057
1060
|
});
|
|
1058
1061
|
});
|
|
1059
1062
|
});
|
|
1060
1063
|
}
|
|
1061
|
-
function ve(e, t,
|
|
1064
|
+
function ve(e, t, n, s = void 0, o = void 0) {
|
|
1062
1065
|
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1063
1066
|
k(
|
|
1064
1067
|
e,
|
|
1065
|
-
|
|
1068
|
+
n,
|
|
1066
1069
|
(r) => {
|
|
1067
1070
|
const a = r.data[0].relateddata.files[0].id, i = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
|
|
1068
1071
|
K(
|
|
1069
1072
|
e,
|
|
1070
|
-
|
|
1073
|
+
n,
|
|
1071
1074
|
a,
|
|
1072
1075
|
c,
|
|
1073
1076
|
i,
|
|
1074
1077
|
(d) => {
|
|
1075
|
-
|
|
1078
|
+
s && s(d);
|
|
1076
1079
|
},
|
|
1077
1080
|
(d) => {
|
|
1078
1081
|
o && o(d);
|
|
@@ -1083,59 +1086,59 @@ function ve(e, t, s, n = void 0, o = void 0) {
|
|
|
1083
1086
|
}
|
|
1084
1087
|
let v, P;
|
|
1085
1088
|
const $ = [];
|
|
1086
|
-
async function Pe(e, t = void 0,
|
|
1089
|
+
async function Pe(e, t = void 0, n = void 0) {
|
|
1087
1090
|
e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
|
|
1088
1091
|
e,
|
|
1089
|
-
(
|
|
1090
|
-
t && t(
|
|
1092
|
+
(s) => {
|
|
1093
|
+
t && t(s);
|
|
1091
1094
|
},
|
|
1092
|
-
(
|
|
1093
|
-
|
|
1095
|
+
(s) => {
|
|
1096
|
+
n && n(s);
|
|
1094
1097
|
}
|
|
1095
1098
|
)) : (e.objID === null || e.objID === "") && C(
|
|
1096
1099
|
e,
|
|
1097
|
-
(
|
|
1098
|
-
t && t({ rep:
|
|
1100
|
+
(s) => {
|
|
1101
|
+
t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
|
|
1099
1102
|
},
|
|
1100
|
-
(
|
|
1101
|
-
|
|
1103
|
+
(s) => {
|
|
1104
|
+
n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
|
|
1102
1105
|
}
|
|
1103
1106
|
);
|
|
1104
1107
|
}
|
|
1105
|
-
async function xe(e, t = void 0,
|
|
1108
|
+
async function xe(e, t = void 0, n = void 0) {
|
|
1106
1109
|
console.log("getDatasByTenant (getDocuments)", e), await I(
|
|
1107
1110
|
e,
|
|
1108
|
-
(
|
|
1111
|
+
(s) => {
|
|
1109
1112
|
const o = {};
|
|
1110
|
-
o.obj =
|
|
1113
|
+
o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1111
1114
|
},
|
|
1112
|
-
(
|
|
1113
|
-
|
|
1115
|
+
(s) => {
|
|
1116
|
+
n && n?.(s);
|
|
1114
1117
|
}
|
|
1115
1118
|
);
|
|
1116
1119
|
}
|
|
1117
|
-
function Me(e, t = void 0,
|
|
1118
|
-
const
|
|
1120
|
+
function Me(e, t = void 0, n = void 0) {
|
|
1121
|
+
const s = [];
|
|
1119
1122
|
e.objIds.forEach((o, c) => {
|
|
1120
1123
|
I(
|
|
1121
1124
|
e,
|
|
1122
1125
|
o.objId,
|
|
1123
1126
|
(r) => {
|
|
1124
|
-
|
|
1127
|
+
s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && t && t(s);
|
|
1125
1128
|
}
|
|
1126
1129
|
);
|
|
1127
1130
|
});
|
|
1128
1131
|
}
|
|
1129
|
-
function B(e, t,
|
|
1132
|
+
function B(e, t, n = void 0, s = void 0) {
|
|
1130
1133
|
X(
|
|
1131
1134
|
e,
|
|
1132
1135
|
v,
|
|
1133
1136
|
(o) => {
|
|
1134
1137
|
const c = [...t];
|
|
1135
|
-
c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data),
|
|
1138
|
+
c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data), n && n($);
|
|
1136
1139
|
},
|
|
1137
1140
|
(o) => {
|
|
1138
|
-
|
|
1141
|
+
s && (s(o), console.log(o));
|
|
1139
1142
|
}
|
|
1140
1143
|
);
|
|
1141
1144
|
}
|
|
@@ -1159,7 +1162,7 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1159
1162
|
order_by: "desc",
|
|
1160
1163
|
tag: "testTag"
|
|
1161
1164
|
};
|
|
1162
|
-
function Le(e, t,
|
|
1165
|
+
function Le(e, t, n = void 0, s = void 0) {
|
|
1163
1166
|
const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
|
|
1164
1167
|
uri: "/resources/6w/tags",
|
|
1165
1168
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1199,27 +1202,27 @@ function Le(e, t, s = void 0, n = void 0) {
|
|
|
1199
1202
|
e,
|
|
1200
1203
|
t,
|
|
1201
1204
|
(y) => {
|
|
1202
|
-
|
|
1205
|
+
n && n(y);
|
|
1203
1206
|
},
|
|
1204
1207
|
(y) => {
|
|
1205
|
-
|
|
1208
|
+
s && s(y);
|
|
1206
1209
|
}
|
|
1207
1210
|
);
|
|
1208
1211
|
},
|
|
1209
1212
|
(g, h) => {
|
|
1210
1213
|
const S = g;
|
|
1211
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1214
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
|
|
1212
1215
|
}
|
|
1213
1216
|
);
|
|
1214
1217
|
}, 2e3);
|
|
1215
1218
|
},
|
|
1216
1219
|
onFailure(u, m) {
|
|
1217
1220
|
const g = u;
|
|
1218
|
-
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1221
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1219
1222
|
}
|
|
1220
1223
|
});
|
|
1221
1224
|
}
|
|
1222
|
-
function q(e, t,
|
|
1225
|
+
function q(e, t, n = void 0, s = void 0) {
|
|
1223
1226
|
console.log("obj ", t);
|
|
1224
1227
|
const o = t.info.name, c = {
|
|
1225
1228
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
@@ -1294,15 +1297,15 @@ function q(e, t, s = void 0, n = void 0) {
|
|
|
1294
1297
|
data: JSON.stringify(d),
|
|
1295
1298
|
onComplete(l) {
|
|
1296
1299
|
const p = JSON.parse(l);
|
|
1297
|
-
|
|
1300
|
+
n(p);
|
|
1298
1301
|
},
|
|
1299
1302
|
onFailure(l, p) {
|
|
1300
1303
|
const u = l;
|
|
1301
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1304
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
|
|
1302
1305
|
}
|
|
1303
1306
|
});
|
|
1304
1307
|
}
|
|
1305
|
-
function Ee(e, t,
|
|
1308
|
+
function Ee(e, t, n = void 0, s = void 0) {
|
|
1306
1309
|
const { objId: o, pred: c, tag: r } = t, a = {
|
|
1307
1310
|
uri: "/resources/6w/tags",
|
|
1308
1311
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1330,15 +1333,15 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1330
1333
|
Accept: "application/json,text/javascript,*/*"
|
|
1331
1334
|
},
|
|
1332
1335
|
onComplete(l) {
|
|
1333
|
-
|
|
1336
|
+
n && n(l);
|
|
1334
1337
|
},
|
|
1335
1338
|
onFailure(l, p) {
|
|
1336
1339
|
const u = l;
|
|
1337
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1340
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
|
|
1338
1341
|
}
|
|
1339
1342
|
});
|
|
1340
1343
|
}
|
|
1341
|
-
function Je(e, t = "",
|
|
1344
|
+
function Je(e, t = "", n = void 0, s = void 0) {
|
|
1342
1345
|
const { space: o } = e;
|
|
1343
1346
|
if (t === "")
|
|
1344
1347
|
return;
|
|
@@ -1353,29 +1356,29 @@ function Je(e, t = "", s = void 0, n = void 0) {
|
|
|
1353
1356
|
headers: r,
|
|
1354
1357
|
data: i,
|
|
1355
1358
|
onComplete(d) {
|
|
1356
|
-
|
|
1359
|
+
n && n(JSON.parse(d));
|
|
1357
1360
|
},
|
|
1358
1361
|
onFailure(d, l) {
|
|
1359
1362
|
const p = d;
|
|
1360
|
-
p.msg = l.error,
|
|
1363
|
+
p.msg = l.error, s && s(p);
|
|
1361
1364
|
}
|
|
1362
1365
|
});
|
|
1363
1366
|
}
|
|
1364
|
-
async function w(e, t = void 0,
|
|
1365
|
-
const
|
|
1366
|
-
return f(
|
|
1367
|
+
async function w(e, t = void 0, n = void 0) {
|
|
1368
|
+
const s = e.space + "/api/index/tk";
|
|
1369
|
+
return f(s, {
|
|
1367
1370
|
onComplete(o, c, r) {
|
|
1368
1371
|
const a = JSON.parse(o);
|
|
1369
1372
|
if (t)
|
|
1370
1373
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1371
1374
|
},
|
|
1372
1375
|
onFailure(o) {
|
|
1373
|
-
|
|
1376
|
+
n && n(o);
|
|
1374
1377
|
}
|
|
1375
1378
|
});
|
|
1376
1379
|
}
|
|
1377
|
-
function Ge(e, t = void 0,
|
|
1378
|
-
const
|
|
1380
|
+
function Ge(e, t = void 0, n = void 0) {
|
|
1381
|
+
const s = `${e.space}/api/exalead/whatsnew`, o = {
|
|
1379
1382
|
params: {
|
|
1380
1383
|
community_id: null,
|
|
1381
1384
|
hash_key: null,
|
|
@@ -1386,7 +1389,7 @@ function Ge(e, t = void 0, s = void 0) {
|
|
|
1386
1389
|
}
|
|
1387
1390
|
};
|
|
1388
1391
|
w(e, (c) => {
|
|
1389
|
-
f(
|
|
1392
|
+
f(s, {
|
|
1390
1393
|
method: "POST",
|
|
1391
1394
|
headers: {
|
|
1392
1395
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
@@ -1399,13 +1402,13 @@ function Ge(e, t = void 0, s = void 0) {
|
|
|
1399
1402
|
t && t(r, a);
|
|
1400
1403
|
},
|
|
1401
1404
|
onFailure(r, a) {
|
|
1402
|
-
|
|
1405
|
+
n && n(r, a);
|
|
1403
1406
|
}
|
|
1404
1407
|
});
|
|
1405
1408
|
});
|
|
1406
1409
|
}
|
|
1407
|
-
function Ke(e, t = void 0,
|
|
1408
|
-
const
|
|
1410
|
+
function Ke(e, t = void 0, n = void 0) {
|
|
1411
|
+
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
|
|
1409
1412
|
params: {
|
|
1410
1413
|
idsToFilterArr: [],
|
|
1411
1414
|
mode: "offline",
|
|
@@ -1415,7 +1418,7 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1415
1418
|
}
|
|
1416
1419
|
};
|
|
1417
1420
|
w(e, (c) => {
|
|
1418
|
-
f(
|
|
1421
|
+
f(s, {
|
|
1419
1422
|
method: "POST",
|
|
1420
1423
|
headers: {
|
|
1421
1424
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
@@ -1429,18 +1432,18 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1429
1432
|
t && t(i, r);
|
|
1430
1433
|
},
|
|
1431
1434
|
onFailure(r, a) {
|
|
1432
|
-
|
|
1435
|
+
n && n(r, a);
|
|
1433
1436
|
}
|
|
1434
1437
|
});
|
|
1435
1438
|
});
|
|
1436
1439
|
}
|
|
1437
|
-
function We(e, t = void 0,
|
|
1438
|
-
const
|
|
1440
|
+
function We(e, t = void 0, n = void 0) {
|
|
1441
|
+
const s = {
|
|
1439
1442
|
base: e.space,
|
|
1440
1443
|
uri: "/api/community/listmycommunities",
|
|
1441
1444
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1442
1445
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1443
|
-
}, o = `${
|
|
1446
|
+
}, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
|
|
1444
1447
|
w(e, (r) => {
|
|
1445
1448
|
f(o, {
|
|
1446
1449
|
method: "GET",
|
|
@@ -1465,18 +1468,18 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1465
1468
|
(h) => {
|
|
1466
1469
|
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1467
1470
|
},
|
|
1468
|
-
(h) =>
|
|
1471
|
+
(h) => n(h)
|
|
1469
1472
|
);
|
|
1470
1473
|
});
|
|
1471
1474
|
},
|
|
1472
1475
|
onFailure(a, i) {
|
|
1473
1476
|
const d = a;
|
|
1474
|
-
d.status = i.status, d.response = i.errormsg,
|
|
1477
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1475
1478
|
}
|
|
1476
1479
|
});
|
|
1477
1480
|
});
|
|
1478
1481
|
}
|
|
1479
|
-
function Q(e, t,
|
|
1482
|
+
function Q(e, t, n, s) {
|
|
1480
1483
|
const o = `${e.space}/api/community/listmembers`, c = {
|
|
1481
1484
|
params: {
|
|
1482
1485
|
page: e.page ? e.page : 1,
|
|
@@ -1495,18 +1498,18 @@ function Q(e, t, s, n) {
|
|
|
1495
1498
|
data: JSON.stringify(c),
|
|
1496
1499
|
type: "json",
|
|
1497
1500
|
onComplete(a, i, d) {
|
|
1498
|
-
|
|
1501
|
+
n && n(a);
|
|
1499
1502
|
},
|
|
1500
1503
|
onFailure(a, i) {
|
|
1501
1504
|
const d = a;
|
|
1502
|
-
d.status = i.status, d.response = i.errormsg,
|
|
1505
|
+
d.status = i.status, d.response = i.errormsg, s && s(d);
|
|
1503
1506
|
}
|
|
1504
1507
|
});
|
|
1505
1508
|
});
|
|
1506
1509
|
}
|
|
1507
|
-
function Xe(e, t = void 0,
|
|
1508
|
-
const
|
|
1509
|
-
e.commu_id || (e.commu_id =
|
|
1510
|
+
function Xe(e, t = void 0, n = void 0) {
|
|
1511
|
+
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1512
|
+
e.commu_id || (e.commu_id = s);
|
|
1510
1513
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1511
1514
|
w(e, (c) => {
|
|
1512
1515
|
f(o, {
|
|
@@ -1522,12 +1525,12 @@ function Xe(e, t = void 0, s = void 0) {
|
|
|
1522
1525
|
},
|
|
1523
1526
|
onFailure(r, a) {
|
|
1524
1527
|
const i = r;
|
|
1525
|
-
i.status = a.status, i.response = a.errormsg,
|
|
1528
|
+
i.status = a.status, i.response = a.errormsg, n && n(i);
|
|
1526
1529
|
}
|
|
1527
1530
|
});
|
|
1528
1531
|
});
|
|
1529
1532
|
}
|
|
1530
|
-
function Ve(e, t,
|
|
1533
|
+
function Ve(e, t, n = void 0, s = void 0) {
|
|
1531
1534
|
const { listAllContacts: o, currentUser: c } = e;
|
|
1532
1535
|
console.log("__listAllContacts", o.hits);
|
|
1533
1536
|
const r = `${e.space}/api/directmessages`, a = {
|
|
@@ -1545,7 +1548,7 @@ function Ve(e, t, s = void 0, n = void 0) {
|
|
|
1545
1548
|
l !== void 0 && (i.id_msg = l.id, d = !0, j(e, i));
|
|
1546
1549
|
},
|
|
1547
1550
|
(l) => {
|
|
1548
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1551
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), i.id_msg = "";
|
|
1549
1552
|
}
|
|
1550
1553
|
), d === !1 && setTimeout(() => {
|
|
1551
1554
|
d === !1 && w(e, (l) => {
|
|
@@ -1560,17 +1563,17 @@ function Ve(e, t, s = void 0, n = void 0) {
|
|
|
1560
1563
|
type: "json",
|
|
1561
1564
|
onComplete(p, u, m) {
|
|
1562
1565
|
const g = p;
|
|
1563
|
-
g.reponse = JSON.parse(m.response), g.status = m.status,
|
|
1566
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), i.id_msg = g.result.id, j(e, i);
|
|
1564
1567
|
},
|
|
1565
1568
|
onFailure(p, u, m) {
|
|
1566
1569
|
const g = p;
|
|
1567
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1570
|
+
g.msg = u.errormsg, g.status = u.status, s && s(g);
|
|
1568
1571
|
}
|
|
1569
1572
|
});
|
|
1570
1573
|
});
|
|
1571
1574
|
}, 500);
|
|
1572
1575
|
}
|
|
1573
|
-
function Z(e, t,
|
|
1576
|
+
function Z(e, t, n, s) {
|
|
1574
1577
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1575
1578
|
w(e, (c) => {
|
|
1576
1579
|
f(o, {
|
|
@@ -1590,16 +1593,16 @@ function Z(e, t, s, n) {
|
|
|
1590
1593
|
u.push(m.login);
|
|
1591
1594
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1592
1595
|
});
|
|
1593
|
-
|
|
1596
|
+
n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
|
|
1594
1597
|
},
|
|
1595
1598
|
onFailure(r) {
|
|
1596
1599
|
const a = r;
|
|
1597
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1600
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
1598
1601
|
}
|
|
1599
1602
|
});
|
|
1600
1603
|
});
|
|
1601
1604
|
}
|
|
1602
|
-
function j(e, t,
|
|
1605
|
+
function j(e, t, n = void 0, s = void 0) {
|
|
1603
1606
|
const o = {
|
|
1604
1607
|
base: e.space,
|
|
1605
1608
|
uri: "/api/community",
|
|
@@ -1627,21 +1630,21 @@ function j(e, t, s = void 0, n = void 0) {
|
|
|
1627
1630
|
type: "json",
|
|
1628
1631
|
onComplete(i, d, l) {
|
|
1629
1632
|
const p = i;
|
|
1630
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1633
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1631
1634
|
},
|
|
1632
1635
|
onFailure(i, d) {
|
|
1633
1636
|
const l = i;
|
|
1634
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1637
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1635
1638
|
}
|
|
1636
1639
|
});
|
|
1637
1640
|
});
|
|
1638
1641
|
}
|
|
1639
1642
|
function ee(e) {
|
|
1640
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1643
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1641
1644
|
return `<p>${e} </p>
|
|
1642
1645
|
<br/>
|
|
1643
1646
|
<hr/>
|
|
1644
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1647
|
+
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1645
1648
|
}
|
|
1646
1649
|
const te = {
|
|
1647
1650
|
title: "TEST DEV COMMUNITY IDEA",
|
|
@@ -1653,7 +1656,7 @@ const te = {
|
|
|
1653
1656
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1654
1657
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1655
1658
|
};
|
|
1656
|
-
function Be(e, t,
|
|
1659
|
+
function Be(e, t, n = void 0, s = void 0) {
|
|
1657
1660
|
const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1658
1661
|
(i) => i.id === t.community_id
|
|
1659
1662
|
), r = e.swymCommunities.find(
|
|
@@ -1683,16 +1686,16 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1683
1686
|
type: "json",
|
|
1684
1687
|
onComplete(l, p, u) {
|
|
1685
1688
|
const m = JSON.parse(l);
|
|
1686
|
-
m.status = u.status, m.response = u.response,
|
|
1689
|
+
m.status = u.status, m.response = u.response, n && n(m);
|
|
1687
1690
|
},
|
|
1688
1691
|
onFailure(l, p, u) {
|
|
1689
1692
|
const m = l;
|
|
1690
|
-
m.status = p.status, m.response = p.errormsg,
|
|
1693
|
+
m.status = p.status, m.response = p.errormsg, s && s(m);
|
|
1691
1694
|
}
|
|
1692
1695
|
});
|
|
1693
1696
|
});
|
|
1694
1697
|
}
|
|
1695
|
-
function Ye(e, t,
|
|
1698
|
+
function Ye(e, t, n = void 0, s = void 0) {
|
|
1696
1699
|
const o = `${e.space}/api/idea/delete`, c = {
|
|
1697
1700
|
params: {
|
|
1698
1701
|
community_id: t.community_id,
|
|
@@ -1710,16 +1713,16 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1710
1713
|
data: JSON.stringify(c),
|
|
1711
1714
|
type: "json",
|
|
1712
1715
|
onComplete(a, i, d) {
|
|
1713
|
-
|
|
1716
|
+
n && n(a);
|
|
1714
1717
|
},
|
|
1715
1718
|
onFailure(a, i, d) {
|
|
1716
1719
|
const l = a;
|
|
1717
|
-
l.status = i.status, l.response = i.errormsg,
|
|
1720
|
+
l.status = i.status, l.response = i.errormsg, s && s(l);
|
|
1718
1721
|
}
|
|
1719
1722
|
});
|
|
1720
1723
|
});
|
|
1721
1724
|
}
|
|
1722
|
-
function He(e, t = "",
|
|
1725
|
+
function He(e, t = "", n = void 0, s = void 0) {
|
|
1723
1726
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1724
1727
|
t === "" && (t = o);
|
|
1725
1728
|
const c = `${e.space}/api/idea/get`, r = {
|
|
@@ -1739,16 +1742,16 @@ function He(e, t = "", s = void 0, n = void 0) {
|
|
|
1739
1742
|
type: "json",
|
|
1740
1743
|
onComplete(i) {
|
|
1741
1744
|
const d = i;
|
|
1742
|
-
d.msg = d.result.message,
|
|
1745
|
+
d.msg = d.result.message, n && n(d);
|
|
1743
1746
|
},
|
|
1744
1747
|
onFailure(i) {
|
|
1745
1748
|
const d = i;
|
|
1746
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1749
|
+
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1747
1750
|
}
|
|
1748
1751
|
});
|
|
1749
1752
|
});
|
|
1750
1753
|
}
|
|
1751
|
-
function ze(e, t = te,
|
|
1754
|
+
function ze(e, t = te, n = void 0, s = void 0) {
|
|
1752
1755
|
const o = {
|
|
1753
1756
|
uri: "/api/idea/list",
|
|
1754
1757
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
@@ -1762,11 +1765,11 @@ function ze(e, t = te, s = void 0, n = void 0) {
|
|
|
1762
1765
|
},
|
|
1763
1766
|
onComplete(a) {
|
|
1764
1767
|
const i = JSON.parse(a);
|
|
1765
|
-
|
|
1768
|
+
n && n(i);
|
|
1766
1769
|
},
|
|
1767
1770
|
onFailure(a, i) {
|
|
1768
1771
|
const d = a;
|
|
1769
|
-
d.status = i.status, d.response = i.errormsg,
|
|
1772
|
+
d.status = i.status, d.response = i.errormsg, s && s(d);
|
|
1770
1773
|
}
|
|
1771
1774
|
});
|
|
1772
1775
|
});
|
|
@@ -1846,10 +1849,10 @@ function ne(e) {
|
|
|
1846
1849
|
<p>
|
|
1847
1850
|
</p>` : e;
|
|
1848
1851
|
}
|
|
1849
|
-
function qe(e, t = void 0,
|
|
1850
|
-
const
|
|
1852
|
+
function qe(e, t = void 0, n = void 0) {
|
|
1853
|
+
const s = e.space + "/api/user/getcurrent/";
|
|
1851
1854
|
w(e, (o) => {
|
|
1852
|
-
f(
|
|
1855
|
+
f(s, {
|
|
1853
1856
|
method: "GET",
|
|
1854
1857
|
headers: {
|
|
1855
1858
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
@@ -1860,12 +1863,12 @@ function qe(e, t = void 0, s = void 0) {
|
|
|
1860
1863
|
},
|
|
1861
1864
|
onFailure(c, r, a) {
|
|
1862
1865
|
const i = { erreur: JSON.parse(c), headers: r, xhr: a };
|
|
1863
|
-
|
|
1866
|
+
n && n(i);
|
|
1864
1867
|
}
|
|
1865
1868
|
});
|
|
1866
1869
|
});
|
|
1867
1870
|
}
|
|
1868
|
-
function Qe(e, t,
|
|
1871
|
+
function Qe(e, t, n = void 0, s = void 0) {
|
|
1869
1872
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1870
1873
|
w(
|
|
1871
1874
|
e,
|
|
@@ -1875,14 +1878,14 @@ function Qe(e, t, s = void 0, n = void 0) {
|
|
|
1875
1878
|
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1876
1879
|
onComplete(r, a, i) {
|
|
1877
1880
|
const d = JSON.parse(r);
|
|
1878
|
-
|
|
1881
|
+
n && n(d);
|
|
1879
1882
|
},
|
|
1880
1883
|
onFailure(r) {
|
|
1881
|
-
|
|
1884
|
+
s && s(r);
|
|
1882
1885
|
}
|
|
1883
1886
|
});
|
|
1884
1887
|
},
|
|
1885
|
-
|
|
1888
|
+
s
|
|
1886
1889
|
);
|
|
1887
1890
|
}
|
|
1888
1891
|
function Ze(e) {
|
|
@@ -1897,11 +1900,11 @@ export {
|
|
|
1897
1900
|
X as _3DSpace_download_multidoc,
|
|
1898
1901
|
K as _3DSpace_file_update,
|
|
1899
1902
|
W as _3DSpace_file_update_csr,
|
|
1900
|
-
|
|
1903
|
+
be as _3DSpace_file_url_csr,
|
|
1901
1904
|
k as _3DSpace_get_csrf,
|
|
1902
1905
|
G as _3DSpace_get_docInfo,
|
|
1903
1906
|
V as _3DSpace_get_downloadTicket_multidoc,
|
|
1904
|
-
|
|
1907
|
+
N as _3DSpace_get_securityContexts,
|
|
1905
1908
|
U as _3DSpace_get_ticket,
|
|
1906
1909
|
je as _3DSpace_lifecycle_changeRevision,
|
|
1907
1910
|
Fe as _3DSpace_lifecycle_changeState,
|
|
@@ -1954,7 +1957,7 @@ export {
|
|
|
1954
1957
|
Ce as patchUserGroups,
|
|
1955
1958
|
Oe as patchUserGroupsControl,
|
|
1956
1959
|
ve as pushDataIn3DSpace,
|
|
1957
|
-
|
|
1960
|
+
Ne as readUserGroupControl,
|
|
1958
1961
|
Ee as removeTagToDoc,
|
|
1959
1962
|
Ze as sayHello,
|
|
1960
1963
|
de as updateEvent
|