@nside/wefa 0.1.0 → 0.3.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/dist/{LegalConsent-Cn3qx30k.cjs → LegalConsent-CEcXZml6.cjs} +1 -1
- package/dist/{LegalConsent-pUADprVB.js → LegalConsent-Dzq3fdnt.js} +6 -6
- package/dist/{LegalDocument-BHtPY9AH.js → LegalDocument-BhoEpJ2O.js} +282 -255
- package/dist/LegalDocument-CS3MnOcV.cjs +109 -0
- package/dist/{LoginView-CMR9q_yi.cjs → LoginView-IIkXXw3R.cjs} +1 -1
- package/dist/{LoginView-C668oczA.js → LoginView-kH440cCh.js} +1 -1
- package/dist/{LogoutView-CzsPB9d9.cjs → LogoutView-B90MA-_Q.cjs} +1 -1
- package/dist/{LogoutView-DNgS20XP.js → LogoutView-DGqh4bP7.js} +1 -1
- package/dist/{apiClient-BAzNCKuU.js → apiClient-D-kcx_S1.js} +260 -232
- package/dist/apiClient-DJdAL3tN.cjs +1 -0
- package/dist/{axios-C7yNV7KF.js → axios-ClRPr3Xn.js} +158 -140
- package/dist/{axios-BompFBxL.cjs → axios-Dcidtc2l.cjs} +6 -6
- package/dist/containers.cjs +5 -5
- package/dist/containers.js +5 -5
- package/dist/{index-D7KjmN8m.cjs → index-B4vneBZh.cjs} +3 -3
- package/dist/{index-yOMKz8lD.cjs → index-B53YL3vD.cjs} +1 -1
- package/dist/{index-52nB-rKK.cjs → index-BSfhC_wu.cjs} +1 -1
- package/dist/{index-CeYaMyhs.cjs → index-BXrnPbjr.cjs} +3 -3
- package/dist/{index-CowW14sC.js → index-Bc699sOR.js} +906 -918
- package/dist/{index-BqxW11im.cjs → index-Bl3JVLei.cjs} +1 -1
- package/dist/{index--nRVi6aV.js → index-CEz0St1t.js} +7 -7
- package/dist/{index-DDCFRGsr.cjs → index-CJmnkrIs.cjs} +1 -1
- package/dist/{index-9kXqZ0Ez.cjs → index-CL_OJMNr.cjs} +1 -1
- package/dist/index-CTNsucOq.cjs +147 -0
- package/dist/{index-Dd7rSEka.js → index-Coos428-.js} +163 -174
- package/dist/{index-B-o2K-Ca.js → index-CwLAV8WF.js} +2 -2
- package/dist/{index-CowF3j5a.js → index-DGvdYnh3.js} +2 -2
- package/dist/{index-BVwluHCk.js → index-Dj5oTSEE.js} +22 -26
- package/dist/{index-BctaqoUB.js → index-DmVIgb18.js} +1 -1
- package/dist/{index-jIUtvXF6.js → index-FS8xE7Mo.js} +3 -3
- package/dist/index-FrfvunRp.cjs +146 -0
- package/dist/{index-CXJz1iyq.js → index-bRjoenrr.js} +1 -1
- package/dist/{lib-BEVtXpEW.cjs → lib-BBJH9d11.cjs} +83 -68
- package/dist/{lib-CA1k4S8X.js → lib-Y8FPgwH4.js} +1453 -1432
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +6 -3
- package/dist/lib.js +2 -2
- package/dist/{libRoutes-BJftOROB.js → libRoutes-BsneoQ4G.js} +2 -2
- package/dist/{libRoutes-CZNbtm5j.cjs → libRoutes-BzeZrIaK.cjs} +1 -1
- package/dist/network.cjs +1 -1
- package/dist/network.d.ts +5 -4
- package/dist/network.js +14 -14
- package/dist/router.cjs +1 -1
- package/dist/router.js +1 -1
- package/package.json +47 -46
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.mdx +182 -108
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.spec.ts +24 -17
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.stories.ts +99 -36
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.vue +18 -10
- package/src/components/TableComponent/TableComponent.spec.ts +0 -1
- package/src/demo/openapi/client/types.gen.ts +4 -3
- package/src/network/__tests__/typedApiClient.test.ts +9 -0
- package/src/network/network.mdx +8 -1
- package/src/network/typedApiClient.ts +8 -6
- package/src/plugins/legalConsent/views/__tests__/LegalConsent.test.ts +9 -4
- package/src/utils/componentRegistry.ts +0 -1
- package/dist/LegalDocument-CU8uyoKh.cjs +0 -110
- package/dist/apiClient-B6fJs4NI.cjs +0 -1
- package/dist/index-BCKqvrXF.cjs +0 -157
- package/dist/index-TM4WIzFN.cjs +0 -163
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),v=require("./lib-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),v=require("./lib-BBJH9d11.cjs"),T=require("./index-BSfhC_wu.cjs"),k=require("pinia"),c=require("./axios-Dcidtc2l.cjs"),V=require("./index-CTNsucOq.cjs");var P=Symbol();function I(){var t=e.inject(P);if(!t)throw new Error("No PrimeVue Toast provided!");return t}var A=Symbol();function N(){var t=e.inject(A);if(!t)throw new Error("No PrimeVue Confirmation provided!");return t}const R=k.createPinia(),_="authenticationToken",y="jwtAccessToken",x="jwtRefreshToken",L=(t,o=null)=>C(t)(o),C=t=>k.defineStore("backend",()=>j(t));function j(t){switch(t.authenticationType){case"TOKEN":return E();case"JWT":return q();default:throw new Error(`Unknown authentication type: ${t.authenticationType}`)}}function b(t,o,r){let l=null;function i(n){o.value=n}function d(n){r.value=n}function f(n){l=e.watch(t,(p,h)=>{p!=h&&n.push({path:n.currentRoute.value.path,force:!0}).then(()=>{})})}function a(){l&&l()}return{setPostLogin:i,setPostLogout:d,setupAuthRouteGuard:f,unsetAuthRouteGuard:a,authRouteGuardWatcher:l}}function E(){const t=e.ref(!1),o=e.ref(null),r=e.ref(()=>{}),l=e.ref(()=>{}),i=localStorage.getItem(_),d=b(t,l,r);i&&(o.value=i,t.value=!0),e.watch(o,()=>{localStorage.setItem(_,o.value??"")}),c.axiosInstance.defaults.withCredentials=!0,c.axiosInstance.defaults.headers.common["Content-Type"]="application/json",c.axiosInstance.interceptors.request.use(async n=>(t.value&&o.value&&(n.headers.Authorization=`Token ${o.value}`),n),n=>Promise.reject(n)),c.axiosInstance.interceptors.response.use(n=>n,async n=>(n.response.status===403&&n.response.data?.detail==="Authentication credentials were not provided."&&a(),Promise.reject(n)));async function f(n){const p=await c.axiosInstance.post("/api/token-auth/",n);return p.status===200&&(t.value=!0,o.value=p.data.token),l.value(),p}function a(){localStorage.removeItem(_),t.value=!1,o.value=null,r.value()}return{axiosInstance:c.axiosInstance,authenticated:t,login:f,logout:a,setPostLogin:d.setPostLogin,setPostLogout:d.setPostLogout,setupAuthRouteGuard:d.setupAuthRouteGuard,unsetAuthRouteGuard:d.unsetAuthRouteGuard}}function q(){const t=e.ref(!1),o=e.ref(null),r=e.ref(null),l=e.ref(()=>{}),i=e.ref(()=>{}),d=localStorage.getItem(y),f=localStorage.getItem(x),a="/api/token/refresh/",n=b(t,i,l);d&&f&&(o.value=d,r.value=f,t.value=!0),e.watch(o,()=>{localStorage.setItem(y,o.value??"")}),e.watch(r,()=>{localStorage.setItem(x,r.value??"")}),c.axiosInstance.defaults.withCredentials=!0,c.axiosInstance.defaults.headers.common["Content-Type"]="application/json",c.axiosInstance.interceptors.request.use(async s=>(t.value&&o.value&&(s.headers.Authorization=`Bearer ${o.value}`),s),s=>Promise.reject(s));function p(s){return!!(s.response&&[401,403].includes(s.response.status)&&(s.response?.data?.code==="token_not_valid"||!o.value||!r.value))}async function h(s){const u=await c.axiosInstance.post(a,{refresh:r.value});if(u.status===200)return o.value=u.data.access,u.data.refresh&&(r.value=u.data.refresh),s.headers.Authorization=`Bearer ${o.value}`,c.axiosInstance(s);throw new Error("Token refresh failed")}c.axiosInstance.interceptors.response.use(s=>s,async s=>{if(!p(s))return Promise.reject(s);const u=s.config;if(!(u.url===a)&&r.value)try{return await h(u)}catch(S){return m(),Promise.reject(S)}else m();return Promise.reject(s)});async function g(s){const u=await c.axiosInstance.post("/api/token/",s);return u.status===200&&(t.value=!0,o.value=u.data.access,r.value=u.data.refresh),i.value(),u}function m(){localStorage.removeItem(y),localStorage.removeItem(x),t.value=!1,o.value=null,r.value=null,l.value()}return{axiosInstance:c.axiosInstance,authenticated:t,login:g,logout:m,setPostLogin:n.setPostLogin,setPostLogout:n.setPostLogout,setupAuthRouteGuard:n.setupAuthRouteGuard,unsetAuthRouteGuard:n.unsetAuthRouteGuard}}const G=L({authenticationType:"TOKEN"},R),B={class:"text-center"},$={class:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-2"},F={class:"space-y-4"},D={class:"text-gray-700 dark:text-gray-300 text-center"},K={class:"text-center space-y-2"},z={class:"flex items-center gap-3 p-3 border border-gray-200 dark:border-gray-700 rounded-lg"},U={for:"consent-checkbox",class:"text-sm text-gray-700 dark:text-gray-300 cursor-pointer"},O={class:"flex gap-3 pt-4"},W=e.defineComponent({__name:"LegalConsent",setup(t){const o=w.useRouter(),r=o.currentRoute.value.redirectedFrom,l=v.useLegalStore(),i=I(),d=N(),f=e.ref(!1),{t:a}=V.useI18nLib(),n=async()=>{try{await l.acceptLegalConsent();const h=r?{path:r.path}:"/";o.push(h).then(()=>{i.add({severity:"success",summary:a("legal_consent.toast_accept_summary"),detail:a("legal_consent.toast_accept_detail"),life:5e3})})}catch(h){console.error("Failed to accept legal consent:",h),i.add({severity:"error",summary:a("legal_consent.error_summary"),detail:a("legal_consent.error_detail"),life:5e3})}},p=()=>{d.require({message:a("legal_consent.confirm_message"),header:a("legal_consent.confirm_header"),icon:"pi pi-exclamation-triangle",rejectProps:{label:a("legal_consent.reject_label"),severity:"secondary",outlined:!0},acceptProps:{label:a("legal_consent.accept_label"),severity:"danger"},accept:()=>{i.add({severity:"warn",summary:a("legal_consent.disconnected_summary"),detail:a("legal_consent.disconnected_detail"),life:5e3}),G.logout()}})};return(h,g)=>{const m=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",null,[e.createVNode(e.unref(T.script),{class:"w-full max-w-md"},{title:e.withCtx(()=>[e.createElementVNode("div",B,[e.createElementVNode("h1",$,e.toDisplayString(e.unref(a)("legal_consent.title")),1)])]),content:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("p",D,e.toDisplayString(e.unref(a)("legal_consent.intro")),1),e.createElementVNode("div",K,[e.createElementVNode("div",null,[e.createVNode(m,{to:"/terms-of-use",class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",target:"_blank"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("legal_consent.terms_of_use")),1)]),_:1})]),e.createElementVNode("div",null,[e.createVNode(m,{to:"/privacy-notice",class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",target:"_blank"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("legal_consent.privacy_notice")),1)]),_:1})])]),e.createElementVNode("div",z,[e.createVNode(e.unref(v.script),{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=s=>f.value=s),"input-id":"consent-checkbox",binary:!0},null,8,["modelValue"]),e.createElementVNode("label",U,e.toDisplayString(e.unref(a)("legal_consent.checkbox_label")),1)]),e.createElementVNode("div",O,[e.createVNode(e.unref(v.script$1),{label:e.unref(a)("legal_consent.accept"),icon:"pi pi-check",disabled:!f.value,class:"flex-1",severity:"success",onClick:n},null,8,["label","disabled"]),e.createVNode(e.unref(v.script$1),{label:e.unref(a)("legal_consent.cancel"),icon:"pi pi-times",severity:"secondary",outlined:"",class:"flex-1",onClick:p},null,8,["label"])])])]),_:1})])}}});exports.default=W;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { inject as L, ref as h, watch as x, defineComponent as C, resolveComponent as V, createElementBlock as G, openBlock as I, createVNode as v, unref as d, withCtx as b, createElementVNode as f, toDisplayString as y, createTextVNode as P } from "vue";
|
|
2
2
|
import { useRouter as E } from "vue-router";
|
|
3
|
-
import { u as B, s as N, b as A } from "./lib-
|
|
4
|
-
import { s as F } from "./index-
|
|
3
|
+
import { u as B, s as N, b as A } from "./lib-Y8FPgwH4.js";
|
|
4
|
+
import { s as F } from "./index-DmVIgb18.js";
|
|
5
5
|
import { createPinia as $, defineStore as q } from "pinia";
|
|
6
|
-
import { a as r } from "./axios-
|
|
7
|
-
import { c as K } from "./index-
|
|
8
|
-
var z = Symbol();
|
|
6
|
+
import { a as r } from "./axios-ClRPr3Xn.js";
|
|
7
|
+
import { c as K } from "./index-Bc699sOR.js";
|
|
8
|
+
var z = /* @__PURE__ */ Symbol();
|
|
9
9
|
function U() {
|
|
10
10
|
var e = L(z);
|
|
11
11
|
if (!e)
|
|
12
12
|
throw new Error("No PrimeVue Toast provided!");
|
|
13
13
|
return e;
|
|
14
14
|
}
|
|
15
|
-
var W = Symbol();
|
|
15
|
+
var W = /* @__PURE__ */ Symbol();
|
|
16
16
|
function D() {
|
|
17
17
|
var e = L(W);
|
|
18
18
|
if (!e)
|