@beam3_dev/api_module 0.0.30 → 0.0.32
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 +95 -97
- package/dist/wb3Api.umd.cjs +78 -0
- package/package.json +4 -4
package/dist/wb3Api.js
CHANGED
|
@@ -34,7 +34,7 @@ const J = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
37
|
+
async function de(e, t = void 0, s = void 0) {
|
|
38
38
|
const n = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
40
|
"https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
|
|
@@ -50,7 +50,7 @@ async function le(e, t = void 0, s = void 0) {
|
|
|
50
50
|
s && s(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function le(e, t = void 0, s = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -65,7 +65,7 @@ async function pe(e, t = void 0, s = void 0) {
|
|
|
65
65
|
s && s(n), console.error("Erreur : " + n);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function pe(e, t = J) {
|
|
69
69
|
let s = b.now().year;
|
|
70
70
|
const n = e, i = [], c = (a) => {
|
|
71
71
|
for (let o in a)
|
|
@@ -100,7 +100,7 @@ async function ue(e, t = J) {
|
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
103
|
+
async function ue(e, t, s = !0) {
|
|
104
104
|
const n = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
105
105
|
return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
|
|
106
106
|
}
|
|
@@ -109,12 +109,12 @@ function f(e, t) {
|
|
|
109
109
|
s.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function fe(e, t, s) {
|
|
113
113
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
114
114
|
n.draggable(e, { data: t, start: s });
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function me(e, t = void 0) {
|
|
118
118
|
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
|
|
119
119
|
let n;
|
|
120
120
|
n === void 0 && (n = s.createProxy({
|
|
@@ -123,7 +123,7 @@ function ge(e, t = void 0) {
|
|
|
123
123
|
}), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function ge(e, t) {
|
|
127
127
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
128
128
|
s.droppable(e, { drop: t });
|
|
129
129
|
});
|
|
@@ -138,9 +138,9 @@ function I(e, t = void 0, s = void 0) {
|
|
|
138
138
|
onFailure: s
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
),
|
|
141
|
+
), D(), t && t(D());
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function D() {
|
|
144
144
|
let e = {};
|
|
145
145
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
146
146
|
const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getWidgetTenant(), r = t.getApplicationConfiguration(
|
|
@@ -155,7 +155,7 @@ function A() {
|
|
|
155
155
|
};
|
|
156
156
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function he(e, t, s) {
|
|
159
159
|
const n = {
|
|
160
160
|
base: `${e.space}`,
|
|
161
161
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
@@ -181,7 +181,7 @@ function Se(e, t, s) {
|
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Se(e, t = void 0, s = void 0) {
|
|
185
185
|
let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
186
186
|
f(n, {
|
|
187
187
|
onComplete(i, c, r) {
|
|
@@ -194,7 +194,7 @@ function ye(e, t = void 0, s = void 0) {
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function ye(e, t, s = void 0, n = void 0) {
|
|
198
198
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
199
199
|
f(i, {
|
|
200
200
|
onComplete(c, r, a) {
|
|
@@ -211,7 +211,7 @@ const $ = {
|
|
|
211
211
|
"Content-Type": "application/json",
|
|
212
212
|
Accept: "application/json,text/javascript,*/*"
|
|
213
213
|
};
|
|
214
|
-
function
|
|
214
|
+
function _e(e, t, s = void 0, n = void 0) {
|
|
215
215
|
const { space: i, currentUser: c } = e, a = `${i}${{
|
|
216
216
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
217
217
|
}.URIUGr}`, o = {
|
|
@@ -240,7 +240,7 @@ function Te(e, t, s = void 0, n = void 0) {
|
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Te(e, t, s = void 0, n = void 0) {
|
|
244
244
|
const { space: i, tenant: c } = e, r = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${o}`;
|
|
245
245
|
f(d, {
|
|
246
246
|
opts: {
|
|
@@ -275,7 +275,7 @@ function G(e, t = void 0, s = void 0) {
|
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function we(e, t = void 0, s = void 0) {
|
|
279
279
|
const { space: n, currentUser: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
280
280
|
"Content-Type": "application/json",
|
|
281
281
|
Accept: "application/json,text/javascript,*/*"
|
|
@@ -306,13 +306,13 @@ function Ce(e, t = void 0, s = void 0) {
|
|
|
306
306
|
console.log(l);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Ce(e, t) {
|
|
310
310
|
const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
311
311
|
f(i, {
|
|
312
312
|
method: "DELETE"
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Oe(e, t, s, n = void 0, i = void 0) {
|
|
316
316
|
const { space: c, tenant: r } = e, a = {
|
|
317
317
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
318
318
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -335,7 +335,7 @@ function Ne(e, t, s, n = void 0, i = void 0) {
|
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Ne(e, t, s, n = void 0, i = void 0) {
|
|
339
339
|
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
340
340
|
f(a, {
|
|
341
341
|
method: "PATCH",
|
|
@@ -350,7 +350,7 @@ function be(e, t, s, n = void 0, i = void 0) {
|
|
|
350
350
|
}
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function be(e, t, s = void 0, n = void 0) {
|
|
354
354
|
const { space: i } = e, r = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
355
355
|
f(r, {
|
|
356
356
|
opts: {
|
|
@@ -401,22 +401,21 @@ function k(e, t, s = void 0, n = void 0) {
|
|
|
401
401
|
C(e);
|
|
402
402
|
}
|
|
403
403
|
function C(e, t = void 0, s = void 0) {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
t && t(o.csrf.value);
|
|
404
|
+
if (e.space) {
|
|
405
|
+
const n = e.space + "/resources/v1/application/CSRF";
|
|
406
|
+
f(n, {
|
|
407
|
+
onComplete(i, c, r) {
|
|
408
|
+
const a = JSON.parse(i);
|
|
409
|
+
t && t(a.csrf.value);
|
|
411
410
|
},
|
|
412
|
-
onFailure(
|
|
413
|
-
s && s(
|
|
411
|
+
onFailure(i) {
|
|
412
|
+
s && s(i);
|
|
414
413
|
}
|
|
415
414
|
});
|
|
416
415
|
} else
|
|
417
416
|
s && s("ERROR : url du 3DSpace non défini.");
|
|
418
417
|
}
|
|
419
|
-
function
|
|
418
|
+
function A(e, t, s = void 0, n = void 0) {
|
|
420
419
|
let i = e.space + `/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
421
420
|
k(
|
|
422
421
|
e,
|
|
@@ -445,7 +444,7 @@ function D(e, t, s = void 0, n = void 0) {
|
|
|
445
444
|
n
|
|
446
445
|
);
|
|
447
446
|
}
|
|
448
|
-
function
|
|
447
|
+
function ke(e, t, s, n = void 0, i = void 0) {
|
|
449
448
|
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
450
449
|
f(c, {
|
|
451
450
|
method: "PUT",
|
|
@@ -541,7 +540,7 @@ function W(e, t, s, n, i, c, r = void 0, a = void 0) {
|
|
|
541
540
|
}
|
|
542
541
|
});
|
|
543
542
|
}
|
|
544
|
-
async function
|
|
543
|
+
async function Fe(e, t, s, n, i = void 0, c = void 0) {
|
|
545
544
|
const r = e.space, a = e.token, o = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
546
545
|
type: "text/plain"
|
|
547
546
|
}), p = {
|
|
@@ -665,7 +664,7 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0) {
|
|
|
665
664
|
}
|
|
666
665
|
async function x(e, t, s = void 0, n = void 0, i = void 0) {
|
|
667
666
|
return t === void 0 || t === "" ? "Le paramètre objectId est obligatoire" : new Promise((c) => {
|
|
668
|
-
(e.space === "" || !e.space) && I(), t !== void 0 && t !== "" && t !== null &&
|
|
667
|
+
(e.space === "" || !e.space) && I(), t !== void 0 && t !== "" && t !== null && A(
|
|
669
668
|
e.space,
|
|
670
669
|
t,
|
|
671
670
|
(r) => {
|
|
@@ -753,7 +752,7 @@ function Y(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
753
752
|
}
|
|
754
753
|
});
|
|
755
754
|
}
|
|
756
|
-
function
|
|
755
|
+
function Ue(e, t, s = void 0, n = void 0) {
|
|
757
756
|
return new Promise((i) => {
|
|
758
757
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
759
758
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
@@ -794,7 +793,7 @@ function $e(e, t, s = void 0, n = void 0) {
|
|
|
794
793
|
}
|
|
795
794
|
});
|
|
796
795
|
}
|
|
797
|
-
function
|
|
796
|
+
function $e(e, t, s, n = void 0, i = void 0) {
|
|
798
797
|
return new Promise((c) => {
|
|
799
798
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
800
799
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -877,7 +876,7 @@ function Ae(e, t, s = void 0, n = void 0) {
|
|
|
877
876
|
}
|
|
878
877
|
});
|
|
879
878
|
}
|
|
880
|
-
function
|
|
879
|
+
function De(e, t, s = void 0, n = void 0) {
|
|
881
880
|
return new Promise((i) => {
|
|
882
881
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
883
882
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
@@ -924,7 +923,7 @@ function Re(e, t, s = void 0, n = void 0) {
|
|
|
924
923
|
}
|
|
925
924
|
});
|
|
926
925
|
}
|
|
927
|
-
function
|
|
926
|
+
function Re(e, t, s, n = void 0, i = void 0) {
|
|
928
927
|
return new Promise((c) => {
|
|
929
928
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
930
929
|
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -984,7 +983,7 @@ function T(e, t = void 0, s = void 0) {
|
|
|
984
983
|
}
|
|
985
984
|
});
|
|
986
985
|
}
|
|
987
|
-
function
|
|
986
|
+
function ve(e, t = void 0, s = void 0) {
|
|
988
987
|
const n = `${e.space}/api/exalead/whatsnew`, i = {
|
|
989
988
|
params: {
|
|
990
989
|
community_id: null,
|
|
@@ -1014,7 +1013,7 @@ function je(e, t = void 0, s = void 0) {
|
|
|
1014
1013
|
});
|
|
1015
1014
|
});
|
|
1016
1015
|
}
|
|
1017
|
-
function
|
|
1016
|
+
function je(e, t = void 0, s = void 0) {
|
|
1018
1017
|
const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1019
1018
|
params: {
|
|
1020
1019
|
idsToFilterArr: [],
|
|
@@ -1064,7 +1063,7 @@ function B(e, t = void 0, s = void 0) {
|
|
|
1064
1063
|
s
|
|
1065
1064
|
);
|
|
1066
1065
|
}
|
|
1067
|
-
function
|
|
1066
|
+
function Ie(e, t, s = void 0, n = void 0) {
|
|
1068
1067
|
const i = e.space + "/api/user/find/login/" + t;
|
|
1069
1068
|
T(
|
|
1070
1069
|
e,
|
|
@@ -1084,7 +1083,7 @@ function xe(e, t, s = void 0, n = void 0) {
|
|
|
1084
1083
|
n
|
|
1085
1084
|
);
|
|
1086
1085
|
}
|
|
1087
|
-
function
|
|
1086
|
+
function xe(e, t = void 0, s = void 0) {
|
|
1088
1087
|
I(
|
|
1089
1088
|
null,
|
|
1090
1089
|
(n) => {
|
|
@@ -1127,7 +1126,6 @@ function z(e, t = void 0, s = void 0) {
|
|
|
1127
1126
|
}
|
|
1128
1127
|
);
|
|
1129
1128
|
}
|
|
1130
|
-
module.exports = { getActiveServices: z };
|
|
1131
1129
|
async function Pe(e, t, s) {
|
|
1132
1130
|
const n = `${e.space}/resources/v1/application/CSRF`;
|
|
1133
1131
|
f(n, {
|
|
@@ -1161,7 +1159,7 @@ function Me(e, t = void 0, s = void 0) {
|
|
|
1161
1159
|
});
|
|
1162
1160
|
}
|
|
1163
1161
|
function Le(e, t, s, n) {
|
|
1164
|
-
|
|
1162
|
+
A(
|
|
1165
1163
|
e.space,
|
|
1166
1164
|
t,
|
|
1167
1165
|
(i) => {
|
|
@@ -1182,7 +1180,7 @@ function Le(e, t, s, n) {
|
|
|
1182
1180
|
}
|
|
1183
1181
|
async function Ee(e, t, s = void 0, n = void 0) {
|
|
1184
1182
|
return new Promise((i) => {
|
|
1185
|
-
|
|
1183
|
+
A(e.space, t, (c) => {
|
|
1186
1184
|
f(c, {
|
|
1187
1185
|
onComplete: (r, a, o) => (i(JSON.parse(r)), s && s(JSON.parse(r), a, o), i),
|
|
1188
1186
|
onFailure: (r, a, o) => {
|
|
@@ -1240,7 +1238,7 @@ async function Ke(e, t = void 0, s = void 0) {
|
|
|
1240
1238
|
e,
|
|
1241
1239
|
(n) => {
|
|
1242
1240
|
const i = {};
|
|
1243
|
-
i.obj = n,
|
|
1241
|
+
i.obj = n, z(
|
|
1244
1242
|
e,
|
|
1245
1243
|
(c) => {
|
|
1246
1244
|
i.datas = c, t && t(i);
|
|
@@ -1255,14 +1253,14 @@ async function Ke(e, t = void 0, s = void 0) {
|
|
|
1255
1253
|
}
|
|
1256
1254
|
);
|
|
1257
1255
|
}
|
|
1258
|
-
function
|
|
1256
|
+
function z(e, t = void 0, s = void 0) {
|
|
1259
1257
|
const n = [];
|
|
1260
1258
|
e.objIds.forEach((i, c) => {
|
|
1261
1259
|
x(
|
|
1262
1260
|
e,
|
|
1263
1261
|
i.objId,
|
|
1264
1262
|
(r) => {
|
|
1265
|
-
n.push({ [i.name]: r }), i.name === "dbProjets" && (P = r.affaires.map((a) => a.objectID),
|
|
1263
|
+
n.push({ [i.name]: r }), i.name === "dbProjets" && (P = r.affaires.map((a) => a.objectID), H(e, M)), c === e.objIds.length - 1 && t && t(n);
|
|
1266
1264
|
},
|
|
1267
1265
|
(r) => {
|
|
1268
1266
|
s && s(r);
|
|
@@ -1270,7 +1268,7 @@ function H(e, t = void 0, s = void 0) {
|
|
|
1270
1268
|
);
|
|
1271
1269
|
});
|
|
1272
1270
|
}
|
|
1273
|
-
function
|
|
1271
|
+
function H(e, t, s = void 0, n = void 0) {
|
|
1274
1272
|
X(
|
|
1275
1273
|
e,
|
|
1276
1274
|
P,
|
|
@@ -1283,7 +1281,7 @@ function q(e, t, s = void 0, n = void 0) {
|
|
|
1283
1281
|
}
|
|
1284
1282
|
);
|
|
1285
1283
|
}
|
|
1286
|
-
const
|
|
1284
|
+
const q = "FA35FB9B177A280065800EA0000F599C", Q = [
|
|
1287
1285
|
"swym",
|
|
1288
1286
|
"3dspace",
|
|
1289
1287
|
"drive",
|
|
@@ -1297,8 +1295,8 @@ const Q = "FA35FB9B177A280065800EA0000F599C", Z = [
|
|
|
1297
1295
|
where: "ds6w:where",
|
|
1298
1296
|
who: "ds6w:who",
|
|
1299
1297
|
why: "ds6w:why"
|
|
1300
|
-
},
|
|
1301
|
-
objId:
|
|
1298
|
+
}, Z = {
|
|
1299
|
+
objId: q,
|
|
1302
1300
|
pred: "who",
|
|
1303
1301
|
order_by: "desc",
|
|
1304
1302
|
tag: "testTag"
|
|
@@ -1339,7 +1337,7 @@ function Ve(e, t, s = void 0, n = void 0) {
|
|
|
1339
1337
|
r,
|
|
1340
1338
|
(g) => {
|
|
1341
1339
|
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", y = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1342
|
-
m.name = h, m.ext = S, m.createBy = y, t.info = { ...m },
|
|
1340
|
+
m.name = h, m.ext = S, m.createBy = y, t.info = { ...m }, ee(
|
|
1343
1341
|
e,
|
|
1344
1342
|
t,
|
|
1345
1343
|
(_) => {
|
|
@@ -1363,7 +1361,7 @@ function Ve(e, t, s = void 0, n = void 0) {
|
|
|
1363
1361
|
}
|
|
1364
1362
|
});
|
|
1365
1363
|
}
|
|
1366
|
-
function
|
|
1364
|
+
function ee(e, t, s = void 0, n = void 0) {
|
|
1367
1365
|
console.log("obj ", t);
|
|
1368
1366
|
const i = t.info.name, c = {
|
|
1369
1367
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
@@ -1413,7 +1411,7 @@ function te(e, t, s = void 0, n = void 0) {
|
|
|
1413
1411
|
}
|
|
1414
1412
|
},
|
|
1415
1413
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1416
|
-
order_by:
|
|
1414
|
+
order_by: Z.order_by,
|
|
1417
1415
|
order_field: "relevance",
|
|
1418
1416
|
select_snippets: [
|
|
1419
1417
|
"ds6w:snippet",
|
|
@@ -1424,7 +1422,7 @@ function te(e, t, s = void 0, n = void 0) {
|
|
|
1424
1422
|
],
|
|
1425
1423
|
nresults: 40,
|
|
1426
1424
|
start: "0",
|
|
1427
|
-
source:
|
|
1425
|
+
source: Q,
|
|
1428
1426
|
tenant: e.tenant,
|
|
1429
1427
|
login: {
|
|
1430
1428
|
"3dspace": {
|
|
@@ -1530,7 +1528,7 @@ function Ye(e, t = void 0, s = void 0) {
|
|
|
1530
1528
|
role: m.role,
|
|
1531
1529
|
access: m.access
|
|
1532
1530
|
};
|
|
1533
|
-
|
|
1531
|
+
te(
|
|
1534
1532
|
e,
|
|
1535
1533
|
m.id,
|
|
1536
1534
|
(h) => {
|
|
@@ -1547,7 +1545,7 @@ function Ye(e, t = void 0, s = void 0) {
|
|
|
1547
1545
|
});
|
|
1548
1546
|
});
|
|
1549
1547
|
}
|
|
1550
|
-
function
|
|
1548
|
+
function te(e, t, s, n) {
|
|
1551
1549
|
const i = `${e.space}/api/community/listmembers`, c = {
|
|
1552
1550
|
params: {
|
|
1553
1551
|
page: e.page ? e.page : 1,
|
|
@@ -1607,10 +1605,10 @@ function ze(e, t, s = void 0, n = void 0) {
|
|
|
1607
1605
|
id_msg: "",
|
|
1608
1606
|
senderId: e.currentUser.login,
|
|
1609
1607
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1610
|
-
msg:
|
|
1608
|
+
msg: se(t.msg)
|
|
1611
1609
|
};
|
|
1612
1610
|
let d = !1;
|
|
1613
|
-
|
|
1611
|
+
ne(
|
|
1614
1612
|
a.users,
|
|
1615
1613
|
(l) => {
|
|
1616
1614
|
l !== void 0 && (o.id_msg = l.id, d = !0, v(e, o));
|
|
@@ -1641,7 +1639,7 @@ function ze(e, t, s = void 0, n = void 0) {
|
|
|
1641
1639
|
});
|
|
1642
1640
|
}, 500);
|
|
1643
1641
|
}
|
|
1644
|
-
function
|
|
1642
|
+
function ne(e, t, s, n) {
|
|
1645
1643
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1646
1644
|
T(e, (c) => {
|
|
1647
1645
|
f(i, {
|
|
@@ -1707,14 +1705,14 @@ function v(e, t, s = void 0, n = void 0) {
|
|
|
1707
1705
|
});
|
|
1708
1706
|
});
|
|
1709
1707
|
}
|
|
1710
|
-
function
|
|
1708
|
+
function se(e) {
|
|
1711
1709
|
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1712
1710
|
return `<p>${e} </p>
|
|
1713
1711
|
<br/>
|
|
1714
1712
|
<hr/>
|
|
1715
1713
|
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
|
|
1716
1714
|
}
|
|
1717
|
-
const
|
|
1715
|
+
const ae = {
|
|
1718
1716
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1719
1717
|
// titre du post
|
|
1720
1718
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1735,7 +1733,7 @@ function He(e, t, s = void 0, n = void 0) {
|
|
|
1735
1733
|
// String, le nom de l'affaire
|
|
1736
1734
|
community_id: c?.id !== void 0 ? c.id : r.id,
|
|
1737
1735
|
// String, l'id de la communauté
|
|
1738
|
-
message:
|
|
1736
|
+
message: ie(t.text_html),
|
|
1739
1737
|
// STRING => le contenue du message doit être au format HTML
|
|
1740
1738
|
published: 1
|
|
1741
1739
|
// 1 publier, 0 non publier
|
|
@@ -1819,7 +1817,7 @@ function Qe(e, t = "", s = void 0, n = void 0) {
|
|
|
1819
1817
|
});
|
|
1820
1818
|
});
|
|
1821
1819
|
}
|
|
1822
|
-
function Ze(e, t =
|
|
1820
|
+
function Ze(e, t = ae, s = void 0, n = void 0) {
|
|
1823
1821
|
const i = {
|
|
1824
1822
|
uri: "/api/idea/list",
|
|
1825
1823
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
@@ -1842,7 +1840,7 @@ function Ze(e, t = ie, s = void 0, n = void 0) {
|
|
|
1842
1840
|
});
|
|
1843
1841
|
});
|
|
1844
1842
|
}
|
|
1845
|
-
function
|
|
1843
|
+
function ie(e) {
|
|
1846
1844
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1847
1845
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1848
1846
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1923,72 +1921,72 @@ function et(e) {
|
|
|
1923
1921
|
}
|
|
1924
1922
|
export {
|
|
1925
1923
|
j as UUID,
|
|
1926
|
-
|
|
1924
|
+
Fe as _3DSpace_Create_Doc,
|
|
1927
1925
|
C as _3DSpace_csrf,
|
|
1928
1926
|
x as _3DSpace_download_doc,
|
|
1929
1927
|
X as _3DSpace_download_multidoc,
|
|
1930
1928
|
V as _3DSpace_file_update,
|
|
1931
1929
|
W as _3DSpace_file_update_csr,
|
|
1932
|
-
|
|
1933
|
-
|
|
1930
|
+
A as _3DSpace_file_url,
|
|
1931
|
+
ke as _3DSpace_file_url_csr,
|
|
1934
1932
|
k as _3DSpace_get_csrf,
|
|
1935
1933
|
K as _3DSpace_get_docInfo,
|
|
1936
1934
|
Y as _3DSpace_get_downloadTicket_multidoc,
|
|
1937
1935
|
N as _3DSpace_get_securityContexts,
|
|
1938
|
-
|
|
1939
|
-
|
|
1936
|
+
Re as _3DSpace_lifecycle_changeRevision,
|
|
1937
|
+
$e as _3DSpace_lifecycle_changeState,
|
|
1940
1938
|
Ae as _3DSpace_lifecycle_getGraph,
|
|
1941
|
-
|
|
1942
|
-
|
|
1939
|
+
De as _3DSpace_lifecycle_getNextRevision,
|
|
1940
|
+
Ue as _3DSpace_lifecycle_getNextStates,
|
|
1943
1941
|
Ye as _3DSwim_getAllCommunities,
|
|
1944
|
-
|
|
1942
|
+
te as _3DSwim_getMembersCommunity,
|
|
1945
1943
|
ze as _3DSwym_buildDirectMessage,
|
|
1946
1944
|
qe as _3DSwym_deleteIdea,
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1945
|
+
ne as _3DSwym_findCommunityToInstantMSG,
|
|
1946
|
+
ve as _3DSwym_getAllNews,
|
|
1947
|
+
je as _3DSwym_getFamiliarPeople,
|
|
1950
1948
|
Be as _3DSwym_getIdeaStatusMaturity,
|
|
1951
1949
|
Qe as _3DSwym_getSWYMIdea,
|
|
1952
1950
|
Ze as _3DSwym_get_AllSWYMIdeas,
|
|
1953
1951
|
B as _3DSwym_get_currentUser,
|
|
1954
|
-
|
|
1952
|
+
Ie as _3DSwym_get_findUser,
|
|
1955
1953
|
T as _3DSwym_get_version,
|
|
1956
1954
|
He as _3DSwym_postIdea,
|
|
1957
1955
|
v as _3DSwym_sendMessageData,
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1956
|
+
ye as _AppMngt_get_info_user,
|
|
1957
|
+
Se as _AppMngt_get_users,
|
|
1958
|
+
D as _getPlateformInfos,
|
|
1961
1959
|
I as _getPlatformServices,
|
|
1962
1960
|
f as _httpCallAuthenticated,
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1961
|
+
fe as _setDraggable,
|
|
1962
|
+
ge as _setDroppable,
|
|
1963
|
+
me as _setupTagger,
|
|
1966
1964
|
Ve as addTagToDoc,
|
|
1967
|
-
|
|
1965
|
+
he as compass_getListAdditionalApps,
|
|
1968
1966
|
J as couleurs,
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1967
|
+
_e as createUserGroups,
|
|
1968
|
+
H as dataMixing,
|
|
1969
|
+
Ce as deleteUserGroups,
|
|
1970
|
+
le as findAdresse,
|
|
1971
|
+
xe as getActiveServices,
|
|
1974
1972
|
Me as getAllContextSecurity,
|
|
1975
1973
|
Pe as getCSRFToken,
|
|
1976
|
-
|
|
1977
|
-
|
|
1974
|
+
de as getCommunes,
|
|
1975
|
+
Te as getComplementUG,
|
|
1978
1976
|
Le as getDataFrom3DSpace,
|
|
1979
|
-
|
|
1977
|
+
pe as getDataFromGouvFr,
|
|
1980
1978
|
Ke as getDatasByTenant,
|
|
1981
|
-
|
|
1979
|
+
z as getDatasFrom3DSpace,
|
|
1982
1980
|
Ee as getDownloadDocument,
|
|
1983
1981
|
Xe as getInfoDocTags,
|
|
1984
|
-
|
|
1982
|
+
we as getUserGroupsList,
|
|
1985
1983
|
G as getUsersGroupRules,
|
|
1986
1984
|
Ge as get_3DSpace_csrf,
|
|
1987
|
-
|
|
1988
|
-
|
|
1985
|
+
Oe as patchUserGroups,
|
|
1986
|
+
Ne as patchUserGroupsControl,
|
|
1989
1987
|
Je as pushDataIn3DSpace,
|
|
1990
|
-
|
|
1988
|
+
be as readUserGroupControl,
|
|
1991
1989
|
We as removeTagToDoc,
|
|
1992
1990
|
et as sayHello,
|
|
1993
|
-
|
|
1991
|
+
ue as updateEvent
|
|
1994
1992
|
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
(function(u,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("uuid"),require("luxon"),require("@widget-lab/3ddashboard-utils")):typeof define=="function"&&define.amd?define(["exports","uuid","luxon","@widget-lab/3ddashboard-utils"],b):(u=typeof globalThis<"u"?globalThis:u||self,b(u["@beam3_dev/api_module"]={},u.uuid,u.luxon,u["@widget-lab/3ddashboard-utils"]))})(this,function(u,b,U,C){"use strict";function A(){return b.v4()}const P={b3M3Yellow:"#FFB300",b3AboutageBlue:"#42A5F5",b3UsinageGreen:"#689F38",b3PanneauOrange:"#ff8000",b3M350percent:"#fafa6e",b3M380percent:"#aae479",b3M390percent:"#64c987",b3M3100percent:"#23aa8f",b3M3105percent:"#00898a",b3M3110percent:"#176877",b3M3120percent:"#2a4858",b3Aboutage50percent:"#fafa6e",b3Aboutage80percent:"#aae479",b3Aboutage90percent:"#64c987",b3Aboutage100percent:"#23aa8f",b3Aboutage105percent:"#00898a",b3Aboutage110percent:"#176877",b3Aboutage120percent:"#2a4858",b3Warning:"#FF0000",b3Edit1:"#AD1457",b3Edit2:"#F4511E",b3Edit3:"#009688",b3Edit4:"#D50000",b3Edit5:"#039BE5",b3Edit6:"#9E69AF",b3Edit7:"#A79B8E",b3Edit8:"#616161",b3Edit9:"#795548"};async function Z(e,t=void 0,s=void 0){const n=parseInt(e);await fetch("https://apicarto.ign.fr/api/codes-postaux/communes/"+n,{method:"GET",headers:{Accept:"application/json"}}).then(i=>i.json()).then(i=>{t&&t(i)}).catch(i=>{s&&s(i),console.error("Erreur : "+i)})}async function ee(e,t=void 0,s=void 0){e=encodeURIComponent(e),await fetch("https://api-adresse.data.gouv.fr/search/?q="+e+"&limit=15",{method:"GET",headers:{Accept:"application/json"}}).then(n=>n.json()).then(n=>{t&&t(n)}).catch(n=>{s&&s(n),console.error("Erreur : "+n)})}async function te(e,t=P){let s=U.DateTime.now().year;const n=e,i=[],c=a=>{for(let o in a)i.push({date:o,comment:a[o]})};for(let a=s;a<=s+1;a++)await fetch("https://calendrier.api.gouv.fr/jours-feries/metropole/"+a+".json",{method:"GET",headers:{Accept:"application/json"}}).then(o=>o.json()).then(o=>{c(o)}).catch(o=>console.error("Erreur : "+o));return(()=>{const a=n.length===0?{events:[]}:n;for(let o of i)a.events.findIndex(l=>l.start===U.DateTime.fromISO(o.date).toISODate()&&l.name==="Férié : "+o.comment)===-1&&a.events.push({name:"Férié : "+o.comment,start:U.DateTime.fromISO(o.date).toISODate(),end:U.DateTime.fromISO(o.date).toISODate(),color:t.b3BusinnessDays,timed:!1});return a})()}async function ne(e,t,s=!0){const n=e.events.findIndex(i=>i.uuid===t.uuid);return n===-1?e.events.push(t):s?e.events[n]=t:e.events.splice(n,1),e.length>0&&e.sort((i,c)=>i.start-c.start),e}function m(e,t){C.requirejs(["DS/WAFData/WAFData"],s=>{s.authenticatedRequest(e,t)})}function se(e,t,s){C.requirejs(["DS/DataDragAndDrop/DataDragAndDrop"],n=>{n.draggable(e,{data:t,start:s})})}function ae(e,t=void 0){C.requirejs(["DS/TagNavigatorProxy/TagNavigatorProxy"],s=>{let n;n===void 0&&(n=s.createProxy({widgetId:C.widget.id,filteringMode:"WithFilteringServices"}),t!==void 0&&n.addEvent("onFilterSubjectsChange",t)),n.setSubjectsTags(e)})}function ie(e,t){C.requirejs(["DS/DataDragAndDrop/DataDragAndDrop"],s=>{s.droppable(e,{drop:t})})}function $(e,t=void 0,s=void 0){C.requirejs(["DS/i3DXCompassServices/i3DXCompassServices"],n=>{(!e||e==="")&&(e=C.widget.getValue("PlatFormInstanceId")),(!e||e==="")&&(e=void 0),n.getPlatformServices({platformId:e,onComplete:t,onFailure:s})}),v(),t&&t(v())}function v(){let e={};return C.requirejs(["DS/PlatformAPI/PlatformAPI"],t=>{const s=t.getTenant(),n=t.getUser(),i=t.getAllApplicationConfigurations(),c=t.getWidgetTenant(),r=t.getApplicationConfiguration("com.3ds.wp.passport.cors");e={tenant:s,user:n,appsConfiguration:i,widgetTenant:c,appConf:r}}),console.log("%cRETOUR API :","color:blue",e),e}function oe(e,t,s){const n={base:`${e.space}`,uri:"/resources/AppsMngt/api/custom/applications",option:`?filter=${e.tenant}`},i=`${n.base}${n.uri}${n.option}`;m(i,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},onComplete(c,r,a){const o=JSON.parse(c),d=o.data.map(l=>{const p=l.attributes.name,f=l.id;return{name:p,id:f}});t&&t(d,o)},onFailure(c,r){const a=c;a.msg=r.errormsg,a.errCode=r.errorcode,s&&s(a)}})}function re(e,t=void 0,s=void 0){let n=`${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;m(n,{onComplete(i,c,r){const a=JSON.parse(i);console.log("_AppMngt_get_users => ",a),t&&t(a)},onFailure(i,c){const r=i;r.msg=c.errormsg,r.errCode=c.errorcode,s&&s(r)}})}function ce(e,t,s=void 0,n=void 0){let i=`${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;m(i,{onComplete(c,r,a){const o=JSON.parse(c);s&&s(o)},onFailure(c,r){const a=c;a.msg=r.errormsg,a.errCode=r.errorcode,n&&n(a)}})}const R={"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"};function de(e,t,s=void 0,n=void 0){const{space:i,currentUser:c}=e,a=`${i}${{URIUGr:"/3drdfpersist/resources/v1/usersgroup"}.URIUGr}`,o={groups:[{title:t.title,description:t.description,members:t.members||[c.email,"samuel.mureau@beam3.fr"],pending_members:[],sharing:t.sharing,visibility:t.visibility}]};m(a,{method:"POST",headers:R,data:JSON.stringify(o),onComplete(d){s&&s(JSON.parse(d))},onFailure(d,l){console.log(d);const p=d;p.msg=l.errormsg,p.errCode=l.errorcode,console.log("❌ sendDirectMessage => ",p),n&&n(p)}})}function le(e,t,s=void 0,n=void 0){const{space:i,tenant:c}=e,r=i,a=`/3drdfpersist/v1/resources/${t}`,o=`?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`,d=`${r}${a}${o}`;m(d,{opts:{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"}},onComplete(f){s&&s(JSON.parse(f))},onFailure(f,g){const _=f;_.msg=g.errormsg,_.errCode=g.errorcode,n&&n(_)}})}function L(e,t=void 0,s=void 0){const{space:n,tenant:i}=e,c=n,r="/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options",a=`?tenant=dstenant:${i}`,o={method:"GET",Accept:"application/json,*/*,test/javascript"},d=`${c}${r}${a}`;m(d,{OPTsH:o,onComplete(l){t&&t(JSON.parse(l))},onFailure(l,p){const f=l;f.msg=p.errormsg,f.errCode=p.errorcode,s&&s(f)}})}function ue(e,t=void 0,s=void 0){const{space:n,currentUser:i}=e,a=`${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`,d={method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"}};try{m(a,{opts:d,onComplete(l){const p=JSON.parse(l),f={},g=p.groups.filter(_=>_.uri.startsWith("uuid:"));if(i&&Object.keys(i).length>0){const _=g.filter(y=>y.owner===i.email),S=g.filter(y=>y.members.includes(i.email)),h=_.concat(S);f.iam=h,f.UG=g,f.iamMember=S,L(e,y=>{f.rules=y,t&&t(f)},y=>{s&&s(y)})}},onFailure(l){s&&s(l)}})}catch(l){console.log(l)}}function pe(e,t){const{space:s}=e,i=`${s}/3drdfpersist/resources/v1/usersgroup/${t}`;m(i,{method:"DELETE"})}function fe(e,t,s,n=void 0,i=void 0){const{space:c,tenant:r}=e,a={URITI:"/3drdfpersist/resources/v1/template-instances",URIUGr:"/3drdfpersist/resources/v1/usersgroup",nextURICh:"/characteristics",nextURIGr:"/group",nexURImem:"/members",OPTsTI:"?$mask=dsaccess:Mask.GroupUI.Properties",OPTsTenant:`tenant=dstenant:${r}`},o=s,d=`${c}${a.URIUGr}/${t}`,l=JSON.stringify(o);m(d,{headers:R,method:"PATCH",data:l,type:"json",onComplete(p){n&&n(p)},onFailure(p){i&&i(p)}})}function me(e,t,s,n=void 0,i=void 0){const{space:c}=e,a=`${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;m(a,{method:"PATCH",headers:R,data:JSON.stringify(s),type:"json",onComplete(d){n&&n(d)},onFailure(d){i&&i(d)}})}function ge(e,t,s=void 0,n=void 0){const{space:i}=e,r=`${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;m(r,{opts:{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"}},onComplete(d){s&&s(JSON.parse(d))},onFailure(d){n&&n(d)}})}async function E(e,t=void 0,s=void 0,n=void 0){const i=e.space;if(t===void 0){console.log("Le paramètre docid est obligatoire");return}const c=i+`/resources/v1/modeler/documents/${t}`;m(c,{onComplete(r,a,o){const d=JSON.parse(r);s&&s(d)},onFailure(r){n&&n(r)}})}function F(e,t,s=void 0,n=void 0){if(t!==null){let i=`${e.space}/resources/v1/modeler/documents/${t}`;m(i,{onComplete(c,r,a){const o=JSON.parse(c);s&&s(o)},onFailure(c){n&&n(c)}})}else O(e)}function O(e,t=void 0,s=void 0){if(e.space){const n=e.space+"/resources/v1/application/CSRF";m(n,{onComplete(i,c,r){const a=JSON.parse(i);t&&t(a.csrf.value)},onFailure(i){s&&s(i)}})}else s&&s("ERROR : url du 3DSpace non défini.")}function k(e,t,s=void 0,n=void 0){let i=e.space+`/resources/v1/modeler/documents/${t}/files/DownloadTicket`;F(e,t,c=>{m(i,{method:"PUT",headers:{ENO_CSRF_TOKEN:c.csrf.value},onComplete(r){let a=JSON.parse(r);if(a.success===!0)try{const o=a.data[0].dataelements.ticketURL;s&&s(o)}catch(o){n&&n(o)}},onFailure(r,a){console.log("☠️ error => ",r,a),n&&n(r,a)}})},n)}function _e(e,t,s,n=void 0,i=void 0){const c=`${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;m(c,{method:"PUT",headers:{ENO_CSRF_TOKEN:s},onComplete(r){let a=JSON.parse(r);if(a.success===!0)try{const o=a.data[0].dataelements.ticketURL;n&&n(o)}catch(o){i&&i(o)}},onFailure(r){i&&i(r)}})}function J(e,t,s,n,i,c=void 0,r=void 0){F(e,t,a=>{G(e,t,s,n,i,a.csrf.value,c,r)},r)}function G(e,t,s,n,i,c,r=void 0,a=void 0){const o=e.space+`/resources/v1/modeler/documents/${t}/files/CheckinTicket`;m(o,{method:"PUT",headers:{ENO_CSRF_TOKEN:c},onComplete(d,l,p){const f=JSON.parse(d).data[0].dataelements,g=new FormData;g.append("__fcs__jobTicket",f.ticket),g.append("file_0",n,i);const _={};_.method="POST",_.data=g,_.onComplete=function(S){let h="temp_"+Date.now(),y={method:"PUT",headers:{ENO_CSRF_TOKEN:c},data:JSON.stringify({data:[{id:t,relateddata:{files:[{id:s,dataelements:{title:i,receipt:S},updateAction:"REVISE"}]},tempId:h}]}),type:"json",onComplete(T){r&&r(T)},onFailure(T){a&&a(T)}};m(e.space+"/resources/v1/modeler/documents",y)},_.onFailure=function(S){a&&a(S)},_.timeout=0,m(f.ticketURL,_)}})}async function Se(e,t,s,n,i=void 0,c=void 0){const r=e.space,a=e.token,o=e.ctx,d=new FormData,l=new Blob([JSON.stringify(t)],{type:"text/plain"}),p={url_Ticket:`${r}/resources/v1/modeler/documents/files/CheckinTicket`,url_Post:`${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`};if(!r&&r!==""){console.log("le store._3DSpace est vide");return}m(p.url_Ticket,{method:"PUT",headers:{ENO_CSRF_TOKEN:a.value},onComplete(f,g,_){const S=JSON.parse(f).data[0].dataelements;d.append("__fcs__jobTicket",S.ticket),d.append("filename",l,s);const h={method:"POST",data:d,onComplete(N){if(o!==""&&a!==""){const M={method:"POST",headers:{ENO_CSRF_TOKEN:a,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{type:"Document",dataelements:{title:`Title_${s.toLowerCase().split(" ").join("_")}`,policy:"Document Release",description:n},relateddata:{files:[{dataelements:{title:`${s}.json`,receipt:N}}]},tempId:A()}]}),type:"json",timeout:0,onComplete:y,onFailure:T};o!==""&&m(p.url_Post,M)}else console.warn("le store est vide")},onFailure:T};function y(N){console.log("Success -- response ",N.data[0]),i&&i(N)}function T(N,M){console.log("Erreur -- response ",N,`
|
|
2
|
+
headers `,M),c&&c(N)}m(S.ticketURL,h)}})}function D(e,t=void 0,s=void 0,n=void 0,i=void 0,c=void 0){const r=`${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces&xrequestedwith=xmlhttprequest`;m(r,{method:"GET",onComplete(a){const o=JSON.parse(a);let d="",l,p,f;if(t){let g=o.collabspaces.find(_=>_.title===t);if(g){l=t;let _=g.couples;_=_.filter((S,h,y)=>h===y.findIndex(T=>T.organization.pid===S.organization.pid&&T.role.pid===S.role.pid)),s&&(Array.isArray(s)?s.forEach(S=>{f||_.forEach(h=>{if(S===h.role.name&&n===h.organization.title)f=S,p=n;else if(S===h.role.name){let y=_.filter(T=>T.role.name===S);y.length===1?(f=y[0].role.name,p=y[0].organization.title):c(y)}})}):_.forEach(S=>{if(s===S.role.name&&n===S.organization.title)f=s,p=n;else if(s===S.role.name){let h=_.filter(y=>y.role.name===s);h.length===1?(f=h[0].role.name,p=h[0].organization.title):c(h)}}))}}l&&p&&f?(d=f+"."+p+"."+l,i(d)):o.preferredcredentials?(d=o.preferredcredentials.role.name+"."+o.preferredcredentials.organization.title+"."+o.preferredcredentials.collabspace.title,i(d)):c&&(d=f+"."+p+"."+l,c(d))},onFailure(a){console.log("Erreur de récupération du contexte de sécurité. => ",a)}})}async function I(e,t,s=void 0,n=void 0,i=void 0){return t===void 0||t===""?"Le paramètre objectId est obligatoire":new Promise(c=>{(e.space===""||!e.space)&&$(),t!==void 0&&t!==""&&t!==null&&k(e.space,t,r=>{m(r,{headers:{ENO_CSRF_TOKEN:e.token},onComplete(a){return s&&s(JSON.parse(a)),c=JSON.parse(a),c},onFailure(a){n&&(console.log("error http",a),n(a))}})},r=>{n&&n(r),console.log("*_3dspace_download_doc / error file URL *",r)})})}async function x(e,t,s=void 0,n=void 0){let i=[];for(let a=0;a<t.length;a+=80){const o=t.slice(a,a+80);i.push(o)}const r=a=>{K(e,i[a],()=>{a++,a<i.length&&r(a)},o=>{s&&s(o)})};r(0)}function K(e,t,s=void 0,n=void 0,i=void 0){const c=[];t.forEach(o=>{c.push({id:o})});let r=JSON.stringify({csrf:{name:"ENO_CSRF_TOKEN",value:e.token},data:c});const a=`${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;m(a,{method:"PUT",data:r,type:"json",onComplete(o){const d=o.data;o.success===!0&&(s&&s(),d.forEach(l=>{try{const p=l.dataelements.fileName,f=l.dataelements.ticketURL;m(f,{onComplete:g=>{n&&n({objectId:l.id,fileName:p,data:JSON.parse(g)})},onFailure:g=>{console.log("error http",g)}})}catch(p){console.log(p),i&&i(p)}}))},onFailure(o){console.log(o),i&&i(o)}})}function he(e,t,s=void 0,n=void 0){return new Promise(i=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const c=`${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;D(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,a=>e.ctx=a,a=>{console.log("onError =>",a)});let r={method:"POST",headers:{SecurityContext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{id:t}]}),type:"json",onComplete(a){s&&s(a)},onFailure(a){n&&n(a)}};m(c,r)}})}function ye(e,t,s,n=void 0,i=void 0){return new Promise(c=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const r=`${e.space}/resources/v1/modeler/dslc/maturity/changeState`;D(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,o=>e.ctx=o,o=>{console.log("onError =>",o)});let a={method:"POST",headers:{SecurityContext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{id:t,nextState:s}]}),type:"json",onComplete(o){n&&n(o)},onFailure(o){i&&i(o)}};m(r,a)}})}function we(e,t,s=void 0,n=void 0){return new Promise(i=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const c=`${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;D(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,a=>e.ctx=a,a=>{console.log("onError =>",a)});let r={method:"POST",headers:{securitycontext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({graphRequests:[{id:t}]}),type:"json",onComplete(a){s&&s(a)},onFailure(a){n&&n(a)}};m(c,r)}})}function Te(e,t,s=void 0,n=void 0){return new Promise(i=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const c=`${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;D(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,a=>e.ctx=a,a=>{console.log("onError =>",a)});let r={method:"POST",headers:{SecurityContext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{"attribute[PLMReference.V_versionComment]":null,physicalid:t,type:"Document",tenant:e.tenant,objectId:t,policy:"Document Release",availableSemantic:["E","LAST","NEW","DUP"]}]}),type:"json",onComplete(a){s&&s(a)},onFailure(a){n&&n(a)}};m(c,r)}})}function Ce(e,t,s,n=void 0,i=void 0){return new Promise(c=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const r=`${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;D(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,o=>e.ctx=o,o=>{console.log("onError =>",o)});let a={method:"POST",headers:{securitycontext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{physicalid:t,proposedRevision:s,modifiedAttributes:{revision:s}}],folderid:null,notificationTimeout:600}),type:"json",onComplete(o){n&&n(o)},onFailure(o){i&&i(o)}};m(r,a)}})}//!SECTION
|
|
3
|
+
function w(e,t=void 0,s=void 0){const n=e.space+"/api/index/tk";m(n,{onComplete(i,c,r){const a=JSON.parse(i);t&&(e.token=a?.result?.ServerToken,t(a))},onFailure(i){s&&s(i)}})}function Oe(e,t=void 0,s=void 0){const n=`${e.space}/api/exalead/whatsnew`,i={params:{community_id:null,hash_key:null,legacyFormat:!1,nresults:1,query:"#all",start:0}};w(e,c=>{m(n,{method:"POST",headers:{"X-DS-SWYM-CSRFTOKEN":c.result.ServerToken,"Content-type":"application/json;charset=UTF-8",Accept:"application/json"},data:JSON.stringify(i),type:"json",onComplete(r,a){t&&t(r,a)},onFailure(r,a){s&&s(r,a)}})})}function De(e,t=void 0,s=void 0){const n=`${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`,i={params:{idsToFilterArr:[],mode:"offline",limit:30,itemType:"User",maxNbOfCommonElements:"5"}};w(e,c=>{m(n,{method:"POST",headers:{"X-DS-SWYM-CSRFTOKEN":c.result.ServerToken,"Content-type":"application/json;charset=UTF-8",Accept:"application/json"},data:JSON.stringify(i),type:"json",onComplete(r,a){const o=r.result.hits.map(d=>({login:d.login,fullName:d.name}));t&&t(o,r)},onFailure(r,a){s&&s(r,a)}})})}function V(e,t=void 0,s=void 0){const n=e.space+"/api/user/getcurrent/";w(e,i=>{m(n,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":i.result.ServerToken},onComplete(c,r,a){const o=JSON.parse(c);t&&t(o.result)},onFailure(c){s&&s(c)}})},s)}function Ne(e,t,s=void 0,n=void 0){const i=e.space+"/api/user/find/login/"+t;w(e,c=>{m(i,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":c.result.ServerToken},onComplete(r,a,o){const d=JSON.parse(r);s&&s(d)},onFailure(r){n&&n(r)}})},n)}function be(e,t=void 0,s=void 0){$(null,n=>{let i=[],c=[],r,a={};for(let o of n)"3DSpace"in o&&(c.push({label:`${o.displayName} ( ${o.platformId} )`,value:`${c.length}`}),c.sort(),i.push(o));for(let[o,d]of i.entries())d.platformId===e.tenant&&(a=d,r=o);C.widget.addPreference({name:"_CurrentTenantID_",type:"list",label:"Tenant",defaultValue:r,options:c}),Object.keys(a).length>0,D(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,o=>e.ctx=o,o=>{console.log("on Error CTX =>",o)}),V(e,o=>{t&&t(o,a)},o=>{s&&s(o)})},n=>{console.log("** _getPlatformServices Erreur **",n)})}async function Fe(e,t,s){const n=`${e.space}/resources/v1/application/CSRF`;m(n,{onComplete(i){i=JSON.parse(i),t&&t(i.csrf)},onFailure(i){s&&s(i)}})}function Ue(e,t=void 0,s=void 0){const n={base:`${e.space}`,uri:"/resources/bps/cspaces",optTenant:`tenant=${e.tenant}`},i=`${n.base}${n.uri}?${n.optTenant}`;m(i,{method:"GET",headers:{Accept:"application/json,text/javascript,*/*","Content-Type":"application/ds-json"},onComplete(c,r){const a=JSON.parse(c);t&&t(a,r)},onFailure(c,r,a){s&&s(c,r,a)}})}function ke(e,t,s,n){k(e.space,t,i=>{m(i,{header:{ENO_CSRF_TOKEN:e.token},onComplete:c=>{s&&s(c)},onFailure:c=>{console.log("error http",c),n&&n(c)}})},i=>{console.log("error file URL",i),n&&n(i)})}async function Ae(e,t,s=void 0,n=void 0){return new Promise(i=>{k(e.space,t,c=>{m(c,{onComplete:(r,a,o)=>(i(JSON.parse(r)),s&&s(JSON.parse(r),a,o),i),onFailure:(r,a,o)=>{n&&n(r,a,o),console.log(r,a?.errormsg)}})})})}function $e(e,t,s,n=void 0,i=void 0){const c=new Blob([JSON.stringify(t)],{type:"text/plain"});F(e,s,r=>{const a=r.data[0].relateddata.files[0].id,o=r.data[0].dataelements.secondaryTitle!==""?r.data[0].dataelements.secondaryTitle:r.data[0].dataelements.title;J(e,s,a,c,o,d=>{n&&n(d)},d=>{i&&i(d)})},r=>{console.log("En cas d'erreur nous avons :",r),alert("Erreur lors de la sauvegarde, Veuillez réessayez"),i&&i(r)})}let W,X;const Y=[];async function ve(e,t=void 0,s=void 0){console.log(`%c 3ds & objID ok ${e.space} et ${e.objID} *`,"color: green"),e.objID&&e.objID!==""?F(e.space,e.objID,n=>{t&&t(n.csrf.value)},n=>{s&&s(n)}):e.objID===null&&O(e)}async function Re(e,t=void 0,s=void 0){await I(e,n=>{const i={};i.obj=n,B(e,c=>{i.datas=c,t&&t(i)},c=>{s&&s(c)})},n=>{s&&s(n)})}function B(e,t=void 0,s=void 0){const n=[];e.objIds.forEach((i,c)=>{I(e,i.objId,r=>{n.push({[i.name]:r}),i.name==="dbProjets"&&(W=r.affaires.map(a=>a.objectID),q(e,X)),c===e.objIds.length-1&&t&&t(n)},r=>{s&&s(r)})})}function q(e,t,s=void 0,n=void 0){x(e,W,i=>{const c=[...t];c.find(r=>r.objectID===i.objectId).data=i.data,X=c,Y.push(i.data),s&&s(Y)},i=>{n&&(n(i),console.log(i))})}const Ie="FA35FB9B177A280065800EA0000F599C",je=["swym","3dspace","drive","usersgroup","3dplan","dashboard"],H={how:"ds6w:how",what:"ds6w:what",when:"ds6w:when",where:"ds6w:where",who:"ds6w:who",why:"ds6w:why"},Me={objId:Ie,pred:"who",order_by:"desc",tag:"testTag"};function Pe(e,t,s=void 0,n=void 0){const{space:i,tenant:c}=e,{objId:r,pred:a,tag:o}=t,d={uri:"/resources/6w/tags",otpCTX:"SecurityContext=preferred",optTenant:`tenant=${c}`},l=`${i}${d.uri}?${d.otpCTX}&${d.optTenant}`,p={tag:[{subject:[{uri:`pid://${r}`}],predicate:H[a],object:{literal:o}}]};m(l,{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},data:JSON.stringify(p),onComplete(f){JSON.parse(f);const g={};setTimeout(()=>{E(e,r,_=>{const S=_.data[0].dataelements.title,h=_.data[0].dataelements.fileExtension!==void 0?_.data[0].dataelements.fileExtension:"",y=_.data[0].relateddata.ownerInfo[0].dataelements.name;g.name=S,g.ext=h,g.createBy=y,t.info={...g},Le(e,t,T=>{s&&s(T)},T=>{n&&n(T)})},(_,S)=>{const h=_;h.msg=S.errormsg,h.errCode=S.errorcode,console.log("❌ sendDirectMessage => ",h),n&&n(h)})},2e3)},onFailure(f,g){const _=f;_.msg=g.errormsg,_.errCode=g.errorcode,console.log("❌ sendDirectMessage => ",_),n&&n(_)}})}function Le(e,t,s=void 0,n=void 0){console.log("obj ",t);const i=t.info.name,c={baseUrl:`https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,uri:"/federated/search"},r=`${c.baseUrl}${c.uri}`,a={"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"},o=A(),d={with_indexing_date:!0,with_synthesis:!0,with_nls:!1,label:`3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,locale:"fr",select_predicate:["ds6w:label","ds6w:type","ds6w:description","ds6w:identifier","ds6w:modified","ds6w:created","ds6wg:revision","ds6w:status","ds6w:responsible","owner","ds6w:responsibleUid","ds6wg:filesize","ds6w:project","ds6w:dataSource","ds6w:community","ds6w:originator","dsgeo:referential","ds6w:lastModifiedBy","ds6w:repository","dcterms:title","dcterms:description","ds6w:containerUid"],with_synthesis_hierarchical:!0,select_file:["icon","thumbnail_2d"],query:i,specific_source_parameter:{"3dspace":{additional_query:' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'},drive:{additional_query:' AND NOT ([flattenedtaxonomies]:"types/DriveNode" AND ( [current]:"Trashed" OR [policy]:"Drive File Iteration") )'}},select_exclude_synthesis:["ds6w:what/ds6w:topic"],order_by:Me.order_by,order_field:"relevance",select_snippets:["ds6w:snippet","ds6w:label:snippet","ds6w:responsible:snippet","ds6w:community:snippet","swym:message_text:snippet"],nresults:40,start:"0",source:je,tenant:e.tenant,login:{"3dspace":{SecurityContext:e.ctx}}};console.log("dataPattern => ",d),m(r,{method:"POST",headers:a,data:JSON.stringify(d),onComplete(l){const p=JSON.parse(l);s(p)},onFailure(l,p){const f=l;f.msg=p.errormsg,f.errCode=p.errorcode,console.log("❌ sendDirectMessage => ",f),n&&n(f),console.log("Erreur de recuperation d'id du doc et des tags",l)}})}function Ee(e,t,s=void 0,n=void 0){const{objId:i,pred:c,tag:r}=t,a={uri:"/resources/6w/tags",otpCTX:"SecurityContext=preferred",optTenant:`tenant=${e.tenant}`},o=`${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`,d={tag:[{subject:[{uri:`pid://${i}`}],predicate:H[c],object:{literal:r}}]};m(o,{method:"DELETE",data:JSON.stringify(d),headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"},onComplete(l){s&&s(l)},onFailure(l,p){const f=l;f.msg=p.errormsg,f.errCode=p.errorcode,console.log("❌ sendDirectMessage => ",f),n&&n(f)}})}function Je(e,t="",s=void 0,n=void 0){const{space:i}=e;if(t==="")return;const c={uri:"/enovia/resources/v1/modeler/documents"},r={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Accept:"application/json,text/javascript,*/*"},a=`${i}${c.uri}`,o=`$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;m(a,{method:"POST",headers:r,data:o,onComplete(d){s&&s(JSON.parse(d))},onFailure(d,l){const p=d;p.msg=l.error,n&&n(p)}})}function Ge(e,t=void 0,s=void 0){const n={base:e.space,uri:"/api/community/listmycommunities",limit:`/limit/${e.limit?e.limit:128}`,page:`/page/${e.page?e.page:"1"}`},i=`${n.base}${n.uri}${n.limit}${n.page}`,c=[];w(e,r=>{m(i,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(a,o,d){const p=JSON.parse(a).result;let f=0;p.forEach(g=>{const _={description:g.description,id:g.id,title:g.title,owner:g.owner,role:g.role,access:g.access};z(e,g.id,S=>{f++,_.members=S,c.push(_),f===p.length&&t&&t(c)},S=>s(S))})},onFailure(a,o){const d=a;d.status=o.status,d.response=o.errormsg,s&&s(d)}})})}function z(e,t,s,n){const i=`${e.space}/api/community/listmembers`,c={params:{page:e.page?e.page:1,limit:e.limit?e.limit:50,community_id:t}};w(e,r=>{m(i,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},data:JSON.stringify(c),type:"json",onComplete(a,o,d){s&&s(a)},onFailure(a,o){const d=a;d.status=o.status,d.response=o.errormsg,n&&n(d)}})})}function xe(e,t=void 0,s=void 0){const n="YXdA5x4DSUKtlAi2wmnyTA";e.commu_id||(e.commu_id=n);const i=`${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;w(e,c=>{m(i,{method:"GET",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":c.result.ServerToken},onComplete(r){const a=JSON.parse(r);t&&t(a)},onFailure(r,a){const o=r;o.status=a.status,o.response=a.errormsg,s&&s(o)}})})}function Ke(e,t,s=void 0,n=void 0){const{listAllContacts:i,currentUser:c}=e;console.log("__listAllContacts",i.hits);const r=`${e.space}/api/directmessages`,a={users:[c.login].concat(t.receipt)},o={id_msg:"",senderId:e.currentUser.login,senderName:`${e.currentUser.first_name} ${e.currentUser.last_name}`,msg:Ve(t.msg)};let d=!1;Q(a.users,l=>{l!==void 0&&(o.id_msg=l.id,d=!0,j(e,o))},l=>{d=!1,console.log("_3dSwym_findCommunityToInstantMSG callback",l),n&&n(l),o.id_msg=""}),d===!1&&setTimeout(()=>{d===!1&&w(e,l=>{m(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":l.result.ServerToken},data:JSON.stringify(a),type:"json",onComplete(p,f,g){const _=p;_.reponse=JSON.parse(g.response),_.status=g.status,s&&s(_),o.id_msg=_.result.id,j(e,o)},onFailure(p,f,g){const _=p;_.msg=f.errormsg,_.status=f.status,n&&n(_)}})})},500)}function Q(e,t,s,n){const i=`${e.space}/api/directmessages/lite?with_favorites=false`;w(e,c=>{m(i,{method:"GET",headers:{Accept:"application/json,text/javascript,*/*","X-DS-SWYM-CSRFTOKEN":c.result.ServerToken},onComplete(r){const a=JSON.parse(r),o=[];a.result.forEach(p=>{p.users=p.users.sort((f,g)=>f.login.localeCompare(g.login)),p.users.length===t.length&&o.push(p)});const d=t.sort(),l=o.find(p=>{const f=[];return p.users.forEach(g=>{f.push(g.login)}),JSON.stringify(f)===JSON.stringify(d)});s&&l!==void 0?s(l):(n||l===void 0)&&n(l)},onFailure(r){const a=r;a.msg=headers.errormsg,a.errCode=headers.errorcode,console.log("❌ sendDirectMessageLite => ",a),n&&n(a)}})})}function j(e,t,s=void 0,n=void 0){const i={base:e.space,uri:"/api/community",id_msg:`${t.id_msg}`,endUri:"/instantmessages"},c=`${i.base}${i.uri}/${i.id_msg}${i.endUri}`,r={author:{login:t.senderId,displayName:t.senderName},accessState:null,commentUri:null,comments:null,endorsements:null,moderationState:null,parentCommentUri:null,richMessage:t.msg};console.log("_3dSwym_sendDirectMessageData url ",c),w(e,a=>{m(c,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":a.result.ServerToken},data:JSON.stringify(r),type:"json",onComplete(o,d,l){const p=o;p.status=l.status,p.response=JSON.parse(l.response),console.log("✅ _3dSwym_sendDirectMessageData => ",p),s&&s(p)},onFailure(o,d){const l=o;l.msg=d.errormsg,l.errCode=d.errorcode,console.log("❌ sendDirectMessage => ",l),n&&n(l)}})})}function Ve(e){const t=new Date().toLocaleDateString(),s=new Date().toLocaleTimeString();return`<p>${e} </p>
|
|
4
|
+
<br/>
|
|
5
|
+
<hr/>
|
|
6
|
+
<p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`}const We={title:"TEST DEV COMMUNITY IDEA",community_id:"YXdA5x4DSUKtlAi2wmnyTA",community_title:"TEST DEV COMMUNITY",idee_id:"THhRI8rlQNWKRxpv3Xqqug"};function Xe(e,t,s=void 0,n=void 0){const i=`${e.space}/api/idea/add`,c=e.swymCommunities.find(o=>o.id===t.community_id),r=e.swymCommunities.find(o=>o.title.toLowerCase()===t.community_title.toLowerCase()),a={params:{title:t.title,community_id:c?.id!==void 0?c.id:r.id,message:He(t.text_html),published:1}};w(e,o=>{const d={"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":o.result.ServerToken};m(i,{method:"POST",headers:d,data:JSON.stringify(a),type:"json",onComplete(l,p,f){const g=JSON.parse(l);g.status=f.status,g.response=f.response,s&&s(g)},onFailure(l,p,f){const g=l;g.status=p.status,g.response=p.errormsg,n&&n(g)}})})}function Ye(e,t,s=void 0,n=void 0){const i=`${e.space}/api/idea/delete`,c={params:{community_id:t.community_id,ideationIds:[t.idee_id]}};w(e,r=>{m(i,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},data:JSON.stringify(c),type:"json",onComplete(a,o,d){s&&s(a)},onFailure(a,o,d){const l=a;l.status=o.status,l.response=o.errormsg,n&&n(l)}})})}function Be(e,t="",s=void 0,n=void 0){const i=e.tenant.toLowerCase()==="r1132101716373"?"tFtz0G4MR6qNtKgJjNfTog":e.tenant.toLowerCase()==="r1132101286859"?"Qpv3HN-tTDOsU-7_c5DnDg":"Template_d'idée_à_créer";t===""&&(t=i);const c=`${e.space}/api/idea/get`,r={params:{id:t}};w(e,a=>{m(c,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":a.result.ServerToken},data:JSON.stringify(r),type:"json",onComplete(o){const d=o;d.msg=d.result.message,s&&s(d)},onFailure(o){const d=o;d.status=headers.status,d.response=headers.errormsg,n&&n(d)}})})}function qe(e,t=We,s=void 0,n=void 0){const i={uri:"/api/idea/list",comId:`/community_id/${e.tenant.toLowerCase()==="r1132101716373"?t.community_id:"bgnIsG74SUWswyGzS6NC6g"}`,limit:`/limit/${t.limit?t.limit:10}`},c=`${e.space}${i.uri}${i.comId}${i.limit}`;w(e,r=>{m(c,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(a){const o=JSON.parse(a);s&&s(o)},onFailure(a,o){const d=a;d.status=o.status,d.response=o.errormsg,n&&n(d)}})})}function He(e){return!e||e===""?`<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
7
|
+
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
8
|
+
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
9
|
+
<p><strong>Référence client </strong>: <em>
|
|
10
|
+
<a data-predicate="ds6w:who" data-type="internal" class="s6m-tag-link s6m-link">CLIENT</a>
|
|
11
|
+
</em></p>
|
|
12
|
+
<p><strong>Référence projet </strong>: <em>
|
|
13
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">NOM AFFAIRE</a>
|
|
14
|
+
<a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">VILLE</a>
|
|
15
|
+
<a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">DPT</a>
|
|
16
|
+
</em></p>
|
|
17
|
+
<p>📝 <strong>Base documentaire</strong> : LIEN projet</p>
|
|
18
|
+
<p>📝 <strong>Fiche COCLICO</strong> : LIEN projet<em><strong></strong>
|
|
19
|
+
</em></p>
|
|
20
|
+
<p><br /></p>
|
|
21
|
+
<table border="1">
|
|
22
|
+
<tbody>
|
|
23
|
+
<tr><td><strong>Description projet </strong>:
|
|
24
|
+
<br /><br /></td></tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
<p><br /></p>
|
|
28
|
+
<p><br /></p>
|
|
29
|
+
<p><strong>Produit :<em> </em></strong><em>
|
|
30
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli Usiné</a>
|
|
31
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli MP</a>
|
|
32
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Lamwood</a>
|
|
33
|
+
</em></p>
|
|
34
|
+
<p><strong>Type de Bâtiment :</strong><em>
|
|
35
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Logements</a>
|
|
36
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">BUP</a>
|
|
37
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">ERP</a>
|
|
38
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Plateforme Logistique</a>
|
|
39
|
+
</em></p>
|
|
40
|
+
<p><strong>Essence :</strong> <em>
|
|
41
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">DOUGLAS</a>
|
|
42
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PIN</a>
|
|
43
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">MIXTE</a>
|
|
44
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">EPICEA</a>
|
|
45
|
+
</em></p>
|
|
46
|
+
<p><strong>Qualité : </strong><em>
|
|
47
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">NVI</a>
|
|
48
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI1F</a>
|
|
49
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI2F</a>
|
|
50
|
+
</em><strong></strong></p>
|
|
51
|
+
<p><strong>Traitement : </strong><em>
|
|
52
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PARKA</a>
|
|
53
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">CT2</a>
|
|
54
|
+
</em></p>
|
|
55
|
+
<p><strong>Type de Paroi : </strong><em>
|
|
56
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Intérieurs</a>
|
|
57
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Extérieurs</a>
|
|
58
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Planchers</a>
|
|
59
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Couverture</a>
|
|
60
|
+
</em></p>
|
|
61
|
+
<p><em>
|
|
62
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Accessible</a>
|
|
63
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Non-Accessible</a>
|
|
64
|
+
</em></p>
|
|
65
|
+
<p><strong>Hauteur Dernier Plancher :</strong><em><strong> </strong>
|
|
66
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">Hauteur <8m</a>
|
|
67
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">8m< Hauteur <28m</a>
|
|
68
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">28m< Hauteur <50m</a>
|
|
69
|
+
</em></p>
|
|
70
|
+
<h2><br /></h2>
|
|
71
|
+
<h2><u>EQUIPE PIVETEAU :</u></h2>
|
|
72
|
+
<table border="1">
|
|
73
|
+
<tbody>
|
|
74
|
+
<tr><td><strong>Chargé d'Affaires</strong></td><td><br /></td></tr>
|
|
75
|
+
<tr><td><strong>Service études de prix</strong></td><td><br /></td></tr>
|
|
76
|
+
</tbody></table>
|
|
77
|
+
<p>
|
|
78
|
+
</p>`:e}function ze(e){const t="Hello "+e;return console.log(t),t}u.UUID=A,u._3DSpace_Create_Doc=Se,u._3DSpace_csrf=O,u._3DSpace_download_doc=I,u._3DSpace_download_multidoc=x,u._3DSpace_file_update=J,u._3DSpace_file_update_csr=G,u._3DSpace_file_url=k,u._3DSpace_file_url_csr=_e,u._3DSpace_get_csrf=F,u._3DSpace_get_docInfo=E,u._3DSpace_get_downloadTicket_multidoc=K,u._3DSpace_get_securityContexts=D,u._3DSpace_lifecycle_changeRevision=Ce,u._3DSpace_lifecycle_changeState=ye,u._3DSpace_lifecycle_getGraph=we,u._3DSpace_lifecycle_getNextRevision=Te,u._3DSpace_lifecycle_getNextStates=he,u._3DSwim_getAllCommunities=Ge,u._3DSwim_getMembersCommunity=z,u._3DSwym_buildDirectMessage=Ke,u._3DSwym_deleteIdea=Ye,u._3DSwym_findCommunityToInstantMSG=Q,u._3DSwym_getAllNews=Oe,u._3DSwym_getFamiliarPeople=De,u._3DSwym_getIdeaStatusMaturity=xe,u._3DSwym_getSWYMIdea=Be,u._3DSwym_get_AllSWYMIdeas=qe,u._3DSwym_get_currentUser=V,u._3DSwym_get_findUser=Ne,u._3DSwym_get_version=w,u._3DSwym_postIdea=Xe,u._3DSwym_sendMessageData=j,u._AppMngt_get_info_user=ce,u._AppMngt_get_users=re,u._getPlateformInfos=v,u._getPlatformServices=$,u._httpCallAuthenticated=m,u._setDraggable=se,u._setDroppable=ie,u._setupTagger=ae,u.addTagToDoc=Pe,u.compass_getListAdditionalApps=oe,u.couleurs=P,u.createUserGroups=de,u.dataMixing=q,u.deleteUserGroups=pe,u.findAdresse=ee,u.getActiveServices=be,u.getAllContextSecurity=Ue,u.getCSRFToken=Fe,u.getCommunes=Z,u.getComplementUG=le,u.getDataFrom3DSpace=ke,u.getDataFromGouvFr=te,u.getDatasByTenant=Re,u.getDatasFrom3DSpace=B,u.getDownloadDocument=Ae,u.getInfoDocTags=Je,u.getUserGroupsList=ue,u.getUsersGroupRules=L,u.get_3DSpace_csrf=ve,u.patchUserGroups=fe,u.patchUserGroupsControl=me,u.pushDataIn3DSpace=$e,u.readUserGroupControl=ge,u.removeTagToDoc=Ee,u.sayHello=ze,u.updateEvent=ne,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beam3_dev/api_module",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./dist/wb3Api.js",
|
|
6
|
-
"module": "./dist/wb3Api.js",
|
|
7
5
|
"files": [
|
|
8
6
|
"dist"
|
|
9
7
|
],
|
|
8
|
+
"main": "./dist/wb3Api.umd.cjs",
|
|
9
|
+
"module": "./dist/wb3Api.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"import": "./dist/wb3Api.js",
|
|
13
|
-
"require": "./dist/wb3Api.
|
|
13
|
+
"require": "./dist/wb3Api.umd.cjs"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|