@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 +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IAAI,EAAC,gBAAgB,GAAQ,CAC/B,CACF,CAaF,CACD,EACP;GACH;;;;;;;","names":[],"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,8 +1,49 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-e3050b18.js';
|
|
2
|
-
import { g as getMeta } from './utils-54aead01.js';
|
|
2
|
+
import { s as setPropsIfNull, g as getMeta } from './utils-54aead01.js';
|
|
3
3
|
import { b as abbreviateText } from './string-utils-e252977e.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
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
|
+
|
|
7
|
+
const StzhPrint = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.handleLinkClick = () => {
|
|
11
|
+
window.print();
|
|
12
|
+
};
|
|
13
|
+
this.init = () => {
|
|
14
|
+
const links = this.element.querySelectorAll("stzh-link, stzh-button");
|
|
15
|
+
links.forEach((link) => {
|
|
16
|
+
link.addEventListener('click', this.handleLinkClick);
|
|
17
|
+
setPropsIfNull(link, {
|
|
18
|
+
icon: "print"
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
this.init();
|
|
25
|
+
this.observer = new MutationObserver(this.init);
|
|
26
|
+
this.observer.observe(this.element, {
|
|
27
|
+
childList: true,
|
|
28
|
+
subtree: true
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
if (this.observer) {
|
|
33
|
+
this.observer.disconnect();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
const classes = {
|
|
38
|
+
"stzh-print": true
|
|
39
|
+
};
|
|
40
|
+
return (h(Host, null, h("div", { class: classes }, h("slot", null))));
|
|
41
|
+
}
|
|
42
|
+
get element() { return getElement(this); }
|
|
43
|
+
};
|
|
44
|
+
StzhPrint.style = stzhPrintCss;
|
|
45
|
+
|
|
46
|
+
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)}";
|
|
6
47
|
|
|
7
48
|
// 280 - URL (always 24) = 256
|
|
8
49
|
const MAX_TWEET_LENGTH = 256;
|
|
@@ -19,7 +60,7 @@ const StzhShare = class {
|
|
|
19
60
|
this.mailSubject = undefined;
|
|
20
61
|
this.mailBody = undefined;
|
|
21
62
|
this.services = [
|
|
22
|
-
"facebook", "twitter", "linkedin", "xing"
|
|
63
|
+
"mail", "facebook", "twitter", "linkedin", "xing"
|
|
23
64
|
];
|
|
24
65
|
}
|
|
25
66
|
servicesWatcher(newValue) {
|
|
@@ -48,6 +89,13 @@ const StzhShare = class {
|
|
|
48
89
|
const twitterTitle = encodeURIComponent(abbreviateText(title, MAX_TWEET_LENGTH));
|
|
49
90
|
const description = encodeURIComponent(getMeta("description"));
|
|
50
91
|
const serviceData = {
|
|
92
|
+
"mail": {
|
|
93
|
+
popup: false,
|
|
94
|
+
blank: false,
|
|
95
|
+
url: `mailto:?subject=${mailSubject}&body=${mailBody}`,
|
|
96
|
+
text: this.localization.shareMail,
|
|
97
|
+
icon: "mail"
|
|
98
|
+
},
|
|
51
99
|
"facebook": {
|
|
52
100
|
popup: true,
|
|
53
101
|
blank: true,
|
|
@@ -75,16 +123,9 @@ const StzhShare = class {
|
|
|
75
123
|
url: `https://www.xing.com/spi/shares/new?url=${shareUrl}`,
|
|
76
124
|
text: this.localization.shareXing,
|
|
77
125
|
icon: "xing"
|
|
78
|
-
},
|
|
79
|
-
"mail": {
|
|
80
|
-
popup: false,
|
|
81
|
-
blank: false,
|
|
82
|
-
url: `mailto:?subject=${mailSubject}&body=${mailBody}`,
|
|
83
|
-
text: this.localization.shareMail,
|
|
84
|
-
icon: "mail"
|
|
85
126
|
}
|
|
86
127
|
};
|
|
87
|
-
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("
|
|
128
|
+
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 }))))))));
|
|
88
129
|
}
|
|
89
130
|
get element() { return getElement(this); }
|
|
90
131
|
static get watchers() { return {
|
|
@@ -93,6 +134,6 @@ const StzhShare = class {
|
|
|
93
134
|
};
|
|
94
135
|
StzhShare.style = stzhShareCss;
|
|
95
136
|
|
|
96
|
-
export { StzhShare as stzh_share };
|
|
137
|
+
export { StzhPrint as stzh_print, StzhShare as stzh_share };
|
|
97
138
|
|
|
98
|
-
//# sourceMappingURL=stzh-
|
|
139
|
+
//# sourceMappingURL=stzh-print_2.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"stzh-print.stzh-share.entry.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,GA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EACZ,OAAO,EAAC,UAAU,EAClB,QAAQ,EAAE,IAAI,EACd,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAC9B,GAAG,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,8BAA8B,GAAG,UAAU,EAC7E,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,QAAQ,GAAG,OAAO,EACvD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,EAC/F,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EACtC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,GAClB,CACF,CACZ,CACN,CACE,CACD,CACD,EACP;GACH;;;;;;;;;;","names":[],"sources":["src/components/stzh-print/stzh-print.scss?tag=stzh-print&encapsulation=shadow","src/components/stzh-print/stzh-print.tsx","src/components/stzh-share/stzh-share.scss?tag=stzh-share&encapsulation=scoped","src/components/stzh-share/stzh-share.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",":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}
|