@oslokommune/punkt-elements 17.1.3 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/{accordion-BeLvLPrB.js → accordion-1_pdxTgJ.js} +27 -27
- package/dist/{accordion-B3GBlvUC.cjs → accordion-DobbH-Sv.cjs} +5 -5
- package/dist/{alert-Cs4Rmq_J.cjs → alert-COeHz6o2.cjs} +6 -6
- package/dist/{alert-DKK_Tb9J.js → alert-xspFetQ8.js} +26 -26
- package/dist/{async-directive-Da7TJpnq.cjs → async-directive-B5pcIMfO.cjs} +1 -1
- package/dist/{async-directive-BPf6K-V2.js → async-directive-D2Sht790.js} +5 -5
- package/dist/{backlink-D1y26pj3.js → backlink-C0jZFnZ2.js} +8 -8
- package/dist/{backlink-CMmrKTe4.cjs → backlink-ZMhqHaVs.cjs} +3 -3
- package/dist/base-elements/element.d.ts +13 -1
- package/dist/base-elements/input-element.d.ts +4 -2
- package/dist/{breadcrumbs-B6JGhJgC.cjs → breadcrumbs-BS64xd1s.cjs} +7 -7
- package/dist/{breadcrumbs-CcTQ3Grm.js → breadcrumbs-BvMownZN.js} +16 -16
- package/dist/{button-2-OSPJkj.js → button-C44vNLFC.js} +28 -28
- package/dist/{button-CE97NQIk.cjs → button-CR4CXtnj.cjs} +7 -7
- package/dist/{calendar-kn4SrtJy.cjs → calendar-DQ4byeom.cjs} +28 -27
- package/dist/{calendar-pOW3R5Pw.js → calendar-DgjCKMMV.js} +82 -68
- package/dist/{card-zQ0eKRMV.js → card-DhHqC265.js} +44 -44
- package/dist/{card-CETDFkxR.cjs → card-Dpqi6HVt.cjs} +26 -26
- package/dist/{checkbox-CH7NpINF.js → checkbox-BQ1K57AB.js} +23 -23
- package/dist/{checkbox-CQNr_sEg.cjs → checkbox-CXQxbiaX.cjs} +11 -11
- package/dist/{class-map-BeimMvPv.cjs → class-map-CzCE5pqG.cjs} +1 -1
- package/dist/{class-map-CnWCnBSX.js → class-map-F1DJHyb7.js} +3 -3
- package/dist/{combobox-Bvg0UO9w.cjs → combobox-BV4oDiII.cjs} +19 -18
- package/dist/{combobox-CRdYYlxu.js → combobox-DPck39I2.js} +55 -54
- package/dist/components/calendar/calendar.d.ts +21 -6
- package/dist/components/checkbox/checkbox.d.ts +4 -2
- package/dist/components/combobox/combobox-base.d.ts +2 -1
- package/dist/components/consent/strings.d.ts +1 -85
- package/dist/components/datepicker/datepicker-base.d.ts +0 -3
- package/dist/components/datepicker/datepicker-multiple.d.ts +0 -2
- package/dist/components/datepicker/datepicker-range.d.ts +0 -2
- package/dist/components/datepicker/datepicker-single.d.ts +0 -2
- package/dist/components/datepicker/datepicker-utils.d.ts +2 -1
- package/dist/components/fileupload/fileupload-base.d.ts +3 -2
- package/dist/components/header/header-service.d.ts +3 -1
- package/dist/components/header/header.d.ts +2 -1
- package/dist/components/helptext/helptext.d.ts +2 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/input-wrapper/input-wrapper.d.ts +4 -2
- package/dist/components/radiobutton/radiobutton.d.ts +4 -2
- package/dist/components/searchinput/searchinput.d.ts +2 -1
- package/dist/{consent-DZEkhgJ1.js → consent-BneInZov.js} +10 -10
- package/dist/{consent-CyY3RyoC.cjs → consent-_N9foluG.cjs} +5 -5
- package/dist/controllers/strings-controller.d.ts +27 -0
- package/dist/{datepicker-VTqSDQk5.cjs → datepicker-9NX5qt2z.cjs} +38 -37
- package/dist/{datepicker-ButIas85.js → datepicker-nSSSr1U7.js} +104 -104
- package/dist/{directive-helpers-CI8YZqku.js → directive-helpers-BARw3nEZ.js} +1 -1
- package/dist/{directive-helpers-BlAV5EQD.cjs → directive-helpers-D6AAMFKs.cjs} +1 -1
- package/dist/docs/components/fileupload.d.ts +1 -0
- package/dist/element-B8OGznK0.cjs +2 -0
- package/dist/{element-ChsFgr_B.js → element-BKSPVgs2.js} +240 -100
- package/dist/{element-with-slot-Bj7nm7fO.cjs → element-with-slot-DTxILHVv.cjs} +1 -1
- package/dist/{element-with-slot-BvG9ctC-.js → element-with-slot-YUAUFRqw.js} +4 -4
- package/dist/fileupload-D05VSbEP.cjs +402 -0
- package/dist/{fileupload-D5IQ9HDe.js → fileupload-E0LGGNgj.js} +370 -380
- package/dist/{footer-DbYQUYNR.cjs → footer-DBApIdGh.cjs} +32 -32
- package/dist/{footer-DrR64HiK.js → footer-DYilVBMC.js} +91 -91
- package/dist/format-B8meU8Tm.cjs +1 -0
- package/dist/format-BTeSVkED.js +18 -0
- package/dist/{header-ClgIac6n.cjs → header-B7tbX-Ok.cjs} +84 -84
- package/dist/{header-menu-BAsUNKSx.cjs → header-menu-1FFWhvNc.cjs} +24 -24
- package/dist/{header-menu-hVPXsb8g.js → header-menu-D522-VTV.js} +75 -75
- package/dist/{header-KvJ1mGwA.js → header-v3GWAzOK.js} +267 -264
- package/dist/{heading-CFmiSuCQ.cjs → heading-CvytvcL7.cjs} +1 -1
- package/dist/{heading-g-_IUB5T.js → heading-rx_oSCqe.js} +16 -16
- package/dist/helptext-DYFdcylX.cjs +27 -0
- package/dist/{helptext-DZng1D5i.js → helptext-LShGPm-b.js} +18 -19
- package/dist/{icon-9iwd2F2l.cjs → icon-BmMC09mi.cjs} +1 -1
- package/dist/{icon-D-LA22xD.js → icon-HYU1f54x.js} +17 -17
- package/dist/{if-defined-CGzIlZ9-.js → if-defined-BF8XcDi5.js} +1 -1
- package/dist/if-defined-CVYApOgK.cjs +1 -0
- package/dist/{input-element-DBMNBplu.js → input-element-D07DmR34.js} +121 -120
- package/dist/input-element-DumGj_oJ.cjs +1 -0
- package/dist/input-wrapper-Cci_wTvD.js +308 -0
- package/dist/input-wrapper-DDfapoRX.cjs +58 -0
- package/dist/{link-DK7gvmnj.cjs → link-11g2ZNin.cjs} +4 -4
- package/dist/{link-D-Eqm5KH.js → link-CQK0SH4H.js} +13 -13
- package/dist/{linkcard-zqbg7Oqm.js → linkcard-B4GlmjJ6.js} +16 -16
- package/dist/linkcard-DNYsVlV6.cjs +13 -0
- package/dist/{listbox-Dc4rGdPi.cjs → listbox-BlFRhyI7.cjs} +15 -15
- package/dist/{listbox-va_E8afs.js → listbox-wd_OofyF.js} +100 -99
- package/dist/{loader-D_RDICnw.js → loader-0C3qVk16.js} +14 -14
- package/dist/{loader-CMUkVJmE.cjs → loader-B9u2qUlR.cjs} +5 -5
- package/dist/{messagebox-Cv8LaSxv.cjs → messagebox-BD5tGmT-.cjs} +5 -5
- package/dist/{messagebox-Cw-OWDya.js → messagebox-C-y1ICmr.js} +15 -15
- package/dist/{modal-BtInv031.cjs → modal-BzPGQYCs.cjs} +8 -8
- package/dist/{modal-D0t_X2dX.js → modal-Cghs3w-d.js} +20 -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-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.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-card.cjs +1 -1
- package/dist/pkt-card.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 -1
- package/dist/pkt-footer.js +1 -1
- 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 +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +35 -34
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/{pkt-options-controller-C5EBX2T0.cjs → pkt-options-controller-CEEAqXaB.cjs} +1 -1
- package/dist/{pkt-options-controller-B77vH3PE.js → pkt-options-controller-PtjhmTGk.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.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-tag.cjs +1 -1
- package/dist/pkt-tag.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/{progressbar-CbcfLerF.js → progressbar-BexQQw1o.js} +21 -21
- package/dist/{progressbar-D5MmnQId.cjs → progressbar-X9mSvpjw.cjs} +5 -5
- package/dist/{radiobutton-BUnf3EPi.js → radiobutton-CkhTasn4.js} +24 -24
- package/dist/{radiobutton-DpsO1F-8.cjs → radiobutton-ln29Ad3U.cjs} +8 -8
- package/dist/{ref-CQoEIIp0.cjs → ref-CHbJYtKE.cjs} +1 -1
- package/dist/{ref-CWD6PjVd.js → ref-Chc_DZAb.js} +2 -2
- package/dist/{repeat-sY6B7fAT.cjs → repeat-CHDs__rN.cjs} +1 -1
- package/dist/{repeat-C02g7d5S.js → repeat-P9SMlKd5.js} +4 -4
- package/dist/searchinput-CPgMEAZZ.cjs +60 -0
- package/dist/{searchinput-DwnjsvJ1.js → searchinput-Da7dKHBH.js} +43 -43
- package/dist/{select-BOJi6H6T.cjs → select-DCuvdAuK.cjs} +4 -3
- package/dist/{select-DMre80qs.js → select-jabMSjft.js} +21 -20
- package/dist/shared-strings/consent.d.ts +71 -0
- package/dist/shared-strings/format.d.ts +21 -0
- package/dist/shared-strings/index.d.ts +14 -0
- package/dist/shared-strings/nb.d.ts +118 -0
- package/dist/shared-strings/resolve.d.ts +12 -0
- package/dist/shared-strings/store.d.ts +27 -0
- package/dist/shared-strings/types.d.ts +29 -0
- package/dist/shared-types/fileupload.d.ts +0 -27
- package/dist/shared-types/index.d.ts +1 -2
- package/dist/shared-utils/combobox/index.d.ts +1 -0
- package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
- package/dist/shared-utils/combobox/messages.d.ts +7 -0
- package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
- package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
- package/dist/{tabs-Cf9ai0FD.cjs → tabs-DV5CQNDL.cjs} +7 -7
- package/dist/{tabs-TvxgbrCF.js → tabs-D_hoi1zu.js} +32 -32
- package/dist/tag-BxYulmZn.cjs +27 -0
- package/dist/{tag-Ds6n1LIs.js → tag-DK5SgKry.js} +33 -32
- package/dist/tests/strings-override.test.d.ts +0 -0
- package/dist/{textarea-vfzIcXhX.js → textarea-BR7Riace.js} +30 -29
- package/dist/{textarea-BydiLM9Z.cjs → textarea-ffBD_VHq.cjs} +3 -2
- package/dist/{textinput-CMP2jPP_.js → textinput-CRNrsRNV.js} +28 -27
- package/dist/{textinput-DGdicNSx.cjs → textinput-CtHFzAux.cjs} +13 -12
- package/dist/timepicker-AfgJipo6.cjs +196 -0
- package/dist/{timepicker-ClwgYywH.js → timepicker-ixs_E5RY.js} +67 -64
- package/package.json +3 -3
- package/src/components/backlink/backlink.ts +1 -1
- package/src/components/breadcrumbs/breadcrumbs.ts +1 -1
- package/src/components/calendar/calendar.ts +56 -26
- package/src/components/checkbox/checkbox.test.ts +0 -2
- package/src/components/checkbox/checkbox.ts +8 -4
- package/src/components/combobox/combobox-base.ts +2 -1
- package/src/components/combobox/combobox-value.ts +10 -9
- package/src/components/combobox/combobox.selection.test.ts +5 -1
- package/src/components/combobox/combobox.ts +4 -1
- package/src/components/consent/strings.ts +1 -125
- package/src/components/datepicker/date-tags.ts +4 -1
- package/src/components/datepicker/datepicker-base.ts +2 -6
- package/src/components/datepicker/datepicker-multiple.ts +0 -3
- package/src/components/datepicker/datepicker-range.ts +4 -7
- package/src/components/datepicker/datepicker-single.ts +0 -3
- package/src/components/datepicker/datepicker-utils.test.ts +5 -5
- package/src/components/datepicker/datepicker-utils.ts +6 -11
- package/src/components/datepicker/datepicker.ts +8 -1
- package/src/components/fileupload/fileupload-base.ts +25 -16
- package/src/components/fileupload/fileupload-renderers.ts +2 -1
- package/src/components/fileupload/fileupload.test.ts +16 -0
- package/src/components/fileupload/fileupload.ts +19 -15
- package/src/components/header/header-global.ts +3 -3
- package/src/components/header/header-service.ts +13 -8
- package/src/components/header/header.ts +2 -1
- package/src/components/helptext/helptext.test.ts +1 -1
- package/src/components/helptext/helptext.ts +3 -3
- package/src/components/index.ts +9 -0
- package/src/components/input-wrapper/input-wrapper.ts +18 -10
- package/src/components/listbox/listbox.ts +3 -3
- package/src/components/radiobutton/radiobutton.ts +8 -4
- package/src/components/searchinput/searchinput.ts +5 -3
- package/src/components/select/select.ts +1 -0
- package/src/components/tag/tag.ts +2 -1
- package/src/components/textarea/textarea.ts +1 -0
- package/src/components/textinput/textinput.ts +1 -0
- package/src/components/timepicker/timepicker.ts +23 -21
- package/dist/element-BA8v6S7z.cjs +0 -2
- package/dist/fileupload-BeWiTAoW.cjs +0 -401
- package/dist/helptext-CTtKJcML.cjs +0 -27
- package/dist/if-defined-B89_ZeCj.cjs +0 -1
- package/dist/input-element-DYmQw-fH.cjs +0 -1
- package/dist/input-wrapper-BmxNvznr.js +0 -128
- package/dist/input-wrapper-D-fPaTbY.js +0 -176
- package/dist/input-wrapper-D5PR0rJn.cjs +0 -1
- package/dist/input-wrapper-Q-B-aBeb.cjs +0 -54
- package/dist/linkcard-B29cmZqh.cjs +0 -13
- package/dist/searchinput-Bh975rjX.cjs +0 -60
- package/dist/tag-CzojNU7z.cjs +0 -27
- package/dist/timepicker-DYrnLHqN.cjs +0 -195
- package/dist/translations/no.json.d.ts +0 -94
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-B8OGznK0.cjs");require("./consent-_N9foluG.cjs"),require("./icon-BmMC09mi.cjs");const t=require("./if-defined-CVYApOgK.cjs"),n=require("./booleanish-BF8l4scU.cjs"),r=require("./fetch-header-footer-data-CUKV0biS.cjs");var i=`oslo.kommune.no`,a=/\.(?:co|com|org|net|gov|edu|ac|kommune)\.[a-z]{2}$/i;function o(e){let t=e.toLowerCase().replace(/\.$/,``),n=t.split(`.`);return n.length<=2?t:n.slice(a.test(t)?-3:-2).join(`.`)}function s(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.protocol===`http:`||t.protocol===`https:`)return o(t.hostname.toLowerCase().replace(/\.$/,``))}function c(e,t=i){if(!e)return;let n;try{n=new URL(e)}catch{return}if(n.protocol!==`http:`&&n.protocol!==`https:`)return;let r=n.hostname.toLowerCase().replace(/\.$/,``),a=t.toLowerCase();if(!(r===a||r.endsWith(`.${a}`)))return o(r)}var l=`#cb-trigger`,u=class extends e.t{constructor(...e){super(...e),this.locale=`nb-NO`,this.skipGlobal=!1,this.openLinksInNewTab=!1,this.includeConsent=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.devMode=!1,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null}connectedCallback(){super.connectedCallback(),!this.data&&!this.skipGlobal&&this.loadData()}disconnectedCallback(){super.disconnectedCallback(),this.abortController?.abort()}updated(e){super.updated(e),e.has(`dataUrl`)&&e.get(`dataUrl`)!==void 0&&!this.data&&this.loadData()}async loadData(){this.abortController?.abort(),this.abortController=new AbortController;try{this.fetchedData=await r.t(this.dataUrl,this.abortController.signal)}catch(e){if(e.name===`AbortError`)return;console.warn(`Failed to fetch header/footer data:`,e),this.dispatchEvent(new CustomEvent(`data-error`,{detail:{error:e},bubbles:!0,composed:!0}))}}get globalFooterData(){return r.n(this.data??this.fetchedData,this.locale)?.footer}linkTarget(e){return e.openInNewTab||this.openLinksInNewTab?{target:`_blank`,rel:`noopener noreferrer`}:{target:`_self`}}renderLinkDomain(t,n=`pkt-footer__link-domain`){if(!t.external)return e.h;let r=s(t.href);return r?e._` <span class=${n}>(${r})</span>`:e.h}renderCustomLink(n){let{target:r,rel:i}=this.linkTarget(n);return e._`
|
|
2
2
|
<a href=${n.href} target=${r} rel=${t.t(i)}
|
|
3
3
|
>${n.text}${this.renderLinkDomain(n)}</a
|
|
4
4
|
>
|
|
5
|
-
`}renderConsent(){return this.includeConsent?e.
|
|
5
|
+
`}renderConsent(){return this.includeConsent?e._`
|
|
6
6
|
<pkt-consent
|
|
7
7
|
.triggerType=${`footerlink`}
|
|
8
8
|
.hotjarId=${this.hotjarId}
|
|
@@ -12,7 +12,7 @@ const e=require("./element-BA8v6S7z.cjs");require("./icon-9iwd2F2l.cjs");const t
|
|
|
12
12
|
.cookieSecure=${this.cookieSecure}
|
|
13
13
|
.cookieExpiryDays=${this.cookieExpiryDays}
|
|
14
14
|
></pkt-consent>
|
|
15
|
-
`:e.
|
|
15
|
+
`:e.h}renderGlobalSectionLink(t){if(t.url===l)return this.includeConsent?e._`
|
|
16
16
|
<li>
|
|
17
17
|
<pkt-consent
|
|
18
18
|
.triggerType=${`footerlink`}
|
|
@@ -25,39 +25,39 @@ const e=require("./element-BA8v6S7z.cjs");require("./icon-9iwd2F2l.cjs");const t
|
|
|
25
25
|
.cookieExpiryDays=${this.cookieExpiryDays}
|
|
26
26
|
></pkt-consent>
|
|
27
27
|
</li>
|
|
28
|
-
`:e.
|
|
28
|
+
`:e.h;let n=c(t.url);return e._`
|
|
29
29
|
<li>
|
|
30
30
|
<a href=${t.url}
|
|
31
|
-
>${t.text}${n?e.
|
|
31
|
+
>${t.text}${n?e._` <span class="pkt-footer__link-domain">(${n})</span>`:e.h}</a
|
|
32
32
|
>
|
|
33
33
|
</li>
|
|
34
|
-
`}renderGlobalSection(t){return e.
|
|
34
|
+
`}renderGlobalSection(t){return e._`
|
|
35
35
|
<section>
|
|
36
36
|
<h2>${t.title}</h2>
|
|
37
37
|
<ul class="pkt-footer__link-list">
|
|
38
38
|
${t.links.map(e=>this.renderGlobalSectionLink(e))}
|
|
39
39
|
</ul>
|
|
40
40
|
</section>
|
|
41
|
-
`}renderSomeLink(t){let n=r.r(t.url,t.text);return n?e.
|
|
41
|
+
`}renderSomeLink(t){let n=r.r(t.url,t.text);return n?e._`
|
|
42
42
|
<li>
|
|
43
43
|
<a class="pkt-footer__some-link" href=${t.url} aria-label=${t.text}>
|
|
44
44
|
<pkt-icon class="pkt-footer__some-icon" name=${n}></pkt-icon>
|
|
45
45
|
</a>
|
|
46
46
|
</li>
|
|
47
|
-
`:e.
|
|
47
|
+
`:e._`<li><a href=${t.url}>${t.text}</a></li>`}renderGlobalBottom(t){let n=t.links?.length>0,r=t.some?.length>0;return!n&&!r?e.h:e._`
|
|
48
48
|
<div class="pkt-footer__bottom">
|
|
49
|
-
${n?e.
|
|
49
|
+
${n?e._`
|
|
50
50
|
<ul class="pkt-footer__bottom-links">
|
|
51
|
-
${t.links.map(t=>e.
|
|
51
|
+
${t.links.map(t=>e._`<li><a href=${t.url}>${t.text}</a></li>`)}
|
|
52
52
|
</ul>
|
|
53
|
-
`:e.
|
|
54
|
-
${r?e.
|
|
53
|
+
`:e.h}
|
|
54
|
+
${r?e._`
|
|
55
55
|
<ul class="pkt-footer__some">
|
|
56
56
|
${t.some.map(e=>this.renderSomeLink(e))}
|
|
57
57
|
</ul>
|
|
58
|
-
`:e.
|
|
58
|
+
`:e.h}
|
|
59
59
|
</div>
|
|
60
|
-
`}renderGlobalFooter(){if(this.skipGlobal)return e.
|
|
60
|
+
`}renderGlobalFooter(){if(this.skipGlobal)return e.h;let t=this.globalFooterData;return t?e._`
|
|
61
61
|
<div class="pkt-footer__band pkt-footer__band--global">
|
|
62
62
|
<div class="pkt-footer__inner">
|
|
63
63
|
<div class="pkt-footer__sections">
|
|
@@ -66,49 +66,49 @@ const e=require("./element-BA8v6S7z.cjs");require("./icon-9iwd2F2l.cjs");const t
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
|
-
`:e.
|
|
69
|
+
`:e.h}};e.n([e.u({type:String,attribute:`data-url`})],u.prototype,`dataUrl`,void 0),e.n([e.u({type:Object,attribute:!1})],u.prototype,`data`,void 0),e.n([e.u({type:String})],u.prototype,`locale`,void 0),e.n([e.u({type:Boolean,attribute:`skip-global`,converter:n.t})],u.prototype,`skipGlobal`,void 0),e.n([e.u({type:Boolean,attribute:`open-links-in-new-tab`,converter:n.t})],u.prototype,`openLinksInNewTab`,void 0),e.n([e.u({type:Boolean,attribute:`include-consent`,converter:n.t})],u.prototype,`includeConsent`,void 0),e.n([e.u({type:String,attribute:`hotjar-id`})],u.prototype,`hotjarId`,void 0),e.n([e.u({type:String,attribute:`google-analytics-id`})],u.prototype,`googleAnalyticsId`,void 0),e.n([e.u({type:Boolean,attribute:`dev-mode`,converter:n.t})],u.prototype,`devMode`,void 0),e.n([e.u({type:String,attribute:`cookie-domain`})],u.prototype,`cookieDomain`,void 0),e.n([e.u({type:String,attribute:`cookie-secure`})],u.prototype,`cookieSecure`,void 0),e.n([e.u({type:String,attribute:`cookie-expiry-days`})],u.prototype,`cookieExpiryDays`,void 0),e.n([e.l()],u.prototype,`fetchedData`,void 0);var d=class extends u{connectedCallback(){super.connectedCallback(),this.classList.add(`pkt-footer-host`)}renderColumn(t){return e._`
|
|
70
70
|
<section>
|
|
71
71
|
<h2>${t.title}</h2>
|
|
72
|
-
${t.text?e.
|
|
73
|
-
${t.links?.length?e.
|
|
72
|
+
${t.text?e._`<p>${t.text}</p>`:e.h}
|
|
73
|
+
${t.links?.length?e._`
|
|
74
74
|
<ul class="pkt-footer__link-list">
|
|
75
|
-
${t.links.map(t=>e.
|
|
75
|
+
${t.links.map(t=>e._`<li>${this.renderCustomLink(t)}</li>`)}
|
|
76
76
|
</ul>
|
|
77
|
-
`:e.
|
|
77
|
+
`:e.h}
|
|
78
78
|
</section>
|
|
79
|
-
`}renderSecondary(){let t=this.skipGlobal&&this.includeConsent;return e.
|
|
79
|
+
`}renderSecondary(){let t=this.skipGlobal&&this.includeConsent;return e._`
|
|
80
80
|
<div class="pkt-footer__band pkt-footer__band--secondary">
|
|
81
81
|
<div class="pkt-footer__inner">
|
|
82
|
-
${this.columns?.length?e.
|
|
82
|
+
${this.columns?.length?e._`
|
|
83
83
|
<div class="pkt-footer__sections">
|
|
84
84
|
${this.columns.map(e=>this.renderColumn(e))}
|
|
85
85
|
</div>
|
|
86
|
-
`:e.
|
|
87
|
-
${t?e.
|
|
86
|
+
`:e.h}
|
|
87
|
+
${t?e._`<div class="pkt-footer__consent">${this.renderConsent()}</div>`:e.h}
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
90
|
-
`}render(){let t=!!this.columns?.length,n=this.skipGlobal&&this.includeConsent;return e.
|
|
90
|
+
`}render(){let t=!!this.columns?.length,n=this.skipGlobal&&this.includeConsent;return e._`
|
|
91
91
|
<footer class="pkt-footer">
|
|
92
|
-
${t||n?this.renderSecondary():e.
|
|
92
|
+
${t||n?this.renderSecondary():e.h}
|
|
93
93
|
${this.renderGlobalFooter()}
|
|
94
94
|
</footer>
|
|
95
|
-
`}};e.n([e.
|
|
95
|
+
`}};e.n([e.u({type:Array})],d.prototype,`columns`,void 0);try{e.d(`pkt-footer`)(d)}catch{console.warn(`Forsøker å definere <pkt-footer>, men den er allerede definert`)}var f=class extends u{connectedCallback(){super.connectedCallback(),this.classList.add(`pkt-footer-simple-host`)}renderLink(n){let{target:r,rel:i}=this.linkTarget(n);return e._`
|
|
96
96
|
<a class="pkt-footer-simple__link" href=${n.href} target=${r} rel=${t.t(i)}>
|
|
97
97
|
<pkt-icon class="pkt-footer-simple__link-icon" name="arrow-link"></pkt-icon>
|
|
98
98
|
<span>${n.text}${this.renderLinkDomain(n,`pkt-footer-simple__link-domain`)}</span>
|
|
99
99
|
</a>
|
|
100
|
-
`}render(){let t=!!this.links?.length,n=this.skipGlobal&&this.includeConsent;return e.
|
|
100
|
+
`}render(){let t=!!this.links?.length,n=this.skipGlobal&&this.includeConsent;return e._`
|
|
101
101
|
<footer class="pkt-footer-simple">
|
|
102
|
-
${t||n?e.
|
|
102
|
+
${t||n?e._`
|
|
103
103
|
<div class="pkt-footer__band pkt-footer__band--secondary">
|
|
104
104
|
<div class="pkt-footer__inner pkt-footer__inner--compact">
|
|
105
105
|
<ul class="pkt-footer-simple__list">
|
|
106
|
-
${this.links?.map(t=>e.
|
|
107
|
-
${n?e.
|
|
106
|
+
${this.links?.map(t=>e._`<li>${this.renderLink(t)}</li>`)}
|
|
107
|
+
${n?e._`<li>${this.renderConsent()}</li>`:e.h}
|
|
108
108
|
</ul>
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
111
|
-
`:e.
|
|
111
|
+
`:e.h}
|
|
112
112
|
${this.renderGlobalFooter()}
|
|
113
113
|
</footer>
|
|
114
|
-
`}};e.n([e.
|
|
114
|
+
`}};e.n([e.u({type:Array})],f.prototype,`links`,void 0);try{e.d(`pkt-footer-simple`)(f)}catch{console.warn(`Forsøker å definere <pkt-footer-simple>, men den er allerede definert`)}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-BKSPVgs2.js";
|
|
2
|
+
import "./consent-BneInZov.js";
|
|
3
|
+
import "./icon-HYU1f54x.js";
|
|
4
|
+
import { t as s } from "./if-defined-BF8XcDi5.js";
|
|
4
5
|
import { t as c } from "./booleanish-OQJTYSrw.js";
|
|
5
6
|
import { n as l, r as u, t as d } from "./fetch-header-footer-data-Pc32etrk.js";
|
|
6
|
-
import "./consent-DZEkhgJ1.js";
|
|
7
7
|
//#region ../../shared-utils/header-footer/external-domain.ts
|
|
8
8
|
var f = "oslo.kommune.no", p = /\.(?:co|com|org|net|gov|edu|ac|kommune)\.[a-z]{2}$/i;
|
|
9
9
|
function m(e) {
|
|
@@ -34,7 +34,7 @@ function g(e, t = f) {
|
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/components/footer/footer-base.ts
|
|
37
|
-
var _ = "#cb-trigger", v = class extends
|
|
37
|
+
var _ = "#cb-trigger", v = class extends a {
|
|
38
38
|
constructor(...e) {
|
|
39
39
|
super(...e), this.locale = "nb-NO", this.skipGlobal = !1, this.openLinksInNewTab = !1, this.includeConsent = !1, this.hotjarId = null, this.googleAnalyticsId = null, this.devMode = !1, this.cookieDomain = null, this.cookieSecure = null, this.cookieExpiryDays = null;
|
|
40
40
|
}
|
|
@@ -69,21 +69,21 @@ var _ = "#cb-trigger", v = class extends o {
|
|
|
69
69
|
rel: "noopener noreferrer"
|
|
70
70
|
} : { target: "_self" };
|
|
71
71
|
}
|
|
72
|
-
renderLinkDomain(
|
|
73
|
-
if (!
|
|
74
|
-
let
|
|
75
|
-
return
|
|
72
|
+
renderLinkDomain(t, r = "pkt-footer__link-domain") {
|
|
73
|
+
if (!t.external) return n;
|
|
74
|
+
let i = h(t.href);
|
|
75
|
+
return i ? e` <span class=${r}>(${i})</span>` : n;
|
|
76
76
|
}
|
|
77
|
-
renderCustomLink(
|
|
78
|
-
let { target:
|
|
79
|
-
return
|
|
80
|
-
<a href=${
|
|
81
|
-
>${
|
|
77
|
+
renderCustomLink(t) {
|
|
78
|
+
let { target: n, rel: r } = this.linkTarget(t);
|
|
79
|
+
return e`
|
|
80
|
+
<a href=${t.href} target=${n} rel=${s(r)}
|
|
81
|
+
>${t.text}${this.renderLinkDomain(t)}</a
|
|
82
82
|
>
|
|
83
83
|
`;
|
|
84
84
|
}
|
|
85
85
|
renderConsent() {
|
|
86
|
-
return this.includeConsent ?
|
|
86
|
+
return this.includeConsent ? e`
|
|
87
87
|
<pkt-consent
|
|
88
88
|
.triggerType=${"footerlink"}
|
|
89
89
|
.hotjarId=${this.hotjarId}
|
|
@@ -93,14 +93,14 @@ var _ = "#cb-trigger", v = class extends o {
|
|
|
93
93
|
.cookieSecure=${this.cookieSecure}
|
|
94
94
|
.cookieExpiryDays=${this.cookieExpiryDays}
|
|
95
95
|
></pkt-consent>
|
|
96
|
-
` :
|
|
96
|
+
` : n;
|
|
97
97
|
}
|
|
98
|
-
renderGlobalSectionLink(
|
|
99
|
-
if (
|
|
98
|
+
renderGlobalSectionLink(t) {
|
|
99
|
+
if (t.url === _) return this.includeConsent ? e`
|
|
100
100
|
<li>
|
|
101
101
|
<pkt-consent
|
|
102
102
|
.triggerType=${"footerlink"}
|
|
103
|
-
.triggerText=${
|
|
103
|
+
.triggerText=${t.text}
|
|
104
104
|
.hotjarId=${this.hotjarId}
|
|
105
105
|
.googleAnalyticsId=${this.googleAnalyticsId}
|
|
106
106
|
.devMode=${!!this.devMode}
|
|
@@ -109,153 +109,153 @@ var _ = "#cb-trigger", v = class extends o {
|
|
|
109
109
|
.cookieExpiryDays=${this.cookieExpiryDays}
|
|
110
110
|
></pkt-consent>
|
|
111
111
|
</li>
|
|
112
|
-
` :
|
|
113
|
-
let
|
|
114
|
-
return
|
|
112
|
+
` : n;
|
|
113
|
+
let r = g(t.url);
|
|
114
|
+
return e`
|
|
115
115
|
<li>
|
|
116
|
-
<a href=${
|
|
117
|
-
>${
|
|
116
|
+
<a href=${t.url}
|
|
117
|
+
>${t.text}${r ? e` <span class="pkt-footer__link-domain">(${r})</span>` : n}</a
|
|
118
118
|
>
|
|
119
119
|
</li>
|
|
120
120
|
`;
|
|
121
121
|
}
|
|
122
|
-
renderGlobalSection(
|
|
123
|
-
return
|
|
122
|
+
renderGlobalSection(t) {
|
|
123
|
+
return e`
|
|
124
124
|
<section>
|
|
125
|
-
<h2>${
|
|
125
|
+
<h2>${t.title}</h2>
|
|
126
126
|
<ul class="pkt-footer__link-list">
|
|
127
|
-
${
|
|
127
|
+
${t.links.map((e) => this.renderGlobalSectionLink(e))}
|
|
128
128
|
</ul>
|
|
129
129
|
</section>
|
|
130
130
|
`;
|
|
131
131
|
}
|
|
132
|
-
renderSomeLink(
|
|
133
|
-
let
|
|
134
|
-
return
|
|
132
|
+
renderSomeLink(t) {
|
|
133
|
+
let n = u(t.url, t.text);
|
|
134
|
+
return n ? e`
|
|
135
135
|
<li>
|
|
136
|
-
<a class="pkt-footer__some-link" href=${
|
|
137
|
-
<pkt-icon class="pkt-footer__some-icon" name=${
|
|
136
|
+
<a class="pkt-footer__some-link" href=${t.url} aria-label=${t.text}>
|
|
137
|
+
<pkt-icon class="pkt-footer__some-icon" name=${n}></pkt-icon>
|
|
138
138
|
</a>
|
|
139
139
|
</li>
|
|
140
|
-
` :
|
|
140
|
+
` : e`<li><a href=${t.url}>${t.text}</a></li>`;
|
|
141
141
|
}
|
|
142
|
-
renderGlobalBottom(
|
|
143
|
-
let
|
|
144
|
-
return !
|
|
142
|
+
renderGlobalBottom(t) {
|
|
143
|
+
let r = t.links?.length > 0, i = t.some?.length > 0;
|
|
144
|
+
return !r && !i ? n : e`
|
|
145
145
|
<div class="pkt-footer__bottom">
|
|
146
|
-
${
|
|
146
|
+
${r ? e`
|
|
147
147
|
<ul class="pkt-footer__bottom-links">
|
|
148
|
-
${
|
|
148
|
+
${t.links.map((t) => e`<li><a href=${t.url}>${t.text}</a></li>`)}
|
|
149
149
|
</ul>
|
|
150
|
-
` :
|
|
151
|
-
${
|
|
150
|
+
` : n}
|
|
151
|
+
${i ? e`
|
|
152
152
|
<ul class="pkt-footer__some">
|
|
153
|
-
${
|
|
153
|
+
${t.some.map((e) => this.renderSomeLink(e))}
|
|
154
154
|
</ul>
|
|
155
|
-
` :
|
|
155
|
+
` : n}
|
|
156
156
|
</div>
|
|
157
157
|
`;
|
|
158
158
|
}
|
|
159
159
|
renderGlobalFooter() {
|
|
160
|
-
if (this.skipGlobal) return
|
|
161
|
-
let
|
|
162
|
-
return
|
|
160
|
+
if (this.skipGlobal) return n;
|
|
161
|
+
let t = this.globalFooterData;
|
|
162
|
+
return t ? e`
|
|
163
163
|
<div class="pkt-footer__band pkt-footer__band--global">
|
|
164
164
|
<div class="pkt-footer__inner">
|
|
165
165
|
<div class="pkt-footer__sections">
|
|
166
|
-
${
|
|
167
|
-
${this.renderGlobalBottom(
|
|
166
|
+
${t.sections.map((e) => this.renderGlobalSection(e))}
|
|
167
|
+
${this.renderGlobalBottom(t)}
|
|
168
168
|
</div>
|
|
169
169
|
</div>
|
|
170
170
|
</div>
|
|
171
|
-
` :
|
|
171
|
+
` : n;
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
-
|
|
174
|
+
i([o({
|
|
175
175
|
type: String,
|
|
176
176
|
attribute: "data-url"
|
|
177
|
-
})], v.prototype, "dataUrl", void 0),
|
|
177
|
+
})], v.prototype, "dataUrl", void 0), i([o({
|
|
178
178
|
type: Object,
|
|
179
179
|
attribute: !1
|
|
180
|
-
})], v.prototype, "data", void 0),
|
|
180
|
+
})], v.prototype, "data", void 0), i([o({ type: String })], v.prototype, "locale", void 0), i([o({
|
|
181
181
|
type: Boolean,
|
|
182
182
|
attribute: "skip-global",
|
|
183
183
|
converter: c
|
|
184
|
-
})], v.prototype, "skipGlobal", void 0),
|
|
184
|
+
})], v.prototype, "skipGlobal", void 0), i([o({
|
|
185
185
|
type: Boolean,
|
|
186
186
|
attribute: "open-links-in-new-tab",
|
|
187
187
|
converter: c
|
|
188
|
-
})], v.prototype, "openLinksInNewTab", void 0),
|
|
188
|
+
})], v.prototype, "openLinksInNewTab", void 0), i([o({
|
|
189
189
|
type: Boolean,
|
|
190
190
|
attribute: "include-consent",
|
|
191
191
|
converter: c
|
|
192
|
-
})], v.prototype, "includeConsent", void 0),
|
|
192
|
+
})], v.prototype, "includeConsent", void 0), i([o({
|
|
193
193
|
type: String,
|
|
194
194
|
attribute: "hotjar-id"
|
|
195
|
-
})], v.prototype, "hotjarId", void 0),
|
|
195
|
+
})], v.prototype, "hotjarId", void 0), i([o({
|
|
196
196
|
type: String,
|
|
197
197
|
attribute: "google-analytics-id"
|
|
198
|
-
})], v.prototype, "googleAnalyticsId", void 0),
|
|
198
|
+
})], v.prototype, "googleAnalyticsId", void 0), i([o({
|
|
199
199
|
type: Boolean,
|
|
200
200
|
attribute: "dev-mode",
|
|
201
201
|
converter: c
|
|
202
|
-
})], v.prototype, "devMode", void 0),
|
|
202
|
+
})], v.prototype, "devMode", void 0), i([o({
|
|
203
203
|
type: String,
|
|
204
204
|
attribute: "cookie-domain"
|
|
205
|
-
})], v.prototype, "cookieDomain", void 0),
|
|
205
|
+
})], v.prototype, "cookieDomain", void 0), i([o({
|
|
206
206
|
type: String,
|
|
207
207
|
attribute: "cookie-secure"
|
|
208
|
-
})], v.prototype, "cookieSecure", void 0),
|
|
208
|
+
})], v.prototype, "cookieSecure", void 0), i([o({
|
|
209
209
|
type: String,
|
|
210
210
|
attribute: "cookie-expiry-days"
|
|
211
|
-
})], v.prototype, "cookieExpiryDays", void 0),
|
|
211
|
+
})], v.prototype, "cookieExpiryDays", void 0), i([r()], v.prototype, "fetchedData", void 0);
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region src/components/footer/footer.ts
|
|
214
214
|
var y = class extends v {
|
|
215
215
|
connectedCallback() {
|
|
216
216
|
super.connectedCallback(), this.classList.add("pkt-footer-host");
|
|
217
217
|
}
|
|
218
|
-
renderColumn(
|
|
219
|
-
return
|
|
218
|
+
renderColumn(t) {
|
|
219
|
+
return e`
|
|
220
220
|
<section>
|
|
221
|
-
<h2>${
|
|
222
|
-
${
|
|
223
|
-
${
|
|
221
|
+
<h2>${t.title}</h2>
|
|
222
|
+
${t.text ? e`<p>${t.text}</p>` : n}
|
|
223
|
+
${t.links?.length ? e`
|
|
224
224
|
<ul class="pkt-footer__link-list">
|
|
225
|
-
${
|
|
225
|
+
${t.links.map((t) => e`<li>${this.renderCustomLink(t)}</li>`)}
|
|
226
226
|
</ul>
|
|
227
|
-
` :
|
|
227
|
+
` : n}
|
|
228
228
|
</section>
|
|
229
229
|
`;
|
|
230
230
|
}
|
|
231
231
|
renderSecondary() {
|
|
232
|
-
let
|
|
233
|
-
return
|
|
232
|
+
let t = this.skipGlobal && this.includeConsent;
|
|
233
|
+
return e`
|
|
234
234
|
<div class="pkt-footer__band pkt-footer__band--secondary">
|
|
235
235
|
<div class="pkt-footer__inner">
|
|
236
|
-
${this.columns?.length ?
|
|
236
|
+
${this.columns?.length ? e`
|
|
237
237
|
<div class="pkt-footer__sections">
|
|
238
238
|
${this.columns.map((e) => this.renderColumn(e))}
|
|
239
239
|
</div>
|
|
240
|
-
` :
|
|
241
|
-
${
|
|
240
|
+
` : n}
|
|
241
|
+
${t ? e`<div class="pkt-footer__consent">${this.renderConsent()}</div>` : n}
|
|
242
242
|
</div>
|
|
243
243
|
</div>
|
|
244
244
|
`;
|
|
245
245
|
}
|
|
246
246
|
render() {
|
|
247
|
-
let
|
|
248
|
-
return
|
|
247
|
+
let t = !!this.columns?.length, r = this.skipGlobal && this.includeConsent;
|
|
248
|
+
return e`
|
|
249
249
|
<footer class="pkt-footer">
|
|
250
|
-
${
|
|
250
|
+
${t || r ? this.renderSecondary() : n}
|
|
251
251
|
${this.renderGlobalFooter()}
|
|
252
252
|
</footer>
|
|
253
253
|
`;
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
|
-
|
|
256
|
+
i([o({ type: Array })], y.prototype, "columns", void 0);
|
|
257
257
|
try {
|
|
258
|
-
|
|
258
|
+
t("pkt-footer")(y);
|
|
259
259
|
} catch {
|
|
260
260
|
console.warn("Forsøker å definere <pkt-footer>, men den er allerede definert");
|
|
261
261
|
}
|
|
@@ -265,37 +265,37 @@ var b = class extends v {
|
|
|
265
265
|
connectedCallback() {
|
|
266
266
|
super.connectedCallback(), this.classList.add("pkt-footer-simple-host");
|
|
267
267
|
}
|
|
268
|
-
renderLink(
|
|
269
|
-
let { target:
|
|
270
|
-
return
|
|
271
|
-
<a class="pkt-footer-simple__link" href=${
|
|
268
|
+
renderLink(t) {
|
|
269
|
+
let { target: n, rel: r } = this.linkTarget(t);
|
|
270
|
+
return e`
|
|
271
|
+
<a class="pkt-footer-simple__link" href=${t.href} target=${n} rel=${s(r)}>
|
|
272
272
|
<pkt-icon class="pkt-footer-simple__link-icon" name="arrow-link"></pkt-icon>
|
|
273
|
-
<span>${
|
|
273
|
+
<span>${t.text}${this.renderLinkDomain(t, "pkt-footer-simple__link-domain")}</span>
|
|
274
274
|
</a>
|
|
275
275
|
`;
|
|
276
276
|
}
|
|
277
277
|
render() {
|
|
278
|
-
let
|
|
279
|
-
return
|
|
278
|
+
let t = !!this.links?.length, r = this.skipGlobal && this.includeConsent;
|
|
279
|
+
return e`
|
|
280
280
|
<footer class="pkt-footer-simple">
|
|
281
|
-
${
|
|
281
|
+
${t || r ? e`
|
|
282
282
|
<div class="pkt-footer__band pkt-footer__band--secondary">
|
|
283
283
|
<div class="pkt-footer__inner pkt-footer__inner--compact">
|
|
284
284
|
<ul class="pkt-footer-simple__list">
|
|
285
|
-
${this.links?.map((
|
|
286
|
-
${
|
|
285
|
+
${this.links?.map((t) => e`<li>${this.renderLink(t)}</li>`)}
|
|
286
|
+
${r ? e`<li>${this.renderConsent()}</li>` : n}
|
|
287
287
|
</ul>
|
|
288
288
|
</div>
|
|
289
289
|
</div>
|
|
290
|
-
` :
|
|
290
|
+
` : n}
|
|
291
291
|
${this.renderGlobalFooter()}
|
|
292
292
|
</footer>
|
|
293
293
|
`;
|
|
294
294
|
}
|
|
295
295
|
};
|
|
296
|
-
|
|
296
|
+
i([o({ type: Array })], b.prototype, "links", void 0);
|
|
297
297
|
try {
|
|
298
|
-
|
|
298
|
+
t("pkt-footer-simple")(b);
|
|
299
299
|
} catch {
|
|
300
300
|
console.warn("Forsøker å definere <pkt-footer-simple>, men den er allerede definert");
|
|
301
301
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=/\{(\w+)\}/g;function t(t,n){return n?t.replace(e,(e,r)=>{let a=n[r];return a==null?(i(r,t),e):String(a)}):t}function n(e,t,n){return e===1?t:n}var r=new Set;function i(e,t){let n=`${e}::${t}`;r.has(n)||(r.add(n),console.warn(`[punkt] Mangler verdi for plassholderen {${e}} i teksten «${t}»`))}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region ../../shared-strings/format.ts
|
|
2
|
+
var e = /\{(\w+)\}/g;
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
return n ? t.replace(e, (e, r) => {
|
|
5
|
+
let a = n[r];
|
|
6
|
+
return a == null ? (i(r, t), e) : String(a);
|
|
7
|
+
}) : t;
|
|
8
|
+
}
|
|
9
|
+
function n(e, t, n) {
|
|
10
|
+
return e === 1 ? t : n;
|
|
11
|
+
}
|
|
12
|
+
var r = /* @__PURE__ */ new Set();
|
|
13
|
+
function i(e, t) {
|
|
14
|
+
let n = `${e}::${t}`;
|
|
15
|
+
r.has(n) || (r.add(n), console.warn(`[punkt] Mangler verdi for plassholderen {${e}} i teksten «${t}»`));
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n, t };
|