UNPKG

@usal/angular

Version:

Ultimate Scroll Animation Library - Lightweight, powerful, wonderfully simple ✨ | Angular Package

76 lines (72 loc) 3.23 kB
import { isPlatformBrowser } from '@angular/common'; import * as i0 from '@angular/core'; import { PLATFORM_ID, Directive, Inject, Input, Injectable, NgModule } from '@angular/core'; import USALLib from '@usal/angular/core'; class USALDirective { constructor(el, renderer, platformId) { this.el = el; this.renderer = renderer; this.platformId = platformId; this.usal = 'fade'; } ngOnInit() { if (isPlatformBrowser(this.platformId)) { this.renderer.setAttribute(this.el.nativeElement, 'data-usal', this.usal || 'fade'); } } static { this.ɵfac = function USALDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || USALDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(PLATFORM_ID)); }; } static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: USALDirective, selectors: [["", "usal", ""], ["", "data-usal", ""]], inputs: { usal: "usal" } }); } } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(USALDirective, [{ type: Directive, args: [{ selector: '[usal], [data-usal]', standalone: true, }] }], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID] }] }], { usal: [{ type: Input }] }); })(); class USALService { config(newConfig) { if (newConfig) return USALLib.config(newConfig); return USALLib.config(); } destroy() { return USALLib.destroy(); } restart() { return USALLib.restart(); } initialized() { return USALLib.initialized(); } static { this.ɵfac = function USALService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || USALService)(); }; } static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: USALService, factory: USALService.ɵfac, providedIn: 'root' }); } } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(USALService, [{ type: Injectable, args: [{ providedIn: 'root' }] }], null, null); })(); class USALModule { static { this.ɵfac = function USALModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || USALModule)(); }; } static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: USALModule }); } static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [USALService] }); } } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(USALModule, [{ type: NgModule, args: [{ imports: [USALDirective], exports: [USALDirective], providers: [USALService], }] }], null, null); })(); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(USALModule, { imports: [USALDirective], exports: [USALDirective] }); })(); /** * Generated bundle index. Do not edit. */ export { USALDirective, USALModule, USALService }; //# sourceMappingURL=usal.mjs.map