@delon/abc 15.0.0 → 15.0.1
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/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 +17 -17
- 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 +24 -24
- package/esm2020/down-file/down-file.directive.mjs +18 -18
- package/esm2020/down-file/down-file.module.mjs +4 -4
- package/esm2020/ellipsis/ellipsis.component.mjs +12 -12
- package/esm2020/ellipsis/ellipsis.module.mjs +4 -4
- package/esm2020/error-collect/error-collect.component.mjs +3 -3
- package/esm2020/error-collect/error-collect.module.mjs +4 -4
- package/esm2020/exception/exception.component.mjs +29 -29
- 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 +11 -11
- package/esm2020/global-footer/global-footer.module.mjs +4 -4
- package/esm2020/hotkey/hotkey.directive.mjs +9 -9
- package/esm2020/hotkey/hotkey.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 +7 -7
- package/esm2020/lodop/lodop.module.mjs +4 -4
- package/esm2020/lodop/lodop.service.mjs +3 -3
- package/esm2020/media/media.component.mjs +7 -7
- package/esm2020/media/media.module.mjs +4 -4
- package/esm2020/media/media.service.mjs +11 -11
- package/esm2020/notice-icon/notice-icon-tab.component.mjs +3 -3
- package/esm2020/notice-icon/notice-icon.component.mjs +7 -7
- package/esm2020/notice-icon/notice-icon.module.mjs +4 -4
- package/esm2020/observers/observer-size.mjs +10 -10
- package/esm2020/onboarding/onboarding.component.mjs +15 -15
- package/esm2020/onboarding/onboarding.module.mjs +4 -4
- package/esm2020/onboarding/onboarding.service.mjs +15 -15
- package/esm2020/page-header/page-header.component.mjs +18 -18
- package/esm2020/page-header/page-header.module.mjs +4 -4
- package/esm2020/pdf/pdf.component.mjs +35 -35
- package/esm2020/pdf/pdf.module.mjs +4 -4
- package/esm2020/qr/qr.component.mjs +3 -3
- 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 +11 -11
- package/esm2020/result/result.module.mjs +4 -4
- package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +8 -8
- package/esm2020/reuse-tab/reuse-tab-context.component.mjs +7 -7
- 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 +7 -7
- package/esm2020/reuse-tab/reuse-tab.module.mjs +4 -4
- package/esm2020/reuse-tab/reuse-tab.service.mjs +26 -26
- package/esm2020/se/se-container.component.mjs +21 -21
- package/esm2020/se/se.component.mjs +24 -24
- package/esm2020/se/se.module.mjs +4 -4
- package/esm2020/sg/sg-container.component.mjs +7 -7
- package/esm2020/sg/sg.component.mjs +7 -7
- 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 +7 -7
- 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 +67 -67
- 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 +12 -12
- 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/exception/exception.component.d.ts +1 -1
- package/fesm2015/auto-focus.mjs +7 -7
- package/fesm2015/avatar-list.mjs +23 -23
- package/fesm2015/avatar-list.mjs.map +1 -1
- package/fesm2015/chart-observer-size.mjs +10 -10
- package/fesm2015/count-down.mjs +7 -7
- package/fesm2015/date-picker.mjs +31 -31
- package/fesm2015/date-picker.mjs.map +1 -1
- package/fesm2015/down-file.mjs +21 -21
- package/fesm2015/down-file.mjs.map +1 -1
- package/fesm2015/ellipsis.mjs +15 -15
- package/fesm2015/ellipsis.mjs.map +1 -1
- package/fesm2015/error-collect.mjs +7 -7
- package/fesm2015/exception.mjs +32 -32
- package/fesm2015/exception.mjs.map +1 -1
- package/fesm2015/footer-toolbar.mjs +7 -7
- package/fesm2015/full-content.mjs +13 -13
- package/fesm2015/global-footer.mjs +17 -17
- package/fesm2015/global-footer.mjs.map +1 -1
- package/fesm2015/hotkey.mjs +12 -12
- package/fesm2015/hotkey.mjs.map +1 -1
- package/fesm2015/let.mjs +7 -7
- package/fesm2015/loading.mjs +13 -13
- package/fesm2015/loading.mjs.map +1 -1
- package/fesm2015/lodop.mjs +7 -7
- package/fesm2015/media.mjs +20 -20
- package/fesm2015/media.mjs.map +1 -1
- package/fesm2015/notice-icon.mjs +13 -13
- package/fesm2015/notice-icon.mjs.map +1 -1
- package/fesm2015/onboarding.mjs +32 -32
- package/fesm2015/onboarding.mjs.map +1 -1
- package/fesm2015/page-header.mjs +21 -21
- package/fesm2015/page-header.mjs.map +1 -1
- package/fesm2015/pdf.mjs +38 -38
- package/fesm2015/pdf.mjs.map +1 -1
- package/fesm2015/qr.mjs +7 -7
- package/fesm2015/quick-menu.mjs +7 -7
- package/fesm2015/result.mjs +14 -14
- package/fesm2015/result.mjs.map +1 -1
- package/fesm2015/reuse-tab.mjs +54 -54
- package/fesm2015/reuse-tab.mjs.map +1 -1
- package/fesm2015/se.mjs +48 -48
- package/fesm2015/se.mjs.map +1 -1
- package/fesm2015/sg.mjs +16 -16
- package/fesm2015/sg.mjs.map +1 -1
- package/fesm2015/st.mjs +97 -97
- package/fesm2015/st.mjs.map +1 -1
- package/fesm2015/sv.mjs +24 -24
- package/fesm2015/sv.mjs.map +1 -1
- 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 +23 -23
- package/fesm2020/avatar-list.mjs.map +1 -1
- package/fesm2020/chart-observer-size.mjs +10 -10
- package/fesm2020/count-down.mjs +7 -7
- package/fesm2020/date-picker.mjs +31 -31
- package/fesm2020/date-picker.mjs.map +1 -1
- package/fesm2020/down-file.mjs +21 -21
- package/fesm2020/down-file.mjs.map +1 -1
- package/fesm2020/ellipsis.mjs +15 -15
- package/fesm2020/ellipsis.mjs.map +1 -1
- package/fesm2020/error-collect.mjs +7 -7
- package/fesm2020/exception.mjs +32 -32
- package/fesm2020/exception.mjs.map +1 -1
- package/fesm2020/footer-toolbar.mjs +7 -7
- package/fesm2020/full-content.mjs +13 -13
- package/fesm2020/global-footer.mjs +17 -17
- package/fesm2020/global-footer.mjs.map +1 -1
- package/fesm2020/hotkey.mjs +12 -12
- package/fesm2020/hotkey.mjs.map +1 -1
- package/fesm2020/let.mjs +7 -7
- package/fesm2020/loading.mjs +13 -13
- package/fesm2020/loading.mjs.map +1 -1
- package/fesm2020/lodop.mjs +7 -7
- package/fesm2020/media.mjs +20 -20
- package/fesm2020/media.mjs.map +1 -1
- package/fesm2020/notice-icon.mjs +13 -13
- package/fesm2020/notice-icon.mjs.map +1 -1
- package/fesm2020/onboarding.mjs +32 -32
- package/fesm2020/onboarding.mjs.map +1 -1
- package/fesm2020/page-header.mjs +21 -21
- package/fesm2020/page-header.mjs.map +1 -1
- package/fesm2020/pdf.mjs +38 -38
- package/fesm2020/pdf.mjs.map +1 -1
- package/fesm2020/qr.mjs +7 -7
- package/fesm2020/quick-menu.mjs +7 -7
- package/fesm2020/result.mjs +14 -14
- package/fesm2020/result.mjs.map +1 -1
- package/fesm2020/reuse-tab.mjs +54 -54
- package/fesm2020/reuse-tab.mjs.map +1 -1
- package/fesm2020/se.mjs +48 -48
- package/fesm2020/se.mjs.map +1 -1
- package/fesm2020/sg.mjs +16 -16
- package/fesm2020/sg.mjs.map +1 -1
- package/fesm2020/st.mjs +97 -97
- package/fesm2020/st.mjs.map +1 -1
- package/fesm2020/sv.mjs +24 -24
- package/fesm2020/sv.mjs.map +1 -1
- package/fesm2020/tag-select.mjs +7 -7
- package/fesm2020/xlsx.mjs +10 -10
- package/fesm2020/zip.mjs +7 -7
- package/loading/loading.types.d.ts +1 -1
- package/lodop/lodop.types.d.ts +1 -1
- package/media/media.component.d.ts +1 -1
- package/onboarding/onboarding.types.d.ts +1 -1
- package/package.json +5 -5
- package/pdf/pdf.types.d.ts +2 -2
- package/reuse-tab/reuse-tab.interfaces.d.ts +5 -5
- package/se/se.types.d.ts +3 -3
- package/st/st.interfaces.d.ts +8 -8
- package/st/st.types.d.ts +1 -1
package/fesm2015/reuse-tab.mjs
CHANGED
|
@@ -23,10 +23,6 @@ import * as i7 from 'ng-zorro-antd/icon';
|
|
|
23
23
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
24
24
|
|
|
25
25
|
class ReuseTabContextMenuComponent {
|
|
26
|
-
constructor(i18nSrv) {
|
|
27
|
-
this.i18nSrv = i18nSrv;
|
|
28
|
-
this.close = new EventEmitter();
|
|
29
|
-
}
|
|
30
26
|
set i18n(value) {
|
|
31
27
|
this._i18n = Object.assign(Object.assign({}, this.i18nSrv.getData('reuseTab')), value);
|
|
32
28
|
}
|
|
@@ -36,6 +32,10 @@ class ReuseTabContextMenuComponent {
|
|
|
36
32
|
get includeNonCloseable() {
|
|
37
33
|
return this.event.ctrlKey;
|
|
38
34
|
}
|
|
35
|
+
constructor(i18nSrv) {
|
|
36
|
+
this.i18nSrv = i18nSrv;
|
|
37
|
+
this.close = new EventEmitter();
|
|
38
|
+
}
|
|
39
39
|
notify(type) {
|
|
40
40
|
this.close.next({
|
|
41
41
|
type,
|
|
@@ -70,9 +70,9 @@ class ReuseTabContextMenuComponent {
|
|
|
70
70
|
this.notify(null);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
74
|
-
ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
73
|
+
ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
+
ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ReuseTabContextMenuComponent, selector: "reuse-tab-context-menu", inputs: { i18n: "i18n", item: "item", event: "event", customContextMenu: "customContextMenu" }, outputs: { close: "close" }, host: { listeners: { "document:click": "closeMenu($event)", "document:contextmenu": "closeMenu($event)" } }, ngImport: i0, template: "<ul nz-menu>\n <li\n *ngIf=\"item.active\"\n nz-menu-item\n (click)=\"click($event, 'refresh')\"\n data-type=\"refresh\"\n [innerHTML]=\"i18n.refresh\"\n ></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'close')\"\n data-type=\"close\"\n [nzDisabled]=\"!item.closable\"\n [innerHTML]=\"i18n.close\"\n ></li>\n <li nz-menu-item (click)=\"click($event, 'closeOther')\" data-type=\"closeOther\" [innerHTML]=\"i18n.closeOther\"></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'closeRight')\"\n data-type=\"closeRight\"\n [nzDisabled]=\"item.last\"\n [innerHTML]=\"i18n.closeRight\"\n ></li>\n <ng-container *ngIf=\"customContextMenu!.length > 0\">\n <li nz-menu-divider></li>\n <li\n *ngFor=\"let i of customContextMenu\"\n nz-menu-item\n [attr.data-type]=\"i.id\"\n [nzDisabled]=\"isDisabled(i)\"\n (click)=\"click($event, 'custom', i)\"\n [innerHTML]=\"i.title\"\n ></li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i3.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i3.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
|
|
76
76
|
type: Component,
|
|
77
77
|
args: [{ selector: 'reuse-tab-context-menu', host: {
|
|
78
78
|
'(document:click)': 'closeMenu($event)',
|
|
@@ -132,13 +132,16 @@ class ReuseTabContextService {
|
|
|
132
132
|
comp.onDestroy(() => sub$.unsubscribe());
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
136
|
-
ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
135
|
+
ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
136
|
+
ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextService });
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextService, decorators: [{
|
|
138
138
|
type: Injectable
|
|
139
139
|
}], ctorParameters: function () { return [{ type: i1$1.Overlay }]; } });
|
|
140
140
|
|
|
141
141
|
class ReuseTabContextComponent {
|
|
142
|
+
set i18n(value) {
|
|
143
|
+
this.srv.i18n = value;
|
|
144
|
+
}
|
|
142
145
|
constructor(srv) {
|
|
143
146
|
this.srv = srv;
|
|
144
147
|
this.sub$ = new Subscription();
|
|
@@ -146,16 +149,13 @@ class ReuseTabContextComponent {
|
|
|
146
149
|
this.sub$.add(srv.show.subscribe(context => this.srv.open(context)));
|
|
147
150
|
this.sub$.add(srv.close.subscribe(res => this.change.emit(res)));
|
|
148
151
|
}
|
|
149
|
-
set i18n(value) {
|
|
150
|
-
this.srv.i18n = value;
|
|
151
|
-
}
|
|
152
152
|
ngOnDestroy() {
|
|
153
153
|
this.sub$.unsubscribe();
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
157
|
-
ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
156
|
+
ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
+
ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: { i18n: "i18n" }, outputs: { change: "change" }, ngImport: i0, template: ``, isInline: true });
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
|
|
159
159
|
type: Component,
|
|
160
160
|
args: [{
|
|
161
161
|
selector: 'reuse-tab-context',
|
|
@@ -181,9 +181,9 @@ class ReuseTabContextDirective {
|
|
|
181
181
|
event.stopPropagation();
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
185
|
-
ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
184
|
+
ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
185
|
+
ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.2", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: { item: ["reuse-tab-context-menu", "item"], customContextMenu: "customContextMenu" }, host: { listeners: { "contextmenu": "_onContextMenu($event)" } }, exportAs: ["reuseTabContextMenu"], ngImport: i0 });
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
|
|
187
187
|
type: Directive,
|
|
188
188
|
args: [{
|
|
189
189
|
selector: '[reuse-tab-context-menu]',
|
|
@@ -248,28 +248,6 @@ class ReuseTabLocalStorageState {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
class ReuseTabService {
|
|
251
|
-
// #endregion
|
|
252
|
-
constructor(injector, menuService, stateKey, stateSrv) {
|
|
253
|
-
this.injector = injector;
|
|
254
|
-
this.menuService = menuService;
|
|
255
|
-
this.stateKey = stateKey;
|
|
256
|
-
this.stateSrv = stateSrv;
|
|
257
|
-
this._inited = false;
|
|
258
|
-
this._max = 10;
|
|
259
|
-
this._keepingScroll = false;
|
|
260
|
-
this._cachedChange = new BehaviorSubject(null);
|
|
261
|
-
this._cached = [];
|
|
262
|
-
this._titleCached = {};
|
|
263
|
-
this._closableCached = {};
|
|
264
|
-
this.removeUrlBuffer = null;
|
|
265
|
-
this.positionBuffer = {};
|
|
266
|
-
this.debug = false;
|
|
267
|
-
this.routeParamMatchMode = 'strict';
|
|
268
|
-
this.mode = ReuseTabMatchMode.Menu;
|
|
269
|
-
/** 排除规则,限 `mode=URL` */
|
|
270
|
-
this.excludes = [];
|
|
271
|
-
this.storageState = false;
|
|
272
|
-
}
|
|
273
251
|
get snapshot() {
|
|
274
252
|
return this.injector.get(ActivatedRoute).snapshot;
|
|
275
253
|
}
|
|
@@ -576,6 +554,28 @@ class ReuseTabService {
|
|
|
576
554
|
console.warn(...args);
|
|
577
555
|
}
|
|
578
556
|
}
|
|
557
|
+
// #endregion
|
|
558
|
+
constructor(injector, menuService, stateKey, stateSrv) {
|
|
559
|
+
this.injector = injector;
|
|
560
|
+
this.menuService = menuService;
|
|
561
|
+
this.stateKey = stateKey;
|
|
562
|
+
this.stateSrv = stateSrv;
|
|
563
|
+
this._inited = false;
|
|
564
|
+
this._max = 10;
|
|
565
|
+
this._keepingScroll = false;
|
|
566
|
+
this._cachedChange = new BehaviorSubject(null);
|
|
567
|
+
this._cached = [];
|
|
568
|
+
this._titleCached = {};
|
|
569
|
+
this._closableCached = {};
|
|
570
|
+
this.removeUrlBuffer = null;
|
|
571
|
+
this.positionBuffer = {};
|
|
572
|
+
this.debug = false;
|
|
573
|
+
this.routeParamMatchMode = 'strict';
|
|
574
|
+
this.mode = ReuseTabMatchMode.Menu;
|
|
575
|
+
/** 排除规则,限 `mode=URL` */
|
|
576
|
+
this.excludes = [];
|
|
577
|
+
this.storageState = false;
|
|
578
|
+
}
|
|
579
579
|
init() {
|
|
580
580
|
this.initScroll();
|
|
581
581
|
this._inited = true;
|
|
@@ -782,9 +782,9 @@ class ReuseTabService {
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
786
|
-
ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
787
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
785
|
+
ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabService, deps: [{ token: i0.Injector }, { token: i1.MenuService }, { token: REUSE_TAB_STORAGE_KEY, optional: true }, { token: REUSE_TAB_STORAGE_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
786
|
+
ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
|
|
787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabService, decorators: [{
|
|
788
788
|
type: Injectable,
|
|
789
789
|
args: [{ providedIn: 'root' }]
|
|
790
790
|
}], ctorParameters: function () {
|
|
@@ -802,6 +802,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
802
802
|
} });
|
|
803
803
|
|
|
804
804
|
class ReuseTabComponent {
|
|
805
|
+
set keepingScrollContainer(value) {
|
|
806
|
+
this._keepingScrollContainer = typeof value === 'string' ? this.doc.querySelector(value) : value;
|
|
807
|
+
}
|
|
805
808
|
// #endregion
|
|
806
809
|
constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality, stateKey, stateSrv) {
|
|
807
810
|
this.srv = srv;
|
|
@@ -832,9 +835,6 @@ class ReuseTabComponent {
|
|
|
832
835
|
this.change = new EventEmitter();
|
|
833
836
|
this.close = new EventEmitter();
|
|
834
837
|
}
|
|
835
|
-
set keepingScrollContainer(value) {
|
|
836
|
-
this._keepingScrollContainer = typeof value === 'string' ? this.doc.querySelector(value) : value;
|
|
837
|
-
}
|
|
838
838
|
genTit(title) {
|
|
839
839
|
return title.i18n && this.i18nSrv ? this.i18nSrv.fanyi(title.i18n) : title.text;
|
|
840
840
|
}
|
|
@@ -1052,8 +1052,8 @@ class ReuseTabComponent {
|
|
|
1052
1052
|
destroy$.complete();
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1056
|
-
ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1055
|
+
ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabComponent, deps: [{ token: ReuseTabService }, { token: i0.ChangeDetectorRef }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }, { token: i3$1.Platform }, { token: i4.Directionality, optional: true }, { token: REUSE_TAB_STORAGE_KEY, optional: true }, { token: REUSE_TAB_STORAGE_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1056
|
+
ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: { mode: "mode", i18n: "i18n", debug: "debug", max: "max", tabMaxWidth: "tabMaxWidth", excludes: "excludes", allowClose: "allowClose", keepingScroll: "keepingScroll", storageState: "storageState", keepingScrollContainer: "keepingScrollContainer", customContextMenu: "customContextMenu", tabBarExtraContent: "tabBarExtraContent", tabBarGutter: "tabBarGutter", tabBarStyle: "tabBarStyle", tabType: "tabType", routeParamMatchMode: "routeParamMatchMode", disabled: "disabled", titleRender: "titleRender", canClose: "canClose" }, outputs: { change: "change", close: "close" }, host: { properties: { "class.reuse-tab": "true", "class.reuse-tab__line": "tabType === 'line'", "class.reuse-tab__card": "tabType === 'card'", "class.reuse-tab__disabled": "disabled", "class.reuse-tab-rtl": "dir === 'rtl'" } }, providers: [ReuseTabContextService], viewQueries: [{ propertyName: "tabset", first: true, predicate: ["tabset"], descendants: true }], exportAs: ["reuseTab"], usesOnChanges: true, ngImport: i0, template: "<nz-tabset\n #tabset\n [nzSelectedIndex]=\"pos\"\n [nzAnimated]=\"false\"\n [nzType]=\"tabType\"\n [nzTabBarExtraContent]=\"tabBarExtraContent\"\n [nzTabBarGutter]=\"tabBarGutter\"\n [nzTabBarStyle]=\"tabBarStyle\"\n>\n <nz-tab *ngFor=\"let i of list; let index = index\" [nzTitle]=\"titleTemplate\" (nzClick)=\"_to(index)\">\n <ng-template #titleTemplate>\n <div\n [reuse-tab-context-menu]=\"i\"\n [customContextMenu]=\"customContextMenu\"\n class=\"reuse-tab__name\"\n [attr.title]=\"i.title\"\n >\n <span [class.reuse-tab__name-width]=\"tabMaxWidth\" [style.max-width.px]=\"tabMaxWidth\">\n <ng-container\n *ngIf=\"titleRender; else defaultTitle\"\n [ngTemplateOutlet]=\"titleRender\"\n [ngTemplateOutletContext]=\"{ $implicit: i }\"\n ></ng-container>\n <ng-template #defaultTitle>{{ i.title }}</ng-template>\n </span>\n </div>\n <i *ngIf=\"i.closable\" nz-icon nzType=\"close\" class=\"reuse-tab__op\" (click)=\"_close($event, index, false)\"></i>\n </ng-template>\n </nz-tab>\n</nz-tabset>\n<reuse-tab-context [i18n]=\"i18n\" (change)=\"contextMenuChange($event)\"></reuse-tab-context>\n", dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i6.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "directive", type: i7.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: ["i18n"], outputs: ["change"] }, { kind: "directive", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: ["reuse-tab-context-menu", "customContextMenu"], exportAs: ["reuseTabContextMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1057
1057
|
__decorate([
|
|
1058
1058
|
InputBoolean()
|
|
1059
1059
|
], ReuseTabComponent.prototype, "debug", void 0);
|
|
@@ -1075,7 +1075,7 @@ __decorate([
|
|
|
1075
1075
|
__decorate([
|
|
1076
1076
|
InputBoolean()
|
|
1077
1077
|
], ReuseTabComponent.prototype, "disabled", void 0);
|
|
1078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabComponent, decorators: [{
|
|
1079
1079
|
type: Component,
|
|
1080
1080
|
args: [{ selector: 'reuse-tab, [reuse-tab]', exportAs: 'reuseTab', host: {
|
|
1081
1081
|
'[class.reuse-tab]': 'true',
|
|
@@ -1178,9 +1178,9 @@ const COMPONENTS = [ReuseTabComponent];
|
|
|
1178
1178
|
const NOEXPORTS = [ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective];
|
|
1179
1179
|
class ReuseTabModule {
|
|
1180
1180
|
}
|
|
1181
|
-
ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1182
|
-
ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
1183
|
-
ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
1181
|
+
ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1182
|
+
ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
|
|
1183
|
+
ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabModule, providers: [
|
|
1184
1184
|
{
|
|
1185
1185
|
provide: REUSE_TAB_STORAGE_KEY,
|
|
1186
1186
|
useValue: '_reuse-tab-state'
|
|
@@ -1190,7 +1190,7 @@ ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
1190
1190
|
useFactory: () => new ReuseTabLocalStorageState()
|
|
1191
1191
|
}
|
|
1192
1192
|
], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule] });
|
|
1193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ReuseTabModule, decorators: [{
|
|
1194
1194
|
type: NgModule,
|
|
1195
1195
|
args: [{
|
|
1196
1196
|
imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule],
|