@delon/abc 20.0.0 → 20.0.2
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/cell/index.d.ts +1 -1
- package/ellipsis/index.d.ts +1 -1
- package/error-collect/index.d.ts +2 -2
- package/exception/index.d.ts +2 -2
- package/fesm2022/auto-focus.mjs +9 -9
- package/fesm2022/auto-focus.mjs.map +1 -1
- package/fesm2022/cell.mjs +27 -27
- package/fesm2022/cell.mjs.map +1 -1
- package/fesm2022/chart-observer-size.mjs +10 -10
- package/fesm2022/chart-observer-size.mjs.map +1 -1
- package/fesm2022/count-down.mjs +7 -7
- package/fesm2022/count-down.mjs.map +1 -1
- package/fesm2022/date-picker.mjs +10 -10
- package/fesm2022/date-picker.mjs.map +1 -1
- package/fesm2022/down-file.mjs +7 -7
- package/fesm2022/down-file.mjs.map +1 -1
- package/fesm2022/ellipsis.mjs +9 -9
- package/fesm2022/ellipsis.mjs.map +1 -1
- package/fesm2022/error-collect.mjs +11 -11
- package/fesm2022/error-collect.mjs.map +1 -1
- package/fesm2022/exception.mjs +20 -20
- package/fesm2022/exception.mjs.map +1 -1
- package/fesm2022/footer-toolbar.mjs +9 -9
- package/fesm2022/footer-toolbar.mjs.map +1 -1
- package/fesm2022/full-content.mjs +16 -16
- package/fesm2022/full-content.mjs.map +1 -1
- package/fesm2022/global-footer.mjs +15 -15
- package/fesm2022/global-footer.mjs.map +1 -1
- package/fesm2022/hotkey.mjs +7 -7
- package/fesm2022/hotkey.mjs.map +1 -1
- package/fesm2022/loading.mjs +10 -10
- package/fesm2022/loading.mjs.map +1 -1
- package/fesm2022/lodop.mjs +7 -7
- package/fesm2022/lodop.mjs.map +1 -1
- package/fesm2022/media.mjs +10 -10
- package/fesm2022/media.mjs.map +1 -1
- package/fesm2022/notice-icon.mjs +21 -21
- package/fesm2022/notice-icon.mjs.map +1 -1
- package/fesm2022/onboarding.mjs +10 -10
- package/fesm2022/onboarding.mjs.map +1 -1
- package/fesm2022/page-header.mjs +7 -7
- package/fesm2022/page-header.mjs.map +1 -1
- package/fesm2022/pdf.mjs +7 -7
- package/fesm2022/pdf.mjs.map +1 -1
- package/fesm2022/quick-menu.mjs +7 -7
- package/fesm2022/quick-menu.mjs.map +1 -1
- package/fesm2022/reuse-tab.mjs +22 -22
- package/fesm2022/reuse-tab.mjs.map +1 -1
- package/fesm2022/se.mjs +15 -15
- package/fesm2022/se.mjs.map +1 -1
- package/fesm2022/sg.mjs +10 -10
- package/fesm2022/sg.mjs.map +1 -1
- package/fesm2022/st.mjs +59 -48
- package/fesm2022/st.mjs.map +1 -1
- package/fesm2022/sv.mjs +18 -18
- package/fesm2022/sv.mjs.map +1 -1
- package/fesm2022/tag-select.mjs +7 -7
- package/fesm2022/tag-select.mjs.map +1 -1
- package/fesm2022/xlsx.mjs +10 -10
- package/fesm2022/xlsx.mjs.map +1 -1
- package/fesm2022/zip.mjs +3 -3
- package/fesm2022/zip.mjs.map +1 -1
- package/global-footer/index.d.ts +2 -2
- package/package.json +9 -9
- package/page-header/index.d.ts +2 -2
- package/reuse-tab/index.d.ts +2 -2
- package/se/index.d.ts +1 -1
- package/st/style/index.less +1 -1
- package/sv/index.d.ts +1 -1
- package/tag-select/index.d.ts +2 -2
package/cell/index.d.ts
CHANGED
|
@@ -283,7 +283,7 @@ declare class CellHostDirective {
|
|
|
283
283
|
|
|
284
284
|
declare class CellModule {
|
|
285
285
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CellModule, never>;
|
|
286
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<CellModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.NzCheckboxModule, typeof i4.NzRadioModule, typeof i5.NzBadgeModule, typeof i6.NzTagModule, typeof i7.
|
|
286
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<CellModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.NzCheckboxModule, typeof i4.NzRadioModule, typeof i5.NzBadgeModule, typeof i6.NzTagModule, typeof i7.NzTooltipModule, typeof i8.NzIconModule, typeof i9.NzImageModule, typeof CellComponent, typeof CellHostDirective], [typeof CellComponent]>;
|
|
287
287
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<CellModule>;
|
|
288
288
|
}
|
|
289
289
|
|
package/ellipsis/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare class EllipsisComponent implements AfterViewInit, OnChanges {
|
|
|
48
48
|
|
|
49
49
|
declare class EllipsisModule {
|
|
50
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<EllipsisModule, never>;
|
|
51
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EllipsisModule, never, [typeof i1.CommonModule, typeof i2.ObserversModule, typeof i3.
|
|
51
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EllipsisModule, never, [typeof i1.CommonModule, typeof i2.ObserversModule, typeof i3.NzTooltipModule, typeof EllipsisComponent], [typeof EllipsisComponent]>;
|
|
52
52
|
static ɵinj: i0.ɵɵInjectorDeclaration<EllipsisModule>;
|
|
53
53
|
}
|
|
54
54
|
|
package/error-collect/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { OnInit } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
@@ -13,7 +13,7 @@ declare class ErrorCollectComponent implements OnInit {
|
|
|
13
13
|
private formEl;
|
|
14
14
|
_hiden: _angular_core.WritableSignal<boolean>;
|
|
15
15
|
count: _angular_core.WritableSignal<number>;
|
|
16
|
-
dir: _angular_core.WritableSignal<
|
|
16
|
+
dir: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
17
17
|
readonly freq: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
18
18
|
readonly offsetTop: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
19
19
|
constructor();
|
package/exception/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
4
|
import * as _delon_theme from '@delon/theme';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
@@ -13,7 +13,7 @@ declare class ExceptionComponent {
|
|
|
13
13
|
private readonly cogSrv;
|
|
14
14
|
private readonly conTpl;
|
|
15
15
|
locale: _angular_core.Signal<_delon_theme.ExceptionLocaleData>;
|
|
16
|
-
dir: _angular_core.WritableSignal<
|
|
16
|
+
dir: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
17
17
|
hasCon: _angular_core.WritableSignal<boolean>;
|
|
18
18
|
private typeDict;
|
|
19
19
|
typeItem: _angular_core.WritableSignal<{
|
package/fesm2022/auto-focus.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { timer, take } from 'rxjs';
|
|
|
4
4
|
|
|
5
5
|
class AutoFocusDirective {
|
|
6
6
|
el = inject(ElementRef).nativeElement;
|
|
7
|
-
enabled = input(true, { transform: booleanAttribute });
|
|
8
|
-
delay = input(25, { transform: numberAttribute });
|
|
7
|
+
enabled = input(true, ...(ngDevMode ? [{ debugName: "enabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
8
|
+
delay = input(25, ...(ngDevMode ? [{ debugName: "delay", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
9
9
|
focus = output();
|
|
10
10
|
constructor() {
|
|
11
11
|
afterNextRender(() => {
|
|
@@ -19,10 +19,10 @@ class AutoFocusDirective {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
23
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: AutoFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
23
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: AutoFocusDirective, isStandalone: true, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focus: "focus" }, exportAs: ["autoFocus"], ngImport: i0 });
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
26
26
|
type: Directive,
|
|
27
27
|
args: [{
|
|
28
28
|
selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
|
|
@@ -32,11 +32,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
32
32
|
|
|
33
33
|
const COMPONENTS = [AutoFocusDirective];
|
|
34
34
|
class AutoFocusModule {
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
36
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0
|
|
37
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
36
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: AutoFocusModule, imports: [AutoFocusDirective], exports: [AutoFocusDirective] });
|
|
37
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: AutoFocusModule });
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: AutoFocusModule, decorators: [{
|
|
40
40
|
type: NgModule,
|
|
41
41
|
args: [{
|
|
42
42
|
imports: COMPONENTS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-focus.mjs","sources":["../../../../packages/abc/auto-focus/auto-focus.directive.ts","../../../../packages/abc/auto-focus/auto-focus.module.ts","../../../../packages/abc/auto-focus/auto-focus.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n numberAttribute,\n output\n} from '@angular/core';\nimport { take, timer } from 'rxjs';\n\n@Directive({\n selector: '[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]',\n exportAs: 'autoFocus'\n})\nexport class AutoFocusDirective {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n enabled = input(true, { transform: booleanAttribute });\n delay = input(25, { transform: numberAttribute });\n readonly focus = output();\n\n constructor() {\n afterNextRender(() => {\n if (this.enabled()) {\n timer(this.delay())\n .pipe(take(1))\n .subscribe(() => {\n this.el.focus({ preventScroll: false });\n this.focus.emit();\n });\n }\n });\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { AutoFocusDirective } from './auto-focus.directive';\n\nconst COMPONENTS = [AutoFocusDirective];\n\n@NgModule({\n imports: COMPONENTS,\n exports: COMPONENTS\n})\nexport class AutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAgBa,kBAAkB,CAAA;AACZ,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"auto-focus.mjs","sources":["../../../../packages/abc/auto-focus/auto-focus.directive.ts","../../../../packages/abc/auto-focus/auto-focus.module.ts","../../../../packages/abc/auto-focus/auto-focus.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n numberAttribute,\n output\n} from '@angular/core';\nimport { take, timer } from 'rxjs';\n\n@Directive({\n selector: '[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]',\n exportAs: 'autoFocus'\n})\nexport class AutoFocusDirective {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n enabled = input(true, { transform: booleanAttribute });\n delay = input(25, { transform: numberAttribute });\n readonly focus = output();\n\n constructor() {\n afterNextRender(() => {\n if (this.enabled()) {\n timer(this.delay())\n .pipe(take(1))\n .subscribe(() => {\n this.el.focus({ preventScroll: false });\n this.focus.emit();\n });\n }\n });\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { AutoFocusDirective } from './auto-focus.directive';\n\nconst COMPONENTS = [AutoFocusDirective];\n\n@NgModule({\n imports: COMPONENTS,\n exports: COMPONENTS\n})\nexport class AutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAgBa,kBAAkB,CAAA;AACZ,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AAC/E,IAAA,OAAO,GAAG,KAAK,CAAC,IAAI,2CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AACtD,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,yCAAI,SAAS,EAAE,eAAe,EAAA,CAAA,GAAA,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AACX,iBAAA;;;ACXD,MAAM,UAAU,GAAG,CAAC,kBAAkB,CAAC;MAM1B,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,OAAA,EAAA,CANR,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAAlB,kBAAkB,CAAA,EAAA,CAAA;wGAMzB,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,UAAU;AACnB,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACTD;;AAEG;;;;"}
|
package/fesm2022/cell.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
|
|
|
14
14
|
import { NzImageService, NzImageModule } from 'ng-zorro-antd/image';
|
|
15
15
|
import { NzRadioComponent, NzRadioModule } from 'ng-zorro-antd/radio';
|
|
16
16
|
import { NzTagComponent, NzTagModule } from 'ng-zorro-antd/tag';
|
|
17
|
-
import { NzTooltipDirective,
|
|
17
|
+
import { NzTooltipDirective, NzTooltipModule } from 'ng-zorro-antd/tooltip';
|
|
18
18
|
import { deepMerge, warn } from '@delon/util/other';
|
|
19
19
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
20
20
|
import { yn } from '@delon/theme';
|
|
@@ -177,10 +177,10 @@ class CellService {
|
|
|
177
177
|
return res;
|
|
178
178
|
}));
|
|
179
179
|
}
|
|
180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
181
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
181
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellService, providedIn: 'root' });
|
|
182
182
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellService, decorators: [{
|
|
184
184
|
type: Injectable,
|
|
185
185
|
args: [{ providedIn: 'root' }]
|
|
186
186
|
}] });
|
|
@@ -188,7 +188,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
188
188
|
class CellHostDirective {
|
|
189
189
|
srv = inject(CellService);
|
|
190
190
|
vcr = inject(ViewContainerRef);
|
|
191
|
-
data = input.required();
|
|
191
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
192
192
|
constructor() {
|
|
193
193
|
effect(() => {
|
|
194
194
|
const data = this.data();
|
|
@@ -205,10 +205,10 @@ class CellHostDirective {
|
|
|
205
205
|
componentRef.instance.data = data;
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
209
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0
|
|
208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellHostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
209
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: CellHostDirective, isStandalone: true, selector: "[cell-widget-host]", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
210
210
|
}
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellHostDirective, decorators: [{
|
|
212
212
|
type: Directive,
|
|
213
213
|
args: [{
|
|
214
214
|
selector: '[cell-widget-host]'
|
|
@@ -223,18 +223,18 @@ class CellComponent {
|
|
|
223
223
|
win = inject(WINDOW);
|
|
224
224
|
el = inject(ElementRef).nativeElement;
|
|
225
225
|
destroy$;
|
|
226
|
-
_text = signal('');
|
|
227
|
-
_unit = signal(undefined);
|
|
228
|
-
_res = signal(undefined);
|
|
229
|
-
showDefault = computed(() => this.value() == this.safeOpt.default?.condition);
|
|
230
|
-
value = model();
|
|
231
|
-
options = input();
|
|
232
|
-
loading = input(false, { transform: booleanAttribute });
|
|
233
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
226
|
+
_text = signal('', ...(ngDevMode ? [{ debugName: "_text" }] : []));
|
|
227
|
+
_unit = signal(undefined, ...(ngDevMode ? [{ debugName: "_unit" }] : []));
|
|
228
|
+
_res = signal(undefined, ...(ngDevMode ? [{ debugName: "_res" }] : []));
|
|
229
|
+
showDefault = computed(() => this.value() == this.safeOpt.default?.condition, ...(ngDevMode ? [{ debugName: "showDefault" }] : []));
|
|
230
|
+
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
231
|
+
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
232
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
233
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
234
234
|
get safeOpt() {
|
|
235
235
|
return this._res()?.options ?? {};
|
|
236
236
|
}
|
|
237
|
-
isText = computed(() => this._res()?.safeHtml === 'text');
|
|
237
|
+
isText = computed(() => this._res()?.safeHtml === 'text', ...(ngDevMode ? [{ debugName: "isText" }] : []));
|
|
238
238
|
constructor() {
|
|
239
239
|
combineLatest([toObservable(this.loading), toObservable(this.disabled)])
|
|
240
240
|
.pipe(takeUntilDestroyed())
|
|
@@ -300,8 +300,8 @@ class CellComponent {
|
|
|
300
300
|
ngOnDestroy() {
|
|
301
301
|
this.destroy$?.unsubscribe();
|
|
302
302
|
}
|
|
303
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
304
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: CellComponent, isStandalone: true, selector: "cell, [cell]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, exportAs: ["cell"], ngImport: i0, template: `
|
|
305
305
|
<ng-template #text>
|
|
306
306
|
@let res = _res();
|
|
307
307
|
@let text = _text();
|
|
@@ -377,7 +377,7 @@ class CellComponent {
|
|
|
377
377
|
}
|
|
378
378
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "component", type: NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "component", type: NzBadgeComponent, selector: "nz-badge", inputs: ["nzShowZero", "nzShowDot", "nzStandalone", "nzDot", "nzOverflowCount", "nzColor", "nzStyle", "nzText", "nzTitle", "nzStatus", "nzCount", "nzOffset", "nzSize"], exportAs: ["nzBadge"] }, { 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: "ngmodule", type: NzImageModule }, { kind: "directive", type: CellHostDirective, selector: "[cell-widget-host]", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
379
379
|
}
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellComponent, decorators: [{
|
|
381
381
|
type: Component,
|
|
382
382
|
args: [{
|
|
383
383
|
selector: 'cell, [cell]',
|
|
@@ -476,27 +476,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
476
476
|
|
|
477
477
|
const COMPS = [CellComponent];
|
|
478
478
|
class CellModule {
|
|
479
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
480
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0
|
|
479
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
480
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: CellModule, imports: [CommonModule,
|
|
481
481
|
FormsModule,
|
|
482
482
|
NzCheckboxModule,
|
|
483
483
|
NzRadioModule,
|
|
484
484
|
NzBadgeModule,
|
|
485
485
|
NzTagModule,
|
|
486
|
-
|
|
486
|
+
NzTooltipModule,
|
|
487
487
|
NzIconModule,
|
|
488
488
|
NzImageModule$1, CellComponent, CellHostDirective], exports: [CellComponent] });
|
|
489
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0
|
|
489
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellModule, imports: [CommonModule,
|
|
490
490
|
FormsModule,
|
|
491
491
|
NzCheckboxModule,
|
|
492
492
|
NzRadioModule,
|
|
493
493
|
NzBadgeModule,
|
|
494
494
|
NzTagModule,
|
|
495
|
-
|
|
495
|
+
NzTooltipModule,
|
|
496
496
|
NzIconModule,
|
|
497
497
|
NzImageModule$1, COMPS] });
|
|
498
498
|
}
|
|
499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CellModule, decorators: [{
|
|
500
500
|
type: NgModule,
|
|
501
501
|
args: [{
|
|
502
502
|
imports: [
|
|
@@ -506,7 +506,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
506
506
|
NzRadioModule,
|
|
507
507
|
NzBadgeModule,
|
|
508
508
|
NzTagModule,
|
|
509
|
-
|
|
509
|
+
NzTooltipModule,
|
|
510
510
|
NzIconModule,
|
|
511
511
|
NzImageModule$1,
|
|
512
512
|
...COMPS,
|
package/fesm2022/cell.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.mjs","sources":["../../../../packages/abc/cell/cell.service.ts","../../../../packages/abc/cell/cell-host.directive.ts","../../../../packages/abc/cell/cell.component.ts","../../../../packages/abc/cell/cell.module.ts","../../../../packages/abc/cell/provide.ts","../../../../packages/abc/cell/cell.ts"],"sourcesContent":["import { Injectable, Type, inject } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { map, Observable, of } from 'rxjs';\n\nimport { yn } from '@delon/theme';\nimport { AlainConfigService } from '@delon/util/config';\nimport { formatDate } from '@delon/util/date-time';\nimport { CurrencyService, formatMask } from '@delon/util/format';\nimport { deepMerge } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzI18nService } from 'ng-zorro-antd/i18n';\n\nimport type {\n CellFuValue,\n CellOptions,\n CellTextResult,\n CellTextUnit,\n CellType,\n CellWidget,\n CellWidgetFn\n} from './cell.types';\n\n@Injectable({ providedIn: 'root' })\nexport class CellService {\n private readonly nzI18n = inject(NzI18nService);\n private readonly currency = inject(CurrencyService);\n private readonly dom = inject(DomSanitizer);\n private readonly configSrv = inject(AlainConfigService);\n private globalOptions = this.configSrv.merge('cell', {\n date: { format: 'yyyy-MM-dd HH:mm:ss' },\n img: { size: 32 },\n default: { text: '-' }\n })!;\n private widgets: Record<string, CellWidget> = {\n date: {\n type: 'fn',\n ref: (value, opt) => {\n return {\n text: formatDate(value as string, opt.date!.format!, {\n locale: this.nzI18n.getDateLocale(),\n customFormat: this.configSrv.get('themePipe')?.dateFormatCustom\n })\n };\n }\n },\n mega: {\n type: 'fn',\n ref: (value, opt) => {\n const res = this.currency.mega(value as number, opt.mega);\n return { text: res.value, unit: res.unitI18n };\n }\n },\n currency: {\n type: 'fn',\n ref: (value, opt) => {\n return { text: this.currency.format(value as number, opt.currency) };\n }\n },\n cny: {\n type: 'fn',\n ref: (value, opt) => {\n return { text: this.currency.cny(value as number, opt.cny) };\n }\n },\n boolean: {\n type: 'fn',\n ref: (value, opt) => {\n return { text: this.dom.bypassSecurityTrustHtml(yn(value as boolean, opt.boolean)) };\n }\n },\n img: {\n type: 'fn',\n ref: value => {\n return { text: Array.isArray(value) ? value : [value] };\n }\n }\n };\n\n registerWidget(key: string, widget: Type<unknown>): void {\n this.widgets[key] = { type: 'widget', ref: widget };\n }\n\n getWidget(key: string): CellWidget | undefined {\n return this.widgets[key];\n }\n\n private genType(value: unknown, options: CellOptions): CellType {\n if (options.type != null) return options.type;\n\n const typeOf = typeof value;\n // When is timestamp\n if (typeOf === 'number' && /^[0-9]{13}$/g.test(value as string)) return 'date';\n if (value instanceof Date || options.date != null) return 'date';\n\n // Auto detection\n if (options.widget != null) return 'widget';\n else if (options.mega != null) return 'mega';\n else if (options.currency != null) return 'currency';\n else if (options.cny != null) return 'cny';\n else if (options.img != null) return 'img';\n else if (options.link != null) return 'link';\n else if (options.html != null) return 'html';\n else if (options.badge != null) return 'badge';\n else if (options.tag != null) return 'tag';\n else if (options.checkbox != null) return 'checkbox';\n else if (options.radio != null) return 'radio';\n else if (options.enum != null) return 'enum';\n else if (typeOf === 'number') return 'number';\n else if (typeOf === 'boolean' || options.boolean != null) return 'boolean';\n else return 'string';\n }\n\n fixOptions(options?: CellOptions): CellOptions {\n return deepMerge({}, this.globalOptions, options);\n }\n\n get(value: unknown, options?: CellOptions): Observable<CellTextResult> {\n const type = this.genType(value, { ...options });\n const opt = this.fixOptions(options);\n opt.type = type;\n const isSafeHtml =\n typeof value === 'object' &&\n typeof (value as NzSafeAny)?.getTypeName === 'function' &&\n (value as NzSafeAny)?.getTypeName() != null;\n\n let res: CellTextResult = {\n result:\n typeof value === 'object' && !isSafeHtml\n ? (value as CellTextUnit)\n : { text: value == null ? '' : isSafeHtml ? value : `${value}` },\n options: opt\n };\n\n const widget = this.widgets[type];\n if (widget?.type === 'fn') {\n res.result = (widget.ref as CellWidgetFn)(value, opt);\n }\n\n return (typeof value === 'function' ? (value as CellFuValue)(value, opt) : of(res.result)).pipe(\n map(text => {\n res.result = text;\n let dictData: { tooltip?: string } | undefined;\n switch (type) {\n case 'badge':\n dictData = (opt.badge?.data ?? {})[value as string];\n res.result = { color: 'default', ...dictData };\n break;\n case 'tag':\n dictData = (opt.tag?.data ?? {})[value as string];\n res.result = dictData as CellTextUnit;\n break;\n case 'enum':\n res.result = { text: (opt.enum ?? {})[value as string] };\n break;\n case 'html':\n res.safeHtml = opt.html?.safe;\n break;\n case 'string':\n if (isSafeHtml) res.safeHtml = 'safeHtml';\n break;\n }\n if ((type === 'badge' || type === 'tag') && dictData?.tooltip != null) {\n res.options.tooltip = dictData.tooltip;\n }\n if (opt.mask != null) {\n res.result.text = formatMask(res.result.text as string, opt.mask);\n }\n return res;\n })\n );\n }\n}\n","import { Directive, Type, ViewContainerRef, effect, inject, input } from '@angular/core';\n\nimport { warn } from '@delon/util/other';\n\nimport { CellService } from './cell.service';\nimport { CellTextResult } from './cell.types';\n\n@Directive({\n selector: '[cell-widget-host]'\n})\nexport class CellHostDirective {\n private readonly srv = inject(CellService);\n private readonly vcr = inject(ViewContainerRef);\n\n data = input.required<CellTextResult>();\n\n constructor() {\n effect(() => {\n const data = this.data();\n const widget = data.options.widget!;\n const componentType = this.srv.getWidget(widget.key!)?.ref as Type<unknown>;\n if (componentType == null) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n warn(`cell: No widget for type \"${widget.key}\"`);\n }\n return;\n }\n\n this.vcr.clear();\n const componentRef = this.vcr.createComponent(componentType);\n (componentRef.instance as { data: CellTextResult }).data = data;\n });\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n model,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport type { SafeValue } from '@angular/platform-browser';\nimport { Router } from '@angular/router';\nimport { combineLatest, Subscription, take } from 'rxjs';\n\nimport { updateHostClass } from '@delon/util/browser';\nimport { WINDOW } from '@delon/util/token';\nimport { NzBadgeComponent } from 'ng-zorro-antd/badge';\nimport { NzCheckboxComponent } from 'ng-zorro-antd/checkbox';\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\nimport { NzImage, NzImageModule, NzImageService } from 'ng-zorro-antd/image';\nimport { NzRadioComponent } from 'ng-zorro-antd/radio';\nimport { NzTagComponent } from 'ng-zorro-antd/tag';\nimport { NzTooltipDirective } from 'ng-zorro-antd/tooltip';\n\nimport { CellHostDirective } from './cell-host.directive';\nimport { CellService } from './cell.service';\nimport type { CellDefaultText, CellOptions, CellTextResult, CellValue } from './cell.types';\n\n@Component({\n selector: 'cell, [cell]',\n template: `\n <ng-template #text>\n @let res = _res();\n @let text = _text();\n @switch (safeOpt.type) {\n @case ('checkbox') {\n <label nz-checkbox [nzDisabled]=\"disabled()\" [ngModel]=\"value()\" (ngModelChange)=\"value.set($event)\">\n {{ safeOpt.checkbox?.label }}\n </label>\n }\n @case ('radio') {\n <label nz-radio [nzDisabled]=\"disabled()\" [ngModel]=\"value()\" (ngModelChange)=\"value.set($event)\">\n {{ safeOpt.radio?.label }}\n </label>\n }\n @case ('link') {\n <a (click)=\"_link($event)\" [attr.target]=\"safeOpt.link?.target\" [attr.title]=\"value()\" [innerHTML]=\"text\"></a>\n }\n @case ('tag') {\n <nz-tag [nzColor]=\"res?.result?.color\">\n <span [innerHTML]=\"text\"></span>\n </nz-tag>\n }\n @case ('badge') {\n <nz-badge [nzStatus]=\"res?.result?.color\" nzText=\"{{ text }}\" />\n }\n @case ('widget') {\n @if (res) {\n <ng-template cell-widget-host [data]=\"res\" />\n }\n }\n @case ('img') {\n @for (i of $any(text); track $index) {\n @let img = safeOpt.img;\n <img\n [attr.src]=\"i\"\n [attr.height]=\"img?.size\"\n [attr.width]=\"img?.size\"\n (click)=\"_showImg(i)\"\n class=\"img\"\n [class.point]=\"img?.big\"\n />\n }\n }\n @default {\n @if (isText()) {\n <span [innerText]=\"text\" [attr.title]=\"value()\"></span>\n } @else {\n <span [innerHTML]=\"text\" [attr.title]=\"value()\"></span>\n }\n @if (_unit()) {\n <span class=\"unit\">{{ _unit() }}</span>\n }\n }\n }\n </ng-template>\n <ng-template #textWrap>\n @if (showDefault()) {\n {{ safeOpt.default?.text }}\n } @else {\n @if (safeOpt.tooltip) {\n <span [nz-tooltip]=\"safeOpt.tooltip\">\n <ng-template [ngTemplateOutlet]=\"text\" />\n </span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"text\" />\n }\n }\n </ng-template>\n @if (loading()) {\n <nz-icon nzType=\"loading\" />\n } @else {\n <ng-template [ngTemplateOutlet]=\"textWrap\" />\n }\n `,\n exportAs: 'cell',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n FormsModule,\n NgTemplateOutlet,\n NzCheckboxComponent,\n NzRadioComponent,\n NzIconDirective,\n NzTagComponent,\n NzBadgeComponent,\n NzTooltipDirective,\n NzImageModule,\n CellHostDirective\n ]\n})\nexport class CellComponent implements OnDestroy {\n private readonly srv = inject(CellService);\n private readonly router = inject(Router);\n private readonly renderer = inject(Renderer2);\n private readonly imgSrv = inject(NzImageService);\n private readonly win = inject(WINDOW);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n\n private destroy$?: Subscription;\n\n _text = signal<string | SafeValue | string[] | number>('');\n _unit = signal<string | undefined>(undefined);\n _res = signal<CellTextResult | undefined>(undefined);\n showDefault = computed(() => this.value() == (this.safeOpt.default as CellDefaultText)?.condition);\n\n value = model<CellValue>();\n options = input<CellOptions>();\n loading = input(false, { transform: booleanAttribute });\n disabled = input(false, { transform: booleanAttribute });\n\n get safeOpt(): CellOptions {\n return this._res()?.options ?? {};\n }\n\n isText = computed(() => this._res()?.safeHtml === 'text');\n\n constructor() {\n combineLatest([toObservable(this.loading), toObservable(this.disabled)])\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.setClass());\n\n effect(() => {\n const v = this.value();\n const o = this.options();\n this.destroy$?.unsubscribe();\n this.destroy$ = this.srv\n .get(v, o)\n .pipe(take(1))\n .subscribe(res => {\n this._res.set(res);\n this._text.set(res.result?.text ?? '');\n this._unit.set(res.result?.unit ?? this.safeOpt?.unit);\n this.setClass();\n });\n });\n }\n\n private setClass(): void {\n const { el, renderer } = this;\n const { renderType, size, type } = this.safeOpt;\n updateHostClass(el, renderer, {\n [`cell`]: true,\n [`cell__${renderType}`]: renderType != null,\n [`cell__${size}`]: size != null,\n [`cell__has-unit`]: this._unit(),\n [`cell__has-default`]: this.showDefault(),\n [`cell__disabled`]: this.disabled()\n });\n el.setAttribute('data-type', `${type}`);\n }\n\n _link(e: Event): void {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.disabled()) return;\n\n const link = this.safeOpt.link;\n const url = link?.url;\n if (url == null) return;\n\n if (/https?:\\/\\//g.test(url)) {\n this.win.open(url, link?.target);\n } else {\n this.router.navigateByUrl(url);\n }\n }\n\n _showImg(img: string): void {\n const config = this.safeOpt.img;\n if (config == null || config.big == null) return;\n\n let idx = -1;\n const list = (this._text() as string[]).map((p, index) => {\n if (idx === -1 && p === img) idx = index;\n return typeof config.big === 'function' ? config.big(p) : p;\n });\n this.imgSrv\n .preview(\n list.map(p => ({ src: p }) as NzImage),\n config.previewOptions\n )\n .switchTo(idx);\n }\n\n ngOnDestroy(): void {\n this.destroy$?.unsubscribe();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { NzBadgeModule } from 'ng-zorro-antd/badge';\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\nimport { NzImageModule } from 'ng-zorro-antd/experimental/image';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\nimport { NzTagModule } from 'ng-zorro-antd/tag';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { CellHostDirective } from './cell-host.directive';\nimport { CellComponent } from './cell.component';\n\nconst COMPS = [CellComponent];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n NzCheckboxModule,\n NzRadioModule,\n NzBadgeModule,\n NzTagModule,\n NzToolTipModule,\n NzIconModule,\n NzImageModule,\n ...COMPS,\n CellHostDirective\n ],\n exports: COMPS\n})\nexport class CellModule {}\n","import { EnvironmentProviders, inject, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { CellService } from './cell.service';\n\nexport interface CellWidgetProvideConfig {\n KEY: string;\n type: NzSafeAny;\n}\n\n/**\n * Just only using Standalone widgets\n */\nexport function provideCellWidgets(...widgets: CellWidgetProvideConfig[]): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n const srv = inject(CellService);\n widgets.forEach(widget => srv.registerWidget(widget.KEY, widget.type));\n })\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\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A,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAdnB,YAAY;YACZ,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,aAAa;YACb,WAAW;YACX,eAAe;YACf,YAAY;AACZ,YAAAA,eAAa,EACV,KAAK,CAAA,EAAA,CAAA;;2FAKC,UAAU,EAAA,UAAA,EAAA,CAAA;kBAhBtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,gBAAgB;wBAChB,aAAa;wBACb,aAAa;wBACb,WAAW;wBACX,eAAe;wBACf,YAAY;wBACZA,eAAa;AACb,wBAAA,GAAG,KAAK;wBACR;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACrBD;;AAEG;AACa,SAAA,kBAAkB,CAAC,GAAG,OAAkC,EAAA;AACtE,IAAA,OAAO,wBAAwB,CAAC;QAC9B,6BAA6B,CAAC,MAAK;AACjC,YAAA,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC;YAC/B,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,SAAC;AACF,KAAA,CAAC;AACJ;;ACrBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cell.mjs","sources":["../../../../packages/abc/cell/cell.service.ts","../../../../packages/abc/cell/cell-host.directive.ts","../../../../packages/abc/cell/cell.component.ts","../../../../packages/abc/cell/cell.module.ts","../../../../packages/abc/cell/provide.ts","../../../../packages/abc/cell/cell.ts"],"sourcesContent":["import { Injectable, Type, inject } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { map, Observable, of } from 'rxjs';\n\nimport { yn } from '@delon/theme';\nimport { AlainConfigService } from '@delon/util/config';\nimport { formatDate } from '@delon/util/date-time';\nimport { CurrencyService, formatMask } from '@delon/util/format';\nimport { deepMerge } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzI18nService } from 'ng-zorro-antd/i18n';\n\nimport type {\n CellFuValue,\n CellOptions,\n CellTextResult,\n CellTextUnit,\n CellType,\n CellWidget,\n CellWidgetFn\n} from './cell.types';\n\n@Injectable({ providedIn: 'root' })\nexport class CellService {\n private readonly nzI18n = inject(NzI18nService);\n private readonly currency = inject(CurrencyService);\n private readonly dom = inject(DomSanitizer);\n private readonly configSrv = inject(AlainConfigService);\n private globalOptions = this.configSrv.merge('cell', {\n date: { format: 'yyyy-MM-dd HH:mm:ss' },\n img: { size: 32 },\n default: { text: '-' }\n })!;\n private widgets: Record<string, CellWidget> = {\n date: {\n type: 'fn',\n ref: (value, opt) => {\n return {\n text: formatDate(value as string, opt.date!.format!, {\n locale: this.nzI18n.getDateLocale(),\n customFormat: this.configSrv.get('themePipe')?.dateFormatCustom\n })\n };\n }\n },\n mega: {\n type: 'fn',\n ref: (value, opt) => {\n const res = this.currency.mega(value as number, opt.mega);\n return { text: res.value, unit: res.unitI18n };\n }\n },\n currency: {\n type: 'fn',\n ref: (value, opt) => {\n return { text: this.currency.format(value as number, opt.currency) };\n }\n },\n cny: {\n type: 'fn',\n ref: (value, opt) => {\n return { text: this.currency.cny(value as number, opt.cny) };\n }\n },\n boolean: {\n type: 'fn',\n ref: (value, opt) => {\n return { text: this.dom.bypassSecurityTrustHtml(yn(value as boolean, opt.boolean)) };\n }\n },\n img: {\n type: 'fn',\n ref: value => {\n return { text: Array.isArray(value) ? value : [value] };\n }\n }\n };\n\n registerWidget(key: string, widget: Type<unknown>): void {\n this.widgets[key] = { type: 'widget', ref: widget };\n }\n\n getWidget(key: string): CellWidget | undefined {\n return this.widgets[key];\n }\n\n private genType(value: unknown, options: CellOptions): CellType {\n if (options.type != null) return options.type;\n\n const typeOf = typeof value;\n // When is timestamp\n if (typeOf === 'number' && /^[0-9]{13}$/g.test(value as string)) return 'date';\n if (value instanceof Date || options.date != null) return 'date';\n\n // Auto detection\n if (options.widget != null) return 'widget';\n else if (options.mega != null) return 'mega';\n else if (options.currency != null) return 'currency';\n else if (options.cny != null) return 'cny';\n else if (options.img != null) return 'img';\n else if (options.link != null) return 'link';\n else if (options.html != null) return 'html';\n else if (options.badge != null) return 'badge';\n else if (options.tag != null) return 'tag';\n else if (options.checkbox != null) return 'checkbox';\n else if (options.radio != null) return 'radio';\n else if (options.enum != null) return 'enum';\n else if (typeOf === 'number') return 'number';\n else if (typeOf === 'boolean' || options.boolean != null) return 'boolean';\n else return 'string';\n }\n\n fixOptions(options?: CellOptions): CellOptions {\n return deepMerge({}, this.globalOptions, options);\n }\n\n get(value: unknown, options?: CellOptions): Observable<CellTextResult> {\n const type = this.genType(value, { ...options });\n const opt = this.fixOptions(options);\n opt.type = type;\n const isSafeHtml =\n typeof value === 'object' &&\n typeof (value as NzSafeAny)?.getTypeName === 'function' &&\n (value as NzSafeAny)?.getTypeName() != null;\n\n let res: CellTextResult = {\n result:\n typeof value === 'object' && !isSafeHtml\n ? (value as CellTextUnit)\n : { text: value == null ? '' : isSafeHtml ? value : `${value}` },\n options: opt\n };\n\n const widget = this.widgets[type];\n if (widget?.type === 'fn') {\n res.result = (widget.ref as CellWidgetFn)(value, opt);\n }\n\n return (typeof value === 'function' ? (value as CellFuValue)(value, opt) : of(res.result)).pipe(\n map(text => {\n res.result = text;\n let dictData: { tooltip?: string } | undefined;\n switch (type) {\n case 'badge':\n dictData = (opt.badge?.data ?? {})[value as string];\n res.result = { color: 'default', ...dictData };\n break;\n case 'tag':\n dictData = (opt.tag?.data ?? {})[value as string];\n res.result = dictData as CellTextUnit;\n break;\n case 'enum':\n res.result = { text: (opt.enum ?? {})[value as string] };\n break;\n case 'html':\n res.safeHtml = opt.html?.safe;\n break;\n case 'string':\n if (isSafeHtml) res.safeHtml = 'safeHtml';\n break;\n }\n if ((type === 'badge' || type === 'tag') && dictData?.tooltip != null) {\n res.options.tooltip = dictData.tooltip;\n }\n if (opt.mask != null) {\n res.result.text = formatMask(res.result.text as string, opt.mask);\n }\n return res;\n })\n );\n }\n}\n","import { Directive, Type, ViewContainerRef, effect, inject, input } from '@angular/core';\n\nimport { warn } from '@delon/util/other';\n\nimport { CellService } from './cell.service';\nimport { CellTextResult } from './cell.types';\n\n@Directive({\n selector: '[cell-widget-host]'\n})\nexport class CellHostDirective {\n private readonly srv = inject(CellService);\n private readonly vcr = inject(ViewContainerRef);\n\n data = input.required<CellTextResult>();\n\n constructor() {\n effect(() => {\n const data = this.data();\n const widget = data.options.widget!;\n const componentType = this.srv.getWidget(widget.key!)?.ref as Type<unknown>;\n if (componentType == null) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n warn(`cell: No widget for type \"${widget.key}\"`);\n }\n return;\n }\n\n this.vcr.clear();\n const componentRef = this.vcr.createComponent(componentType);\n (componentRef.instance as { data: CellTextResult }).data = data;\n });\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n model,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport type { SafeValue } from '@angular/platform-browser';\nimport { Router } from '@angular/router';\nimport { combineLatest, Subscription, take } from 'rxjs';\n\nimport { updateHostClass } from '@delon/util/browser';\nimport { WINDOW } from '@delon/util/token';\nimport { NzBadgeComponent } from 'ng-zorro-antd/badge';\nimport { NzCheckboxComponent } from 'ng-zorro-antd/checkbox';\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\nimport { NzImage, NzImageModule, NzImageService } from 'ng-zorro-antd/image';\nimport { NzRadioComponent } from 'ng-zorro-antd/radio';\nimport { NzTagComponent } from 'ng-zorro-antd/tag';\nimport { NzTooltipDirective } from 'ng-zorro-antd/tooltip';\n\nimport { CellHostDirective } from './cell-host.directive';\nimport { CellService } from './cell.service';\nimport type { CellDefaultText, CellOptions, CellTextResult, CellValue } from './cell.types';\n\n@Component({\n selector: 'cell, [cell]',\n template: `\n <ng-template #text>\n @let res = _res();\n @let text = _text();\n @switch (safeOpt.type) {\n @case ('checkbox') {\n <label nz-checkbox [nzDisabled]=\"disabled()\" [ngModel]=\"value()\" (ngModelChange)=\"value.set($event)\">\n {{ safeOpt.checkbox?.label }}\n </label>\n }\n @case ('radio') {\n <label nz-radio [nzDisabled]=\"disabled()\" [ngModel]=\"value()\" (ngModelChange)=\"value.set($event)\">\n {{ safeOpt.radio?.label }}\n </label>\n }\n @case ('link') {\n <a (click)=\"_link($event)\" [attr.target]=\"safeOpt.link?.target\" [attr.title]=\"value()\" [innerHTML]=\"text\"></a>\n }\n @case ('tag') {\n <nz-tag [nzColor]=\"res?.result?.color\">\n <span [innerHTML]=\"text\"></span>\n </nz-tag>\n }\n @case ('badge') {\n <nz-badge [nzStatus]=\"res?.result?.color\" nzText=\"{{ text }}\" />\n }\n @case ('widget') {\n @if (res) {\n <ng-template cell-widget-host [data]=\"res\" />\n }\n }\n @case ('img') {\n @for (i of $any(text); track $index) {\n @let img = safeOpt.img;\n <img\n [attr.src]=\"i\"\n [attr.height]=\"img?.size\"\n [attr.width]=\"img?.size\"\n (click)=\"_showImg(i)\"\n class=\"img\"\n [class.point]=\"img?.big\"\n />\n }\n }\n @default {\n @if (isText()) {\n <span [innerText]=\"text\" [attr.title]=\"value()\"></span>\n } @else {\n <span [innerHTML]=\"text\" [attr.title]=\"value()\"></span>\n }\n @if (_unit()) {\n <span class=\"unit\">{{ _unit() }}</span>\n }\n }\n }\n </ng-template>\n <ng-template #textWrap>\n @if (showDefault()) {\n {{ safeOpt.default?.text }}\n } @else {\n @if (safeOpt.tooltip) {\n <span [nz-tooltip]=\"safeOpt.tooltip\">\n <ng-template [ngTemplateOutlet]=\"text\" />\n </span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"text\" />\n }\n }\n </ng-template>\n @if (loading()) {\n <nz-icon nzType=\"loading\" />\n } @else {\n <ng-template [ngTemplateOutlet]=\"textWrap\" />\n }\n `,\n exportAs: 'cell',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n FormsModule,\n NgTemplateOutlet,\n NzCheckboxComponent,\n NzRadioComponent,\n NzIconDirective,\n NzTagComponent,\n NzBadgeComponent,\n NzTooltipDirective,\n NzImageModule,\n CellHostDirective\n ]\n})\nexport class CellComponent implements OnDestroy {\n private readonly srv = inject(CellService);\n private readonly router = inject(Router);\n private readonly renderer = inject(Renderer2);\n private readonly imgSrv = inject(NzImageService);\n private readonly win = inject(WINDOW);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n\n private destroy$?: Subscription;\n\n _text = signal<string | SafeValue | string[] | number>('');\n _unit = signal<string | undefined>(undefined);\n _res = signal<CellTextResult | undefined>(undefined);\n showDefault = computed(() => this.value() == (this.safeOpt.default as CellDefaultText)?.condition);\n\n value = model<CellValue>();\n options = input<CellOptions>();\n loading = input(false, { transform: booleanAttribute });\n disabled = input(false, { transform: booleanAttribute });\n\n get safeOpt(): CellOptions {\n return this._res()?.options ?? {};\n }\n\n isText = computed(() => this._res()?.safeHtml === 'text');\n\n constructor() {\n combineLatest([toObservable(this.loading), toObservable(this.disabled)])\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.setClass());\n\n effect(() => {\n const v = this.value();\n const o = this.options();\n this.destroy$?.unsubscribe();\n this.destroy$ = this.srv\n .get(v, o)\n .pipe(take(1))\n .subscribe(res => {\n this._res.set(res);\n this._text.set(res.result?.text ?? '');\n this._unit.set(res.result?.unit ?? this.safeOpt?.unit);\n this.setClass();\n });\n });\n }\n\n private setClass(): void {\n const { el, renderer } = this;\n const { renderType, size, type } = this.safeOpt;\n updateHostClass(el, renderer, {\n [`cell`]: true,\n [`cell__${renderType}`]: renderType != null,\n [`cell__${size}`]: size != null,\n [`cell__has-unit`]: this._unit(),\n [`cell__has-default`]: this.showDefault(),\n [`cell__disabled`]: this.disabled()\n });\n el.setAttribute('data-type', `${type}`);\n }\n\n _link(e: Event): void {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.disabled()) return;\n\n const link = this.safeOpt.link;\n const url = link?.url;\n if (url == null) return;\n\n if (/https?:\\/\\//g.test(url)) {\n this.win.open(url, link?.target);\n } else {\n this.router.navigateByUrl(url);\n }\n }\n\n _showImg(img: string): void {\n const config = this.safeOpt.img;\n if (config == null || config.big == null) return;\n\n let idx = -1;\n const list = (this._text() as string[]).map((p, index) => {\n if (idx === -1 && p === img) idx = index;\n return typeof config.big === 'function' ? config.big(p) : p;\n });\n this.imgSrv\n .preview(\n list.map(p => ({ src: p }) as NzImage),\n config.previewOptions\n )\n .switchTo(idx);\n }\n\n ngOnDestroy(): void {\n this.destroy$?.unsubscribe();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { NzBadgeModule } from 'ng-zorro-antd/badge';\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\nimport { NzImageModule } from 'ng-zorro-antd/experimental/image';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\nimport { NzTagModule } from 'ng-zorro-antd/tag';\nimport { NzTooltipModule } from 'ng-zorro-antd/tooltip';\n\nimport { CellHostDirective } from './cell-host.directive';\nimport { CellComponent } from './cell.component';\n\nconst COMPS = [CellComponent];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n NzCheckboxModule,\n NzRadioModule,\n NzBadgeModule,\n NzTagModule,\n NzTooltipModule,\n NzIconModule,\n NzImageModule,\n ...COMPS,\n CellHostDirective\n ],\n exports: COMPS\n})\nexport class CellModule {}\n","import { EnvironmentProviders, inject, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { CellService } from './cell.service';\n\nexport interface CellWidgetProvideConfig {\n KEY: string;\n type: NzSafeAny;\n}\n\n/**\n * Just only using Standalone widgets\n */\nexport function provideCellWidgets(...widgets: CellWidgetProvideConfig[]): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n const srv = inject(CellService);\n widgets.forEach(widget => srv.registerWidget(widget.KEY, widget.type));\n })\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NzImageModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAuBa,WAAW,CAAA;AACL,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;AAClC,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAC/C,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE;AACnD,QAAA,IAAI,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE;AACvC,QAAA,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AACjB,QAAA,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG;AACrB,KAAA,CAAE;AACK,IAAA,OAAO,GAA+B;AAC5C,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;gBAClB,OAAO;oBACL,IAAI,EAAE,UAAU,CAAC,KAAe,EAAE,GAAG,CAAC,IAAK,CAAC,MAAO,EAAE;AACnD,wBAAA,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;wBACnC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;qBAChD;iB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AACb,wBAAA,GAAG,KAAK;wBACR;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACrBD;;AAEG;AACG,SAAU,kBAAkB,CAAC,GAAG,OAAkC,EAAA;AACtE,IAAA,OAAO,wBAAwB,CAAC;QAC9B,6BAA6B,CAAC,MAAK;AACjC,YAAA,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC;YAC/B,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,QAAA,CAAC;AACF,KAAA,CAAC;AACJ;;ACrBA;;AAEG;;;;"}
|
|
@@ -54,10 +54,10 @@ class SizeObserver {
|
|
|
54
54
|
this._observedElements.delete(element);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
58
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: SizeObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
58
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: SizeObserver, providedIn: 'root' });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: SizeObserver, decorators: [{
|
|
61
61
|
type: Injectable,
|
|
62
62
|
args: [{ providedIn: 'root' }]
|
|
63
63
|
}] });
|
|
@@ -85,10 +85,10 @@ class ObserverSize {
|
|
|
85
85
|
ngOnDestroy() {
|
|
86
86
|
this._unsub();
|
|
87
87
|
}
|
|
88
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
89
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0
|
|
88
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ObserverSize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
89
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ObserverSize, isStandalone: true, selector: "[observeSize]", outputs: { event: "observeSize" }, exportAs: ["observeSize"], ngImport: i0 });
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ObserverSize, decorators: [{
|
|
92
92
|
type: Directive,
|
|
93
93
|
args: [{
|
|
94
94
|
selector: '[observeSize]',
|
|
@@ -99,11 +99,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
99
99
|
args: ['observeSize']
|
|
100
100
|
}] } });
|
|
101
101
|
class ObserversModule {
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
103
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0
|
|
104
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ObserversModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
103
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: ObserversModule, imports: [ObserverSize], exports: [ObserverSize] });
|
|
104
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ObserversModule });
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ObserversModule, decorators: [{
|
|
107
107
|
type: NgModule,
|
|
108
108
|
args: [{
|
|
109
109
|
exports: [ObserverSize],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-observer-size.mjs","sources":["../../../../packages/abc/observers/observer-size.ts","../../../../packages/abc/observers/chart-observer-size.ts"],"sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgModule,\n NgZone,\n OnDestroy,\n Output,\n inject\n} from '@angular/core';\nimport { Observable, Observer, Subject, Subscription } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class SizeObserver implements OnDestroy {\n private _observedElements = new Map<\n Element,\n {\n observer: MutationObserver | null;\n readonly stream: Subject<MutationRecord[]>;\n count: number;\n }\n >();\n\n ngOnDestroy(): void {\n this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n }\n\n observe(element: Element): Observable<MutationRecord[]> {\n return new Observable((observer: Observer<MutationRecord[]>) => {\n const stream = this._observeElement(element);\n const subscription = stream.subscribe(observer);\n\n return () => {\n subscription.unsubscribe();\n this._unobserveElement(element);\n };\n });\n }\n\n private _observeElement(element: Element): Subject<MutationRecord[]> {\n if (!this._observedElements.has(element)) {\n const stream = new Subject<MutationRecord[]>();\n let observer: MutationObserver | null = null;\n if (typeof MutationObserver !== 'undefined') {\n observer = new MutationObserver(mutations => stream.next(mutations));\n observer.observe(element, {\n attributes: true,\n attributeOldValue: true,\n attributeFilter: ['width', 'height', 'style']\n });\n }\n this._observedElements.set(element, { observer, stream, count: 1 });\n } else {\n this._observedElements.get(element)!.count++;\n }\n return this._observedElements.get(element)!.stream;\n }\n\n private _unobserveElement(element: Element): void {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element)!.count--;\n if (!this._observedElements.get(element)!.count) {\n this._cleanupObserver(element);\n }\n }\n }\n\n private _cleanupObserver(element: Element): void {\n if (this._observedElements.has(element)) {\n const { observer, stream } = this._observedElements.get(element)!;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n }\n}\n\n@Directive({\n selector: '[observeSize]',\n exportAs: 'observeSize'\n})\nexport class ObserverSize implements AfterViewInit, OnDestroy {\n private readonly _obs = inject(SizeObserver);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly ngZone = inject(NgZone);\n\n private _sub$: Subscription | null = null;\n @Output('observeSize') readonly event = new EventEmitter<MutationRecord[]>();\n\n ngAfterViewInit(): void {\n if (!this._sub$) {\n this._sub();\n }\n }\n\n private _sub(): void {\n this._unsub();\n const stream = this._obs.observe(this.el);\n this.ngZone.runOutsideAngular(() => {\n this._sub$ = stream.subscribe(this.event);\n });\n }\n\n private _unsub(): void {\n this._sub$?.unsubscribe();\n }\n\n ngOnDestroy(): void {\n this._unsub();\n }\n}\n\n@NgModule({\n exports: [ObserverSize],\n imports: [ObserverSize]\n})\nexport class ObserversModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAea,YAAY,CAAA;AACf,IAAA,iBAAiB,GAAG,IAAI,GAAG,EAOhC;IAEH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"chart-observer-size.mjs","sources":["../../../../packages/abc/observers/observer-size.ts","../../../../packages/abc/observers/chart-observer-size.ts"],"sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgModule,\n NgZone,\n OnDestroy,\n Output,\n inject\n} from '@angular/core';\nimport { Observable, Observer, Subject, Subscription } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class SizeObserver implements OnDestroy {\n private _observedElements = new Map<\n Element,\n {\n observer: MutationObserver | null;\n readonly stream: Subject<MutationRecord[]>;\n count: number;\n }\n >();\n\n ngOnDestroy(): void {\n this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n }\n\n observe(element: Element): Observable<MutationRecord[]> {\n return new Observable((observer: Observer<MutationRecord[]>) => {\n const stream = this._observeElement(element);\n const subscription = stream.subscribe(observer);\n\n return () => {\n subscription.unsubscribe();\n this._unobserveElement(element);\n };\n });\n }\n\n private _observeElement(element: Element): Subject<MutationRecord[]> {\n if (!this._observedElements.has(element)) {\n const stream = new Subject<MutationRecord[]>();\n let observer: MutationObserver | null = null;\n if (typeof MutationObserver !== 'undefined') {\n observer = new MutationObserver(mutations => stream.next(mutations));\n observer.observe(element, {\n attributes: true,\n attributeOldValue: true,\n attributeFilter: ['width', 'height', 'style']\n });\n }\n this._observedElements.set(element, { observer, stream, count: 1 });\n } else {\n this._observedElements.get(element)!.count++;\n }\n return this._observedElements.get(element)!.stream;\n }\n\n private _unobserveElement(element: Element): void {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element)!.count--;\n if (!this._observedElements.get(element)!.count) {\n this._cleanupObserver(element);\n }\n }\n }\n\n private _cleanupObserver(element: Element): void {\n if (this._observedElements.has(element)) {\n const { observer, stream } = this._observedElements.get(element)!;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n }\n}\n\n@Directive({\n selector: '[observeSize]',\n exportAs: 'observeSize'\n})\nexport class ObserverSize implements AfterViewInit, OnDestroy {\n private readonly _obs = inject(SizeObserver);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly ngZone = inject(NgZone);\n\n private _sub$: Subscription | null = null;\n @Output('observeSize') readonly event = new EventEmitter<MutationRecord[]>();\n\n ngAfterViewInit(): void {\n if (!this._sub$) {\n this._sub();\n }\n }\n\n private _sub(): void {\n this._unsub();\n const stream = this._obs.observe(this.el);\n this.ngZone.runOutsideAngular(() => {\n this._sub$ = stream.subscribe(this.event);\n });\n }\n\n private _unsub(): void {\n this._sub$?.unsubscribe();\n }\n\n ngOnDestroy(): void {\n this._unsub();\n }\n}\n\n@NgModule({\n exports: [ObserverSize],\n imports: [ObserverSize]\n})\nexport class ObserversModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAea,YAAY,CAAA;AACf,IAAA,iBAAiB,GAAG,IAAI,GAAG,EAOhC;IAEH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChF;AAEA,IAAA,OAAO,CAAC,OAAgB,EAAA;AACtB,QAAA,OAAO,IAAI,UAAU,CAAC,CAAC,QAAoC,KAAI;YAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;YAC5C,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE/C,YAAA,OAAO,MAAK;gBACV,YAAY,CAAC,WAAW,EAAE;AAC1B,gBAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;AACjC,YAAA,CAAC;AACH,QAAA,CAAC,CAAC;IACJ;AAEQ,IAAA,eAAe,CAAC,OAAgB,EAAA;QACtC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;AACxC,YAAA,MAAM,MAAM,GAAG,IAAI,OAAO,EAAoB;YAC9C,IAAI,QAAQ,GAA4B,IAAI;AAC5C,YAAA,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;AAC3C,gBAAA,QAAQ,GAAG,IAAI,gBAAgB,CAAC,SAAS,IAAI,MA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AAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE;AACX,iBAAA;8BAOiC,KAAK,EAAA,CAAA;sBAApC,MAAM;uBAAC,aAAa;;MA6BV,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,OAAA,EAAA,CAnCf,YAAY,CAAA,EAAA,OAAA,EAAA,CAAZ,YAAY,CAAA,EAAA,CAAA;wGAmCZ,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY;AACvB,iBAAA;;;ACvHD;;AAEG;;;;"}
|
package/fesm2022/count-down.mjs
CHANGED
|
@@ -20,12 +20,12 @@ class CountDownComponent {
|
|
|
20
20
|
handleEvent(e) {
|
|
21
21
|
this.event.emit(e);
|
|
22
22
|
}
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
24
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CountDownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: CountDownComponent, isStandalone: true, selector: "count-down", inputs: { config: "config", target: "target" }, outputs: { event: "event" }, viewQueries: [{ propertyName: "instance", first: true, predicate: ["cd"], descendants: true }], exportAs: ["countDown"], ngImport: i0, template: `@if (config) {
|
|
25
25
|
<countdown #cd [config]="config" (event)="handleEvent($event)" />
|
|
26
26
|
}`, isInline: true, dependencies: [{ kind: "component", type: CountdownComponent, selector: "countdown", inputs: ["config", "render"], outputs: ["event"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CountDownComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{
|
|
31
31
|
selector: 'count-down',
|
|
@@ -50,11 +50,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
50
50
|
|
|
51
51
|
const COMPONENTS = [CountDownComponent];
|
|
52
52
|
class CountDownModule {
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
54
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0
|
|
55
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CountDownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
54
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: CountDownModule, imports: [CommonModule, CountdownModule, CountDownComponent], exports: [CountDownComponent] });
|
|
55
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CountDownModule, imports: [CommonModule, CountdownModule, COMPONENTS] });
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: CountDownModule, decorators: [{
|
|
58
58
|
type: NgModule,
|
|
59
59
|
args: [{
|
|
60
60
|
imports: [CommonModule, CountdownModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count-down.mjs","sources":["../../../../packages/abc/count-down/count-down.component.ts","../../../../packages/abc/count-down/count-down.module.ts","../../../../packages/abc/count-down/count-down.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { addSeconds, format } from 'date-fns';\nimport { CountdownComponent, CountdownConfig, CountdownEvent } from 'ngx-countdown';\n\n@Component({\n selector: 'count-down',\n exportAs: 'countDown',\n template: `@if (config) {\n <countdown #cd [config]=\"config\" (event)=\"handleEvent($event)\" />\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CountdownComponent]\n})\nexport class CountDownComponent {\n @ViewChild('cd', { static: false }) readonly instance!: CountdownComponent;\n\n @Input() config?: CountdownConfig;\n\n /**\n * 目标时间\n */\n @Input()\n set target(value: number | Date) {\n this.config = {\n format: `HH:mm:ss`,\n stopTime: typeof value === 'number' ? addSeconds(new Date(), value).valueOf() : +format(value, 't')\n };\n }\n\n @Output() readonly event = new EventEmitter<CountdownEvent>();\n\n handleEvent(e: CountdownEvent): void {\n this.event.emit(e);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CountdownModule } from 'ngx-countdown';\n\nimport { CountDownComponent } from './count-down.component';\n\nconst COMPONENTS = [CountDownComponent];\n\n@NgModule({\n imports: [CommonModule, CountdownModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class CountDownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAuBa,kBAAkB,CAAA;AACgB,IAAA,QAAQ;AAE5C,IAAA,MAAM;AAEf;;AAEG;IACH,IACI,MAAM,CAAC,KAAoB,EAAA;QAC7B,IAAI,CAAC,MAAM,GAAG;AACZ,YAAA,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"count-down.mjs","sources":["../../../../packages/abc/count-down/count-down.component.ts","../../../../packages/abc/count-down/count-down.module.ts","../../../../packages/abc/count-down/count-down.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { addSeconds, format } from 'date-fns';\nimport { CountdownComponent, CountdownConfig, CountdownEvent } from 'ngx-countdown';\n\n@Component({\n selector: 'count-down',\n exportAs: 'countDown',\n template: `@if (config) {\n <countdown #cd [config]=\"config\" (event)=\"handleEvent($event)\" />\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CountdownComponent]\n})\nexport class CountDownComponent {\n @ViewChild('cd', { static: false }) readonly instance!: CountdownComponent;\n\n @Input() config?: CountdownConfig;\n\n /**\n * 目标时间\n */\n @Input()\n set target(value: number | Date) {\n this.config = {\n format: `HH:mm:ss`,\n stopTime: typeof value === 'number' ? addSeconds(new Date(), value).valueOf() : +format(value, 't')\n };\n }\n\n @Output() readonly event = new EventEmitter<CountdownEvent>();\n\n handleEvent(e: CountdownEvent): void {\n this.event.emit(e);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CountdownModule } from 'ngx-countdown';\n\nimport { CountDownComponent } from './count-down.component';\n\nconst COMPONENTS = [CountDownComponent];\n\n@NgModule({\n imports: [CommonModule, CountdownModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class CountDownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAuBa,kBAAkB,CAAA;AACgB,IAAA,QAAQ;AAE5C,IAAA,MAAM;AAEf;;AAEG;IACH,IACI,MAAM,CAAC,KAAoB,EAAA;QAC7B,IAAI,CAAC,MAAM,GAAG;AACZ,YAAA,MAAM,EAAE,CAAA,QAAA,CAAU;AAClB,YAAA,QAAQ,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG;SACnG;IACH;AAEmB,IAAA,KAAK,GAAG,IAAI,YAAY,EAAkB;AAE7D,IAAA,WAAW,CAAC,CAAiB,EAAA;AAC3B,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACpB;uGApBW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,IAAA,CAAA,EAA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