@oslokommune/punkt-elements 16.26.7 → 17.0.2
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 +110 -0
- package/dist/accordion-CbXDxOho.cjs +47 -0
- package/dist/{accordion-CBdIk9gw.js → accordion-DEUHQ4JD.js} +45 -35
- package/dist/{alert-HHTGY0sp.js → alert-CbtVGrHD.js} +31 -17
- package/dist/{alert-B8dLsiTz.cjs → alert-CkUnbPdA.cjs} +5 -5
- package/dist/base-elements/input-element.d.ts +1 -0
- package/dist/button-Cod17rKo.js +115 -0
- package/dist/{button-B5tQpKeG.cjs → button-gvDXtBMC.cjs} +5 -2
- package/dist/{calendar-DIzGBdbh.cjs → calendar-BVXW8DqC.cjs} +1 -1
- package/dist/{calendar-CjlUA-Lb.js → calendar-CjC4qlh6.js} +1 -1
- package/dist/{checkbox-Bt_sC_90.cjs → checkbox-8uxbeU30.cjs} +1 -1
- package/dist/{checkbox-D03BC2Va.js → checkbox-DJDphhqz.js} +1 -1
- package/dist/{combobox-CoQBTWqL.js → combobox-Du5yr-xM.js} +16 -2
- package/dist/combobox-hKrbYLUe.cjs +136 -0
- package/dist/components/accordion/accordion-context.d.ts +7 -0
- package/dist/components/accordion/accordion.d.ts +2 -0
- package/dist/components/accordion/accordionitem.d.ts +1 -0
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/alert.test.d.ts +1 -0
- package/dist/components/button/button.d.ts +4 -1
- package/dist/components/datepicker/datepicker-base.d.ts +2 -0
- package/dist/components/datepicker/datepicker-utils.d.ts +2 -2
- package/dist/components/footer/footer-base.d.ts +44 -0
- package/dist/components/footer/footer-simple.d.ts +20 -0
- package/dist/components/footer/footer.accessibility.test.d.ts +0 -0
- package/dist/components/footer/footer.d.ts +22 -0
- package/dist/components/footer/footer.test.d.ts +0 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/footer/types.d.ts +16 -0
- package/dist/components/header/header-chrome-controller.d.ts +44 -0
- package/dist/components/header/header-global.accessibility.test.d.ts +0 -0
- package/dist/components/header/header-global.d.ts +78 -0
- package/dist/components/header/header-global.test.d.ts +0 -0
- package/dist/components/header/header-service.accessibility.test.d.ts +0 -0
- package/dist/components/header/header-service.d.ts +6 -21
- package/dist/components/header/header-service.test.d.ts +1 -1
- package/dist/components/header/header.d.ts +11 -3
- package/dist/components/header/header.test.d.ts +0 -0
- package/dist/components/header/index.d.ts +2 -1
- package/dist/components/header/types.d.ts +28 -2
- package/dist/components/header-menu/header-menu.d.ts +4 -5
- package/dist/components/header-menu/types.d.ts +1 -1
- package/dist/components/index.d.ts +5 -3
- package/dist/components/input-wrapper/input-wrapper.d.ts +2 -0
- package/dist/components/input-wrapper/input-wrapper.test.d.ts +1 -0
- package/dist/components/searchinput/searchinput.d.ts +5 -0
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.test.d.ts +1 -0
- package/dist/components/textarea/textarea.test.d.ts +2 -0
- package/dist/components/textinput/textinput.test.d.ts +1 -0
- package/dist/components/timepicker/timepicker.d.ts +2 -0
- package/dist/components/timepicker/timepicker.test.d.ts +3 -0
- package/dist/consent--Nw43WFU.cjs +18 -0
- package/dist/{consent-D5sY6JK3.js → consent-B2hSTCGC.js} +14 -7
- package/dist/consume-BiOhrhEy.js +167 -0
- package/dist/consume-DKf5SmP9.cjs +1 -0
- package/dist/{converters-BKGBRBpS.js → converters-BBfsEJV5.js} +25 -25
- package/dist/{converters-9jHlXDyy.cjs → converters-Cd0fPEly.cjs} +1 -1
- package/dist/{datepicker-BE5Ll0W4.js → datepicker--Fq8q-J3.js} +30 -12
- package/dist/{datepicker-x4xM3KQz.cjs → datepicker-CEoBYTBU.cjs} +11 -7
- package/dist/docs/components/alert.d.ts +3 -0
- package/dist/docs/components/footer.d.ts +9 -0
- package/dist/docs/components/form-sizes.d.ts +10 -0
- package/dist/docs/components/header-global-full.d.ts +20 -0
- package/dist/docs/components/header-global.d.ts +14 -0
- package/dist/docs/components/searchinput.d.ts +6 -3
- package/dist/fetch-header-footer-data-Pc32etrk.js +88 -0
- package/dist/fetch-header-footer-data-xohWFmYC.cjs +1 -0
- package/dist/fileupload-CGKUJrlj.cjs +401 -0
- package/dist/{fileupload-2hf8YNhO.js → fileupload-D4gQN64T.js} +156 -176
- package/dist/focus-trap-DG3pEuyJ.js +60 -0
- package/dist/focus-trap-DSv4Ifqm.cjs +1 -0
- package/dist/footer-BIrJeRuZ.js +303 -0
- package/dist/footer-Ber-jqM1.cjs +114 -0
- package/dist/footer.d.ts +1 -0
- package/dist/header-BFk1an4z.cjs +465 -0
- package/dist/header-Deg_LGJo.js +1287 -0
- package/dist/header-menu-BHqK4QA6.cjs +126 -0
- package/dist/{header-menu-C8b5vd3n.js → header-menu-GFtJKM4j.js} +25 -97
- package/dist/{helptext-OfqH5npD.js → helptext-C_brWCIT.js} +1 -1
- package/dist/{helptext-eckq4JEX.cjs → helptext-Cq5rNaAC.cjs} +1 -1
- package/dist/{input-element-ZGOWsvKM.cjs → input-element-B0qLbEdF.cjs} +1 -1
- package/dist/{input-element-BFHpeoV8.js → input-element-C0RnXi-J.js} +5 -2
- package/dist/{input-wrapper-DwwE0JcO.js → input-wrapper-BweP6t3O.js} +12 -0
- package/dist/{input-wrapper-BRjQB4zM.cjs → input-wrapper-DPkkiG7S.cjs} +13 -11
- package/dist/{input-wrapper-DaA98B5l.js → input-wrapper-fWV5P4MN.js} +22 -15
- package/dist/{input-wrapper-LcZjpt0L.cjs → input-wrapper-wh3fWIhk.cjs} +1 -1
- package/dist/modal-CPnFteYS.cjs +35 -0
- package/dist/{modal-C6pScpdG.js → modal-xNK_wpHk.js} +11 -20
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.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 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -0
- package/dist/pkt-footer.js +2 -0
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +2 -2
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +27 -26
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- 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-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.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/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{radiobutton-DGO6H2Ki.js → radiobutton-C6htwDrT.js} +1 -1
- package/dist/{radiobutton-DY1WWepJ.cjs → radiobutton-DjWBoSHv.cjs} +1 -1
- package/dist/scroll-lock-BN8lOhV5.cjs +1 -0
- package/dist/scroll-lock-DAbNKAUy.js +18 -0
- package/dist/searchinput-CfUVfpqL.js +156 -0
- package/dist/searchinput-DGjeN1YI.cjs +60 -0
- package/dist/{select-D4_HQFkh.cjs → select-CZvAW7W2.cjs} +2 -1
- package/dist/{select-BwHUIlwQ.js → select-CsBXXbLP.js} +4 -3
- package/dist/setupTests.d.ts +0 -0
- package/dist/shared-types/footer.d.ts +95 -0
- package/dist/shared-types/{header-menu.d.ts → header-footer.d.ts} +51 -4
- package/dist/shared-types/header.d.ts +1 -1
- package/dist/shared-types/index.d.ts +6 -4
- package/dist/shared-types/searchinput.d.ts +2 -0
- package/dist/shared-types/select.d.ts +3 -2
- package/dist/shared-types/size.d.ts +4 -0
- package/dist/shared-types/timepicker.d.ts +0 -6
- package/dist/shared-utils/datepicker-utils.d.ts +5 -4
- package/dist/shared-utils/fileupload/focus-trap.d.ts +4 -10
- package/dist/shared-utils/focus-trap/index.d.ts +22 -0
- package/dist/shared-utils/{header-menu → header-footer}/example-data.d.ts +5 -4
- package/dist/shared-utils/header-footer/external-domain.d.ts +26 -0
- package/dist/shared-utils/{header-menu → header-footer}/fetch-header-footer-data.d.ts +6 -2
- package/dist/shared-utils/{header-menu → header-footer}/index.d.ts +2 -1
- package/dist/shared-utils/{header-menu → header-footer}/select-megamenu.d.ts +1 -1
- package/dist/shared-utils/scroll-lock/index.d.ts +24 -0
- package/dist/tabs-BqrKLCjd.js +214 -0
- package/dist/tabs-q62MK_-r.cjs +40 -0
- package/dist/{textarea-D6M7ZhtA.js → textarea-Cm392CEI.js} +5 -3
- package/dist/{textarea-Bt_Zs8gq.cjs → textarea-sTcZxOIB.cjs} +3 -2
- package/dist/{textinput-EDKjcUdg.cjs → textinput-DqJbTglM.cjs} +3 -2
- package/dist/{textinput-oU2EvFsi.js → textinput-TSPcBcih.js} +5 -3
- package/dist/{timepicker-CgOL2sd9.cjs → timepicker-CqFYMV8q.cjs} +8 -7
- package/dist/{timepicker-_G0V_HV3.js → timepicker-DWbgTDKq.js} +10 -9
- package/package.json +3 -3
- package/src/components/accordion/accordion-context.ts +8 -0
- package/src/components/accordion/accordion.test.ts +44 -0
- package/src/components/accordion/accordion.ts +13 -3
- package/src/components/accordion/accordionitem.ts +9 -1
- package/src/components/alert/alert.test.ts +51 -2
- package/src/components/alert/alert.ts +11 -5
- package/src/components/breadcrumbs/breadcrumbs.test.ts +11 -3
- package/src/components/button/button.test.ts +23 -0
- package/src/components/button/button.ts +28 -3
- package/src/components/combobox/combobox.core.test.ts +20 -0
- package/src/components/combobox/combobox.ts +2 -0
- package/src/components/consent/consent.test.ts +6 -3
- package/src/components/consent/consent.ts +15 -7
- package/src/components/datepicker/datepicker-base.ts +5 -1
- package/src/components/datepicker/datepicker-utils.test.ts +10 -0
- package/src/components/datepicker/datepicker.core.test.ts +17 -0
- package/src/components/datepicker/datepicker.ts +8 -0
- package/src/components/footer/footer-base.ts +238 -0
- package/src/components/footer/footer-simple.ts +71 -0
- package/src/components/footer/footer.accessibility.test.ts +66 -0
- package/src/components/footer/footer.test.ts +238 -0
- package/src/components/footer/footer.ts +81 -0
- package/src/components/footer/index.ts +4 -0
- package/src/components/footer/types.ts +21 -0
- package/src/components/header/header-chrome-controller.ts +123 -0
- package/src/components/header/header-global.accessibility.test.ts +110 -0
- package/src/components/header/header-global.test.ts +329 -0
- package/src/components/header/header-global.ts +648 -0
- package/src/components/header/header-service.accessibility.test.ts +79 -0
- package/src/components/header/header-service.test.ts +32 -12
- package/src/components/header/header-service.ts +38 -162
- package/src/components/header/header-user-menu.ts +0 -1
- package/src/components/header/header.test.ts +84 -0
- package/src/components/header/header.ts +52 -5
- package/src/components/header/index.ts +6 -0
- package/src/components/header/types.ts +38 -0
- package/src/components/header-menu/header-menu.test.ts +131 -10
- package/src/components/header-menu/header-menu.ts +23 -24
- package/src/components/header-menu/types.ts +1 -1
- package/src/components/index.ts +18 -2
- package/src/components/input-wrapper/input-wrapper.test.ts +45 -0
- package/src/components/input-wrapper/input-wrapper.ts +17 -9
- package/src/components/modal/modal.ts +8 -9
- package/src/components/searchinput/searchinput.test.ts +43 -0
- package/src/components/searchinput/searchinput.ts +29 -12
- package/src/components/select/index.ts +1 -1
- package/src/components/select/select.test.ts +28 -0
- package/src/components/select/select.ts +4 -3
- package/src/components/textarea/textarea.test.ts +16 -0
- package/src/components/textarea/textarea.ts +3 -1
- package/src/components/textinput/textinput.test.ts +28 -0
- package/src/components/textinput/textinput.ts +3 -1
- package/src/components/timepicker/timepicker.test.ts +26 -0
- package/src/components/timepicker/timepicker.ts +12 -6
- package/dist/accordion-FISAiAbX.cjs +0 -47
- package/dist/button-C_YzTSuU.js +0 -96
- package/dist/combobox-D6H9rWPV.cjs +0 -135
- package/dist/consent-X3wvhteO.cjs +0 -10
- package/dist/fileupload-BLVrslUX.cjs +0 -401
- package/dist/header-CFrsaq0c.cjs +0 -310
- package/dist/header-D_xvPR4R.js +0 -801
- package/dist/header-menu-DMdP_c6X.cjs +0 -126
- package/dist/modal-DKU7PnjJ.cjs +0 -35
- package/dist/searchinput-CyO5k4Q4.js +0 -148
- package/dist/searchinput-DG6YetL1.cjs +0 -60
- package/dist/shared-utils/modal-scroll-lock.d.ts +0 -10
- package/dist/tabs-CGo0ODPa.cjs +0 -40
- package/dist/tabs-ChdR0D1C.js +0 -379
- /package/dist/shared-utils/{header-menu → header-footer}/icon-map.d.ts +0 -0
package/dist/header-CFrsaq0c.cjs
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
const e=require("./element-DJzurxgt.cjs"),t=require("./class-map-CCZN5uS3.cjs"),n=require("./element-with-slot-BY7Jc-q8.cjs");require("./icon-B8PVq2O6.cjs");const r=require("./if-defined-DrwbxQOj.cjs");require("./button-B5tQpKeG.cjs");const i=require("./ref-DO7TzO4O.cjs"),a=require("./booleanish-B9Kf0nES.cjs");require("./link-Geze7498.cjs"),require("./textinput-EDKjcUdg.cjs");var o=e=>typeof e.target==`string`?{title:e.title,iconName:e.iconName,href:e.target}:{title:e.title,iconName:e.iconName,onClick:e.target},s=e=>o(e),c=e=>{if(!e)return;let t=typeof e==`string`?new Date(e):e;if(!isNaN(t.getTime()))return t.toLocaleDateString(`nb-NO`,{day:`numeric`,month:`long`,year:`numeric`,hour:`2-digit`,minute:`2-digit`})},l=class extends e.t{constructor(...e){super(...e),this.canChangeRepresentation=!1,this.logoutOnClick=!1}handleChangeRepresentation(){this.dispatchEvent(new CustomEvent(`change-representation`,{bubbles:!0,composed:!0}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleMenuItemClick(e){`onClick`in e&&typeof e.onClick==`function`&&e.onClick()}renderLinkOrButton(n,r){let i=`href`in n,a=t.t({"pkt-user-menu__link":!0,"pkt-link-button":!i,"pkt-link":!i,"pkt-link--icon-left":!i,[r||``]:!!r});return i?e.p`
|
|
2
|
-
<pkt-link
|
|
3
|
-
icon-name=${n.iconName||e.d}
|
|
4
|
-
href=${n.href}
|
|
5
|
-
aria-hidden="true"
|
|
6
|
-
class="pkt-user-menu__link ${r||``}"
|
|
7
|
-
>
|
|
8
|
-
${n.title}
|
|
9
|
-
</pkt-link>
|
|
10
|
-
`:e.p`
|
|
11
|
-
<button class=${a} type="button" @click=${()=>this.handleMenuItemClick(n)}>
|
|
12
|
-
${n.iconName?e.p`<pkt-icon
|
|
13
|
-
name=${n.iconName}
|
|
14
|
-
class="pkt-link__icon"
|
|
15
|
-
aria-hidden="true"
|
|
16
|
-
></pkt-icon>`:e.d}
|
|
17
|
-
${n.title}
|
|
18
|
-
</button>
|
|
19
|
-
`}renderLinkSection(t){return e.p`
|
|
20
|
-
<ul class="pkt-user-menu__sublist">
|
|
21
|
-
${t.map(t=>e.p`
|
|
22
|
-
<li class="pkt-user-menu__subitem">${this.renderLinkOrButton(t)}</li>
|
|
23
|
-
`)}
|
|
24
|
-
</ul>
|
|
25
|
-
`}render(){let t=this.userMenu?.map(s);return e.p`
|
|
26
|
-
<nav class="pkt-user-menu" aria-label="Meny for innlogget bruker">
|
|
27
|
-
<ul class="pkt-user-menu__list">
|
|
28
|
-
<!-- User section -->
|
|
29
|
-
${this.user?e.p`
|
|
30
|
-
<li class="pkt-user-menu__item">
|
|
31
|
-
<div class="pkt-user-menu__label">Pålogget som</div>
|
|
32
|
-
<div class="pkt-user-menu__name" translate="no">${this.user.name}</div>
|
|
33
|
-
${this.formattedLastLoggedIn?e.p`
|
|
34
|
-
<div class="pkt-user-menu__last-logged-in">
|
|
35
|
-
Sist pålogget: <time>${this.formattedLastLoggedIn}</time>
|
|
36
|
-
</div>
|
|
37
|
-
`:e.d}
|
|
38
|
-
</li>
|
|
39
|
-
`:e.d}
|
|
40
|
-
|
|
41
|
-
<!-- User menu items -->
|
|
42
|
-
${t&&t.length>0?e.p`
|
|
43
|
-
<li class="pkt-user-menu__item">${this.renderLinkSection(t)}</li>
|
|
44
|
-
`:e.d}
|
|
45
|
-
|
|
46
|
-
<!-- Representing section -->
|
|
47
|
-
${this.representing?e.p`
|
|
48
|
-
<li class="pkt-user-menu__item">
|
|
49
|
-
<div class="pkt-user-menu__label">Representerer</div>
|
|
50
|
-
<div class="pkt-user-menu__name" translate="no">${this.representing.name}</div>
|
|
51
|
-
${this.representing.orgNumber?e.p`<div class="pkt-user-menu__org-number">
|
|
52
|
-
Org.nr. ${this.representing.orgNumber}
|
|
53
|
-
</div>`:e.d}
|
|
54
|
-
${this.canChangeRepresentation?e.p`
|
|
55
|
-
<ul class="pkt-user-menu__sublist mt-size-16">
|
|
56
|
-
<li class="pkt-user-menu__subitem">
|
|
57
|
-
${this.renderLinkOrButton({title:`Endre organisasjon`,iconName:`cogwheel`,onClick:()=>this.handleChangeRepresentation()})}
|
|
58
|
-
</li>
|
|
59
|
-
</ul>
|
|
60
|
-
`:e.d}
|
|
61
|
-
</li>
|
|
62
|
-
`:e.d}
|
|
63
|
-
|
|
64
|
-
<!-- Change representation without representing object -->
|
|
65
|
-
${!this.representing&&this.canChangeRepresentation?e.p`
|
|
66
|
-
<li class="pkt-user-menu__item">
|
|
67
|
-
<ul class="pkt-user-menu__sublist">
|
|
68
|
-
<li class="pkt-user-menu__subitem">
|
|
69
|
-
${this.renderLinkOrButton({title:`Endre organisasjon`,iconName:`cogwheel`,onClick:()=>this.handleChangeRepresentation()})}
|
|
70
|
-
</li>
|
|
71
|
-
</ul>
|
|
72
|
-
</li>
|
|
73
|
-
`:e.d}
|
|
74
|
-
|
|
75
|
-
<!-- Logout -->
|
|
76
|
-
${this.logoutOnClick?e.p`
|
|
77
|
-
<li class="pkt-user-menu__item">
|
|
78
|
-
${this.renderLinkOrButton({title:`Logg ut`,iconName:`exit`,onClick:()=>this.handleLogout()})}
|
|
79
|
-
</li>
|
|
80
|
-
`:e.d}
|
|
81
|
-
</ul>
|
|
82
|
-
</nav>
|
|
83
|
-
`}};e.n([e.o({type:Object})],l.prototype,`user`,void 0),e.n([e.o({type:String,attribute:`formatted-last-logged-in`})],l.prototype,`formattedLastLoggedIn`,void 0),e.n([e.o({type:Object})],l.prototype,`representing`,void 0),e.n([e.o({type:Array,attribute:`user-menu`})],l.prototype,`userMenu`,void 0),e.n([e.o({type:Boolean,attribute:`can-change-representation`,converter:a.t})],l.prototype,`canChangeRepresentation`,void 0),e.n([e.o({type:Boolean,attribute:`logout-on-click`,converter:a.t})],l.prototype,`logoutOnClick`,void 0);try{e.s(`pkt-header-user-menu`)(l)}catch{console.warn(`Forsøker å definere <pkt-header-user-menu>, men den er allerede definert`)}var u=`https://punkt-cdn.oslo.kommune.no/latest/logos/`;typeof window<`u`&&(window.pktLogoPath=window.pktLogoPath||u);var d=class extends n.t{constructor(...e){super(...e),this.logoPath=typeof window<`u`?window.pktLogoPath:u,this.searchPlaceholder=`Søk`,this.searchValue=``,this.mobileBreakpoint=768,this.tabletBreakpoint=1280,this.openedMenu=`none`,this.logOutButtonPlacement=`none`,this.position=`fixed`,this.scrollBehavior=`hide`,this.slotMenuVariant=`icon-only`,this.slotMenuText=`Meny`,this.hideLogo=!1,this.compact=!1,this.showSearch=!1,this.canChangeRepresentation=!1,this.hasLogOut=!1,this.isMobile=!1,this.isTablet=!1,this.openMenu=`none`,this.isHidden=!1,this.componentWidth=typeof window<`u`?window.innerWidth:0,this.alignSlotRight=!1,this.alignSearchRight=!1,this.headerRef=i.t(),this.userContainerRef=i.t(),this.slotContainerRef=i.t(),this.searchContainerRef=i.t(),this.slotContentRef=i.t(),this.searchMenuRef=i.t(),this.lastScrollPosition=0,this.savedScrollY=0,this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(!this.shouldHideOnScroll)return;let e=window.pageYOffset||document.documentElement.scrollTop;e<0||Math.abs(e-this.lastScrollPosition)<60||(this.isHidden=e>this.lastScrollPosition,this.lastScrollPosition=e)},this.handleClickOutside=e=>{let t=e.target;this.user&&this.openMenu===`user`&&!t.closest(`.pkt-header-service__user-container`)&&(this.openMenu=`none`),this.openMenu===`slot`&&!t.closest(`.pkt-header-service__slot-container`)&&(this.openMenu=`none`),this.openMenu===`search`&&!t.closest(`.pkt-header-service__search-container`)&&!t.closest(`.pkt-header-service__search-input`)&&(this.openMenu=`none`)},this.handleSlotContentClick=e=>{if(!this.isTablet||this.openMenu!==`slot`)return;let t=e.target.closest(`a[href], button, [role="link"], [role="button"], [role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"]`);!t||!this.slotContentRef.value?.contains(t)||t.closest(`[data-pkt-header-keep-open]`)||t.disabled||t.getAttribute(`aria-disabled`)===`true`||(this.openMenu=`none`)},this.handleFocusOut=(e,t)=>{let n=e.relatedTarget,r;switch(t){case`user`:r=this.userContainerRef;break;case`slot`:r=this.slotContainerRef;break;case`search`:r=this.searchContainerRef;break;default:return}let i=r.value;i&&(!n||!i.contains(n))&&(this.openMenu=`none`)},this.handleEscapeKey=e=>{e.key===`Escape`&&this.openMenu!==`none`&&(e.preventDefault(),this.shouldRestoreFocus=!0,this.openMenu=`none`)}}connectedCallback(){super.connectedCallback(),this.setupScrollListener()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),window.removeEventListener(`scroll`,this.handleScroll),this.unlockScroll()}firstUpdated(){this.setupResizeObserver()}updated(e){if(super.updated(e),e.has(`openedMenu`)&&this.openedMenu!==this.openMenu&&(this.openMenu=this.openedMenu),(e.has(`mobileBreakpoint`)||e.has(`tabletBreakpoint`))&&(this.updateIsMobile(),this.updateIsTablet()),e.has(`openMenu`)){let t=e.get(`openMenu`);this.openMenu!==`none`&&(t===`none`||t===void 0)?(document.addEventListener(`mousedown`,this.handleClickOutside),document.addEventListener(`keydown`,this.handleEscapeKey),(this.openMenu===`slot`||this.openMenu===`search`)&&requestAnimationFrame(()=>{this.checkDropdownAlignment(this.openMenu)})):this.openMenu===`none`&&t!==`none`&&(document.removeEventListener(`mousedown`,this.handleClickOutside),document.removeEventListener(`keydown`,this.handleEscapeKey),this.restoreFocus())}(e.has(`openMenu`)||e.has(`isMobile`))&&this.updateScrollLock()}setupResizeObserver(){let e=this.headerRef.value;e&&(this.componentWidth=e.offsetWidth,this.updateIsMobile(),this.updateIsTablet(),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)t.borderBoxSize&&t.borderBoxSize.length>0?this.componentWidth=t.borderBoxSize[0].inlineSize:this.componentWidth=t.contentRect.width,this.updateIsMobile(),this.updateIsTablet()}),this.resizeObserver.observe(e))}updateIsMobile(){this.isMobile=this.componentWidth<this.mobileBreakpoint}updateIsTablet(){this.isTablet=this.componentWidth<this.tabletBreakpoint}updateScrollLock(){this.position===`fixed`&&this.isMobile&&this.openMenu!==`none`?this.lockScroll():this.unlockScroll()}lockScroll(){let e=document.body,t=document.documentElement;this.savedScrollY=window.scrollY||window.pageYOffset;let n=window.innerWidth-t.clientWidth;n>0&&(e.style.paddingRight=`${n}px`),e.style.position=`fixed`,e.style.top=`-${this.savedScrollY}px`,e.style.left=`0`,e.style.right=`0`,e.style.width=`100%`,e.style.overflow=`hidden`,t.classList.add(`is-scroll-locked`)}unlockScroll(){let e=document.body,t=document.documentElement;t.classList.contains(`is-scroll-locked`)&&(e.style.removeProperty(`position`),e.style.removeProperty(`top`),e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`width`),e.style.removeProperty(`overflow`),e.style.removeProperty(`padding-right`),t.classList.remove(`is-scroll-locked`),window.scrollTo({top:this.savedScrollY}))}setupScrollListener(){window.addEventListener(`scroll`,this.handleScroll)}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}checkDropdownAlignment(e){let t=e===`slot`?this.slotContainerRef:this.searchContainerRef,n=e===`slot`?this.slotContentRef:this.searchMenuRef;if(!t.value||!n.value||!this.isTablet||this.isMobile)return;let r=t.value.getBoundingClientRect(),i=n.value.offsetWidth,a=r.left+i>window.innerWidth;e===`slot`?this.alignSlotRight=a:this.alignSearchRight=a}handleMenuToggle(e){this.openMenu===`none`?(this.lastFocusedElement=document.activeElement,this.openMenu=e):this.openMenu=`none`}handleLogoClick(e){this.dispatchEvent(new CustomEvent(`logo-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleServiceClick(e){this.dispatchEvent(new CustomEvent(`service-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleSearch(e){this.dispatchEvent(new CustomEvent(`search`,{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchChange(e){this.dispatchEvent(new CustomEvent(`search-change`,{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchInputChange(e){let t=e.target.value;this.handleSearchChange(t)}handleSearchKeyDown(e){e.key===`Enter`&&this.handleSearch(e.target.value)}get formattedLastLoggedIn(){return c(this.user?.lastLoggedIn)}get isFixed(){return this.position===`fixed`}get shouldHideOnScroll(){return this.scrollBehavior===`hide`}get showLogoutInHeader(){return this.hasLogOut&&(this.logOutButtonPlacement===`header`||this.logOutButtonPlacement===`both`)}get showLogoutInUserMenu(){return this.hasLogOut&&(this.logOutButtonPlacement===`userMenu`||this.logOutButtonPlacement===`both`)}renderLogo(){if(this.hideLogo)return e.d;let t=e.p`
|
|
84
|
-
<pkt-icon name="oslologo" aria-hidden="true" path=${this.logoPath}></pkt-icon>
|
|
85
|
-
`;return this.logoLink&&typeof this.logoLink==`string`?e.p`
|
|
86
|
-
<span class="pkt-header-service__logo">
|
|
87
|
-
<a href=${this.logoLink} aria-label="Tilbake til forside" @click=${this.handleLogoClick}>
|
|
88
|
-
${t}
|
|
89
|
-
</a>
|
|
90
|
-
</span>
|
|
91
|
-
`:this.hasAttribute(`logo-link`)?e.p`
|
|
92
|
-
<span class="pkt-header-service__logo">
|
|
93
|
-
<button
|
|
94
|
-
aria-label="Tilbake til forside"
|
|
95
|
-
class="pkt-link-button pkt-link pkt-header-service__logo-link"
|
|
96
|
-
@click=${this.handleLogoClick}
|
|
97
|
-
>
|
|
98
|
-
${t}
|
|
99
|
-
</button>
|
|
100
|
-
</span>
|
|
101
|
-
`:e.p`
|
|
102
|
-
<span class="pkt-header-service__logo" @click=${this.handleLogoClick}>${t}</span>
|
|
103
|
-
`}renderServiceName(){return this.serviceName?this.serviceLink&&typeof this.serviceLink==`string`?e.p`
|
|
104
|
-
<span class="pkt-header-service__service-name" translate="no">
|
|
105
|
-
<pkt-link
|
|
106
|
-
href=${this.serviceLink}
|
|
107
|
-
class="pkt-header-service__service-link"
|
|
108
|
-
@click=${this.handleServiceClick}
|
|
109
|
-
>
|
|
110
|
-
${this.serviceName}
|
|
111
|
-
</pkt-link>
|
|
112
|
-
</span>
|
|
113
|
-
`:this.hasAttribute(`service-link`)?e.p`
|
|
114
|
-
<span class="pkt-header-service__service-name" translate="no">
|
|
115
|
-
<button
|
|
116
|
-
class="pkt-link-button pkt-link pkt-header-service__service-link"
|
|
117
|
-
@click=${this.handleServiceClick}
|
|
118
|
-
>
|
|
119
|
-
${this.serviceName}
|
|
120
|
-
</button>
|
|
121
|
-
</span>
|
|
122
|
-
`:e.p`
|
|
123
|
-
<span
|
|
124
|
-
class="pkt-header-service__service-name"
|
|
125
|
-
translate="no"
|
|
126
|
-
@click=${this.handleServiceClick}
|
|
127
|
-
>
|
|
128
|
-
<span class="pkt-header-service__service-link">${this.serviceName}</span>
|
|
129
|
-
</span>
|
|
130
|
-
`:e.d}renderSlotContainer(){if(!this.hasSlotContent())return e.d;let r=t.t({"pkt-header-service__slot-container":!0,"is-open":this.openMenu===`slot`}),a=t.t({"pkt-header-service__slot-content":!0,"align-right":this.alignSlotRight});return e.p`
|
|
131
|
-
<div
|
|
132
|
-
class=${r}
|
|
133
|
-
@focusout=${e=>this.handleFocusOut(e,`slot`)}
|
|
134
|
-
${i.n(this.slotContainerRef)}
|
|
135
|
-
>
|
|
136
|
-
${this.isTablet&&this.hasSlotContent()?e.p`
|
|
137
|
-
<pkt-button
|
|
138
|
-
skin="secondary"
|
|
139
|
-
variant=${this.slotMenuVariant}
|
|
140
|
-
iconName="menu"
|
|
141
|
-
size=${this.isMobile?`small`:`medium`}
|
|
142
|
-
state=${this.openMenu===`slot`?`active`:`normal`}
|
|
143
|
-
@click=${()=>this.handleMenuToggle(`slot`)}
|
|
144
|
-
aria-expanded=${this.openMenu===`slot`}
|
|
145
|
-
aria-controls="mobile-slot-menu"
|
|
146
|
-
aria-label="Åpne meny"
|
|
147
|
-
>
|
|
148
|
-
${this.slotMenuText}
|
|
149
|
-
</pkt-button>
|
|
150
|
-
`:e.d}
|
|
151
|
-
<div
|
|
152
|
-
class=${a}
|
|
153
|
-
id="mobile-slot-menu"
|
|
154
|
-
role=${this.isTablet?`menu`:e.d}
|
|
155
|
-
aria-label=${this.isTablet?`Meny`:e.d}
|
|
156
|
-
@click=${this.handleSlotContentClick}
|
|
157
|
-
${i.n(this.slotContentRef)}
|
|
158
|
-
>
|
|
159
|
-
${n.n(this)}
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
`}renderSearch(){if(!this.showSearch)return e.d;if(this.isTablet){let n=t.t({"pkt-header-service__search-container":!0,"is-open":this.openMenu===`search`}),r=t.t({"pkt-header-service__mobile-menu":!0,"is-open":this.openMenu===`search`,"align-right":this.alignSearchRight});return e.p`
|
|
163
|
-
<div
|
|
164
|
-
class=${n}
|
|
165
|
-
@focusout=${e=>this.handleFocusOut(e,`search`)}
|
|
166
|
-
${i.n(this.searchContainerRef)}
|
|
167
|
-
>
|
|
168
|
-
<pkt-button
|
|
169
|
-
skin="secondary"
|
|
170
|
-
variant="icon-only"
|
|
171
|
-
iconName="magnifying-glass-big"
|
|
172
|
-
size=${this.isMobile?`small`:`medium`}
|
|
173
|
-
@click=${()=>this.handleMenuToggle(`search`)}
|
|
174
|
-
state=${this.openMenu===`search`?`active`:`normal`}
|
|
175
|
-
aria-expanded=${this.openMenu===`search`}
|
|
176
|
-
aria-controls="mobile-search-menu"
|
|
177
|
-
aria-label="Åpne søkefelt"
|
|
178
|
-
>
|
|
179
|
-
Søk
|
|
180
|
-
</pkt-button>
|
|
181
|
-
<div class=${r} ${i.n(this.searchMenuRef)}>
|
|
182
|
-
${this.openMenu===`search`?e.p`
|
|
183
|
-
<pkt-textinput
|
|
184
|
-
id="mobile-search-menu"
|
|
185
|
-
class="pkt-header-service__search-input"
|
|
186
|
-
type="search"
|
|
187
|
-
label="Søk"
|
|
188
|
-
useWrapper="false"
|
|
189
|
-
placeholder=${this.searchPlaceholder}
|
|
190
|
-
value=${this.searchValue}
|
|
191
|
-
autofocus
|
|
192
|
-
fullwidth
|
|
193
|
-
@input=${this.handleSearchInputChange}
|
|
194
|
-
@keydown=${e=>{e.key===`Enter`&&this.handleSearch(e.target.value)}}
|
|
195
|
-
></pkt-textinput>
|
|
196
|
-
`:e.d}
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
`}return e.p`
|
|
200
|
-
<pkt-textinput
|
|
201
|
-
id="header-service-search"
|
|
202
|
-
class="pkt-header-service__search-input"
|
|
203
|
-
type="search"
|
|
204
|
-
label="Søk"
|
|
205
|
-
useWrapper="false"
|
|
206
|
-
placeholder=${this.searchPlaceholder}
|
|
207
|
-
value=${this.searchValue}
|
|
208
|
-
@input=${this.handleSearchInputChange}
|
|
209
|
-
@keydown=${this.handleSearchKeyDown}
|
|
210
|
-
></pkt-textinput>
|
|
211
|
-
`}renderUserButton(){if(!this.user)return e.d;let n=t.t({"pkt-header-service__user-menu":this.isMobile===!1,"pkt-header-service__mobile-menu":this.isMobile===!0,"is-open":this.openMenu===`user`});return e.p`
|
|
212
|
-
<div
|
|
213
|
-
class="pkt-header-service__user-container"
|
|
214
|
-
@focusout=${e=>this.handleFocusOut(e,`user`)}
|
|
215
|
-
${i.n(this.userContainerRef)}
|
|
216
|
-
>
|
|
217
|
-
<pkt-button
|
|
218
|
-
class=${t.t({"pkt-header-service__user-button":!0,"pkt-header-service__user-button--mobile":this.isMobile})}
|
|
219
|
-
skin="secondary"
|
|
220
|
-
size=${this.isMobile?`small`:`medium`}
|
|
221
|
-
state=${this.openMenu===`user`?`active`:`normal`}
|
|
222
|
-
variant="icons-right-and-left"
|
|
223
|
-
iconName="user"
|
|
224
|
-
secondIconName=${this.openMenu===`user`?`chevron-thin-up`:`chevron-thin-down`}
|
|
225
|
-
@click=${()=>this.handleMenuToggle(`user`)}
|
|
226
|
-
>
|
|
227
|
-
<span class="pkt-sr-only">Brukermeny: </span>
|
|
228
|
-
<span translate="no">${this.representing?.name||this.user.name}</span>
|
|
229
|
-
</pkt-button>
|
|
230
|
-
${this.openMenu===`user`&&this.user?e.p`
|
|
231
|
-
<div class=${n}>
|
|
232
|
-
<pkt-header-user-menu
|
|
233
|
-
.user=${this.user}
|
|
234
|
-
formatted-last-logged-in=${this.formattedLastLoggedIn||e.d}
|
|
235
|
-
.representing=${this.representing}
|
|
236
|
-
.userMenu=${this.userMenu}
|
|
237
|
-
?can-change-representation=${this.canChangeRepresentation}
|
|
238
|
-
?logout-on-click=${this.showLogoutInUserMenu}
|
|
239
|
-
@change-representation=${()=>this.dispatchEvent(new CustomEvent(`change-representation`,{bubbles:!0,composed:!0}))}
|
|
240
|
-
@log-out=${this.handleLogout}
|
|
241
|
-
></pkt-header-user-menu>
|
|
242
|
-
</div>
|
|
243
|
-
`:e.d}
|
|
244
|
-
</div>
|
|
245
|
-
`}renderHeader(){let n=t.t({"pkt-header-service":!0,"pkt-header-service--compact":this.compact,"pkt-header-service--mobile":this.isMobile,"pkt-header-service--tablet":this.isTablet,"pkt-header-service--fixed":this.isFixed,"pkt-header-service--scroll-to-hide":this.shouldHideOnScroll,"pkt-header-service--hidden":this.isHidden}),r=t.t({"pkt-header-service__logo-area":!0,"pkt-header-service__logo-area--without-service":!this.serviceName});return e.p`
|
|
246
|
-
<header class=${n} ${i.n(this.headerRef)}>
|
|
247
|
-
<div class=${r}>${this.renderLogo()} ${this.renderServiceName()}</div>
|
|
248
|
-
|
|
249
|
-
${this.hasSlotContent()||this.showSearch||this.showLogoutInHeader?e.p`<div class="pkt-header-service__content">
|
|
250
|
-
${this.renderSlotContainer()} ${this.renderSearch()}
|
|
251
|
-
${this.isTablet&&this.showLogoutInHeader?e.p`
|
|
252
|
-
<pkt-button
|
|
253
|
-
skin="secondary"
|
|
254
|
-
size=${this.isMobile?`small`:`medium`}
|
|
255
|
-
variant="icon-only"
|
|
256
|
-
iconName="exit"
|
|
257
|
-
@click=${this.handleLogout}
|
|
258
|
-
>
|
|
259
|
-
Logg ut
|
|
260
|
-
</pkt-button>
|
|
261
|
-
`:e.d}
|
|
262
|
-
</div>`:e.d}
|
|
263
|
-
${this.user||!this.isTablet&&this.showLogoutInHeader?e.p`<div class="pkt-header-service__user">
|
|
264
|
-
${this.renderUserButton()}
|
|
265
|
-
${!this.isTablet&&this.showLogoutInHeader?e.p`
|
|
266
|
-
<pkt-button
|
|
267
|
-
skin="tertiary"
|
|
268
|
-
size="medium"
|
|
269
|
-
variant="icon-right"
|
|
270
|
-
iconName="exit"
|
|
271
|
-
@click=${this.handleLogout}
|
|
272
|
-
>
|
|
273
|
-
Logg ut
|
|
274
|
-
</pkt-button>
|
|
275
|
-
`:e.d}
|
|
276
|
-
</div>`:e.d}
|
|
277
|
-
</header>
|
|
278
|
-
`}render(){let n=this.renderHeader();return this.isFixed?e.p`
|
|
279
|
-
<div class="pkt-header-service-wrapper">
|
|
280
|
-
${n}
|
|
281
|
-
<div class=${t.t({"pkt-header-service-spacer":!0,"pkt-header-service-spacer--compact":this.compact,"pkt-header-service-spacer--has-user":!!this.user,"pkt-header-service-spacer--mobile":this.isMobile,"pkt-header-service-spacer--tablet":this.isTablet})}></div>
|
|
282
|
-
</div>
|
|
283
|
-
`:n}};e.n([e.o({type:String,attribute:`service-name`})],d.prototype,`serviceName`,void 0),e.n([e.o({type:String,attribute:`service-link`})],d.prototype,`serviceLink`,void 0),e.n([e.o({type:String,attribute:`logo-link`})],d.prototype,`logoLink`,void 0),e.n([e.o({type:String,attribute:`logo-path`})],d.prototype,`logoPath`,void 0),e.n([e.o({type:String,attribute:`search-placeholder`})],d.prototype,`searchPlaceholder`,void 0),e.n([e.o({type:String,attribute:`search-value`})],d.prototype,`searchValue`,void 0),e.n([e.o({type:Number,attribute:`mobile-breakpoint`})],d.prototype,`mobileBreakpoint`,void 0),e.n([e.o({type:Number,attribute:`tablet-breakpoint`})],d.prototype,`tabletBreakpoint`,void 0),e.n([e.o({type:String,attribute:`opened-menu`})],d.prototype,`openedMenu`,void 0),e.n([e.o({type:String,attribute:`log-out-button-placement`})],d.prototype,`logOutButtonPlacement`,void 0),e.n([e.o({type:String})],d.prototype,`position`,void 0),e.n([e.o({type:String,attribute:`scroll-behavior`})],d.prototype,`scrollBehavior`,void 0),e.n([e.o({type:String,attribute:`slot-menu-variant`})],d.prototype,`slotMenuVariant`,void 0),e.n([e.o({type:String,attribute:`slot-menu-text`})],d.prototype,`slotMenuText`,void 0),e.n([e.o({type:Boolean,attribute:`hide-logo`,converter:a.t})],d.prototype,`hideLogo`,void 0),e.n([e.o({type:Boolean,converter:a.t})],d.prototype,`compact`,void 0),e.n([e.o({type:Boolean,attribute:`show-search`,converter:a.t})],d.prototype,`showSearch`,void 0),e.n([e.o({type:Boolean,attribute:`can-change-representation`,converter:a.t})],d.prototype,`canChangeRepresentation`,void 0),e.n([e.o({type:Boolean,attribute:`has-log-out`,converter:a.t})],d.prototype,`hasLogOut`,void 0),e.n([e.o({type:Object})],d.prototype,`user`,void 0),e.n([e.o({type:Array,attribute:`user-menu`})],d.prototype,`userMenu`,void 0),e.n([e.o({type:Object})],d.prototype,`representing`,void 0),e.n([e.a()],d.prototype,`isMobile`,void 0),e.n([e.a()],d.prototype,`isTablet`,void 0),e.n([e.a()],d.prototype,`openMenu`,void 0),e.n([e.a()],d.prototype,`isHidden`,void 0),e.n([e.a()],d.prototype,`componentWidth`,void 0),e.n([e.a()],d.prototype,`alignSlotRight`,void 0),e.n([e.a()],d.prototype,`alignSearchRight`,void 0);try{e.s(`pkt-header-service`)(d)}catch{console.warn(`Forsøker å definere <pkt-header-service>, men den er allerede definert`)}var f=class extends n.t{constructor(...e){super(...e),this.searchPlaceholder=`Søk`,this.searchValue=``,this.mobileBreakpoint=768,this.tabletBreakpoint=1280,this.openedMenu=`none`,this.logOutButtonPlacement=`none`,this.position=`fixed`,this.scrollBehavior=`hide`,this.slotMenuVariant=`icon-only`,this.slotMenuText=`Meny`,this.hideLogo=!1,this.compact=!1,this.showSearch=!1,this.canChangeRepresentation=!1,this.hasLogOut=!1}firstUpdated(e){super.firstUpdated(e),this.emitDeprecationWarnings()}emitDeprecationWarnings(){this.userMenuFooter!==void 0&&console.warn(`[PktHeader] userMenuFooter is deprecated. Use userMenu instead.`),this.userOptions!==void 0&&console.warn(`[PktHeader] userOptions is deprecated. Use userMenu instead.`)}get effectiveUserMenu(){let e=this.userMenu||[],t=this.userMenuFooter||[],n=this.userOptions||[];return t.length||n.length?[...e,...n,...t]:this.userMenu}render(){return e.p`
|
|
284
|
-
<pkt-header-service
|
|
285
|
-
service-name=${r.t(this.serviceName)}
|
|
286
|
-
service-link=${r.t(this.serviceLink)}
|
|
287
|
-
logo-link=${r.t(this.logoLink)}
|
|
288
|
-
logo-path=${r.t(this.logoPath)}
|
|
289
|
-
search-placeholder=${this.searchPlaceholder}
|
|
290
|
-
search-value=${this.searchValue}
|
|
291
|
-
mobile-breakpoint=${this.mobileBreakpoint}
|
|
292
|
-
tablet-breakpoint=${this.tabletBreakpoint}
|
|
293
|
-
opened-menu=${this.openedMenu}
|
|
294
|
-
log-out-button-placement=${this.logOutButtonPlacement}
|
|
295
|
-
position=${this.position}
|
|
296
|
-
scroll-behavior=${this.scrollBehavior}
|
|
297
|
-
slot-menu-variant=${this.slotMenuVariant}
|
|
298
|
-
slot-menu-text=${this.slotMenuText}
|
|
299
|
-
.hideLogo=${this.hideLogo}
|
|
300
|
-
.compact=${this.compact}
|
|
301
|
-
.showSearch=${this.showSearch}
|
|
302
|
-
.canChangeRepresentation=${this.canChangeRepresentation}
|
|
303
|
-
.hasLogOut=${this.hasLogOut}
|
|
304
|
-
.user=${this.user}
|
|
305
|
-
.userMenu=${this.effectiveUserMenu}
|
|
306
|
-
.representing=${this.representing}
|
|
307
|
-
>
|
|
308
|
-
${this.hasSlotContent()?e.p`<div class="pkt-contents">${n.n(this)}</div>`:e.d}
|
|
309
|
-
</pkt-header-service>
|
|
310
|
-
`}};e.n([e.o({type:String,attribute:`service-name`})],f.prototype,`serviceName`,void 0),e.n([e.o({type:String,attribute:`service-link`})],f.prototype,`serviceLink`,void 0),e.n([e.o({type:String,attribute:`logo-link`})],f.prototype,`logoLink`,void 0),e.n([e.o({type:String,attribute:`logo-path`})],f.prototype,`logoPath`,void 0),e.n([e.o({type:String,attribute:`search-placeholder`})],f.prototype,`searchPlaceholder`,void 0),e.n([e.o({type:String,attribute:`search-value`})],f.prototype,`searchValue`,void 0),e.n([e.o({type:Number,attribute:`mobile-breakpoint`})],f.prototype,`mobileBreakpoint`,void 0),e.n([e.o({type:Number,attribute:`tablet-breakpoint`})],f.prototype,`tabletBreakpoint`,void 0),e.n([e.o({type:String,attribute:`opened-menu`})],f.prototype,`openedMenu`,void 0),e.n([e.o({type:String,attribute:`log-out-button-placement`})],f.prototype,`logOutButtonPlacement`,void 0),e.n([e.o({type:String})],f.prototype,`position`,void 0),e.n([e.o({type:String,attribute:`scroll-behavior`})],f.prototype,`scrollBehavior`,void 0),e.n([e.o({type:String,attribute:`slot-menu-variant`})],f.prototype,`slotMenuVariant`,void 0),e.n([e.o({type:String,attribute:`slot-menu-text`})],f.prototype,`slotMenuText`,void 0),e.n([e.o({type:Boolean,attribute:`hide-logo`,converter:a.t})],f.prototype,`hideLogo`,void 0),e.n([e.o({type:Boolean,converter:a.t})],f.prototype,`compact`,void 0),e.n([e.o({type:Boolean,attribute:`show-search`,converter:a.t})],f.prototype,`showSearch`,void 0),e.n([e.o({type:Boolean,attribute:`can-change-representation`,converter:a.t})],f.prototype,`canChangeRepresentation`,void 0),e.n([e.o({type:Boolean,attribute:`has-log-out`,converter:a.t})],f.prototype,`hasLogOut`,void 0),e.n([e.o({type:Object})],f.prototype,`user`,void 0),e.n([e.o({type:Array,attribute:`user-menu`})],f.prototype,`userMenu`,void 0),e.n([e.o({type:Object})],f.prototype,`representing`,void 0),e.n([e.o({type:Array,attribute:`user-menu-footer`})],f.prototype,`userMenuFooter`,void 0),e.n([e.o({type:Array,attribute:`user-options`})],f.prototype,`userOptions`,void 0);try{e.s(`pkt-header`)(f)}catch{console.warn(`Forsøker å definere <pkt-header>, men den er allerede definert`)}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|