@delon/abc 13.1.0 → 13.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/README.md +1 -1
- package/ellipsis/ellipsis.component.d.ts +1 -0
- package/error-collect/error-collect.component.d.ts +4 -2
- package/esm2020/auto-focus/auto-focus.directive.mjs +3 -3
- package/esm2020/auto-focus/auto-focus.module.mjs +4 -4
- package/esm2020/avatar-list/avatar-list-item.component.mjs +3 -3
- package/esm2020/avatar-list/avatar-list.component.mjs +3 -3
- package/esm2020/avatar-list/avatar-list.module.mjs +4 -4
- package/esm2020/count-down/count-down.component.mjs +3 -3
- package/esm2020/count-down/count-down.module.mjs +4 -4
- package/esm2020/date-picker/date-picker.module.mjs +4 -4
- package/esm2020/date-picker/range-shortcut.component.mjs +3 -3
- package/esm2020/date-picker/range.directive.mjs +3 -3
- package/esm2020/down-file/down-file.directive.mjs +3 -3
- package/esm2020/down-file/down-file.module.mjs +4 -4
- package/esm2020/ellipsis/ellipsis.component.mjs +8 -5
- package/esm2020/ellipsis/ellipsis.module.mjs +4 -4
- package/esm2020/error-collect/error-collect.component.mjs +12 -8
- package/esm2020/error-collect/error-collect.module.mjs +4 -4
- package/esm2020/exception/exception.component.mjs +3 -3
- package/esm2020/exception/exception.module.mjs +4 -4
- package/esm2020/footer-toolbar/footer-toolbar.component.mjs +3 -3
- package/esm2020/footer-toolbar/footer-toolbar.module.mjs +4 -4
- package/esm2020/full-content/full-content-toggle.directive.mjs +3 -3
- package/esm2020/full-content/full-content.component.mjs +3 -3
- package/esm2020/full-content/full-content.module.mjs +4 -4
- package/esm2020/full-content/full-content.service.mjs +3 -3
- package/esm2020/global-footer/global-footer-item.component.mjs +3 -3
- package/esm2020/global-footer/global-footer.component.mjs +3 -3
- package/esm2020/global-footer/global-footer.module.mjs +4 -4
- package/esm2020/image/image.directive.mjs +3 -3
- package/esm2020/image/image.module.mjs +4 -4
- package/esm2020/let/let.directive.mjs +3 -3
- package/esm2020/let/let.module.mjs +4 -4
- package/esm2020/loading/loading.component.mjs +3 -3
- package/esm2020/loading/loading.module.mjs +4 -4
- package/esm2020/loading/loading.service.mjs +3 -3
- package/esm2020/lodop/lodop.module.mjs +4 -4
- package/esm2020/lodop/lodop.service.mjs +3 -3
- package/esm2020/media/media.component.mjs +3 -3
- package/esm2020/media/media.module.mjs +4 -4
- package/esm2020/media/media.service.mjs +3 -3
- package/esm2020/notice-icon/notice-icon-tab.component.mjs +3 -3
- package/esm2020/notice-icon/notice-icon.component.mjs +3 -3
- package/esm2020/notice-icon/notice-icon.module.mjs +4 -4
- package/esm2020/onboarding/onboarding.component.mjs +3 -3
- package/esm2020/onboarding/onboarding.module.mjs +4 -4
- package/esm2020/onboarding/onboarding.service.mjs +3 -3
- package/esm2020/page-header/page-header.component.mjs +3 -3
- package/esm2020/page-header/page-header.module.mjs +4 -4
- package/esm2020/pdf/pdf.component.mjs +3 -3
- package/esm2020/pdf/pdf.module.mjs +4 -4
- package/esm2020/qr/qr.component.mjs +5 -5
- package/esm2020/qr/qr.module.mjs +4 -4
- package/esm2020/quick-menu/quick-menu.component.mjs +3 -3
- package/esm2020/quick-menu/quick-menu.module.mjs +4 -4
- package/esm2020/result/result.component.mjs +3 -3
- package/esm2020/result/result.module.mjs +4 -4
- package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +3 -3
- package/esm2020/reuse-tab/reuse-tab-context.component.mjs +3 -3
- package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +3 -3
- package/esm2020/reuse-tab/reuse-tab-context.service.mjs +3 -3
- package/esm2020/reuse-tab/reuse-tab.component.mjs +3 -3
- package/esm2020/reuse-tab/reuse-tab.module.mjs +4 -4
- package/esm2020/reuse-tab/reuse-tab.service.mjs +3 -3
- package/esm2020/se/se-container.component.mjs +6 -6
- package/esm2020/se/se.component.mjs +3 -3
- package/esm2020/se/se.module.mjs +4 -4
- package/esm2020/sg/sg-container.component.mjs +3 -3
- package/esm2020/sg/sg.component.mjs +3 -3
- package/esm2020/sg/sg.module.mjs +4 -4
- package/esm2020/st/st-column-source.mjs +3 -3
- package/esm2020/st/st-data-source.mjs +3 -3
- package/esm2020/st/st-export.mjs +3 -3
- package/esm2020/st/st-filter.component.mjs +3 -3
- package/esm2020/st/st-row.directive.mjs +6 -6
- package/esm2020/st/st-widget-host.directive.mjs +3 -3
- package/esm2020/st/st-widget.mjs +3 -3
- package/esm2020/st/st.component.mjs +6 -6
- package/esm2020/st/st.module.mjs +4 -4
- package/esm2020/sv/sv-container.component.mjs +6 -6
- package/esm2020/sv/sv-value.component.mjs +3 -3
- package/esm2020/sv/sv.component.mjs +3 -3
- package/esm2020/sv/sv.module.mjs +4 -4
- package/esm2020/tag-select/tag-select.component.mjs +3 -3
- package/esm2020/tag-select/tag-select.module.mjs +4 -4
- package/esm2020/xlsx/xlsx.directive.mjs +3 -3
- package/esm2020/xlsx/xlsx.module.mjs +4 -4
- package/esm2020/xlsx/xlsx.service.mjs +3 -3
- package/esm2020/zip/zip.module.mjs +4 -4
- package/esm2020/zip/zip.service.mjs +3 -3
- package/fesm2015/auto-focus.mjs +7 -7
- package/fesm2015/avatar-list.mjs +10 -10
- package/fesm2015/count-down.mjs +7 -7
- package/fesm2015/date-picker.mjs +10 -10
- package/fesm2015/down-file.mjs +7 -7
- package/fesm2015/ellipsis.mjs +11 -8
- package/fesm2015/ellipsis.mjs.map +1 -1
- package/fesm2015/error-collect.mjs +15 -11
- package/fesm2015/error-collect.mjs.map +1 -1
- package/fesm2015/exception.mjs +7 -7
- package/fesm2015/footer-toolbar.mjs +7 -7
- package/fesm2015/full-content.mjs +13 -13
- package/fesm2015/global-footer.mjs +10 -10
- package/fesm2015/image.mjs +7 -7
- package/fesm2015/let.mjs +7 -7
- package/fesm2015/loading.mjs +10 -10
- package/fesm2015/lodop.mjs +7 -7
- package/fesm2015/media.mjs +10 -10
- package/fesm2015/notice-icon.mjs +10 -10
- package/fesm2015/onboarding.mjs +10 -10
- package/fesm2015/page-header.mjs +7 -7
- package/fesm2015/pdf.mjs +7 -7
- package/fesm2015/qr.mjs +8 -8
- package/fesm2015/qr.mjs.map +1 -1
- package/fesm2015/quick-menu.mjs +7 -7
- package/fesm2015/result.mjs +7 -7
- package/fesm2015/reuse-tab.mjs +22 -22
- package/fesm2015/se.mjs +13 -13
- package/fesm2015/sg.mjs +10 -10
- package/fesm2015/st.mjs +34 -34
- package/fesm2015/sv.mjs +16 -16
- package/fesm2015/tag-select.mjs +7 -7
- package/fesm2015/xlsx.mjs +10 -10
- package/fesm2015/zip.mjs +7 -7
- package/fesm2020/auto-focus.mjs +7 -7
- package/fesm2020/avatar-list.mjs +10 -10
- package/fesm2020/count-down.mjs +7 -7
- package/fesm2020/date-picker.mjs +10 -10
- package/fesm2020/down-file.mjs +7 -7
- package/fesm2020/ellipsis.mjs +11 -8
- package/fesm2020/ellipsis.mjs.map +1 -1
- package/fesm2020/error-collect.mjs +15 -11
- package/fesm2020/error-collect.mjs.map +1 -1
- package/fesm2020/exception.mjs +7 -7
- package/fesm2020/footer-toolbar.mjs +7 -7
- package/fesm2020/full-content.mjs +13 -13
- package/fesm2020/global-footer.mjs +10 -10
- package/fesm2020/image.mjs +7 -7
- package/fesm2020/let.mjs +7 -7
- package/fesm2020/loading.mjs +10 -10
- package/fesm2020/lodop.mjs +7 -7
- package/fesm2020/media.mjs +10 -10
- package/fesm2020/notice-icon.mjs +10 -10
- package/fesm2020/onboarding.mjs +10 -10
- package/fesm2020/page-header.mjs +7 -7
- package/fesm2020/pdf.mjs +7 -7
- package/fesm2020/qr.mjs +8 -8
- package/fesm2020/qr.mjs.map +1 -1
- package/fesm2020/quick-menu.mjs +7 -7
- package/fesm2020/result.mjs +7 -7
- package/fesm2020/reuse-tab.mjs +22 -22
- package/fesm2020/se.mjs +13 -13
- package/fesm2020/sg.mjs +10 -10
- package/fesm2020/st.mjs +34 -34
- package/fesm2020/sv.mjs +16 -16
- package/fesm2020/tag-select.mjs +7 -7
- package/fesm2020/xlsx.mjs +10 -10
- package/fesm2020/zip.mjs +7 -7
- package/package.json +4 -4
- package/qr/qr.component.d.ts +1 -1
- package/se/style/index.less +2 -0
package/fesm2020/auto-focus.mjs
CHANGED
|
@@ -27,15 +27,15 @@ class AutoFocusDirective {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
31
|
-
AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
30
|
+
AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: AutoFocusDirective, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: "enabled", delay: "delay" }, exportAs: ["autoFocus"], ngImport: i0 });
|
|
32
32
|
__decorate([
|
|
33
33
|
InputBoolean()
|
|
34
34
|
], AutoFocusDirective.prototype, "enabled", void 0);
|
|
35
35
|
__decorate([
|
|
36
36
|
InputNumber()
|
|
37
37
|
], AutoFocusDirective.prototype, "delay", void 0);
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
39
39
|
type: Directive,
|
|
40
40
|
args: [{
|
|
41
41
|
selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
|
|
@@ -50,10 +50,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
50
50
|
const COMPONENTS = [AutoFocusDirective];
|
|
51
51
|
class AutoFocusModule {
|
|
52
52
|
}
|
|
53
|
-
AutoFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
54
|
-
AutoFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
55
|
-
AutoFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
53
|
+
AutoFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
54
|
+
AutoFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], exports: [AutoFocusDirective] });
|
|
55
|
+
AutoFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AutoFocusModule });
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AutoFocusModule, decorators: [{
|
|
57
57
|
type: NgModule,
|
|
58
58
|
args: [{
|
|
59
59
|
declarations: COMPONENTS,
|
package/fesm2020/avatar-list.mjs
CHANGED
|
@@ -14,9 +14,9 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
|
14
14
|
|
|
15
15
|
class AvatarListItemComponent {
|
|
16
16
|
}
|
|
17
|
-
AvatarListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
18
|
-
AvatarListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
17
|
+
AvatarListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
AvatarListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: AvatarListItemComponent, selector: "avatar-list-item, [avatar-list-item]", inputs: { src: "src", text: "text", icon: "icon", tips: "tips" }, exportAs: ["avatarListItem"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListItemComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
21
21
|
args: [{
|
|
22
22
|
selector: 'avatar-list-item, [avatar-list-item]',
|
|
@@ -90,12 +90,12 @@ class AvatarListComponent {
|
|
|
90
90
|
this.destroy$.complete();
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
AvatarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
94
|
-
AvatarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
93
|
+
AvatarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
94
|
+
AvatarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: AvatarListComponent, selector: "avatar-list", inputs: { size: "size", maxLength: "maxLength", excessItemsStyle: "excessItemsStyle" }, host: { properties: { "class.avatar-list": "true", "class.avatar-list-rtl": "dir === 'rtl'" } }, queries: [{ propertyName: "_items", predicate: AvatarListItemComponent }], exportAs: ["avatarList"], usesOnChanges: true, ngImport: i0, template: "<ul class=\"avatar-list__wrap\">\n <li *ngFor=\"let i of items\" [ngClass]=\"cls\">\n <nz-avatar\n *ngIf=\"i.tips\"\n nz-tooltip\n [nzTooltipTitle]=\"i.tips\"\n [nzSrc]=\"i.src\"\n [nzText]=\"i.text\"\n [nzIcon]=\"i.icon\"\n [nzSize]=\"avatarSize\"\n ></nz-avatar>\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\"></nz-avatar>\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar\n [nzSize]=\"avatarSize\"\n style=\"cursor: auto\"\n [ngStyle]=\"excessItemsStyle\"\n [nzText]=\"'+' + exceedCount\"\n ></nz-avatar>\n </li>\n</ul>\n", components: [{ type: i2.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
95
95
|
__decorate([
|
|
96
96
|
InputNumber()
|
|
97
97
|
], AvatarListComponent.prototype, "maxLength", void 0);
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListComponent, decorators: [{
|
|
99
99
|
type: Component,
|
|
100
100
|
args: [{ selector: 'avatar-list', exportAs: 'avatarList', host: {
|
|
101
101
|
'[class.avatar-list]': 'true',
|
|
@@ -117,10 +117,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
117
117
|
const COMPONENTS = [AvatarListComponent, AvatarListItemComponent];
|
|
118
118
|
class AvatarListModule {
|
|
119
119
|
}
|
|
120
|
-
AvatarListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
121
|
-
AvatarListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
122
|
-
AvatarListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
120
|
+
AvatarListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
121
|
+
AvatarListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListModule, declarations: [AvatarListComponent, AvatarListItemComponent], imports: [CommonModule, NzAvatarModule, NzToolTipModule], exports: [AvatarListComponent, AvatarListItemComponent] });
|
|
122
|
+
AvatarListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListModule, imports: [[CommonModule, NzAvatarModule, NzToolTipModule]] });
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AvatarListModule, decorators: [{
|
|
124
124
|
type: NgModule,
|
|
125
125
|
args: [{
|
|
126
126
|
imports: [CommonModule, NzAvatarModule, NzToolTipModule],
|
package/fesm2020/count-down.mjs
CHANGED
|
@@ -23,9 +23,9 @@ class CountDownComponent {
|
|
|
23
23
|
this.event.emit(e);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
CountDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
27
|
-
CountDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
26
|
+
CountDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CountDownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
CountDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: CountDownComponent, selector: "count-down", inputs: { config: "config", target: "target" }, outputs: { event: "event" }, viewQueries: [{ propertyName: "instance", first: true, predicate: ["cd"], descendants: true }], exportAs: ["countDown"], ngImport: i0, template: ` <countdown #cd *ngIf="config" [config]="config" (event)="handleEvent($event)"></countdown> `, isInline: true, components: [{ type: i1.CountdownComponent, selector: "countdown", inputs: ["config", "render"], outputs: ["event"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CountDownComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{
|
|
31
31
|
selector: 'count-down',
|
|
@@ -49,10 +49,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
49
49
|
const COMPONENTS = [CountDownComponent];
|
|
50
50
|
class CountDownModule {
|
|
51
51
|
}
|
|
52
|
-
CountDownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
53
|
-
CountDownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
54
|
-
CountDownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
52
|
+
CountDownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CountDownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
53
|
+
CountDownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CountDownModule, declarations: [CountDownComponent], imports: [CommonModule, CountdownModule], exports: [CountDownComponent] });
|
|
54
|
+
CountDownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CountDownModule, imports: [[CommonModule, CountdownModule]] });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CountDownModule, decorators: [{
|
|
56
56
|
type: NgModule,
|
|
57
57
|
args: [{
|
|
58
58
|
imports: [CommonModule, CountdownModule],
|
package/fesm2020/date-picker.mjs
CHANGED
|
@@ -17,8 +17,8 @@ class RangePickerShortcutTplComponent {
|
|
|
17
17
|
}
|
|
18
18
|
click(_) { }
|
|
19
19
|
}
|
|
20
|
-
RangePickerShortcutTplComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
21
|
-
RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
20
|
+
RangePickerShortcutTplComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: RangePickerShortcutTplComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: RangePickerShortcutTplComponent, selector: "ng-component", viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, static: true }], ngImport: i0, template: `
|
|
22
22
|
<ng-template #tpl>
|
|
23
23
|
<a
|
|
24
24
|
*ngFor="let i of list; let first = first"
|
|
@@ -28,7 +28,7 @@ RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
28
28
|
></a>
|
|
29
29
|
</ng-template>
|
|
30
30
|
`, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: RangePickerShortcutTplComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{
|
|
34
34
|
selector: '',
|
|
@@ -193,9 +193,9 @@ class RangePickerDirective {
|
|
|
193
193
|
this.destroy$.complete();
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
RangePickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
197
|
-
RangePickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
196
|
+
RangePickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: RangePickerDirective, deps: [{ token: i1$1.DomSanitizer }, { token: i2.AlainConfigService }, { token: i3.NzRangePickerComponent, host: true, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
197
|
+
RangePickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: RangePickerDirective, selector: "nz-range-picker[extend]", inputs: { shortcut: "shortcut", ngModelEnd: "ngModelEnd" }, outputs: { ngModelEndChange: "ngModelEndChange" }, exportAs: ["extendRangePicker"], ngImport: i0 });
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: RangePickerDirective, decorators: [{
|
|
199
199
|
type: Directive,
|
|
200
200
|
args: [{
|
|
201
201
|
selector: 'nz-range-picker[extend]',
|
|
@@ -216,10 +216,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
216
216
|
const COMPONENTS = [RangePickerDirective, RangePickerShortcutTplComponent];
|
|
217
217
|
class DatePickerModule {
|
|
218
218
|
}
|
|
219
|
-
DatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
220
|
-
DatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
221
|
-
DatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
219
|
+
DatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
220
|
+
DatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DatePickerModule, declarations: [RangePickerDirective, RangePickerShortcutTplComponent], imports: [CommonModule, FormsModule, NzDatePickerModule], exports: [RangePickerDirective, RangePickerShortcutTplComponent] });
|
|
221
|
+
DatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DatePickerModule, imports: [[CommonModule, FormsModule, NzDatePickerModule]] });
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DatePickerModule, decorators: [{
|
|
223
223
|
type: NgModule,
|
|
224
224
|
args: [{
|
|
225
225
|
imports: [CommonModule, FormsModule, NzDatePickerModule],
|
package/fesm2020/down-file.mjs
CHANGED
|
@@ -81,9 +81,9 @@ class DownFileDirective {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
DownFileDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
85
|
-
DownFileDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
84
|
+
DownFileDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DownFileDirective, deps: [{ token: i0.ElementRef }, { token: i1._HttpClient }], target: i0.ɵɵFactoryTarget.Directive });
|
|
85
|
+
DownFileDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: DownFileDirective, selector: "[down-file]", inputs: { httpData: ["http-data", "httpData"], httpBody: ["http-body", "httpBody"], httpMethod: ["http-method", "httpMethod"], httpUrl: ["http-url", "httpUrl"], fileName: ["file-name", "fileName"], pre: "pre" }, outputs: { success: "success", error: "error" }, host: { listeners: { "click": "_click($event)" } }, exportAs: ["downFile"], ngImport: i0 });
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DownFileDirective, decorators: [{
|
|
87
87
|
type: Directive,
|
|
88
88
|
args: [{
|
|
89
89
|
selector: '[down-file]',
|
|
@@ -118,10 +118,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
118
118
|
const DIRECTIVES = [DownFileDirective];
|
|
119
119
|
class DownFileModule {
|
|
120
120
|
}
|
|
121
|
-
DownFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
122
|
-
DownFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
123
|
-
DownFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
121
|
+
DownFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DownFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
122
|
+
DownFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DownFileModule, declarations: [DownFileDirective], imports: [CommonModule, AlainThemeModule], exports: [DownFileDirective] });
|
|
123
|
+
DownFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DownFileModule, imports: [[CommonModule, AlainThemeModule]] });
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DownFileModule, decorators: [{
|
|
125
125
|
type: NgModule,
|
|
126
126
|
args: [{
|
|
127
127
|
imports: [CommonModule, AlainThemeModule],
|
package/fesm2020/ellipsis.mjs
CHANGED
|
@@ -33,6 +33,9 @@ class EllipsisComponent {
|
|
|
33
33
|
return ((targetCount > 0 ? text.substring(0, targetCount) : '') +
|
|
34
34
|
(targetCount > 0 && targetCount < text.length ? tail : ''));
|
|
35
35
|
}
|
|
36
|
+
get win() {
|
|
37
|
+
return this.doc.defaultView || window;
|
|
38
|
+
}
|
|
36
39
|
getStrFullLength(str) {
|
|
37
40
|
return str.split('').reduce((pre, cur) => {
|
|
38
41
|
const charCode = cur.charCodeAt(0);
|
|
@@ -134,7 +137,7 @@ class EllipsisComponent {
|
|
|
134
137
|
const { shadowOrgEl, shadowTextEl } = this;
|
|
135
138
|
const orgNode = shadowOrgEl.nativeElement;
|
|
136
139
|
const lineText = orgNode.innerText || orgNode.textContent;
|
|
137
|
-
const lineHeight = parseInt(getComputedStyle(this.getEl('.ellipsis')).lineHeight, 10);
|
|
140
|
+
const lineHeight = parseInt(this.win.getComputedStyle(this.getEl('.ellipsis')).lineHeight, 10);
|
|
138
141
|
const targetHeight = lines * lineHeight;
|
|
139
142
|
this.getEl('.ellipsis__handle').style.height = `${targetHeight}px`;
|
|
140
143
|
if (orgNode.offsetHeight <= targetHeight) {
|
|
@@ -189,8 +192,8 @@ class EllipsisComponent {
|
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
|
-
EllipsisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
193
|
-
EllipsisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
195
|
+
EllipsisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EllipsisComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.DomSanitizer }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
196
|
+
EllipsisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EllipsisComponent, selector: "ellipsis", inputs: { tooltip: "tooltip", length: "length", lines: "lines", fullWidthRecognition: "fullWidthRecognition", tail: "tail" }, viewQueries: [{ propertyName: "orgEl", first: true, predicate: ["orgEl"], descendants: true }, { propertyName: "shadowOrgEl", first: true, predicate: ["shadowOrgEl"], descendants: true }, { propertyName: "shadowTextEl", first: true, predicate: ["shadowTextEl"], descendants: true }], exportAs: ["ellipsis"], usesOnChanges: true, ngImport: i0, template: "<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\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</ng-container>\n", directives: [{ type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
194
197
|
__decorate([
|
|
195
198
|
InputBoolean()
|
|
196
199
|
], EllipsisComponent.prototype, "tooltip", void 0);
|
|
@@ -203,7 +206,7 @@ __decorate([
|
|
|
203
206
|
__decorate([
|
|
204
207
|
InputBoolean()
|
|
205
208
|
], EllipsisComponent.prototype, "fullWidthRecognition", void 0);
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EllipsisComponent, decorators: [{
|
|
207
210
|
type: Component,
|
|
208
211
|
args: [{ selector: 'ellipsis', exportAs: 'ellipsis', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\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</ng-container>\n" }]
|
|
209
212
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.DomSanitizer }, { type: undefined, decorators: [{
|
|
@@ -233,10 +236,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
233
236
|
const COMPONENTS = [EllipsisComponent];
|
|
234
237
|
class EllipsisModule {
|
|
235
238
|
}
|
|
236
|
-
EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
237
|
-
EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
238
|
-
EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
239
|
+
EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
240
|
+
EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EllipsisModule, declarations: [EllipsisComponent], imports: [CommonModule, ObserversModule, NzToolTipModule], exports: [EllipsisComponent] });
|
|
241
|
+
EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EllipsisModule, imports: [[CommonModule, ObserversModule, NzToolTipModule]] });
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EllipsisModule, decorators: [{
|
|
240
243
|
type: NgModule,
|
|
241
244
|
args: [{
|
|
242
245
|
imports: [CommonModule, ObserversModule, NzToolTipModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis.mjs","sources":["../../../../packages/abc/ellipsis/ellipsis.component.ts","../../../../packages/abc/ellipsis/ellipsis.component.html","../../../../packages/abc/ellipsis/ellipsis.module.ts","../../../../packages/abc/ellipsis/ellipsis.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { take } from 'rxjs/operators';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'ellipsis',\n exportAs: 'ellipsis',\n templateUrl: './ellipsis.component.html',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class EllipsisComponent implements AfterViewInit, OnChanges {\n static ngAcceptInputType_tooltip: BooleanInput;\n static ngAcceptInputType_length: NumberInput;\n static ngAcceptInputType_lines: NumberInput;\n static ngAcceptInputType_fullWidthRecognition: BooleanInput;\n\n private isSupportLineClamp = this.doc.body.style['webkitLineClamp'] !== undefined;\n @ViewChild('orgEl', { static: false }) private orgEl!: ElementRef;\n @ViewChild('shadowOrgEl', { static: false }) private shadowOrgEl!: ElementRef;\n @ViewChild('shadowTextEl', { static: false }) private shadowTextEl!: ElementRef;\n private inited = false;\n orgHtml!: SafeHtml;\n type = 'default';\n cls = {};\n text = '';\n targetCount = 0;\n\n @Input() @InputBoolean() tooltip = false;\n @Input() @InputNumber(null) length?: number;\n @Input() @InputNumber(null) lines?: number;\n @Input() @InputBoolean() fullWidthRecognition = false;\n @Input() tail = '...';\n\n 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 constructor(\n private el: ElementRef,\n private ngZone: NgZone,\n private dom: DomSanitizer,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n private cdr: ChangeDetectorRef\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, length, isSupportLineClamp } = this;\n this.cls = {\n ellipsis: true,\n ellipsis__lines: lines && !isSupportLineClamp,\n 'ellipsis__line-clamp': lines && isSupportLineClamp\n };\n if (!lines && !length) {\n this.type = 'default';\n } else if (!lines) {\n this.type = 'length';\n } else if (isSupportLineClamp) {\n this.type = 'line-clamp';\n } else {\n this.type = 'line';\n }\n }\n\n private gen(): void {\n const { type, lines, length, fullWidthRecognition, tail, orgEl, cdr, ngZone } = this;\n if (type === 'length') {\n const el = orgEl.nativeElement as HTMLElement;\n if (el.children.length > 0) {\n throw new Error('Ellipsis content must be string.');\n }\n const lengthText = el.textContent!;\n const textLength = fullWidthRecognition ? this.getStrFullLength(lengthText) : lengthText.length;\n if (textLength <= length! || length! < 0) {\n this.text = 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 = displayText + tail;\n }\n ngZone.run(() => cdr.detectChanges());\n } else if (type === 'line') {\n const { shadowOrgEl, shadowTextEl } = this;\n const orgNode = shadowOrgEl.nativeElement as HTMLElement;\n const lineText = orgNode.innerText || orgNode.textContent!;\n const lineHeight = parseInt(getComputedStyle(this.getEl('.ellipsis')).lineHeight!, 10);\n const targetHeight = lines! * lineHeight;\n this.getEl('.ellipsis__handle').style.height = `${targetHeight}px`;\n\n if (orgNode.offsetHeight <= targetHeight) {\n this.text = 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 count = this.bisection(targetHeight, mid, 0, len, lineText, shadowTextEl.nativeElement.firstChild);\n this.text = lineText;\n this.targetCount = count;\n }\n ngZone.run(() => cdr.detectChanges());\n }\n }\n\n private getEl(cls: string): HTMLElement {\n return this.el.nativeElement.querySelector(cls);\n }\n\n private executeOnStable(fn: () => void): void {\n if (this.ngZone.isStable) {\n fn();\n } else {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(fn);\n }\n }\n\n refresh(): void {\n this.genType();\n const { type, dom, orgEl, cdr } = this;\n const html = orgEl.nativeElement.innerHTML;\n this.orgHtml = dom.bypassSecurityTrustHtml(html);\n cdr.detectChanges();\n this.executeOnStable(() => {\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 ngAfterViewInit(): void {\n this.inited = true;\n this.refresh();\n }\n\n ngOnChanges(): void {\n if (this.inited) {\n this.refresh();\n }\n }\n}\n","<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\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</ng-container>\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],\n declarations: 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":";;;;;;;;;;;;;MA4Ba,iBAAiB;IA+B5B,YACU,EAAc,EACd,MAAc,EACd,GAAiB,EACC,GAAc,EAChC,GAAsB;QAJtB,OAAE,GAAF,EAAE,CAAY;QACd,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAc;QACC,QAAG,GAAH,GAAG,CAAW;QAChC,QAAG,GAAH,GAAG,CAAmB;QA9BxB,uBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,SAAS,CAAC;QAI1E,WAAM,GAAG,KAAK,CAAC;QAEvB,SAAI,GAAG,SAAS,CAAC;QACjB,QAAG,GAAG,EAAE,CAAC;QACT,SAAI,GAAG,EAAE,CAAC;QACV,gBAAW,GAAG,CAAC,CAAC;QAES,YAAO,GAAG,KAAK,CAAC;QAGhB,yBAAoB,GAAG,KAAK,CAAC;QAC7C,SAAI,GAAG,KAAK,CAAC;KAgBlB;IAdJ,IAAI,QAAQ;QACV,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACzC,QACE,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,C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AAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ellipsis.mjs","sources":["../../../../packages/abc/ellipsis/ellipsis.component.ts","../../../../packages/abc/ellipsis/ellipsis.component.html","../../../../packages/abc/ellipsis/ellipsis.module.ts","../../../../packages/abc/ellipsis/ellipsis.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { take } from 'rxjs/operators';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'ellipsis',\n exportAs: 'ellipsis',\n templateUrl: './ellipsis.component.html',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class EllipsisComponent implements AfterViewInit, OnChanges {\n static ngAcceptInputType_tooltip: BooleanInput;\n static ngAcceptInputType_length: NumberInput;\n static ngAcceptInputType_lines: NumberInput;\n static ngAcceptInputType_fullWidthRecognition: BooleanInput;\n\n private isSupportLineClamp = this.doc.body.style['webkitLineClamp'] !== undefined;\n @ViewChild('orgEl', { static: false }) private orgEl!: ElementRef;\n @ViewChild('shadowOrgEl', { static: false }) private shadowOrgEl!: ElementRef;\n @ViewChild('shadowTextEl', { static: false }) private shadowTextEl!: ElementRef;\n private inited = false;\n orgHtml!: SafeHtml;\n type = 'default';\n cls = {};\n text = '';\n targetCount = 0;\n\n @Input() @InputBoolean() tooltip = false;\n @Input() @InputNumber(null) length?: number;\n @Input() @InputNumber(null) lines?: number;\n @Input() @InputBoolean() fullWidthRecognition = false;\n @Input() tail = '...';\n\n 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 private el: ElementRef,\n private ngZone: NgZone,\n private dom: DomSanitizer,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n private cdr: ChangeDetectorRef\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, length, isSupportLineClamp } = this;\n this.cls = {\n ellipsis: true,\n ellipsis__lines: lines && !isSupportLineClamp,\n 'ellipsis__line-clamp': lines && isSupportLineClamp\n };\n if (!lines && !length) {\n this.type = 'default';\n } else if (!lines) {\n this.type = 'length';\n } else if (isSupportLineClamp) {\n this.type = 'line-clamp';\n } else {\n this.type = 'line';\n }\n }\n\n private gen(): void {\n const { type, lines, length, fullWidthRecognition, tail, orgEl, cdr, ngZone } = this;\n if (type === 'length') {\n const el = orgEl.nativeElement as HTMLElement;\n if (el.children.length > 0) {\n throw new Error('Ellipsis content must be string.');\n }\n const lengthText = el.textContent!;\n const textLength = fullWidthRecognition ? this.getStrFullLength(lengthText) : lengthText.length;\n if (textLength <= length! || length! < 0) {\n this.text = 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 = displayText + tail;\n }\n ngZone.run(() => cdr.detectChanges());\n } else if (type === 'line') {\n const { shadowOrgEl, shadowTextEl } = this;\n const orgNode = shadowOrgEl.nativeElement as HTMLElement;\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 this.getEl('.ellipsis__handle').style.height = `${targetHeight}px`;\n\n if (orgNode.offsetHeight <= targetHeight) {\n this.text = 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 count = this.bisection(targetHeight, mid, 0, len, lineText, shadowTextEl.nativeElement.firstChild);\n this.text = lineText;\n this.targetCount = count;\n }\n ngZone.run(() => cdr.detectChanges());\n }\n }\n\n private getEl(cls: string): HTMLElement {\n return this.el.nativeElement.querySelector(cls);\n }\n\n private executeOnStable(fn: () => void): void {\n if (this.ngZone.isStable) {\n fn();\n } else {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(fn);\n }\n }\n\n refresh(): void {\n this.genType();\n const { type, dom, orgEl, cdr } = this;\n const html = orgEl.nativeElement.innerHTML;\n this.orgHtml = dom.bypassSecurityTrustHtml(html);\n cdr.detectChanges();\n this.executeOnStable(() => {\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 ngAfterViewInit(): void {\n this.inited = true;\n this.refresh();\n }\n\n ngOnChanges(): void {\n if (this.inited) {\n this.refresh();\n }\n }\n}\n","<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\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</ng-container>\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],\n declarations: 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":";;;;;;;;;;;;;MA4Ba,iBAAiB;IAmC5B,YACU,EAAc,EACd,MAAc,EACd,GAAiB,EACC,GAAc,EAChC,GAAsB;QAJtB,OAAE,GAAF,EAAE,CAAY;QACd,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAc;QACC,QAAG,GAAH,GAAG,CAAW;QAChC,QAAG,GAAH,GAAG,CAAmB;QAlCxB,uBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,SAAS,CAAC;QAI1E,WAAM,GAAG,KAAK,CAAC;QAEvB,SAAI,GAAG,SAAS,CAAC;QACjB,QAAG,GAAG,EAAE,CAAC;QACT,SAAI,GAAG,EAAE,CAAC;QACV,gBAAW,GAAG,CAAC,CAAC;QAES,YAAO,GAAG,KAAK,CAAC;QAGhB,yBAAoB,GAAG,KAAK,CAAC;QAC7C,SAAI,GAAG,KAAK,CAAC;KAoBlB;IAlBJ,IAAI,QAAQ;QACV,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACzC,QACE,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC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AE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
|
|
@@ -7,15 +7,17 @@ import { takeUntil } from 'rxjs/operators';
|
|
|
7
7
|
import { InputNumber } from '@delon/util/decorator';
|
|
8
8
|
import * as i1 from '@delon/util/config';
|
|
9
9
|
import * as i2 from '@angular/cdk/bidi';
|
|
10
|
-
import * as i3 from '
|
|
10
|
+
import * as i3 from '@angular/cdk/platform';
|
|
11
|
+
import * as i4 from 'ng-zorro-antd/icon';
|
|
11
12
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
12
13
|
|
|
13
14
|
class ErrorCollectComponent {
|
|
14
|
-
constructor(el, cdr, doc, configSrv, directionality) {
|
|
15
|
+
constructor(el, cdr, doc, configSrv, directionality, platform) {
|
|
15
16
|
this.el = el;
|
|
16
17
|
this.cdr = cdr;
|
|
17
18
|
this.doc = doc;
|
|
18
19
|
this.directionality = directionality;
|
|
20
|
+
this.platform = platform;
|
|
19
21
|
this.formEl = null;
|
|
20
22
|
this.destroy$ = new Subject();
|
|
21
23
|
this._hiden = true;
|
|
@@ -67,6 +69,8 @@ class ErrorCollectComponent {
|
|
|
67
69
|
return retEl;
|
|
68
70
|
}
|
|
69
71
|
ngOnInit() {
|
|
72
|
+
if (!this.platform.isBrowser)
|
|
73
|
+
return;
|
|
70
74
|
this.formEl = this.findParent(this.el.nativeElement, 'form');
|
|
71
75
|
if (this.formEl === null)
|
|
72
76
|
throw new Error('No found form element');
|
|
@@ -77,18 +81,18 @@ class ErrorCollectComponent {
|
|
|
77
81
|
this.destroy$.complete();
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
|
-
ErrorCollectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
81
|
-
ErrorCollectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
84
|
+
ErrorCollectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ErrorCollectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }, { token: i1.AlainConfigService }, { token: i2.Directionality, optional: true }, { token: i3.Platform }], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
ErrorCollectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: { freq: "freq", offsetTop: "offsetTop" }, host: { listeners: { "click": "_click()" }, properties: { "class.error-collect": "true", "class.error-collect-rtl": "dir === 'rtl'", "class.d-none": "_hiden" } }, exportAs: ["errorCollect"], ngImport: i0, template: `
|
|
82
86
|
<i nz-icon nzType="exclamation-circle"></i>
|
|
83
87
|
<span class="error-collect__count">{{ count }}</span>
|
|
84
|
-
`, isInline: true, directives: [{ type:
|
|
88
|
+
`, isInline: true, directives: [{ type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
85
89
|
__decorate([
|
|
86
90
|
InputNumber()
|
|
87
91
|
], ErrorCollectComponent.prototype, "freq", void 0);
|
|
88
92
|
__decorate([
|
|
89
93
|
InputNumber()
|
|
90
94
|
], ErrorCollectComponent.prototype, "offsetTop", void 0);
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ErrorCollectComponent, decorators: [{
|
|
92
96
|
type: Component,
|
|
93
97
|
args: [{
|
|
94
98
|
selector: 'error-collect, [error-collect]',
|
|
@@ -112,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
112
116
|
args: [DOCUMENT]
|
|
113
117
|
}] }, { type: i1.AlainConfigService }, { type: i2.Directionality, decorators: [{
|
|
114
118
|
type: Optional
|
|
115
|
-
}] }]; }, propDecorators: { freq: [{
|
|
119
|
+
}] }, { type: i3.Platform }]; }, propDecorators: { freq: [{
|
|
116
120
|
type: Input
|
|
117
121
|
}], offsetTop: [{
|
|
118
122
|
type: Input
|
|
@@ -121,10 +125,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
121
125
|
const COMPONENTS = [ErrorCollectComponent];
|
|
122
126
|
class ErrorCollectModule {
|
|
123
127
|
}
|
|
124
|
-
ErrorCollectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
125
|
-
ErrorCollectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
126
|
-
ErrorCollectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
128
|
+
ErrorCollectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ErrorCollectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
129
|
+
ErrorCollectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ErrorCollectModule, declarations: [ErrorCollectComponent], imports: [CommonModule, NzIconModule], exports: [ErrorCollectComponent] });
|
|
130
|
+
ErrorCollectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ErrorCollectModule, imports: [[CommonModule, NzIconModule]] });
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ErrorCollectModule, decorators: [{
|
|
128
132
|
type: NgModule,
|
|
129
133
|
args: [{
|
|
130
134
|
imports: [CommonModule, NzIconModule],
|
|
@@ -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 { Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewEncapsulation\n} from '@angular/core';\nimport { interval, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport { InputNumber } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'error-collect, [error-collect]',\n exportAs: 'errorCollect',\n template: `\n <i nz-icon nzType=\"exclamation-circle\"></i>\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]': '_hiden',\n '(click)': '_click()'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class ErrorCollectComponent implements OnInit, OnDestroy {\n private formEl: HTMLFormElement | null = null;\n private destroy$ = new Subject<void>();\n\n _hiden = true;\n count = 0;\n dir: Direction = 'ltr';\n\n @Input() @InputNumber() freq!: number;\n @Input() @InputNumber() offsetTop!: number;\n\n constructor(\n private el: ElementRef,\n private cdr: ChangeDetectorRef,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n configSrv: AlainConfigService,\n @Optional() private directionality: Directionality\n ) {\n configSrv.attach(this, 'errorCollect', { freq: 500, 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 = count;\n this._hiden = count === 0;\n this.cdr.markForCheck();\n }\n\n _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 install(): void {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n });\n interval(this.freq)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.update());\n this.update();\n }\n\n private findParent(el: Element, 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 this.formEl = this.findParent(this.el.nativeElement, 'form');\n if (this.formEl === null) throw new Error('No found form element');\n this.install();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\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],\n declarations: 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":"
|
|
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 { Direction, Directionality } from '@angular/cdk/bidi';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewEncapsulation\n} from '@angular/core';\nimport { interval, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport { InputNumber } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'error-collect, [error-collect]',\n exportAs: 'errorCollect',\n template: `\n <i nz-icon nzType=\"exclamation-circle\"></i>\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]': '_hiden',\n '(click)': '_click()'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class ErrorCollectComponent implements OnInit, OnDestroy {\n private formEl: HTMLFormElement | null = null;\n private destroy$ = new Subject<void>();\n\n _hiden = true;\n count = 0;\n dir: Direction = 'ltr';\n\n @Input() @InputNumber() freq!: number;\n @Input() @InputNumber() offsetTop!: number;\n\n constructor(\n private el: ElementRef,\n private cdr: ChangeDetectorRef,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n configSrv: AlainConfigService,\n @Optional() private directionality: Directionality,\n private platform: Platform\n ) {\n configSrv.attach(this, 'errorCollect', { freq: 500, 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 = count;\n this._hiden = count === 0;\n this.cdr.markForCheck();\n }\n\n _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 install(): void {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n });\n interval(this.freq)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.update());\n this.update();\n }\n\n private findParent(el: Element, 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.nativeElement, 'form');\n if (this.formEl === null) throw new Error('No found form element');\n this.install();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\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],\n declarations: 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":";;;;;;;;;;;;;MAuCa,qBAAqB;IAWhC,YACU,EAAc,EACd,GAAsB,EACJ,GAAc,EACxC,SAA6B,EACT,cAA8B,EAC1C,QAAkB;QALlB,OAAE,GAAF,EAAE,CAAY;QACd,QAAG,GAAH,GAAG,CAAmB;QACJ,QAAG,GAAH,GAAG,CAAW;QAEpB,mBAAc,GAAd,cAAc,CAAgB;QAC1C,aAAQ,GAAR,QAAQ,CAAU;QAhBpB,WAAM,GAA2B,IAAI,CAAC;QACtC,aAAQ,GAAG,IAAI,OAA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;oBACxB,QAAQ,EAAE;;;GAGT;oBACD,IAAI,EAAE;wBACJ,uBAAuB,EAAE,MAAM;wBAC/B,2BAA2B,EAAE,eAAe;wBAC5C,gBAAgB,EAAE,QAAQ;wBAC1B,SAAS,EAAE,UAAU;qBACtB;oBACD,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;;0BAeI,MAAM;2BAAC,QAAQ;;0BAEf,QAAQ;mEARa,IAAI;sBAA3B,KAAK;gBACkB,SAAS;sBAAhC,KAAK;;;ACzCR,MAAM,UAAU,GAAG,CAAC,qBAAqB,CAAC,CAAC;MAO9B,kBAAkB;;+GAAlB,kBAAkB;gHAAlB,kBAAkB,iBAPX,qBAAqB,aAG7B,YAAY,EAAE,YAAY,aAHlB,qBAAqB;gHAO5B,kBAAkB,YAJpB,CAAC,YAAY,EAAE,YAAY,CAAC;2FAI1B,kBAAkB;kBAL9B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;oBACrC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
|
package/fesm2020/exception.mjs
CHANGED
|
@@ -84,9 +84,9 @@ class ExceptionComponent {
|
|
|
84
84
|
this.destroy$.complete();
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
ExceptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
88
|
-
ExceptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
87
|
+
ExceptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ExceptionComponent, deps: [{ token: i1.DelonLocaleService }, { token: i2.DomSanitizer }, { token: i3.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
+
ExceptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: ExceptionComponent, selector: "exception", inputs: { type: "type", img: "img", title: "title", desc: "desc", backRouterLink: "backRouterLink" }, host: { properties: { "class.exception": "true", "class.exception-rtl": "dir === 'rtl'" } }, viewQueries: [{ propertyName: "conTpl", first: true, predicate: ["conTpl"], descendants: true, static: true }], exportAs: ["exception"], ngImport: i0, template: "<div class=\"exception__img-block\">\n <div class=\"exception__img\" [style.backgroundImage]=\"_img\"></div>\n</div>\n<div class=\"exception__cont\">\n <h1 class=\"exception__cont-title\" [innerHTML]=\"_title\"></h1>\n <div class=\"exception__cont-desc\" [innerHTML]=\"_desc || locale[_type]\"></div>\n <div class=\"exception__cont-actions\">\n <div (cdkObserveContent)=\"checkContent()\" #conTpl>\n <ng-content></ng-content>\n </div>\n <button *ngIf=\"!hasCon\" nz-button [routerLink]=\"backRouterLink\" [nzType]=\"'primary'\">\n {{ locale.backToHome }}\n </button>\n </div>\n</div>\n", components: [{ type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }], directives: [{ type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { type: i8.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i9.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ExceptionComponent, decorators: [{
|
|
90
90
|
type: Component,
|
|
91
91
|
args: [{ selector: 'exception', exportAs: 'exception', host: {
|
|
92
92
|
'[class.exception]': 'true',
|
|
@@ -112,10 +112,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
112
112
|
const COMPONENTS = [ExceptionComponent];
|
|
113
113
|
class ExceptionModule {
|
|
114
114
|
}
|
|
115
|
-
ExceptionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
116
|
-
ExceptionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
117
|
-
ExceptionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
115
|
+
ExceptionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ExceptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
116
|
+
ExceptionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ExceptionModule, declarations: [ExceptionComponent], imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule], exports: [ExceptionComponent] });
|
|
117
|
+
ExceptionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ExceptionModule, imports: [[CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule]] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ExceptionModule, decorators: [{
|
|
119
119
|
type: NgModule,
|
|
120
120
|
args: [{
|
|
121
121
|
imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule],
|
|
@@ -28,12 +28,12 @@ class FooterToolbarComponent {
|
|
|
28
28
|
this.bodyCls.remove(CLSBODY);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
FooterToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
32
|
-
FooterToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
31
|
+
FooterToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FooterToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
FooterToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: FooterToolbarComponent, selector: "footer-toolbar", inputs: { errorCollect: "errorCollect", extra: "extra" }, exportAs: ["footerToolbar"], ngImport: i0, template: "<div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"footer-toolbar__right\">\n <error-collect *ngIf=\"errorCollect\"></error-collect>\n <ng-content></ng-content>\n</div>\n", components: [{ type: i1.ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: ["freq", "offsetTop"], exportAs: ["errorCollect"] }], directives: [{ type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33
33
|
__decorate([
|
|
34
34
|
InputBoolean()
|
|
35
35
|
], FooterToolbarComponent.prototype, "errorCollect", void 0);
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FooterToolbarComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
38
|
args: [{ selector: 'footer-toolbar', exportAs: 'footerToolbar', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"footer-toolbar__right\">\n <error-collect *ngIf=\"errorCollect\"></error-collect>\n <ng-content></ng-content>\n</div>\n" }]
|
|
39
39
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
@@ -48,10 +48,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
48
48
|
const COMPONENTS = [FooterToolbarComponent];
|
|
49
49
|
class FooterToolbarModule {
|
|
50
50
|
}
|
|
51
|
-
FooterToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
52
|
-
FooterToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
53
|
-
FooterToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
51
|
+
FooterToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FooterToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
52
|
+
FooterToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FooterToolbarModule, declarations: [FooterToolbarComponent], imports: [CommonModule, ErrorCollectModule, NzOutletModule], exports: [FooterToolbarComponent] });
|
|
53
|
+
FooterToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FooterToolbarModule, imports: [[CommonModule, ErrorCollectModule, NzOutletModule]] });
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FooterToolbarModule, decorators: [{
|
|
55
55
|
type: NgModule,
|
|
56
56
|
args: [{
|
|
57
57
|
imports: [CommonModule, ErrorCollectModule, NzOutletModule],
|