Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Jan 3, 2025
1 parent 17bdfe7 commit 98821d5
Show file tree
Hide file tree
Showing 48 changed files with 48 additions and 95 deletions.
3 changes: 1 addition & 2 deletions packages/abc/auto-focus/auto-focus.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import { timer } from 'rxjs';

@Directive({
selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
exportAs: 'autoFocus',
standalone: true
exportAs: 'autoFocus'
})
export class AutoFocusDirective implements AfterViewInit {
private readonly el: HTMLElement = inject(ElementRef).nativeElement;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/avatar-list/avatar-list-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@a
template: `<ng-content />`,
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class AvatarListItemComponent {
@Input() src?: string;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/cell/cell-host.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { CellService } from './cell.service';
import { CellTextResult } from './cell.types';

@Directive({
selector: '[cell-widget-host]',
standalone: true
selector: '[cell-widget-host]'
})
export class CellHostDirective implements OnChanges {
private readonly srv = inject(CellService);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/date-picker/range-shortcut.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { AlainDateRangePickerShortcutItem } from '@delon/util/config';
<a (click)="click(i)" [innerHTML]="i._text" [class.ml-sm]="!$first"></a>
}
</ng-template>
`,
standalone: true
`
})
export class RangePickerShortcutTplComponent {
@ViewChild('tpl', { static: true })
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/date-picker/range.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import { RangePickerShortcutTplComponent } from './range-shortcut.component';

@Directive({
selector: 'nz-range-picker[extend]',
exportAs: 'extendRangePicker',
standalone: true
exportAs: 'extendRangePicker'
})
export class RangePickerDirective implements OnDestroy, AfterViewInit {
static ngAcceptInputType_shortcut: AlainDateRangePickerShortcut | string | null;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/down-file/down-file.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import type { NzSafeAny } from 'ng-zorro-antd/core/types';
exportAs: 'downFile',
host: {
'(click)': '_click($event)'
},
standalone: true
}
})
export class DownFileDirective {
private readonly el: HTMLButtonElement = inject(ElementRef).nativeElement;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/full-content/full-content-toggle.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { FullContentComponent } from './full-content.component';
exportAs: 'fullToggle',
host: {
'(click)': '_click()'
},
standalone: true
}
})
export class FullContentToggleDirective {
private readonly parent = inject(FullContentComponent);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/full-content/full-content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ const hideTitleCls = `full-content__hidden-title`;
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class FullContentComponent implements AfterViewInit, OnInit, OnChanges, OnDestroy {
private readonly destroy$ = inject(DestroyRef);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/global-footer/global-footer-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
template: ` <ng-template #host><ng-content /></ng-template> `,
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class GlobalFooterItemComponent {
@ViewChild('host', { static: true }) host!: TemplateRef<void>;
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/hotkey/hotkey.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Directive, ElementRef, Input, NgZone, OnDestroy, inject } from '@angula

import { install, uninstall } from '@github/hotkey';

@Directive({ selector: '[hotkey]', standalone: true })
@Directive({ selector: '[hotkey]' })
export class HotkeyDirective implements OnDestroy {
private readonly el: HTMLElement = inject(ElementRef).nativeElement;
private readonly ngZone = inject(NgZone);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/media/media.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export type MediaType = 'html5' | 'youtube' | 'video' | 'audio';
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class MediaComponent implements OnChanges, AfterViewInit, OnDestroy {
private readonly destroy$ = inject(DestroyRef);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/observers/observer-size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ export class SizeObserver implements OnDestroy {

@Directive({
selector: '[observeSize]',
exportAs: 'observeSize',
standalone: true
exportAs: 'observeSize'
})
export class ObserverSize implements AfterViewInit, OnDestroy {
private readonly _obs = inject(SizeObserver);
Expand Down
1 change: 0 additions & 1 deletion packages/abc/reuse-tab/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: reuse-tab
subtitle: Reuse Route Tab
cols: 1
module: import { ReuseTabModule } from '@delon/abc/reuse-tab';
standalone: true
---

Reuse route tab are extremely common for admin interfaces, and the problem of component data is not lost when switching routes.
Expand Down
1 change: 0 additions & 1 deletion packages/abc/reuse-tab/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: reuse-tab
subtitle: 路由复用标签
cols: 1
module: import { ReuseTabModule } from '@delon/abc/reuse-tab';
standalone: true
---

复用标签在中台系统非常常见,本质是解决不同路由页切换时组件数据不丢失问题。
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/reuse-tab/reuse-tab-context.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { ReuseContextCloseEvent, ReuseContextI18n } from './reuse-tab.interfaces

@Component({
selector: 'reuse-tab-context',
template: ``,
standalone: true
template: ``
})
export class ReuseTabContextComponent {
private readonly srv = inject(ReuseTabContextService);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/reuse-tab/reuse-tab-context.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { ReuseCustomContextMenu, ReuseItem } from './reuse-tab.interfaces';
exportAs: 'reuseTabContextMenu',
host: {
'(contextmenu)': '_onContextMenu($event)'
},
standalone: true
}
})
export class ReuseTabContextDirective {
private readonly srv = inject(ReuseTabContextService);
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/se/se-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import { SEErrorRefresh, SELayout } from './se.types';
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class SETitleComponent implements OnInit {
private readonly parentComp = inject(SEContainerComponent, { host: true, optional: true });
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/sg/sg-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { AlainConfigService } from '@delon/util/config';
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class SGContainerComponent {
@Input({ transform: numberAttribute }) gutter!: number;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/sg/sg.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ const prefixCls = `sg`;
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class SGComponent implements OnChanges, AfterViewInit {
private readonly el: HTMLElement = inject(ElementRef).nativeElement;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/sv/sv-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ import { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class SVTitleComponent implements OnInit {
private readonly el: HTMLElement = inject(ElementRef).nativeElement;
Expand Down
3 changes: 1 addition & 2 deletions packages/abc/xlsx/xlsx.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { XlsxExportOptions } from './xlsx.types';
exportAs: 'xlsx',
host: {
'(click)': '_click()'
},
standalone: true
}
})
export class XlsxDirective {
private readonly srv = inject(XlsxService);
Expand Down
3 changes: 1 addition & 2 deletions packages/acl/src/acl-if.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { ACLCanType } from './acl.type';

@Directive({
selector: '[aclIf]',
exportAs: 'aclIf',
standalone: true
exportAs: 'aclIf'
})
export class ACLIfDirective implements OnDestroy {
private readonly srv = inject(ACLService);
Expand Down
3 changes: 1 addition & 2 deletions packages/acl/src/acl.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { ACLCanType } from './acl.type';

@Directive({
selector: '[acl]',
exportAs: 'acl',
standalone: true
exportAs: 'acl'
})
export class ACLDirective implements OnDestroy {
private readonly el: HTMLElement = inject(ElementRef).nativeElement;
Expand Down
3 changes: 1 addition & 2 deletions packages/chart/mini-area/mini-area.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export interface G2MiniAreaClickItem {
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class G2MiniAreaComponent extends G2BaseComponent {
// #region fields
Expand Down
3 changes: 1 addition & 2 deletions packages/chart/mini-bar/mini-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export interface G2MiniBarClickItem {
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class G2MiniBarComponent extends G2BaseComponent {
// #region fields
Expand Down
3 changes: 1 addition & 2 deletions packages/chart/single-bar/single-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import type { NzSafeAny } from 'ng-zorro-antd/core/types';
},
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class G2SingleBarComponent extends G2BaseComponent {
// #region fields
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/pipes/date/date.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AlainConfigService } from '@delon/util/config';
import { formatDate } from '@delon/util/date-time';
import { NzI18nService } from 'ng-zorro-antd/i18n';

@Pipe({ name: '_date', standalone: true })
@Pipe({ name: '_date' })
export class DatePipe implements PipeTransform {
private nzI18n = inject(NzI18nService);
private cog = inject(AlainConfigService).get('themePipe');
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/pipes/keys/keys.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { NzSafeAny } from 'ng-zorro-antd/core/types';
/**
* [Document](https://ng-alain.com/theme/keys)
*/
@Pipe({ name: 'keys', standalone: true })
@Pipe({ name: 'keys' })
export class KeysPipe implements PipeTransform {
transform(value: NzSafeAny, keyIsNumber: boolean = false): NzSafeAny[] {
const ret: NzSafeAny[] = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/pipes/safe/html.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Pipe, PipeTransform, inject } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';

@Pipe({ name: 'html', standalone: true })
@Pipe({ name: 'html' })
export class HTMLPipe implements PipeTransform {
private readonly dom = inject(DomSanitizer);

Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/pipes/safe/url.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Pipe, PipeTransform, inject } from '@angular/core';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';

@Pipe({ name: 'url', standalone: true })
@Pipe({ name: 'url' })
export class URLPipe implements PipeTransform {
private readonly dom = inject(DomSanitizer);

Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/pipes/yn/yn.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function yn(value: boolean, opt?: YNOptions): string {
return html;
}

@Pipe({ name: 'yn', standalone: true })
@Pipe({ name: 'yn' })
export class YNPipe implements PipeTransform {
private readonly dom = inject(DomSanitizer);

Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/services/i18n/i18n.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Pipe, PipeTransform, inject } from '@angular/core';

import { ALAIN_I18N_TOKEN } from './i18n';

@Pipe({ name: 'i18n', standalone: true })
@Pipe({ name: 'i18n' })
export class I18nPipe implements PipeTransform {
private readonly i18n = inject(ALAIN_I18N_TOKEN);

Expand Down
2 changes: 1 addition & 1 deletion packages/util/pipes/currency/cny.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CurrencyCNYOptions, CurrencyService } from '@delon/util/format';
*
* 转化成人民币表示法
*/
@Pipe({ name: 'cny', standalone: true })
@Pipe({ name: 'cny' })
export class CurrencyCNYPipe implements PipeTransform {
private readonly srv = inject(CurrencyService);

Expand Down
1 change: 0 additions & 1 deletion packages/util/pipes/currency/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: currency
subtitle: Currency Pipes
type: Pipes
module: import { CurrencyPipeModule } from '@delon/util/pipes/currency';
standalone: true
---

> You can override to set the `startingUnit`, `megaUnit`, `precision`, `ingoreZeroPrecision` through [Global Configuration](/docs/global-config).
Expand Down
1 change: 0 additions & 1 deletion packages/util/pipes/currency/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: currency
subtitle: 货币管道
type: Pipes
module: import { CurrencyPipeModule } from '@delon/util/pipes/currency';
standalone: true
---

> 可以通过[全局配置](/docs/global-config)覆盖 `startingUnit``megaUnit``precision``ingoreZeroPrecision` 等参数。
Expand Down
2 changes: 1 addition & 1 deletion packages/util/pipes/currency/mega.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CurrencyMegaOptions, CurrencyService } from '@delon/util/format';
*
* 大数据格式化
*/
@Pipe({ name: 'mega', standalone: true })
@Pipe({ name: 'mega' })
export class CurrencyMegaPipe implements PipeTransform {
private readonly srv = inject(CurrencyService);
private isCN = inject(LOCALE_ID).startsWith('zh');
Expand Down
2 changes: 1 addition & 1 deletion packages/util/pipes/currency/price.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CurrencyFormatOptions, CurrencyService } from '@delon/util/format';
* 10000.567 => `10,000.57`
* ```
*/
@Pipe({ name: 'price', standalone: true })
@Pipe({ name: 'price' })
export class CurrencyPricePipe implements PipeTransform {
private readonly srv = inject(CurrencyService);

Expand Down
1 change: 0 additions & 1 deletion packages/util/pipes/filter/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: filter
subtitle: Filter
type: Pipes
module: import { FilterPipeModule } from '@delon/util/pipes/filter';
standalone: true
---

## filter
Expand Down
1 change: 0 additions & 1 deletion packages/util/pipes/filter/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: filter
subtitle: 过滤数组
type: Pipes
module: import { FilterPipeModule } from '@delon/util/pipes/filter';
standalone: true
---

## filter
Expand Down
1 change: 0 additions & 1 deletion packages/util/pipes/format/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: format
subtitle: Mask
type: Pipes
module: import { FormatPipeModule } from '@delon/util/pipes/format';
standalone: true
---

## mask
Expand Down
1 change: 0 additions & 1 deletion packages/util/pipes/format/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: format
subtitle: 掩码
type: Pipes
module: import { FormatPipeModule } from '@delon/util/pipes/format';
standalone: true
---

## mask
Expand Down
2 changes: 1 addition & 1 deletion packages/util/pipes/format/mask.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { formatMask, FormatMaskOption } from '@delon/util/format';
* formatMask('15900000000', '999****9999') => 159****0000
* ```
*/
@Pipe({ name: 'mask', standalone: true })
@Pipe({ name: 'mask' })
export class FormatMaskPipe implements PipeTransform {
transform(value: string, mask: string | FormatMaskOption): string {
return formatMask(value, mask);
Expand Down
Loading

0 comments on commit 98821d5

Please sign in to comment.