@delon/abc 15.0.0 → 15.1.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/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/fesm2020/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 = {
|
|
32
28
|
...this.i18nSrv.getData('reuseTab'),
|
|
@@ -39,6 +35,10 @@ class ReuseTabContextMenuComponent {
|
|
|
39
35
|
get includeNonCloseable() {
|
|
40
36
|
return this.event.ctrlKey;
|
|
41
37
|
}
|
|
38
|
+
constructor(i18nSrv) {
|
|
39
|
+
this.i18nSrv = i18nSrv;
|
|
40
|
+
this.close = new EventEmitter();
|
|
41
|
+
}
|
|
42
42
|
notify(type) {
|
|
43
43
|
this.close.next({
|
|
44
44
|
type,
|
|
@@ -73,9 +73,9 @@ class ReuseTabContextMenuComponent {
|
|
|
73
73
|
this.notify(null);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
77
|
-
ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
76
|
+
ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
77
|
+
ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", 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 });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{ selector: 'reuse-tab-context-menu', host: {
|
|
81
81
|
'(document:click)': 'closeMenu($event)',
|
|
@@ -135,13 +135,16 @@ class ReuseTabContextService {
|
|
|
135
135
|
comp.onDestroy(() => sub$.unsubscribe());
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
139
|
-
ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
138
|
+
ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
139
|
+
ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextService });
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextService, decorators: [{
|
|
141
141
|
type: Injectable
|
|
142
142
|
}], ctorParameters: function () { return [{ type: i1$1.Overlay }]; } });
|
|
143
143
|
|
|
144
144
|
class ReuseTabContextComponent {
|
|
145
|
+
set i18n(value) {
|
|
146
|
+
this.srv.i18n = value;
|
|
147
|
+
}
|
|
145
148
|
constructor(srv) {
|
|
146
149
|
this.srv = srv;
|
|
147
150
|
this.sub$ = new Subscription();
|
|
@@ -149,16 +152,13 @@ class ReuseTabContextComponent {
|
|
|
149
152
|
this.sub$.add(srv.show.subscribe(context => this.srv.open(context)));
|
|
150
153
|
this.sub$.add(srv.close.subscribe(res => this.change.emit(res)));
|
|
151
154
|
}
|
|
152
|
-
set i18n(value) {
|
|
153
|
-
this.srv.i18n = value;
|
|
154
|
-
}
|
|
155
155
|
ngOnDestroy() {
|
|
156
156
|
this.sub$.unsubscribe();
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
160
|
-
ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
159
|
+
ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: { i18n: "i18n" }, outputs: { change: "change" }, ngImport: i0, template: ``, isInline: true });
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
|
|
162
162
|
type: Component,
|
|
163
163
|
args: [{
|
|
164
164
|
selector: 'reuse-tab-context',
|
|
@@ -184,9 +184,9 @@ class ReuseTabContextDirective {
|
|
|
184
184
|
event.stopPropagation();
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
188
|
-
ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
187
|
+
ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
188
|
+
ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.5", 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 });
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
|
|
190
190
|
type: Directive,
|
|
191
191
|
args: [{
|
|
192
192
|
selector: '[reuse-tab-context-menu]',
|
|
@@ -251,28 +251,6 @@ class ReuseTabLocalStorageState {
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
class ReuseTabService {
|
|
254
|
-
// #endregion
|
|
255
|
-
constructor(injector, menuService, stateKey, stateSrv) {
|
|
256
|
-
this.injector = injector;
|
|
257
|
-
this.menuService = menuService;
|
|
258
|
-
this.stateKey = stateKey;
|
|
259
|
-
this.stateSrv = stateSrv;
|
|
260
|
-
this._inited = false;
|
|
261
|
-
this._max = 10;
|
|
262
|
-
this._keepingScroll = false;
|
|
263
|
-
this._cachedChange = new BehaviorSubject(null);
|
|
264
|
-
this._cached = [];
|
|
265
|
-
this._titleCached = {};
|
|
266
|
-
this._closableCached = {};
|
|
267
|
-
this.removeUrlBuffer = null;
|
|
268
|
-
this.positionBuffer = {};
|
|
269
|
-
this.debug = false;
|
|
270
|
-
this.routeParamMatchMode = 'strict';
|
|
271
|
-
this.mode = ReuseTabMatchMode.Menu;
|
|
272
|
-
/** 排除规则,限 `mode=URL` */
|
|
273
|
-
this.excludes = [];
|
|
274
|
-
this.storageState = false;
|
|
275
|
-
}
|
|
276
254
|
get snapshot() {
|
|
277
255
|
return this.injector.get(ActivatedRoute).snapshot;
|
|
278
256
|
}
|
|
@@ -579,6 +557,28 @@ class ReuseTabService {
|
|
|
579
557
|
console.warn(...args);
|
|
580
558
|
}
|
|
581
559
|
}
|
|
560
|
+
// #endregion
|
|
561
|
+
constructor(injector, menuService, stateKey, stateSrv) {
|
|
562
|
+
this.injector = injector;
|
|
563
|
+
this.menuService = menuService;
|
|
564
|
+
this.stateKey = stateKey;
|
|
565
|
+
this.stateSrv = stateSrv;
|
|
566
|
+
this._inited = false;
|
|
567
|
+
this._max = 10;
|
|
568
|
+
this._keepingScroll = false;
|
|
569
|
+
this._cachedChange = new BehaviorSubject(null);
|
|
570
|
+
this._cached = [];
|
|
571
|
+
this._titleCached = {};
|
|
572
|
+
this._closableCached = {};
|
|
573
|
+
this.removeUrlBuffer = null;
|
|
574
|
+
this.positionBuffer = {};
|
|
575
|
+
this.debug = false;
|
|
576
|
+
this.routeParamMatchMode = 'strict';
|
|
577
|
+
this.mode = ReuseTabMatchMode.Menu;
|
|
578
|
+
/** 排除规则,限 `mode=URL` */
|
|
579
|
+
this.excludes = [];
|
|
580
|
+
this.storageState = false;
|
|
581
|
+
}
|
|
582
582
|
init() {
|
|
583
583
|
this.initScroll();
|
|
584
584
|
this._inited = true;
|
|
@@ -783,9 +783,9 @@ class ReuseTabService {
|
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
787
|
-
ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
786
|
+
ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", 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 });
|
|
787
|
+
ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
|
|
788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabService, decorators: [{
|
|
789
789
|
type: Injectable,
|
|
790
790
|
args: [{ providedIn: 'root' }]
|
|
791
791
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.MenuService }, { type: undefined, decorators: [{
|
|
@@ -801,6 +801,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
801
801
|
}] }]; } });
|
|
802
802
|
|
|
803
803
|
class ReuseTabComponent {
|
|
804
|
+
set keepingScrollContainer(value) {
|
|
805
|
+
this._keepingScrollContainer = typeof value === 'string' ? this.doc.querySelector(value) : value;
|
|
806
|
+
}
|
|
804
807
|
// #endregion
|
|
805
808
|
constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality, stateKey, stateSrv) {
|
|
806
809
|
this.srv = srv;
|
|
@@ -831,9 +834,6 @@ class ReuseTabComponent {
|
|
|
831
834
|
this.change = new EventEmitter();
|
|
832
835
|
this.close = new EventEmitter();
|
|
833
836
|
}
|
|
834
|
-
set keepingScrollContainer(value) {
|
|
835
|
-
this._keepingScrollContainer = typeof value === 'string' ? this.doc.querySelector(value) : value;
|
|
836
|
-
}
|
|
837
837
|
genTit(title) {
|
|
838
838
|
return title.i18n && this.i18nSrv ? this.i18nSrv.fanyi(title.i18n) : title.text;
|
|
839
839
|
}
|
|
@@ -1049,8 +1049,8 @@ class ReuseTabComponent {
|
|
|
1049
1049
|
destroy$.complete();
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
|
-
ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1053
|
-
ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1052
|
+
ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", 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 });
|
|
1053
|
+
ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", 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 });
|
|
1054
1054
|
__decorate([
|
|
1055
1055
|
InputBoolean()
|
|
1056
1056
|
], ReuseTabComponent.prototype, "debug", void 0);
|
|
@@ -1072,7 +1072,7 @@ __decorate([
|
|
|
1072
1072
|
__decorate([
|
|
1073
1073
|
InputBoolean()
|
|
1074
1074
|
], ReuseTabComponent.prototype, "disabled", void 0);
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabComponent, decorators: [{
|
|
1076
1076
|
type: Component,
|
|
1077
1077
|
args: [{ selector: 'reuse-tab, [reuse-tab]', exportAs: 'reuseTab', host: {
|
|
1078
1078
|
'[class.reuse-tab]': 'true',
|
|
@@ -1173,9 +1173,9 @@ const COMPONENTS = [ReuseTabComponent];
|
|
|
1173
1173
|
const NOEXPORTS = [ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective];
|
|
1174
1174
|
class ReuseTabModule {
|
|
1175
1175
|
}
|
|
1176
|
-
ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1177
|
-
ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
1178
|
-
ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
1176
|
+
ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1177
|
+
ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
|
|
1178
|
+
ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabModule, providers: [
|
|
1179
1179
|
{
|
|
1180
1180
|
provide: REUSE_TAB_STORAGE_KEY,
|
|
1181
1181
|
useValue: '_reuse-tab-state'
|
|
@@ -1185,7 +1185,7 @@ ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
1185
1185
|
useFactory: () => new ReuseTabLocalStorageState()
|
|
1186
1186
|
}
|
|
1187
1187
|
], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule] });
|
|
1188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ReuseTabModule, decorators: [{
|
|
1189
1189
|
type: NgModule,
|
|
1190
1190
|
args: [{
|
|
1191
1191
|
imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule],
|