@oiz/stzh-components 3.0.0-beta1 → 3.0.0-beta2
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/{app-globals-d508a3bc.js → app-globals-4968ae1c.js} +2 -2
- package/dist/cjs/{app-globals-d508a3bc.js.map → app-globals-4968ae1c.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js +13 -10
- package/dist/cjs/stzh-gallery.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pagebottom.cjs.entry.js +15 -9
- package/dist/cjs/stzh-pagebottom.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-share.cjs.entry.js → stzh-print_2.cjs.entry.js} +53 -11
- package/dist/cjs/stzh-print_2.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js +15 -9
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js +13 -4
- package/dist/cjs/stzh-sticky.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +3 -0
- package/dist/collection/assets/i18n/en.json +3 -0
- package/dist/collection/assets/media/icons/mono/facebook.svg +1 -1
- package/dist/collection/assets/media/icons/mono/linkedin.svg +1 -1
- package/dist/collection/assets/media/icons/mono/mail.svg +1 -1
- package/dist/collection/assets/media/icons/mono/xing.svg +1 -1
- package/dist/collection/assets/meta/icons-preview.html +4 -4
- package/dist/collection/components/stzh-button/stzh-button.css +1 -1
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +11 -0
- package/dist/collection/components/stzh-cta/stzh-cta.css +1 -1
- package/dist/collection/components/stzh-cta/stzh-cta.js +1 -1
- package/dist/collection/components/stzh-cta/stzh-cta.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.e2e.js +1 -0
- package/dist/collection/components/stzh-gallery/stzh-gallery.e2e.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.js +32 -9
- package/dist/collection/components/stzh-gallery/stzh-gallery.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.stories.js +9 -0
- package/dist/collection/components/stzh-header/stzh-header.js +1 -1
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.css +54 -13
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.e2e.js +2 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.e2e.js.map +1 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js +56 -12
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js.map +1 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.localization.js +2 -0
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.localization.js.map +1 -0
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.stories.js +87 -9
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.stories.js +20 -18
- package/dist/collection/components/stzh-share/stzh-share.css +1 -43
- package/dist/collection/components/stzh-share/stzh-share.js +10 -10
- package/dist/collection/components/stzh-share/stzh-share.js.map +1 -1
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +10 -0
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +1 -1
- package/dist/collection/components/stzh-sticky/stzh-sticky.js +13 -4
- package/dist/collection/components/stzh-sticky/stzh-sticky.js.map +1 -1
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +15 -9
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js.map +1 -1
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.stories.js +20 -18
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +3 -0
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +19 -0
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-button2.js +1 -1
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-cspace.js.map +1 -1
- package/dist/components/stzh-cta.js +1 -1
- package/dist/components/stzh-cta.js.map +1 -1
- package/dist/components/stzh-gallery.js +16 -11
- package/dist/components/stzh-gallery.js.map +1 -1
- package/dist/components/stzh-header.js +1 -1
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-pagebottom.js +39 -12
- package/dist/components/stzh-pagebottom.js.map +1 -1
- package/dist/components/stzh-print.js +1 -58
- package/dist/components/stzh-print.js.map +1 -1
- package/dist/{esm/stzh-print.entry.js → components/stzh-print2.js} +25 -11
- package/dist/components/stzh-print2.js.map +1 -0
- package/dist/components/stzh-share2.js +23 -11
- package/dist/components/stzh-share2.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/components/stzh-sticky-actions.js +15 -9
- package/dist/components/stzh-sticky-actions.js.map +1 -1
- package/dist/components/stzh-sticky2.js +13 -4
- package/dist/components/stzh-sticky2.js.map +1 -1
- package/dist/components/stzh-tooltip2.js +3 -1
- package/dist/components/stzh-tooltip2.js.map +1 -1
- package/dist/esm/{app-globals-984d1c64.js → app-globals-924beb17.js} +2 -2
- package/dist/esm/{app-globals-984d1c64.js.map → app-globals-924beb17.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-cspace.entry.js.map +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-cta.entry.js.map +1 -1
- package/dist/esm/stzh-gallery.entry.js +13 -10
- package/dist/esm/stzh-gallery.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +1 -1
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-pagebottom.entry.js +15 -9
- package/dist/esm/stzh-pagebottom.entry.js.map +1 -1
- package/dist/esm/{stzh-share.entry.js → stzh-print_2.entry.js} +54 -13
- package/dist/esm/stzh-print_2.entry.js.map +1 -0
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm/stzh-sticky-actions.entry.js +15 -9
- package/dist/esm/stzh-sticky-actions.entry.js.map +1 -1
- package/dist/esm/stzh-sticky.entry.js +13 -4
- package/dist/esm/stzh-sticky.entry.js.map +1 -1
- package/dist/esm/stzh-tooltip.entry.js +2 -1
- package/dist/esm/stzh-tooltip.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +3 -0
- package/dist/stzh-components/assets/i18n/en.json +3 -0
- package/dist/stzh-components/assets/media/icons/mono/facebook.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/linkedin.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/mail.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/xing.svg +1 -1
- package/dist/stzh-components/assets/meta/icons-preview.html +4 -4
- package/dist/stzh-components/p-2e713d1e.entry.js +2 -0
- package/dist/stzh-components/p-2e713d1e.entry.js.map +1 -0
- package/dist/stzh-components/p-31a45529.entry.js +2 -0
- package/dist/stzh-components/p-31a45529.entry.js.map +1 -0
- package/dist/stzh-components/p-33b46d08.entry.js +2 -0
- package/dist/stzh-components/{p-a2656f84.entry.js.map → p-33b46d08.entry.js.map} +1 -1
- package/dist/stzh-components/{p-52078c0b.entry.js → p-3641eb0c.entry.js} +2 -2
- package/dist/stzh-components/p-3641eb0c.entry.js.map +1 -0
- package/dist/stzh-components/p-475fc161.entry.js +2 -0
- package/dist/stzh-components/p-475fc161.entry.js.map +1 -0
- package/dist/stzh-components/{p-83978293.entry.js → p-5511087f.entry.js} +2 -2
- package/dist/stzh-components/p-5511087f.entry.js.map +1 -0
- package/dist/stzh-components/p-705d5931.entry.js +2 -0
- package/dist/stzh-components/{p-35b78231.entry.js.map → p-705d5931.entry.js.map} +1 -1
- package/dist/stzh-components/{p-e2485377.js → p-862a98f9.js} +2 -2
- package/dist/stzh-components/{p-879795a9.entry.js → p-bf79dbd0.entry.js} +2 -2
- package/dist/stzh-components/{p-879795a9.entry.js.map → p-bf79dbd0.entry.js.map} +1 -1
- package/dist/stzh-components/p-d2f7c020.entry.js +2 -0
- package/dist/stzh-components/p-d2f7c020.entry.js.map +1 -0
- package/dist/stzh-components/p-fa82219c.entry.js +2 -0
- package/dist/stzh-components/p-fa82219c.entry.js.map +1 -0
- package/dist/stzh-components/{p-fa3c5519.entry.js → p-fb9cc8a7.entry.js} +2 -2
- package/dist/stzh-components/p-fb9cc8a7.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-cta/stzh-cta.d.ts +1 -1
- package/dist/types/components/stzh-gallery/stzh-gallery.d.ts +5 -0
- package/dist/types/components/stzh-pagebottom/stzh-pagebottom.d.ts +11 -1
- package/dist/types/components/stzh-pagebottom/stzh-pagebottom.localization.d.ts +4 -0
- package/dist/types/components/stzh-sticky-actions/stzh-sticky-actions.d.ts +2 -2
- package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +2 -0
- package/dist/types/components.d.ts +40 -6
- package/dist/vscode-data.json +25 -5
- package/package.json +1 -1
- package/dist/cjs/stzh-print.cjs.entry.js +0 -52
- package/dist/cjs/stzh-print.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-share.cjs.entry.js.map +0 -1
- package/dist/collection/patterns/print/print.e2e.js +0 -18
- package/dist/collection/patterns/print/print.e2e.js.map +0 -1
- package/dist/esm/stzh-print.entry.js.map +0 -1
- package/dist/esm/stzh-share.entry.js.map +0 -1
- package/dist/stzh-components/p-2676b9db.entry.js +0 -2
- package/dist/stzh-components/p-2676b9db.entry.js.map +0 -1
- package/dist/stzh-components/p-2afe2028.entry.js +0 -2
- package/dist/stzh-components/p-2afe2028.entry.js.map +0 -1
- package/dist/stzh-components/p-35b78231.entry.js +0 -2
- package/dist/stzh-components/p-51be8f59.entry.js +0 -2
- package/dist/stzh-components/p-51be8f59.entry.js.map +0 -1
- package/dist/stzh-components/p-52078c0b.entry.js.map +0 -1
- package/dist/stzh-components/p-83978293.entry.js.map +0 -1
- package/dist/stzh-components/p-89de4375.entry.js +0 -2
- package/dist/stzh-components/p-89de4375.entry.js.map +0 -1
- package/dist/stzh-components/p-a2656f84.entry.js +0 -2
- package/dist/stzh-components/p-c67dcd7a.entry.js +0 -2
- package/dist/stzh-components/p-c67dcd7a.entry.js.map +0 -1
- package/dist/stzh-components/p-e142e3e5.entry.js +0 -2
- package/dist/stzh-components/p-e142e3e5.entry.js.map +0 -1
- package/dist/stzh-components/p-fa3c5519.entry.js.map +0 -1
- /package/dist/stzh-components/{p-e2485377.js.map → p-862a98f9.js.map} +0 -0
|
@@ -1,59 +1,86 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
3
|
-
import { d as defineCustomElement$
|
|
2
|
+
import { d as defineCustomElement$8 } from './stzh-badge2.js';
|
|
3
|
+
import { d as defineCustomElement$7 } from './stzh-button2.js';
|
|
4
|
+
import { d as defineCustomElement$6 } from './stzh-icon2.js';
|
|
5
|
+
import { d as defineCustomElement$5 } from './stzh-print2.js';
|
|
4
6
|
import { d as defineCustomElement$4 } from './stzh-share2.js';
|
|
5
7
|
import { d as defineCustomElement$3 } from './stzh-text2.js';
|
|
6
8
|
import { d as defineCustomElement$2 } from './stzh-tooltip2.js';
|
|
7
9
|
|
|
8
|
-
const stzhPagebottomCss = ".sc-stzh-pagebottom-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-pagebottom-h{display:none}.sc-stzh-pagebottom-h *.sc-stzh-pagebottom,.sc-stzh-pagebottom-h *.sc-stzh-pagebottom::before,.sc-stzh-pagebottom-h *.sc-stzh-pagebottom::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-pagebottom-h .has-focus.sc-stzh-pagebottom{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-pagebottom-h .stzh-fylingfocus-focused.sc-stzh-pagebottom{outline-style:none !important}.sc-stzh-pagebottom-h .stzh-fylingfocus-focused.sc-stzh-pagebottom::-moz-focus-inner{border:0 !important}@media print{.sc-stzh-pagebottom-h{display:none}}.
|
|
10
|
+
const stzhPagebottomCss = ".sc-stzh-pagebottom-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-pagebottom-h{display:none}.sc-stzh-pagebottom-h *.sc-stzh-pagebottom,.sc-stzh-pagebottom-h *.sc-stzh-pagebottom::before,.sc-stzh-pagebottom-h *.sc-stzh-pagebottom::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-pagebottom-h .has-focus.sc-stzh-pagebottom{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-pagebottom-h .stzh-fylingfocus-focused.sc-stzh-pagebottom{outline-style:none !important}.sc-stzh-pagebottom-h .stzh-fylingfocus-focused.sc-stzh-pagebottom::-moz-focus-inner{border:0 !important}@media print{.sc-stzh-pagebottom-h{display:none}}.stzh-pagebottom__wrapper.sc-stzh-pagebottom{display:grid}.stzh-pagebottom__left.sc-stzh-pagebottom{display:flex;flex-direction:column;flex-wrap:wrap;row-gap:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-pagebottom__left.sc-stzh-pagebottom{flex-direction:row}}.stzh-pagebottom__share-title.sc-stzh-pagebottom{font-size:var(--stzh-font-curve-caption-default-font-size, var(--stzh-font-nano-font-size));line-height:var(--stzh-font-curve-caption-default-text-line-height, var(--stzh-font-nano-text-line-height));margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 900px){.stzh-pagebottom__share-title.sc-stzh-pagebottom{font-size:var(--stzh-font-curve-caption-medium-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-caption-medium-text-line-height, var(--stzh-font-micro-text-line-height))}}.stzh-pagebottom__sticky-actions.sc-stzh-pagebottom{margin-left:auto;margin-top:var(--stzh-space-medium);--stzh-button-white-space:nowrap}@media screen and (min-width: 600px){.stzh-pagebottom__sticky-actions.sc-stzh-pagebottom{margin-top:0}}.stzh-pagebottom__print.sc-stzh-pagebottom,.stzh-pagebottom__share-wrapper.sc-stzh-pagebottom{flex-shrink:0}.stzh-pagebottom__share-wrapper.sc-stzh-pagebottom{margin-left:-0.625rem}@media screen and (min-width: 600px){.stzh-pagebottom__share-wrapper.sc-stzh-pagebottom{margin-left:0}}@media screen and (min-width: 600px){.stzh-pagebottom__print.sc-stzh-pagebottom{margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-pagebottom__print.sc-stzh-pagebottom{margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px) and (min-width: 600px){.stzh-pagebottom__print.sc-stzh-pagebottom{margin-right:var(--stzh-space-xxxxlarge)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-pagebottom__print.sc-stzh-pagebottom{margin-right:var(--stzh-space-xxxxlarge)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-pagebottom__print.sc-stzh-pagebottom{margin-right:var(--stzh-space-xbig)}}.stzh-pagebottom.sc-stzh-pagebottom:has(.stzh-pagebottom__sticky-actions:not(:empty)) .stzh-pagebottom__wrapper.sc-stzh-pagebottom{grid-template-columns:auto}@media screen and (min-width: 600px){.stzh-pagebottom.sc-stzh-pagebottom:has(.stzh-pagebottom__sticky-actions:not(:empty)) .stzh-pagebottom__wrapper.sc-stzh-pagebottom{grid-template-columns:minmax(0, 1fr) calc(6.875rem + 2.75rem + var(--stzh-space-small) + var(--stzh-space-medium))}}";
|
|
9
11
|
|
|
10
12
|
const StzhPagebottom$1 = /*@__PURE__*/ proxyCustomElement(class StzhPagebottom extends HTMLElement {
|
|
11
13
|
constructor() {
|
|
12
14
|
super();
|
|
13
15
|
this.__registerHost();
|
|
16
|
+
this.localization = undefined;
|
|
14
17
|
this.shareTitle = "";
|
|
15
18
|
this.shareUrl = undefined;
|
|
16
19
|
this.shareServices = undefined;
|
|
17
|
-
this.shareDisabled =
|
|
20
|
+
this.shareDisabled = undefined;
|
|
18
21
|
this.shareMailSubject = undefined;
|
|
19
22
|
this.shareMailBody = undefined;
|
|
20
23
|
this.logoHref = "https://www.stadt-zuerich.ch";
|
|
21
|
-
this.
|
|
24
|
+
this.withPrint = undefined;
|
|
25
|
+
this.printAnalyticsId = undefined;
|
|
26
|
+
}
|
|
27
|
+
async componentWillLoad() {
|
|
28
|
+
if (!this.localization) {
|
|
29
|
+
this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, "pagebottom");
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
render() {
|
|
24
|
-
const
|
|
33
|
+
// const printUsed: boolean = hasSlot(this.element, "print");
|
|
34
|
+
// const logoUsed: boolean = hasSlot(this.element, "logo");
|
|
25
35
|
const classes = {
|
|
26
36
|
"stzh-pagebottom": true
|
|
27
37
|
};
|
|
28
|
-
return (h(Host, null, h("div", { class: classes },
|
|
38
|
+
return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-pagebottom__wrapper" }, h("div", { class: "stzh-pagebottom__left" }, this.withPrint &&
|
|
39
|
+
h("div", { class: "stzh-pagebottom__print" }, h("stzh-print", null, h("stzh-button", { label: this.localization.printLabel, variant: "tertiary-plain", size: "small", noPaddingLeft: true, noPaddingRight: true, analyticsId: this.printAnalyticsId }))), !this.shareDisabled &&
|
|
29
40
|
h("div", { class: "stzh-pagebottom__share-wrapper" }, this.shareTitle &&
|
|
30
|
-
h("div", { class: "stzh-pagebottom__share-title" }, this.shareTitle), h("stzh-share", { url: this.shareUrl, services: this.shareServices, mailSubject: this.shareMailSubject, mailBody: this.shareMailBody })),
|
|
31
|
-
h("div", { class: "stzh-pagebottom__logo" }, h("a", { href: this.logoHref, class: "stzh-pagebottom__logo-link", "s-object-id": this.logoAnalyticsId || "Footer Logo" }, h("slot", { name: "logo" }))))));
|
|
41
|
+
h("div", { class: "stzh-pagebottom__share-title" }, this.shareTitle), h("stzh-share", { url: this.shareUrl, services: this.shareServices, mailSubject: this.shareMailSubject, mailBody: this.shareMailBody }))), h("div", { class: "stzh-pagebottom__sticky-actions" }, h("slot", { name: "sticky-actions" }))))));
|
|
32
42
|
}
|
|
33
43
|
get element() { return this; }
|
|
34
44
|
static get style() { return stzhPagebottomCss; }
|
|
35
45
|
}, [6, "stzh-pagebottom", {
|
|
46
|
+
"localization": [16],
|
|
36
47
|
"shareTitle": [1, "share-title"],
|
|
37
48
|
"shareUrl": [1, "share-url"],
|
|
38
49
|
"shareServices": [1, "share-services"],
|
|
39
|
-
"shareDisabled": [
|
|
50
|
+
"shareDisabled": [516, "share-disabled"],
|
|
40
51
|
"shareMailSubject": [1, "share-mail-subject"],
|
|
41
52
|
"shareMailBody": [1, "share-mail-body"],
|
|
42
53
|
"logoHref": [1, "logo-href"],
|
|
43
|
-
"
|
|
54
|
+
"withPrint": [516, "with-print"],
|
|
55
|
+
"printAnalyticsId": [1, "print-analytics-id"]
|
|
44
56
|
}]);
|
|
45
57
|
function defineCustomElement$1() {
|
|
46
58
|
if (typeof customElements === "undefined") {
|
|
47
59
|
return;
|
|
48
60
|
}
|
|
49
|
-
const components = ["stzh-pagebottom", "stzh-icon", "stzh-share", "stzh-text", "stzh-tooltip"];
|
|
61
|
+
const components = ["stzh-pagebottom", "stzh-badge", "stzh-button", "stzh-icon", "stzh-print", "stzh-share", "stzh-text", "stzh-tooltip"];
|
|
50
62
|
components.forEach(tagName => { switch (tagName) {
|
|
51
63
|
case "stzh-pagebottom":
|
|
52
64
|
if (!customElements.get(tagName)) {
|
|
53
65
|
customElements.define(tagName, StzhPagebottom$1);
|
|
54
66
|
}
|
|
55
67
|
break;
|
|
68
|
+
case "stzh-badge":
|
|
69
|
+
if (!customElements.get(tagName)) {
|
|
70
|
+
defineCustomElement$8();
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
case "stzh-button":
|
|
74
|
+
if (!customElements.get(tagName)) {
|
|
75
|
+
defineCustomElement$7();
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
56
78
|
case "stzh-icon":
|
|
79
|
+
if (!customElements.get(tagName)) {
|
|
80
|
+
defineCustomElement$6();
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case "stzh-print":
|
|
57
84
|
if (!customElements.get(tagName)) {
|
|
58
85
|
defineCustomElement$5();
|
|
59
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-pagebottom.js","mappings":"
|
|
1
|
+
{"file":"stzh-pagebottom.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,m/GAAm/G;;MCqBhgHA,gBAAc;;;;;sBAKI,EAAE;;;;;;oBAqBJ,8BAA8B;;;;EAoBzD,MAAM,iBAAiB;IACrB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;MACtB,IAAI,CAAC,YAAY,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;KACrG;GACF;EAED,MAAM;;;IAIJ,MAAM,OAAO,GAAG;MACd,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,OAAO,IACjB,WAAK,KAAK,EAAC,0BAA0B,IACnC,WAAK,KAAK,EAAC,uBAAuB,IAC/B,IAAI,CAAC,SAAS;MACb,WAAK,KAAK,EAAC,wBAAwB,IACjC,sBACE,mBACE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,EACnC,OAAO,EAAC,gBAAgB,EACxB,IAAI,EAAC,OAAO,EACZ,aAAa,EAAE,IAAI,EACnB,cAAc,EAAE,IAAI,EACpB,WAAW,EAAE,IAAI,CAAC,gBAAgB,GACrB,CACJ,CACT,EAGP,CAAC,IAAI,CAAC,aAAa;MAClB,WAAK,KAAK,EAAC,gCAAgC,IACxC,IAAI,CAAC,UAAU;QACd,WAAK,KAAK,EAAC,8BAA8B,IAAE,IAAI,CAAC,UAAU,CAAO,EAEnE,kBACE,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,QAAQ,EAAE,IAAI,CAAC,aAAa,GAChB,CACV,CAEJ,EAEN,WAAK,KAAK,EAAC,iCAAiC,IAC1C,YAAM,IAAI,EAAC,gBAAgB,GAAQ,CAC/B,CACF,CAaF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhPagebottom"],"sources":["src/components/stzh-pagebottom/stzh-pagebottom.scss?tag=stzh-pagebottom&encapsulation=scoped","src/components/stzh-pagebottom/stzh-pagebottom.tsx"],"sourcesContent":[":host {\n @media print {\n display: none;\n }\n\n // ::slotted([slot=\"logo\"]) {\n // height: 38px;\n // }\n}\n\n.stzh-pagebottom {\n &__wrapper {\n display: grid;\n }\n\n &__left {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n row-gap: space('xsmall');\n\n @include mq($from: small) {\n flex-direction: row;\n }\n }\n\n &__share-title {\n @include fontCurve('caption');\n\t\tmargin-bottom: space('small');\n }\n\n &__sticky-actions {\n margin-left: auto;\n margin-top: space('medium');\n\n --stzh-button-white-space: nowrap;\n\n @include mq($from: small) {\n margin-top: 0;\n }\n }\n\n &__print,\n &__share-wrapper {\n flex-shrink: 0;\n }\n\n &__share-wrapper {\n margin-left: -10px;\n\n @include mq($from: small) {\n margin-left: 0;\n }\n }\n\n &__print {\n @include mq($from: small) {\n margin-right: space('xxlarge');\n }\n\n @include mq($from: medium) {\n @include spaceCurve('margin-right', 'big');\n }\n }\n\n // &__logo {\n // @include mq($from: small) {\n // margin-left: auto;\n // }\n // }\n\n // &__logo-link {\n // &:not(:empty) {\n // display: block;\n // margin-top: space('xlarge');\n\n // @include mq($from: small) {\n // margin-top: 0;\n // margin-left: space('xlarge');\n // }\n // }\n // }\n\n &:has(#{&}__sticky-actions:not(:empty)) &__wrapper {\n grid-template-columns: auto;\n\n @include mq($from: small) {\n grid-template-columns: minmax(0, 1fr) calc(110px + 44px + #{space('small')} + #{space('medium')});\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n} from \"@stencil/core\";\n\nimport { ShareService } from \"../../index\";\n// import { hasSlot } from \"../../utils/utils\";\n\nimport { StzhPagebottomLocalizedText } from \"./stzh-pagebottom.localization\";\n\n/**\n * @slot logo - Slot for a logo image\n */\n@Component({\n tag: \"stzh-pagebottom\",\n styleUrl: \"stzh-pagebottom.scss\",\n scoped: true\n})\nexport class StzhPagebottom {\n /** Translation strings. */\n @Prop() localization: StzhPagebottomLocalizedText;\n\n /** Share Title */\n @Prop() shareTitle: string = \"\";\n\n /** URL of current site (uses full URL by default) */\n @Prop() shareUrl: string;\n\n /**\n * Array of enabled share buttons.\n * Possible services: `facebook` / `twitter` / `linkedin` / `xing` / `mail`\n */\n @Prop() shareServices: ShareService[] | string;\n\n /** Whether to show share */\n @Prop({ reflect: true }) shareDisabled: boolean;\n\n /** Overwrite share mail subject translation */\n @Prop() shareMailSubject: string;\n\n /** Overwrite share mail body translation */\n @Prop() shareMailBody: string;\n\n /** Logo href */\n @Prop() logoHref: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether to show print button */\n @Prop({ reflect: true }) withPrint: boolean;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute of the print button element.\n */\n @Prop() printAnalyticsId: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the logo link element.\n * Default value will be \"Footer Logo\"\n */\n // @Prop() logoAnalyticsId: string;\n\n @Element() element: HTMLStzhPagebottomElement;\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"pagebottom\");\n }\n }\n\n render() {\n // const printUsed: boolean = hasSlot(this.element, \"print\");\n // const logoUsed: boolean = hasSlot(this.element, \"logo\");\n\n const classes = {\n \"stzh-pagebottom\": true\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-pagebottom__wrapper\">\n <div class=\"stzh-pagebottom__left\">\n {this.withPrint &&\n <div class=\"stzh-pagebottom__print\">\n <stzh-print>\n <stzh-button\n label={this.localization.printLabel}\n variant=\"tertiary-plain\"\n size=\"small\"\n noPaddingLeft={true}\n noPaddingRight={true}\n analyticsId={this.printAnalyticsId}\n ></stzh-button>\n </stzh-print>\n </div>\n }\n\n {!this.shareDisabled &&\n <div class=\"stzh-pagebottom__share-wrapper\">\n {this.shareTitle &&\n <div class=\"stzh-pagebottom__share-title\">{this.shareTitle}</div>\n }\n <stzh-share\n url={this.shareUrl}\n services={this.shareServices}\n mailSubject={this.shareMailSubject}\n mailBody={this.shareMailBody}\n ></stzh-share>\n </div>\n }\n </div>\n\n <div class=\"stzh-pagebottom__sticky-actions\">\n <slot name=\"sticky-actions\"></slot>\n </div>\n </div>\n\n {/* {logoUsed &&\n <div class=\"stzh-pagebottom__logo\">\n <a\n href={this.logoHref}\n class=\"stzh-pagebottom__logo-link\"\n s-object-id={this.logoAnalyticsId || \"Footer Logo\"}\n >\n <slot name=\"logo\"></slot>\n </a>\n </div>\n } */}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,61 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as setPropsIfNull } from './utils.js';
|
|
3
|
-
|
|
4
|
-
const stzhPrintCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{display:contents}@media print{:host{display:none}}.stzh-print{display:contents}";
|
|
5
|
-
|
|
6
|
-
const StzhPrint$1 = /*@__PURE__*/ proxyCustomElement(class StzhPrint extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.handleLinkClick = () => {
|
|
12
|
-
window.print();
|
|
13
|
-
};
|
|
14
|
-
this.init = () => {
|
|
15
|
-
const links = this.element.querySelectorAll("stzh-link, stzh-button");
|
|
16
|
-
links.forEach((link) => {
|
|
17
|
-
link.addEventListener('click', this.handleLinkClick);
|
|
18
|
-
setPropsIfNull(link, {
|
|
19
|
-
icon: "print"
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
connectedCallback() {
|
|
25
|
-
this.init();
|
|
26
|
-
this.observer = new MutationObserver(this.init);
|
|
27
|
-
this.observer.observe(this.element, {
|
|
28
|
-
childList: true,
|
|
29
|
-
subtree: true
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
disconnectedCallback() {
|
|
33
|
-
if (this.observer) {
|
|
34
|
-
this.observer.disconnect();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
const classes = {
|
|
39
|
-
"stzh-print": true
|
|
40
|
-
};
|
|
41
|
-
return (h(Host, null, h("div", { class: classes }, h("slot", null))));
|
|
42
|
-
}
|
|
43
|
-
get element() { return this; }
|
|
44
|
-
static get style() { return stzhPrintCss; }
|
|
45
|
-
}, [1, "stzh-print"]);
|
|
46
|
-
function defineCustomElement$1() {
|
|
47
|
-
if (typeof customElements === "undefined") {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const components = ["stzh-print"];
|
|
51
|
-
components.forEach(tagName => { switch (tagName) {
|
|
52
|
-
case "stzh-print":
|
|
53
|
-
if (!customElements.get(tagName)) {
|
|
54
|
-
customElements.define(tagName, StzhPrint$1);
|
|
55
|
-
}
|
|
56
|
-
break;
|
|
57
|
-
} });
|
|
58
|
-
}
|
|
1
|
+
import { S as StzhPrint$1, d as defineCustomElement$1 } from './stzh-print2.js';
|
|
59
2
|
|
|
60
3
|
const StzhPrint = StzhPrint$1;
|
|
61
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-print.js","mappings":"
|
|
1
|
+
{"file":"stzh-print.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as setPropsIfNull } from './utils
|
|
3
|
-
import './string-utils-e252977e.js';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as setPropsIfNull } from './utils.js';
|
|
4
3
|
|
|
5
4
|
const stzhPrintCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{display:contents}@media print{:host{display:none}}.stzh-print{display:contents}";
|
|
6
5
|
|
|
7
|
-
const StzhPrint = class {
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
6
|
+
const StzhPrint = /*@__PURE__*/ proxyCustomElement(class StzhPrint extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
10
11
|
this.handleLinkClick = () => {
|
|
11
12
|
window.print();
|
|
12
13
|
};
|
|
@@ -39,10 +40,23 @@ const StzhPrint = class {
|
|
|
39
40
|
};
|
|
40
41
|
return (h(Host, null, h("div", { class: classes }, h("slot", null))));
|
|
41
42
|
}
|
|
42
|
-
get element() { return
|
|
43
|
-
}
|
|
44
|
-
|
|
43
|
+
get element() { return this; }
|
|
44
|
+
static get style() { return stzhPrintCss; }
|
|
45
|
+
}, [1, "stzh-print"]);
|
|
46
|
+
function defineCustomElement() {
|
|
47
|
+
if (typeof customElements === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const components = ["stzh-print"];
|
|
51
|
+
components.forEach(tagName => { switch (tagName) {
|
|
52
|
+
case "stzh-print":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
customElements.define(tagName, StzhPrint);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
45
59
|
|
|
46
|
-
export { StzhPrint as
|
|
60
|
+
export { StzhPrint as S, defineCustomElement as d };
|
|
47
61
|
|
|
48
|
-
//# sourceMappingURL=stzh-
|
|
62
|
+
//# sourceMappingURL=stzh-print2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"stzh-print2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,w2BAAw2B;;MCiBh3B,SAAS;EALtB;;;;IAUU,oBAAe,GAAG;MACxB,MAAM,CAAC,KAAK,EAAE,CAAC;KAChB,CAAA;IAEO,SAAI,GAAG;MACb,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;MAEtE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI;QACjB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAErD,cAAc,CAAC,IAAI,EAAE;UACnB,IAAI,EAAE,OAAO;SACiC,CAAC,CAAA;OAClD,CAAC,CAAC;KACJ,CAAA;GA+BF;EA7BC,iBAAiB;IACf,IAAI,CAAC,IAAI,EAAE,CAAC;IAEZ,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;MAClC,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;GACJ;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;KAC5B;GACF;EAED,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,YAAY,EAAE,IAAI;KACnB,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,OAAO,IACjB,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-print/stzh-print.scss?tag=stzh-print&encapsulation=shadow","src/components/stzh-print/stzh-print.tsx"],"sourcesContent":[":host {\n display: contents;\n\n @media print {\n display: none;\n }\n}\n\n.stzh-print {\n display: contents;\n}\n","import {\n Component,\n Host,\n h,\n Element,\n} from \"@stencil/core\";\n\nimport { setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for label\n */\n@Component({\n tag: \"stzh-print\",\n styleUrl: \"stzh-print.scss\",\n shadow: true\n})\nexport class StzhPrint {\n @Element() element: HTMLStzhPrintElement;\n\n private observer: MutationObserver;\n\n private handleLinkClick = () => {\n window.print();\n }\n\n private init = () => {\n const links = this.element.querySelectorAll(\"stzh-link, stzh-button\");\n\n links.forEach((link) => {\n link.addEventListener('click', this.handleLinkClick);\n\n setPropsIfNull(link, {\n icon: \"print\"\n } as HTMLStzhLinkElement | HTMLStzhButtonElement)\n });\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const classes = {\n \"stzh-print\": true\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { b as abbreviateText, g as getMeta } from './utils.js';
|
|
3
|
+
import { d as defineCustomElement$5 } from './stzh-badge2.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './stzh-button2.js';
|
|
3
5
|
import { d as defineCustomElement$3 } from './stzh-icon2.js';
|
|
4
6
|
import { d as defineCustomElement$2 } from './stzh-text2.js';
|
|
5
7
|
import { d as defineCustomElement$1 } from './stzh-tooltip2.js';
|
|
6
8
|
|
|
7
|
-
const stzhShareCss = ".sc-stzh-share-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-share-h{display:none}.sc-stzh-share-h *.sc-stzh-share,.sc-stzh-share-h *.sc-stzh-share::before,.sc-stzh-share-h *.sc-stzh-share::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-share-h .has-focus.sc-stzh-share{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-share-h .stzh-fylingfocus-focused.sc-stzh-share{outline-style:none !important}.sc-stzh-share-h .stzh-fylingfocus-focused.sc-stzh-share::-moz-focus-inner{border:0 !important}.stzh-share__list.sc-stzh-share{list-style:none;margin:0;padding:0;display:flex}.stzh-share__item.sc-stzh-share:not(:last-child){margin-right:var(--stzh-space-
|
|
9
|
+
const stzhShareCss = ".sc-stzh-share-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-share-h{display:none}.sc-stzh-share-h *.sc-stzh-share,.sc-stzh-share-h *.sc-stzh-share::before,.sc-stzh-share-h *.sc-stzh-share::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-share-h .has-focus.sc-stzh-share{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-share-h .stzh-fylingfocus-focused.sc-stzh-share{outline-style:none !important}.sc-stzh-share-h .stzh-fylingfocus-focused.sc-stzh-share::-moz-focus-inner{border:0 !important}.stzh-share__list.sc-stzh-share{list-style:none;margin:0;padding:0;display:flex}.stzh-share__item.sc-stzh-share:not(:last-child){margin-right:var(--stzh-space-xxsmall)}";
|
|
8
10
|
|
|
9
11
|
// 280 - URL (always 24) = 256
|
|
10
12
|
const MAX_TWEET_LENGTH = 256;
|
|
@@ -22,7 +24,7 @@ const StzhShare = /*@__PURE__*/ proxyCustomElement(class StzhShare extends HTMLE
|
|
|
22
24
|
this.mailSubject = undefined;
|
|
23
25
|
this.mailBody = undefined;
|
|
24
26
|
this.services = [
|
|
25
|
-
"facebook", "twitter", "linkedin", "xing"
|
|
27
|
+
"mail", "facebook", "twitter", "linkedin", "xing"
|
|
26
28
|
];
|
|
27
29
|
}
|
|
28
30
|
servicesWatcher(newValue) {
|
|
@@ -51,6 +53,13 @@ const StzhShare = /*@__PURE__*/ proxyCustomElement(class StzhShare extends HTMLE
|
|
|
51
53
|
const twitterTitle = encodeURIComponent(abbreviateText(title, MAX_TWEET_LENGTH));
|
|
52
54
|
const description = encodeURIComponent(getMeta("description"));
|
|
53
55
|
const serviceData = {
|
|
56
|
+
"mail": {
|
|
57
|
+
popup: false,
|
|
58
|
+
blank: false,
|
|
59
|
+
url: `mailto:?subject=${mailSubject}&body=${mailBody}`,
|
|
60
|
+
text: this.localization.shareMail,
|
|
61
|
+
icon: "mail"
|
|
62
|
+
},
|
|
54
63
|
"facebook": {
|
|
55
64
|
popup: true,
|
|
56
65
|
blank: true,
|
|
@@ -78,16 +87,9 @@ const StzhShare = /*@__PURE__*/ proxyCustomElement(class StzhShare extends HTMLE
|
|
|
78
87
|
url: `https://www.xing.com/spi/shares/new?url=${shareUrl}`,
|
|
79
88
|
text: this.localization.shareXing,
|
|
80
89
|
icon: "xing"
|
|
81
|
-
},
|
|
82
|
-
"mail": {
|
|
83
|
-
popup: false,
|
|
84
|
-
blank: false,
|
|
85
|
-
url: `mailto:?subject=${mailSubject}&body=${mailBody}`,
|
|
86
|
-
text: this.localization.shareMail,
|
|
87
|
-
icon: "mail"
|
|
88
90
|
}
|
|
89
91
|
};
|
|
90
|
-
return (h(Host, null, h("div", { class: classes }, h("ul", { class: "stzh-share__list" }, this._services.map((service) => h("li", { class: "stzh-share__item" }, h("stzh-tooltip", { content: serviceData[service].text }, h("
|
|
92
|
+
return (h(Host, null, h("div", { class: classes }, h("ul", { class: "stzh-share__list" }, this._services.map((service) => h("li", { class: "stzh-share__item" }, h("stzh-tooltip", { content: serviceData[service].text, size: "small" }, h("stzh-button", { class: `stzh-share__button is-${service}`, size: "small", variant: "tertiary", iconOnly: true, href: serviceData[service].url, rel: serviceData[service].blank ? "nofollow noopener noreferrer" : "nofollow", target: serviceData[service].blank ? "_blank" : "_self", onClick: serviceData[service].popup ? (e) => this.openPopup(serviceData[service].url, e) : null, analyticsId: serviceData[service].text, icon: serviceData[service].icon }))))))));
|
|
91
93
|
}
|
|
92
94
|
get element() { return this; }
|
|
93
95
|
static get watchers() { return {
|
|
@@ -107,13 +109,23 @@ function defineCustomElement() {
|
|
|
107
109
|
if (typeof customElements === "undefined") {
|
|
108
110
|
return;
|
|
109
111
|
}
|
|
110
|
-
const components = ["stzh-share", "stzh-icon", "stzh-text", "stzh-tooltip"];
|
|
112
|
+
const components = ["stzh-share", "stzh-badge", "stzh-button", "stzh-icon", "stzh-text", "stzh-tooltip"];
|
|
111
113
|
components.forEach(tagName => { switch (tagName) {
|
|
112
114
|
case "stzh-share":
|
|
113
115
|
if (!customElements.get(tagName)) {
|
|
114
116
|
customElements.define(tagName, StzhShare);
|
|
115
117
|
}
|
|
116
118
|
break;
|
|
119
|
+
case "stzh-badge":
|
|
120
|
+
if (!customElements.get(tagName)) {
|
|
121
|
+
defineCustomElement$5();
|
|
122
|
+
}
|
|
123
|
+
break;
|
|
124
|
+
case "stzh-button":
|
|
125
|
+
if (!customElements.get(tagName)) {
|
|
126
|
+
defineCustomElement$4();
|
|
127
|
+
}
|
|
128
|
+
break;
|
|
117
129
|
case "stzh-icon":
|
|
118
130
|
if (!customElements.get(tagName)) {
|
|
119
131
|
defineCustomElement$3();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-share2.js","mappings":"
|
|
1
|
+
{"file":"stzh-share2.js","mappings":"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","names":[],"sources":["src/components/stzh-share/stzh-share.scss?tag=stzh-share&encapsulation=scoped","src/components/stzh-share/stzh-share.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-share {\n &__list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n }\n\n &__item {\n &:not(:last-child) {\n margin-right: space('xxsmall');\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch\n} from \"@stencil/core\";\n\nimport { ShareService } from \"../../index\";\nimport { StzhShareLocalizedText } from \"./stzh-share.localization\"\nimport { getMeta } from '../../utils/utils';\nimport { abbreviateText } from '../../utils/string-utils';\n\n// 280 - URL (always 24) = 256\nconst MAX_TWEET_LENGTH = 256;\n\n/**\n */\n@Component({\n tag: \"stzh-share\",\n styleUrl: \"stzh-share.scss\",\n scoped: true\n})\nexport class StzhShare {\n /** Translation strings */\n @Prop() localization: StzhShareLocalizedText;\n\n /** URL of current site (uses full URL by default) */\n @Prop() url: string = window.location.href;\n\n /** Overwrite mail subject translation */\n @Prop() mailSubject: string;\n\n /** Overwrite mail body translation */\n @Prop() mailBody: string;\n\n /**\n * Array of enabled share buttons.\n * Possible services: `facebook` / `twitter` / `linkedin` / `xing` / `mail`\n */\n @Prop() services: ShareService[] | string = [\n \"mail\", \"facebook\", \"twitter\", \"linkedin\", \"xing\"\n ];\n\n private _services: ShareService[] = [];\n\n @Watch(\"services\")\n servicesWatcher(newValue: ShareService[] | string) {\n if (typeof newValue === \"string\") {\n this._services = JSON.parse(newValue);\n } else {\n this._services = newValue;\n }\n }\n\n @Element() element: HTMLStzhShareElement;\n\n private openPopup = (url, event) => {\n event.preventDefault();\n window.open(url, \"_blank\", \"width=600,height=460\");\n }\n\n async componentWillLoad() {\n this.servicesWatcher(this.services);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"share\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-share\": true\n };\n\n const shareUrl = encodeURIComponent(this.url);\n const mailSubject = encodeURIComponent(this.mailSubject || this.localization.mailSubject);\n const mailBody = encodeURIComponent(\n (this.mailBody || this.localization.mailBody)?.replace(/\\{shareUrl\\}/gi, this.url)\n );\n\n const title = encodeURIComponent(document.title);\n const twitterTitle = encodeURIComponent(abbreviateText(title, MAX_TWEET_LENGTH));\n const description = encodeURIComponent(getMeta(\"description\"));\n\n const serviceData = {\n \"mail\": {\n popup: false,\n blank: false,\n url: `mailto:?subject=${mailSubject}&body=${mailBody}`,\n text: this.localization.shareMail,\n icon: \"mail\"\n },\n \"facebook\": {\n popup: true,\n blank: true,\n url: `https://www.facebook.com/sharer/sharer.php?u=${shareUrl}`,\n text: this.localization.shareFacebook,\n icon: \"facebook\"\n },\n \"twitter\": {\n popup: true,\n blank: true,\n url: `https://twitter.com/intent/tweet?text=${twitterTitle}&url=${shareUrl}`,\n text: this.localization.shareTwitter,\n icon: \"twitter\"\n },\n \"linkedin\": {\n popup: true,\n blank: true,\n url: `https://www.linkedin.com/shareArticle?mini=true&summary=${description}&title=${title}&url=${shareUrl}`,\n text: this.localization.shareLinkedin,\n icon: \"linkedin\"\n },\n \"xing\": {\n popup: true,\n blank: true,\n url: `https://www.xing.com/spi/shares/new?url=${shareUrl}`,\n text: this.localization.shareXing,\n icon: \"xing\"\n }\n };\n\n return (\n <Host>\n <div class={classes}>\n <ul class=\"stzh-share__list\">\n {this._services.map((service) =>\n <li class=\"stzh-share__item\">\n <stzh-tooltip\n content={serviceData[service].text}\n size=\"small\"\n >\n <stzh-button\n class={`stzh-share__button is-${service}`}\n size=\"small\"\n variant=\"tertiary\"\n iconOnly={true}\n href={serviceData[service].url}\n rel={serviceData[service].blank ? \"nofollow noopener noreferrer\" : \"nofollow\"}\n target={serviceData[service].blank ? \"_blank\" : \"_self\"}\n onClick={serviceData[service].popup ? (e) => this.openPopup(serviceData[service].url, e) : null}\n analyticsId={serviceData[service].text}\n icon={serviceData[service].icon}\n ></stzh-button>\n </stzh-tooltip>\n </li>\n )}\n </ul>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|