@ionic/pwa-elements
Advanced tools
Comparing version 1.5.0 to 1.5.1
'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -5,0 +5,0 @@ core.patchBrowser().then(options => { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -8,0 +8,0 @@ const defineCustomElements = (win, options) => { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -8,0 +8,0 @@ const PWAActionSheet = class { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -8,0 +8,0 @@ const PWACameraModal = class { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -8,0 +8,0 @@ const PWACameraModal = class { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -8,0 +8,0 @@ /** |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-ea24ba43.js'); | ||
const core = require('./core-992a1039.js'); | ||
@@ -8,0 +8,0 @@ const PWAToast = class { |
{ | ||
"entries": [ | ||
"components/action-sheet/action-sheet.js", | ||
"components/camera-modal/camera-modal.js", | ||
"components/camera-modal/camera-modal-instance.js", | ||
"components/toast/toast.js", | ||
"components/action-sheet/action-sheet.js", | ||
"components/camera/camera.js" | ||
@@ -11,4 +11,4 @@ ], | ||
"name": "@stencil/core", | ||
"version": "1.3.2", | ||
"typescriptVersion": "3.5.3" | ||
"version": "1.8.11", | ||
"typescriptVersion": "3.8.2" | ||
}, | ||
@@ -15,0 +15,0 @@ "collections": [], |
@@ -1,4 +0,4 @@ | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-8e8be6a7.js'; | ||
var PWAActionSheet = /** @class */ (function () { | ||
function class_1(hostRef) { | ||
function PWAActionSheet(hostRef) { | ||
registerInstance(this, hostRef); | ||
@@ -10,3 +10,3 @@ this.cancelable = true; | ||
} | ||
class_1.prototype.componentDidLoad = function () { | ||
PWAActionSheet.prototype.componentDidLoad = function () { | ||
var _this = this; | ||
@@ -17,3 +17,3 @@ requestAnimationFrame(function () { | ||
}; | ||
class_1.prototype.dismiss = function () { | ||
PWAActionSheet.prototype.dismiss = function () { | ||
if (this.cancelable) { | ||
@@ -23,3 +23,3 @@ this.close(); | ||
}; | ||
class_1.prototype.close = function () { | ||
PWAActionSheet.prototype.close = function () { | ||
var _this = this; | ||
@@ -31,3 +31,3 @@ this.open = false; | ||
}; | ||
class_1.prototype.handleOptionClick = function (e, i) { | ||
PWAActionSheet.prototype.handleOptionClick = function (e, i) { | ||
e.stopPropagation(); | ||
@@ -37,7 +37,7 @@ this.onSelection.emit(i); | ||
}; | ||
class_1.prototype.render = function () { | ||
PWAActionSheet.prototype.render = function () { | ||
var _this = this; | ||
return (h("div", { class: "wrapper" + (this.open ? ' open' : ''), onClick: function () { return _this.dismiss(); } }, h("div", { class: "content" }, h("div", { class: "title" }, this.header), this.options.map(function (option, i) { return h("div", { class: "action-sheet-option", onClick: function (e) { return _this.handleOptionClick(e, i); } }, h("div", { class: "action-sheet-button" }, option.title)); })))); | ||
}; | ||
Object.defineProperty(class_1.prototype, "el", { | ||
Object.defineProperty(PWAActionSheet.prototype, "el", { | ||
get: function () { return getElement(this); }, | ||
@@ -47,3 +47,3 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(class_1, "style", { | ||
Object.defineProperty(PWAActionSheet, "style", { | ||
get: function () { return ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Roboto,sans-serif}.wrapper,:host{display:-ms-flexbox;display:flex}.wrapper{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:transparent;-webkit-transition:background-color .4s cubic-bezier(.36,.66,.04,1);transition:background-color .4s cubic-bezier(.36,.66,.04,1)}.wrapper.open{background-color:rgba(0,0,0,.32)}.title{color:#999;height:23px;line-height:23px;padding-bottom:17px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:20px}.content{width:568px;-ms-flex-item-align:end;align-self:flex-end;background-color:#fff;-webkit-transition:-webkit-transform .4s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .4s cubic-bezier(.36,.66,.04,1);transition:transform .4s cubic-bezier(.36,.66,.04,1);transition:transform .4s cubic-bezier(.36,.66,.04,1),-webkit-transform .4s cubic-bezier(.36,.66,.04,1);-webkit-transform:translateY(100%);transform:translateY(100%)}.wrapper.open .content{-webkit-transform:translateY(0);transform:translateY(0)}\@media only screen and (max-width:568px){.content{width:100%}}.action-sheet-option{cursor:pointer;height:52px;line-height:52px}.action-sheet-button{color:#262626;font-size:16px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:0}.action-sheet-button:hover{background-color:#f6f6f6}"; }, | ||
@@ -53,4 +53,4 @@ enumerable: true, | ||
}); | ||
return class_1; | ||
return PWAActionSheet; | ||
}()); | ||
export { PWAActionSheet as pwa_action_sheet }; |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -36,3 +37,3 @@ }); | ||
}; | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-8e8be6a7.js'; | ||
var PWACameraModal = /** @class */ (function () { | ||
@@ -39,0 +40,0 @@ function class_1(hostRef) { |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -36,3 +37,3 @@ }); | ||
}; | ||
import { r as registerInstance, c as createEvent, h } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, c as createEvent, h } from './core-8e8be6a7.js'; | ||
var PWACameraModal = /** @class */ (function () { | ||
@@ -39,0 +40,0 @@ function class_1(hostRef) { |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -36,3 +37,3 @@ }); | ||
}; | ||
import { r as registerInstance, d as getContext, h, g as getElement } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, d as getContext, h, g as getElement } from './core-8e8be6a7.js'; | ||
/** | ||
@@ -39,0 +40,0 @@ * MediaStream ImageCapture polyfill |
@@ -1,4 +0,4 @@ | ||
import { r as registerInstance, h, g as getElement, H as Host } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, h, g as getElement, H as Host } from './core-8e8be6a7.js'; | ||
var PWAToast = /** @class */ (function () { | ||
function class_1(hostRef) { | ||
function PWAToast(hostRef) { | ||
registerInstance(this, hostRef); | ||
@@ -8,3 +8,3 @@ this.duration = 2000; | ||
} | ||
class_1.prototype.hostData = function () { | ||
PWAToast.prototype.hostData = function () { | ||
var classes = { | ||
@@ -20,3 +20,3 @@ out: !!this.closing | ||
}; | ||
class_1.prototype.componentDidLoad = function () { | ||
PWAToast.prototype.componentDidLoad = function () { | ||
var _this = this; | ||
@@ -30,3 +30,3 @@ setTimeout(function () { | ||
}; | ||
class_1.prototype.close = function () { | ||
PWAToast.prototype.close = function () { | ||
var _this = this; | ||
@@ -38,6 +38,6 @@ this.closing = true; | ||
}; | ||
class_1.prototype.__stencil_render = function () { | ||
PWAToast.prototype.__stencil_render = function () { | ||
return (h("div", { class: "wrapper" }, h("div", { class: "toast" }, this.message))); | ||
}; | ||
Object.defineProperty(class_1.prototype, "el", { | ||
Object.defineProperty(PWAToast.prototype, "el", { | ||
get: function () { return getElement(this); }, | ||
@@ -47,4 +47,4 @@ enumerable: true, | ||
}); | ||
class_1.prototype.render = function () { return h(Host, this.hostData(), this.__stencil_render()); }; | ||
Object.defineProperty(class_1, "style", { | ||
PWAToast.prototype.render = function () { return h(Host, this.hostData(), this.__stencil_render()); }; | ||
Object.defineProperty(PWAToast, "style", { | ||
get: function () { return ":host{position:fixed;bottom:20px;left:0;right:0;display:-ms-flexbox;display:flex;opacity:0}:host(.in){-webkit-transition:opacity .3s;transition:opacity .3s;opacity:1}:host(.out){-webkit-transition:opacity 1s;transition:opacity 1s;opacity:0}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toast{font-family:-apple-system,system-ui,Helvetica Neue,Roboto,sans-serif;background-color:#eee;color:#000;border-radius:5px;padding:10px 15px;font-size:14px;font-weight:500;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}"; }, | ||
@@ -54,4 +54,4 @@ enumerable: true, | ||
}); | ||
return class_1; | ||
return PWAToast; | ||
}()); | ||
export { PWAToast as pwa_toast }; |
@@ -436,5 +436,9 @@ /* | ||
function addGlobalStyle(globalScopes, styleEl) { | ||
var css = parseCSS(styleEl.innerHTML); | ||
if (globalScopes.some(function (css) { return css.styleEl === styleEl; })) { | ||
return false; | ||
} | ||
var css = parseCSS(styleEl.textContent); | ||
css.styleEl = styleEl; | ||
globalScopes.push(css); | ||
return true; | ||
} | ||
@@ -446,3 +450,3 @@ function updateGlobalScopes(scopes) { | ||
if (scope.usesCssVars) { | ||
scope.styleEl.innerHTML = executeTemplate(scope.template, props); | ||
scope.styleEl.textContent = executeTemplate(scope.template, props); | ||
} | ||
@@ -458,5 +462,5 @@ }); | ||
var selectors = scope.selectors.map(function (sel) { | ||
return Object.assign({}, sel, { selector: replaceScope(sel.selector, scope.scopeId, scopeId) }); | ||
return Object.assign(Object.assign({}, sel), { selector: replaceScope(sel.selector, scope.scopeId, scopeId) }); | ||
}); | ||
return Object.assign({}, scope, { template: template, | ||
return Object.assign(Object.assign({}, scope), { template: template, | ||
selectors: selectors, | ||
@@ -474,7 +478,17 @@ scopeId: scopeId }); | ||
loadDocumentStyles(doc, globalScopes); | ||
return loadDocumentLinks(doc, globalScopes); | ||
return loadDocumentLinks(doc, globalScopes).then(function () { | ||
updateGlobalScopes(globalScopes); | ||
}); | ||
} | ||
function startWatcher(doc, globalScopes) { | ||
var mutation = new MutationObserver(function () { | ||
if (loadDocumentStyles(doc, globalScopes)) { | ||
updateGlobalScopes(globalScopes); | ||
} | ||
}); | ||
mutation.observe(document.head, { childList: true }); | ||
} | ||
function loadDocumentLinks(doc, globalScopes) { | ||
var promises = []; | ||
var linkElms = doc.querySelectorAll('link[rel="stylesheet"][href]'); | ||
var linkElms = doc.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'); | ||
for (var i = 0; i < linkElms.length; i++) { | ||
@@ -486,6 +500,6 @@ promises.push(addGlobalLink(doc, globalScopes, linkElms[i])); | ||
function loadDocumentStyles(doc, globalScopes) { | ||
var styleElms = doc.querySelectorAll('style:not([data-styles])'); | ||
for (var i = 0; i < styleElms.length; i++) { | ||
addGlobalStyle(globalScopes, styleElms[i]); | ||
} | ||
var styleElms = Array.from(doc.querySelectorAll('style:not([data-styles]):not([data-no-shim])')); | ||
return styleElms | ||
.map(function (style) { return addGlobalStyle(globalScopes, style); }) | ||
.some(Boolean); | ||
} | ||
@@ -501,3 +515,3 @@ function addGlobalLink(doc, globalScopes, linkElm) { | ||
styleEl.setAttribute('data-styles', ''); | ||
styleEl.innerHTML = text; | ||
styleEl.textContent = text; | ||
addGlobalStyle(globalScopes, styleEl); | ||
@@ -526,3 +540,3 @@ linkElm.parentNode.insertBefore(styleEl, linkElm); | ||
// This regexp find all url() usages with relative urls | ||
var CSS_URL_REGEXP = /url[\s]*\([\s]*['"]?(?![http|/])([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim; | ||
var CSS_URL_REGEXP = /url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim; | ||
function hasRelativeUrls(css) { | ||
@@ -552,10 +566,18 @@ CSS_URL_REGEXP.lastIndex = 0; | ||
this.scopesMap = new Map(); | ||
this.didInit = false; | ||
} | ||
CustomStyle.prototype.initShim = function () { | ||
CustomStyle.prototype.i = function () { | ||
var _this = this; | ||
return new Promise(function (resolve) { | ||
_this.win.requestAnimationFrame(function () { | ||
loadDocument(_this.doc, _this.globalScopes).then(function () { return resolve(); }); | ||
if (this.didInit || !this.win.requestAnimationFrame) { | ||
return Promise.resolve(); | ||
} | ||
else { | ||
this.didInit = true; | ||
return new Promise(function (resolve) { | ||
_this.win.requestAnimationFrame(function () { | ||
startWatcher(_this.doc, _this.globalScopes); | ||
loadDocument(_this.doc, _this.globalScopes).then(function () { return resolve(); }); | ||
}); | ||
}); | ||
}); | ||
} | ||
}; | ||
@@ -569,4 +591,5 @@ CustomStyle.prototype.addLink = function (linkEl) { | ||
CustomStyle.prototype.addGlobalStyle = function (styleEl) { | ||
addGlobalStyle(this.globalScopes, styleEl); | ||
this.updateGlobal(); | ||
if (addGlobalStyle(this.globalScopes, styleEl)) { | ||
this.updateGlobal(); | ||
} | ||
}; | ||
@@ -579,5 +602,6 @@ CustomStyle.prototype.createHostStyle = function (hostEl, cssScopeId, cssText, isScoped) { | ||
var styleEl = this.doc.createElement('style'); | ||
styleEl.setAttribute('data-no-shim', ''); | ||
if (!baseScope.usesCssVars) { | ||
// This component does not use (read) css variables | ||
styleEl.innerHTML = cssText; | ||
styleEl.textContent = cssText; | ||
} | ||
@@ -587,3 +611,3 @@ else if (isScoped) { | ||
styleEl['s-sc'] = cssScopeId = baseScope.scopeId + "-" + this.count; | ||
styleEl.innerHTML = '/*needs update*/'; | ||
styleEl.textContent = '/*needs update*/'; | ||
this.hostStyleMap.set(hostEl, styleEl); | ||
@@ -597,3 +621,3 @@ this.hostScopeMap.set(hostEl, reScope(baseScope, cssScopeId)); | ||
if (!baseScope.usesCssVars) { | ||
styleEl.innerHTML = executeTemplate(baseScope.template, {}); | ||
styleEl.textContent = executeTemplate(baseScope.template, {}); | ||
} | ||
@@ -621,3 +645,3 @@ this.globalScopes.push(baseScope); | ||
var props = resolveValues(selectors); | ||
styleEl.innerHTML = executeTemplate(scope.template, props); | ||
styleEl.textContent = executeTemplate(scope.template, props); | ||
} | ||
@@ -641,8 +665,6 @@ } | ||
}()); | ||
var win = window; | ||
function needsShim() { | ||
return !(win.CSS && win.CSS.supports && win.CSS.supports('color', 'var(--c)')); | ||
} | ||
if (!win.__stencil_cssshim && needsShim()) { | ||
win.__stencil_cssshim = new CustomStyle(win, document); | ||
} | ||
(function (win) { | ||
if (win && !win.__cssshim && (!(win.CSS && win.CSS.supports && win.CSS.supports('color', 'var(--c)')))) { | ||
win.__cssshim = new CustomStyle(win, win.document); | ||
} | ||
})(typeof window !== 'undefined' && window); |
(function(){ | ||
/* | ||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | ||
@@ -48,3 +47,3 @@ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
var base = document.querySelector('base'); | ||
if (base) { | ||
if (base && base.href) { | ||
return base.href; | ||
@@ -98,5 +97,21 @@ } | ||
*/ | ||
(function(c){function d(a){a=b(a);return 11===a.nodeType?d(a.host):a}function b(a){return a.parentNode?b(a.parentNode):a}"function"!==typeof c.getRootNode&&(c.getRootNode=function(a){return a&&a.composed?d(this):b(this)})})(Element.prototype); | ||
(function(c){function d(a){a=b(a);return a&&11===a.nodeType?d(a.host):a}function b(a){return a&&a.parentNode?b(a.parentNode):a}"function"!==typeof c.getRootNode&&(c.getRootNode=function(a){return a&&a.composed?d(this):b(this)})})(Element.prototype); | ||
/*! | ||
Element.isConnected() | ||
*/ | ||
(function(prototype) { | ||
if (!("isConnected" in prototype)) { | ||
Object.defineProperty(prototype, 'isConnected', { | ||
configurable: true, | ||
enumerable: true, | ||
get: function() { | ||
var root = this.getRootNode({composed: true}); | ||
return root && root.nodeType === 9; | ||
} | ||
}) | ||
} | ||
})(Element.prototype); | ||
/*! | ||
Element.remove() | ||
@@ -110,1 +125,25 @@ */ | ||
!function(e){'classList'in e||Object.defineProperty(e,"classList",{get:function(){var e=this,t=(e.getAttribute("class")||"").replace(/^\s+|\s$/g,"").split(/\s+/g);function n(){t.length>0?e.setAttribute("class",t.join(" ")):e.removeAttribute("class")}return""===t[0]&&t.splice(0,1),t.toggle=function(e,i){void 0!==i?i?t.add(e):t.remove(e):-1!==t.indexOf(e)?t.splice(t.indexOf(e),1):t.push(e),n()},t.add=function(){for(var e=[].slice.call(arguments),i=0,s=e.length;i<s;i++)-1===t.indexOf(e[i])&&t.push(e[i]);n()},t.remove=function(){for(var e=[].slice.call(arguments),i=0,s=e.length;i<s;i++)-1!==t.indexOf(e[i])&&t.splice(t.indexOf(e[i]),1);n()},t.item=function(e){return t[e]},t.contains=function(e){return-1!==t.indexOf(e)},t.replace=function(e,i){-1!==t.indexOf(e)&&t.splice(t.indexOf(e),1,i),n()},t.value=e.getAttribute("class")||"",t}})}(Element.prototype); | ||
/*! | ||
DOMTokenList | ||
*/ | ||
(function(prototype){ | ||
try { | ||
document.body.classList.add(); | ||
} catch (e) { | ||
var originalAdd = prototype.add; | ||
var originalRemove = prototype.remove; | ||
prototype.add = function() { | ||
for (var i = 0; i < arguments.length; i++) { | ||
originalAdd.call(this, arguments[i]); | ||
} | ||
}; | ||
prototype.remove = function() { | ||
for (var i = 0; i < arguments.length; i++) { | ||
originalRemove.call(this, arguments[i]); | ||
} | ||
}; | ||
} | ||
}(DOMTokenList.prototype)); |
export function applyPolyfills() { | ||
var win = window; | ||
if (typeof window !== 'undefined') { | ||
var win = window; | ||
var promises = []; | ||
var promises = []; | ||
if (!win.customElements || (win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove))) { | ||
promises.push(import('./dom.js')); | ||
} | ||
if (!win.customElements || (win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove))) { | ||
promises.push(import('./dom.js')); | ||
} | ||
function checkIfURLIsSupported() { | ||
try { | ||
var u = new URL('b', 'http://a'); | ||
u.pathname = 'c%20d'; | ||
return (u.href === 'http://a/c%20d') && u.searchParams; | ||
} catch(e) { | ||
return false; | ||
function checkIfURLIsSupported() { | ||
try { | ||
var u = new URL('b', 'http://a'); | ||
u.pathname = 'c%20d'; | ||
return (u.href === 'http://a/c%20d') && u.searchParams; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
} | ||
if ( | ||
'function' !== typeof Object.assign || !Object.entries || | ||
!Array.prototype.find || !Array.prototype.includes || | ||
!String.prototype.startsWith || !String.prototype.endsWith || | ||
(win.NodeList && !win.NodeList.prototype.forEach) || | ||
!win.fetch || | ||
!checkIfURLIsSupported() || | ||
typeof WeakMap == 'undefined' | ||
) { | ||
promises.push(import('./core-js.js')); | ||
if ( | ||
'function' !== typeof Object.assign || !Object.entries || | ||
!Array.prototype.find || !Array.prototype.includes || | ||
!String.prototype.startsWith || !String.prototype.endsWith || | ||
(win.NodeList && !win.NodeList.prototype.forEach) || | ||
!win.fetch || | ||
!checkIfURLIsSupported() || | ||
typeof WeakMap == 'undefined' | ||
) { | ||
promises.push(import('./core-js.js')); | ||
} | ||
return Promise.all(promises); | ||
} | ||
if (!(win.CSS && win.CSS.supports && win.CSS.supports('color', 'var(--c)'))) { | ||
promises.push(import('./css-shim.js')); | ||
} | ||
return Promise.all(promises); | ||
return Promise.resolve(); | ||
} |
/** | ||
* SystemJS 4.0.2 | ||
* MANUAL PATCH: remove script.crossOrigin = "anonymous" | ||
* MANUAL PATCH: add conditionally apply, n.System=n.System||new u | ||
*/ | ||
!function(){var e="undefined"!=typeof self,n=e?self:global;var t;if("undefined"!=typeof document){var e=document.querySelector("base[href]");e&&(t=e.href)}if(!t&&"undefined"!=typeof location){var e=(t=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(t=t.slice(0,e+1))}var r=/\\/g,o="undefined"!=typeof Symbol,i=o&&Symbol.toStringTag,c=o?Symbol():"@";function u(){this[c]={}}var s=u.prototype;var l;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 o=n[c][t];if(o)return o;var u=[],s=Object.create(null);i&&Object.defineProperty(s,i,{value:"Module"});var l=Promise.resolve().then(function(){return n.instantiate(t,r)}).then(function(e){if(!e)throw Error("Module "+t+" did not instantiate");var r=e[1](function(e,n){o.h=!0;var t=!1;if("object"!=typeof e)e in s&&s[e]===n||(s[e]=n,t=!0);else for(var n in e){var r=e[n];n in s&&s[n]===r||(s[n]=r,t=!0)}if(t)for(var e=0;e<u.length;e++)u[e](s);return n},2===e[1].length?{import:function(e){return n.import(e,t)},meta:n.createContext(t)}:void 0);return o.e=r.execute||function(){},[e[0],r.setters||[]]});var f=l.then(function(r){return Promise.all(r[0].map(function(o,i){var c=r[1][i];return Promise.resolve(n.resolve(o,t)).then(function(r){var o=e(n,r,t);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(e){o.d=e})});return f.catch(function(e){o.e=null,o.er=e}),o=n[c][t]={id:t,i:u,n:s,I:l,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}var o;return t.d.forEach(function(t){{var i=e(n,t,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){try{var 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){l=[e,n]},s.getRegister=function(){var e=l;return l=void 0,e};var f=Object.freeze(Object.create(null));n.System=new u;var d=s.register;s.register=function(e,n){d.call(this,e,n)},s.instantiate=function(e,n){var t=this;return".json"===e.substr(-5)?fetch(e).then(function(e){return e.text()}).then(function(e){return[[],function(n){return{execute:function(){n("default",JSON.parse(e))}}}]}):new Promise(function(r,o){var i;function c(n){n.filename===e&&(i=n.error)}window.addEventListener("error",c);var u=document.createElement("script");u.charset="utf-8",u.async=!0,u.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+e+(n?" from "+n:"")))}),u.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(u),i?o(i):r(t.getRegister())}),u.src=e,document.head.appendChild(u)})},e&&"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(e,n){var o=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]){var t=n.slice(0,n.indexOf(":")+1);var 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;var o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];var c=-1;for(var e=0;e<o.length;e++)-1!==c?"/"===o[e]&&(i.push(o.slice(c,e+1)),c=-1):"."===o[e]?"."!==o[e+1]||"/"!==o[e+2]&&e+2!==o.length?"/"===o[e+1]||e+1===o.length?e+=1:c=e:(i.pop(),e+=2):c=e;return-1!==c&&i.push(o.slice(c)),n.slice(0,n.length-r.length)+i.join("")}}(e,n||t);if(!o){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw Error('Cannot resolve "'+e+(n?'" from '+n:'"'))}return Promise.resolve(o)}}(); | ||
!function(){var e="undefined"!=typeof self,n=e?self:global;var t;if("undefined"!=typeof document){var e=document.querySelector("base[href]");e&&(t=e.href)}if(!t&&"undefined"!=typeof location){var e=(t=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(t=t.slice(0,e+1))}var r=/\\/g,o="undefined"!=typeof Symbol,i=o&&Symbol.toStringTag,c=o?Symbol():"@";function u(){this[c]={}}var s=u.prototype;var l;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 o=n[c][t];if(o)return o;var u=[],s=Object.create(null);i&&Object.defineProperty(s,i,{value:"Module"});var l=Promise.resolve().then(function(){return n.instantiate(t,r)}).then(function(e){if(!e)throw Error("Module "+t+" did not instantiate");var r=e[1](function(e,n){o.h=!0;var t=!1;if("object"!=typeof e)e in s&&s[e]===n||(s[e]=n,t=!0);else for(var n in e){var r=e[n];n in s&&s[n]===r||(s[n]=r,t=!0)}if(t)for(var e=0;e<u.length;e++)u[e](s);return n},2===e[1].length?{import:function(e){return n.import(e,t)},meta:n.createContext(t)}:void 0);return o.e=r.execute||function(){},[e[0],r.setters||[]]});var f=l.then(function(r){return Promise.all(r[0].map(function(o,i){var c=r[1][i];return Promise.resolve(n.resolve(o,t)).then(function(r){var o=e(n,r,t);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(e){o.d=e})});return f.catch(function(e){o.e=null,o.er=e}),o=n[c][t]={id:t,i:u,n:s,I:l,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}var o;return t.d.forEach(function(t){{var i=e(n,t,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){try{var 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){l=[e,n]},s.getRegister=function(){var e=l;return l=void 0,e};var f=Object.freeze(Object.create(null));n.System=n.System||new u;var d=s.register;s.register=function(e,n){d.call(this,e,n)},s.instantiate=function(e,n){var t=this;return".json"===e.substr(-5)?fetch(e).then(function(e){return e.text()}).then(function(e){return[[],function(n){return{execute:function(){n("default",JSON.parse(e))}}}]}):new Promise(function(r,o){var i;function c(n){n.filename===e&&(i=n.error)}window.addEventListener("error",c);var u=document.createElement("script");u.charset="utf-8",u.async=!0,u.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+e+(n?" from "+n:"")))}),u.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(u),i?o(i):r(t.getRegister())}),u.src=e,document.head.appendChild(u)})},e&&"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(e,n){var o=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]){var t=n.slice(0,n.indexOf(":")+1);var 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;var o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];var c=-1;for(var e=0;e<o.length;e++)-1!==c?"/"===o[e]&&(i.push(o.slice(c,e+1)),c=-1):"."===o[e]?"."!==o[e+1]||"/"!==o[e+2]&&e+2!==o.length?"/"===o[e+1]||e+1===o.length?e+=1:c=e:(i.pop(),e+=2):c=e;return-1!==c&&i.push(o.slice(c)),n.slice(0,n.length-r.length)+i.join("")}}(e,n||t);if(!o){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw Error('Cannot resolve "'+e+(n?'" from '+n:'"'))}return Promise.resolve(o)}}(); |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-8e8be6a7.js'; | ||
@@ -3,0 +3,0 @@ const PWAActionSheet = class { |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-8e8be6a7.js'; | ||
@@ -3,0 +3,0 @@ const PWACameraModal = class { |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, c as createEvent, h } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, c as createEvent, h } from './core-8e8be6a7.js'; | ||
@@ -3,0 +3,0 @@ const PWACameraModal = class { |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, d as getContext, h, g as getElement } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, d as getContext, h, g as getElement } from './core-8e8be6a7.js'; | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, h, g as getElement, H as Host } from './core-3b69dcfe.js'; | ||
import { r as registerInstance, h, g as getElement, H as Host } from './core-8e8be6a7.js'; | ||
@@ -3,0 +3,0 @@ const PWAToast = class { |
@@ -16,4 +16,5 @@ | ||
scriptElm.src = url + '/ionicpwaelements.esm.js'; | ||
warn.push(scriptElm.outerHTML); | ||
scriptElm.setAttribute('data-stencil-namespace', 'ionicpwaelements'); | ||
doc.head.appendChild(scriptElm); | ||
warn.push(scriptElm.outerHTML); | ||
@@ -23,4 +24,5 @@ scriptElm = doc.createElement('script'); | ||
scriptElm.src = url + '/ionicpwaelements.js'; | ||
warn.push(scriptElm.outerHTML); | ||
scriptElm.setAttribute('data-stencil-namespace', 'ionicpwaelements'); | ||
doc.head.appendChild(scriptElm); | ||
warn.push(scriptElm.outerHTML); | ||
@@ -27,0 +29,0 @@ console.warn(warn.join('\n')); |
@@ -1,1 +0,1 @@ | ||
import{p as a,b as e}from"./p-fe78724f.js";a().then(a=>e([["p-x4kmsyur",[[1,"pwa-action-sheet",{header:[1],cancelable:[4],options:[16],open:[32]}]]],["p-nzjc8lv6",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]],["p-fnwj1bio",[[1,"pwa-camera-modal",{present:[64],dismiss:[64]}]]],["p-gfs4h2wj",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["p-zjrsj2bd",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],onPhoto:[16],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32]}]]]],a)); | ||
import{p as a,b as e}from"./p-b877c280.js";a().then(a=>e([["p-e501uohe",[[1,"pwa-action-sheet",{header:[1],cancelable:[4],options:[16],open:[32]}]]],["p-7newq7qb",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]],["p-gbauiyw4",[[1,"pwa-camera-modal",{present:[64],dismiss:[64]}]]],["p-cuaeu43l",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["p-ow7sscv5",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],onPhoto:[16],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32]}]]]],a)); |
@@ -0,1 +1,2 @@ | ||
/* eslint-disable */ | ||
/* tslint:disable */ | ||
@@ -76,3 +77,3 @@ /** | ||
declare namespace LocalJSX { | ||
interface PwaActionSheet extends JSXBase.HTMLAttributes<HTMLPwaActionSheetElement> { | ||
interface PwaActionSheet { | ||
'cancelable'?: boolean; | ||
@@ -83,13 +84,13 @@ 'header'?: string; | ||
} | ||
interface PwaCamera extends JSXBase.HTMLAttributes<HTMLPwaCameraElement> { | ||
interface PwaCamera { | ||
'facingMode'?: string; | ||
'onPhoto'?: (e: any) => void; | ||
} | ||
interface PwaCameraModal extends JSXBase.HTMLAttributes<HTMLPwaCameraModalElement> { | ||
interface PwaCameraModal { | ||
'onOnPhoto'?: (event: CustomEvent<any>) => void; | ||
} | ||
interface PwaCameraModalInstance extends JSXBase.HTMLAttributes<HTMLPwaCameraModalInstanceElement> { | ||
interface PwaCameraModalInstance { | ||
'onOnPhoto'?: (event: CustomEvent<any>) => void; | ||
} | ||
interface PwaToast extends JSXBase.HTMLAttributes<HTMLPwaToastElement> { | ||
interface PwaToast { | ||
'duration'?: number; | ||
@@ -113,3 +114,9 @@ 'message'?: string; | ||
export namespace JSX { | ||
interface IntrinsicElements extends LocalJSX.IntrinsicElements {} | ||
interface IntrinsicElements { | ||
'pwa-action-sheet': LocalJSX.PwaActionSheet & JSXBase.HTMLAttributes<HTMLPwaActionSheetElement>; | ||
'pwa-camera': LocalJSX.PwaCamera & JSXBase.HTMLAttributes<HTMLPwaCameraElement>; | ||
'pwa-camera-modal': LocalJSX.PwaCameraModal & JSXBase.HTMLAttributes<HTMLPwaCameraModalElement>; | ||
'pwa-camera-modal-instance': LocalJSX.PwaCameraModalInstance & JSXBase.HTMLAttributes<HTMLPwaCameraModalInstanceElement>; | ||
'pwa-toast': LocalJSX.PwaToast & JSXBase.HTMLAttributes<HTMLPwaToastElement>; | ||
} | ||
} | ||
@@ -116,0 +123,0 @@ } |
@@ -12,3 +12,3 @@ | ||
} | ||
export declare function defineCustomElements(win: Window, opts?: CustomElementsDefineOptions): Promise<void>; | ||
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>; | ||
export declare function applyPolyfills(): Promise<void>; |
{ | ||
"name": "@ionic/pwa-elements", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Stencil Component Starter", | ||
@@ -33,11 +33,11 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@stencil/core": "^1.3.2", | ||
"@types/jest": "23.3.14", | ||
"@types/puppeteer": "1.12.4", | ||
"jest": "23.6.0", | ||
"jest-cli": "23.6.0", | ||
"@stencil/core": "^1.8.11", | ||
"@types/jest": "24.0.25", | ||
"@types/puppeteer": "1.20.4", | ||
"jest": "24.9.0", | ||
"jest-cli": "24.9.0", | ||
"np": "^5.0.2", | ||
"puppeteer": "1.14.0", | ||
"puppeteer": "1.20.0", | ||
"workbox-build": "4.3.1" | ||
} | ||
} |
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
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
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
986480
117
15553
10
11