@saasbase-io/core-elements 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ import { LitElement } from '../../../../node_modules/lit';
2
+ import { Style } from '../../../types';
3
+ import { SaasBaseLayout } from '../..';
4
+ export declare class SbCountdown extends LitElement {
5
+ content: string;
6
+ duration: number;
7
+ redirectUrl: string;
8
+ id: string;
9
+ sbStyle: Style;
10
+ className: string;
11
+ component: SaasBaseLayout;
12
+ private seconds;
13
+ private timerId;
14
+ protected createRenderRoot(): this;
15
+ connectedCallback(): void;
16
+ disconnectedCallback(): void;
17
+ private initializeCountdown;
18
+ private startTimer;
19
+ private completeCountdown;
20
+ private clearTimer;
21
+ private renderContent;
22
+ render(): import('../../../../node_modules/lit-html').TemplateResult<1>;
23
+ }
package/dist/index.js CHANGED
@@ -6659,7 +6659,7 @@ body {
6659
6659
  class=${t}
6660
6660
  style=${k({...i,...s})}
6661
6661
  ></div>
6662
- `}};hr([l()],exports.SbGap.prototype,"size",2);hr([l()],exports.SbGap.prototype,"type",2);hr([l()],exports.SbGap.prototype,"id",2);hr([l({type:Object})],exports.SbGap.prototype,"sbStyle",2);hr([l({type:String})],exports.SbGap.prototype,"className",2);hr([l({attribute:!1})],exports.SbGap.prototype,"component",2);exports.SbGap=hr([h("sb-gap")],exports.SbGap);var Lg=Object.defineProperty,Pg=Object.getOwnPropertyDescriptor,Ee=(e,t,r,i)=>{for(var o=i>1?void 0:i?Pg(t,r):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Lg(t,r,o),o};exports.SaasBaseLayout=class extends y{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.formData={},this.errors={},this._prevErrors={},this.loadingButtons={},this.eventEmitting=!1,this.theme=this.getTheme(),this.prevHeight=0,this.resizeRAF=null,this.isAnimating=!1}createRenderRoot(){return this}getTheme(){return document.documentElement.getAttribute("data-theme")}firstUpdated(t){this.hydrateSbComponents()}updated(t){this.hydrateSbComponents(),t.has("renderSpec")&&this.renderSpec&&(this.formData=this.collectDataKeys(this.renderSpec.root_container)),JSON.stringify(this._prevErrors)!==JSON.stringify(this.errors)&&Promise.resolve().then(()=>this.animateHeight()),this._prevErrors={...this.errors}}hydrateSbComponents(){const t=this.renderRoot;if(!t)return;t.querySelectorAll("sb-otp, sb-logo, sb-title").forEach(i=>{const o=i;o.__hydrated||(o.component=this,o.__hydrated=!0)})}_findSubmitButton(t){const r=i=>{if(i.element_type==="button"&&i.properties.submit===!0)return i;if(i.element_type==="container")for(const o of i.properties.children){const s=r(o);if(s)return s}return null};return r(t)}_wrapSubmitButtons(t){return t}render(){var s,n,u;const{class:t,style:r}=R("",{},(u=(n=(s=this.customizations)==null?void 0:s.byType)==null?void 0:n.loader)==null?void 0:u.linear,"",this.customizations);if(!this.renderSpec)return c`<linear-loader
6662
+ `}};hr([l()],exports.SbGap.prototype,"size",2);hr([l()],exports.SbGap.prototype,"type",2);hr([l()],exports.SbGap.prototype,"id",2);hr([l({type:Object})],exports.SbGap.prototype,"sbStyle",2);hr([l({type:String})],exports.SbGap.prototype,"className",2);hr([l({attribute:!1})],exports.SbGap.prototype,"component",2);exports.SbGap=hr([h("sb-gap")],exports.SbGap);var Lg=Object.defineProperty,Pg=Object.getOwnPropertyDescriptor,Ee=(e,t,r,i)=>{for(var o=i>1?void 0:i?Pg(t,r):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Lg(t,r,o),o};exports.SaasBaseLayout=class extends y{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.formData={},this.errors={},this._prevErrors={},this.loadingButtons={},this.eventEmitting=!1,this.theme=this.getTheme(),this.prevHeight=0,this.resizeRAF=null,this.isAnimating=!1}createRenderRoot(){return this}getTheme(){return document.documentElement.getAttribute("data-theme")}firstUpdated(t){this.hydrateSbComponents()}updated(t){this.hydrateSbComponents(),t.has("renderSpec")&&this.renderSpec&&(this.formData=this.collectDataKeys(this.renderSpec.root_container)),JSON.stringify(this._prevErrors)!==JSON.stringify(this.errors)&&Promise.resolve().then(()=>this.animateHeight()),this._prevErrors={...this.errors}}hydrateSbComponents(){const t=this.renderRoot;if(!t)return;t.querySelectorAll("sb-otp, sb-logo, sb-title, sb-subtitle, sb-header, sb-gap, sb-countdown").forEach(i=>{const o=i;o.__hydrated||(o.component=this,o.__hydrated=!0)})}_findSubmitButton(t){const r=i=>{if(i.element_type==="button"&&i.properties.submit===!0)return i;if(i.element_type==="container")for(const o of i.properties.children){const s=r(o);if(s)return s}return null};return r(t)}_wrapSubmitButtons(t){return t}render(){var s,n,u;const{class:t,style:r}=R("",{},(u=(n=(s=this.customizations)==null?void 0:s.byType)==null?void 0:n.loader)==null?void 0:u.linear,"",this.customizations);if(!this.renderSpec)return c`<linear-loader
6663
6663
  class="sb-fixed sb-w-full sb-top-0 sb-left-0"
6664
6664
  customClass=${t}
6665
6665
  .customStyle=${r}