Skip to content

Commit

Permalink
chore: merge branch 'master' into issues-2333
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Dec 8, 2023
2 parents a2a6f0a + 3fc0180 commit 898c4c7
Show file tree
Hide file tree
Showing 209 changed files with 29,108 additions and 1,868 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ scripts/build/var.less
/schematics/plugin/files/rtl

# Yarn
yarn.lock
# yarn.lock
yarn-error.log
.yarn/*
!.yarn/patches
Expand Down
15 changes: 11 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
"**/coverage/*/**": true,
"**/.yarn/**": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"**/dist/*/**": true,
"**/ng-alain": true,
"**/.yarn": true,
"**/src/app/routes/gen/": true
},
"editor.codeActionsOnSave": {
// For ESLint
"source.fixAll.eslint": true,
// For Stylelint
"source.fixAll.stylelint": true
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"[html]": {
"editor.formatOnSave": true
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## <small>17.0.3 (2023-12-08)</small>

* fix(theme:i18n): correct params type of `i18e` pipe (#1723) ([bdf0e62](https://github.com/ng-alain/delon/commit/bdf0e62)), closes [#1723](https://github.com/ng-alain/delon/issues/1723)
* fix(cli): correct null value handling (#1724) ([c88c9f2](https://github.com/ng-alain/delon/commit/c88c9f2)), closes [#1724](https://github.com/ng-alain/delon/issues/1724)


## <small>17.0.2 (2023-11-27)</small>

* fix(cli): fix cannot find module `@angular/cdk/schematics` (#1721) ([49a84a1](https://github.com/ng-alain/delon/commit/49a84a1)), closes [#1721](https://github.com/ng-alain/delon/issues/1721)



## <small>17.0.1 (2023-11-26)</small>

* fix(cli): fix node version (#1719) ([df40bb3](https://github.com/ng-alain/delon/commit/df40bb3)), closes [#1719](https://github.com/ng-alain/delon/issues/1719)
Expand Down
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
"sourceMap": true,
"ssr": false
}
},
"defaultConfiguration": "production"
Expand Down
25 changes: 25 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ stages:
jobs:
- job: build
steps:
- task: NodeTool@0
inputs:
versionSource: 'fromFile'
versionFilePath: '.nvmrc'
displayName: 'Install Node.js'
- script: |
node --version
yarn --version
Expand Down Expand Up @@ -64,6 +69,11 @@ stages:
dependsOn: Build
condition: failed()
steps:
- task: NodeTool@0
inputs:
versionSource: 'fromFile'
versionFilePath: '.nvmrc'
displayName: 'Install Node.js'
- checkout: self
displayName: 'Checkout'
clean: true
Expand All @@ -82,6 +92,11 @@ stages:
jobs:
- job: packages
steps:
- task: NodeTool@0
inputs:
versionSource: 'fromFile'
versionFilePath: '.nvmrc'
displayName: 'Install Node.js'
- script: yarn install
displayName: 'Install'
- script: |
Expand Down Expand Up @@ -110,6 +125,11 @@ stages:
testResultsFiles: '**/TESTS*.xml'
- job: cli
steps:
- task: NodeTool@0
inputs:
versionSource: 'fromFile'
versionFilePath: '.nvmrc'
displayName: 'Install Node.js'
- script: yarn install
displayName: 'Install'
- script: yarn run test:cli
Expand All @@ -119,6 +139,11 @@ stages:
jobs:
- job: packages
steps:
- task: NodeTool@0
inputs:
versionSource: 'fromFile'
versionFilePath: '.nvmrc'
displayName: 'Install Node.js'
- script: yarn install
displayName: 'Install'
- script: yarn run lint
Expand Down
10 changes: 10 additions & 0 deletions docs/changelog.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ NG-ALAIN strictly follows [Semantic Versioning 2.0.0](http://semver.org/lang/zh-

---

## <small>17.0.3 (2023-12-08)</small>

* fix(theme:i18n): correct params type of `i18e` pipe (#1723) ([bdf0e62](https://github.com/ng-alain/delon/commit/bdf0e62)), closes [#1723](https://github.com/ng-alain/delon/issues/1723)
* fix(cli): correct null value handling (#1724) ([c88c9f2](https://github.com/ng-alain/delon/commit/c88c9f2)), closes [#1724](https://github.com/ng-alain/delon/issues/1724)


## <small>17.0.2 (2023-11-27)</small>

* fix(cli): fix cannot find module `@angular/cdk/schematics` (#1721) ([49a84a1](https://github.com/ng-alain/delon/commit/49a84a1)), closes [#1721](https://github.com/ng-alain/delon/issues/1721)

## <small>17.0.1 (2023-11-26)</small>

* fix(cli): fix node 20 version (#1719) ([df40bb3](https://github.com/ng-alain/delon/commit/df40bb3)), closes [#1719](https://github.com/ng-alain/delon/issues/1719)
Expand Down
10 changes: 10 additions & 0 deletions docs/changelog.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ NG-ALAIN 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/)

---

## <small>17.0.3 (2023-12-08)</small>

* fix(theme:i18n): 纠正 `i18n` 管道参数类型不匹配 (#1723) ([bdf0e62](https://github.com/ng-alain/delon/commit/bdf0e62)), closes [#1723](https://github.com/ng-alain/delon/issues/1723)
* fix(cli): 纠正生成NG-ALAIN存在空值问题 (#1724) ([c88c9f2](https://github.com/ng-alain/delon/commit/c88c9f2)), closes [#1724](https://github.com/ng-alain/delon/issues/1724)


## <small>17.0.2 (2023-11-27)</small>

* fix(cli): fix cannot find module `@angular/cdk/schematics` (#1721) ([49a84a1](https://github.com/ng-alain/delon/commit/49a84a1)), closes [#1721](https://github.com/ng-alain/delon/issues/1721)

## <small>17.0.1 (2023-11-26)</small>

* fix(cli): 修复不支持 node 20 版本 (#1719) ([df40bb3](https://github.com/ng-alain/delon/commit/df40bb3)), closes [#1719](https://github.com/ng-alain/delon/issues/1719)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delon",
"version": "17.0.1",
"version": "17.0.3",
"description": "Delon is a set of essential modules for NG-ALAIN.",
"keywords": [
"delon",
Expand Down
3 changes: 2 additions & 1 deletion packages/abc/auto-focus/auto-focus.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { NzSafeAny } from 'ng-zorro-antd/core/types';

@Directive({
selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
exportAs: 'autoFocus'
exportAs: 'autoFocus',
standalone: true
})
export class AutoFocusDirective implements AfterViewInit, OnDestroy {
static ngAcceptInputType_enabled: BooleanInput;
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/auto-focus/auto-focus.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AutoFocusDirective } from './auto-focus.directive';
const COMPONENTS = [AutoFocusDirective];

@NgModule({
declarations: COMPONENTS,
imports: COMPONENTS,
exports: COMPONENTS
})
export class AutoFocusModule {}
8 changes: 7 additions & 1 deletion packages/abc/auto-focus/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ Simplest of usage.
```ts
import { Component } from '@angular/core';

import { AutoFocusDirective } from '@delon/abc/auto-focus';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzInputModule } from 'ng-zorro-antd/input';

@Component({
selector: 'app-demo',
template: `
<button nz-button (click)="showInput = !showInput">Toggle Input</button>
@if (showInput) {
<div class="mt-md">
<div class="mt-md">
<input nz-input auto-focus />
</div>
}
`,
standalone: true,
imports: [NzButtonModule, NzInputModule, AutoFocusDirective]
})
export class DemoComponent {
showInput = false;
Expand Down
20 changes: 14 additions & 6 deletions packages/abc/avatar-list/demo/maxLength.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ item component.
```ts
import { Component } from '@angular/core';

import { AvatarListModule } from '@delon/abc/avatar-list';

@Component({
selector: 'app-demo',
template: ` <avatar-list size="mini" maxLength="3" [excessItemsStyle]="{ color: '#f56a00', backgroundColor: '#fde3cf' }">
<avatar-list-item tips="Jake" src="https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png"></avatar-list-item>
<avatar-list-item tips="Andy" src="https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png"></avatar-list-item>
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png"></avatar-list-item>
<avatar-list-item tips="Cipchk" text="Cipchk"></avatar-list-item>
<avatar-list-item tips="heart-o" icon="heart-o"></avatar-list-item>
template: ` <avatar-list
size="mini"
maxLength="3"
[excessItemsStyle]="{ color: '#f56a00', backgroundColor: '#fde3cf' }"
>
<avatar-list-item tips="Jake" src="https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png" />
<avatar-list-item tips="Andy" src="https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png" />
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
<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 {}
```
14 changes: 9 additions & 5 deletions packages/abc/avatar-list/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ Simplest of usage.
```ts
import { Component } from '@angular/core';

import { AvatarListModule } from '@delon/abc/avatar-list';

@Component({
selector: 'app-demo',
template: ` <avatar-list size="mini">
<avatar-list-item tips="Jake" src="https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png"></avatar-list-item>
<avatar-list-item tips="Andy" src="https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png"></avatar-list-item>
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png"></avatar-list-item>
<avatar-list-item tips="Cipchk" text="Cipchk"></avatar-list-item>
<avatar-list-item tips="heart-o" icon="heart-o"></avatar-list-item>
<avatar-list-item tips="Jake" src="https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png" />
<avatar-list-item tips="Andy" src="https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png" />
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
<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 {}
```
18 changes: 10 additions & 8 deletions packages/abc/cell/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ order: 0
Simplest of usage.

```ts
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { JsonPipe } from '@angular/common';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { DomSanitizer } from '@angular/platform-browser';
import { delay, finalize, of, take } from 'rxjs';

import { subDays } from 'date-fns';

import { CellBadge, CellFuValue, CellOptions, CellRenderType } from '@delon/abc/cell';
import { CellBadge, CellFuValue, CellModule, CellOptions, CellRenderType } from '@delon/abc/cell';
import { NzGridModule } from 'ng-zorro-antd/grid';

@Component({
selector: 'app-demo',
Expand Down Expand Up @@ -154,9 +157,13 @@ import { CellBadge, CellFuValue, CellOptions, CellRenderType } from '@delon/abc/
}
`
],
changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CellModule, FormsModule, JsonPipe, NzGridModule]
})
export class DemoComponent implements OnInit {
private readonly ds = inject(DomSanitizer);
private readonly cdr = inject(ChangeDetectorRef);
value: unknown = 'string';
checkbox = false;
radio = true;
Expand Down Expand Up @@ -187,11 +194,6 @@ export class DemoComponent implements OnInit {
}
};

constructor(
private ds: DomSanitizer,
private cdr: ChangeDetectorRef
) {}

ngOnInit(): void {
this.again();
}
Expand Down
9 changes: 7 additions & 2 deletions packages/abc/count-down/demo/accuracy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@ The `0.1s` accuracy usage.

```ts
import { Component } from '@angular/core';

import { CountdownConfig } from 'ngx-countdown';

import { CountDownModule } from '@delon/abc/count-down';

@Component({
selector: 'app-demo',
template: ` <count-down [config]="config"></count-down> `,
template: ` <count-down [config]="config" /> `,
standalone: true,
imports: [CountDownModule]
})
export class DemoComponent {
config: CountdownConfig = {
format: `s.S`,
leftTime: 30,
leftTime: 30
};
}
```
14 changes: 10 additions & 4 deletions packages/abc/count-down/demo/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ title:
The simplest usage.

```ts
import { Component } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd/message';
import { Component, inject } from '@angular/core';

import { CountdownEvent } from 'ngx-countdown';

import { CountDownModule } from '@delon/abc/count-down';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzMessageService } from 'ng-zorro-antd/message';

@Component({
selector: 'app-demo',
template: `
<div>
<count-down #cd [target]="10" (event)="handleEvent($event)" style="font-size: 20px;"></count-down>
<count-down #cd [target]="10" (event)="handleEvent($event)" style="font-size: 20px;" />
</div>
<button nz-button (click)="cd.instance.pause()">Pause</button>
<button nz-button (click)="cd.instance.resume()">Resume</button>
`,
standalone: true,
imports: [CountDownModule, NzButtonModule]
})
export class DemoComponent {
constructor(private msg: NzMessageService) {}
private readonly msg = inject(NzMessageService);

handleEvent(e: CountdownEvent): void {
if (e.action === 'done') {
Expand Down
9 changes: 8 additions & 1 deletion packages/abc/date-picker/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ title:
Start and end values with `ngModel`, `ngModelEnd`.

```ts
import { JsonPipe } from '@angular/common';
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { DatePickerModule } from '@delon/abc/date-picker';
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';

@Component({
selector: 'app-demo',
template: `
result: {{ i | json }}<br />
<nz-range-picker [(ngModel)]="i.start" extend [(ngModelEnd)]="i.end"></nz-range-picker>
<nz-range-picker [(ngModel)]="i.start" extend [(ngModelEnd)]="i.end" />
`,
standalone: true,
imports: [JsonPipe, FormsModule, NzDatePickerModule, DatePickerModule]
})
export class DemoComponent {
i: { start?: Date; end?: Date } = {};
Expand Down
Loading

0 comments on commit 898c4c7

Please sign in to comment.