import * as i0 from '@angular/core'; import { ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, Input, NgModule } from '@angular/core'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import * as i2 from 'ng-zorro-antd/core/outlet'; import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; import * as i3 from 'ng-zorro-antd/icon'; import { NzIconModule } from 'ng-zorro-antd/icon'; import * as i1 from '@angular/cdk/bidi'; /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ class NzResultNotFoundComponent { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultNotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzResultNotFoundComponent, isStandalone: true, selector: "nz-result-not-found", exportAs: ["nzResultNotFound"], ngImport: i0, template: ` `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultNotFoundComponent, decorators: [{ type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'nz-result-not-found', exportAs: 'nzResultNotFound', template: ` ` }] }] }); /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ class NzResultServerErrorComponent { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultServerErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzResultServerErrorComponent, isStandalone: true, selector: "nz-result-server-error", exportAs: ["nzResultServerError"], ngImport: i0, template: ` `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultServerErrorComponent, decorators: [{ type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'nz-result-server-error', exportAs: 'nzResultServerError', template: ` ` }] }] }); /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ class NzResultUnauthorizedComponent { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultUnauthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzResultUnauthorizedComponent, isStandalone: true, selector: "nz-result-unauthorized", exportAs: ["nzResultUnauthorized"], ngImport: i0, template: ` `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultUnauthorizedComponent, decorators: [{ type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'nz-result-unauthorized', exportAs: 'nzResultUnauthorized', template: ` ` }] }] }); /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ class NzResultTitleDirective { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzResultTitleDirective, isStandalone: true, selector: "div[nz-result-title]", host: { classAttribute: "ant-result-title" }, exportAs: ["nzResultTitle"], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultTitleDirective, decorators: [{ type: Directive, args: [{ selector: 'div[nz-result-title]', exportAs: 'nzResultTitle', host: { class: 'ant-result-title' } }] }] }); class NzResultSubtitleDirective { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzResultSubtitleDirective, isStandalone: true, selector: "div[nz-result-subtitle]", host: { classAttribute: "ant-result-subtitle" }, exportAs: ["nzResultSubtitle"], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultSubtitleDirective, decorators: [{ type: Directive, args: [{ selector: 'div[nz-result-subtitle]', exportAs: 'nzResultSubtitle', host: { class: 'ant-result-subtitle' } }] }] }); class NzResultIconDirective { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzResultIconDirective, isStandalone: true, selector: "i[nz-result-icon], div[nz-result-icon]", exportAs: ["nzResultIcon"], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultIconDirective, decorators: [{ type: Directive, args: [{ selector: 'i[nz-result-icon], div[nz-result-icon]', exportAs: 'nzResultIcon' }] }] }); class NzResultContentDirective { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzResultContentDirective, isStandalone: true, selector: "div[nz-result-content]", host: { classAttribute: "ant-result-content" }, exportAs: ["nzResultContent"], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultContentDirective, decorators: [{ type: Directive, args: [{ selector: 'div[nz-result-content]', exportAs: 'nzResultContent', host: { class: 'ant-result-content' } }] }] }); class NzResultExtraDirective { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultExtraDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzResultExtraDirective, isStandalone: true, selector: "div[nz-result-extra]", host: { classAttribute: "ant-result-extra" }, exportAs: ["nzResultExtra"], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultExtraDirective, decorators: [{ type: Directive, args: [{ selector: 'div[nz-result-extra]', exportAs: 'nzResultExtra', host: { class: 'ant-result-extra' } }] }] }); const IconMap = { success: 'check-circle', error: 'close-circle', info: 'exclamation-circle', warning: 'warning' }; const ExceptionStatus = ['404', '500', '403']; class NzResultComponent { cdr; directionality; nzIcon; nzTitle; nzStatus = 'info'; nzSubTitle; nzExtra; icon; isException = false; dir = 'ltr'; destroy$ = new Subject(); constructor(cdr, directionality) { this.cdr = cdr; this.directionality = directionality; } ngOnInit() { this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { this.dir = direction; this.cdr.detectChanges(); }); this.dir = this.directionality.value; } ngOnChanges() { this.setStatusIcon(); } ngOnDestroy() { this.destroy$.next(); this.destroy$.complete(); } setStatusIcon() { const icon = this.nzIcon; this.isException = ExceptionStatus.indexOf(this.nzStatus) !== -1; this.icon = icon ? typeof icon === 'string' ? IconMap[icon] || icon : icon : this.isException ? undefined : IconMap[this.nzStatus]; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzResultComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzResultComponent, isStandalone: true, selector: "nz-result", inputs: { nzIcon: "nzIcon", nzTitle: "nzTitle", nzStatus: "nzStatus", nzSubTitle: "nzSubTitle", nzExtra: "nzExtra" }, host: { properties: { "class.ant-result-success": "nzStatus === 'success'", "class.ant-result-error": "nzStatus === 'error'", "class.ant-result-info": "nzStatus === 'info'", "class.ant-result-warning": "nzStatus === 'warning'", "class.ant-result-rtl": "dir === 'rtl'" }, classAttribute: "ant-result" }, exportAs: ["nzResult"], usesOnChanges: true, ngImport: i0, template: `
@if (nzTitle) {