@beam3_dev/api_module 0.0.81 → 0.0.83
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 +551 -545
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +5 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
2
|
import { DateTime as N } from "luxon";
|
|
3
|
-
import { requirejs as O, widget as
|
|
3
|
+
import { requirejs as O, widget as $ } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function I() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
@@ -34,23 +34,23 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
38
|
-
const
|
|
37
|
+
async function oe(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: {
|
|
44
44
|
Accept: "application/json"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
).then((
|
|
48
|
-
t && t(
|
|
49
|
-
}).catch((
|
|
50
|
-
|
|
47
|
+
).then((i) => i.json()).then((i) => {
|
|
48
|
+
t && t(i);
|
|
49
|
+
}).catch((i) => {
|
|
50
|
+
s && s(i), console.error("Erreur : " + i);
|
|
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
|
-
|
|
69
|
+
let s = N.now().year;
|
|
70
|
+
const n = e, i = [], c = (a) => {
|
|
71
|
+
for (let o in a)
|
|
72
|
+
i.push({ date: o, comment: a[o] });
|
|
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((o) => o.json()).then((o) => {
|
|
84
|
+
c(o);
|
|
85
|
+
}).catch((o) => console.error("Erreur : " + o));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = n.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
90
|
-
for (let
|
|
89
|
+
} : n;
|
|
90
|
+
for (let o of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start === N.fromISO(
|
|
92
|
+
(l) => l.start === N.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: N.fromISO(
|
|
96
|
-
end: N.fromISO(
|
|
94
|
+
name: "Férié : " + o.comment,
|
|
95
|
+
start: N.fromISO(o.date).toISODate(),
|
|
96
|
+
end: N.fromISO(o.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((i) => i.uuid === t.uuid);
|
|
105
|
+
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, c) => i.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
|
-
|
|
121
|
-
widgetId:
|
|
118
|
+
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
|
|
119
|
+
let n;
|
|
120
|
+
n === void 0 && (n = s.createProxy({
|
|
121
|
+
widgetId: $.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 =
|
|
136
|
-
|
|
134
|
+
(n) => {
|
|
135
|
+
(!e || e === "") && (e = $.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && 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(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
|
-
tenant:
|
|
153
|
-
user:
|
|
154
|
-
appsConfiguration:
|
|
152
|
+
tenant: s,
|
|
153
|
+
user: n,
|
|
154
|
+
appsConfiguration: i,
|
|
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
|
-
},
|
|
166
|
-
m(
|
|
165
|
+
}, i = `${n.base}${n.uri}${n.option}`;
|
|
166
|
+
m(i, {
|
|
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 o = JSON.parse(c), d = o.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, o);
|
|
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(
|
|
189
|
-
const a = JSON.parse(
|
|
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(i, c, r) {
|
|
189
|
+
const a = JSON.parse(i);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
|
-
onFailure(
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
onFailure(i, c) {
|
|
193
|
+
const r = i;
|
|
194
|
+
r.msg = c.errormsg, r.errCode = c.errorcode, s && s(r);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function Se(e, t,
|
|
199
|
-
let
|
|
200
|
-
m(
|
|
201
|
-
onComplete(c,
|
|
202
|
-
const
|
|
203
|
-
|
|
198
|
+
function Se(e, t, s = void 0, n = void 0) {
|
|
199
|
+
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
|
+
m(i, {
|
|
201
|
+
onComplete(c, r, a) {
|
|
202
|
+
const o = JSON.parse(c);
|
|
203
|
+
s && s(o);
|
|
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,
|
|
216
|
-
const { space:
|
|
215
|
+
function _e(e, t, s = void 0, n = void 0) {
|
|
216
|
+
const { space: i, currentUser: c } = e, a = `${i}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
218
|
+
}.URIUGr}`, o = {
|
|
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(o),
|
|
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:
|
|
244
|
+
function ye(e, t, s = void 0, n = void 0) {
|
|
245
|
+
const { space: i, tenant: c } = e, r = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${o}`;
|
|
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
|
|
264
|
-
const { space:
|
|
263
|
+
function J(e, t = void 0, s = void 0) {
|
|
264
|
+
const { space: n, tenant: i } = e, c = n, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, o = {
|
|
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: o,
|
|
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: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
281
281
|
"Content-Type": "application/json",
|
|
282
282
|
Accept: "application/json,text/javascript,*/*"
|
|
283
283
|
} };
|
|
@@ -286,21 +286,21 @@ function we(e, t = void 0, n = void 0) {
|
|
|
286
286
|
opts: d,
|
|
287
287
|
onComplete(l) {
|
|
288
288
|
const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
289
|
-
if (
|
|
290
|
-
const g = f.filter((_) => _.owner ===
|
|
291
|
-
u.iam = S, u.UG = f, u.iamMember = h,
|
|
289
|
+
if (i && Object.keys(i).length > 0) {
|
|
290
|
+
const g = f.filter((_) => _.owner === i.email), h = f.filter((_) => _.members.includes(i.email)), S = g.concat(h);
|
|
291
|
+
u.iam = S, u.UG = f, u.iamMember = h, J(
|
|
292
292
|
e,
|
|
293
293
|
(_) => {
|
|
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:
|
|
312
|
-
m(
|
|
311
|
+
const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
|
+
m(i, {
|
|
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, i = 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
|
+
}, o = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(o);
|
|
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
|
+
i && i(p);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function Oe(e, t,
|
|
339
|
+
function Oe(e, t, s, n = void 0, i = 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
|
+
i && i(d);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function be(e, t,
|
|
355
|
-
const { space:
|
|
356
|
-
m(
|
|
354
|
+
function be(e, t, s = void 0, n = void 0) {
|
|
355
|
+
const { space: i } = e, r = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
+
m(r, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
359
359
|
headers: {
|
|
@@ -362,91 +362,91 @@ 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
|
|
372
|
+
async function E(e, t, s) {
|
|
373
373
|
if (e.space) {
|
|
374
|
-
const
|
|
375
|
-
m(
|
|
376
|
-
onComplete(
|
|
377
|
-
|
|
374
|
+
const n = `${e.space}/resources/v1/application/CSRF`;
|
|
375
|
+
m(n, {
|
|
376
|
+
onComplete(i) {
|
|
377
|
+
i = JSON.parse(i), t && t(i.csrf);
|
|
378
378
|
},
|
|
379
|
-
onFailure(
|
|
380
|
-
|
|
379
|
+
onFailure(i, c, r) {
|
|
380
|
+
s && s({ error: i, headers: c, xhr: r });
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
async function G(e, t = void 0,
|
|
386
|
-
const
|
|
385
|
+
async function G(e, t = void 0, s = void 0, n = void 0) {
|
|
386
|
+
const i = 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 c =
|
|
391
|
+
const c = i + `/resources/v1/modeler/documents/${t}`;
|
|
392
392
|
m(c, {
|
|
393
|
-
onComplete(
|
|
394
|
-
const d = JSON.parse(
|
|
395
|
-
|
|
393
|
+
onComplete(r, a, o) {
|
|
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(
|
|
407
|
-
const a = JSON.parse(
|
|
404
|
+
let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
|
+
m(n, {
|
|
406
|
+
onComplete(i, c, r) {
|
|
407
|
+
const a = JSON.parse(i);
|
|
408
408
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
409
|
},
|
|
410
|
-
onFailure(
|
|
411
|
-
|
|
410
|
+
onFailure(i) {
|
|
411
|
+
s && s(i);
|
|
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(
|
|
430
|
-
const a = JSON.parse(
|
|
427
|
+
const n = e.space + "/resources/v1/application/CSRF";
|
|
428
|
+
m(n, {
|
|
429
|
+
onComplete(i, c, r) {
|
|
430
|
+
const a = JSON.parse(i);
|
|
431
431
|
t && t(a.csrf.value);
|
|
432
432
|
},
|
|
433
|
-
onFailure(
|
|
434
|
-
|
|
435
|
-
response:
|
|
433
|
+
onFailure(i, c, r) {
|
|
434
|
+
s && s({
|
|
435
|
+
response: i,
|
|
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
|
-
(
|
|
449
|
-
m(
|
|
448
|
+
(i) => {
|
|
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
|
-
(
|
|
464
|
-
console.warn("_3DSpace_get_ticket / error => ",
|
|
463
|
+
(i) => {
|
|
464
|
+
console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
function Ne(e, t,
|
|
468
|
+
function Ne(e, t, s, n = void 0, i = 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
|
-
|
|
479
|
+
const o = a.data[0].dataelements.ticketURL;
|
|
480
|
+
n && n(o);
|
|
481
|
+
} catch (o) {
|
|
482
|
+
i && i(o);
|
|
483
483
|
}
|
|
484
484
|
},
|
|
485
|
-
onFailure(
|
|
486
|
-
|
|
485
|
+
onFailure(r) {
|
|
486
|
+
i && i(r);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function K(e, t,
|
|
490
|
+
function K(e, t, s, n, i, 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,
|
|
500
|
-
|
|
499
|
+
n,
|
|
500
|
+
i,
|
|
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, i, c, r = void 0, a = void 0) {
|
|
509
|
+
const o = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
510
|
+
m(o, {
|
|
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, i);
|
|
518
518
|
const g = {};
|
|
519
519
|
g.method = "POST", g.data = f, g.onComplete = function(h) {
|
|
520
520
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -527,9 +527,9 @@ function W(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
527
527
|
id: t,
|
|
528
528
|
relateddata: {
|
|
529
529
|
files: [{
|
|
530
|
-
id:
|
|
530
|
+
id: s,
|
|
531
531
|
dataelements: {
|
|
532
|
-
title:
|
|
532
|
+
title: i,
|
|
533
533
|
receipt: h
|
|
534
534
|
},
|
|
535
535
|
updateAction: "REVISE"
|
|
@@ -540,7 +540,7 @@ function W(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
540
540
|
}),
|
|
541
541
|
type: "json",
|
|
542
542
|
onComplete(y) {
|
|
543
|
-
|
|
543
|
+
r && r(y);
|
|
544
544
|
},
|
|
545
545
|
onFailure(y) {
|
|
546
546
|
a && a(y);
|
|
@@ -556,14 +556,14 @@ function W(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
async function ke(e, t,
|
|
560
|
-
const
|
|
559
|
+
async function ke(e, t, s, n, i = void 0, c = void 0) {
|
|
560
|
+
const r = e.space, a = e.token, o = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
561
561
|
type: "text/plain"
|
|
562
562
|
}), p = {
|
|
563
|
-
url_Ticket: `${
|
|
564
|
-
url_Post: `${
|
|
563
|
+
url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
564
|
+
url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`
|
|
565
565
|
};
|
|
566
|
-
if (!
|
|
566
|
+
if (!r && r !== "") {
|
|
567
567
|
console.log("le store._3DSpace est vide");
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
@@ -574,12 +574,12 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
574
574
|
},
|
|
575
575
|
onComplete(u, f, g) {
|
|
576
576
|
const h = JSON.parse(u).data[0].dataelements;
|
|
577
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l,
|
|
577
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
|
|
578
578
|
const S = {
|
|
579
579
|
method: "POST",
|
|
580
580
|
data: d,
|
|
581
581
|
onComplete(T) {
|
|
582
|
-
if (
|
|
582
|
+
if (o !== "" && a !== "") {
|
|
583
583
|
const D = {
|
|
584
584
|
method: "POST",
|
|
585
585
|
headers: {
|
|
@@ -591,14 +591,14 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
591
591
|
data: [{
|
|
592
592
|
type: "Document",
|
|
593
593
|
dataelements: {
|
|
594
|
-
title: `Title_${
|
|
594
|
+
title: `Title_${s.toLowerCase().split(" ").join("_")}`,
|
|
595
595
|
policy: "Document Release",
|
|
596
|
-
description:
|
|
596
|
+
description: n
|
|
597
597
|
},
|
|
598
598
|
relateddata: {
|
|
599
599
|
files: [{
|
|
600
600
|
dataelements: {
|
|
601
|
-
title: `${
|
|
601
|
+
title: `${s}.json`,
|
|
602
602
|
receipt: T
|
|
603
603
|
}
|
|
604
604
|
}]
|
|
@@ -611,14 +611,14 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
611
611
|
onComplete: _,
|
|
612
612
|
onFailure: y
|
|
613
613
|
};
|
|
614
|
-
|
|
614
|
+
o !== "" && m(p.url_Post, D);
|
|
615
615
|
} else
|
|
616
616
|
console.warn("le store est vide");
|
|
617
617
|
},
|
|
618
618
|
onFailure: y
|
|
619
619
|
};
|
|
620
620
|
function _(T) {
|
|
621
|
-
console.log("Success -- response ", T.data[0]),
|
|
621
|
+
console.log("Success -- response ", T.data[0]), i && i(T);
|
|
622
622
|
}
|
|
623
623
|
function y(T, D) {
|
|
624
624
|
console.log("Erreur -- response ", T, `
|
|
@@ -628,12 +628,12 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function b(e, t = void 0,
|
|
631
|
+
function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, r = !1) {
|
|
632
632
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
633
633
|
m(a, {
|
|
634
634
|
method: "GET",
|
|
635
|
-
onComplete(
|
|
636
|
-
const d = JSON.parse(
|
|
635
|
+
onComplete(o) {
|
|
636
|
+
const d = JSON.parse(o);
|
|
637
637
|
let l = "", p, u, f;
|
|
638
638
|
if (t) {
|
|
639
639
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -644,10 +644,10 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
|
|
|
644
644
|
(S, _, y) => _ === y.findIndex(
|
|
645
645
|
(T) => T.organization.pid === S.organization.pid && T.role.pid === S.role.pid
|
|
646
646
|
)
|
|
647
|
-
),
|
|
647
|
+
), s && (Array.isArray(s) ? s.forEach((S) => {
|
|
648
648
|
f || h.forEach((_) => {
|
|
649
|
-
if (S === _.role.name &&
|
|
650
|
-
f = S, u =
|
|
649
|
+
if (S === _.role.name && n === _.organization.title)
|
|
650
|
+
f = S, u = n;
|
|
651
651
|
else if (S === _.role.name) {
|
|
652
652
|
let y = h.filter(
|
|
653
653
|
(T) => T.role.name === S
|
|
@@ -656,104 +656,110 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
|
|
|
656
656
|
}
|
|
657
657
|
});
|
|
658
658
|
}) : h.forEach((S) => {
|
|
659
|
-
if (
|
|
660
|
-
f =
|
|
661
|
-
else if (
|
|
659
|
+
if (s === S.role.name && n === S.organization.title)
|
|
660
|
+
f = s, u = n;
|
|
661
|
+
else if (s === S.role.name) {
|
|
662
662
|
let _ = h.filter(
|
|
663
|
-
(y) => y.role.name ===
|
|
663
|
+
(y) => y.role.name === s
|
|
664
664
|
);
|
|
665
665
|
_.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
|
|
666
666
|
}
|
|
667
667
|
}));
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
p && u && f ? (l = f + "." + u + "." + p,
|
|
670
|
+
p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && r ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = f + "." + u + "." + p, c(l));
|
|
671
671
|
},
|
|
672
|
-
onFailure(
|
|
673
|
-
console.log("Erreur de récupération du contexte de sécurité. => ",
|
|
672
|
+
onFailure(o, d) {
|
|
673
|
+
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
674
|
+
err: o,
|
|
675
|
+
headers: d
|
|
676
|
+
});
|
|
674
677
|
}
|
|
675
678
|
});
|
|
676
679
|
}
|
|
677
|
-
async function R(e, t = void 0,
|
|
680
|
+
async function R(e, t = void 0, s = void 0) {
|
|
678
681
|
return (!e.objID || e.objID === "") && console.warn(
|
|
679
682
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
680
683
|
), (e.space === "" || !e.space) && console.warn(
|
|
681
684
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
682
|
-
), (e.token === "" || !e.token) && (
|
|
685
|
+
), (e.token === "" || !e.token) && (E(
|
|
683
686
|
e,
|
|
684
|
-
(
|
|
685
|
-
e.token =
|
|
687
|
+
(n) => {
|
|
688
|
+
e.token = n;
|
|
686
689
|
},
|
|
687
|
-
(
|
|
688
|
-
console.log("☠️ error => ",
|
|
690
|
+
(n) => {
|
|
691
|
+
console.log("☠️ error => ", n);
|
|
689
692
|
}
|
|
690
693
|
), console.warn(
|
|
691
694
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
692
|
-
)), new Promise((
|
|
695
|
+
)), new Promise((n, i) => {
|
|
693
696
|
U(
|
|
694
697
|
e,
|
|
695
|
-
(
|
|
696
|
-
m(
|
|
698
|
+
(c) => {
|
|
699
|
+
m(c, {
|
|
697
700
|
headers: {
|
|
698
701
|
"Content-Type": "application/json",
|
|
699
702
|
Accept: "application/json"
|
|
700
703
|
},
|
|
701
|
-
onComplete(
|
|
702
|
-
let
|
|
704
|
+
onComplete(a) {
|
|
705
|
+
let o;
|
|
703
706
|
try {
|
|
704
|
-
|
|
707
|
+
o = JSON.parse(a);
|
|
705
708
|
} catch {
|
|
706
|
-
|
|
709
|
+
o = a;
|
|
707
710
|
}
|
|
708
|
-
|
|
711
|
+
t && t(o), n(o);
|
|
709
712
|
},
|
|
710
|
-
onFailure(
|
|
711
|
-
|
|
712
|
-
msg: JSON.parse(
|
|
713
|
-
headers:
|
|
714
|
-
xhr:
|
|
715
|
-
}),
|
|
716
|
-
msg: JSON.parse(
|
|
717
|
-
headers:
|
|
718
|
-
xhr:
|
|
713
|
+
onFailure(a, o, d) {
|
|
714
|
+
s && (console.log("error http", a), s({
|
|
715
|
+
msg: JSON.parse(a),
|
|
716
|
+
headers: o,
|
|
717
|
+
xhr: d
|
|
718
|
+
}), i({
|
|
719
|
+
msg: JSON.parse(a),
|
|
720
|
+
headers: o,
|
|
721
|
+
xhr: d
|
|
719
722
|
}));
|
|
720
723
|
}
|
|
721
724
|
});
|
|
722
725
|
},
|
|
723
|
-
(
|
|
724
|
-
|
|
726
|
+
(c) => {
|
|
727
|
+
s && s(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
|
|
725
728
|
}
|
|
726
729
|
);
|
|
727
730
|
});
|
|
728
731
|
}
|
|
729
|
-
async function X(e, t,
|
|
730
|
-
let
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
732
|
+
async function X(e, t, s = void 0, n = void 0) {
|
|
733
|
+
let i = [];
|
|
734
|
+
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
735
|
+
for (let a = 0; a < t.length; a += 80) {
|
|
736
|
+
const o = t.slice(a, a + 80);
|
|
737
|
+
i.push(o);
|
|
738
|
+
}
|
|
739
|
+
const r = (a) => {
|
|
740
|
+
V(
|
|
741
|
+
e,
|
|
742
|
+
i[a],
|
|
743
|
+
() => {
|
|
744
|
+
a++, a < i.length && r(a);
|
|
745
|
+
},
|
|
746
|
+
(o) => {
|
|
747
|
+
s && s(o);
|
|
748
|
+
}
|
|
749
|
+
);
|
|
750
|
+
};
|
|
751
|
+
r(0);
|
|
752
|
+
} else
|
|
753
|
+
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
748
754
|
}
|
|
749
|
-
function V(e, t,
|
|
755
|
+
function V(e, t, s = void 0, n = void 0, i = void 0) {
|
|
750
756
|
const c = [];
|
|
751
|
-
t.forEach((
|
|
757
|
+
t.forEach((o) => {
|
|
752
758
|
c.push({
|
|
753
|
-
id:
|
|
759
|
+
id: o
|
|
754
760
|
});
|
|
755
761
|
});
|
|
756
|
-
let
|
|
762
|
+
let r = JSON.stringify({
|
|
757
763
|
csrf: {
|
|
758
764
|
name: "ENO_CSRF_TOKEN",
|
|
759
765
|
value: e.token
|
|
@@ -763,16 +769,16 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
763
769
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
764
770
|
m(a, {
|
|
765
771
|
method: "PUT",
|
|
766
|
-
data:
|
|
772
|
+
data: r,
|
|
767
773
|
type: "json",
|
|
768
|
-
onComplete(
|
|
769
|
-
const d =
|
|
770
|
-
|
|
774
|
+
onComplete(o) {
|
|
775
|
+
const d = o.data;
|
|
776
|
+
o.success === !0 && (s && s(), d.forEach((l) => {
|
|
771
777
|
try {
|
|
772
778
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
773
779
|
m(u, {
|
|
774
780
|
onComplete: (f) => {
|
|
775
|
-
|
|
781
|
+
n && n({
|
|
776
782
|
objectId: l.id,
|
|
777
783
|
fileName: p,
|
|
778
784
|
data: JSON.parse(f)
|
|
@@ -783,17 +789,17 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
783
789
|
}
|
|
784
790
|
});
|
|
785
791
|
} catch (p) {
|
|
786
|
-
console.log(p),
|
|
792
|
+
console.log(p), i && i(p);
|
|
787
793
|
}
|
|
788
794
|
}));
|
|
789
795
|
},
|
|
790
|
-
onFailure(
|
|
791
|
-
console.log(
|
|
796
|
+
onFailure(o) {
|
|
797
|
+
console.log(o), i && i(o);
|
|
792
798
|
}
|
|
793
799
|
});
|
|
794
800
|
}
|
|
795
|
-
function De(e, t,
|
|
796
|
-
return new Promise((
|
|
801
|
+
function De(e, t, s = void 0, n = void 0) {
|
|
802
|
+
return new Promise((i) => {
|
|
797
803
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
798
804
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
799
805
|
b(
|
|
@@ -806,7 +812,7 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
806
812
|
console.log("onError =>", a);
|
|
807
813
|
}
|
|
808
814
|
);
|
|
809
|
-
let
|
|
815
|
+
let r = {
|
|
810
816
|
method: "POST",
|
|
811
817
|
headers: {
|
|
812
818
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -821,28 +827,28 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
821
827
|
}),
|
|
822
828
|
type: "json",
|
|
823
829
|
onComplete(a) {
|
|
824
|
-
|
|
830
|
+
s && s(a);
|
|
825
831
|
},
|
|
826
832
|
onFailure(a) {
|
|
827
|
-
|
|
833
|
+
n && n(a);
|
|
828
834
|
}
|
|
829
835
|
};
|
|
830
|
-
m(c,
|
|
836
|
+
m(c, r);
|
|
831
837
|
}
|
|
832
838
|
});
|
|
833
839
|
}
|
|
834
|
-
function Fe(e, t,
|
|
840
|
+
function Fe(e, t, s, n = void 0, i = void 0) {
|
|
835
841
|
return new Promise((c) => {
|
|
836
842
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
837
|
-
const
|
|
843
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
838
844
|
b(
|
|
839
845
|
e.space,
|
|
840
846
|
"ESPACE COMMUN",
|
|
841
847
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
842
848
|
void 0,
|
|
843
|
-
(
|
|
844
|
-
(
|
|
845
|
-
console.log("onError =>",
|
|
849
|
+
(o) => e.ctx = o,
|
|
850
|
+
(o) => {
|
|
851
|
+
console.log("onError =>", o);
|
|
846
852
|
}
|
|
847
853
|
);
|
|
848
854
|
let a = {
|
|
@@ -856,23 +862,23 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
856
862
|
data: JSON.stringify({
|
|
857
863
|
data: [{
|
|
858
864
|
id: t,
|
|
859
|
-
nextState:
|
|
865
|
+
nextState: s
|
|
860
866
|
}]
|
|
861
867
|
}),
|
|
862
868
|
type: "json",
|
|
863
|
-
onComplete(
|
|
864
|
-
|
|
869
|
+
onComplete(o) {
|
|
870
|
+
n && n(o);
|
|
865
871
|
},
|
|
866
|
-
onFailure(
|
|
867
|
-
|
|
872
|
+
onFailure(o) {
|
|
873
|
+
i && i(o);
|
|
868
874
|
}
|
|
869
875
|
};
|
|
870
|
-
m(
|
|
876
|
+
m(r, a);
|
|
871
877
|
}
|
|
872
878
|
});
|
|
873
879
|
}
|
|
874
|
-
function Ue(e, t,
|
|
875
|
-
return new Promise((
|
|
880
|
+
function Ue(e, t, s = void 0, n = void 0) {
|
|
881
|
+
return new Promise((i) => {
|
|
876
882
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
877
883
|
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
878
884
|
b(
|
|
@@ -885,7 +891,7 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
885
891
|
console.log("onError =>", a);
|
|
886
892
|
}
|
|
887
893
|
);
|
|
888
|
-
let
|
|
894
|
+
let r = {
|
|
889
895
|
method: "POST",
|
|
890
896
|
headers: {
|
|
891
897
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -900,18 +906,18 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
900
906
|
}),
|
|
901
907
|
type: "json",
|
|
902
908
|
onComplete(a) {
|
|
903
|
-
|
|
909
|
+
s && s(a);
|
|
904
910
|
},
|
|
905
911
|
onFailure(a) {
|
|
906
|
-
|
|
912
|
+
n && n(a);
|
|
907
913
|
}
|
|
908
914
|
};
|
|
909
|
-
m(c,
|
|
915
|
+
m(c, r);
|
|
910
916
|
}
|
|
911
917
|
});
|
|
912
918
|
}
|
|
913
|
-
function je(e, t,
|
|
914
|
-
return new Promise((
|
|
919
|
+
function je(e, t, s = void 0, n = void 0) {
|
|
920
|
+
return new Promise((i) => {
|
|
915
921
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
916
922
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
917
923
|
b(
|
|
@@ -924,7 +930,7 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
924
930
|
console.log("onError =>", a);
|
|
925
931
|
}
|
|
926
932
|
);
|
|
927
|
-
let
|
|
933
|
+
let r = {
|
|
928
934
|
method: "POST",
|
|
929
935
|
headers: {
|
|
930
936
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -945,28 +951,28 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
945
951
|
}),
|
|
946
952
|
type: "json",
|
|
947
953
|
onComplete(a) {
|
|
948
|
-
|
|
954
|
+
s && s(a);
|
|
949
955
|
},
|
|
950
956
|
onFailure(a) {
|
|
951
|
-
|
|
957
|
+
n && n(a);
|
|
952
958
|
}
|
|
953
959
|
};
|
|
954
|
-
m(c,
|
|
960
|
+
m(c, r);
|
|
955
961
|
}
|
|
956
962
|
});
|
|
957
963
|
}
|
|
958
|
-
function
|
|
964
|
+
function Ae(e, t, s, n = void 0, i = void 0) {
|
|
959
965
|
return new Promise((c) => {
|
|
960
966
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
961
|
-
const
|
|
967
|
+
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
962
968
|
b(
|
|
963
969
|
e.space,
|
|
964
970
|
"ESPACE COMMUN",
|
|
965
971
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
966
972
|
void 0,
|
|
967
|
-
(
|
|
968
|
-
(
|
|
969
|
-
console.log("onError =>",
|
|
973
|
+
(o) => e.ctx = o,
|
|
974
|
+
(o) => {
|
|
975
|
+
console.log("onError =>", o);
|
|
970
976
|
}
|
|
971
977
|
);
|
|
972
978
|
let a = {
|
|
@@ -980,95 +986,95 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
980
986
|
data: JSON.stringify({
|
|
981
987
|
data: [{
|
|
982
988
|
physicalid: t,
|
|
983
|
-
proposedRevision:
|
|
989
|
+
proposedRevision: s,
|
|
984
990
|
modifiedAttributes: {
|
|
985
|
-
revision:
|
|
991
|
+
revision: s
|
|
986
992
|
}
|
|
987
993
|
}],
|
|
988
994
|
folderid: null,
|
|
989
995
|
notificationTimeout: 600
|
|
990
996
|
}),
|
|
991
997
|
type: "json",
|
|
992
|
-
onComplete(
|
|
993
|
-
|
|
998
|
+
onComplete(o) {
|
|
999
|
+
n && n(o);
|
|
994
1000
|
},
|
|
995
|
-
onFailure(
|
|
996
|
-
|
|
1001
|
+
onFailure(o) {
|
|
1002
|
+
i && i(o);
|
|
997
1003
|
}
|
|
998
1004
|
};
|
|
999
|
-
m(
|
|
1005
|
+
m(r, a);
|
|
1000
1006
|
}
|
|
1001
1007
|
});
|
|
1002
1008
|
}
|
|
1003
1009
|
//!SECTION
|
|
1004
|
-
function
|
|
1005
|
-
const
|
|
1010
|
+
function $e(e, t = void 0, s = void 0) {
|
|
1011
|
+
const n = {
|
|
1006
1012
|
base: `${e.space}`,
|
|
1007
1013
|
uri: "/resources/bps/cspaces",
|
|
1008
1014
|
optTenant: `tenant=${e.tenant}`
|
|
1009
|
-
},
|
|
1010
|
-
m(
|
|
1015
|
+
}, i = `${n.base}${n.uri}?${n.optTenant}`;
|
|
1016
|
+
m(i, {
|
|
1011
1017
|
method: "GET",
|
|
1012
1018
|
headers: {
|
|
1013
1019
|
Accept: "application/json,text/javascript,*/*",
|
|
1014
1020
|
"Content-Type": "application/ds-json"
|
|
1015
1021
|
},
|
|
1016
|
-
onComplete(c,
|
|
1022
|
+
onComplete(c, r) {
|
|
1017
1023
|
const a = JSON.parse(c);
|
|
1018
|
-
t && t(a,
|
|
1024
|
+
t && t(a, r);
|
|
1019
1025
|
},
|
|
1020
|
-
onFailure(c,
|
|
1021
|
-
|
|
1026
|
+
onFailure(c, r, a) {
|
|
1027
|
+
s && s({ response: c, headers: r, xhr: a });
|
|
1022
1028
|
}
|
|
1023
1029
|
});
|
|
1024
1030
|
}
|
|
1025
|
-
function Ie(e, t,
|
|
1031
|
+
function Ie(e, t, s, n) {
|
|
1026
1032
|
U(
|
|
1027
1033
|
e.space,
|
|
1028
1034
|
t,
|
|
1029
|
-
(
|
|
1030
|
-
m(
|
|
1035
|
+
(i) => {
|
|
1036
|
+
m(i, {
|
|
1031
1037
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1032
1038
|
onComplete: (c) => {
|
|
1033
|
-
|
|
1039
|
+
s && s(c);
|
|
1034
1040
|
},
|
|
1035
1041
|
onFailure: (c) => {
|
|
1036
|
-
console.log("error http", c),
|
|
1042
|
+
console.log("error http", c), n && n(c);
|
|
1037
1043
|
}
|
|
1038
1044
|
});
|
|
1039
1045
|
}
|
|
1040
1046
|
);
|
|
1041
1047
|
}
|
|
1042
|
-
async function Re(e, t,
|
|
1043
|
-
return new Promise((
|
|
1048
|
+
async function Re(e, t, s = void 0, n = void 0) {
|
|
1049
|
+
return new Promise((i) => {
|
|
1044
1050
|
U(e, t, (c) => {
|
|
1045
1051
|
m(c, {
|
|
1046
|
-
onComplete: (
|
|
1047
|
-
onFailure: (
|
|
1048
|
-
|
|
1052
|
+
onComplete: (r, a, o) => (i(JSON.parse(r)), s && s(JSON.parse(r), a, o), i),
|
|
1053
|
+
onFailure: (r, a, o) => {
|
|
1054
|
+
n && n(r, a, o), console.log(r, a?.errormsg);
|
|
1049
1055
|
}
|
|
1050
1056
|
});
|
|
1051
1057
|
});
|
|
1052
1058
|
});
|
|
1053
1059
|
}
|
|
1054
|
-
function ve(e, t,
|
|
1060
|
+
function ve(e, t, s, n = void 0, i = void 0) {
|
|
1055
1061
|
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1056
1062
|
k(
|
|
1057
1063
|
e,
|
|
1058
|
-
|
|
1059
|
-
(
|
|
1060
|
-
const a =
|
|
1064
|
+
s,
|
|
1065
|
+
(r) => {
|
|
1066
|
+
const a = r.data[0].relateddata.files[0].id, o = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
|
|
1061
1067
|
K(
|
|
1062
1068
|
e,
|
|
1063
|
-
|
|
1069
|
+
s,
|
|
1064
1070
|
a,
|
|
1065
1071
|
c,
|
|
1066
|
-
|
|
1072
|
+
o,
|
|
1067
1073
|
(d) => {
|
|
1068
|
-
|
|
1074
|
+
n && n(d);
|
|
1069
1075
|
},
|
|
1070
1076
|
(d) => {
|
|
1071
|
-
|
|
1077
|
+
i && i(d);
|
|
1072
1078
|
}
|
|
1073
1079
|
);
|
|
1074
1080
|
}
|
|
@@ -1076,63 +1082,63 @@ function ve(e, t, n, s = void 0, o = void 0) {
|
|
|
1076
1082
|
}
|
|
1077
1083
|
let v, P;
|
|
1078
1084
|
const j = [];
|
|
1079
|
-
async function Pe(e, t = void 0,
|
|
1085
|
+
async function Pe(e, t = void 0, s = void 0) {
|
|
1080
1086
|
e.objID && e.objID !== "" ? k(
|
|
1081
1087
|
e,
|
|
1082
|
-
(
|
|
1083
|
-
t && t(
|
|
1088
|
+
(n) => {
|
|
1089
|
+
t && t(n);
|
|
1084
1090
|
},
|
|
1085
|
-
(
|
|
1086
|
-
|
|
1091
|
+
(n) => {
|
|
1092
|
+
s && s(n);
|
|
1087
1093
|
}
|
|
1088
1094
|
) : (e.objID === null || e.objID === "") && C(
|
|
1089
1095
|
e,
|
|
1090
|
-
(
|
|
1091
|
-
t && t({ rep:
|
|
1096
|
+
(n) => {
|
|
1097
|
+
t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
|
|
1092
1098
|
},
|
|
1093
|
-
(
|
|
1094
|
-
|
|
1099
|
+
(n) => {
|
|
1100
|
+
s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
|
|
1095
1101
|
}
|
|
1096
1102
|
);
|
|
1097
1103
|
}
|
|
1098
|
-
async function xe(e, t = void 0,
|
|
1104
|
+
async function xe(e, t = void 0, s = void 0) {
|
|
1099
1105
|
console.log("getDatasByTenant (getDocuments)", e), await R(
|
|
1100
1106
|
e,
|
|
1101
|
-
(
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1107
|
+
(n) => {
|
|
1108
|
+
const i = {};
|
|
1109
|
+
i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
|
|
1104
1110
|
},
|
|
1105
|
-
(
|
|
1106
|
-
|
|
1111
|
+
(n) => {
|
|
1112
|
+
s && s?.(n);
|
|
1107
1113
|
}
|
|
1108
1114
|
);
|
|
1109
1115
|
}
|
|
1110
|
-
function Me(e, t = void 0,
|
|
1111
|
-
const
|
|
1116
|
+
function Me(e, t = void 0, s = void 0) {
|
|
1117
|
+
const n = [];
|
|
1112
1118
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1113
1119
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1114
1120
|
return;
|
|
1115
1121
|
}
|
|
1116
|
-
e.objIds.forEach((
|
|
1122
|
+
e.objIds.forEach((i, c) => {
|
|
1117
1123
|
R(
|
|
1118
1124
|
e,
|
|
1119
|
-
|
|
1120
|
-
(
|
|
1121
|
-
|
|
1125
|
+
i.objID,
|
|
1126
|
+
(r) => {
|
|
1127
|
+
n.push({ [i.name]: r }), i.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
1128
|
}
|
|
1123
1129
|
);
|
|
1124
1130
|
});
|
|
1125
1131
|
}
|
|
1126
|
-
function B(e, t,
|
|
1132
|
+
function B(e, t, s = void 0, n = void 0) {
|
|
1127
1133
|
X(
|
|
1128
1134
|
e,
|
|
1129
1135
|
v,
|
|
1130
|
-
(
|
|
1136
|
+
(i) => {
|
|
1131
1137
|
const c = [...t];
|
|
1132
|
-
c.find((
|
|
1138
|
+
c.find((r) => r.objectID === i.objectId).data = i.data, P = c, j.push(i.data), s && s(j);
|
|
1133
1139
|
},
|
|
1134
|
-
(
|
|
1135
|
-
|
|
1140
|
+
(i) => {
|
|
1141
|
+
n && (n(i), console.log(i));
|
|
1136
1142
|
}
|
|
1137
1143
|
);
|
|
1138
1144
|
}
|
|
@@ -1156,22 +1162,22 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1156
1162
|
order_by: "desc",
|
|
1157
1163
|
tag: "testTag"
|
|
1158
1164
|
};
|
|
1159
|
-
function Le(e, t,
|
|
1160
|
-
const { space:
|
|
1165
|
+
function Le(e, t, s = void 0, n = void 0) {
|
|
1166
|
+
const { space: i, tenant: c } = e, { objId: r, pred: a, tag: o } = t, d = {
|
|
1161
1167
|
uri: "/resources/6w/tags",
|
|
1162
1168
|
otpCTX: "SecurityContext=preferred",
|
|
1163
1169
|
optTenant: `tenant=${c}`
|
|
1164
|
-
}, l = `${
|
|
1170
|
+
}, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1165
1171
|
tag: [
|
|
1166
1172
|
{
|
|
1167
1173
|
subject: [
|
|
1168
1174
|
{
|
|
1169
|
-
uri: `pid://${
|
|
1175
|
+
uri: `pid://${r}`
|
|
1170
1176
|
}
|
|
1171
1177
|
],
|
|
1172
1178
|
predicate: x[a],
|
|
1173
1179
|
object: {
|
|
1174
|
-
literal:
|
|
1180
|
+
literal: o
|
|
1175
1181
|
}
|
|
1176
1182
|
}
|
|
1177
1183
|
]
|
|
@@ -1189,46 +1195,46 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1189
1195
|
setTimeout(() => {
|
|
1190
1196
|
G(
|
|
1191
1197
|
e,
|
|
1192
|
-
|
|
1198
|
+
r,
|
|
1193
1199
|
(g) => {
|
|
1194
1200
|
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
1201
|
f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, q(
|
|
1196
1202
|
e,
|
|
1197
1203
|
t,
|
|
1198
1204
|
(y) => {
|
|
1199
|
-
|
|
1205
|
+
s && s(y);
|
|
1200
1206
|
},
|
|
1201
1207
|
(y) => {
|
|
1202
|
-
|
|
1208
|
+
n && n(y);
|
|
1203
1209
|
}
|
|
1204
1210
|
);
|
|
1205
1211
|
},
|
|
1206
1212
|
(g, h) => {
|
|
1207
1213
|
const S = g;
|
|
1208
|
-
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S),
|
|
1214
|
+
S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
|
|
1209
1215
|
}
|
|
1210
1216
|
);
|
|
1211
1217
|
}, 2e3);
|
|
1212
1218
|
},
|
|
1213
1219
|
onFailure(u, f) {
|
|
1214
1220
|
const g = u;
|
|
1215
|
-
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1221
|
+
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
|
|
1216
1222
|
}
|
|
1217
1223
|
});
|
|
1218
1224
|
}
|
|
1219
|
-
function q(e, t,
|
|
1225
|
+
function q(e, t, s = void 0, n = void 0) {
|
|
1220
1226
|
console.log("obj ", t);
|
|
1221
|
-
const
|
|
1227
|
+
const i = t.info.name, c = {
|
|
1222
1228
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1223
1229
|
uri: "/federated/search"
|
|
1224
|
-
},
|
|
1230
|
+
}, r = `${c.baseUrl}${c.uri}`, a = {
|
|
1225
1231
|
"Content-Type": "application/json",
|
|
1226
1232
|
Accept: "application/json,text/javascript,*/*"
|
|
1227
|
-
},
|
|
1233
|
+
}, o = I(), d = {
|
|
1228
1234
|
with_indexing_date: !0,
|
|
1229
1235
|
with_synthesis: !0,
|
|
1230
1236
|
with_nls: !1,
|
|
1231
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1237
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,
|
|
1232
1238
|
locale: "fr",
|
|
1233
1239
|
select_predicate: [
|
|
1234
1240
|
"ds6w:label",
|
|
@@ -1256,7 +1262,7 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1256
1262
|
],
|
|
1257
1263
|
with_synthesis_hierarchical: !0,
|
|
1258
1264
|
select_file: ["icon", "thumbnail_2d"],
|
|
1259
|
-
query:
|
|
1265
|
+
query: i,
|
|
1260
1266
|
specific_source_parameter: {
|
|
1261
1267
|
"3dspace": {
|
|
1262
1268
|
additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
|
|
@@ -1285,41 +1291,41 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1285
1291
|
}
|
|
1286
1292
|
}
|
|
1287
1293
|
};
|
|
1288
|
-
console.log("dataPattern => ", d), m(
|
|
1294
|
+
console.log("dataPattern => ", d), m(r, {
|
|
1289
1295
|
method: "POST",
|
|
1290
1296
|
headers: a,
|
|
1291
1297
|
data: JSON.stringify(d),
|
|
1292
1298
|
onComplete(l) {
|
|
1293
1299
|
const p = JSON.parse(l);
|
|
1294
|
-
|
|
1300
|
+
s(p);
|
|
1295
1301
|
},
|
|
1296
1302
|
onFailure(l, p) {
|
|
1297
1303
|
const u = l;
|
|
1298
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1304
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
|
|
1299
1305
|
}
|
|
1300
1306
|
});
|
|
1301
1307
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const { objId:
|
|
1308
|
+
function Je(e, t, s = void 0, n = void 0) {
|
|
1309
|
+
const { objId: i, pred: c, tag: r } = t, a = {
|
|
1304
1310
|
uri: "/resources/6w/tags",
|
|
1305
1311
|
otpCTX: "SecurityContext=preferred",
|
|
1306
1312
|
optTenant: `tenant=${e.tenant}`
|
|
1307
|
-
},
|
|
1313
|
+
}, o = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1308
1314
|
tag: [
|
|
1309
1315
|
{
|
|
1310
1316
|
subject: [
|
|
1311
1317
|
{
|
|
1312
|
-
uri: `pid://${
|
|
1318
|
+
uri: `pid://${i}`
|
|
1313
1319
|
}
|
|
1314
1320
|
],
|
|
1315
1321
|
predicate: x[c],
|
|
1316
1322
|
object: {
|
|
1317
|
-
literal:
|
|
1323
|
+
literal: r
|
|
1318
1324
|
}
|
|
1319
1325
|
}
|
|
1320
1326
|
]
|
|
1321
1327
|
};
|
|
1322
|
-
m(
|
|
1328
|
+
m(o, {
|
|
1323
1329
|
method: "DELETE",
|
|
1324
1330
|
data: JSON.stringify(d),
|
|
1325
1331
|
headers: {
|
|
@@ -1327,52 +1333,52 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1327
1333
|
Accept: "application/json,text/javascript,*/*"
|
|
1328
1334
|
},
|
|
1329
1335
|
onComplete(l) {
|
|
1330
|
-
|
|
1336
|
+
s && s(l);
|
|
1331
1337
|
},
|
|
1332
1338
|
onFailure(l, p) {
|
|
1333
1339
|
const u = l;
|
|
1334
|
-
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u),
|
|
1340
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
|
|
1335
1341
|
}
|
|
1336
1342
|
});
|
|
1337
1343
|
}
|
|
1338
|
-
function
|
|
1339
|
-
const { space:
|
|
1344
|
+
function Ee(e, t = "", s = void 0, n = void 0) {
|
|
1345
|
+
const { space: i } = e;
|
|
1340
1346
|
if (t === "")
|
|
1341
1347
|
return;
|
|
1342
1348
|
const c = {
|
|
1343
1349
|
uri: "/resources/v1/modeler/documents"
|
|
1344
|
-
},
|
|
1350
|
+
}, r = {
|
|
1345
1351
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1346
1352
|
Accept: "application/json,text/javascript,*/*"
|
|
1347
|
-
}, a = `${
|
|
1353
|
+
}, a = `${i}${c.uri}`, o = `$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
1354
|
m(a, {
|
|
1349
1355
|
method: "POST",
|
|
1350
|
-
headers:
|
|
1351
|
-
data:
|
|
1356
|
+
headers: r,
|
|
1357
|
+
data: o,
|
|
1352
1358
|
onComplete(d) {
|
|
1353
|
-
|
|
1359
|
+
s && s(JSON.parse(d));
|
|
1354
1360
|
},
|
|
1355
1361
|
onFailure(d, l) {
|
|
1356
1362
|
const p = d;
|
|
1357
|
-
p.msg = l.error,
|
|
1363
|
+
p.msg = l.error, n && n(p);
|
|
1358
1364
|
}
|
|
1359
1365
|
});
|
|
1360
1366
|
}
|
|
1361
|
-
async function w(e, t = void 0,
|
|
1362
|
-
const
|
|
1363
|
-
return m(
|
|
1364
|
-
onComplete(
|
|
1365
|
-
const a = JSON.parse(
|
|
1367
|
+
async function w(e, t = void 0, s = void 0) {
|
|
1368
|
+
const n = e.space + "/api/index/tk";
|
|
1369
|
+
return m(n, {
|
|
1370
|
+
onComplete(i, c, r) {
|
|
1371
|
+
const a = JSON.parse(i);
|
|
1366
1372
|
if (t)
|
|
1367
1373
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1368
1374
|
},
|
|
1369
|
-
onFailure(
|
|
1370
|
-
|
|
1375
|
+
onFailure(i) {
|
|
1376
|
+
s && s(i);
|
|
1371
1377
|
}
|
|
1372
1378
|
});
|
|
1373
1379
|
}
|
|
1374
|
-
function Ge(e, t = void 0,
|
|
1375
|
-
const
|
|
1380
|
+
function Ge(e, t = void 0, s = void 0) {
|
|
1381
|
+
const n = `${e.space}/api/exalead/whatsnew`, i = {
|
|
1376
1382
|
params: {
|
|
1377
1383
|
community_id: null,
|
|
1378
1384
|
hash_key: null,
|
|
@@ -1383,26 +1389,26 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1383
1389
|
}
|
|
1384
1390
|
};
|
|
1385
1391
|
w(e, (c) => {
|
|
1386
|
-
m(
|
|
1392
|
+
m(n, {
|
|
1387
1393
|
method: "POST",
|
|
1388
1394
|
headers: {
|
|
1389
1395
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1390
1396
|
"Content-type": "application/json;charset=UTF-8",
|
|
1391
1397
|
Accept: "application/json"
|
|
1392
1398
|
},
|
|
1393
|
-
data: JSON.stringify(
|
|
1399
|
+
data: JSON.stringify(i),
|
|
1394
1400
|
type: "json",
|
|
1395
|
-
onComplete(
|
|
1396
|
-
t && t(
|
|
1401
|
+
onComplete(r, a) {
|
|
1402
|
+
t && t(r, a);
|
|
1397
1403
|
},
|
|
1398
|
-
onFailure(
|
|
1399
|
-
|
|
1404
|
+
onFailure(r, a) {
|
|
1405
|
+
s && s(r, a);
|
|
1400
1406
|
}
|
|
1401
1407
|
});
|
|
1402
1408
|
});
|
|
1403
1409
|
}
|
|
1404
|
-
function Ke(e, t = void 0,
|
|
1405
|
-
const
|
|
1410
|
+
function Ke(e, t = void 0, s = void 0) {
|
|
1411
|
+
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1406
1412
|
params: {
|
|
1407
1413
|
idsToFilterArr: [],
|
|
1408
1414
|
mode: "offline",
|
|
@@ -1412,39 +1418,39 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1412
1418
|
}
|
|
1413
1419
|
};
|
|
1414
1420
|
w(e, (c) => {
|
|
1415
|
-
m(
|
|
1421
|
+
m(n, {
|
|
1416
1422
|
method: "POST",
|
|
1417
1423
|
headers: {
|
|
1418
1424
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1419
1425
|
"Content-type": "application/json;charset=UTF-8",
|
|
1420
1426
|
Accept: "application/json"
|
|
1421
1427
|
},
|
|
1422
|
-
data: JSON.stringify(
|
|
1428
|
+
data: JSON.stringify(i),
|
|
1423
1429
|
type: "json",
|
|
1424
|
-
onComplete(
|
|
1425
|
-
const
|
|
1426
|
-
t && t(
|
|
1430
|
+
onComplete(r, a) {
|
|
1431
|
+
const o = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1432
|
+
t && t(o, r);
|
|
1427
1433
|
},
|
|
1428
|
-
onFailure(
|
|
1429
|
-
|
|
1434
|
+
onFailure(r, a) {
|
|
1435
|
+
s && s(r, a);
|
|
1430
1436
|
}
|
|
1431
1437
|
});
|
|
1432
1438
|
});
|
|
1433
1439
|
}
|
|
1434
|
-
function We(e, t = void 0,
|
|
1435
|
-
const
|
|
1440
|
+
function We(e, t = void 0, s = void 0) {
|
|
1441
|
+
const n = {
|
|
1436
1442
|
base: e.space,
|
|
1437
1443
|
uri: "/api/community/listmycommunities",
|
|
1438
1444
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1439
1445
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1440
|
-
},
|
|
1441
|
-
w(e, (
|
|
1442
|
-
m(
|
|
1446
|
+
}, i = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
|
|
1447
|
+
w(e, (r) => {
|
|
1448
|
+
m(i, {
|
|
1443
1449
|
method: "GET",
|
|
1444
1450
|
headers: {
|
|
1445
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1451
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1446
1452
|
},
|
|
1447
|
-
onComplete(a,
|
|
1453
|
+
onComplete(a, o, d) {
|
|
1448
1454
|
const p = JSON.parse(a).result;
|
|
1449
1455
|
let u = 0;
|
|
1450
1456
|
p.forEach((f) => {
|
|
@@ -1462,74 +1468,74 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1462
1468
|
(h) => {
|
|
1463
1469
|
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1464
1470
|
},
|
|
1465
|
-
(h) =>
|
|
1471
|
+
(h) => s(h)
|
|
1466
1472
|
);
|
|
1467
1473
|
});
|
|
1468
1474
|
},
|
|
1469
|
-
onFailure(a,
|
|
1475
|
+
onFailure(a, o) {
|
|
1470
1476
|
const d = a;
|
|
1471
|
-
d.status =
|
|
1477
|
+
d.status = o.status, d.response = o.errormsg, s && s(d);
|
|
1472
1478
|
}
|
|
1473
1479
|
});
|
|
1474
1480
|
});
|
|
1475
1481
|
}
|
|
1476
|
-
function Q(e, t,
|
|
1477
|
-
const
|
|
1482
|
+
function Q(e, t, s, n) {
|
|
1483
|
+
const i = `${e.space}/api/community/listmembers`, c = {
|
|
1478
1484
|
params: {
|
|
1479
1485
|
page: e.page ? e.page : 1,
|
|
1480
1486
|
limit: e.limit ? e.limit : 50,
|
|
1481
1487
|
community_id: t
|
|
1482
1488
|
}
|
|
1483
1489
|
};
|
|
1484
|
-
w(e, (
|
|
1485
|
-
m(
|
|
1490
|
+
w(e, (r) => {
|
|
1491
|
+
m(i, {
|
|
1486
1492
|
method: "POST",
|
|
1487
1493
|
headers: {
|
|
1488
1494
|
"Content-type": "application/json;charset=UTF-8",
|
|
1489
1495
|
Accept: "application/json",
|
|
1490
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1496
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1491
1497
|
},
|
|
1492
1498
|
data: JSON.stringify(c),
|
|
1493
1499
|
type: "json",
|
|
1494
|
-
onComplete(a,
|
|
1495
|
-
|
|
1500
|
+
onComplete(a, o, d) {
|
|
1501
|
+
s && s(a);
|
|
1496
1502
|
},
|
|
1497
|
-
onFailure(a,
|
|
1503
|
+
onFailure(a, o) {
|
|
1498
1504
|
const d = a;
|
|
1499
|
-
d.status =
|
|
1505
|
+
d.status = o.status, d.response = o.errormsg, n && n(d);
|
|
1500
1506
|
}
|
|
1501
1507
|
});
|
|
1502
1508
|
});
|
|
1503
1509
|
}
|
|
1504
|
-
function Xe(e, t = void 0,
|
|
1505
|
-
const
|
|
1506
|
-
e.commu_id || (e.commu_id =
|
|
1507
|
-
const
|
|
1510
|
+
function Xe(e, t = void 0, s = void 0) {
|
|
1511
|
+
const n = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1512
|
+
e.commu_id || (e.commu_id = n);
|
|
1513
|
+
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1508
1514
|
w(e, (c) => {
|
|
1509
|
-
m(
|
|
1515
|
+
m(i, {
|
|
1510
1516
|
method: "GET",
|
|
1511
1517
|
headers: {
|
|
1512
1518
|
"Content-type": "application/json;charset=UTF-8",
|
|
1513
1519
|
Accept: "application/json",
|
|
1514
1520
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1515
1521
|
},
|
|
1516
|
-
onComplete(
|
|
1517
|
-
const a = JSON.parse(
|
|
1522
|
+
onComplete(r) {
|
|
1523
|
+
const a = JSON.parse(r);
|
|
1518
1524
|
t && t(a);
|
|
1519
1525
|
},
|
|
1520
|
-
onFailure(
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1526
|
+
onFailure(r, a) {
|
|
1527
|
+
const o = r;
|
|
1528
|
+
o.status = a.status, o.response = a.errormsg, s && s(o);
|
|
1523
1529
|
}
|
|
1524
1530
|
});
|
|
1525
1531
|
});
|
|
1526
1532
|
}
|
|
1527
|
-
function Ve(e, t,
|
|
1528
|
-
const { listAllContacts:
|
|
1529
|
-
console.log("__listAllContacts",
|
|
1530
|
-
const
|
|
1533
|
+
function Ve(e, t, s = void 0, n = void 0) {
|
|
1534
|
+
const { listAllContacts: i, currentUser: c } = e;
|
|
1535
|
+
console.log("__listAllContacts", i.hits);
|
|
1536
|
+
const r = `${e.space}/api/directmessages`, a = {
|
|
1531
1537
|
users: [c.login].concat(t.receipt)
|
|
1532
|
-
},
|
|
1538
|
+
}, o = {
|
|
1533
1539
|
id_msg: "",
|
|
1534
1540
|
senderId: e.currentUser.login,
|
|
1535
1541
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1539,14 +1545,14 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1539
1545
|
Z(
|
|
1540
1546
|
a.users,
|
|
1541
1547
|
(l) => {
|
|
1542
|
-
l !== void 0 && (
|
|
1548
|
+
l !== void 0 && (o.id_msg = l.id, d = !0, A(e, o));
|
|
1543
1549
|
},
|
|
1544
1550
|
(l) => {
|
|
1545
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l),
|
|
1551
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), o.id_msg = "";
|
|
1546
1552
|
}
|
|
1547
1553
|
), d === !1 && setTimeout(() => {
|
|
1548
1554
|
d === !1 && w(e, (l) => {
|
|
1549
|
-
m(
|
|
1555
|
+
m(r, {
|
|
1550
1556
|
method: "POST",
|
|
1551
1557
|
headers: {
|
|
1552
1558
|
"Content-Type": "application/json",
|
|
@@ -1557,52 +1563,52 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1557
1563
|
type: "json",
|
|
1558
1564
|
onComplete(p, u, f) {
|
|
1559
1565
|
const g = p;
|
|
1560
|
-
g.reponse = JSON.parse(f.response), g.status = f.status,
|
|
1566
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), o.id_msg = g.result.id, A(e, o);
|
|
1561
1567
|
},
|
|
1562
1568
|
onFailure(p, u, f) {
|
|
1563
1569
|
const g = p;
|
|
1564
|
-
g.msg = u.errormsg, g.status = u.status,
|
|
1570
|
+
g.msg = u.errormsg, g.status = u.status, n && n(g);
|
|
1565
1571
|
}
|
|
1566
1572
|
});
|
|
1567
1573
|
});
|
|
1568
1574
|
}, 500);
|
|
1569
1575
|
}
|
|
1570
|
-
function Z(e, t,
|
|
1571
|
-
const
|
|
1576
|
+
function Z(e, t, s, n) {
|
|
1577
|
+
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1572
1578
|
w(e, (c) => {
|
|
1573
|
-
m(
|
|
1579
|
+
m(i, {
|
|
1574
1580
|
method: "GET",
|
|
1575
1581
|
headers: {
|
|
1576
1582
|
Accept: "application/json,text/javascript,*/*",
|
|
1577
1583
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1578
1584
|
},
|
|
1579
|
-
onComplete(
|
|
1580
|
-
const a = JSON.parse(
|
|
1585
|
+
onComplete(r) {
|
|
1586
|
+
const a = JSON.parse(r), o = [];
|
|
1581
1587
|
a.result.forEach((p) => {
|
|
1582
|
-
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length &&
|
|
1588
|
+
p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && o.push(p);
|
|
1583
1589
|
});
|
|
1584
|
-
const d = t.sort(), l =
|
|
1590
|
+
const d = t.sort(), l = o.find((p) => {
|
|
1585
1591
|
const u = [];
|
|
1586
1592
|
return p.users.forEach((f) => {
|
|
1587
1593
|
u.push(f.login);
|
|
1588
1594
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1589
1595
|
});
|
|
1590
|
-
|
|
1596
|
+
s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
|
|
1591
1597
|
},
|
|
1592
|
-
onFailure(
|
|
1593
|
-
const a =
|
|
1594
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1598
|
+
onFailure(r) {
|
|
1599
|
+
const a = r;
|
|
1600
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
|
|
1595
1601
|
}
|
|
1596
1602
|
});
|
|
1597
1603
|
});
|
|
1598
1604
|
}
|
|
1599
|
-
function
|
|
1600
|
-
const
|
|
1605
|
+
function A(e, t, s = void 0, n = void 0) {
|
|
1606
|
+
const i = {
|
|
1601
1607
|
base: e.space,
|
|
1602
1608
|
uri: "/api/community",
|
|
1603
1609
|
id_msg: `${t.id_msg}`,
|
|
1604
1610
|
endUri: "/instantmessages"
|
|
1605
|
-
}, c = `${
|
|
1611
|
+
}, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, r = {
|
|
1606
1612
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1607
1613
|
accessState: null,
|
|
1608
1614
|
commentUri: null,
|
|
@@ -1620,25 +1626,25 @@ function $(e, t, n = void 0, s = void 0) {
|
|
|
1620
1626
|
Accept: "application/json",
|
|
1621
1627
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1622
1628
|
},
|
|
1623
|
-
data: JSON.stringify(
|
|
1629
|
+
data: JSON.stringify(r),
|
|
1624
1630
|
type: "json",
|
|
1625
|
-
onComplete(
|
|
1626
|
-
const p =
|
|
1627
|
-
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p),
|
|
1631
|
+
onComplete(o, d, l) {
|
|
1632
|
+
const p = o;
|
|
1633
|
+
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
|
|
1628
1634
|
},
|
|
1629
|
-
onFailure(
|
|
1630
|
-
const l =
|
|
1631
|
-
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l),
|
|
1635
|
+
onFailure(o, d) {
|
|
1636
|
+
const l = o;
|
|
1637
|
+
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1632
1638
|
}
|
|
1633
1639
|
});
|
|
1634
1640
|
});
|
|
1635
1641
|
}
|
|
1636
1642
|
function ee(e) {
|
|
1637
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1643
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1638
1644
|
return `<p>${e} </p>
|
|
1639
1645
|
<br/>
|
|
1640
1646
|
<hr/>
|
|
1641
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1647
|
+
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
|
|
1642
1648
|
}
|
|
1643
1649
|
const te = {
|
|
1644
1650
|
title: "TEST DEV COMMUNITY IDEA",
|
|
@@ -1650,16 +1656,16 @@ const te = {
|
|
|
1650
1656
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1651
1657
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1652
1658
|
};
|
|
1653
|
-
function Be(e, t,
|
|
1654
|
-
const
|
|
1655
|
-
(
|
|
1656
|
-
),
|
|
1657
|
-
(
|
|
1659
|
+
function Be(e, t, s = void 0, n = void 0) {
|
|
1660
|
+
const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1661
|
+
(o) => o.id === t.community_id
|
|
1662
|
+
), r = e.swymCommunities.find(
|
|
1663
|
+
(o) => o.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1658
1664
|
), a = {
|
|
1659
1665
|
params: {
|
|
1660
1666
|
title: t.title,
|
|
1661
1667
|
// String, le nom de l'affaire
|
|
1662
|
-
community_id: c?.id !== void 0 ? c.id :
|
|
1668
|
+
community_id: c?.id !== void 0 ? c.id : r.id,
|
|
1663
1669
|
// String, l'id de la communauté
|
|
1664
1670
|
message: ne(t.text_html),
|
|
1665
1671
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1667,59 +1673,59 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1667
1673
|
// 1 publier, 0 non publier
|
|
1668
1674
|
}
|
|
1669
1675
|
};
|
|
1670
|
-
w(e, (
|
|
1676
|
+
w(e, (o) => {
|
|
1671
1677
|
const d = {
|
|
1672
1678
|
"Content-type": "application/json;charset=UTF-8",
|
|
1673
1679
|
Accept: "application/json",
|
|
1674
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1680
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1675
1681
|
};
|
|
1676
|
-
m(
|
|
1682
|
+
m(i, {
|
|
1677
1683
|
method: "POST",
|
|
1678
1684
|
headers: d,
|
|
1679
1685
|
data: JSON.stringify(a),
|
|
1680
1686
|
type: "json",
|
|
1681
1687
|
onComplete(l, p, u) {
|
|
1682
1688
|
const f = JSON.parse(l);
|
|
1683
|
-
f.status = u.status, f.response = u.response,
|
|
1689
|
+
f.status = u.status, f.response = u.response, s && s(f);
|
|
1684
1690
|
},
|
|
1685
1691
|
onFailure(l, p, u) {
|
|
1686
1692
|
const f = l;
|
|
1687
|
-
f.status = p.status, f.response = p.errormsg,
|
|
1693
|
+
f.status = p.status, f.response = p.errormsg, n && n(f);
|
|
1688
1694
|
}
|
|
1689
1695
|
});
|
|
1690
1696
|
});
|
|
1691
1697
|
}
|
|
1692
|
-
function Ye(e, t,
|
|
1693
|
-
const
|
|
1698
|
+
function Ye(e, t, s = void 0, n = void 0) {
|
|
1699
|
+
const i = `${e.space}/api/idea/delete`, c = {
|
|
1694
1700
|
params: {
|
|
1695
1701
|
community_id: t.community_id,
|
|
1696
1702
|
ideationIds: [t.idee_id]
|
|
1697
1703
|
}
|
|
1698
1704
|
};
|
|
1699
|
-
w(e, (
|
|
1700
|
-
m(
|
|
1705
|
+
w(e, (r) => {
|
|
1706
|
+
m(i, {
|
|
1701
1707
|
method: "POST",
|
|
1702
1708
|
headers: {
|
|
1703
1709
|
"Content-type": "application/json;charset=UTF-8",
|
|
1704
1710
|
Accept: "application/json",
|
|
1705
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1711
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1706
1712
|
},
|
|
1707
1713
|
data: JSON.stringify(c),
|
|
1708
1714
|
type: "json",
|
|
1709
|
-
onComplete(a,
|
|
1710
|
-
|
|
1715
|
+
onComplete(a, o, d) {
|
|
1716
|
+
s && s(a);
|
|
1711
1717
|
},
|
|
1712
|
-
onFailure(a,
|
|
1718
|
+
onFailure(a, o, d) {
|
|
1713
1719
|
const l = a;
|
|
1714
|
-
l.status =
|
|
1720
|
+
l.status = o.status, l.response = o.errormsg, n && n(l);
|
|
1715
1721
|
}
|
|
1716
1722
|
});
|
|
1717
1723
|
});
|
|
1718
1724
|
}
|
|
1719
|
-
function He(e, t = "",
|
|
1720
|
-
const
|
|
1721
|
-
t === "" && (t =
|
|
1722
|
-
const c = `${e.space}/api/idea/get`,
|
|
1725
|
+
function He(e, t = "", s = void 0, n = void 0) {
|
|
1726
|
+
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1727
|
+
t === "" && (t = i);
|
|
1728
|
+
const c = `${e.space}/api/idea/get`, r = {
|
|
1723
1729
|
params: {
|
|
1724
1730
|
id: t
|
|
1725
1731
|
}
|
|
@@ -1732,38 +1738,38 @@ function He(e, t = "", n = void 0, s = void 0) {
|
|
|
1732
1738
|
Accept: "application/json",
|
|
1733
1739
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1734
1740
|
},
|
|
1735
|
-
data: JSON.stringify(
|
|
1741
|
+
data: JSON.stringify(r),
|
|
1736
1742
|
type: "json",
|
|
1737
|
-
onComplete(
|
|
1738
|
-
const d =
|
|
1739
|
-
d.msg = d.result.message,
|
|
1743
|
+
onComplete(o) {
|
|
1744
|
+
const d = o;
|
|
1745
|
+
d.msg = d.result.message, s && s(d);
|
|
1740
1746
|
},
|
|
1741
|
-
onFailure(
|
|
1742
|
-
const d =
|
|
1743
|
-
d.status = headers.status, d.response = headers.errormsg,
|
|
1747
|
+
onFailure(o) {
|
|
1748
|
+
const d = o;
|
|
1749
|
+
d.status = headers.status, d.response = headers.errormsg, n && n(d);
|
|
1744
1750
|
}
|
|
1745
1751
|
});
|
|
1746
1752
|
});
|
|
1747
1753
|
}
|
|
1748
|
-
function ze(e, t = te,
|
|
1749
|
-
const
|
|
1754
|
+
function ze(e, t = te, s = void 0, n = void 0) {
|
|
1755
|
+
const i = {
|
|
1750
1756
|
uri: "/api/idea/list",
|
|
1751
1757
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1752
1758
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1753
|
-
}, c = `${e.space}${
|
|
1754
|
-
w(e, (
|
|
1759
|
+
}, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
|
|
1760
|
+
w(e, (r) => {
|
|
1755
1761
|
m(c, {
|
|
1756
1762
|
method: "GET",
|
|
1757
1763
|
headers: {
|
|
1758
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1764
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1759
1765
|
},
|
|
1760
1766
|
onComplete(a) {
|
|
1761
|
-
const
|
|
1762
|
-
|
|
1767
|
+
const o = JSON.parse(a);
|
|
1768
|
+
s && s(o);
|
|
1763
1769
|
},
|
|
1764
|
-
onFailure(a,
|
|
1770
|
+
onFailure(a, o) {
|
|
1765
1771
|
const d = a;
|
|
1766
|
-
d.status =
|
|
1772
|
+
d.status = o.status, d.response = o.errormsg, n && n(d);
|
|
1767
1773
|
}
|
|
1768
1774
|
});
|
|
1769
1775
|
});
|
|
@@ -1843,43 +1849,43 @@ function ne(e) {
|
|
|
1843
1849
|
<p>
|
|
1844
1850
|
</p>` : e;
|
|
1845
1851
|
}
|
|
1846
|
-
function qe(e, t = void 0,
|
|
1847
|
-
const
|
|
1848
|
-
w(e, (
|
|
1849
|
-
m(
|
|
1852
|
+
function qe(e, t = void 0, s = void 0) {
|
|
1853
|
+
const n = e.space + "/api/user/getcurrent/";
|
|
1854
|
+
w(e, (i) => {
|
|
1855
|
+
m(n, {
|
|
1850
1856
|
method: "GET",
|
|
1851
1857
|
headers: {
|
|
1852
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1858
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1853
1859
|
},
|
|
1854
|
-
onComplete(c,
|
|
1855
|
-
const
|
|
1856
|
-
t && t(
|
|
1860
|
+
onComplete(c, r, a) {
|
|
1861
|
+
const o = JSON.parse(c);
|
|
1862
|
+
t && t(o.result);
|
|
1857
1863
|
},
|
|
1858
|
-
onFailure(c,
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1864
|
+
onFailure(c, r, a) {
|
|
1865
|
+
const o = { erreur: JSON.parse(c), headers: r, xhr: a };
|
|
1866
|
+
s && s(o);
|
|
1861
1867
|
}
|
|
1862
1868
|
});
|
|
1863
1869
|
});
|
|
1864
1870
|
}
|
|
1865
|
-
function Qe(e, t,
|
|
1866
|
-
const
|
|
1871
|
+
function Qe(e, t, s = void 0, n = void 0) {
|
|
1872
|
+
const i = e.space + "/api/user/find/login/" + t;
|
|
1867
1873
|
w(
|
|
1868
1874
|
e,
|
|
1869
1875
|
(c) => {
|
|
1870
|
-
m(
|
|
1876
|
+
m(i, {
|
|
1871
1877
|
method: "GET",
|
|
1872
1878
|
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1873
|
-
onComplete(
|
|
1874
|
-
const d = JSON.parse(
|
|
1875
|
-
|
|
1879
|
+
onComplete(r, a, o) {
|
|
1880
|
+
const d = JSON.parse(r);
|
|
1881
|
+
s && s(d);
|
|
1876
1882
|
},
|
|
1877
|
-
onFailure(
|
|
1878
|
-
|
|
1883
|
+
onFailure(r) {
|
|
1884
|
+
n && n(r);
|
|
1879
1885
|
}
|
|
1880
1886
|
});
|
|
1881
1887
|
},
|
|
1882
|
-
|
|
1888
|
+
n
|
|
1883
1889
|
);
|
|
1884
1890
|
}
|
|
1885
1891
|
function Ze(e) {
|
|
@@ -1900,7 +1906,7 @@ export {
|
|
|
1900
1906
|
V as _3DSpace_get_downloadTicket_multidoc,
|
|
1901
1907
|
b as _3DSpace_get_securityContexts,
|
|
1902
1908
|
U as _3DSpace_get_ticket,
|
|
1903
|
-
|
|
1909
|
+
Ae as _3DSpace_lifecycle_changeRevision,
|
|
1904
1910
|
Fe as _3DSpace_lifecycle_changeState,
|
|
1905
1911
|
Ue as _3DSpace_lifecycle_getGraph,
|
|
1906
1912
|
je as _3DSpace_lifecycle_getNextRevision,
|
|
@@ -1919,7 +1925,7 @@ export {
|
|
|
1919
1925
|
Qe as _3DSwym_get_findUser,
|
|
1920
1926
|
w as _3DSwym_get_version,
|
|
1921
1927
|
Be as _3DSwym_postIdea,
|
|
1922
|
-
|
|
1928
|
+
A as _3DSwym_sendMessageData,
|
|
1923
1929
|
Se as _AppMngt_get_info_user,
|
|
1924
1930
|
he as _AppMngt_get_users,
|
|
1925
1931
|
me as _getPlateformInfos,
|
|
@@ -1935,24 +1941,24 @@ export {
|
|
|
1935
1941
|
B as dataMixing,
|
|
1936
1942
|
Te as deleteUserGroups,
|
|
1937
1943
|
re as findAdresse,
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1944
|
+
$e as getAllContextSecurity,
|
|
1945
|
+
E as getCSRFToken,
|
|
1946
|
+
oe as getCommunes,
|
|
1941
1947
|
ye as getComplementUG,
|
|
1942
1948
|
Ie as getDataFrom3DSpace,
|
|
1943
1949
|
ce as getDataFromGouvFr,
|
|
1944
1950
|
xe as getDatasByTenant,
|
|
1945
1951
|
Me as getDatasFrom3DSpace,
|
|
1946
1952
|
Re as getDownloadDocument,
|
|
1947
|
-
|
|
1953
|
+
Ee as getInfoDocTags,
|
|
1948
1954
|
we as getUserGroupsList,
|
|
1949
|
-
|
|
1955
|
+
J as getUsersGroupRules,
|
|
1950
1956
|
Pe as get_3DSpace_csrf,
|
|
1951
1957
|
Ce as patchUserGroups,
|
|
1952
1958
|
Oe as patchUserGroupsControl,
|
|
1953
1959
|
ve as pushDataIn3DSpace,
|
|
1954
1960
|
be as readUserGroupControl,
|
|
1955
|
-
|
|
1961
|
+
Je as removeTagToDoc,
|
|
1956
1962
|
Ze as sayHello,
|
|
1957
1963
|
de as updateEvent
|
|
1958
1964
|
};
|