@pristy/pristy-libvue 0.23.2 → 0.23.4
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/pristy-libvue.js +30 -28
- package/dist/pristy-libvue.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/pristy-libvue.js
CHANGED
|
@@ -482,14 +482,14 @@ const t = new dM(), Y = new WM(t), VM = new sM(t), L = new LM(t), u = new pM(t),
|
|
|
482
482
|
}, Symbol.toStringTag, { value: "Module" })), $M = { en: qM, fr: fM };
|
|
483
483
|
var R;
|
|
484
484
|
let MI = (localStorage == null ? void 0 : localStorage.getItem("user.language")) || ((R = window == null ? void 0 : window.navigator) == null ? void 0 : R.language) || "fr";
|
|
485
|
-
const
|
|
485
|
+
const h = BM({
|
|
486
486
|
locale: MI,
|
|
487
487
|
messages: $M,
|
|
488
488
|
fallbackLocale: "fr",
|
|
489
489
|
silentTranslationWarn: !0,
|
|
490
490
|
silentFallbackWarn: !0
|
|
491
|
-
}), O =
|
|
492
|
-
class
|
|
491
|
+
}), O = h.global.t;
|
|
492
|
+
class E extends Error {
|
|
493
493
|
constructor(M, I, g) {
|
|
494
494
|
super(M), this.code = I, this.cause = g;
|
|
495
495
|
}
|
|
@@ -500,7 +500,7 @@ function II(N, M) {
|
|
|
500
500
|
}
|
|
501
501
|
function c(N, M) {
|
|
502
502
|
let I = II(N, M);
|
|
503
|
-
return new
|
|
503
|
+
return new E(I, M.status, M);
|
|
504
504
|
}
|
|
505
505
|
class gI {
|
|
506
506
|
createSharedLinkError(M) {
|
|
@@ -510,7 +510,7 @@ class gI {
|
|
|
510
510
|
throw c("deleteSharedLink", M);
|
|
511
511
|
}
|
|
512
512
|
uploadFileError(M, I) {
|
|
513
|
-
throw M.status === 409 ? new
|
|
513
|
+
throw M.status === 409 ? new E(
|
|
514
514
|
O("error.uploadFile.409", { filename: I }),
|
|
515
515
|
M.status,
|
|
516
516
|
M
|
|
@@ -527,7 +527,7 @@ class gI {
|
|
|
527
527
|
case 403:
|
|
528
528
|
case 404:
|
|
529
529
|
case 409:
|
|
530
|
-
throw new
|
|
530
|
+
throw new E(
|
|
531
531
|
O(`error.deleteNode.${M.status}`, { type: O(I) }),
|
|
532
532
|
M.status,
|
|
533
533
|
M
|
|
@@ -629,7 +629,7 @@ class gI {
|
|
|
629
629
|
throw c("getUser", M);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function n(N) {
|
|
633
633
|
let M = N.error ? N.error.response : JSON.parse(N.message);
|
|
634
634
|
switch (M.statusCode === void 0 && (M = M.error), M.statusCode) {
|
|
635
635
|
case 400:
|
|
@@ -769,8 +769,8 @@ i.prototype.mainError = function() {
|
|
|
769
769
|
var l = b[D], m = I[l];
|
|
770
770
|
I[l] = function(z) {
|
|
771
771
|
var y = N.operation(g), d = Array.prototype.slice.call(arguments, 1), G = d.pop();
|
|
772
|
-
d.push(function(
|
|
773
|
-
y.retry(
|
|
772
|
+
d.push(function(k) {
|
|
773
|
+
y.retry(k) || (k && (arguments[0] = y.mainError()), G.apply(this, arguments));
|
|
774
774
|
}), y.attempt(function() {
|
|
775
775
|
z.apply(I, d);
|
|
776
776
|
});
|
|
@@ -1107,7 +1107,7 @@ class CI {
|
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
-
const
|
|
1110
|
+
const S = new CI();
|
|
1111
1111
|
class $I {
|
|
1112
1112
|
getPublicLink() {
|
|
1113
1113
|
}
|
|
@@ -1278,7 +1278,7 @@ class TI {
|
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
const
|
|
1281
|
+
const U = new TI(), uI = 60 * 1e3, w = e({
|
|
1282
1282
|
id: "UserStore",
|
|
1283
1283
|
state: () => ({
|
|
1284
1284
|
token: "",
|
|
@@ -1322,11 +1322,11 @@ const h = new TI(), uI = 60 * 1e3, w = e({
|
|
|
1322
1322
|
"ACS_USERNAME",
|
|
1323
1323
|
this.keycloak.idTokenParsed.preferred_username
|
|
1324
1324
|
), this.isLoggedIn = !0, M)).catch((M) => {
|
|
1325
|
-
throw this.isLoggedIn = !1,
|
|
1325
|
+
throw this.isLoggedIn = !1, n(M);
|
|
1326
1326
|
});
|
|
1327
1327
|
},
|
|
1328
1328
|
getPerson() {
|
|
1329
|
-
return x.getPerson("-me-").then((N) => N.entry).then((N) => (this.person = N, N));
|
|
1329
|
+
return x.getPerson("-me-").then((N) => N.entry).then((N) => (this.person = N, N)).catch((N) => (this.isLoggedIn = !1, Promise.reject(N)));
|
|
1330
1330
|
},
|
|
1331
1331
|
async login(N, M) {
|
|
1332
1332
|
if (!N || !M)
|
|
@@ -1334,7 +1334,9 @@ const h = new TI(), uI = 60 * 1e3, w = e({
|
|
|
1334
1334
|
await this.apiLogin(N, M);
|
|
1335
1335
|
},
|
|
1336
1336
|
apiLogin(N, M) {
|
|
1337
|
-
return t.login(N, M).then(() => (this.isLoggedIn = !0, this.getPerson())).catch((I) =>
|
|
1337
|
+
return t.login(N, M).then(() => (this.isLoggedIn = !0, this.getPerson())).catch((I) => {
|
|
1338
|
+
throw this.isLoggedIn = !1, n(I);
|
|
1339
|
+
});
|
|
1338
1340
|
},
|
|
1339
1341
|
async publiclogoff() {
|
|
1340
1342
|
const N = localStorage.getItem("ACS_USERNAME");
|
|
@@ -1346,7 +1348,7 @@ const h = new TI(), uI = 60 * 1e3, w = e({
|
|
|
1346
1348
|
"GET",
|
|
1347
1349
|
`fr/jeci/pristy/authentication/ticket/publication/site/${N}`
|
|
1348
1350
|
).then((I) => (t.setTicket(I.ticket, null), window.localStorage.setItem("ACS_USERNAME", I.login), I.ticket)).catch((I) => {
|
|
1349
|
-
throw
|
|
1351
|
+
throw n(I);
|
|
1350
1352
|
});
|
|
1351
1353
|
}
|
|
1352
1354
|
}
|
|
@@ -1528,7 +1530,7 @@ const h = new TI(), uI = 60 * 1e3, w = e({
|
|
|
1528
1530
|
) : !!I;
|
|
1529
1531
|
}
|
|
1530
1532
|
}
|
|
1531
|
-
}),
|
|
1533
|
+
}), X = h.global.t;
|
|
1532
1534
|
class ZI {
|
|
1533
1535
|
async computeMenuEspaces() {
|
|
1534
1536
|
let M = [], I = await yI.getFavorites(), g = this.favoritesSiteToMenuItems(I), b = this.favoritesNodeToMenuItems(
|
|
@@ -1537,18 +1539,18 @@ class ZI {
|
|
|
1537
1539
|
)
|
|
1538
1540
|
);
|
|
1539
1541
|
return M.push({
|
|
1540
|
-
label:
|
|
1542
|
+
label: X("menu.espaces"),
|
|
1541
1543
|
items: g,
|
|
1542
1544
|
key: "menuEspaces",
|
|
1543
1545
|
to: { name: "mes-espaces" },
|
|
1544
1546
|
class: "layout-menuitem-root-text"
|
|
1545
1547
|
}), M.push({
|
|
1546
|
-
label:
|
|
1548
|
+
label: X("menu.favoris"),
|
|
1547
1549
|
key: "menuFavoris",
|
|
1548
1550
|
class: "layout-menuitem-root-text",
|
|
1549
1551
|
items: b
|
|
1550
1552
|
}), M.push({
|
|
1551
|
-
label:
|
|
1553
|
+
label: X("menu.recherche"),
|
|
1552
1554
|
key: "menuRecherche",
|
|
1553
1555
|
class: "layout-menuitem-root-text",
|
|
1554
1556
|
to: {
|
|
@@ -1557,7 +1559,7 @@ class ZI {
|
|
|
1557
1559
|
}), M;
|
|
1558
1560
|
}
|
|
1559
1561
|
async computeMenuActes() {
|
|
1560
|
-
let M = [], I = await
|
|
1562
|
+
let M = [], I = await U.searchAllWorkspaces(
|
|
1561
1563
|
"AND pm:typeEspace:'actes'"
|
|
1562
1564
|
), g = this.actesSiteToMenuItems(I);
|
|
1563
1565
|
return M.push({
|
|
@@ -1771,7 +1773,7 @@ const Mg = new YI(), eI = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiB
|
|
|
1771
1773
|
function EI(N, M, I, g, b, A) {
|
|
1772
1774
|
return FM(), HM("img", { src: b.src }, null, 8, XI);
|
|
1773
1775
|
}
|
|
1774
|
-
const Ig = /* @__PURE__ */ nI(SI, [["render", EI]]), Z =
|
|
1776
|
+
const Ig = /* @__PURE__ */ nI(SI, [["render", EI]]), Z = h.global.t;
|
|
1775
1777
|
class hI {
|
|
1776
1778
|
getIcon(M) {
|
|
1777
1779
|
let I;
|
|
@@ -1885,7 +1887,7 @@ class UI {
|
|
|
1885
1887
|
) || m.nodeType === "am:dossierSeance"
|
|
1886
1888
|
), D = A.find(
|
|
1887
1889
|
(m) => m.nodeType === "st:site"
|
|
1888
|
-
).name, l =
|
|
1890
|
+
).name, l = U.getWorkspace(D);
|
|
1889
1891
|
return l.then((m) => {
|
|
1890
1892
|
A.forEach((C) => {
|
|
1891
1893
|
let z;
|
|
@@ -2002,7 +2004,7 @@ const bg = new kI(), Ag = e({
|
|
|
2002
2004
|
}), !0) : (console.warn("filterQuery is undifined"), !1);
|
|
2003
2005
|
},
|
|
2004
2006
|
removeFilterQuery(N) {
|
|
2005
|
-
this.filterQueries = this.filterQueries.filter((M) => M.query !== N.query);
|
|
2007
|
+
this.filterQueries = this.filterQueries.filter((M) => N.query.startsWith("(SITE:") && M.label && (M.label.startsWith("Dossier :") || M.label.startsWith("Folder :")) ? !1 : M.query !== N.query);
|
|
2006
2008
|
},
|
|
2007
2009
|
addField(N) {
|
|
2008
2010
|
return this.fields.find((M) => M.filterQuery === N.filterQuery) ? !1 : (this.fields.push({
|
|
@@ -2067,9 +2069,9 @@ const bg = new kI(), Ag = e({
|
|
|
2067
2069
|
actions: {
|
|
2068
2070
|
load(N, M, I) {
|
|
2069
2071
|
var g, b;
|
|
2070
|
-
return !I && N === ((g = this.workspace) == null ? void 0 : g.id) && M === ((b = this.currentNode) == null ? void 0 : b.id) ? Promise.resolve() : (this.loading = !0, this.emptyFolder = !1,
|
|
2072
|
+
return !I && N === ((g = this.workspace) == null ? void 0 : g.id) && M === ((b = this.currentNode) == null ? void 0 : b.id) ? Promise.resolve() : (this.loading = !0, this.emptyFolder = !1, U.getWorkspace(N).then((A) => (this.workspace = A, this.role = A.role, this.visibility = A.visibility, this.canUpload = A.role && A.role !== "SiteConsumer", M ? S.getNode(M).then((D) => D) : S.getNode(A.guid).then((D) => (this.workspaceInfo = D, D)))).then((A) => {
|
|
2071
2073
|
let D = A.guid || A.id;
|
|
2072
|
-
return
|
|
2074
|
+
return S.getChildren(D).then((l) => (l.documentLibrary ? (this.currentNode = l.documentLibrary, this.children = l.subChildren) : (this.currentNode = A, this.children = l), this.children.length > 0 ? (this.folders = this.children.filter((m) => m.isFolder), this.files = this.children.filter((m) => m.isFile)) : (this.folders = [], this.files = [], this.emptyFolder = !0), this.loading = !1, A));
|
|
2073
2075
|
}));
|
|
2074
2076
|
}
|
|
2075
2077
|
}
|
|
@@ -2079,7 +2081,7 @@ export {
|
|
|
2079
2081
|
FI as actionsApi,
|
|
2080
2082
|
t as alfrescoApi,
|
|
2081
2083
|
qI as alfrescoFileService,
|
|
2082
|
-
|
|
2084
|
+
S as alfrescoNodeService,
|
|
2083
2085
|
$I as alfrescoPermissionService,
|
|
2084
2086
|
fI as aspectsApi,
|
|
2085
2087
|
Ng as breadcrumbService,
|
|
@@ -2091,7 +2093,7 @@ export {
|
|
|
2091
2093
|
j as errorService,
|
|
2092
2094
|
yI as favoriteService,
|
|
2093
2095
|
o as favoritesApi,
|
|
2094
|
-
|
|
2096
|
+
h as i18n,
|
|
2095
2097
|
gg as iconeService,
|
|
2096
2098
|
r as menuService,
|
|
2097
2099
|
$M as messages,
|
|
@@ -2116,5 +2118,5 @@ export {
|
|
|
2116
2118
|
w as useUserStore,
|
|
2117
2119
|
a as versionsApi,
|
|
2118
2120
|
PM as webscriptApi,
|
|
2119
|
-
|
|
2121
|
+
U as workspaceService
|
|
2120
2122
|
};
|