@oslokommune/punkt-elements 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 +35 -0
- package/dist/{button-B6uRE7uT.js → button-BYZHwPtW.js} +1 -1
- package/dist/{button-BNdVIhUp.cjs → button-iCBnadXj.cjs} +1 -1
- package/dist/{checkbox-CyYfA2fu.js → checkbox-Cz3sIWt0.js} +1 -1
- package/dist/{checkbox-CqatE-eX.cjs → checkbox-U8aPrLjG.cjs} +1 -1
- package/dist/{combobox-D9NKnao2.cjs → combobox-AbD1tkKx.cjs} +1 -1
- package/dist/{combobox-CELUAZxF.js → combobox-Bsaj6Z6Y.js} +1 -1
- package/dist/consent-B888aPfK.js +161 -0
- package/dist/consent-CFgCfRsF.cjs +11 -0
- package/dist/consent.d.ts +1 -0
- package/dist/{datepicker-cR9MtXOh.cjs → datepicker-BAn16Z8U.cjs} +16 -16
- package/dist/{datepicker-CpkTwszH.js → datepicker-cNYYOtBI.js} +116 -103
- package/dist/index.d.ts +24 -1
- package/dist/input-element-XmmyUZmB.cjs +1 -0
- package/dist/{input-element-Bic-t96S.js → input-element-aQDMXDVQ.js} +31 -26
- package/dist/{modal-B-varrJT.js → modal-DIwagdAc.js} +1 -1
- package/dist/modal-OC0efchb.cjs +33 -0
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -0
- package/dist/pkt-consent.js +6 -0
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-index.cjs +3 -3
- package/dist/pkt-index.js +42 -40
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{radiobutton-CIW0FvT8.cjs → radiobutton-DtL-nc1b.cjs} +1 -1
- package/dist/{radiobutton-DtHuz7qn.js → radiobutton-DtpGqoci.js} +1 -1
- package/dist/{select-DbRLz-7l.js → select-BO7s0ym6.js} +1 -1
- package/dist/{select-BJziJVde.cjs → select-CsrHon8V.cjs} +1 -1
- package/dist/{textarea-CiA4IzMs.js → textarea-BdjszjRh.js} +1 -1
- package/dist/{textarea-qX4Inr1X.cjs → textarea-vr4tUfJ3.cjs} +1 -1
- package/dist/{textinput-CrxjZNEq.js → textinput-D-hYhwtS.js} +31 -24
- package/dist/{textinput-BlsgLNwW.cjs → textinput-DTKG8h7M.cjs} +4 -3
- package/package.json +5 -4
- package/src/components/button/button.ts +1 -0
- package/src/components/consent/consent.ts +146 -0
- package/src/components/consent/index.ts +6 -0
- package/src/components/consent/strings.ts +125 -0
- package/src/components/datepicker/datepicker.ts +36 -4
- package/src/components/index.ts +3 -0
- package/src/components/modal/modal.ts +1 -1
- package/src/components/textinput/textinput.ts +10 -0
- package/dist/input-element-C9ma8cdz.cjs +0 -1
- package/dist/modal-cPcTJriW.cjs +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.37.1](https://github.com/oslokommune/punkt/compare/12.37.0...12.37.1) (2025-05-06)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [12.37.0](https://github.com/oslokommune/punkt/compare/12.36.2...12.37.0) (2025-05-05)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
* Ny komponent Consent - innstillinger for informasjonskapsler (#2467).
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
Ingen
|
|
36
|
+
|
|
37
|
+
### Chores
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
|
|
8
43
|
## [12.36.2](https://github.com/oslokommune/punkt/compare/12.36.1...12.36.2) (2025-04-30)
|
|
9
44
|
|
|
10
45
|
### ⚠ BREAKING CHANGES
|
|
@@ -15,7 +15,7 @@ let i = class extends c {
|
|
|
15
15
|
super.disconnectedCallback(), this.removeEventListener("click", this.handleClick), this.removeEventListener("keydown", this.handleKeydown);
|
|
16
16
|
}
|
|
17
17
|
updated(t) {
|
|
18
|
-
super.updated(t), this.setAttribute("role", "button"), this.disabled ? (this.getAttribute("tabindex") !== "-1" && this.setAttribute("tabindex", "-1"), this.getAttribute("aria-disabled") !== "true" && this.setAttribute("aria-disabled", "true")) : (this.getAttribute("tabindex") !== "0" && this.setAttribute("tabindex", "0"), this.getAttribute("aria-disabled") !== "false" && this.removeAttribute("aria-disabled")), this.isLoading ? this.getAttribute("aria-busy") !== "true" && this.setAttribute("aria-busy", "true") : this.hasAttribute("aria-busy") && this.removeAttribute("aria-busy"), this.updateElementClasses();
|
|
18
|
+
super.updated(t), this.setAttribute("role", "button"), this.internals.role = "button", this.disabled ? (this.getAttribute("tabindex") !== "-1" && this.setAttribute("tabindex", "-1"), this.getAttribute("aria-disabled") !== "true" && this.setAttribute("aria-disabled", "true")) : (this.getAttribute("tabindex") !== "0" && this.setAttribute("tabindex", "0"), this.getAttribute("aria-disabled") !== "false" && this.removeAttribute("aria-disabled")), this.isLoading ? this.getAttribute("aria-busy") !== "true" && this.setAttribute("aria-busy", "true") : this.hasAttribute("aria-busy") && this.removeAttribute("aria-busy"), this.updateElementClasses();
|
|
19
19
|
}
|
|
20
20
|
// Render
|
|
21
21
|
render() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-BSypUpzA.cjs"),h=require("./pkt-slot-controller-plQxXRvV.cjs"),d=require("./ref-BvbyvXRH.cjs");var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,i=(r,t,s,o)=>{for(var n=o>1?void 0:o?u(t,s):t,a=r.length-1,l;a>=0;a--)(l=r[a])&&(n=(o?l(t,s,n):l(n))||n);return o&&n&&p(t,s,n),n};exports.PktButton=class extends e.PktElement{constructor(){super(),this.internals=this.attachInternals(),this.defaultSlot=d.e(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.isLoading=!1,this.disabled=!1,this.slotController=new h.PktSlotController(this,this.defaultSlot),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown)}updated(t){super.updated(t),this.setAttribute("role","button"),this.disabled?(this.getAttribute("tabindex")!=="-1"&&this.setAttribute("tabindex","-1"),this.getAttribute("aria-disabled")!=="true"&&this.setAttribute("aria-disabled","true")):(this.getAttribute("tabindex")!=="0"&&this.setAttribute("tabindex","0"),this.getAttribute("aria-disabled")!=="false"&&this.removeAttribute("aria-disabled")),this.isLoading?this.getAttribute("aria-busy")!=="true"&&this.setAttribute("aria-busy","true"):this.hasAttribute("aria-busy")&&this.removeAttribute("aria-busy"),this.updateElementClasses()}render(){return e.x`
|
|
1
|
+
"use strict";const e=require("./element-BSypUpzA.cjs"),h=require("./pkt-slot-controller-plQxXRvV.cjs"),d=require("./ref-BvbyvXRH.cjs");var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,i=(r,t,s,o)=>{for(var n=o>1?void 0:o?u(t,s):t,a=r.length-1,l;a>=0;a--)(l=r[a])&&(n=(o?l(t,s,n):l(n))||n);return o&&n&&p(t,s,n),n};exports.PktButton=class extends e.PktElement{constructor(){super(),this.internals=this.attachInternals(),this.defaultSlot=d.e(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.isLoading=!1,this.disabled=!1,this.slotController=new h.PktSlotController(this,this.defaultSlot),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown)}updated(t){super.updated(t),this.setAttribute("role","button"),this.internals.role="button",this.disabled?(this.getAttribute("tabindex")!=="-1"&&this.setAttribute("tabindex","-1"),this.getAttribute("aria-disabled")!=="true"&&this.setAttribute("aria-disabled","true")):(this.getAttribute("tabindex")!=="0"&&this.setAttribute("tabindex","0"),this.getAttribute("aria-disabled")!=="false"&&this.removeAttribute("aria-disabled")),this.isLoading?this.getAttribute("aria-busy")!=="true"&&this.setAttribute("aria-busy","true"):this.hasAttribute("aria-busy")&&this.removeAttribute("aria-busy"),this.updateElementClasses()}render(){return e.x`
|
|
2
2
|
<div class="pkt-contents">
|
|
3
3
|
${this.isLoading?e.x`<pkt-icon
|
|
4
4
|
class="pkt-btn__icon pkt-btn__spinner"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as n, x as r, n as s, a as d } from "./element-DjjF_tEh.js";
|
|
2
|
-
import { P as k } from "./input-element-
|
|
2
|
+
import { P as k } from "./input-element-aQDMXDVQ.js";
|
|
3
3
|
import { e as b, n as f } from "./ref-iIffqQAI.js";
|
|
4
4
|
import { e as u } from "./class-map-KyMqi0fa.js";
|
|
5
5
|
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (e, h, c, l) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-BSypUpzA.cjs"),a=require("./input-element-
|
|
1
|
+
"use strict";const e=require("./element-BSypUpzA.cjs"),a=require("./input-element-XmmyUZmB.cjs"),k=require("./ref-BvbyvXRH.cjs"),o=require("./class-map-DCyaICmy.cjs");var r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=(l,t,s,h)=>{for(var i=h>1?void 0:h?u(t,s):t,n=l.length-1,p;n>=0;n--)(p=l[n])&&(i=(h?p(t,s,i):p(i))||i);return h&&i&&r(t,s,i),i};exports.PktCheckbox=class extends a.PktInputElement{constructor(){super(...arguments),this.inputRef=k.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.type="checkbox"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,s,h){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,s,h)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}render(){const t=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),s=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),h=o.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
2
2
|
<label class=${h} for=${this.id+"-internal"}>
|
|
3
3
|
${this.label}
|
|
4
4
|
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("./element-BSypUpzA.cjs"),c=require("./if-defined-a3sotaUr.cjs"),d=require("./state-B5KCNjEd.cjs"),r=require("./ref-BvbyvXRH.cjs"),$=require("./class-map-DCyaICmy.cjs"),I=require("./repeat-BnuruAat.cjs"),w=require("./input-element-
|
|
1
|
+
"use strict";const l=require("./element-BSypUpzA.cjs"),c=require("./if-defined-a3sotaUr.cjs"),d=require("./state-B5KCNjEd.cjs"),r=require("./ref-BvbyvXRH.cjs"),$=require("./class-map-DCyaICmy.cjs"),I=require("./repeat-BnuruAat.cjs"),w=require("./input-element-XmmyUZmB.cjs"),y=require("./pkt-options-controller-TJ1apYGF.cjs"),O=require("./pkt-slot-controller-plQxXRvV.cjs");require("./input-wrapper-Cn929YTV.cjs");require("./icon-BnKGwYjj.cjs");require("./tag-CgkUxA5D.cjs");require("./listbox-DqpGh7eq.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(b,e,t,i)=>{for(var s=i>1?void 0:i?S(e,t):e,h=b.length-1,n;h>=0;h--)(n=b[h])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&V(e,t,s),s};exports.PktCombobox=class extends w.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new y.PktOptionsSlotController(this),this.slotController=new O.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){if(super.connectedCallback(),document&&document.body.addEventListener("click",e=>{this._isOptionsOpen&&!this.contains(e.target)&&this.handleFocusOut(e)}),this._options=[],this.optionsController.nodes.length){const e=[];this.optionsController.nodes.forEach(t=>{if(!t.textContent&&!t.getAttribute("value"))return null;const i={value:t.getAttribute("value")||t.textContent||"",label:t.textContent||t.getAttribute("value")||""};t.getAttribute("data-prefix")&&(i.prefix=t.getAttribute("data-prefix")||void 0),t.getAttribute("tagskincolor")&&(i.tagSkinColor=t.getAttribute("tagskincolor")),t.getAttribute("description")&&(i.description=t.getAttribute("description")||void 0),i.fulltext=i.value+i.label+(i.prefix||""),e.push(i)}),e.length&&(this.options=[...e],this._options=[...e])}}updated(e){e.has("_value")&&this.valueChanged(this._value,e.get("_value")),e.has("value")&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),e.has("options")&&this.options.length&&(this._options=this.options,this._options.forEach(t=>{if(t.value&&!t.label&&(t.label=t.value),t.selected&&!this._value.includes(t.value)){const i=[...this._value];this._value=[...this._value,t.value],this.valueChanged(this._value,i)}t.fulltext=t.value+t.label+(t.prefix||""),t.selected=t.selected||this._value.includes(t.value)})),e.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(e)}attributeChangedCallback(e,t,i){e==="value"&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),e==="options"&&(this._options=this.options,this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(e,t,i)}render(){return l.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
.label=${this.label}
|
|
4
4
|
.helptext=${this.helptext}
|
|
@@ -4,7 +4,7 @@ import { r as c } from "./state-BtbpSrdV.js";
|
|
|
4
4
|
import { e as _, n as v } from "./ref-iIffqQAI.js";
|
|
5
5
|
import { e as k } from "./class-map-KyMqi0fa.js";
|
|
6
6
|
import { c as R } from "./repeat-D4kMediE.js";
|
|
7
|
-
import { P as V } from "./input-element-
|
|
7
|
+
import { P as V } from "./input-element-aQDMXDVQ.js";
|
|
8
8
|
import { P as C } from "./pkt-options-controller-CFmzX4xL.js";
|
|
9
9
|
import { P as S } from "./pkt-slot-controller-DFrc5O93.js";
|
|
10
10
|
import "./input-wrapper-CeeNYbDA.js";
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { P as k, x as l, n as a, a as h } from "./element-DjjF_tEh.js";
|
|
2
|
+
import "./button-BYZHwPtW.js";
|
|
3
|
+
import "./icon-Beoxup8E.js";
|
|
4
|
+
const u = {
|
|
5
|
+
i18n: {
|
|
6
|
+
nb: {
|
|
7
|
+
contentPresentation: {
|
|
8
|
+
title: "Oslo kommune bruker informasjonskapsler",
|
|
9
|
+
description: [
|
|
10
|
+
"For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.",
|
|
11
|
+
"Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."
|
|
12
|
+
],
|
|
13
|
+
buttons: {
|
|
14
|
+
accept: "Godta alle",
|
|
15
|
+
reject: "Kun nødvendige",
|
|
16
|
+
settings: "Innstillinger for informasjonskapsler"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
contentSettings: {
|
|
20
|
+
title: "Innstillinger for informasjonskapsler",
|
|
21
|
+
description: [
|
|
22
|
+
"Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.",
|
|
23
|
+
"Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."
|
|
24
|
+
],
|
|
25
|
+
buttons: {
|
|
26
|
+
back: "Tilbake",
|
|
27
|
+
save: "Lagre innstillinger"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
en: {
|
|
32
|
+
contentPresentation: {
|
|
33
|
+
title: "Before you visit Oslo kommune ...",
|
|
34
|
+
description: [
|
|
35
|
+
"This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.",
|
|
36
|
+
"To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."
|
|
37
|
+
],
|
|
38
|
+
buttons: {
|
|
39
|
+
accept: "Yes, I accept",
|
|
40
|
+
reject: "Only necessary",
|
|
41
|
+
settings: "Go to settings"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
contentSettings: {
|
|
45
|
+
title: "Her kan du aktivt velge mellom ulike informasjonskapsler",
|
|
46
|
+
description: [
|
|
47
|
+
"For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"
|
|
48
|
+
],
|
|
49
|
+
buttons: {
|
|
50
|
+
back: "Back",
|
|
51
|
+
save: "Save settings"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, g = globalThis, p = g.__cookieEvents || {
|
|
57
|
+
events: {},
|
|
58
|
+
on(e, n) {
|
|
59
|
+
this.events[e] || (this.events[e] = []), this.events[e].push(n);
|
|
60
|
+
},
|
|
61
|
+
off(e, n) {
|
|
62
|
+
this.events[e] && (this.events[e] = this.events[e].filter((t) => t !== n));
|
|
63
|
+
},
|
|
64
|
+
once(e, n) {
|
|
65
|
+
const t = (s) => {
|
|
66
|
+
this.off(e, t), n(s);
|
|
67
|
+
};
|
|
68
|
+
this.on(e, t);
|
|
69
|
+
},
|
|
70
|
+
emit(e, n) {
|
|
71
|
+
this.events[e] && this.events[e].forEach((t) => t(n));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
g.__cookieEvents = p;
|
|
75
|
+
const m = p;
|
|
76
|
+
var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, r = (e, n, t, s) => {
|
|
77
|
+
for (var o = s > 1 ? void 0 : s ? v(n, t) : n, c = e.length - 1, d; c >= 0; c--)
|
|
78
|
+
(d = e[c]) && (o = (s ? d(n, t, o) : d(o)) || o);
|
|
79
|
+
return s && o && f(n, t, o), o;
|
|
80
|
+
};
|
|
81
|
+
let i = class extends k {
|
|
82
|
+
constructor() {
|
|
83
|
+
super(), this.hotjarId = null, this.googleAnalyticsId = null, this.triggerType = "button", this.triggerText = null, this.i18nLanguage = "nb";
|
|
84
|
+
}
|
|
85
|
+
connectedCallback() {
|
|
86
|
+
super.connectedCallback(), this.triggerText = this.triggerText || u.i18n[this.i18nLanguage].contentPresentation.buttons.settings, this.googleAnalyticsId && (window.googleAnalyticsId = this.googleAnalyticsId), this.hotjarId && (window.hotjarId = this.hotjarId), m.on("CookieManager.setCookie", (e) => {
|
|
87
|
+
this.emitCookieConsents(e);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
emitCookieConsents(e) {
|
|
91
|
+
const t = JSON.parse(e.value).items.reduce((s, o) => (s[o.name] = o.consent, s), {});
|
|
92
|
+
this.dispatchEvent(
|
|
93
|
+
new CustomEvent("toggle-consent", {
|
|
94
|
+
detail: t,
|
|
95
|
+
bubbles: !0,
|
|
96
|
+
composed: !0
|
|
97
|
+
})
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
firstUpdated(e) {
|
|
101
|
+
if (!document.querySelector("#oslo-consent-script") && window.location.hostname !== "localhost") {
|
|
102
|
+
window.googleAnalyticsId = this.googleAnalyticsId, window.hotjarId = this.hotjarId;
|
|
103
|
+
const n = document.createElement("script");
|
|
104
|
+
n.src = "https://cdn.web.oslo.kommune.no/cb/cb-v1.0.0.js", n.id = "oslo-consent-script", n.onload = () => {
|
|
105
|
+
this.triggerInit();
|
|
106
|
+
}, document.head.appendChild(n);
|
|
107
|
+
const t = document.createElement("link");
|
|
108
|
+
t.href = "https://cdn.web.oslo.kommune.no/cb/cb-v1.0.0.css", t.type = "text/css", t.rel = "stylesheet", t.id = "oslo-consent-styles", document.head.appendChild(t);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
triggerInit() {
|
|
112
|
+
window.document.dispatchEvent(
|
|
113
|
+
new Event("DOMContentLoaded", {
|
|
114
|
+
bubbles: !0,
|
|
115
|
+
cancelable: !0
|
|
116
|
+
})
|
|
117
|
+
), window.cookieBanner.cookieConsent.validateConsentCookie().then((e) => {
|
|
118
|
+
if (e) {
|
|
119
|
+
const t = { value: window.cookieBanner.cookieConsent.getConsentCookie().items };
|
|
120
|
+
this.emitCookieConsents(t);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
openModal(e) {
|
|
125
|
+
e.preventDefault(), window.cookieBanner.cookieConsent || this.triggerInit(), setTimeout(() => window.cookieBanner.openCookieModal());
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
return this.triggerType === "link" ? l`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>` : this.triggerType === "footerlink" ? l`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
|
|
129
|
+
<pkt-icon name="chevron-right" class="pkt-footer__link-icon"></pkt-icon>
|
|
130
|
+
${this.triggerText}
|
|
131
|
+
</a>` : this.triggerType === "icon" ? l`<pkt-button
|
|
132
|
+
skin="tertiary"
|
|
133
|
+
variant="icon-only"
|
|
134
|
+
iconName="cookie"
|
|
135
|
+
@click=${this.openModal}
|
|
136
|
+
>
|
|
137
|
+
>${this.triggerText}</pkt-button
|
|
138
|
+
>` : l`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
r([
|
|
142
|
+
a({ type: String })
|
|
143
|
+
], i.prototype, "hotjarId", 2);
|
|
144
|
+
r([
|
|
145
|
+
a({ type: String })
|
|
146
|
+
], i.prototype, "googleAnalyticsId", 2);
|
|
147
|
+
r([
|
|
148
|
+
a({ type: String })
|
|
149
|
+
], i.prototype, "triggerType", 2);
|
|
150
|
+
r([
|
|
151
|
+
a({ type: String })
|
|
152
|
+
], i.prototype, "triggerText", 2);
|
|
153
|
+
r([
|
|
154
|
+
a({ type: String })
|
|
155
|
+
], i.prototype, "i18nLanguage", 2);
|
|
156
|
+
i = r([
|
|
157
|
+
h("pkt-consent")
|
|
158
|
+
], i);
|
|
159
|
+
export {
|
|
160
|
+
i as P
|
|
161
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const s=require("./element-BSypUpzA.cjs");require("./button-iCBnadXj.cjs");require("./icon-BnKGwYjj.cjs");const g={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}},c=globalThis,d=c.__cookieEvents||{events:{},on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)},off(t,e){this.events[t]&&(this.events[t]=this.events[t].filter(n=>n!==e))},once(t,e){const n=o=>{this.off(t,n),e(o)};this.on(t,n)},emit(t,e){this.events[t]&&this.events[t].forEach(n=>n(e))}};c.__cookieEvents=d;const k=d;var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,a=(t,e,n,o)=>{for(var i=o>1?void 0:o?u(e,n):e,r=t.length-1,l;r>=0;r--)(l=t[r])&&(i=(o?l(e,n,i):l(i))||i);return o&&i&&p(e,n,i),i};exports.PktConsent=class extends s.PktElement{constructor(){super(),this.hotjarId=null,this.googleAnalyticsId=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||g.i18n[this.i18nLanguage].contentPresentation.buttons.settings,this.googleAnalyticsId&&(window.googleAnalyticsId=this.googleAnalyticsId),this.hotjarId&&(window.hotjarId=this.hotjarId),k.on("CookieManager.setCookie",e=>{this.emitCookieConsents(e)})}emitCookieConsents(e){const o=JSON.parse(e.value).items.reduce((i,r)=>(i[r.name]=r.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:o,bubbles:!0,composed:!0}))}firstUpdated(e){if(!document.querySelector("#oslo-consent-script")&&window.location.hostname!=="localhost"){window.googleAnalyticsId=this.googleAnalyticsId,window.hotjarId=this.hotjarId;const n=document.createElement("script");n.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.0.0.js",n.id="oslo-consent-script",n.onload=()=>{this.triggerInit()},document.head.appendChild(n);const o=document.createElement("link");o.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.0.0.css",o.type="text/css",o.rel="stylesheet",o.id="oslo-consent-styles",document.head.appendChild(o)}}triggerInit(){window.document.dispatchEvent(new Event("DOMContentLoaded",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(e=>{if(e){const o={value:window.cookieBanner.cookieConsent.getConsentCookie().items};this.emitCookieConsents(o)}})}openModal(e){e.preventDefault(),window.cookieBanner.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?s.x`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?s.x`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
|
|
2
|
+
<pkt-icon name="chevron-right" class="pkt-footer__link-icon"></pkt-icon>
|
|
3
|
+
${this.triggerText}
|
|
4
|
+
</a>`:this.triggerType==="icon"?s.x`<pkt-button
|
|
5
|
+
skin="tertiary"
|
|
6
|
+
variant="icon-only"
|
|
7
|
+
iconName="cookie"
|
|
8
|
+
@click=${this.openModal}
|
|
9
|
+
>
|
|
10
|
+
>${this.triggerText}</pkt-button
|
|
11
|
+
>`:s.x`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`}};a([s.n({type:String})],exports.PktConsent.prototype,"hotjarId",2);a([s.n({type:String})],exports.PktConsent.prototype,"googleAnalyticsId",2);a([s.n({type:String})],exports.PktConsent.prototype,"triggerType",2);a([s.n({type:String})],exports.PktConsent.prototype,"triggerText",2);a([s.n({type:String})],exports.PktConsent.prototype,"i18nLanguage",2);exports.PktConsent=a([s.t("pkt-consent")],exports.PktConsent);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { }
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-DCyaICmy.cjs"),
|
|
1
|
+
"use strict";const d=require("./class-map-DCyaICmy.cjs"),p=require("./if-defined-a3sotaUr.cjs"),s=require("./element-BSypUpzA.cjs"),m=require("./state-B5KCNjEd.cjs"),h=require("./calendar-CYY42kN4.cjs"),k=require("./input-element-XmmyUZmB.cjs"),r=require("./ref-BvbyvXRH.cjs"),v=require("./repeat-BnuruAat.cjs");require("./icon-BnKGwYjj.cjs");require("./input-wrapper-Cn929YTV.cjs");require("./tag-CgkUxA5D.cjs");const $=require("./pkt-slot-controller-plQxXRvV.cjs"),y={dateformat:{default:"dd.MM.yyyy"},min:{default:null},max:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},range:{default:!1}},o={props:y};var b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var a=i>1?void 0:i?x(t,e):t,n=c.length-1,u;n>=0;n--)(u=c[n])&&(a=(i?u(t,e,a):u(a))||a);return i&&a&&b(t,e,a),a};const g=c=>new Promise(t=>setTimeout(t,c));exports.PktDatepicker=class extends k.PktInputElement{constructor(){super(),this.value="",this._value=this.value?Array.isArray(this.value)?this.value:this.value.split(","):[],this.label="Datovelger",this.dateformat=o.props.dateformat.default,this.multiple=o.props.multiple.default,this.maxlength=null,this.range=o.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=o.props.weeknumbers.default,this.withcontrols=o.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.buttonClasses={},this.inputRef=r.e(),this.inputRefTo=r.e(),this.btnRef=r.e(),this.calRef=r.e(),this.popupRef=r.e(),this.helptextSlot=r.e(),this.addToSelected=t=>{const e=t.target;if(!e.value)return;const i=this.min?h.newDate(this.min):null,a=this.max?h.newDate(this.max):null,n=h.newDate(e.value.split(",")[0]);n&&!isNaN(n.getTime())&&(!i||n>=i)&&(!a||n<=a)&&this.calRef.value&&this.calRef.value.handleDateSelect(n),e.value=""},this.slotController=new $.PktSlotController(this,this.helptextSlot)}async connectedCallback(){super.connectedCallback();const t=navigator.userAgent,e=/iP(hone|od|ad)/.test(t);this.inputType=e?"text":"date",document&&document.body.addEventListener("click",i=>{var a,n;(a=this.inputRef)!=null&&a.value&&((n=this.btnRef)!=null&&n.value)&&!this.inputRef.value.contains(i.target)&&!(this.inputRefTo.value&&this.inputRefTo.value.contains(i.target))&&!this.btnRef.value.contains(i.target)&&!i.target.closest(".pkt-calendar-popup")&&this.calendarOpen&&(this.onBlur(),this.hideCalendar())}),this.value.length&&this._value.length===0&&(this._value=Array.isArray(this.value)?this.value:this.value.split(",")),this.min=this.min||o.props.min.default,this.max=this.max||o.props.max.default,typeof this.excludedates=="string"&&(this.excludedates=this.excludedates.split(",")),typeof this.excludeweekdays=="string"&&(this.excludeweekdays=this.excludeweekdays.split(",")),(this.multiple||this.range)&&this.name&&!this.name.endsWith("[]")&&(this.name=this.name+"[]"),this.calendarOpen&&(await g(20),this.handleCalendarPosition())}disconnectedCallback(){super.disconnectedCallback(),document&&document.body.removeEventListener("click",t=>{var e,i;(e=this.inputRef)!=null&&e.value&&((i=this.btnRef)!=null&&i.value)&&!this.inputRef.value.contains(t.target)&&!this.btnRef.value.contains(t.target)&&this.hideCalendar()})}attributeChangedCallback(t,e,i){if(t==="value"){if(this.range&&(i==null?void 0:i.split(",").length)===1)return;this.value!==e&&this.valueChanged(i,e)}t==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=(i==null?void 0:i.split(","))??[]),t==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=(i==null?void 0:i.split(","))??[]),super.attributeChangedCallback(t,e,i)}updated(t){if(t.has("value")){if(this.range&&this.value.length===1)return;this.valueChanged(this.value,t.get("value"))}super.updated(t)}renderInput(){return s.x`
|
|
2
2
|
<input
|
|
3
3
|
class="${d.e(this.inputClasses)}"
|
|
4
4
|
.type=${this.inputType}
|
|
5
5
|
id="${this.id}-input"
|
|
6
6
|
.value=${this._value[0]??""}
|
|
7
|
-
min=${
|
|
8
|
-
max=${
|
|
7
|
+
min=${p.o(this.min)}
|
|
8
|
+
max=${p.o(this.max)}
|
|
9
9
|
@click=${t=>{t.preventDefault(),this.showCalendar()}}
|
|
10
10
|
?disabled=${this.disabled}
|
|
11
|
-
@keydown=${t=>{var e;(t.key===","
|
|
11
|
+
@keydown=${t=>{var e,i;if(t.key===","&&((e=this.inputRef.value)==null||e.blur()),(t.key==="Space"||t.key===" ")&&(t.preventDefault(),this.toggleCalendar(t)),t.key==="Enter"){const a=this.internals.form;a?a.requestSubmit():(i=this.inputRef.value)==null||i.blur()}}}
|
|
12
12
|
@input=${t=>{this.onInput(),t.stopImmediatePropagation()}}
|
|
13
13
|
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
14
14
|
@blur=${t=>{var e;(e=this.calRef.value)!=null&&e.contains(t.relatedTarget)||this.onBlur(),this.manageValidity(t.target),this.value=t.target.value}}
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
.type=${this.inputType}
|
|
23
23
|
id="${this.id}-input"
|
|
24
24
|
.value=${this._value[0]??""}
|
|
25
|
-
min=${
|
|
26
|
-
max=${
|
|
25
|
+
min=${p.o(this.min)}
|
|
26
|
+
max=${p.o(this.max)}
|
|
27
27
|
?disabled=${this.disabled}
|
|
28
28
|
@click=${e=>{e.preventDefault(),this.showCalendar()}}
|
|
29
|
-
@keydown=${e=>{var i;(e.key===","
|
|
29
|
+
@keydown=${e=>{var i,a;if(e.key===","&&((i=this.inputRef.value)==null||i.blur()),(e.key==="Space"||e.key===" ")&&(e.preventDefault(),this.toggleCalendar(e)),e.key==="Enter"){const n=this.internals.form;n?n.requestSubmit():(a=this.inputRefTo.value)==null||a.focus()}}}
|
|
30
30
|
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
31
31
|
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
32
|
-
@blur=${e=>{var i,
|
|
32
|
+
@blur=${e=>{var i,a;if(e.target.value){this.manageValidity(e.target);const n=h.fromISOToDate(e.target.value);n&&this._value[0]!==e.target.value&&this._value[1]&&(this.clearInputValue(),(a=(i=this.calRef)==null?void 0:i.value)==null||a.handleDateSelect(n))}else this._value[0]&&this.clearInputValue()}}
|
|
33
33
|
@change=${e=>{e.stopImmediatePropagation()}}
|
|
34
34
|
${r.n(this.inputRef)}
|
|
35
35
|
/>
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
id="${this.id}-to"
|
|
44
44
|
aria-labelledby="${this.id}-to-label"
|
|
45
45
|
.value=${this._value[1]??""}
|
|
46
|
-
min=${
|
|
47
|
-
max=${
|
|
46
|
+
min=${p.o(this.min)}
|
|
47
|
+
max=${p.o(this.max)}
|
|
48
48
|
?disabled=${this.disabled}
|
|
49
49
|
@click=${e=>{e.preventDefault(),this.showCalendar()}}
|
|
50
|
-
@keydown=${e=>{var i;(e.key===","
|
|
50
|
+
@keydown=${e=>{var i,a;if(e.key===","&&((i=this.inputRefTo.value)==null||i.blur()),(e.key==="Space"||e.key===" ")&&(e.preventDefault(),this.toggleCalendar(e)),e.key==="Enter"){const n=this.internals.form;n?n.requestSubmit():(a=this.inputRefTo.value)==null||a.blur()}}}
|
|
51
51
|
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
52
52
|
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
53
|
-
@blur=${e=>{var i,n
|
|
53
|
+
@blur=${e=>{var i,a,n;if((i=this.calRef.value)!=null&&i.contains(e.relatedTarget)||this.onBlur(),e.target.value){this.manageValidity(e.target);const u=e.target.value;this.min&&this.min>u?this.internals.setValidity({rangeUnderflow:!0},this.strings.forms.messages.rangeUnderflow,e.target):this.max&&this.max<u&&this.internals.setValidity({rangeOverflow:!0},this.strings.forms.messages.rangeOverflow,e.target);const f=h.fromISOToDate(e.target.value);f&&this._value[1]!==h.formatISODate(f)&&((n=(a=this.calRef)==null?void 0:a.value)==null||n.handleDateSelect(f))}}}
|
|
54
54
|
@change=${e=>{e.stopImmediatePropagation()}}
|
|
55
55
|
${r.n(this.inputRefTo)}
|
|
56
56
|
/>
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
class=${d.e(this.inputClasses)}
|
|
60
60
|
.type=${this.inputType}
|
|
61
61
|
id="${this.id}-input"
|
|
62
|
-
min=${
|
|
63
|
-
max=${
|
|
62
|
+
min=${p.o(this.min)}
|
|
63
|
+
max=${p.o(this.max)}
|
|
64
64
|
?disabled=${this.disabled||this.maxlength&&this._value.length>=this.maxlength}
|
|
65
65
|
@click=${t=>{t.preventDefault(),this.showCalendar()}}
|
|
66
66
|
@blur=${t=>{var e;(e=this.calRef.value)!=null&&e.contains(t.relatedTarget)||this.onBlur(),this.addToSelected(t)}}
|
|
67
67
|
@input=${t=>{this.onInput(),t.stopImmediatePropagation()}}
|
|
68
68
|
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
69
|
-
@keydown=${t=>{(t.key===","
|
|
69
|
+
@keydown=${t=>{var e;if(t.key===","&&(t.preventDefault(),this.addToSelected(t)),(t.key==="Space"||t.key===" ")&&(t.preventDefault(),this.toggleCalendar(t)),t.key==="Enter"){const i=this.internals.form;i?i.requestSubmit():(e=this.inputRef.value)==null||e.blur()}}}
|
|
70
70
|
@change=${t=>{t.stopImmediatePropagation()}}
|
|
71
71
|
${r.n(this.inputRef)}
|
|
72
72
|
/>
|
|
@@ -150,4 +150,4 @@
|
|
|
150
150
|
</div>
|
|
151
151
|
</pkt-input-wrapper>
|
|
152
152
|
${this.renderCalendar()}
|
|
153
|
-
`}handleCalendarPosition(){var t;if(this.popupRef.value&&this.inputRef.value){const e=this.multiple&&!!this.maxlength,i=((t=this.inputRef.value.parentElement)==null?void 0:t.getBoundingClientRect())||this.inputRef.value.getBoundingClientRect(),
|
|
153
|
+
`}handleCalendarPosition(){var t;if(this.popupRef.value&&this.inputRef.value){const e=this.multiple&&!!this.maxlength,i=((t=this.inputRef.value.parentElement)==null?void 0:t.getBoundingClientRect())||this.inputRef.value.getBoundingClientRect(),a=e?i.height+30:i.height,n=this.popupRef.value.getBoundingClientRect().height;let u=e?"calc(100% - 30px)":"100%";i&&i.top+n>window.innerHeight&&i.top-n>0&&(u=`calc(100% - ${a}px - ${n}px)`),this.popupRef.value.style.top=u}}handleFocusOut(t){this.contains(t.target)||(this.onBlur(),this.hideCalendar())}async showCalendar(){var t;this.calendarOpen=!0,await g(20),this.handleCalendarPosition(),this.isMobileSafari&&((t=this.calRef.value)==null||t.focusOnCurrentDate())}hideCalendar(){this.calendarOpen=!1}async toggleCalendar(t){t.preventDefault(),this.calendarOpen?this.hideCalendar():this.showCalendar()}};l([s.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"value",2);l([s.n({type:Array})],exports.PktDatepicker.prototype,"_value",2);l([s.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"label",2);l([s.n({type:String})],exports.PktDatepicker.prototype,"dateformat",2);l([s.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"multiple",2);l([s.n({type:Number,reflect:!0})],exports.PktDatepicker.prototype,"maxlength",2);l([s.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"range",2);l([s.n({type:Boolean})],exports.PktDatepicker.prototype,"showRangeLabels",2);l([s.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"min",2);l([s.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"max",2);l([s.n({type:Boolean})],exports.PktDatepicker.prototype,"weeknumbers",2);l([s.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"withcontrols",2);l([s.n({converter:h.converters.csvToArray})],exports.PktDatepicker.prototype,"excludedates",2);l([s.n({converter:h.converters.csvToArray})],exports.PktDatepicker.prototype,"excludeweekdays",2);l([s.n({type:String})],exports.PktDatepicker.prototype,"currentmonth",2);l([s.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"calendarOpen",2);l([s.n({type:String})],exports.PktDatepicker.prototype,"timezone",2);l([m.r()],exports.PktDatepicker.prototype,"inputClasses",2);l([m.r()],exports.PktDatepicker.prototype,"buttonClasses",2);exports.PktDatepicker=l([s.t("pkt-datepicker")],exports.PktDatepicker);
|