Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clean standalone: true #1857

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion packages/abc/auto-focus/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { NzInputModule } from 'ng-zorro-antd/input';
</div>
}
`,
standalone: true,
imports: [NzButtonModule, NzInputModule, AutoFocusDirective]
})
export class DemoComponent {
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
1 change: 0 additions & 1 deletion packages/abc/avatar-list/demo/maxLength.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { AvatarListModule } from '@delon/abc/avatar-list';
<avatar-list-item tips="Cipchk" text="Cipchk" />
<avatar-list-item tips="heart-o" icon="heart-o" />
</avatar-list>`,
standalone: true,
imports: [AvatarListModule]
})
export class DemoComponent {}
Expand Down
1 change: 0 additions & 1 deletion packages/abc/avatar-list/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { AvatarListModule } from '@delon/abc/avatar-list';
<avatar-list-item tips="Cipchk" text="Cipchk" />
<avatar-list-item tips="heart-o" icon="heart-o" />
</avatar-list>`,
standalone: true,
imports: [AvatarListModule]
})
export class DemoComponent {}
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
1 change: 0 additions & 1 deletion packages/abc/cell/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ import { NzGridModule } from 'ng-zorro-antd/grid';
`
],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CellModule, FormsModule, JsonPipe, NzGridModule]
})
export class DemoComponent implements OnInit {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/cell/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
'(click)': 'show()'
},
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [ NzToolTipModule ]
})
export class CellTestWidget implements CellWidgetInstance {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/cell/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
'(click)': 'show()'
},
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [ NzToolTipModule ]
})
export class CellTestWidget implements CellWidgetInstance {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/count-down/demo/accuracy.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { CountDownComponent } from '@delon/abc/count-down';
@Component({
selector: 'app-demo',
template: ` <count-down [config]="config" /> `,
standalone: true,
imports: [CountDownComponent]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/count-down/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { NzMessageService } from 'ng-zorro-antd/message';
<button nz-button (click)="cd.instance.pause()">Pause</button>
<button nz-button (click)="cd.instance.resume()">Resume</button>
`,
standalone: true,
imports: [CountDownComponent, NzButtonModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/date-picker/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
result: {{ i | json }}<br />
<nz-range-picker [(ngModel)]="i.start" extend [(ngModelEnd)]="i.end" />
`,
standalone: true,
imports: [JsonPipe, FormsModule, NzDatePickerModule, RangePickerDirective]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/date-picker/demo/shortcut.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
result: {{ i | json }}<br />
<nz-range-picker [(ngModel)]="i.start" extend [(ngModelEnd)]="i.end" shortcut />
`,
standalone: true,
imports: [JsonPipe, FormsModule, NzDatePickerModule, RangePickerDirective]
})
export class DemoComponent {
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
1 change: 0 additions & 1 deletion packages/abc/down-file/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
</button>
}
`,
standalone: true,
imports: [DownFileDirective, NzButtonModule]
})
export class DemoComponent {
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
1 change: 0 additions & 1 deletion packages/abc/ellipsis/demo/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { EllipsisComponent } from '@delon/abc/ellipsis';
</p>
</ellipsis>
`,
standalone: true,
imports: [EllipsisComponent]
})
export class DemoComponent {}
Expand Down
1 change: 0 additions & 1 deletion packages/abc/ellipsis/demo/number.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { EllipsisComponent } from '@delon/abc/ellipsis';
<h4 class="mt-lg">Show Tooltip</h4>
<ellipsis length="100" tooltip>{{ article }}</ellipsis>
`,
standalone: true,
imports: [EllipsisComponent]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/error-collect/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { NzInputModule } from 'ng-zorro-antd/input';
<error-collect />
</form>
`,
standalone: true,
imports: [NzFormModule, ReactiveFormsModule, NzInputModule, ErrorCollectComponent]
})
export class DemoComponent implements OnInit {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/exception/demo/403.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ExceptionComponent } from '@delon/abc/exception';
@Component({
selector: 'app-demo',
template: ` <exception [type]="403" />`,
standalone: true,
imports: [ExceptionComponent]
})
export class DemoComponent {}
Expand Down
1 change: 0 additions & 1 deletion packages/abc/exception/demo/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ExceptionComponent } from '@delon/abc/exception';
@Component({
selector: 'app-demo',
template: ` <exception [type]="404" />`,
standalone: true,
imports: [ExceptionComponent]
})
export class DemoComponent {}
Expand Down
1 change: 0 additions & 1 deletion packages/abc/exception/demo/500.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ExceptionComponent } from '@delon/abc/exception';
@Component({
selector: 'app-demo',
template: ` <exception [type]="500" />`,
standalone: true,
imports: [ExceptionComponent]
})
export class DemoComponent {}
Expand Down
1 change: 0 additions & 1 deletion packages/abc/footer-toolbar/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { NzInputModule } from 'ng-zorro-antd/input';
</footer-toolbar>
</form>
`,
standalone: true,
imports: [NzFormModule, ReactiveFormsModule, NzInputModule, FooterToolbarComponent, NzButtonModule]
})
export class DemoComponent implements OnInit {
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
1 change: 0 additions & 1 deletion packages/abc/global-footer/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
}
`
],
standalone: true,
imports: [GlobalFooterComponent, NzIconModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/global-footer/demo/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
}
`
],
standalone: true,
imports: [GlobalFooterModule, NzIconModule]
})
export class DemoComponent {}
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
1 change: 0 additions & 1 deletion packages/abc/highlight/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { NzInputModule } from 'ng-zorro-antd/input';
}
`
],
standalone: true,
imports: [NzHighlightModule, NzInputModule, FormsModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/hotkey/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ text area 1, press q to focus this textarea and select all text</textarea
}
`
],
standalone: true,
imports: [NzButtonModule, HotkeyDirective, NzInputModule, NzSwitchModule]
})
export class DemoComponent {
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
1 change: 0 additions & 1 deletion packages/abc/loading/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
<button nz-button (click)="show('spin')">Spin</button>
<button nz-button (click)="show('text')">Only Text</button>
`,
standalone: true,
imports: [NzButtonModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/loading/demo/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
template: ` @for (i of customs; track $index) {
<button nz-button (click)="show(i)">{{ i.name }}</button>
}`,
standalone: true,
imports: [NzButtonModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/loading/demo/delay.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
<button nz-button (click)="show()">Display after 1 seconds</button>
<button nz-button (click)="close()">Close</button>
`,
standalone: true,
imports: [NzButtonModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/lodop/demo/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ import { NzMessageService } from 'ng-zorro-antd/message';
</form>
}
`,
standalone: true,
imports: [NzFormModule, NzAlertModule, NzGridModule, FormsModule, NzInputModule, NzButtonModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/lodop/demo/print.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ import { NzSelectModule } from 'ng-zorro-antd/select';
</form>
}
`,
standalone: true,
imports: [NzFormModule, NzAlertModule, NzGridModule, FormsModule, NzInputModule, NzButtonModule, NzSelectModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/media/demo/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
</div>
<div media #media [source]="source" [options]="options"></div>
`,
standalone: true,
imports: [NzButtonModule, MediaComponent]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/media/demo/mp3.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
</div>
<div media #media type="audio" [source]="mp3"></div>
`,
standalone: true,
imports: [NzButtonModule, MediaComponent]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/media/demo/mp4.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
</div>
<div media #media [source]="mp4"></div>
`,
standalone: true,
imports: [NzButtonModule, MediaComponent]
})
export class DemoComponent {
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
1 change: 0 additions & 1 deletion packages/abc/notice-icon/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { NoticeIconComponent } from '@delon/abc/notice-icon';
@Component({
selector: 'app-demo',
template: ` <notice-icon count="5" /> `,
standalone: true,
imports: [NoticeIconComponent]
})
export class DemoComponent {}
Expand Down
1 change: 0 additions & 1 deletion packages/abc/notice-icon/demo/popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { NzMessageService } from 'ng-zorro-antd/message';
</ng-template>
</div>
`,
standalone: true,
imports: [NoticeIconComponent]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/observers/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
<chart-echarts #echart [option]="option" (events)="handleEvents($event)" />
</div>
`,
standalone: true,
imports: [NzButtonModule, ChartEChartsModule, ObserverSize]
})
export class DemoComponent {
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/onboarding/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { NzMessageService } from 'ng-zorro-antd/message';
onboarding.json
</a>
`,
standalone: true,
imports: [NzButtonModule]
})
export class DemoComponent {
Expand Down
1 change: 0 additions & 1 deletion packages/abc/onboarding/demo/multiple-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
</div>
<button nz-button (click)="start()">Start</button>
`,
standalone: true,
imports: [NzButtonModule]
})
export class DemoComponent {
Expand Down
Loading
Loading