@beam3_dev/api_module 0.0.126 → 0.0.128
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 +329 -342
- 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,10 +1,10 @@
|
|
|
1
|
-
import { v4 as
|
|
2
|
-
import { DateTime as
|
|
1
|
+
import { v4 as L } from "uuid";
|
|
2
|
+
import { DateTime as N } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as D } from "@widget-lab/3ddashboard-utils";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function j() {
|
|
5
|
+
return L();
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const J = {
|
|
8
8
|
b3M3Yellow: "#FFB300",
|
|
9
9
|
b3AboutageBlue: "#42A5F5",
|
|
10
10
|
b3UsinageGreen: "#689F38",
|
|
@@ -34,10 +34,10 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function ce(e, t = void 0,
|
|
38
|
-
const
|
|
37
|
+
async function ce(e, t = void 0, s = void 0) {
|
|
38
|
+
const n = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
|
-
"https://apicarto.ign.fr/api/codes-postaux/communes/" +
|
|
40
|
+
"https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
|
|
41
41
|
{
|
|
42
42
|
method: "GET",
|
|
43
43
|
headers: {
|
|
@@ -47,10 +47,10 @@ async function ce(e, t = void 0, n = void 0) {
|
|
|
47
47
|
).then((i) => i.json()).then((i) => {
|
|
48
48
|
t && t(i);
|
|
49
49
|
}).catch((i) => {
|
|
50
|
-
|
|
50
|
+
s && s(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function de(e, t = void 0,
|
|
53
|
+
async function de(e, t = void 0, s = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -59,19 +59,19 @@ async function de(e, t = void 0, n = void 0) {
|
|
|
59
59
|
Accept: "application/json"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
).then((
|
|
63
|
-
t && t(
|
|
64
|
-
}).catch((
|
|
65
|
-
|
|
62
|
+
).then((n) => n.json()).then((n) => {
|
|
63
|
+
t && t(n);
|
|
64
|
+
}).catch((n) => {
|
|
65
|
+
s && s(n), console.error("Erreur : " + n);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function le(e, t =
|
|
69
|
-
let
|
|
70
|
-
const
|
|
68
|
+
async function le(e, t = J) {
|
|
69
|
+
let s = N.now().year;
|
|
70
|
+
const n = e, i = [], r = (a) => {
|
|
71
71
|
for (let c in a)
|
|
72
72
|
i.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
74
|
-
for (let a =
|
|
74
|
+
for (let a = s; a <= s + 1; a++)
|
|
75
75
|
await fetch(
|
|
76
76
|
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
|
|
77
77
|
{
|
|
@@ -84,107 +84,107 @@ async function le(e, t = L) {
|
|
|
84
84
|
r(c);
|
|
85
85
|
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = n.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
89
|
+
} : n;
|
|
90
90
|
for (let c of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start ===
|
|
92
|
+
(l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
95
|
+
start: N.fromISO(c.date).toISODate(),
|
|
96
|
+
end: N.fromISO(c.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function pe(e, t,
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
async function pe(e, t, s = !0) {
|
|
104
|
+
const n = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
105
|
+
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
|
-
O(["DS/WAFData/WAFData"], (
|
|
109
|
-
|
|
108
|
+
O(["DS/WAFData/WAFData"], (s) => {
|
|
109
|
+
s.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function ue(e, t,
|
|
113
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
114
|
-
|
|
112
|
+
function ue(e, t, s) {
|
|
113
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
114
|
+
n.draggable(e, {
|
|
115
115
|
data: t,
|
|
116
|
-
start:
|
|
116
|
+
start: s
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
function fe(e, t = void 0) {
|
|
121
|
-
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (
|
|
122
|
-
let
|
|
123
|
-
|
|
121
|
+
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
|
|
122
|
+
let n;
|
|
123
|
+
n === void 0 && (n = s.createProxy({
|
|
124
124
|
widgetId: D.id,
|
|
125
125
|
filteringMode: "WithFilteringServices"
|
|
126
|
-
}), t !== void 0 &&
|
|
126
|
+
}), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
function me(e, t) {
|
|
130
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
131
|
-
|
|
130
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
131
|
+
s.droppable(e, {
|
|
132
132
|
drop: t
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
async function ge(e, t = void 0,
|
|
136
|
+
async function ge(e, t = void 0, s = void 0) {
|
|
137
137
|
await O(
|
|
138
138
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
139
|
-
(
|
|
139
|
+
(n) => {
|
|
140
140
|
(!e || e === "") && (e = D.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
141
|
-
|
|
141
|
+
n.getPlatformServices({
|
|
142
142
|
platformId: e,
|
|
143
143
|
onComplete: t,
|
|
144
|
-
onFailure:
|
|
144
|
+
onFailure: s
|
|
145
145
|
})
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function E() {
|
|
151
151
|
let e = {};
|
|
152
152
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
153
|
-
const
|
|
153
|
+
const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
154
154
|
"com.3ds.wp.passport.cors"
|
|
155
155
|
);
|
|
156
156
|
e = {
|
|
157
|
-
tenant:
|
|
158
|
-
user:
|
|
157
|
+
tenant: s,
|
|
158
|
+
user: n,
|
|
159
159
|
appsConfiguration: i,
|
|
160
160
|
appConf: r
|
|
161
161
|
};
|
|
162
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function I(e, t = void 0, s = void 0) {
|
|
165
165
|
if (e.tenant) {
|
|
166
|
-
const
|
|
167
|
-
f(
|
|
166
|
+
const n = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
167
|
+
f(n, {
|
|
168
168
|
onComplete(i) {
|
|
169
169
|
const r = typeof i == "string" ? JSON.parse(i) : i;
|
|
170
170
|
if (r && "platforms" in r) {
|
|
171
171
|
const o = r.platforms.find(
|
|
172
172
|
(a) => a.id === e.tenant.toUpperCase()
|
|
173
173
|
);
|
|
174
|
-
t && o ? t(o) :
|
|
174
|
+
t && o ? t(o) : s && s("_getServiceUrl return listServiceUrl = undefined");
|
|
175
175
|
} else
|
|
176
|
-
|
|
176
|
+
s && s("_getServiceUrl return oResponse = undefined");
|
|
177
177
|
},
|
|
178
178
|
onFailure(i) {
|
|
179
|
-
|
|
179
|
+
s && s(i);
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
function he(e, t = void 0,
|
|
184
|
+
function he(e, t = void 0, s = void 0) {
|
|
185
185
|
if (e.tenant) {
|
|
186
|
-
const
|
|
187
|
-
f(
|
|
186
|
+
const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
187
|
+
f(n, {
|
|
188
188
|
onComplete(i) {
|
|
189
189
|
const r = JSON.parse(i);
|
|
190
190
|
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
@@ -193,18 +193,18 @@ function he(e, t = void 0, n = void 0) {
|
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
195
|
onFailure(i) {
|
|
196
|
-
|
|
196
|
+
s && s(i);
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function Se(e, t,
|
|
202
|
-
const
|
|
201
|
+
function Se(e, t, s) {
|
|
202
|
+
const n = {
|
|
203
203
|
base: `${e.space}`,
|
|
204
204
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
205
205
|
option: `?filter=${e.tenant}`
|
|
206
206
|
// facultatif
|
|
207
|
-
}, i = `${
|
|
207
|
+
}, i = `${n.base}${n.uri}${n.option}`;
|
|
208
208
|
f(i, {
|
|
209
209
|
method: "GET",
|
|
210
210
|
headers: {
|
|
@@ -220,41 +220,41 @@ function Se(e, t, n) {
|
|
|
220
220
|
},
|
|
221
221
|
onFailure(r, o) {
|
|
222
222
|
const a = r;
|
|
223
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
223
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
function _e(e, t = void 0,
|
|
228
|
-
let
|
|
229
|
-
f(
|
|
227
|
+
function _e(e, t = void 0, s = void 0) {
|
|
228
|
+
let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
229
|
+
f(n, {
|
|
230
230
|
onComplete(i, r, o) {
|
|
231
231
|
const a = JSON.parse(i);
|
|
232
232
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
233
233
|
},
|
|
234
234
|
onFailure(i, r) {
|
|
235
235
|
const o = i;
|
|
236
|
-
o.msg = r.errormsg, o.errCode = r.errorcode,
|
|
236
|
+
o.msg = r.errormsg, o.errCode = r.errorcode, s && s(o);
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
function ye(e, t,
|
|
240
|
+
function ye(e, t, s = void 0, n = void 0) {
|
|
241
241
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
242
242
|
f(i, {
|
|
243
243
|
onComplete(r, o, a) {
|
|
244
244
|
const c = JSON.parse(r);
|
|
245
|
-
|
|
245
|
+
s && s(c);
|
|
246
246
|
},
|
|
247
247
|
onFailure(r, o) {
|
|
248
248
|
const a = r;
|
|
249
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
249
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const F = {
|
|
254
254
|
"Content-Type": "application/json",
|
|
255
255
|
Accept: "application/json,text/javascript,*/*"
|
|
256
256
|
};
|
|
257
|
-
function we(e, t,
|
|
257
|
+
function we(e, t, s = void 0, n = void 0) {
|
|
258
258
|
const { space: i, currentUser: r } = e, a = `${i}${{
|
|
259
259
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
260
260
|
}.URIUGr}`, c = {
|
|
@@ -271,19 +271,19 @@ function we(e, t, n = void 0, s = void 0) {
|
|
|
271
271
|
};
|
|
272
272
|
f(a, {
|
|
273
273
|
method: "POST",
|
|
274
|
-
headers:
|
|
274
|
+
headers: F,
|
|
275
275
|
data: JSON.stringify(c),
|
|
276
276
|
onComplete(d) {
|
|
277
|
-
|
|
277
|
+
s && s(JSON.parse(d));
|
|
278
278
|
},
|
|
279
279
|
onFailure(d, l) {
|
|
280
280
|
console.log(d);
|
|
281
281
|
const p = d;
|
|
282
|
-
p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p),
|
|
282
|
+
p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
function Ce(e, t,
|
|
286
|
+
function Ce(e, t, s = void 0, n = void 0) {
|
|
287
287
|
const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
|
|
288
288
|
f(d, {
|
|
289
289
|
opts: {
|
|
@@ -294,16 +294,16 @@ function Ce(e, t, n = void 0, s = void 0) {
|
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
onComplete(u) {
|
|
297
|
-
|
|
297
|
+
s && s(JSON.parse(u));
|
|
298
298
|
},
|
|
299
299
|
onFailure(u, m) {
|
|
300
300
|
const g = u;
|
|
301
|
-
g.msg = m.errormsg, g.errCode = m.errorcode,
|
|
301
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, n && n(g);
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
function G(e, t = void 0,
|
|
306
|
-
const { space:
|
|
305
|
+
function G(e, t = void 0, s = void 0) {
|
|
306
|
+
const { space: n, tenant: i } = e, r = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
|
|
307
307
|
method: "GET",
|
|
308
308
|
Accept: "application/json,*/*,test/javascript"
|
|
309
309
|
}, d = `${r}${o}${a}`;
|
|
@@ -314,12 +314,12 @@ function G(e, t = void 0, n = void 0) {
|
|
|
314
314
|
},
|
|
315
315
|
onFailure(l, p) {
|
|
316
316
|
const u = l;
|
|
317
|
-
u.msg = p.errormsg, u.errCode = p.errorcode,
|
|
317
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, s && s(u);
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
function Te(e, t = void 0,
|
|
322
|
-
const { space:
|
|
321
|
+
function Te(e, t = void 0, s = void 0) {
|
|
322
|
+
const { space: n, currentUser: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
323
323
|
"Content-Type": "application/json",
|
|
324
324
|
Accept: "application/json,text/javascript,*/*"
|
|
325
325
|
} };
|
|
@@ -336,13 +336,13 @@ function Te(e, t = void 0, n = void 0) {
|
|
|
336
336
|
u.rules = _, t && t(u);
|
|
337
337
|
},
|
|
338
338
|
(_) => {
|
|
339
|
-
|
|
339
|
+
s && s(_);
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
onFailure(l) {
|
|
345
|
-
|
|
345
|
+
s && s(l);
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
} catch (l) {
|
|
@@ -350,12 +350,12 @@ function Te(e, t = void 0, n = void 0) {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
function Oe(e, t) {
|
|
353
|
-
const { space:
|
|
353
|
+
const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
354
354
|
f(i, {
|
|
355
355
|
method: "DELETE"
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function be(e, t, s, n = void 0, i = void 0) {
|
|
359
359
|
const { space: r, tenant: o } = e, a = {
|
|
360
360
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
361
361
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -364,36 +364,36 @@ function Ne(e, t, n, s = void 0, i = void 0) {
|
|
|
364
364
|
nexURImem: "/members",
|
|
365
365
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
366
366
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
367
|
-
}, c =
|
|
367
|
+
}, c = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
|
|
368
368
|
f(d, {
|
|
369
|
-
headers:
|
|
369
|
+
headers: F,
|
|
370
370
|
method: "PATCH",
|
|
371
371
|
data: l,
|
|
372
372
|
type: "json",
|
|
373
373
|
onComplete(p) {
|
|
374
|
-
|
|
374
|
+
n && n(p);
|
|
375
375
|
},
|
|
376
376
|
onFailure(p) {
|
|
377
377
|
i && i(p);
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Ne(e, t, s, n = void 0, i = void 0) {
|
|
382
382
|
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
383
383
|
f(a, {
|
|
384
384
|
method: "PATCH",
|
|
385
|
-
headers:
|
|
386
|
-
data: JSON.stringify(
|
|
385
|
+
headers: F,
|
|
386
|
+
data: JSON.stringify(s),
|
|
387
387
|
type: "json",
|
|
388
388
|
onComplete(d) {
|
|
389
|
-
|
|
389
|
+
n && n(d);
|
|
390
390
|
},
|
|
391
391
|
onFailure(d) {
|
|
392
392
|
i && i(d);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
function ve(e, t,
|
|
396
|
+
function ve(e, t, s = void 0, n = void 0) {
|
|
397
397
|
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
398
398
|
f(o, {
|
|
399
399
|
opts: {
|
|
@@ -404,27 +404,27 @@ function ve(e, t, n = void 0, s = void 0) {
|
|
|
404
404
|
}
|
|
405
405
|
},
|
|
406
406
|
onComplete(d) {
|
|
407
|
-
|
|
407
|
+
s && s(JSON.parse(d));
|
|
408
408
|
},
|
|
409
409
|
onFailure(d) {
|
|
410
|
-
|
|
410
|
+
n && n(d);
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
async function K(e, t,
|
|
414
|
+
async function K(e, t, s) {
|
|
415
415
|
if (e.space) {
|
|
416
|
-
const
|
|
417
|
-
f(
|
|
416
|
+
const n = `${e.space}/resources/v1/application/CSRF`;
|
|
417
|
+
f(n, {
|
|
418
418
|
onComplete(i) {
|
|
419
419
|
i = JSON.parse(i), t && t(i.csrf);
|
|
420
420
|
},
|
|
421
421
|
onFailure(i, r, o) {
|
|
422
|
-
|
|
422
|
+
s && s({ error: i, headers: r, xhr: o });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
async function X(e, t = void 0,
|
|
427
|
+
async function X(e, t = void 0, s = void 0, n = void 0) {
|
|
428
428
|
const i = e.space;
|
|
429
429
|
if (t === void 0) {
|
|
430
430
|
console.log("Le paramètre docid est obligatoire");
|
|
@@ -434,46 +434,46 @@ async function X(e, t = void 0, n = void 0, s = void 0) {
|
|
|
434
434
|
f(r, {
|
|
435
435
|
onComplete(o, a, c) {
|
|
436
436
|
const d = JSON.parse(o);
|
|
437
|
-
|
|
437
|
+
s && s(d);
|
|
438
438
|
},
|
|
439
439
|
onFailure(o) {
|
|
440
|
-
|
|
440
|
+
n && n(o);
|
|
441
441
|
}
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
function v(e, t = void 0,
|
|
444
|
+
function v(e, t = void 0, s = void 0) {
|
|
445
445
|
if (e.objID && e.objID !== "") {
|
|
446
|
-
let
|
|
447
|
-
f(
|
|
446
|
+
let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
447
|
+
f(n, {
|
|
448
448
|
onComplete(i, r, o) {
|
|
449
449
|
const a = JSON.parse(i);
|
|
450
450
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
451
451
|
},
|
|
452
452
|
onFailure(i) {
|
|
453
|
-
|
|
453
|
+
s && s(i);
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
} else
|
|
457
457
|
T(
|
|
458
458
|
e,
|
|
459
|
-
(
|
|
460
|
-
console.log("_3DSpace_get_csrf / _3DSpace_csrf",
|
|
459
|
+
(n) => {
|
|
460
|
+
console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
|
|
461
461
|
},
|
|
462
|
-
(
|
|
463
|
-
|
|
462
|
+
(n) => {
|
|
463
|
+
s && s(n);
|
|
464
464
|
}
|
|
465
465
|
);
|
|
466
466
|
}
|
|
467
|
-
function T(e, t = void 0,
|
|
467
|
+
function T(e, t = void 0, s = void 0) {
|
|
468
468
|
if (e.space) {
|
|
469
|
-
const
|
|
470
|
-
f(
|
|
469
|
+
const n = e.space + "/resources/v1/application/CSRF";
|
|
470
|
+
f(n, {
|
|
471
471
|
onComplete(i, r, o) {
|
|
472
472
|
const a = JSON.parse(i);
|
|
473
473
|
t && t(a.csrf.value);
|
|
474
474
|
},
|
|
475
475
|
onFailure(i, r, o) {
|
|
476
|
-
|
|
476
|
+
s && s({
|
|
477
477
|
response: i,
|
|
478
478
|
headers: r,
|
|
479
479
|
xhr: o
|
|
@@ -481,14 +481,14 @@ function T(e, t = void 0, n = void 0) {
|
|
|
481
481
|
}
|
|
482
482
|
});
|
|
483
483
|
} else
|
|
484
|
-
|
|
484
|
+
s && s("ERROR : url du 3DSpace non défini.");
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
let
|
|
486
|
+
function A(e, t = void 0, s = void 0) {
|
|
487
|
+
let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
488
488
|
v(
|
|
489
489
|
e,
|
|
490
490
|
(i) => {
|
|
491
|
-
f(
|
|
491
|
+
f(n, {
|
|
492
492
|
method: "PUT",
|
|
493
493
|
headers: {
|
|
494
494
|
ENO_CSRF_TOKEN: e.token
|
|
@@ -498,28 +498,28 @@ function F(e, t = void 0, n = void 0) {
|
|
|
498
498
|
t && t(a);
|
|
499
499
|
},
|
|
500
500
|
onFailure(r, o) {
|
|
501
|
-
console.warn("☠️ error => ", r, o),
|
|
501
|
+
console.warn("☠️ error => ", r, o), s && s(r, o);
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
},
|
|
505
505
|
(i) => {
|
|
506
|
-
console.warn("_3DSpace_get_ticket / error => ", i),
|
|
506
|
+
console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
|
|
507
507
|
}
|
|
508
508
|
);
|
|
509
509
|
}
|
|
510
|
-
function ke(e, t,
|
|
510
|
+
function ke(e, t, s, n = void 0, i = void 0) {
|
|
511
511
|
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
512
|
-
|
|
512
|
+
s || (s = e.token), f(r, {
|
|
513
513
|
method: "PUT",
|
|
514
514
|
headers: {
|
|
515
|
-
ENO_CSRF_TOKEN:
|
|
515
|
+
ENO_CSRF_TOKEN: s
|
|
516
516
|
},
|
|
517
517
|
onComplete(o) {
|
|
518
518
|
let a = JSON.parse(o);
|
|
519
519
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
520
520
|
try {
|
|
521
521
|
const c = a.data[0].dataelements.ticketURL;
|
|
522
|
-
|
|
522
|
+
n && n(c);
|
|
523
523
|
} catch (c) {
|
|
524
524
|
i && i(c);
|
|
525
525
|
}
|
|
@@ -529,7 +529,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
|
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
function V(e, t,
|
|
532
|
+
function V(e, t, s, n, i, r = void 0, o = void 0) {
|
|
533
533
|
v(
|
|
534
534
|
e,
|
|
535
535
|
t,
|
|
@@ -537,8 +537,8 @@ function V(e, t, n, s, i, r = void 0, o = void 0) {
|
|
|
537
537
|
W(
|
|
538
538
|
e,
|
|
539
539
|
t,
|
|
540
|
-
n,
|
|
541
540
|
s,
|
|
541
|
+
n,
|
|
542
542
|
i,
|
|
543
543
|
a.csrf.value,
|
|
544
544
|
r,
|
|
@@ -547,7 +547,7 @@ function V(e, t, n, s, i, r = void 0, o = void 0) {
|
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
|
-
function W(e, t,
|
|
550
|
+
function W(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
551
551
|
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
552
552
|
f(c, {
|
|
553
553
|
method: "PUT",
|
|
@@ -556,7 +556,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
556
556
|
},
|
|
557
557
|
onComplete(d, l, p) {
|
|
558
558
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
559
|
-
m.append("__fcs__jobTicket", u.ticket), m.append("file_0",
|
|
559
|
+
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", n, i);
|
|
560
560
|
const g = {};
|
|
561
561
|
g.method = "POST", g.data = m, g.onComplete = function(h) {
|
|
562
562
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -569,7 +569,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
569
569
|
id: t,
|
|
570
570
|
relateddata: {
|
|
571
571
|
files: [{
|
|
572
|
-
id:
|
|
572
|
+
id: s,
|
|
573
573
|
dataelements: {
|
|
574
574
|
title: i,
|
|
575
575
|
receipt: h
|
|
@@ -598,7 +598,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
|
-
async function
|
|
601
|
+
async function Fe(e, t, s, n, i = void 0, r = void 0) {
|
|
602
602
|
const o = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
603
603
|
type: "text/plain"
|
|
604
604
|
}), p = {
|
|
@@ -616,7 +616,7 @@ async function $e(e, t, n, s, i = void 0, r = void 0) {
|
|
|
616
616
|
},
|
|
617
617
|
onComplete(u, m, g) {
|
|
618
618
|
const h = JSON.parse(u).data[0].dataelements;
|
|
619
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
619
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
|
|
620
620
|
const S = {
|
|
621
621
|
method: "POST",
|
|
622
622
|
data: d,
|
|
@@ -633,19 +633,19 @@ async function $e(e, t, n, s, i = void 0, r = void 0) {
|
|
|
633
633
|
data: [{
|
|
634
634
|
type: "Document",
|
|
635
635
|
dataelements: {
|
|
636
|
-
title: `Title_${
|
|
636
|
+
title: `Title_${s.toLowerCase().split(" ").join("_")}`,
|
|
637
637
|
policy: "Document Release",
|
|
638
|
-
description:
|
|
638
|
+
description: n
|
|
639
639
|
},
|
|
640
640
|
relateddata: {
|
|
641
641
|
files: [{
|
|
642
642
|
dataelements: {
|
|
643
|
-
title: `${
|
|
643
|
+
title: `${s}.json`,
|
|
644
644
|
receipt: C
|
|
645
645
|
}
|
|
646
646
|
}]
|
|
647
647
|
},
|
|
648
|
-
tempId:
|
|
648
|
+
tempId: j()
|
|
649
649
|
}]
|
|
650
650
|
}),
|
|
651
651
|
type: "json",
|
|
@@ -670,7 +670,7 @@ async function $e(e, t, n, s, i = void 0, r = void 0) {
|
|
|
670
670
|
}
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function b(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1) {
|
|
674
674
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
675
675
|
f(a, {
|
|
676
676
|
method: "GET",
|
|
@@ -686,10 +686,10 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
686
686
|
(S, _, y) => _ === y.findIndex(
|
|
687
687
|
(C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
|
|
688
688
|
)
|
|
689
|
-
),
|
|
689
|
+
), s && (Array.isArray(s) ? s.forEach((S) => {
|
|
690
690
|
m || h.forEach((_) => {
|
|
691
|
-
if (S === _.role.name &&
|
|
692
|
-
m = S, u =
|
|
691
|
+
if (S === _.role.name && n === _.organization.title)
|
|
692
|
+
m = S, u = n;
|
|
693
693
|
else if (S === _.role.name) {
|
|
694
694
|
let y = h.filter(
|
|
695
695
|
(C) => C.role.name === S
|
|
@@ -698,11 +698,11 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
698
698
|
}
|
|
699
699
|
});
|
|
700
700
|
}) : h.forEach((S) => {
|
|
701
|
-
if (
|
|
702
|
-
m =
|
|
703
|
-
else if (
|
|
701
|
+
if (s === S.role.name && n === S.organization.title)
|
|
702
|
+
m = s, u = n;
|
|
703
|
+
else if (s === S.role.name) {
|
|
704
704
|
let _ = h.filter(
|
|
705
|
-
(y) => y.role.name ===
|
|
705
|
+
(y) => y.role.name === s
|
|
706
706
|
);
|
|
707
707
|
_.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : r(_);
|
|
708
708
|
}
|
|
@@ -719,23 +719,23 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
719
719
|
}
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
-
async function
|
|
722
|
+
async function R(e, t = void 0, s = void 0) {
|
|
723
723
|
return (!e.objID || e.objID === "") && console.warn(
|
|
724
724
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
725
725
|
), (e.space === "" || !e.space) && console.warn(
|
|
726
726
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
727
727
|
), (e.token === "" || !e.token) && (K(
|
|
728
728
|
e,
|
|
729
|
-
(
|
|
730
|
-
e.token =
|
|
729
|
+
(n) => {
|
|
730
|
+
e.token = n;
|
|
731
731
|
},
|
|
732
|
-
(
|
|
733
|
-
console.log("☠️ error => ",
|
|
732
|
+
(n) => {
|
|
733
|
+
console.log("☠️ error => ", n);
|
|
734
734
|
}
|
|
735
735
|
), console.warn(
|
|
736
736
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
737
|
-
)), new Promise((
|
|
738
|
-
|
|
737
|
+
)), new Promise((n, i) => {
|
|
738
|
+
A(
|
|
739
739
|
e,
|
|
740
740
|
(r) => {
|
|
741
741
|
f(r, {
|
|
@@ -750,10 +750,10 @@ async function j(e, t = void 0, n = void 0) {
|
|
|
750
750
|
} catch {
|
|
751
751
|
c = a;
|
|
752
752
|
}
|
|
753
|
-
t && typeof t == "function" && t(c),
|
|
753
|
+
t && typeof t == "function" && t(c), n(c);
|
|
754
754
|
},
|
|
755
755
|
onFailure(a, c, d) {
|
|
756
|
-
|
|
756
|
+
s && (console.log("error http", a), s({
|
|
757
757
|
msg: JSON.parse(a),
|
|
758
758
|
headers: c,
|
|
759
759
|
xhr: d
|
|
@@ -766,12 +766,12 @@ async function j(e, t = void 0, n = void 0) {
|
|
|
766
766
|
});
|
|
767
767
|
},
|
|
768
768
|
(r) => {
|
|
769
|
-
|
|
769
|
+
s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
|
-
async function B(e, t,
|
|
774
|
+
async function B(e, t, s = void 0, n = void 0) {
|
|
775
775
|
let i = [];
|
|
776
776
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
777
777
|
for (let a = 0; a < t.length; a += 80) {
|
|
@@ -786,15 +786,15 @@ async function B(e, t, n = void 0, s = void 0) {
|
|
|
786
786
|
a++, a < i.length && o(a);
|
|
787
787
|
},
|
|
788
788
|
(c) => {
|
|
789
|
-
|
|
789
|
+
s && s(c);
|
|
790
790
|
}
|
|
791
791
|
);
|
|
792
792
|
};
|
|
793
793
|
o(0);
|
|
794
794
|
} else
|
|
795
|
-
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."),
|
|
795
|
+
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
796
796
|
}
|
|
797
|
-
function Y(e, t,
|
|
797
|
+
function Y(e, t, s = void 0, n = void 0, i = void 0) {
|
|
798
798
|
const r = [];
|
|
799
799
|
t.forEach((c) => {
|
|
800
800
|
r.push({
|
|
@@ -815,12 +815,12 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
815
815
|
type: "json",
|
|
816
816
|
onComplete(c) {
|
|
817
817
|
const d = c.data;
|
|
818
|
-
c.success === !0 && (
|
|
818
|
+
c.success === !0 && (s && s(), d.forEach((l) => {
|
|
819
819
|
try {
|
|
820
820
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
821
821
|
f(u, {
|
|
822
822
|
onComplete: (m) => {
|
|
823
|
-
|
|
823
|
+
n && n({
|
|
824
824
|
objectId: l.id,
|
|
825
825
|
fileName: p,
|
|
826
826
|
data: JSON.parse(m)
|
|
@@ -840,11 +840,11 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Ae(e, t, s = void 0, n = void 0) {
|
|
844
844
|
return new Promise((i) => {
|
|
845
845
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
846
846
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
847
|
-
|
|
847
|
+
b(
|
|
848
848
|
e.space,
|
|
849
849
|
"ESPACE COMMUN",
|
|
850
850
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -869,21 +869,21 @@ function Fe(e, t, n = void 0, s = void 0) {
|
|
|
869
869
|
}),
|
|
870
870
|
type: "json",
|
|
871
871
|
onComplete(a) {
|
|
872
|
-
|
|
872
|
+
s && s(a);
|
|
873
873
|
},
|
|
874
874
|
onFailure(a) {
|
|
875
|
-
|
|
875
|
+
n && n(a);
|
|
876
876
|
}
|
|
877
877
|
};
|
|
878
878
|
f(r, o);
|
|
879
879
|
}
|
|
880
880
|
});
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function $e(e, t, s, n = void 0, i = void 0) {
|
|
883
883
|
return new Promise((r) => {
|
|
884
884
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
885
885
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
886
|
-
|
|
886
|
+
b(
|
|
887
887
|
e.space,
|
|
888
888
|
"ESPACE COMMUN",
|
|
889
889
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -904,12 +904,12 @@ function Ae(e, t, n, s = void 0, i = void 0) {
|
|
|
904
904
|
data: JSON.stringify({
|
|
905
905
|
data: [{
|
|
906
906
|
id: t,
|
|
907
|
-
nextState:
|
|
907
|
+
nextState: s
|
|
908
908
|
}]
|
|
909
909
|
}),
|
|
910
910
|
type: "json",
|
|
911
911
|
onComplete(c) {
|
|
912
|
-
|
|
912
|
+
n && n(c);
|
|
913
913
|
},
|
|
914
914
|
onFailure(c) {
|
|
915
915
|
i && i(c);
|
|
@@ -919,11 +919,11 @@ function Ae(e, t, n, s = void 0, i = void 0) {
|
|
|
919
919
|
}
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
function Ue(e, t,
|
|
922
|
+
function Ue(e, t, s = void 0, n = void 0) {
|
|
923
923
|
return new Promise((i) => {
|
|
924
924
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
925
925
|
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
926
|
-
|
|
926
|
+
b(
|
|
927
927
|
e.space,
|
|
928
928
|
"ESPACE COMMUN",
|
|
929
929
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -948,21 +948,21 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
948
948
|
}),
|
|
949
949
|
type: "json",
|
|
950
950
|
onComplete(a) {
|
|
951
|
-
|
|
951
|
+
s && s(a);
|
|
952
952
|
},
|
|
953
953
|
onFailure(a) {
|
|
954
|
-
|
|
954
|
+
n && n(a);
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
957
|
f(r, o);
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
|
-
function De(e, t,
|
|
961
|
+
function De(e, t, s = void 0, n = void 0) {
|
|
962
962
|
return new Promise((i) => {
|
|
963
963
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
964
964
|
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
965
|
-
|
|
965
|
+
b(
|
|
966
966
|
e.space,
|
|
967
967
|
"ESPACE COMMUN",
|
|
968
968
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -993,21 +993,21 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
993
993
|
}),
|
|
994
994
|
type: "json",
|
|
995
995
|
onComplete(a) {
|
|
996
|
-
|
|
996
|
+
s && s(a);
|
|
997
997
|
},
|
|
998
998
|
onFailure(a) {
|
|
999
|
-
|
|
999
|
+
n && n(a);
|
|
1000
1000
|
}
|
|
1001
1001
|
};
|
|
1002
1002
|
f(r, o);
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function je(e, t, s, n = void 0, i = void 0) {
|
|
1007
1007
|
return new Promise((r) => {
|
|
1008
1008
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1009
1009
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
1010
|
-
|
|
1010
|
+
b(
|
|
1011
1011
|
e.space,
|
|
1012
1012
|
"ESPACE COMMUN",
|
|
1013
1013
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -1028,9 +1028,9 @@ function Ie(e, t, n, s = void 0, i = void 0) {
|
|
|
1028
1028
|
data: JSON.stringify({
|
|
1029
1029
|
data: [{
|
|
1030
1030
|
physicalid: t,
|
|
1031
|
-
proposedRevision:
|
|
1031
|
+
proposedRevision: s,
|
|
1032
1032
|
modifiedAttributes: {
|
|
1033
|
-
revision:
|
|
1033
|
+
revision: s
|
|
1034
1034
|
}
|
|
1035
1035
|
}],
|
|
1036
1036
|
folderid: null,
|
|
@@ -1038,7 +1038,7 @@ function Ie(e, t, n, s = void 0, i = void 0) {
|
|
|
1038
1038
|
}),
|
|
1039
1039
|
type: "json",
|
|
1040
1040
|
onComplete(c) {
|
|
1041
|
-
|
|
1041
|
+
n && n(c);
|
|
1042
1042
|
},
|
|
1043
1043
|
onFailure(c) {
|
|
1044
1044
|
i && i(c);
|
|
@@ -1048,7 +1048,7 @@ function Ie(e, t, n, s = void 0, i = void 0) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Ie(e, t, s, n, i = void 0, r = void 0) {
|
|
1052
1052
|
return console.log("credentials", e), new Promise((o) => {
|
|
1053
1053
|
`${e.space}`, JSON.stringify({
|
|
1054
1054
|
csrf: {
|
|
@@ -1070,12 +1070,12 @@ function je(e, t, n, s, i = void 0, r = void 0) {
|
|
|
1070
1070
|
});
|
|
1071
1071
|
}
|
|
1072
1072
|
//!SECTION
|
|
1073
|
-
function Re(e, t = void 0,
|
|
1074
|
-
const
|
|
1073
|
+
function Re(e, t = void 0, s = void 0) {
|
|
1074
|
+
const n = {
|
|
1075
1075
|
base: `${e.space}`,
|
|
1076
1076
|
uri: "/resources/bps/cspaces",
|
|
1077
1077
|
optTenant: `tenant=${e.tenant}`
|
|
1078
|
-
}, i = `${
|
|
1078
|
+
}, i = `${n.base}${n.uri}?${n.optTenant}`;
|
|
1079
1079
|
f(i, {
|
|
1080
1080
|
method: "GET",
|
|
1081
1081
|
headers: {
|
|
@@ -1087,54 +1087,54 @@ function Re(e, t = void 0, n = void 0) {
|
|
|
1087
1087
|
t && t(a, o);
|
|
1088
1088
|
},
|
|
1089
1089
|
onFailure(r, o, a) {
|
|
1090
|
-
|
|
1090
|
+
s && s({ response: r, headers: o, xhr: a });
|
|
1091
1091
|
}
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
|
-
function xe(e, t,
|
|
1095
|
-
|
|
1094
|
+
function xe(e, t, s, n) {
|
|
1095
|
+
A(
|
|
1096
1096
|
e.space,
|
|
1097
1097
|
t,
|
|
1098
1098
|
(i) => {
|
|
1099
1099
|
f(i, {
|
|
1100
1100
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1101
1101
|
onComplete: (r) => {
|
|
1102
|
-
|
|
1102
|
+
s && s(r);
|
|
1103
1103
|
},
|
|
1104
1104
|
onFailure: (r) => {
|
|
1105
|
-
console.log("error http", r),
|
|
1105
|
+
console.log("error http", r), n && n(r);
|
|
1106
1106
|
}
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
|
-
async function Pe(e, t,
|
|
1111
|
+
async function Pe(e, t, s = void 0, n = void 0) {
|
|
1112
1112
|
return new Promise((i) => {
|
|
1113
|
-
|
|
1113
|
+
A(e, t, (r) => {
|
|
1114
1114
|
f(r, {
|
|
1115
|
-
onComplete: (o, a, c) => (i(JSON.parse(o)),
|
|
1115
|
+
onComplete: (o, a, c) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, c), i),
|
|
1116
1116
|
onFailure: (o, a, c) => {
|
|
1117
|
-
|
|
1117
|
+
n && n(o, a, c), console.log(o, a?.errormsg);
|
|
1118
1118
|
}
|
|
1119
1119
|
});
|
|
1120
1120
|
});
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
|
-
function Me(e, t,
|
|
1123
|
+
function Me(e, t, s, n = void 0, i = void 0) {
|
|
1124
1124
|
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1125
1125
|
v(
|
|
1126
1126
|
e,
|
|
1127
|
-
|
|
1127
|
+
s,
|
|
1128
1128
|
(o) => {
|
|
1129
1129
|
const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
|
|
1130
1130
|
V(
|
|
1131
1131
|
e,
|
|
1132
|
-
|
|
1132
|
+
s,
|
|
1133
1133
|
a,
|
|
1134
1134
|
r,
|
|
1135
1135
|
c,
|
|
1136
1136
|
(d) => {
|
|
1137
|
-
|
|
1137
|
+
n && n(d);
|
|
1138
1138
|
},
|
|
1139
1139
|
(d) => {
|
|
1140
1140
|
i && i(d);
|
|
@@ -1143,65 +1143,65 @@ function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
let
|
|
1147
|
-
const
|
|
1148
|
-
async function Le(e, t = void 0,
|
|
1146
|
+
let x, P;
|
|
1147
|
+
const $ = [];
|
|
1148
|
+
async function Le(e, t = void 0, s = void 0) {
|
|
1149
1149
|
e.objID && e.objID !== "" ? v(
|
|
1150
1150
|
e,
|
|
1151
|
-
(
|
|
1152
|
-
t && t(
|
|
1151
|
+
(n) => {
|
|
1152
|
+
t && t(n);
|
|
1153
1153
|
},
|
|
1154
|
-
(
|
|
1155
|
-
|
|
1154
|
+
(n) => {
|
|
1155
|
+
s && s(n);
|
|
1156
1156
|
}
|
|
1157
1157
|
) : (e.objID === null || e.objID === "") && T(
|
|
1158
1158
|
e,
|
|
1159
|
-
(
|
|
1160
|
-
t && t({ rep:
|
|
1159
|
+
(n) => {
|
|
1160
|
+
t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
|
|
1161
1161
|
},
|
|
1162
|
-
(
|
|
1163
|
-
|
|
1162
|
+
(n) => {
|
|
1163
|
+
s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
|
|
1164
1164
|
}
|
|
1165
1165
|
);
|
|
1166
1166
|
}
|
|
1167
|
-
async function Je(e, t = void 0,
|
|
1168
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1167
|
+
async function Je(e, t = void 0, s = void 0) {
|
|
1168
|
+
console.log("getDatasByTenant (getDocuments)", e), await R(
|
|
1169
1169
|
e,
|
|
1170
|
-
(
|
|
1170
|
+
(n) => {
|
|
1171
1171
|
const i = {};
|
|
1172
|
-
i.obj =
|
|
1172
|
+
i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
|
|
1173
1173
|
},
|
|
1174
|
-
(
|
|
1175
|
-
|
|
1174
|
+
(n) => {
|
|
1175
|
+
s && s?.(n);
|
|
1176
1176
|
}
|
|
1177
1177
|
);
|
|
1178
1178
|
}
|
|
1179
|
-
function Ee(e, t = void 0,
|
|
1180
|
-
const
|
|
1179
|
+
function Ee(e, t = void 0, s = void 0) {
|
|
1180
|
+
const n = [];
|
|
1181
1181
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1182
1182
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
1185
|
e.objIds.forEach((i, r) => {
|
|
1186
|
-
|
|
1186
|
+
R(
|
|
1187
1187
|
e,
|
|
1188
1188
|
i.objID,
|
|
1189
1189
|
(o) => {
|
|
1190
|
-
|
|
1190
|
+
n.push({ [i.name]: o }), i.name === "dbProjets" && (x = o.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
1193
|
});
|
|
1194
1194
|
}
|
|
1195
|
-
function q(e, t,
|
|
1195
|
+
function q(e, t, s = void 0, n = void 0) {
|
|
1196
1196
|
B(
|
|
1197
1197
|
e,
|
|
1198
|
-
|
|
1198
|
+
x,
|
|
1199
1199
|
(i) => {
|
|
1200
1200
|
const r = [...t];
|
|
1201
|
-
r.find((o) => o.objectID === i.objectId).data = i.data,
|
|
1201
|
+
r.find((o) => o.objectID === i.objectId).data = i.data, P = r, $.push(i.data), s && s($);
|
|
1202
1202
|
},
|
|
1203
1203
|
(i) => {
|
|
1204
|
-
|
|
1204
|
+
n && (n(i), console.log(i));
|
|
1205
1205
|
}
|
|
1206
1206
|
);
|
|
1207
1207
|
}
|
|
@@ -1212,7 +1212,7 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
|
1212
1212
|
"usersgroup",
|
|
1213
1213
|
"3dplan",
|
|
1214
1214
|
"dashboard"
|
|
1215
|
-
],
|
|
1215
|
+
], M = {
|
|
1216
1216
|
how: "ds6w:how",
|
|
1217
1217
|
what: "ds6w:what",
|
|
1218
1218
|
when: "ds6w:when",
|
|
@@ -1225,7 +1225,7 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
|
1225
1225
|
order_by: "desc",
|
|
1226
1226
|
tag: "testTag"
|
|
1227
1227
|
};
|
|
1228
|
-
function Ge(e, t,
|
|
1228
|
+
function Ge(e, t, s = void 0, n = void 0) {
|
|
1229
1229
|
const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
|
|
1230
1230
|
uri: "/resources/6w/tags",
|
|
1231
1231
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1238,7 +1238,7 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1238
1238
|
uri: `pid://${o}`
|
|
1239
1239
|
}
|
|
1240
1240
|
],
|
|
1241
|
-
predicate:
|
|
1241
|
+
predicate: M[a],
|
|
1242
1242
|
object: {
|
|
1243
1243
|
literal: c
|
|
1244
1244
|
}
|
|
@@ -1265,27 +1265,27 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1265
1265
|
e,
|
|
1266
1266
|
t,
|
|
1267
1267
|
(y) => {
|
|
1268
|
-
|
|
1268
|
+
s && s(y);
|
|
1269
1269
|
},
|
|
1270
1270
|
(y) => {
|
|
1271
|
-
|
|
1271
|
+
n && n(y);
|
|
1272
1272
|
}
|
|
1273
1273
|
);
|
|
1274
1274
|
},
|
|
1275
1275
|
(g, h) => {
|
|
1276
1276
|
const S = g;
|
|
1277
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1277
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
|
|
1278
1278
|
}
|
|
1279
1279
|
);
|
|
1280
1280
|
}, 2e3);
|
|
1281
1281
|
},
|
|
1282
1282
|
onFailure(u, m) {
|
|
1283
1283
|
const g = u;
|
|
1284
|
-
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1284
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
|
|
1285
1285
|
}
|
|
1286
1286
|
});
|
|
1287
1287
|
}
|
|
1288
|
-
function Z(e, t,
|
|
1288
|
+
function Z(e, t, s = void 0, n = void 0) {
|
|
1289
1289
|
console.log("obj ", t);
|
|
1290
1290
|
const i = t.info.name, r = {
|
|
1291
1291
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
@@ -1293,7 +1293,7 @@ function Z(e, t, n = void 0, s = void 0) {
|
|
|
1293
1293
|
}, o = `${r.baseUrl}${r.uri}`, a = {
|
|
1294
1294
|
"Content-Type": "application/json",
|
|
1295
1295
|
Accept: "application/json,text/javascript,*/*"
|
|
1296
|
-
}, c =
|
|
1296
|
+
}, c = j(), d = {
|
|
1297
1297
|
with_indexing_date: !0,
|
|
1298
1298
|
with_synthesis: !0,
|
|
1299
1299
|
with_nls: !1,
|
|
@@ -1360,15 +1360,15 @@ function Z(e, t, n = void 0, s = void 0) {
|
|
|
1360
1360
|
data: JSON.stringify(d),
|
|
1361
1361
|
onComplete(l) {
|
|
1362
1362
|
const p = JSON.parse(l);
|
|
1363
|
-
|
|
1363
|
+
s(p);
|
|
1364
1364
|
},
|
|
1365
1365
|
onFailure(l, p) {
|
|
1366
1366
|
const u = l;
|
|
1367
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1367
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
|
|
1368
1368
|
}
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
|
-
function Ke(e, t,
|
|
1371
|
+
function Ke(e, t, s = void 0, n = void 0) {
|
|
1372
1372
|
const { objId: i, pred: r, tag: o } = t, a = {
|
|
1373
1373
|
uri: "/resources/6w/tags",
|
|
1374
1374
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1381,7 +1381,7 @@ function Ke(e, t, n = void 0, s = void 0) {
|
|
|
1381
1381
|
uri: `pid://${i}`
|
|
1382
1382
|
}
|
|
1383
1383
|
],
|
|
1384
|
-
predicate:
|
|
1384
|
+
predicate: M[r],
|
|
1385
1385
|
object: {
|
|
1386
1386
|
literal: o
|
|
1387
1387
|
}
|
|
@@ -1396,15 +1396,15 @@ function Ke(e, t, n = void 0, s = void 0) {
|
|
|
1396
1396
|
Accept: "application/json,text/javascript,*/*"
|
|
1397
1397
|
},
|
|
1398
1398
|
onComplete(l) {
|
|
1399
|
-
|
|
1399
|
+
s && s(l);
|
|
1400
1400
|
},
|
|
1401
1401
|
onFailure(l, p) {
|
|
1402
1402
|
const u = l;
|
|
1403
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1403
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function Xe(e, t = "",
|
|
1407
|
+
function Xe(e, t = "", s = void 0, n = void 0) {
|
|
1408
1408
|
const { space: i } = e;
|
|
1409
1409
|
if (t === "")
|
|
1410
1410
|
return;
|
|
@@ -1419,29 +1419,29 @@ function Xe(e, t = "", n = void 0, s = void 0) {
|
|
|
1419
1419
|
headers: o,
|
|
1420
1420
|
data: c,
|
|
1421
1421
|
onComplete(d) {
|
|
1422
|
-
|
|
1422
|
+
s && s(JSON.parse(d));
|
|
1423
1423
|
},
|
|
1424
1424
|
onFailure(d, l) {
|
|
1425
1425
|
const p = d;
|
|
1426
|
-
p.msg = l.error,
|
|
1426
|
+
p.msg = l.error, n && n(p);
|
|
1427
1427
|
}
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
|
-
async function w(e, t = void 0,
|
|
1431
|
-
const
|
|
1432
|
-
return f(
|
|
1430
|
+
async function w(e, t = void 0, s = void 0) {
|
|
1431
|
+
const n = e.space + "/api/index/tk";
|
|
1432
|
+
return f(n, {
|
|
1433
1433
|
onComplete(i, r, o) {
|
|
1434
1434
|
const a = JSON.parse(i);
|
|
1435
1435
|
if (t)
|
|
1436
1436
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1437
1437
|
},
|
|
1438
1438
|
onFailure(i) {
|
|
1439
|
-
|
|
1439
|
+
s && s(i);
|
|
1440
1440
|
}
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
1443
|
-
function Ve(e, t = void 0,
|
|
1444
|
-
const
|
|
1443
|
+
function Ve(e, t = void 0, s = void 0) {
|
|
1444
|
+
const n = `${e.space}/api/exalead/whatsnew`, i = {
|
|
1445
1445
|
params: {
|
|
1446
1446
|
community_id: null,
|
|
1447
1447
|
hash_key: null,
|
|
@@ -1452,7 +1452,7 @@ function Ve(e, t = void 0, n = void 0) {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
};
|
|
1454
1454
|
w(e, (r) => {
|
|
1455
|
-
f(
|
|
1455
|
+
f(n, {
|
|
1456
1456
|
method: "POST",
|
|
1457
1457
|
headers: {
|
|
1458
1458
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
@@ -1465,13 +1465,13 @@ function Ve(e, t = void 0, n = void 0) {
|
|
|
1465
1465
|
t && t(o, a);
|
|
1466
1466
|
},
|
|
1467
1467
|
onFailure(o, a) {
|
|
1468
|
-
|
|
1468
|
+
s && s(o, a);
|
|
1469
1469
|
}
|
|
1470
1470
|
});
|
|
1471
1471
|
});
|
|
1472
1472
|
}
|
|
1473
|
-
function We(e, t = void 0,
|
|
1474
|
-
const
|
|
1473
|
+
function We(e, t = void 0, s = void 0) {
|
|
1474
|
+
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1475
1475
|
params: {
|
|
1476
1476
|
idsToFilterArr: [],
|
|
1477
1477
|
mode: "offline",
|
|
@@ -1481,7 +1481,7 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
};
|
|
1483
1483
|
w(e, (r) => {
|
|
1484
|
-
f(
|
|
1484
|
+
f(n, {
|
|
1485
1485
|
method: "POST",
|
|
1486
1486
|
headers: {
|
|
1487
1487
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
@@ -1495,18 +1495,18 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1495
1495
|
t && t(c, o);
|
|
1496
1496
|
},
|
|
1497
1497
|
onFailure(o, a) {
|
|
1498
|
-
|
|
1498
|
+
s && s(o, a);
|
|
1499
1499
|
}
|
|
1500
1500
|
});
|
|
1501
1501
|
});
|
|
1502
1502
|
}
|
|
1503
|
-
function Be(e, t = void 0,
|
|
1504
|
-
const
|
|
1503
|
+
function Be(e, t = void 0, s = void 0) {
|
|
1504
|
+
const n = {
|
|
1505
1505
|
base: e.space,
|
|
1506
1506
|
uri: "/api/community/listmycommunities",
|
|
1507
1507
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1508
1508
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1509
|
-
}, i = `${
|
|
1509
|
+
}, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
|
|
1510
1510
|
w(e, (o) => {
|
|
1511
1511
|
f(i, {
|
|
1512
1512
|
method: "GET",
|
|
@@ -1531,18 +1531,18 @@ function Be(e, t = void 0, n = void 0) {
|
|
|
1531
1531
|
(h) => {
|
|
1532
1532
|
u++, g.members = h, r.push(g), u === p.length && t && t(r);
|
|
1533
1533
|
},
|
|
1534
|
-
(h) =>
|
|
1534
|
+
(h) => s(h)
|
|
1535
1535
|
);
|
|
1536
1536
|
});
|
|
1537
1537
|
},
|
|
1538
1538
|
onFailure(a, c) {
|
|
1539
1539
|
const d = a;
|
|
1540
|
-
d.status = c.status, d.response = c.errormsg,
|
|
1540
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1541
1541
|
}
|
|
1542
1542
|
});
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
|
-
function ee(e, t,
|
|
1545
|
+
function ee(e, t, s, n) {
|
|
1546
1546
|
const i = `${e.space}/api/community/listmembers`, r = {
|
|
1547
1547
|
params: {
|
|
1548
1548
|
page: e.page ? e.page : 1,
|
|
@@ -1561,18 +1561,18 @@ function ee(e, t, n, s) {
|
|
|
1561
1561
|
data: JSON.stringify(r),
|
|
1562
1562
|
type: "json",
|
|
1563
1563
|
onComplete(a, c, d) {
|
|
1564
|
-
|
|
1564
|
+
s && s(a);
|
|
1565
1565
|
},
|
|
1566
1566
|
onFailure(a, c) {
|
|
1567
1567
|
const d = a;
|
|
1568
|
-
d.status = c.status, d.response = c.errormsg,
|
|
1568
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1569
1569
|
}
|
|
1570
1570
|
});
|
|
1571
1571
|
});
|
|
1572
1572
|
}
|
|
1573
|
-
function Ye(e, t = void 0,
|
|
1574
|
-
const
|
|
1575
|
-
e.commu_id || (e.commu_id =
|
|
1573
|
+
function Ye(e, t = void 0, s = void 0) {
|
|
1574
|
+
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1575
|
+
e.commu_id || (e.commu_id = n);
|
|
1576
1576
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1577
1577
|
w(e, (r) => {
|
|
1578
1578
|
f(i, {
|
|
@@ -1588,12 +1588,12 @@ function Ye(e, t = void 0, n = void 0) {
|
|
|
1588
1588
|
},
|
|
1589
1589
|
onFailure(o, a) {
|
|
1590
1590
|
const c = o;
|
|
1591
|
-
c.status = a.status, c.response = a.errormsg,
|
|
1591
|
+
c.status = a.status, c.response = a.errormsg, s && s(c);
|
|
1592
1592
|
}
|
|
1593
1593
|
});
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
|
-
function qe(e, t,
|
|
1596
|
+
function qe(e, t, s = void 0, n = void 0) {
|
|
1597
1597
|
const { listAllContacts: i, currentUser: r } = e;
|
|
1598
1598
|
console.log("__listAllContacts", i.hits);
|
|
1599
1599
|
const o = `${e.space}/api/directmessages`, a = {
|
|
@@ -1611,7 +1611,7 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1611
1611
|
l !== void 0 && (c.id_msg = l.id, d = !0, U(e, c));
|
|
1612
1612
|
},
|
|
1613
1613
|
(l) => {
|
|
1614
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1614
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), c.id_msg = "";
|
|
1615
1615
|
}
|
|
1616
1616
|
), d === !1 && setTimeout(() => {
|
|
1617
1617
|
d === !1 && w(e, (l) => {
|
|
@@ -1626,17 +1626,17 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1626
1626
|
type: "json",
|
|
1627
1627
|
onComplete(p, u, m) {
|
|
1628
1628
|
const g = p;
|
|
1629
|
-
g.reponse = JSON.parse(m.response), g.status = m.status,
|
|
1629
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), c.id_msg = g.result.id, U(e, c);
|
|
1630
1630
|
},
|
|
1631
1631
|
onFailure(p, u, m) {
|
|
1632
1632
|
const g = p;
|
|
1633
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1633
|
+
g.msg = u.errormsg, g.status = u.status, n && n(g);
|
|
1634
1634
|
}
|
|
1635
1635
|
});
|
|
1636
1636
|
});
|
|
1637
1637
|
}, 500);
|
|
1638
1638
|
}
|
|
1639
|
-
function te(e, t,
|
|
1639
|
+
function te(e, t, s, n) {
|
|
1640
1640
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1641
1641
|
w(e, (r) => {
|
|
1642
1642
|
f(i, {
|
|
@@ -1656,16 +1656,16 @@ function te(e, t, n, s) {
|
|
|
1656
1656
|
u.push(m.login);
|
|
1657
1657
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1658
1658
|
});
|
|
1659
|
-
|
|
1659
|
+
s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
|
|
1660
1660
|
},
|
|
1661
1661
|
onFailure(o) {
|
|
1662
1662
|
const a = o;
|
|
1663
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1663
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
|
|
1664
1664
|
}
|
|
1665
1665
|
});
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
|
-
function U(e, t,
|
|
1668
|
+
function U(e, t, s = void 0, n = void 0) {
|
|
1669
1669
|
const i = {
|
|
1670
1670
|
base: e.space,
|
|
1671
1671
|
uri: "/api/community",
|
|
@@ -1693,21 +1693,21 @@ function U(e, t, n = void 0, s = void 0) {
|
|
|
1693
1693
|
type: "json",
|
|
1694
1694
|
onComplete(c, d, l) {
|
|
1695
1695
|
const p = c;
|
|
1696
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1696
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1697
1697
|
},
|
|
1698
1698
|
onFailure(c, d) {
|
|
1699
1699
|
const l = c;
|
|
1700
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1700
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1701
1701
|
}
|
|
1702
1702
|
});
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
1705
|
function ne(e) {
|
|
1706
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1706
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1707
1707
|
return `<p>${e} </p>
|
|
1708
1708
|
<br/>
|
|
1709
1709
|
<hr/>
|
|
1710
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1710
|
+
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
|
|
1711
1711
|
}
|
|
1712
1712
|
const se = {
|
|
1713
1713
|
title: "TEST DEV COMMUNITY IDEA",
|
|
@@ -1719,7 +1719,7 @@ const se = {
|
|
|
1719
1719
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1720
1720
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1721
1721
|
};
|
|
1722
|
-
function He(e, t,
|
|
1722
|
+
function He(e, t, s = void 0, n = void 0) {
|
|
1723
1723
|
const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1724
1724
|
(c) => c.id === t.community_id
|
|
1725
1725
|
), o = e.swymCommunities.find(
|
|
@@ -1749,16 +1749,16 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1749
1749
|
type: "json",
|
|
1750
1750
|
onComplete(l, p, u) {
|
|
1751
1751
|
const m = JSON.parse(l);
|
|
1752
|
-
m.status = u.status, m.response = u.response,
|
|
1752
|
+
m.status = u.status, m.response = u.response, s && s(m);
|
|
1753
1753
|
},
|
|
1754
1754
|
onFailure(l, p, u) {
|
|
1755
1755
|
const m = l;
|
|
1756
|
-
m.status = p.status, m.response = p.errormsg,
|
|
1756
|
+
m.status = p.status, m.response = p.errormsg, n && n(m);
|
|
1757
1757
|
}
|
|
1758
1758
|
});
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
|
-
function ze(e, t,
|
|
1761
|
+
function ze(e, t, s = void 0, n = void 0) {
|
|
1762
1762
|
const i = `${e.space}/api/idea/delete`, r = {
|
|
1763
1763
|
params: {
|
|
1764
1764
|
community_id: t.community_id,
|
|
@@ -1776,16 +1776,16 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1776
1776
|
data: JSON.stringify(r),
|
|
1777
1777
|
type: "json",
|
|
1778
1778
|
onComplete(a, c, d) {
|
|
1779
|
-
|
|
1779
|
+
s && s(a);
|
|
1780
1780
|
},
|
|
1781
1781
|
onFailure(a, c, d) {
|
|
1782
1782
|
const l = a;
|
|
1783
|
-
l.status = c.status, l.response = c.errormsg,
|
|
1783
|
+
l.status = c.status, l.response = c.errormsg, n && n(l);
|
|
1784
1784
|
}
|
|
1785
1785
|
});
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
|
-
function Qe(e, t = "",
|
|
1788
|
+
function Qe(e, t = "", s = void 0, n = void 0) {
|
|
1789
1789
|
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1790
1790
|
t === "" && (t = i);
|
|
1791
1791
|
const r = `${e.space}/api/idea/get`, o = {
|
|
@@ -1805,16 +1805,16 @@ function Qe(e, t = "", n = void 0, s = void 0) {
|
|
|
1805
1805
|
type: "json",
|
|
1806
1806
|
onComplete(c) {
|
|
1807
1807
|
const d = c;
|
|
1808
|
-
d.msg = d.result.message,
|
|
1808
|
+
d.msg = d.result.message, s && s(d);
|
|
1809
1809
|
},
|
|
1810
1810
|
onFailure(c) {
|
|
1811
1811
|
const d = c;
|
|
1812
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1812
|
+
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1813
1813
|
}
|
|
1814
1814
|
});
|
|
1815
1815
|
});
|
|
1816
1816
|
}
|
|
1817
|
-
function Ze(e, t = se,
|
|
1817
|
+
function Ze(e, t = se, s = void 0, n = void 0) {
|
|
1818
1818
|
const i = {
|
|
1819
1819
|
uri: "/api/idea/list",
|
|
1820
1820
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
@@ -1828,11 +1828,11 @@ function Ze(e, t = se, n = void 0, s = void 0) {
|
|
|
1828
1828
|
},
|
|
1829
1829
|
onComplete(a) {
|
|
1830
1830
|
const c = JSON.parse(a);
|
|
1831
|
-
|
|
1831
|
+
s && s(c);
|
|
1832
1832
|
},
|
|
1833
1833
|
onFailure(a, c) {
|
|
1834
1834
|
const d = a;
|
|
1835
|
-
d.status = c.status, d.response = c.errormsg,
|
|
1835
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1836
1836
|
}
|
|
1837
1837
|
});
|
|
1838
1838
|
});
|
|
@@ -1912,10 +1912,10 @@ function ae(e) {
|
|
|
1912
1912
|
<p>
|
|
1913
1913
|
</p>` : e;
|
|
1914
1914
|
}
|
|
1915
|
-
function et(e, t = void 0,
|
|
1916
|
-
const
|
|
1915
|
+
function et(e, t = void 0, s = void 0) {
|
|
1916
|
+
const n = e.space + "/api/user/getcurrent/";
|
|
1917
1917
|
w(e, (i) => {
|
|
1918
|
-
f(
|
|
1918
|
+
f(n, {
|
|
1919
1919
|
method: "GET",
|
|
1920
1920
|
headers: {
|
|
1921
1921
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
@@ -1926,12 +1926,12 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1926
1926
|
},
|
|
1927
1927
|
onFailure(r, o, a) {
|
|
1928
1928
|
const c = { erreur: JSON.parse(r), headers: o, xhr: a };
|
|
1929
|
-
|
|
1929
|
+
s && s(c);
|
|
1930
1930
|
}
|
|
1931
1931
|
});
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
|
-
function tt(e, t,
|
|
1934
|
+
function tt(e, t, s = void 0, n = void 0) {
|
|
1935
1935
|
const i = e.space + "/api/user/find/login/" + t;
|
|
1936
1936
|
w(
|
|
1937
1937
|
e,
|
|
@@ -1941,37 +1941,27 @@ function tt(e, t, n = void 0, s = void 0) {
|
|
|
1941
1941
|
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1942
1942
|
onComplete(o, a, c) {
|
|
1943
1943
|
const d = JSON.parse(o);
|
|
1944
|
-
|
|
1944
|
+
s && s(d);
|
|
1945
1945
|
},
|
|
1946
1946
|
onFailure(o) {
|
|
1947
|
-
|
|
1947
|
+
n && n(o);
|
|
1948
1948
|
}
|
|
1949
1949
|
});
|
|
1950
1950
|
},
|
|
1951
|
-
|
|
1951
|
+
n
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
|
-
function nt(e, t = void 0,
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
1961
|
-
const o = `${r[0].services[0].url}`;
|
|
1962
|
-
t && t(o);
|
|
1963
|
-
}
|
|
1964
|
-
},
|
|
1965
|
-
onFailure(i) {
|
|
1966
|
-
n && n(i);
|
|
1967
|
-
}
|
|
1968
|
-
});
|
|
1969
|
-
}
|
|
1954
|
+
function nt(e, t = void 0, s = void 0) {
|
|
1955
|
+
e.tenant && I(e, (n) => {
|
|
1956
|
+
console.log("serviceUrls", n);
|
|
1957
|
+
const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
1958
|
+
t && t(i);
|
|
1959
|
+
});
|
|
1970
1960
|
}
|
|
1971
|
-
function st(e, t = void 0,
|
|
1972
|
-
e.tenant &&
|
|
1973
|
-
console.log("serviceUrls",
|
|
1974
|
-
const i =
|
|
1961
|
+
function st(e, t = void 0, s = void 0) {
|
|
1962
|
+
e.tenant && I(e, (n) => {
|
|
1963
|
+
console.log("serviceUrls", n);
|
|
1964
|
+
const i = n.services.find((a) => a.id === "3dpassport")?.url, r = n.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
|
|
1975
1965
|
f(o, {
|
|
1976
1966
|
async onComplete(a) {
|
|
1977
1967
|
console.log("response", a);
|
|
@@ -1983,32 +1973,29 @@ function st(e, t = void 0, n = void 0) {
|
|
|
1983
1973
|
});
|
|
1984
1974
|
},
|
|
1985
1975
|
onFailure(a) {
|
|
1986
|
-
|
|
1976
|
+
s && s(a);
|
|
1987
1977
|
}
|
|
1988
1978
|
});
|
|
1989
1979
|
});
|
|
1990
1980
|
}
|
|
1991
1981
|
function at(e, t) {
|
|
1992
|
-
const n = new Headers();
|
|
1993
|
-
n.append("Authorization", `Bearer ${t}`);
|
|
1994
1982
|
const s = {
|
|
1995
1983
|
method: "GET",
|
|
1996
|
-
headers:
|
|
1997
|
-
redirect: "follow"
|
|
1984
|
+
headers: JSON.stringify({ Authorization: `Bearer ${t}` })
|
|
1998
1985
|
};
|
|
1999
|
-
fetch(`${e}/identity/users`, s).then((
|
|
1986
|
+
fetch(`${e}/identity/users`, s).then((n) => n.json()).then((n) => console.log(n)).catch((n) => console.error(n));
|
|
2000
1987
|
}
|
|
2001
1988
|
function it(e) {
|
|
2002
1989
|
const t = "Hello " + e;
|
|
2003
1990
|
return console.log(t), t;
|
|
2004
1991
|
}
|
|
2005
|
-
function ot(e, t = void 0,
|
|
2006
|
-
return console.log("credentials", e), new Promise((
|
|
1992
|
+
function ot(e, t = void 0, s = void 0) {
|
|
1993
|
+
return console.log("credentials", e), new Promise((n) => {
|
|
2007
1994
|
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
2008
|
-
const o =
|
|
1995
|
+
const o = E();
|
|
2009
1996
|
console.log("platformeInfo", o);
|
|
2010
1997
|
}
|
|
2011
|
-
|
|
1998
|
+
b(
|
|
2012
1999
|
e,
|
|
2013
2000
|
"Common space",
|
|
2014
2001
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -2019,7 +2006,7 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
2019
2006
|
},
|
|
2020
2007
|
!0
|
|
2021
2008
|
);
|
|
2022
|
-
const i =
|
|
2009
|
+
const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2023
2010
|
f(r, {
|
|
2024
2011
|
onComplete(o) {
|
|
2025
2012
|
if (Array.isArray(JSON.parse(o))) {
|
|
@@ -2070,24 +2057,24 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
2070
2057
|
t && t(d);
|
|
2071
2058
|
},
|
|
2072
2059
|
onFailure(d) {
|
|
2073
|
-
|
|
2060
|
+
s && s(d);
|
|
2074
2061
|
}
|
|
2075
2062
|
});
|
|
2076
2063
|
}
|
|
2077
2064
|
},
|
|
2078
2065
|
onFailure(o) {
|
|
2079
|
-
|
|
2066
|
+
s && s(o);
|
|
2080
2067
|
}
|
|
2081
2068
|
});
|
|
2082
2069
|
});
|
|
2083
2070
|
}
|
|
2084
2071
|
export {
|
|
2085
|
-
|
|
2072
|
+
j as UUID,
|
|
2086
2073
|
ot as _3DSearch_usersGroup,
|
|
2087
|
-
|
|
2088
|
-
|
|
2074
|
+
Fe as _3DSpace_Create_Doc,
|
|
2075
|
+
Ie as _3DSpace_bookmark_addSubsciptions,
|
|
2089
2076
|
T as _3DSpace_csrf,
|
|
2090
|
-
|
|
2077
|
+
R as _3DSpace_download_doc,
|
|
2091
2078
|
B as _3DSpace_download_multidoc,
|
|
2092
2079
|
V as _3DSpace_file_update,
|
|
2093
2080
|
W as _3DSpace_file_update_csr,
|
|
@@ -2095,13 +2082,13 @@ export {
|
|
|
2095
2082
|
v as _3DSpace_get_csrf,
|
|
2096
2083
|
X as _3DSpace_get_docInfo,
|
|
2097
2084
|
Y as _3DSpace_get_downloadTicket_multidoc,
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2085
|
+
b as _3DSpace_get_securityContexts,
|
|
2086
|
+
A as _3DSpace_get_ticket,
|
|
2087
|
+
je as _3DSpace_lifecycle_changeRevision,
|
|
2088
|
+
$e as _3DSpace_lifecycle_changeState,
|
|
2102
2089
|
Ue as _3DSpace_lifecycle_getGraph,
|
|
2103
2090
|
De as _3DSpace_lifecycle_getNextRevision,
|
|
2104
|
-
|
|
2091
|
+
Ae as _3DSpace_lifecycle_getNextStates,
|
|
2105
2092
|
qe as _3DSwym_buildDirectMessage,
|
|
2106
2093
|
ze as _3DSwym_deleteIdea,
|
|
2107
2094
|
te as _3DSwym_findCommunityToInstantMSG,
|
|
@@ -2121,9 +2108,9 @@ export {
|
|
|
2121
2108
|
_e as _AppMngt_get_users,
|
|
2122
2109
|
st as _Iterop_Auth_CAS,
|
|
2123
2110
|
at as _Iterop_ListUsers,
|
|
2124
|
-
|
|
2111
|
+
E as _getPlateformInfos,
|
|
2125
2112
|
ge as _getPlatformServices,
|
|
2126
|
-
|
|
2113
|
+
I as _getServiceUrl,
|
|
2127
2114
|
he as _getServiceUrl_3DPassport,
|
|
2128
2115
|
nt as _getServiceUrl_Iterop,
|
|
2129
2116
|
f as _httpCallAuthenticated,
|
|
@@ -2132,7 +2119,7 @@ export {
|
|
|
2132
2119
|
fe as _setupTagger,
|
|
2133
2120
|
Ge as addTagToDoc,
|
|
2134
2121
|
Se as compass_getListAdditionalApps,
|
|
2135
|
-
|
|
2122
|
+
J as couleurs,
|
|
2136
2123
|
we as createUserGroups,
|
|
2137
2124
|
q as dataMixing,
|
|
2138
2125
|
Oe as deleteUserGroups,
|
|
@@ -2150,8 +2137,8 @@ export {
|
|
|
2150
2137
|
Te as getUserGroupsList,
|
|
2151
2138
|
G as getUsersGroupRules,
|
|
2152
2139
|
Le as get_3DSpace_csrf,
|
|
2153
|
-
|
|
2154
|
-
|
|
2140
|
+
be as patchUserGroups,
|
|
2141
|
+
Ne as patchUserGroupsControl,
|
|
2155
2142
|
Me as pushDataIn3DSpace,
|
|
2156
2143
|
ve as readUserGroupControl,
|
|
2157
2144
|
Ke as removeTagToDoc,
|