@beam3_dev/api_module 0.0.78 → 0.0.79
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 +518 -497
- 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 +3 -3
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
|
-
c(
|
|
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 m(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
|
-
(
|
|
134
|
+
(n) => {
|
|
135
135
|
(!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
136
|
-
|
|
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
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
|
m(o, {
|
|
167
167
|
method: "GET",
|
|
168
168
|
headers: {
|
|
169
169
|
"Content-Type": "application/json",
|
|
170
170
|
Accept: "application/json"
|
|
171
171
|
},
|
|
172
|
-
onComplete(c,
|
|
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(c,
|
|
179
|
+
onFailure(c, r) {
|
|
180
180
|
const a = c;
|
|
181
|
-
a.msg =
|
|
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
|
-
m(
|
|
188
|
-
onComplete(o, c,
|
|
185
|
+
function he(e, t = void 0, s = void 0) {
|
|
186
|
+
let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
|
+
m(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
192
|
onFailure(o, c) {
|
|
193
|
-
const
|
|
194
|
-
|
|
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
|
m(o, {
|
|
201
|
-
onComplete(c,
|
|
202
|
-
const
|
|
203
|
-
|
|
201
|
+
onComplete(c, r, a) {
|
|
202
|
+
const i = JSON.parse(c);
|
|
203
|
+
s && s(i);
|
|
204
204
|
},
|
|
205
|
-
onFailure(c,
|
|
205
|
+
onFailure(c, r) {
|
|
206
206
|
const a = c;
|
|
207
|
-
a.msg =
|
|
207
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -212,10 +212,10 @@ const F = {
|
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
|
-
function _e(e, t,
|
|
215
|
+
function _e(e, t, s = void 0, n = void 0) {
|
|
216
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,
|
|
@@ -230,19 +230,19 @@ function _e(e, t, n = void 0, s = void 0) {
|
|
|
230
230
|
m(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: c } = e,
|
|
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
|
m(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, f) {
|
|
258
258
|
const g = u;
|
|
259
|
-
g.msg = f.errormsg, g.errCode = f.errorcode,
|
|
259
|
+
g.msg = f.errormsg, g.errCode = f.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 = `${c}${
|
|
267
|
+
}, d = `${c}${r}${a}`;
|
|
268
268
|
m(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
|
m(o, {
|
|
313
313
|
method: "DELETE"
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function Ce(e, t,
|
|
317
|
-
const { space: c, tenant:
|
|
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
|
m(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,
|
|
339
|
+
function Oe(e, t, s, n = void 0, o = void 0) {
|
|
340
340
|
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
m(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
|
-
m(
|
|
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
|
+
m(r, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
359
359
|
headers: {
|
|
@@ -362,27 +362,27 @@ 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
|
-
m(
|
|
374
|
+
const n = `${e.space}/resources/v1/application/CSRF`;
|
|
375
|
+
m(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, c,
|
|
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");
|
|
@@ -390,63 +390,63 @@ async function G(e, t = void 0, n = void 0, s = void 0) {
|
|
|
390
390
|
}
|
|
391
391
|
const c = o + `/resources/v1/modeler/documents/${t}`;
|
|
392
392
|
m(c, {
|
|
393
|
-
onComplete(
|
|
394
|
-
const d = JSON.parse(
|
|
395
|
-
|
|
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
|
-
m(
|
|
406
|
-
onComplete(o, c,
|
|
404
|
+
let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
|
+
m(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
|
-
m(
|
|
429
|
-
onComplete(o, c,
|
|
427
|
+
const n = e.space + "/resources/v1/application/CSRF";
|
|
428
|
+
m(n, {
|
|
429
|
+
onComplete(o, c, r) {
|
|
430
430
|
const a = JSON.parse(o);
|
|
431
431
|
t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(o, c,
|
|
434
|
-
|
|
433
|
+
onFailure(o, c, r) {
|
|
434
|
+
s && s({
|
|
435
435
|
response: o,
|
|
436
436
|
headers: c,
|
|
437
|
-
xhr:
|
|
437
|
+
xhr: r
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
441
|
} else
|
|
442
|
-
|
|
442
|
+
s && s("ERROR : url du 3DSpace non défini.");
|
|
443
443
|
}
|
|
444
|
-
function U(e, t = void 0,
|
|
445
|
-
let
|
|
444
|
+
function U(e, t = void 0, s = void 0) {
|
|
445
|
+
let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
446
446
|
k(
|
|
447
447
|
e,
|
|
448
448
|
(o) => {
|
|
449
|
-
m(
|
|
449
|
+
m(n, {
|
|
450
450
|
method: "PUT",
|
|
451
451
|
headers: {
|
|
452
452
|
ENO_CSRF_TOKEN: e.token
|
|
@@ -455,39 +455,39 @@ function U(e, t = void 0, n = void 0) {
|
|
|
455
455
|
const a = JSON.parse(c).data[0].dataelements.ticketURL;
|
|
456
456
|
t && t(a);
|
|
457
457
|
},
|
|
458
|
-
onFailure(c,
|
|
459
|
-
console.warn("☠️ error => ", c,
|
|
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,
|
|
468
|
+
function Ne(e, t, s, n = void 0, o = void 0) {
|
|
469
469
|
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
|
-
|
|
470
|
+
s || (s = e.token), m(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,26 +495,26 @@ function K(e, t, n, s, o, c = 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
502
|
c,
|
|
503
|
-
|
|
503
|
+
r
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function W(e, t,
|
|
509
|
-
const
|
|
510
|
-
m(
|
|
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
|
+
m(i, {
|
|
511
511
|
method: "PUT",
|
|
512
512
|
headers: {
|
|
513
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", n, o);
|
|
518
518
|
const g = {};
|
|
519
519
|
g.method = "POST", g.data = f, g.onComplete = function(h) {
|
|
520
520
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -523,24 +523,28 @@ function W(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
523
523
|
ENO_CSRF_TOKEN: c
|
|
524
524
|
},
|
|
525
525
|
data: JSON.stringify({
|
|
526
|
-
data: [
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
526
|
+
data: [
|
|
527
|
+
{
|
|
528
|
+
id: t,
|
|
529
|
+
relateddata: {
|
|
530
|
+
files: [
|
|
531
|
+
{
|
|
532
|
+
id: s,
|
|
533
|
+
dataelements: {
|
|
534
|
+
title: o,
|
|
535
|
+
receipt: h
|
|
536
|
+
},
|
|
537
|
+
updateAction: "REVISE"
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
tempId: S
|
|
542
|
+
}
|
|
543
|
+
]
|
|
540
544
|
}),
|
|
541
545
|
type: "json",
|
|
542
546
|
onComplete(y) {
|
|
543
|
-
|
|
547
|
+
r && r(y);
|
|
544
548
|
},
|
|
545
549
|
onFailure(y) {
|
|
546
550
|
a && a(y);
|
|
@@ -556,14 +560,14 @@ function W(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
556
560
|
}
|
|
557
561
|
});
|
|
558
562
|
}
|
|
559
|
-
async function ke(e, t,
|
|
560
|
-
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)], {
|
|
561
565
|
type: "text/plain"
|
|
562
566
|
}), p = {
|
|
563
|
-
url_Ticket: `${
|
|
564
|
-
url_Post: `${
|
|
567
|
+
url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
568
|
+
url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
|
|
565
569
|
};
|
|
566
|
-
if (!
|
|
570
|
+
if (!r && r !== "") {
|
|
567
571
|
console.log("le store._3DSpace est vide");
|
|
568
572
|
return;
|
|
569
573
|
}
|
|
@@ -574,12 +578,12 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
574
578
|
},
|
|
575
579
|
onComplete(u, f, g) {
|
|
576
580
|
const h = JSON.parse(u).data[0].dataelements;
|
|
577
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
581
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
|
|
578
582
|
const S = {
|
|
579
583
|
method: "POST",
|
|
580
584
|
data: d,
|
|
581
585
|
onComplete(T) {
|
|
582
|
-
if (
|
|
586
|
+
if (i !== "" && a !== "") {
|
|
583
587
|
const D = {
|
|
584
588
|
method: "POST",
|
|
585
589
|
headers: {
|
|
@@ -588,30 +592,34 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
588
592
|
"Content-Type": "application/json"
|
|
589
593
|
},
|
|
590
594
|
data: JSON.stringify({
|
|
591
|
-
data: [
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
595
|
+
data: [
|
|
596
|
+
{
|
|
597
|
+
type: "Document",
|
|
598
|
+
dataelements: {
|
|
599
|
+
title: `Title_${s.toLowerCase().split(" ").join("_")}`,
|
|
600
|
+
policy: "Document Release",
|
|
601
|
+
description: n
|
|
602
|
+
},
|
|
603
|
+
relateddata: {
|
|
604
|
+
files: [
|
|
605
|
+
{
|
|
606
|
+
dataelements: {
|
|
607
|
+
title: `${s}.json`,
|
|
608
|
+
receipt: T
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
]
|
|
612
|
+
},
|
|
613
|
+
tempId: I()
|
|
614
|
+
}
|
|
615
|
+
]
|
|
608
616
|
}),
|
|
609
617
|
type: "json",
|
|
610
618
|
timeout: 0,
|
|
611
619
|
onComplete: _,
|
|
612
620
|
onFailure: y
|
|
613
621
|
};
|
|
614
|
-
|
|
622
|
+
i !== "" && m(p.url_Post, D);
|
|
615
623
|
} else
|
|
616
624
|
console.warn("le store est vide");
|
|
617
625
|
},
|
|
@@ -628,12 +636,12 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
628
636
|
}
|
|
629
637
|
});
|
|
630
638
|
}
|
|
631
|
-
function b(e, t = void 0,
|
|
639
|
+
function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0, r = !1) {
|
|
632
640
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
633
641
|
m(a, {
|
|
634
642
|
method: "GET",
|
|
635
|
-
onComplete(
|
|
636
|
-
const d = JSON.parse(
|
|
643
|
+
onComplete(i) {
|
|
644
|
+
const d = JSON.parse(i);
|
|
637
645
|
let l = "", p, u, f;
|
|
638
646
|
if (t) {
|
|
639
647
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -644,10 +652,10 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
|
|
|
644
652
|
(S, _, y) => _ === y.findIndex(
|
|
645
653
|
(T) => T.organization.pid === S.organization.pid && T.role.pid === S.role.pid
|
|
646
654
|
)
|
|
647
|
-
),
|
|
655
|
+
), s && (Array.isArray(s) ? s.forEach((S) => {
|
|
648
656
|
f || h.forEach((_) => {
|
|
649
|
-
if (S === _.role.name &&
|
|
650
|
-
f = S, u =
|
|
657
|
+
if (S === _.role.name && n === _.organization.title)
|
|
658
|
+
f = S, u = n;
|
|
651
659
|
else if (S === _.role.name) {
|
|
652
660
|
let y = h.filter(
|
|
653
661
|
(T) => T.role.name === S
|
|
@@ -656,104 +664,107 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
|
|
|
656
664
|
}
|
|
657
665
|
});
|
|
658
666
|
}) : h.forEach((S) => {
|
|
659
|
-
if (
|
|
660
|
-
f =
|
|
661
|
-
else if (
|
|
667
|
+
if (s === S.role.name && n === S.organization.title)
|
|
668
|
+
f = s, u = n;
|
|
669
|
+
else if (s === S.role.name) {
|
|
662
670
|
let _ = h.filter(
|
|
663
|
-
(y) => y.role.name ===
|
|
671
|
+
(y) => y.role.name === s
|
|
664
672
|
);
|
|
665
673
|
_.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
|
|
666
674
|
}
|
|
667
675
|
}));
|
|
668
676
|
}
|
|
669
677
|
}
|
|
670
|
-
p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials &&
|
|
678
|
+
p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && r ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
|
|
671
679
|
},
|
|
672
|
-
onFailure(
|
|
673
|
-
console.log("Erreur de récupération du contexte de sécurité. => ",
|
|
680
|
+
onFailure(i, d) {
|
|
681
|
+
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
682
|
+
err: i,
|
|
683
|
+
headers: d
|
|
684
|
+
});
|
|
674
685
|
}
|
|
675
686
|
});
|
|
676
687
|
}
|
|
677
|
-
async function R(e, t = void 0,
|
|
688
|
+
async function R(e, t = void 0, s = void 0) {
|
|
678
689
|
return (!e.objID || e.objID === "") && console.warn(
|
|
679
690
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
680
691
|
), (e.space === "" || !e.space) && console.warn(
|
|
681
692
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
682
693
|
), (e.token === "" || !e.token) && (J(
|
|
683
694
|
e,
|
|
684
|
-
(
|
|
685
|
-
e.token =
|
|
695
|
+
(n) => {
|
|
696
|
+
e.token = n;
|
|
686
697
|
},
|
|
687
|
-
(
|
|
688
|
-
console.log("☠️ error => ",
|
|
698
|
+
(n) => {
|
|
699
|
+
console.log("☠️ error => ", n);
|
|
689
700
|
}
|
|
690
701
|
), console.warn(
|
|
691
702
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
692
|
-
)), new Promise((
|
|
703
|
+
)), new Promise((n, o) => {
|
|
693
704
|
U(
|
|
694
705
|
e,
|
|
695
|
-
(
|
|
696
|
-
m(
|
|
706
|
+
(c) => {
|
|
707
|
+
m(c, {
|
|
697
708
|
headers: {
|
|
698
709
|
"Content-Type": "application/json",
|
|
699
710
|
Accept: "application/json"
|
|
700
711
|
},
|
|
701
|
-
onComplete(
|
|
702
|
-
let
|
|
712
|
+
onComplete(a) {
|
|
713
|
+
let i;
|
|
703
714
|
try {
|
|
704
|
-
|
|
715
|
+
i = JSON.parse(a);
|
|
705
716
|
} catch {
|
|
706
|
-
|
|
717
|
+
i = a;
|
|
707
718
|
}
|
|
708
|
-
|
|
719
|
+
t && t(i), n(i);
|
|
709
720
|
},
|
|
710
|
-
onFailure(
|
|
711
|
-
|
|
712
|
-
msg: JSON.parse(
|
|
713
|
-
headers:
|
|
714
|
-
xhr:
|
|
715
|
-
}),
|
|
716
|
-
msg: JSON.parse(
|
|
717
|
-
headers:
|
|
718
|
-
xhr:
|
|
721
|
+
onFailure(a, i, d) {
|
|
722
|
+
s && (console.log("error http", a), s({
|
|
723
|
+
msg: JSON.parse(a),
|
|
724
|
+
headers: i,
|
|
725
|
+
xhr: d
|
|
726
|
+
}), o({
|
|
727
|
+
msg: JSON.parse(a),
|
|
728
|
+
headers: i,
|
|
729
|
+
xhr: d
|
|
719
730
|
}));
|
|
720
731
|
}
|
|
721
732
|
});
|
|
722
733
|
},
|
|
723
|
-
(
|
|
724
|
-
|
|
734
|
+
(c) => {
|
|
735
|
+
s && s(c), console.log("*_3dspace_download_doc / error file URL *", c), o(c);
|
|
725
736
|
}
|
|
726
737
|
);
|
|
727
738
|
});
|
|
728
739
|
}
|
|
729
|
-
async function X(e, t,
|
|
740
|
+
async function X(e, t, s = void 0, n = void 0) {
|
|
730
741
|
let o = [];
|
|
731
742
|
for (let a = 0; a < t.length; a += 80) {
|
|
732
|
-
const
|
|
733
|
-
o.push(
|
|
743
|
+
const i = t.slice(a, a + 80);
|
|
744
|
+
o.push(i);
|
|
734
745
|
}
|
|
735
|
-
const
|
|
746
|
+
const r = (a) => {
|
|
736
747
|
V(
|
|
737
748
|
e,
|
|
738
749
|
o[a],
|
|
739
750
|
() => {
|
|
740
|
-
a++, a < o.length &&
|
|
751
|
+
a++, a < o.length && r(a);
|
|
741
752
|
},
|
|
742
|
-
(
|
|
743
|
-
|
|
753
|
+
(i) => {
|
|
754
|
+
s && s(i);
|
|
744
755
|
}
|
|
745
756
|
);
|
|
746
757
|
};
|
|
747
|
-
|
|
758
|
+
r(0);
|
|
748
759
|
}
|
|
749
|
-
function V(e, t,
|
|
760
|
+
function V(e, t, s = void 0, n = void 0, o = void 0) {
|
|
750
761
|
const c = [];
|
|
751
|
-
t.forEach((
|
|
762
|
+
t.forEach((i) => {
|
|
752
763
|
c.push({
|
|
753
|
-
id:
|
|
764
|
+
id: i
|
|
754
765
|
});
|
|
755
766
|
});
|
|
756
|
-
let
|
|
767
|
+
let r = JSON.stringify({
|
|
757
768
|
csrf: {
|
|
758
769
|
name: "ENO_CSRF_TOKEN",
|
|
759
770
|
value: e.token
|
|
@@ -763,16 +774,16 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
763
774
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
764
775
|
m(a, {
|
|
765
776
|
method: "PUT",
|
|
766
|
-
data:
|
|
777
|
+
data: r,
|
|
767
778
|
type: "json",
|
|
768
|
-
onComplete(
|
|
769
|
-
const d =
|
|
770
|
-
|
|
779
|
+
onComplete(i) {
|
|
780
|
+
const d = i.data;
|
|
781
|
+
i.success === !0 && (s && s(), d.forEach((l) => {
|
|
771
782
|
try {
|
|
772
783
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
773
784
|
m(u, {
|
|
774
785
|
onComplete: (f) => {
|
|
775
|
-
|
|
786
|
+
n && n({
|
|
776
787
|
objectId: l.id,
|
|
777
788
|
fileName: p,
|
|
778
789
|
data: JSON.parse(f)
|
|
@@ -787,12 +798,12 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
787
798
|
}
|
|
788
799
|
}));
|
|
789
800
|
},
|
|
790
|
-
onFailure(
|
|
791
|
-
console.log(
|
|
801
|
+
onFailure(i) {
|
|
802
|
+
console.log(i), o && o(i);
|
|
792
803
|
}
|
|
793
804
|
});
|
|
794
805
|
}
|
|
795
|
-
function De(e, t,
|
|
806
|
+
function De(e, t, s = void 0, n = void 0) {
|
|
796
807
|
return new Promise((o) => {
|
|
797
808
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
798
809
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
@@ -806,7 +817,7 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
806
817
|
console.log("onError =>", a);
|
|
807
818
|
}
|
|
808
819
|
);
|
|
809
|
-
let
|
|
820
|
+
let r = {
|
|
810
821
|
method: "POST",
|
|
811
822
|
headers: {
|
|
812
823
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -815,34 +826,36 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
815
826
|
"Content-Type": "application/json"
|
|
816
827
|
},
|
|
817
828
|
data: JSON.stringify({
|
|
818
|
-
data: [
|
|
819
|
-
|
|
820
|
-
|
|
829
|
+
data: [
|
|
830
|
+
{
|
|
831
|
+
id: t
|
|
832
|
+
}
|
|
833
|
+
]
|
|
821
834
|
}),
|
|
822
835
|
type: "json",
|
|
823
836
|
onComplete(a) {
|
|
824
|
-
|
|
837
|
+
s && s(a);
|
|
825
838
|
},
|
|
826
839
|
onFailure(a) {
|
|
827
|
-
|
|
840
|
+
n && n(a);
|
|
828
841
|
}
|
|
829
842
|
};
|
|
830
|
-
m(c,
|
|
843
|
+
m(c, r);
|
|
831
844
|
}
|
|
832
845
|
});
|
|
833
846
|
}
|
|
834
|
-
function Fe(e, t,
|
|
847
|
+
function Fe(e, t, s, n = void 0, o = void 0) {
|
|
835
848
|
return new Promise((c) => {
|
|
836
849
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
837
|
-
const
|
|
850
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
838
851
|
b(
|
|
839
852
|
e.space,
|
|
840
853
|
"ESPACE COMMUN",
|
|
841
854
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
842
855
|
void 0,
|
|
843
|
-
(
|
|
844
|
-
(
|
|
845
|
-
console.log("onError =>",
|
|
856
|
+
(i) => e.ctx = i,
|
|
857
|
+
(i) => {
|
|
858
|
+
console.log("onError =>", i);
|
|
846
859
|
}
|
|
847
860
|
);
|
|
848
861
|
let a = {
|
|
@@ -854,24 +867,26 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
854
867
|
"Content-Type": "application/json"
|
|
855
868
|
},
|
|
856
869
|
data: JSON.stringify({
|
|
857
|
-
data: [
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
870
|
+
data: [
|
|
871
|
+
{
|
|
872
|
+
id: t,
|
|
873
|
+
nextState: s
|
|
874
|
+
}
|
|
875
|
+
]
|
|
861
876
|
}),
|
|
862
877
|
type: "json",
|
|
863
|
-
onComplete(
|
|
864
|
-
|
|
878
|
+
onComplete(i) {
|
|
879
|
+
n && n(i);
|
|
865
880
|
},
|
|
866
|
-
onFailure(
|
|
867
|
-
o && o(
|
|
881
|
+
onFailure(i) {
|
|
882
|
+
o && o(i);
|
|
868
883
|
}
|
|
869
884
|
};
|
|
870
|
-
m(
|
|
885
|
+
m(r, a);
|
|
871
886
|
}
|
|
872
887
|
});
|
|
873
888
|
}
|
|
874
|
-
function Ue(e, t,
|
|
889
|
+
function Ue(e, t, s = void 0, n = void 0) {
|
|
875
890
|
return new Promise((o) => {
|
|
876
891
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
877
892
|
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
@@ -885,7 +900,7 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
885
900
|
console.log("onError =>", a);
|
|
886
901
|
}
|
|
887
902
|
);
|
|
888
|
-
let
|
|
903
|
+
let r = {
|
|
889
904
|
method: "POST",
|
|
890
905
|
headers: {
|
|
891
906
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -894,23 +909,25 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
894
909
|
"Content-Type": "application/json"
|
|
895
910
|
},
|
|
896
911
|
data: JSON.stringify({
|
|
897
|
-
graphRequests: [
|
|
898
|
-
|
|
899
|
-
|
|
912
|
+
graphRequests: [
|
|
913
|
+
{
|
|
914
|
+
id: t
|
|
915
|
+
}
|
|
916
|
+
]
|
|
900
917
|
}),
|
|
901
918
|
type: "json",
|
|
902
919
|
onComplete(a) {
|
|
903
|
-
|
|
920
|
+
s && s(a);
|
|
904
921
|
},
|
|
905
922
|
onFailure(a) {
|
|
906
|
-
|
|
923
|
+
n && n(a);
|
|
907
924
|
}
|
|
908
925
|
};
|
|
909
|
-
m(c,
|
|
926
|
+
m(c, r);
|
|
910
927
|
}
|
|
911
928
|
});
|
|
912
929
|
}
|
|
913
|
-
function je(e, t,
|
|
930
|
+
function je(e, t, s = void 0, n = void 0) {
|
|
914
931
|
return new Promise((o) => {
|
|
915
932
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
916
933
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
@@ -924,7 +941,7 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
924
941
|
console.log("onError =>", a);
|
|
925
942
|
}
|
|
926
943
|
);
|
|
927
|
-
let
|
|
944
|
+
let r = {
|
|
928
945
|
method: "POST",
|
|
929
946
|
headers: {
|
|
930
947
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -933,40 +950,42 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
933
950
|
"Content-Type": "application/json"
|
|
934
951
|
},
|
|
935
952
|
data: JSON.stringify({
|
|
936
|
-
data: [
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
953
|
+
data: [
|
|
954
|
+
{
|
|
955
|
+
"attribute[PLMReference.V_versionComment]": null,
|
|
956
|
+
physicalid: t,
|
|
957
|
+
type: "Document",
|
|
958
|
+
tenant: e.tenant,
|
|
959
|
+
objectId: t,
|
|
960
|
+
policy: "Document Release",
|
|
961
|
+
availableSemantic: ["E", "LAST", "NEW", "DUP"]
|
|
962
|
+
}
|
|
963
|
+
]
|
|
945
964
|
}),
|
|
946
965
|
type: "json",
|
|
947
966
|
onComplete(a) {
|
|
948
|
-
|
|
967
|
+
s && s(a);
|
|
949
968
|
},
|
|
950
969
|
onFailure(a) {
|
|
951
|
-
|
|
970
|
+
n && n(a);
|
|
952
971
|
}
|
|
953
972
|
};
|
|
954
|
-
m(c,
|
|
973
|
+
m(c, r);
|
|
955
974
|
}
|
|
956
975
|
});
|
|
957
976
|
}
|
|
958
|
-
function $e(e, t,
|
|
977
|
+
function $e(e, t, s, n = void 0, o = void 0) {
|
|
959
978
|
return new Promise((c) => {
|
|
960
979
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
961
|
-
const
|
|
980
|
+
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
962
981
|
b(
|
|
963
982
|
e.space,
|
|
964
983
|
"ESPACE COMMUN",
|
|
965
984
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
966
985
|
void 0,
|
|
967
|
-
(
|
|
968
|
-
(
|
|
969
|
-
console.log("onError =>",
|
|
986
|
+
(i) => e.ctx = i,
|
|
987
|
+
(i) => {
|
|
988
|
+
console.log("onError =>", i);
|
|
970
989
|
}
|
|
971
990
|
);
|
|
972
991
|
let a = {
|
|
@@ -978,51 +997,53 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
978
997
|
"Content-Type": "application/json"
|
|
979
998
|
},
|
|
980
999
|
data: JSON.stringify({
|
|
981
|
-
data: [
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1000
|
+
data: [
|
|
1001
|
+
{
|
|
1002
|
+
physicalid: t,
|
|
1003
|
+
proposedRevision: s,
|
|
1004
|
+
modifiedAttributes: {
|
|
1005
|
+
revision: s
|
|
1006
|
+
}
|
|
986
1007
|
}
|
|
987
|
-
|
|
1008
|
+
],
|
|
988
1009
|
folderid: null,
|
|
989
1010
|
notificationTimeout: 600
|
|
990
1011
|
}),
|
|
991
1012
|
type: "json",
|
|
992
|
-
onComplete(
|
|
993
|
-
|
|
1013
|
+
onComplete(i) {
|
|
1014
|
+
n && n(i);
|
|
994
1015
|
},
|
|
995
|
-
onFailure(
|
|
996
|
-
o && o(
|
|
1016
|
+
onFailure(i) {
|
|
1017
|
+
o && o(i);
|
|
997
1018
|
}
|
|
998
1019
|
};
|
|
999
|
-
m(
|
|
1020
|
+
m(r, a);
|
|
1000
1021
|
}
|
|
1001
1022
|
});
|
|
1002
1023
|
}
|
|
1003
1024
|
//!SECTION
|
|
1004
|
-
function Ae(e, t = void 0,
|
|
1005
|
-
const
|
|
1025
|
+
function Ae(e, t = void 0, s = void 0) {
|
|
1026
|
+
const n = {
|
|
1006
1027
|
base: `${e.space}`,
|
|
1007
1028
|
uri: "/resources/bps/cspaces",
|
|
1008
1029
|
optTenant: `tenant=${e.tenant}`
|
|
1009
|
-
}, o = `${
|
|
1030
|
+
}, o = `${n.base}${n.uri}?${n.optTenant}`;
|
|
1010
1031
|
m(o, {
|
|
1011
1032
|
method: "GET",
|
|
1012
1033
|
headers: {
|
|
1013
1034
|
Accept: "application/json,text/javascript,*/*",
|
|
1014
1035
|
"Content-Type": "application/ds-json"
|
|
1015
1036
|
},
|
|
1016
|
-
onComplete(c,
|
|
1037
|
+
onComplete(c, r) {
|
|
1017
1038
|
const a = JSON.parse(c);
|
|
1018
|
-
t && t(a,
|
|
1039
|
+
t && t(a, r);
|
|
1019
1040
|
},
|
|
1020
|
-
onFailure(c,
|
|
1021
|
-
|
|
1041
|
+
onFailure(c, r, a) {
|
|
1042
|
+
s && s({ response: c, headers: r, xhr: a });
|
|
1022
1043
|
}
|
|
1023
1044
|
});
|
|
1024
1045
|
}
|
|
1025
|
-
function Ie(e, t,
|
|
1046
|
+
function Ie(e, t, s, n) {
|
|
1026
1047
|
U(
|
|
1027
1048
|
e.space,
|
|
1028
1049
|
t,
|
|
@@ -1030,42 +1051,42 @@ function Ie(e, t, n, s) {
|
|
|
1030
1051
|
m(o, {
|
|
1031
1052
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1032
1053
|
onComplete: (c) => {
|
|
1033
|
-
|
|
1054
|
+
s && s(c);
|
|
1034
1055
|
},
|
|
1035
1056
|
onFailure: (c) => {
|
|
1036
|
-
console.log("error http", c),
|
|
1057
|
+
console.log("error http", c), n && n(c);
|
|
1037
1058
|
}
|
|
1038
1059
|
});
|
|
1039
1060
|
}
|
|
1040
1061
|
);
|
|
1041
1062
|
}
|
|
1042
|
-
async function Re(e, t,
|
|
1063
|
+
async function Re(e, t, s = void 0, n = void 0) {
|
|
1043
1064
|
return new Promise((o) => {
|
|
1044
1065
|
U(e, t, (c) => {
|
|
1045
1066
|
m(c, {
|
|
1046
|
-
onComplete: (
|
|
1047
|
-
onFailure: (
|
|
1048
|
-
|
|
1067
|
+
onComplete: (r, a, i) => (o(JSON.parse(r)), s && s(JSON.parse(r), a, i), o),
|
|
1068
|
+
onFailure: (r, a, i) => {
|
|
1069
|
+
n && n(r, a, i), console.log(r, a?.errormsg);
|
|
1049
1070
|
}
|
|
1050
1071
|
});
|
|
1051
1072
|
});
|
|
1052
1073
|
});
|
|
1053
1074
|
}
|
|
1054
|
-
function ve(e, t,
|
|
1075
|
+
function ve(e, t, s, n = void 0, o = void 0) {
|
|
1055
1076
|
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1056
1077
|
k(
|
|
1057
1078
|
e,
|
|
1058
|
-
|
|
1059
|
-
(
|
|
1060
|
-
const a =
|
|
1079
|
+
s,
|
|
1080
|
+
(r) => {
|
|
1081
|
+
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;
|
|
1061
1082
|
K(
|
|
1062
1083
|
e,
|
|
1063
|
-
|
|
1084
|
+
s,
|
|
1064
1085
|
a,
|
|
1065
1086
|
c,
|
|
1066
|
-
|
|
1087
|
+
i,
|
|
1067
1088
|
(d) => {
|
|
1068
|
-
|
|
1089
|
+
n && n(d);
|
|
1069
1090
|
},
|
|
1070
1091
|
(d) => {
|
|
1071
1092
|
o && o(d);
|
|
@@ -1076,39 +1097,39 @@ function ve(e, t, n, s = void 0, o = void 0) {
|
|
|
1076
1097
|
}
|
|
1077
1098
|
let v, P;
|
|
1078
1099
|
const j = [];
|
|
1079
|
-
async function Pe(e, t = void 0,
|
|
1100
|
+
async function Pe(e, t = void 0, s = void 0) {
|
|
1080
1101
|
e.objID && e.objID !== "" ? k(
|
|
1081
1102
|
e,
|
|
1082
|
-
(
|
|
1083
|
-
t && t(
|
|
1103
|
+
(n) => {
|
|
1104
|
+
t && t(n);
|
|
1084
1105
|
},
|
|
1085
|
-
(
|
|
1086
|
-
|
|
1106
|
+
(n) => {
|
|
1107
|
+
s && s(n);
|
|
1087
1108
|
}
|
|
1088
1109
|
) : (e.objID === null || e.objID === "") && C(
|
|
1089
1110
|
e,
|
|
1090
|
-
(
|
|
1091
|
-
t && t({ rep:
|
|
1111
|
+
(n) => {
|
|
1112
|
+
t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
|
|
1092
1113
|
},
|
|
1093
|
-
(
|
|
1094
|
-
|
|
1114
|
+
(n) => {
|
|
1115
|
+
s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
|
|
1095
1116
|
}
|
|
1096
1117
|
);
|
|
1097
1118
|
}
|
|
1098
|
-
async function xe(e, t = void 0,
|
|
1119
|
+
async function xe(e, t = void 0, s = void 0) {
|
|
1099
1120
|
console.log("getDatasByTenant (getDocuments)", e), await R(
|
|
1100
1121
|
e,
|
|
1101
|
-
(
|
|
1122
|
+
(n) => {
|
|
1102
1123
|
const o = {};
|
|
1103
|
-
o.obj =
|
|
1124
|
+
o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
|
|
1104
1125
|
},
|
|
1105
|
-
(
|
|
1106
|
-
|
|
1126
|
+
(n) => {
|
|
1127
|
+
s && s?.(n);
|
|
1107
1128
|
}
|
|
1108
1129
|
);
|
|
1109
1130
|
}
|
|
1110
|
-
function Me(e, t = void 0,
|
|
1111
|
-
const
|
|
1131
|
+
function Me(e, t = void 0, s = void 0) {
|
|
1132
|
+
const n = [];
|
|
1112
1133
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1113
1134
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1114
1135
|
return;
|
|
@@ -1117,22 +1138,22 @@ function Me(e, t = void 0, n = void 0) {
|
|
|
1117
1138
|
R(
|
|
1118
1139
|
e,
|
|
1119
1140
|
o.objID,
|
|
1120
|
-
(
|
|
1121
|
-
|
|
1141
|
+
(r) => {
|
|
1142
|
+
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), delete e.objIds, delete e.datas);
|
|
1122
1143
|
}
|
|
1123
1144
|
);
|
|
1124
1145
|
});
|
|
1125
1146
|
}
|
|
1126
|
-
function B(e, t,
|
|
1147
|
+
function B(e, t, s = void 0, n = void 0) {
|
|
1127
1148
|
X(
|
|
1128
1149
|
e,
|
|
1129
1150
|
v,
|
|
1130
1151
|
(o) => {
|
|
1131
1152
|
const c = [...t];
|
|
1132
|
-
c.find((
|
|
1153
|
+
c.find((r) => r.objectID === o.objectId).data = o.data, P = c, j.push(o.data), s && s(j);
|
|
1133
1154
|
},
|
|
1134
1155
|
(o) => {
|
|
1135
|
-
|
|
1156
|
+
n && (n(o), console.log(o));
|
|
1136
1157
|
}
|
|
1137
1158
|
);
|
|
1138
1159
|
}
|
|
@@ -1156,8 +1177,8 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1156
1177
|
order_by: "desc",
|
|
1157
1178
|
tag: "testTag"
|
|
1158
1179
|
};
|
|
1159
|
-
function Le(e, t,
|
|
1160
|
-
const { space: o, tenant: c } = e, { objId:
|
|
1180
|
+
function Le(e, t, s = void 0, n = void 0) {
|
|
1181
|
+
const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
|
|
1161
1182
|
uri: "/resources/6w/tags",
|
|
1162
1183
|
otpCTX: "SecurityContext=preferred",
|
|
1163
1184
|
optTenant: `tenant=${c}`
|
|
@@ -1166,12 +1187,12 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1166
1187
|
{
|
|
1167
1188
|
subject: [
|
|
1168
1189
|
{
|
|
1169
|
-
uri: `pid://${
|
|
1190
|
+
uri: `pid://${r}`
|
|
1170
1191
|
}
|
|
1171
1192
|
],
|
|
1172
1193
|
predicate: x[a],
|
|
1173
1194
|
object: {
|
|
1174
|
-
literal:
|
|
1195
|
+
literal: i
|
|
1175
1196
|
}
|
|
1176
1197
|
}
|
|
1177
1198
|
]
|
|
@@ -1189,46 +1210,46 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1189
1210
|
setTimeout(() => {
|
|
1190
1211
|
G(
|
|
1191
1212
|
e,
|
|
1192
|
-
|
|
1213
|
+
r,
|
|
1193
1214
|
(g) => {
|
|
1194
1215
|
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;
|
|
1195
1216
|
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, q(
|
|
1196
1217
|
e,
|
|
1197
1218
|
t,
|
|
1198
1219
|
(y) => {
|
|
1199
|
-
|
|
1220
|
+
s && s(y);
|
|
1200
1221
|
},
|
|
1201
1222
|
(y) => {
|
|
1202
|
-
|
|
1223
|
+
n && n(y);
|
|
1203
1224
|
}
|
|
1204
1225
|
);
|
|
1205
1226
|
},
|
|
1206
1227
|
(g, h) => {
|
|
1207
1228
|
const S = g;
|
|
1208
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1229
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
|
|
1209
1230
|
}
|
|
1210
1231
|
);
|
|
1211
1232
|
}, 2e3);
|
|
1212
1233
|
},
|
|
1213
1234
|
onFailure(u, f) {
|
|
1214
1235
|
const g = u;
|
|
1215
|
-
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1236
|
+
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
|
|
1216
1237
|
}
|
|
1217
1238
|
});
|
|
1218
1239
|
}
|
|
1219
|
-
function q(e, t,
|
|
1240
|
+
function q(e, t, s = void 0, n = void 0) {
|
|
1220
1241
|
console.log("obj ", t);
|
|
1221
1242
|
const o = t.info.name, c = {
|
|
1222
1243
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1223
1244
|
uri: "/federated/search"
|
|
1224
|
-
},
|
|
1245
|
+
}, r = `${c.baseUrl}${c.uri}`, a = {
|
|
1225
1246
|
"Content-Type": "application/json",
|
|
1226
1247
|
Accept: "application/json,text/javascript,*/*"
|
|
1227
|
-
},
|
|
1248
|
+
}, i = I(), d = {
|
|
1228
1249
|
with_indexing_date: !0,
|
|
1229
1250
|
with_synthesis: !0,
|
|
1230
1251
|
with_nls: !1,
|
|
1231
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1252
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
|
|
1232
1253
|
locale: "fr",
|
|
1233
1254
|
select_predicate: [
|
|
1234
1255
|
"ds6w:label",
|
|
@@ -1285,26 +1306,26 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1285
1306
|
}
|
|
1286
1307
|
}
|
|
1287
1308
|
};
|
|
1288
|
-
console.log("dataPattern => ", d), m(
|
|
1309
|
+
console.log("dataPattern => ", d), m(r, {
|
|
1289
1310
|
method: "POST",
|
|
1290
1311
|
headers: a,
|
|
1291
1312
|
data: JSON.stringify(d),
|
|
1292
1313
|
onComplete(l) {
|
|
1293
1314
|
const p = JSON.parse(l);
|
|
1294
|
-
|
|
1315
|
+
s(p);
|
|
1295
1316
|
},
|
|
1296
1317
|
onFailure(l, p) {
|
|
1297
1318
|
const u = l;
|
|
1298
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1319
|
+
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);
|
|
1299
1320
|
}
|
|
1300
1321
|
});
|
|
1301
1322
|
}
|
|
1302
|
-
function Ee(e, t,
|
|
1303
|
-
const { objId: o, pred: c, tag:
|
|
1323
|
+
function Ee(e, t, s = void 0, n = void 0) {
|
|
1324
|
+
const { objId: o, pred: c, tag: r } = t, a = {
|
|
1304
1325
|
uri: "/resources/6w/tags",
|
|
1305
1326
|
otpCTX: "SecurityContext=preferred",
|
|
1306
1327
|
optTenant: `tenant=${e.tenant}`
|
|
1307
|
-
},
|
|
1328
|
+
}, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1308
1329
|
tag: [
|
|
1309
1330
|
{
|
|
1310
1331
|
subject: [
|
|
@@ -1314,12 +1335,12 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1314
1335
|
],
|
|
1315
1336
|
predicate: x[c],
|
|
1316
1337
|
object: {
|
|
1317
|
-
literal:
|
|
1338
|
+
literal: r
|
|
1318
1339
|
}
|
|
1319
1340
|
}
|
|
1320
1341
|
]
|
|
1321
1342
|
};
|
|
1322
|
-
m(
|
|
1343
|
+
m(i, {
|
|
1323
1344
|
method: "DELETE",
|
|
1324
1345
|
data: JSON.stringify(d),
|
|
1325
1346
|
headers: {
|
|
@@ -1327,52 +1348,52 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1327
1348
|
Accept: "application/json,text/javascript,*/*"
|
|
1328
1349
|
},
|
|
1329
1350
|
onComplete(l) {
|
|
1330
|
-
|
|
1351
|
+
s && s(l);
|
|
1331
1352
|
},
|
|
1332
1353
|
onFailure(l, p) {
|
|
1333
1354
|
const u = l;
|
|
1334
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1355
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
|
|
1335
1356
|
}
|
|
1336
1357
|
});
|
|
1337
1358
|
}
|
|
1338
|
-
function Je(e, t = "",
|
|
1359
|
+
function Je(e, t = "", s = void 0, n = void 0) {
|
|
1339
1360
|
const { space: o } = e;
|
|
1340
1361
|
if (t === "")
|
|
1341
1362
|
return;
|
|
1342
1363
|
const c = {
|
|
1343
1364
|
uri: "/resources/v1/modeler/documents"
|
|
1344
|
-
},
|
|
1365
|
+
}, r = {
|
|
1345
1366
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1346
1367
|
Accept: "application/json,text/javascript,*/*"
|
|
1347
|
-
}, a = `${o}${c.uri}`,
|
|
1368
|
+
}, 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}`;
|
|
1348
1369
|
m(a, {
|
|
1349
1370
|
method: "POST",
|
|
1350
|
-
headers:
|
|
1351
|
-
data:
|
|
1371
|
+
headers: r,
|
|
1372
|
+
data: i,
|
|
1352
1373
|
onComplete(d) {
|
|
1353
|
-
|
|
1374
|
+
s && s(JSON.parse(d));
|
|
1354
1375
|
},
|
|
1355
1376
|
onFailure(d, l) {
|
|
1356
1377
|
const p = d;
|
|
1357
|
-
p.msg = l.error,
|
|
1378
|
+
p.msg = l.error, n && n(p);
|
|
1358
1379
|
}
|
|
1359
1380
|
});
|
|
1360
1381
|
}
|
|
1361
|
-
async function w(e, t = void 0,
|
|
1362
|
-
const
|
|
1363
|
-
return m(
|
|
1364
|
-
onComplete(o, c,
|
|
1382
|
+
async function w(e, t = void 0, s = void 0) {
|
|
1383
|
+
const n = e.space + "/api/index/tk";
|
|
1384
|
+
return m(n, {
|
|
1385
|
+
onComplete(o, c, r) {
|
|
1365
1386
|
const a = JSON.parse(o);
|
|
1366
1387
|
if (t)
|
|
1367
1388
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1368
1389
|
},
|
|
1369
1390
|
onFailure(o) {
|
|
1370
|
-
|
|
1391
|
+
s && s(o);
|
|
1371
1392
|
}
|
|
1372
1393
|
});
|
|
1373
1394
|
}
|
|
1374
|
-
function Ge(e, t = void 0,
|
|
1375
|
-
const
|
|
1395
|
+
function Ge(e, t = void 0, s = void 0) {
|
|
1396
|
+
const n = `${e.space}/api/exalead/whatsnew`, o = {
|
|
1376
1397
|
params: {
|
|
1377
1398
|
community_id: null,
|
|
1378
1399
|
hash_key: null,
|
|
@@ -1383,7 +1404,7 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1383
1404
|
}
|
|
1384
1405
|
};
|
|
1385
1406
|
w(e, (c) => {
|
|
1386
|
-
m(
|
|
1407
|
+
m(n, {
|
|
1387
1408
|
method: "POST",
|
|
1388
1409
|
headers: {
|
|
1389
1410
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
@@ -1392,17 +1413,17 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1392
1413
|
},
|
|
1393
1414
|
data: JSON.stringify(o),
|
|
1394
1415
|
type: "json",
|
|
1395
|
-
onComplete(
|
|
1396
|
-
t && t(
|
|
1416
|
+
onComplete(r, a) {
|
|
1417
|
+
t && t(r, a);
|
|
1397
1418
|
},
|
|
1398
|
-
onFailure(
|
|
1399
|
-
|
|
1419
|
+
onFailure(r, a) {
|
|
1420
|
+
s && s(r, a);
|
|
1400
1421
|
}
|
|
1401
1422
|
});
|
|
1402
1423
|
});
|
|
1403
1424
|
}
|
|
1404
|
-
function Ke(e, t = void 0,
|
|
1405
|
-
const
|
|
1425
|
+
function Ke(e, t = void 0, s = void 0) {
|
|
1426
|
+
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
|
|
1406
1427
|
params: {
|
|
1407
1428
|
idsToFilterArr: [],
|
|
1408
1429
|
mode: "offline",
|
|
@@ -1412,7 +1433,7 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1412
1433
|
}
|
|
1413
1434
|
};
|
|
1414
1435
|
w(e, (c) => {
|
|
1415
|
-
m(
|
|
1436
|
+
m(n, {
|
|
1416
1437
|
method: "POST",
|
|
1417
1438
|
headers: {
|
|
1418
1439
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
@@ -1421,30 +1442,30 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1421
1442
|
},
|
|
1422
1443
|
data: JSON.stringify(o),
|
|
1423
1444
|
type: "json",
|
|
1424
|
-
onComplete(
|
|
1425
|
-
const
|
|
1426
|
-
t && t(
|
|
1445
|
+
onComplete(r, a) {
|
|
1446
|
+
const i = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1447
|
+
t && t(i, r);
|
|
1427
1448
|
},
|
|
1428
|
-
onFailure(
|
|
1429
|
-
|
|
1449
|
+
onFailure(r, a) {
|
|
1450
|
+
s && s(r, a);
|
|
1430
1451
|
}
|
|
1431
1452
|
});
|
|
1432
1453
|
});
|
|
1433
1454
|
}
|
|
1434
|
-
function We(e, t = void 0,
|
|
1435
|
-
const
|
|
1455
|
+
function We(e, t = void 0, s = void 0) {
|
|
1456
|
+
const n = {
|
|
1436
1457
|
base: e.space,
|
|
1437
1458
|
uri: "/api/community/listmycommunities",
|
|
1438
1459
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1439
1460
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1440
|
-
}, o = `${
|
|
1441
|
-
w(e, (
|
|
1461
|
+
}, o = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
|
|
1462
|
+
w(e, (r) => {
|
|
1442
1463
|
m(o, {
|
|
1443
1464
|
method: "GET",
|
|
1444
1465
|
headers: {
|
|
1445
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1466
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1446
1467
|
},
|
|
1447
|
-
onComplete(a,
|
|
1468
|
+
onComplete(a, i, d) {
|
|
1448
1469
|
const p = JSON.parse(a).result;
|
|
1449
1470
|
let u = 0;
|
|
1450
1471
|
p.forEach((f) => {
|
|
@@ -1462,18 +1483,18 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1462
1483
|
(h) => {
|
|
1463
1484
|
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1464
1485
|
},
|
|
1465
|
-
(h) =>
|
|
1486
|
+
(h) => s(h)
|
|
1466
1487
|
);
|
|
1467
1488
|
});
|
|
1468
1489
|
},
|
|
1469
|
-
onFailure(a,
|
|
1490
|
+
onFailure(a, i) {
|
|
1470
1491
|
const d = a;
|
|
1471
|
-
d.status =
|
|
1492
|
+
d.status = i.status, d.response = i.errormsg, s && s(d);
|
|
1472
1493
|
}
|
|
1473
1494
|
});
|
|
1474
1495
|
});
|
|
1475
1496
|
}
|
|
1476
|
-
function Q(e, t,
|
|
1497
|
+
function Q(e, t, s, n) {
|
|
1477
1498
|
const o = `${e.space}/api/community/listmembers`, c = {
|
|
1478
1499
|
params: {
|
|
1479
1500
|
page: e.page ? e.page : 1,
|
|
@@ -1481,29 +1502,29 @@ function Q(e, t, n, s) {
|
|
|
1481
1502
|
community_id: t
|
|
1482
1503
|
}
|
|
1483
1504
|
};
|
|
1484
|
-
w(e, (
|
|
1505
|
+
w(e, (r) => {
|
|
1485
1506
|
m(o, {
|
|
1486
1507
|
method: "POST",
|
|
1487
1508
|
headers: {
|
|
1488
1509
|
"Content-type": "application/json;charset=UTF-8",
|
|
1489
1510
|
Accept: "application/json",
|
|
1490
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1511
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1491
1512
|
},
|
|
1492
1513
|
data: JSON.stringify(c),
|
|
1493
1514
|
type: "json",
|
|
1494
|
-
onComplete(a,
|
|
1495
|
-
|
|
1515
|
+
onComplete(a, i, d) {
|
|
1516
|
+
s && s(a);
|
|
1496
1517
|
},
|
|
1497
|
-
onFailure(a,
|
|
1518
|
+
onFailure(a, i) {
|
|
1498
1519
|
const d = a;
|
|
1499
|
-
d.status =
|
|
1520
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1500
1521
|
}
|
|
1501
1522
|
});
|
|
1502
1523
|
});
|
|
1503
1524
|
}
|
|
1504
|
-
function Xe(e, t = void 0,
|
|
1505
|
-
const
|
|
1506
|
-
e.commu_id || (e.commu_id =
|
|
1525
|
+
function Xe(e, t = void 0, s = void 0) {
|
|
1526
|
+
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1527
|
+
e.commu_id || (e.commu_id = n);
|
|
1507
1528
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1508
1529
|
w(e, (c) => {
|
|
1509
1530
|
m(o, {
|
|
@@ -1513,23 +1534,23 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1513
1534
|
Accept: "application/json",
|
|
1514
1535
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1515
1536
|
},
|
|
1516
|
-
onComplete(
|
|
1517
|
-
const a = JSON.parse(
|
|
1537
|
+
onComplete(r) {
|
|
1538
|
+
const a = JSON.parse(r);
|
|
1518
1539
|
t && t(a);
|
|
1519
1540
|
},
|
|
1520
|
-
onFailure(
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1541
|
+
onFailure(r, a) {
|
|
1542
|
+
const i = r;
|
|
1543
|
+
i.status = a.status, i.response = a.errormsg, s && s(i);
|
|
1523
1544
|
}
|
|
1524
1545
|
});
|
|
1525
1546
|
});
|
|
1526
1547
|
}
|
|
1527
|
-
function Ve(e, t,
|
|
1548
|
+
function Ve(e, t, s = void 0, n = void 0) {
|
|
1528
1549
|
const { listAllContacts: o, currentUser: c } = e;
|
|
1529
1550
|
console.log("__listAllContacts", o.hits);
|
|
1530
|
-
const
|
|
1551
|
+
const r = `${e.space}/api/directmessages`, a = {
|
|
1531
1552
|
users: [c.login].concat(t.receipt)
|
|
1532
|
-
},
|
|
1553
|
+
}, i = {
|
|
1533
1554
|
id_msg: "",
|
|
1534
1555
|
senderId: e.currentUser.login,
|
|
1535
1556
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1539,14 +1560,14 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1539
1560
|
Z(
|
|
1540
1561
|
a.users,
|
|
1541
1562
|
(l) => {
|
|
1542
|
-
l !== void 0 && (
|
|
1563
|
+
l !== void 0 && (i.id_msg = l.id, d = !0, $(e, i));
|
|
1543
1564
|
},
|
|
1544
1565
|
(l) => {
|
|
1545
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1566
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
|
|
1546
1567
|
}
|
|
1547
1568
|
), d === !1 && setTimeout(() => {
|
|
1548
1569
|
d === !1 && w(e, (l) => {
|
|
1549
|
-
m(
|
|
1570
|
+
m(r, {
|
|
1550
1571
|
method: "POST",
|
|
1551
1572
|
headers: {
|
|
1552
1573
|
"Content-Type": "application/json",
|
|
@@ -1557,17 +1578,17 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1557
1578
|
type: "json",
|
|
1558
1579
|
onComplete(p, u, f) {
|
|
1559
1580
|
const g = p;
|
|
1560
|
-
g.reponse = JSON.parse(f.response), g.status = f.status,
|
|
1581
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), i.id_msg = g.result.id, $(e, i);
|
|
1561
1582
|
},
|
|
1562
1583
|
onFailure(p, u, f) {
|
|
1563
1584
|
const g = p;
|
|
1564
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1585
|
+
g.msg = u.errormsg, g.status = u.status, n && n(g);
|
|
1565
1586
|
}
|
|
1566
1587
|
});
|
|
1567
1588
|
});
|
|
1568
1589
|
}, 500);
|
|
1569
1590
|
}
|
|
1570
|
-
function Z(e, t,
|
|
1591
|
+
function Z(e, t, s, n) {
|
|
1571
1592
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1572
1593
|
w(e, (c) => {
|
|
1573
1594
|
m(o, {
|
|
@@ -1576,33 +1597,33 @@ function Z(e, t, n, s) {
|
|
|
1576
1597
|
Accept: "application/json,text/javascript,*/*",
|
|
1577
1598
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1578
1599
|
},
|
|
1579
|
-
onComplete(
|
|
1580
|
-
const a = JSON.parse(
|
|
1600
|
+
onComplete(r) {
|
|
1601
|
+
const a = JSON.parse(r), i = [];
|
|
1581
1602
|
a.result.forEach((p) => {
|
|
1582
|
-
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length &&
|
|
1603
|
+
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && i.push(p);
|
|
1583
1604
|
});
|
|
1584
|
-
const d = t.sort(), l =
|
|
1605
|
+
const d = t.sort(), l = i.find((p) => {
|
|
1585
1606
|
const u = [];
|
|
1586
1607
|
return p.users.forEach((f) => {
|
|
1587
1608
|
u.push(f.login);
|
|
1588
1609
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1589
1610
|
});
|
|
1590
|
-
|
|
1611
|
+
s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
|
|
1591
1612
|
},
|
|
1592
|
-
onFailure(
|
|
1593
|
-
const a =
|
|
1594
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1613
|
+
onFailure(r) {
|
|
1614
|
+
const a = r;
|
|
1615
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
|
|
1595
1616
|
}
|
|
1596
1617
|
});
|
|
1597
1618
|
});
|
|
1598
1619
|
}
|
|
1599
|
-
function $(e, t,
|
|
1620
|
+
function $(e, t, s = void 0, n = void 0) {
|
|
1600
1621
|
const o = {
|
|
1601
1622
|
base: e.space,
|
|
1602
1623
|
uri: "/api/community",
|
|
1603
1624
|
id_msg: `${t.id_msg}`,
|
|
1604
1625
|
endUri: "/instantmessages"
|
|
1605
|
-
}, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`,
|
|
1626
|
+
}, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
|
|
1606
1627
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1607
1628
|
accessState: null,
|
|
1608
1629
|
commentUri: null,
|
|
@@ -1620,25 +1641,25 @@ function $(e, t, n = void 0, s = void 0) {
|
|
|
1620
1641
|
Accept: "application/json",
|
|
1621
1642
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1622
1643
|
},
|
|
1623
|
-
data: JSON.stringify(
|
|
1644
|
+
data: JSON.stringify(r),
|
|
1624
1645
|
type: "json",
|
|
1625
|
-
onComplete(
|
|
1626
|
-
const p =
|
|
1627
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1646
|
+
onComplete(i, d, l) {
|
|
1647
|
+
const p = i;
|
|
1648
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1628
1649
|
},
|
|
1629
|
-
onFailure(
|
|
1630
|
-
const l =
|
|
1631
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1650
|
+
onFailure(i, d) {
|
|
1651
|
+
const l = i;
|
|
1652
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1632
1653
|
}
|
|
1633
1654
|
});
|
|
1634
1655
|
});
|
|
1635
1656
|
}
|
|
1636
1657
|
function ee(e) {
|
|
1637
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1658
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1638
1659
|
return `<p>${e} </p>
|
|
1639
1660
|
<br/>
|
|
1640
1661
|
<hr/>
|
|
1641
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1662
|
+
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
|
|
1642
1663
|
}
|
|
1643
1664
|
const te = {
|
|
1644
1665
|
title: "TEST DEV COMMUNITY IDEA",
|
|
@@ -1650,16 +1671,16 @@ const te = {
|
|
|
1650
1671
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1651
1672
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1652
1673
|
};
|
|
1653
|
-
function Be(e, t,
|
|
1674
|
+
function Be(e, t, s = void 0, n = void 0) {
|
|
1654
1675
|
const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1655
|
-
(
|
|
1656
|
-
),
|
|
1657
|
-
(
|
|
1676
|
+
(i) => i.id === t.community_id
|
|
1677
|
+
), r = e.swymCommunities.find(
|
|
1678
|
+
(i) => i.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1658
1679
|
), a = {
|
|
1659
1680
|
params: {
|
|
1660
1681
|
title: t.title,
|
|
1661
1682
|
// String, le nom de l'affaire
|
|
1662
|
-
community_id: c?.id !== void 0 ? c.id :
|
|
1683
|
+
community_id: c?.id !== void 0 ? c.id : r.id,
|
|
1663
1684
|
// String, l'id de la communauté
|
|
1664
1685
|
message: ne(t.text_html),
|
|
1665
1686
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1667,11 +1688,11 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1667
1688
|
// 1 publier, 0 non publier
|
|
1668
1689
|
}
|
|
1669
1690
|
};
|
|
1670
|
-
w(e, (
|
|
1691
|
+
w(e, (i) => {
|
|
1671
1692
|
const d = {
|
|
1672
1693
|
"Content-type": "application/json;charset=UTF-8",
|
|
1673
1694
|
Accept: "application/json",
|
|
1674
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1695
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1675
1696
|
};
|
|
1676
1697
|
m(o, {
|
|
1677
1698
|
method: "POST",
|
|
@@ -1680,46 +1701,46 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1680
1701
|
type: "json",
|
|
1681
1702
|
onComplete(l, p, u) {
|
|
1682
1703
|
const f = JSON.parse(l);
|
|
1683
|
-
f.status = u.status, f.response = u.response,
|
|
1704
|
+
f.status = u.status, f.response = u.response, s && s(f);
|
|
1684
1705
|
},
|
|
1685
1706
|
onFailure(l, p, u) {
|
|
1686
1707
|
const f = l;
|
|
1687
|
-
f.status = p.status, f.response = p.errormsg,
|
|
1708
|
+
f.status = p.status, f.response = p.errormsg, n && n(f);
|
|
1688
1709
|
}
|
|
1689
1710
|
});
|
|
1690
1711
|
});
|
|
1691
1712
|
}
|
|
1692
|
-
function Ye(e, t,
|
|
1713
|
+
function Ye(e, t, s = void 0, n = void 0) {
|
|
1693
1714
|
const o = `${e.space}/api/idea/delete`, c = {
|
|
1694
1715
|
params: {
|
|
1695
1716
|
community_id: t.community_id,
|
|
1696
1717
|
ideationIds: [t.idee_id]
|
|
1697
1718
|
}
|
|
1698
1719
|
};
|
|
1699
|
-
w(e, (
|
|
1720
|
+
w(e, (r) => {
|
|
1700
1721
|
m(o, {
|
|
1701
1722
|
method: "POST",
|
|
1702
1723
|
headers: {
|
|
1703
1724
|
"Content-type": "application/json;charset=UTF-8",
|
|
1704
1725
|
Accept: "application/json",
|
|
1705
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1726
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1706
1727
|
},
|
|
1707
1728
|
data: JSON.stringify(c),
|
|
1708
1729
|
type: "json",
|
|
1709
|
-
onComplete(a,
|
|
1710
|
-
|
|
1730
|
+
onComplete(a, i, d) {
|
|
1731
|
+
s && s(a);
|
|
1711
1732
|
},
|
|
1712
|
-
onFailure(a,
|
|
1733
|
+
onFailure(a, i, d) {
|
|
1713
1734
|
const l = a;
|
|
1714
|
-
l.status =
|
|
1735
|
+
l.status = i.status, l.response = i.errormsg, n && n(l);
|
|
1715
1736
|
}
|
|
1716
1737
|
});
|
|
1717
1738
|
});
|
|
1718
1739
|
}
|
|
1719
|
-
function He(e, t = "",
|
|
1740
|
+
function He(e, t = "", s = void 0, n = void 0) {
|
|
1720
1741
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1721
1742
|
t === "" && (t = o);
|
|
1722
|
-
const c = `${e.space}/api/idea/get`,
|
|
1743
|
+
const c = `${e.space}/api/idea/get`, r = {
|
|
1723
1744
|
params: {
|
|
1724
1745
|
id: t
|
|
1725
1746
|
}
|
|
@@ -1732,38 +1753,38 @@ function He(e, t = "", n = void 0, s = void 0) {
|
|
|
1732
1753
|
Accept: "application/json",
|
|
1733
1754
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1734
1755
|
},
|
|
1735
|
-
data: JSON.stringify(
|
|
1756
|
+
data: JSON.stringify(r),
|
|
1736
1757
|
type: "json",
|
|
1737
|
-
onComplete(
|
|
1738
|
-
const d =
|
|
1739
|
-
d.msg = d.result.message,
|
|
1758
|
+
onComplete(i) {
|
|
1759
|
+
const d = i;
|
|
1760
|
+
d.msg = d.result.message, s && s(d);
|
|
1740
1761
|
},
|
|
1741
|
-
onFailure(
|
|
1742
|
-
const d =
|
|
1743
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1762
|
+
onFailure(i) {
|
|
1763
|
+
const d = i;
|
|
1764
|
+
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1744
1765
|
}
|
|
1745
1766
|
});
|
|
1746
1767
|
});
|
|
1747
1768
|
}
|
|
1748
|
-
function ze(e, t = te,
|
|
1769
|
+
function ze(e, t = te, s = void 0, n = void 0) {
|
|
1749
1770
|
const o = {
|
|
1750
1771
|
uri: "/api/idea/list",
|
|
1751
1772
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1752
1773
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1753
1774
|
}, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1754
|
-
w(e, (
|
|
1775
|
+
w(e, (r) => {
|
|
1755
1776
|
m(c, {
|
|
1756
1777
|
method: "GET",
|
|
1757
1778
|
headers: {
|
|
1758
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1779
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1759
1780
|
},
|
|
1760
1781
|
onComplete(a) {
|
|
1761
|
-
const
|
|
1762
|
-
|
|
1782
|
+
const i = JSON.parse(a);
|
|
1783
|
+
s && s(i);
|
|
1763
1784
|
},
|
|
1764
|
-
onFailure(a,
|
|
1785
|
+
onFailure(a, i) {
|
|
1765
1786
|
const d = a;
|
|
1766
|
-
d.status =
|
|
1787
|
+
d.status = i.status, d.response = i.errormsg, n && n(d);
|
|
1767
1788
|
}
|
|
1768
1789
|
});
|
|
1769
1790
|
});
|
|
@@ -1843,26 +1864,26 @@ function ne(e) {
|
|
|
1843
1864
|
<p>
|
|
1844
1865
|
</p>` : e;
|
|
1845
1866
|
}
|
|
1846
|
-
function qe(e, t = void 0,
|
|
1847
|
-
const
|
|
1867
|
+
function qe(e, t = void 0, s = void 0) {
|
|
1868
|
+
const n = e.space + "/api/user/getcurrent/";
|
|
1848
1869
|
w(e, (o) => {
|
|
1849
|
-
m(
|
|
1870
|
+
m(n, {
|
|
1850
1871
|
method: "GET",
|
|
1851
1872
|
headers: {
|
|
1852
1873
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1853
1874
|
},
|
|
1854
|
-
onComplete(c,
|
|
1855
|
-
const
|
|
1856
|
-
t && t(
|
|
1875
|
+
onComplete(c, r, a) {
|
|
1876
|
+
const i = JSON.parse(c);
|
|
1877
|
+
t && t(i.result);
|
|
1857
1878
|
},
|
|
1858
|
-
onFailure(c,
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1879
|
+
onFailure(c, r, a) {
|
|
1880
|
+
const i = { erreur: JSON.parse(c), headers: r, xhr: a };
|
|
1881
|
+
s && s(i);
|
|
1861
1882
|
}
|
|
1862
1883
|
});
|
|
1863
1884
|
});
|
|
1864
1885
|
}
|
|
1865
|
-
function Qe(e, t,
|
|
1886
|
+
function Qe(e, t, s = void 0, n = void 0) {
|
|
1866
1887
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1867
1888
|
w(
|
|
1868
1889
|
e,
|
|
@@ -1870,16 +1891,16 @@ function Qe(e, t, n = void 0, s = void 0) {
|
|
|
1870
1891
|
m(o, {
|
|
1871
1892
|
method: "GET",
|
|
1872
1893
|
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1873
|
-
onComplete(
|
|
1874
|
-
const d = JSON.parse(
|
|
1875
|
-
|
|
1894
|
+
onComplete(r, a, i) {
|
|
1895
|
+
const d = JSON.parse(r);
|
|
1896
|
+
s && s(d);
|
|
1876
1897
|
},
|
|
1877
|
-
onFailure(
|
|
1878
|
-
|
|
1898
|
+
onFailure(r) {
|
|
1899
|
+
n && n(r);
|
|
1879
1900
|
}
|
|
1880
1901
|
});
|
|
1881
1902
|
},
|
|
1882
|
-
|
|
1903
|
+
n
|
|
1883
1904
|
);
|
|
1884
1905
|
}
|
|
1885
1906
|
function Ze(e) {
|