@manifoldco/shadowcat
Advanced tools
Comparing version 0.1.6 to 0.1.7-rc.0
@@ -5,7 +5,7 @@ 'use strict'; | ||
const core = require('./core-136c5e11.js'); | ||
const core = require('./core-a258c5d4.js'); | ||
const defineCustomElements = (win, options) => { | ||
return core.patchEsm().then(() => { | ||
core.bootstrapLazy([["manifold-oauth.cjs",[[0,"manifold-oauth",{"oauthUrl":[1,"oauth-url"]}]]]], options); | ||
core.bootstrapLazy([["manifold-oauth.cjs",[[0,"manifold-oauth"]]]], options); | ||
}); | ||
@@ -12,0 +12,0 @@ }; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-136c5e11.js'); | ||
const core = require('./core-a258c5d4.js'); | ||
@@ -11,11 +11,12 @@ const ManifoldOauth = class { | ||
core.registerInstance(this, hostRef); | ||
this.oauthUrl = 'https://login.manifold.co/signin/oauth/web'; | ||
this.tokenListener = (ev) => { | ||
const pumaToken = ev.data; | ||
this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - this.loadTime.getTime(), | ||
}); | ||
if (ev.origin === 'https://login.manifold.co') { | ||
this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - this.loadTime.getTime(), | ||
}); | ||
} | ||
}; | ||
@@ -32,3 +33,3 @@ this.receiveManifoldToken = core.createEvent(this, "receiveManifoldToken", 7); | ||
render() { | ||
return (core.h("iframe", { src: this.oauthUrl, allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", style: { | ||
return (core.h("iframe", { src: "https://login.manifold.co/signin/oauth/web", allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", sandbox: "allow-scripts allow-same-origin", style: { | ||
border: 'none', | ||
@@ -35,0 +36,0 @@ display: 'block', |
'use strict'; | ||
const core = require('./core-136c5e11.js'); | ||
const core = require('./core-a258c5d4.js'); | ||
core.patchBrowser().then(options => { | ||
return core.bootstrapLazy([["manifold-oauth.cjs",[[0,"manifold-oauth",{"oauthUrl":[1,"oauth-url"]}]]]], options); | ||
return core.bootstrapLazy([["manifold-oauth.cjs",[[0,"manifold-oauth"]]]], options); | ||
}); |
@@ -7,3 +7,3 @@ { | ||
"name": "@stencil/core", | ||
"version": "1.3.0", | ||
"version": "1.3.2", | ||
"typescriptVersion": "3.5.3" | ||
@@ -10,0 +10,0 @@ }, |
import { h } from "@stencil/core"; | ||
export class ManifoldOauth { | ||
constructor() { | ||
this.oauthUrl = 'https://login.manifold.co/signin/oauth/web'; | ||
this.tokenListener = (ev) => { | ||
const pumaToken = ev.data; | ||
this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - this.loadTime.getTime(), | ||
}); | ||
if (ev.origin === 'https://login.manifold.co') { | ||
this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - this.loadTime.getTime(), | ||
}); | ||
} | ||
}; | ||
@@ -23,3 +24,3 @@ } | ||
render() { | ||
return (h("iframe", { src: this.oauthUrl, allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", style: { | ||
return (h("iframe", { src: "https://login.manifold.co/signin/oauth/web", allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", sandbox: "allow-scripts allow-same-origin", style: { | ||
border: 'none', | ||
@@ -39,22 +40,2 @@ display: 'block', | ||
static get is() { return "manifold-oauth"; } | ||
static get properties() { return { | ||
"oauthUrl": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "oauth-url", | ||
"reflect": false, | ||
"defaultValue": "'https://login.manifold.co/signin/oauth/web'" | ||
} | ||
}; } | ||
static get events() { return [{ | ||
@@ -61,0 +42,0 @@ "method": "receiveManifoldToken", |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, c as createEvent, h } from './core-205678be.js'; | ||
import { r as registerInstance, c as createEvent, h } from './core-dfe013eb.js'; | ||
var ManifoldOauth = /** @class */ (function () { | ||
@@ -6,11 +6,12 @@ function class_1(hostRef) { | ||
registerInstance(this, hostRef); | ||
this.oauthUrl = 'https://login.manifold.co/signin/oauth/web'; | ||
this.tokenListener = function (ev) { | ||
var pumaToken = ev.data; | ||
_this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - _this.loadTime.getTime(), | ||
}); | ||
if (ev.origin === 'https://login.manifold.co') { | ||
_this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - _this.loadTime.getTime(), | ||
}); | ||
} | ||
}; | ||
@@ -27,3 +28,3 @@ this.receiveManifoldToken = createEvent(this, "receiveManifoldToken", 7); | ||
class_1.prototype.render = function () { | ||
return (h("iframe", { src: this.oauthUrl, allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", style: { | ||
return (h("iframe", { src: "https://login.manifold.co/signin/oauth/web", allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", sandbox: "allow-scripts allow-same-origin", style: { | ||
border: 'none', | ||
@@ -30,0 +31,0 @@ display: 'block', |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, c as createEvent, h } from './core-205678be.js'; | ||
import { r as registerInstance, c as createEvent, h } from './core-dfe013eb.js'; | ||
@@ -6,11 +6,12 @@ const ManifoldOauth = class { | ||
registerInstance(this, hostRef); | ||
this.oauthUrl = 'https://login.manifold.co/signin/oauth/web'; | ||
this.tokenListener = (ev) => { | ||
const pumaToken = ev.data; | ||
this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - this.loadTime.getTime(), | ||
}); | ||
if (ev.origin === 'https://login.manifold.co') { | ||
this.receiveManifoldToken.emit({ | ||
token: pumaToken.access_token, | ||
expiry: pumaToken.expiry, | ||
error: pumaToken.error, | ||
duration: new Date().getTime() - this.loadTime.getTime(), | ||
}); | ||
} | ||
}; | ||
@@ -27,3 +28,3 @@ this.receiveManifoldToken = createEvent(this, "receiveManifoldToken", 7); | ||
render() { | ||
return (h("iframe", { src: this.oauthUrl, allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", style: { | ||
return (h("iframe", { src: "https://login.manifold.co/signin/oauth/web", allowtransparency: "true", "aria-hidden": "true", frameborder: "0", id: "manifold-oauth-window", name: "manifold-oauth-window", scrolling: "no", tabindex: "-1", sandbox: "allow-scripts allow-same-origin", style: { | ||
border: 'none', | ||
@@ -30,0 +31,0 @@ display: 'block', |
@@ -5,2 +5,2 @@ /** | ||
*/ | ||
!function(){const e="undefined"!=typeof self,n=e?self:global;let t;if("undefined"!=typeof document){const e=document.querySelector("base[href]");e&&(t=e.href)}if(!t&&"undefined"!=typeof location){const e=(t=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(t=t.slice(0,e+1))}const r=/\\/g,o="undefined"!=typeof Symbol,i=o&&Symbol.toStringTag,c=o?Symbol():"@";function u(){this[c]={}}const s=u.prototype;let l;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 o=n[c][t];if(o)return o;const u=[],s=Object.create(null);i&&Object.defineProperty(s,i,{value:"Module"});let l=Promise.resolve().then(function(){return n.instantiate(t,r)}).then(function(e){if(!e)throw Error("Module "+t+" did not instantiate");const r=e[1](function(e,n){o.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<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||[]]});const f=l.then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(n.resolve(o,t)).then(function(r){const 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}let o;return t.d.forEach(function(t){{const i=e(n,t,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){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){l=[e,n]},s.getRegister=function(){const e=l;return l=void 0,e};const f=Object.freeze(Object.create(null));n.System=new u;const d=s.register;s.register=function(e,n){d.call(this,e,n)},s.instantiate=function(e,n){const 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){let i;function c(n){n.filename===e&&(i=n.error)}window.addEventListener("error",c);const 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){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 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]){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 o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];let c=-1;for(let 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=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,1 +0,1 @@ | ||
import{p as a,b as o}from"./p-33f14f9f.js";a().then(a=>o([["p-j2d3ziml",[[0,"manifold-oauth",{oauthUrl:[1,"oauth-url"]}]]]],a)); | ||
import{p,b as a}from"./p-5772770f.js";p().then(p=>a([["p-gzimwpjc",[[0,"manifold-oauth"]]]],p)); |
@@ -14,5 +14,3 @@ /* tslint:disable */ | ||
export namespace Components { | ||
interface ManifoldOauth { | ||
'oauthUrl'?: string; | ||
} | ||
interface ManifoldOauth {} | ||
} | ||
@@ -35,3 +33,2 @@ | ||
interface ManifoldOauth extends JSXBase.HTMLAttributes<HTMLManifoldOauthElement> { | ||
'oauthUrl'?: string; | ||
'onReceiveManifoldToken'?: (event: CustomEvent<AuthToken>) => void; | ||
@@ -38,0 +35,0 @@ } |
import { EventEmitter } from '../../stencil.core'; | ||
import { AuthToken } from '../../interface'; | ||
export declare class ManifoldOauth { | ||
oauthUrl?: string; | ||
receiveManifoldToken: EventEmitter<AuthToken>; | ||
@@ -6,0 +5,0 @@ private loadTime?; |
@@ -1,2 +0,4 @@ | ||
export * from './components'; | ||
// Expose library interfaces via npm | ||
// -> https://github.com/ionic-team/ionic/blob/master/core/src/interface.d.ts#L3 | ||
export * from './components'; // eslint-disable-line import/no-cycle | ||
@@ -3,0 +5,0 @@ export interface AuthError { |
@@ -34,5 +34,14 @@ { | ||
"devDependencies": { | ||
"@stencil/core": "^1.3.0", | ||
"@stencil/core": "^1.3.2", | ||
"@manifoldco/eslint-plugin-stencil": "^0.4.1", | ||
"@types/jest": "24.0.17", | ||
"@types/puppeteer": "1.19.1", | ||
"@typescript-eslint/eslint-plugin": "^2.1.0", | ||
"@typescript-eslint/parser": "^2.1.0", | ||
"eslint": "^6.3.0", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-config-prettier": "^6.2.0", | ||
"eslint-import-resolver-typescript": "^1.1.1", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"fs-extra": "^8.1.0", | ||
@@ -44,3 +53,3 @@ "jest": "24.8.0", | ||
}, | ||
"version": "0.1.6" | ||
"version": "0.1.7-rc.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 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
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
623231
17
9137