@beam3_dev/api_module 0.0.99 → 0.0.101
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 +626 -621
- 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,7 +1,7 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as N } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
|
|
4
|
-
function
|
|
4
|
+
function I() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
7
7
|
const L = {
|
|
@@ -34,10 +34,10 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function re(e, t = void 0,
|
|
38
|
-
const
|
|
37
|
+
async function re(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 re(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 ce(e, t = void 0,
|
|
53
|
+
async function ce(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 ce(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 de(e, t = L) {
|
|
69
|
-
let
|
|
70
|
-
const
|
|
71
|
-
for (let
|
|
72
|
-
o.push({ date:
|
|
69
|
+
let n = N.now().year;
|
|
70
|
+
const s = e, o = [], c = (a) => {
|
|
71
|
+
for (let r in a)
|
|
72
|
+
o.push({ date: r, comment: a[r] });
|
|
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
|
{
|
|
@@ -80,63 +80,63 @@ async function de(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
r
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((r) => r.json()).then((r) => {
|
|
84
|
+
c(r);
|
|
85
|
+
}).catch((r) => console.error("Erreur : " + r));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
90
|
-
for (let
|
|
89
|
+
} : s;
|
|
90
|
+
for (let r of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start ===
|
|
92
|
+
(l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
94
|
+
name: "Férié : " + r.comment,
|
|
95
|
+
start: N.fromISO(r.date).toISODate(),
|
|
96
|
+
end: N.fromISO(r.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function le(e, t,
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
async function le(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 m(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 pe(e, t,
|
|
113
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
114
|
-
|
|
112
|
+
function pe(e, t, n) {
|
|
113
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
114
|
+
s.draggable(e, { data: t, start: n });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
function ue(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: U.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 fe(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 me(e, t = void 0,
|
|
131
|
+
async function me(e, t = void 0, n = void 0) {
|
|
132
132
|
await O(
|
|
133
133
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
|
-
(
|
|
134
|
+
(s) => {
|
|
135
135
|
(!e || e === "") && (e = U.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
136
|
-
|
|
136
|
+
s.getPlatformServices({
|
|
137
137
|
platformId: e,
|
|
138
138
|
onComplete: t,
|
|
139
|
-
onFailure:
|
|
139
|
+
onFailure: n
|
|
140
140
|
})
|
|
141
141
|
);
|
|
142
142
|
}
|
|
@@ -145,82 +145,82 @@ async function me(e, t = void 0, s = void 0) {
|
|
|
145
145
|
function J() {
|
|
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
|
-
appConf:
|
|
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
|
m(o, {
|
|
167
167
|
method: "GET",
|
|
168
168
|
headers: {
|
|
169
169
|
"Content-Type": "application/json",
|
|
170
170
|
Accept: "application/json"
|
|
171
171
|
},
|
|
172
|
-
onComplete(
|
|
173
|
-
const
|
|
172
|
+
onComplete(c, i, a) {
|
|
173
|
+
const r = JSON.parse(c), d = r.data.map((l) => {
|
|
174
174
|
const p = l.attributes.name, u = l.id;
|
|
175
175
|
return { name: p, id: u };
|
|
176
176
|
});
|
|
177
|
-
t && t(d,
|
|
177
|
+
t && t(d, r);
|
|
178
178
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
181
|
-
a.msg =
|
|
179
|
+
onFailure(c, i) {
|
|
180
|
+
const a = c;
|
|
181
|
+
a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function he(e, t = void 0,
|
|
186
|
-
let
|
|
187
|
-
m(
|
|
188
|
-
onComplete(o,
|
|
185
|
+
function he(e, t = void 0, n = void 0) {
|
|
186
|
+
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
|
+
m(s, {
|
|
188
|
+
onComplete(o, c, i) {
|
|
189
189
|
const a = JSON.parse(o);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
|
-
onFailure(o,
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
onFailure(o, c) {
|
|
193
|
+
const i = o;
|
|
194
|
+
i.msg = c.errormsg, i.errCode = c.errorcode, n && n(i);
|
|
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
|
m(o, {
|
|
201
|
-
onComplete(
|
|
202
|
-
const
|
|
203
|
-
|
|
201
|
+
onComplete(c, i, a) {
|
|
202
|
+
const r = JSON.parse(c);
|
|
203
|
+
n && n(r);
|
|
204
204
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
207
|
-
a.msg =
|
|
205
|
+
onFailure(c, i) {
|
|
206
|
+
const a = c;
|
|
207
|
+
a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const F = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
|
-
function _e(e, t,
|
|
216
|
-
const { space: o, currentUser:
|
|
215
|
+
function _e(e, t, n = void 0, s = void 0) {
|
|
216
|
+
const { space: o, currentUser: c } = e, a = `${o}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, r = {
|
|
219
219
|
groups: [
|
|
220
220
|
{
|
|
221
221
|
title: t.title,
|
|
222
222
|
description: t.description,
|
|
223
|
-
members: t.members || [
|
|
223
|
+
members: t.members || [c.email, "samuel.mureau@beam3.fr"],
|
|
224
224
|
pending_members: [],
|
|
225
225
|
sharing: t.sharing,
|
|
226
226
|
visibility: t.visibility
|
|
@@ -229,20 +229,20 @@ function _e(e, t, s = void 0, n = void 0) {
|
|
|
229
229
|
};
|
|
230
230
|
m(a, {
|
|
231
231
|
method: "POST",
|
|
232
|
-
headers:
|
|
233
|
-
data: JSON.stringify(
|
|
232
|
+
headers: F,
|
|
233
|
+
data: JSON.stringify(r),
|
|
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,
|
|
245
|
-
const { space: o, tenant:
|
|
244
|
+
function ye(e, t, n = void 0, s = void 0) {
|
|
245
|
+
const { space: o, tenant: c } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${i}${a}${r}`;
|
|
246
246
|
m(d, {
|
|
247
247
|
opts: {
|
|
248
248
|
method: "GET",
|
|
@@ -252,32 +252,32 @@ 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, f) {
|
|
258
258
|
const g = u;
|
|
259
|
-
g.msg = f.errormsg, g.errCode = f.errorcode,
|
|
259
|
+
g.msg = f.errormsg, g.errCode = f.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, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, r = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
|
-
}, d = `${
|
|
267
|
+
}, d = `${c}${i}${a}`;
|
|
268
268
|
m(d, {
|
|
269
|
-
OPTsH:
|
|
269
|
+
OPTsH: r,
|
|
270
270
|
onComplete(l) {
|
|
271
271
|
t && t(JSON.parse(l));
|
|
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,52 +308,52 @@ function we(e, t = void 0, s = void 0) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function Ce(e, t) {
|
|
311
|
-
const { space:
|
|
311
|
+
const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
312
|
m(o, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function Te(e, t,
|
|
317
|
-
const { space:
|
|
316
|
+
function Te(e, t, n, s = void 0, o = void 0) {
|
|
317
|
+
const { space: c, tenant: i } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
320
320
|
nextURICh: "/characteristics",
|
|
321
321
|
nextURIGr: "/group",
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
|
-
OPTsTenant: `tenant=dstenant:${
|
|
325
|
-
},
|
|
324
|
+
OPTsTenant: `tenant=dstenant:${i}`
|
|
325
|
+
}, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
|
|
326
326
|
m(d, {
|
|
327
|
-
headers:
|
|
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,
|
|
340
|
-
const { space:
|
|
339
|
+
function Oe(e, t, n, s = void 0, o = void 0) {
|
|
340
|
+
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
m(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
|
-
headers:
|
|
344
|
-
data: JSON.stringify(
|
|
343
|
+
headers: F,
|
|
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
|
|
355
|
-
const { space: o } = e,
|
|
356
|
-
m(
|
|
354
|
+
function be(e, t, n = void 0, s = void 0) {
|
|
355
|
+
const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
+
m(i, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
359
359
|
headers: {
|
|
@@ -362,132 +362,132 @@ function Ne(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 G(e, t,
|
|
372
|
+
async function G(e, t, n) {
|
|
373
373
|
if (e.space) {
|
|
374
|
-
const
|
|
375
|
-
m(
|
|
374
|
+
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
375
|
+
m(s, {
|
|
376
376
|
onComplete(o) {
|
|
377
377
|
o = JSON.parse(o), t && t(o.csrf);
|
|
378
378
|
},
|
|
379
|
-
onFailure(o,
|
|
380
|
-
|
|
379
|
+
onFailure(o, c, i) {
|
|
380
|
+
n && n({ error: o, headers: c, xhr: i });
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
async function K(e, t = void 0,
|
|
385
|
+
async function K(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");
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
const
|
|
392
|
-
m(
|
|
393
|
-
onComplete(
|
|
394
|
-
const d = JSON.parse(
|
|
395
|
-
|
|
391
|
+
const c = o + `/resources/v1/modeler/documents/${t}`;
|
|
392
|
+
m(c, {
|
|
393
|
+
onComplete(i, a, r) {
|
|
394
|
+
const d = JSON.parse(i);
|
|
395
|
+
n && n(d);
|
|
396
396
|
},
|
|
397
|
-
onFailure(
|
|
398
|
-
|
|
397
|
+
onFailure(i) {
|
|
398
|
+
s && s(i);
|
|
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
|
-
m(
|
|
406
|
-
onComplete(o,
|
|
404
|
+
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
|
+
m(s, {
|
|
406
|
+
onComplete(o, c, i) {
|
|
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
|
T(
|
|
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 T(e, t = void 0,
|
|
425
|
+
function T(e, t = void 0, n = void 0) {
|
|
426
426
|
if (e.space) {
|
|
427
|
-
const
|
|
428
|
-
m(
|
|
429
|
-
onComplete(o,
|
|
427
|
+
const s = e.space + "/resources/v1/application/CSRF";
|
|
428
|
+
m(s, {
|
|
429
|
+
onComplete(o, c, i) {
|
|
430
430
|
const a = JSON.parse(o);
|
|
431
431
|
t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(o,
|
|
434
|
-
|
|
433
|
+
onFailure(o, c, i) {
|
|
434
|
+
n && n({
|
|
435
435
|
response: o,
|
|
436
|
-
headers:
|
|
437
|
-
xhr:
|
|
436
|
+
headers: c,
|
|
437
|
+
xhr: i
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
441
|
} else
|
|
442
|
-
|
|
442
|
+
n && n("ERROR : url du 3DSpace non défini.");
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
let
|
|
444
|
+
function j(e, t = void 0, n = void 0) {
|
|
445
|
+
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
446
446
|
k(
|
|
447
447
|
e,
|
|
448
448
|
(o) => {
|
|
449
|
-
m(
|
|
449
|
+
m(s, {
|
|
450
450
|
method: "PUT",
|
|
451
451
|
headers: {
|
|
452
452
|
ENO_CSRF_TOKEN: e.token
|
|
453
453
|
},
|
|
454
|
-
onComplete(
|
|
455
|
-
const a = JSON.parse(
|
|
454
|
+
onComplete(c) {
|
|
455
|
+
const a = JSON.parse(c).data[0].dataelements.ticketURL;
|
|
456
456
|
t && t(a);
|
|
457
457
|
},
|
|
458
|
-
onFailure(
|
|
459
|
-
console.warn("☠️ error => ",
|
|
458
|
+
onFailure(c, i) {
|
|
459
|
+
console.warn("☠️ error => ", c, i), n && n(c, i);
|
|
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
|
|
469
|
-
const
|
|
470
|
-
|
|
468
|
+
function Ne(e, t, n, s = void 0, o = void 0) {
|
|
469
|
+
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
|
+
n || (n = e.token), m(c, {
|
|
471
471
|
method: "PUT",
|
|
472
472
|
headers: {
|
|
473
|
-
ENO_CSRF_TOKEN:
|
|
473
|
+
ENO_CSRF_TOKEN: n
|
|
474
474
|
},
|
|
475
|
-
onComplete(
|
|
476
|
-
let a = JSON.parse(
|
|
475
|
+
onComplete(i) {
|
|
476
|
+
let a = JSON.parse(i);
|
|
477
477
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
478
478
|
try {
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
} catch (
|
|
482
|
-
o && o(
|
|
479
|
+
const r = a.data[0].dataelements.ticketURL;
|
|
480
|
+
s && s(r);
|
|
481
|
+
} catch (r) {
|
|
482
|
+
o && o(r);
|
|
483
483
|
}
|
|
484
484
|
},
|
|
485
|
-
onFailure(
|
|
486
|
-
o && o(
|
|
485
|
+
onFailure(i) {
|
|
486
|
+
o && o(i);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function X(e, t,
|
|
490
|
+
function X(e, t, n, s, o, c = void 0, i = void 0) {
|
|
491
491
|
k(
|
|
492
492
|
e,
|
|
493
493
|
t,
|
|
@@ -495,39 +495,39 @@ function X(e, t, s, n, o, r = void 0, c = void 0) {
|
|
|
495
495
|
V(
|
|
496
496
|
e,
|
|
497
497
|
t,
|
|
498
|
-
s,
|
|
499
498
|
n,
|
|
499
|
+
s,
|
|
500
500
|
o,
|
|
501
501
|
a.csrf.value,
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
c,
|
|
503
|
+
i
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function V(e, t,
|
|
509
|
-
const
|
|
510
|
-
m(
|
|
508
|
+
function V(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
509
|
+
const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
|
+
m(r, {
|
|
511
511
|
method: "PUT",
|
|
512
512
|
headers: {
|
|
513
|
-
ENO_CSRF_TOKEN:
|
|
513
|
+
ENO_CSRF_TOKEN: c
|
|
514
514
|
},
|
|
515
515
|
onComplete(d, l, p) {
|
|
516
516
|
const u = JSON.parse(d).data[0].dataelements, f = new FormData();
|
|
517
|
-
f.append("__fcs__jobTicket", u.ticket), f.append("file_0",
|
|
517
|
+
f.append("__fcs__jobTicket", u.ticket), f.append("file_0", s, o);
|
|
518
518
|
const g = {};
|
|
519
519
|
g.method = "POST", g.data = f, g.onComplete = function(h) {
|
|
520
520
|
let S = "temp_" + Date.now(), _ = {
|
|
521
521
|
method: "PUT",
|
|
522
522
|
headers: {
|
|
523
|
-
ENO_CSRF_TOKEN:
|
|
523
|
+
ENO_CSRF_TOKEN: c
|
|
524
524
|
},
|
|
525
525
|
data: JSON.stringify({
|
|
526
526
|
data: [{
|
|
527
527
|
id: t,
|
|
528
528
|
relateddata: {
|
|
529
529
|
files: [{
|
|
530
|
-
id:
|
|
530
|
+
id: n,
|
|
531
531
|
dataelements: {
|
|
532
532
|
title: o,
|
|
533
533
|
receipt: h
|
|
@@ -540,7 +540,7 @@ function V(e, t, s, n, o, r, c = void 0, a = void 0) {
|
|
|
540
540
|
}),
|
|
541
541
|
type: "json",
|
|
542
542
|
onComplete(y) {
|
|
543
|
-
|
|
543
|
+
i && i(y);
|
|
544
544
|
},
|
|
545
545
|
onFailure(y) {
|
|
546
546
|
a && a(y);
|
|
@@ -556,14 +556,14 @@ function V(e, t, s, n, o, r, c = void 0, a = void 0) {
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
async function ke(e, t,
|
|
560
|
-
const
|
|
559
|
+
async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
560
|
+
const i = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
561
561
|
type: "text/plain"
|
|
562
562
|
}), p = {
|
|
563
|
-
url_Ticket: `${
|
|
564
|
-
url_Post: `${
|
|
563
|
+
url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
564
|
+
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
|
|
565
565
|
};
|
|
566
|
-
if (!
|
|
566
|
+
if (!i && i !== "") {
|
|
567
567
|
console.log("le store._3DSpace est vide");
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
@@ -574,13 +574,13 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
|
|
|
574
574
|
},
|
|
575
575
|
onComplete(u, f, g) {
|
|
576
576
|
const h = JSON.parse(u).data[0].dataelements;
|
|
577
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
577
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
|
|
578
578
|
const S = {
|
|
579
579
|
method: "POST",
|
|
580
580
|
data: d,
|
|
581
581
|
onComplete(C) {
|
|
582
|
-
if (
|
|
583
|
-
const
|
|
582
|
+
if (r !== "" && a !== "") {
|
|
583
|
+
const D = {
|
|
584
584
|
method: "POST",
|
|
585
585
|
headers: {
|
|
586
586
|
ENO_CSRF_TOKEN: a,
|
|
@@ -591,19 +591,19 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
|
|
|
591
591
|
data: [{
|
|
592
592
|
type: "Document",
|
|
593
593
|
dataelements: {
|
|
594
|
-
title: `Title_${
|
|
594
|
+
title: `Title_${n.toLowerCase().split(" ").join("_")}`,
|
|
595
595
|
policy: "Document Release",
|
|
596
|
-
description:
|
|
596
|
+
description: s
|
|
597
597
|
},
|
|
598
598
|
relateddata: {
|
|
599
599
|
files: [{
|
|
600
600
|
dataelements: {
|
|
601
|
-
title: `${
|
|
601
|
+
title: `${n}.json`,
|
|
602
602
|
receipt: C
|
|
603
603
|
}
|
|
604
604
|
}]
|
|
605
605
|
},
|
|
606
|
-
tempId:
|
|
606
|
+
tempId: I()
|
|
607
607
|
}]
|
|
608
608
|
}),
|
|
609
609
|
type: "json",
|
|
@@ -611,7 +611,7 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
|
|
|
611
611
|
onComplete: _,
|
|
612
612
|
onFailure: y
|
|
613
613
|
};
|
|
614
|
-
|
|
614
|
+
r !== "" && m(p.url_Post, D);
|
|
615
615
|
} else
|
|
616
616
|
console.warn("le store est vide");
|
|
617
617
|
},
|
|
@@ -620,20 +620,20 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
|
|
|
620
620
|
function _(C) {
|
|
621
621
|
console.log("Success -- response ", C.data[0]), o && o(C);
|
|
622
622
|
}
|
|
623
|
-
function y(C,
|
|
623
|
+
function y(C, D) {
|
|
624
624
|
console.log("Erreur -- response ", C, `
|
|
625
|
-
headers `,
|
|
625
|
+
headers `, D), c && c(C);
|
|
626
626
|
}
|
|
627
627
|
m(h.ticketURL, S);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1) {
|
|
632
632
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
633
633
|
m(a, {
|
|
634
634
|
method: "GET",
|
|
635
|
-
onComplete(
|
|
636
|
-
const d = JSON.parse(
|
|
635
|
+
onComplete(r) {
|
|
636
|
+
const d = JSON.parse(r);
|
|
637
637
|
let l = "", p, u, f;
|
|
638
638
|
if (t) {
|
|
639
639
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -644,141 +644,141 @@ function N(e, t = void 0, s = void 0, n = void 0, o = void 0, r = void 0, c = !1
|
|
|
644
644
|
(S, _, y) => _ === y.findIndex(
|
|
645
645
|
(C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
|
|
646
646
|
)
|
|
647
|
-
),
|
|
647
|
+
), n && (Array.isArray(n) ? n.forEach((S) => {
|
|
648
648
|
f || h.forEach((_) => {
|
|
649
|
-
if (S === _.role.name &&
|
|
650
|
-
f = S, u =
|
|
649
|
+
if (S === _.role.name && s === _.organization.title)
|
|
650
|
+
f = S, u = s;
|
|
651
651
|
else if (S === _.role.name) {
|
|
652
652
|
let y = h.filter(
|
|
653
653
|
(C) => C.role.name === S
|
|
654
654
|
);
|
|
655
|
-
y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) :
|
|
655
|
+
y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
|
|
656
656
|
}
|
|
657
657
|
});
|
|
658
658
|
}) : h.forEach((S) => {
|
|
659
|
-
if (
|
|
660
|
-
f =
|
|
661
|
-
else if (
|
|
659
|
+
if (n === S.role.name && s === S.organization.title)
|
|
660
|
+
f = n, u = s;
|
|
661
|
+
else if (n === S.role.name) {
|
|
662
662
|
let _ = h.filter(
|
|
663
|
-
(y) => y.role.name ===
|
|
663
|
+
(y) => y.role.name === n
|
|
664
664
|
);
|
|
665
|
-
_.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) :
|
|
665
|
+
_.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
|
|
666
666
|
}
|
|
667
667
|
}));
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials &&
|
|
670
|
+
p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
|
|
671
671
|
},
|
|
672
|
-
onFailure(
|
|
672
|
+
onFailure(r, d) {
|
|
673
673
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
674
|
-
err:
|
|
674
|
+
err: r,
|
|
675
675
|
headers: d
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
async function v(e, t = void 0,
|
|
680
|
+
async function v(e, t = void 0, n = void 0) {
|
|
681
681
|
return (!e.objID || e.objID === "") && console.warn(
|
|
682
682
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
683
683
|
), (e.space === "" || !e.space) && console.warn(
|
|
684
684
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
685
685
|
), (e.token === "" || !e.token) && (G(
|
|
686
686
|
e,
|
|
687
|
-
(
|
|
688
|
-
e.token =
|
|
687
|
+
(s) => {
|
|
688
|
+
e.token = s;
|
|
689
689
|
},
|
|
690
|
-
(
|
|
691
|
-
console.log("☠️ error => ",
|
|
690
|
+
(s) => {
|
|
691
|
+
console.log("☠️ error => ", s);
|
|
692
692
|
}
|
|
693
693
|
), console.warn(
|
|
694
694
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
695
|
-
)), new Promise((
|
|
696
|
-
|
|
695
|
+
)), new Promise((s, o) => {
|
|
696
|
+
j(
|
|
697
697
|
e,
|
|
698
|
-
(
|
|
699
|
-
m(
|
|
698
|
+
(c) => {
|
|
699
|
+
m(c, {
|
|
700
700
|
headers: {
|
|
701
701
|
"Content-Type": "application/json",
|
|
702
702
|
Accept: "application/json"
|
|
703
703
|
},
|
|
704
704
|
onComplete(a) {
|
|
705
|
-
let
|
|
705
|
+
let r;
|
|
706
706
|
try {
|
|
707
|
-
|
|
707
|
+
r = JSON.parse(a);
|
|
708
708
|
} catch {
|
|
709
|
-
|
|
709
|
+
r = a;
|
|
710
710
|
}
|
|
711
|
-
t && t(
|
|
711
|
+
t && t(r), s(r);
|
|
712
712
|
},
|
|
713
|
-
onFailure(a,
|
|
714
|
-
|
|
713
|
+
onFailure(a, r, d) {
|
|
714
|
+
n && (console.log("error http", a), n({
|
|
715
715
|
msg: JSON.parse(a),
|
|
716
|
-
headers:
|
|
716
|
+
headers: r,
|
|
717
717
|
xhr: d
|
|
718
718
|
}), o({
|
|
719
719
|
msg: JSON.parse(a),
|
|
720
|
-
headers:
|
|
720
|
+
headers: r,
|
|
721
721
|
xhr: d
|
|
722
722
|
}));
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
725
|
},
|
|
726
|
-
(
|
|
727
|
-
|
|
726
|
+
(c) => {
|
|
727
|
+
n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), o(c);
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
|
-
async function W(e, t,
|
|
732
|
+
async function W(e, t, n = void 0, s = void 0) {
|
|
733
733
|
let o = [];
|
|
734
734
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
735
735
|
for (let a = 0; a < t.length; a += 80) {
|
|
736
|
-
const
|
|
737
|
-
o.push(
|
|
736
|
+
const r = t.slice(a, a + 80);
|
|
737
|
+
o.push(r);
|
|
738
738
|
}
|
|
739
|
-
const
|
|
739
|
+
const i = (a) => {
|
|
740
740
|
B(
|
|
741
741
|
e,
|
|
742
742
|
o[a],
|
|
743
743
|
() => {
|
|
744
|
-
a++, a < o.length &&
|
|
744
|
+
a++, a < o.length && i(a);
|
|
745
745
|
},
|
|
746
|
-
(
|
|
747
|
-
|
|
746
|
+
(r) => {
|
|
747
|
+
n && n(r);
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
};
|
|
751
|
-
|
|
751
|
+
i(0);
|
|
752
752
|
} else
|
|
753
|
-
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."),
|
|
753
|
+
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
754
754
|
}
|
|
755
|
-
function B(e, t,
|
|
756
|
-
const
|
|
757
|
-
t.forEach((
|
|
758
|
-
|
|
759
|
-
id:
|
|
755
|
+
function B(e, t, n = void 0, s = void 0, o = void 0) {
|
|
756
|
+
const c = [];
|
|
757
|
+
t.forEach((r) => {
|
|
758
|
+
c.push({
|
|
759
|
+
id: r
|
|
760
760
|
});
|
|
761
761
|
});
|
|
762
|
-
let
|
|
762
|
+
let i = JSON.stringify({
|
|
763
763
|
csrf: {
|
|
764
764
|
name: "ENO_CSRF_TOKEN",
|
|
765
765
|
value: e.token
|
|
766
766
|
},
|
|
767
|
-
data:
|
|
767
|
+
data: c
|
|
768
768
|
});
|
|
769
769
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
770
770
|
m(a, {
|
|
771
771
|
method: "PUT",
|
|
772
|
-
data:
|
|
772
|
+
data: i,
|
|
773
773
|
type: "json",
|
|
774
|
-
onComplete(
|
|
775
|
-
const d =
|
|
776
|
-
|
|
774
|
+
onComplete(r) {
|
|
775
|
+
const d = r.data;
|
|
776
|
+
r.success === !0 && (n && n(), d.forEach((l) => {
|
|
777
777
|
try {
|
|
778
778
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
779
779
|
m(u, {
|
|
780
780
|
onComplete: (f) => {
|
|
781
|
-
|
|
781
|
+
s && s({
|
|
782
782
|
objectId: l.id,
|
|
783
783
|
fileName: p,
|
|
784
784
|
data: JSON.parse(f)
|
|
@@ -793,16 +793,16 @@ function B(e, t, s = void 0, n = void 0, o = void 0) {
|
|
|
793
793
|
}
|
|
794
794
|
}));
|
|
795
795
|
},
|
|
796
|
-
onFailure(
|
|
797
|
-
console.log(
|
|
796
|
+
onFailure(r) {
|
|
797
|
+
console.log(r), o && o(r);
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function De(e, t, n = void 0, s = void 0) {
|
|
802
802
|
return new Promise((o) => {
|
|
803
803
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
804
|
-
const
|
|
805
|
-
|
|
804
|
+
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
805
|
+
b(
|
|
806
806
|
e.space,
|
|
807
807
|
"ESPACE COMMUN",
|
|
808
808
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -812,7 +812,7 @@ function Fe(e, t, s = void 0, n = void 0) {
|
|
|
812
812
|
console.log("onError =>", a);
|
|
813
813
|
}
|
|
814
814
|
);
|
|
815
|
-
let
|
|
815
|
+
let i = {
|
|
816
816
|
method: "POST",
|
|
817
817
|
headers: {
|
|
818
818
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -827,28 +827,28 @@ function Fe(e, t, s = void 0, n = void 0) {
|
|
|
827
827
|
}),
|
|
828
828
|
type: "json",
|
|
829
829
|
onComplete(a) {
|
|
830
|
-
|
|
830
|
+
n && n(a);
|
|
831
831
|
},
|
|
832
832
|
onFailure(a) {
|
|
833
|
-
|
|
833
|
+
s && s(a);
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
|
-
m(
|
|
836
|
+
m(c, i);
|
|
837
837
|
}
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
return new Promise((
|
|
840
|
+
function Fe(e, t, n, s = void 0, o = void 0) {
|
|
841
|
+
return new Promise((c) => {
|
|
842
842
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
843
|
-
const
|
|
844
|
-
|
|
843
|
+
const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
844
|
+
b(
|
|
845
845
|
e.space,
|
|
846
846
|
"ESPACE COMMUN",
|
|
847
847
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
848
848
|
void 0,
|
|
849
|
-
(
|
|
850
|
-
(
|
|
851
|
-
console.log("onError =>",
|
|
849
|
+
(r) => e.ctx = r,
|
|
850
|
+
(r) => {
|
|
851
|
+
console.log("onError =>", r);
|
|
852
852
|
}
|
|
853
853
|
);
|
|
854
854
|
let a = {
|
|
@@ -862,26 +862,26 @@ function De(e, t, s, n = void 0, o = void 0) {
|
|
|
862
862
|
data: JSON.stringify({
|
|
863
863
|
data: [{
|
|
864
864
|
id: t,
|
|
865
|
-
nextState:
|
|
865
|
+
nextState: n
|
|
866
866
|
}]
|
|
867
867
|
}),
|
|
868
868
|
type: "json",
|
|
869
|
-
onComplete(
|
|
870
|
-
|
|
869
|
+
onComplete(r) {
|
|
870
|
+
s && s(r);
|
|
871
871
|
},
|
|
872
|
-
onFailure(
|
|
873
|
-
o && o(
|
|
872
|
+
onFailure(r) {
|
|
873
|
+
o && o(r);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
m(
|
|
876
|
+
m(i, a);
|
|
877
877
|
}
|
|
878
878
|
});
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function je(e, t, n = void 0, s = void 0) {
|
|
881
881
|
return new Promise((o) => {
|
|
882
882
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
883
|
-
const
|
|
884
|
-
|
|
883
|
+
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
884
|
+
b(
|
|
885
885
|
e.space,
|
|
886
886
|
"ESPACE COMMUN",
|
|
887
887
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -891,7 +891,7 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
891
891
|
console.log("onError =>", a);
|
|
892
892
|
}
|
|
893
893
|
);
|
|
894
|
-
let
|
|
894
|
+
let i = {
|
|
895
895
|
method: "POST",
|
|
896
896
|
headers: {
|
|
897
897
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -906,21 +906,21 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
906
906
|
}),
|
|
907
907
|
type: "json",
|
|
908
908
|
onComplete(a) {
|
|
909
|
-
|
|
909
|
+
n && n(a);
|
|
910
910
|
},
|
|
911
911
|
onFailure(a) {
|
|
912
|
-
|
|
912
|
+
s && s(a);
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
|
-
m(
|
|
915
|
+
m(c, i);
|
|
916
916
|
}
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Ae(e, t, n = void 0, s = void 0) {
|
|
920
920
|
return new Promise((o) => {
|
|
921
921
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
922
|
-
const
|
|
923
|
-
|
|
922
|
+
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
923
|
+
b(
|
|
924
924
|
e.space,
|
|
925
925
|
"ESPACE COMMUN",
|
|
926
926
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -930,7 +930,7 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
930
930
|
console.log("onError =>", a);
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
let
|
|
933
|
+
let i = {
|
|
934
934
|
method: "POST",
|
|
935
935
|
headers: {
|
|
936
936
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -951,28 +951,28 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
951
951
|
}),
|
|
952
952
|
type: "json",
|
|
953
953
|
onComplete(a) {
|
|
954
|
-
|
|
954
|
+
n && n(a);
|
|
955
955
|
},
|
|
956
956
|
onFailure(a) {
|
|
957
|
-
|
|
957
|
+
s && s(a);
|
|
958
958
|
}
|
|
959
959
|
};
|
|
960
|
-
m(
|
|
960
|
+
m(c, i);
|
|
961
961
|
}
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return new Promise((
|
|
964
|
+
function $e(e, t, n, s = void 0, o = void 0) {
|
|
965
|
+
return new Promise((c) => {
|
|
966
966
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
967
|
-
const
|
|
968
|
-
|
|
967
|
+
const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
968
|
+
b(
|
|
969
969
|
e.space,
|
|
970
970
|
"ESPACE COMMUN",
|
|
971
971
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
972
972
|
void 0,
|
|
973
|
-
(
|
|
974
|
-
(
|
|
975
|
-
console.log("onError =>",
|
|
973
|
+
(r) => e.ctx = r,
|
|
974
|
+
(r) => {
|
|
975
|
+
console.log("onError =>", r);
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
978
|
let a = {
|
|
@@ -986,105 +986,30 @@ function je(e, t, s, n = void 0, o = void 0) {
|
|
|
986
986
|
data: JSON.stringify({
|
|
987
987
|
data: [{
|
|
988
988
|
physicalid: t,
|
|
989
|
-
proposedRevision:
|
|
989
|
+
proposedRevision: n,
|
|
990
990
|
modifiedAttributes: {
|
|
991
|
-
revision:
|
|
991
|
+
revision: n
|
|
992
992
|
}
|
|
993
993
|
}],
|
|
994
994
|
folderid: null,
|
|
995
995
|
notificationTimeout: 600
|
|
996
996
|
}),
|
|
997
997
|
type: "json",
|
|
998
|
-
onComplete(
|
|
999
|
-
|
|
998
|
+
onComplete(r) {
|
|
999
|
+
s && s(r);
|
|
1000
1000
|
},
|
|
1001
|
-
onFailure(
|
|
1002
|
-
o && o(
|
|
1001
|
+
onFailure(r) {
|
|
1002
|
+
o && o(r);
|
|
1003
1003
|
}
|
|
1004
1004
|
};
|
|
1005
|
-
m(
|
|
1005
|
+
m(i, a);
|
|
1006
1006
|
}
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
|
-
function Ue(e, t, s = void 0,
|
|
1010
|
-
return console.log("credentials", e), new Promise(
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
console.log("platformeInfo", r);
|
|
1014
|
-
}
|
|
1015
|
-
if (N(
|
|
1016
|
-
e,
|
|
1017
|
-
"Common space",
|
|
1018
|
-
["VPLMProjectLeader", "VPLMCreator"],
|
|
1019
|
-
void 0,
|
|
1020
|
-
(r) => e.ctx = r,
|
|
1021
|
-
(r) => {
|
|
1022
|
-
console.log("onError =>", r);
|
|
1023
|
-
},
|
|
1024
|
-
!0
|
|
1025
|
-
), t !== void 0 && t !== "" && t !== null) {
|
|
1026
|
-
const r = b.now().ts;
|
|
1027
|
-
`${e.space}`;
|
|
1028
|
-
const c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
1029
|
-
m(c, {
|
|
1030
|
-
onComplete(a) {
|
|
1031
|
-
if (Array.isArray(JSON.parse(a))) {
|
|
1032
|
-
const i = JSON.parse(a);
|
|
1033
|
-
console.log("serviceId=3dsearch", i);
|
|
1034
|
-
const d = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
1035
|
-
m(d, {
|
|
1036
|
-
method: "POST",
|
|
1037
|
-
headers: {
|
|
1038
|
-
Accept: "application/json",
|
|
1039
|
-
"Content-Type": "application/json"
|
|
1040
|
-
},
|
|
1041
|
-
data: JSON.stringify({
|
|
1042
|
-
with_indexing_date: !0,
|
|
1043
|
-
with_nls: !1,
|
|
1044
|
-
label: `3DSearch-${r}`,
|
|
1045
|
-
locale: "en",
|
|
1046
|
-
select_predicate: [
|
|
1047
|
-
"ds6w:label",
|
|
1048
|
-
"ds6w:type",
|
|
1049
|
-
"ds6w:description",
|
|
1050
|
-
"ds6w:identifier",
|
|
1051
|
-
"ds6w:responsible",
|
|
1052
|
-
"ds6wg:fullname"
|
|
1053
|
-
],
|
|
1054
|
-
select_file: [
|
|
1055
|
-
"icon",
|
|
1056
|
-
"thumbnail_2d"
|
|
1057
|
-
],
|
|
1058
|
-
query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
|
|
1059
|
-
order_by: "desc",
|
|
1060
|
-
order_field: "relevance",
|
|
1061
|
-
nresults: 1e3,
|
|
1062
|
-
start: "0",
|
|
1063
|
-
source: [
|
|
1064
|
-
"3dspace",
|
|
1065
|
-
"usersgroup"
|
|
1066
|
-
],
|
|
1067
|
-
tenant: e.tenant,
|
|
1068
|
-
login: {
|
|
1069
|
-
"3dspace": {
|
|
1070
|
-
SecurityContext: `ctx::${e.ctx}`
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
}),
|
|
1074
|
-
type: "json",
|
|
1075
|
-
onComplete(l) {
|
|
1076
|
-
s && s(l);
|
|
1077
|
-
},
|
|
1078
|
-
onFailure(l) {
|
|
1079
|
-
n && n(l);
|
|
1080
|
-
}
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
},
|
|
1084
|
-
onFailure(a) {
|
|
1085
|
-
n && n(a);
|
|
1086
|
-
}
|
|
1087
|
-
}), JSON.stringify({
|
|
1009
|
+
function Ue(e, t, n, s, o = void 0, c = void 0) {
|
|
1010
|
+
return console.log("credentials", e), new Promise(
|
|
1011
|
+
(i) => {
|
|
1012
|
+
`${e.space}`, JSON.stringify({
|
|
1088
1013
|
csrf: {
|
|
1089
1014
|
name: "ENO_CSRF_TOKEN",
|
|
1090
1015
|
value: e.token
|
|
@@ -1102,74 +1027,74 @@ function Ue(e, t, s = void 0, n = void 0) {
|
|
|
1102
1027
|
}]
|
|
1103
1028
|
});
|
|
1104
1029
|
}
|
|
1105
|
-
|
|
1030
|
+
);
|
|
1106
1031
|
}
|
|
1107
1032
|
//!SECTION
|
|
1108
|
-
function
|
|
1109
|
-
const
|
|
1033
|
+
function Ie(e, t = void 0, n = void 0) {
|
|
1034
|
+
const s = {
|
|
1110
1035
|
base: `${e.space}`,
|
|
1111
1036
|
uri: "/resources/bps/cspaces",
|
|
1112
1037
|
optTenant: `tenant=${e.tenant}`
|
|
1113
|
-
}, o = `${
|
|
1038
|
+
}, o = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1114
1039
|
m(o, {
|
|
1115
1040
|
method: "GET",
|
|
1116
1041
|
headers: {
|
|
1117
1042
|
Accept: "application/json,text/javascript,*/*",
|
|
1118
1043
|
"Content-Type": "application/ds-json"
|
|
1119
1044
|
},
|
|
1120
|
-
onComplete(
|
|
1121
|
-
const a = JSON.parse(
|
|
1122
|
-
t && t(a,
|
|
1045
|
+
onComplete(c, i) {
|
|
1046
|
+
const a = JSON.parse(c);
|
|
1047
|
+
t && t(a, i);
|
|
1123
1048
|
},
|
|
1124
|
-
onFailure(
|
|
1125
|
-
|
|
1049
|
+
onFailure(c, i, a) {
|
|
1050
|
+
n && n({ response: c, headers: i, xhr: a });
|
|
1126
1051
|
}
|
|
1127
1052
|
});
|
|
1128
1053
|
}
|
|
1129
|
-
function ve(e, t,
|
|
1130
|
-
|
|
1054
|
+
function ve(e, t, n, s) {
|
|
1055
|
+
j(
|
|
1131
1056
|
e.space,
|
|
1132
1057
|
t,
|
|
1133
1058
|
(o) => {
|
|
1134
1059
|
m(o, {
|
|
1135
1060
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1136
|
-
onComplete: (
|
|
1137
|
-
|
|
1061
|
+
onComplete: (c) => {
|
|
1062
|
+
n && n(c);
|
|
1138
1063
|
},
|
|
1139
|
-
onFailure: (
|
|
1140
|
-
console.log("error http",
|
|
1064
|
+
onFailure: (c) => {
|
|
1065
|
+
console.log("error http", c), s && s(c);
|
|
1141
1066
|
}
|
|
1142
1067
|
});
|
|
1143
1068
|
}
|
|
1144
1069
|
);
|
|
1145
1070
|
}
|
|
1146
|
-
async function
|
|
1071
|
+
async function Re(e, t, n = void 0, s = void 0) {
|
|
1147
1072
|
return new Promise((o) => {
|
|
1148
|
-
|
|
1149
|
-
m(
|
|
1150
|
-
onComplete: (
|
|
1151
|
-
onFailure: (
|
|
1152
|
-
|
|
1073
|
+
j(e, t, (c) => {
|
|
1074
|
+
m(c, {
|
|
1075
|
+
onComplete: (i, a, r) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, r), o),
|
|
1076
|
+
onFailure: (i, a, r) => {
|
|
1077
|
+
s && s(i, a, r), console.log(i, a?.errormsg);
|
|
1153
1078
|
}
|
|
1154
1079
|
});
|
|
1155
1080
|
});
|
|
1156
1081
|
});
|
|
1157
1082
|
}
|
|
1158
|
-
function
|
|
1159
|
-
const
|
|
1083
|
+
function Pe(e, t, n, s = void 0, o = void 0) {
|
|
1084
|
+
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1160
1085
|
k(
|
|
1161
1086
|
e,
|
|
1162
|
-
|
|
1163
|
-
(
|
|
1164
|
-
const a =
|
|
1087
|
+
n,
|
|
1088
|
+
(i) => {
|
|
1089
|
+
const a = i.data[0].relateddata.files[0].id, r = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
|
|
1165
1090
|
X(
|
|
1166
1091
|
e,
|
|
1167
|
-
|
|
1092
|
+
n,
|
|
1168
1093
|
a,
|
|
1094
|
+
c,
|
|
1169
1095
|
r,
|
|
1170
|
-
i,
|
|
1171
1096
|
(d) => {
|
|
1172
|
-
|
|
1097
|
+
s && s(d);
|
|
1173
1098
|
},
|
|
1174
1099
|
(d) => {
|
|
1175
1100
|
o && o(d);
|
|
@@ -1178,65 +1103,65 @@ function xe(e, t, s, n = void 0, o = void 0) {
|
|
|
1178
1103
|
}
|
|
1179
1104
|
);
|
|
1180
1105
|
}
|
|
1181
|
-
let
|
|
1182
|
-
const
|
|
1183
|
-
async function
|
|
1106
|
+
let R, P;
|
|
1107
|
+
const A = [];
|
|
1108
|
+
async function xe(e, t = void 0, n = void 0) {
|
|
1184
1109
|
e.objID && e.objID !== "" ? k(
|
|
1185
1110
|
e,
|
|
1186
|
-
(
|
|
1187
|
-
t && t(
|
|
1111
|
+
(s) => {
|
|
1112
|
+
t && t(s);
|
|
1188
1113
|
},
|
|
1189
|
-
(
|
|
1190
|
-
|
|
1114
|
+
(s) => {
|
|
1115
|
+
n && n(s);
|
|
1191
1116
|
}
|
|
1192
1117
|
) : (e.objID === null || e.objID === "") && T(
|
|
1193
1118
|
e,
|
|
1194
|
-
(
|
|
1195
|
-
t && t({ rep:
|
|
1119
|
+
(s) => {
|
|
1120
|
+
t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
|
|
1196
1121
|
},
|
|
1197
|
-
(
|
|
1198
|
-
|
|
1122
|
+
(s) => {
|
|
1123
|
+
n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
|
|
1199
1124
|
}
|
|
1200
1125
|
);
|
|
1201
1126
|
}
|
|
1202
|
-
async function Me(e, t = void 0,
|
|
1127
|
+
async function Me(e, t = void 0, n = void 0) {
|
|
1203
1128
|
console.log("getDatasByTenant (getDocuments)", e), await v(
|
|
1204
1129
|
e,
|
|
1205
|
-
(
|
|
1130
|
+
(s) => {
|
|
1206
1131
|
const o = {};
|
|
1207
|
-
o.obj =
|
|
1132
|
+
o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1208
1133
|
},
|
|
1209
|
-
(
|
|
1210
|
-
|
|
1134
|
+
(s) => {
|
|
1135
|
+
n && n?.(s);
|
|
1211
1136
|
}
|
|
1212
1137
|
);
|
|
1213
1138
|
}
|
|
1214
|
-
function Le(e, t = void 0,
|
|
1215
|
-
const
|
|
1139
|
+
function Le(e, t = void 0, n = void 0) {
|
|
1140
|
+
const s = [];
|
|
1216
1141
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1217
1142
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1218
1143
|
return;
|
|
1219
1144
|
}
|
|
1220
|
-
e.objIds.forEach((o,
|
|
1145
|
+
e.objIds.forEach((o, c) => {
|
|
1221
1146
|
v(
|
|
1222
1147
|
e,
|
|
1223
1148
|
o.objID,
|
|
1224
|
-
(
|
|
1225
|
-
|
|
1149
|
+
(i) => {
|
|
1150
|
+
s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), Y(e, P)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1226
1151
|
}
|
|
1227
1152
|
);
|
|
1228
1153
|
});
|
|
1229
1154
|
}
|
|
1230
|
-
function Y(e, t,
|
|
1155
|
+
function Y(e, t, n = void 0, s = void 0) {
|
|
1231
1156
|
W(
|
|
1232
1157
|
e,
|
|
1233
|
-
|
|
1158
|
+
R,
|
|
1234
1159
|
(o) => {
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1160
|
+
const c = [...t];
|
|
1161
|
+
c.find((i) => i.objectID === o.objectId).data = o.data, P = c, A.push(o.data), n && n(A);
|
|
1237
1162
|
},
|
|
1238
1163
|
(o) => {
|
|
1239
|
-
|
|
1164
|
+
s && (s(o), console.log(o));
|
|
1240
1165
|
}
|
|
1241
1166
|
);
|
|
1242
1167
|
}
|
|
@@ -1247,7 +1172,7 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1247
1172
|
"usersgroup",
|
|
1248
1173
|
"3dplan",
|
|
1249
1174
|
"dashboard"
|
|
1250
|
-
],
|
|
1175
|
+
], x = {
|
|
1251
1176
|
how: "ds6w:how",
|
|
1252
1177
|
what: "ds6w:what",
|
|
1253
1178
|
when: "ds6w:when",
|
|
@@ -1260,22 +1185,22 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1260
1185
|
order_by: "desc",
|
|
1261
1186
|
tag: "testTag"
|
|
1262
1187
|
};
|
|
1263
|
-
function Je(e, t,
|
|
1264
|
-
const { space: o, tenant:
|
|
1188
|
+
function Je(e, t, n = void 0, s = void 0) {
|
|
1189
|
+
const { space: o, tenant: c } = e, { objId: i, pred: a, tag: r } = t, d = {
|
|
1265
1190
|
uri: "/resources/6w/tags",
|
|
1266
1191
|
otpCTX: "SecurityContext=preferred",
|
|
1267
|
-
optTenant: `tenant=${
|
|
1192
|
+
optTenant: `tenant=${c}`
|
|
1268
1193
|
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1269
1194
|
tag: [
|
|
1270
1195
|
{
|
|
1271
1196
|
subject: [
|
|
1272
1197
|
{
|
|
1273
|
-
uri: `pid://${
|
|
1198
|
+
uri: `pid://${i}`
|
|
1274
1199
|
}
|
|
1275
1200
|
],
|
|
1276
|
-
predicate:
|
|
1201
|
+
predicate: x[a],
|
|
1277
1202
|
object: {
|
|
1278
|
-
literal:
|
|
1203
|
+
literal: r
|
|
1279
1204
|
}
|
|
1280
1205
|
}
|
|
1281
1206
|
]
|
|
@@ -1293,46 +1218,46 @@ function Je(e, t, s = void 0, n = void 0) {
|
|
|
1293
1218
|
setTimeout(() => {
|
|
1294
1219
|
K(
|
|
1295
1220
|
e,
|
|
1296
|
-
|
|
1221
|
+
i,
|
|
1297
1222
|
(g) => {
|
|
1298
1223
|
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1299
1224
|
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, Q(
|
|
1300
1225
|
e,
|
|
1301
1226
|
t,
|
|
1302
1227
|
(y) => {
|
|
1303
|
-
|
|
1228
|
+
n && n(y);
|
|
1304
1229
|
},
|
|
1305
1230
|
(y) => {
|
|
1306
|
-
|
|
1231
|
+
s && s(y);
|
|
1307
1232
|
}
|
|
1308
1233
|
);
|
|
1309
1234
|
},
|
|
1310
1235
|
(g, h) => {
|
|
1311
1236
|
const S = g;
|
|
1312
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1237
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
|
|
1313
1238
|
}
|
|
1314
1239
|
);
|
|
1315
1240
|
}, 2e3);
|
|
1316
1241
|
},
|
|
1317
1242
|
onFailure(u, f) {
|
|
1318
1243
|
const g = u;
|
|
1319
|
-
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1244
|
+
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1320
1245
|
}
|
|
1321
1246
|
});
|
|
1322
1247
|
}
|
|
1323
|
-
function Q(e, t,
|
|
1248
|
+
function Q(e, t, n = void 0, s = void 0) {
|
|
1324
1249
|
console.log("obj ", t);
|
|
1325
|
-
const o = t.info.name,
|
|
1250
|
+
const o = t.info.name, c = {
|
|
1326
1251
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1327
1252
|
uri: "/federated/search"
|
|
1328
|
-
},
|
|
1253
|
+
}, i = `${c.baseUrl}${c.uri}`, a = {
|
|
1329
1254
|
"Content-Type": "application/json",
|
|
1330
1255
|
Accept: "application/json,text/javascript,*/*"
|
|
1331
|
-
},
|
|
1256
|
+
}, r = I(), d = {
|
|
1332
1257
|
with_indexing_date: !0,
|
|
1333
1258
|
with_synthesis: !0,
|
|
1334
1259
|
with_nls: !1,
|
|
1335
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1260
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
|
|
1336
1261
|
locale: "fr",
|
|
1337
1262
|
select_predicate: [
|
|
1338
1263
|
"ds6w:label",
|
|
@@ -1389,26 +1314,26 @@ function Q(e, t, s = void 0, n = void 0) {
|
|
|
1389
1314
|
}
|
|
1390
1315
|
}
|
|
1391
1316
|
};
|
|
1392
|
-
console.log("dataPattern => ", d), m(
|
|
1317
|
+
console.log("dataPattern => ", d), m(i, {
|
|
1393
1318
|
method: "POST",
|
|
1394
1319
|
headers: a,
|
|
1395
1320
|
data: JSON.stringify(d),
|
|
1396
1321
|
onComplete(l) {
|
|
1397
1322
|
const p = JSON.parse(l);
|
|
1398
|
-
|
|
1323
|
+
n(p);
|
|
1399
1324
|
},
|
|
1400
1325
|
onFailure(l, p) {
|
|
1401
1326
|
const u = l;
|
|
1402
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1327
|
+
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);
|
|
1403
1328
|
}
|
|
1404
1329
|
});
|
|
1405
1330
|
}
|
|
1406
|
-
function Ee(e, t,
|
|
1407
|
-
const { objId: o, pred:
|
|
1331
|
+
function Ee(e, t, n = void 0, s = void 0) {
|
|
1332
|
+
const { objId: o, pred: c, tag: i } = t, a = {
|
|
1408
1333
|
uri: "/resources/6w/tags",
|
|
1409
1334
|
otpCTX: "SecurityContext=preferred",
|
|
1410
1335
|
optTenant: `tenant=${e.tenant}`
|
|
1411
|
-
},
|
|
1336
|
+
}, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1412
1337
|
tag: [
|
|
1413
1338
|
{
|
|
1414
1339
|
subject: [
|
|
@@ -1416,14 +1341,14 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1416
1341
|
uri: `pid://${o}`
|
|
1417
1342
|
}
|
|
1418
1343
|
],
|
|
1419
|
-
predicate:
|
|
1344
|
+
predicate: x[c],
|
|
1420
1345
|
object: {
|
|
1421
|
-
literal:
|
|
1346
|
+
literal: i
|
|
1422
1347
|
}
|
|
1423
1348
|
}
|
|
1424
1349
|
]
|
|
1425
1350
|
};
|
|
1426
|
-
m(
|
|
1351
|
+
m(r, {
|
|
1427
1352
|
method: "DELETE",
|
|
1428
1353
|
data: JSON.stringify(d),
|
|
1429
1354
|
headers: {
|
|
@@ -1431,52 +1356,52 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1431
1356
|
Accept: "application/json,text/javascript,*/*"
|
|
1432
1357
|
},
|
|
1433
1358
|
onComplete(l) {
|
|
1434
|
-
|
|
1359
|
+
n && n(l);
|
|
1435
1360
|
},
|
|
1436
1361
|
onFailure(l, p) {
|
|
1437
1362
|
const u = l;
|
|
1438
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1363
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
|
|
1439
1364
|
}
|
|
1440
1365
|
});
|
|
1441
1366
|
}
|
|
1442
|
-
function Ge(e, t = "",
|
|
1367
|
+
function Ge(e, t = "", n = void 0, s = void 0) {
|
|
1443
1368
|
const { space: o } = e;
|
|
1444
1369
|
if (t === "")
|
|
1445
1370
|
return;
|
|
1446
|
-
const
|
|
1371
|
+
const c = {
|
|
1447
1372
|
uri: "/resources/v1/modeler/documents"
|
|
1448
|
-
},
|
|
1373
|
+
}, i = {
|
|
1449
1374
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1450
1375
|
Accept: "application/json,text/javascript,*/*"
|
|
1451
|
-
}, a = `${o}${
|
|
1376
|
+
}, a = `${o}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
|
|
1452
1377
|
m(a, {
|
|
1453
1378
|
method: "POST",
|
|
1454
|
-
headers:
|
|
1455
|
-
data:
|
|
1379
|
+
headers: i,
|
|
1380
|
+
data: r,
|
|
1456
1381
|
onComplete(d) {
|
|
1457
|
-
|
|
1382
|
+
n && n(JSON.parse(d));
|
|
1458
1383
|
},
|
|
1459
1384
|
onFailure(d, l) {
|
|
1460
1385
|
const p = d;
|
|
1461
|
-
p.msg = l.error,
|
|
1386
|
+
p.msg = l.error, s && s(p);
|
|
1462
1387
|
}
|
|
1463
1388
|
});
|
|
1464
1389
|
}
|
|
1465
|
-
async function w(e, t = void 0,
|
|
1466
|
-
const
|
|
1467
|
-
return m(
|
|
1468
|
-
onComplete(o,
|
|
1390
|
+
async function w(e, t = void 0, n = void 0) {
|
|
1391
|
+
const s = e.space + "/api/index/tk";
|
|
1392
|
+
return m(s, {
|
|
1393
|
+
onComplete(o, c, i) {
|
|
1469
1394
|
const a = JSON.parse(o);
|
|
1470
1395
|
if (t)
|
|
1471
1396
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1472
1397
|
},
|
|
1473
1398
|
onFailure(o) {
|
|
1474
|
-
|
|
1399
|
+
n && n(o);
|
|
1475
1400
|
}
|
|
1476
1401
|
});
|
|
1477
1402
|
}
|
|
1478
|
-
function Ke(e, t = void 0,
|
|
1479
|
-
const
|
|
1403
|
+
function Ke(e, t = void 0, n = void 0) {
|
|
1404
|
+
const s = `${e.space}/api/exalead/whatsnew`, o = {
|
|
1480
1405
|
params: {
|
|
1481
1406
|
community_id: null,
|
|
1482
1407
|
hash_key: null,
|
|
@@ -1486,27 +1411,27 @@ function Ke(e, t = void 0, s = void 0) {
|
|
|
1486
1411
|
start: 0
|
|
1487
1412
|
}
|
|
1488
1413
|
};
|
|
1489
|
-
w(e, (
|
|
1490
|
-
m(
|
|
1414
|
+
w(e, (c) => {
|
|
1415
|
+
m(s, {
|
|
1491
1416
|
method: "POST",
|
|
1492
1417
|
headers: {
|
|
1493
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1418
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1494
1419
|
"Content-type": "application/json;charset=UTF-8",
|
|
1495
1420
|
Accept: "application/json"
|
|
1496
1421
|
},
|
|
1497
1422
|
data: JSON.stringify(o),
|
|
1498
1423
|
type: "json",
|
|
1499
|
-
onComplete(
|
|
1500
|
-
t && t(
|
|
1424
|
+
onComplete(i, a) {
|
|
1425
|
+
t && t(i, a);
|
|
1501
1426
|
},
|
|
1502
|
-
onFailure(
|
|
1503
|
-
|
|
1427
|
+
onFailure(i, a) {
|
|
1428
|
+
n && n(i, a);
|
|
1504
1429
|
}
|
|
1505
1430
|
});
|
|
1506
1431
|
});
|
|
1507
1432
|
}
|
|
1508
|
-
function Xe(e, t = void 0,
|
|
1509
|
-
const
|
|
1433
|
+
function Xe(e, t = void 0, n = void 0) {
|
|
1434
|
+
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
|
|
1510
1435
|
params: {
|
|
1511
1436
|
idsToFilterArr: [],
|
|
1512
1437
|
mode: "offline",
|
|
@@ -1515,40 +1440,40 @@ function Xe(e, t = void 0, s = void 0) {
|
|
|
1515
1440
|
maxNbOfCommonElements: "5"
|
|
1516
1441
|
}
|
|
1517
1442
|
};
|
|
1518
|
-
w(e, (
|
|
1519
|
-
m(
|
|
1443
|
+
w(e, (c) => {
|
|
1444
|
+
m(s, {
|
|
1520
1445
|
method: "POST",
|
|
1521
1446
|
headers: {
|
|
1522
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1447
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1523
1448
|
"Content-type": "application/json;charset=UTF-8",
|
|
1524
1449
|
Accept: "application/json"
|
|
1525
1450
|
},
|
|
1526
1451
|
data: JSON.stringify(o),
|
|
1527
1452
|
type: "json",
|
|
1528
|
-
onComplete(
|
|
1529
|
-
const
|
|
1530
|
-
t && t(
|
|
1453
|
+
onComplete(i, a) {
|
|
1454
|
+
const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1455
|
+
t && t(r, i);
|
|
1531
1456
|
},
|
|
1532
|
-
onFailure(
|
|
1533
|
-
|
|
1457
|
+
onFailure(i, a) {
|
|
1458
|
+
n && n(i, a);
|
|
1534
1459
|
}
|
|
1535
1460
|
});
|
|
1536
1461
|
});
|
|
1537
1462
|
}
|
|
1538
|
-
function Ve(e, t = void 0,
|
|
1539
|
-
const
|
|
1463
|
+
function Ve(e, t = void 0, n = void 0) {
|
|
1464
|
+
const s = {
|
|
1540
1465
|
base: e.space,
|
|
1541
1466
|
uri: "/api/community/listmycommunities",
|
|
1542
1467
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1543
1468
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1544
|
-
}, o = `${
|
|
1545
|
-
w(e, (
|
|
1469
|
+
}, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
|
|
1470
|
+
w(e, (i) => {
|
|
1546
1471
|
m(o, {
|
|
1547
1472
|
method: "GET",
|
|
1548
1473
|
headers: {
|
|
1549
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1474
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1550
1475
|
},
|
|
1551
|
-
onComplete(a,
|
|
1476
|
+
onComplete(a, r, d) {
|
|
1552
1477
|
const p = JSON.parse(a).result;
|
|
1553
1478
|
let u = 0;
|
|
1554
1479
|
p.forEach((f) => {
|
|
@@ -1564,76 +1489,76 @@ function Ve(e, t = void 0, s = void 0) {
|
|
|
1564
1489
|
e,
|
|
1565
1490
|
f.id,
|
|
1566
1491
|
(h) => {
|
|
1567
|
-
u++, g.members = h,
|
|
1492
|
+
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1568
1493
|
},
|
|
1569
|
-
(h) =>
|
|
1494
|
+
(h) => n(h)
|
|
1570
1495
|
);
|
|
1571
1496
|
});
|
|
1572
1497
|
},
|
|
1573
|
-
onFailure(a,
|
|
1498
|
+
onFailure(a, r) {
|
|
1574
1499
|
const d = a;
|
|
1575
|
-
d.status =
|
|
1500
|
+
d.status = r.status, d.response = r.errormsg, n && n(d);
|
|
1576
1501
|
}
|
|
1577
1502
|
});
|
|
1578
1503
|
});
|
|
1579
1504
|
}
|
|
1580
|
-
function Z(e, t,
|
|
1581
|
-
const o = `${e.space}/api/community/listmembers`,
|
|
1505
|
+
function Z(e, t, n, s) {
|
|
1506
|
+
const o = `${e.space}/api/community/listmembers`, c = {
|
|
1582
1507
|
params: {
|
|
1583
1508
|
page: e.page ? e.page : 1,
|
|
1584
1509
|
limit: e.limit ? e.limit : 50,
|
|
1585
1510
|
community_id: t
|
|
1586
1511
|
}
|
|
1587
1512
|
};
|
|
1588
|
-
w(e, (
|
|
1513
|
+
w(e, (i) => {
|
|
1589
1514
|
m(o, {
|
|
1590
1515
|
method: "POST",
|
|
1591
1516
|
headers: {
|
|
1592
1517
|
"Content-type": "application/json;charset=UTF-8",
|
|
1593
1518
|
Accept: "application/json",
|
|
1594
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1519
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1595
1520
|
},
|
|
1596
|
-
data: JSON.stringify(
|
|
1521
|
+
data: JSON.stringify(c),
|
|
1597
1522
|
type: "json",
|
|
1598
|
-
onComplete(a,
|
|
1599
|
-
|
|
1523
|
+
onComplete(a, r, d) {
|
|
1524
|
+
n && n(a);
|
|
1600
1525
|
},
|
|
1601
|
-
onFailure(a,
|
|
1526
|
+
onFailure(a, r) {
|
|
1602
1527
|
const d = a;
|
|
1603
|
-
d.status =
|
|
1528
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1604
1529
|
}
|
|
1605
1530
|
});
|
|
1606
1531
|
});
|
|
1607
1532
|
}
|
|
1608
|
-
function We(e, t = void 0,
|
|
1609
|
-
const
|
|
1610
|
-
e.commu_id || (e.commu_id =
|
|
1533
|
+
function We(e, t = void 0, n = void 0) {
|
|
1534
|
+
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1535
|
+
e.commu_id || (e.commu_id = s);
|
|
1611
1536
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1612
|
-
w(e, (
|
|
1537
|
+
w(e, (c) => {
|
|
1613
1538
|
m(o, {
|
|
1614
1539
|
method: "GET",
|
|
1615
1540
|
headers: {
|
|
1616
1541
|
"Content-type": "application/json;charset=UTF-8",
|
|
1617
1542
|
Accept: "application/json",
|
|
1618
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1543
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1619
1544
|
},
|
|
1620
|
-
onComplete(
|
|
1621
|
-
const a = JSON.parse(
|
|
1545
|
+
onComplete(i) {
|
|
1546
|
+
const a = JSON.parse(i);
|
|
1622
1547
|
t && t(a);
|
|
1623
1548
|
},
|
|
1624
|
-
onFailure(
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1549
|
+
onFailure(i, a) {
|
|
1550
|
+
const r = i;
|
|
1551
|
+
r.status = a.status, r.response = a.errormsg, n && n(r);
|
|
1627
1552
|
}
|
|
1628
1553
|
});
|
|
1629
1554
|
});
|
|
1630
1555
|
}
|
|
1631
|
-
function Be(e, t,
|
|
1632
|
-
const { listAllContacts: o, currentUser:
|
|
1556
|
+
function Be(e, t, n = void 0, s = void 0) {
|
|
1557
|
+
const { listAllContacts: o, currentUser: c } = e;
|
|
1633
1558
|
console.log("__listAllContacts", o.hits);
|
|
1634
|
-
const
|
|
1635
|
-
users: [
|
|
1636
|
-
},
|
|
1559
|
+
const i = `${e.space}/api/directmessages`, a = {
|
|
1560
|
+
users: [c.login].concat(t.receipt)
|
|
1561
|
+
}, r = {
|
|
1637
1562
|
id_msg: "",
|
|
1638
1563
|
senderId: e.currentUser.login,
|
|
1639
1564
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1643,14 +1568,14 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1643
1568
|
ee(
|
|
1644
1569
|
a.users,
|
|
1645
1570
|
(l) => {
|
|
1646
|
-
l !== void 0 && (
|
|
1571
|
+
l !== void 0 && (r.id_msg = l.id, d = !0, $(e, r));
|
|
1647
1572
|
},
|
|
1648
1573
|
(l) => {
|
|
1649
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1574
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
|
|
1650
1575
|
}
|
|
1651
1576
|
), d === !1 && setTimeout(() => {
|
|
1652
1577
|
d === !1 && w(e, (l) => {
|
|
1653
|
-
m(
|
|
1578
|
+
m(i, {
|
|
1654
1579
|
method: "POST",
|
|
1655
1580
|
headers: {
|
|
1656
1581
|
"Content-Type": "application/json",
|
|
@@ -1661,52 +1586,52 @@ function Be(e, t, s = void 0, n = void 0) {
|
|
|
1661
1586
|
type: "json",
|
|
1662
1587
|
onComplete(p, u, f) {
|
|
1663
1588
|
const g = p;
|
|
1664
|
-
g.reponse = JSON.parse(f.response), g.status = f.status,
|
|
1589
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, n && n(g), r.id_msg = g.result.id, $(e, r);
|
|
1665
1590
|
},
|
|
1666
1591
|
onFailure(p, u, f) {
|
|
1667
1592
|
const g = p;
|
|
1668
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1593
|
+
g.msg = u.errormsg, g.status = u.status, s && s(g);
|
|
1669
1594
|
}
|
|
1670
1595
|
});
|
|
1671
1596
|
});
|
|
1672
1597
|
}, 500);
|
|
1673
1598
|
}
|
|
1674
|
-
function ee(e, t,
|
|
1599
|
+
function ee(e, t, n, s) {
|
|
1675
1600
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1676
|
-
w(e, (
|
|
1601
|
+
w(e, (c) => {
|
|
1677
1602
|
m(o, {
|
|
1678
1603
|
method: "GET",
|
|
1679
1604
|
headers: {
|
|
1680
1605
|
Accept: "application/json,text/javascript,*/*",
|
|
1681
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1606
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1682
1607
|
},
|
|
1683
|
-
onComplete(
|
|
1684
|
-
const a = JSON.parse(
|
|
1608
|
+
onComplete(i) {
|
|
1609
|
+
const a = JSON.parse(i), r = [];
|
|
1685
1610
|
a.result.forEach((p) => {
|
|
1686
|
-
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length &&
|
|
1611
|
+
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
|
|
1687
1612
|
});
|
|
1688
|
-
const d = t.sort(), l =
|
|
1613
|
+
const d = t.sort(), l = r.find((p) => {
|
|
1689
1614
|
const u = [];
|
|
1690
1615
|
return p.users.forEach((f) => {
|
|
1691
1616
|
u.push(f.login);
|
|
1692
1617
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1693
1618
|
});
|
|
1694
|
-
|
|
1619
|
+
n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
|
|
1695
1620
|
},
|
|
1696
|
-
onFailure(
|
|
1697
|
-
const a =
|
|
1698
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1621
|
+
onFailure(i) {
|
|
1622
|
+
const a = i;
|
|
1623
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
1699
1624
|
}
|
|
1700
1625
|
});
|
|
1701
1626
|
});
|
|
1702
1627
|
}
|
|
1703
|
-
function
|
|
1628
|
+
function $(e, t, n = void 0, s = void 0) {
|
|
1704
1629
|
const o = {
|
|
1705
1630
|
base: e.space,
|
|
1706
1631
|
uri: "/api/community",
|
|
1707
1632
|
id_msg: `${t.id_msg}`,
|
|
1708
1633
|
endUri: "/instantmessages"
|
|
1709
|
-
},
|
|
1634
|
+
}, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
|
|
1710
1635
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1711
1636
|
accessState: null,
|
|
1712
1637
|
commentUri: null,
|
|
@@ -1716,33 +1641,33 @@ function j(e, t, s = void 0, n = void 0) {
|
|
|
1716
1641
|
parentCommentUri: null,
|
|
1717
1642
|
richMessage: t.msg
|
|
1718
1643
|
};
|
|
1719
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1720
|
-
m(
|
|
1644
|
+
console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
|
|
1645
|
+
m(c, {
|
|
1721
1646
|
method: "POST",
|
|
1722
1647
|
headers: {
|
|
1723
1648
|
"Content-Type": "application/json",
|
|
1724
1649
|
Accept: "application/json",
|
|
1725
1650
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1726
1651
|
},
|
|
1727
|
-
data: JSON.stringify(
|
|
1652
|
+
data: JSON.stringify(i),
|
|
1728
1653
|
type: "json",
|
|
1729
|
-
onComplete(
|
|
1730
|
-
const p =
|
|
1731
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1654
|
+
onComplete(r, d, l) {
|
|
1655
|
+
const p = r;
|
|
1656
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1732
1657
|
},
|
|
1733
|
-
onFailure(
|
|
1734
|
-
const l =
|
|
1735
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1658
|
+
onFailure(r, d) {
|
|
1659
|
+
const l = r;
|
|
1660
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1736
1661
|
}
|
|
1737
1662
|
});
|
|
1738
1663
|
});
|
|
1739
1664
|
}
|
|
1740
1665
|
function te(e) {
|
|
1741
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1666
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1742
1667
|
return `<p>${e} </p>
|
|
1743
1668
|
<br/>
|
|
1744
1669
|
<hr/>
|
|
1745
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1670
|
+
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1746
1671
|
}
|
|
1747
1672
|
const ne = {
|
|
1748
1673
|
title: "TEST DEV COMMUNITY IDEA",
|
|
@@ -1754,16 +1679,16 @@ const ne = {
|
|
|
1754
1679
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1755
1680
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1756
1681
|
};
|
|
1757
|
-
function Ye(e, t,
|
|
1758
|
-
const o = `${e.space}/api/idea/add`,
|
|
1759
|
-
(
|
|
1760
|
-
),
|
|
1761
|
-
(
|
|
1682
|
+
function Ye(e, t, n = void 0, s = void 0) {
|
|
1683
|
+
const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1684
|
+
(r) => r.id === t.community_id
|
|
1685
|
+
), i = e.swymCommunities.find(
|
|
1686
|
+
(r) => r.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1762
1687
|
), a = {
|
|
1763
1688
|
params: {
|
|
1764
1689
|
title: t.title,
|
|
1765
1690
|
// String, le nom de l'affaire
|
|
1766
|
-
community_id:
|
|
1691
|
+
community_id: c?.id !== void 0 ? c.id : i.id,
|
|
1767
1692
|
// String, l'id de la communauté
|
|
1768
1693
|
message: se(t.text_html),
|
|
1769
1694
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1771,11 +1696,11 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1771
1696
|
// 1 publier, 0 non publier
|
|
1772
1697
|
}
|
|
1773
1698
|
};
|
|
1774
|
-
w(e, (
|
|
1699
|
+
w(e, (r) => {
|
|
1775
1700
|
const d = {
|
|
1776
1701
|
"Content-type": "application/json;charset=UTF-8",
|
|
1777
1702
|
Accept: "application/json",
|
|
1778
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1703
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1779
1704
|
};
|
|
1780
1705
|
m(o, {
|
|
1781
1706
|
method: "POST",
|
|
@@ -1784,90 +1709,90 @@ function Ye(e, t, s = void 0, n = void 0) {
|
|
|
1784
1709
|
type: "json",
|
|
1785
1710
|
onComplete(l, p, u) {
|
|
1786
1711
|
const f = JSON.parse(l);
|
|
1787
|
-
f.status = u.status, f.response = u.response,
|
|
1712
|
+
f.status = u.status, f.response = u.response, n && n(f);
|
|
1788
1713
|
},
|
|
1789
1714
|
onFailure(l, p, u) {
|
|
1790
1715
|
const f = l;
|
|
1791
|
-
f.status = p.status, f.response = p.errormsg,
|
|
1716
|
+
f.status = p.status, f.response = p.errormsg, s && s(f);
|
|
1792
1717
|
}
|
|
1793
1718
|
});
|
|
1794
1719
|
});
|
|
1795
1720
|
}
|
|
1796
|
-
function qe(e, t,
|
|
1797
|
-
const o = `${e.space}/api/idea/delete`,
|
|
1721
|
+
function qe(e, t, n = void 0, s = void 0) {
|
|
1722
|
+
const o = `${e.space}/api/idea/delete`, c = {
|
|
1798
1723
|
params: {
|
|
1799
1724
|
community_id: t.community_id,
|
|
1800
1725
|
ideationIds: [t.idee_id]
|
|
1801
1726
|
}
|
|
1802
1727
|
};
|
|
1803
|
-
w(e, (
|
|
1728
|
+
w(e, (i) => {
|
|
1804
1729
|
m(o, {
|
|
1805
1730
|
method: "POST",
|
|
1806
1731
|
headers: {
|
|
1807
1732
|
"Content-type": "application/json;charset=UTF-8",
|
|
1808
1733
|
Accept: "application/json",
|
|
1809
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1734
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1810
1735
|
},
|
|
1811
|
-
data: JSON.stringify(
|
|
1736
|
+
data: JSON.stringify(c),
|
|
1812
1737
|
type: "json",
|
|
1813
|
-
onComplete(a,
|
|
1814
|
-
|
|
1738
|
+
onComplete(a, r, d) {
|
|
1739
|
+
n && n(a);
|
|
1815
1740
|
},
|
|
1816
|
-
onFailure(a,
|
|
1741
|
+
onFailure(a, r, d) {
|
|
1817
1742
|
const l = a;
|
|
1818
|
-
l.status =
|
|
1743
|
+
l.status = r.status, l.response = r.errormsg, s && s(l);
|
|
1819
1744
|
}
|
|
1820
1745
|
});
|
|
1821
1746
|
});
|
|
1822
1747
|
}
|
|
1823
|
-
function He(e, t = "",
|
|
1748
|
+
function He(e, t = "", n = void 0, s = void 0) {
|
|
1824
1749
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1825
1750
|
t === "" && (t = o);
|
|
1826
|
-
const
|
|
1751
|
+
const c = `${e.space}/api/idea/get`, i = {
|
|
1827
1752
|
params: {
|
|
1828
1753
|
id: t
|
|
1829
1754
|
}
|
|
1830
1755
|
};
|
|
1831
1756
|
w(e, (a) => {
|
|
1832
|
-
m(
|
|
1757
|
+
m(c, {
|
|
1833
1758
|
method: "POST",
|
|
1834
1759
|
headers: {
|
|
1835
1760
|
"Content-type": "application/json;charset=UTF-8",
|
|
1836
1761
|
Accept: "application/json",
|
|
1837
1762
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1838
1763
|
},
|
|
1839
|
-
data: JSON.stringify(
|
|
1764
|
+
data: JSON.stringify(i),
|
|
1840
1765
|
type: "json",
|
|
1841
|
-
onComplete(
|
|
1842
|
-
const d =
|
|
1843
|
-
d.msg = d.result.message,
|
|
1766
|
+
onComplete(r) {
|
|
1767
|
+
const d = r;
|
|
1768
|
+
d.msg = d.result.message, n && n(d);
|
|
1844
1769
|
},
|
|
1845
|
-
onFailure(
|
|
1846
|
-
const d =
|
|
1847
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1770
|
+
onFailure(r) {
|
|
1771
|
+
const d = r;
|
|
1772
|
+
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1848
1773
|
}
|
|
1849
1774
|
});
|
|
1850
1775
|
});
|
|
1851
1776
|
}
|
|
1852
|
-
function ze(e, t = ne,
|
|
1777
|
+
function ze(e, t = ne, n = void 0, s = void 0) {
|
|
1853
1778
|
const o = {
|
|
1854
1779
|
uri: "/api/idea/list",
|
|
1855
1780
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1856
1781
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1857
|
-
},
|
|
1858
|
-
w(e, (
|
|
1859
|
-
m(
|
|
1782
|
+
}, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1783
|
+
w(e, (i) => {
|
|
1784
|
+
m(c, {
|
|
1860
1785
|
method: "GET",
|
|
1861
1786
|
headers: {
|
|
1862
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1787
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1863
1788
|
},
|
|
1864
1789
|
onComplete(a) {
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1790
|
+
const r = JSON.parse(a);
|
|
1791
|
+
n && n(r);
|
|
1867
1792
|
},
|
|
1868
|
-
onFailure(a,
|
|
1793
|
+
onFailure(a, r) {
|
|
1869
1794
|
const d = a;
|
|
1870
|
-
d.status =
|
|
1795
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1871
1796
|
}
|
|
1872
1797
|
});
|
|
1873
1798
|
});
|
|
@@ -1947,51 +1872,131 @@ function se(e) {
|
|
|
1947
1872
|
<p>
|
|
1948
1873
|
</p>` : e;
|
|
1949
1874
|
}
|
|
1950
|
-
function Qe(e, t = void 0,
|
|
1951
|
-
const
|
|
1875
|
+
function Qe(e, t = void 0, n = void 0) {
|
|
1876
|
+
const s = e.space + "/api/user/getcurrent/";
|
|
1952
1877
|
w(e, (o) => {
|
|
1953
|
-
m(
|
|
1878
|
+
m(s, {
|
|
1954
1879
|
method: "GET",
|
|
1955
1880
|
headers: {
|
|
1956
1881
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1957
1882
|
},
|
|
1958
|
-
onComplete(
|
|
1959
|
-
const
|
|
1960
|
-
t && t(
|
|
1883
|
+
onComplete(c, i, a) {
|
|
1884
|
+
const r = JSON.parse(c);
|
|
1885
|
+
t && t(r.result);
|
|
1961
1886
|
},
|
|
1962
|
-
onFailure(
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1887
|
+
onFailure(c, i, a) {
|
|
1888
|
+
const r = { erreur: JSON.parse(c), headers: i, xhr: a };
|
|
1889
|
+
n && n(r);
|
|
1965
1890
|
}
|
|
1966
1891
|
});
|
|
1967
1892
|
});
|
|
1968
1893
|
}
|
|
1969
|
-
function Ze(e, t,
|
|
1894
|
+
function Ze(e, t, n = void 0, s = void 0) {
|
|
1970
1895
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1971
1896
|
w(
|
|
1972
1897
|
e,
|
|
1973
|
-
(
|
|
1898
|
+
(c) => {
|
|
1974
1899
|
m(o, {
|
|
1975
1900
|
method: "GET",
|
|
1976
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1977
|
-
onComplete(
|
|
1978
|
-
const d = JSON.parse(
|
|
1979
|
-
|
|
1901
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1902
|
+
onComplete(i, a, r) {
|
|
1903
|
+
const d = JSON.parse(i);
|
|
1904
|
+
n && n(d);
|
|
1980
1905
|
},
|
|
1981
|
-
onFailure(
|
|
1982
|
-
|
|
1906
|
+
onFailure(i) {
|
|
1907
|
+
s && s(i);
|
|
1983
1908
|
}
|
|
1984
1909
|
});
|
|
1985
1910
|
},
|
|
1986
|
-
|
|
1911
|
+
s
|
|
1987
1912
|
);
|
|
1988
1913
|
}
|
|
1989
1914
|
function et(e) {
|
|
1990
1915
|
const t = "Hello " + e;
|
|
1991
1916
|
return console.log(t), t;
|
|
1992
1917
|
}
|
|
1918
|
+
function tt(e, t = void 0, n = void 0) {
|
|
1919
|
+
return console.log("credentials", e), new Promise((s) => {
|
|
1920
|
+
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
1921
|
+
const i = J();
|
|
1922
|
+
console.log("platformeInfo", i);
|
|
1923
|
+
}
|
|
1924
|
+
b(
|
|
1925
|
+
e,
|
|
1926
|
+
"Common space",
|
|
1927
|
+
["VPLMProjectLeader", "VPLMCreator"],
|
|
1928
|
+
void 0,
|
|
1929
|
+
(i) => e.ctx = i,
|
|
1930
|
+
(i) => {
|
|
1931
|
+
console.log("onError =>", i);
|
|
1932
|
+
},
|
|
1933
|
+
!0
|
|
1934
|
+
);
|
|
1935
|
+
const o = N.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
1936
|
+
m(c, {
|
|
1937
|
+
onComplete(i) {
|
|
1938
|
+
if (Array.isArray(JSON.parse(i))) {
|
|
1939
|
+
const a = JSON.parse(i);
|
|
1940
|
+
console.log("serviceId=3dsearch", a);
|
|
1941
|
+
const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
1942
|
+
m(r, {
|
|
1943
|
+
method: "POST",
|
|
1944
|
+
headers: {
|
|
1945
|
+
Accept: "application/json",
|
|
1946
|
+
"Content-Type": "application/json"
|
|
1947
|
+
},
|
|
1948
|
+
data: JSON.stringify({
|
|
1949
|
+
with_indexing_date: !0,
|
|
1950
|
+
with_nls: !1,
|
|
1951
|
+
label: `3DSearch-${o}`,
|
|
1952
|
+
locale: "en",
|
|
1953
|
+
select_predicate: [
|
|
1954
|
+
"ds6w:label",
|
|
1955
|
+
"ds6w:type",
|
|
1956
|
+
"ds6w:description",
|
|
1957
|
+
"ds6w:identifier",
|
|
1958
|
+
"ds6w:responsible",
|
|
1959
|
+
"ds6wg:fullname"
|
|
1960
|
+
],
|
|
1961
|
+
select_file: [
|
|
1962
|
+
"icon",
|
|
1963
|
+
"thumbnail_2d"
|
|
1964
|
+
],
|
|
1965
|
+
query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
|
|
1966
|
+
order_by: "desc",
|
|
1967
|
+
order_field: "relevance",
|
|
1968
|
+
nresults: 1e3,
|
|
1969
|
+
start: "0",
|
|
1970
|
+
source: [
|
|
1971
|
+
"3dspace",
|
|
1972
|
+
"usersgroup"
|
|
1973
|
+
],
|
|
1974
|
+
tenant: e.tenant,
|
|
1975
|
+
login: {
|
|
1976
|
+
"3dspace": {
|
|
1977
|
+
SecurityContext: `ctx::${e.ctx}`
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
}),
|
|
1981
|
+
type: "json",
|
|
1982
|
+
onComplete(d) {
|
|
1983
|
+
t && t(d);
|
|
1984
|
+
},
|
|
1985
|
+
onFailure(d) {
|
|
1986
|
+
n && n(d);
|
|
1987
|
+
}
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
onFailure(i) {
|
|
1992
|
+
n && n(i);
|
|
1993
|
+
}
|
|
1994
|
+
});
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1993
1997
|
export {
|
|
1994
|
-
|
|
1998
|
+
I as UUID,
|
|
1999
|
+
tt as _3DSearch_usersGroup,
|
|
1995
2000
|
ke as _3DSpace_Create_Doc,
|
|
1996
2001
|
Ue as _3DSpace_bookmark_addSubsciptions,
|
|
1997
2002
|
T as _3DSpace_csrf,
|
|
@@ -1999,17 +2004,17 @@ export {
|
|
|
1999
2004
|
W as _3DSpace_download_multidoc,
|
|
2000
2005
|
X as _3DSpace_file_update,
|
|
2001
2006
|
V as _3DSpace_file_update_csr,
|
|
2002
|
-
|
|
2007
|
+
Ne as _3DSpace_file_url_csr,
|
|
2003
2008
|
k as _3DSpace_get_csrf,
|
|
2004
2009
|
K as _3DSpace_get_docInfo,
|
|
2005
2010
|
B as _3DSpace_get_downloadTicket_multidoc,
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2011
|
+
b as _3DSpace_get_securityContexts,
|
|
2012
|
+
j as _3DSpace_get_ticket,
|
|
2013
|
+
$e as _3DSpace_lifecycle_changeRevision,
|
|
2014
|
+
Fe as _3DSpace_lifecycle_changeState,
|
|
2015
|
+
je as _3DSpace_lifecycle_getGraph,
|
|
2016
|
+
Ae as _3DSpace_lifecycle_getNextRevision,
|
|
2017
|
+
De as _3DSpace_lifecycle_getNextStates,
|
|
2013
2018
|
Be as _3DSwym_buildDirectMessage,
|
|
2014
2019
|
qe as _3DSwym_deleteIdea,
|
|
2015
2020
|
ee as _3DSwym_findCommunityToInstantMSG,
|
|
@@ -2024,7 +2029,7 @@ export {
|
|
|
2024
2029
|
Ze as _3DSwym_get_findUser,
|
|
2025
2030
|
w as _3DSwym_get_version,
|
|
2026
2031
|
Ye as _3DSwym_postIdea,
|
|
2027
|
-
|
|
2032
|
+
$ as _3DSwym_sendMessageData,
|
|
2028
2033
|
Se as _AppMngt_get_info_user,
|
|
2029
2034
|
he as _AppMngt_get_users,
|
|
2030
2035
|
J as _getPlateformInfos,
|
|
@@ -2040,7 +2045,7 @@ export {
|
|
|
2040
2045
|
Y as dataMixing,
|
|
2041
2046
|
Ce as deleteUserGroups,
|
|
2042
2047
|
ce as findAdresse,
|
|
2043
|
-
|
|
2048
|
+
Ie as getAllContextSecurity,
|
|
2044
2049
|
G as getCSRFToken,
|
|
2045
2050
|
re as getCommunes,
|
|
2046
2051
|
ye as getComplementUG,
|
|
@@ -2048,15 +2053,15 @@ export {
|
|
|
2048
2053
|
de as getDataFromGouvFr,
|
|
2049
2054
|
Me as getDatasByTenant,
|
|
2050
2055
|
Le as getDatasFrom3DSpace,
|
|
2051
|
-
|
|
2056
|
+
Re as getDownloadDocument,
|
|
2052
2057
|
Ge as getInfoDocTags,
|
|
2053
2058
|
we as getUserGroupsList,
|
|
2054
2059
|
E as getUsersGroupRules,
|
|
2055
|
-
|
|
2060
|
+
xe as get_3DSpace_csrf,
|
|
2056
2061
|
Te as patchUserGroups,
|
|
2057
2062
|
Oe as patchUserGroupsControl,
|
|
2058
|
-
|
|
2059
|
-
|
|
2063
|
+
Pe as pushDataIn3DSpace,
|
|
2064
|
+
be as readUserGroupControl,
|
|
2060
2065
|
Ee as removeTagToDoc,
|
|
2061
2066
|
et as sayHello,
|
|
2062
2067
|
le as updateEvent
|