@beam3_dev/api_module 0.0.227 → 0.0.228
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 +719 -676
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +7 -6
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v4 as
|
|
1
|
+
import { v4 as K } from "uuid";
|
|
2
2
|
import { DateTime as $ } from "luxon";
|
|
3
|
-
import { requirejs as I, widget as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
3
|
+
import { requirejs as I, widget as P } from "@widget-lab/3ddashboard-utils";
|
|
4
|
+
function B() {
|
|
5
|
+
return K();
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const V = {
|
|
8
8
|
b3M3Yellow: "#FFB300",
|
|
9
9
|
b3AboutageBlue: "#42A5F5",
|
|
10
10
|
b3UsinageGreen: "#689F38",
|
|
@@ -34,10 +34,10 @@ const W = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
38
|
-
const
|
|
37
|
+
async function Se(e, t = void 0, n = void 0) {
|
|
38
|
+
const s = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
|
-
"https://apicarto.ign.fr/api/codes-postaux/communes/" +
|
|
40
|
+
"https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
|
|
41
41
|
{
|
|
42
42
|
method: "GET",
|
|
43
43
|
headers: {
|
|
@@ -47,10 +47,10 @@ async function he(e, t = void 0, s = void 0) {
|
|
|
47
47
|
).then((i) => i.json()).then((i) => {
|
|
48
48
|
t && t(i);
|
|
49
49
|
}).catch((i) => {
|
|
50
|
-
|
|
50
|
+
n && n(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function _e(e, t = void 0, n = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -59,19 +59,19 @@ async function ye(e, t = void 0, s = void 0) {
|
|
|
59
59
|
Accept: "application/json"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
).then((
|
|
63
|
-
t && t(
|
|
64
|
-
}).catch((
|
|
65
|
-
|
|
62
|
+
).then((s) => s.json()).then((s) => {
|
|
63
|
+
t && t(s);
|
|
64
|
+
}).catch((s) => {
|
|
65
|
+
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
69
|
-
let
|
|
70
|
-
const
|
|
68
|
+
async function we(e, t = V) {
|
|
69
|
+
let n = $.now().year;
|
|
70
|
+
const s = e, i = [], r = (a) => {
|
|
71
71
|
for (let c in a)
|
|
72
72
|
i.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
74
|
-
for (let a =
|
|
74
|
+
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
76
76
|
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
|
|
77
77
|
{
|
|
@@ -84,12 +84,12 @@ async function Se(e, t = W) {
|
|
|
84
84
|
r(c);
|
|
85
85
|
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
|
-
const a =
|
|
87
|
+
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
|
-
} :
|
|
89
|
+
} : s;
|
|
90
90
|
for (let c of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(
|
|
92
|
+
(u) => u.start === $.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
95
|
start: $.fromISO(c.date).toISODate(),
|
|
@@ -100,26 +100,26 @@ async function Se(e, t = W) {
|
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
const { credentials:
|
|
103
|
+
function W(e, t, n) {
|
|
104
|
+
const { credentials: s, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
|
|
105
105
|
for (let c = 0; c < i.length; c += r) {
|
|
106
106
|
const d = i.slice(c, c + r);
|
|
107
107
|
a.push(d);
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
{ credentials:
|
|
109
|
+
X(
|
|
110
|
+
{ credentials: s, chunks: a, initLoop: 0, fn: o },
|
|
111
111
|
(c) => {
|
|
112
112
|
t && t(c);
|
|
113
113
|
},
|
|
114
114
|
(c) => {
|
|
115
|
-
|
|
115
|
+
n && n(c);
|
|
116
116
|
}
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
const { credentials:
|
|
119
|
+
function X(e, t, n) {
|
|
120
|
+
const { credentials: s, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
|
|
121
121
|
o(
|
|
122
|
-
|
|
122
|
+
s,
|
|
123
123
|
i[c],
|
|
124
124
|
() => {
|
|
125
125
|
c++, c < i.length && a(c);
|
|
@@ -128,97 +128,97 @@ function q(e, t, s) {
|
|
|
128
128
|
t && t(d);
|
|
129
129
|
},
|
|
130
130
|
(d) => {
|
|
131
|
-
|
|
131
|
+
n && n(d);
|
|
132
132
|
}
|
|
133
133
|
);
|
|
134
134
|
};
|
|
135
135
|
a(r);
|
|
136
136
|
}
|
|
137
|
-
async function
|
|
138
|
-
const
|
|
139
|
-
return
|
|
137
|
+
async function Ce(e, t, n = !0) {
|
|
138
|
+
const s = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
139
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
|
|
140
140
|
}
|
|
141
141
|
function m(e, t) {
|
|
142
|
-
I(["DS/WAFData/WAFData"], (
|
|
143
|
-
|
|
142
|
+
I(["DS/WAFData/WAFData"], (n) => {
|
|
143
|
+
n.authenticatedRequest(e, t);
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
I(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
148
|
-
|
|
146
|
+
function Te(e, t, n) {
|
|
147
|
+
I(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
148
|
+
s.draggable(e, {
|
|
149
149
|
data: t,
|
|
150
|
-
start:
|
|
150
|
+
start: n
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
I(["DS/TagNavigatorProxy/TagNavigatorProxy"], (
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
widgetId:
|
|
154
|
+
function be(e, t = void 0) {
|
|
155
|
+
I(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
156
|
+
let s;
|
|
157
|
+
s === void 0 && (s = n.createProxy({
|
|
158
|
+
widgetId: P.id,
|
|
159
159
|
filteringMode: "WithFilteringServices"
|
|
160
|
-
}), t !== void 0 &&
|
|
160
|
+
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
I(["DS/DataDragAndDrop/DataDragAndDrop"], (
|
|
165
|
-
|
|
163
|
+
function Oe(e, t) {
|
|
164
|
+
I(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
165
|
+
n.droppable(e, {
|
|
166
166
|
drop: t
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
170
|
+
async function $e(e, t = void 0, n = void 0) {
|
|
171
171
|
await I(
|
|
172
172
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
173
|
-
(
|
|
174
|
-
(!e || e === "") && (e =
|
|
175
|
-
|
|
173
|
+
(s) => {
|
|
174
|
+
(!e || e === "") && (e = P.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
175
|
+
s.getPlatformServices({
|
|
176
176
|
platformId: e,
|
|
177
177
|
onComplete: t,
|
|
178
|
-
onFailure:
|
|
178
|
+
onFailure: n
|
|
179
179
|
})
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function q() {
|
|
185
185
|
let e = {};
|
|
186
186
|
return I(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
187
|
-
const
|
|
187
|
+
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
188
188
|
"com.3ds.wp.passport.cors"
|
|
189
189
|
);
|
|
190
190
|
e = {
|
|
191
|
-
tenant:
|
|
192
|
-
user:
|
|
191
|
+
tenant: n,
|
|
192
|
+
user: s,
|
|
193
193
|
appsConfiguration: i,
|
|
194
194
|
appConf: r
|
|
195
195
|
};
|
|
196
196
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
197
197
|
}
|
|
198
|
-
function b(e, t = void 0,
|
|
198
|
+
function b(e, t = void 0, n = void 0) {
|
|
199
199
|
if (e.tenant) {
|
|
200
|
-
const
|
|
201
|
-
m(
|
|
200
|
+
const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
201
|
+
m(s, {
|
|
202
202
|
onComplete(i) {
|
|
203
203
|
const r = typeof i == "string" ? JSON.parse(i) : i;
|
|
204
204
|
if (r && "platforms" in r) {
|
|
205
205
|
const o = r.platforms.find(
|
|
206
206
|
(a) => a.id === e.tenant.toUpperCase()
|
|
207
207
|
);
|
|
208
|
-
t && o ? t(o) :
|
|
208
|
+
t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
|
|
209
209
|
} else
|
|
210
|
-
|
|
210
|
+
n && n("_getServiceUrl return oResponse = undefined");
|
|
211
211
|
},
|
|
212
212
|
onFailure(i) {
|
|
213
|
-
|
|
213
|
+
n && n(i);
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Ie(e, t = void 0, n = void 0) {
|
|
219
219
|
if (e.tenant) {
|
|
220
|
-
const
|
|
221
|
-
m(
|
|
220
|
+
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
221
|
+
m(s, {
|
|
222
222
|
onComplete(i) {
|
|
223
223
|
const r = JSON.parse(i);
|
|
224
224
|
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
@@ -227,18 +227,18 @@ function Oe(e, t = void 0, s = void 0) {
|
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
onFailure(i) {
|
|
230
|
-
|
|
230
|
+
n && n(i);
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
const
|
|
235
|
+
function Ne(e, t, n) {
|
|
236
|
+
const s = {
|
|
237
237
|
base: `${e.space}`,
|
|
238
238
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
239
239
|
option: `?filter=${e.tenant}`
|
|
240
240
|
// facultatif
|
|
241
|
-
}, i = `${
|
|
241
|
+
}, i = `${s.base}${s.uri}${s.option}`;
|
|
242
242
|
m(i, {
|
|
243
243
|
method: "GET",
|
|
244
244
|
headers: {
|
|
@@ -246,49 +246,49 @@ function $e(e, t, s) {
|
|
|
246
246
|
Accept: "application/json"
|
|
247
247
|
},
|
|
248
248
|
onComplete(r, o, a) {
|
|
249
|
-
const c = JSON.parse(r), d = c.data.map((
|
|
250
|
-
const
|
|
251
|
-
return { name:
|
|
249
|
+
const c = JSON.parse(r), d = c.data.map((u) => {
|
|
250
|
+
const p = u.attributes.name, f = u.id;
|
|
251
|
+
return { name: p, id: f };
|
|
252
252
|
});
|
|
253
253
|
t && t(d, c);
|
|
254
254
|
},
|
|
255
255
|
onFailure(r, o) {
|
|
256
256
|
const a = r;
|
|
257
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
257
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
let
|
|
263
|
-
m(
|
|
261
|
+
function ve(e, t = void 0, n = void 0) {
|
|
262
|
+
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
263
|
+
m(s, {
|
|
264
264
|
onComplete(i, r, o) {
|
|
265
265
|
const a = JSON.parse(i);
|
|
266
266
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
267
267
|
},
|
|
268
268
|
onFailure(i, r) {
|
|
269
269
|
const o = i;
|
|
270
|
-
o.msg = r.errormsg, o.errCode = r.errorcode,
|
|
270
|
+
o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ke(e, t, n = void 0, s = void 0) {
|
|
275
275
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
276
276
|
m(i, {
|
|
277
277
|
onComplete(r, o, a) {
|
|
278
278
|
const c = JSON.parse(r);
|
|
279
|
-
|
|
279
|
+
n && n(c);
|
|
280
280
|
},
|
|
281
281
|
onFailure(r, o) {
|
|
282
282
|
const a = r;
|
|
283
|
-
a.msg = o.errormsg, a.errCode = o.errorcode,
|
|
283
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const F = {
|
|
288
288
|
"Content-Type": "application/json",
|
|
289
289
|
Accept: "application/json,text/javascript,*/*"
|
|
290
290
|
};
|
|
291
|
-
function
|
|
291
|
+
function Ae(e, t, n = void 0, s = void 0) {
|
|
292
292
|
const { space: i, currentUser: r } = e, a = `${i}${{
|
|
293
293
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
294
294
|
}.URIUGr}`, c = {
|
|
@@ -305,19 +305,19 @@ function Ne(e, t, s = void 0, n = void 0) {
|
|
|
305
305
|
};
|
|
306
306
|
m(a, {
|
|
307
307
|
method: "POST",
|
|
308
|
-
headers:
|
|
308
|
+
headers: F,
|
|
309
309
|
data: JSON.stringify(c),
|
|
310
310
|
onComplete(d) {
|
|
311
|
-
|
|
311
|
+
n && n(JSON.parse(d));
|
|
312
312
|
},
|
|
313
|
-
onFailure(d,
|
|
313
|
+
onFailure(d, u) {
|
|
314
314
|
console.log(d);
|
|
315
|
-
const
|
|
316
|
-
|
|
315
|
+
const p = d;
|
|
316
|
+
p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Fe(e, t, n = void 0, s = void 0) {
|
|
321
321
|
const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
|
|
322
322
|
m(d, {
|
|
323
323
|
opts: {
|
|
@@ -328,68 +328,68 @@ function ke(e, t, s = void 0, n = void 0) {
|
|
|
328
328
|
}
|
|
329
329
|
},
|
|
330
330
|
onComplete(f) {
|
|
331
|
-
|
|
331
|
+
n && n(JSON.parse(f));
|
|
332
332
|
},
|
|
333
333
|
onFailure(f, l) {
|
|
334
334
|
const g = f;
|
|
335
|
-
g.msg = l.errormsg, g.errCode = l.errorcode,
|
|
335
|
+
g.msg = l.errormsg, g.errCode = l.errorcode, s && s(g);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
const { space:
|
|
339
|
+
function Y(e, t = void 0, n = void 0) {
|
|
340
|
+
const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
|
|
341
341
|
method: "GET",
|
|
342
342
|
Accept: "application/json,*/*,test/javascript"
|
|
343
343
|
}, d = `${r}${o}${a}`;
|
|
344
344
|
m(d, {
|
|
345
345
|
OPTsH: c,
|
|
346
|
-
onComplete(
|
|
347
|
-
t && t(JSON.parse(
|
|
346
|
+
onComplete(u) {
|
|
347
|
+
t && t(JSON.parse(u));
|
|
348
348
|
},
|
|
349
|
-
onFailure(
|
|
350
|
-
const f =
|
|
351
|
-
f.msg =
|
|
349
|
+
onFailure(u, p) {
|
|
350
|
+
const f = u;
|
|
351
|
+
f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
const { space:
|
|
355
|
+
function xe(e, t = void 0, n = void 0) {
|
|
356
|
+
const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
357
357
|
"Content-Type": "application/json",
|
|
358
358
|
Accept: "application/json,text/javascript,*/*"
|
|
359
359
|
} };
|
|
360
360
|
try {
|
|
361
361
|
m(a, {
|
|
362
362
|
opts: d,
|
|
363
|
-
onComplete(
|
|
364
|
-
const
|
|
363
|
+
onComplete(u) {
|
|
364
|
+
const p = JSON.parse(u), f = {}, l = p.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
365
365
|
if (i && Object.keys(i).length > 0) {
|
|
366
366
|
const g = l.filter((S) => S.owner === i.email), y = l.filter((S) => S.members.includes(i.email)), h = g.concat(y);
|
|
367
|
-
f.iam = h, f.UG = l, f.iamMember = y,
|
|
367
|
+
f.iam = h, f.UG = l, f.iamMember = y, Y(
|
|
368
368
|
e,
|
|
369
369
|
(S) => {
|
|
370
370
|
f.rules = S, t && t(f);
|
|
371
371
|
},
|
|
372
372
|
(S) => {
|
|
373
|
-
|
|
373
|
+
n && n(S);
|
|
374
374
|
}
|
|
375
375
|
);
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
|
-
onFailure(
|
|
379
|
-
|
|
378
|
+
onFailure(u) {
|
|
379
|
+
n && n(u);
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
|
-
} catch (
|
|
383
|
-
console.log(
|
|
382
|
+
} catch (u) {
|
|
383
|
+
console.log(u);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
const { space:
|
|
386
|
+
function Ue(e, t) {
|
|
387
|
+
const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
388
388
|
m(i, {
|
|
389
389
|
method: "DELETE"
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function je(e, t, n, s = void 0, i = void 0) {
|
|
393
393
|
const { space: r, tenant: o } = e, a = {
|
|
394
394
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
395
395
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -398,36 +398,36 @@ function Fe(e, t, s, n = void 0, i = void 0) {
|
|
|
398
398
|
nexURImem: "/members",
|
|
399
399
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
400
400
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
401
|
-
}, c =
|
|
401
|
+
}, c = n, d = `${r}${a.URIUGr}/${t}`, u = JSON.stringify(c);
|
|
402
402
|
m(d, {
|
|
403
|
-
headers:
|
|
403
|
+
headers: F,
|
|
404
404
|
method: "PATCH",
|
|
405
|
-
data:
|
|
405
|
+
data: u,
|
|
406
406
|
type: "json",
|
|
407
|
-
onComplete(
|
|
408
|
-
|
|
407
|
+
onComplete(p) {
|
|
408
|
+
s && s(p);
|
|
409
409
|
},
|
|
410
|
-
onFailure(
|
|
411
|
-
i && i(
|
|
410
|
+
onFailure(p) {
|
|
411
|
+
i && i(p);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Pe(e, t, n, s = void 0, i = void 0) {
|
|
416
416
|
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
417
417
|
m(a, {
|
|
418
418
|
method: "PATCH",
|
|
419
|
-
headers:
|
|
420
|
-
data: JSON.stringify(
|
|
419
|
+
headers: F,
|
|
420
|
+
data: JSON.stringify(n),
|
|
421
421
|
type: "json",
|
|
422
422
|
onComplete(d) {
|
|
423
|
-
|
|
423
|
+
s && s(d);
|
|
424
424
|
},
|
|
425
425
|
onFailure(d) {
|
|
426
426
|
i && i(d);
|
|
427
427
|
}
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Re(e, t, n = void 0, s = void 0) {
|
|
431
431
|
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
432
432
|
m(o, {
|
|
433
433
|
opts: {
|
|
@@ -438,47 +438,47 @@ function Ue(e, t, s = void 0, n = void 0) {
|
|
|
438
438
|
}
|
|
439
439
|
},
|
|
440
440
|
onComplete(d) {
|
|
441
|
-
|
|
441
|
+
n && n(JSON.parse(d));
|
|
442
442
|
},
|
|
443
443
|
onFailure(d) {
|
|
444
|
-
|
|
444
|
+
s && s(d);
|
|
445
445
|
}
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
|
-
async function
|
|
448
|
+
async function H(e, t, n) {
|
|
449
449
|
if (e.space) {
|
|
450
|
-
const
|
|
451
|
-
m(
|
|
450
|
+
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
451
|
+
m(s, {
|
|
452
452
|
onComplete(i) {
|
|
453
453
|
i = JSON.parse(i), t && t(i.csrf);
|
|
454
454
|
},
|
|
455
455
|
onFailure(i, r, o) {
|
|
456
|
-
|
|
456
|
+
n && n({ error: i, headers: r, xhr: o });
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var v = {};
|
|
462
|
+
function z(e, t) {
|
|
463
463
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
464
464
|
}
|
|
465
|
-
var
|
|
466
|
-
t = t || "&",
|
|
465
|
+
var Q = function(e, t, n, s) {
|
|
466
|
+
t = t || "&", n = n || "=";
|
|
467
467
|
var i = {};
|
|
468
468
|
if (typeof e != "string" || e.length === 0)
|
|
469
469
|
return i;
|
|
470
470
|
var r = /\+/g;
|
|
471
471
|
e = e.split(t);
|
|
472
472
|
var o = 1e3;
|
|
473
|
-
|
|
473
|
+
s && typeof s.maxKeys == "number" && (o = s.maxKeys);
|
|
474
474
|
var a = e.length;
|
|
475
475
|
o > 0 && a > o && (a = o);
|
|
476
476
|
for (var c = 0; c < a; ++c) {
|
|
477
|
-
var d = e[c].replace(r, "%20"),
|
|
478
|
-
|
|
477
|
+
var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, g;
|
|
478
|
+
u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
|
|
479
479
|
}
|
|
480
480
|
return i;
|
|
481
|
-
},
|
|
481
|
+
}, N = function(e) {
|
|
482
482
|
switch (typeof e) {
|
|
483
483
|
case "string":
|
|
484
484
|
return e;
|
|
@@ -489,17 +489,17 @@ var Z = function(e, t, s, n) {
|
|
|
489
489
|
default:
|
|
490
490
|
return "";
|
|
491
491
|
}
|
|
492
|
-
},
|
|
493
|
-
return t = t || "&",
|
|
494
|
-
var r = encodeURIComponent(
|
|
492
|
+
}, Z = function(e, t, n, s) {
|
|
493
|
+
return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
|
|
494
|
+
var r = encodeURIComponent(N(i)) + n;
|
|
495
495
|
return Array.isArray(e[i]) ? e[i].map(function(o) {
|
|
496
|
-
return r + encodeURIComponent(
|
|
497
|
-
}).join(t) : r + encodeURIComponent(
|
|
498
|
-
}).filter(Boolean).join(t) :
|
|
496
|
+
return r + encodeURIComponent(N(o));
|
|
497
|
+
}).join(t) : r + encodeURIComponent(N(e[i]));
|
|
498
|
+
}).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
|
|
499
499
|
};
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
async function
|
|
500
|
+
v.decode = v.parse = Q;
|
|
501
|
+
v.encode = v.stringify = Z;
|
|
502
|
+
async function R(e, t = void 0, n = void 0, s = void 0) {
|
|
503
503
|
const i = e.space;
|
|
504
504
|
if (t === void 0) {
|
|
505
505
|
console.log("Le paramètre docid est obligatoire");
|
|
@@ -509,20 +509,20 @@ async function L(e, t = void 0, s = void 0, n = void 0) {
|
|
|
509
509
|
m(r, {
|
|
510
510
|
onComplete(o, a, c) {
|
|
511
511
|
const d = JSON.parse(o);
|
|
512
|
-
|
|
512
|
+
n && n(d);
|
|
513
513
|
},
|
|
514
514
|
onFailure(o) {
|
|
515
|
-
|
|
515
|
+
s && s(o);
|
|
516
516
|
}
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
async function
|
|
519
|
+
async function De(e, t = void 0, n = void 0, s = void 0) {
|
|
520
520
|
const i = e.space;
|
|
521
521
|
if (t === void 0) {
|
|
522
522
|
console.log("Le paramètre docids est obligatoire");
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
|
-
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o =
|
|
525
|
+
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = v.stringify({
|
|
526
526
|
$ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
|
|
527
527
|
});
|
|
528
528
|
m(r, {
|
|
@@ -532,47 +532,47 @@ async function Pe(e, t = void 0, s = void 0, n = void 0) {
|
|
|
532
532
|
},
|
|
533
533
|
data: o,
|
|
534
534
|
onComplete(a, c, d) {
|
|
535
|
-
const
|
|
536
|
-
|
|
535
|
+
const u = JSON.parse(a);
|
|
536
|
+
n && n(u);
|
|
537
537
|
},
|
|
538
538
|
onFailure(a) {
|
|
539
|
-
|
|
539
|
+
s && s(a);
|
|
540
540
|
}
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
|
-
function k(e, t = void 0,
|
|
543
|
+
function k(e, t = void 0, n = void 0) {
|
|
544
544
|
if (e.objID && e.objID !== "") {
|
|
545
|
-
let
|
|
546
|
-
m(
|
|
545
|
+
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
546
|
+
m(s, {
|
|
547
547
|
onComplete(i, r, o) {
|
|
548
548
|
const a = JSON.parse(i);
|
|
549
549
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
550
550
|
},
|
|
551
551
|
onFailure(i) {
|
|
552
|
-
|
|
552
|
+
n && n(i);
|
|
553
553
|
}
|
|
554
554
|
});
|
|
555
555
|
} else
|
|
556
556
|
O(
|
|
557
557
|
e,
|
|
558
|
-
(
|
|
559
|
-
console.log("_3DSpace_get_csrf / _3DSpace_csrf",
|
|
558
|
+
(s) => {
|
|
559
|
+
console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
|
|
560
560
|
},
|
|
561
|
-
(
|
|
562
|
-
|
|
561
|
+
(s) => {
|
|
562
|
+
n && n(s);
|
|
563
563
|
}
|
|
564
564
|
);
|
|
565
565
|
}
|
|
566
|
-
function O(e, t = void 0,
|
|
566
|
+
function O(e, t = void 0, n = void 0) {
|
|
567
567
|
if (e.space) {
|
|
568
|
-
const
|
|
569
|
-
m(
|
|
568
|
+
const s = e.space + "/resources/v1/application/CSRF";
|
|
569
|
+
m(s, {
|
|
570
570
|
onComplete(i, r, o) {
|
|
571
571
|
const a = JSON.parse(i);
|
|
572
572
|
t && t(a.csrf.value);
|
|
573
573
|
},
|
|
574
574
|
onFailure(i, r, o) {
|
|
575
|
-
|
|
575
|
+
n && n({
|
|
576
576
|
response: i,
|
|
577
577
|
headers: r,
|
|
578
578
|
xhr: o
|
|
@@ -580,14 +580,14 @@ function O(e, t = void 0, s = void 0) {
|
|
|
580
580
|
}
|
|
581
581
|
});
|
|
582
582
|
} else
|
|
583
|
-
|
|
583
|
+
n && n("ERROR : url du 3DSpace non défini.");
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
let
|
|
585
|
+
function x(e, t = void 0, n = void 0) {
|
|
586
|
+
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
587
587
|
k(
|
|
588
588
|
e,
|
|
589
589
|
(i) => {
|
|
590
|
-
m(
|
|
590
|
+
m(s, {
|
|
591
591
|
method: "PUT",
|
|
592
592
|
headers: {
|
|
593
593
|
ENO_CSRF_TOKEN: e.token
|
|
@@ -597,28 +597,28 @@ function U(e, t = void 0, s = void 0) {
|
|
|
597
597
|
t && t(c, o);
|
|
598
598
|
},
|
|
599
599
|
onFailure(r, o) {
|
|
600
|
-
console.warn("☠️ error => ", r, o),
|
|
600
|
+
console.warn("☠️ error => ", r, o), n && n(r, o);
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
603
|
},
|
|
604
604
|
(i) => {
|
|
605
|
-
console.warn("_3DSpace_get_ticket / error => ", i),
|
|
605
|
+
console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
|
|
606
606
|
}
|
|
607
607
|
);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function Le(e, t, n, s = void 0, i = void 0) {
|
|
610
610
|
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
611
|
-
|
|
611
|
+
n || (n = e.token), m(r, {
|
|
612
612
|
method: "PUT",
|
|
613
613
|
headers: {
|
|
614
|
-
ENO_CSRF_TOKEN:
|
|
614
|
+
ENO_CSRF_TOKEN: n
|
|
615
615
|
},
|
|
616
616
|
onComplete(o) {
|
|
617
617
|
let a = JSON.parse(o);
|
|
618
618
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
619
619
|
try {
|
|
620
620
|
const c = a.data[0].dataelements.ticketURL;
|
|
621
|
-
|
|
621
|
+
s && s(c);
|
|
622
622
|
} catch (c) {
|
|
623
623
|
i && i(c);
|
|
624
624
|
}
|
|
@@ -628,12 +628,12 @@ function Re(e, t, s, n = void 0, i = void 0) {
|
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
const a = () =>
|
|
631
|
+
function D(e, t, n, s, i, r = void 0, o = void 0) {
|
|
632
|
+
const a = () => ee(
|
|
633
633
|
e,
|
|
634
634
|
t,
|
|
635
|
-
s,
|
|
636
635
|
n,
|
|
636
|
+
s,
|
|
637
637
|
i,
|
|
638
638
|
e.token,
|
|
639
639
|
r,
|
|
@@ -647,17 +647,17 @@ function M(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
651
651
|
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
652
652
|
m(c, {
|
|
653
653
|
method: "PUT",
|
|
654
654
|
headers: {
|
|
655
655
|
ENO_CSRF_TOKEN: e.token
|
|
656
656
|
},
|
|
657
|
-
onComplete(d,
|
|
657
|
+
onComplete(d, u, p) {
|
|
658
658
|
const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, g = new FormData();
|
|
659
659
|
let y;
|
|
660
|
-
|
|
660
|
+
s instanceof Blob ? y = s : y = new Blob([s], {
|
|
661
661
|
type: "text/plain"
|
|
662
662
|
}), g.append("__fcs__jobTicket", l.ticket), g.append("file_0", y, i);
|
|
663
663
|
const h = {};
|
|
@@ -694,9 +694,9 @@ function te(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
|
694
694
|
onFailure(T) {
|
|
695
695
|
a && a(T);
|
|
696
696
|
}
|
|
697
|
-
},
|
|
697
|
+
}, C = e.tenant.toUpperCase();
|
|
698
698
|
m(
|
|
699
|
-
e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${
|
|
699
|
+
e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${C}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
|
|
700
700
|
_
|
|
701
701
|
);
|
|
702
702
|
}, h.onFailure = function(S) {
|
|
@@ -705,20 +705,20 @@ function te(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
|
705
705
|
}
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
|
-
async function
|
|
709
|
-
e.space, e.token, e.ctx,
|
|
708
|
+
async function Me(e, t, n, s = void 0, i = void 0) {
|
|
709
|
+
e.space, e.token, e.ctx, R(
|
|
710
710
|
e,
|
|
711
711
|
t,
|
|
712
712
|
(r) => {
|
|
713
713
|
const o = r.data[0].relateddata.files[0].id, a = r.data[0].dataelements.secondaryTitle && r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
|
|
714
|
-
|
|
714
|
+
D(
|
|
715
715
|
e,
|
|
716
716
|
t,
|
|
717
717
|
o,
|
|
718
|
-
|
|
718
|
+
n,
|
|
719
719
|
a,
|
|
720
720
|
(c) => {
|
|
721
|
-
|
|
721
|
+
s && s(c);
|
|
722
722
|
},
|
|
723
723
|
(c) => {
|
|
724
724
|
i && i(c);
|
|
@@ -730,120 +730,163 @@ async function De(e, t, s, n = void 0, i = void 0) {
|
|
|
730
730
|
}
|
|
731
731
|
);
|
|
732
732
|
}
|
|
733
|
-
async function
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
733
|
+
async function Je(e, t, n, s, i = void 0, r = void 0) {
|
|
734
|
+
te(
|
|
735
|
+
e,
|
|
736
|
+
(o) => {
|
|
737
|
+
console.log("resultCheckinTicket", n, o), o?.items >= 1 && o.data.forEach((a) => {
|
|
738
|
+
ne(
|
|
739
|
+
a,
|
|
740
|
+
t,
|
|
741
|
+
n,
|
|
742
|
+
(c) => {
|
|
743
|
+
console.log("receipt", n, c), se(
|
|
744
|
+
e,
|
|
745
|
+
c,
|
|
746
|
+
n,
|
|
747
|
+
s,
|
|
748
|
+
(d) => {
|
|
749
|
+
d?.data.length ? i && i(d) : r && r({ success: !1, msg: "Erreur lors de la mise en ralation entre la document et le fichier" });
|
|
750
|
+
},
|
|
751
|
+
(d) => console.warn(d)
|
|
752
|
+
);
|
|
753
|
+
},
|
|
754
|
+
(c) => console.warn(c)
|
|
755
|
+
);
|
|
756
|
+
});
|
|
757
|
+
},
|
|
758
|
+
(o) => console.warn(o)
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
function te(e, t = void 0, n = void 0) {
|
|
762
|
+
if (e?.space && e.token && e.ctx) {
|
|
763
|
+
let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
|
|
764
|
+
m(s, {
|
|
738
765
|
method: "PUT",
|
|
739
766
|
headers: {
|
|
740
|
-
ENO_CSRF_TOKEN:
|
|
767
|
+
ENO_CSRF_TOKEN: e.token,
|
|
741
768
|
Accept: "application/json",
|
|
742
769
|
"Content-Type": "application/json",
|
|
743
|
-
SecurityContext:
|
|
770
|
+
SecurityContext: e.ctx
|
|
744
771
|
},
|
|
745
|
-
onComplete(
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
);
|
|
772
|
+
onComplete(i, r, o) {
|
|
773
|
+
try {
|
|
774
|
+
i = JSON.parse(i);
|
|
775
|
+
} catch {
|
|
776
|
+
}
|
|
777
|
+
t && t(i);
|
|
778
|
+
},
|
|
779
|
+
onFailure(i) {
|
|
780
|
+
n && n(i);
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
} else
|
|
784
|
+
console.log("Error de credentials", e);
|
|
785
|
+
}
|
|
786
|
+
function ne(e, t, n, s = void 0, i = void 0) {
|
|
787
|
+
let r = new FormData();
|
|
788
|
+
t instanceof Blob || (t = new Blob([t], {
|
|
789
|
+
type: "text/plain"
|
|
790
|
+
})), r.append("__fcs__jobTicket", e.dataelements.ticket), r.append("file_0", t, n);
|
|
791
|
+
let o = e.dataelements.ticketURL;
|
|
792
|
+
m(o, {
|
|
793
|
+
method: "POST",
|
|
794
|
+
data: r,
|
|
795
|
+
onComplete(a) {
|
|
796
|
+
s && s(a.replace(/[\n\r]/g, ""));
|
|
797
|
+
},
|
|
798
|
+
onFailure(a) {
|
|
799
|
+
i && i(a);
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
function se(e, t, n, s = void 0, i = void 0, r = void 0) {
|
|
804
|
+
console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
|
|
805
|
+
const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
|
|
806
|
+
let a = "temp_" + $.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
|
|
807
|
+
m(c, {
|
|
808
|
+
method: "POST",
|
|
809
|
+
headers: {
|
|
810
|
+
ENO_CSRF_TOKEN: e.token,
|
|
811
|
+
SecurityContext: encodeURIComponent("ctx::") + e.ctx,
|
|
812
|
+
"Content-Type": "application/json"
|
|
813
|
+
},
|
|
814
|
+
data: JSON.stringify({
|
|
815
|
+
csrf: { name: "ENO_CSRF_TOKEN", value: e.token },
|
|
816
|
+
data: [
|
|
817
|
+
{
|
|
818
|
+
type: "Document",
|
|
819
|
+
dataelements: {
|
|
820
|
+
title: o(n),
|
|
821
|
+
description: s
|
|
796
822
|
},
|
|
797
|
-
|
|
798
|
-
|
|
823
|
+
relateddata: {
|
|
824
|
+
files: [
|
|
825
|
+
{
|
|
826
|
+
dataelements: {
|
|
827
|
+
title: n,
|
|
828
|
+
receipt: `${t}
|
|
829
|
+
`
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
]
|
|
799
833
|
},
|
|
800
|
-
|
|
801
|
-
}
|
|
802
|
-
|
|
834
|
+
tempId: a
|
|
835
|
+
}
|
|
836
|
+
]
|
|
837
|
+
}),
|
|
838
|
+
onComplete(d) {
|
|
839
|
+
try {
|
|
840
|
+
d = JSON.parse(d);
|
|
841
|
+
} catch {
|
|
803
842
|
}
|
|
804
|
-
|
|
805
|
-
|
|
843
|
+
i && i(d);
|
|
844
|
+
},
|
|
845
|
+
onFailure(d) {
|
|
846
|
+
r && r(d);
|
|
847
|
+
}
|
|
848
|
+
});
|
|
806
849
|
}
|
|
807
|
-
function A(e, t = void 0,
|
|
850
|
+
function A(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
|
|
808
851
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
809
852
|
m(a, {
|
|
810
853
|
method: "GET",
|
|
811
854
|
onComplete(c) {
|
|
812
855
|
const d = JSON.parse(c);
|
|
813
|
-
let
|
|
856
|
+
let u = "", p, f, l;
|
|
814
857
|
if (t) {
|
|
815
858
|
let g = d.collabspaces.find((y) => y.title === t);
|
|
816
859
|
if (g) {
|
|
817
|
-
|
|
860
|
+
p = t;
|
|
818
861
|
let y = g.couples;
|
|
819
862
|
y = y.filter(
|
|
820
863
|
(h, S, _) => S === _.findIndex(
|
|
821
|
-
(
|
|
864
|
+
(C) => C.organization.pid === h.organization.pid && C.role.pid === h.role.pid
|
|
822
865
|
)
|
|
823
|
-
),
|
|
866
|
+
), n && (Array.isArray(n) ? n.forEach((h) => {
|
|
824
867
|
l || y.forEach((S) => {
|
|
825
|
-
if (h === S.role.name &&
|
|
826
|
-
l = h, f =
|
|
868
|
+
if (h === S.role.name && s === S.organization.title)
|
|
869
|
+
l = h, f = s;
|
|
827
870
|
else if (h === S.role.name) {
|
|
828
871
|
let _ = y.filter(
|
|
829
|
-
(
|
|
872
|
+
(C) => C.role.name === h
|
|
830
873
|
);
|
|
831
874
|
_.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
|
|
832
875
|
}
|
|
833
876
|
});
|
|
834
877
|
}) : y.forEach((h) => {
|
|
835
|
-
if (
|
|
836
|
-
l =
|
|
837
|
-
else if (
|
|
878
|
+
if (n === h.role.name && s === h.organization.title)
|
|
879
|
+
l = n, f = s;
|
|
880
|
+
else if (n === h.role.name) {
|
|
838
881
|
let S = y.filter(
|
|
839
|
-
(_) => _.role.name ===
|
|
882
|
+
(_) => _.role.name === n
|
|
840
883
|
);
|
|
841
884
|
S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
|
|
842
885
|
}
|
|
843
886
|
}));
|
|
844
887
|
}
|
|
845
888
|
}
|
|
846
|
-
|
|
889
|
+
p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
|
|
847
890
|
},
|
|
848
891
|
onFailure(c, d) {
|
|
849
892
|
console.warn("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -853,29 +896,29 @@ function A(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1
|
|
|
853
896
|
}
|
|
854
897
|
});
|
|
855
898
|
}
|
|
856
|
-
async function
|
|
899
|
+
async function L(e, t = void 0, n = void 0) {
|
|
857
900
|
return (!e.objID || e.objID === "") && (console.warn(
|
|
858
901
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
859
|
-
),
|
|
902
|
+
), n && n(
|
|
860
903
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
861
904
|
)), (e.space === "" || !e.space) && (console.warn(
|
|
862
905
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
863
|
-
),
|
|
906
|
+
), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && H(
|
|
864
907
|
e,
|
|
865
|
-
(
|
|
866
|
-
e.token =
|
|
908
|
+
(s) => {
|
|
909
|
+
e.token = s;
|
|
867
910
|
},
|
|
868
|
-
(
|
|
869
|
-
console.log("☠️ error => ",
|
|
911
|
+
(s) => {
|
|
912
|
+
console.log("☠️ error => ", s);
|
|
870
913
|
}
|
|
871
|
-
), new Promise((
|
|
872
|
-
|
|
914
|
+
), new Promise((s, i) => {
|
|
915
|
+
x(
|
|
873
916
|
e,
|
|
874
917
|
(r) => {
|
|
875
918
|
e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
|
|
876
919
|
t && t(o);
|
|
877
920
|
}).catch((o) => {
|
|
878
|
-
|
|
921
|
+
n && n(o);
|
|
879
922
|
})) : m(r, {
|
|
880
923
|
onComplete(o) {
|
|
881
924
|
let a;
|
|
@@ -884,10 +927,10 @@ async function J(e, t = void 0, s = void 0) {
|
|
|
884
927
|
} catch {
|
|
885
928
|
a = o;
|
|
886
929
|
}
|
|
887
|
-
t && typeof t == "function" && t(a),
|
|
930
|
+
t && typeof t == "function" && t(a), s(a);
|
|
888
931
|
},
|
|
889
932
|
onFailure(o, a, c) {
|
|
890
|
-
|
|
933
|
+
n && (console.log("error http", o), n({
|
|
891
934
|
msg: JSON.parse(o),
|
|
892
935
|
headers: a,
|
|
893
936
|
xhr: c
|
|
@@ -900,26 +943,26 @@ async function J(e, t = void 0, s = void 0) {
|
|
|
900
943
|
});
|
|
901
944
|
},
|
|
902
945
|
(r) => {
|
|
903
|
-
|
|
946
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
|
|
904
947
|
}
|
|
905
948
|
);
|
|
906
949
|
});
|
|
907
950
|
}
|
|
908
|
-
async function
|
|
909
|
-
typeof t < "u" && Array.isArray(t) && t?.length > 0 ?
|
|
951
|
+
async function ie(e, t, n = void 0, s = void 0) {
|
|
952
|
+
typeof t < "u" && Array.isArray(t) && t?.length > 0 ? W({
|
|
910
953
|
credentials: e,
|
|
911
954
|
myArray: t,
|
|
912
955
|
chunk: 80,
|
|
913
|
-
fn_to_call:
|
|
956
|
+
fn_to_call: ae
|
|
914
957
|
}, (r) => {
|
|
915
|
-
|
|
958
|
+
n && n(r);
|
|
916
959
|
}) : (console.warn(
|
|
917
960
|
"La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
|
|
918
|
-
),
|
|
961
|
+
), s && s(
|
|
919
962
|
"La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
|
|
920
963
|
));
|
|
921
964
|
}
|
|
922
|
-
function
|
|
965
|
+
function ae(e, t, n = void 0, s = void 0, i = void 0) {
|
|
923
966
|
const r = [];
|
|
924
967
|
t.forEach((c) => {
|
|
925
968
|
r.push({
|
|
@@ -940,9 +983,9 @@ function se(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
940
983
|
type: "json",
|
|
941
984
|
onComplete(c) {
|
|
942
985
|
const d = c.data;
|
|
943
|
-
c.success === !0 && (
|
|
986
|
+
c.success === !0 && (n && n(), d.forEach((u) => {
|
|
944
987
|
try {
|
|
945
|
-
const
|
|
988
|
+
const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
|
|
946
989
|
m(f, {
|
|
947
990
|
onComplete: (l, g) => {
|
|
948
991
|
let y;
|
|
@@ -951,10 +994,10 @@ function se(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
951
994
|
} catch {
|
|
952
995
|
y = l.blob();
|
|
953
996
|
}
|
|
954
|
-
|
|
955
|
-
objectId:
|
|
997
|
+
s && s({
|
|
998
|
+
objectId: u.id,
|
|
956
999
|
headers: g,
|
|
957
|
-
fileName:
|
|
1000
|
+
fileName: p,
|
|
958
1001
|
data: y
|
|
959
1002
|
});
|
|
960
1003
|
},
|
|
@@ -962,8 +1005,8 @@ function se(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
962
1005
|
console.log("error http", l);
|
|
963
1006
|
}
|
|
964
1007
|
});
|
|
965
|
-
} catch (
|
|
966
|
-
console.log(
|
|
1008
|
+
} catch (p) {
|
|
1009
|
+
console.log(p), i && i(p);
|
|
967
1010
|
}
|
|
968
1011
|
}));
|
|
969
1012
|
},
|
|
@@ -972,7 +1015,7 @@ function se(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
972
1015
|
}
|
|
973
1016
|
});
|
|
974
1017
|
}
|
|
975
|
-
function
|
|
1018
|
+
function Ge(e, t, n = void 0, s = void 0) {
|
|
976
1019
|
return new Promise((i) => {
|
|
977
1020
|
if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
|
|
978
1021
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
@@ -993,17 +1036,17 @@ function Me(e, t, s = void 0, n = void 0) {
|
|
|
993
1036
|
}),
|
|
994
1037
|
type: "json",
|
|
995
1038
|
onComplete(a) {
|
|
996
|
-
|
|
1039
|
+
n && n(a);
|
|
997
1040
|
},
|
|
998
1041
|
onFailure(a) {
|
|
999
|
-
|
|
1042
|
+
s && s(a);
|
|
1000
1043
|
}
|
|
1001
1044
|
};
|
|
1002
1045
|
m(r, o);
|
|
1003
1046
|
}
|
|
1004
1047
|
});
|
|
1005
1048
|
}
|
|
1006
|
-
function
|
|
1049
|
+
function Ee(e, t, n, s = void 0, i = void 0) {
|
|
1007
1050
|
return new Promise((r) => {
|
|
1008
1051
|
if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
|
|
1009
1052
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -1019,13 +1062,13 @@ function Je(e, t, s, n = void 0, i = void 0) {
|
|
|
1019
1062
|
data: [
|
|
1020
1063
|
{
|
|
1021
1064
|
id: t,
|
|
1022
|
-
nextState:
|
|
1065
|
+
nextState: n
|
|
1023
1066
|
}
|
|
1024
1067
|
]
|
|
1025
1068
|
}),
|
|
1026
1069
|
type: "json",
|
|
1027
1070
|
onComplete(c) {
|
|
1028
|
-
|
|
1071
|
+
s && s(c);
|
|
1029
1072
|
},
|
|
1030
1073
|
onFailure(c) {
|
|
1031
1074
|
i && i(c);
|
|
@@ -1035,7 +1078,7 @@ function Je(e, t, s, n = void 0, i = void 0) {
|
|
|
1035
1078
|
}
|
|
1036
1079
|
});
|
|
1037
1080
|
}
|
|
1038
|
-
function
|
|
1081
|
+
function Ke(e, t, n = void 0, s = void 0) {
|
|
1039
1082
|
return new Promise((i) => {
|
|
1040
1083
|
if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
|
|
1041
1084
|
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
@@ -1066,17 +1109,17 @@ function Ge(e, t, s = void 0, n = void 0) {
|
|
|
1066
1109
|
}),
|
|
1067
1110
|
type: "json",
|
|
1068
1111
|
onComplete(a) {
|
|
1069
|
-
|
|
1112
|
+
n && n(a);
|
|
1070
1113
|
},
|
|
1071
1114
|
onFailure(a) {
|
|
1072
|
-
|
|
1115
|
+
s && s(a);
|
|
1073
1116
|
}
|
|
1074
1117
|
};
|
|
1075
1118
|
m(r, o);
|
|
1076
1119
|
}
|
|
1077
1120
|
});
|
|
1078
1121
|
}
|
|
1079
|
-
function
|
|
1122
|
+
function Be(e, t, n = void 0, s = void 0) {
|
|
1080
1123
|
return new Promise((i) => {
|
|
1081
1124
|
if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
|
|
1082
1125
|
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
@@ -1113,17 +1156,17 @@ function Ee(e, t, s = void 0, n = void 0) {
|
|
|
1113
1156
|
}),
|
|
1114
1157
|
type: "json",
|
|
1115
1158
|
onComplete(a) {
|
|
1116
|
-
|
|
1159
|
+
n && n(a);
|
|
1117
1160
|
},
|
|
1118
1161
|
onFailure(a) {
|
|
1119
|
-
|
|
1162
|
+
s && s(a);
|
|
1120
1163
|
}
|
|
1121
1164
|
};
|
|
1122
1165
|
m(r, o);
|
|
1123
1166
|
}
|
|
1124
1167
|
});
|
|
1125
1168
|
}
|
|
1126
|
-
function
|
|
1169
|
+
function Ve(e, t, n, s = void 0, i = void 0) {
|
|
1127
1170
|
return new Promise((r) => {
|
|
1128
1171
|
if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
|
|
1129
1172
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -1149,9 +1192,9 @@ function Ke(e, t, s, n = void 0, i = void 0) {
|
|
|
1149
1192
|
data: [
|
|
1150
1193
|
{
|
|
1151
1194
|
physicalid: t,
|
|
1152
|
-
proposedRevision:
|
|
1195
|
+
proposedRevision: n,
|
|
1153
1196
|
modifiedAttributes: {
|
|
1154
|
-
revision:
|
|
1197
|
+
revision: n
|
|
1155
1198
|
}
|
|
1156
1199
|
}
|
|
1157
1200
|
],
|
|
@@ -1160,7 +1203,7 @@ function Ke(e, t, s, n = void 0, i = void 0) {
|
|
|
1160
1203
|
}),
|
|
1161
1204
|
type: "json",
|
|
1162
1205
|
onComplete(c) {
|
|
1163
|
-
|
|
1206
|
+
s && s(c);
|
|
1164
1207
|
},
|
|
1165
1208
|
onFailure(c) {
|
|
1166
1209
|
i && i(c);
|
|
@@ -1170,20 +1213,20 @@ function Ke(e, t, s, n = void 0, i = void 0) {
|
|
|
1170
1213
|
}
|
|
1171
1214
|
});
|
|
1172
1215
|
}
|
|
1173
|
-
function
|
|
1216
|
+
function We(e, t, n, s, i = void 0, r = void 0) {
|
|
1174
1217
|
return new Promise((o) => {
|
|
1175
1218
|
const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
|
|
1176
1219
|
let c = {
|
|
1177
1220
|
attributes: {
|
|
1178
|
-
title:
|
|
1179
|
-
description:
|
|
1221
|
+
title: n,
|
|
1222
|
+
description: s,
|
|
1180
1223
|
inheritedAccess: "no"
|
|
1181
1224
|
}
|
|
1182
1225
|
}, d = {
|
|
1183
1226
|
items: []
|
|
1184
1227
|
};
|
|
1185
1228
|
t && (d.parentId = t), d.items.push(c);
|
|
1186
|
-
let
|
|
1229
|
+
let u = {
|
|
1187
1230
|
method: "POST",
|
|
1188
1231
|
headers: {
|
|
1189
1232
|
Accept: "application/json",
|
|
@@ -1193,17 +1236,17 @@ function Be(e, t, s, n, i = void 0, r = void 0) {
|
|
|
1193
1236
|
},
|
|
1194
1237
|
data: JSON.stringify(d),
|
|
1195
1238
|
type: "json",
|
|
1196
|
-
onComplete(
|
|
1197
|
-
i && i(
|
|
1239
|
+
onComplete(p) {
|
|
1240
|
+
i && i(p);
|
|
1198
1241
|
},
|
|
1199
|
-
onFailure(
|
|
1200
|
-
r && r(
|
|
1242
|
+
onFailure(p) {
|
|
1243
|
+
r && r(p);
|
|
1201
1244
|
}
|
|
1202
1245
|
};
|
|
1203
|
-
m(a,
|
|
1246
|
+
m(a, u);
|
|
1204
1247
|
});
|
|
1205
1248
|
}
|
|
1206
|
-
function
|
|
1249
|
+
function Xe(e, t, n, s, i = void 0, r = void 0) {
|
|
1207
1250
|
return console.log("credentials", e), new Promise((o) => {
|
|
1208
1251
|
`${e.space}`, JSON.stringify({
|
|
1209
1252
|
csrf: {
|
|
@@ -1217,8 +1260,8 @@ function Ve(e, t, s, n, i = void 0, r = void 0) {
|
|
|
1217
1260
|
relId: t,
|
|
1218
1261
|
id: t,
|
|
1219
1262
|
dataelements: {
|
|
1220
|
-
personList:
|
|
1221
|
-
eventsList:
|
|
1263
|
+
personList: n,
|
|
1264
|
+
eventsList: s
|
|
1222
1265
|
},
|
|
1223
1266
|
tenant: e.tenant
|
|
1224
1267
|
}
|
|
@@ -1227,12 +1270,12 @@ function Ve(e, t, s, n, i = void 0, r = void 0) {
|
|
|
1227
1270
|
});
|
|
1228
1271
|
}
|
|
1229
1272
|
//!SECTION
|
|
1230
|
-
function
|
|
1231
|
-
const
|
|
1273
|
+
function qe(e, t = void 0, n = void 0) {
|
|
1274
|
+
const s = {
|
|
1232
1275
|
base: `${e.space}`,
|
|
1233
1276
|
uri: "/resources/bps/cspaces",
|
|
1234
1277
|
optTenant: `tenant=${e.tenant}`
|
|
1235
|
-
}, i = `${
|
|
1278
|
+
}, i = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1236
1279
|
m(i, {
|
|
1237
1280
|
method: "GET",
|
|
1238
1281
|
headers: {
|
|
@@ -1244,54 +1287,54 @@ function We(e, t = void 0, s = void 0) {
|
|
|
1244
1287
|
t && t(a, o);
|
|
1245
1288
|
},
|
|
1246
1289
|
onFailure(r, o, a) {
|
|
1247
|
-
|
|
1290
|
+
n && n({ response: r, headers: o, xhr: a });
|
|
1248
1291
|
}
|
|
1249
1292
|
});
|
|
1250
1293
|
}
|
|
1251
|
-
function
|
|
1252
|
-
|
|
1294
|
+
function Ye(e, t, n, s) {
|
|
1295
|
+
x(
|
|
1253
1296
|
e.space,
|
|
1254
1297
|
t,
|
|
1255
1298
|
(i) => {
|
|
1256
1299
|
m(i, {
|
|
1257
1300
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1258
1301
|
onComplete: (r) => {
|
|
1259
|
-
|
|
1302
|
+
n && n(r);
|
|
1260
1303
|
},
|
|
1261
1304
|
onFailure: (r) => {
|
|
1262
|
-
console.log("error http", r),
|
|
1305
|
+
console.log("error http", r), s && s(r);
|
|
1263
1306
|
}
|
|
1264
1307
|
});
|
|
1265
1308
|
}
|
|
1266
1309
|
);
|
|
1267
1310
|
}
|
|
1268
|
-
async function
|
|
1311
|
+
async function He(e, t, n = void 0, s = void 0) {
|
|
1269
1312
|
return new Promise((i) => {
|
|
1270
|
-
|
|
1313
|
+
x(e, t, (r) => {
|
|
1271
1314
|
m(r, {
|
|
1272
|
-
onComplete: (o, a, c) => (i(JSON.parse(o)),
|
|
1315
|
+
onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
|
|
1273
1316
|
onFailure: (o, a, c) => {
|
|
1274
|
-
|
|
1317
|
+
s && s(o, a, c), console.log(o, a?.errormsg);
|
|
1275
1318
|
}
|
|
1276
1319
|
});
|
|
1277
1320
|
});
|
|
1278
1321
|
});
|
|
1279
1322
|
}
|
|
1280
|
-
function
|
|
1323
|
+
function ze(e, t, n, s = void 0, i = void 0) {
|
|
1281
1324
|
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1282
1325
|
k(
|
|
1283
1326
|
e,
|
|
1284
|
-
|
|
1327
|
+
n,
|
|
1285
1328
|
(o) => {
|
|
1286
1329
|
const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
|
|
1287
|
-
|
|
1330
|
+
D(
|
|
1288
1331
|
e,
|
|
1289
|
-
|
|
1332
|
+
n,
|
|
1290
1333
|
a,
|
|
1291
1334
|
r,
|
|
1292
1335
|
c,
|
|
1293
1336
|
(d) => {
|
|
1294
|
-
|
|
1337
|
+
s && s(d);
|
|
1295
1338
|
},
|
|
1296
1339
|
(d) => {
|
|
1297
1340
|
i && i(d);
|
|
@@ -1300,94 +1343,94 @@ function Ye(e, t, s, n = void 0, i = void 0) {
|
|
|
1300
1343
|
}
|
|
1301
1344
|
);
|
|
1302
1345
|
}
|
|
1303
|
-
let
|
|
1304
|
-
const
|
|
1305
|
-
async function
|
|
1346
|
+
let M, J;
|
|
1347
|
+
const U = [];
|
|
1348
|
+
async function Qe(e, t = void 0, n = void 0) {
|
|
1306
1349
|
e.objID && e.objID !== "" ? k(
|
|
1307
1350
|
e,
|
|
1308
|
-
(
|
|
1309
|
-
t && t(
|
|
1351
|
+
(s) => {
|
|
1352
|
+
t && t(s);
|
|
1310
1353
|
},
|
|
1311
|
-
(
|
|
1312
|
-
|
|
1354
|
+
(s) => {
|
|
1355
|
+
n && n(s);
|
|
1313
1356
|
}
|
|
1314
1357
|
) : (e.objID === null || e.objID === "") && O(
|
|
1315
1358
|
e,
|
|
1316
|
-
(
|
|
1317
|
-
t && t({ rep:
|
|
1359
|
+
(s) => {
|
|
1360
|
+
t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
|
|
1318
1361
|
},
|
|
1319
|
-
(
|
|
1320
|
-
|
|
1362
|
+
(s) => {
|
|
1363
|
+
n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
|
|
1321
1364
|
}
|
|
1322
1365
|
);
|
|
1323
1366
|
}
|
|
1324
|
-
async function
|
|
1325
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1367
|
+
async function Ze(e, t = void 0, n = void 0) {
|
|
1368
|
+
console.log("getDatasByTenant (getDocuments)", e), await L(
|
|
1326
1369
|
e,
|
|
1327
|
-
(
|
|
1370
|
+
(s) => {
|
|
1328
1371
|
const i = {};
|
|
1329
|
-
i.obj =
|
|
1372
|
+
i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
|
|
1330
1373
|
},
|
|
1331
|
-
(
|
|
1332
|
-
|
|
1374
|
+
(s) => {
|
|
1375
|
+
n && n?.(s);
|
|
1333
1376
|
}
|
|
1334
1377
|
);
|
|
1335
1378
|
}
|
|
1336
|
-
function
|
|
1337
|
-
const
|
|
1379
|
+
function et(e, t = void 0, n = void 0) {
|
|
1380
|
+
const s = [];
|
|
1338
1381
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1339
1382
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1340
1383
|
return;
|
|
1341
1384
|
}
|
|
1342
1385
|
e.objIds.forEach((i, r) => {
|
|
1343
|
-
|
|
1386
|
+
L(
|
|
1344
1387
|
e,
|
|
1345
1388
|
i.objID,
|
|
1346
1389
|
(o) => {
|
|
1347
|
-
|
|
1390
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (M = o.affaires.map((a) => a.objectID), oe(e, J)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1348
1391
|
}
|
|
1349
1392
|
);
|
|
1350
1393
|
});
|
|
1351
1394
|
}
|
|
1352
|
-
function
|
|
1353
|
-
|
|
1395
|
+
function oe(e, t, n = void 0, s = void 0) {
|
|
1396
|
+
ie(
|
|
1354
1397
|
e,
|
|
1355
|
-
|
|
1398
|
+
M,
|
|
1356
1399
|
(i) => {
|
|
1357
1400
|
const r = [...t];
|
|
1358
|
-
r.find((o) => o.objectID === i.objectId).data = i.data,
|
|
1401
|
+
r.find((o) => o.objectID === i.objectId).data = i.data, J = r, U.push(i.data), n && n(U);
|
|
1359
1402
|
},
|
|
1360
1403
|
(i) => {
|
|
1361
|
-
|
|
1404
|
+
s && (s(i), console.log(i));
|
|
1362
1405
|
}
|
|
1363
1406
|
);
|
|
1364
1407
|
}
|
|
1365
|
-
const
|
|
1408
|
+
const re = "FA35FB9B177A280065800EA0000F599C", ce = [
|
|
1366
1409
|
"swym",
|
|
1367
1410
|
"3dspace",
|
|
1368
1411
|
"drive",
|
|
1369
1412
|
"usersgroup",
|
|
1370
1413
|
"3dplan",
|
|
1371
1414
|
"dashboard"
|
|
1372
|
-
],
|
|
1415
|
+
], G = {
|
|
1373
1416
|
how: "ds6w:how",
|
|
1374
1417
|
what: "ds6w:what",
|
|
1375
1418
|
when: "ds6w:when",
|
|
1376
1419
|
where: "ds6w:where",
|
|
1377
1420
|
who: "ds6w:who",
|
|
1378
1421
|
why: "ds6w:why"
|
|
1379
|
-
},
|
|
1380
|
-
objId:
|
|
1422
|
+
}, de = {
|
|
1423
|
+
objId: re,
|
|
1381
1424
|
pred: "who",
|
|
1382
1425
|
order_by: "desc",
|
|
1383
1426
|
tag: "testTag"
|
|
1384
1427
|
};
|
|
1385
|
-
function
|
|
1428
|
+
function tt(e, t, n = void 0, s = void 0) {
|
|
1386
1429
|
const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
|
|
1387
1430
|
uri: "/resources/6w/tags",
|
|
1388
1431
|
otpCTX: "SecurityContext=preferred",
|
|
1389
1432
|
optTenant: `tenant=${r}`
|
|
1390
|
-
},
|
|
1433
|
+
}, u = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1391
1434
|
tag: [
|
|
1392
1435
|
{
|
|
1393
1436
|
subject: [
|
|
@@ -1395,54 +1438,54 @@ function Ze(e, t, s = void 0, n = void 0) {
|
|
|
1395
1438
|
uri: `pid://${o}`
|
|
1396
1439
|
}
|
|
1397
1440
|
],
|
|
1398
|
-
predicate:
|
|
1441
|
+
predicate: G[a],
|
|
1399
1442
|
object: {
|
|
1400
1443
|
literal: c
|
|
1401
1444
|
}
|
|
1402
1445
|
}
|
|
1403
1446
|
]
|
|
1404
1447
|
};
|
|
1405
|
-
m(
|
|
1448
|
+
m(u, {
|
|
1406
1449
|
method: "PUT",
|
|
1407
1450
|
headers: {
|
|
1408
1451
|
"Content-Type": "application/json",
|
|
1409
1452
|
Accept: "application/json"
|
|
1410
1453
|
},
|
|
1411
|
-
data: JSON.stringify(
|
|
1454
|
+
data: JSON.stringify(p),
|
|
1412
1455
|
onComplete(f) {
|
|
1413
1456
|
JSON.parse(f);
|
|
1414
1457
|
const l = {};
|
|
1415
1458
|
setTimeout(() => {
|
|
1416
|
-
|
|
1459
|
+
R(
|
|
1417
1460
|
e,
|
|
1418
1461
|
o,
|
|
1419
1462
|
(g) => {
|
|
1420
1463
|
const y = g.data[0].dataelements.title, h = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", S = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1421
|
-
l.name = y, l.ext = h, l.createBy = S, t.info = { ...l },
|
|
1464
|
+
l.name = y, l.ext = h, l.createBy = S, t.info = { ...l }, ue(
|
|
1422
1465
|
e,
|
|
1423
1466
|
t,
|
|
1424
1467
|
(_) => {
|
|
1425
|
-
|
|
1468
|
+
n && n(_);
|
|
1426
1469
|
},
|
|
1427
1470
|
(_) => {
|
|
1428
|
-
|
|
1471
|
+
s && s(_);
|
|
1429
1472
|
}
|
|
1430
1473
|
);
|
|
1431
1474
|
},
|
|
1432
1475
|
(g, y) => {
|
|
1433
1476
|
const h = g;
|
|
1434
|
-
h.msg = y.errormsg, h.errCode = y.errorcode, console.log("❌ sendDirectMessage => ", h),
|
|
1477
|
+
h.msg = y.errormsg, h.errCode = y.errorcode, console.log("❌ sendDirectMessage => ", h), s && s(h);
|
|
1435
1478
|
}
|
|
1436
1479
|
);
|
|
1437
1480
|
}, 2e3);
|
|
1438
1481
|
},
|
|
1439
1482
|
onFailure(f, l) {
|
|
1440
1483
|
const g = f;
|
|
1441
|
-
g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g),
|
|
1484
|
+
g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1442
1485
|
}
|
|
1443
1486
|
});
|
|
1444
1487
|
}
|
|
1445
|
-
function
|
|
1488
|
+
function ue(e, t, n = void 0, s = void 0) {
|
|
1446
1489
|
console.log("obj ", t);
|
|
1447
1490
|
const i = t.info.name, r = {
|
|
1448
1491
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
@@ -1450,7 +1493,7 @@ function ce(e, t, s = void 0, n = void 0) {
|
|
|
1450
1493
|
}, o = `${r.baseUrl}${r.uri}`, a = {
|
|
1451
1494
|
"Content-Type": "application/json",
|
|
1452
1495
|
Accept: "application/json,text/javascript,*/*"
|
|
1453
|
-
}, c =
|
|
1496
|
+
}, c = B(), d = {
|
|
1454
1497
|
with_indexing_date: !0,
|
|
1455
1498
|
with_synthesis: !0,
|
|
1456
1499
|
with_nls: !1,
|
|
@@ -1492,7 +1535,7 @@ function ce(e, t, s = void 0, n = void 0) {
|
|
|
1492
1535
|
}
|
|
1493
1536
|
},
|
|
1494
1537
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1495
|
-
order_by:
|
|
1538
|
+
order_by: de.order_by,
|
|
1496
1539
|
order_field: "relevance",
|
|
1497
1540
|
select_snippets: [
|
|
1498
1541
|
"ds6w:snippet",
|
|
@@ -1503,7 +1546,7 @@ function ce(e, t, s = void 0, n = void 0) {
|
|
|
1503
1546
|
],
|
|
1504
1547
|
nresults: 40,
|
|
1505
1548
|
start: "0",
|
|
1506
|
-
source:
|
|
1549
|
+
source: ce,
|
|
1507
1550
|
tenant: e.tenant,
|
|
1508
1551
|
login: {
|
|
1509
1552
|
"3dspace": {
|
|
@@ -1515,17 +1558,17 @@ function ce(e, t, s = void 0, n = void 0) {
|
|
|
1515
1558
|
method: "POST",
|
|
1516
1559
|
headers: a,
|
|
1517
1560
|
data: JSON.stringify(d),
|
|
1518
|
-
onComplete(
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1561
|
+
onComplete(u) {
|
|
1562
|
+
const p = JSON.parse(u);
|
|
1563
|
+
n(p);
|
|
1521
1564
|
},
|
|
1522
|
-
onFailure(
|
|
1523
|
-
const f =
|
|
1524
|
-
f.msg =
|
|
1565
|
+
onFailure(u, p) {
|
|
1566
|
+
const f = u;
|
|
1567
|
+
f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
|
|
1525
1568
|
}
|
|
1526
1569
|
});
|
|
1527
1570
|
}
|
|
1528
|
-
function
|
|
1571
|
+
function nt(e, t, n = void 0, s = void 0) {
|
|
1529
1572
|
const { objId: i, pred: r, tag: o } = t, a = {
|
|
1530
1573
|
uri: "/resources/6w/tags",
|
|
1531
1574
|
otpCTX: "SecurityContext=preferred",
|
|
@@ -1538,7 +1581,7 @@ function et(e, t, s = void 0, n = void 0) {
|
|
|
1538
1581
|
uri: `pid://${i}`
|
|
1539
1582
|
}
|
|
1540
1583
|
],
|
|
1541
|
-
predicate:
|
|
1584
|
+
predicate: G[r],
|
|
1542
1585
|
object: {
|
|
1543
1586
|
literal: o
|
|
1544
1587
|
}
|
|
@@ -1552,16 +1595,16 @@ function et(e, t, s = void 0, n = void 0) {
|
|
|
1552
1595
|
"Content-Type": "application/json",
|
|
1553
1596
|
Accept: "application/json,text/javascript,*/*"
|
|
1554
1597
|
},
|
|
1555
|
-
onComplete(
|
|
1556
|
-
|
|
1598
|
+
onComplete(u) {
|
|
1599
|
+
n && n(u);
|
|
1557
1600
|
},
|
|
1558
|
-
onFailure(
|
|
1559
|
-
const f =
|
|
1560
|
-
f.msg =
|
|
1601
|
+
onFailure(u, p) {
|
|
1602
|
+
const f = u;
|
|
1603
|
+
f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
|
|
1561
1604
|
}
|
|
1562
1605
|
});
|
|
1563
1606
|
}
|
|
1564
|
-
function
|
|
1607
|
+
function st(e, t = "", n = void 0, s = void 0) {
|
|
1565
1608
|
const { space: i } = e;
|
|
1566
1609
|
if (t === "")
|
|
1567
1610
|
return;
|
|
@@ -1576,29 +1619,29 @@ function tt(e, t = "", s = void 0, n = void 0) {
|
|
|
1576
1619
|
headers: o,
|
|
1577
1620
|
data: c,
|
|
1578
1621
|
onComplete(d) {
|
|
1579
|
-
|
|
1622
|
+
n && n(JSON.parse(d));
|
|
1580
1623
|
},
|
|
1581
|
-
onFailure(d,
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1624
|
+
onFailure(d, u) {
|
|
1625
|
+
const p = d;
|
|
1626
|
+
p.msg = u.error, s && s(p);
|
|
1584
1627
|
}
|
|
1585
1628
|
});
|
|
1586
1629
|
}
|
|
1587
|
-
async function
|
|
1588
|
-
const
|
|
1589
|
-
return m(
|
|
1630
|
+
async function w(e, t = void 0, n = void 0) {
|
|
1631
|
+
const s = e.space + "/api/index/tk";
|
|
1632
|
+
return m(s, {
|
|
1590
1633
|
onComplete(i, r, o) {
|
|
1591
1634
|
const a = JSON.parse(i);
|
|
1592
1635
|
if (t)
|
|
1593
1636
|
return t(a), e.token = a?.result?.ServerToken;
|
|
1594
1637
|
},
|
|
1595
1638
|
onFailure(i) {
|
|
1596
|
-
|
|
1639
|
+
n && n(i);
|
|
1597
1640
|
}
|
|
1598
1641
|
});
|
|
1599
1642
|
}
|
|
1600
|
-
function
|
|
1601
|
-
const
|
|
1643
|
+
function it(e, t = void 0, n = void 0) {
|
|
1644
|
+
const s = `${e.space}/api/exalead/whatsnew`, i = {
|
|
1602
1645
|
params: {
|
|
1603
1646
|
community_id: null,
|
|
1604
1647
|
hash_key: null,
|
|
@@ -1608,8 +1651,8 @@ function nt(e, t = void 0, s = void 0) {
|
|
|
1608
1651
|
start: 0
|
|
1609
1652
|
}
|
|
1610
1653
|
};
|
|
1611
|
-
|
|
1612
|
-
m(
|
|
1654
|
+
w(e, (r) => {
|
|
1655
|
+
m(s, {
|
|
1613
1656
|
method: "POST",
|
|
1614
1657
|
headers: {
|
|
1615
1658
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
@@ -1622,13 +1665,13 @@ function nt(e, t = void 0, s = void 0) {
|
|
|
1622
1665
|
t && t(o, a);
|
|
1623
1666
|
},
|
|
1624
1667
|
onFailure(o, a) {
|
|
1625
|
-
|
|
1668
|
+
n && n(o, a);
|
|
1626
1669
|
}
|
|
1627
1670
|
});
|
|
1628
1671
|
});
|
|
1629
1672
|
}
|
|
1630
|
-
function
|
|
1631
|
-
const
|
|
1673
|
+
function at(e, t = void 0, n = void 0) {
|
|
1674
|
+
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1632
1675
|
params: {
|
|
1633
1676
|
idsToFilterArr: [],
|
|
1634
1677
|
mode: "offline",
|
|
@@ -1637,8 +1680,8 @@ function st(e, t = void 0, s = void 0) {
|
|
|
1637
1680
|
maxNbOfCommonElements: "5"
|
|
1638
1681
|
}
|
|
1639
1682
|
};
|
|
1640
|
-
|
|
1641
|
-
m(
|
|
1683
|
+
w(e, (r) => {
|
|
1684
|
+
m(s, {
|
|
1642
1685
|
method: "POST",
|
|
1643
1686
|
headers: {
|
|
1644
1687
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
@@ -1652,28 +1695,28 @@ function st(e, t = void 0, s = void 0) {
|
|
|
1652
1695
|
t && t(c, o);
|
|
1653
1696
|
},
|
|
1654
1697
|
onFailure(o, a) {
|
|
1655
|
-
|
|
1698
|
+
n && n(o, a);
|
|
1656
1699
|
}
|
|
1657
1700
|
});
|
|
1658
1701
|
});
|
|
1659
1702
|
}
|
|
1660
|
-
function
|
|
1661
|
-
const
|
|
1703
|
+
function ot(e, t = void 0, n = void 0) {
|
|
1704
|
+
const s = {
|
|
1662
1705
|
base: e.space,
|
|
1663
1706
|
uri: "/api/community/listmycommunities",
|
|
1664
1707
|
limit: `/limit/${e.limit ? e.limit : 500}`,
|
|
1665
1708
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1666
|
-
}, i = `${
|
|
1667
|
-
|
|
1709
|
+
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1710
|
+
w(e, (o) => {
|
|
1668
1711
|
m(i, {
|
|
1669
1712
|
method: "GET",
|
|
1670
1713
|
headers: {
|
|
1671
1714
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1672
1715
|
},
|
|
1673
1716
|
onComplete(a, c, d) {
|
|
1674
|
-
const
|
|
1717
|
+
const p = JSON.parse(a).result;
|
|
1675
1718
|
let f = 0;
|
|
1676
|
-
|
|
1719
|
+
p.forEach((l) => {
|
|
1677
1720
|
const g = {
|
|
1678
1721
|
description: l.description,
|
|
1679
1722
|
id: l.id,
|
|
@@ -1682,24 +1725,24 @@ function it(e, t = void 0, s = void 0) {
|
|
|
1682
1725
|
role: l.role,
|
|
1683
1726
|
access: l.access
|
|
1684
1727
|
};
|
|
1685
|
-
|
|
1728
|
+
pe(
|
|
1686
1729
|
e,
|
|
1687
1730
|
l.id,
|
|
1688
1731
|
(y) => {
|
|
1689
|
-
f++, g.members = y, r.push(g), f ===
|
|
1732
|
+
f++, g.members = y, r.push(g), f === p.length && t && t(r);
|
|
1690
1733
|
},
|
|
1691
|
-
(y) =>
|
|
1734
|
+
(y) => n(y)
|
|
1692
1735
|
);
|
|
1693
1736
|
});
|
|
1694
1737
|
},
|
|
1695
1738
|
onFailure(a, c) {
|
|
1696
1739
|
const d = a;
|
|
1697
|
-
d.status = c.status, d.response = c.errormsg,
|
|
1740
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1698
1741
|
}
|
|
1699
1742
|
});
|
|
1700
1743
|
});
|
|
1701
1744
|
}
|
|
1702
|
-
function
|
|
1745
|
+
function pe(e, t, n, s) {
|
|
1703
1746
|
const i = `${e.space}/api/community/listmembers`, r = {
|
|
1704
1747
|
params: {
|
|
1705
1748
|
page: e.page ? e.page : 1,
|
|
@@ -1707,7 +1750,7 @@ function de(e, t, s, n) {
|
|
|
1707
1750
|
community_id: t
|
|
1708
1751
|
}
|
|
1709
1752
|
};
|
|
1710
|
-
|
|
1753
|
+
w(e, (o) => {
|
|
1711
1754
|
m(i, {
|
|
1712
1755
|
method: "POST",
|
|
1713
1756
|
headers: {
|
|
@@ -1718,20 +1761,20 @@ function de(e, t, s, n) {
|
|
|
1718
1761
|
data: JSON.stringify(r),
|
|
1719
1762
|
type: "json",
|
|
1720
1763
|
onComplete(a, c, d) {
|
|
1721
|
-
|
|
1764
|
+
n && n(a);
|
|
1722
1765
|
},
|
|
1723
1766
|
onFailure(a, c) {
|
|
1724
1767
|
const d = a;
|
|
1725
|
-
d.status = c.status, d.response = c.errormsg,
|
|
1768
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1726
1769
|
}
|
|
1727
1770
|
});
|
|
1728
1771
|
});
|
|
1729
1772
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const
|
|
1732
|
-
e.commu_id || (e.commu_id =
|
|
1773
|
+
function rt(e, t = void 0, n = void 0) {
|
|
1774
|
+
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1775
|
+
e.commu_id || (e.commu_id = s);
|
|
1733
1776
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1734
|
-
|
|
1777
|
+
w(e, (r) => {
|
|
1735
1778
|
m(i, {
|
|
1736
1779
|
method: "GET",
|
|
1737
1780
|
headers: {
|
|
@@ -1745,12 +1788,12 @@ function at(e, t = void 0, s = void 0) {
|
|
|
1745
1788
|
},
|
|
1746
1789
|
onFailure(o, a) {
|
|
1747
1790
|
const c = o;
|
|
1748
|
-
c.status = a.status, c.response = a.errormsg,
|
|
1791
|
+
c.status = a.status, c.response = a.errormsg, n && n(c);
|
|
1749
1792
|
}
|
|
1750
1793
|
});
|
|
1751
1794
|
});
|
|
1752
1795
|
}
|
|
1753
|
-
function
|
|
1796
|
+
function ct(e, t, n = void 0, s = void 0) {
|
|
1754
1797
|
const { listAllContacts: i, currentUser: r } = e;
|
|
1755
1798
|
console.log("__listAllContacts", i.hits);
|
|
1756
1799
|
const o = `${e.space}/api/directmessages`, a = {
|
|
@@ -1759,43 +1802,43 @@ function ot(e, t, s = void 0, n = void 0) {
|
|
|
1759
1802
|
id_msg: "",
|
|
1760
1803
|
senderId: e.currentUser.login,
|
|
1761
1804
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1762
|
-
msg:
|
|
1805
|
+
msg: fe(t.msg)
|
|
1763
1806
|
};
|
|
1764
1807
|
let d = !1;
|
|
1765
|
-
|
|
1808
|
+
le(
|
|
1766
1809
|
a.users,
|
|
1767
|
-
(
|
|
1768
|
-
|
|
1810
|
+
(u) => {
|
|
1811
|
+
u !== void 0 && (c.id_msg = u.id, d = !0, j(e, c));
|
|
1769
1812
|
},
|
|
1770
|
-
(
|
|
1771
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback",
|
|
1813
|
+
(u) => {
|
|
1814
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", u), s && s(u), c.id_msg = "";
|
|
1772
1815
|
}
|
|
1773
1816
|
), d === !1 && setTimeout(() => {
|
|
1774
|
-
d === !1 &&
|
|
1817
|
+
d === !1 && w(e, (u) => {
|
|
1775
1818
|
m(o, {
|
|
1776
1819
|
method: "POST",
|
|
1777
1820
|
headers: {
|
|
1778
1821
|
"Content-Type": "application/json",
|
|
1779
1822
|
Accept: "application/json",
|
|
1780
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1823
|
+
"X-DS-SWYM-CSRFTOKEN": u.result.ServerToken
|
|
1781
1824
|
},
|
|
1782
1825
|
data: JSON.stringify(a),
|
|
1783
1826
|
type: "json",
|
|
1784
|
-
onComplete(
|
|
1785
|
-
const g =
|
|
1786
|
-
g.reponse = JSON.parse(l.response), g.status = l.status,
|
|
1827
|
+
onComplete(p, f, l) {
|
|
1828
|
+
const g = p;
|
|
1829
|
+
g.reponse = JSON.parse(l.response), g.status = l.status, n && n(g), c.id_msg = g.result.id, j(e, c);
|
|
1787
1830
|
},
|
|
1788
|
-
onFailure(
|
|
1789
|
-
const g =
|
|
1790
|
-
g.msg = f.errormsg, g.status = f.status,
|
|
1831
|
+
onFailure(p, f, l) {
|
|
1832
|
+
const g = p;
|
|
1833
|
+
g.msg = f.errormsg, g.status = f.status, s && s(g);
|
|
1791
1834
|
}
|
|
1792
1835
|
});
|
|
1793
1836
|
});
|
|
1794
1837
|
}, 500);
|
|
1795
1838
|
}
|
|
1796
|
-
function
|
|
1839
|
+
function le(e, t, n, s) {
|
|
1797
1840
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1798
|
-
|
|
1841
|
+
w(e, (r) => {
|
|
1799
1842
|
m(i, {
|
|
1800
1843
|
method: "GET",
|
|
1801
1844
|
headers: {
|
|
@@ -1804,25 +1847,25 @@ function pe(e, t, s, n) {
|
|
|
1804
1847
|
},
|
|
1805
1848
|
onComplete(o) {
|
|
1806
1849
|
const a = JSON.parse(o), c = [];
|
|
1807
|
-
a.result.forEach((
|
|
1808
|
-
|
|
1850
|
+
a.result.forEach((p) => {
|
|
1851
|
+
p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
|
|
1809
1852
|
});
|
|
1810
|
-
const d = t.sort(),
|
|
1853
|
+
const d = t.sort(), u = c.find((p) => {
|
|
1811
1854
|
const f = [];
|
|
1812
|
-
return
|
|
1855
|
+
return p.users.forEach((l) => {
|
|
1813
1856
|
f.push(l.login);
|
|
1814
1857
|
}), JSON.stringify(f) === JSON.stringify(d);
|
|
1815
1858
|
});
|
|
1816
|
-
|
|
1859
|
+
n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
|
|
1817
1860
|
},
|
|
1818
1861
|
onFailure(o) {
|
|
1819
1862
|
const a = o;
|
|
1820
|
-
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a),
|
|
1863
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
1821
1864
|
}
|
|
1822
1865
|
});
|
|
1823
1866
|
});
|
|
1824
1867
|
}
|
|
1825
|
-
function
|
|
1868
|
+
function j(e, t, n = void 0, s = void 0) {
|
|
1826
1869
|
const i = {
|
|
1827
1870
|
base: e.space,
|
|
1828
1871
|
uri: "/api/community",
|
|
@@ -1838,7 +1881,7 @@ function R(e, t, s = void 0, n = void 0) {
|
|
|
1838
1881
|
parentCommentUri: null,
|
|
1839
1882
|
richMessage: t.msg
|
|
1840
1883
|
};
|
|
1841
|
-
console.log("_3dSwym_sendDirectMessageData url ", r),
|
|
1884
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
|
|
1842
1885
|
m(r, {
|
|
1843
1886
|
method: "POST",
|
|
1844
1887
|
headers: {
|
|
@@ -1848,25 +1891,25 @@ function R(e, t, s = void 0, n = void 0) {
|
|
|
1848
1891
|
},
|
|
1849
1892
|
data: JSON.stringify(o),
|
|
1850
1893
|
type: "json",
|
|
1851
|
-
onComplete(c, d,
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1894
|
+
onComplete(c, d, u) {
|
|
1895
|
+
const p = c;
|
|
1896
|
+
p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1854
1897
|
},
|
|
1855
1898
|
onFailure(c, d) {
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1899
|
+
const u = c;
|
|
1900
|
+
u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
|
|
1858
1901
|
}
|
|
1859
1902
|
});
|
|
1860
1903
|
});
|
|
1861
1904
|
}
|
|
1862
|
-
function
|
|
1863
|
-
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
1905
|
+
function fe(e) {
|
|
1906
|
+
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1864
1907
|
return `<p>${e} </p>
|
|
1865
1908
|
<br/>
|
|
1866
1909
|
<hr/>
|
|
1867
|
-
<p><u>envoyer :</u>Le <b>${t} à ${
|
|
1910
|
+
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1868
1911
|
}
|
|
1869
|
-
function
|
|
1912
|
+
function dt(e, t, n = void 0, s = void 0) {
|
|
1870
1913
|
const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1871
1914
|
(c) => c.id === t.community_id
|
|
1872
1915
|
), o = e.swymCommunities.find(
|
|
@@ -1877,13 +1920,13 @@ function rt(e, t, s = void 0, n = void 0) {
|
|
|
1877
1920
|
// String, le nom de l'affaire
|
|
1878
1921
|
community_id: r?.id !== void 0 ? r.id : o.id,
|
|
1879
1922
|
// String, l'id de la communauté
|
|
1880
|
-
message:
|
|
1923
|
+
message: me(t.text_html),
|
|
1881
1924
|
// STRING => le contenue du message doit être au format HTML
|
|
1882
1925
|
published: 1
|
|
1883
1926
|
// 1 publier, 0 non publier
|
|
1884
1927
|
}
|
|
1885
1928
|
};
|
|
1886
|
-
|
|
1929
|
+
w(e, (c) => {
|
|
1887
1930
|
const d = {
|
|
1888
1931
|
"Content-type": "application/json;charset=UTF-8",
|
|
1889
1932
|
Accept: "application/json",
|
|
@@ -1894,22 +1937,22 @@ function rt(e, t, s = void 0, n = void 0) {
|
|
|
1894
1937
|
headers: d,
|
|
1895
1938
|
data: JSON.stringify(a),
|
|
1896
1939
|
type: "json",
|
|
1897
|
-
onComplete(
|
|
1898
|
-
const l = JSON.parse(
|
|
1899
|
-
l.status = f.status, l.response = f.response,
|
|
1940
|
+
onComplete(u, p, f) {
|
|
1941
|
+
const l = JSON.parse(u);
|
|
1942
|
+
l.status = f.status, l.response = f.response, n && n(l);
|
|
1900
1943
|
},
|
|
1901
|
-
onFailure(
|
|
1902
|
-
const l =
|
|
1903
|
-
l.status =
|
|
1944
|
+
onFailure(u, p, f) {
|
|
1945
|
+
const l = u;
|
|
1946
|
+
l.status = p.status, l.response = p.errormsg, s && s(l);
|
|
1904
1947
|
}
|
|
1905
1948
|
});
|
|
1906
1949
|
});
|
|
1907
1950
|
}
|
|
1908
|
-
function
|
|
1909
|
-
const
|
|
1951
|
+
function ut(e, t = void 0, n = void 0) {
|
|
1952
|
+
const s = { base: e.space, uri: "/api/idea/add" };
|
|
1910
1953
|
if (!Array.isArray(e.swymCommunities)) {
|
|
1911
1954
|
const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
|
|
1912
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
1955
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1913
1956
|
cause: o
|
|
1914
1957
|
});
|
|
1915
1958
|
}
|
|
@@ -1917,19 +1960,19 @@ function ct(e, t = void 0, s = void 0) {
|
|
|
1917
1960
|
(o) => o.id === e.community_id
|
|
1918
1961
|
) === -1) {
|
|
1919
1962
|
const o = "la communauté n'existe pas dans la liste des communautés du Swym";
|
|
1920
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
1963
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1921
1964
|
cause: o
|
|
1922
1965
|
});
|
|
1923
1966
|
}
|
|
1924
1967
|
if (e.community_id && e.community_id === "") {
|
|
1925
1968
|
const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
|
|
1926
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
1969
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1927
1970
|
cause: o
|
|
1928
1971
|
});
|
|
1929
1972
|
}
|
|
1930
1973
|
if (e.title && e.title === "") {
|
|
1931
1974
|
const o = "☠️ title doit être un String.";
|
|
1932
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
1975
|
+
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1933
1976
|
cause: o
|
|
1934
1977
|
});
|
|
1935
1978
|
}
|
|
@@ -1945,10 +1988,10 @@ function ct(e, t = void 0, s = void 0) {
|
|
|
1945
1988
|
// 1 publier, 0 brouillon
|
|
1946
1989
|
}
|
|
1947
1990
|
};
|
|
1948
|
-
|
|
1991
|
+
w(e, (o) => {
|
|
1949
1992
|
if (!o)
|
|
1950
1993
|
throw new Error(
|
|
1951
|
-
`☠️ token n'est pas disponible pour cette requête : ${
|
|
1994
|
+
`☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
|
|
1952
1995
|
{
|
|
1953
1996
|
cause: o
|
|
1954
1997
|
}
|
|
@@ -1961,31 +2004,31 @@ function ct(e, t = void 0, s = void 0) {
|
|
|
1961
2004
|
},
|
|
1962
2005
|
method: "POST",
|
|
1963
2006
|
data: JSON.stringify(r),
|
|
1964
|
-
onComplete(c, d,
|
|
1965
|
-
const
|
|
1966
|
-
typeof
|
|
2007
|
+
onComplete(c, d, u) {
|
|
2008
|
+
const p = { response: c };
|
|
2009
|
+
typeof p.response == "string" && (p.response = JSON.parse(p.response)), p.status = u.status, t && t(p);
|
|
1967
2010
|
},
|
|
1968
|
-
onFailure(c, d,
|
|
1969
|
-
const
|
|
1970
|
-
`Erreur sur cette requête : ${
|
|
2011
|
+
onFailure(c, d, u) {
|
|
2012
|
+
const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
|
|
2013
|
+
`Erreur sur cette requête : ${s.base + s.uri}`,
|
|
1971
2014
|
{
|
|
1972
|
-
cause: { head:
|
|
2015
|
+
cause: { head: p, rep: f }
|
|
1973
2016
|
}
|
|
1974
2017
|
);
|
|
1975
|
-
|
|
2018
|
+
n && n(l);
|
|
1976
2019
|
}
|
|
1977
2020
|
};
|
|
1978
|
-
m(
|
|
2021
|
+
m(s.base + s.uri, a);
|
|
1979
2022
|
});
|
|
1980
2023
|
}
|
|
1981
|
-
function
|
|
2024
|
+
function pt(e, t, n = void 0, s = void 0) {
|
|
1982
2025
|
const i = `${e.space}/api/idea/delete`, r = {
|
|
1983
2026
|
params: {
|
|
1984
2027
|
community_id: t.community_id,
|
|
1985
2028
|
ideationIds: [t.idee_id]
|
|
1986
2029
|
}
|
|
1987
2030
|
};
|
|
1988
|
-
|
|
2031
|
+
w(e, (o) => {
|
|
1989
2032
|
m(i, {
|
|
1990
2033
|
method: "POST",
|
|
1991
2034
|
headers: {
|
|
@@ -1996,28 +2039,28 @@ function dt(e, t, s = void 0, n = void 0) {
|
|
|
1996
2039
|
data: JSON.stringify(r),
|
|
1997
2040
|
type: "json",
|
|
1998
2041
|
onComplete(a, c, d) {
|
|
1999
|
-
|
|
2042
|
+
n && n(a);
|
|
2000
2043
|
},
|
|
2001
2044
|
onFailure(a, c, d) {
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2045
|
+
const u = a;
|
|
2046
|
+
u.status = c.status, u.response = c.errormsg, s && s(u);
|
|
2004
2047
|
}
|
|
2005
2048
|
});
|
|
2006
2049
|
});
|
|
2007
2050
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const
|
|
2051
|
+
function lt(e, t = void 0, n = void 0) {
|
|
2052
|
+
const s = `${e.space}/api/idea/get`;
|
|
2010
2053
|
if (e.idPost === "") {
|
|
2011
2054
|
const r = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
|
|
2012
|
-
throw new Error(`Erreur sur cette requête : ${
|
|
2055
|
+
throw new Error(`Erreur sur cette requête : ${s}`, { cause: r });
|
|
2013
2056
|
}
|
|
2014
2057
|
const i = {
|
|
2015
2058
|
params: {
|
|
2016
2059
|
id: e.idPost
|
|
2017
2060
|
}
|
|
2018
2061
|
};
|
|
2019
|
-
|
|
2020
|
-
m(
|
|
2062
|
+
w(e, (r) => {
|
|
2063
|
+
m(s, {
|
|
2021
2064
|
method: "POST",
|
|
2022
2065
|
headers: {
|
|
2023
2066
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -2030,13 +2073,13 @@ function pt(e, t = void 0, s = void 0) {
|
|
|
2030
2073
|
},
|
|
2031
2074
|
onFailure(o) {
|
|
2032
2075
|
const a = o;
|
|
2033
|
-
a.status = headers.status, a.response = headers.errormsg,
|
|
2076
|
+
a.status = headers.status, a.response = headers.errormsg, n && n(a);
|
|
2034
2077
|
}
|
|
2035
2078
|
});
|
|
2036
2079
|
});
|
|
2037
2080
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const
|
|
2081
|
+
function ft(e, t, n) {
|
|
2082
|
+
const s = {
|
|
2040
2083
|
base: `${e.space}/api/idea/edit`,
|
|
2041
2084
|
uri: "/api/idea/edit"
|
|
2042
2085
|
}, i = {
|
|
@@ -2060,24 +2103,24 @@ function ut(e, t, s) {
|
|
|
2060
2103
|
},
|
|
2061
2104
|
data: JSON.stringify(i),
|
|
2062
2105
|
onComplete(a, c, d) {
|
|
2063
|
-
const
|
|
2106
|
+
const u = {
|
|
2064
2107
|
response: typeof a == "string" ? JSON.parse(a) : a
|
|
2065
2108
|
};
|
|
2066
|
-
|
|
2109
|
+
u.status = d.status, t && t(u);
|
|
2067
2110
|
},
|
|
2068
2111
|
onFailure(a) {
|
|
2069
|
-
|
|
2112
|
+
n && n(a);
|
|
2070
2113
|
}
|
|
2071
2114
|
};
|
|
2072
|
-
m(
|
|
2115
|
+
m(s.base + s.uri, o);
|
|
2073
2116
|
});
|
|
2074
2117
|
}
|
|
2075
|
-
function
|
|
2118
|
+
function mt(e, t, n = void 0, s = void 0) {
|
|
2076
2119
|
const { space: i } = e;
|
|
2077
2120
|
let { community_id: r, limit: o, page: a, search: c } = t;
|
|
2078
|
-
const d = [],
|
|
2079
|
-
let
|
|
2080
|
-
a || (a =
|
|
2121
|
+
const d = [], u = 1;
|
|
2122
|
+
let p = !1, f = 2;
|
|
2123
|
+
a || (a = u), o || (o = 100);
|
|
2081
2124
|
const l = {
|
|
2082
2125
|
uri: "/api/idea/list",
|
|
2083
2126
|
comId: `/community_id/${r}`,
|
|
@@ -2085,7 +2128,7 @@ function lt(e, t, s = void 0, n = void 0) {
|
|
|
2085
2128
|
page: `/page/${a}`
|
|
2086
2129
|
};
|
|
2087
2130
|
let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
|
|
2088
|
-
|
|
2131
|
+
w(e, (y) => {
|
|
2089
2132
|
const h = (S) => {
|
|
2090
2133
|
m(S, {
|
|
2091
2134
|
method: "GET",
|
|
@@ -2093,36 +2136,36 @@ function lt(e, t, s = void 0, n = void 0) {
|
|
|
2093
2136
|
"X-DS-SWYM-CSRFTOKEN": y.result.ServerToken
|
|
2094
2137
|
},
|
|
2095
2138
|
onComplete(_) {
|
|
2096
|
-
const
|
|
2097
|
-
if (f = Math.ceil(Number(
|
|
2139
|
+
const C = { response: JSON.parse(_) };
|
|
2140
|
+
if (f = Math.ceil(Number(C.response.nb_result) / 100), _ && f >= a) {
|
|
2098
2141
|
if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
|
|
2099
|
-
d.push(
|
|
2142
|
+
d.push(C.response.result);
|
|
2100
2143
|
else {
|
|
2101
|
-
const T =
|
|
2102
|
-
(
|
|
2144
|
+
const T = C.response.result.find(
|
|
2145
|
+
(E) => E.title.includes(c)
|
|
2103
2146
|
);
|
|
2104
2147
|
if (T) {
|
|
2105
|
-
|
|
2148
|
+
n(T);
|
|
2106
2149
|
return;
|
|
2107
2150
|
}
|
|
2108
2151
|
}
|
|
2109
|
-
if (
|
|
2110
|
-
|
|
2152
|
+
if (n && f < a && !c) {
|
|
2153
|
+
p = !0, n(d);
|
|
2111
2154
|
return;
|
|
2112
2155
|
}
|
|
2113
2156
|
h(S);
|
|
2114
2157
|
}
|
|
2115
2158
|
},
|
|
2116
|
-
onFailure(_,
|
|
2159
|
+
onFailure(_, C) {
|
|
2117
2160
|
const T = _;
|
|
2118
|
-
T.status =
|
|
2161
|
+
T.status = C.status, T.response = C.errormsg, s && s(T);
|
|
2119
2162
|
}
|
|
2120
2163
|
});
|
|
2121
2164
|
};
|
|
2122
|
-
|
|
2165
|
+
p || h(g);
|
|
2123
2166
|
});
|
|
2124
2167
|
}
|
|
2125
|
-
function
|
|
2168
|
+
function me(e) {
|
|
2126
2169
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
2127
2170
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
2128
2171
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -2197,10 +2240,10 @@ function le(e) {
|
|
|
2197
2240
|
<p>
|
|
2198
2241
|
</p>` : e;
|
|
2199
2242
|
}
|
|
2200
|
-
function
|
|
2201
|
-
const
|
|
2202
|
-
|
|
2203
|
-
m(
|
|
2243
|
+
function gt(e, t = void 0, n = void 0) {
|
|
2244
|
+
const s = e.space + "/api/user/getcurrent/";
|
|
2245
|
+
w(e, (i) => {
|
|
2246
|
+
m(s, {
|
|
2204
2247
|
method: "GET",
|
|
2205
2248
|
headers: {
|
|
2206
2249
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
@@ -2211,14 +2254,14 @@ function ft(e, t = void 0, s = void 0) {
|
|
|
2211
2254
|
},
|
|
2212
2255
|
onFailure(r, o, a) {
|
|
2213
2256
|
const c = { erreur: JSON.parse(r), headers: o, xhr: a };
|
|
2214
|
-
|
|
2257
|
+
n && n(c);
|
|
2215
2258
|
}
|
|
2216
2259
|
});
|
|
2217
2260
|
});
|
|
2218
2261
|
}
|
|
2219
|
-
function
|
|
2262
|
+
function ht(e, t, n = void 0, s = void 0) {
|
|
2220
2263
|
const i = e.space + "/api/user/find/login/" + t;
|
|
2221
|
-
|
|
2264
|
+
w(
|
|
2222
2265
|
e,
|
|
2223
2266
|
(r) => {
|
|
2224
2267
|
m(i, {
|
|
@@ -2226,25 +2269,25 @@ function mt(e, t, s = void 0, n = void 0) {
|
|
|
2226
2269
|
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
2227
2270
|
onComplete(o, a, c) {
|
|
2228
2271
|
const d = JSON.parse(o);
|
|
2229
|
-
|
|
2272
|
+
n && n(d);
|
|
2230
2273
|
},
|
|
2231
2274
|
onFailure(o) {
|
|
2232
|
-
|
|
2275
|
+
s && s(o);
|
|
2233
2276
|
}
|
|
2234
2277
|
});
|
|
2235
2278
|
},
|
|
2236
|
-
|
|
2279
|
+
s
|
|
2237
2280
|
);
|
|
2238
2281
|
}
|
|
2239
|
-
function
|
|
2240
|
-
e.tenant && b(e, (
|
|
2241
|
-
const i =
|
|
2282
|
+
function yt(e, t = void 0, n = void 0) {
|
|
2283
|
+
e.tenant && b(e, (s) => {
|
|
2284
|
+
const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2242
2285
|
return t && t(i), i;
|
|
2243
2286
|
});
|
|
2244
2287
|
}
|
|
2245
|
-
function
|
|
2246
|
-
e.tenant && b(e, (
|
|
2247
|
-
const i =
|
|
2288
|
+
function St(e, t = void 0, n = void 0) {
|
|
2289
|
+
e.tenant && b(e, (s) => {
|
|
2290
|
+
const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
|
|
2248
2291
|
m(o, {
|
|
2249
2292
|
async onComplete(a) {
|
|
2250
2293
|
const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
|
|
@@ -2255,88 +2298,88 @@ function ht(e, t = void 0, s = void 0) {
|
|
|
2255
2298
|
});
|
|
2256
2299
|
},
|
|
2257
2300
|
onFailure(a) {
|
|
2258
|
-
|
|
2301
|
+
n && n(a);
|
|
2259
2302
|
}
|
|
2260
2303
|
});
|
|
2261
2304
|
});
|
|
2262
2305
|
}
|
|
2263
|
-
function
|
|
2306
|
+
function _t(e, t = void 0, n = void 0) {
|
|
2264
2307
|
if (e.tenant) {
|
|
2265
|
-
const
|
|
2266
|
-
fetch(`https://api.uixhome.fr/${
|
|
2308
|
+
const s = e.tenant.toLowerCase();
|
|
2309
|
+
fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
|
|
2267
2310
|
method: "POST"
|
|
2268
2311
|
}).then((i) => i.json()).then((i) => {
|
|
2269
2312
|
t && t(i);
|
|
2270
2313
|
}).catch((i) => {
|
|
2271
|
-
|
|
2314
|
+
n && n(i);
|
|
2272
2315
|
});
|
|
2273
2316
|
}
|
|
2274
2317
|
}
|
|
2275
|
-
async function
|
|
2318
|
+
async function wt(e, t, n = void 0, s = void 0) {
|
|
2276
2319
|
e.tenant && b(e, (i) => {
|
|
2277
2320
|
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
|
|
2278
2321
|
fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
|
|
2279
2322
|
method: "POST"
|
|
2280
2323
|
}).then((c) => c.json()).then((c) => {
|
|
2281
|
-
s && s(c);
|
|
2282
|
-
}).catch((c) => {
|
|
2283
2324
|
n && n(c);
|
|
2325
|
+
}).catch((c) => {
|
|
2326
|
+
s && s(c);
|
|
2284
2327
|
});
|
|
2285
2328
|
});
|
|
2286
2329
|
}
|
|
2287
|
-
async function
|
|
2330
|
+
async function Ct(e, t, n = void 0, s = void 0) {
|
|
2288
2331
|
e.tenant && b(e, (i) => {
|
|
2289
2332
|
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
|
|
2290
2333
|
fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
|
|
2291
2334
|
method: "GET"
|
|
2292
2335
|
}).then((c) => c.json()).then((c) => {
|
|
2293
|
-
s && s(c);
|
|
2294
|
-
}).catch((c) => {
|
|
2295
2336
|
n && n(c);
|
|
2337
|
+
}).catch((c) => {
|
|
2338
|
+
s && s(c);
|
|
2296
2339
|
});
|
|
2297
2340
|
});
|
|
2298
2341
|
}
|
|
2299
|
-
async function
|
|
2342
|
+
async function Tt(e, t, n, s = void 0, i = void 0) {
|
|
2300
2343
|
if (e.tenant) {
|
|
2301
2344
|
const r = e.tenant.toLowerCase();
|
|
2302
|
-
fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/${
|
|
2345
|
+
fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/${n}?t=${t}`, {
|
|
2303
2346
|
method: "POST"
|
|
2304
2347
|
}).then((o) => o.json()).then((o) => {
|
|
2305
|
-
|
|
2348
|
+
s && s(o);
|
|
2306
2349
|
}).catch((o) => {
|
|
2307
2350
|
i && i(o);
|
|
2308
2351
|
});
|
|
2309
2352
|
}
|
|
2310
2353
|
}
|
|
2311
|
-
async function
|
|
2354
|
+
async function bt(e, t, n, s = void 0, i = void 0) {
|
|
2312
2355
|
if (e.tenant) {
|
|
2313
2356
|
const r = e.tenant.toLowerCase();
|
|
2314
|
-
fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/rows/${
|
|
2357
|
+
fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`, {
|
|
2315
2358
|
method: "POST"
|
|
2316
2359
|
}).then((o) => o.json()).then((o) => {
|
|
2317
|
-
|
|
2360
|
+
s && s(o);
|
|
2318
2361
|
}).catch((o) => {
|
|
2319
2362
|
i && i(o);
|
|
2320
2363
|
});
|
|
2321
2364
|
}
|
|
2322
2365
|
}
|
|
2323
|
-
async function
|
|
2366
|
+
async function Ot(e, t, n, s, i = void 0, r = void 0) {
|
|
2324
2367
|
e.tenant && b(e, (o) => {
|
|
2325
2368
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2326
2369
|
const a = e.tenant.toLowerCase();
|
|
2327
|
-
fetch(`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${
|
|
2370
|
+
fetch(`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`, {
|
|
2328
2371
|
method: "POST"
|
|
2329
2372
|
}).then((c) => c.json()).then((c) => {
|
|
2330
2373
|
i && i(c);
|
|
2331
2374
|
}).catch((c) => {
|
|
2332
|
-
r && r(c,
|
|
2375
|
+
r && r(c, n, s);
|
|
2333
2376
|
});
|
|
2334
2377
|
});
|
|
2335
2378
|
}
|
|
2336
|
-
async function
|
|
2379
|
+
async function $t(e, t, n, s, i, r = void 0, o = void 0) {
|
|
2337
2380
|
if (e.tenant) {
|
|
2338
|
-
const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${
|
|
2339
|
-
|
|
2381
|
+
const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
|
|
2382
|
+
s
|
|
2340
2383
|
)}&b=${encodeURIComponent(i)}`;
|
|
2341
2384
|
fetch(a, {
|
|
2342
2385
|
method: "POST"
|
|
@@ -2345,17 +2388,17 @@ async function bt(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
2345
2388
|
}).catch((c) => {
|
|
2346
2389
|
o && o({
|
|
2347
2390
|
error: c,
|
|
2348
|
-
tableId:
|
|
2349
|
-
columns:
|
|
2391
|
+
tableId: n,
|
|
2392
|
+
columns: s,
|
|
2350
2393
|
body: i
|
|
2351
2394
|
});
|
|
2352
2395
|
});
|
|
2353
2396
|
}
|
|
2354
2397
|
}
|
|
2355
|
-
async function
|
|
2398
|
+
async function It(e, t, n, s, i = void 0, r = void 0) {
|
|
2356
2399
|
if (e.tenant) {
|
|
2357
|
-
const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${
|
|
2358
|
-
|
|
2400
|
+
const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
|
|
2401
|
+
s
|
|
2359
2402
|
)}`;
|
|
2360
2403
|
fetch(o, {
|
|
2361
2404
|
method: "POST"
|
|
@@ -2369,12 +2412,12 @@ async function Ot(e, t, s, n, i = void 0, r = void 0) {
|
|
|
2369
2412
|
});
|
|
2370
2413
|
}
|
|
2371
2414
|
}
|
|
2372
|
-
async function
|
|
2415
|
+
async function Nt(e, t, n, s, i = void 0, r = void 0) {
|
|
2373
2416
|
e.tenant && b(e, (o) => {
|
|
2374
2417
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2375
2418
|
const a = e.tenant.toLowerCase();
|
|
2376
2419
|
fetch(
|
|
2377
|
-
`https://api.uixhome.fr/${a}/iterop/runtime/processes/${
|
|
2420
|
+
`https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
|
|
2378
2421
|
{
|
|
2379
2422
|
method: "POST"
|
|
2380
2423
|
}
|
|
@@ -2385,28 +2428,28 @@ async function $t(e, t, s, n, i = void 0, r = void 0) {
|
|
|
2385
2428
|
});
|
|
2386
2429
|
});
|
|
2387
2430
|
}
|
|
2388
|
-
async function
|
|
2431
|
+
async function vt(e, t, n, s = void 0, i = void 0) {
|
|
2389
2432
|
e.tenant && b(e, (r) => {
|
|
2390
2433
|
r.services.find((a) => a.id === "businessprocess")?.url + "";
|
|
2391
2434
|
const o = e.tenant.toLowerCase();
|
|
2392
2435
|
fetch(
|
|
2393
|
-
`https://api.uixhome.fr/${o}/iterop/dependencytable/one/${
|
|
2436
|
+
`https://api.uixhome.fr/${o}/iterop/dependencytable/one/${n}/?t=${t}`,
|
|
2394
2437
|
{
|
|
2395
2438
|
method: "POST"
|
|
2396
2439
|
}
|
|
2397
2440
|
).then((a) => a.json()).then((a) => {
|
|
2398
|
-
|
|
2441
|
+
s && s(a);
|
|
2399
2442
|
}).catch((a) => {
|
|
2400
2443
|
i && i(a);
|
|
2401
2444
|
});
|
|
2402
2445
|
});
|
|
2403
2446
|
}
|
|
2404
|
-
async function
|
|
2447
|
+
async function kt(e, t, n, s, i, r = void 0, o = void 0) {
|
|
2405
2448
|
e.tenant && b(e, (a) => {
|
|
2406
2449
|
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2407
2450
|
const c = e.tenant.toLowerCase();
|
|
2408
2451
|
fetch(
|
|
2409
|
-
`https://api.uixhome.fr/${c}/iterop/dependencytable/patch/${
|
|
2452
|
+
`https://api.uixhome.fr/${c}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
|
|
2410
2453
|
{
|
|
2411
2454
|
method: "POST"
|
|
2412
2455
|
}
|
|
@@ -2417,12 +2460,12 @@ async function vt(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
2417
2460
|
});
|
|
2418
2461
|
});
|
|
2419
2462
|
}
|
|
2420
|
-
async function
|
|
2463
|
+
async function At(e, t, n, s, i = void 0, r = void 0) {
|
|
2421
2464
|
e.tenant && b(e, (o) => {
|
|
2422
2465
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2423
2466
|
const a = e.tenant.toLowerCase();
|
|
2424
2467
|
fetch(
|
|
2425
|
-
`https://api.uixhome.fr/${a}/iterop/dependencytable/put/${
|
|
2468
|
+
`https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
|
|
2426
2469
|
{
|
|
2427
2470
|
method: "POST"
|
|
2428
2471
|
}
|
|
@@ -2434,30 +2477,30 @@ async function Nt(e, t, s, n, i = void 0, r = void 0) {
|
|
|
2434
2477
|
});
|
|
2435
2478
|
}
|
|
2436
2479
|
//!SECTION
|
|
2437
|
-
async function
|
|
2480
|
+
async function Ft(e, t, n, s = void 0, i = void 0) {
|
|
2438
2481
|
if (e.tenant) {
|
|
2439
2482
|
const r = e.tenant.toLowerCase();
|
|
2440
2483
|
fetch(
|
|
2441
|
-
`https://api.uixhome.fr/${r}/iterop/list/one/${
|
|
2484
|
+
`https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
|
|
2442
2485
|
{
|
|
2443
2486
|
method: "POST"
|
|
2444
2487
|
}
|
|
2445
2488
|
).then((o) => o.json()).then((o) => {
|
|
2446
|
-
|
|
2489
|
+
s && s(o);
|
|
2447
2490
|
}).catch((o) => {
|
|
2448
2491
|
i && i(o);
|
|
2449
2492
|
});
|
|
2450
2493
|
}
|
|
2451
2494
|
}
|
|
2452
2495
|
//!SECTION
|
|
2453
|
-
function
|
|
2496
|
+
function xt(e) {
|
|
2454
2497
|
const t = "Hello " + e;
|
|
2455
2498
|
return console.log(t), t;
|
|
2456
2499
|
}
|
|
2457
|
-
function
|
|
2458
|
-
return console.log("credentials", e), new Promise((
|
|
2500
|
+
function Ut(e, t = void 0, n = void 0) {
|
|
2501
|
+
return console.log("credentials", e), new Promise((s) => {
|
|
2459
2502
|
if (e.token === "" && O(e), !e.space || e.space === "") {
|
|
2460
|
-
const o =
|
|
2503
|
+
const o = q();
|
|
2461
2504
|
console.log("platformeInfo", o);
|
|
2462
2505
|
}
|
|
2463
2506
|
A(
|
|
@@ -2522,110 +2565,110 @@ function jt(e, t = void 0, s = void 0) {
|
|
|
2522
2565
|
t && t(d);
|
|
2523
2566
|
},
|
|
2524
2567
|
onFailure(d) {
|
|
2525
|
-
|
|
2568
|
+
n && n(d);
|
|
2526
2569
|
}
|
|
2527
2570
|
});
|
|
2528
2571
|
}
|
|
2529
2572
|
},
|
|
2530
2573
|
onFailure(o) {
|
|
2531
|
-
|
|
2574
|
+
n && n(o);
|
|
2532
2575
|
}
|
|
2533
2576
|
});
|
|
2534
2577
|
});
|
|
2535
2578
|
}
|
|
2536
2579
|
export {
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2580
|
+
B as UUID,
|
|
2581
|
+
Ut as _3DSearch_usersGroup,
|
|
2582
|
+
Je as _3DSpace_Create_Doc,
|
|
2583
|
+
Me as _3DSpace_Update_Doc,
|
|
2584
|
+
Xe as _3DSpace_bookmark_addSubsciptions,
|
|
2585
|
+
We as _3DSpace_bookmark_newWorkspace,
|
|
2543
2586
|
O as _3DSpace_csrf,
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2587
|
+
L as _3DSpace_download_doc,
|
|
2588
|
+
ie as _3DSpace_download_multidoc,
|
|
2589
|
+
D as _3DSpace_file_update,
|
|
2590
|
+
ee as _3DSpace_file_update_csr,
|
|
2591
|
+
Le as _3DSpace_file_url_csr,
|
|
2549
2592
|
k as _3DSpace_get_csrf,
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2593
|
+
R as _3DSpace_get_docInfo,
|
|
2594
|
+
ae as _3DSpace_get_downloadTicket_multidoc,
|
|
2595
|
+
De as _3DSpace_get_multiDocInfo,
|
|
2553
2596
|
A as _3DSpace_get_securityContexts,
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2597
|
+
x as _3DSpace_get_ticket,
|
|
2598
|
+
Ve as _3DSpace_lifecycle_changeRevision,
|
|
2599
|
+
Ee as _3DSpace_lifecycle_changeState,
|
|
2600
|
+
Ke as _3DSpace_lifecycle_getGraph,
|
|
2601
|
+
Be as _3DSpace_lifecycle_getNextRevision,
|
|
2602
|
+
Ge as _3DSpace_lifecycle_getNextStates,
|
|
2603
|
+
ct as _3DSwym_buildDirectMessage,
|
|
2604
|
+
pt as _3DSwym_deleteIdea,
|
|
2605
|
+
ft as _3DSwym_editIdea,
|
|
2606
|
+
le as _3DSwym_findCommunityToInstantMSG,
|
|
2607
|
+
ot as _3DSwym_getAllCommunities,
|
|
2608
|
+
mt as _3DSwym_getAllListIdeas,
|
|
2609
|
+
it as _3DSwym_getAllNews,
|
|
2610
|
+
at as _3DSwym_getFamiliarPeople,
|
|
2611
|
+
rt as _3DSwym_getIdeaStatusMaturity,
|
|
2612
|
+
pe as _3DSwym_getMembersCommunity,
|
|
2613
|
+
lt as _3DSwym_getOneIdea,
|
|
2614
|
+
w as _3DSwym_get_Token,
|
|
2615
|
+
gt as _3DSwym_get_currentUser,
|
|
2616
|
+
ht as _3DSwym_get_findUser,
|
|
2617
|
+
ut as _3DSwym_postIdea,
|
|
2618
|
+
dt as _3DSwym_postIdeaTemplate,
|
|
2619
|
+
j as _3DSwym_sendMessageData,
|
|
2620
|
+
ke as _AppMngt_get_info_user,
|
|
2621
|
+
ve as _AppMngt_get_users,
|
|
2622
|
+
Ot as _Iterop_AddOrRemoveRows,
|
|
2623
|
+
St as _Iterop_Auth_CAS,
|
|
2624
|
+
vt as _Iterop_GetOneDependencyTable,
|
|
2625
|
+
Ft as _Iterop_GetOneList,
|
|
2626
|
+
wt as _Iterop_ListUsers,
|
|
2627
|
+
kt as _Iterop_PatchDependencyTable,
|
|
2628
|
+
At as _Iterop_PutDependencyTable,
|
|
2629
|
+
$t as _Iterop_businessTableSearchInRows,
|
|
2630
|
+
Ct as _Iterop_getAllBusinessTables,
|
|
2631
|
+
Tt as _Iterop_getOneBusinessTable,
|
|
2632
|
+
bt as _Iterop_getOneBusinessTableRows,
|
|
2633
|
+
_t as _Iterop_jwtUser,
|
|
2634
|
+
Nt as _Iterop_runProcess,
|
|
2635
|
+
It as _Iterop_updateBusinessTable,
|
|
2636
|
+
q as _getPlateformInfos,
|
|
2637
|
+
$e as _getPlatformServices,
|
|
2595
2638
|
b as _getServiceUrl,
|
|
2596
|
-
|
|
2597
|
-
|
|
2639
|
+
Ie as _getServiceUrl_3DPassport,
|
|
2640
|
+
yt as _getServiceUrl_Iterop,
|
|
2598
2641
|
m as _httpCallAuthenticated,
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2642
|
+
Te as _setDraggable,
|
|
2643
|
+
Oe as _setDroppable,
|
|
2644
|
+
be as _setupTagger,
|
|
2645
|
+
tt as addTagToDoc,
|
|
2646
|
+
W as chunkArray,
|
|
2647
|
+
Ne as compass_getListAdditionalApps,
|
|
2648
|
+
V as couleurs,
|
|
2649
|
+
Ae as createUserGroups,
|
|
2650
|
+
oe as dataMixing,
|
|
2651
|
+
Ue as deleteUserGroups,
|
|
2652
|
+
_e as findAdresse,
|
|
2653
|
+
qe as getAllContextSecurity,
|
|
2654
|
+
H as getCSRFToken,
|
|
2655
|
+
Se as getCommunes,
|
|
2656
|
+
Fe as getComplementUG,
|
|
2657
|
+
Ye as getDataFrom3DSpace,
|
|
2658
|
+
we as getDataFromGouvFr,
|
|
2659
|
+
Ze as getDatasByTenant,
|
|
2660
|
+
et as getDatasFrom3DSpace,
|
|
2661
|
+
He as getDownloadDocument,
|
|
2662
|
+
st as getInfoDocTags,
|
|
2663
|
+
xe as getUserGroupsList,
|
|
2664
|
+
Y as getUsersGroupRules,
|
|
2665
|
+
Qe as get_3DSpace_csrf,
|
|
2666
|
+
je as patchUserGroups,
|
|
2667
|
+
Pe as patchUserGroupsControl,
|
|
2668
|
+
ze as pushDataIn3DSpace,
|
|
2669
|
+
Re as readUserGroupControl,
|
|
2670
|
+
nt as removeTagToDoc,
|
|
2671
|
+
xt as sayHello,
|
|
2672
|
+
Ce as updateEvent
|
|
2630
2673
|
};
|
|
2631
2674
|
//# sourceMappingURL=wb3Api.js.map
|