makersmob-ui-component
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -9,3 +9,3 @@ 'use strict'; | ||
return __chunk_1.patchEsm().then(() => { | ||
__chunk_1.bootstrapLazy([["makersmob-signup.cjs",[[1,"makersmob-signup",{"cta":[1],"apiKey":[1,"api-key"],"endpoint":[1],"textColor":[1,"text-color"],"successMsg":[1,"success-msg"],"errors":[32],"name":[32],"email":[32],"loading":[32],"success":[32],"referral":[32]}]]]], options); | ||
__chunk_1.bootstrapLazy([["makersmob-signup.cjs",[[1,"makersmob-signup",{"cta":[1],"apiKey":[1,"api-key"],"endpoint":[1],"redirectUrl":[1,"redirect-url"],"textColor":[1,"text-color"],"successMsg":[1,"success-msg"],"errors":[32],"name":[32],"email":[32],"loading":[32],"success":[32],"referral":[32]}]]]], options); | ||
}); | ||
@@ -12,0 +12,0 @@ }; |
@@ -459,5 +459,13 @@ 'use strict'; | ||
} | ||
redirectTo() { | ||
if (this.redirectUrl) { | ||
window.location.replace(this.redirectUrl); | ||
} | ||
else { | ||
return this.renderSuccess(); | ||
} | ||
} | ||
render() { | ||
if (this.success) { | ||
return this.renderSuccess(); | ||
return this.redirectTo(); | ||
} | ||
@@ -464,0 +472,0 @@ const errors = !!this.errors.length && |
@@ -6,3 +6,3 @@ 'use strict'; | ||
__chunk_1.patchBrowser().then(resourcesUrl => { | ||
return __chunk_1.bootstrapLazy([["makersmob-signup.cjs",[[1,"makersmob-signup",{"cta":[1],"apiKey":[1,"api-key"],"endpoint":[1],"textColor":[1,"text-color"],"successMsg":[1,"success-msg"],"errors":[32],"name":[32],"email":[32],"loading":[32],"success":[32],"referral":[32]}]]]], { resourcesUrl }); | ||
return __chunk_1.bootstrapLazy([["makersmob-signup.cjs",[[1,"makersmob-signup",{"cta":[1],"apiKey":[1,"api-key"],"endpoint":[1],"redirectUrl":[1,"redirect-url"],"textColor":[1,"text-color"],"successMsg":[1,"success-msg"],"errors":[32],"name":[32],"email":[32],"loading":[32],"success":[32],"referral":[32]}]]]], { resourcesUrl }); | ||
}); |
@@ -69,5 +69,13 @@ import { h } from '@stencil/core'; | ||
} | ||
redirectTo() { | ||
if (this.redirectUrl) { | ||
window.location.replace(this.redirectUrl); | ||
} | ||
else { | ||
return this.renderSuccess(); | ||
} | ||
} | ||
render() { | ||
if (this.success) { | ||
return this.renderSuccess(); | ||
return this.redirectTo(); | ||
} | ||
@@ -150,2 +158,19 @@ const errors = !!this.errors.length && | ||
}, | ||
"redirectUrl": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "redirect-url", | ||
"reflect": false | ||
}, | ||
"textColor": { | ||
@@ -152,0 +177,0 @@ "type": "string", |
@@ -374,6 +374,14 @@ import { d as registerInstance, e as h } from './makersmob-97846f82.js'; | ||
}; | ||
MakersmobSignup.prototype.redirectTo = function () { | ||
if (this.redirectUrl) { | ||
window.location.replace(this.redirectUrl); | ||
} | ||
else { | ||
return this.renderSuccess(); | ||
} | ||
}; | ||
MakersmobSignup.prototype.render = function () { | ||
var _this = this; | ||
if (this.success) { | ||
return this.renderSuccess(); | ||
return this.redirectTo(); | ||
} | ||
@@ -380,0 +388,0 @@ var errors = !!this.errors.length && |
@@ -455,5 +455,13 @@ import { d as registerInstance, e as h } from './makersmob-97846f82.js'; | ||
} | ||
redirectTo() { | ||
if (this.redirectUrl) { | ||
window.location.replace(this.redirectUrl); | ||
} | ||
else { | ||
return this.renderSuccess(); | ||
} | ||
} | ||
render() { | ||
if (this.success) { | ||
return this.renderSuccess(); | ||
return this.redirectTo(); | ||
} | ||
@@ -460,0 +468,0 @@ const errors = !!this.errors.length && |
@@ -1,1 +0,1 @@ | ||
import{a as s,b as e}from"./p-94dbe116.js";s().then(s=>e([["p-hd73j1u3",[[1,"makersmob-signup",{cta:[1],apiKey:[1,"api-key"],endpoint:[1],textColor:[1,"text-color"],successMsg:[1,"success-msg"],errors:[32],name:[32],email:[32],loading:[32],success:[32],referral:[32]}]]]],{resourcesUrl:s})); | ||
import{a as e,b as r}from"./p-94dbe116.js";e().then(e=>r([["p-adsxpcwc",[[1,"makersmob-signup",{cta:[1],apiKey:[1,"api-key"],endpoint:[1],redirectUrl:[1,"redirect-url"],textColor:[1,"text-color"],successMsg:[1,"success-msg"],errors:[32],name:[32],email:[32],loading:[32],success:[32],referral:[32]}]]]],{resourcesUrl:e})); |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-44d6dc2a.system.js"],function(){"use strict";var e,s;return{setters:[function(r){e=r.a,s=r.b}],execute:function(){e().then(function(e){return s([["p-o5ugjdnr.system",[[1,"makersmob-signup",{cta:[1],apiKey:[1,"api-key"],endpoint:[1],textColor:[1,"text-color"],successMsg:[1,"success-msg"],errors:[32],name:[32],email:[32],loading:[32],success:[32],referral:[32]}]]]],{resourcesUrl:e})})}}}); | ||
System.register(["./p-44d6dc2a.system.js"],function(){"use strict";var e,r;return{setters:[function(s){e=s.a,r=s.b}],execute:function(){e().then(function(e){return r([["p-cryifzay.system",[[1,"makersmob-signup",{cta:[1],apiKey:[1,"api-key"],endpoint:[1],redirectUrl:[1,"redirect-url"],textColor:[1,"text-color"],successMsg:[1,"success-msg"],errors:[32],name:[32],email:[32],loading:[32],success:[32],referral:[32]}]]]],{resourcesUrl:e})})}}}); |
@@ -16,2 +16,3 @@ /* tslint:disable */ | ||
'endpoint': string; | ||
'redirectUrl': string; | ||
'successMsg': string; | ||
@@ -27,2 +28,3 @@ 'textColor': string; | ||
'endpoint'?: string; | ||
'redirectUrl'?: string; | ||
'successMsg'?: string; | ||
@@ -29,0 +31,0 @@ 'textColor'?: string; |
@@ -5,2 +5,3 @@ export declare class MakersmobSignup { | ||
endpoint: string; | ||
redirectUrl: string; | ||
textColor: string; | ||
@@ -19,3 +20,4 @@ successMsg: string; | ||
renderSuccess(): any; | ||
redirectTo(): any; | ||
render(): any; | ||
} |
{ | ||
"name": "makersmob-ui-component", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "MakersMob UI Components", | ||
@@ -19,3 +19,4 @@ "main": "dist/index.js", | ||
"test": "stencil test --spec --e2e", | ||
"test.watch": "stencil test --spec --e2e --watchAll" | ||
"test.watch": "stencil test --spec --e2e --watchAll", | ||
"publish": "npm run build && npm publish" | ||
}, | ||
@@ -22,0 +23,0 @@ "devDependencies": { |
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
660749
11926