UNPKG

@esamples/mypack-1

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.13.

192 lines (184 loc) 7.58 kB
import * as i0 from '@angular/core'; import { Directive, Input, Component, NgModule } from '@angular/core'; import { AbpModule } from 'abp-ng2-module'; import * as i1 from '@angular/common'; import { CommonModule } from '@angular/common'; import { NzSelectModule } from 'ng-zorro-antd/select'; import { NzDropDownModule } from 'ng-zorro-antd/dropdown'; import { NzSpinModule } from 'ng-zorro-antd/spin'; import { NzAlertModule } from 'ng-zorro-antd/alert'; import { NzDividerModule } from 'ng-zorro-antd/divider'; /** * 分页请求必须参数 */ class PagedResultDto { } /** * 分页结果dto */ class PagedRequestDto { } class SampleComponentBaseDirective { constructor(injector) { this.injector = injector; } /** * 本地化 * @param key 本地化key * @param args 本地化参数 * @returns 本地化结果 */ l(key, ...args) { return abp.localization.localize(key, abp.localization.defaultSourceName); } /** * 权限列表验证 * @param permissions 权限名称列表 * @returns 是否拥有此权限 */ isGranted(permissions) { if (!permissions) { return true; } return abp.auth.isGranted(permissions[0]); } /** * 权限列表验证 * @param permissions 权限名称列表 * @returns 是否拥有此权限 */ isGrantedAny(...permissions) { if (!permissions) { return false; } for (const permission of permissions) { if (this.isGranted(permission)) { return true; } } return false; } } SampleComponentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SampleComponentBaseDirective, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); SampleComponentBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: SampleComponentBaseDirective, inputs: { loading: "loading" }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SampleComponentBaseDirective, decorators: [{ type: Directive }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { loading: [{ type: Input }] } }); class NoDataComponent extends SampleComponentBaseDirective { // endregion constructor(injector) { super(injector); /** * 图标 */ this.icon = 'iconfont icon-frown-o'; } ngOnInit() { if (!this.text) { this.text = this.l('NoData'); } } } NoDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NoDataComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); NoDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NoDataComponent, selector: "l-no-data", inputs: { text: "text", icon: "icon" }, usesInheritance: true, ngImport: i0, template: ` <span class="no-result-data"> <i *ngIf="icon" [class]="icon"></i> <span>{{ text }}</span> </span> `, isInline: true, styles: [".no-result-data{color:#00000040;text-align:center;line-height:64px;font-size:16px;margin:0 auto}.no-result-data i{font-size:24px;margin-right:16px;position:relative;top:3px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NoDataComponent, decorators: [{ type: Component, args: [{ selector: 'l-no-data', template: ` <span class="no-result-data"> <i *ngIf="icon" [class]="icon"></i> <span>{{ text }}</span> </span> `, styleUrls: ['./no-data.component.less'], preserveWhitespaces: false, }] }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { text: [{ type: Input }], icon: [{ type: Input }] } }); const NG_ZORRO_MODULES = [ NzSelectModule, NzDropDownModule, NzSpinModule, NzAlertModule, NzDividerModule, ]; const ENTRY_COMPONENTS = []; const ALL_COMPONENTS = [ NoDataComponent, ...ENTRY_COMPONENTS ]; /** 自定义组件模块 */ class LComponentsModule { } LComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: LComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); LComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: LComponentsModule, declarations: [NoDataComponent], imports: [CommonModule, NzSelectModule, NzDropDownModule, NzSpinModule, NzAlertModule, NzDividerModule], exports: [NoDataComponent] }); LComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: LComponentsModule, imports: [[ CommonModule, ...NG_ZORRO_MODULES ]] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: LComponentsModule, decorators: [{ type: NgModule, args: [{ imports: [ CommonModule, ...NG_ZORRO_MODULES ], declarations: [ ...ALL_COMPONENTS ], exports: [ ...ALL_COMPONENTS ], entryComponents: [ ...ENTRY_COMPONENTS ] }] }] }); const ALL_MODULES = [ AbpModule, LComponentsModule, ]; class MyPack1Module { } MyPack1Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: MyPack1Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyPack1Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: MyPack1Module, imports: [AbpModule, LComponentsModule], exports: [AbpModule, LComponentsModule] }); MyPack1Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: MyPack1Module, providers: [], imports: [[ ...ALL_MODULES, ], AbpModule, LComponentsModule] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: MyPack1Module, decorators: [{ type: NgModule, args: [{ imports: [ ...ALL_MODULES, ], declarations: [], entryComponents: [], exports: [ ...ALL_MODULES, ], providers: [], }] }] }); /** * Generated bundle index. Do not edit. */ export { LComponentsModule, MyPack1Module, NoDataComponent, PagedRequestDto, PagedResultDto, SampleComponentBaseDirective }; //# sourceMappingURL=esamples-mypack-1.js.map