@oslokommune/punkt-vue 12.36.2 → 12.37.1
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/CHANGELOG.md +18 -0
- package/dist/Button-Bm6X0lD8.js +1 -1
- package/dist/Button-D2xQdpZo.cjs +1 -1
- package/dist/punkt-vue-footer.cjs +1 -1
- package/dist/punkt-vue-footer.js +77 -50
- package/dist/punkt-vue-footersimple.cjs +1 -1
- package/dist/punkt-vue-footersimple.js +50 -26
- package/dist/punkt-vue-header.cjs +1 -1
- package/dist/punkt-vue-header.js +2 -2
- package/dist/punkt-vue-loader.cjs +1 -1
- package/dist/punkt-vue-loader.js +1 -1
- package/package.json +5 -5
- package/src/components/footer/Footer.vue +29 -0
- package/src/components/footersimple/FooterSimple.vue +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.37.0](https://github.com/oslokommune/punkt/compare/12.36.2...12.37.0) (2025-05-05)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Ny komponent Consent - innstillinger for informasjonskapsler (#2467).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [12.34.4](https://github.com/oslokommune/punkt/compare/12.34.3...12.34.4) (2025-04-25)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/Button-Bm6X0lD8.js
CHANGED
|
@@ -120,7 +120,7 @@ function _(t, n, e, S, P, r) {
|
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "pkt-btn__icon pkt-btn__spinner",
|
|
122
122
|
name: "spinner-blue",
|
|
123
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
123
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.37/animations/"
|
|
124
124
|
})) : l("", !0),
|
|
125
125
|
e.variant !== "label-only" ? (s(), a(i, {
|
|
126
126
|
key: 1,
|
package/dist/Button-D2xQdpZo.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./Icon-BLNK24NN.cjs"),e=require("vue"),r=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),u={name:"PktButton",components:{PktIcon:o.PktIcon},props:{disabled:{type:Boolean,required:!1,default:!1},iconName:{type:String,required:!1,default:"user"},secondIconName:{type:String,required:!1,default:"user"},size:{type:String,default:"medium",validator:t=>["small","medium","large"].includes(t)},skin:{type:String,default:"primary",validator:t=>["primary","secondary","tertiary"].includes(t)},color:{type:String,validator:t=>["blue","blue-outline","green","green-outline","green-dark","green-dark-outline","beige-light","beige-dark-outline","yellow","yellow-outline","red","red-outline"].includes(t)},text:{type:String,required:!1,default:"Trykk her"},variant:{type:String,default:"label-only",validator:t=>["label-only","icon-left","icon-right","icon-only","icons-right-and-left"].includes(t)},state:{type:String,required:!1,validator:t=>["normal","focus","hover","active"].includes(t)},type:{type:String,default:"button",validator:t=>["button","submit","reset"].includes(t)},isLoading:{type:Boolean,default:!1}},computed:{classes(){return["pkt-btn",this.sizeClass,this.skinClass,this.variantClass,this.colorClass,this.isLoadingClass,this.stateClass]},sizeClass(){return this.size!=="medium"?`pkt-btn--${this.size}`:""},skinClass(){return this.skin!=="primary"?`pkt-btn--${this.skin}`:""},colorClass(){return this.color?`pkt-btn--${this.color}`:""},stateClass(){return this.state?`pkt-btn--${this.state}`:""},variantClass(){return this.variant!=="label-only"?`pkt-btn--${this.variant}`:""},isLoadingClass(){return this.isLoading===!0?"pkt-btn--active":""}}},c=["type","disabled"],d={class:"pkt-btn__text"};function k(t,s,n,p,y,a){const i=e.resolveComponent("PktIcon");return e.openBlock(),e.createElementBlock("button",e.mergeProps(t.$attrs,{type:n.type,class:a.classes,onClick:s[0]||(s[0]=l=>t.$emit("onClick")),onKeyup:s[1]||(s[1]=e.withKeys(l=>t.$emit("onClick"),["enter"])),disabled:n.disabled}),[n.isLoading===!0?(e.openBlock(),e.createBlock(i,{key:0,class:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.
|
|
1
|
+
"use strict";const o=require("./Icon-BLNK24NN.cjs"),e=require("vue"),r=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),u={name:"PktButton",components:{PktIcon:o.PktIcon},props:{disabled:{type:Boolean,required:!1,default:!1},iconName:{type:String,required:!1,default:"user"},secondIconName:{type:String,required:!1,default:"user"},size:{type:String,default:"medium",validator:t=>["small","medium","large"].includes(t)},skin:{type:String,default:"primary",validator:t=>["primary","secondary","tertiary"].includes(t)},color:{type:String,validator:t=>["blue","blue-outline","green","green-outline","green-dark","green-dark-outline","beige-light","beige-dark-outline","yellow","yellow-outline","red","red-outline"].includes(t)},text:{type:String,required:!1,default:"Trykk her"},variant:{type:String,default:"label-only",validator:t=>["label-only","icon-left","icon-right","icon-only","icons-right-and-left"].includes(t)},state:{type:String,required:!1,validator:t=>["normal","focus","hover","active"].includes(t)},type:{type:String,default:"button",validator:t=>["button","submit","reset"].includes(t)},isLoading:{type:Boolean,default:!1}},computed:{classes(){return["pkt-btn",this.sizeClass,this.skinClass,this.variantClass,this.colorClass,this.isLoadingClass,this.stateClass]},sizeClass(){return this.size!=="medium"?`pkt-btn--${this.size}`:""},skinClass(){return this.skin!=="primary"?`pkt-btn--${this.skin}`:""},colorClass(){return this.color?`pkt-btn--${this.color}`:""},stateClass(){return this.state?`pkt-btn--${this.state}`:""},variantClass(){return this.variant!=="label-only"?`pkt-btn--${this.variant}`:""},isLoadingClass(){return this.isLoading===!0?"pkt-btn--active":""}}},c=["type","disabled"],d={class:"pkt-btn__text"};function k(t,s,n,p,y,a){const i=e.resolveComponent("PktIcon");return e.openBlock(),e.createElementBlock("button",e.mergeProps(t.$attrs,{type:n.type,class:a.classes,onClick:s[0]||(s[0]=l=>t.$emit("onClick")),onKeyup:s[1]||(s[1]=e.withKeys(l=>t.$emit("onClick"),["enter"])),disabled:n.disabled}),[n.isLoading===!0?(e.openBlock(),e.createBlock(i,{key:0,class:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.37/animations/"})):e.createCommentVNode("",!0),n.variant!=="label-only"?(e.openBlock(),e.createBlock(i,{key:1,class:"pkt-btn__icon",name:n.iconName},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",d,[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.text),1)])]),n.variant==="icons-right-and-left"?(e.openBlock(),e.createBlock(i,{key:2,class:"pkt-btn__icon",name:n.secondIconName},null,8,["name"])):e.createCommentVNode("",!0)],16,c)}const m=r._export_sfc(u,[["render",k]]);exports.PktButton=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("./Icon-BLNK24NN.cjs");require("@oslokommune/punkt-elements/dist/pkt-consent.js");const e=require("vue"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c=require("./plugins-CMydO4oi.cjs"),m={name:"PktFooter",components:{PktIcon:k.PktIcon},props:{columnOne:{type:Object,required:!0,validator:r=>"title"in r&&(!("links"in r)||Array.isArray(r.links)&&r.links.every(o=>"href"in o&&"text"in o))},columnTwo:{type:Object,required:!0,validator:r=>"title"in r&&(!("links"in r)||Array.isArray(r.links)&&r.links.every(o=>"href"in o&&"text"in o))},socialLinks:{type:Array,description:"Array of social media and language links for the footer",validator:r=>r.every(o=>{if(typeof o=="object"){const t=typeof o.href=="string",s=typeof o.iconName=="string",i=typeof o.language=="string";return t&&(s||i)}return!1}),required:!1},personvernOgInfoLink:{type:String,default:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",required:!1},tilgjengelighetLink:{type:String,default:"https://www.oslo.kommune.no/tilgjengelighet/",required:!1},openLinksInNewTab:{type:Boolean,default:!1,required:!1},includeConsent:{type:Boolean,default:!1,required:!1},googleAnalyticsId:{type:String,default:null,required:!1},hotjarId:{type:String,default:null,required:!1}}},p={class:"pkt-footer","data-mode":"dark"},u={class:"pkt-footer__container"},g={class:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16"},h={class:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up"},N={class:"pkt-footer__title"},y={class:"pkt-footer__list"},b={key:0,class:"pkt-footer__text"},I=["href","target","rel"],V={class:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up"},E={class:"pkt-footer__title"},T={class:"pkt-footer__list"},w=["href","target","rel"],B={class:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up"},L={class:"pkt-footer__list"},v={class:"pkt-footer__list-item"},x=["href","target","rel"],j={class:"pkt-footer__list-item"},q=["href","target","rel"],C={class:"pkt-footer__list-item"},S=["googleAnalyticsId","hotjarId"],O={key:0,class:"pkt-footer__social","aria-label":"standard lenker"},A=["href","aria-label","target","rel"],F={class:"pkt-footer__social-icons"},P=["href","aria-label","target","rel"];function D(r,o,t,s,i,z){const a=e.resolveComponent("PktIcon");return e.openBlock(),e.createElementBlock("footer",p,[e.createElementVNode("div",u,[e.createElementVNode("div",g,[e.createElementVNode("div",h,[e.createElementVNode("h2",N,e.toDisplayString(t.columnOne.title),1),e.createElementVNode("ul",y,[t.columnOne.text?(e.openBlock(),e.createElementBlock("li",b,e.toDisplayString(t.columnOne.text),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columnOne.links,(n,l)=>(e.openBlock(),e.createElementBlock("li",{class:"pkt-footer__list-item",key:`links-${l}`},[e.createElementVNode("a",{class:e.normalizeClass(["pkt-footer__link",{"pkt-link--external":n.external}]),href:n.href,target:n.openInNewTab||t.openLinksInNewTab?"_blank":"_self",rel:n.openInNewTab||t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(a,{class:"pkt-footer__link-icon",name:"chevron-right"}),e.createTextVNode(" "+e.toDisplayString(n.text),1)],10,I)]))),128))])]),e.createElementVNode("div",V,[e.createElementVNode("h2",E,e.toDisplayString(t.columnTwo.title),1),e.createElementVNode("ul",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columnTwo.links,(n,l)=>(e.openBlock(),e.createElementBlock("li",{class:"pkt-footer__list-item",key:`links-${l}`},[e.createElementVNode("a",{class:e.normalizeClass(["pkt-footer__link",{"pkt-link--external":n.external}]),href:n.href,target:n.openInNewTab||t.openLinksInNewTab?"_blank":"_self",rel:n.openInNewTab||t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(a,{class:"pkt-footer__link-icon",name:"chevron-right"}),e.createTextVNode(" "+e.toDisplayString(n.text),1)],10,w)]))),128))])]),e.createElementVNode("div",B,[o[3]||(o[3]=e.createElementVNode("h2",{class:"pkt-footer__title"},"Om nettstedet",-1)),e.createElementVNode("ul",L,[e.createElementVNode("li",v,[e.createElementVNode("a",{class:"pkt-footer__link",href:t.personvernOgInfoLink,target:t.openLinksInNewTab?"_blank":"_self",rel:t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(a,{class:"pkt-footer__link-icon",name:"chevron-right"}),o[1]||(o[1]=e.createTextVNode(" Personvern og informasjonskapsler "))],8,x)]),e.createElementVNode("li",j,[e.createElementVNode("a",{class:"pkt-footer__link",href:t.tilgjengelighetLink,target:t.openLinksInNewTab?"_blank":"_self",rel:t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(a,{class:"pkt-footer__link-icon",name:"chevron-right"}),o[2]||(o[2]=e.createTextVNode(" Tilgjengelighet "))],8,q)]),e.createElementVNode("li",C,[t.includeConsent?(e.openBlock(),e.createElementBlock("pkt-consent",{key:0,googleAnalyticsId:t.googleAnalyticsId,hotjarId:t.hotjarId,triggerType:"footerlink",onToggleConsent:o[0]||(o[0]=n=>{this.$emit("toggle-consent",n)})},null,40,S)):e.createCommentVNode("",!0)])])])]),t.socialLinks?(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.socialLinks,(n,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.language?(e.openBlock(),e.createElementBlock("div",{key:`language-${l}`,class:"pkt-footer__social-language"},[e.createElementVNode("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab||t.openLinksInNewTab?"_blank":"_self",rel:n.openInNewTab||t.openLinksInNewTab?"noopener noreferrer":null},e.toDisplayString(n.language),9,A)])):e.createCommentVNode("",!0)],64))),256)),e.createElementVNode("div",F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.socialLinks,(n,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.iconName?(e.openBlock(),e.createElementBlock("a",{key:`sociallinks-${l}`,href:n.href,"aria-label":`til ${n.iconName}`,target:n.openInNewTab||t.openLinksInNewTab?"_blank":"_self",rel:n.openInNewTab||t.openLinksInNewTab?"noopener noreferrer":null,class:"pkt-footer__social-icon-link"},[e.createVNode(a,{class:"pkt-footer__social-icon",name:n.iconName},null,8,["name"])],8,P)):e.createCommentVNode("",!0)],64))),256))])])):e.createCommentVNode("",!0)])])}const d=f._export_sfc(m,[["render",D]]),_={install(r){c.registerComponent(r,d)}};c.use(_);exports.PktFooter=d;exports.default=_;
|
package/dist/punkt-vue-footer.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { P as m } from "./Icon-Z84h32lN.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import "@oslokommune/punkt-elements/dist/pkt-consent.js";
|
|
3
|
+
import { resolveComponent as b, createElementBlock as s, openBlock as l, createElementVNode as n, createCommentVNode as f, toDisplayString as i, Fragment as c, renderList as d, normalizeClass as h, createVNode as k, createTextVNode as u } from "vue";
|
|
4
|
+
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import { u as I, a as w } from "./plugins-DQVoaMd9.js";
|
|
6
|
+
const N = {
|
|
6
7
|
name: "PktFooter",
|
|
7
8
|
components: {
|
|
8
9
|
PktIcon: m
|
|
@@ -23,8 +24,8 @@ const y = {
|
|
|
23
24
|
description: "Array of social media and language links for the footer",
|
|
24
25
|
validator: (r) => r.every((o) => {
|
|
25
26
|
if (typeof o == "object") {
|
|
26
|
-
const e = typeof o.href == "string",
|
|
27
|
-
return e && (
|
|
27
|
+
const e = typeof o.href == "string", g = typeof o.iconName == "string", p = typeof o.language == "string";
|
|
28
|
+
return e && (g || p);
|
|
28
29
|
}
|
|
29
30
|
return !1;
|
|
30
31
|
}),
|
|
@@ -44,31 +45,46 @@ const y = {
|
|
|
44
45
|
type: Boolean,
|
|
45
46
|
default: !1,
|
|
46
47
|
required: !1
|
|
48
|
+
},
|
|
49
|
+
includeConsent: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1,
|
|
52
|
+
required: !1
|
|
53
|
+
},
|
|
54
|
+
googleAnalyticsId: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: null,
|
|
57
|
+
required: !1
|
|
58
|
+
},
|
|
59
|
+
hotjarId: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: null,
|
|
62
|
+
required: !1
|
|
47
63
|
}
|
|
48
64
|
}
|
|
49
65
|
}, T = {
|
|
50
66
|
class: "pkt-footer",
|
|
51
67
|
"data-mode": "dark"
|
|
52
|
-
}, L = { class: "pkt-footer__container" }, v = { class: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16" }, x = { class: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up" }, j = { class: "pkt-footer__title" },
|
|
68
|
+
}, L = { class: "pkt-footer__container" }, v = { class: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16" }, x = { class: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up" }, j = { class: "pkt-footer__title" }, A = { class: "pkt-footer__list" }, O = {
|
|
53
69
|
key: 0,
|
|
54
70
|
class: "pkt-footer__text"
|
|
55
|
-
}, q = ["href", "target", "rel"],
|
|
71
|
+
}, q = ["href", "target", "rel"], P = { class: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up" }, C = { class: "pkt-footer__title" }, S = { class: "pkt-footer__list" }, B = ["href", "target", "rel"], F = { class: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up" }, V = { class: "pkt-footer__list" }, z = { class: "pkt-footer__list-item" }, E = ["href", "target", "rel"], D = { class: "pkt-footer__list-item" }, H = ["href", "target", "rel"], G = { class: "pkt-footer__list-item" }, J = ["googleAnalyticsId", "hotjarId"], K = {
|
|
56
72
|
key: 0,
|
|
57
73
|
class: "pkt-footer__social",
|
|
58
74
|
"aria-label": "standard lenker"
|
|
59
|
-
},
|
|
60
|
-
function
|
|
75
|
+
}, M = ["href", "aria-label", "target", "rel"], Q = { class: "pkt-footer__social-icons" }, R = ["href", "aria-label", "target", "rel"];
|
|
76
|
+
function U(r, o, e, g, p, Y) {
|
|
61
77
|
const _ = b("PktIcon");
|
|
62
|
-
return
|
|
78
|
+
return l(), s("footer", T, [
|
|
63
79
|
n("div", L, [
|
|
64
80
|
n("div", v, [
|
|
65
81
|
n("div", x, [
|
|
66
82
|
n("h2", j, i(e.columnOne.title), 1),
|
|
67
|
-
n("ul",
|
|
68
|
-
e.columnOne.text ? (
|
|
69
|
-
(
|
|
83
|
+
n("ul", A, [
|
|
84
|
+
e.columnOne.text ? (l(), s("li", O, i(e.columnOne.text), 1)) : f("", !0),
|
|
85
|
+
(l(!0), s(c, null, d(e.columnOne.links, (t, a) => (l(), s("li", {
|
|
70
86
|
class: "pkt-footer__list-item",
|
|
71
|
-
key: `links-${
|
|
87
|
+
key: `links-${a}`
|
|
72
88
|
}, [
|
|
73
89
|
n("a", {
|
|
74
90
|
class: h(["pkt-footer__link", { "pkt-link--external": t.external }]),
|
|
@@ -76,21 +92,21 @@ function Q(r, o, e, u, g, W) {
|
|
|
76
92
|
target: t.openInNewTab || e.openLinksInNewTab ? "_blank" : "_self",
|
|
77
93
|
rel: t.openInNewTab || e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
78
94
|
}, [
|
|
79
|
-
|
|
95
|
+
k(_, {
|
|
80
96
|
class: "pkt-footer__link-icon",
|
|
81
97
|
name: "chevron-right"
|
|
82
98
|
}),
|
|
83
|
-
|
|
99
|
+
u(" " + i(t.text), 1)
|
|
84
100
|
], 10, q)
|
|
85
101
|
]))), 128))
|
|
86
102
|
])
|
|
87
103
|
]),
|
|
88
|
-
n("div",
|
|
104
|
+
n("div", P, [
|
|
89
105
|
n("h2", C, i(e.columnTwo.title), 1),
|
|
90
|
-
n("ul",
|
|
91
|
-
(
|
|
106
|
+
n("ul", S, [
|
|
107
|
+
(l(!0), s(c, null, d(e.columnTwo.links, (t, a) => (l(), s("li", {
|
|
92
108
|
class: "pkt-footer__list-item",
|
|
93
|
-
key: `links-${
|
|
109
|
+
key: `links-${a}`
|
|
94
110
|
}, [
|
|
95
111
|
n("a", {
|
|
96
112
|
class: h(["pkt-footer__link", { "pkt-link--external": t.external }]),
|
|
@@ -98,30 +114,30 @@ function Q(r, o, e, u, g, W) {
|
|
|
98
114
|
target: t.openInNewTab || e.openLinksInNewTab ? "_blank" : "_self",
|
|
99
115
|
rel: t.openInNewTab || e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
100
116
|
}, [
|
|
101
|
-
|
|
117
|
+
k(_, {
|
|
102
118
|
class: "pkt-footer__link-icon",
|
|
103
119
|
name: "chevron-right"
|
|
104
120
|
}),
|
|
105
|
-
|
|
106
|
-
], 10,
|
|
121
|
+
u(" " + i(t.text), 1)
|
|
122
|
+
], 10, B)
|
|
107
123
|
]))), 128))
|
|
108
124
|
])
|
|
109
125
|
]),
|
|
110
|
-
n("div",
|
|
111
|
-
o[
|
|
112
|
-
n("ul",
|
|
113
|
-
n("li",
|
|
126
|
+
n("div", F, [
|
|
127
|
+
o[3] || (o[3] = n("h2", { class: "pkt-footer__title" }, "Om nettstedet", -1)),
|
|
128
|
+
n("ul", V, [
|
|
129
|
+
n("li", z, [
|
|
114
130
|
n("a", {
|
|
115
131
|
class: "pkt-footer__link",
|
|
116
132
|
href: e.personvernOgInfoLink,
|
|
117
133
|
target: e.openLinksInNewTab ? "_blank" : "_self",
|
|
118
134
|
rel: e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
119
135
|
}, [
|
|
120
|
-
|
|
136
|
+
k(_, {
|
|
121
137
|
class: "pkt-footer__link-icon",
|
|
122
138
|
name: "chevron-right"
|
|
123
139
|
}),
|
|
124
|
-
o[
|
|
140
|
+
o[1] || (o[1] = u(" Personvern og informasjonskapsler "))
|
|
125
141
|
], 8, E)
|
|
126
142
|
]),
|
|
127
143
|
n("li", D, [
|
|
@@ -131,20 +147,31 @@ function Q(r, o, e, u, g, W) {
|
|
|
131
147
|
target: e.openLinksInNewTab ? "_blank" : "_self",
|
|
132
148
|
rel: e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
133
149
|
}, [
|
|
134
|
-
|
|
150
|
+
k(_, {
|
|
135
151
|
class: "pkt-footer__link-icon",
|
|
136
152
|
name: "chevron-right"
|
|
137
153
|
}),
|
|
138
|
-
o[
|
|
154
|
+
o[2] || (o[2] = u(" Tilgjengelighet "))
|
|
139
155
|
], 8, H)
|
|
156
|
+
]),
|
|
157
|
+
n("li", G, [
|
|
158
|
+
e.includeConsent ? (l(), s("pkt-consent", {
|
|
159
|
+
key: 0,
|
|
160
|
+
googleAnalyticsId: e.googleAnalyticsId,
|
|
161
|
+
hotjarId: e.hotjarId,
|
|
162
|
+
triggerType: "footerlink",
|
|
163
|
+
onToggleConsent: o[0] || (o[0] = (t) => {
|
|
164
|
+
this.$emit("toggle-consent", t);
|
|
165
|
+
})
|
|
166
|
+
}, null, 40, J)) : f("", !0)
|
|
140
167
|
])
|
|
141
168
|
])
|
|
142
169
|
])
|
|
143
170
|
]),
|
|
144
|
-
e.socialLinks ? (
|
|
145
|
-
(
|
|
146
|
-
t.language ? (
|
|
147
|
-
key: `language-${
|
|
171
|
+
e.socialLinks ? (l(), s("div", K, [
|
|
172
|
+
(l(!0), s(c, null, d(e.socialLinks, (t, a) => (l(), s(c, null, [
|
|
173
|
+
t.language ? (l(), s("div", {
|
|
174
|
+
key: `language-${a}`,
|
|
148
175
|
class: "pkt-footer__social-language"
|
|
149
176
|
}, [
|
|
150
177
|
n("a", {
|
|
@@ -152,37 +179,37 @@ function Q(r, o, e, u, g, W) {
|
|
|
152
179
|
"aria-label": `til ${t.language} versjon av nettsiden`,
|
|
153
180
|
target: t.openInNewTab || e.openLinksInNewTab ? "_blank" : "_self",
|
|
154
181
|
rel: t.openInNewTab || e.openLinksInNewTab ? "noopener noreferrer" : null
|
|
155
|
-
}, i(t.language), 9,
|
|
156
|
-
])) :
|
|
182
|
+
}, i(t.language), 9, M)
|
|
183
|
+
])) : f("", !0)
|
|
157
184
|
], 64))), 256)),
|
|
158
|
-
n("div",
|
|
159
|
-
(
|
|
160
|
-
t.iconName ? (
|
|
161
|
-
key: `sociallinks-${
|
|
185
|
+
n("div", Q, [
|
|
186
|
+
(l(!0), s(c, null, d(e.socialLinks, (t, a) => (l(), s(c, null, [
|
|
187
|
+
t.iconName ? (l(), s("a", {
|
|
188
|
+
key: `sociallinks-${a}`,
|
|
162
189
|
href: t.href,
|
|
163
190
|
"aria-label": `til ${t.iconName}`,
|
|
164
191
|
target: t.openInNewTab || e.openLinksInNewTab ? "_blank" : "_self",
|
|
165
192
|
rel: t.openInNewTab || e.openLinksInNewTab ? "noopener noreferrer" : null,
|
|
166
193
|
class: "pkt-footer__social-icon-link"
|
|
167
194
|
}, [
|
|
168
|
-
|
|
195
|
+
k(_, {
|
|
169
196
|
class: "pkt-footer__social-icon",
|
|
170
197
|
name: t.iconName
|
|
171
198
|
}, null, 8, ["name"])
|
|
172
|
-
], 8,
|
|
199
|
+
], 8, R)) : f("", !0)
|
|
173
200
|
], 64))), 256))
|
|
174
201
|
])
|
|
175
|
-
])) :
|
|
202
|
+
])) : f("", !0)
|
|
176
203
|
])
|
|
177
204
|
]);
|
|
178
205
|
}
|
|
179
|
-
const
|
|
206
|
+
const W = /* @__PURE__ */ y(N, [["render", U]]), X = {
|
|
180
207
|
install(r) {
|
|
181
|
-
|
|
208
|
+
w(r, W);
|
|
182
209
|
}
|
|
183
210
|
};
|
|
184
|
-
|
|
211
|
+
I(X);
|
|
185
212
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
213
|
+
W as PktFooter,
|
|
214
|
+
X as default
|
|
188
215
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./Icon-BLNK24NN.cjs");require("@oslokommune/punkt-elements/dist/pkt-consent.js");const e=require("vue"),k=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),s=require("./plugins-CMydO4oi.cjs"),_={name:"PktFooterSimple",components:{PktIcon:d.PktIcon},props:{links:{type:Array,default:()=>[],validator:r=>r.every(n=>typeof n.href=="string"&&typeof n.text=="string")},personvernOgInfoLink:{type:String,default:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",required:!1},tilgjengelighetLink:{type:String,default:"https://www.oslo.kommune.no/tilgjengelighet/",required:!1},openLinksInNewTab:{type:Boolean,default:!1,required:!1},includeConsent:{type:Boolean,default:!1,required:!1},googleAnalyticsId:{type:String,default:null,required:!1},hotjarId:{type:String,default:null,required:!1}}},f={class:"pkt-footer-simple","data-mode":"dark"},p={class:"pkt-footer-simple__container"},g={class:"pkt-footer-simple__list"},m=["href","target","rel"],u={class:"pkt-footer-simple__list-item"},h=["href","target","rel"],I={class:"pkt-footer-simple__list-item"},N=["href","target","rel"],y={class:"pkt-footer-simple__list-item"},V=["googleAnalyticsId","hotjarId"];function w(r,n,t,T,b,v){const l=e.resolveComponent("PktIcon");return e.openBlock(),e.createElementBlock("footer",f,[e.createElementVNode("div",p,[e.createElementVNode("ul",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,(o,c)=>(e.openBlock(),e.createElementBlock("li",{class:"pkt-footer-simple__list-item",key:`links-${c}`},[e.createElementVNode("a",{class:e.normalizeClass(["pkt-footer-simple__link",{"pkt-link--external":o.external}]),href:o.href,target:o.openInNewTab||t.openLinksInNewTab?"_blank":"_self",rel:o.openInNewTab||t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(l,{class:"pkt-footer-simple__link-icon",name:"chevron-right"}),e.createTextVNode(" "+e.toDisplayString(o.text),1)],10,m)]))),128)),e.createElementVNode("li",u,[e.createElementVNode("a",{class:"pkt-footer-simple__link",href:t.personvernOgInfoLink,target:t.openLinksInNewTab?"_blank":"_self",rel:t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(l,{class:"pkt-footer-simple__link-icon",name:"chevron-right"}),n[0]||(n[0]=e.createTextVNode(" Personvern og informasjonskapsler "))],8,h)]),e.createElementVNode("li",I,[e.createElementVNode("a",{class:"pkt-footer-simple__link",href:t.tilgjengelighetLink,target:t.openLinksInNewTab?"_blank":"_self",rel:t.openLinksInNewTab?"noopener noreferrer":void 0},[e.createVNode(l,{class:"pkt-footer-simple__link-icon",name:"chevron-right"}),n[1]||(n[1]=e.createTextVNode(" Tilgjengelighet "))],8,N)]),e.createElementVNode("li",y,[t.includeConsent?(e.openBlock(),e.createElementBlock("pkt-consent",{key:0,googleAnalyticsId:t.googleAnalyticsId,hotjarId:t.hotjarId,triggerType:"footerlink"},null,8,V)):e.createCommentVNode("",!0)])])])])}const i=k._export_sfc(_,[["render",w]]),a={install(r){s.registerComponent(r,i)}};s.use(a);exports.PktFooterSimple=i;exports.default=a;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import
|
|
1
|
+
import { P as p } from "./Icon-Z84h32lN.js";
|
|
2
|
+
import "@oslokommune/punkt-elements/dist/pkt-consent.js";
|
|
3
|
+
import { resolveComponent as d, createElementBlock as l, openBlock as s, createElementVNode as t, Fragment as k, renderList as c, normalizeClass as m, createVNode as a, createTextVNode as f, toDisplayString as g, createCommentVNode as u } from "vue";
|
|
3
4
|
import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import { u, a as
|
|
5
|
-
const
|
|
5
|
+
import { u as I, a as y } from "./plugins-DQVoaMd9.js";
|
|
6
|
+
const w = {
|
|
6
7
|
name: "PktFooterSimple",
|
|
7
8
|
components: {
|
|
8
|
-
PktIcon:
|
|
9
|
+
PktIcon: p
|
|
9
10
|
},
|
|
10
11
|
props: {
|
|
11
12
|
links: {
|
|
@@ -27,47 +28,62 @@ const I = {
|
|
|
27
28
|
type: Boolean,
|
|
28
29
|
default: !1,
|
|
29
30
|
required: !1
|
|
31
|
+
},
|
|
32
|
+
includeConsent: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1,
|
|
35
|
+
required: !1
|
|
36
|
+
},
|
|
37
|
+
googleAnalyticsId: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: null,
|
|
40
|
+
required: !1
|
|
41
|
+
},
|
|
42
|
+
hotjarId: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: null,
|
|
45
|
+
required: !1
|
|
30
46
|
}
|
|
31
47
|
}
|
|
32
|
-
},
|
|
48
|
+
}, N = {
|
|
33
49
|
class: "pkt-footer-simple",
|
|
34
50
|
"data-mode": "dark"
|
|
35
|
-
},
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
t("div",
|
|
40
|
-
t("ul",
|
|
41
|
-
(
|
|
51
|
+
}, b = { class: "pkt-footer-simple__container" }, L = { class: "pkt-footer-simple__list" }, T = ["href", "target", "rel"], v = { class: "pkt-footer-simple__list-item" }, j = ["href", "target", "rel"], x = { class: "pkt-footer-simple__list-item" }, P = ["href", "target", "rel"], S = { class: "pkt-footer-simple__list-item" }, q = ["googleAnalyticsId", "hotjarId"];
|
|
52
|
+
function C(r, n, e, F, V, E) {
|
|
53
|
+
const i = d("PktIcon");
|
|
54
|
+
return s(), l("footer", N, [
|
|
55
|
+
t("div", b, [
|
|
56
|
+
t("ul", L, [
|
|
57
|
+
(s(!0), l(k, null, c(e.links, (o, _) => (s(), l("li", {
|
|
42
58
|
class: "pkt-footer-simple__list-item",
|
|
43
|
-
key: `links-${
|
|
59
|
+
key: `links-${_}`
|
|
44
60
|
}, [
|
|
45
61
|
t("a", {
|
|
46
|
-
class:
|
|
62
|
+
class: m(["pkt-footer-simple__link", { "pkt-link--external": o.external }]),
|
|
47
63
|
href: o.href,
|
|
48
64
|
target: o.openInNewTab || e.openLinksInNewTab ? "_blank" : "_self",
|
|
49
65
|
rel: o.openInNewTab || e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
50
66
|
}, [
|
|
51
|
-
a(
|
|
67
|
+
a(i, {
|
|
52
68
|
class: "pkt-footer-simple__link-icon",
|
|
53
69
|
name: "chevron-right"
|
|
54
70
|
}),
|
|
55
71
|
f(" " + g(o.text), 1)
|
|
56
|
-
], 10,
|
|
72
|
+
], 10, T)
|
|
57
73
|
]))), 128)),
|
|
58
|
-
t("li",
|
|
74
|
+
t("li", v, [
|
|
59
75
|
t("a", {
|
|
60
76
|
class: "pkt-footer-simple__link",
|
|
61
77
|
href: e.personvernOgInfoLink,
|
|
62
78
|
target: e.openLinksInNewTab ? "_blank" : "_self",
|
|
63
79
|
rel: e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
64
80
|
}, [
|
|
65
|
-
a(
|
|
81
|
+
a(i, {
|
|
66
82
|
class: "pkt-footer-simple__link-icon",
|
|
67
83
|
name: "chevron-right"
|
|
68
84
|
}),
|
|
69
85
|
n[0] || (n[0] = f(" Personvern og informasjonskapsler "))
|
|
70
|
-
], 8,
|
|
86
|
+
], 8, j)
|
|
71
87
|
]),
|
|
72
88
|
t("li", x, [
|
|
73
89
|
t("a", {
|
|
@@ -76,24 +92,32 @@ function j(r, n, e, q, B, C) {
|
|
|
76
92
|
target: e.openLinksInNewTab ? "_blank" : "_self",
|
|
77
93
|
rel: e.openLinksInNewTab ? "noopener noreferrer" : void 0
|
|
78
94
|
}, [
|
|
79
|
-
a(
|
|
95
|
+
a(i, {
|
|
80
96
|
class: "pkt-footer-simple__link-icon",
|
|
81
97
|
name: "chevron-right"
|
|
82
98
|
}),
|
|
83
99
|
n[1] || (n[1] = f(" Tilgjengelighet "))
|
|
84
100
|
], 8, P)
|
|
101
|
+
]),
|
|
102
|
+
t("li", S, [
|
|
103
|
+
e.includeConsent ? (s(), l("pkt-consent", {
|
|
104
|
+
key: 0,
|
|
105
|
+
googleAnalyticsId: e.googleAnalyticsId,
|
|
106
|
+
hotjarId: e.hotjarId,
|
|
107
|
+
triggerType: "footerlink"
|
|
108
|
+
}, null, 8, q)) : u("", !0)
|
|
85
109
|
])
|
|
86
110
|
])
|
|
87
111
|
])
|
|
88
112
|
]);
|
|
89
113
|
}
|
|
90
|
-
const
|
|
114
|
+
const A = /* @__PURE__ */ h(w, [["render", C]]), B = {
|
|
91
115
|
install(r) {
|
|
92
|
-
|
|
116
|
+
y(r, A);
|
|
93
117
|
}
|
|
94
118
|
};
|
|
95
|
-
|
|
119
|
+
I(B);
|
|
96
120
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
121
|
+
A as PktFooterSimple,
|
|
122
|
+
B as default
|
|
99
123
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./Icon-BLNK24NN.cjs"),V=require("./Button-D2xQdpZo.cjs"),e=require("vue"),E=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),B=require("./plugins-CMydO4oi.cjs"),b={name:"PktHeader",components:{PktIcon:f.PktIcon,PktButton:V.PktButton},data(){return{hidden:!1,userMenuOpen:!1,userMenuClickInside:!1,lastScrollPosition:0}},props:{logoLink:{type:[String,Function],required:!1,default:"https://www.oslo.kommune.no/"},serviceName:{type:String,required:!1},fixed:{type:Boolean,default:!0},scrollToHide:{type:Boolean,default:!0},user:{type:Object,required:!1},userMenu:{type:Array,required:!1},representing:{type:Object,required:!1},userOptions:{type:Array,required:!1},userMenuFooter:{type:Array,required:!1},canChangeRepresentation:{type:Boolean,default:!0},showMenuButton:{type:Boolean,default:!1},showLogOutButton:{type:Boolean,default:!1}},computed:{lastLoggedIn(){return typeof this.user.lastLoggedIn=="string"?this.user.lastLoggedIn:user!=null&&user.lastLoggedIn?new Date(this.user.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):""}},methods:{openUserMenu(){this.userMenuOpen=!this.userMenuOpen},clickOutside(l){var o;(o=this.$refs.userMenu)!=null&&o.contains(l.target)||(this.userMenuOpen=!1)},onScroll(){if(this.scrollToHide){const l=window.pageYOffset||document.documentElement.scrollTop;if(l<0||Math.abs(l-this.lastScrollPosition)<60)return;this.hidden=l>this.lastScrollPosition,this.lastScrollPosition=l}}},watch:{hidden(l){l&&(this.userMenuOpen=!1)}},created(){this.__handlerRef__=this.clickOutside.bind(this),document.body.addEventListener("click",this.__handlerRef__),window.addEventListener("scroll",this.onScroll)},unmounted(){document.body.removeEventListener("click",this.__handlerRef__),window.removeEventListener("scroll",this.onScroll)}},C={class:"pkt-header__logo"},v=["href"],M={key:2,class:"pkt-header__logo-service",translate:"no"},O={class:"pkt-header__actions"},w={class:"pkt-header__actions-row"},S={key:0},L=["aria-expanded"],x={key:0,class:"pkt-header__user-fullname pkt-btn__text",translate:"no"},P={key:1,class:"pkt-header__user-shortname pkt-btn__text",translate:"no"},T={id:"pktUserDropdown",class:"pkt-header__dropdown pkt-user-menu"},D={key:0},I={class:"pkt-user-menu__name",translate:"no"},q={key:0,class:"pkt-user-menu__last-logged-in"},F={key:1},R={class:"pkt-list"},H=["href"],U=["onClick"],j={key:2},z={class:"pkt-user-menu__name",translate:"no"},A={key:0,class:"pkt-user-menu__org-number"},Y={class:"pkt-list mt-size-16"},G={key:0,class:"pkt-list"},J=["href"],K={key:0},Q={key:3,class:"footer"},W={class:"pkt-list-horizontal bordered"},X=["href"],Z=["onClick"],$={key:2};function ee(l,o,t,te,a,i){var k,u,d,m,p,g,_,h;const r=e.resolveComponent("PktIcon"),c=e.resolveComponent("PktButton");return e.openBlock(),e.createElementBlock("header",{id:"pkt-header","aria-label":"Topp",class:e.normalizeClass({"pkt-header":!0,"pkt-header--fixed":t.fixed,"pkt-header--scroll-to-hide":t.scrollToHide,"pkt-header--hidden":a.hidden})},[e.createElementVNode("div",C,[typeof t.logoLink=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,"aria-label":"Tilbake til forside",class:"pkt-header__logo-link",href:t.logoLink},[e.createVNode(r,{name:"oslologo",class:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.36/logos/"})],8,v)):(e.openBlock(),e.createElementBlock("button",{key:1,"aria-label":"Tilbake til forside",class:"pkt-link-button pkt-link pkt-header__logo-link",onClick:o[0]||(o[0]=(...n)=>t.logoLink&&t.logoLink(...n))},[e.createVNode(r,{name:"oslologo",class:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.36/logos/"})])),t.serviceName?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(t.serviceName),1)):e.createCommentVNode("",!0)]),e.createElementVNode("nav",O,[e.createElementVNode("ul",w,[t.showMenuButton?(e.openBlock(),e.createElementBlock("li",S,[e.createVNode(c,{class:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onOnClick:o[1]||(o[1]=n=>l.$emit("openMenu"))},{default:e.withCtx(()=>o[7]||(o[7]=[e.createTextVNode("Meny")])),_:1})])):e.createCommentVNode("",!0),t.user||t.representing?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["pkt-header--has-dropdown",{"pkt-header--open-dropdown":a.userMenuOpen}]),ref:"userMenu"},[e.createElementVNode("button",{class:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button","aria-controls":"pktUserDropdown","aria-expanded":a.userMenuOpen,onClick:o[2]||(o[2]=(...n)=>i.openUserMenu&&i.openUserMenu(...n))},[e.createVNode(r,{name:"user",class:"pkt-btn__icon"}),(k=t.representing)!=null&&k.name||(u=t.user)!=null&&u.name?(e.openBlock(),e.createElementBlock("span",x,e.toDisplayString(((d=t.representing)==null?void 0:d.name)||((m=t.user)==null?void 0:m.name)),1)):e.createCommentVNode("",!0),(p=t.representing)!=null&&p.shortname||(g=t.user)!=null&&g.shortname?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(((_=t.representing)==null?void 0:_.shortname)||((h=t.user)==null?void 0:h.shortname)),1)):e.createCommentVNode("",!0),e.createVNode(r,{name:"chevron-thin-down",class:"pkt-btn--closed"}),e.createVNode(r,{name:"chevron-thin-up",class:"pkt-btn--open"})],8,L),e.createElementVNode("ul",T,[t.user?(e.openBlock(),e.createElementBlock("li",D,[o[9]||(o[9]=e.createElementVNode("div",{class:"pkt-user-menu__label"},"Pålogget som",-1)),e.createElementVNode("div",I,e.toDisplayString(t.user.name),1),t.user.lastLoggedIn?(e.openBlock(),e.createElementBlock("div",q,[o[8]||(o[8]=e.createTextVNode(" Sist pålogget: ")),e.createElementVNode("time",null,e.toDisplayString(i.lastLoggedIn),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.userMenu?(e.openBlock(),e.createElementBlock("li",F,[e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.userMenu,(n,s)=>(e.openBlock(),e.createElementBlock("li",{key:`userMenu-${s}`},[typeof n.target=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.target,class:"pkt-link"},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)],8,H)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"pkt-link-button pkt-link",onClick:n.target},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)],8,U))]))),128))])])):e.createCommentVNode("",!0),t.representing||t.canChangeRepresentation?(e.openBlock(),e.createElementBlock("li",j,[t.representing?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[10]||(o[10]=e.createElementVNode("div",{class:"pkt-user-menu__label"},"Representerer",-1)),e.createElementVNode("div",z,e.toDisplayString(t.representing.name),1),t.representing.orgNumber?(e.openBlock(),e.createElementBlock("div",A," Org.nr. "+e.toDisplayString(t.representing.orgNumber),1)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("ul",Y,[e.createElementVNode("li",null,[t.canChangeRepresentation?(e.openBlock(),e.createElementBlock("button",{key:0,class:"pkt-link-button pkt-link",onClick:o[3]||(o[3]=n=>l.$emit("changeRepresentation"))},[e.createVNode(r,{name:"cogwheel",class:"pkt-link__icon"}),o[11]||(o[11]=e.createTextVNode(" Endre organisasjon "))])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createElementVNode("li",null,[t.userOptions||!t.showLogOutButton?(e.openBlock(),e.createElementBlock("ul",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.userOptions,(n,s)=>(e.openBlock(),e.createElementBlock("li",{key:`userOptions-${s}`},[typeof n.target=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.target,class:"pkt-link"},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)],8,J)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"pkt-link-button pkt-link",onClick:o[4]||(o[4]=ne=>l.$emit("logOut"))},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)]))]))),128)),t.showLogOutButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",K,[e.createElementVNode("button",{class:"pkt-link-button pkt-link",onClick:o[5]||(o[5]=n=>l.$emit("logOut"))},[e.createVNode(r,{name:"exit",class:"pkt-link__icon"}),o[12]||(o[12]=e.createTextVNode(" Logg ut "))])]))])):e.createCommentVNode("",!0)]),t.userMenuFooter?(e.openBlock(),e.createElementBlock("li",Q,[e.createElementVNode("ul",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.userMenuFooter,(n,s)=>(e.openBlock(),e.createElementBlock("li",{key:`userMenuFooter-${s}`},[typeof n.target=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.target,class:"pkt-link"},e.toDisplayString(n.title),9,X)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"pkt-link-button pkt-link",onClick:n.target},e.toDisplayString(n.title),9,Z))]))),128))])])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),t.showLogOutButton?(e.openBlock(),e.createElementBlock("li",$,[e.createVNode(c,{class:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",onOnClick:o[6]||(o[6]=n=>l.$emit("logOut")),skin:"secondary",variant:"icon-right"},{default:e.withCtx(()=>o[13]||(o[13]=[e.createTextVNode(" Logg ut ")])),_:1})])):e.createCommentVNode("",!0)])])],2)}const y=E._export_sfc(b,[["render",ee]]),N={install(l){B.registerComponent(l,y)}};B.use(N);exports.PktHeader=y;exports.default=N;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./Icon-BLNK24NN.cjs"),V=require("./Button-D2xQdpZo.cjs"),e=require("vue"),E=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),B=require("./plugins-CMydO4oi.cjs"),b={name:"PktHeader",components:{PktIcon:f.PktIcon,PktButton:V.PktButton},data(){return{hidden:!1,userMenuOpen:!1,userMenuClickInside:!1,lastScrollPosition:0}},props:{logoLink:{type:[String,Function],required:!1,default:"https://www.oslo.kommune.no/"},serviceName:{type:String,required:!1},fixed:{type:Boolean,default:!0},scrollToHide:{type:Boolean,default:!0},user:{type:Object,required:!1},userMenu:{type:Array,required:!1},representing:{type:Object,required:!1},userOptions:{type:Array,required:!1},userMenuFooter:{type:Array,required:!1},canChangeRepresentation:{type:Boolean,default:!0},showMenuButton:{type:Boolean,default:!1},showLogOutButton:{type:Boolean,default:!1}},computed:{lastLoggedIn(){return typeof this.user.lastLoggedIn=="string"?this.user.lastLoggedIn:user!=null&&user.lastLoggedIn?new Date(this.user.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):""}},methods:{openUserMenu(){this.userMenuOpen=!this.userMenuOpen},clickOutside(l){var o;(o=this.$refs.userMenu)!=null&&o.contains(l.target)||(this.userMenuOpen=!1)},onScroll(){if(this.scrollToHide){const l=window.pageYOffset||document.documentElement.scrollTop;if(l<0||Math.abs(l-this.lastScrollPosition)<60)return;this.hidden=l>this.lastScrollPosition,this.lastScrollPosition=l}}},watch:{hidden(l){l&&(this.userMenuOpen=!1)}},created(){this.__handlerRef__=this.clickOutside.bind(this),document.body.addEventListener("click",this.__handlerRef__),window.addEventListener("scroll",this.onScroll)},unmounted(){document.body.removeEventListener("click",this.__handlerRef__),window.removeEventListener("scroll",this.onScroll)}},C={class:"pkt-header__logo"},v=["href"],M={key:2,class:"pkt-header__logo-service",translate:"no"},O={class:"pkt-header__actions"},w={class:"pkt-header__actions-row"},S={key:0},L=["aria-expanded"],x={key:0,class:"pkt-header__user-fullname pkt-btn__text",translate:"no"},P={key:1,class:"pkt-header__user-shortname pkt-btn__text",translate:"no"},T={id:"pktUserDropdown",class:"pkt-header__dropdown pkt-user-menu"},D={key:0},I={class:"pkt-user-menu__name",translate:"no"},q={key:0,class:"pkt-user-menu__last-logged-in"},F={key:1},R={class:"pkt-list"},H=["href"],U=["onClick"],j={key:2},z={class:"pkt-user-menu__name",translate:"no"},A={key:0,class:"pkt-user-menu__org-number"},Y={class:"pkt-list mt-size-16"},G={key:0,class:"pkt-list"},J=["href"],K={key:0},Q={key:3,class:"footer"},W={class:"pkt-list-horizontal bordered"},X=["href"],Z=["onClick"],$={key:2};function ee(l,o,t,te,a,i){var k,u,d,m,p,g,_,h;const r=e.resolveComponent("PktIcon"),c=e.resolveComponent("PktButton");return e.openBlock(),e.createElementBlock("header",{id:"pkt-header","aria-label":"Topp",class:e.normalizeClass({"pkt-header":!0,"pkt-header--fixed":t.fixed,"pkt-header--scroll-to-hide":t.scrollToHide,"pkt-header--hidden":a.hidden})},[e.createElementVNode("div",C,[typeof t.logoLink=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,"aria-label":"Tilbake til forside",class:"pkt-header__logo-link",href:t.logoLink},[e.createVNode(r,{name:"oslologo",class:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.37/logos/"})],8,v)):(e.openBlock(),e.createElementBlock("button",{key:1,"aria-label":"Tilbake til forside",class:"pkt-link-button pkt-link pkt-header__logo-link",onClick:o[0]||(o[0]=(...n)=>t.logoLink&&t.logoLink(...n))},[e.createVNode(r,{name:"oslologo",class:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.37/logos/"})])),t.serviceName?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(t.serviceName),1)):e.createCommentVNode("",!0)]),e.createElementVNode("nav",O,[e.createElementVNode("ul",w,[t.showMenuButton?(e.openBlock(),e.createElementBlock("li",S,[e.createVNode(c,{class:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onOnClick:o[1]||(o[1]=n=>l.$emit("openMenu"))},{default:e.withCtx(()=>o[7]||(o[7]=[e.createTextVNode("Meny")])),_:1})])):e.createCommentVNode("",!0),t.user||t.representing?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["pkt-header--has-dropdown",{"pkt-header--open-dropdown":a.userMenuOpen}]),ref:"userMenu"},[e.createElementVNode("button",{class:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button","aria-controls":"pktUserDropdown","aria-expanded":a.userMenuOpen,onClick:o[2]||(o[2]=(...n)=>i.openUserMenu&&i.openUserMenu(...n))},[e.createVNode(r,{name:"user",class:"pkt-btn__icon"}),(k=t.representing)!=null&&k.name||(u=t.user)!=null&&u.name?(e.openBlock(),e.createElementBlock("span",x,e.toDisplayString(((d=t.representing)==null?void 0:d.name)||((m=t.user)==null?void 0:m.name)),1)):e.createCommentVNode("",!0),(p=t.representing)!=null&&p.shortname||(g=t.user)!=null&&g.shortname?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(((_=t.representing)==null?void 0:_.shortname)||((h=t.user)==null?void 0:h.shortname)),1)):e.createCommentVNode("",!0),e.createVNode(r,{name:"chevron-thin-down",class:"pkt-btn--closed"}),e.createVNode(r,{name:"chevron-thin-up",class:"pkt-btn--open"})],8,L),e.createElementVNode("ul",T,[t.user?(e.openBlock(),e.createElementBlock("li",D,[o[9]||(o[9]=e.createElementVNode("div",{class:"pkt-user-menu__label"},"Pålogget som",-1)),e.createElementVNode("div",I,e.toDisplayString(t.user.name),1),t.user.lastLoggedIn?(e.openBlock(),e.createElementBlock("div",q,[o[8]||(o[8]=e.createTextVNode(" Sist pålogget: ")),e.createElementVNode("time",null,e.toDisplayString(i.lastLoggedIn),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.userMenu?(e.openBlock(),e.createElementBlock("li",F,[e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.userMenu,(n,s)=>(e.openBlock(),e.createElementBlock("li",{key:`userMenu-${s}`},[typeof n.target=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.target,class:"pkt-link"},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)],8,H)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"pkt-link-button pkt-link",onClick:n.target},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)],8,U))]))),128))])])):e.createCommentVNode("",!0),t.representing||t.canChangeRepresentation?(e.openBlock(),e.createElementBlock("li",j,[t.representing?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[10]||(o[10]=e.createElementVNode("div",{class:"pkt-user-menu__label"},"Representerer",-1)),e.createElementVNode("div",z,e.toDisplayString(t.representing.name),1),t.representing.orgNumber?(e.openBlock(),e.createElementBlock("div",A," Org.nr. "+e.toDisplayString(t.representing.orgNumber),1)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("ul",Y,[e.createElementVNode("li",null,[t.canChangeRepresentation?(e.openBlock(),e.createElementBlock("button",{key:0,class:"pkt-link-button pkt-link",onClick:o[3]||(o[3]=n=>l.$emit("changeRepresentation"))},[e.createVNode(r,{name:"cogwheel",class:"pkt-link__icon"}),o[11]||(o[11]=e.createTextVNode(" Endre organisasjon "))])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createElementVNode("li",null,[t.userOptions||!t.showLogOutButton?(e.openBlock(),e.createElementBlock("ul",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.userOptions,(n,s)=>(e.openBlock(),e.createElementBlock("li",{key:`userOptions-${s}`},[typeof n.target=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.target,class:"pkt-link"},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)],8,J)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"pkt-link-button pkt-link",onClick:o[4]||(o[4]=ne=>l.$emit("logOut"))},[n.iconName?(e.openBlock(),e.createBlock(r,{key:0,name:n.iconName,class:"pkt-link__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.title),1)]))]))),128)),t.showLogOutButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",K,[e.createElementVNode("button",{class:"pkt-link-button pkt-link",onClick:o[5]||(o[5]=n=>l.$emit("logOut"))},[e.createVNode(r,{name:"exit",class:"pkt-link__icon"}),o[12]||(o[12]=e.createTextVNode(" Logg ut "))])]))])):e.createCommentVNode("",!0)]),t.userMenuFooter?(e.openBlock(),e.createElementBlock("li",Q,[e.createElementVNode("ul",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.userMenuFooter,(n,s)=>(e.openBlock(),e.createElementBlock("li",{key:`userMenuFooter-${s}`},[typeof n.target=="string"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.target,class:"pkt-link"},e.toDisplayString(n.title),9,X)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"pkt-link-button pkt-link",onClick:n.target},e.toDisplayString(n.title),9,Z))]))),128))])])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),t.showLogOutButton?(e.openBlock(),e.createElementBlock("li",$,[e.createVNode(c,{class:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",onOnClick:o[6]||(o[6]=n=>l.$emit("logOut")),skin:"secondary",variant:"icon-right"},{default:e.withCtx(()=>o[13]||(o[13]=[e.createTextVNode(" Logg ut ")])),_:1})])):e.createCommentVNode("",!0)])])],2)}const y=E._export_sfc(b,[["render",ee]]),N={install(l){B.registerComponent(l,y)}};B.use(N);exports.PktHeader=y;exports.default=N;
|
package/dist/punkt-vue-header.js
CHANGED
|
@@ -168,7 +168,7 @@ function ke(l, s, e, he, g, m) {
|
|
|
168
168
|
name: "oslologo",
|
|
169
169
|
class: "pkt-header__logo-svg",
|
|
170
170
|
"aria-hidden": "true",
|
|
171
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
171
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.37/logos/"
|
|
172
172
|
})
|
|
173
173
|
], 8, F)) : (t(), o("button", {
|
|
174
174
|
key: 1,
|
|
@@ -180,7 +180,7 @@ function ke(l, s, e, he, g, m) {
|
|
|
180
180
|
name: "oslologo",
|
|
181
181
|
class: "pkt-header__logo-svg",
|
|
182
182
|
"aria-hidden": "true",
|
|
183
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
183
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.37/logos/"
|
|
184
184
|
})
|
|
185
185
|
])),
|
|
186
186
|
e.serviceName ? (t(), o("span", H, a(e.serviceName), 1)) : r("", !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("./Icon-BLNK24NN.cjs"),s=require("./plugins-CMydO4oi.cjs"),c=["aria-busy"],m={key:0},r={__name:"Loader",props:{message:String,size:{type:String,default:"medium",validator:a=>["small","medium","large"].includes(a)},inline:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!0},variant:{type:String,default:"rainbow",validator:a=>["blue","rainbow","shapes"].includes(a)},delay:{type:Number,default:0}},setup(a){const n=a,u=t=>t==="shapes"?"loader":t==="blue"?"spinner-blue":"spinner",{delay:l}=e.toRefs(n);let o=e.ref(!(l.value>0));return l.value>0&&setTimeout(()=>{o.value=!0},l.value),(t,k)=>(e.openBlock(),e.createElementBlock("div",{role:"status","aria-live":"polite","aria-busy":a.isLoading,class:e.normalizeClass(`pkt-loader--${a.inline?"inline":"box"}`)},[a.isLoading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`pkt-loader pkt-loader--${n.size}`),"data-testid":"pkt-loader"},[e.createVNode(d.PktIcon,{name:u(a.variant),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/12.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("./Icon-BLNK24NN.cjs"),s=require("./plugins-CMydO4oi.cjs"),c=["aria-busy"],m={key:0},r={__name:"Loader",props:{message:String,size:{type:String,default:"medium",validator:a=>["small","medium","large"].includes(a)},inline:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!0},variant:{type:String,default:"rainbow",validator:a=>["blue","rainbow","shapes"].includes(a)},delay:{type:Number,default:0}},setup(a){const n=a,u=t=>t==="shapes"?"loader":t==="blue"?"spinner-blue":"spinner",{delay:l}=e.toRefs(n);let o=e.ref(!(l.value>0));return l.value>0&&setTimeout(()=>{o.value=!0},l.value),(t,k)=>(e.openBlock(),e.createElementBlock("div",{role:"status","aria-live":"polite","aria-busy":a.isLoading,class:e.normalizeClass(`pkt-loader--${a.inline?"inline":"box"}`)},[a.isLoading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`pkt-loader pkt-loader--${n.size}`),"data-testid":"pkt-loader"},[e.createVNode(d.PktIcon,{name:u(a.variant),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/12.37/animations/",class:e.normalizeClass(`pkt-loader__svg pkt-loader__${a.variant}`)},null,8,["name","class"]),a.message?(e.openBlock(),e.createElementBlock("p",m,e.toDisplayString(a.message),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64)):e.renderSlot(t.$slots,"default",{key:1})],10,c))}},i={install(a){s.registerComponent(a,r)}};s.use(i);exports.PktLoader=r;exports.default=i;
|
package/dist/punkt-vue-loader.js
CHANGED
|
@@ -48,7 +48,7 @@ const h = ["aria-busy"], L = { key: 0 }, S = {
|
|
|
48
48
|
f(y, {
|
|
49
49
|
name: d(e.variant),
|
|
50
50
|
"aria-label": "loading",
|
|
51
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
51
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.37/animations/",
|
|
52
52
|
class: n(`pkt-loader__svg pkt-loader__${e.variant}`)
|
|
53
53
|
}, null, 8, ["name", "class"]),
|
|
54
54
|
e.message ? (l(), t("p", L, k(e.message), 1)) : r("", !0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-vue",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.37.1",
|
|
4
4
|
"description": "Vue komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"preview": "vite preview"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@oslokommune/punkt-assets": "^12.
|
|
30
|
-
"@oslokommune/punkt-css": "^12.
|
|
31
|
-
"@oslokommune/punkt-elements": "^12.
|
|
29
|
+
"@oslokommune/punkt-assets": "^12.37.0",
|
|
30
|
+
"@oslokommune/punkt-css": "^12.37.0",
|
|
31
|
+
"@oslokommune/punkt-elements": "^12.37.1",
|
|
32
32
|
"@vitejs/plugin-vue": "^5.1.3",
|
|
33
33
|
"edit-json-file": "^1.8.0",
|
|
34
34
|
"sass": "^1.78.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
68
68
|
},
|
|
69
69
|
"license": "MIT",
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "d45fb53f62fd8dff86a140774b531c7df33910d9"
|
|
71
71
|
}
|
|
@@ -64,6 +64,19 @@
|
|
|
64
64
|
Tilgjengelighet
|
|
65
65
|
</a>
|
|
66
66
|
</li>
|
|
67
|
+
<li class="pkt-footer__list-item">
|
|
68
|
+
<pkt-consent
|
|
69
|
+
v-if="includeConsent"
|
|
70
|
+
:googleAnalyticsId="googleAnalyticsId"
|
|
71
|
+
:hotjarId="hotjarId"
|
|
72
|
+
triggerType="footerlink"
|
|
73
|
+
@toggle-consent="
|
|
74
|
+
(consent) => {
|
|
75
|
+
this.$emit('toggle-consent', consent)
|
|
76
|
+
}
|
|
77
|
+
"
|
|
78
|
+
></pkt-consent>
|
|
79
|
+
</li>
|
|
67
80
|
</ul>
|
|
68
81
|
</div>
|
|
69
82
|
</div>
|
|
@@ -103,6 +116,7 @@
|
|
|
103
116
|
|
|
104
117
|
<script>
|
|
105
118
|
import PktIcon from '../icon/Icon.vue'
|
|
119
|
+
import '@oslokommune/punkt-elements/dist/pkt-consent.js'
|
|
106
120
|
|
|
107
121
|
export default {
|
|
108
122
|
name: 'PktFooter',
|
|
@@ -163,6 +177,21 @@ export default {
|
|
|
163
177
|
default: false,
|
|
164
178
|
required: false,
|
|
165
179
|
},
|
|
180
|
+
includeConsent: {
|
|
181
|
+
type: Boolean,
|
|
182
|
+
default: false,
|
|
183
|
+
required: false,
|
|
184
|
+
},
|
|
185
|
+
googleAnalyticsId: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: null,
|
|
188
|
+
required: false,
|
|
189
|
+
},
|
|
190
|
+
hotjarId: {
|
|
191
|
+
type: String,
|
|
192
|
+
default: null,
|
|
193
|
+
required: false,
|
|
194
|
+
},
|
|
166
195
|
},
|
|
167
196
|
}
|
|
168
197
|
</script>
|
|
@@ -36,6 +36,14 @@
|
|
|
36
36
|
Tilgjengelighet
|
|
37
37
|
</a>
|
|
38
38
|
</li>
|
|
39
|
+
<li class="pkt-footer-simple__list-item">
|
|
40
|
+
<pkt-consent
|
|
41
|
+
v-if="includeConsent"
|
|
42
|
+
:googleAnalyticsId="googleAnalyticsId"
|
|
43
|
+
:hotjarId="hotjarId"
|
|
44
|
+
triggerType="footerlink"
|
|
45
|
+
></pkt-consent>
|
|
46
|
+
</li>
|
|
39
47
|
</ul>
|
|
40
48
|
</div>
|
|
41
49
|
</footer>
|
|
@@ -43,6 +51,7 @@
|
|
|
43
51
|
|
|
44
52
|
<script>
|
|
45
53
|
import PktIcon from '../icon/Icon.vue'
|
|
54
|
+
import '@oslokommune/punkt-elements/dist/pkt-consent.js'
|
|
46
55
|
|
|
47
56
|
export default {
|
|
48
57
|
name: 'PktFooterSimple',
|
|
@@ -70,6 +79,21 @@ export default {
|
|
|
70
79
|
default: false,
|
|
71
80
|
required: false,
|
|
72
81
|
},
|
|
82
|
+
includeConsent: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false,
|
|
85
|
+
required: false,
|
|
86
|
+
},
|
|
87
|
+
googleAnalyticsId: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: null,
|
|
90
|
+
required: false,
|
|
91
|
+
},
|
|
92
|
+
hotjarId: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: null,
|
|
95
|
+
required: false,
|
|
96
|
+
},
|
|
73
97
|
},
|
|
74
98
|
}
|
|
75
99
|
</script>
|