@xwiki/cristal-authentication-nextcloud-ui 1.4.0 → 1.6.0
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/api-extractor.json +1 -1
- package/dist/NextcloudLoginMenu-BhEWp9P3.js +121 -0
- package/dist/NextcloudLoginMenu-BhEWp9P3.js.map +1 -0
- package/dist/NextcloudLoginMenuUIExtension.d.ts +19 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +35 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +4 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/translations.d.ts +42 -0
- package/dist/vue/NextcloudLoginMenu.vue.d.ts +2 -0
- package/langs/translation-uk.json +10 -0
- package/package.json +16 -14
- package/tsconfig.json +1 -1
package/api-extractor.json
CHANGED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent as C, inject as I, ref as L, watch as O, resolveComponent as d, openBlock as h, createBlock as _, unref as e, isRef as f, withCtx as n, createVNode as r, createTextVNode as v, toDisplayString as b, createElementVNode as y, createCommentVNode as U } from "vue";
|
|
2
|
+
import { NextcloudAuthenticationState as M } from "@xwiki/cristal-authentication-nextcloud-state";
|
|
3
|
+
import { useI18n as z } from "vue-i18n";
|
|
4
|
+
const B = {
|
|
5
|
+
"authentication.nextcloud.modal.title": "Nextcloud Login",
|
|
6
|
+
"authentication.nextcloud.modal.username.label": "Username",
|
|
7
|
+
"authentication.nextcloud.modal.username.help": "Enter your username.",
|
|
8
|
+
"authentication.nextcloud.modal.password.label": "Password",
|
|
9
|
+
"authentication.nextcloud.modal.password.help": "It is not recommended to enter your own personal password, you should enter a specific application password instead.",
|
|
10
|
+
"authentication.nextcloud.modal.submit.label": "Log-in",
|
|
11
|
+
"authentication.nextcloud.modal.error.invalid": "Invalid username or password.",
|
|
12
|
+
"authentication.nextcloud.modal.error.generic": "Login check failed. Response status: {status}."
|
|
13
|
+
}, E = {
|
|
14
|
+
"authentication.nextcloud.modal.title": "Connexion à Nextcloud",
|
|
15
|
+
"authentication.nextcloud.modal.username.label": "Nom d'utilisateur",
|
|
16
|
+
"authentication.nextcloud.modal.username.help": "Saisissez votre nom d'utilisateur.",
|
|
17
|
+
"authentication.nextcloud.modal.password.label": "Mot de passe",
|
|
18
|
+
"authentication.nextcloud.modal.password.help": "Il n'est pas recommandé de saisir votre mot de passe personnel, vous devriez saisir un mot de passe d'application à la place.",
|
|
19
|
+
"authentication.nextcloud.modal.submit.label": "Se connecter",
|
|
20
|
+
"authentication.nextcloud.modal.error.invalid": "Nom d'utilisateur ou mot de passe non valide.",
|
|
21
|
+
"authentication.nextcloud.modal.error.generic": "Échec d’authentification. Statut de la réponse : {status}."
|
|
22
|
+
}, R = {
|
|
23
|
+
en: B,
|
|
24
|
+
fr: E
|
|
25
|
+
}, j = { class: "alerts-wrapper" }, q = { class: "alerts" }, A = /* @__PURE__ */ C({
|
|
26
|
+
__name: "NextcloudLoginMenu",
|
|
27
|
+
setup(c) {
|
|
28
|
+
const { t } = z({
|
|
29
|
+
messages: R
|
|
30
|
+
}), o = I("cristal").getContainer().get(M), l = o.modalOpened, p = o.username, x = o.password, s = L(void 0);
|
|
31
|
+
async function V() {
|
|
32
|
+
const i = await o.callback();
|
|
33
|
+
i.success || (s.value = i.status);
|
|
34
|
+
}
|
|
35
|
+
return O(
|
|
36
|
+
o.modalOpened,
|
|
37
|
+
async (i, a) => {
|
|
38
|
+
i && !a && (o.username.value = "", o.password.value = "", s.value = void 0);
|
|
39
|
+
}
|
|
40
|
+
), (i, a) => {
|
|
41
|
+
const w = d("x-alert"), g = d("x-text-field"), N = d("x-form"), k = d("x-btn"), S = d("x-dialog");
|
|
42
|
+
return h(), _(S, {
|
|
43
|
+
modelValue: e(l),
|
|
44
|
+
"onUpdate:modelValue": a[2] || (a[2] = (u) => f(l) ? l.value = u : null),
|
|
45
|
+
width: "auto",
|
|
46
|
+
title: e(t)("authentication.nextcloud.modal.title")
|
|
47
|
+
}, {
|
|
48
|
+
default: n(() => [
|
|
49
|
+
y("div", j, [
|
|
50
|
+
y("div", q, [
|
|
51
|
+
s.value === 401 ? (h(), _(w, {
|
|
52
|
+
key: 0,
|
|
53
|
+
type: "error"
|
|
54
|
+
}, {
|
|
55
|
+
default: n(() => [
|
|
56
|
+
v(b(e(t)("authentication.nextcloud.modal.error.invalid")), 1)
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
})) : s.value !== void 0 ? (h(), _(w, {
|
|
60
|
+
key: 1,
|
|
61
|
+
type: "error"
|
|
62
|
+
}, {
|
|
63
|
+
default: n(() => [
|
|
64
|
+
v(b(e(t)("authentication.nextcloud.modal.error.generic", {
|
|
65
|
+
status: s.value
|
|
66
|
+
})), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})) : U("", !0)
|
|
70
|
+
])
|
|
71
|
+
]),
|
|
72
|
+
r(N, {
|
|
73
|
+
id: "nextcloud-login-form",
|
|
74
|
+
onSubmit: V
|
|
75
|
+
}, {
|
|
76
|
+
default: n(() => [
|
|
77
|
+
r(g, {
|
|
78
|
+
modelValue: e(p),
|
|
79
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => f(p) ? p.value = u : null),
|
|
80
|
+
label: e(t)("authentication.nextcloud.modal.username.label"),
|
|
81
|
+
help: e(t)("authentication.nextcloud.modal.username.help"),
|
|
82
|
+
autofocus: "",
|
|
83
|
+
required: ""
|
|
84
|
+
}, null, 8, ["modelValue", "label", "help"]),
|
|
85
|
+
r(g, {
|
|
86
|
+
modelValue: e(x),
|
|
87
|
+
"onUpdate:modelValue": a[1] || (a[1] = (u) => f(x) ? x.value = u : null),
|
|
88
|
+
type: "password",
|
|
89
|
+
label: e(t)("authentication.nextcloud.modal.password.label"),
|
|
90
|
+
help: e(t)("authentication.nextcloud.modal.password.help")
|
|
91
|
+
}, null, 8, ["modelValue", "label", "help"])
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
})
|
|
95
|
+
]),
|
|
96
|
+
footer: n(() => [
|
|
97
|
+
r(k, {
|
|
98
|
+
variant: "primary",
|
|
99
|
+
type: "submit",
|
|
100
|
+
form: "nextcloud-login-form"
|
|
101
|
+
}, {
|
|
102
|
+
default: n(() => [
|
|
103
|
+
v(b(e(t)("authentication.nextcloud.modal.submit.label")), 1)
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}, 8, ["modelValue", "title"]);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}), D = (c, t) => {
|
|
113
|
+
const m = c.__vccOpts || c;
|
|
114
|
+
for (const [o, l] of t)
|
|
115
|
+
m[o] = l;
|
|
116
|
+
return m;
|
|
117
|
+
}, G = /* @__PURE__ */ D(A, [["__scopeId", "data-v-65826e44"]]);
|
|
118
|
+
export {
|
|
119
|
+
G as default
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=NextcloudLoginMenu-BhEWp9P3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextcloudLoginMenu-BhEWp9P3.js","sources":["../src/translations.ts","../src/vue/NextcloudLoginMenu.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport en from \"../langs/translation-en.json\";\nimport fr from \"../langs/translation-fr.json\";\n\nconst translations = {\n en,\n fr,\n};\nexport default translations;\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport messages from \"../translations\";\nimport { NextcloudAuthenticationState } from \"@xwiki/cristal-authentication-nextcloud-state\";\nimport { inject, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst authenticationState = cristal\n .getContainer()\n .get<NextcloudAuthenticationState>(NextcloudAuthenticationState);\nconst modalOpened: Ref<boolean> = authenticationState.modalOpened;\nconst username: Ref<string> = authenticationState.username;\nconst password: Ref<string> = authenticationState.password;\nconst errorStatus: Ref<number | undefined> = ref(undefined);\n\nasync function callback() {\n const response = await authenticationState.callback();\n if (!response.success) {\n errorStatus.value = response.status;\n }\n}\n\nwatch(\n authenticationState.modalOpened,\n async (newValue: boolean, oldValue: boolean) => {\n if (newValue && !oldValue) {\n authenticationState.username.value = \"\";\n authenticationState.password.value = \"\";\n errorStatus.value = undefined;\n }\n },\n);\n</script>\n\n<template>\n <x-dialog\n v-model=\"modalOpened\"\n width=\"auto\"\n :title=\"t('authentication.nextcloud.modal.title')\"\n >\n <template #default>\n <!-- We need 2 different divs to implement the following behavior:\n - Use max available width from the parent\n - Do not resize the parent if the content is larger -->\n <div class=\"alerts-wrapper\">\n <div class=\"alerts\">\n <x-alert v-if=\"errorStatus === 401\" type=\"error\">\n {{ t(\"authentication.nextcloud.modal.error.invalid\") }}\n </x-alert>\n <x-alert v-else-if=\"errorStatus !== undefined\" type=\"error\">\n {{\n t(\"authentication.nextcloud.modal.error.generic\", {\n status: errorStatus,\n })\n }}\n </x-alert>\n </div>\n </div>\n <x-form id=\"nextcloud-login-form\" @submit=\"callback\">\n <x-text-field\n v-model=\"username\"\n :label=\"t('authentication.nextcloud.modal.username.label')\"\n :help=\"t('authentication.nextcloud.modal.username.help')\"\n autofocus\n required\n ></x-text-field>\n <x-text-field\n v-model=\"password\"\n type=\"password\"\n :label=\"t('authentication.nextcloud.modal.password.label')\"\n :help=\"t('authentication.nextcloud.modal.password.help')\"\n ></x-text-field>\n </x-form>\n </template>\n <template #footer>\n <x-btn variant=\"primary\" type=\"submit\" form=\"nextcloud-login-form\">{{\n t(\"authentication.nextcloud.modal.submit.label\")\n }}</x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped>\n.alerts-wrapper {\n display: flex;\n}\n.alerts {\n flex-grow: 1;\n width: 0;\n}\n</style>\n"],"names":["translations","en","fr","useI18n","messages","authenticationState","inject","NextcloudAuthenticationState","modalOpened","username","password","errorStatus","ref","callback","response","watch","newValue","oldValue","_createBlock","_component_x_dialog","_unref","$event","_createElementVNode","_hoisted_1","_hoisted_2","_component_x_alert","_createVNode","_component_x_form","_component_x_text_field","_component_x_btn"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAuBMA,IAAe;AAAA,EACnB,IAAAC;AAAA,EACA,IAAAC;AACF;;;ACEA,UAAM,EAAE,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAIKC,IAFUC,EAAmB,SAAS,EAGzC,aAAA,EACA,IAAkCC,CAA4B,GAC3DC,IAA4BH,EAAoB,aAChDI,IAAwBJ,EAAoB,UAC5CK,IAAwBL,EAAoB,UAC5CM,IAAuCC,EAAI,MAAS;AAE1D,mBAAeC,IAAW;AACxB,YAAMC,IAAW,MAAMT,EAAoB,SAAA;AAC3C,MAAKS,EAAS,YACZH,EAAY,QAAQG,EAAS;AAAA,IAEjC;AAEA,WAAAC;AAAA,MACEV,EAAoB;AAAA,MACpB,OAAOW,GAAmBC,MAAsB;AAC9C,QAAID,KAAY,CAACC,MACfZ,EAAoB,SAAS,QAAQ,IACrCA,EAAoB,SAAS,QAAQ,IACrCM,EAAY,QAAQ;AAAA,MAExB;AAAA,IAAA;;kBAKAO,EA4CWC,GAAA;AAAA,oBA3CAC,EAAAZ,CAAA;AAAA,6DAAAA,EAAW,QAAAa,IAAA;AAAA,QACpB,OAAM;AAAA,QACL,OAAOD,EAAA,CAAA,EAAC,sCAAA;AAAA,MAAA;QAEE,WAIT,MAaM;AAAA,UAbNE,EAaM,OAbNC,GAaM;AAAA,YAZJD,EAWM,OAXNE,GAWM;AAAA,cAVWb,EAAA,UAAW,YAA1BO,EAEUO,GAAA;AAAA;gBAF0B,MAAK;AAAA,cAAA;2BACvC,MAAuD;AAAA,sBAApDL,EAAA,CAAA,EAAC,8CAAA,CAAA,GAAA,CAAA;AAAA,gBAAA;;oBAEcT,EAAA,UAAgB,eAApCO,EAMUO,GAAA;AAAA;gBANqC,MAAK;AAAA,cAAA;2BAClD,MAIE;AAAA,sBAHAL,EAAA,CAAA,EAAC,gDAAA;AAAA,4BAA2ET,EAAA;AAAA,kBAAA;;;;;;UAOpFe,EAcSC,GAAA;AAAA,YAdD,IAAG;AAAA,YAAwB,UAAQd;AAAA,UAAA;uBACzC,MAMgB;AAAA,cANhBa,EAMgBE,GAAA;AAAA,4BALLR,EAAAX,CAAA;AAAA,qEAAAA,EAAQ,QAAAY,IAAA;AAAA,gBAChB,OAAOD,EAAA,CAAA,EAAC,+CAAA;AAAA,gBACR,MAAMA,EAAA,CAAA,EAAC,8CAAA;AAAA,gBACR,WAAA;AAAA,gBACA,UAAA;AAAA,cAAA;cAEFM,EAKgBE,GAAA;AAAA,4BAJLR,EAAAV,CAAA;AAAA,qEAAAA,EAAQ,QAAAW,IAAA;AAAA,gBACjB,MAAK;AAAA,gBACJ,OAAOD,EAAA,CAAA,EAAC,+CAAA;AAAA,gBACR,MAAMA,EAAA,CAAA,EAAC,8CAAA;AAAA,cAAA;;;;;QAIH,UACT,MAEU;AAAA,UAFVM,EAEUG,GAAA;AAAA,YAFH,SAAQ;AAAA,YAAU,MAAK;AAAA,YAAS,MAAK;AAAA,UAAA;uBAAuB,MAEjE;AAAA,kBADAT,EAAA,CAAA,EAAC,6CAAA,CAAA,GAAA,CAAA;AAAA,YAAA;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UIExtension } from '@xwiki/cristal-uiextension-api';
|
|
2
|
+
import { AuthenticationManagerProvider } from '@xwiki/platform-authentication-api';
|
|
3
|
+
import { Component } from 'vue';
|
|
4
|
+
/**
|
|
5
|
+
* Login {@link UIExtension} for the Nextcloud backend.
|
|
6
|
+
*
|
|
7
|
+
* @since 0.16
|
|
8
|
+
* @beta
|
|
9
|
+
*/
|
|
10
|
+
export declare class NextcloudLoginMenuUIExtension implements UIExtension {
|
|
11
|
+
private authenticationManager;
|
|
12
|
+
id: string;
|
|
13
|
+
uixpName: string;
|
|
14
|
+
order: number;
|
|
15
|
+
parameters: {};
|
|
16
|
+
constructor(authenticationManager: AuthenticationManagerProvider);
|
|
17
|
+
component(): Promise<Component>;
|
|
18
|
+
enabled(): Promise<boolean>;
|
|
19
|
+
}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".alerts-wrapper[data-v-65826e44]{display:flex}.alerts[data-v-65826e44]{flex-grow:1;width:0}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { injectable as s, inject as u } from "inversify";
|
|
3
|
+
var d = Object.getOwnPropertyDescriptor, l = (t, e, i, n) => {
|
|
4
|
+
for (var a = n > 1 ? void 0 : n ? d(e, i) : e, r = t.length - 1, c; r >= 0; r--)
|
|
5
|
+
(c = t[r]) && (a = c(a) || a);
|
|
6
|
+
return a;
|
|
7
|
+
}, g = (t, e) => (i, n) => e(i, n, t);
|
|
8
|
+
let o = class {
|
|
9
|
+
constructor(t) {
|
|
10
|
+
this.authenticationManager = t;
|
|
11
|
+
}
|
|
12
|
+
id = "sidebar.actions.nextcloudLoginMenu";
|
|
13
|
+
uixpName = "sidebar.actions";
|
|
14
|
+
order = 2100;
|
|
15
|
+
parameters = {};
|
|
16
|
+
async component() {
|
|
17
|
+
return (await import("./NextcloudLoginMenu-BhEWp9P3.js")).default;
|
|
18
|
+
}
|
|
19
|
+
async enabled() {
|
|
20
|
+
return !await this.authenticationManager.get()?.isAuthenticated();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
o = l([
|
|
24
|
+
s(),
|
|
25
|
+
g(0, u("AuthenticationManagerProvider"))
|
|
26
|
+
], o);
|
|
27
|
+
class p {
|
|
28
|
+
constructor(e) {
|
|
29
|
+
e.bind("UIExtension").to(o).inSingletonScope();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
p as ComponentInit
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/NextcloudLoginMenuUIExtension.ts","../src/index.ts"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { inject, injectable } from \"inversify\";\nimport type { UIExtension } from \"@xwiki/cristal-uiextension-api\";\nimport type {\n AuthenticationManager,\n AuthenticationManagerProvider,\n} from \"@xwiki/platform-authentication-api\";\nimport type { Component } from \"vue\";\n\n/**\n * Login {@link UIExtension} for the Nextcloud backend.\n *\n * @since 0.16\n * @beta\n */\n@injectable()\nexport class NextcloudLoginMenuUIExtension implements UIExtension {\n id = \"sidebar.actions.nextcloudLoginMenu\";\n uixpName = \"sidebar.actions\";\n order = 2100;\n parameters = {};\n\n constructor(\n @inject(\"AuthenticationManagerProvider\")\n private authenticationManager: AuthenticationManagerProvider,\n ) {}\n\n async component(): Promise<Component> {\n return (await import(\"./vue/NextcloudLoginMenu.vue\")).default;\n }\n\n async enabled(): Promise<boolean> {\n const authenticationManager: AuthenticationManager =\n this.authenticationManager.get()!;\n const authenticated: boolean =\n await authenticationManager?.isAuthenticated();\n return !authenticated;\n }\n}\n","/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { NextcloudLoginMenuUIExtension } from \"./NextcloudLoginMenuUIExtension\";\nimport { Container } from \"inversify\";\nimport type { UIExtension } from \"@xwiki/cristal-uiextension-api\";\n\n/**\n * @beta\n */\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<UIExtension>(\"UIExtension\")\n .to(NextcloudLoginMenuUIExtension)\n .inSingletonScope();\n }\n}\n"],"names":["NextcloudLoginMenuUIExtension","authenticationManager","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":";;;;;;AAmCO,IAAMA,IAAN,MAA2D;AAAA,EAMhE,YAEUC,GACR;AADQ,SAAA,wBAAAA;AAAA,EACP;AAAA,EARH,KAAK;AAAA,EACL,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,aAAa,CAAA;AAAA,EAOb,MAAM,YAAgC;AACpC,YAAQ,MAAM,OAAO,kCAA8B,GAAG;AAAA,EACxD;AAAA,EAEA,MAAM,UAA4B;AAKhC,WAAO,CADL,MAFA,KAAK,sBAAsB,IAAA,GAEE,gBAAA;AAAA,EAEjC;AACF;AAtBaD,IAANE,EAAA;AAAA,EADNC,EAAA;AAAA,EAQIC,OAAO,+BAA+B,CAAA;AAAA,GAP9BJ,CAAA;ACRN,MAAMK,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EACG,KAAkB,aAAa,EAC/B,GAAGN,CAA6B,EAChC,iBAAA;AAAA,EACL;AACF;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".alerts-wrapper[data-v-65826e44]{display:flex}.alerts[data-v-65826e44]{flex-grow:1;width:0}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
(function(a,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("inversify"),require("vue"),require("@xwiki/cristal-authentication-nextcloud-state"),require("vue-i18n")):typeof define=="function"&&define.amd?define(["exports","inversify","vue","@xwiki/cristal-authentication-nextcloud-state","vue-i18n"],c):(a=typeof globalThis<"u"?globalThis:a||self,c(a["cristal_authentication-nextcloud-ui"]={},a.inversify,a.Vue,a.cristalAuthenticationNextcloudState,a.vueI18n))})(this,(function(a,c,e,w,g){"use strict";var h=document.createElement("style");h.textContent=`.alerts-wrapper[data-v-65826e44]{display:flex}.alerts[data-v-65826e44]{flex-grow:1;width:0}
|
|
3
|
+
/*$vite$:1*/`,document.head.appendChild(h);var b=Object.getOwnPropertyDescriptor,y=(o,t,r,n)=>{for(var i=n>1?void 0:n?b(t,r):t,s=o.length-1,d;s>=0;s--)(d=o[s])&&(i=d(i)||i);return i},N=(o,t)=>(r,n)=>t(r,n,o);let x=class{constructor(o){this.authenticationManager=o}id="sidebar.actions.nextcloudLoginMenu";uixpName="sidebar.actions";order=2100;parameters={};async component(){return(await Promise.resolve().then(()=>k)).default}async enabled(){return!await this.authenticationManager.get()?.isAuthenticated()}};x=y([c.injectable(),N(0,c.inject("AuthenticationManagerProvider"))],x);class C{constructor(t){t.bind("UIExtension").to(x).inSingletonScope()}}const V={en:{"authentication.nextcloud.modal.title":"Nextcloud Login","authentication.nextcloud.modal.username.label":"Username","authentication.nextcloud.modal.username.help":"Enter your username.","authentication.nextcloud.modal.password.label":"Password","authentication.nextcloud.modal.password.help":"It is not recommended to enter your own personal password, you should enter a specific application password instead.","authentication.nextcloud.modal.submit.label":"Log-in","authentication.nextcloud.modal.error.invalid":"Invalid username or password.","authentication.nextcloud.modal.error.generic":"Login check failed. Response status: {status}."},fr:{"authentication.nextcloud.modal.title":"Connexion à Nextcloud","authentication.nextcloud.modal.username.label":"Nom d'utilisateur","authentication.nextcloud.modal.username.help":"Saisissez votre nom d'utilisateur.","authentication.nextcloud.modal.password.label":"Mot de passe","authentication.nextcloud.modal.password.help":"Il n'est pas recommandé de saisir votre mot de passe personnel, vous devriez saisir un mot de passe d'application à la place.","authentication.nextcloud.modal.submit.label":"Se connecter","authentication.nextcloud.modal.error.invalid":"Nom d'utilisateur ou mot de passe non valide.","authentication.nextcloud.modal.error.generic":"Échec d’authentification. Statut de la réponse : {status}."}},S={class:"alerts-wrapper"},M={class:"alerts"},k=Object.freeze(Object.defineProperty({__proto__:null,default:((o,t)=>{const r=o.__vccOpts||o;for(const[n,i]of t)r[n]=i;return r})(e.defineComponent({__name:"NextcloudLoginMenu",setup(o){const{t}=g.useI18n({messages:V}),n=e.inject("cristal").getContainer().get(w.NextcloudAuthenticationState),i=n.modalOpened,s=n.username,d=n.password,u=e.ref(void 0);async function I(){const m=await n.callback();m.success||(u.value=m.status)}return e.watch(n.modalOpened,async(m,l)=>{m&&!l&&(n.username.value="",n.password.value="",u.value=void 0)}),(m,l)=>{const f=e.resolveComponent("x-alert"),_=e.resolveComponent("x-text-field"),O=e.resolveComponent("x-form"),L=e.resolveComponent("x-btn"),j=e.resolveComponent("x-dialog");return e.openBlock(),e.createBlock(j,{modelValue:e.unref(i),"onUpdate:modelValue":l[2]||(l[2]=p=>e.isRef(i)?i.value=p:null),width:"auto",title:e.unref(t)("authentication.nextcloud.modal.title")},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createElementVNode("div",M,[u.value===401?(e.openBlock(),e.createBlock(f,{key:0,type:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("authentication.nextcloud.modal.error.invalid")),1)]),_:1})):u.value!==void 0?(e.openBlock(),e.createBlock(f,{key:1,type:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("authentication.nextcloud.modal.error.generic",{status:u.value})),1)]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(O,{id:"nextcloud-login-form",onSubmit:I},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(s),"onUpdate:modelValue":l[0]||(l[0]=p=>e.isRef(s)?s.value=p:null),label:e.unref(t)("authentication.nextcloud.modal.username.label"),help:e.unref(t)("authentication.nextcloud.modal.username.help"),autofocus:"",required:""},null,8,["modelValue","label","help"]),e.createVNode(_,{modelValue:e.unref(d),"onUpdate:modelValue":l[1]||(l[1]=p=>e.isRef(d)?d.value=p:null),type:"password",label:e.unref(t)("authentication.nextcloud.modal.password.label"),help:e.unref(t)("authentication.nextcloud.modal.password.help")},null,8,["modelValue","label","help"])]),_:1})]),footer:e.withCtx(()=>[e.createVNode(L,{variant:"primary",type:"submit",form:"nextcloud-login-form"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("authentication.nextcloud.modal.submit.label")),1)]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-65826e44"]])},Symbol.toStringTag,{value:"Module"}));a.ComponentInit=C,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
|
|
4
|
+
//# sourceMappingURL=index.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/NextcloudLoginMenuUIExtension.ts","../src/index.ts","../src/translations.ts","../src/vue/NextcloudLoginMenu.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { inject, injectable } from \"inversify\";\nimport type { UIExtension } from \"@xwiki/cristal-uiextension-api\";\nimport type {\n AuthenticationManager,\n AuthenticationManagerProvider,\n} from \"@xwiki/platform-authentication-api\";\nimport type { Component } from \"vue\";\n\n/**\n * Login {@link UIExtension} for the Nextcloud backend.\n *\n * @since 0.16\n * @beta\n */\n@injectable()\nexport class NextcloudLoginMenuUIExtension implements UIExtension {\n id = \"sidebar.actions.nextcloudLoginMenu\";\n uixpName = \"sidebar.actions\";\n order = 2100;\n parameters = {};\n\n constructor(\n @inject(\"AuthenticationManagerProvider\")\n private authenticationManager: AuthenticationManagerProvider,\n ) {}\n\n async component(): Promise<Component> {\n return (await import(\"./vue/NextcloudLoginMenu.vue\")).default;\n }\n\n async enabled(): Promise<boolean> {\n const authenticationManager: AuthenticationManager =\n this.authenticationManager.get()!;\n const authenticated: boolean =\n await authenticationManager?.isAuthenticated();\n return !authenticated;\n }\n}\n","/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { NextcloudLoginMenuUIExtension } from \"./NextcloudLoginMenuUIExtension\";\nimport { Container } from \"inversify\";\nimport type { UIExtension } from \"@xwiki/cristal-uiextension-api\";\n\n/**\n * @beta\n */\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<UIExtension>(\"UIExtension\")\n .to(NextcloudLoginMenuUIExtension)\n .inSingletonScope();\n }\n}\n","/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport en from \"../langs/translation-en.json\";\nimport fr from \"../langs/translation-fr.json\";\n\nconst translations = {\n en,\n fr,\n};\nexport default translations;\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport messages from \"../translations\";\nimport { NextcloudAuthenticationState } from \"@xwiki/cristal-authentication-nextcloud-state\";\nimport { inject, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst authenticationState = cristal\n .getContainer()\n .get<NextcloudAuthenticationState>(NextcloudAuthenticationState);\nconst modalOpened: Ref<boolean> = authenticationState.modalOpened;\nconst username: Ref<string> = authenticationState.username;\nconst password: Ref<string> = authenticationState.password;\nconst errorStatus: Ref<number | undefined> = ref(undefined);\n\nasync function callback() {\n const response = await authenticationState.callback();\n if (!response.success) {\n errorStatus.value = response.status;\n }\n}\n\nwatch(\n authenticationState.modalOpened,\n async (newValue: boolean, oldValue: boolean) => {\n if (newValue && !oldValue) {\n authenticationState.username.value = \"\";\n authenticationState.password.value = \"\";\n errorStatus.value = undefined;\n }\n },\n);\n</script>\n\n<template>\n <x-dialog\n v-model=\"modalOpened\"\n width=\"auto\"\n :title=\"t('authentication.nextcloud.modal.title')\"\n >\n <template #default>\n <!-- We need 2 different divs to implement the following behavior:\n - Use max available width from the parent\n - Do not resize the parent if the content is larger -->\n <div class=\"alerts-wrapper\">\n <div class=\"alerts\">\n <x-alert v-if=\"errorStatus === 401\" type=\"error\">\n {{ t(\"authentication.nextcloud.modal.error.invalid\") }}\n </x-alert>\n <x-alert v-else-if=\"errorStatus !== undefined\" type=\"error\">\n {{\n t(\"authentication.nextcloud.modal.error.generic\", {\n status: errorStatus,\n })\n }}\n </x-alert>\n </div>\n </div>\n <x-form id=\"nextcloud-login-form\" @submit=\"callback\">\n <x-text-field\n v-model=\"username\"\n :label=\"t('authentication.nextcloud.modal.username.label')\"\n :help=\"t('authentication.nextcloud.modal.username.help')\"\n autofocus\n required\n ></x-text-field>\n <x-text-field\n v-model=\"password\"\n type=\"password\"\n :label=\"t('authentication.nextcloud.modal.password.label')\"\n :help=\"t('authentication.nextcloud.modal.password.help')\"\n ></x-text-field>\n </x-form>\n </template>\n <template #footer>\n <x-btn variant=\"primary\" type=\"submit\" form=\"nextcloud-login-form\">{{\n t(\"authentication.nextcloud.modal.submit.label\")\n }}</x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped>\n.alerts-wrapper {\n display: flex;\n}\n.alerts {\n flex-grow: 1;\n width: 0;\n}\n</style>\n"],"names":["NextcloudLoginMenuUIExtension","authenticationManager","NextcloudLoginMenu$1","__decorateClass","injectable","__decorateParam","ComponentInit","container","translations","useI18n","messages","authenticationState","inject","NextcloudAuthenticationState","modalOpened","username","password","errorStatus","ref","callback","response","watch","newValue","oldValue","_createBlock","_component_x_dialog","_unref","$event","_createElementVNode","_hoisted_1","_hoisted_2","_component_x_alert","_createVNode","_component_x_form","_component_x_text_field","_component_x_btn"],"mappings":";gNAmCO,IAAMA,EAAN,KAA2D,CAMhE,YAEUC,EACR,CADQ,KAAA,sBAAAA,CACP,CARH,GAAK,qCACL,SAAW,kBACX,MAAQ,KACR,WAAa,CAAA,EAOb,MAAM,WAAgC,CACpC,OAAQ,MAAM,QAAA,QAAA,EAAA,KAAA,IAAAC,CAAA,GAAwC,OACxD,CAEA,MAAM,SAA4B,CAKhC,MAAO,CADL,MAFA,KAAK,sBAAsB,IAAA,GAEE,gBAAA,CAEjC,CACF,EAtBaF,EAANG,EAAA,CADNC,aAAA,EAQIC,aAAO,+BAA+B,CAAA,CAAA,EAP9BL,CAAA,ECRN,MAAMM,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EACG,KAAkB,aAAa,EAC/B,GAAGP,CAA6B,EAChC,iBAAA,CACL,CACF,CCXA,MAAMQ,EAAe,CACnB,soBACA,itBACF,2OCEA,KAAM,CAAE,CAAA,EAAMC,UAAQ,CAAA,SACpBC,CAAA,CACD,EAIKC,EAFUC,EAAAA,OAAmB,SAAS,EAGzC,aAAA,EACA,IAAkCC,EAAAA,4BAA4B,EAC3DC,EAA4BH,EAAoB,YAChDI,EAAwBJ,EAAoB,SAC5CK,EAAwBL,EAAoB,SAC5CM,EAAuCC,EAAAA,IAAI,MAAS,EAE1D,eAAeC,GAAW,CACxB,MAAMC,EAAW,MAAMT,EAAoB,SAAA,EACtCS,EAAS,UACZH,EAAY,MAAQG,EAAS,OAEjC,CAEAC,OAAAA,EAAAA,MACEV,EAAoB,YACpB,MAAOW,EAAmBC,IAAsB,CAC1CD,GAAY,CAACC,IACfZ,EAAoB,SAAS,MAAQ,GACrCA,EAAoB,SAAS,MAAQ,GACrCM,EAAY,MAAQ,OAExB,CAAA,wMAKAO,EAAAA,YA4CWC,EAAA,YA3CAC,EAAAA,MAAAZ,CAAA,kDAAAA,EAAW,MAAAa,EAAA,MACpB,MAAM,OACL,MAAOD,EAAAA,MAAA,CAAA,EAAC,sCAAA,CAAA,GAEE,kBAIT,IAaM,CAbNE,EAAAA,mBAaM,MAbNC,EAaM,CAZJD,EAAAA,mBAWM,MAXNE,EAWM,CAVWb,EAAA,QAAW,mBAA1BO,EAAAA,YAEUO,EAAA,OAF0B,KAAK,OAAA,qBACvC,IAAuD,qCAApDL,EAAAA,MAAA,CAAA,EAAC,8CAAA,CAAA,EAAA,CAAA,CAAA,UAEcT,EAAA,QAAgB,sBAApCO,EAAAA,YAMUO,EAAA,OANqC,KAAK,OAAA,qBAClD,IAIE,qCAHAL,EAAAA,MAAA,CAAA,EAAC,+CAAA,QAA2ET,EAAA,KAAA,gDAOpFe,EAAAA,YAcSC,EAAA,CAdD,GAAG,uBAAwB,SAAQd,CAAA,qBACzC,IAMgB,CANhBa,EAAAA,YAMgBE,EAAA,YALLR,EAAAA,MAAAX,CAAA,kDAAAA,EAAQ,MAAAY,EAAA,MAChB,MAAOD,EAAAA,MAAA,CAAA,EAAC,+CAAA,EACR,KAAMA,EAAAA,MAAA,CAAA,EAAC,8CAAA,EACR,UAAA,GACA,SAAA,EAAA,wCAEFM,EAAAA,YAKgBE,EAAA,YAJLR,EAAAA,MAAAV,CAAA,kDAAAA,EAAQ,MAAAW,EAAA,MACjB,KAAK,WACJ,MAAOD,EAAAA,MAAA,CAAA,EAAC,+CAAA,EACR,KAAMA,EAAAA,MAAA,CAAA,EAAC,8CAAA,CAAA,kDAIH,iBACT,IAEU,CAFVM,EAAAA,YAEUG,EAAA,CAFH,QAAQ,UAAU,KAAK,SAAS,KAAK,sBAAA,qBAAuB,IAEjE,qCADAT,EAAAA,MAAA,CAAA,EAAC,6CAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
20
|
+
declare const translations: {
|
|
21
|
+
en: {
|
|
22
|
+
"authentication.nextcloud.modal.title": string;
|
|
23
|
+
"authentication.nextcloud.modal.username.label": string;
|
|
24
|
+
"authentication.nextcloud.modal.username.help": string;
|
|
25
|
+
"authentication.nextcloud.modal.password.label": string;
|
|
26
|
+
"authentication.nextcloud.modal.password.help": string;
|
|
27
|
+
"authentication.nextcloud.modal.submit.label": string;
|
|
28
|
+
"authentication.nextcloud.modal.error.invalid": string;
|
|
29
|
+
"authentication.nextcloud.modal.error.generic": string;
|
|
30
|
+
};
|
|
31
|
+
fr: {
|
|
32
|
+
"authentication.nextcloud.modal.title": string;
|
|
33
|
+
"authentication.nextcloud.modal.username.label": string;
|
|
34
|
+
"authentication.nextcloud.modal.username.help": string;
|
|
35
|
+
"authentication.nextcloud.modal.password.label": string;
|
|
36
|
+
"authentication.nextcloud.modal.password.help": string;
|
|
37
|
+
"authentication.nextcloud.modal.submit.label": string;
|
|
38
|
+
"authentication.nextcloud.modal.error.invalid": string;
|
|
39
|
+
"authentication.nextcloud.modal.error.generic": string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default translations;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"authentication.nextcloud.modal.title": "Вхід через Nextcloud",
|
|
3
|
+
"authentication.nextcloud.modal.username.label": "Ім'я користувача",
|
|
4
|
+
"authentication.nextcloud.modal.username.help": "Введіть ваше ім'я користувача.",
|
|
5
|
+
"authentication.nextcloud.modal.password.label": "Пароль",
|
|
6
|
+
"authentication.nextcloud.modal.password.help": "Не рекомендується вводити власний особистий пароль; натомість слід використовувати окремий пароль для програми.",
|
|
7
|
+
"authentication.nextcloud.modal.submit.label": "Увійти",
|
|
8
|
+
"authentication.nextcloud.modal.error.invalid": "Неправильне ім'я користувача або пароль.",
|
|
9
|
+
"authentication.nextcloud.modal.error.generic": "Не вдалося перевірити вхід. Статус відповіді: {status}."
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-authentication-nextcloud-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"main": "./dist/index.es.js",
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@xwiki/platform-api": "18.
|
|
32
|
-
"@xwiki/platform-authentication-api": "18.
|
|
33
|
-
"vue-i18n": "11.
|
|
34
|
-
"@xwiki/cristal-authentication-nextcloud-state": "1.
|
|
35
|
-
"@xwiki/cristal-uiextension-api": "1.
|
|
31
|
+
"@xwiki/platform-api": "18.6.0",
|
|
32
|
+
"@xwiki/platform-authentication-api": "18.6.0",
|
|
33
|
+
"vue-i18n": "11.4.4",
|
|
34
|
+
"@xwiki/cristal-authentication-nextcloud-state": "1.6.0",
|
|
35
|
+
"@xwiki/cristal-uiextension-api": "1.6.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"inversify": "8.x",
|
|
@@ -40,17 +40,19 @@
|
|
|
40
40
|
"vue": "3.x"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@vue/test-utils": "2.4.
|
|
44
|
-
"@xwiki/platform-dsapi": "18.
|
|
45
|
-
"
|
|
43
|
+
"@vue/test-utils": "2.4.11",
|
|
44
|
+
"@xwiki/platform-dsapi": "18.6.0",
|
|
45
|
+
"@xwiki/platform-tool-apiextractorconfig": "18.6.0",
|
|
46
|
+
"@xwiki/platform-tool-tsconfig": "18.6.0",
|
|
47
|
+
"inversify": "8.1.1",
|
|
46
48
|
"reflect-metadata": "0.2.2",
|
|
47
49
|
"typescript": "5.9.3",
|
|
48
|
-
"vite": "7.3.
|
|
50
|
+
"vite": "7.3.5",
|
|
49
51
|
"vitest": "4.1.6",
|
|
50
|
-
"vue": "3.5.
|
|
51
|
-
"vue-tsc": "3.
|
|
52
|
-
"@xwiki/cristal-dev-config": "1.
|
|
53
|
-
"@xwiki/cristal-dev-test-utils": "1.
|
|
52
|
+
"vue": "3.5.38",
|
|
53
|
+
"vue-tsc": "3.3.4",
|
|
54
|
+
"@xwiki/cristal-dev-config": "1.6.0",
|
|
55
|
+
"@xwiki/cristal-dev-test-utils": "1.6.0"
|
|
54
56
|
},
|
|
55
57
|
"scripts": {
|
|
56
58
|
"api-extractor:local": "api-extractor run --local",
|