@obliczeniowo/elementary
Version:
Library made in Angular version 20
82 lines (77 loc) • 4.82 kB
JavaScript
import * as i0 from '@angular/core';
import { HostListener, Input, Component, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { trigger, state, transition, style, animate } from '@angular/animations';
class SlideViewComponent {
toggle = false;
touched(event) {
event.preventDefault();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SlideViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: SlideViewComponent, isStandalone: false, selector: "obl-slide-view", inputs: { toggle: "toggle" }, host: { listeners: { "touch": "touched(event)" } }, ngImport: i0, template: "<section>\n <div class=\"primary-view\" [@listToEdit]=\"toggle ? 'list' : 'edit'\">\n <ng-content\n select=\"primary\"\n ></ng-content>\n </div>\n <div class=\"secondary-view\" [@listToEdit]=\"toggle ? 'list' : 'edit'\">\n <ng-content\n select=\"secondary\"\n ></ng-content>\n </div>\n</section>\n", styles: ["section{display:flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;margin:0 20px;min-height:calc(100% - 125px)}.primary-view{min-width:100%;margin-right:0}.secondary-view{min-width:100%;margin:0}\n"], animations: [
trigger('listToEdit', [
state('list', style({
transform: 'translate(-100%, 0)',
marginLeft: '0'
})),
state('edit', style({
transform: 'translate(0, 0)'
})),
transition('list => edit', [
animate('0.5s')
]),
transition('edit => list', [
animate('0.5s')
]),
]),
] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SlideViewComponent, decorators: [{
type: Component,
args: [{ selector: 'obl-slide-view', animations: [
trigger('listToEdit', [
state('list', style({
transform: 'translate(-100%, 0)',
marginLeft: '0'
})),
state('edit', style({
transform: 'translate(0, 0)'
})),
transition('list => edit', [
animate('0.5s')
]),
transition('edit => list', [
animate('0.5s')
]),
]),
], standalone: false, template: "<section>\n <div class=\"primary-view\" [@listToEdit]=\"toggle ? 'list' : 'edit'\">\n <ng-content\n select=\"primary\"\n ></ng-content>\n </div>\n <div class=\"secondary-view\" [@listToEdit]=\"toggle ? 'list' : 'edit'\">\n <ng-content\n select=\"secondary\"\n ></ng-content>\n </div>\n</section>\n", styles: ["section{display:flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;margin:0 20px;min-height:calc(100% - 125px)}.primary-view{min-width:100%;margin-right:0}.secondary-view{min-width:100%;margin:0}\n"] }]
}], propDecorators: { toggle: [{
type: Input
}], touched: [{
type: HostListener,
args: ['touch', ['event']]
}] } });
class SlideViewModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SlideViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: SlideViewModule, declarations: [SlideViewComponent], imports: [CommonModule], exports: [SlideViewComponent] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SlideViewModule, imports: [CommonModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SlideViewModule, decorators: [{
type: NgModule,
args: [{
declarations: [
SlideViewComponent
],
imports: [
CommonModule
],
exports: [
SlideViewComponent
]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { SlideViewComponent, SlideViewModule };
//# sourceMappingURL=obliczeniowo-elementary-slide-view.mjs.map