web-social-share
Advanced tools
Comparing version 5.1.0 to 6.0.0
@@ -0,1 +1,8 @@ | ||
<a name="6.0.0"></a> | ||
# [6.0.0](https://github.com/fluster/web-social-share/compare/v5.1.0...v6.0.0) (2019-06-11) | ||
### Features | ||
* add "Copy (to clipboard)" support ([#17](https://github.com/fluster/web-social-share/issues/17)) | ||
<a name="5.1.0"></a> | ||
@@ -2,0 +9,0 @@ # [5.1.0](https://github.com/fluster/web-social-share/compare/v5.0.0...v5.1.0) (2019-06-05) |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const __chunk_1 = require('./websocialshare-cfbcdb2d.js'); | ||
const __chunk_1 = require('./websocialshare-c5855bf0.js'); | ||
@@ -8,0 +8,0 @@ const defineCustomElements = (win, options) => { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const __chunk_1 = require('./websocialshare-cfbcdb2d.js'); | ||
const __chunk_1 = require('./websocialshare-c5855bf0.js'); | ||
@@ -47,3 +47,3 @@ class WebSocialShare { | ||
render() { | ||
return (__chunk_1.h("div", { class: this.show ? 'web-social-share web-social-share-open' : 'web-social-share web-social-share-close' }, __chunk_1.h("div", { class: 'web-social-share-backdrop', onClick: () => this.hide() }), __chunk_1.h("div", { class: 'web-social-share-action-sheet', onClick: () => this.hide() }, __chunk_1.h("div", { class: 'web-social-share-action-sheet-container' }, __chunk_1.h("div", { class: 'web-social-share-action-sheet-group' }, this.renderTargets()))), __chunk_1.h("slot", { name: "facebook" }), __chunk_1.h("slot", { name: "twitter" }), __chunk_1.h("slot", { name: "email" }), __chunk_1.h("slot", { name: "linkedin" }), __chunk_1.h("slot", { name: "pinterest" }), __chunk_1.h("slot", { name: "reddit" }), __chunk_1.h("slot", { name: "whatsapp" }))); | ||
return (__chunk_1.h("div", { class: this.show ? 'web-social-share web-social-share-open' : 'web-social-share web-social-share-close' }, __chunk_1.h("div", { class: 'web-social-share-backdrop', onClick: () => this.hide() }), __chunk_1.h("div", { class: 'web-social-share-action-sheet', onClick: () => this.hide() }, __chunk_1.h("div", { class: 'web-social-share-action-sheet-container' }, __chunk_1.h("div", { class: 'web-social-share-action-sheet-group' }, this.renderTargets()))), __chunk_1.h("slot", { name: "facebook" }), __chunk_1.h("slot", { name: "twitter" }), __chunk_1.h("slot", { name: "email" }), __chunk_1.h("slot", { name: "linkedin" }), __chunk_1.h("slot", { name: "pinterest" }), __chunk_1.h("slot", { name: "reddit" }), __chunk_1.h("slot", { name: "whatsapp" }), __chunk_1.h("slot", { name: "copy" }))); | ||
} | ||
@@ -59,3 +59,3 @@ renderTargets() { | ||
get el() { return __chunk_1.getElement(this); } | ||
static get style() { return "div.web-social-share{visibility:hidden;opacity:0;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}div.web-social-share.web-social-share-open{visibility:visible;opacity:1}div.web-social-share.web-social-share-open div.web-social-share-backdrop{opacity:var(--web-social-share-backdrop-opacity,.25)}div.web-social-share.web-social-share-open div.web-social-share-action-sheet{opacity:1}div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height,80px)}\@media (max-width:540px){div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height-small-device,140px)}}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-backdrop{opacity:0}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:0}div.web-social-share div.web-social-share-backdrop{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear;background-color:var(--web-social-share-backdrop-background,#000);z-index:1000;-webkit-transform:translateZ(2px);transform:translateZ(2px);left:0;top:0;position:fixed;height:100%;width:100%}div.web-social-share div.web-social-share-action-sheet{left:0;right:0;top:0;bottom:0;margin:auto;position:fixed;z-index:1001;-webkit-transform:translateZ(3px);transform:translateZ(3px);width:100%;max-width:500px}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{z-index:1010;-webkit-transform:translateZ(10px);transform:translateZ(10px);background:var(--web-social-share-action-sheet-group-background,#fafafa);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:0;-webkit-transition-timing-function:cubic-bezier(.36,.66,.04,1);transition-timing-function:cubic-bezier(.36,.66,.04,1);-webkit-transition:height .2s;transition:height .2s}\@media (max-width:540px){div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{-ms-flex-pack:start;justify-content:flex-start}}::slotted([slot=email]),::slotted([slot=facebook]),::slotted([slot=linkedin]),::slotted([slot=pinterest]),::slotted([slot=reddit]),::slotted([slot=twitter]),::slotted([slot=whatsapp]){display:none}"; } | ||
static get style() { return "div.web-social-share{visibility:hidden;opacity:0;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}div.web-social-share.web-social-share-open{visibility:visible;opacity:1}div.web-social-share.web-social-share-open div.web-social-share-backdrop{opacity:var(--web-social-share-backdrop-opacity,.25)}div.web-social-share.web-social-share-open div.web-social-share-action-sheet{opacity:1}div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height,80px)}\@media (max-width:540px){div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height-small-device,140px)}}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-backdrop{opacity:0}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:0}div.web-social-share div.web-social-share-backdrop{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear;background-color:var(--web-social-share-backdrop-background,#000);z-index:1000;-webkit-transform:translateZ(2px);transform:translateZ(2px);left:0;top:0;position:fixed;height:100%;width:100%}div.web-social-share div.web-social-share-action-sheet{left:0;right:0;top:0;bottom:0;margin:auto;position:fixed;z-index:1001;-webkit-transform:translateZ(3px);transform:translateZ(3px);width:100%;max-width:500px}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{z-index:1010;-webkit-transform:translateZ(10px);transform:translateZ(10px);background:var(--web-social-share-action-sheet-group-background,#fafafa);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:0;-webkit-transition-timing-function:cubic-bezier(.36,.66,.04,1);transition-timing-function:cubic-bezier(.36,.66,.04,1);-webkit-transition:height .2s;transition:height .2s}\@media (max-width:540px){div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{-ms-flex-pack:start;justify-content:flex-start}}::slotted([slot=copy]),::slotted([slot=email]),::slotted([slot=facebook]),::slotted([slot=linkedin]),::slotted([slot=pinterest]),::slotted([slot=reddit]),::slotted([slot=twitter]),::slotted([slot=whatsapp]){display:none}"; } | ||
} | ||
@@ -294,2 +294,13 @@ | ||
class WebSocialShareCopy { | ||
static async share(attrs) { | ||
try { | ||
await navigator.clipboard.writeText(attrs.socialShareUrl || window.location.href); | ||
} | ||
catch (err) { | ||
// Well it seems that copy isn't supported by this browser | ||
} | ||
} | ||
} | ||
class WebSocialShareTarget { | ||
@@ -328,2 +339,5 @@ constructor(hostRef) { | ||
} | ||
else if (this.share.copy) { | ||
this.socialShareLoaded.emit('copy'); | ||
} | ||
resolve(); | ||
@@ -367,2 +381,7 @@ }); | ||
} | ||
async handleCopyShare($event) { | ||
$event.stopPropagation(); | ||
await WebSocialShareCopy.share(this.share.copy); | ||
this.selected.emit(); | ||
} | ||
render() { | ||
@@ -376,3 +395,4 @@ return __chunk_1.h(__chunk_1.Host, { class: { | ||
'web-social-share-reddit': this.share.reddit !== undefined, | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined, | ||
'web-social-share-copy': this.share.copy !== undefined | ||
} }, this.renderButton()); | ||
@@ -402,2 +422,5 @@ } | ||
} | ||
else if (this.share.copy) { | ||
return (__chunk_1.h("button", { onClick: ($event) => this.handleCopyShare($event), class: 'web-social-share-button web-social-share-button-copy' }, this.renderIcon(), this.renderName(this.share.copy, 'Copy'))); | ||
} | ||
else { | ||
@@ -408,3 +431,3 @@ return (__chunk_1.h("div", null)); | ||
renderIcon() { | ||
return __chunk_1.h("div", { class: "web-social-share-button-icon" }, __chunk_1.h("slot", { name: "facebook" }), __chunk_1.h("slot", { name: "twitter" }), __chunk_1.h("slot", { name: "email" }), __chunk_1.h("slot", { name: "linkedin" }), __chunk_1.h("slot", { name: "pinterest" }), __chunk_1.h("slot", { name: "reddit" }), __chunk_1.h("slot", { name: "whatsapp" })); | ||
return __chunk_1.h("div", { class: "web-social-share-button-icon" }, __chunk_1.h("slot", { name: "facebook" }), __chunk_1.h("slot", { name: "twitter" }), __chunk_1.h("slot", { name: "email" }), __chunk_1.h("slot", { name: "linkedin" }), __chunk_1.h("slot", { name: "pinterest" }), __chunk_1.h("slot", { name: "reddit" }), __chunk_1.h("slot", { name: "whatsapp" }), __chunk_1.h("slot", { name: "copy" })); | ||
} | ||
@@ -411,0 +434,0 @@ renderName(displayAttributes, defaultBrandName) { |
'use strict'; | ||
const __chunk_1 = require('./websocialshare-cfbcdb2d.js'); | ||
const __chunk_1 = require('./websocialshare-c5855bf0.js'); | ||
@@ -5,0 +5,0 @@ __chunk_1.patchBrowser().then(resourcesUrl => { |
{ | ||
"entries": [ | ||
"components/web-social-share-target/web-social-share-target.js", | ||
"components/web-social-share/web-social-share.js" | ||
"components/web-social-share/web-social-share.js", | ||
"components/web-social-share-target/web-social-share-target.js" | ||
], | ||
"compiler": { | ||
"name": "@stencil/core", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"typescriptVersion": "3.5.1" | ||
@@ -10,0 +10,0 @@ }, |
@@ -9,2 +9,3 @@ import { h, Host } from '@stencil/core'; | ||
import { WebSocialShareWhatsapp } from '../../utils/web-social-share/web-social-share-whatsapp'; | ||
import { WebSocialShareCopy } from '../../utils/web-social-share/web-social-share-copy'; | ||
export class WebSocialShareTarget { | ||
@@ -40,2 +41,5 @@ constructor() { | ||
} | ||
else if (this.share.copy) { | ||
this.socialShareLoaded.emit('copy'); | ||
} | ||
resolve(); | ||
@@ -79,2 +83,7 @@ }); | ||
} | ||
async handleCopyShare($event) { | ||
$event.stopPropagation(); | ||
await WebSocialShareCopy.share(this.share.copy); | ||
this.selected.emit(); | ||
} | ||
render() { | ||
@@ -88,3 +97,4 @@ return h(Host, { class: { | ||
'web-social-share-reddit': this.share.reddit !== undefined, | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined, | ||
'web-social-share-copy': this.share.copy !== undefined | ||
} }, this.renderButton()); | ||
@@ -128,2 +138,7 @@ } | ||
} | ||
else if (this.share.copy) { | ||
return (h("button", { onClick: ($event) => this.handleCopyShare($event), class: 'web-social-share-button web-social-share-button-copy' }, | ||
this.renderIcon(), | ||
this.renderName(this.share.copy, 'Copy'))); | ||
} | ||
else { | ||
@@ -141,3 +156,4 @@ return (h("div", null)); | ||
h("slot", { name: "reddit" }), | ||
h("slot", { name: "whatsapp" })); | ||
h("slot", { name: "whatsapp" }), | ||
h("slot", { name: "copy" })); | ||
} | ||
@@ -144,0 +160,0 @@ renderName(displayAttributes, defaultBrandName) { |
@@ -48,3 +48,4 @@ import { h } from '@stencil/core'; | ||
h("slot", { name: "reddit" }), | ||
h("slot", { name: "whatsapp" }))); | ||
h("slot", { name: "whatsapp" }), | ||
h("slot", { name: "copy" }))); | ||
} | ||
@@ -51,0 +52,0 @@ renderTargets() { |
@@ -36,3 +36,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
import { d as registerInstance, e as createEvent, f as h, g as getElement, h as Host } from './websocialshare-117ba51d.js'; | ||
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './websocialshare-37ae76b0.js'; | ||
var WebSocialShare = /** @class */ (function () { | ||
@@ -90,3 +90,3 @@ function WebSocialShare(hostRef) { | ||
var _this = this; | ||
return (h("div", { class: this.show ? 'web-social-share web-social-share-open' : 'web-social-share web-social-share-close' }, h("div", { class: 'web-social-share-backdrop', onClick: function () { return _this.hide(); } }), h("div", { class: 'web-social-share-action-sheet', onClick: function () { return _this.hide(); } }, h("div", { class: 'web-social-share-action-sheet-container' }, h("div", { class: 'web-social-share-action-sheet-group' }, this.renderTargets()))), h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" }))); | ||
return (h("div", { class: this.show ? 'web-social-share web-social-share-open' : 'web-social-share web-social-share-close' }, h("div", { class: 'web-social-share-backdrop', onClick: function () { return _this.hide(); } }), h("div", { class: 'web-social-share-action-sheet', onClick: function () { return _this.hide(); } }, h("div", { class: 'web-social-share-action-sheet-container' }, h("div", { class: 'web-social-share-action-sheet-group' }, this.renderTargets()))), h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" }), h("slot", { name: "copy" }))); | ||
}; | ||
@@ -108,3 +108,3 @@ WebSocialShare.prototype.renderTargets = function () { | ||
Object.defineProperty(WebSocialShare, "style", { | ||
get: function () { return "div.web-social-share{visibility:hidden;opacity:0;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}div.web-social-share.web-social-share-open{visibility:visible;opacity:1}div.web-social-share.web-social-share-open div.web-social-share-backdrop{opacity:var(--web-social-share-backdrop-opacity,.25)}div.web-social-share.web-social-share-open div.web-social-share-action-sheet{opacity:1}div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height,80px)}\@media (max-width:540px){div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height-small-device,140px)}}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-backdrop{opacity:0}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:0}div.web-social-share div.web-social-share-backdrop{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear;background-color:var(--web-social-share-backdrop-background,#000);z-index:1000;-webkit-transform:translateZ(2px);transform:translateZ(2px);left:0;top:0;position:fixed;height:100%;width:100%}div.web-social-share div.web-social-share-action-sheet{left:0;right:0;top:0;bottom:0;margin:auto;position:fixed;z-index:1001;-webkit-transform:translateZ(3px);transform:translateZ(3px);width:100%;max-width:500px}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{z-index:1010;-webkit-transform:translateZ(10px);transform:translateZ(10px);background:var(--web-social-share-action-sheet-group-background,#fafafa);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:0;-webkit-transition-timing-function:cubic-bezier(.36,.66,.04,1);transition-timing-function:cubic-bezier(.36,.66,.04,1);-webkit-transition:height .2s;transition:height .2s}\@media (max-width:540px){div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{-ms-flex-pack:start;justify-content:flex-start}}::slotted([slot=email]),::slotted([slot=facebook]),::slotted([slot=linkedin]),::slotted([slot=pinterest]),::slotted([slot=reddit]),::slotted([slot=twitter]),::slotted([slot=whatsapp]){display:none}"; }, | ||
get: function () { return "div.web-social-share{visibility:hidden;opacity:0;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}div.web-social-share.web-social-share-open{visibility:visible;opacity:1}div.web-social-share.web-social-share-open div.web-social-share-backdrop{opacity:var(--web-social-share-backdrop-opacity,.25)}div.web-social-share.web-social-share-open div.web-social-share-action-sheet{opacity:1}div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height,80px)}\@media (max-width:540px){div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height-small-device,140px)}}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-backdrop{opacity:0}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:0}div.web-social-share div.web-social-share-backdrop{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear;background-color:var(--web-social-share-backdrop-background,#000);z-index:1000;-webkit-transform:translateZ(2px);transform:translateZ(2px);left:0;top:0;position:fixed;height:100%;width:100%}div.web-social-share div.web-social-share-action-sheet{left:0;right:0;top:0;bottom:0;margin:auto;position:fixed;z-index:1001;-webkit-transform:translateZ(3px);transform:translateZ(3px);width:100%;max-width:500px}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{z-index:1010;-webkit-transform:translateZ(10px);transform:translateZ(10px);background:var(--web-social-share-action-sheet-group-background,#fafafa);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:0;-webkit-transition-timing-function:cubic-bezier(.36,.66,.04,1);transition-timing-function:cubic-bezier(.36,.66,.04,1);-webkit-transition:height .2s;transition:height .2s}\@media (max-width:540px){div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{-ms-flex-pack:start;justify-content:flex-start}}::slotted([slot=copy]),::slotted([slot=email]),::slotted([slot=facebook]),::slotted([slot=linkedin]),::slotted([slot=pinterest]),::slotted([slot=reddit]),::slotted([slot=twitter]),::slotted([slot=whatsapp]){display:none}"; }, | ||
enumerable: true, | ||
@@ -362,2 +362,26 @@ configurable: true | ||
}()); | ||
var WebSocialShareCopy = /** @class */ (function () { | ||
function WebSocialShareCopy() { | ||
} | ||
WebSocialShareCopy.share = function (attrs) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var err_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, navigator.clipboard.writeText(attrs.socialShareUrl || window.location.href)]; | ||
case 1: | ||
_a.sent(); | ||
return [3 /*break*/, 3]; | ||
case 2: | ||
err_1 = _a.sent(); | ||
return [3 /*break*/, 3]; | ||
case 3: return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
return WebSocialShareCopy; | ||
}()); | ||
var WebSocialShareTarget = /** @class */ (function () { | ||
@@ -406,2 +430,5 @@ function WebSocialShareTarget(hostRef) { | ||
} | ||
else if (_this.share.copy) { | ||
_this.socialShareLoaded.emit('copy'); | ||
} | ||
resolve(); | ||
@@ -445,2 +472,17 @@ }); | ||
}; | ||
WebSocialShareTarget.prototype.handleCopyShare = function ($event) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
$event.stopPropagation(); | ||
return [4 /*yield*/, WebSocialShareCopy.share(this.share.copy)]; | ||
case 1: | ||
_a.sent(); | ||
this.selected.emit(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
WebSocialShareTarget.prototype.render = function () { | ||
@@ -454,3 +496,4 @@ return h(Host, { class: { | ||
'web-social-share-reddit': this.share.reddit !== undefined, | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined, | ||
'web-social-share-copy': this.share.copy !== undefined | ||
} }, this.renderButton()); | ||
@@ -481,2 +524,5 @@ }; | ||
} | ||
else if (this.share.copy) { | ||
return (h("button", { onClick: function ($event) { return _this.handleCopyShare($event); }, class: 'web-social-share-button web-social-share-button-copy' }, this.renderIcon(), this.renderName(this.share.copy, 'Copy'))); | ||
} | ||
else { | ||
@@ -487,3 +533,3 @@ return (h("div", null)); | ||
WebSocialShareTarget.prototype.renderIcon = function () { | ||
return h("div", { class: "web-social-share-button-icon" }, h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" })); | ||
return h("div", { class: "web-social-share-button-icon" }, h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" }), h("slot", { name: "copy" })); | ||
}; | ||
@@ -490,0 +536,0 @@ WebSocialShareTarget.prototype.renderName = function (displayAttributes, defaultBrandName) { |
@@ -338,3 +338,3 @@ /* | ||
declarations: declarations, | ||
specificity: computeSpecificity(selector), | ||
specificity: computeSpecificity(), | ||
nu: index | ||
@@ -341,0 +341,0 @@ }); |
@@ -10,3 +10,3 @@ (function() { | ||
} | ||
const BuiltInHTMLElement = HTMLElement; | ||
var BuiltInHTMLElement = HTMLElement; | ||
window.HTMLElement = /** @this {!Object} */ function HTMLElement() { | ||
@@ -13,0 +13,0 @@ return Reflect.construct( |
/* | ||
* SystemJS 3.1.3 | ||
*/ | ||
!function(){const e="undefined"!=typeof self,n=e?self:global;let t;if("undefined"!=typeof location){const e=(t=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(t=t.slice(0,e+1))}const r=/\\/g,i="undefined"!=typeof Symbol,o=i&&Symbol.toStringTag,c=i?Symbol():"@";function l(){this[c]={}}const s=l.prototype;let u;s.import=function(e,n){const t=this;return Promise.resolve(t.resolve(e,n)).then(function(e){const n=function e(n,t,r){let i=n[c][t];if(i)return i;const l=[],s=Object.create(null);o&&Object.defineProperty(s,o,{value:"Module"});let u=Promise.resolve().then(function(){return n.instantiate(t,r)}).then(function(e){if(!e)throw new Error("Module "+t+" did not instantiate");const r=e[1](function(e,n){i.h=!0;let t=!1;if("object"!=typeof e)e in s&&s[e]===n||(s[e]=n,t=!0);else for(let n in e){let r=e[n];n in s&&s[n]===r||(s[n]=r,t=!0)}if(t)for(let e=0;e<l.length;e++)l[e](s);return n},2===e[1].length?{import:function(e){return n.import(e,t)},meta:n.createContext(t)}:void 0);return i.e=r.execute||function(){},[e[0],r.setters||[]]});const f=u.then(function(r){return Promise.all(r[0].map(function(i,o){const c=r[1][o];return Promise.resolve(n.resolve(i,t)).then(function(r){const i=e(n,r,t);return Promise.resolve(i.I).then(function(){return c&&(i.i.push(c),!i.h&&i.I||c(i.n)),i})})})).then(function(e){i.d=e})});return f.catch(function(e){i.e=null,i.er=e}),i=n[c][t]={id:t,i:l,n:s,I:u,L:f,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(t,e);return n.C||function(e,n){return n.C=function e(n,t,r){if(!r[t.id])return r[t.id]=!0,Promise.resolve(t.L).then(function(){return Promise.all(t.d.map(function(t){return e(n,t,r)}))})}(e,n,{}).then(function(){return function e(n,t,r){if(r[t.id])return;if(r[t.id]=!0,!t.e){if(t.er)throw t.er;return t.E?t.E:void 0}let i;return t.d.forEach(function(t){{const o=e(n,t,r);o&&(i=i||[]).push(o)}}),i?Promise.all(i).then(o):o();function o(){try{let e=t.e.call(f);if(e)return e=e.then(function(){t.C=t.n,t.E=null}),t.E=t.E||e;t.C=t.n}catch(e){throw t.er=e,e}finally{t.L=t.I=void 0,t.e=null}}}(e,n,{})}).then(function(){return n.n})}(t,n)})},s.createContext=function(e){return{url:e}},s.register=function(e,n){u=[e,n]},s.getRegister=function(){const e=u;return u=void 0,e};const f=Object.freeze(Object.create(null));let d;n.System=new l,"undefined"!=typeof window&&window.addEventListener("error",function(e){d=e.error});const h=s.register;s.register=function(e,n){d=void 0,h.call(this,e,n)},s.instantiate=function(e,n){const t=this;return new Promise(function(r,i){const o=document.createElement("script");o.charset="utf-8",o.async=!0,o.crossOrigin="anonymous",o.addEventListener("error",function(){i(new Error("Error loading "+e+(n?" from "+n:"")))}),o.addEventListener("load",function(){if(document.head.removeChild(o),d)return i(d),d=void 0;r(t.getRegister())}),o.src=e,document.head.appendChild(o)})},e&&"function"==typeof importScripts&&(s.instantiate=function(e){const n=this;return new Promise(function(t,r){try{importScripts(e)}catch(e){r(e)}t(n.getRegister())})}),s.resolve=function(e,n){const i=function(e,n){if(-1!==e.indexOf("\\")&&(e=e.replace(r,"/")),"/"===e[0]&&"/"===e[1])return n.slice(0,n.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){const t=n.slice(0,n.indexOf(":")+1);let r;if(r="/"===n[t.length+1]?"file:"!==t?(r=n.slice(t.length+2)).slice(r.indexOf("/")+1):n.slice(8):n.slice(t.length+("/"===n[t.length])),"/"===e[0])return n.slice(0,n.length-r.length-1)+e;const i=r.slice(0,r.lastIndexOf("/")+1)+e,o=[];let c=-1;for(let e=0;e<i.length;e++)-1!==c?"/"===i[e]&&(o.push(i.slice(c,e+1)),c=-1):"."===i[e]?"."!==i[e+1]||"/"!==i[e+2]&&e+2!==i.length?"/"===i[e+1]||e+1===i.length?e+=1:c=e:(o.pop(),e+=2):c=e;return-1!==c&&o.push(i.slice(c)),n.slice(0,n.length-r.length)+o.join("")}}(e,n||t);if(!i){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw new Error('Cannot resolve "'+e+(n?'" from '+n:'"'))}return Promise.resolve(i)}}(); | ||
!function(){var e,n="undefined"!=typeof self,t=n?self:global;if("undefined"!=typeof location){var r=(e=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==r&&(e=e.slice(0,r+1))}var i=/\\/g,o="undefined"!=typeof Symbol,u=o&&Symbol.toStringTag,f=o?Symbol():"@";function c(){this[f]={}}var l,s=c.prototype;s.import=function(e,n){var t=this;return Promise.resolve(t.resolve(e,n)).then(function(e){var n=function e(n,t,r){var i=n[f][t];if(i)return i;var o=[],c=Object.create(null);u&&Object.defineProperty(c,u,{value:"Module"});var l=Promise.resolve().then(function(){return n.instantiate(t,r)}).then(function(e){if(!e)throw new Error("Module "+t+" did not instantiate");var r=e[1](function(e,n){i.h=!0;var t=!1;if("object"!=typeof e)e in c&&c[e]===n||(c[e]=n,t=!0);else for(var r in e){var u=e[r];r in c&&c[r]===u||(c[r]=u,t=!0)}if(t)for(var f=0;f<o.length;f++)o[f](c);return n},2===e[1].length?{import:function(e){return n.import(e,t)},meta:n.createContext(t)}:void 0);return i.e=r.execute||function(){},[e[0],r.setters||[]]}),s=l.then(function(r){return Promise.all(r[0].map(function(i,o){var u=r[1][o];return Promise.resolve(n.resolve(i,t)).then(function(r){var i=e(n,r,t);return Promise.resolve(i.I).then(function(){return u&&(i.i.push(u),!i.h&&i.I||u(i.n)),i})})})).then(function(e){i.d=e})});return s.catch(function(e){i.e=null,i.er=e}),i=n[f][t]={id:t,i:o,n:c,I:l,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(t,e);return n.C||function(e,n){return n.C=function e(n,t,r){if(!r[t.id])return r[t.id]=!0,Promise.resolve(t.L).then(function(){return Promise.all(t.d.map(function(t){return e(n,t,r)}))})}(e,n,{}).then(function(){return function e(n,t,r){if(!r[t.id]){if(r[t.id]=!0,!t.e){if(t.er)throw t.er;return t.E?t.E:void 0}var i;return t.d.forEach(function(t){var o=e(n,t,r);o&&(i=i||[]).push(o)}),i?Promise.all(i).then(o):o()}function o(){try{var e=t.e.call(d);if(e)return e=e.then(function(){t.C=t.n,t.E=null}),t.E=t.E||e;t.C=t.n}catch(e){throw t.er=e,e}finally{t.L=t.I=void 0,t.e=null}}}(e,n,{})}).then(function(){return n.n})}(t,n)})},s.createContext=function(e){return{url:e}},s.register=function(e,n){l=[e,n]},s.getRegister=function(){var e=l;return l=void 0,e};var a,d=Object.freeze(Object.create(null));t.System=new c,"undefined"!=typeof window&&window.addEventListener("error",function(e){a=e.error});var v=s.register;s.register=function(e,n){a=void 0,v.call(this,e,n)},s.instantiate=function(e,n){var t=this;return new Promise(function(r,i){var o=document.createElement("script");o.charset="utf-8",o.async=!0,o.crossOrigin="anonymous",o.addEventListener("error",function(){i(new Error("Error loading "+e+(n?" from "+n:"")))}),o.addEventListener("load",function(){if(document.head.removeChild(o),a)return i(a),a=void 0;r(t.getRegister())}),o.src=e,document.head.appendChild(o)})},n&&"function"==typeof importScripts&&(s.instantiate=function(e){var n=this;return new Promise(function(t,r){try{importScripts(e)}catch(e){r(e)}t(n.getRegister())})}),s.resolve=function(n,t){var r=function(e,n){if(-1!==e.indexOf("\\")&&(e=e.replace(i,"/")),"/"===e[0]&&"/"===e[1])return n.slice(0,n.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var t,r=n.slice(0,n.indexOf(":")+1);if(t="/"===n[r.length+1]?"file:"!==r?(t=n.slice(r.length+2)).slice(t.indexOf("/")+1):n.slice(8):n.slice(r.length+("/"===n[r.length])),"/"===e[0])return n.slice(0,n.length-t.length-1)+e;for(var o=t.slice(0,t.lastIndexOf("/")+1)+e,u=[],f=-1,c=0;c<o.length;c++)-1!==f?"/"===o[c]&&(u.push(o.slice(f,c+1)),f=-1):"."===o[c]?"."!==o[c+1]||"/"!==o[c+2]&&c+2!==o.length?"/"===o[c+1]||c+1===o.length?c+=1:f=c:(u.pop(),c+=2):f=c;return-1!==f&&u.push(o.slice(f)),n.slice(0,n.length-t.length)+u.join("")}}(n,t||e);if(!r){if(-1!==n.indexOf(":"))return Promise.resolve(n);throw new Error('Cannot resolve "'+n+(t?'" from '+t:'"'))}return Promise.resolve(r)}}(); |
@@ -1,2 +0,2 @@ | ||
import { d as registerInstance, e as createEvent, f as h, g as getElement, h as Host } from './websocialshare-117ba51d.js'; | ||
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './websocialshare-37ae76b0.js'; | ||
@@ -42,3 +42,3 @@ class WebSocialShare { | ||
render() { | ||
return (h("div", { class: this.show ? 'web-social-share web-social-share-open' : 'web-social-share web-social-share-close' }, h("div", { class: 'web-social-share-backdrop', onClick: () => this.hide() }), h("div", { class: 'web-social-share-action-sheet', onClick: () => this.hide() }, h("div", { class: 'web-social-share-action-sheet-container' }, h("div", { class: 'web-social-share-action-sheet-group' }, this.renderTargets()))), h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" }))); | ||
return (h("div", { class: this.show ? 'web-social-share web-social-share-open' : 'web-social-share web-social-share-close' }, h("div", { class: 'web-social-share-backdrop', onClick: () => this.hide() }), h("div", { class: 'web-social-share-action-sheet', onClick: () => this.hide() }, h("div", { class: 'web-social-share-action-sheet-container' }, h("div", { class: 'web-social-share-action-sheet-group' }, this.renderTargets()))), h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" }), h("slot", { name: "copy" }))); | ||
} | ||
@@ -54,3 +54,3 @@ renderTargets() { | ||
get el() { return getElement(this); } | ||
static get style() { return "div.web-social-share{visibility:hidden;opacity:0;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}div.web-social-share.web-social-share-open{visibility:visible;opacity:1}div.web-social-share.web-social-share-open div.web-social-share-backdrop{opacity:var(--web-social-share-backdrop-opacity,.25)}div.web-social-share.web-social-share-open div.web-social-share-action-sheet{opacity:1}div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height,80px)}\@media (max-width:540px){div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height-small-device,140px)}}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-backdrop{opacity:0}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:0}div.web-social-share div.web-social-share-backdrop{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear;background-color:var(--web-social-share-backdrop-background,#000);z-index:1000;-webkit-transform:translateZ(2px);transform:translateZ(2px);left:0;top:0;position:fixed;height:100%;width:100%}div.web-social-share div.web-social-share-action-sheet{left:0;right:0;top:0;bottom:0;margin:auto;position:fixed;z-index:1001;-webkit-transform:translateZ(3px);transform:translateZ(3px);width:100%;max-width:500px}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{z-index:1010;-webkit-transform:translateZ(10px);transform:translateZ(10px);background:var(--web-social-share-action-sheet-group-background,#fafafa);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:0;-webkit-transition-timing-function:cubic-bezier(.36,.66,.04,1);transition-timing-function:cubic-bezier(.36,.66,.04,1);-webkit-transition:height .2s;transition:height .2s}\@media (max-width:540px){div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{-ms-flex-pack:start;justify-content:flex-start}}::slotted([slot=email]),::slotted([slot=facebook]),::slotted([slot=linkedin]),::slotted([slot=pinterest]),::slotted([slot=reddit]),::slotted([slot=twitter]),::slotted([slot=whatsapp]){display:none}"; } | ||
static get style() { return "div.web-social-share{visibility:hidden;opacity:0;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}div.web-social-share.web-social-share-open{visibility:visible;opacity:1}div.web-social-share.web-social-share-open div.web-social-share-backdrop{opacity:var(--web-social-share-backdrop-opacity,.25)}div.web-social-share.web-social-share-open div.web-social-share-action-sheet{opacity:1}div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height,80px)}\@media (max-width:540px){div.web-social-share.web-social-share-open div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:var(--web-social-share-height-small-device,140px)}}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-backdrop{opacity:0}div.web-social-share.web-social-share-open.web-social-share-transition-close div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{height:0}div.web-social-share div.web-social-share-backdrop{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear;background-color:var(--web-social-share-backdrop-background,#000);z-index:1000;-webkit-transform:translateZ(2px);transform:translateZ(2px);left:0;top:0;position:fixed;height:100%;width:100%}div.web-social-share div.web-social-share-action-sheet{left:0;right:0;top:0;bottom:0;margin:auto;position:fixed;z-index:1001;-webkit-transform:translateZ(3px);transform:translateZ(3px);width:100%;max-width:500px}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{z-index:1010;-webkit-transform:translateZ(10px);transform:translateZ(10px);background:var(--web-social-share-action-sheet-group-background,#fafafa);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:0;-webkit-transition-timing-function:cubic-bezier(.36,.66,.04,1);transition-timing-function:cubic-bezier(.36,.66,.04,1);-webkit-transition:height .2s;transition:height .2s}\@media (max-width:540px){div.web-social-share div.web-social-share-action-sheet div.web-social-share-action-sheet-container div.web-social-share-action-sheet-group{-ms-flex-pack:start;justify-content:flex-start}}::slotted([slot=copy]),::slotted([slot=email]),::slotted([slot=facebook]),::slotted([slot=linkedin]),::slotted([slot=pinterest]),::slotted([slot=reddit]),::slotted([slot=twitter]),::slotted([slot=whatsapp]){display:none}"; } | ||
} | ||
@@ -289,2 +289,13 @@ | ||
class WebSocialShareCopy { | ||
static async share(attrs) { | ||
try { | ||
await navigator.clipboard.writeText(attrs.socialShareUrl || window.location.href); | ||
} | ||
catch (err) { | ||
// Well it seems that copy isn't supported by this browser | ||
} | ||
} | ||
} | ||
class WebSocialShareTarget { | ||
@@ -323,2 +334,5 @@ constructor(hostRef) { | ||
} | ||
else if (this.share.copy) { | ||
this.socialShareLoaded.emit('copy'); | ||
} | ||
resolve(); | ||
@@ -362,2 +376,7 @@ }); | ||
} | ||
async handleCopyShare($event) { | ||
$event.stopPropagation(); | ||
await WebSocialShareCopy.share(this.share.copy); | ||
this.selected.emit(); | ||
} | ||
render() { | ||
@@ -371,3 +390,4 @@ return h(Host, { class: { | ||
'web-social-share-reddit': this.share.reddit !== undefined, | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined | ||
'web-social-share-whatsapp': this.share.whatsapp !== undefined, | ||
'web-social-share-copy': this.share.copy !== undefined | ||
} }, this.renderButton()); | ||
@@ -397,2 +417,5 @@ } | ||
} | ||
else if (this.share.copy) { | ||
return (h("button", { onClick: ($event) => this.handleCopyShare($event), class: 'web-social-share-button web-social-share-button-copy' }, this.renderIcon(), this.renderName(this.share.copy, 'Copy'))); | ||
} | ||
else { | ||
@@ -403,3 +426,3 @@ return (h("div", null)); | ||
renderIcon() { | ||
return h("div", { class: "web-social-share-button-icon" }, h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" })); | ||
return h("div", { class: "web-social-share-button-icon" }, h("slot", { name: "facebook" }), h("slot", { name: "twitter" }), h("slot", { name: "email" }), h("slot", { name: "linkedin" }), h("slot", { name: "pinterest" }), h("slot", { name: "reddit" }), h("slot", { name: "whatsapp" }), h("slot", { name: "copy" })); | ||
} | ||
@@ -406,0 +429,0 @@ renderName(displayAttributes, defaultBrandName) { |
@@ -14,3 +14,2 @@ /* tslint:disable */ | ||
export namespace Components { | ||
@@ -17,0 +16,0 @@ interface WebSocialShare { |
@@ -17,2 +17,3 @@ import { EventEmitter } from '../../stencil.core'; | ||
private handleWhatsappShare; | ||
private handleCopyShare; | ||
render(): any; | ||
@@ -19,0 +20,0 @@ private renderButton; |
@@ -809,6 +809,5 @@ /** | ||
export interface HTMLAttributes<T = HTMLElement> extends DOMAttributes { | ||
export interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> { | ||
// vdom specific | ||
innerHTML?: string; | ||
ref?: (elm?: T) => void; | ||
key?: string | number; | ||
@@ -880,3 +879,3 @@ | ||
export interface SVGAttributes extends DOMAttributes { | ||
export interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> { | ||
// Attributes which also defined in HTMLAttributes | ||
@@ -1146,3 +1145,5 @@ // See comment in SVGDOMPropertyConfig.js | ||
export interface DOMAttributes { | ||
export interface DOMAttributes<T = Element> { | ||
ref?: (elm?: T) => void; | ||
// Clipboard Events | ||
@@ -1149,0 +1150,0 @@ onCopy?: (event: ClipboardEvent) => void; |
@@ -1,2 +0,2 @@ | ||
import { WebSocialShareEmailAttributes, WebSocialShareFacebookAttributes, WebSocialShareLinkedinAttributes, WebSocialSharePinterestAttributes, WebSocialShareRedditAttributes, WebSocialShareTwiterAttributes, WebSocialShareWhatsappAttributes } from './web-social-share-attributes'; | ||
import { WebSocialShareAttributes, WebSocialShareEmailAttributes, WebSocialShareFacebookAttributes, WebSocialShareLinkedinAttributes, WebSocialSharePinterestAttributes, WebSocialShareRedditAttributes, WebSocialShareTwiterAttributes, WebSocialShareWhatsappAttributes } from './web-social-share-attributes'; | ||
export interface WebSocialShareInputConfig { | ||
@@ -10,2 +10,3 @@ facebook?: WebSocialShareFacebookAttributes; | ||
whatsapp?: WebSocialShareWhatsappAttributes; | ||
copy?: WebSocialShareAttributes; | ||
} | ||
@@ -12,0 +13,0 @@ export interface WebSocialShareInput { |
@@ -1,1 +0,1 @@ | ||
System.register([],function(t,e){"use strict";return{execute:function(){t("scopeCss",e);function e(t,e,n){var o=new r;return o.shimCssText(t,e,e+"-h",e+"-s",n)}var r=function(){function t(){this.strictStyling=true}t.prototype.shimCssText=function(t,e,r,n,o){if(r===void 0){r=""}if(n===void 0){n=""}if(o===void 0){o=false}var s=C(t);t=x(t);var c=[];if(o){var i=function(t){var e="/*!@___"+c.length+"___*/";var r="/*!@"+t.selector+"*/";c.push({placeholder:e,comment:r});t.selector=e+t.selector;return t};t=P(t,function(t){if(t.selector[0]!=="@"){return i(t)}else if(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")){t.content=P(t.content,i);return t}return t})}var a=this._scopeCssText(t,e,r,n,o);t=[a].concat(s).join("\n");if(o){c.forEach(function(e){var r=e.placeholder,n=e.comment;t=t.replace(r,n)})}return t};t.prototype._scopeCssText=function(t,e,r,n,o){t=this._insertPolyfillHostInCssText(t);t=this._convertColonHost(t);t=this._convertColonHostContext(t);t=this._convertColonSlotted(t,n);t=this._convertShadowDOMSelectors(t);if(e){t=this._scopeSelectors(t,e,r,n,o)}t=t.replace(/-shadowcsshost-no-combinator/g,"."+r);t=t.replace(/>\s*\*\s+([^{, ]+)/gm," $1 ");return t.trim()};t.prototype._convertColonHost=function(t){return this._convertColonRule(t,a,this._colonHostPartReplacer)};t.prototype._convertColonSlotted=function(t,e){var r=p;return t.replace(r,function(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}if(t[2]){var n=t[2].trim();var o=t[3];var s="."+e+" > "+n+o;return s}else{return u+t[3]}})};t.prototype._convertColonHostContext=function(t){return this._convertColonRule(t,l,this._colonHostContextPartReplacer)};t.prototype._convertColonRule=function(t,e,r){return t.replace(e,function(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}if(t[2]){var n=t[2].split(",");var o=[];for(var s=0;s<n.length;s++){var c=n[s].trim();if(!c)break;o.push(r(u,c,t[3]))}return o.join(",")}else{return u+t[3]}})};t.prototype._colonHostContextPartReplacer=function(t,e,r){if(e.indexOf(o)>-1){return this._colonHostPartReplacer(t,e,r)}else{return t+e+r+", "+e+" "+t+r}};t.prototype._colonHostPartReplacer=function(t,e,r){return t+e.replace(o,"")+r};t.prototype._convertShadowDOMSelectors=function(t){return h.reduce(function(t,e){return t.replace(e," ")},t)};t.prototype._scopeSelectors=function(t,e,r,n,o){var s=this;return P(t,function(t){var c=t.selector;var i=t.content;if(t.selector[0]!=="@"){c=s._scopeSelector(t.selector,e,r,n,s.strictStyling)}else if(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")){i=s._scopeSelectors(t.content,e,r,n,o)}c=c.replace(/\s{2,}/g," ").trim();return new b(c,i)})};t.prototype._scopeSelector=function(t,e,r,n,o){var s=this;return t.split(",").map(function(t){if(n&&t.indexOf("."+n)>-1){return t.trim()}if(s._selectorNeedsScoping(t,e)){return o?s._applyStrictSelectorScope(t,e,r).trim():s._applySelectorScope(t,e,r).trim()}else{return t.trim()}}).join(", ")};t.prototype._selectorNeedsScoping=function(t,e){var r=this._makeScopeMatcher(e);return!r.test(t)};t.prototype._makeScopeMatcher=function(t){var e=/\[/g;var r=/\]/g;t=t.replace(e,"\\[").replace(r,"\\]");return new RegExp("^("+t+")"+f,"m")};t.prototype._applySelectorScope=function(t,e,r){return this._applySimpleSelectorScope(t,e,r)};t.prototype._applySimpleSelectorScope=function(t,e,r){_.lastIndex=0;if(_.test(t)){var n=this.strictStyling?"."+r:e;return t.replace(v,function(t,e){return e.replace(/([^:]*)(:*)(.*)/,function(t,e,r,o){return e+n+r+o})}).replace(_,n+" ")}return e+" "+t};t.prototype._applyStrictSelectorScope=function(t,e,r){var o=this;var s=/\[is=([^\]]*)\]/g;e=e.replace(s,function(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}return e[0]});var c="."+e;var i=function(t){var n=t.trim();if(!n){return""}if(t.indexOf(u)>-1){n=o._applySimpleSelectorScope(t,e,r)}else{var s=t.replace(_,"");if(s.length>0){var i=s.match(/([^:]*)(:*)(.*)/);if(i){n=i[1]+c+i[2]+i[3]}}}return n};var a=new n(t);t=a.content();var l="";var p=0;var v;var h=/( |>|\+|~(?!=))\s*/g;var f=t.indexOf(u)>-1;var g=!f;while((v=h.exec(t))!==null){var d=v[1];var S=t.slice(p,v.index).trim();g=g||S.indexOf(u)>-1;var m=g?i(S):S;l+=m+" "+d+" ";p=h.lastIndex}var x=t.substring(p);g=g||x.indexOf(u)>-1;l+=g?i(x):x;return a.restore(l)};t.prototype._insertPolyfillHostInCssText=function(t){t=t.replace(S,c).replace(g,o).replace(d,s);return t};return t}();t("ShadowCss",r);var n=function(){function t(t){var e=this;this.placeholders=[];this.index=0;t=t.replace(/(\[[^\]]*\])/g,function(t,r){var n="__ph-"+e.index+"__";e.placeholders.push(r);e.index++;return n});this._content=t.replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(t,r,n){var o="__ph-"+e.index+"__";e.placeholders.push(n);e.index++;return r+o})}t.prototype.restore=function(t){var e=this;return t.replace(/__ph-(\d+)__/g,function(t,r){return e.placeholders[+r]})};t.prototype.content=function(){return this._content};return t}();var o="-shadowcsshost";var s="-shadowcssslotted";var c="-shadowcsscontext";var i=")(?:\\(("+"(?:\\([^)(]*\\)|[^)(]*)+?"+")\\))?([^,{]*)";var a=new RegExp("("+o+i,"gim");var l=new RegExp("("+c+i,"gim");var p=new RegExp("("+s+i,"gim");var u=o+"-no-combinator";var v=/-shadowcsshost-no-combinator([^\s]*)/;var h=[/::shadow/g,/::content/g];var f="([>\\s~+[.,{:][\\s\\S]*)?$";var _=/-shadowcsshost/gim;var g=/:host/gim;var d=/::slotted/gim;var S=/:host-context/gim;var m=/\/\*\s*[\s\S]*?\*\//g;function x(t){return t.replace(m,"")}var y=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;function C(t){return t.match(y)||[]}var w=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;var R=/([{}])/g;var H="{";var O="}";var W="%BLOCK%";var b=function(){function t(t,e){this.selector=t;this.content=e}return t}();function P(t,e){var r=T(t);var n=0;return r.escapedString.replace(w,function(){var t=[];for(var o=0;o<arguments.length;o++){t[o]=arguments[o]}var s=t[2];var c="";var i=t[4];var a="";if(i&&i.startsWith("{"+W)){c=r.blocks[n++];i=i.substring(W.length+1);a="{"}var l=e(new b(s,c));return""+t[1]+l.selector+t[3]+a+l.content+i})}var j=function(){function t(t,e){this.escapedString=t;this.blocks=e}return t}();function T(t){var e=t.split(R);var r=[];var n=[];var o=0;var s=[];for(var c=0;c<e.length;c++){var i=e[c];if(i===O){o--}if(o>0){s.push(i)}else{if(s.length>0){n.push(s.join(""));r.push(W);s=[]}r.push(i)}if(i===H){o++}}if(s.length>0){n.push(s.join(""));r.push(W)}return new j(r.join(""),n)}}}}); | ||
System.register([],function(t){"use strict";return{execute:function(){t("scopeCss",e);function e(t,e,n){var o=new r;return o.shimCssText(t,e,e+"-h",e+"-s",n)}var r=function(){function t(){this.strictStyling=true}t.prototype.shimCssText=function(t,e,r,n,o){if(r===void 0){r=""}if(n===void 0){n=""}if(o===void 0){o=false}var s=C(t);t=x(t);var c=[];if(o){var i=function(t){var e="/*!@___"+c.length+"___*/";var r="/*!@"+t.selector+"*/";c.push({placeholder:e,comment:r});t.selector=e+t.selector;return t};t=P(t,function(t){if(t.selector[0]!=="@"){return i(t)}else if(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")){t.content=P(t.content,i);return t}return t})}var a=this._scopeCssText(t,e,r,n,o);t=[a].concat(s).join("\n");if(o){c.forEach(function(e){var r=e.placeholder,n=e.comment;t=t.replace(r,n)})}return t};t.prototype._scopeCssText=function(t,e,r,n,o){t=this._insertPolyfillHostInCssText(t);t=this._convertColonHost(t);t=this._convertColonHostContext(t);t=this._convertColonSlotted(t,n);t=this._convertShadowDOMSelectors(t);if(e){t=this._scopeSelectors(t,e,r,n,o)}t=t.replace(/-shadowcsshost-no-combinator/g,"."+r);t=t.replace(/>\s*\*\s+([^{, ]+)/gm," $1 ");return t.trim()};t.prototype._convertColonHost=function(t){return this._convertColonRule(t,a,this._colonHostPartReplacer)};t.prototype._convertColonSlotted=function(t,e){var r=p;return t.replace(r,function(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}if(t[2]){var n=t[2].trim();var o=t[3];var s="."+e+" > "+n+o;return s}else{return u+t[3]}})};t.prototype._convertColonHostContext=function(t){return this._convertColonRule(t,l,this._colonHostContextPartReplacer)};t.prototype._convertColonRule=function(t,e,r){return t.replace(e,function(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}if(t[2]){var n=t[2].split(",");var o=[];for(var s=0;s<n.length;s++){var c=n[s].trim();if(!c)break;o.push(r(u,c,t[3]))}return o.join(",")}else{return u+t[3]}})};t.prototype._colonHostContextPartReplacer=function(t,e,r){if(e.indexOf(o)>-1){return this._colonHostPartReplacer(t,e,r)}else{return t+e+r+", "+e+" "+t+r}};t.prototype._colonHostPartReplacer=function(t,e,r){return t+e.replace(o,"")+r};t.prototype._convertShadowDOMSelectors=function(t){return h.reduce(function(t,e){return t.replace(e," ")},t)};t.prototype._scopeSelectors=function(t,e,r,n,o){var s=this;return P(t,function(t){var c=t.selector;var i=t.content;if(t.selector[0]!=="@"){c=s._scopeSelector(t.selector,e,r,n,s.strictStyling)}else if(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")){i=s._scopeSelectors(t.content,e,r,n,o)}c=c.replace(/\s{2,}/g," ").trim();return new b(c,i)})};t.prototype._scopeSelector=function(t,e,r,n,o){var s=this;return t.split(",").map(function(t){if(n&&t.indexOf("."+n)>-1){return t.trim()}if(s._selectorNeedsScoping(t,e)){return o?s._applyStrictSelectorScope(t,e,r).trim():s._applySelectorScope(t,e,r).trim()}else{return t.trim()}}).join(", ")};t.prototype._selectorNeedsScoping=function(t,e){var r=this._makeScopeMatcher(e);return!r.test(t)};t.prototype._makeScopeMatcher=function(t){var e=/\[/g;var r=/\]/g;t=t.replace(e,"\\[").replace(r,"\\]");return new RegExp("^("+t+")"+f,"m")};t.prototype._applySelectorScope=function(t,e,r){return this._applySimpleSelectorScope(t,e,r)};t.prototype._applySimpleSelectorScope=function(t,e,r){_.lastIndex=0;if(_.test(t)){var n=this.strictStyling?"."+r:e;return t.replace(v,function(t,e){return e.replace(/([^:]*)(:*)(.*)/,function(t,e,r,o){return e+n+r+o})}).replace(_,n+" ")}return e+" "+t};t.prototype._applyStrictSelectorScope=function(t,e,r){var o=this;var s=/\[is=([^\]]*)\]/g;e=e.replace(s,function(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}return e[0]});var c="."+e;var i=function(t){var n=t.trim();if(!n){return""}if(t.indexOf(u)>-1){n=o._applySimpleSelectorScope(t,e,r)}else{var s=t.replace(_,"");if(s.length>0){var i=s.match(/([^:]*)(:*)(.*)/);if(i){n=i[1]+c+i[2]+i[3]}}}return n};var a=new n(t);t=a.content();var l="";var p=0;var v;var h=/( |>|\+|~(?!=))\s*/g;var f=t.indexOf(u)>-1;var g=!f;while((v=h.exec(t))!==null){var d=v[1];var S=t.slice(p,v.index).trim();g=g||S.indexOf(u)>-1;var m=g?i(S):S;l+=m+" "+d+" ";p=h.lastIndex}var x=t.substring(p);g=g||x.indexOf(u)>-1;l+=g?i(x):x;return a.restore(l)};t.prototype._insertPolyfillHostInCssText=function(t){t=t.replace(S,c).replace(g,o).replace(d,s);return t};return t}();t("ShadowCss",r);var n=function(){function t(t){var e=this;this.placeholders=[];this.index=0;t=t.replace(/(\[[^\]]*\])/g,function(t,r){var n="__ph-"+e.index+"__";e.placeholders.push(r);e.index++;return n});this._content=t.replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(t,r,n){var o="__ph-"+e.index+"__";e.placeholders.push(n);e.index++;return r+o})}t.prototype.restore=function(t){var e=this;return t.replace(/__ph-(\d+)__/g,function(t,r){return e.placeholders[+r]})};t.prototype.content=function(){return this._content};return t}();var o="-shadowcsshost";var s="-shadowcssslotted";var c="-shadowcsscontext";var i=")(?:\\(("+"(?:\\([^)(]*\\)|[^)(]*)+?"+")\\))?([^,{]*)";var a=new RegExp("("+o+i,"gim");var l=new RegExp("("+c+i,"gim");var p=new RegExp("("+s+i,"gim");var u=o+"-no-combinator";var v=/-shadowcsshost-no-combinator([^\s]*)/;var h=[/::shadow/g,/::content/g];var f="([>\\s~+[.,{:][\\s\\S]*)?$";var _=/-shadowcsshost/gim;var g=/:host/gim;var d=/::slotted/gim;var S=/:host-context/gim;var m=/\/\*\s*[\s\S]*?\*\//g;function x(t){return t.replace(m,"")}var y=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;function C(t){return t.match(y)||[]}var w=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;var R=/([{}])/g;var H="{";var O="}";var W="%BLOCK%";var b=function(){function t(t,e){this.selector=t;this.content=e}return t}();function P(t,e){var r=T(t);var n=0;return r.escapedString.replace(w,function(){var t=[];for(var o=0;o<arguments.length;o++){t[o]=arguments[o]}var s=t[2];var c="";var i=t[4];var a="";if(i&&i.startsWith("{"+W)){c=r.blocks[n++];i=i.substring(W.length+1);a="{"}var l=e(new b(s,c));return""+t[1]+l.selector+t[3]+a+l.content+i})}var j=function(){function t(t,e){this.escapedString=t;this.blocks=e}return t}();function T(t){var e=t.split(R);var r=[];var n=[];var o=0;var s=[];for(var c=0;c<e.length;c++){var i=e[c];if(i===O){o--}if(o>0){s.push(i)}else{if(s.length>0){n.push(s.join(""));r.push(W);s=[]}r.push(i)}if(i===H){o++}}if(s.length>0){n.push(s.join(""));r.push(W)}return new j(r.join(""),n)}}}}); |
@@ -1,1 +0,1 @@ | ||
System.register([],function(t,e){"use strict";return{execute:function(){(function(){var t=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function e(e){var n=t.has(e);e=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(e);return!n&&e}function n(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function o(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function i(t,e,n){n=void 0===n?new Set:n;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var a=r;e(a);var c=a.localName;if("link"===c&&"import"===a.getAttribute("rel")){r=a.import;if(r instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)i(r,e,n);r=o(t,a);continue}else if("template"===c){r=o(t,a);continue}if(a=a.__CE_shadowRoot)for(a=a.firstChild;a;a=a.nextSibling)i(a,e,n)}r=r.firstChild?r.firstChild:o(t,r)}}function r(t,e,n){t[e]=n}function a(){this.a=new Map;this.g=new Map;this.c=[];this.f=[];this.b=!1}function c(t,e,n){t.a.set(e,n);t.g.set(n.constructorFunction,n)}function l(t,e){t.b=!0;t.c.push(e)}function s(t,e){t.b=!0;t.f.push(e)}function u(t,e){t.b&&i(e,function(e){return f(t,e)})}function f(t,e){if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.c.length;n++)t.c[n](e);for(n=0;n<t.f.length;n++)t.f[n](e)}}function h(t,e){var n=[];i(e,function(t){return n.push(t)});for(e=0;e<n.length;e++){var o=n[e];1===o.__CE_state?t.connectedCallback(o):m(t,o)}}function p(t,e){var n=[];i(e,function(t){return n.push(t)});for(e=0;e<n.length;e++){var o=n[e];1===o.__CE_state&&t.disconnectedCallback(o)}}function d(t,e,n){n=void 0===n?{}:n;var o=n.u||new Set,r=n.i||function(e){return m(t,e)},a=[];i(e,function(e){if("link"===e.localName&&"import"===e.getAttribute("rel")){var n=e.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0);n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:e.addEventListener("load",function(){var n=e.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set(o);i.delete(n);d(t,n,{u:i,i:r})}})}else a.push(e)},o);if(t.b)for(e=0;e<a.length;e++)f(t,a[e]);for(e=0;e<a.length;e++)r(a[e])}function m(t,e){if(void 0===e.__CE_state){var o=e.ownerDocument;if(o.defaultView||o.__CE_isImportDocument&&o.__CE_hasRegistry)if(o=t.a.get(e.localName)){o.constructionStack.push(e);var i=o.constructorFunction;try{try{if(new i!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{o.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}e.__CE_state=1;e.__CE_definition=o;if(o.attributeChangedCallback)for(o=o.observedAttributes,i=0;i<o.length;i++){var r=o[i],a=e.getAttribute(r);null!==a&&t.attributeChangedCallback(e,r,null,a,null)}n(e)&&t.connectedCallback(e)}}}a.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)};a.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)};a.prototype.attributeChangedCallback=function(t,e,n,o,i){var r=t.__CE_definition;r.attributeChangedCallback&&-1<r.observedAttributes.indexOf(e)&&r.attributeChangedCallback.call(t,e,n,o,i)};function y(t){var e=document;this.c=t;this.a=e;this.b=void 0;d(this.c,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function b(t){t.b&&t.b.disconnect()}y.prototype.f=function(t){var e=this.a.readyState;"interactive"!==e&&"complete"!==e||b(this);for(e=0;e<t.length;e++)for(var n=t[e].addedNodes,o=0;o<n.length;o++)d(this.c,n[o])};function v(){var t=this;this.b=this.a=void 0;this.c=new Promise(function(e){t.b=e;t.a&&e(t.a)})}function g(t){if(t.a)throw Error("Already resolved.");t.a=void 0;t.b&&t.b(void 0)}function w(t){this.c=!1;this.a=t;this.j=new Map;this.f=function(t){return t()};this.b=!1;this.g=[];this.o=new y(t)}w.prototype.l=function(t,n){var o=this;if(!(n instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!e(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.a.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var i=function(t){var e=r[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},r=n.prototype;if(!(r instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var a=i("connectedCallback");var l=i("disconnectedCallback");var s=i("adoptedCallback");var u=i("attributeChangedCallback");var f=n.observedAttributes||[]}catch(t){return}finally{this.c=!1}n={localName:t,constructorFunction:n,connectedCallback:a,disconnectedCallback:l,adoptedCallback:s,attributeChangedCallback:u,observedAttributes:f,constructionStack:[]};c(this.a,t,n);this.g.push(n);this.b||(this.b=!0,this.f(function(){return E(o)}))};w.prototype.i=function(t){d(this.a,t)};function E(t){if(!1!==t.b){t.b=!1;for(var e=t.g,n=[],o=new Map,i=0;i<e.length;i++)o.set(e[i].localName,[]);d(t.a,document,{i:function(e){if(void 0===e.__CE_state){var i=e.localName,r=o.get(i);r?r.push(e):t.a.a.get(i)&&n.push(e)}}});for(i=0;i<n.length;i++)m(t.a,n[i]);for(;0<e.length;){var r=e.shift();i=r.localName;r=o.get(r.localName);for(var a=0;a<r.length;a++)m(t.a,r[a]);(i=t.j.get(i))&&g(i)}}}w.prototype.get=function(t){if(t=this.a.a.get(t))return t.constructorFunction};w.prototype.m=function(t){if(!e(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var n=this.j.get(t);if(n)return n.c;n=new v;this.j.set(t,n);this.a.a.get(t)&&!this.g.some(function(e){return e.localName===t})&&g(n);return n.c};w.prototype.s=function(t){b(this.o);var e=this.f;this.f=function(n){return t(function(){return e(n)})}};window.CustomElementRegistry=w;w.prototype.define=w.prototype.l;w.prototype.upgrade=w.prototype.i;w.prototype.get=w.prototype.get;w.prototype.whenDefined=w.prototype.m;w.prototype.polyfillWrapFlushCallback=w.prototype.s;var _=window.Document.prototype.createElement,C=window.Document.prototype.createElementNS,N=window.Document.prototype.importNode,S=window.Document.prototype.prepend,T=window.Document.prototype.append,A=window.DocumentFragment.prototype.prepend,D=window.DocumentFragment.prototype.append,k=window.Node.prototype.cloneNode,O=window.Node.prototype.appendChild,x=window.Node.prototype.insertBefore,M=window.Node.prototype.removeChild,j=window.Node.prototype.replaceChild,L=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),H=window.Element.prototype.attachShadow,F=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),P=window.Element.prototype.getAttribute,R=window.Element.prototype.setAttribute,I=window.Element.prototype.removeAttribute,z=window.Element.prototype.getAttributeNS,W=window.Element.prototype.setAttributeNS,B=window.Element.prototype.removeAttributeNS,$=window.Element.prototype.insertAdjacentElement,q=window.Element.prototype.insertAdjacentHTML,U=window.Element.prototype.prepend,V=window.Element.prototype.append,X=window.Element.prototype.before,G=window.Element.prototype.after,J=window.Element.prototype.replaceWith,K=window.Element.prototype.remove,Q=window.HTMLElement,Y=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Z=window.HTMLElement.prototype.insertAdjacentElement,tt=window.HTMLElement.prototype.insertAdjacentHTML;var et=new function(){};function nt(){var t=st;window.HTMLElement=function(){function e(){var e=this.constructor,n=t.g.get(e);if(!n)throw Error("The custom element being constructed was not registered with `customElements`.");var o=n.constructionStack;if(0===o.length)return o=_.call(document,n.localName),Object.setPrototypeOf(o,e.prototype),o.__CE_state=1,o.__CE_definition=n,f(t,o),o;n=o.length-1;var i=o[n];if(i===et)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");o[n]=et;Object.setPrototypeOf(i,e.prototype);f(t,i);return i}e.prototype=Q.prototype;Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e});return e}()}function ot(t,e,o){function i(e){return function(o){for(var i=[],r=0;r<arguments.length;++r)i[r]=arguments[r];r=[];for(var a=[],c=0;c<i.length;c++){var l=i[c];l instanceof Element&&n(l)&&a.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)r.push(l);else r.push(l)}e.apply(this,i);for(i=0;i<a.length;i++)p(t,a[i]);if(n(this))for(i=0;i<r.length;i++)a=r[i],a instanceof Element&&h(t,a)}}void 0!==o.h&&(e.prepend=i(o.h));void 0!==o.append&&(e.append=i(o.append))}function it(){var t=st;r(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.a.get(e);if(n)return new n.constructorFunction}e=_.call(this,e);f(t,e);return e});r(Document.prototype,"importNode",function(e,n){e=N.call(this,e,!!n);this.__CE_hasRegistry?d(t,e):u(t,e);return e});r(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var o=t.a.get(n);if(o)return new o.constructorFunction}e=C.call(this,e,n);f(t,e);return e});ot(t,Document.prototype,{h:S,append:T})}function rt(){function t(t,o){Object.defineProperty(t,"textContent",{enumerable:o.enumerable,configurable:!0,get:o.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)o.set.call(this,t);else{var i=void 0;if(this.firstChild){var r=this.childNodes,a=r.length;if(0<a&&n(this)){i=Array(a);for(var c=0;c<a;c++)i[c]=r[c]}}o.set.call(this,t);if(i)for(t=0;t<i.length;t++)p(e,i[t])}}})}var e=st;r(Node.prototype,"insertBefore",function(t,o){if(t instanceof DocumentFragment){var i=Array.prototype.slice.apply(t.childNodes);t=x.call(this,t,o);if(n(this))for(o=0;o<i.length;o++)h(e,i[o]);return t}i=n(t);o=x.call(this,t,o);i&&p(e,t);n(this)&&h(e,t);return o});r(Node.prototype,"appendChild",function(t){if(t instanceof DocumentFragment){var o=Array.prototype.slice.apply(t.childNodes);t=O.call(this,t);if(n(this))for(var i=0;i<o.length;i++)h(e,o[i]);return t}o=n(t);i=O.call(this,t);o&&p(e,t);n(this)&&h(e,t);return i});r(Node.prototype,"cloneNode",function(t){t=k.call(this,!!t);this.ownerDocument.__CE_hasRegistry?d(e,t):u(e,t);return t});r(Node.prototype,"removeChild",function(t){var o=n(t),i=M.call(this,t);o&&p(e,t);return i});r(Node.prototype,"replaceChild",function(t,o){if(t instanceof DocumentFragment){var i=Array.prototype.slice.apply(t.childNodes);t=j.call(this,t,o);if(n(this))for(p(e,o),o=0;o<i.length;o++)h(e,i[o]);return t}i=n(t);var r=j.call(this,t,o),a=n(this);a&&p(e,o);i&&p(e,t);a&&h(e,t);return r});L&&L.get?t(Node.prototype,L):l(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++){var n=this.childNodes[e];n.nodeType!==Node.COMMENT_NODE&&t.push(n.textContent)}return t.join("")},set:function(t){for(;this.firstChild;)M.call(this,this.firstChild);null!=t&&""!==t&&O.call(this,document.createTextNode(t))}})})}function at(t){function e(e){return function(o){for(var i=[],r=0;r<arguments.length;++r)i[r]=arguments[r];r=[];for(var a=[],c=0;c<i.length;c++){var l=i[c];l instanceof Element&&n(l)&&a.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)r.push(l);else r.push(l)}e.apply(this,i);for(i=0;i<a.length;i++)p(t,a[i]);if(n(this))for(i=0;i<r.length;i++)a=r[i],a instanceof Element&&h(t,a)}}var o=Element.prototype;void 0!==X&&(o.before=e(X));void 0!==X&&(o.after=e(G));void 0!==J&&r(o,"replaceWith",function(e){for(var o=[],i=0;i<arguments.length;++i)o[i]=arguments[i];i=[];for(var r=[],a=0;a<o.length;a++){var c=o[a];c instanceof Element&&n(c)&&r.push(c);if(c instanceof DocumentFragment)for(c=c.firstChild;c;c=c.nextSibling)i.push(c);else i.push(c)}a=n(this);J.apply(this,o);for(o=0;o<r.length;o++)p(t,r[o]);if(a)for(p(t,this),o=0;o<i.length;o++)r=i[o],r instanceof Element&&h(t,r)});void 0!==K&&r(o,"remove",function(){var e=n(this);K.call(this);e&&p(t,this)})}function ct(){function t(t,e){Object.defineProperty(t,"innerHTML",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(t){var o=this,r=void 0;n(this)&&(r=[],i(this,function(t){t!==o&&r.push(t)}));e.set.call(this,t);if(r)for(var c=0;c<r.length;c++){var l=r[c];1===l.__CE_state&&a.disconnectedCallback(l)}this.ownerDocument.__CE_hasRegistry?d(a,this):u(a,this);return t}})}function e(t,e){r(t,"insertAdjacentElement",function(t,o){var i=n(o);t=e.call(this,t,o);i&&p(a,o);n(t)&&h(a,o);return t})}function o(t,e){function n(t,e){for(var n=[];t!==e;t=t.nextSibling)n.push(t);for(e=0;e<n.length;e++)d(a,n[e])}r(t,"insertAdjacentHTML",function(t,o){t=t.toLowerCase();if("beforebegin"===t){var i=this.previousSibling;e.call(this,t,o);n(i||this.parentNode.firstChild,this)}else if("afterbegin"===t)i=this.firstChild,e.call(this,t,o),n(this.firstChild,i);else if("beforeend"===t)i=this.lastChild,e.call(this,t,o),n(i||this.firstChild,null);else if("afterend"===t)i=this.nextSibling,e.call(this,t,o),n(this.nextSibling,i);else throw new SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.")})}var a=st;H&&r(Element.prototype,"attachShadow",function(t){t=H.call(this,t);var e=a;if(e.b&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.c.length;n++)e.c[n](t)}return this.__CE_shadowRoot=t});F&&F.get?t(Element.prototype,F):Y&&Y.get?t(HTMLElement.prototype,Y):s(a,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){return k.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName,n=e?this.content:this,o=C.call(document,this.namespaceURI,this.localName);for(o.innerHTML=t;0<n.childNodes.length;)M.call(n,n.childNodes[0]);for(t=e?o.content:o;0<t.childNodes.length;)O.call(n,t.childNodes[0])}})});r(Element.prototype,"setAttribute",function(t,e){if(1!==this.__CE_state)return R.call(this,t,e);var n=P.call(this,t);R.call(this,t,e);e=P.call(this,t);a.attributeChangedCallback(this,t,n,e,null)});r(Element.prototype,"setAttributeNS",function(t,e,n){if(1!==this.__CE_state)return W.call(this,t,e,n);var o=z.call(this,t,e);W.call(this,t,e,n);n=z.call(this,t,e);a.attributeChangedCallback(this,e,o,n,t)});r(Element.prototype,"removeAttribute",function(t){if(1!==this.__CE_state)return I.call(this,t);var e=P.call(this,t);I.call(this,t);null!==e&&a.attributeChangedCallback(this,t,e,null,null)});r(Element.prototype,"removeAttributeNS",function(t,e){if(1!==this.__CE_state)return B.call(this,t,e);var n=z.call(this,t,e);B.call(this,t,e);var o=z.call(this,t,e);n!==o&&a.attributeChangedCallback(this,e,n,o,t)});Z?e(HTMLElement.prototype,Z):$?e(Element.prototype,$):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");tt?o(HTMLElement.prototype,tt):q?o(Element.prototype,q):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");ot(a,Element.prototype,{h:U,append:V});at(a)}var lt=window.customElements;if(!lt||lt.forcePolyfill||"function"!=typeof lt.define||"function"!=typeof lt.get){var st=new a;nt();it();ot(st,DocumentFragment.prototype,{h:A,append:D});rt();ct();document.__CE_hasRegistry=!0;var ut=new w(st);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:ut})}}).call(self);if(typeof window.CustomEvent!=="function"){function t(t,e){e=e||{bubbles:false,cancelable:false,detail:undefined};var n=document.createEvent("CustomEvent");n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail);return n}t.prototype=window.Event.prototype;window.CustomEvent=t}(function(t,e,n){if(!t.composedPath){t.composedPath=function(){if(this.path){return this.path}var t=this.target;this.path=[];while(t.parentNode!==null){this.path.push(t);t=t.parentNode}this.path.push(e,n);return this.path}}})(Event.prototype,document,window);(function(t){"function"!==typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(t){t=(this.document||this.ownerDocument).querySelectorAll(t);for(var e=0;t[e]&&t[e]!==this;)++e;return!!t[e]});"function"!==typeof t.closest&&(t.closest=function(t){for(var e=this;e&&1===e.nodeType;){if(e.matches(t))return e;e=e.parentNode}return null})})(window.Element.prototype);(function(t){function e(t){t=n(t);return 11===t.nodeType?e(t.host):t}function n(t){return t.parentNode?n(t.parentNode):t}"function"!==typeof t.getRootNode&&(t.getRootNode=function(t){return t&&t.composed?e(this):n(this)})})(Element.prototype);(function(t){t.forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})})([Element.prototype,CharacterData.prototype,DocumentType.prototype]);!function(t){"classList"in t||Object.defineProperty(t,"classList",{get:function(){var t=this,e=(t.getAttribute("class")||"").replace(/^\s+|\s$/g,"").split(/\s+/g);function n(){e.length>0?t.setAttribute("class",e.join(" ")):t.removeAttribute("class")}return""===e[0]&&e.splice(0,1),e.toggle=function(t,o){void 0!==o?o?e.add(t):e.remove(t):-1!==e.indexOf(t)?e.splice(e.indexOf(t),1):e.push(t),n()},e.add=function(){for(var t=[].slice.call(arguments),o=0,i=t.length;o<i;o++)-1===e.indexOf(t[o])&&e.push(t[o]);n()},e.remove=function(){for(var t=[].slice.call(arguments),o=0,i=t.length;o<i;o++)-1!==e.indexOf(t[o])&&e.splice(e.indexOf(t[o]),1);n()},e.item=function(t){return e[t]},e.contains=function(t){return-1!==e.indexOf(t)},e.replace=function(t,o){-1!==e.indexOf(t)&&e.splice(e.indexOf(t),1,o),n()},e.value=t.getAttribute("class")||"",e}})}(Element.prototype)}}}); | ||
System.register([],function(){"use strict";return{execute:function(){(function(){var t=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function e(e){var n=t.has(e);e=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(e);return!n&&e}function n(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function o(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function i(t,e,n){n=void 0===n?new Set:n;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var a=r;e(a);var c=a.localName;if("link"===c&&"import"===a.getAttribute("rel")){r=a.import;if(r instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)i(r,e,n);r=o(t,a);continue}else if("template"===c){r=o(t,a);continue}if(a=a.__CE_shadowRoot)for(a=a.firstChild;a;a=a.nextSibling)i(a,e,n)}r=r.firstChild?r.firstChild:o(t,r)}}function r(t,e,n){t[e]=n}function a(){this.a=new Map;this.g=new Map;this.c=[];this.f=[];this.b=!1}function c(t,e,n){t.a.set(e,n);t.g.set(n.constructorFunction,n)}function l(t,e){t.b=!0;t.c.push(e)}function s(t,e){t.b=!0;t.f.push(e)}function u(t,e){t.b&&i(e,function(e){return f(t,e)})}function f(t,e){if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.c.length;n++)t.c[n](e);for(n=0;n<t.f.length;n++)t.f[n](e)}}function h(t,e){var n=[];i(e,function(t){return n.push(t)});for(e=0;e<n.length;e++){var o=n[e];1===o.__CE_state?t.connectedCallback(o):m(t,o)}}function p(t,e){var n=[];i(e,function(t){return n.push(t)});for(e=0;e<n.length;e++){var o=n[e];1===o.__CE_state&&t.disconnectedCallback(o)}}function d(t,e,n){n=void 0===n?{}:n;var o=n.u||new Set,r=n.i||function(e){return m(t,e)},a=[];i(e,function(e){if("link"===e.localName&&"import"===e.getAttribute("rel")){var n=e.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0);n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:e.addEventListener("load",function(){var n=e.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set(o);i.delete(n);d(t,n,{u:i,i:r})}})}else a.push(e)},o);if(t.b)for(e=0;e<a.length;e++)f(t,a[e]);for(e=0;e<a.length;e++)r(a[e])}function m(t,e){if(void 0===e.__CE_state){var o=e.ownerDocument;if(o.defaultView||o.__CE_isImportDocument&&o.__CE_hasRegistry)if(o=t.a.get(e.localName)){o.constructionStack.push(e);var i=o.constructorFunction;try{try{if(new i!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{o.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}e.__CE_state=1;e.__CE_definition=o;if(o.attributeChangedCallback)for(o=o.observedAttributes,i=0;i<o.length;i++){var r=o[i],a=e.getAttribute(r);null!==a&&t.attributeChangedCallback(e,r,null,a,null)}n(e)&&t.connectedCallback(e)}}}a.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)};a.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)};a.prototype.attributeChangedCallback=function(t,e,n,o,i){var r=t.__CE_definition;r.attributeChangedCallback&&-1<r.observedAttributes.indexOf(e)&&r.attributeChangedCallback.call(t,e,n,o,i)};function y(t){var e=document;this.c=t;this.a=e;this.b=void 0;d(this.c,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function b(t){t.b&&t.b.disconnect()}y.prototype.f=function(t){var e=this.a.readyState;"interactive"!==e&&"complete"!==e||b(this);for(e=0;e<t.length;e++)for(var n=t[e].addedNodes,o=0;o<n.length;o++)d(this.c,n[o])};function v(){var t=this;this.b=this.a=void 0;this.c=new Promise(function(e){t.b=e;t.a&&e(t.a)})}function g(t){if(t.a)throw Error("Already resolved.");t.a=void 0;t.b&&t.b(void 0)}function w(t){this.c=!1;this.a=t;this.j=new Map;this.f=function(t){return t()};this.b=!1;this.g=[];this.o=new y(t)}w.prototype.l=function(t,n){var o=this;if(!(n instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!e(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.a.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var i=function(t){var e=r[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},r=n.prototype;if(!(r instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var a=i("connectedCallback");var l=i("disconnectedCallback");var s=i("adoptedCallback");var u=i("attributeChangedCallback");var f=n.observedAttributes||[]}catch(t){return}finally{this.c=!1}n={localName:t,constructorFunction:n,connectedCallback:a,disconnectedCallback:l,adoptedCallback:s,attributeChangedCallback:u,observedAttributes:f,constructionStack:[]};c(this.a,t,n);this.g.push(n);this.b||(this.b=!0,this.f(function(){return E(o)}))};w.prototype.i=function(t){d(this.a,t)};function E(t){if(!1!==t.b){t.b=!1;for(var e=t.g,n=[],o=new Map,i=0;i<e.length;i++)o.set(e[i].localName,[]);d(t.a,document,{i:function(e){if(void 0===e.__CE_state){var i=e.localName,r=o.get(i);r?r.push(e):t.a.a.get(i)&&n.push(e)}}});for(i=0;i<n.length;i++)m(t.a,n[i]);for(;0<e.length;){var r=e.shift();i=r.localName;r=o.get(r.localName);for(var a=0;a<r.length;a++)m(t.a,r[a]);(i=t.j.get(i))&&g(i)}}}w.prototype.get=function(t){if(t=this.a.a.get(t))return t.constructorFunction};w.prototype.m=function(t){if(!e(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var n=this.j.get(t);if(n)return n.c;n=new v;this.j.set(t,n);this.a.a.get(t)&&!this.g.some(function(e){return e.localName===t})&&g(n);return n.c};w.prototype.s=function(t){b(this.o);var e=this.f;this.f=function(n){return t(function(){return e(n)})}};window.CustomElementRegistry=w;w.prototype.define=w.prototype.l;w.prototype.upgrade=w.prototype.i;w.prototype.get=w.prototype.get;w.prototype.whenDefined=w.prototype.m;w.prototype.polyfillWrapFlushCallback=w.prototype.s;var _=window.Document.prototype.createElement,C=window.Document.prototype.createElementNS,N=window.Document.prototype.importNode,S=window.Document.prototype.prepend,T=window.Document.prototype.append,A=window.DocumentFragment.prototype.prepend,D=window.DocumentFragment.prototype.append,k=window.Node.prototype.cloneNode,O=window.Node.prototype.appendChild,x=window.Node.prototype.insertBefore,M=window.Node.prototype.removeChild,j=window.Node.prototype.replaceChild,L=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),H=window.Element.prototype.attachShadow,F=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),P=window.Element.prototype.getAttribute,R=window.Element.prototype.setAttribute,I=window.Element.prototype.removeAttribute,z=window.Element.prototype.getAttributeNS,W=window.Element.prototype.setAttributeNS,B=window.Element.prototype.removeAttributeNS,$=window.Element.prototype.insertAdjacentElement,q=window.Element.prototype.insertAdjacentHTML,U=window.Element.prototype.prepend,V=window.Element.prototype.append,X=window.Element.prototype.before,G=window.Element.prototype.after,J=window.Element.prototype.replaceWith,K=window.Element.prototype.remove,Q=window.HTMLElement,Y=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Z=window.HTMLElement.prototype.insertAdjacentElement,tt=window.HTMLElement.prototype.insertAdjacentHTML;var et=new function(){};function nt(){var t=st;window.HTMLElement=function(){function e(){var e=this.constructor,n=t.g.get(e);if(!n)throw Error("The custom element being constructed was not registered with `customElements`.");var o=n.constructionStack;if(0===o.length)return o=_.call(document,n.localName),Object.setPrototypeOf(o,e.prototype),o.__CE_state=1,o.__CE_definition=n,f(t,o),o;n=o.length-1;var i=o[n];if(i===et)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");o[n]=et;Object.setPrototypeOf(i,e.prototype);f(t,i);return i}e.prototype=Q.prototype;Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e});return e}()}function ot(t,e,o){function i(e){return function(o){for(var i=[],r=0;r<arguments.length;++r)i[r]=arguments[r];r=[];for(var a=[],c=0;c<i.length;c++){var l=i[c];l instanceof Element&&n(l)&&a.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)r.push(l);else r.push(l)}e.apply(this,i);for(i=0;i<a.length;i++)p(t,a[i]);if(n(this))for(i=0;i<r.length;i++)a=r[i],a instanceof Element&&h(t,a)}}void 0!==o.h&&(e.prepend=i(o.h));void 0!==o.append&&(e.append=i(o.append))}function it(){var t=st;r(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.a.get(e);if(n)return new n.constructorFunction}e=_.call(this,e);f(t,e);return e});r(Document.prototype,"importNode",function(e,n){e=N.call(this,e,!!n);this.__CE_hasRegistry?d(t,e):u(t,e);return e});r(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var o=t.a.get(n);if(o)return new o.constructorFunction}e=C.call(this,e,n);f(t,e);return e});ot(t,Document.prototype,{h:S,append:T})}function rt(){function t(t,o){Object.defineProperty(t,"textContent",{enumerable:o.enumerable,configurable:!0,get:o.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)o.set.call(this,t);else{var i=void 0;if(this.firstChild){var r=this.childNodes,a=r.length;if(0<a&&n(this)){i=Array(a);for(var c=0;c<a;c++)i[c]=r[c]}}o.set.call(this,t);if(i)for(t=0;t<i.length;t++)p(e,i[t])}}})}var e=st;r(Node.prototype,"insertBefore",function(t,o){if(t instanceof DocumentFragment){var i=Array.prototype.slice.apply(t.childNodes);t=x.call(this,t,o);if(n(this))for(o=0;o<i.length;o++)h(e,i[o]);return t}i=n(t);o=x.call(this,t,o);i&&p(e,t);n(this)&&h(e,t);return o});r(Node.prototype,"appendChild",function(t){if(t instanceof DocumentFragment){var o=Array.prototype.slice.apply(t.childNodes);t=O.call(this,t);if(n(this))for(var i=0;i<o.length;i++)h(e,o[i]);return t}o=n(t);i=O.call(this,t);o&&p(e,t);n(this)&&h(e,t);return i});r(Node.prototype,"cloneNode",function(t){t=k.call(this,!!t);this.ownerDocument.__CE_hasRegistry?d(e,t):u(e,t);return t});r(Node.prototype,"removeChild",function(t){var o=n(t),i=M.call(this,t);o&&p(e,t);return i});r(Node.prototype,"replaceChild",function(t,o){if(t instanceof DocumentFragment){var i=Array.prototype.slice.apply(t.childNodes);t=j.call(this,t,o);if(n(this))for(p(e,o),o=0;o<i.length;o++)h(e,i[o]);return t}i=n(t);var r=j.call(this,t,o),a=n(this);a&&p(e,o);i&&p(e,t);a&&h(e,t);return r});L&&L.get?t(Node.prototype,L):l(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++){var n=this.childNodes[e];n.nodeType!==Node.COMMENT_NODE&&t.push(n.textContent)}return t.join("")},set:function(t){for(;this.firstChild;)M.call(this,this.firstChild);null!=t&&""!==t&&O.call(this,document.createTextNode(t))}})})}function at(t){function e(e){return function(o){for(var i=[],r=0;r<arguments.length;++r)i[r]=arguments[r];r=[];for(var a=[],c=0;c<i.length;c++){var l=i[c];l instanceof Element&&n(l)&&a.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)r.push(l);else r.push(l)}e.apply(this,i);for(i=0;i<a.length;i++)p(t,a[i]);if(n(this))for(i=0;i<r.length;i++)a=r[i],a instanceof Element&&h(t,a)}}var o=Element.prototype;void 0!==X&&(o.before=e(X));void 0!==X&&(o.after=e(G));void 0!==J&&r(o,"replaceWith",function(e){for(var o=[],i=0;i<arguments.length;++i)o[i]=arguments[i];i=[];for(var r=[],a=0;a<o.length;a++){var c=o[a];c instanceof Element&&n(c)&&r.push(c);if(c instanceof DocumentFragment)for(c=c.firstChild;c;c=c.nextSibling)i.push(c);else i.push(c)}a=n(this);J.apply(this,o);for(o=0;o<r.length;o++)p(t,r[o]);if(a)for(p(t,this),o=0;o<i.length;o++)r=i[o],r instanceof Element&&h(t,r)});void 0!==K&&r(o,"remove",function(){var e=n(this);K.call(this);e&&p(t,this)})}function ct(){function t(t,e){Object.defineProperty(t,"innerHTML",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(t){var o=this,r=void 0;n(this)&&(r=[],i(this,function(t){t!==o&&r.push(t)}));e.set.call(this,t);if(r)for(var c=0;c<r.length;c++){var l=r[c];1===l.__CE_state&&a.disconnectedCallback(l)}this.ownerDocument.__CE_hasRegistry?d(a,this):u(a,this);return t}})}function e(t,e){r(t,"insertAdjacentElement",function(t,o){var i=n(o);t=e.call(this,t,o);i&&p(a,o);n(t)&&h(a,o);return t})}function o(t,e){function n(t,e){for(var n=[];t!==e;t=t.nextSibling)n.push(t);for(e=0;e<n.length;e++)d(a,n[e])}r(t,"insertAdjacentHTML",function(t,o){t=t.toLowerCase();if("beforebegin"===t){var i=this.previousSibling;e.call(this,t,o);n(i||this.parentNode.firstChild,this)}else if("afterbegin"===t)i=this.firstChild,e.call(this,t,o),n(this.firstChild,i);else if("beforeend"===t)i=this.lastChild,e.call(this,t,o),n(i||this.firstChild,null);else if("afterend"===t)i=this.nextSibling,e.call(this,t,o),n(this.nextSibling,i);else throw new SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.")})}var a=st;H&&r(Element.prototype,"attachShadow",function(t){t=H.call(this,t);var e=a;if(e.b&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.c.length;n++)e.c[n](t)}return this.__CE_shadowRoot=t});F&&F.get?t(Element.prototype,F):Y&&Y.get?t(HTMLElement.prototype,Y):s(a,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){return k.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName,n=e?this.content:this,o=C.call(document,this.namespaceURI,this.localName);for(o.innerHTML=t;0<n.childNodes.length;)M.call(n,n.childNodes[0]);for(t=e?o.content:o;0<t.childNodes.length;)O.call(n,t.childNodes[0])}})});r(Element.prototype,"setAttribute",function(t,e){if(1!==this.__CE_state)return R.call(this,t,e);var n=P.call(this,t);R.call(this,t,e);e=P.call(this,t);a.attributeChangedCallback(this,t,n,e,null)});r(Element.prototype,"setAttributeNS",function(t,e,n){if(1!==this.__CE_state)return W.call(this,t,e,n);var o=z.call(this,t,e);W.call(this,t,e,n);n=z.call(this,t,e);a.attributeChangedCallback(this,e,o,n,t)});r(Element.prototype,"removeAttribute",function(t){if(1!==this.__CE_state)return I.call(this,t);var e=P.call(this,t);I.call(this,t);null!==e&&a.attributeChangedCallback(this,t,e,null,null)});r(Element.prototype,"removeAttributeNS",function(t,e){if(1!==this.__CE_state)return B.call(this,t,e);var n=z.call(this,t,e);B.call(this,t,e);var o=z.call(this,t,e);n!==o&&a.attributeChangedCallback(this,e,n,o,t)});Z?e(HTMLElement.prototype,Z):$?e(Element.prototype,$):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");tt?o(HTMLElement.prototype,tt):q?o(Element.prototype,q):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");ot(a,Element.prototype,{h:U,append:V});at(a)}var lt=window.customElements;if(!lt||lt.forcePolyfill||"function"!=typeof lt.define||"function"!=typeof lt.get){var st=new a;nt();it();ot(st,DocumentFragment.prototype,{h:A,append:D});rt();ct();document.__CE_hasRegistry=!0;var ut=new w(st);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:ut})}}).call(self);if(typeof window.CustomEvent!=="function"){function t(t,e){e=e||{bubbles:false,cancelable:false,detail:undefined};var n=document.createEvent("CustomEvent");n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail);return n}t.prototype=window.Event.prototype;window.CustomEvent=t}(function(t,e,n){if(!t.composedPath){t.composedPath=function(){if(this.path){return this.path}var t=this.target;this.path=[];while(t.parentNode!==null){this.path.push(t);t=t.parentNode}this.path.push(e,n);return this.path}}})(Event.prototype,document,window);(function(t){"function"!==typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(t){t=(this.document||this.ownerDocument).querySelectorAll(t);for(var e=0;t[e]&&t[e]!==this;)++e;return!!t[e]});"function"!==typeof t.closest&&(t.closest=function(t){for(var e=this;e&&1===e.nodeType;){if(e.matches(t))return e;e=e.parentNode}return null})})(window.Element.prototype);(function(t){function e(t){t=n(t);return 11===t.nodeType?e(t.host):t}function n(t){return t.parentNode?n(t.parentNode):t}"function"!==typeof t.getRootNode&&(t.getRootNode=function(t){return t&&t.composed?e(this):n(this)})})(Element.prototype);(function(t){t.forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})})([Element.prototype,CharacterData.prototype,DocumentType.prototype]);!function(t){"classList"in t||Object.defineProperty(t,"classList",{get:function(){var t=this,e=(t.getAttribute("class")||"").replace(/^\s+|\s$/g,"").split(/\s+/g);function n(){e.length>0?t.setAttribute("class",e.join(" ")):t.removeAttribute("class")}return""===e[0]&&e.splice(0,1),e.toggle=function(t,o){void 0!==o?o?e.add(t):e.remove(t):-1!==e.indexOf(t)?e.splice(e.indexOf(t),1):e.push(t),n()},e.add=function(){for(var t=[].slice.call(arguments),o=0,i=t.length;o<i;o++)-1===e.indexOf(t[o])&&e.push(t[o]);n()},e.remove=function(){for(var t=[].slice.call(arguments),o=0,i=t.length;o<i;o++)-1!==e.indexOf(t[o])&&e.splice(e.indexOf(t[o]),1);n()},e.item=function(t){return e[t]},e.contains=function(t){return-1!==e.indexOf(t)},e.replace=function(t,o){-1!==e.indexOf(t)&&e.splice(e.indexOf(t),1,o),n()},e.value=t.getAttribute("class")||"",e}})}(Element.prototype)}}}); |
@@ -1,1 +0,1 @@ | ||
import{a as e,b as a}from"./p-506462f6.js";e().then(e=>a([["p-ofzkkrtp",[[1,"web-social-share",{show:[1028],share:[16]},[[0,"socialShareLoaded","moveSlotOnLoad"],[0,"selected","hide"]]],[1,"web-social-share-target",{displayNames:[4,"display-names"],share:[16]}]]]],{resourcesUrl:e})); | ||
import{p as e,b as s}from"./p-024c21e4.js";e().then(e=>s([["p-yexqqtyu",[[1,"web-social-share",{show:[1028],share:[16]},[[0,"socialShareLoaded","moveSlotOnLoad"],[0,"selected","hide"]]],[1,"web-social-share-target",{displayNames:[4,"display-names"],share:[16]}]]]],{resourcesUrl:e})); |
{ | ||
"name": "web-social-share", | ||
"version": "5.1.0", | ||
"version": "6.0.0", | ||
"description": "A Web Component for your PWA to share urls and content on social networks", | ||
@@ -39,10 +39,11 @@ "keywords": [ | ||
"devDependencies": { | ||
"@stencil/core": "^1.0.0", | ||
"@stencil/core": "^1.0.2", | ||
"@stencil/dev-server": "latest", | ||
"@stencil/postcss": "^0.1.0", | ||
"@stencil/sass": "0.2.3", | ||
"@stencil/postcss": "^1.0.1", | ||
"@stencil/sass": "^1.0.0", | ||
"@stencil/utils": "latest", | ||
"@types/jest": "^24.0.13", | ||
"autoprefixer": "^9.6.0", | ||
"jest": "^24.8.0" | ||
"jest": "^24.8.0", | ||
"workbox-build": "4.3.1" | ||
}, | ||
@@ -49,0 +50,0 @@ "repository": { |
@@ -22,3 +22,4 @@ # Web Social Share | ||
- [Slots](#slots) | ||
- [Styling your icons](#styling-your-icons) | ||
- [Styling your icons](#styling-your-icons) | ||
- [Fallback and detection](#fallback-and-detection) | ||
- [Showcase](#showcase) | ||
@@ -61,4 +62,15 @@ - [Theming](#theming) | ||
These are your share options. For details about them you could have a look to the interface `WebSocialShareInput` located under folder `src/types/web-social-share/`. | ||
The following share options are supported: | ||
- Copy (to clipboard) | ||
For details about them you could have a look to the interface `WebSocialShareInput` located under folder `src/types/web-social-share/`. | ||
`share` is a parameter of type **WebSocialShareInput** | ||
@@ -118,3 +130,3 @@ | ||
The available slots are: `facebook`, `twitter`, `pinterest`, `linkedin`, `reddit`, `email` and `whatsapp`. | ||
The available slots are: `facebook`, `twitter`, `pinterest`, `linkedin`, `reddit`, `email`, `copy` and `whatsapp`. | ||
@@ -167,2 +179,8 @@ ``` | ||
## Fallback and detection | ||
This component is a dumb component. It don't proceed detection or fallback to anything in case one of the share options would not be supported by the device or browser where the component is used. | ||
For example, the share options "Copy (to clipboard)" use the Web Api [Clipboard.writeText()](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText) which might not be supported. Anyway the action will be displayed and if used by the user, nothing will happen. | ||
## Showcase | ||
@@ -169,0 +187,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1076202
86
14893
195
8
9