@delon/abc 17.0.4 → 17.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/auto-focus/auto-focus.directive.d.ts +7 -12
- package/avatar-list/avatar-list-item.component.d.ts +1 -1
- package/avatar-list/avatar-list.component.d.ts +10 -12
- package/avatar-list/avatar-list.module.d.ts +6 -6
- package/cell/cell-host.directive.d.ts +3 -5
- package/cell/cell.component.d.ts +10 -15
- package/cell/cell.service.d.ts +4 -7
- package/count-down/count-down.component.d.ts +1 -1
- package/count-down/count-down.module.d.ts +4 -4
- package/date-picker/date-picker.module.d.ts +6 -6
- package/date-picker/range-shortcut.component.d.ts +2 -2
- package/date-picker/range.directive.d.ts +7 -9
- package/down-file/down-file.directive.d.ts +6 -7
- package/down-file/down-file.module.d.ts +4 -4
- package/ellipsis/ellipsis.component.d.ts +12 -15
- package/ellipsis/ellipsis.module.d.ts +5 -5
- package/error-collect/error-collect.component.d.ts +14 -14
- package/error-collect/error-collect.module.d.ts +4 -4
- package/esm2022/auto-focus/auto-focus.directive.mjs +21 -32
- package/esm2022/auto-focus/auto-focus.module.mjs +4 -4
- package/esm2022/avatar-list/avatar-list-item.component.mjs +6 -5
- package/esm2022/avatar-list/avatar-list.component.mjs +28 -34
- package/esm2022/avatar-list/avatar-list.module.mjs +6 -7
- package/esm2022/cell/cell-host.directive.mjs +10 -10
- package/esm2022/cell/cell.component.mjs +43 -59
- package/esm2022/cell/cell.module.mjs +4 -4
- package/esm2022/cell/cell.service.mjs +13 -14
- package/esm2022/count-down/count-down.component.mjs +9 -7
- package/esm2022/count-down/count-down.module.mjs +6 -7
- package/esm2022/date-picker/date-picker.module.mjs +6 -7
- package/esm2022/date-picker/range-shortcut.component.mjs +9 -9
- package/esm2022/date-picker/range.directive.mjs +16 -19
- package/esm2022/down-file/down-file.directive.mjs +17 -18
- package/esm2022/down-file/down-file.module.mjs +7 -8
- package/esm2022/ellipsis/ellipsis.component.mjs +36 -49
- package/esm2022/ellipsis/ellipsis.module.mjs +6 -7
- package/esm2022/error-collect/error-collect.component.mjs +27 -36
- package/esm2022/error-collect/error-collect.module.mjs +6 -7
- package/esm2022/exception/exception.component.mjs +21 -25
- package/esm2022/exception/exception.module.mjs +6 -7
- package/esm2022/footer-toolbar/footer-toolbar.component.mjs +18 -28
- package/esm2022/footer-toolbar/footer-toolbar.module.mjs +6 -7
- package/esm2022/full-content/full-content-toggle.directive.mjs +11 -10
- package/esm2022/full-content/full-content.component.mjs +26 -38
- package/esm2022/full-content/full-content.module.mjs +6 -7
- package/esm2022/full-content/full-content.service.mjs +3 -3
- package/esm2022/global-footer/global-footer-item.component.mjs +9 -12
- package/esm2022/global-footer/global-footer.component.mjs +23 -28
- package/esm2022/global-footer/global-footer.module.mjs +6 -7
- package/esm2022/hotkey/hotkey.directive.mjs +14 -14
- package/esm2022/hotkey/hotkey.module.mjs +4 -4
- package/esm2022/let/let.directive.mjs +3 -3
- package/esm2022/let/let.module.mjs +4 -4
- package/esm2022/loading/loading.component.mjs +8 -8
- package/esm2022/loading/loading.module.mjs +6 -7
- package/esm2022/loading/loading.service.mjs +15 -17
- package/esm2022/lodop/lodop.module.mjs +4 -4
- package/esm2022/lodop/lodop.service.mjs +10 -10
- package/esm2022/media/media.component.mjs +24 -25
- package/esm2022/media/media.module.mjs +6 -7
- package/esm2022/media/media.service.mjs +15 -15
- package/esm2022/notice-icon/notice-icon-tab.component.mjs +16 -9
- package/esm2022/notice-icon/notice-icon.component.mjs +40 -39
- package/esm2022/notice-icon/notice-icon.module.mjs +10 -9
- package/esm2022/observers/observer-size.mjs +18 -18
- package/esm2022/onboarding/onboarding.component.mjs +24 -30
- package/esm2022/onboarding/onboarding.module.mjs +25 -9
- package/esm2022/onboarding/onboarding.service.mjs +26 -33
- package/esm2022/page-header/page-header.component.mjs +61 -84
- package/esm2022/page-header/page-header.module.mjs +9 -9
- package/esm2022/pdf/pdf.component.mjs +46 -71
- package/esm2022/pdf/pdf.module.mjs +6 -7
- package/esm2022/qr/qr.component.mjs +11 -19
- package/esm2022/qr/qr.module.mjs +4 -4
- package/esm2022/quick-menu/quick-menu.component.mjs +21 -29
- package/esm2022/quick-menu/quick-menu.module.mjs +6 -7
- package/esm2022/result/result.component.mjs +20 -22
- package/esm2022/result/result.module.mjs +6 -7
- package/esm2022/reuse-tab/provide.mjs +2 -1
- package/esm2022/reuse-tab/reuse-tab-context-menu.component.mjs +13 -14
- package/esm2022/reuse-tab/reuse-tab-context.component.mjs +12 -16
- package/esm2022/reuse-tab/reuse-tab-context.directive.mjs +9 -9
- package/esm2022/reuse-tab/reuse-tab-context.service.mjs +9 -10
- package/esm2022/reuse-tab/reuse-tab.component.mjs +58 -93
- package/esm2022/reuse-tab/reuse-tab.module.mjs +4 -4
- package/esm2022/reuse-tab/reuse-tab.service.mjs +71 -60
- package/esm2022/reuse-tab/reuse-tab.strategy.mjs +5 -3
- package/esm2022/se/se-container.component.mjs +62 -79
- package/esm2022/se/se.component.mjs +42 -59
- package/esm2022/se/se.module.mjs +6 -7
- package/esm2022/sg/sg-container.component.mjs +12 -20
- package/esm2022/sg/sg.component.mjs +21 -27
- package/esm2022/sg/sg.module.mjs +6 -7
- package/esm2022/st/st-column-source.mjs +4 -4
- package/esm2022/st/st-data-source.mjs +4 -4
- package/esm2022/st/st-export.mjs +30 -21
- package/esm2022/st/st-filter.component.mjs +11 -11
- package/esm2022/st/st-row.directive.mjs +12 -14
- package/esm2022/st/st-widget-host.directive.mjs +10 -10
- package/esm2022/st/st-widget.mjs +3 -3
- package/esm2022/st/st.component.mjs +82 -124
- package/esm2022/st/st.module.mjs +4 -4
- package/esm2022/sv/sv-container.component.mjs +60 -78
- package/esm2022/sv/sv-value.component.mjs +9 -7
- package/esm2022/sv/sv.component.mjs +35 -48
- package/esm2022/sv/sv.module.mjs +6 -7
- package/esm2022/tag-select/tag-select.component.mjs +19 -24
- package/esm2022/tag-select/tag-select.module.mjs +6 -7
- package/esm2022/xlsx/xlsx.directive.mjs +9 -9
- package/esm2022/xlsx/xlsx.module.mjs +4 -4
- package/esm2022/xlsx/xlsx.service.mjs +13 -13
- package/esm2022/zip/zip.service.mjs +13 -13
- package/exception/exception.component.d.ts +13 -13
- package/exception/exception.module.d.ts +7 -7
- package/fesm2022/auto-focus.mjs +24 -35
- package/fesm2022/auto-focus.mjs.map +1 -1
- package/fesm2022/avatar-list.mjs +37 -46
- package/fesm2022/avatar-list.mjs.map +1 -1
- package/fesm2022/cell.mjs +67 -84
- package/fesm2022/cell.mjs.map +1 -1
- package/fesm2022/chart-observer-size.mjs +17 -17
- package/fesm2022/chart-observer-size.mjs.map +1 -1
- package/fesm2022/count-down.mjs +13 -13
- package/fesm2022/count-down.mjs.map +1 -1
- package/fesm2022/date-picker.mjs +28 -33
- package/fesm2022/date-picker.mjs.map +1 -1
- package/fesm2022/down-file.mjs +22 -25
- package/fesm2022/down-file.mjs.map +1 -1
- package/fesm2022/ellipsis.mjs +40 -56
- package/fesm2022/ellipsis.mjs.map +1 -1
- package/fesm2022/error-collect.mjs +31 -42
- package/fesm2022/error-collect.mjs.map +1 -1
- package/fesm2022/exception.mjs +25 -34
- package/fesm2022/exception.mjs.map +1 -1
- package/fesm2022/footer-toolbar.mjs +22 -35
- package/fesm2022/footer-toolbar.mjs.map +1 -1
- package/fesm2022/full-content.mjs +40 -52
- package/fesm2022/full-content.mjs.map +1 -1
- package/fesm2022/global-footer.mjs +34 -45
- package/fesm2022/global-footer.mjs.map +1 -1
- package/fesm2022/hotkey.mjs +17 -17
- package/fesm2022/hotkey.mjs.map +1 -1
- package/fesm2022/let.mjs +7 -7
- package/fesm2022/loading.mjs +26 -33
- package/fesm2022/loading.mjs.map +1 -1
- package/fesm2022/lodop.mjs +13 -13
- package/fesm2022/lodop.mjs.map +1 -1
- package/fesm2022/media.mjs +40 -42
- package/fesm2022/media.mjs.map +1 -1
- package/fesm2022/notice-icon.mjs +61 -62
- package/fesm2022/notice-icon.mjs.map +1 -1
- package/fesm2022/onboarding.mjs +71 -72
- package/fesm2022/onboarding.mjs.map +1 -1
- package/fesm2022/page-header.mjs +68 -97
- package/fesm2022/page-header.mjs.map +1 -1
- package/fesm2022/pdf.mjs +50 -77
- package/fesm2022/pdf.mjs.map +1 -1
- package/fesm2022/qr.mjs +14 -22
- package/fesm2022/qr.mjs.map +1 -1
- package/fesm2022/quick-menu.mjs +25 -37
- package/fesm2022/quick-menu.mjs.map +1 -1
- package/fesm2022/result.mjs +24 -29
- package/fesm2022/result.mjs.map +1 -1
- package/fesm2022/reuse-tab.mjs +175 -206
- package/fesm2022/reuse-tab.mjs.map +1 -1
- package/fesm2022/se.mjs +104 -141
- package/fesm2022/se.mjs.map +1 -1
- package/fesm2022/sg.mjs +34 -47
- package/fesm2022/sg.mjs.map +1 -1
- package/fesm2022/st.mjs +148 -180
- package/fesm2022/st.mjs.map +1 -1
- package/fesm2022/sv.mjs +102 -135
- package/fesm2022/sv.mjs.map +1 -1
- package/fesm2022/tag-select.mjs +23 -31
- package/fesm2022/tag-select.mjs.map +1 -1
- package/fesm2022/xlsx.mjs +22 -22
- package/fesm2022/xlsx.mjs.map +1 -1
- package/fesm2022/zip.mjs +12 -12
- package/fesm2022/zip.mjs.map +1 -1
- package/footer-toolbar/footer-toolbar.component.d.ts +6 -10
- package/footer-toolbar/footer-toolbar.module.d.ts +5 -5
- package/full-content/full-content-toggle.directive.d.ts +2 -4
- package/full-content/full-content.component.d.ts +11 -16
- package/full-content/full-content.module.d.ts +4 -4
- package/global-footer/global-footer-item.component.d.ts +2 -3
- package/global-footer/global-footer.component.d.ts +12 -16
- package/global-footer/global-footer.module.d.ts +5 -5
- package/hotkey/hotkey.directive.d.ts +4 -6
- package/loading/loading.component.d.ts +2 -2
- package/loading/loading.module.d.ts +7 -7
- package/loading/loading.service.d.ts +5 -8
- package/lodop/lodop.service.d.ts +2 -3
- package/media/media.component.d.ts +9 -13
- package/media/media.module.d.ts +3 -3
- package/media/media.service.d.ts +3 -5
- package/notice-icon/notice-icon-tab.component.d.ts +1 -1
- package/notice-icon/notice-icon.component.d.ts +9 -11
- package/notice-icon/notice-icon.module.d.ts +13 -13
- package/observers/observer-size.d.ts +4 -5
- package/onboarding/onboarding.component.d.ts +7 -10
- package/onboarding/onboarding.module.d.ts +8 -8
- package/onboarding/onboarding.service.d.ts +9 -16
- package/package.json +5 -5
- package/page-header/page-header.component.d.ts +24 -27
- package/page-header/page-header.module.d.ts +9 -9
- package/pdf/pdf.component.d.ts +22 -22
- package/pdf/pdf.module.d.ts +4 -4
- package/pdf/pdf.types.d.ts +1 -1
- package/qr/qr.component.d.ts +3 -4
- package/quick-menu/quick-menu.component.d.ts +8 -10
- package/quick-menu/quick-menu.module.d.ts +5 -5
- package/result/result.component.d.ts +8 -9
- package/result/result.module.d.ts +5 -5
- package/reuse-tab/reuse-tab-context-menu.component.d.ts +1 -3
- package/reuse-tab/reuse-tab-context.component.d.ts +4 -7
- package/reuse-tab/reuse-tab-context.directive.d.ts +1 -3
- package/reuse-tab/reuse-tab-context.service.d.ts +1 -3
- package/reuse-tab/reuse-tab.component.d.ts +21 -28
- package/reuse-tab/reuse-tab.service.d.ts +10 -12
- package/reuse-tab/reuse-tab.strategy.d.ts +1 -3
- package/se/se-container.component.d.ts +20 -21
- package/se/se.component.d.ts +17 -21
- package/se/se.module.d.ts +7 -7
- package/sg/sg-container.component.d.ts +4 -5
- package/sg/sg.component.d.ts +9 -12
- package/sg/sg.module.d.ts +4 -4
- package/st/st-export.d.ts +3 -4
- package/st/st-filter.component.d.ts +2 -3
- package/st/st-row.directive.d.ts +3 -4
- package/st/st-widget-host.directive.d.ts +3 -5
- package/st/st.component.d.ts +36 -40
- package/sv/sv-container.component.d.ts +19 -20
- package/sv/sv-value.component.d.ts +1 -1
- package/sv/sv.component.d.ts +13 -16
- package/sv/sv.module.d.ts +9 -9
- package/tag-select/tag-select.component.d.ts +11 -13
- package/tag-select/tag-select.module.d.ts +5 -5
- package/xlsx/xlsx.directive.d.ts +1 -3
- package/xlsx/xlsx.service.d.ts +4 -7
- package/zip/zip.service.d.ts +4 -7
package/fesm2022/sv.mjs
CHANGED
|
@@ -1,21 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NgStyle, CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation,
|
|
4
|
-
import {
|
|
3
|
+
import { ElementRef, inject, Renderer2, Component, ChangeDetectionStrategy, ViewEncapsulation, numberAttribute, booleanAttribute, Input, ViewChild, NgModule } from '@angular/core';
|
|
4
|
+
import { NzStringTemplateOutletDirective, NzOutletModule } from 'ng-zorro-antd/core/outlet';
|
|
5
5
|
import * as i1 from '@delon/util/config';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
|
|
10
|
-
import * as i1$1 from 'ng-zorro-antd/tooltip';
|
|
11
|
-
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
6
|
+
import { NzTooltipDirective, NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
7
|
+
import { CdkObserveContent, ObserversModule } from '@angular/cdk/observers';
|
|
8
|
+
import { ResponsiveService } from '@delon/theme';
|
|
12
9
|
import { isEmpty } from '@delon/util/browser';
|
|
13
|
-
import
|
|
14
|
-
import * as i3$1 from '@angular/cdk/observers';
|
|
15
|
-
import { ObserversModule } from '@angular/cdk/observers';
|
|
16
|
-
import * as i5 from 'ng-zorro-antd/icon';
|
|
17
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
10
|
+
import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
|
|
18
11
|
|
|
12
|
+
class SVTitleComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.el = inject(ElementRef).nativeElement;
|
|
15
|
+
this.parentComp = inject(SVContainerComponent, { host: true, optional: true });
|
|
16
|
+
this.ren = inject(Renderer2);
|
|
17
|
+
if (this.parentComp == null) {
|
|
18
|
+
throw new Error(`[sv-title] must include 'sv-container' component`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
setClass() {
|
|
22
|
+
const gutter = this.parentComp.gutter;
|
|
23
|
+
const el = this.el;
|
|
24
|
+
this.ren.setStyle(el, 'padding-left', `${gutter / 2}px`);
|
|
25
|
+
this.ren.setStyle(el, 'padding-right', `${gutter / 2}px`);
|
|
26
|
+
}
|
|
27
|
+
ngOnInit() {
|
|
28
|
+
this.setClass();
|
|
29
|
+
}
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: SVTitleComponent, isStandalone: true, selector: "sv-title, [sv-title]", host: { properties: { "class.sv__title": "true" } }, exportAs: ["svTitle"], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVTitleComponent, decorators: [{
|
|
34
|
+
type: Component,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: 'sv-title, [sv-title]',
|
|
37
|
+
exportAs: 'svTitle',
|
|
38
|
+
template: '<ng-content />',
|
|
39
|
+
host: {
|
|
40
|
+
'[class.sv__title]': 'true'
|
|
41
|
+
},
|
|
42
|
+
preserveWhitespaces: false,
|
|
43
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
44
|
+
encapsulation: ViewEncapsulation.None,
|
|
45
|
+
standalone: true
|
|
46
|
+
}]
|
|
47
|
+
}], ctorParameters: () => [] });
|
|
19
48
|
class SVContainerComponent {
|
|
20
49
|
get margin() {
|
|
21
50
|
return this.bordered ? {} : { 'margin-left.px': -(this.gutter / 2), 'margin-right.px': -(this.gutter / 2) };
|
|
@@ -31,8 +60,8 @@ class SVContainerComponent {
|
|
|
31
60
|
default: true
|
|
32
61
|
});
|
|
33
62
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVContainerComponent, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: SVContainerComponent, isStandalone: true, selector: "sv-container, [sv-container]", inputs: { colInCon: ["sv-container", "colInCon", (v) => (v == null ? null : numberAttribute(v))], title: "title", size: "size", gutter: ["gutter", "gutter", numberAttribute], layout: "layout", labelWidth: ["labelWidth", "labelWidth", numberAttribute], col: ["col", "col", numberAttribute], default: ["default", "default", booleanAttribute], noColon: ["noColon", "noColon", booleanAttribute], bordered: ["bordered", "bordered", booleanAttribute] }, host: { properties: { "class.sv__container": "true", "class.sv__horizontal": "layout === 'horizontal'", "class.sv__vertical": "layout === 'vertical'", "class.sv__small": "size === 'small'", "class.sv__large": "size === 'large'", "class.sv__bordered": "bordered", "class.clearfix": "true" } }, exportAs: ["svContainer"], ngImport: i0, template: `
|
|
36
65
|
<div class="ant-row" [ngStyle]="margin">
|
|
37
66
|
@if (title) {
|
|
38
67
|
<sv-title>
|
|
@@ -41,30 +70,9 @@ class SVContainerComponent {
|
|
|
41
70
|
}
|
|
42
71
|
<ng-content />
|
|
43
72
|
</div>
|
|
44
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
73
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SVTitleComponent, selector: "sv-title, [sv-title]", exportAs: ["svTitle"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
45
74
|
}
|
|
46
|
-
|
|
47
|
-
InputNumber(null)
|
|
48
|
-
], SVContainerComponent.prototype, "colInCon", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
InputNumber()
|
|
51
|
-
], SVContainerComponent.prototype, "gutter", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
InputNumber()
|
|
54
|
-
], SVContainerComponent.prototype, "labelWidth", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
InputNumber()
|
|
57
|
-
], SVContainerComponent.prototype, "col", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
InputBoolean()
|
|
60
|
-
], SVContainerComponent.prototype, "default", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
InputBoolean()
|
|
63
|
-
], SVContainerComponent.prototype, "noColon", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
InputBoolean()
|
|
66
|
-
], SVContainerComponent.prototype, "bordered", void 0);
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SVContainerComponent, decorators: [{
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVContainerComponent, decorators: [{
|
|
68
76
|
type: Component,
|
|
69
77
|
args: [{
|
|
70
78
|
selector: 'sv-container, [sv-container]',
|
|
@@ -90,76 +98,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
90
98
|
},
|
|
91
99
|
preserveWhitespaces: false,
|
|
92
100
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
93
|
-
encapsulation: ViewEncapsulation.None
|
|
101
|
+
encapsulation: ViewEncapsulation.None,
|
|
102
|
+
standalone: true,
|
|
103
|
+
imports: [NgStyle, SVTitleComponent, NzStringTemplateOutletDirective]
|
|
94
104
|
}]
|
|
95
105
|
}], ctorParameters: () => [{ type: i1.AlainConfigService }], propDecorators: { colInCon: [{
|
|
96
106
|
type: Input,
|
|
97
|
-
args: ['sv-container']
|
|
107
|
+
args: [{ alias: 'sv-container', transform: (v) => (v == null ? null : numberAttribute(v)) }]
|
|
98
108
|
}], title: [{
|
|
99
109
|
type: Input
|
|
100
110
|
}], size: [{
|
|
101
111
|
type: Input
|
|
102
112
|
}], gutter: [{
|
|
103
|
-
type: Input
|
|
113
|
+
type: Input,
|
|
114
|
+
args: [{ transform: numberAttribute }]
|
|
104
115
|
}], layout: [{
|
|
105
116
|
type: Input
|
|
106
117
|
}], labelWidth: [{
|
|
107
|
-
type: Input
|
|
118
|
+
type: Input,
|
|
119
|
+
args: [{ transform: numberAttribute }]
|
|
108
120
|
}], col: [{
|
|
109
|
-
type: Input
|
|
121
|
+
type: Input,
|
|
122
|
+
args: [{ transform: numberAttribute }]
|
|
110
123
|
}], default: [{
|
|
111
|
-
type: Input
|
|
124
|
+
type: Input,
|
|
125
|
+
args: [{ transform: booleanAttribute }]
|
|
112
126
|
}], noColon: [{
|
|
113
|
-
type: Input
|
|
127
|
+
type: Input,
|
|
128
|
+
args: [{ transform: booleanAttribute }]
|
|
114
129
|
}], bordered: [{
|
|
115
|
-
type: Input
|
|
130
|
+
type: Input,
|
|
131
|
+
args: [{ transform: booleanAttribute }]
|
|
116
132
|
}] } });
|
|
117
|
-
class SVTitleComponent {
|
|
118
|
-
constructor(el, parent, ren) {
|
|
119
|
-
this.el = el;
|
|
120
|
-
this.parent = parent;
|
|
121
|
-
this.ren = ren;
|
|
122
|
-
if (parent == null) {
|
|
123
|
-
throw new Error(`[sv-title] must include 'sv-container' component`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
setClass() {
|
|
127
|
-
const gutter = this.parent.gutter;
|
|
128
|
-
const el = this.el.nativeElement;
|
|
129
|
-
this.ren.setStyle(el, 'padding-left', `${gutter / 2}px`);
|
|
130
|
-
this.ren.setStyle(el, 'padding-right', `${gutter / 2}px`);
|
|
131
|
-
}
|
|
132
|
-
ngOnInit() {
|
|
133
|
-
this.setClass();
|
|
134
|
-
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SVTitleComponent, deps: [{ token: i0.ElementRef }, { token: SVContainerComponent, host: true, optional: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: SVTitleComponent, selector: "sv-title, [sv-title]", host: { properties: { "class.sv__title": "true" } }, exportAs: ["svTitle"], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
137
|
-
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SVTitleComponent, decorators: [{
|
|
139
|
-
type: Component,
|
|
140
|
-
args: [{
|
|
141
|
-
selector: 'sv-title, [sv-title]',
|
|
142
|
-
exportAs: 'svTitle',
|
|
143
|
-
template: '<ng-content />',
|
|
144
|
-
host: {
|
|
145
|
-
'[class.sv__title]': 'true'
|
|
146
|
-
},
|
|
147
|
-
preserveWhitespaces: false,
|
|
148
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
149
|
-
encapsulation: ViewEncapsulation.None
|
|
150
|
-
}]
|
|
151
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: SVContainerComponent, decorators: [{
|
|
152
|
-
type: Host
|
|
153
|
-
}, {
|
|
154
|
-
type: Optional
|
|
155
|
-
}] }, { type: i0.Renderer2 }] });
|
|
156
133
|
|
|
157
134
|
class SVValueComponent {
|
|
158
135
|
constructor() {
|
|
159
136
|
this.size = 'default';
|
|
160
137
|
}
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
162
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: SVValueComponent, isStandalone: true, selector: "sv-value, [sv-value]", inputs: { prefix: "prefix", unit: "unit", tooltip: "tooltip", size: "size" }, host: { properties: { "class.sv__value": "true", "class.sv__value-small": "size === 'small'", "class.sv__value-large": "size === 'large'" } }, exportAs: ["svValue"], ngImport: i0, template: `
|
|
163
140
|
@if (prefix) {
|
|
164
141
|
<em class="sv__value-prefix" [innerHTML]="prefix"></em>
|
|
165
142
|
}
|
|
@@ -167,9 +144,9 @@ class SVValueComponent {
|
|
|
167
144
|
@if (unit) {
|
|
168
145
|
<em class="sv__value-unit" [innerHTML]="unit"></em>
|
|
169
146
|
}
|
|
170
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
147
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
171
148
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVValueComponent, decorators: [{
|
|
173
150
|
type: Component,
|
|
174
151
|
args: [{
|
|
175
152
|
selector: 'sv-value, [sv-value]',
|
|
@@ -190,7 +167,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
190
167
|
},
|
|
191
168
|
preserveWhitespaces: false,
|
|
192
169
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
193
|
-
encapsulation: ViewEncapsulation.None
|
|
170
|
+
encapsulation: ViewEncapsulation.None,
|
|
171
|
+
standalone: true,
|
|
172
|
+
imports: [NzTooltipDirective]
|
|
194
173
|
}]
|
|
195
174
|
}], propDecorators: { prefix: [{
|
|
196
175
|
type: Input
|
|
@@ -206,36 +185,37 @@ const prefixCls = `sv`;
|
|
|
206
185
|
class SVComponent {
|
|
207
186
|
// #endregion
|
|
208
187
|
get paddingValue() {
|
|
209
|
-
if (this.
|
|
188
|
+
if (this.parentComp.bordered)
|
|
210
189
|
return null;
|
|
211
|
-
return this.
|
|
190
|
+
return this.parentComp.gutter / 2;
|
|
212
191
|
}
|
|
213
192
|
get labelWidth() {
|
|
214
|
-
const { labelWidth, layout } = this.
|
|
193
|
+
const { labelWidth, layout } = this.parentComp;
|
|
215
194
|
return layout === 'horizontal' ? labelWidth : null;
|
|
216
195
|
}
|
|
217
|
-
constructor(
|
|
218
|
-
this.el =
|
|
219
|
-
this.
|
|
220
|
-
this.rep =
|
|
221
|
-
this.ren =
|
|
196
|
+
constructor() {
|
|
197
|
+
this.el = inject(ElementRef).nativeElement;
|
|
198
|
+
this.parentComp = inject(SVContainerComponent, { host: true, optional: true });
|
|
199
|
+
this.rep = inject(ResponsiveService);
|
|
200
|
+
this.ren = inject(Renderer2);
|
|
222
201
|
this.clsMap = [];
|
|
223
202
|
this._noColon = false;
|
|
224
203
|
this.hideLabel = false;
|
|
225
|
-
if (
|
|
204
|
+
if (this.parentComp == null) {
|
|
226
205
|
throw new Error(`[sv] must include 'sv-container' component`);
|
|
227
206
|
}
|
|
228
207
|
}
|
|
229
208
|
setClass() {
|
|
230
|
-
const { ren, col, clsMap, type, rep, noColon
|
|
231
|
-
const
|
|
209
|
+
const { ren, col, clsMap, type, rep, noColon } = this;
|
|
210
|
+
const parent = this.parentComp;
|
|
211
|
+
const el = this.el;
|
|
232
212
|
this._noColon = parent.bordered ? true : noColon != null ? noColon : parent.noColon;
|
|
233
213
|
clsMap.forEach(cls => ren.removeClass(el, cls));
|
|
234
214
|
clsMap.length = 0;
|
|
235
215
|
const parentCol = parent.colInCon || parent.col;
|
|
236
216
|
clsMap.push(...rep.genCls(col != null ? col : parentCol, parentCol));
|
|
237
217
|
clsMap.push(`${prefixCls}__item`);
|
|
238
|
-
if (
|
|
218
|
+
if (parent.labelWidth)
|
|
239
219
|
clsMap.push(`${prefixCls}__item-fixed`);
|
|
240
220
|
if (type)
|
|
241
221
|
clsMap.push(`${prefixCls}__type-${type}`);
|
|
@@ -251,7 +231,7 @@ class SVComponent {
|
|
|
251
231
|
checkContent() {
|
|
252
232
|
const { conEl } = this;
|
|
253
233
|
const def = this.default;
|
|
254
|
-
if (!(def != null ? def : this.
|
|
234
|
+
if (!(def != null ? def : this.parentComp?.default)) {
|
|
255
235
|
return;
|
|
256
236
|
}
|
|
257
237
|
const el = conEl.nativeElement;
|
|
@@ -263,32 +243,16 @@ class SVComponent {
|
|
|
263
243
|
el.classList.add(cls);
|
|
264
244
|
}
|
|
265
245
|
}
|
|
266
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
267
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
246
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
247
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: SVComponent, isStandalone: true, selector: "sv, [sv]", inputs: { optional: "optional", optionalHelp: "optionalHelp", optionalHelpColor: "optionalHelpColor", label: "label", unit: "unit", col: ["col", "col", (v) => (v == null ? null : numberAttribute(v))], default: ["default", "default", (v) => (v == null ? null : booleanAttribute(v))], type: "type", noColon: ["noColon", "noColon", (v) => (v == null ? null : booleanAttribute(v))], hideLabel: ["hideLabel", "hideLabel", booleanAttribute] }, host: { properties: { "style.padding-left.px": "paddingValue", "style.padding-right.px": "paddingValue" } }, viewQueries: [{ propertyName: "conEl", first: true, predicate: ["conEl"], descendants: true }], exportAs: ["sv"], usesOnChanges: true, ngImport: i0, template: "@if (!hideLabel) {\n <div\n class=\"sv__label\"\n [class.sv__label-empty]=\"!label\"\n [class.sv__label-width]=\"labelWidth !== null && labelWidth !== undefined\"\n [class.sv__no-colon]=\"_noColon\"\n [style.width.px]=\"labelWidth\"\n >\n <span class=\"sv__label-text\">\n <ng-container *nzStringTemplateOutlet=\"label\">{{ label }}</ng-container>\n </span>\n @if (optional || optionalHelp) {\n <span class=\"sv__label-optional\" [class.sv__label-optional-no-text]=\"!optional\">\n <ng-container *nzStringTemplateOutlet=\"optional\">{{ optional }}</ng-container>\n @if (optionalHelp) {\n <i\n nz-tooltip\n [nzTooltipTitle]=\"optionalHelp\"\n [nzTooltipColor]=\"optionalHelpColor\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n }\n </span>\n }\n </div>\n}\n<div class=\"sv__detail\">\n <span (cdkObserveContent)=\"checkContent()\" #conEl>\n <ng-content />\n </span>\n @if (!!unit) {\n <span class=\"sv__unit\" *nzStringTemplateOutlet=\"unit\">{{ unit }}</span>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "directive", type: NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
268
248
|
}
|
|
269
|
-
|
|
270
|
-
InputNumber(null)
|
|
271
|
-
], SVComponent.prototype, "col", void 0);
|
|
272
|
-
__decorate([
|
|
273
|
-
InputBoolean(null)
|
|
274
|
-
], SVComponent.prototype, "default", void 0);
|
|
275
|
-
__decorate([
|
|
276
|
-
InputBoolean(null)
|
|
277
|
-
], SVComponent.prototype, "noColon", void 0);
|
|
278
|
-
__decorate([
|
|
279
|
-
InputBoolean()
|
|
280
|
-
], SVComponent.prototype, "hideLabel", void 0);
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SVComponent, decorators: [{
|
|
249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVComponent, decorators: [{
|
|
282
250
|
type: Component,
|
|
283
251
|
args: [{ selector: 'sv, [sv]', exportAs: 'sv', host: {
|
|
284
252
|
'[style.padding-left.px]': 'paddingValue',
|
|
285
253
|
'[style.padding-right.px]': 'paddingValue'
|
|
286
|
-
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (!hideLabel) {\n <div\n class=\"sv__label\"\n [class.sv__label-empty]=\"!label\"\n [class.sv__label-width]=\"labelWidth !== null && labelWidth !== undefined\"\n [class.sv__no-colon]=\"_noColon\"\n [style.width.px]=\"labelWidth\"\n >\n <span class=\"sv__label-text\">\n <ng-container *nzStringTemplateOutlet=\"label\">{{ label }}</ng-container>\n </span>\n @if (optional || optionalHelp) {\n <span class=\"sv__label-optional\" [class.sv__label-optional-no-text]=\"!optional\">\n <ng-container *nzStringTemplateOutlet=\"optional\">{{ optional }}</ng-container>\n @if (optionalHelp) {\n <i\n nz-tooltip\n [nzTooltipTitle]=\"optionalHelp\"\n [nzTooltipColor]=\"optionalHelpColor\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n }\n </span>\n }\n </div>\n}\n<div class=\"sv__detail\">\n <span (cdkObserveContent)=\"checkContent()\" #conEl>\n <ng-content />\n </span>\n @if (!!unit) {\n <span class=\"sv__unit\" *nzStringTemplateOutlet=\"unit\">{{ unit }}</span>\n }\n</div>\n" }]
|
|
287
|
-
}], ctorParameters: () => [
|
|
288
|
-
type: Host
|
|
289
|
-
}, {
|
|
290
|
-
type: Optional
|
|
291
|
-
}] }, { type: i2$1.ResponsiveService }, { type: i0.Renderer2 }], propDecorators: { conEl: [{
|
|
254
|
+
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [NzStringTemplateOutletDirective, NzTooltipDirective, NzIconDirective, CdkObserveContent], template: "@if (!hideLabel) {\n <div\n class=\"sv__label\"\n [class.sv__label-empty]=\"!label\"\n [class.sv__label-width]=\"labelWidth !== null && labelWidth !== undefined\"\n [class.sv__no-colon]=\"_noColon\"\n [style.width.px]=\"labelWidth\"\n >\n <span class=\"sv__label-text\">\n <ng-container *nzStringTemplateOutlet=\"label\">{{ label }}</ng-container>\n </span>\n @if (optional || optionalHelp) {\n <span class=\"sv__label-optional\" [class.sv__label-optional-no-text]=\"!optional\">\n <ng-container *nzStringTemplateOutlet=\"optional\">{{ optional }}</ng-container>\n @if (optionalHelp) {\n <i\n nz-tooltip\n [nzTooltipTitle]=\"optionalHelp\"\n [nzTooltipColor]=\"optionalHelpColor\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n }\n </span>\n }\n </div>\n}\n<div class=\"sv__detail\">\n <span (cdkObserveContent)=\"checkContent()\" #conEl>\n <ng-content />\n </span>\n @if (!!unit) {\n <span class=\"sv__unit\" *nzStringTemplateOutlet=\"unit\">{{ unit }}</span>\n }\n</div>\n" }]
|
|
255
|
+
}], ctorParameters: () => [], propDecorators: { conEl: [{
|
|
292
256
|
type: ViewChild,
|
|
293
257
|
args: ['conEl', { static: false }]
|
|
294
258
|
}], optional: [{
|
|
@@ -302,28 +266,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
302
266
|
}], unit: [{
|
|
303
267
|
type: Input
|
|
304
268
|
}], col: [{
|
|
305
|
-
type: Input
|
|
269
|
+
type: Input,
|
|
270
|
+
args: [{ transform: (v) => (v == null ? null : numberAttribute(v)) }]
|
|
306
271
|
}], default: [{
|
|
307
|
-
type: Input
|
|
272
|
+
type: Input,
|
|
273
|
+
args: [{ transform: (v) => (v == null ? null : booleanAttribute(v)) }]
|
|
308
274
|
}], type: [{
|
|
309
275
|
type: Input
|
|
310
276
|
}], noColon: [{
|
|
311
|
-
type: Input
|
|
277
|
+
type: Input,
|
|
278
|
+
args: [{ transform: (v) => (v == null ? null : booleanAttribute(v)) }]
|
|
312
279
|
}], hideLabel: [{
|
|
313
|
-
type: Input
|
|
280
|
+
type: Input,
|
|
281
|
+
args: [{ transform: booleanAttribute }]
|
|
314
282
|
}] } });
|
|
315
283
|
|
|
316
284
|
const COMPONENTS = [SVContainerComponent, SVComponent, SVTitleComponent, SVValueComponent];
|
|
317
285
|
class SVModule {
|
|
318
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
319
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0
|
|
320
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0
|
|
286
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
287
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: SVModule, imports: [CommonModule, ObserversModule, NzToolTipModule, NzIconModule, NzOutletModule, SVContainerComponent, SVComponent, SVTitleComponent, SVValueComponent], exports: [SVContainerComponent, SVComponent, SVTitleComponent, SVValueComponent] }); }
|
|
288
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVModule, imports: [CommonModule, ObserversModule, NzToolTipModule, NzIconModule, NzOutletModule] }); }
|
|
321
289
|
}
|
|
322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SVModule, decorators: [{
|
|
323
291
|
type: NgModule,
|
|
324
292
|
args: [{
|
|
325
|
-
imports: [CommonModule, ObserversModule, NzToolTipModule, NzIconModule, NzOutletModule],
|
|
326
|
-
declarations: COMPONENTS,
|
|
293
|
+
imports: [CommonModule, ObserversModule, NzToolTipModule, NzIconModule, NzOutletModule, ...COMPONENTS],
|
|
327
294
|
exports: COMPONENTS
|
|
328
295
|
}]
|
|
329
296
|
}] });
|
package/fesm2022/sv.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sv.mjs","sources":["../../../../packages/abc/sv/sv-container.component.ts","../../../../packages/abc/sv/sv-value.component.ts","../../../../packages/abc/sv/sv.component.ts","../../../../packages/abc/sv/sv.component.html","../../../../packages/abc/sv/sv.module.ts","../../../../packages/abc/sv/sv.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Host,\n Input,\n OnInit,\n Optional,\n Renderer2,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\n\nimport type { REP_TYPE } from '@delon/theme';\nimport { AlainConfigService } from '@delon/util/config';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\n@Component({\n selector: 'sv-container, [sv-container]',\n exportAs: 'svContainer',\n template: `\n <div class=\"ant-row\" [ngStyle]=\"margin\">\n @if (title) {\n <sv-title>\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </sv-title>\n }\n <ng-content />\n </div>\n `,\n host: {\n '[class.sv__container]': 'true',\n '[class.sv__horizontal]': `layout === 'horizontal'`,\n '[class.sv__vertical]': `layout === 'vertical'`,\n '[class.sv__small]': `size === 'small'`,\n '[class.sv__large]': `size === 'large'`,\n '[class.sv__bordered]': `bordered`,\n '[class.clearfix]': `true`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class SVContainerComponent {\n static ngAcceptInputType_gutter: NumberInput;\n static ngAcceptInputType_labelWidth: NumberInput;\n static ngAcceptInputType_col: NumberInput;\n static ngAcceptInputType_colInCon: NumberInput;\n static ngAcceptInputType_default: BooleanInput;\n static ngAcceptInputType_noColon: BooleanInput;\n static ngAcceptInputType_bordered: BooleanInput;\n\n @Input('sv-container') @InputNumber(null) colInCon?: REP_TYPE;\n @Input() title?: string | TemplateRef<void>;\n @Input() size?: 'small' | 'large' | 'default';\n /** 列表项间距,单位为 `px` */\n @Input() @InputNumber() gutter!: number;\n @Input() layout!: 'horizontal' | 'vertical';\n @Input() @InputNumber() labelWidth?: number;\n /** 指定信息最多分几列展示,最终一行几列由 col 配置结合响应式规则决定 */\n @Input() @InputNumber() col!: number;\n @Input() @InputBoolean() default!: boolean;\n @Input() @InputBoolean() noColon = false;\n @Input() @InputBoolean() bordered = false;\n\n get margin(): { [k: string]: number } {\n return this.bordered ? {} : { 'margin-left.px': -(this.gutter / 2), 'margin-right.px': -(this.gutter / 2) };\n }\n\n constructor(configSrv: AlainConfigService) {\n configSrv.attach(this, 'sv', {\n size: 'large',\n gutter: 32,\n layout: 'horizontal',\n col: 3,\n default: true\n });\n }\n}\n\n@Component({\n selector: 'sv-title, [sv-title]',\n exportAs: 'svTitle',\n template: '<ng-content />',\n host: {\n '[class.sv__title]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class SVTitleComponent implements OnInit {\n constructor(\n private el: ElementRef<HTMLElement>,\n @Host() @Optional() private parent: SVContainerComponent,\n private ren: Renderer2\n ) {\n if (parent == null) {\n throw new Error(`[sv-title] must include 'sv-container' component`);\n }\n }\n\n private setClass(): void {\n const gutter = this.parent.gutter;\n const el = this.el.nativeElement;\n this.ren.setStyle(el, 'padding-left', `${gutter / 2}px`);\n this.ren.setStyle(el, 'padding-right', `${gutter / 2}px`);\n }\n\n ngOnInit(): void {\n this.setClass();\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { NzTSType } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'sv-value, [sv-value]',\n exportAs: 'svValue',\n template: `\n @if (prefix) {\n <em class=\"sv__value-prefix\" [innerHTML]=\"prefix\"></em>\n }\n <span nz-tooltip [nzTooltipTitle]=\"tooltip\" class=\"sv__value-text\"><ng-content /></span>\n @if (unit) {\n <em class=\"sv__value-unit\" [innerHTML]=\"unit\"></em>\n }\n `,\n host: {\n '[class.sv__value]': 'true',\n '[class.sv__value-small]': `size === 'small'`,\n '[class.sv__value-large]': `size === 'large'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class SVValueComponent {\n @Input() prefix?: string;\n @Input() unit?: string;\n @Input() tooltip?: NzTSType | null;\n @Input() size: 'large' | 'small' | 'default' = 'default';\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Host,\n Input,\n OnChanges,\n Optional,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { ResponsiveService } from '@delon/theme';\nimport { isEmpty } from '@delon/util/browser';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\n\nimport { SVContainerComponent } from './sv-container.component';\n\nconst prefixCls = `sv`;\n\n@Component({\n selector: 'sv, [sv]',\n exportAs: 'sv',\n templateUrl: './sv.component.html',\n host: {\n '[style.padding-left.px]': 'paddingValue',\n '[style.padding-right.px]': 'paddingValue'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class SVComponent implements AfterViewInit, OnChanges {\n static ngAcceptInputType_col: NumberInput;\n static ngAcceptInputType_default: BooleanInput;\n static ngAcceptInputType_noColon: BooleanInput;\n static ngAcceptInputType_hideLabel: BooleanInput;\n\n @ViewChild('conEl', { static: false })\n private conEl!: ElementRef<HTMLElement>;\n private clsMap: string[] = [];\n _noColon = false;\n\n // #region fields\n\n @Input() optional?: string | TemplateRef<void> | null;\n @Input() optionalHelp?: string | TemplateRef<void> | null;\n @Input() optionalHelpColor?: string;\n @Input() label?: string | TemplateRef<void> | null;\n @Input() unit?: string | TemplateRef<void> | null;\n @Input() @InputNumber(null) col?: number | null;\n @Input() @InputBoolean(null) default?: boolean | null;\n @Input() type?: 'primary' | 'success' | 'danger' | 'warning';\n @Input() @InputBoolean(null) noColon?: boolean | null;\n @Input() @InputBoolean() hideLabel = false;\n\n // #endregion\n\n get paddingValue(): number | null {\n if (this.parent.bordered) return null;\n return this.parent.gutter / 2;\n }\n\n get labelWidth(): number | null | undefined {\n const { labelWidth, layout } = this.parent;\n return layout === 'horizontal' ? labelWidth : null;\n }\n\n constructor(\n private el: ElementRef<HTMLElement>,\n @Host() @Optional() public parent: SVContainerComponent,\n private rep: ResponsiveService,\n private ren: Renderer2\n ) {\n if (parent == null) {\n throw new Error(`[sv] must include 'sv-container' component`);\n }\n }\n\n private setClass(): void {\n const { ren, col, clsMap, type, rep, noColon, parent } = this;\n const el = this.el.nativeElement;\n this._noColon = parent.bordered ? true : noColon != null ? noColon : parent.noColon;\n clsMap.forEach(cls => ren.removeClass(el, cls));\n clsMap.length = 0;\n const parentCol = parent.colInCon || parent.col;\n clsMap.push(...rep.genCls(col != null ? col : parentCol, parentCol));\n clsMap.push(`${prefixCls}__item`);\n if (this.parent.labelWidth) clsMap.push(`${prefixCls}__item-fixed`);\n if (type) clsMap.push(`${prefixCls}__type-${type}`);\n clsMap.forEach(cls => ren.addClass(el, cls));\n }\n\n ngAfterViewInit(): void {\n this.setClass();\n this.checkContent();\n }\n\n ngOnChanges(): void {\n this.setClass();\n }\n\n checkContent(): void {\n const { conEl } = this;\n const def = this.default;\n if (!(def != null ? def : this.parent.default)) {\n return;\n }\n const el = conEl.nativeElement as HTMLElement;\n const cls = `sv__default`;\n if (el.classList.contains(cls)) {\n el.classList.remove(cls);\n }\n if (isEmpty(el)) {\n el.classList.add(cls);\n }\n }\n}\n","@if (!hideLabel) {\n <div\n class=\"sv__label\"\n [class.sv__label-empty]=\"!label\"\n [class.sv__label-width]=\"labelWidth !== null && labelWidth !== undefined\"\n [class.sv__no-colon]=\"_noColon\"\n [style.width.px]=\"labelWidth\"\n >\n <span class=\"sv__label-text\">\n <ng-container *nzStringTemplateOutlet=\"label\">{{ label }}</ng-container>\n </span>\n @if (optional || optionalHelp) {\n <span class=\"sv__label-optional\" [class.sv__label-optional-no-text]=\"!optional\">\n <ng-container *nzStringTemplateOutlet=\"optional\">{{ optional }}</ng-container>\n @if (optionalHelp) {\n <i\n nz-tooltip\n [nzTooltipTitle]=\"optionalHelp\"\n [nzTooltipColor]=\"optionalHelpColor\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n }\n </span>\n }\n </div>\n}\n<div class=\"sv__detail\">\n <span (cdkObserveContent)=\"checkContent()\" #conEl>\n <ng-content />\n </span>\n @if (!!unit) {\n <span class=\"sv__unit\" *nzStringTemplateOutlet=\"unit\">{{ unit }}</span>\n }\n</div>\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { SVContainerComponent, SVTitleComponent } from './sv-container.component';\nimport { SVValueComponent } from './sv-value.component';\nimport { SVComponent } from './sv.component';\n\nconst COMPONENTS = [SVContainerComponent, SVComponent, SVTitleComponent, SVValueComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, NzToolTipModule, NzIconModule, NzOutletModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class SVModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i1.SVContainerComponent","i2","i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;;;MA0Ca,oBAAoB,CAAA;AAsB/B,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,EAAE,gBAAgB,EAAE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js","sources":["../../../../packages/abc/sv/sv-container.component.ts","../../../../packages/abc/sv/sv-value.component.ts","../../../../packages/abc/sv/sv.component.ts","../../../../packages/abc/sv/sv.component.html","../../../../packages/abc/sv/sv.module.ts","../../../../packages/abc/sv/sv.ts"],"sourcesContent":["import { NgStyle } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnInit,\n Renderer2,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\n\nimport type { REP_TYPE } from '@delon/theme';\nimport { AlainConfigService } from '@delon/util/config';\nimport { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';\n\n@Component({\n selector: 'sv-title, [sv-title]',\n exportAs: 'svTitle',\n template: '<ng-content />',\n host: {\n '[class.sv__title]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true\n})\nexport class SVTitleComponent implements OnInit {\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly parentComp = inject(SVContainerComponent, { host: true, optional: true });\n private readonly ren = inject(Renderer2);\n\n constructor() {\n if (this.parentComp == null) {\n throw new Error(`[sv-title] must include 'sv-container' component`);\n }\n }\n\n private setClass(): void {\n const gutter = this.parentComp!.gutter;\n const el = this.el;\n this.ren.setStyle(el, 'padding-left', `${gutter / 2}px`);\n this.ren.setStyle(el, 'padding-right', `${gutter / 2}px`);\n }\n\n ngOnInit(): void {\n this.setClass();\n }\n}\n\n@Component({\n selector: 'sv-container, [sv-container]',\n exportAs: 'svContainer',\n template: `\n <div class=\"ant-row\" [ngStyle]=\"margin\">\n @if (title) {\n <sv-title>\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </sv-title>\n }\n <ng-content />\n </div>\n `,\n host: {\n '[class.sv__container]': 'true',\n '[class.sv__horizontal]': `layout === 'horizontal'`,\n '[class.sv__vertical]': `layout === 'vertical'`,\n '[class.sv__small]': `size === 'small'`,\n '[class.sv__large]': `size === 'large'`,\n '[class.sv__bordered]': `bordered`,\n '[class.clearfix]': `true`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgStyle, SVTitleComponent, NzStringTemplateOutletDirective]\n})\nexport class SVContainerComponent {\n @Input({ alias: 'sv-container', transform: (v: unknown) => (v == null ? null : numberAttribute(v)) })\n colInCon?: REP_TYPE;\n @Input() title?: string | TemplateRef<void>;\n @Input() size?: 'small' | 'large' | 'default';\n /** 列表项间距,单位为 `px` */\n @Input({ transform: numberAttribute }) gutter!: number;\n @Input() layout!: 'horizontal' | 'vertical';\n @Input({ transform: numberAttribute }) labelWidth?: number;\n /** 指定信息最多分几列展示,最终一行几列由 col 配置结合响应式规则决定 */\n @Input({ transform: numberAttribute }) col!: number;\n @Input({ transform: booleanAttribute }) default!: boolean;\n @Input({ transform: booleanAttribute }) noColon = false;\n @Input({ transform: booleanAttribute }) bordered = false;\n\n get margin(): { [k: string]: number } {\n return this.bordered ? {} : { 'margin-left.px': -(this.gutter / 2), 'margin-right.px': -(this.gutter / 2) };\n }\n\n constructor(configSrv: AlainConfigService) {\n configSrv.attach(this, 'sv', {\n size: 'large',\n gutter: 32,\n layout: 'horizontal',\n col: 3,\n default: true\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { NzTSType } from 'ng-zorro-antd/core/types';\nimport { NzTooltipDirective } from 'ng-zorro-antd/tooltip';\n\n@Component({\n selector: 'sv-value, [sv-value]',\n exportAs: 'svValue',\n template: `\n @if (prefix) {\n <em class=\"sv__value-prefix\" [innerHTML]=\"prefix\"></em>\n }\n <span nz-tooltip [nzTooltipTitle]=\"tooltip\" class=\"sv__value-text\"><ng-content /></span>\n @if (unit) {\n <em class=\"sv__value-unit\" [innerHTML]=\"unit\"></em>\n }\n `,\n host: {\n '[class.sv__value]': 'true',\n '[class.sv__value-small]': `size === 'small'`,\n '[class.sv__value-large]': `size === 'large'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NzTooltipDirective]\n})\nexport class SVValueComponent {\n @Input() prefix?: string;\n @Input() unit?: string;\n @Input() tooltip?: NzTSType | null;\n @Input() size: 'large' | 'small' | 'default' = 'default';\n}\n","import { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\n\nimport { ResponsiveService } from '@delon/theme';\nimport { isEmpty } from '@delon/util/browser';\nimport { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\nimport { NzTooltipDirective } from 'ng-zorro-antd/tooltip';\n\nimport { SVContainerComponent } from './sv-container.component';\n\nconst prefixCls = `sv`;\n\n@Component({\n selector: 'sv, [sv]',\n exportAs: 'sv',\n templateUrl: './sv.component.html',\n host: {\n '[style.padding-left.px]': 'paddingValue',\n '[style.padding-right.px]': 'paddingValue'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NzStringTemplateOutletDirective, NzTooltipDirective, NzIconDirective, CdkObserveContent]\n})\nexport class SVComponent implements AfterViewInit, OnChanges {\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly parentComp = inject(SVContainerComponent, { host: true, optional: true });\n private readonly rep = inject(ResponsiveService);\n private readonly ren = inject(Renderer2);\n\n @ViewChild('conEl', { static: false })\n private readonly conEl!: ElementRef<HTMLElement>;\n private clsMap: string[] = [];\n _noColon = false;\n\n // #region fields\n\n @Input() optional?: string | TemplateRef<void> | null;\n @Input() optionalHelp?: string | TemplateRef<void> | null;\n @Input() optionalHelpColor?: string;\n @Input() label?: string | TemplateRef<void> | null;\n @Input() unit?: string | TemplateRef<void> | null;\n @Input({ transform: (v: unknown) => (v == null ? null : numberAttribute(v)) }) col?: number | null;\n @Input({ transform: (v: unknown) => (v == null ? null : booleanAttribute(v)) }) default?: boolean | null;\n @Input() type?: 'primary' | 'success' | 'danger' | 'warning';\n @Input({ transform: (v: unknown) => (v == null ? null : booleanAttribute(v)) }) noColon?: boolean | null;\n @Input({ transform: booleanAttribute }) hideLabel = false;\n\n // #endregion\n\n get paddingValue(): number | null {\n if (this.parentComp!.bordered) return null;\n return this.parentComp!.gutter / 2;\n }\n\n get labelWidth(): number | null | undefined {\n const { labelWidth, layout } = this.parentComp!;\n return layout === 'horizontal' ? labelWidth : null;\n }\n\n constructor() {\n if (this.parentComp == null) {\n throw new Error(`[sv] must include 'sv-container' component`);\n }\n }\n\n private setClass(): void {\n const { ren, col, clsMap, type, rep, noColon } = this;\n const parent = this.parentComp!;\n const el = this.el;\n this._noColon = parent.bordered ? true : noColon != null ? noColon : parent.noColon;\n clsMap.forEach(cls => ren.removeClass(el, cls));\n clsMap.length = 0;\n const parentCol = parent.colInCon || parent.col;\n clsMap.push(...rep.genCls(col != null ? col : parentCol, parentCol));\n clsMap.push(`${prefixCls}__item`);\n if (parent.labelWidth) clsMap.push(`${prefixCls}__item-fixed`);\n if (type) clsMap.push(`${prefixCls}__type-${type}`);\n clsMap.forEach(cls => ren.addClass(el, cls));\n }\n\n ngAfterViewInit(): void {\n this.setClass();\n this.checkContent();\n }\n\n ngOnChanges(): void {\n this.setClass();\n }\n\n checkContent(): void {\n const { conEl } = this;\n const def = this.default;\n if (!(def != null ? def : this.parentComp?.default)) {\n return;\n }\n const el = conEl.nativeElement as HTMLElement;\n const cls = `sv__default`;\n if (el.classList.contains(cls)) {\n el.classList.remove(cls);\n }\n if (isEmpty(el)) {\n el.classList.add(cls);\n }\n }\n}\n","@if (!hideLabel) {\n <div\n class=\"sv__label\"\n [class.sv__label-empty]=\"!label\"\n [class.sv__label-width]=\"labelWidth !== null && labelWidth !== undefined\"\n [class.sv__no-colon]=\"_noColon\"\n [style.width.px]=\"labelWidth\"\n >\n <span class=\"sv__label-text\">\n <ng-container *nzStringTemplateOutlet=\"label\">{{ label }}</ng-container>\n </span>\n @if (optional || optionalHelp) {\n <span class=\"sv__label-optional\" [class.sv__label-optional-no-text]=\"!optional\">\n <ng-container *nzStringTemplateOutlet=\"optional\">{{ optional }}</ng-container>\n @if (optionalHelp) {\n <i\n nz-tooltip\n [nzTooltipTitle]=\"optionalHelp\"\n [nzTooltipColor]=\"optionalHelpColor\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n }\n </span>\n }\n </div>\n}\n<div class=\"sv__detail\">\n <span (cdkObserveContent)=\"checkContent()\" #conEl>\n <ng-content />\n </span>\n @if (!!unit) {\n <span class=\"sv__unit\" *nzStringTemplateOutlet=\"unit\">{{ unit }}</span>\n }\n</div>\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { SVContainerComponent, SVTitleComponent } from './sv-container.component';\nimport { SVValueComponent } from './sv-value.component';\nimport { SVComponent } from './sv.component';\n\nconst COMPONENTS = [SVContainerComponent, SVComponent, SVTitleComponent, SVValueComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, NzToolTipModule, NzIconModule, NzOutletModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class SVModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MA+Ba,gBAAgB,CAAA;AAK3B,IAAA,WAAA,GAAA;AAJiB,QAAA,IAAA,CAAA,EAAE,GAAg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CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AACtG,oBAAA,OAAO,EAAE,UAAU;AACpB,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
package/fesm2022/tag-select.mjs
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { inject, ChangeDetectorRef, DestroyRef, EventEmitter, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { DelonLocaleModule } from '@delon/theme';
|
|
8
|
-
import * as i2 from '@angular/cdk/bidi';
|
|
9
|
-
import * as i3 from 'ng-zorro-antd/icon';
|
|
10
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
5
|
+
import { DelonLocaleService, DelonLocaleModule } from '@delon/theme';
|
|
6
|
+
import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
|
|
11
7
|
import { CommonModule } from '@angular/common';
|
|
12
8
|
|
|
13
9
|
class TagSelectComponent {
|
|
14
|
-
constructor(
|
|
15
|
-
this.i18n =
|
|
16
|
-
this.directionality =
|
|
17
|
-
this.cdr =
|
|
10
|
+
constructor() {
|
|
11
|
+
this.i18n = inject(DelonLocaleService);
|
|
12
|
+
this.directionality = inject(Directionality, { optional: true });
|
|
13
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
18
14
|
this.destroy$ = inject(DestroyRef);
|
|
19
15
|
this.locale = {};
|
|
20
16
|
this.expand = false;
|
|
@@ -24,9 +20,10 @@ class TagSelectComponent {
|
|
|
24
20
|
this.change = new EventEmitter();
|
|
25
21
|
}
|
|
26
22
|
ngOnInit() {
|
|
27
|
-
this.dir = this.directionality
|
|
28
|
-
this.directionality.
|
|
23
|
+
this.dir = this.directionality?.value;
|
|
24
|
+
this.directionality?.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(direction => {
|
|
29
25
|
this.dir = direction;
|
|
26
|
+
this.cdr.detectChanges();
|
|
30
27
|
});
|
|
31
28
|
this.i18n.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(() => {
|
|
32
29
|
this.locale = this.i18n.getData('tagSelect');
|
|
@@ -37,13 +34,10 @@ class TagSelectComponent {
|
|
|
37
34
|
this.expand = !this.expand;
|
|
38
35
|
this.change.emit(this.expand);
|
|
39
36
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
41
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: TagSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: TagSelectComponent, isStandalone: true, selector: "tag-select", inputs: { expandable: ["expandable", "expandable", booleanAttribute] }, outputs: { change: "change" }, host: { properties: { "class.tag-select": "true", "class.tag-select-rtl": "dir === 'rtl'", "class.tag-select-rtl__has-expand": "dir === 'rtl' && expandable", "class.tag-select__has-expand": "expandable", "class.tag-select__expanded": "expand" } }, exportAs: ["tagSelect"], ngImport: i0, template: "<ng-content />\n@if (expandable) {\n <a class=\"ant-tag ant-tag-checkable tag-select__trigger\" (click)=\"trigger()\">\n {{ expand ? locale.collapse : locale.expand }}\n <i nz-icon nzType=\"down\" [style.transform]=\"expand ? 'rotate(-180deg)' : null\"></i>\n </a>\n}\n", dependencies: [{ kind: "directive", type: NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
42
39
|
}
|
|
43
|
-
|
|
44
|
-
InputBoolean()
|
|
45
|
-
], TagSelectComponent.prototype, "expandable", void 0);
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TagSelectComponent, decorators: [{
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: TagSelectComponent, decorators: [{
|
|
47
41
|
type: Component,
|
|
48
42
|
args: [{ selector: 'tag-select', exportAs: 'tagSelect', host: {
|
|
49
43
|
'[class.tag-select]': 'true',
|
|
@@ -51,26 +45,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
51
45
|
'[class.tag-select-rtl__has-expand]': `dir === 'rtl' && expandable`,
|
|
52
46
|
'[class.tag-select__has-expand]': 'expandable',
|
|
53
47
|
'[class.tag-select__expanded]': 'expand'
|
|
54
|
-
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content />\n@if (expandable) {\n <a class=\"ant-tag ant-tag-checkable tag-select__trigger\" (click)=\"trigger()\">\n {{ expand ? locale.collapse : locale.expand }}\n <i nz-icon nzType=\"down\" [style.transform]=\"expand ? 'rotate(-180deg)' : null\"></i>\n </a>\n}\n" }]
|
|
55
|
-
}],
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
type: Input
|
|
48
|
+
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [NzIconDirective], template: "<ng-content />\n@if (expandable) {\n <a class=\"ant-tag ant-tag-checkable tag-select__trigger\" (click)=\"trigger()\">\n {{ expand ? locale.collapse : locale.expand }}\n <i nz-icon nzType=\"down\" [style.transform]=\"expand ? 'rotate(-180deg)' : null\"></i>\n </a>\n}\n" }]
|
|
49
|
+
}], propDecorators: { expandable: [{
|
|
50
|
+
type: Input,
|
|
51
|
+
args: [{ transform: booleanAttribute }]
|
|
59
52
|
}], change: [{
|
|
60
53
|
type: Output
|
|
61
54
|
}] } });
|
|
62
55
|
|
|
63
56
|
const COMPONENTS = [TagSelectComponent];
|
|
64
57
|
class TagSelectModule {
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
66
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0
|
|
67
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: TagSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
59
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: TagSelectModule, imports: [CommonModule, NzIconModule, DelonLocaleModule, TagSelectComponent], exports: [TagSelectComponent] }); }
|
|
60
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: TagSelectModule, imports: [CommonModule, NzIconModule, DelonLocaleModule] }); }
|
|
68
61
|
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: TagSelectModule, decorators: [{
|
|
70
63
|
type: NgModule,
|
|
71
64
|
args: [{
|
|
72
|
-
imports: [CommonModule, NzIconModule, DelonLocaleModule],
|
|
73
|
-
declarations: COMPONENTS,
|
|
65
|
+
imports: [CommonModule, NzIconModule, DelonLocaleModule, ...COMPONENTS],
|
|
74
66
|
exports: COMPONENTS
|
|
75
67
|
}]
|
|
76
68
|
}] });
|