@delon/abc 17.0.5 → 17.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +16 -12
- 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 +86 -125
- 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 +138 -172
- 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 +38 -41
- 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/sg.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input,
|
|
4
|
-
import { InputNumber } from '@delon/util/decorator';
|
|
2
|
+
import { numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ElementRef, inject, Renderer2, NgModule } from '@angular/core';
|
|
5
3
|
import * as i1 from '@delon/util/config';
|
|
6
|
-
import
|
|
4
|
+
import { ResponsiveService } from '@delon/theme';
|
|
7
5
|
import { CommonModule } from '@angular/common';
|
|
8
6
|
|
|
9
7
|
class SGContainerComponent {
|
|
@@ -16,19 +14,10 @@ class SGContainerComponent {
|
|
|
16
14
|
col: 2
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGContainerComponent, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.1.0", type: SGContainerComponent, isStandalone: true, selector: "sg-container, [sg-container]", inputs: { gutter: ["gutter", "gutter", numberAttribute], colInCon: ["sg-container", "colInCon", (v) => (v == null ? null : numberAttribute(v))], col: ["col", "col", (v) => (v == null ? null : numberAttribute(v))] }, host: { properties: { "style.margin-left.px": "marginValue", "style.margin-right.px": "marginValue", "class.ant-row": "true", "class.sg__wrap": "true" } }, exportAs: ["sgContainer"], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
InputNumber()
|
|
24
|
-
], SGContainerComponent.prototype, "gutter", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
InputNumber(null)
|
|
27
|
-
], SGContainerComponent.prototype, "colInCon", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
InputNumber(null)
|
|
30
|
-
], SGContainerComponent.prototype, "col", void 0);
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SGContainerComponent, decorators: [{
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGContainerComponent, decorators: [{
|
|
32
21
|
type: Component,
|
|
33
22
|
args: [{
|
|
34
23
|
selector: 'sg-container, [sg-container]',
|
|
@@ -42,36 +31,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
42
31
|
},
|
|
43
32
|
preserveWhitespaces: false,
|
|
44
33
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
|
-
encapsulation: ViewEncapsulation.None
|
|
34
|
+
encapsulation: ViewEncapsulation.None,
|
|
35
|
+
standalone: true
|
|
46
36
|
}]
|
|
47
37
|
}], ctorParameters: () => [{ type: i1.AlainConfigService }], propDecorators: { gutter: [{
|
|
48
|
-
type: Input
|
|
38
|
+
type: Input,
|
|
39
|
+
args: [{ transform: numberAttribute }]
|
|
49
40
|
}], colInCon: [{
|
|
50
41
|
type: Input,
|
|
51
|
-
args: ['sg-container']
|
|
42
|
+
args: [{ alias: 'sg-container', transform: (v) => (v == null ? null : numberAttribute(v)) }]
|
|
52
43
|
}], col: [{
|
|
53
|
-
type: Input
|
|
44
|
+
type: Input,
|
|
45
|
+
args: [{ transform: (v) => (v == null ? null : numberAttribute(v)) }]
|
|
54
46
|
}] } });
|
|
55
47
|
|
|
56
48
|
const prefixCls = `sg`;
|
|
57
49
|
class SGComponent {
|
|
58
50
|
get paddingValue() {
|
|
59
|
-
return this.
|
|
51
|
+
return this.parentComp.gutter / 2;
|
|
60
52
|
}
|
|
61
|
-
constructor(
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.rep =
|
|
53
|
+
constructor() {
|
|
54
|
+
this.el = inject(ElementRef).nativeElement;
|
|
55
|
+
this.ren = inject(Renderer2);
|
|
56
|
+
this.rep = inject(ResponsiveService);
|
|
57
|
+
this.parentComp = inject(SGContainerComponent, { host: true, optional: true });
|
|
65
58
|
this.clsMap = [];
|
|
66
59
|
this.inited = false;
|
|
67
60
|
this.col = null;
|
|
68
|
-
if (
|
|
61
|
+
if (this.parentComp == null) {
|
|
69
62
|
throw new Error(`[sg] must include 'sg-container' component`);
|
|
70
63
|
}
|
|
71
|
-
this.el = el.nativeElement;
|
|
72
64
|
}
|
|
73
65
|
setClass() {
|
|
74
|
-
const { el, ren, clsMap, col
|
|
66
|
+
const { el, ren, clsMap, col } = this;
|
|
67
|
+
const parent = this.parentComp;
|
|
75
68
|
clsMap.forEach(cls => ren.removeClass(el, cls));
|
|
76
69
|
clsMap.length = 0;
|
|
77
70
|
const parentCol = parent.colInCon || parent.col;
|
|
@@ -87,13 +80,10 @@ class SGComponent {
|
|
|
87
80
|
this.setClass();
|
|
88
81
|
this.inited = true;
|
|
89
82
|
}
|
|
90
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
91
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.1.0", type: SGComponent, isStandalone: true, selector: "sg", inputs: { col: ["col", "col", (v) => (v == null ? null : numberAttribute(v))] }, host: { properties: { "style.padding-left.px": "paddingValue", "style.padding-right.px": "paddingValue" } }, exportAs: ["sg"], usesOnChanges: true, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
92
85
|
}
|
|
93
|
-
|
|
94
|
-
InputNumber(null)
|
|
95
|
-
], SGComponent.prototype, "col", void 0);
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SGComponent, decorators: [{
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGComponent, decorators: [{
|
|
97
87
|
type: Component,
|
|
98
88
|
args: [{
|
|
99
89
|
selector: 'sg',
|
|
@@ -105,27 +95,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
105
95
|
},
|
|
106
96
|
preserveWhitespaces: false,
|
|
107
97
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
108
|
-
encapsulation: ViewEncapsulation.None
|
|
98
|
+
encapsulation: ViewEncapsulation.None,
|
|
99
|
+
standalone: true
|
|
109
100
|
}]
|
|
110
|
-
}], ctorParameters: () => [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
type: Host
|
|
114
|
-
}] }, { type: i2.ResponsiveService }], propDecorators: { col: [{
|
|
115
|
-
type: Input
|
|
101
|
+
}], ctorParameters: () => [], propDecorators: { col: [{
|
|
102
|
+
type: Input,
|
|
103
|
+
args: [{ transform: (v) => (v == null ? null : numberAttribute(v)) }]
|
|
116
104
|
}] } });
|
|
117
105
|
|
|
118
106
|
const COMPONENTS = [SGContainerComponent, SGComponent];
|
|
119
107
|
class SGModule {
|
|
120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
121
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0
|
|
122
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0
|
|
108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
109
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: SGModule, imports: [CommonModule, SGContainerComponent, SGComponent], exports: [SGContainerComponent, SGComponent] }); }
|
|
110
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGModule, imports: [CommonModule] }); }
|
|
123
111
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: SGModule, decorators: [{
|
|
125
113
|
type: NgModule,
|
|
126
114
|
args: [{
|
|
127
|
-
imports: [CommonModule],
|
|
128
|
-
declarations: COMPONENTS,
|
|
115
|
+
imports: [CommonModule, ...COMPONENTS],
|
|
129
116
|
exports: COMPONENTS
|
|
130
117
|
}]
|
|
131
118
|
}] });
|
package/fesm2022/sg.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sg.mjs","sources":["../../../../packages/abc/sg/sg-container.component.ts","../../../../packages/abc/sg/sg.component.ts","../../../../packages/abc/sg/sg.module.ts","../../../../packages/abc/sg/sg.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { REP_TYPE } from '@delon/theme';\nimport { AlainConfigService } from '@delon/util/config';\
|
|
1
|
+
{"version":3,"file":"sg.mjs","sources":["../../../../packages/abc/sg/sg-container.component.ts","../../../../packages/abc/sg/sg.component.ts","../../../../packages/abc/sg/sg.module.ts","../../../../packages/abc/sg/sg.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, numberAttribute } from '@angular/core';\n\nimport type { REP_TYPE } from '@delon/theme';\nimport { AlainConfigService } from '@delon/util/config';\n\n@Component({\n selector: 'sg-container, [sg-container]',\n exportAs: 'sgContainer',\n template: ` <ng-content /> `,\n host: {\n '[style.margin-left.px]': 'marginValue',\n '[style.margin-right.px]': 'marginValue',\n '[class.ant-row]': 'true',\n '[class.sg__wrap]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true\n})\nexport class SGContainerComponent {\n @Input({ transform: numberAttribute }) gutter!: number;\n @Input({ alias: 'sg-container', transform: (v: unknown) => (v == null ? null : numberAttribute(v)) })\n colInCon?: REP_TYPE;\n @Input({ transform: (v: unknown) => (v == null ? null : numberAttribute(v)) }) col!: REP_TYPE;\n\n get marginValue(): number {\n return -(this.gutter / 2);\n }\n\n constructor(configSrv: AlainConfigService) {\n configSrv.attach(this, 'sg', {\n gutter: 32,\n col: 2\n });\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n ViewEncapsulation,\n inject,\n numberAttribute\n} from '@angular/core';\n\nimport { ResponsiveService } from '@delon/theme';\n\nimport { SGContainerComponent } from './sg-container.component';\n\nconst prefixCls = `sg`;\n\n@Component({\n selector: 'sg',\n exportAs: 'sg',\n template: ` <ng-content /> `,\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})\nexport class SGComponent implements OnChanges, AfterViewInit {\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly ren = inject(Renderer2);\n private readonly rep = inject(ResponsiveService);\n private readonly parentComp = inject(SGContainerComponent, { host: true, optional: true })!;\n\n private clsMap: string[] = [];\n private inited = false;\n\n @Input({ transform: (v: unknown) => (v == null ? null : numberAttribute(v)) }) col: number | null = null;\n\n get paddingValue(): number {\n return this.parentComp.gutter / 2;\n }\n\n constructor() {\n if (this.parentComp == null) {\n throw new Error(`[sg] must include 'sg-container' component`);\n }\n }\n\n private setClass(): this {\n const { el, ren, clsMap, col } = this;\n const parent = this.parentComp;\n clsMap.forEach(cls => ren.removeClass(el, cls));\n clsMap.length = 0;\n const parentCol = parent.colInCon || parent.col;\n clsMap.push(...this.rep.genCls(col != null ? col : parentCol, parentCol), `${prefixCls}__item`);\n clsMap.forEach(cls => ren.addClass(el, cls));\n return this;\n }\n\n ngOnChanges(): void {\n if (this.inited) this.setClass();\n }\n\n ngAfterViewInit(): void {\n this.setClass();\n this.inited = true;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SGContainerComponent } from './sg-container.component';\nimport { SGComponent } from './sg.component';\n\nconst COMPONENTS = [SGContainerComponent, SGComponent];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class SGModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAoBa,oBAAoB,CAAA;AAM/B,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAC3B;AAED,IAAA,WAAA,CAAY,SAA6B,EAAA;AACvC,QAAA,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE;AAC3B,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,GAAG,EAAE,CAAC;AACP,SAAA,CAAC,CAAC;KACJ;8GAfU,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,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