@beam3_dev/api_module 0.0.64 → 0.0.66
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 +522 -521
- 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
|
@@ -34,10 +34,10 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function ie(e, t = void 0,
|
|
38
|
-
const
|
|
37
|
+
async function ie(e, t = void 0, 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 ie(e, t = void 0, n = void 0) {
|
|
|
47
47
|
).then((o) => o.json()).then((o) => {
|
|
48
48
|
t && t(o);
|
|
49
49
|
}).catch((o) => {
|
|
50
|
-
|
|
50
|
+
s && s(o), console.error("Erreur : " + o);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function re(e, t = void 0,
|
|
53
|
+
async function re(e, t = void 0, 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 re(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
68
|
async function ce(e, t = L) {
|
|
69
|
-
let
|
|
70
|
-
const
|
|
71
|
-
for (let
|
|
72
|
-
o.push({ date:
|
|
69
|
+
let s = N.now().year;
|
|
70
|
+
const n = e, o = [], c = (a) => {
|
|
71
|
+
for (let i in a)
|
|
72
|
+
o.push({ date: i, comment: a[i] });
|
|
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
|
{
|
|
@@ -80,63 +80,63 @@ async function ce(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((i) => i.json()).then((i) => {
|
|
84
|
+
c(i);
|
|
85
|
+
}).catch((i) => console.error("Erreur : " + i));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = n.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
90
|
-
for (let
|
|
89
|
+
} : n;
|
|
90
|
+
for (let i of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start === N.fromISO(
|
|
92
|
+
(l) => l.start === N.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: N.fromISO(
|
|
96
|
-
end: N.fromISO(
|
|
94
|
+
name: "Férié : " + i.comment,
|
|
95
|
+
start: N.fromISO(i.date).toISODate(),
|
|
96
|
+
end: N.fromISO(i.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function de(e, t,
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
async function de(e, t, s = !0) {
|
|
104
|
+
const n = e.events.findIndex((o) => o.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((o, c) => o.start - c.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
|
-
O(["DS/WAFData/WAFData"], (
|
|
109
|
-
|
|
108
|
+
O(["DS/WAFData/WAFData"], (s) => {
|
|
109
|
+
s.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function le(e, t,
|
|
113
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
114
|
-
|
|
112
|
+
function le(e, t, s) {
|
|
113
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
114
|
+
n.draggable(e, { data: t, start: s });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
function pe(e, t = void 0) {
|
|
118
|
-
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (
|
|
119
|
-
let
|
|
120
|
-
|
|
118
|
+
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
|
|
119
|
+
let n;
|
|
120
|
+
n === void 0 && (n = s.createProxy({
|
|
121
121
|
widgetId: A.id,
|
|
122
122
|
filteringMode: "WithFilteringServices"
|
|
123
|
-
}), t !== void 0 &&
|
|
123
|
+
}), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
function ue(e, t) {
|
|
127
|
-
O(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
128
|
-
|
|
127
|
+
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
128
|
+
s.droppable(e, { drop: t });
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
async function fe(e, t = void 0,
|
|
131
|
+
async function fe(e, t = void 0, s = void 0) {
|
|
132
132
|
await O(
|
|
133
133
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
|
-
(
|
|
135
|
-
(!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices",
|
|
136
|
-
|
|
134
|
+
(n) => {
|
|
135
|
+
(!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", n), t(
|
|
136
|
+
n.getPlatformServices({
|
|
137
137
|
platformId: e,
|
|
138
138
|
onComplete: t,
|
|
139
|
-
onFailure:
|
|
139
|
+
onFailure: s
|
|
140
140
|
})
|
|
141
141
|
));
|
|
142
142
|
}
|
|
@@ -145,66 +145,66 @@ async function fe(e, t = void 0, n = void 0) {
|
|
|
145
145
|
function me() {
|
|
146
146
|
let e = {};
|
|
147
147
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const
|
|
148
|
+
const s = t.getTenant(), n = 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: s,
|
|
153
|
+
user: n,
|
|
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, s) {
|
|
160
|
+
const n = {
|
|
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 = `${n.base}${n.uri}${n.option}`;
|
|
166
166
|
f(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, r, a) {
|
|
173
|
+
const i = JSON.parse(c), d = i.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, i);
|
|
178
178
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
181
|
-
a.msg =
|
|
179
|
+
onFailure(c, r) {
|
|
180
|
+
const a = c;
|
|
181
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function he(e, t = void 0,
|
|
186
|
-
let
|
|
187
|
-
f(
|
|
188
|
-
onComplete(o,
|
|
185
|
+
function he(e, t = void 0, s = void 0) {
|
|
186
|
+
let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
|
+
f(n, {
|
|
188
|
+
onComplete(o, c, r) {
|
|
189
189
|
const a = JSON.parse(o);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
|
-
onFailure(o,
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
onFailure(o, c) {
|
|
193
|
+
const r = o;
|
|
194
|
+
r.msg = c.errormsg, r.errCode = c.errorcode, s && s(r);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function Se(e, t,
|
|
198
|
+
function Se(e, t, s = void 0, n = void 0) {
|
|
199
199
|
let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
200
|
f(o, {
|
|
201
|
-
onComplete(
|
|
202
|
-
const
|
|
203
|
-
|
|
201
|
+
onComplete(c, r, a) {
|
|
202
|
+
const i = JSON.parse(c);
|
|
203
|
+
s && s(i);
|
|
204
204
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
207
|
-
a.msg =
|
|
205
|
+
onFailure(c, r) {
|
|
206
|
+
const a = c;
|
|
207
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -212,15 +212,15 @@ 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, s = void 0, n = void 0) {
|
|
216
|
+
const { space: o, currentUser: c } = e, a = `${o}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, i = {
|
|
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
|
|
@@ -230,19 +230,19 @@ function _e(e, t, n = void 0, s = void 0) {
|
|
|
230
230
|
f(a, {
|
|
231
231
|
method: "POST",
|
|
232
232
|
headers: F,
|
|
233
|
-
data: JSON.stringify(
|
|
233
|
+
data: JSON.stringify(i),
|
|
234
234
|
onComplete(d) {
|
|
235
|
-
|
|
235
|
+
s && s(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), n && n(p);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
function ye(e, t,
|
|
245
|
-
const { space: o, tenant:
|
|
244
|
+
function ye(e, t, s = void 0, n = void 0) {
|
|
245
|
+
const { space: o, tenant: c } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${i}`;
|
|
246
246
|
f(d, {
|
|
247
247
|
opts: {
|
|
248
248
|
method: "GET",
|
|
@@ -252,32 +252,32 @@ function ye(e, t, n = void 0, s = void 0) {
|
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
onComplete(u) {
|
|
255
|
-
|
|
255
|
+
s && s(JSON.parse(u));
|
|
256
256
|
},
|
|
257
257
|
onFailure(u, m) {
|
|
258
258
|
const g = u;
|
|
259
|
-
g.msg = m.errormsg, g.errCode = m.errorcode,
|
|
259
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, n && n(g);
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
function E(e, t = void 0,
|
|
264
|
-
const { space:
|
|
263
|
+
function E(e, t = void 0, s = void 0) {
|
|
264
|
+
const { space: n, tenant: o } = e, c = n, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
|
-
}, d = `${
|
|
267
|
+
}, d = `${c}${r}${a}`;
|
|
268
268
|
f(d, {
|
|
269
|
-
OPTsH:
|
|
269
|
+
OPTsH: i,
|
|
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, s && s(u);
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
function we(e, t = void 0,
|
|
280
|
-
const { space:
|
|
279
|
+
function we(e, t = void 0, s = void 0) {
|
|
280
|
+
const { space: n, currentUser: o } = e, a = `${n}/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, n = void 0) {
|
|
|
294
294
|
u.rules = _, t && t(u);
|
|
295
295
|
},
|
|
296
296
|
(_) => {
|
|
297
|
-
|
|
297
|
+
s && s(_);
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
},
|
|
302
302
|
onFailure(l) {
|
|
303
|
-
|
|
303
|
+
s && s(l);
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
} catch (l) {
|
|
@@ -308,52 +308,52 @@ function we(e, t = void 0, n = void 0) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function Te(e, t) {
|
|
311
|
-
const { space:
|
|
311
|
+
const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
312
|
f(o, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function Ce(e, t,
|
|
317
|
-
const { space:
|
|
316
|
+
function Ce(e, t, s, n = void 0, o = void 0) {
|
|
317
|
+
const { space: c, tenant: r } = 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:${r}`
|
|
325
|
+
}, i = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
|
|
326
326
|
f(d, {
|
|
327
327
|
headers: F,
|
|
328
328
|
method: "PATCH",
|
|
329
329
|
data: l,
|
|
330
330
|
type: "json",
|
|
331
331
|
onComplete(p) {
|
|
332
|
-
|
|
332
|
+
n && n(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, s, n = void 0, o = void 0) {
|
|
340
|
+
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
f(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: F,
|
|
344
|
-
data: JSON.stringify(
|
|
344
|
+
data: JSON.stringify(s),
|
|
345
345
|
type: "json",
|
|
346
346
|
onComplete(d) {
|
|
347
|
-
|
|
347
|
+
n && n(d);
|
|
348
348
|
},
|
|
349
349
|
onFailure(d) {
|
|
350
350
|
o && o(d);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function be(e, t,
|
|
355
|
-
const { space: o } = e,
|
|
356
|
-
f(
|
|
354
|
+
function be(e, t, s = void 0, n = void 0) {
|
|
355
|
+
const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
+
f(r, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
359
359
|
headers: {
|
|
@@ -362,83 +362,83 @@ function be(e, t, n = void 0, s = void 0) {
|
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
onComplete(d) {
|
|
365
|
-
|
|
365
|
+
s && s(JSON.parse(d));
|
|
366
366
|
},
|
|
367
367
|
onFailure(d) {
|
|
368
|
-
|
|
368
|
+
n && n(d);
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
async function J(e, t,
|
|
372
|
+
async function J(e, t, s) {
|
|
373
373
|
if (e.space) {
|
|
374
|
-
const
|
|
375
|
-
f(
|
|
374
|
+
const n = `${e.space}/resources/v1/application/CSRF`;
|
|
375
|
+
f(n, {
|
|
376
376
|
onComplete(o) {
|
|
377
377
|
o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
|
|
378
378
|
},
|
|
379
|
-
onFailure(o,
|
|
380
|
-
|
|
379
|
+
onFailure(o, c, r) {
|
|
380
|
+
s && s({ error: o, headers: c, xhr: r });
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
async function G(e, t = void 0,
|
|
385
|
+
async function G(e, t = void 0, s = void 0, n = 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
|
-
f(
|
|
393
|
-
onComplete(
|
|
394
|
-
const d = JSON.parse(
|
|
395
|
-
|
|
391
|
+
const c = o + `/resources/v1/modeler/documents/${t}`;
|
|
392
|
+
f(c, {
|
|
393
|
+
onComplete(r, a, i) {
|
|
394
|
+
const d = JSON.parse(r);
|
|
395
|
+
s && s(d);
|
|
396
396
|
},
|
|
397
|
-
onFailure(
|
|
398
|
-
|
|
397
|
+
onFailure(r) {
|
|
398
|
+
n && n(r);
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
function k(e, t = void 0,
|
|
402
|
+
function k(e, t = void 0, s = void 0) {
|
|
403
403
|
if (e.objID && e.objID !== "") {
|
|
404
|
-
let
|
|
405
|
-
console.log("_3DSpace_get_csrf / url",
|
|
406
|
-
onComplete(o,
|
|
404
|
+
let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
|
+
console.log("_3DSpace_get_csrf / url", n), f(n, {
|
|
406
|
+
onComplete(o, c, r) {
|
|
407
407
|
const a = JSON.parse(o);
|
|
408
408
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
409
|
},
|
|
410
410
|
onFailure(o) {
|
|
411
|
-
|
|
411
|
+
s && s(o);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
} else
|
|
415
415
|
C(
|
|
416
416
|
e,
|
|
417
|
-
(
|
|
418
|
-
console.log("_3DSpace_get_csrf / _3DSpace_csrf",
|
|
417
|
+
(n) => {
|
|
418
|
+
console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
|
|
419
419
|
},
|
|
420
|
-
(
|
|
421
|
-
|
|
420
|
+
(n) => {
|
|
421
|
+
s && s(n);
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
function C(e, t = void 0,
|
|
425
|
+
function C(e, t = void 0, s = void 0) {
|
|
426
426
|
if (e.space) {
|
|
427
|
-
const
|
|
428
|
-
f(
|
|
429
|
-
onComplete(o,
|
|
427
|
+
const n = e.space + "/resources/v1/application/CSRF";
|
|
428
|
+
f(n, {
|
|
429
|
+
onComplete(o, c, r) {
|
|
430
430
|
const a = JSON.parse(o);
|
|
431
431
|
console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(o,
|
|
434
|
-
|
|
433
|
+
onFailure(o, c, r) {
|
|
434
|
+
s && s({ response: o, headers: c, xhr: r });
|
|
435
435
|
}
|
|
436
436
|
});
|
|
437
437
|
} else
|
|
438
|
-
|
|
438
|
+
s && s("ERROR : url du 3DSpace non défini.");
|
|
439
439
|
}
|
|
440
|
-
function U(e, t = void 0,
|
|
441
|
-
let
|
|
440
|
+
function U(e, t = void 0, s = void 0) {
|
|
441
|
+
let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
442
442
|
k(
|
|
443
443
|
e,
|
|
444
444
|
(o) => {
|
|
@@ -446,48 +446,48 @@ function U(e, t = void 0, n = void 0) {
|
|
|
446
446
|
"_3DSpace_get_ticket / onComplete / ☠️ info => ",
|
|
447
447
|
o,
|
|
448
448
|
e.token
|
|
449
|
-
), f(
|
|
449
|
+
), f(n, {
|
|
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
|
console.log("le ticket est dans la callback"), t && t(a);
|
|
457
457
|
},
|
|
458
|
-
onFailure(
|
|
459
|
-
console.warn("☠️ error => ",
|
|
458
|
+
onFailure(c, r) {
|
|
459
|
+
console.warn("☠️ error => ", c, r), s && s(c, r);
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
},
|
|
463
463
|
(o) => {
|
|
464
|
-
console.warn("_3DSpace_get_ticket / error => ", o),
|
|
464
|
+
console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
function Ne(e, t,
|
|
469
|
-
const
|
|
470
|
-
|
|
468
|
+
function Ne(e, t, s, n = void 0, o = void 0) {
|
|
469
|
+
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
|
+
s || (s = e.token), f(c, {
|
|
471
471
|
method: "PUT",
|
|
472
472
|
headers: {
|
|
473
|
-
ENO_CSRF_TOKEN:
|
|
473
|
+
ENO_CSRF_TOKEN: s
|
|
474
474
|
},
|
|
475
|
-
onComplete(
|
|
476
|
-
let a = JSON.parse(
|
|
475
|
+
onComplete(r) {
|
|
476
|
+
let a = JSON.parse(r);
|
|
477
477
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
478
478
|
try {
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
} catch (
|
|
482
|
-
o && o(
|
|
479
|
+
const i = a.data[0].dataelements.ticketURL;
|
|
480
|
+
n && n(i);
|
|
481
|
+
} catch (i) {
|
|
482
|
+
o && o(i);
|
|
483
483
|
}
|
|
484
484
|
},
|
|
485
|
-
onFailure(
|
|
486
|
-
o && o(
|
|
485
|
+
onFailure(r) {
|
|
486
|
+
o && o(r);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function K(e, t,
|
|
490
|
+
function K(e, t, s, n, o, c = void 0, r = void 0) {
|
|
491
491
|
k(
|
|
492
492
|
e,
|
|
493
493
|
t,
|
|
@@ -495,32 +495,32 @@ function K(e, t, n, s, o, r = void 0, i = void 0) {
|
|
|
495
495
|
W(
|
|
496
496
|
e,
|
|
497
497
|
t,
|
|
498
|
-
n,
|
|
499
498
|
s,
|
|
499
|
+
n,
|
|
500
500
|
o,
|
|
501
501
|
a.csrf.value,
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
c,
|
|
503
|
+
r
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function W(e, t,
|
|
509
|
-
const
|
|
510
|
-
f(
|
|
508
|
+
function W(e, t, s, n, o, c, r = void 0, a = void 0) {
|
|
509
|
+
const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
|
+
f(i, {
|
|
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, m = new FormData();
|
|
517
|
-
m.append("__fcs__jobTicket", u.ticket), m.append("file_0",
|
|
517
|
+
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", n, o);
|
|
518
518
|
const g = {};
|
|
519
519
|
g.method = "POST", g.data = m, 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: [
|
|
@@ -529,7 +529,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
|
529
529
|
relateddata: {
|
|
530
530
|
files: [
|
|
531
531
|
{
|
|
532
|
-
id:
|
|
532
|
+
id: s,
|
|
533
533
|
dataelements: {
|
|
534
534
|
title: o,
|
|
535
535
|
receipt: h
|
|
@@ -544,7 +544,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
|
544
544
|
}),
|
|
545
545
|
type: "json",
|
|
546
546
|
onComplete(y) {
|
|
547
|
-
|
|
547
|
+
r && r(y);
|
|
548
548
|
},
|
|
549
549
|
onFailure(y) {
|
|
550
550
|
a && a(y);
|
|
@@ -560,14 +560,14 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
|
560
560
|
}
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
|
-
async function ke(e, t,
|
|
564
|
-
const
|
|
563
|
+
async function ke(e, t, s, n, o = void 0, c = void 0) {
|
|
564
|
+
const r = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
565
565
|
type: "text/plain"
|
|
566
566
|
}), p = {
|
|
567
|
-
url_Ticket: `${
|
|
568
|
-
url_Post: `${
|
|
567
|
+
url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
568
|
+
url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
|
|
569
569
|
};
|
|
570
|
-
if (!
|
|
570
|
+
if (!r && r !== "") {
|
|
571
571
|
console.log("le store._3DSpace est vide");
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
@@ -578,12 +578,12 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
|
578
578
|
},
|
|
579
579
|
onComplete(u, m, g) {
|
|
580
580
|
const h = JSON.parse(u).data[0].dataelements;
|
|
581
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
581
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
|
|
582
582
|
const S = {
|
|
583
583
|
method: "POST",
|
|
584
584
|
data: d,
|
|
585
585
|
onComplete(T) {
|
|
586
|
-
if (
|
|
586
|
+
if (i !== "" && a !== "") {
|
|
587
587
|
const D = {
|
|
588
588
|
method: "POST",
|
|
589
589
|
headers: {
|
|
@@ -596,15 +596,15 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
|
596
596
|
{
|
|
597
597
|
type: "Document",
|
|
598
598
|
dataelements: {
|
|
599
|
-
title: `Title_${
|
|
599
|
+
title: `Title_${s.toLowerCase().split(" ").join("_")}`,
|
|
600
600
|
policy: "Document Release",
|
|
601
|
-
description:
|
|
601
|
+
description: n
|
|
602
602
|
},
|
|
603
603
|
relateddata: {
|
|
604
604
|
files: [
|
|
605
605
|
{
|
|
606
606
|
dataelements: {
|
|
607
|
-
title: `${
|
|
607
|
+
title: `${s}.json`,
|
|
608
608
|
receipt: T
|
|
609
609
|
}
|
|
610
610
|
}
|
|
@@ -619,7 +619,7 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
|
619
619
|
onComplete: _,
|
|
620
620
|
onFailure: y
|
|
621
621
|
};
|
|
622
|
-
|
|
622
|
+
i !== "" && f(p.url_Post, D);
|
|
623
623
|
} else
|
|
624
624
|
console.warn("le store est vide");
|
|
625
625
|
},
|
|
@@ -630,21 +630,21 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
|
630
630
|
}
|
|
631
631
|
function y(T, D) {
|
|
632
632
|
console.log("Erreur -- response ", T, `
|
|
633
|
-
headers `, D),
|
|
633
|
+
headers `, D), c && c(T);
|
|
634
634
|
}
|
|
635
635
|
f(h.ticketURL, S);
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
function b(e, t = void 0,
|
|
640
|
-
const
|
|
641
|
-
f(
|
|
639
|
+
function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
|
|
640
|
+
const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
641
|
+
f(r, {
|
|
642
642
|
method: "GET",
|
|
643
643
|
onComplete(a) {
|
|
644
|
-
const
|
|
644
|
+
const i = JSON.parse(a);
|
|
645
645
|
let d = "", l, p, u;
|
|
646
646
|
if (t) {
|
|
647
|
-
let m =
|
|
647
|
+
let m = i.collabspaces.find((g) => g.title === t);
|
|
648
648
|
if (m) {
|
|
649
649
|
l = t;
|
|
650
650
|
let g = m.couples;
|
|
@@ -652,120 +652,124 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
|
|
|
652
652
|
(h, S, _) => S === _.findIndex(
|
|
653
653
|
(y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
|
|
654
654
|
)
|
|
655
|
-
),
|
|
655
|
+
), s && (Array.isArray(s) ? s.forEach((h) => {
|
|
656
656
|
u || g.forEach((S) => {
|
|
657
|
-
if (h === S.role.name &&
|
|
658
|
-
u = h, p =
|
|
657
|
+
if (h === S.role.name && n === S.organization.title)
|
|
658
|
+
u = h, p = n;
|
|
659
659
|
else if (h === S.role.name) {
|
|
660
660
|
let _ = g.filter(
|
|
661
661
|
(y) => y.role.name === h
|
|
662
662
|
);
|
|
663
|
-
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) :
|
|
663
|
+
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : c(_);
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
666
|
}) : g.forEach((h) => {
|
|
667
|
-
if (
|
|
668
|
-
u =
|
|
669
|
-
else if (
|
|
667
|
+
if (s === h.role.name && n === h.organization.title)
|
|
668
|
+
u = s, p = n;
|
|
669
|
+
else if (s === h.role.name) {
|
|
670
670
|
let S = g.filter(
|
|
671
|
-
(_) => _.role.name ===
|
|
671
|
+
(_) => _.role.name === s
|
|
672
672
|
);
|
|
673
|
-
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) :
|
|
673
|
+
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
|
|
674
674
|
}
|
|
675
675
|
}));
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
-
l && p && u ? (d = u + "." + p + "." + l, o(d)) :
|
|
678
|
+
l && p && u ? (d = u + "." + p + "." + l, o(d)) : i.preferredcredentials ? (d = i.preferredcredentials.role.name + "." + i.preferredcredentials.organization.title + "." + i.preferredcredentials.collabspace.title, o(d)) : c && (d = u + "." + p + "." + l, c(d));
|
|
679
679
|
},
|
|
680
680
|
onFailure(a) {
|
|
681
681
|
console.log("Erreur de récupération du contexte de sécurité. => ", a);
|
|
682
682
|
}
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
async function I(e, t = void 0,
|
|
686
|
-
const
|
|
687
|
-
|
|
685
|
+
async function I(e, t = void 0, s = void 0) {
|
|
686
|
+
const n = e.objID;
|
|
687
|
+
return (!n || n === "") && console.warn(
|
|
688
688
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
689
689
|
), (e.space === "" || !e.space) && console.warn(
|
|
690
690
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
691
|
-
), (e.token === "" || !e.token) && (
|
|
691
|
+
), (e.token === "" || !e.token) && (J(
|
|
692
692
|
e,
|
|
693
|
-
(
|
|
694
|
-
e.token =
|
|
693
|
+
(c) => {
|
|
694
|
+
e.token = c;
|
|
695
695
|
},
|
|
696
|
-
(
|
|
697
|
-
console.log("☠️ error => ",
|
|
696
|
+
(c) => {
|
|
697
|
+
console.log("☠️ error => ", c);
|
|
698
698
|
}
|
|
699
699
|
), console.warn(
|
|
700
700
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
701
|
-
)), console.log("_3DSpace_download_doc / credentials", e),
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
701
|
+
)), console.log("_3DSpace_download_doc / credentials", e), new Promise((c, r) => {
|
|
702
|
+
U(
|
|
703
|
+
e,
|
|
704
|
+
(a) => {
|
|
705
|
+
f(a, {
|
|
706
|
+
headers: {
|
|
707
|
+
"Content-Type": "application/json",
|
|
708
|
+
Accept: "application/json",
|
|
709
|
+
ENO_CSRF_TOKEN: e.token
|
|
710
|
+
},
|
|
711
|
+
onComplete(i) {
|
|
712
|
+
const d = JSON.parse(i);
|
|
713
|
+
console.log("_3DSpace_download_doc / reponse ", d), t && t(d), c(d);
|
|
714
|
+
},
|
|
715
|
+
onFailure(i, d, l) {
|
|
716
|
+
s && (console.log("error http", i), s({ error: i, headers: d, xhr: l }), r({ error: i, headers: d, xhr: l }));
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
},
|
|
720
|
+
(a) => {
|
|
721
|
+
s && s(a), console.log("*_3dspace_download_doc / error file URL *", a), r(a);
|
|
722
|
+
}
|
|
723
|
+
);
|
|
724
|
+
});
|
|
721
725
|
}
|
|
722
|
-
async function X(e, t,
|
|
726
|
+
async function X(e, t, s = void 0, n = void 0) {
|
|
723
727
|
let o = [];
|
|
724
728
|
for (let a = 0; a < t.length; a += 80) {
|
|
725
|
-
const
|
|
726
|
-
o.push(
|
|
729
|
+
const i = t.slice(a, a + 80);
|
|
730
|
+
o.push(i);
|
|
727
731
|
}
|
|
728
|
-
const
|
|
732
|
+
const r = (a) => {
|
|
729
733
|
V(
|
|
730
734
|
e,
|
|
731
735
|
o[a],
|
|
732
736
|
() => {
|
|
733
|
-
a++, a < o.length &&
|
|
737
|
+
a++, a < o.length && r(a);
|
|
734
738
|
},
|
|
735
|
-
(
|
|
736
|
-
|
|
739
|
+
(i) => {
|
|
740
|
+
s && s(i);
|
|
737
741
|
}
|
|
738
742
|
);
|
|
739
743
|
};
|
|
740
|
-
|
|
744
|
+
r(0);
|
|
741
745
|
}
|
|
742
|
-
function V(e, t,
|
|
743
|
-
const
|
|
744
|
-
t.forEach((
|
|
745
|
-
|
|
746
|
-
id:
|
|
746
|
+
function V(e, t, s = void 0, n = void 0, o = void 0) {
|
|
747
|
+
const c = [];
|
|
748
|
+
t.forEach((i) => {
|
|
749
|
+
c.push({
|
|
750
|
+
id: i
|
|
747
751
|
});
|
|
748
752
|
});
|
|
749
|
-
let
|
|
753
|
+
let r = JSON.stringify({
|
|
750
754
|
csrf: {
|
|
751
755
|
name: "ENO_CSRF_TOKEN",
|
|
752
756
|
value: e.token
|
|
753
757
|
},
|
|
754
|
-
data:
|
|
758
|
+
data: c
|
|
755
759
|
});
|
|
756
760
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
757
761
|
f(a, {
|
|
758
762
|
method: "PUT",
|
|
759
|
-
data:
|
|
763
|
+
data: r,
|
|
760
764
|
type: "json",
|
|
761
|
-
onComplete(
|
|
762
|
-
const d =
|
|
763
|
-
|
|
765
|
+
onComplete(i) {
|
|
766
|
+
const d = i.data;
|
|
767
|
+
i.success === !0 && (s && s(), d.forEach((l) => {
|
|
764
768
|
try {
|
|
765
769
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
766
770
|
f(u, {
|
|
767
771
|
onComplete: (m) => {
|
|
768
|
-
|
|
772
|
+
n && n({
|
|
769
773
|
objectId: l.id,
|
|
770
774
|
fileName: p,
|
|
771
775
|
data: JSON.parse(m)
|
|
@@ -780,15 +784,15 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
780
784
|
}
|
|
781
785
|
}));
|
|
782
786
|
},
|
|
783
|
-
onFailure(
|
|
784
|
-
console.log(
|
|
787
|
+
onFailure(i) {
|
|
788
|
+
console.log(i), o && o(i);
|
|
785
789
|
}
|
|
786
790
|
});
|
|
787
791
|
}
|
|
788
|
-
function De(e, t,
|
|
792
|
+
function De(e, t, s = void 0, n = void 0) {
|
|
789
793
|
return new Promise((o) => {
|
|
790
794
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
791
|
-
const
|
|
795
|
+
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
792
796
|
b(
|
|
793
797
|
e.space,
|
|
794
798
|
"ESPACE COMMUN",
|
|
@@ -799,7 +803,7 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
799
803
|
console.log("onError =>", a);
|
|
800
804
|
}
|
|
801
805
|
);
|
|
802
|
-
let
|
|
806
|
+
let r = {
|
|
803
807
|
method: "POST",
|
|
804
808
|
headers: {
|
|
805
809
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -816,28 +820,28 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
816
820
|
}),
|
|
817
821
|
type: "json",
|
|
818
822
|
onComplete(a) {
|
|
819
|
-
|
|
823
|
+
s && s(a);
|
|
820
824
|
},
|
|
821
825
|
onFailure(a) {
|
|
822
|
-
|
|
826
|
+
n && n(a);
|
|
823
827
|
}
|
|
824
828
|
};
|
|
825
|
-
f(
|
|
829
|
+
f(c, r);
|
|
826
830
|
}
|
|
827
831
|
});
|
|
828
832
|
}
|
|
829
|
-
function Fe(e, t,
|
|
830
|
-
return new Promise((
|
|
833
|
+
function Fe(e, t, s, n = void 0, o = void 0) {
|
|
834
|
+
return new Promise((c) => {
|
|
831
835
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
832
|
-
const
|
|
836
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
833
837
|
b(
|
|
834
838
|
e.space,
|
|
835
839
|
"ESPACE COMMUN",
|
|
836
840
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
837
841
|
void 0,
|
|
838
|
-
(
|
|
839
|
-
(
|
|
840
|
-
console.log("onError =>",
|
|
842
|
+
(i) => e.ctx = i,
|
|
843
|
+
(i) => {
|
|
844
|
+
console.log("onError =>", i);
|
|
841
845
|
}
|
|
842
846
|
);
|
|
843
847
|
let a = {
|
|
@@ -852,26 +856,26 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
852
856
|
data: [
|
|
853
857
|
{
|
|
854
858
|
id: t,
|
|
855
|
-
nextState:
|
|
859
|
+
nextState: s
|
|
856
860
|
}
|
|
857
861
|
]
|
|
858
862
|
}),
|
|
859
863
|
type: "json",
|
|
860
|
-
onComplete(
|
|
861
|
-
|
|
864
|
+
onComplete(i) {
|
|
865
|
+
n && n(i);
|
|
862
866
|
},
|
|
863
|
-
onFailure(
|
|
864
|
-
o && o(
|
|
867
|
+
onFailure(i) {
|
|
868
|
+
o && o(i);
|
|
865
869
|
}
|
|
866
870
|
};
|
|
867
|
-
f(
|
|
871
|
+
f(r, a);
|
|
868
872
|
}
|
|
869
873
|
});
|
|
870
874
|
}
|
|
871
|
-
function Ue(e, t,
|
|
875
|
+
function Ue(e, t, s = void 0, n = void 0) {
|
|
872
876
|
return new Promise((o) => {
|
|
873
877
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
874
|
-
const
|
|
878
|
+
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
875
879
|
b(
|
|
876
880
|
e.space,
|
|
877
881
|
"ESPACE COMMUN",
|
|
@@ -882,7 +886,7 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
882
886
|
console.log("onError =>", a);
|
|
883
887
|
}
|
|
884
888
|
);
|
|
885
|
-
let
|
|
889
|
+
let r = {
|
|
886
890
|
method: "POST",
|
|
887
891
|
headers: {
|
|
888
892
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -899,20 +903,20 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
899
903
|
}),
|
|
900
904
|
type: "json",
|
|
901
905
|
onComplete(a) {
|
|
902
|
-
|
|
906
|
+
s && s(a);
|
|
903
907
|
},
|
|
904
908
|
onFailure(a) {
|
|
905
|
-
|
|
909
|
+
n && n(a);
|
|
906
910
|
}
|
|
907
911
|
};
|
|
908
|
-
f(
|
|
912
|
+
f(c, r);
|
|
909
913
|
}
|
|
910
914
|
});
|
|
911
915
|
}
|
|
912
|
-
function $e(e, t,
|
|
916
|
+
function $e(e, t, s = void 0, n = void 0) {
|
|
913
917
|
return new Promise((o) => {
|
|
914
918
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
915
|
-
const
|
|
919
|
+
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
916
920
|
b(
|
|
917
921
|
e.space,
|
|
918
922
|
"ESPACE COMMUN",
|
|
@@ -923,7 +927,7 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
923
927
|
console.log("onError =>", a);
|
|
924
928
|
}
|
|
925
929
|
);
|
|
926
|
-
let
|
|
930
|
+
let r = {
|
|
927
931
|
method: "POST",
|
|
928
932
|
headers: {
|
|
929
933
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -946,28 +950,28 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
946
950
|
}),
|
|
947
951
|
type: "json",
|
|
948
952
|
onComplete(a) {
|
|
949
|
-
|
|
953
|
+
s && s(a);
|
|
950
954
|
},
|
|
951
955
|
onFailure(a) {
|
|
952
|
-
|
|
956
|
+
n && n(a);
|
|
953
957
|
}
|
|
954
958
|
};
|
|
955
|
-
f(
|
|
959
|
+
f(c, r);
|
|
956
960
|
}
|
|
957
961
|
});
|
|
958
962
|
}
|
|
959
|
-
function je(e, t,
|
|
960
|
-
return new Promise((
|
|
963
|
+
function je(e, t, s, n = void 0, o = void 0) {
|
|
964
|
+
return new Promise((c) => {
|
|
961
965
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
962
|
-
const
|
|
966
|
+
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
963
967
|
b(
|
|
964
968
|
e.space,
|
|
965
969
|
"ESPACE COMMUN",
|
|
966
970
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
967
971
|
void 0,
|
|
968
|
-
(
|
|
969
|
-
(
|
|
970
|
-
console.log("onError =>",
|
|
972
|
+
(i) => e.ctx = i,
|
|
973
|
+
(i) => {
|
|
974
|
+
console.log("onError =>", i);
|
|
971
975
|
}
|
|
972
976
|
);
|
|
973
977
|
let a = {
|
|
@@ -982,9 +986,9 @@ function je(e, t, n, s = void 0, o = void 0) {
|
|
|
982
986
|
data: [
|
|
983
987
|
{
|
|
984
988
|
physicalid: t,
|
|
985
|
-
proposedRevision:
|
|
989
|
+
proposedRevision: s,
|
|
986
990
|
modifiedAttributes: {
|
|
987
|
-
revision:
|
|
991
|
+
revision: s
|
|
988
992
|
}
|
|
989
993
|
}
|
|
990
994
|
],
|
|
@@ -992,83 +996,83 @@ function je(e, t, n, s = void 0, o = void 0) {
|
|
|
992
996
|
notificationTimeout: 600
|
|
993
997
|
}),
|
|
994
998
|
type: "json",
|
|
995
|
-
onComplete(
|
|
996
|
-
|
|
999
|
+
onComplete(i) {
|
|
1000
|
+
n && n(i);
|
|
997
1001
|
},
|
|
998
|
-
onFailure(
|
|
999
|
-
o && o(
|
|
1002
|
+
onFailure(i) {
|
|
1003
|
+
o && o(i);
|
|
1000
1004
|
}
|
|
1001
1005
|
};
|
|
1002
|
-
f(
|
|
1006
|
+
f(r, a);
|
|
1003
1007
|
}
|
|
1004
1008
|
});
|
|
1005
1009
|
}
|
|
1006
1010
|
//!SECTION
|
|
1007
|
-
function Ae(e, t = void 0,
|
|
1008
|
-
const
|
|
1011
|
+
function Ae(e, t = void 0, s = void 0) {
|
|
1012
|
+
const n = {
|
|
1009
1013
|
base: `${e.space}`,
|
|
1010
1014
|
uri: "/resources/bps/cspaces",
|
|
1011
1015
|
optTenant: `tenant=${e.tenant}`
|
|
1012
|
-
}, o = `${
|
|
1016
|
+
}, o = `${n.base}${n.uri}?${n.optTenant}`;
|
|
1013
1017
|
f(o, {
|
|
1014
1018
|
method: "GET",
|
|
1015
1019
|
headers: {
|
|
1016
1020
|
Accept: "application/json,text/javascript,*/*",
|
|
1017
1021
|
"Content-Type": "application/ds-json"
|
|
1018
1022
|
},
|
|
1019
|
-
onComplete(
|
|
1020
|
-
const a = JSON.parse(
|
|
1021
|
-
t && t(a,
|
|
1023
|
+
onComplete(c, r) {
|
|
1024
|
+
const a = JSON.parse(c);
|
|
1025
|
+
t && t(a, r);
|
|
1022
1026
|
},
|
|
1023
|
-
onFailure(
|
|
1024
|
-
|
|
1027
|
+
onFailure(c, r, a) {
|
|
1028
|
+
s && s({ response: c, headers: r, xhr: a });
|
|
1025
1029
|
}
|
|
1026
1030
|
});
|
|
1027
1031
|
}
|
|
1028
|
-
function Re(e, t,
|
|
1032
|
+
function Re(e, t, s, n) {
|
|
1029
1033
|
U(
|
|
1030
1034
|
e.space,
|
|
1031
1035
|
t,
|
|
1032
1036
|
(o) => {
|
|
1033
1037
|
f(o, {
|
|
1034
1038
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1035
|
-
onComplete: (
|
|
1036
|
-
|
|
1039
|
+
onComplete: (c) => {
|
|
1040
|
+
s && s(c);
|
|
1037
1041
|
},
|
|
1038
|
-
onFailure: (
|
|
1039
|
-
console.log("error http",
|
|
1042
|
+
onFailure: (c) => {
|
|
1043
|
+
console.log("error http", c), n && n(c);
|
|
1040
1044
|
}
|
|
1041
1045
|
});
|
|
1042
1046
|
}
|
|
1043
1047
|
);
|
|
1044
1048
|
}
|
|
1045
|
-
async function Ie(e, t,
|
|
1049
|
+
async function Ie(e, t, s = void 0, n = void 0) {
|
|
1046
1050
|
return new Promise((o) => {
|
|
1047
|
-
U(e, t, (
|
|
1048
|
-
f(
|
|
1049
|
-
onComplete: (
|
|
1050
|
-
onFailure: (
|
|
1051
|
-
|
|
1051
|
+
U(e, t, (c) => {
|
|
1052
|
+
f(c, {
|
|
1053
|
+
onComplete: (r, a, i) => (o(JSON.parse(r)), s && s(JSON.parse(r), a, i), o),
|
|
1054
|
+
onFailure: (r, a, i) => {
|
|
1055
|
+
n && n(r, a, i), console.log(r, a?.errormsg);
|
|
1052
1056
|
}
|
|
1053
1057
|
});
|
|
1054
1058
|
});
|
|
1055
1059
|
});
|
|
1056
1060
|
}
|
|
1057
|
-
function ve(e, t,
|
|
1058
|
-
const
|
|
1061
|
+
function ve(e, t, s, n = void 0, o = void 0) {
|
|
1062
|
+
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1059
1063
|
k(
|
|
1060
1064
|
e,
|
|
1061
|
-
|
|
1062
|
-
(
|
|
1063
|
-
const a =
|
|
1065
|
+
s,
|
|
1066
|
+
(r) => {
|
|
1067
|
+
const a = r.data[0].relateddata.files[0].id, i = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
|
|
1064
1068
|
K(
|
|
1065
1069
|
e,
|
|
1066
|
-
|
|
1070
|
+
s,
|
|
1067
1071
|
a,
|
|
1068
|
-
r,
|
|
1069
1072
|
c,
|
|
1073
|
+
i,
|
|
1070
1074
|
(d) => {
|
|
1071
|
-
|
|
1075
|
+
n && n(d);
|
|
1072
1076
|
},
|
|
1073
1077
|
(d) => {
|
|
1074
1078
|
o && o(d);
|
|
@@ -1077,64 +1081,61 @@ function ve(e, t, n, s = void 0, o = void 0) {
|
|
|
1077
1081
|
}
|
|
1078
1082
|
);
|
|
1079
1083
|
}
|
|
1080
|
-
let v,
|
|
1084
|
+
let v, P;
|
|
1081
1085
|
const $ = [];
|
|
1082
|
-
async function
|
|
1086
|
+
async function Pe(e, t = void 0, s = void 0) {
|
|
1083
1087
|
e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
|
|
1084
1088
|
e,
|
|
1085
|
-
(
|
|
1086
|
-
t && t(
|
|
1089
|
+
(n) => {
|
|
1090
|
+
t && t(n);
|
|
1087
1091
|
},
|
|
1088
|
-
(
|
|
1089
|
-
|
|
1092
|
+
(n) => {
|
|
1093
|
+
s && s(n);
|
|
1090
1094
|
}
|
|
1091
1095
|
)) : (e.objID === null || e.objID === "") && C(
|
|
1092
1096
|
e,
|
|
1093
|
-
(
|
|
1094
|
-
t && t({ rep:
|
|
1097
|
+
(n) => {
|
|
1098
|
+
t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
|
|
1095
1099
|
},
|
|
1096
|
-
(
|
|
1097
|
-
|
|
1100
|
+
(n) => {
|
|
1101
|
+
s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
|
|
1098
1102
|
}
|
|
1099
1103
|
);
|
|
1100
1104
|
}
|
|
1101
|
-
async function
|
|
1105
|
+
async function xe(e, t = void 0, s = void 0) {
|
|
1102
1106
|
console.log("getDatasByTenant (getDocuments)", e), await I(
|
|
1103
1107
|
e,
|
|
1104
|
-
(
|
|
1108
|
+
(n) => {
|
|
1105
1109
|
const o = {};
|
|
1106
|
-
o.obj =
|
|
1110
|
+
o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1107
1111
|
},
|
|
1108
|
-
(
|
|
1109
|
-
|
|
1112
|
+
(n) => {
|
|
1113
|
+
s && s?.(n);
|
|
1110
1114
|
}
|
|
1111
1115
|
);
|
|
1112
1116
|
}
|
|
1113
|
-
function Me(e, t = void 0,
|
|
1114
|
-
const
|
|
1115
|
-
e.objIds.forEach((o,
|
|
1117
|
+
function Me(e, t = void 0, s = void 0) {
|
|
1118
|
+
const n = [];
|
|
1119
|
+
e.objIds.forEach((o, c) => {
|
|
1116
1120
|
I(
|
|
1117
1121
|
e,
|
|
1118
1122
|
o.objId,
|
|
1119
|
-
(
|
|
1120
|
-
|
|
1121
|
-
},
|
|
1122
|
-
(i) => {
|
|
1123
|
-
n && n(i);
|
|
1123
|
+
(r) => {
|
|
1124
|
+
n.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && t && t(n);
|
|
1124
1125
|
}
|
|
1125
1126
|
);
|
|
1126
1127
|
});
|
|
1127
1128
|
}
|
|
1128
|
-
function B(e, t,
|
|
1129
|
+
function B(e, t, s = void 0, n = void 0) {
|
|
1129
1130
|
X(
|
|
1130
1131
|
e,
|
|
1131
1132
|
v,
|
|
1132
1133
|
(o) => {
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1134
|
+
const c = [...t];
|
|
1135
|
+
c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data), s && s($);
|
|
1135
1136
|
},
|
|
1136
1137
|
(o) => {
|
|
1137
|
-
|
|
1138
|
+
n && (n(o), console.log(o));
|
|
1138
1139
|
}
|
|
1139
1140
|
);
|
|
1140
1141
|
}
|
|
@@ -1145,7 +1146,7 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1145
1146
|
"usersgroup",
|
|
1146
1147
|
"3dplan",
|
|
1147
1148
|
"dashboard"
|
|
1148
|
-
],
|
|
1149
|
+
], x = {
|
|
1149
1150
|
how: "ds6w:how",
|
|
1150
1151
|
what: "ds6w:what",
|
|
1151
1152
|
when: "ds6w:when",
|
|
@@ -1158,22 +1159,22 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1158
1159
|
order_by: "desc",
|
|
1159
1160
|
tag: "testTag"
|
|
1160
1161
|
};
|
|
1161
|
-
function Le(e, t,
|
|
1162
|
-
const { space: o, tenant:
|
|
1162
|
+
function Le(e, t, s = void 0, n = void 0) {
|
|
1163
|
+
const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
|
|
1163
1164
|
uri: "/resources/6w/tags",
|
|
1164
1165
|
otpCTX: "SecurityContext=preferred",
|
|
1165
|
-
optTenant: `tenant=${
|
|
1166
|
+
optTenant: `tenant=${c}`
|
|
1166
1167
|
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1167
1168
|
tag: [
|
|
1168
1169
|
{
|
|
1169
1170
|
subject: [
|
|
1170
1171
|
{
|
|
1171
|
-
uri: `pid://${
|
|
1172
|
+
uri: `pid://${r}`
|
|
1172
1173
|
}
|
|
1173
1174
|
],
|
|
1174
|
-
predicate:
|
|
1175
|
+
predicate: x[a],
|
|
1175
1176
|
object: {
|
|
1176
|
-
literal:
|
|
1177
|
+
literal: i
|
|
1177
1178
|
}
|
|
1178
1179
|
}
|
|
1179
1180
|
]
|
|
@@ -1191,46 +1192,46 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1191
1192
|
setTimeout(() => {
|
|
1192
1193
|
G(
|
|
1193
1194
|
e,
|
|
1194
|
-
|
|
1195
|
+
r,
|
|
1195
1196
|
(g) => {
|
|
1196
1197
|
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;
|
|
1197
1198
|
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
|
|
1198
1199
|
e,
|
|
1199
1200
|
t,
|
|
1200
1201
|
(y) => {
|
|
1201
|
-
|
|
1202
|
+
s && s(y);
|
|
1202
1203
|
},
|
|
1203
1204
|
(y) => {
|
|
1204
|
-
|
|
1205
|
+
n && n(y);
|
|
1205
1206
|
}
|
|
1206
1207
|
);
|
|
1207
1208
|
},
|
|
1208
1209
|
(g, h) => {
|
|
1209
1210
|
const S = g;
|
|
1210
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1211
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
|
|
1211
1212
|
}
|
|
1212
1213
|
);
|
|
1213
1214
|
}, 2e3);
|
|
1214
1215
|
},
|
|
1215
1216
|
onFailure(u, m) {
|
|
1216
1217
|
const g = u;
|
|
1217
|
-
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1218
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
|
|
1218
1219
|
}
|
|
1219
1220
|
});
|
|
1220
1221
|
}
|
|
1221
|
-
function q(e, t,
|
|
1222
|
+
function q(e, t, s = void 0, n = void 0) {
|
|
1222
1223
|
console.log("obj ", t);
|
|
1223
|
-
const o = t.info.name,
|
|
1224
|
+
const o = t.info.name, c = {
|
|
1224
1225
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1225
1226
|
uri: "/federated/search"
|
|
1226
|
-
},
|
|
1227
|
+
}, r = `${c.baseUrl}${c.uri}`, a = {
|
|
1227
1228
|
"Content-Type": "application/json",
|
|
1228
1229
|
Accept: "application/json,text/javascript,*/*"
|
|
1229
|
-
},
|
|
1230
|
+
}, i = R(), d = {
|
|
1230
1231
|
with_indexing_date: !0,
|
|
1231
1232
|
with_synthesis: !0,
|
|
1232
1233
|
with_nls: !1,
|
|
1233
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1234
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
|
|
1234
1235
|
locale: "fr",
|
|
1235
1236
|
select_predicate: [
|
|
1236
1237
|
"ds6w:label",
|
|
@@ -1287,26 +1288,26 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1287
1288
|
}
|
|
1288
1289
|
}
|
|
1289
1290
|
};
|
|
1290
|
-
console.log("dataPattern => ", d), f(
|
|
1291
|
+
console.log("dataPattern => ", d), f(r, {
|
|
1291
1292
|
method: "POST",
|
|
1292
1293
|
headers: a,
|
|
1293
1294
|
data: JSON.stringify(d),
|
|
1294
1295
|
onComplete(l) {
|
|
1295
1296
|
const p = JSON.parse(l);
|
|
1296
|
-
|
|
1297
|
+
s(p);
|
|
1297
1298
|
},
|
|
1298
1299
|
onFailure(l, p) {
|
|
1299
1300
|
const u = l;
|
|
1300
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1301
|
+
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);
|
|
1301
1302
|
}
|
|
1302
1303
|
});
|
|
1303
1304
|
}
|
|
1304
|
-
function Ee(e, t,
|
|
1305
|
-
const { objId: o, pred:
|
|
1305
|
+
function Ee(e, t, s = void 0, n = void 0) {
|
|
1306
|
+
const { objId: o, pred: c, tag: r } = t, a = {
|
|
1306
1307
|
uri: "/resources/6w/tags",
|
|
1307
1308
|
otpCTX: "SecurityContext=preferred",
|
|
1308
1309
|
optTenant: `tenant=${e.tenant}`
|
|
1309
|
-
},
|
|
1310
|
+
}, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1310
1311
|
tag: [
|
|
1311
1312
|
{
|
|
1312
1313
|
subject: [
|
|
@@ -1314,14 +1315,14 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1314
1315
|
uri: `pid://${o}`
|
|
1315
1316
|
}
|
|
1316
1317
|
],
|
|
1317
|
-
predicate:
|
|
1318
|
+
predicate: x[c],
|
|
1318
1319
|
object: {
|
|
1319
|
-
literal:
|
|
1320
|
+
literal: r
|
|
1320
1321
|
}
|
|
1321
1322
|
}
|
|
1322
1323
|
]
|
|
1323
1324
|
};
|
|
1324
|
-
f(
|
|
1325
|
+
f(i, {
|
|
1325
1326
|
method: "DELETE",
|
|
1326
1327
|
data: JSON.stringify(d),
|
|
1327
1328
|
headers: {
|
|
@@ -1329,52 +1330,52 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1329
1330
|
Accept: "application/json,text/javascript,*/*"
|
|
1330
1331
|
},
|
|
1331
1332
|
onComplete(l) {
|
|
1332
|
-
|
|
1333
|
+
s && s(l);
|
|
1333
1334
|
},
|
|
1334
1335
|
onFailure(l, p) {
|
|
1335
1336
|
const u = l;
|
|
1336
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1337
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
|
|
1337
1338
|
}
|
|
1338
1339
|
});
|
|
1339
1340
|
}
|
|
1340
|
-
function Je(e, t = "",
|
|
1341
|
+
function Je(e, t = "", s = void 0, n = void 0) {
|
|
1341
1342
|
const { space: o } = e;
|
|
1342
1343
|
if (t === "")
|
|
1343
1344
|
return;
|
|
1344
|
-
const
|
|
1345
|
+
const c = {
|
|
1345
1346
|
uri: "/resources/v1/modeler/documents"
|
|
1346
|
-
},
|
|
1347
|
+
}, r = {
|
|
1347
1348
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1348
1349
|
Accept: "application/json,text/javascript,*/*"
|
|
1349
|
-
}, a = `${o}${
|
|
1350
|
+
}, a = `${o}${c.uri}`, i = `$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}`;
|
|
1350
1351
|
f(a, {
|
|
1351
1352
|
method: "POST",
|
|
1352
|
-
headers:
|
|
1353
|
-
data:
|
|
1353
|
+
headers: r,
|
|
1354
|
+
data: i,
|
|
1354
1355
|
onComplete(d) {
|
|
1355
|
-
|
|
1356
|
+
s && s(JSON.parse(d));
|
|
1356
1357
|
},
|
|
1357
1358
|
onFailure(d, l) {
|
|
1358
1359
|
const p = d;
|
|
1359
|
-
p.msg = l.error,
|
|
1360
|
+
p.msg = l.error, n && n(p);
|
|
1360
1361
|
}
|
|
1361
1362
|
});
|
|
1362
1363
|
}
|
|
1363
|
-
async function w(e, t = void 0,
|
|
1364
|
-
const
|
|
1365
|
-
return f(
|
|
1366
|
-
onComplete(o,
|
|
1364
|
+
async function w(e, t = void 0, s = void 0) {
|
|
1365
|
+
const n = e.space + "/api/index/tk";
|
|
1366
|
+
return f(n, {
|
|
1367
|
+
onComplete(o, c, r) {
|
|
1367
1368
|
const a = JSON.parse(o);
|
|
1368
1369
|
if (t)
|
|
1369
1370
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1370
1371
|
},
|
|
1371
1372
|
onFailure(o) {
|
|
1372
|
-
|
|
1373
|
+
s && s(o);
|
|
1373
1374
|
}
|
|
1374
1375
|
});
|
|
1375
1376
|
}
|
|
1376
|
-
function Ge(e, t = void 0,
|
|
1377
|
-
const
|
|
1377
|
+
function Ge(e, t = void 0, s = void 0) {
|
|
1378
|
+
const n = `${e.space}/api/exalead/whatsnew`, o = {
|
|
1378
1379
|
params: {
|
|
1379
1380
|
community_id: null,
|
|
1380
1381
|
hash_key: null,
|
|
@@ -1384,27 +1385,27 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1384
1385
|
start: 0
|
|
1385
1386
|
}
|
|
1386
1387
|
};
|
|
1387
|
-
w(e, (
|
|
1388
|
-
f(
|
|
1388
|
+
w(e, (c) => {
|
|
1389
|
+
f(n, {
|
|
1389
1390
|
method: "POST",
|
|
1390
1391
|
headers: {
|
|
1391
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1392
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1392
1393
|
"Content-type": "application/json;charset=UTF-8",
|
|
1393
1394
|
Accept: "application/json"
|
|
1394
1395
|
},
|
|
1395
1396
|
data: JSON.stringify(o),
|
|
1396
1397
|
type: "json",
|
|
1397
|
-
onComplete(
|
|
1398
|
-
t && t(
|
|
1398
|
+
onComplete(r, a) {
|
|
1399
|
+
t && t(r, a);
|
|
1399
1400
|
},
|
|
1400
|
-
onFailure(
|
|
1401
|
-
|
|
1401
|
+
onFailure(r, a) {
|
|
1402
|
+
s && s(r, a);
|
|
1402
1403
|
}
|
|
1403
1404
|
});
|
|
1404
1405
|
});
|
|
1405
1406
|
}
|
|
1406
|
-
function Ke(e, t = void 0,
|
|
1407
|
-
const
|
|
1407
|
+
function Ke(e, t = void 0, s = void 0) {
|
|
1408
|
+
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
|
|
1408
1409
|
params: {
|
|
1409
1410
|
idsToFilterArr: [],
|
|
1410
1411
|
mode: "offline",
|
|
@@ -1413,40 +1414,40 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1413
1414
|
maxNbOfCommonElements: "5"
|
|
1414
1415
|
}
|
|
1415
1416
|
};
|
|
1416
|
-
w(e, (
|
|
1417
|
-
f(
|
|
1417
|
+
w(e, (c) => {
|
|
1418
|
+
f(n, {
|
|
1418
1419
|
method: "POST",
|
|
1419
1420
|
headers: {
|
|
1420
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1421
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1421
1422
|
"Content-type": "application/json;charset=UTF-8",
|
|
1422
1423
|
Accept: "application/json"
|
|
1423
1424
|
},
|
|
1424
1425
|
data: JSON.stringify(o),
|
|
1425
1426
|
type: "json",
|
|
1426
|
-
onComplete(
|
|
1427
|
-
const
|
|
1428
|
-
t && t(
|
|
1427
|
+
onComplete(r, a) {
|
|
1428
|
+
const i = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1429
|
+
t && t(i, r);
|
|
1429
1430
|
},
|
|
1430
|
-
onFailure(
|
|
1431
|
-
|
|
1431
|
+
onFailure(r, a) {
|
|
1432
|
+
s && s(r, a);
|
|
1432
1433
|
}
|
|
1433
1434
|
});
|
|
1434
1435
|
});
|
|
1435
1436
|
}
|
|
1436
|
-
function We(e, t = void 0,
|
|
1437
|
-
const
|
|
1437
|
+
function We(e, t = void 0, s = void 0) {
|
|
1438
|
+
const n = {
|
|
1438
1439
|
base: e.space,
|
|
1439
1440
|
uri: "/api/community/listmycommunities",
|
|
1440
1441
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1441
1442
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1442
|
-
}, o = `${
|
|
1443
|
-
w(e, (
|
|
1443
|
+
}, o = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
|
|
1444
|
+
w(e, (r) => {
|
|
1444
1445
|
f(o, {
|
|
1445
1446
|
method: "GET",
|
|
1446
1447
|
headers: {
|
|
1447
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1448
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1448
1449
|
},
|
|
1449
|
-
onComplete(a,
|
|
1450
|
+
onComplete(a, i, d) {
|
|
1450
1451
|
const p = JSON.parse(a).result;
|
|
1451
1452
|
let u = 0;
|
|
1452
1453
|
p.forEach((m) => {
|
|
@@ -1462,76 +1463,76 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1462
1463
|
e,
|
|
1463
1464
|
m.id,
|
|
1464
1465
|
(h) => {
|
|
1465
|
-
u++, g.members = h,
|
|
1466
|
+
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1466
1467
|
},
|
|
1467
|
-
(h) =>
|
|
1468
|
+
(h) => s(h)
|
|
1468
1469
|
);
|
|
1469
1470
|
});
|
|
1470
1471
|
},
|
|
1471
|
-
onFailure(a,
|
|
1472
|
+
onFailure(a, i) {
|
|
1472
1473
|
const d = a;
|
|
1473
|
-
d.status =
|
|
1474
|
+
d.status = i.status, d.response = i.errormsg, s && s(d);
|
|
1474
1475
|
}
|
|
1475
1476
|
});
|
|
1476
1477
|
});
|
|
1477
1478
|
}
|
|
1478
|
-
function Q(e, t,
|
|
1479
|
-
const o = `${e.space}/api/community/listmembers`,
|
|
1479
|
+
function Q(e, t, s, n) {
|
|
1480
|
+
const o = `${e.space}/api/community/listmembers`, c = {
|
|
1480
1481
|
params: {
|
|
1481
1482
|
page: e.page ? e.page : 1,
|
|
1482
1483
|
limit: e.limit ? e.limit : 50,
|
|
1483
1484
|
community_id: t
|
|
1484
1485
|
}
|
|
1485
1486
|
};
|
|
1486
|
-
w(e, (
|
|
1487
|
+
w(e, (r) => {
|
|
1487
1488
|
f(o, {
|
|
1488
1489
|
method: "POST",
|
|
1489
1490
|
headers: {
|
|
1490
1491
|
"Content-type": "application/json;charset=UTF-8",
|
|
1491
1492
|
Accept: "application/json",
|
|
1492
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1493
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1493
1494
|
},
|
|
1494
|
-
data: JSON.stringify(
|
|
1495
|
+
data: JSON.stringify(c),
|
|
1495
1496
|
type: "json",
|
|
1496
|
-
onComplete(a,
|
|
1497
|
-
|
|
1497
|
+
onComplete(a, i, d) {
|
|
1498
|
+
s && s(a);
|
|
1498
1499
|
},
|
|
1499
|
-
onFailure(a,
|
|
1500
|
+
onFailure(a, i) {
|
|
1500
1501
|
const d = a;
|
|
1501
|
-
d.status =
|
|
1502
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1502
1503
|
}
|
|
1503
1504
|
});
|
|
1504
1505
|
});
|
|
1505
1506
|
}
|
|
1506
|
-
function Xe(e, t = void 0,
|
|
1507
|
-
const
|
|
1508
|
-
e.commu_id || (e.commu_id =
|
|
1507
|
+
function Xe(e, t = void 0, s = void 0) {
|
|
1508
|
+
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1509
|
+
e.commu_id || (e.commu_id = n);
|
|
1509
1510
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1510
|
-
w(e, (
|
|
1511
|
+
w(e, (c) => {
|
|
1511
1512
|
f(o, {
|
|
1512
1513
|
method: "GET",
|
|
1513
1514
|
headers: {
|
|
1514
1515
|
"Content-type": "application/json;charset=UTF-8",
|
|
1515
1516
|
Accept: "application/json",
|
|
1516
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1517
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1517
1518
|
},
|
|
1518
|
-
onComplete(
|
|
1519
|
-
const a = JSON.parse(
|
|
1519
|
+
onComplete(r) {
|
|
1520
|
+
const a = JSON.parse(r);
|
|
1520
1521
|
t && t(a);
|
|
1521
1522
|
},
|
|
1522
|
-
onFailure(
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1523
|
+
onFailure(r, a) {
|
|
1524
|
+
const i = r;
|
|
1525
|
+
i.status = a.status, i.response = a.errormsg, s && s(i);
|
|
1525
1526
|
}
|
|
1526
1527
|
});
|
|
1527
1528
|
});
|
|
1528
1529
|
}
|
|
1529
|
-
function Ve(e, t,
|
|
1530
|
-
const { listAllContacts: o, currentUser:
|
|
1530
|
+
function Ve(e, t, s = void 0, n = void 0) {
|
|
1531
|
+
const { listAllContacts: o, currentUser: c } = e;
|
|
1531
1532
|
console.log("__listAllContacts", o.hits);
|
|
1532
|
-
const
|
|
1533
|
-
users: [
|
|
1534
|
-
},
|
|
1533
|
+
const r = `${e.space}/api/directmessages`, a = {
|
|
1534
|
+
users: [c.login].concat(t.receipt)
|
|
1535
|
+
}, i = {
|
|
1535
1536
|
id_msg: "",
|
|
1536
1537
|
senderId: e.currentUser.login,
|
|
1537
1538
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1541,14 +1542,14 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1541
1542
|
Z(
|
|
1542
1543
|
a.users,
|
|
1543
1544
|
(l) => {
|
|
1544
|
-
l !== void 0 && (
|
|
1545
|
+
l !== void 0 && (i.id_msg = l.id, d = !0, j(e, i));
|
|
1545
1546
|
},
|
|
1546
1547
|
(l) => {
|
|
1547
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1548
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
|
|
1548
1549
|
}
|
|
1549
1550
|
), d === !1 && setTimeout(() => {
|
|
1550
1551
|
d === !1 && w(e, (l) => {
|
|
1551
|
-
f(
|
|
1552
|
+
f(r, {
|
|
1552
1553
|
method: "POST",
|
|
1553
1554
|
headers: {
|
|
1554
1555
|
"Content-Type": "application/json",
|
|
@@ -1559,52 +1560,52 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1559
1560
|
type: "json",
|
|
1560
1561
|
onComplete(p, u, m) {
|
|
1561
1562
|
const g = p;
|
|
1562
|
-
g.reponse = JSON.parse(m.response), g.status = m.status,
|
|
1563
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), i.id_msg = g.result.id, j(e, i);
|
|
1563
1564
|
},
|
|
1564
1565
|
onFailure(p, u, m) {
|
|
1565
1566
|
const g = p;
|
|
1566
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1567
|
+
g.msg = u.errormsg, g.status = u.status, n && n(g);
|
|
1567
1568
|
}
|
|
1568
1569
|
});
|
|
1569
1570
|
});
|
|
1570
1571
|
}, 500);
|
|
1571
1572
|
}
|
|
1572
|
-
function Z(e, t,
|
|
1573
|
+
function Z(e, t, s, n) {
|
|
1573
1574
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1574
|
-
w(e, (
|
|
1575
|
+
w(e, (c) => {
|
|
1575
1576
|
f(o, {
|
|
1576
1577
|
method: "GET",
|
|
1577
1578
|
headers: {
|
|
1578
1579
|
Accept: "application/json,text/javascript,*/*",
|
|
1579
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1580
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1580
1581
|
},
|
|
1581
|
-
onComplete(
|
|
1582
|
-
const a = JSON.parse(
|
|
1582
|
+
onComplete(r) {
|
|
1583
|
+
const a = JSON.parse(r), i = [];
|
|
1583
1584
|
a.result.forEach((p) => {
|
|
1584
|
-
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length &&
|
|
1585
|
+
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && i.push(p);
|
|
1585
1586
|
});
|
|
1586
|
-
const d = t.sort(), l =
|
|
1587
|
+
const d = t.sort(), l = i.find((p) => {
|
|
1587
1588
|
const u = [];
|
|
1588
1589
|
return p.users.forEach((m) => {
|
|
1589
1590
|
u.push(m.login);
|
|
1590
1591
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1591
1592
|
});
|
|
1592
|
-
|
|
1593
|
+
s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
|
|
1593
1594
|
},
|
|
1594
|
-
onFailure(
|
|
1595
|
-
const a =
|
|
1596
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1595
|
+
onFailure(r) {
|
|
1596
|
+
const a = r;
|
|
1597
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
|
|
1597
1598
|
}
|
|
1598
1599
|
});
|
|
1599
1600
|
});
|
|
1600
1601
|
}
|
|
1601
|
-
function j(e, t,
|
|
1602
|
+
function j(e, t, s = void 0, n = void 0) {
|
|
1602
1603
|
const o = {
|
|
1603
1604
|
base: e.space,
|
|
1604
1605
|
uri: "/api/community",
|
|
1605
1606
|
id_msg: `${t.id_msg}`,
|
|
1606
1607
|
endUri: "/instantmessages"
|
|
1607
|
-
},
|
|
1608
|
+
}, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
|
|
1608
1609
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1609
1610
|
accessState: null,
|
|
1610
1611
|
commentUri: null,
|
|
@@ -1614,33 +1615,33 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1614
1615
|
parentCommentUri: null,
|
|
1615
1616
|
richMessage: t.msg
|
|
1616
1617
|
};
|
|
1617
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1618
|
-
f(
|
|
1618
|
+
console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
|
|
1619
|
+
f(c, {
|
|
1619
1620
|
method: "POST",
|
|
1620
1621
|
headers: {
|
|
1621
1622
|
"Content-Type": "application/json",
|
|
1622
1623
|
Accept: "application/json",
|
|
1623
1624
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1624
1625
|
},
|
|
1625
|
-
data: JSON.stringify(
|
|
1626
|
+
data: JSON.stringify(r),
|
|
1626
1627
|
type: "json",
|
|
1627
|
-
onComplete(
|
|
1628
|
-
const p =
|
|
1629
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1628
|
+
onComplete(i, d, l) {
|
|
1629
|
+
const p = i;
|
|
1630
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1630
1631
|
},
|
|
1631
|
-
onFailure(
|
|
1632
|
-
const l =
|
|
1633
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1632
|
+
onFailure(i, d) {
|
|
1633
|
+
const l = i;
|
|
1634
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1634
1635
|
}
|
|
1635
1636
|
});
|
|
1636
1637
|
});
|
|
1637
1638
|
}
|
|
1638
1639
|
function ee(e) {
|
|
1639
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1640
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1640
1641
|
return `<p>${e} </p>
|
|
1641
1642
|
<br/>
|
|
1642
1643
|
<hr/>
|
|
1643
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1644
|
+
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
|
|
1644
1645
|
}
|
|
1645
1646
|
const te = {
|
|
1646
1647
|
title: "TEST DEV COMMUNITY IDEA",
|
|
@@ -1652,16 +1653,16 @@ const te = {
|
|
|
1652
1653
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1653
1654
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1654
1655
|
};
|
|
1655
|
-
function Be(e, t,
|
|
1656
|
-
const o = `${e.space}/api/idea/add`,
|
|
1657
|
-
(
|
|
1658
|
-
),
|
|
1659
|
-
(
|
|
1656
|
+
function Be(e, t, s = void 0, n = void 0) {
|
|
1657
|
+
const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1658
|
+
(i) => i.id === t.community_id
|
|
1659
|
+
), r = e.swymCommunities.find(
|
|
1660
|
+
(i) => i.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1660
1661
|
), a = {
|
|
1661
1662
|
params: {
|
|
1662
1663
|
title: t.title,
|
|
1663
1664
|
// String, le nom de l'affaire
|
|
1664
|
-
community_id:
|
|
1665
|
+
community_id: c?.id !== void 0 ? c.id : r.id,
|
|
1665
1666
|
// String, l'id de la communauté
|
|
1666
1667
|
message: ne(t.text_html),
|
|
1667
1668
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1669,11 +1670,11 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1669
1670
|
// 1 publier, 0 non publier
|
|
1670
1671
|
}
|
|
1671
1672
|
};
|
|
1672
|
-
w(e, (
|
|
1673
|
+
w(e, (i) => {
|
|
1673
1674
|
const d = {
|
|
1674
1675
|
"Content-type": "application/json;charset=UTF-8",
|
|
1675
1676
|
Accept: "application/json",
|
|
1676
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1677
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1677
1678
|
};
|
|
1678
1679
|
f(o, {
|
|
1679
1680
|
method: "POST",
|
|
@@ -1682,90 +1683,90 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1682
1683
|
type: "json",
|
|
1683
1684
|
onComplete(l, p, u) {
|
|
1684
1685
|
const m = JSON.parse(l);
|
|
1685
|
-
m.status = u.status, m.response = u.response,
|
|
1686
|
+
m.status = u.status, m.response = u.response, s && s(m);
|
|
1686
1687
|
},
|
|
1687
1688
|
onFailure(l, p, u) {
|
|
1688
1689
|
const m = l;
|
|
1689
|
-
m.status = p.status, m.response = p.errormsg,
|
|
1690
|
+
m.status = p.status, m.response = p.errormsg, n && n(m);
|
|
1690
1691
|
}
|
|
1691
1692
|
});
|
|
1692
1693
|
});
|
|
1693
1694
|
}
|
|
1694
|
-
function Ye(e, t,
|
|
1695
|
-
const o = `${e.space}/api/idea/delete`,
|
|
1695
|
+
function Ye(e, t, s = void 0, n = void 0) {
|
|
1696
|
+
const o = `${e.space}/api/idea/delete`, c = {
|
|
1696
1697
|
params: {
|
|
1697
1698
|
community_id: t.community_id,
|
|
1698
1699
|
ideationIds: [t.idee_id]
|
|
1699
1700
|
}
|
|
1700
1701
|
};
|
|
1701
|
-
w(e, (
|
|
1702
|
+
w(e, (r) => {
|
|
1702
1703
|
f(o, {
|
|
1703
1704
|
method: "POST",
|
|
1704
1705
|
headers: {
|
|
1705
1706
|
"Content-type": "application/json;charset=UTF-8",
|
|
1706
1707
|
Accept: "application/json",
|
|
1707
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1708
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1708
1709
|
},
|
|
1709
|
-
data: JSON.stringify(
|
|
1710
|
+
data: JSON.stringify(c),
|
|
1710
1711
|
type: "json",
|
|
1711
|
-
onComplete(a,
|
|
1712
|
-
|
|
1712
|
+
onComplete(a, i, d) {
|
|
1713
|
+
s && s(a);
|
|
1713
1714
|
},
|
|
1714
|
-
onFailure(a,
|
|
1715
|
+
onFailure(a, i, d) {
|
|
1715
1716
|
const l = a;
|
|
1716
|
-
l.status =
|
|
1717
|
+
l.status = i.status, l.response = i.errormsg, n && n(l);
|
|
1717
1718
|
}
|
|
1718
1719
|
});
|
|
1719
1720
|
});
|
|
1720
1721
|
}
|
|
1721
|
-
function He(e, t = "",
|
|
1722
|
+
function He(e, t = "", s = void 0, n = void 0) {
|
|
1722
1723
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1723
1724
|
t === "" && (t = o);
|
|
1724
|
-
const
|
|
1725
|
+
const c = `${e.space}/api/idea/get`, r = {
|
|
1725
1726
|
params: {
|
|
1726
1727
|
id: t
|
|
1727
1728
|
}
|
|
1728
1729
|
};
|
|
1729
1730
|
w(e, (a) => {
|
|
1730
|
-
f(
|
|
1731
|
+
f(c, {
|
|
1731
1732
|
method: "POST",
|
|
1732
1733
|
headers: {
|
|
1733
1734
|
"Content-type": "application/json;charset=UTF-8",
|
|
1734
1735
|
Accept: "application/json",
|
|
1735
1736
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1736
1737
|
},
|
|
1737
|
-
data: JSON.stringify(
|
|
1738
|
+
data: JSON.stringify(r),
|
|
1738
1739
|
type: "json",
|
|
1739
|
-
onComplete(
|
|
1740
|
-
const d =
|
|
1741
|
-
d.msg = d.result.message,
|
|
1740
|
+
onComplete(i) {
|
|
1741
|
+
const d = i;
|
|
1742
|
+
d.msg = d.result.message, s && s(d);
|
|
1742
1743
|
},
|
|
1743
|
-
onFailure(
|
|
1744
|
-
const d =
|
|
1745
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1744
|
+
onFailure(i) {
|
|
1745
|
+
const d = i;
|
|
1746
|
+
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1746
1747
|
}
|
|
1747
1748
|
});
|
|
1748
1749
|
});
|
|
1749
1750
|
}
|
|
1750
|
-
function ze(e, t = te,
|
|
1751
|
+
function ze(e, t = te, s = void 0, n = void 0) {
|
|
1751
1752
|
const o = {
|
|
1752
1753
|
uri: "/api/idea/list",
|
|
1753
1754
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1754
1755
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1755
|
-
},
|
|
1756
|
-
w(e, (
|
|
1757
|
-
f(
|
|
1756
|
+
}, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1757
|
+
w(e, (r) => {
|
|
1758
|
+
f(c, {
|
|
1758
1759
|
method: "GET",
|
|
1759
1760
|
headers: {
|
|
1760
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1761
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1761
1762
|
},
|
|
1762
1763
|
onComplete(a) {
|
|
1763
|
-
const
|
|
1764
|
-
|
|
1764
|
+
const i = JSON.parse(a);
|
|
1765
|
+
s && s(i);
|
|
1765
1766
|
},
|
|
1766
|
-
onFailure(a,
|
|
1767
|
+
onFailure(a, i) {
|
|
1767
1768
|
const d = a;
|
|
1768
|
-
d.status =
|
|
1769
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1769
1770
|
}
|
|
1770
1771
|
});
|
|
1771
1772
|
});
|
|
@@ -1845,43 +1846,43 @@ function ne(e) {
|
|
|
1845
1846
|
<p>
|
|
1846
1847
|
</p>` : e;
|
|
1847
1848
|
}
|
|
1848
|
-
function qe(e, t = void 0,
|
|
1849
|
-
const
|
|
1849
|
+
function qe(e, t = void 0, s = void 0) {
|
|
1850
|
+
const n = e.space + "/api/user/getcurrent/";
|
|
1850
1851
|
w(e, (o) => {
|
|
1851
|
-
f(
|
|
1852
|
+
f(n, {
|
|
1852
1853
|
method: "GET",
|
|
1853
1854
|
headers: {
|
|
1854
1855
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1855
1856
|
},
|
|
1856
|
-
onComplete(
|
|
1857
|
-
const
|
|
1858
|
-
t && t(
|
|
1857
|
+
onComplete(c, r, a) {
|
|
1858
|
+
const i = JSON.parse(c);
|
|
1859
|
+
t && t(i.result);
|
|
1859
1860
|
},
|
|
1860
|
-
onFailure(
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1861
|
+
onFailure(c, r, a) {
|
|
1862
|
+
const i = { erreur: JSON.parse(c), headers: r, xhr: a };
|
|
1863
|
+
s && s(i);
|
|
1863
1864
|
}
|
|
1864
1865
|
});
|
|
1865
1866
|
});
|
|
1866
1867
|
}
|
|
1867
|
-
function Qe(e, t,
|
|
1868
|
+
function Qe(e, t, s = void 0, n = void 0) {
|
|
1868
1869
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1869
1870
|
w(
|
|
1870
1871
|
e,
|
|
1871
|
-
(
|
|
1872
|
+
(c) => {
|
|
1872
1873
|
f(o, {
|
|
1873
1874
|
method: "GET",
|
|
1874
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1875
|
-
onComplete(
|
|
1876
|
-
const d = JSON.parse(
|
|
1877
|
-
|
|
1875
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1876
|
+
onComplete(r, a, i) {
|
|
1877
|
+
const d = JSON.parse(r);
|
|
1878
|
+
s && s(d);
|
|
1878
1879
|
},
|
|
1879
|
-
onFailure(
|
|
1880
|
-
|
|
1880
|
+
onFailure(r) {
|
|
1881
|
+
n && n(r);
|
|
1881
1882
|
}
|
|
1882
1883
|
});
|
|
1883
1884
|
},
|
|
1884
|
-
|
|
1885
|
+
n
|
|
1885
1886
|
);
|
|
1886
1887
|
}
|
|
1887
1888
|
function Ze(e) {
|
|
@@ -1943,13 +1944,13 @@ export {
|
|
|
1943
1944
|
ye as getComplementUG,
|
|
1944
1945
|
Re as getDataFrom3DSpace,
|
|
1945
1946
|
ce as getDataFromGouvFr,
|
|
1946
|
-
|
|
1947
|
+
xe as getDatasByTenant,
|
|
1947
1948
|
Me as getDatasFrom3DSpace,
|
|
1948
1949
|
Ie as getDownloadDocument,
|
|
1949
1950
|
Je as getInfoDocTags,
|
|
1950
1951
|
we as getUserGroupsList,
|
|
1951
1952
|
E as getUsersGroupRules,
|
|
1952
|
-
|
|
1953
|
+
Pe as get_3DSpace_csrf,
|
|
1953
1954
|
Ce as patchUserGroups,
|
|
1954
1955
|
Oe as patchUserGroupsControl,
|
|
1955
1956
|
ve as pushDataIn3DSpace,
|