@swisspost/internet-header 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-87874f19.js +50 -1
- package/dist/cjs/{klp-widget.controller-8e2198a2.js → klp-widget.controller-7908f551.js} +32 -20
- package/dist/cjs/klp-widget.controller-7908f551.js.map +1 -0
- package/dist/cjs/{language.service-9334ca5d.js → language.service-672abba5.js} +2 -2
- package/dist/cjs/language.service-672abba5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/post-klp-login-widget.cjs.entry.js +2 -2
- package/dist/cjs/post-klp-login-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/post-language-switch.cjs.entry.js +1 -1
- package/dist/cjs/post-main-navigation.cjs.entry.js +2 -2
- package/dist/cjs/post-main-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/post-search.cjs.entry.js +4 -1
- package/dist/cjs/post-search.cjs.entry.js.map +1 -1
- package/dist/cjs/post-skiplinks.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js +1328 -8
- package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/swisspost-internet-footer.cjs.entry.js +2 -2
- package/dist/cjs/swisspost-internet-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.entry.js +67 -37
- package/dist/cjs/swisspost-internet-header.cjs.entry.js.map +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.js +1 -1
- package/dist/collection/assets/js/klp-login-widget.js +1 -1
- package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.css +35 -27
- package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.js +57 -6
- package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.js.map +1 -1
- package/dist/collection/components/post-internet-footer/post-internet-footer.css +29 -21
- package/dist/collection/components/post-internet-header/logo-animation/logo-animation.js +6 -3
- package/dist/collection/components/post-internet-header/logo-animation/logo-animation.js.map +1 -1
- package/dist/collection/components/post-internet-header/post-internet-header.js +33 -26
- package/dist/collection/components/post-internet-header/post-internet-header.js.map +1 -1
- package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.css +8 -4
- package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.js +1 -1
- package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.js.map +1 -1
- package/dist/collection/components/post-main-navigation/post-main-navigation.css +6 -2
- package/dist/collection/components/post-search/post-search.css +119 -565
- package/dist/collection/components/post-search/post-search.js +3 -0
- package/dist/collection/components/post-search/post-search.js.map +1 -1
- package/dist/collection/services/language.service.js +1 -1
- package/dist/collection/services/language.service.js.map +1 -1
- package/dist/collection/utils/scrollparent.js +21 -0
- package/dist/collection/utils/scrollparent.js.map +1 -0
- package/dist/components/klp-widget.controller.js +31 -19
- package/dist/components/klp-widget.controller.js.map +1 -1
- package/dist/components/language.service.js +1 -1
- package/dist/components/language.service.js.map +1 -1
- package/dist/components/post-klp-login-widget2.js +1 -1
- package/dist/components/post-klp-login-widget2.js.map +1 -1
- package/dist/components/post-main-navigation2.js +1 -1
- package/dist/components/post-main-navigation2.js.map +1 -1
- package/dist/components/post-search2.js +4 -1
- package/dist/components/post-search2.js.map +1 -1
- package/dist/components/swisspost-internet-breadcrumbs.js +1329 -8
- package/dist/components/swisspost-internet-breadcrumbs.js.map +1 -1
- package/dist/components/swisspost-internet-footer.js +1 -1
- package/dist/components/swisspost-internet-footer.js.map +1 -1
- package/dist/components/swisspost-internet-header.js +68 -38
- package/dist/components/swisspost-internet-header.js.map +1 -1
- package/dist/docs.d.ts +322 -0
- package/dist/docs.json +914 -0
- package/dist/esm/index-82f4f02c.js +50 -1
- package/dist/esm/{klp-widget.controller-e9029567.js → klp-widget.controller-30d47ff4.js} +32 -20
- package/dist/esm/klp-widget.controller-30d47ff4.js.map +1 -0
- package/dist/esm/{language.service-bd0f3b6f.js → language.service-4289815d.js} +2 -2
- package/dist/esm/language.service-4289815d.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/post-klp-login-widget.entry.js +2 -2
- package/dist/esm/post-klp-login-widget.entry.js.map +1 -1
- package/dist/esm/post-language-switch.entry.js +1 -1
- package/dist/esm/post-main-navigation.entry.js +2 -2
- package/dist/esm/post-main-navigation.entry.js.map +1 -1
- package/dist/esm/post-search.entry.js +4 -1
- package/dist/esm/post-search.entry.js.map +1 -1
- package/dist/esm/post-skiplinks.entry.js +1 -1
- package/dist/esm/swisspost-internet-breadcrumbs.entry.js +1328 -8
- package/dist/esm/swisspost-internet-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/swisspost-internet-footer.entry.js +2 -2
- package/dist/esm/swisspost-internet-footer.entry.js.map +1 -1
- package/dist/esm/swisspost-internet-header.entry.js +67 -37
- package/dist/esm/swisspost-internet-header.entry.js.map +1 -1
- package/dist/esm/swisspost-internet-header.js +1 -1
- package/dist/esm-es5/index-82f4f02c.js +1 -2
- package/dist/esm-es5/index-82f4f02c.js.map +1 -1
- package/dist/esm-es5/klp-widget.controller-30d47ff4.js +13 -0
- package/dist/esm-es5/klp-widget.controller-30d47ff4.js.map +1 -0
- package/dist/esm-es5/language.service-4289815d.js +2 -0
- package/dist/esm-es5/language.service-4289815d.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/post-klp-login-widget.entry.js +1 -1
- package/dist/esm-es5/post-klp-login-widget.entry.js.map +1 -1
- package/dist/esm-es5/post-language-switch.entry.js +1 -1
- package/dist/esm-es5/post-main-navigation.entry.js +1 -1
- package/dist/esm-es5/post-main-navigation.entry.js.map +1 -1
- package/dist/esm-es5/post-search.entry.js +1 -1
- package/dist/esm-es5/post-search.entry.js.map +1 -1
- package/dist/esm-es5/post-skiplinks.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js +2 -2
- package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js.map +1 -1
- package/dist/esm-es5/swisspost-internet-footer.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-footer.entry.js.map +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js.map +1 -1
- package/dist/esm-es5/swisspost-internet-header.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.js.map +1 -1
- package/dist/swisspost-internet-header/{p-0dd2de97.entry.js → p-02df8ca4.entry.js} +2 -2
- package/dist/swisspost-internet-header/p-0de024c6.system.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-e1fa55e3.system.entry.js.map → p-0de024c6.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-2ab12ef9.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-273fd39b.entry.js.map → p-2ab12ef9.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-33f6c69f.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-9ab24fb3.entry.js.map → p-33f6c69f.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-34da85e6.system.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-e2df6e93.system.entry.js.map → p-34da85e6.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-3cfe4534.entry.js +2 -0
- package/dist/swisspost-internet-header/p-3cfe4534.entry.js.map +1 -0
- package/dist/swisspost-internet-header/p-43320028.system.entry.js +2 -0
- package/dist/swisspost-internet-header/p-43320028.system.entry.js.map +1 -0
- package/dist/swisspost-internet-header/p-55fbc914.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-811b9615.entry.js.map → p-55fbc914.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-5d893017.system.js +1 -1
- package/dist/swisspost-internet-header/p-5d893017.system.js.map +1 -1
- package/dist/swisspost-internet-header/p-66d1bf9a.js +13 -0
- package/dist/swisspost-internet-header/p-66d1bf9a.js.map +1 -0
- package/dist/swisspost-internet-header/p-6dc0fc47.system.entry.js +2 -0
- package/dist/swisspost-internet-header/p-6dc0fc47.system.entry.js.map +1 -0
- package/dist/swisspost-internet-header/p-75dde9a2.entry.js +7 -0
- package/dist/swisspost-internet-header/p-75dde9a2.entry.js.map +1 -0
- package/dist/swisspost-internet-header/{p-6f69aff4.system.entry.js → p-781ea7c2.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/p-a5f5bb55.js +2 -0
- package/dist/swisspost-internet-header/p-a5f5bb55.js.map +1 -0
- package/dist/swisspost-internet-header/{p-131078ce.system.entry.js → p-a691c791.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/p-b4c0cb5a.system.js +13 -0
- package/dist/swisspost-internet-header/p-b4c0cb5a.system.js.map +1 -0
- package/dist/swisspost-internet-header/p-b5758d6a.system.entry.js +7 -0
- package/dist/swisspost-internet-header/p-b5758d6a.system.entry.js.map +1 -0
- package/dist/swisspost-internet-header/p-bf99c127.system.js +2 -0
- package/dist/swisspost-internet-header/p-bf99c127.system.js.map +1 -0
- package/dist/swisspost-internet-header/{p-9ec1f474.entry.js → p-cbba35a8.entry.js} +2 -2
- package/dist/swisspost-internet-header/p-cf9fb780.system.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-a366648c.system.entry.js.map → p-cf9fb780.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-db8023e1.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-5b233b42.entry.js.map → p-db8023e1.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.css +1 -3
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js.map +1 -1
- package/dist/types/components/post-internet-breadcrumbs/post-internet-breadcrumbs.d.ts +8 -3
- package/dist/types/components/post-internet-header/post-internet-header.d.ts +4 -3
- package/dist/types/components.d.ts +11 -6
- package/dist/types/services/language.service.d.ts +2 -5
- package/dist/types/utils/scrollparent.d.ts +1 -0
- package/package.json +14 -13
- package/readme.md +45 -10
- package/dist/cjs/klp-widget.controller-8e2198a2.js.map +0 -1
- package/dist/cjs/language.service-9334ca5d.js.map +0 -1
- package/dist/esm/klp-widget.controller-e9029567.js.map +0 -1
- package/dist/esm/language.service-bd0f3b6f.js.map +0 -1
- package/dist/esm-es5/klp-widget.controller-e9029567.js +0 -13
- package/dist/esm-es5/klp-widget.controller-e9029567.js.map +0 -1
- package/dist/esm-es5/language.service-bd0f3b6f.js +0 -2
- package/dist/esm-es5/language.service-bd0f3b6f.js.map +0 -1
- package/dist/swisspost-internet-header/p-06d32a28.entry.js +0 -7
- package/dist/swisspost-internet-header/p-06d32a28.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-273fd39b.entry.js +0 -2
- package/dist/swisspost-internet-header/p-4099b274.system.js +0 -2
- package/dist/swisspost-internet-header/p-4099b274.system.js.map +0 -1
- package/dist/swisspost-internet-header/p-5b233b42.entry.js +0 -2
- package/dist/swisspost-internet-header/p-6426cae8.system.js +0 -13
- package/dist/swisspost-internet-header/p-6426cae8.system.js.map +0 -1
- package/dist/swisspost-internet-header/p-7bed0797.js +0 -2
- package/dist/swisspost-internet-header/p-7bed0797.js.map +0 -1
- package/dist/swisspost-internet-header/p-811b9615.entry.js +0 -2
- package/dist/swisspost-internet-header/p-84f78f40.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-84f78f40.system.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-8ad474a9.js +0 -13
- package/dist/swisspost-internet-header/p-8ad474a9.js.map +0 -1
- package/dist/swisspost-internet-header/p-97c90e22.system.entry.js +0 -7
- package/dist/swisspost-internet-header/p-97c90e22.system.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-9ab24fb3.entry.js +0 -2
- package/dist/swisspost-internet-header/p-a366648c.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-b33e74a6.entry.js +0 -2
- package/dist/swisspost-internet-header/p-b33e74a6.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-d6a99399.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-d6a99399.system.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-e1fa55e3.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-e2df6e93.system.entry.js +0 -2
- /package/dist/swisspost-internet-header/{p-0dd2de97.entry.js.map → p-02df8ca4.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-6f69aff4.system.entry.js.map → p-781ea7c2.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-131078ce.system.entry.js.map → p-a691c791.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-9ec1f474.entry.js.map → p-cbba35a8.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-8e0a4d18.js";export{s as setNonce}from"./p-8e0a4d18.js";const t=()=>{const o=import.meta.url;const t={};if(o!==""){t.resourcesUrl=new URL(".",o).href}return e(t)};t().then((e=>o([["p-
|
|
1
|
+
import{p as e,b as o}from"./p-8e0a4d18.js";export{s as setNonce}from"./p-8e0a4d18.js";const t=()=>{const o=import.meta.url;const t={};if(o!==""){t.resourcesUrl=new URL(".",o).href}return e(t)};t().then((e=>o([["p-3cfe4534",[[1,"swisspost-internet-header",{project:[1],stickyness:[1],language:[1],meta:[4],login:[4],search:[4],skiplinks:[4],configProxy:[1,"config-proxy"],environment:[1],languageSwitchOverrides:[1,"language-switch-overrides"],customConfig:[1,"custom-config"],languageCookieKey:[1,"language-cookie-key"],languageLocalStorageKey:[1,"language-local-storage-key"],activeRoute:[8,"active-route"],osFlyoutOverrides:[1,"os-flyout-overrides"],fullWidth:[4,"full-width"],activeFlyout:[32],activeDropdownElement:[32],getCurrentLanguage:[64]},[[0,"languageChanged","handleLanguageChangeEvent"]]]]],["p-75dde9a2",[[1,"swisspost-internet-breadcrumbs",{customItems:[1,"custom-items"],customBreadcrumbItems:[32],overlayVisible:[32],isConcatenated:[32],dropdownOpen:[32],refsReady:[32],toggleOverlayById:[64]}]]],["p-33f6c69f",[[1,"swisspost-internet-footer",{liveSupportEnabled:[32],cookieSettingsEnabled:[32]}]]],["p-55fbc914",[[1,"post-klp-login-widget",{setFocus:[64]}]]],["p-02df8ca4",[[1,"post-language-switch",{mode:[1],langSwitchOpen:[32],toggleDropdown:[64]}]]],["p-6bb07a80",[[1,"post-logo"]]],["p-2ab12ef9",[[1,"post-main-navigation",{activeFlyout:[32],mobileMenuOpen:[32],toggleDropdown:[64],setFocus:[64],setActiveFlyout:[64]}]]],["p-51c15273",[[1,"post-meta-navigation",{orientation:[1],fullWidth:[4,"full-width"]}]]],["p-db8023e1",[[1,"post-search",{searchDropdownOpen:[32],coveoSuggestions:[32],placeSuggestions:[32],parcelSuggestion:[32],toggleDropdown:[64],setFocus:[64]}]]],["p-cbba35a8",[[0,"post-skiplinks"]]]],e)));
|
|
2
2
|
//# sourceMappingURL=swisspost-internet-header.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","project","stickyness","language","meta","login","search","skiplinks","configProxy","environment","languageSwitchOverrides","customConfig","languageCookieKey","languageLocalStorageKey","activeRoute","osFlyoutOverrides","fullWidth","activeFlyout","activeDropdownElement","getCurrentLanguage","customItems","customBreadcrumbItems","overlayVisible","isConcatenated","dropdownOpen","refsReady","liveSupportEnabled","cookieSettingsEnabled","setFocus","mode","langSwitchOpen","toggleDropdown","mobileMenuOpen","setActiveFlyout","orientation","searchDropdownOpen","coveoSuggestions","placeSuggestions","parcelSuggestion"],"sources":["../../node_modules/.pnpm/@stencil+core@3.4.2/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,GAEXC,EAAc,+CAAuC,CAAAC,QAAA,IAAAC,WAAA,IAAAC,SAAA,IAAAC,KAAA,IAAAC,MAAA,IAAAC,OAAA,IAAAC,UAAA,IAAAC,YAAA,mBAAAC,YAAA,IAAAC,wBAAA,gCAAAC,aAAA,oBAAAC,kBAAA,0BAAAC,wBAAA,iCAAAC,YAAA,mBAAAC,kBAAA,0BAAAC,UAAA,iBAAAC,aAAA,KAAAC,sBAAA,KAAAC,mBAAA,iHAAAC,YAAA,mBAAAC,sBAAA,KAAAC,eAAA,KAAAC,eAAA,KAAAC,aAAA,KAAAC,UAAA,wDAAAC,mBAAA,KAAAC,sBAAA,oDAAAC,SAAA,mDAAAC,KAAA,IAAAC,eAAA,KAAAC,eAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","project","stickyness","language","meta","login","search","skiplinks","configProxy","environment","languageSwitchOverrides","customConfig","languageCookieKey","languageLocalStorageKey","activeRoute","osFlyoutOverrides","fullWidth","activeFlyout","activeDropdownElement","getCurrentLanguage","customItems","customBreadcrumbItems","overlayVisible","isConcatenated","dropdownOpen","refsReady","toggleOverlayById","liveSupportEnabled","cookieSettingsEnabled","setFocus","mode","langSwitchOpen","toggleDropdown","mobileMenuOpen","setActiveFlyout","orientation","searchDropdownOpen","coveoSuggestions","placeSuggestions","parcelSuggestion"],"sources":["../../node_modules/.pnpm/@stencil+core@3.4.2/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,GAEXC,EAAc,+CAAuC,CAAAC,QAAA,IAAAC,WAAA,IAAAC,SAAA,IAAAC,KAAA,IAAAC,MAAA,IAAAC,OAAA,IAAAC,UAAA,IAAAC,YAAA,mBAAAC,YAAA,IAAAC,wBAAA,gCAAAC,aAAA,oBAAAC,kBAAA,0BAAAC,wBAAA,iCAAAC,YAAA,mBAAAC,kBAAA,0BAAAC,UAAA,iBAAAC,aAAA,KAAAC,sBAAA,KAAAC,mBAAA,iHAAAC,YAAA,mBAAAC,sBAAA,KAAAC,eAAA,KAAAC,eAAA,KAAAC,aAAA,KAAAC,UAAA,KAAAC,kBAAA,wDAAAC,mBAAA,KAAAC,sBAAA,oDAAAC,SAAA,mDAAAC,KAAA,IAAAC,eAAA,KAAAC,eAAA,oFAAAf,aAAA,KAAAgB,eAAA,KAAAD,eAAA,KAAAH,SAAA,KAAAK,gBAAA,mDAAAC,YAAA,IAAAnB,UAAA,sDAAAoB,mBAAA,KAAAC,iBAAA,KAAAC,iBAAA,KAAAC,iBAAA,KAAAP,eAAA,KAAAH,SAAA,gDAAA9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IBreadcrumbItem, IBreadcrumbOverlay } from '../../models/breadcrumbs.model';
|
|
2
2
|
export declare class PostInternetBreadcrumbs {
|
|
3
3
|
customItems?: string | IBreadcrumbItem[];
|
|
4
4
|
customBreadcrumbItems?: IBreadcrumbItem[];
|
|
@@ -7,6 +7,11 @@ export declare class PostInternetBreadcrumbs {
|
|
|
7
7
|
dropdownOpen: boolean;
|
|
8
8
|
refsReady: boolean;
|
|
9
9
|
host: Element;
|
|
10
|
+
/**
|
|
11
|
+
* Toggle an overlay associated with a button.
|
|
12
|
+
* @param {IBreadcrumbOverlay['id']} overlayId
|
|
13
|
+
*/
|
|
14
|
+
toggleOverlayById(overlayId: IBreadcrumbOverlay['id']): Promise<void>;
|
|
10
15
|
private controlNavRef?;
|
|
11
16
|
private visibleNavRef?;
|
|
12
17
|
private currentOverlay;
|
|
@@ -18,7 +23,7 @@ export declare class PostInternetBreadcrumbs {
|
|
|
18
23
|
disconnectedCallback(): void;
|
|
19
24
|
componentWillLoad(): Promise<void>;
|
|
20
25
|
componentDidLoad(): void;
|
|
21
|
-
|
|
26
|
+
handleCustomConfigChange(newValue: string | IBreadcrumbItem[]): void;
|
|
22
27
|
handleResize(): void;
|
|
23
28
|
checkConcatenation(): void;
|
|
24
29
|
toggleOverlay(overlay: IBreadcrumbOverlay, force?: boolean): void;
|
|
@@ -28,7 +33,7 @@ export declare class PostInternetBreadcrumbs {
|
|
|
28
33
|
setBodyScroll(overlay: IBreadcrumbOverlay): void;
|
|
29
34
|
toggleDropdown(force?: boolean): void;
|
|
30
35
|
handleWindowClick(): void;
|
|
31
|
-
registerIFrameResizer(iFrame: HTMLIFrameElement): void;
|
|
36
|
+
registerIFrameResizer(iFrame: HTMLIFrameElement | undefined): void;
|
|
32
37
|
/**
|
|
33
38
|
* Reference function for the overlay element got called. It is either null (overlay closed)
|
|
34
39
|
* or contains the overlay element as parameter.
|
|
@@ -15,7 +15,7 @@ export declare class PostInternetHeader {
|
|
|
15
15
|
/**
|
|
16
16
|
* Initial language to be used. Overrides automatic language detection.
|
|
17
17
|
*/
|
|
18
|
-
language?:
|
|
18
|
+
language?: 'de' | 'fr' | 'it' | 'en';
|
|
19
19
|
/**
|
|
20
20
|
* Toggle the meta navigation.
|
|
21
21
|
*/
|
|
@@ -41,7 +41,7 @@ export declare class PostInternetHeader {
|
|
|
41
41
|
*/
|
|
42
42
|
environment: Environment;
|
|
43
43
|
/**
|
|
44
|
-
* Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you
|
|
44
|
+
* Override the language switch links with custom URLs. Helpful when your application contains sub-pages, and you
|
|
45
45
|
* would like to stay on subpages when the user changes language.
|
|
46
46
|
*/
|
|
47
47
|
languageSwitchOverrides?: string | IAvailableLanguage[];
|
|
@@ -89,13 +89,14 @@ export declare class PostInternetHeader {
|
|
|
89
89
|
private debouncedResize;
|
|
90
90
|
private lastWindowWidth;
|
|
91
91
|
private updateLogoAnimation;
|
|
92
|
+
private scrollParent;
|
|
92
93
|
constructor();
|
|
93
94
|
connectedCallback(): void;
|
|
94
95
|
disconnectedCallback(): void;
|
|
95
96
|
componentWillLoad(): Promise<void>;
|
|
96
97
|
componentDidLoad(): void;
|
|
97
98
|
handleLanguageChange(newValue: string): Promise<void>;
|
|
98
|
-
|
|
99
|
+
handleAvailableLanguagesChange(newValue: string | IAvailableLanguage[]): void;
|
|
99
100
|
handleOsFlyoutOverrides(newValue: string | NavMainEntity): Promise<void>;
|
|
100
101
|
handleActiveRouteChange(newValue: string | ActiveRouteProp): Promise<void>;
|
|
101
102
|
handleCustomConfigChange(newValue: string | ICustomConfig): Promise<void>;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { DropdownEvent, NavMainEntity } from "./models/header.model";
|
|
9
|
-
import { IBreadcrumbItem } from "./models/breadcrumbs.model";
|
|
9
|
+
import { IBreadcrumbItem, IBreadcrumbOverlay } from "./models/breadcrumbs.model";
|
|
10
10
|
import { StickynessOptions } from "./models/implementor.model";
|
|
11
11
|
import { Environment, ICustomConfig } from "./models/general.model";
|
|
12
12
|
import { IAvailableLanguage } from "./models/language.model";
|
|
13
13
|
export { DropdownEvent, NavMainEntity } from "./models/header.model";
|
|
14
|
-
export { IBreadcrumbItem } from "./models/breadcrumbs.model";
|
|
14
|
+
export { IBreadcrumbItem, IBreadcrumbOverlay } from "./models/breadcrumbs.model";
|
|
15
15
|
export { StickynessOptions } from "./models/implementor.model";
|
|
16
16
|
export { Environment, ICustomConfig } from "./models/general.model";
|
|
17
17
|
export { IAvailableLanguage } from "./models/language.model";
|
|
@@ -70,6 +70,11 @@ export namespace Components {
|
|
|
70
70
|
}
|
|
71
71
|
interface SwisspostInternetBreadcrumbs {
|
|
72
72
|
"customItems"?: string | IBreadcrumbItem[];
|
|
73
|
+
/**
|
|
74
|
+
* Toggle an overlay associated with a button.
|
|
75
|
+
* @param overlayId
|
|
76
|
+
*/
|
|
77
|
+
"toggleOverlayById": (overlayId: IBreadcrumbOverlay['id']) => Promise<void>;
|
|
73
78
|
}
|
|
74
79
|
interface SwisspostInternetFooter {
|
|
75
80
|
}
|
|
@@ -102,7 +107,7 @@ export namespace Components {
|
|
|
102
107
|
/**
|
|
103
108
|
* Initial language to be used. Overrides automatic language detection.
|
|
104
109
|
*/
|
|
105
|
-
"language"?:
|
|
110
|
+
"language"?: 'de' | 'fr' | 'it' | 'en';
|
|
106
111
|
/**
|
|
107
112
|
* The header uses this cookie to set the language. Disables automatic language detection.
|
|
108
113
|
*/
|
|
@@ -112,7 +117,7 @@ export namespace Components {
|
|
|
112
117
|
*/
|
|
113
118
|
"languageLocalStorageKey"?: string;
|
|
114
119
|
/**
|
|
115
|
-
* Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you would like to stay on subpages when the user changes language.
|
|
120
|
+
* Override the language switch links with custom URLs. Helpful when your application contains sub-pages, and you would like to stay on subpages when the user changes language.
|
|
116
121
|
*/
|
|
117
122
|
"languageSwitchOverrides"?: string | IAvailableLanguage[];
|
|
118
123
|
/**
|
|
@@ -287,7 +292,7 @@ declare namespace LocalJSX {
|
|
|
287
292
|
/**
|
|
288
293
|
* Initial language to be used. Overrides automatic language detection.
|
|
289
294
|
*/
|
|
290
|
-
"language"?:
|
|
295
|
+
"language"?: 'de' | 'fr' | 'it' | 'en';
|
|
291
296
|
/**
|
|
292
297
|
* The header uses this cookie to set the language. Disables automatic language detection.
|
|
293
298
|
*/
|
|
@@ -297,7 +302,7 @@ declare namespace LocalJSX {
|
|
|
297
302
|
*/
|
|
298
303
|
"languageLocalStorageKey"?: string;
|
|
299
304
|
/**
|
|
300
|
-
* Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you would like to stay on subpages when the user changes language.
|
|
305
|
+
* Override the language switch links with custom URLs. Helpful when your application contains sub-pages, and you would like to stay on subpages when the user changes language.
|
|
301
306
|
*/
|
|
302
307
|
"languageSwitchOverrides"?: string | IAvailableLanguage[];
|
|
303
308
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getUserLang: (supportedLanguages: string[], implementorPreferredLanguage?: string, localStorageKey?: string, cookieKey?: string) => string
|
|
1
|
+
export declare const getUserLang: (supportedLanguages: string[], implementorPreferredLanguage?: string, localStorageKey?: string, cookieKey?: string) => string;
|
|
2
2
|
/**
|
|
3
3
|
* Persist chosen language to local storage
|
|
4
4
|
* @param lang Currently chose language, two char string
|
|
@@ -44,10 +44,7 @@ export declare const translate: (key: string, lang?: string, translationObject?:
|
|
|
44
44
|
};
|
|
45
45
|
'Change language': {
|
|
46
46
|
de: string;
|
|
47
|
-
fr: string;
|
|
48
|
-
* Build array of possible language definitions in order of importance.
|
|
49
|
-
* At the end is a filter function that will weed out any undefined or null entries.
|
|
50
|
-
*/
|
|
47
|
+
fr: string;
|
|
51
48
|
it: string;
|
|
52
49
|
};
|
|
53
50
|
'Go to main content': {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getScrollParent: (node: Element) => Element | Document;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/internet-header",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "The header for client facing applications.",
|
|
5
5
|
"author": "Swiss Post <oss@post.ch>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,39 +31,40 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@stencil/core": "3.4.2",
|
|
33
33
|
"@stencil/store": "2.0.9",
|
|
34
|
-
"@swisspost/design-system-styles": "6.
|
|
34
|
+
"@swisspost/design-system-styles": "6.4.1",
|
|
35
35
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
36
|
-
"iframe-resizer": "4.3.
|
|
37
|
-
"jquery": "3.7.
|
|
36
|
+
"iframe-resizer": "4.3.7",
|
|
37
|
+
"jquery": "3.7.1",
|
|
38
38
|
"tabbable": "6.2.0",
|
|
39
39
|
"throttle-debounce": "5.0.0",
|
|
40
40
|
"url-polyfill": "1.1.12"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/core": "7.22.
|
|
44
|
-
"@percy/cli": "1.
|
|
43
|
+
"@babel/core": "7.22.20",
|
|
44
|
+
"@percy/cli": "1.27.2",
|
|
45
45
|
"@percy/cypress": "3.1.2",
|
|
46
46
|
"@stencil/eslint-plugin": "0.4.0",
|
|
47
47
|
"@stencil/sass": "3.0.5",
|
|
48
|
+
"@types/body-scroll-lock": "3.1.0",
|
|
48
49
|
"@types/iframe-resizer": "3.5.9",
|
|
49
50
|
"@types/jest": "27.5.2",
|
|
50
|
-
"@types/jquery": "3.5.
|
|
51
|
-
"@types/node": "18.17.
|
|
51
|
+
"@types/jquery": "3.5.19",
|
|
52
|
+
"@types/node": "18.17.19",
|
|
52
53
|
"@types/throttle-debounce": "5.0.0",
|
|
53
54
|
"babel-loader": "9.1.3",
|
|
54
|
-
"bootstrap": "5.3.
|
|
55
|
-
"cypress": "
|
|
55
|
+
"bootstrap": "5.3.2",
|
|
56
|
+
"cypress": "13.2.0",
|
|
56
57
|
"cypress-each": "1.13.3",
|
|
57
58
|
"cypress-storybook": "0.5.1",
|
|
58
|
-
"eslint-plugin-react": "7.33.
|
|
59
|
+
"eslint-plugin-react": "7.33.2",
|
|
59
60
|
"globby": "13.2.2",
|
|
60
61
|
"jest": "27.5.1",
|
|
61
62
|
"rimraf": "5.0.1",
|
|
62
63
|
"rollup-plugin-node-polyfills": "0.2.1",
|
|
63
64
|
"rollup-plugin-scss": "4.0.0",
|
|
64
65
|
"rollup-plugin-visualizer": "5.9.2",
|
|
65
|
-
"sass": "1.
|
|
66
|
-
"start-server-and-test": "2.0.
|
|
66
|
+
"sass": "1.68.0",
|
|
67
|
+
"start-server-and-test": "2.0.1",
|
|
67
68
|
"ts-jest": "27.1.5",
|
|
68
69
|
"typescript": "4.9.5"
|
|
69
70
|
},
|
package/readme.md
CHANGED
|
@@ -8,13 +8,13 @@ The official Swiss Post Internet Header implementation, built with [Stencil JS](
|
|
|
8
8
|
|
|
9
9
|
The header docs are part of the storybook docs for the Design System.
|
|
10
10
|
|
|
11
|
-
[Internet Header Documentation](https://next.design-system.post.ch/?path=/
|
|
11
|
+
[Internet Header Documentation](https://next.design-system.post.ch/?path=/docs/internet-header-getting-started--docs)
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
15
|
There are two possibilities to install the header on a page.
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### Npm installation
|
|
18
18
|
|
|
19
19
|
Use this if your project uses a bundler or a framework like Angular, React or Vue.
|
|
20
20
|
|
|
@@ -22,28 +22,63 @@ Use this if your project uses a bundler or a framework like Angular, React or Vu
|
|
|
22
22
|
npm install @swisspost/internet-header
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
```html
|
|
26
|
+
<!-- index.html -->
|
|
27
|
+
<body>
|
|
28
|
+
<swisspost-internet-header project="your-project-id"></swisspost-internet-header>
|
|
29
|
+
...
|
|
30
|
+
</body>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Lazy-loaded
|
|
26
34
|
|
|
27
|
-
```
|
|
28
|
-
|
|
35
|
+
```javascript
|
|
36
|
+
// main.ts / index.js / ...
|
|
37
|
+
import { defineCustomElements } from '@swisspost/internet-header/loader';
|
|
29
38
|
|
|
30
39
|
defineCustomElements();
|
|
31
40
|
```
|
|
32
41
|
|
|
42
|
+
#### Bare component
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
// main.ts / index.js / ...
|
|
46
|
+
import '@swisspost/internet-header/dist/swisspost-internet-header/swisspost-internet-header.esm';
|
|
47
|
+
```
|
|
48
|
+
|
|
33
49
|
### Basic installation
|
|
34
50
|
|
|
35
51
|
Use this if you want to use the CDN version and if you don't use a bundler or a framework.
|
|
52
|
+
Make sure to replace `{version}` with the version you want to use or remove `@{version}` to use the latest version.
|
|
36
53
|
|
|
37
|
-
|
|
54
|
+
#### Lazy-loaded
|
|
38
55
|
|
|
39
56
|
```html
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
<!DOCTYPE html>
|
|
58
|
+
<html>
|
|
59
|
+
<body>
|
|
60
|
+
<swisspost-internet-header project="your-project-id"></swisspost-internet-header>
|
|
61
|
+
</body>
|
|
62
|
+
<script type="module">
|
|
63
|
+
import { defineCustomElements } from 'https://unpkg.com/@swisspost/internet-header@{version}/loader/index.es2017.js';
|
|
64
|
+
|
|
65
|
+
defineCustomElements();
|
|
66
|
+
</script>
|
|
67
|
+
</html>
|
|
68
|
+
```
|
|
69
|
+
#### Bare component
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<!-- index.html -->
|
|
73
|
+
<head>
|
|
43
74
|
<script
|
|
75
|
+
async
|
|
44
76
|
type="module"
|
|
45
|
-
src="https://unpkg.com/@swisspost/internet-header/dist/swisspost-internet-header/swisspost-internet-header.esm.js"
|
|
77
|
+
src="https://unpkg.com/@swisspost/internet-header@{version}/dist/swisspost-internet-header/swisspost-internet-header.esm.js"
|
|
46
78
|
></script>
|
|
79
|
+
</head>
|
|
80
|
+
<body>
|
|
81
|
+
<swisspost-internet-header project="your-project-id"></swisspost-internet-header>
|
|
47
82
|
</body>
|
|
48
83
|
```
|
|
49
84
|
|