@delon/abc 21.1.0 → 21.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/auto-focus.mjs +7 -7
- package/fesm2022/auto-focus.mjs.map +1 -1
- package/fesm2022/cell.mjs +13 -13
- package/fesm2022/cell.mjs.map +1 -1
- package/fesm2022/chart-observer-size.mjs +10 -10
- package/fesm2022/chart-observer-size.mjs.map +1 -1
- package/fesm2022/count-down.mjs +7 -7
- package/fesm2022/count-down.mjs.map +1 -1
- package/fesm2022/date-picker.mjs +10 -10
- package/fesm2022/date-picker.mjs.map +1 -1
- package/fesm2022/down-file.mjs +7 -7
- package/fesm2022/down-file.mjs.map +1 -1
- package/fesm2022/ellipsis.mjs +7 -7
- package/fesm2022/ellipsis.mjs.map +1 -1
- package/fesm2022/error-collect.mjs +7 -7
- package/fesm2022/error-collect.mjs.map +1 -1
- package/fesm2022/exception.mjs +7 -7
- package/fesm2022/exception.mjs.map +1 -1
- package/fesm2022/footer-toolbar.mjs +7 -7
- package/fesm2022/footer-toolbar.mjs.map +1 -1
- package/fesm2022/full-content.mjs +13 -13
- package/fesm2022/full-content.mjs.map +1 -1
- package/fesm2022/global-footer.mjs +10 -10
- package/fesm2022/global-footer.mjs.map +1 -1
- package/fesm2022/hotkey.mjs +7 -7
- package/fesm2022/hotkey.mjs.map +1 -1
- package/fesm2022/loading.mjs +10 -10
- package/fesm2022/loading.mjs.map +1 -1
- package/fesm2022/lodop.mjs +7 -7
- package/fesm2022/lodop.mjs.map +1 -1
- package/fesm2022/media.mjs +10 -10
- package/fesm2022/media.mjs.map +1 -1
- package/fesm2022/notice-icon.mjs +10 -10
- package/fesm2022/notice-icon.mjs.map +1 -1
- package/fesm2022/onboarding.mjs +10 -10
- package/fesm2022/onboarding.mjs.map +1 -1
- package/fesm2022/page-header.mjs +7 -7
- package/fesm2022/page-header.mjs.map +1 -1
- package/fesm2022/pdf.mjs +7 -7
- package/fesm2022/pdf.mjs.map +1 -1
- package/fesm2022/quick-menu.mjs +7 -7
- package/fesm2022/quick-menu.mjs.map +1 -1
- package/fesm2022/reuse-tab.mjs +22 -22
- package/fesm2022/reuse-tab.mjs.map +1 -1
- package/fesm2022/se.mjs +13 -13
- package/fesm2022/se.mjs.map +1 -1
- package/fesm2022/sg.mjs +10 -10
- package/fesm2022/sg.mjs.map +1 -1
- package/fesm2022/st.mjs +34 -34
- package/fesm2022/st.mjs.map +1 -1
- package/fesm2022/sv.mjs +16 -16
- package/fesm2022/sv.mjs.map +1 -1
- package/fesm2022/tag-select.mjs +7 -7
- package/fesm2022/tag-select.mjs.map +1 -1
- package/fesm2022/xlsx.mjs +10 -10
- package/fesm2022/xlsx.mjs.map +1 -1
- package/fesm2022/zip.mjs +3 -3
- package/fesm2022/zip.mjs.map +1 -1
- package/package.json +6 -6
package/fesm2022/down-file.mjs
CHANGED
|
@@ -83,10 +83,10 @@ class DownFileDirective {
|
|
|
83
83
|
error: err => this.error.emit(err)
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
87
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DownFileDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
87
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DownFileDirective, isStandalone: true, selector: "[down-file]", inputs: { httpData: { classPropertyName: "httpData", publicName: "http-data", isSignal: true, isRequired: false, transformFunction: null }, httpBody: { classPropertyName: "httpBody", publicName: "http-body", isSignal: true, isRequired: false, transformFunction: null }, httpMethod: { classPropertyName: "httpMethod", publicName: "http-method", isSignal: true, isRequired: false, transformFunction: null }, httpUrl: { classPropertyName: "httpUrl", publicName: "http-url", isSignal: true, isRequired: true, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "file-name", isSignal: true, isRequired: false, transformFunction: null }, pre: { classPropertyName: "pre", publicName: "pre", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { success: "success", error: "error" }, host: { listeners: { "click": "_click($event)" } }, exportAs: ["downFile"], ngImport: i0 });
|
|
88
88
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DownFileDirective, decorators: [{
|
|
90
90
|
type: Directive,
|
|
91
91
|
args: [{
|
|
92
92
|
selector: '[down-file]',
|
|
@@ -99,11 +99,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
99
99
|
|
|
100
100
|
const DIRECTIVES = [DownFileDirective];
|
|
101
101
|
class DownFileModule {
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
103
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
104
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DownFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
103
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DownFileModule, imports: [CommonModule, AlainThemeModule, DownFileDirective], exports: [DownFileDirective] });
|
|
104
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DownFileModule, imports: [CommonModule, AlainThemeModule] });
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DownFileModule, decorators: [{
|
|
107
107
|
type: NgModule,
|
|
108
108
|
args: [{
|
|
109
109
|
imports: [CommonModule, AlainThemeModule, ...DIRECTIVES],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"down-file.mjs","sources":["../../../../packages/abc/down-file/down-file.directive.ts","../../../../packages/abc/down-file/down-file.module.ts","../../../../packages/abc/down-file/down-file.ts"],"sourcesContent":["import { HttpResponse } from '@angular/common/http';\nimport { Directive, ElementRef, inject, input, output } from '@angular/core';\nimport { finalize } from 'rxjs';\n\nimport { saveAs } from 'file-saver';\n\nimport { _HttpClient } from '@delon/theme';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[down-file]',\n exportAs: 'downFile',\n host: {\n '(click)': '_click($event)'\n }\n})\nexport class DownFileDirective {\n private readonly el: HTMLButtonElement = inject(ElementRef).nativeElement;\n private readonly _http = inject(_HttpClient);\n readonly httpData = input<NzSafeAny>(undefined, { alias: 'http-data' });\n readonly httpBody = input<NzSafeAny>(undefined, { alias: 'http-body' });\n readonly httpMethod = input<string>('get', { alias: 'http-method' });\n readonly httpUrl = input.required<string>({ alias: 'http-url' });\n readonly fileName = input<string | ((rep: HttpResponse<Blob>) => string)>(undefined, { alias: 'file-name' });\n readonly pre = input<(ev: MouseEvent) => Promise<boolean>>();\n\n readonly success = output<HttpResponse<Blob>>();\n readonly error = output<NzSafeAny>();\n\n private getDisposition(data: string | null): NzSafeAny {\n const arr: Array<Record<string, string>> = (data ?? '')\n .split(';')\n .filter(i => i.includes('='))\n .map(v => {\n const strArr = v.split('=');\n const utfId = `UTF-8''`;\n let value = strArr[1];\n if (value.startsWith(utfId)) value = value.substring(utfId.length);\n return { [strArr[0].trim()]: value };\n });\n return arr.reduce((_o, item) => item, {});\n }\n private isFileSaverSupported = false;\n\n constructor() {\n try {\n this.isFileSaverSupported = !!new Blob();\n } catch {}\n if (!this.isFileSaverSupported) {\n this.el.classList.add(`down-file__not-support`);\n }\n }\n\n private setDisabled(status: boolean): void {\n const el = this.el;\n el.disabled = status;\n el.classList[status ? 'add' : 'remove'](`down-file__disabled`);\n }\n\n protected async _click(ev: MouseEvent): Promise<void> {\n const pre = this.pre();\n if (!this.isFileSaverSupported || (typeof pre === 'function' && !(await pre(ev)))) {\n ev.stopPropagation();\n ev.preventDefault();\n return;\n }\n this.setDisabled(true);\n this._http\n .request(this.httpMethod(), this.httpUrl(), {\n params: this.httpData() ?? {},\n responseType: 'blob',\n observe: 'response',\n body: this.httpBody()\n })\n .pipe(finalize(() => this.setDisabled(false)))\n .subscribe({\n next: (res: HttpResponse<Blob>) => {\n if (res.status !== 200 || res.body!.size <= 0) {\n this.error.emit(res);\n return;\n }\n const disposition = this.getDisposition(res.headers.get('content-disposition'));\n let fileName = this.fileName();\n if (typeof fileName === 'function') fileName = fileName(res);\n fileName =\n fileName ||\n disposition[`filename*`] ||\n disposition[`filename`] ||\n res.headers.get('filename') ||\n res.headers.get('x-filename');\n saveAs(res.body!, decodeURI(fileName as string));\n this.success.emit(res);\n },\n error: err => this.error.emit(err)\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AlainThemeModule } from '@delon/theme';\n\nimport { DownFileDirective } from './down-file.directive';\n\nconst DIRECTIVES = [DownFileDirective];\n\n@NgModule({\n imports: [CommonModule, AlainThemeModule, ...DIRECTIVES],\n exports: DIRECTIVES\n})\nexport class DownFileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAgBa,iBAAiB,CAAA;AACX,IAAA,EAAE,GAAsB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;AACxD,IAAA,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;IACnC,QAAQ,GAAG,KAAK,CAAY,SAAS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CAAC,CAAC;AAC5C,aAAA,SAAS,CAAC;AACT,YAAA,IAAI,EAAE,CAAC,GAAuB,KAAI;AAChC,gBAAA,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,IAAK,CAAC,IAAI,IAAI,CAAC,EAAE;AAC7C,oBAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;oBACpB;gBACF;AACA,gBAAA,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAC/E,gBAAA,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;gBAC9B,IAAI,OAAO,QAAQ,KAAK,UAAU;AAAE,oBAAA,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;gBAC5D,QAAQ;oBACN,QAAQ;wBACR,WAAW,CAAC,WAAW,CAAC;wBACxB,WAAW,CAAC,UAAU,CAAC;AACvB,wBAAA,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AAC3B,wBAAA,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;gBAC/B,MAAM,CAAC,GAAG,CAAC,IAAK,EAAE,SAAS,CAAC,QAAkB,CAAC,CAAC;AAChD,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;YACxB,CAAC;AACD,YAAA,KAAK,EAAE,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG;AAClC,SAAA,CAAC;IACN;
|
|
1
|
+
{"version":3,"file":"down-file.mjs","sources":["../../../../packages/abc/down-file/down-file.directive.ts","../../../../packages/abc/down-file/down-file.module.ts","../../../../packages/abc/down-file/down-file.ts"],"sourcesContent":["import { HttpResponse } from '@angular/common/http';\nimport { Directive, ElementRef, inject, input, output } from '@angular/core';\nimport { finalize } from 'rxjs';\n\nimport { saveAs } from 'file-saver';\n\nimport { _HttpClient } from '@delon/theme';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[down-file]',\n exportAs: 'downFile',\n host: {\n '(click)': '_click($event)'\n }\n})\nexport class DownFileDirective {\n private readonly el: HTMLButtonElement = inject(ElementRef).nativeElement;\n private readonly _http = inject(_HttpClient);\n readonly httpData = input<NzSafeAny>(undefined, { alias: 'http-data' });\n readonly httpBody = input<NzSafeAny>(undefined, { alias: 'http-body' });\n readonly httpMethod = input<string>('get', { alias: 'http-method' });\n readonly httpUrl = input.required<string>({ alias: 'http-url' });\n readonly fileName = input<string | ((rep: HttpResponse<Blob>) => string)>(undefined, { alias: 'file-name' });\n readonly pre = input<(ev: MouseEvent) => Promise<boolean>>();\n\n readonly success = output<HttpResponse<Blob>>();\n readonly error = output<NzSafeAny>();\n\n private getDisposition(data: string | null): NzSafeAny {\n const arr: Array<Record<string, string>> = (data ?? '')\n .split(';')\n .filter(i => i.includes('='))\n .map(v => {\n const strArr = v.split('=');\n const utfId = `UTF-8''`;\n let value = strArr[1];\n if (value.startsWith(utfId)) value = value.substring(utfId.length);\n return { [strArr[0].trim()]: value };\n });\n return arr.reduce((_o, item) => item, {});\n }\n private isFileSaverSupported = false;\n\n constructor() {\n try {\n this.isFileSaverSupported = !!new Blob();\n } catch {}\n if (!this.isFileSaverSupported) {\n this.el.classList.add(`down-file__not-support`);\n }\n }\n\n private setDisabled(status: boolean): void {\n const el = this.el;\n el.disabled = status;\n el.classList[status ? 'add' : 'remove'](`down-file__disabled`);\n }\n\n protected async _click(ev: MouseEvent): Promise<void> {\n const pre = this.pre();\n if (!this.isFileSaverSupported || (typeof pre === 'function' && !(await pre(ev)))) {\n ev.stopPropagation();\n ev.preventDefault();\n return;\n }\n this.setDisabled(true);\n this._http\n .request(this.httpMethod(), this.httpUrl(), {\n params: this.httpData() ?? {},\n responseType: 'blob',\n observe: 'response',\n body: this.httpBody()\n })\n .pipe(finalize(() => this.setDisabled(false)))\n .subscribe({\n next: (res: HttpResponse<Blob>) => {\n if (res.status !== 200 || res.body!.size <= 0) {\n this.error.emit(res);\n return;\n }\n const disposition = this.getDisposition(res.headers.get('content-disposition'));\n let fileName = this.fileName();\n if (typeof fileName === 'function') fileName = fileName(res);\n fileName =\n fileName ||\n disposition[`filename*`] ||\n disposition[`filename`] ||\n res.headers.get('filename') ||\n res.headers.get('x-filename');\n saveAs(res.body!, decodeURI(fileName as string));\n this.success.emit(res);\n },\n error: err => this.error.emit(err)\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AlainThemeModule } from '@delon/theme';\n\nimport { DownFileDirective } from './down-file.directive';\n\nconst DIRECTIVES = [DownFileDirective];\n\n@NgModule({\n imports: [CommonModule, AlainThemeModule, ...DIRECTIVES],\n exports: DIRECTIVES\n})\nexport class DownFileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAgBa,iBAAiB,CAAA;AACX,IAAA,EAAE,GAAsB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;AACxD,IAAA,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;IACnC,QAAQ,GAAG,KAAK,CAAY,SAAS,gFAAI,KAAK,EAAE,WAAW,EAAA,CAAG;IAC9D,QAAQ,GAAG,KAAK,CAAY,SAAS,gFAAI,KAAK,EAAE,WAAW,EAAA,CAAG;IAC9D,UAAU,GAAG,KAAK,CAAS,KAAK,kFAAI,KAAK,EAAE,aAAa,EAAA,CAAG;IAC3D,OAAO,GAAG,KAAK,CAAC,QAAQ,8EAAW,KAAK,EAAE,UAAU,EAAA,CAAG;IACvD,QAAQ,GAAG,KAAK,CAAiD,SAAS,gFAAI,KAAK,EAAE,WAAW,EAAA,CAAG;IACnG,GAAG,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,KAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAwC;I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AAgB,CAAA,EAAA,CAAA;;4FAG7B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC;AACxD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/fesm2022/ellipsis.mjs
CHANGED
|
@@ -178,8 +178,8 @@ class EllipsisComponent {
|
|
|
178
178
|
});
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
182
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EllipsisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: EllipsisComponent, isStandalone: true, selector: "ellipsis", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, lines: { classPropertyName: "lines", publicName: "lines", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRecognition: { classPropertyName: "fullWidthRecognition", publicName: "fullWidthRecognition", isSignal: true, isRequired: false, transformFunction: null }, tail: { classPropertyName: "tail", publicName: "tail", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "orgEl", first: true, predicate: ["orgEl"], descendants: true, isSignal: true }, { propertyName: "shadowOrgEl", first: true, predicate: ["shadowOrgEl"], descendants: true, isSignal: true }, { propertyName: "shadowTextEl", first: true, predicate: ["shadowTextEl"], descendants: true, isSignal: true }], exportAs: ["ellipsis"], ngImport: i0, template: `
|
|
183
183
|
<div (cdkObserveContent)="refresh()" #orgEl style="display: none"><ng-content /></div>
|
|
184
184
|
<ng-template #tooltipTpl let-con>
|
|
185
185
|
@if (tooltip()) {
|
|
@@ -225,7 +225,7 @@ class EllipsisComponent {
|
|
|
225
225
|
}
|
|
226
226
|
`, isInline: true, dependencies: [{ kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { kind: "directive", type: NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
227
227
|
}
|
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EllipsisComponent, decorators: [{
|
|
229
229
|
type: Component,
|
|
230
230
|
args: [{
|
|
231
231
|
selector: 'ellipsis',
|
|
@@ -283,11 +283,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
283
283
|
|
|
284
284
|
const COMPONENTS = [EllipsisComponent];
|
|
285
285
|
class EllipsisModule {
|
|
286
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
287
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
288
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
287
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: EllipsisModule, imports: [CommonModule, ObserversModule, NzTooltipModule, EllipsisComponent], exports: [EllipsisComponent] });
|
|
288
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EllipsisModule, imports: [CommonModule, ObserversModule, NzTooltipModule] });
|
|
289
289
|
}
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EllipsisModule, decorators: [{
|
|
291
291
|
type: NgModule,
|
|
292
292
|
args: [{
|
|
293
293
|
imports: [CommonModule, ObserversModule, NzTooltipModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis.mjs","sources":["../../../../packages/abc/ellipsis/ellipsis.component.ts","../../../../packages/abc/ellipsis/ellipsis.module.ts","../../../../packages/abc/ellipsis/ellipsis.ts"],"sourcesContent":["import { CdkObserveContent } from '@angular/cdk/observers';\nimport { DOCUMENT, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n effect,\n inject,\n input,\n numberAttribute,\n runInInjectionContext,\n signal,\n viewChild\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzTooltipDirective } from 'ng-zorro-antd/tooltip';\n\n@Component({\n selector: 'ellipsis',\n exportAs: 'ellipsis',\n template: `\n <div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content /></div>\n <ng-template #tooltipTpl let-con>\n @if (tooltip()) {\n <span\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\" />\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml()\"></div></ng-template>\n </span>\n } @else {\n <ng-container *ngTemplateOutlet=\"con\" />\n }\n </ng-template>\n @let c = cls();\n @switch (type()) {\n @case ('default') {\n <span [class]=\"c\"></span>\n }\n @case ('length') {\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\" />\n <ng-template #lengthTpl>{{ text() }}</ng-template>\n }\n @case ('line-clamp') {\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\" />\n <ng-template #lineClampTpl>\n <div [class]=\"c\" [style]=\"{ '-webkit-line-clamp': lines(), '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n }\n @case ('line') {\n <div [class]=\"c\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\" />\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml()\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text() }}</span>\n </div>\n </div>\n </div>\n }\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkObserveContent, NzTooltipDirective, NgTemplateOutlet]\n})\nexport class EllipsisComponent {\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly injector = inject(Injector);\n private readonly dom = inject(DomSanitizer);\n private readonly doc = inject(DOCUMENT);\n private isSupportLineClamp = this.doc.body.style['webkitLineClamp'] !== undefined;\n private readonly orgEl = viewChild.required<ElementRef<HTMLElement>>('orgEl');\n private readonly shadowOrgEl = viewChild<ElementRef<HTMLElement>>('shadowOrgEl');\n private readonly shadowTextEl = viewChild<ElementRef<HTMLElement>>('shadowTextEl');\n protected orgHtml = signal<SafeHtml | null>(null);\n protected type = signal('default');\n protected cls = signal<Record<string, NzSafeAny>>({});\n readonly text = signal('');\n targetCount = 0;\n\n readonly tooltip = input(false, { transform: booleanAttribute });\n readonly length = input(null, {\n transform: (v: unknown) => (v == null ? null : numberAttribute(v))\n });\n readonly lines = input(null, {\n transform: (v: unknown) => (v == null ? null : numberAttribute(v))\n });\n readonly fullWidthRecognition = input(false, { transform: booleanAttribute });\n readonly tail = input('...');\n\n protected get linsWord(): string {\n const { targetCount, text, tail } = this;\n return (\n (targetCount > 0 ? text().substring(0, targetCount) : '') +\n (targetCount > 0 && targetCount < text().length ? tail() : '')\n );\n }\n\n private get win(): NzSafeAny {\n return this.doc.defaultView ?? window;\n }\n\n constructor() {\n effect(() => {\n this.refresh();\n });\n }\n\n private getStrFullLength(str: string): number {\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n return pre + 1;\n }\n return pre + 2;\n }, 0);\n }\n\n private cutStrByFullLength(str: string, maxLength: number): string {\n let showLength = 0;\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n showLength += 1;\n } else {\n showLength += 2;\n }\n if (showLength <= maxLength) {\n return pre + cur;\n }\n return pre;\n }, '');\n }\n\n private bisection(\n targetHeight: number,\n mid: number,\n begin: number,\n end: number,\n text: string,\n node: HTMLElement\n ): number {\n const suffix = this.tail();\n node.innerHTML = text.substring(0, mid) + suffix;\n let sh = node.offsetHeight;\n\n if (sh <= targetHeight) {\n node.innerHTML = text.substring(0, mid + 1) + suffix;\n sh = node.offsetHeight;\n if (sh > targetHeight || mid === begin) {\n return mid;\n }\n begin = mid;\n mid = end - begin === 1 ? begin + 1 : Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n if (mid - 1 < 0) {\n return mid;\n }\n node.innerHTML = text.substring(0, mid - 1) + suffix;\n sh = node.offsetHeight;\n if (sh <= targetHeight) {\n return mid - 1;\n }\n end = mid;\n mid = Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n\n private genType(): void {\n const lines = this.lines();\n const length = this.length();\n const isSupportLineClamp = this.isSupportLineClamp;\n this.cls.set({\n ellipsis: true,\n ellipsis__lines: lines && !isSupportLineClamp,\n 'ellipsis__line-clamp': lines && isSupportLineClamp\n });\n if (!lines && !length) {\n this.type.set('default');\n } else if (!lines) {\n this.type.set('length');\n } else if (isSupportLineClamp) {\n this.type.set('line-clamp');\n } else {\n this.type.set('line');\n }\n }\n\n private gen(): void {\n const lines = this.lines();\n const length = this.length();\n const type = this.type();\n const { fullWidthRecognition, tail, orgEl } = this;\n if (type === 'length') {\n const lengthText = orgEl().nativeElement.textContent!;\n const textLength = fullWidthRecognition() ? this.getStrFullLength(lengthText) : lengthText.length;\n if (length == null || textLength <= length || length < 0) {\n this.text.set(lengthText);\n } else {\n let displayText: string;\n if (length - tail().length <= 0) {\n displayText = '';\n } else {\n displayText = fullWidthRecognition()\n ? this.cutStrByFullLength(lengthText, length)\n : lengthText.slice(0, length);\n }\n this.text.set(displayText + tail());\n }\n } else if (type === 'line') {\n const { shadowOrgEl, shadowTextEl } = this;\n const orgNode = shadowOrgEl()!.nativeElement;\n const lineText = orgNode.innerText ?? orgNode.textContent!;\n const lineHeight = parseInt(this.win.getComputedStyle(this.getEl('.ellipsis')).lineHeight!, 10);\n const targetHeight = lines! * lineHeight;\n const handleEl = this.getEl('.ellipsis__handle');\n handleEl!.style.height = `${targetHeight}px`;\n\n if (orgNode.offsetHeight <= targetHeight) {\n this.text.set(lineText);\n this.targetCount = lineText.length;\n } else {\n // bisection\n const len = lineText.length;\n const mid = Math.ceil(len / 2);\n\n const firstChild = shadowTextEl()!.nativeElement.firstChild as HTMLElement;\n const count = this.bisection(targetHeight, mid, 0, len, lineText, firstChild);\n this.text.set(lineText);\n this.targetCount = count;\n }\n }\n }\n\n private getEl(cls: string): HTMLElement | null {\n return this.el.querySelector<HTMLElement>(cls);\n }\n\n protected refresh(): void {\n this.genType();\n const { dom, orgEl } = this;\n const html = orgEl().nativeElement.innerHTML;\n this.orgHtml.set(dom.bypassSecurityTrustHtml(html));\n const type = this.type();\n runInInjectionContext(this.injector, () => {\n afterNextRender(() => {\n this.gen();\n if (type !== 'line') {\n const el = this.getEl('.ellipsis');\n if (el) {\n el.innerHTML = html;\n }\n }\n });\n });\n }\n}\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzTooltipModule } from 'ng-zorro-antd/tooltip';\n\nimport { EllipsisComponent } from './ellipsis.component';\n\nconst COMPONENTS = [EllipsisComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, NzTooltipModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class EllipsisModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MA2Ea,iBAAiB,CAAA;AACX,IAAA,EAAE,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;AAClD,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC/B,IAAA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,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CAHf,YAAY,EAAE,eAAe,EAAE,eAAe,CAAA,EAAA,CAAA;;2FAG7C,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC;AACxE,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ellipsis.mjs","sources":["../../../../packages/abc/ellipsis/ellipsis.component.ts","../../../../packages/abc/ellipsis/ellipsis.module.ts","../../../../packages/abc/ellipsis/ellipsis.ts"],"sourcesContent":["import { CdkObserveContent } from '@angular/cdk/observers';\nimport { DOCUMENT, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n effect,\n inject,\n input,\n numberAttribute,\n runInInjectionContext,\n signal,\n viewChild\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzTooltipDirective } from 'ng-zorro-antd/tooltip';\n\n@Component({\n selector: 'ellipsis',\n exportAs: 'ellipsis',\n template: `\n <div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content /></div>\n <ng-template #tooltipTpl let-con>\n @if (tooltip()) {\n <span\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\" />\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml()\"></div></ng-template>\n </span>\n } @else {\n <ng-container *ngTemplateOutlet=\"con\" />\n }\n </ng-template>\n @let c = cls();\n @switch (type()) {\n @case ('default') {\n <span [class]=\"c\"></span>\n }\n @case ('length') {\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\" />\n <ng-template #lengthTpl>{{ text() }}</ng-template>\n }\n @case ('line-clamp') {\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\" />\n <ng-template #lineClampTpl>\n <div [class]=\"c\" [style]=\"{ '-webkit-line-clamp': lines(), '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n }\n @case ('line') {\n <div [class]=\"c\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\" />\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml()\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text() }}</span>\n </div>\n </div>\n </div>\n }\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkObserveContent, NzTooltipDirective, NgTemplateOutlet]\n})\nexport class EllipsisComponent {\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly injector = inject(Injector);\n private readonly dom = inject(DomSanitizer);\n private readonly doc = inject(DOCUMENT);\n private isSupportLineClamp = this.doc.body.style['webkitLineClamp'] !== undefined;\n private readonly orgEl = viewChild.required<ElementRef<HTMLElement>>('orgEl');\n private readonly shadowOrgEl = viewChild<ElementRef<HTMLElement>>('shadowOrgEl');\n private readonly shadowTextEl = viewChild<ElementRef<HTMLElement>>('shadowTextEl');\n protected orgHtml = signal<SafeHtml | null>(null);\n protected type = signal('default');\n protected cls = signal<Record<string, NzSafeAny>>({});\n readonly text = signal('');\n targetCount = 0;\n\n readonly tooltip = input(false, { transform: booleanAttribute });\n readonly length = input(null, {\n transform: (v: unknown) => (v == null ? null : numberAttribute(v))\n });\n readonly lines = input(null, {\n transform: (v: unknown) => (v == null ? null : numberAttribute(v))\n });\n readonly fullWidthRecognition = input(false, { transform: booleanAttribute });\n readonly tail = input('...');\n\n protected get linsWord(): string {\n const { targetCount, text, tail } = this;\n return (\n (targetCount > 0 ? text().substring(0, targetCount) : '') +\n (targetCount > 0 && targetCount < text().length ? tail() : '')\n );\n }\n\n private get win(): NzSafeAny {\n return this.doc.defaultView ?? window;\n }\n\n constructor() {\n effect(() => {\n this.refresh();\n });\n }\n\n private getStrFullLength(str: string): number {\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n return pre + 1;\n }\n return pre + 2;\n }, 0);\n }\n\n private cutStrByFullLength(str: string, maxLength: number): string {\n let showLength = 0;\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n showLength += 1;\n } else {\n showLength += 2;\n }\n if (showLength <= maxLength) {\n return pre + cur;\n }\n return pre;\n }, '');\n }\n\n private bisection(\n targetHeight: number,\n mid: number,\n begin: number,\n end: number,\n text: string,\n node: HTMLElement\n ): number {\n const suffix = this.tail();\n node.innerHTML = text.substring(0, mid) + suffix;\n let sh = node.offsetHeight;\n\n if (sh <= targetHeight) {\n node.innerHTML = text.substring(0, mid + 1) + suffix;\n sh = node.offsetHeight;\n if (sh > targetHeight || mid === begin) {\n return mid;\n }\n begin = mid;\n mid = end - begin === 1 ? begin + 1 : Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n if (mid - 1 < 0) {\n return mid;\n }\n node.innerHTML = text.substring(0, mid - 1) + suffix;\n sh = node.offsetHeight;\n if (sh <= targetHeight) {\n return mid - 1;\n }\n end = mid;\n mid = Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n\n private genType(): void {\n const lines = this.lines();\n const length = this.length();\n const isSupportLineClamp = this.isSupportLineClamp;\n this.cls.set({\n ellipsis: true,\n ellipsis__lines: lines && !isSupportLineClamp,\n 'ellipsis__line-clamp': lines && isSupportLineClamp\n });\n if (!lines && !length) {\n this.type.set('default');\n } else if (!lines) {\n this.type.set('length');\n } else if (isSupportLineClamp) {\n this.type.set('line-clamp');\n } else {\n this.type.set('line');\n }\n }\n\n private gen(): void {\n const lines = this.lines();\n const length = this.length();\n const type = this.type();\n const { fullWidthRecognition, tail, orgEl } = this;\n if (type === 'length') {\n const lengthText = orgEl().nativeElement.textContent!;\n const textLength = fullWidthRecognition() ? this.getStrFullLength(lengthText) : lengthText.length;\n if (length == null || textLength <= length || length < 0) {\n this.text.set(lengthText);\n } else {\n let displayText: string;\n if (length - tail().length <= 0) {\n displayText = '';\n } else {\n displayText = fullWidthRecognition()\n ? this.cutStrByFullLength(lengthText, length)\n : lengthText.slice(0, length);\n }\n this.text.set(displayText + tail());\n }\n } else if (type === 'line') {\n const { shadowOrgEl, shadowTextEl } = this;\n const orgNode = shadowOrgEl()!.nativeElement;\n const lineText = orgNode.innerText ?? orgNode.textContent!;\n const lineHeight = parseInt(this.win.getComputedStyle(this.getEl('.ellipsis')).lineHeight!, 10);\n const targetHeight = lines! * lineHeight;\n const handleEl = this.getEl('.ellipsis__handle');\n handleEl!.style.height = `${targetHeight}px`;\n\n if (orgNode.offsetHeight <= targetHeight) {\n this.text.set(lineText);\n this.targetCount = lineText.length;\n } else {\n // bisection\n const len = lineText.length;\n const mid = Math.ceil(len / 2);\n\n const firstChild = shadowTextEl()!.nativeElement.firstChild as HTMLElement;\n const count = this.bisection(targetHeight, mid, 0, len, lineText, firstChild);\n this.text.set(lineText);\n this.targetCount = count;\n }\n }\n }\n\n private getEl(cls: string): HTMLElement | null {\n return this.el.querySelector<HTMLElement>(cls);\n }\n\n protected refresh(): void {\n this.genType();\n const { dom, orgEl } = this;\n const html = orgEl().nativeElement.innerHTML;\n this.orgHtml.set(dom.bypassSecurityTrustHtml(html));\n const type = this.type();\n runInInjectionContext(this.injector, () => {\n afterNextRender(() => {\n this.gen();\n if (type !== 'line') {\n const el = this.getEl('.ellipsis');\n if (el) {\n el.innerHTML = html;\n }\n }\n });\n });\n }\n}\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzTooltipModule } from 'ng-zorro-antd/tooltip';\n\nimport { EllipsisComponent } from './ellipsis.component';\n\nconst COMPONENTS = [EllipsisComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, NzTooltipModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class EllipsisModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MA2Ea,iBAAiB,CAAA;AACX,IAAA,EAAE,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;AAClD,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC/B,IAAA,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,SAAS;AAChE,IAAA,KAAK,GAAG,SAAS,CAAC,QAAQ,CAA0B,OAAO,CAAC;AAC5D,IAAA,WAAW,GAAG,SAAS,CAA0B,aAAa,kFAAC;AAC/D,IAAA,YAAY,GAAG,SAAS,CAA0B,cAAc,mFAAC;AACxE,IAAA,OAAO,GAAG,MAAM,CAAkB,IAAI,8EAAC;AACvC,IAAA,IAAI,GAAG,MAAM,CAAC,SAAS,2EAAC;AACxB,IAAA,GAAG,GAAG,MAAM,CAA4B,EAAE,0EAAC;AAC5C,IAAA,IAAI,GAAG,MAAM,CAAC,EAAE,2EAAC;IAC1B,WAAW,GAAG,CAAC;IAEN,OAAO,GAAG,KA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|
|
68
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ErrorCollectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: ErrorCollectComponent, isStandalone: true, selector: "error-collect, [error-collect]", inputs: { freq: { classPropertyName: "freq", publicName: "freq", isSignal: true, isRequired: false, transformFunction: null }, offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_click()" }, properties: { "class.error-collect": "true", "class.error-collect-rtl": "dir() === 'rtl'", "class.d-none": "count() === 0" } }, exportAs: ["errorCollect"], ngImport: i0, template: `
|
|
69
69
|
<nz-icon nzType="exclamation-circle" />
|
|
70
70
|
<span class="error-collect__count">{{ count() }}</span>
|
|
71
71
|
`, isInline: true, dependencies: [{ kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
72
72
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ErrorCollectComponent, decorators: [{
|
|
74
74
|
type: Component,
|
|
75
75
|
args: [{
|
|
76
76
|
selector: 'error-collect, [error-collect]',
|
|
@@ -93,11 +93,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
93
93
|
|
|
94
94
|
const COMPONENTS = [ErrorCollectComponent];
|
|
95
95
|
class ErrorCollectModule {
|
|
96
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
97
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
98
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
96
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ErrorCollectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
97
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ErrorCollectModule, imports: [CommonModule, NzIconModule, ErrorCollectComponent], exports: [ErrorCollectComponent] });
|
|
98
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ErrorCollectModule, imports: [CommonModule, NzIconModule] });
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ErrorCollectModule, decorators: [{
|
|
101
101
|
type: NgModule,
|
|
102
102
|
args: [{
|
|
103
103
|
imports: [CommonModule, NzIconModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-collect.mjs","sources":["../../../../packages/abc/error-collect/error-collect.component.ts","../../../../packages/abc/error-collect/error-collect.module.ts","../../../../packages/abc/error-collect/error-collect.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n OnInit,\n ViewEncapsulation,\n inject,\n input,\n numberAttribute,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { interval } from 'rxjs';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\n\n@Component({\n selector: 'error-collect, [error-collect]',\n exportAs: 'errorCollect',\n template: `\n <nz-icon nzType=\"exclamation-circle\" />\n <span class=\"error-collect__count\">{{ count() }}</span>\n `,\n host: {\n '[class.error-collect]': 'true',\n '[class.error-collect-rtl]': `dir() === 'rtl'`,\n '[class.d-none]': 'count() === 0',\n '(click)': '_click()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzIconDirective]\n})\nexport class ErrorCollectComponent implements OnInit {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly doc = inject(DOCUMENT);\n private readonly platform = inject(Platform);\n private readonly destroy$ = inject(DestroyRef);\n private readonly cogSrv = inject(AlainConfigService);\n private formEl: HTMLFormElement | null = null;\n\n protected count = signal(0);\n protected dir = inject(Directionality).valueSignal;\n\n readonly freq = input(0, { transform: numberAttribute });\n readonly offsetTop = input(0, { transform: numberAttribute });\n\n constructor() {\n this.cogSrv.attach(this, 'errorCollect', { freq: 250, offsetTop: 65 + 64 + 8 * 2 });\n }\n\n private get errEls(): NodeListOf<HTMLElement> {\n return this.formEl!.querySelectorAll('.ant-form-item-has-error');\n }\n\n private update(): void {\n const count = this.errEls.length;\n if (count === this.count()) return;\n this.count.set(count);\n }\n\n protected _click(): boolean {\n if (this.count() === 0) return false;\n // nz-form-control\n const els = this.errEls;\n const formItemEl = this.findParent(els[0], '[nz-form-control]') ?? els[0];\n formItemEl.scrollIntoView(true);\n // fix header height\n this.doc.documentElement.scrollTop -= this.offsetTop();\n return true;\n }\n\n private findParent(el: HTMLElement, selector: string): HTMLFormElement | null {\n let retEl: HTMLFormElement | null = null;\n while (el) {\n if (el.querySelector(selector)) {\n retEl = el as HTMLFormElement;\n break;\n }\n el = el.parentElement as HTMLFormElement;\n }\n return retEl;\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) return;\n\n this.formEl = this.findParent(this.el, 'form');\n if (this.formEl === null) throw new Error('No found form element');\n\n interval(this.freq())\n .pipe(takeUntilDestroyed(this.destroy$))\n .subscribe(() => this.update());\n\n this.update();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { ErrorCollectComponent } from './error-collect.component';\n\nconst COMPONENTS = [ErrorCollectComponent];\n\n@NgModule({\n imports: [CommonModule, NzIconModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ErrorCollectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAsCa,qBAAqB,CAAA;AACf,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AAC9D,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAC5C,MAAM,GAA2B,IAAI;AAEnC,IAAA,KAAK,GAAG,MAAM,CAAC,CAAC,4EAAC;AACjB,IAAA,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW;IAEzC,IAAI,GAAG,KAAK,CAAC,CAAC,4EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;IAC/C,SAAS,GAAG,KAAK,CAAC,CAAC,iFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAE7D,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE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,CAAC,MAAM,KAAK,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;AAElE,QAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE;AACjB,aAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;aACtC,SAAS,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;QAEjC,IAAI,CAAC,MAAM,EAAE;IACf;
|
|
1
|
+
{"version":3,"file":"error-collect.mjs","sources":["../../../../packages/abc/error-collect/error-collect.component.ts","../../../../packages/abc/error-collect/error-collect.module.ts","../../../../packages/abc/error-collect/error-collect.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n OnInit,\n ViewEncapsulation,\n inject,\n input,\n numberAttribute,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { interval } from 'rxjs';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\n\n@Component({\n selector: 'error-collect, [error-collect]',\n exportAs: 'errorCollect',\n template: `\n <nz-icon nzType=\"exclamation-circle\" />\n <span class=\"error-collect__count\">{{ count() }}</span>\n `,\n host: {\n '[class.error-collect]': 'true',\n '[class.error-collect-rtl]': `dir() === 'rtl'`,\n '[class.d-none]': 'count() === 0',\n '(click)': '_click()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzIconDirective]\n})\nexport class ErrorCollectComponent implements OnInit {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly doc = inject(DOCUMENT);\n private readonly platform = inject(Platform);\n private readonly destroy$ = inject(DestroyRef);\n private readonly cogSrv = inject(AlainConfigService);\n private formEl: HTMLFormElement | null = null;\n\n protected count = signal(0);\n protected dir = inject(Directionality).valueSignal;\n\n readonly freq = input(0, { transform: numberAttribute });\n readonly offsetTop = input(0, { transform: numberAttribute });\n\n constructor() {\n this.cogSrv.attach(this, 'errorCollect', { freq: 250, offsetTop: 65 + 64 + 8 * 2 });\n }\n\n private get errEls(): NodeListOf<HTMLElement> {\n return this.formEl!.querySelectorAll('.ant-form-item-has-error');\n }\n\n private update(): void {\n const count = this.errEls.length;\n if (count === this.count()) return;\n this.count.set(count);\n }\n\n protected _click(): boolean {\n if (this.count() === 0) return false;\n // nz-form-control\n const els = this.errEls;\n const formItemEl = this.findParent(els[0], '[nz-form-control]') ?? els[0];\n formItemEl.scrollIntoView(true);\n // fix header height\n this.doc.documentElement.scrollTop -= this.offsetTop();\n return true;\n }\n\n private findParent(el: HTMLElement, selector: string): HTMLFormElement | null {\n let retEl: HTMLFormElement | null = null;\n while (el) {\n if (el.querySelector(selector)) {\n retEl = el as HTMLFormElement;\n break;\n }\n el = el.parentElement as HTMLFormElement;\n }\n return retEl;\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) return;\n\n this.formEl = this.findParent(this.el, 'form');\n if (this.formEl === null) throw new Error('No found form element');\n\n interval(this.freq())\n .pipe(takeUntilDestroyed(this.destroy$))\n .subscribe(() => this.update());\n\n this.update();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { ErrorCollectComponent } from './error-collect.component';\n\nconst COMPONENTS = [ErrorCollectComponent];\n\n@NgModule({\n imports: [CommonModule, NzIconModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ErrorCollectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAsCa,qBAAqB,CAAA;AACf,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AAC9D,IAAA,GAAG,GAAG,MAAM,CAAC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;AAC9C,wBAAA,gBAAgB,EAAE,eAAe;AACjC,wBAAA,SAAS,EAAE;AACZ,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;AC9BD,MAAM,UAAU,GAAG,CAAC,qBAAqB,CAAC;MAM7B,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHnB,YAAY,EAAE,YAAY,EAHlB,qBAAqB,aAArB,qBAAqB,CAAA,EAAA,CAAA;yGAM5B,kBAAkB,EAAA,OAAA,EAAA,CAHnB,YAAY,EAAE,YAAY,CAAA,EAAA,CAAA;;4FAGzB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC;AACpD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/fesm2022/exception.mjs
CHANGED
|
@@ -64,8 +64,8 @@ class ExceptionComponent {
|
|
|
64
64
|
checkContent() {
|
|
65
65
|
this.hasCon.set(!isEmpty(this.conTpl().nativeElement));
|
|
66
66
|
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
68
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ExceptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ExceptionComponent, isStandalone: true, selector: "exception", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, img: { classPropertyName: "img", publicName: "img", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, desc: { classPropertyName: "desc", publicName: "desc", isSignal: true, isRequired: false, transformFunction: null }, backRouterLink: { classPropertyName: "backRouterLink", publicName: "backRouterLink", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.exception-rtl": "dir() === 'rtl'" }, classAttribute: "exception" }, viewQueries: [{ propertyName: "conTpl", first: true, predicate: ["conTpl"], descendants: true, isSignal: true }], exportAs: ["exception"], ngImport: i0, template: `
|
|
69
69
|
<div class="exception__img-block">
|
|
70
70
|
<div class="exception__img" [style.backgroundImage]="_img()"></div>
|
|
71
71
|
</div>
|
|
@@ -87,7 +87,7 @@ class ExceptionComponent {
|
|
|
87
87
|
</div>
|
|
88
88
|
`, isInline: true, dependencies: [{ kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { kind: "component", type: NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ExceptionComponent, decorators: [{
|
|
91
91
|
type: Component,
|
|
92
92
|
args: [{
|
|
93
93
|
selector: 'exception',
|
|
@@ -125,11 +125,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
125
125
|
|
|
126
126
|
const COMPONENTS = [ExceptionComponent];
|
|
127
127
|
class ExceptionModule {
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
129
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
130
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ExceptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
129
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ExceptionModule, imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, ExceptionComponent], exports: [ExceptionComponent] });
|
|
130
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ExceptionModule, imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, COMPONENTS] });
|
|
131
131
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ExceptionModule, decorators: [{
|
|
133
133
|
type: NgModule,
|
|
134
134
|
args: [{
|
|
135
135
|
imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception.mjs","sources":["../../../../packages/abc/exception/exception.component.ts","../../../../packages/abc/exception/exception.module.ts","../../../../packages/abc/exception/exception.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n viewChild\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { RouterLink } from '@angular/router';\n\nimport { DelonLocaleService } from '@delon/theme';\nimport { isEmpty } from '@delon/util/browser';\nimport { AlainConfigService, AlainExceptionType } from '@delon/util/config';\nimport { NzButtonComponent } from 'ng-zorro-antd/button';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport type ExceptionType = 403 | 404 | 500;\n\n@Component({\n selector: 'exception',\n exportAs: 'exception',\n template: `\n <div class=\"exception__img-block\">\n <div class=\"exception__img\" [style.backgroundImage]=\"_img()\"></div>\n </div>\n <div class=\"exception__cont\">\n @if (_title()) {\n <h1 class=\"exception__cont-title\" [innerHTML]=\"_title()\"></h1>\n }\n <div class=\"exception__cont-desc\" [innerHTML]=\"_desc()\"></div>\n <div class=\"exception__cont-actions\">\n <div (cdkObserveContent)=\"checkContent()\" #conTpl>\n <ng-content />\n </div>\n @if (!hasCon()) {\n <button nz-button [routerLink]=\"backRouterLink()\" [nzType]=\"'primary'\">\n {{ locale().backToHome }}\n </button>\n }\n </div>\n </div>\n `,\n host: {\n class: 'exception',\n '[class.exception-rtl]': `dir() === 'rtl'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkObserveContent, NzButtonComponent, RouterLink]\n})\nexport class ExceptionComponent {\n private readonly dom = inject(DomSanitizer);\n private readonly cogSrv = inject(AlainConfigService);\n\n private readonly conTpl = viewChild.required<ElementRef<HTMLElement>>('conTpl');\n protected locale = inject(DelonLocaleService).valueSignal('exception');\n protected dir = inject(Directionality).valueSignal;\n\n protected hasCon = signal(false);\n private typeDict!: NonNullable<AlainExceptionType['typeDict']>;\n protected typeItem = signal<NonNullable<AlainExceptionType['typeDict']>[ExceptionType] | null>(null);\n\n readonly type = input<ExceptionType>(404);\n readonly img = input<string>();\n readonly title = input<string>();\n readonly desc = input<string>();\n readonly backRouterLink = input<string | NzSafeAny[]>('/');\n protected readonly _img = computed(() => {\n const v = this.img() ?? this.typeItem()?.img;\n return v == null ? null : this.dom.bypassSecurityTrustStyle(`url('${v}')`);\n });\n protected readonly _title = computed(() => {\n const v = this.title() ?? this.typeItem()?.title;\n return v == null ? null : this.dom.bypassSecurityTrustHtml(v);\n });\n protected readonly _desc = computed(() => {\n const v = this.desc() ?? this.typeItem()?.desc ?? this.locale()[this.type()];\n return v == null ? null : this.dom.bypassSecurityTrustHtml(v);\n });\n\n constructor() {\n this.cogSrv.attach(this, 'exception', {\n typeDict: {\n 403: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg',\n title: '403'\n },\n 404: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg',\n title: '404'\n },\n 500: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg',\n title: '500'\n }\n }\n });\n\n effect(() => {\n const type = this.type();\n this.typeItem.set(this.typeDict?.[type]);\n });\n\n afterNextRender(() => {\n this.checkContent();\n });\n }\n\n protected checkContent(): void {\n this.hasCon.set(!isEmpty(this.conTpl().nativeElement));\n }\n}\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\n\nimport { ExceptionComponent } from './exception.component';\n\nconst COMPONENTS = [ExceptionComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ExceptionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA0Da,kBAAkB,CAAA;AACZ,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEnC,IAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAA0B,QAAQ,CAAC;IACrE,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC;AAC5D,IAAA,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW;AAExC,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;AACxB,IAAA,QAAQ;AACN,IAAA,QAAQ,GAAG,MAAM,CAAoE,IAAI,+EAAC;AAE3F,IAAA,IAAI,GAAG,KAAK,CAAgB,GAAG,2EAAC;IAChC,GAAG,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,KAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACrB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACvB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AACtB,IAAA,cAAc,GAAG,KAAK,CAAuB,GAAG,qFAAC;AACvC,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AAC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E,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AACxG,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"exception.mjs","sources":["../../../../packages/abc/exception/exception.component.ts","../../../../packages/abc/exception/exception.module.ts","../../../../packages/abc/exception/exception.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n viewChild\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { RouterLink } from '@angular/router';\n\nimport { DelonLocaleService } from '@delon/theme';\nimport { isEmpty } from '@delon/util/browser';\nimport { AlainConfigService, AlainExceptionType } from '@delon/util/config';\nimport { NzButtonComponent } from 'ng-zorro-antd/button';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport type ExceptionType = 403 | 404 | 500;\n\n@Component({\n selector: 'exception',\n exportAs: 'exception',\n template: `\n <div class=\"exception__img-block\">\n <div class=\"exception__img\" [style.backgroundImage]=\"_img()\"></div>\n </div>\n <div class=\"exception__cont\">\n @if (_title()) {\n <h1 class=\"exception__cont-title\" [innerHTML]=\"_title()\"></h1>\n }\n <div class=\"exception__cont-desc\" [innerHTML]=\"_desc()\"></div>\n <div class=\"exception__cont-actions\">\n <div (cdkObserveContent)=\"checkContent()\" #conTpl>\n <ng-content />\n </div>\n @if (!hasCon()) {\n <button nz-button [routerLink]=\"backRouterLink()\" [nzType]=\"'primary'\">\n {{ locale().backToHome }}\n </button>\n }\n </div>\n </div>\n `,\n host: {\n class: 'exception',\n '[class.exception-rtl]': `dir() === 'rtl'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkObserveContent, NzButtonComponent, RouterLink]\n})\nexport class ExceptionComponent {\n private readonly dom = inject(DomSanitizer);\n private readonly cogSrv = inject(AlainConfigService);\n\n private readonly conTpl = viewChild.required<ElementRef<HTMLElement>>('conTpl');\n protected locale = inject(DelonLocaleService).valueSignal('exception');\n protected dir = inject(Directionality).valueSignal;\n\n protected hasCon = signal(false);\n private typeDict!: NonNullable<AlainExceptionType['typeDict']>;\n protected typeItem = signal<NonNullable<AlainExceptionType['typeDict']>[ExceptionType] | null>(null);\n\n readonly type = input<ExceptionType>(404);\n readonly img = input<string>();\n readonly title = input<string>();\n readonly desc = input<string>();\n readonly backRouterLink = input<string | NzSafeAny[]>('/');\n protected readonly _img = computed(() => {\n const v = this.img() ?? this.typeItem()?.img;\n return v == null ? null : this.dom.bypassSecurityTrustStyle(`url('${v}')`);\n });\n protected readonly _title = computed(() => {\n const v = this.title() ?? this.typeItem()?.title;\n return v == null ? null : this.dom.bypassSecurityTrustHtml(v);\n });\n protected readonly _desc = computed(() => {\n const v = this.desc() ?? this.typeItem()?.desc ?? this.locale()[this.type()];\n return v == null ? null : this.dom.bypassSecurityTrustHtml(v);\n });\n\n constructor() {\n this.cogSrv.attach(this, 'exception', {\n typeDict: {\n 403: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg',\n title: '403'\n },\n 404: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg',\n title: '404'\n },\n 500: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg',\n title: '500'\n }\n }\n });\n\n effect(() => {\n const type = this.type();\n this.typeItem.set(this.typeDict?.[type]);\n });\n\n afterNextRender(() => {\n this.checkContent();\n });\n }\n\n protected checkContent(): void {\n this.hasCon.set(!isEmpty(this.conTpl().nativeElement));\n }\n}\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\n\nimport { ExceptionComponent } from './exception.component';\n\nconst COMPONENTS = [ExceptionComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ExceptionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA0Da,kBAAkB,CAAA;AACZ,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEnC,IAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAA0B,QAAQ,CAAC;IACrE,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC;AAC5D,IAAA,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW;AAExC,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;AACxB,IAAA,QAAQ;AACN,IAAA,QAAQ,GAAG,MAAM,CAAoE,IAAI,+EAAC;AAE3F,IAAA,IAAI,GAAG,KAAK,CAAgB,GAAG,2EAAC;IAChC,GAAG,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,KAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACrB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACvB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AACtB,IAAA,cAAc,GAAG,KA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;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AACxG,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -15,8 +15,8 @@ class FooterToolbarComponent {
|
|
|
15
15
|
ngOnDestroy() {
|
|
16
16
|
this.bodyCls?.remove(CLSBODY);
|
|
17
17
|
}
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
19
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FooterToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FooterToolbarComponent, isStandalone: true, selector: "footer-toolbar", inputs: { errorCollect: { classPropertyName: "errorCollect", publicName: "errorCollect", isSignal: true, isRequired: false, transformFunction: null }, extra: { classPropertyName: "extra", publicName: "extra", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "footer-toolbar" }, exportAs: ["footerToolbar"], ngImport: i0, template: `
|
|
20
20
|
<div class="footer-toolbar__left">
|
|
21
21
|
<ng-container *nzStringTemplateOutlet="extra()">{{ extra() }}</ng-container>
|
|
22
22
|
</div>
|
|
@@ -28,7 +28,7 @@ class FooterToolbarComponent {
|
|
|
28
28
|
</div>
|
|
29
29
|
`, isInline: true, dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: ["freq", "offsetTop"], exportAs: ["errorCollect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FooterToolbarComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{
|
|
34
34
|
selector: 'footer-toolbar',
|
|
@@ -55,11 +55,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
55
55
|
|
|
56
56
|
const COMPONENTS = [FooterToolbarComponent];
|
|
57
57
|
class FooterToolbarModule {
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
59
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
60
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FooterToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
59
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: FooterToolbarModule, imports: [CommonModule, ErrorCollectModule, NzOutletModule, FooterToolbarComponent], exports: [FooterToolbarComponent] });
|
|
60
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FooterToolbarModule, imports: [CommonModule, ErrorCollectModule, NzOutletModule, COMPONENTS] });
|
|
61
61
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FooterToolbarModule, decorators: [{
|
|
63
63
|
type: NgModule,
|
|
64
64
|
args: [{
|
|
65
65
|
imports: [CommonModule, ErrorCollectModule, NzOutletModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-toolbar.mjs","sources":["../../../../packages/abc/footer-toolbar/footer-toolbar.component.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.module.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n inject,\n input\n} from '@angular/core';\n\nimport { ErrorCollectComponent } from '@delon/abc/error-collect';\nimport { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';\n\nconst CLSBODY = 'footer-toolbar__body';\n\n@Component({\n selector: 'footer-toolbar',\n exportAs: 'footerToolbar',\n template: `\n <div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra()\">{{ extra() }}</ng-container>\n </div>\n <div class=\"footer-toolbar__right\">\n @if (errorCollect()) {\n <error-collect />\n }\n <ng-content />\n </div>\n `,\n host: {\n class: 'footer-toolbar'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzStringTemplateOutletDirective, ErrorCollectComponent]\n})\nexport class FooterToolbarComponent implements OnDestroy {\n private readonly bodyCls = inject(DOCUMENT).querySelector('body')?.classList;\n\n readonly errorCollect = input(false, { transform: booleanAttribute });\n readonly extra = input<string | TemplateRef<void>>();\n\n constructor() {\n afterNextRender(() => this.bodyCls?.add(CLSBODY));\n }\n\n ngOnDestroy(): void {\n this.bodyCls?.remove(CLSBODY);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ErrorCollectModule } from '@delon/abc/error-collect';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { FooterToolbarComponent } from './footer-toolbar.component';\n\nconst COMPONENTS = [FooterToolbarComponent];\n\n@NgModule({\n imports: [CommonModule, ErrorCollectModule, NzOutletModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class FooterToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAgBA,MAAM,OAAO,GAAG,sBAAsB;MAuBzB,sBAAsB,CAAA;AAChB,IAAA,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS;IAEnE,YAAY,GAAG,KAAK,CAAC,KAAK,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC5D,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA8B;AAEpD,IAAA,WAAA,GAAA;AACE,QAAA,eAAe,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACnD;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;IAC/B;
|
|
1
|
+
{"version":3,"file":"footer-toolbar.mjs","sources":["../../../../packages/abc/footer-toolbar/footer-toolbar.component.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.module.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n inject,\n input\n} from '@angular/core';\n\nimport { ErrorCollectComponent } from '@delon/abc/error-collect';\nimport { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';\n\nconst CLSBODY = 'footer-toolbar__body';\n\n@Component({\n selector: 'footer-toolbar',\n exportAs: 'footerToolbar',\n template: `\n <div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra()\">{{ extra() }}</ng-container>\n </div>\n <div class=\"footer-toolbar__right\">\n @if (errorCollect()) {\n <error-collect />\n }\n <ng-content />\n </div>\n `,\n host: {\n class: 'footer-toolbar'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzStringTemplateOutletDirective, ErrorCollectComponent]\n})\nexport class FooterToolbarComponent implements OnDestroy {\n private readonly bodyCls = inject(DOCUMENT).querySelector('body')?.classList;\n\n readonly errorCollect = input(false, { transform: booleanAttribute });\n readonly extra = input<string | TemplateRef<void>>();\n\n constructor() {\n afterNextRender(() => this.bodyCls?.add(CLSBODY));\n }\n\n ngOnDestroy(): void {\n this.bodyCls?.remove(CLSBODY);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ErrorCollectModule } from '@delon/abc/error-collect';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { FooterToolbarComponent } from './footer-toolbar.component';\n\nconst COMPONENTS = [FooterToolbarComponent];\n\n@NgModule({\n imports: [CommonModule, ErrorCollectModule, NzOutletModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class FooterToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAgBA,MAAM,OAAO,GAAG,sBAAsB;MAuBzB,sBAAsB,CAAA;AAChB,IAAA,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS;IAEnE,YAAY,GAAG,KAAK,CAAC,KAAK,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC5D,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,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cAAc,EAAE,GAAG,UAAU,CAAC;AAC1E,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -14,10 +14,10 @@ class FullContentService {
|
|
|
14
14
|
get change() {
|
|
15
15
|
return this._change.pipe(share());
|
|
16
16
|
}
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
18
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
18
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentService, providedIn: 'root' });
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentService, decorators: [{
|
|
21
21
|
type: Injectable,
|
|
22
22
|
args: [{ providedIn: 'root' }]
|
|
23
23
|
}] });
|
|
@@ -99,10 +99,10 @@ class FullContentComponent {
|
|
|
99
99
|
ngOnDestroy() {
|
|
100
100
|
this.removeInBody();
|
|
101
101
|
}
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
103
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: FullContentComponent, isStandalone: true, selector: "full-content", inputs: { hideTitle: { classPropertyName: "hideTitle", publicName: "hideTitle", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, fullscreen: { classPropertyName: "fullscreen", publicName: "fullscreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fullscreen: "fullscreenChange" }, host: { properties: { "style.height.px": "_height()" }, classAttribute: "full-content" }, exportAs: ["fullContent"], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
104
104
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentComponent, decorators: [{
|
|
106
106
|
type: Component,
|
|
107
107
|
args: [{
|
|
108
108
|
selector: 'full-content',
|
|
@@ -122,10 +122,10 @@ class FullContentToggleDirective {
|
|
|
122
122
|
_click() {
|
|
123
123
|
this.parent.toggle();
|
|
124
124
|
}
|
|
125
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
126
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
126
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: FullContentToggleDirective, isStandalone: true, selector: "[full-toggle]", host: { listeners: { "click": "_click()" } }, exportAs: ["fullToggle"], ngImport: i0 });
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentToggleDirective, decorators: [{
|
|
129
129
|
type: Directive,
|
|
130
130
|
args: [{
|
|
131
131
|
selector: '[full-toggle]',
|
|
@@ -138,11 +138,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
138
138
|
|
|
139
139
|
const COMPONENTS = [FullContentComponent, FullContentToggleDirective];
|
|
140
140
|
class FullContentModule {
|
|
141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
142
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
143
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
142
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: FullContentModule, imports: [CommonModule, FullContentComponent, FullContentToggleDirective], exports: [FullContentComponent, FullContentToggleDirective] });
|
|
143
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentModule, imports: [CommonModule] });
|
|
144
144
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FullContentModule, decorators: [{
|
|
146
146
|
type: NgModule,
|
|
147
147
|
args: [{
|
|
148
148
|
imports: [CommonModule, ...COMPONENTS],
|