UNPKG

@usal/angular

Version:

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

90 lines (86 loc) 3.53 kB
import * as i0 from '@angular/core'; import { Injectable, Directive, Input, NgModule } from '@angular/core'; import USALLib from '@usal/angular/core'; class USALService { config(configOptions) { if (configOptions === undefined) { return USALLib.config(); } USALLib.config(configOptions); } destroy() { return USALLib.destroy(); } restart() { return USALLib.restart(); } 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 USALDirective { constructor(el) { this.el = el; this.usalValue = 'fade'; this.dataUsalValue = 'fade'; } ngOnInit() { this.updateAttribute(); } ngOnChanges() { this.updateAttribute(); } updateAttribute() { const value = this.usalValue || this.dataUsalValue || 'fade'; this.el.nativeElement.setAttribute('data-usal', value); } static { this.ɵfac = function USALDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || USALDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); }; } static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: USALDirective, selectors: [["", "usal", ""], ["", "data-usal", ""]], inputs: { usalValue: [0, "usal", "usalValue"], dataUsalValue: [0, "data-usal", "dataUsalValue"] }, standalone: false, features: [i0.ɵɵNgOnChangesFeature] }); } } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(USALDirective, [{ type: Directive, args: [{ selector: '[usal], [data-usal]', standalone: false, }] }], () => [{ type: i0.ElementRef }], { usalValue: [{ type: Input, args: ['usal'] }], dataUsalValue: [{ type: Input, args: ['data-usal'] }] }); })(); 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: [{ declarations: [USALDirective], exports: [USALDirective], providers: [USALService], }] }], null, null); })(); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(USALModule, { declarations: [USALDirective], exports: [USALDirective] }); })(); const useUSAL = () => ({ config: (configOptions) => { if (configOptions === undefined) { return USALLib.config(); } USALLib.config(configOptions); }, destroy: () => USALLib.destroy(), restart: () => USALLib.restart(), }); /** * Generated bundle index. Do not edit. */ export { USALDirective, USALModule, USALService, useUSAL }; //# sourceMappingURL=usal-monorepo.mjs.map