ng-alain 16.2.0 → 16.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -113,7 +113,9 @@ module.exports = {
113
113
  {
114
114
  files: ['*.html'],
115
115
  extends: ['plugin:@angular-eslint/template/recommended'],
116
- rules: {}
116
+ rules: {
117
+ "@angular-eslint/template/prefer-self-closing-tags": "error"
118
+ }
117
119
  },
118
120
  {
119
121
  files: ['*.html'],
@@ -7,7 +7,7 @@ import { VERSION as VERSION_ZORRO } from 'ng-zorro-antd/version';
7
7
 
8
8
  @Component({
9
9
  selector: 'app-root',
10
- template: ` <router-outlet></router-outlet> `
10
+ template: ` <router-outlet />`
11
11
  })
12
12
  export class AppComponent implements OnInit {
13
13
  constructor(
@@ -7,7 +7,7 @@ import { SettingsService, User } from '@delon/theme';
7
7
  selector: 'header-user',
8
8
  template: `
9
9
  <div class="alain-default__nav-item d-flex align-items-center px-sm" nz-dropdown nzPlacement="bottomRight" [nzDropdownMenu]="userMenu">
10
- <nz-avatar [nzSrc]="user.avatar" nzSize="small" class="mr-sm"></nz-avatar>
10
+ <nz-avatar [nzSrc]="user.avatar" nzSize="small" class="mr-sm" />
11
11
  {{ user.name }}
12
12
  </div>
13
13
  <nz-dropdown-menu #userMenu="nzDropdownMenu">
@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
2
2
 
3
3
  @Component({
4
4
  selector: 'layout-blank',
5
- template: `<router-outlet></router-outlet> `,
5
+ template: `<router-outlet />`,
6
6
  host: {
7
7
  '[class.alain-blank]': 'true'
8
8
  }
@@ -4,7 +4,7 @@ import { ExceptionType } from '@delon/abc/exception';
4
4
 
5
5
  @Component({
6
6
  selector: 'app-exception',
7
- template: ` <exception [type]="type" style="min-height: 500px; height: 80%;"> </exception> `,
7
+ template: ` <exception [type]="type" style="min-height: 500px; height: 80%;" />`,
8
8
  changeDetection: ChangeDetectionStrategy.OnPush
9
9
  })
10
10
  export class ExceptionComponent {
@@ -1,5 +1,4 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { ActivatedRoute } from '@angular/router';
1
+ import { Component, Input, OnInit } from '@angular/core';
3
2
  import { SocialService } from '@delon/auth';
4
3
  import { SettingsService } from '@delon/theme';
5
4
 
@@ -9,16 +8,14 @@ import { SettingsService } from '@delon/theme';
9
8
  providers: [SocialService]
10
9
  })
11
10
  export class CallbackComponent implements OnInit {
12
- type = '';
11
+ @Input() type = '';
13
12
 
14
13
  constructor(
15
14
  private socialService: SocialService,
16
- private settingsSrv: SettingsService,
17
- private route: ActivatedRoute
15
+ private settingsSrv: SettingsService
18
16
  ) {}
19
17
 
20
18
  ngOnInit(): void {
21
- this.type = this.route.snapshot.params['type'];
22
19
  this.mockModel();
23
20
  }
24
21
 
@@ -1,7 +1,7 @@
1
1
  <div class="ant-card width-lg" style="margin: 0 auto">
2
2
  <div class="ant-card-body">
3
3
  <div class="avatar">
4
- <nz-avatar [nzSrc]="user.avatar" nzIcon="user" nzSize="large"></nz-avatar>
4
+ <nz-avatar [nzSrc]="user.avatar" nzIcon="user" nzSize="large" />
5
5
  </div>
6
6
  <form nz-form [formGroup]="f" (ngSubmit)="submit()" role="form" class="mt-md">
7
7
  <nz-form-item>
@@ -1,7 +1,7 @@
1
1
  <form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form">
2
2
  <nz-tabset [nzAnimated]="false" class="tabs" (nzSelectChange)="switch($event)">
3
3
  <nz-tab [nzTitle]="'app.login.tab-login-credentials' | i18n">
4
- <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg"></nz-alert>
4
+ <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg" />
5
5
  <nz-form-item>
6
6
  <nz-form-control nzErrorTip="Please enter mobile number, muse be: admin or user">
7
7
  <nz-input-group nzSize="large" nzPrefixIcon="user">
@@ -1,6 +1,6 @@
1
1
  <h3>{{ 'app.register.register' | i18n }}</h3>
2
2
  <form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form">
3
- <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg"></nz-alert>
3
+ <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg" />
4
4
  <nz-form-item>
5
5
  <nz-form-control [nzErrorTip]="mailErrorTip">
6
6
  <nz-input-group nzSize="large" nzAddonBeforeIcon="user">
@@ -35,12 +35,7 @@
35
35
  <div *ngSwitchDefault class="error">{{ 'validation.password.strength.short' | i18n }}</div>
36
36
  </ng-container>
37
37
  <div class="progress-{{ status }}">
38
- <nz-progress
39
- [nzPercent]="progress"
40
- [nzStatus]="passwordProgressMap[status]"
41
- [nzStrokeWidth]="6"
42
- [nzShowInfo]="false"
43
- ></nz-progress>
38
+ <nz-progress [nzPercent]="progress" [nzStatus]="passwordProgressMap[status]" [nzStrokeWidth]="6" [nzShowInfo]="false" />
44
39
  </div>
45
40
  <p class="mt-sm">{{ 'validation.password.strength.msg' | i18n }}</p>
46
41
  </div>
@@ -63,8 +58,8 @@
63
58
  <nz-input-group nzSize="large" [nzAddOnBefore]="addOnBeforeTemplate">
64
59
  <ng-template #addOnBeforeTemplate>
65
60
  <nz-select formControlName="mobilePrefix" style="width: 100px">
66
- <nz-option [nzLabel]="'+86'" [nzValue]="'+86'"></nz-option>
67
- <nz-option [nzLabel]="'+87'" [nzValue]="'+87'"></nz-option>
61
+ <nz-option [nzLabel]="'+86'" [nzValue]="'+86'" />
62
+ <nz-option [nzLabel]="'+87'" [nzValue]="'+87'" />
68
63
  </nz-select>
69
64
  </ng-template>
70
65
  <input formControlName="mobile" nz-input placeholder="Phone number" />
@@ -60,6 +60,7 @@ const routes: Routes = [
60
60
  // NOTICE: If you use `reuse-tab` component and turn on keepingScroll you can set to `disabled`
61
61
  // Pls refer to https://ng-alain.com/components/reuse-tab
62
62
  scrollPositionRestoration: 'top',
63
+ bindToComponentInputs: true
63
64
  }
64
65
  )],
65
66
  exports: [RouterModule],
@@ -146,10 +146,10 @@ function addCodeStylesToPackageJson() {
146
146
  }
147
147
  // dependencies
148
148
  (0, utils_1.addPackage)(tree, [
149
- `husky@^7.0.4`,
150
- `lint-staged@^13.2.3`,
151
- `prettier@^3.0.0`,
152
- `stylelint@^15.10.2`,
149
+ `husky@^8.0.3`,
150
+ `lint-staged@^14.0.1`,
151
+ `prettier@^3.0.2`,
152
+ `stylelint@^15.10.3`,
153
153
  `stylelint-config-rational-order@^0.1.2`,
154
154
  `stylelint-config-standard@^34.0.0`,
155
155
  `stylelint-declaration-block-no-ignored-properties@^2.7.0`,
@@ -183,10 +183,10 @@ function addCodeStylesToPackageJson(): Rule {
183
183
  addPackage(
184
184
  tree,
185
185
  [
186
- `husky@^7.0.4`,
187
- `lint-staged@^13.2.3`,
188
- `prettier@^3.0.0`,
189
- `stylelint@^15.10.2`,
186
+ `husky@^8.0.3`,
187
+ `lint-staged@^14.0.1`,
188
+ `prettier@^3.0.2`,
189
+ `stylelint@^15.10.3`,
190
190
  `stylelint-config-rational-order@^0.1.2`,
191
191
  `stylelint-config-standard@^34.0.0`,
192
192
  `stylelint-declaration-block-no-ignored-properties@^2.7.0`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-alain",
3
- "version": "16.2.0",
3
+ "version": "16.3.0",
4
4
  "description": "Schematics specific to ng-alain",
5
5
  "author": "cipchk<cipchk@qq.com>",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZORROVERSION = exports.VERSION = void 0;
4
- exports.VERSION = '^16.2.0';
4
+ exports.VERSION = '^16.3.0';
5
5
  exports.ZORROVERSION = '^16.1.0';
6
6
  //# sourceMappingURL=lib-versions.js.map
@@ -1,2 +1,2 @@
1
- export const VERSION = '^16.2.0';
1
+ export const VERSION = '^16.3.0';
2
2
  export const ZORROVERSION = '^16.1.0';
package/utils/versions.js CHANGED
@@ -21,26 +21,26 @@ const workspace_2 = require("./workspace");
21
21
  function UpgradeMainVersions(tree, version = lib_versions_1.VERSION) {
22
22
  (0, package_1.addPackage)(tree, ['abc', 'acl', 'auth', 'cache', 'form', 'mock', 'theme', 'util', 'chart'].map(name => `@delon/${name}@${version}`));
23
23
  (0, package_1.addPackage)(tree, [
24
- `@angular-eslint/builder@~16.1.0`,
25
- `@angular-eslint/eslint-plugin@~16.1.0`,
26
- `@angular-eslint/eslint-plugin-template@~16.1.0`,
27
- `@angular-eslint/schematics@~16.1.0`,
28
- `@angular-eslint/template-parser@~16.1.0`,
29
- `@typescript-eslint/eslint-plugin@~6.1.0`,
30
- `@typescript-eslint/parser@~6.1.0`,
31
- `eslint@^8.45.0`,
32
- `eslint-config-prettier@~8.8.0`,
33
- `eslint-plugin-import@~2.27.5`,
34
- `eslint-plugin-jsdoc@~46.4.4`,
24
+ `@angular-eslint/builder@~16.1.1`,
25
+ `@angular-eslint/eslint-plugin@~16.1.1`,
26
+ `@angular-eslint/eslint-plugin-template@~16.1.1`,
27
+ `@angular-eslint/schematics@~16.1.1`,
28
+ `@angular-eslint/template-parser@~16.1.1`,
29
+ `@typescript-eslint/eslint-plugin@~6.4.1`,
30
+ `@typescript-eslint/parser@~6.4.1`,
31
+ `eslint@^8.48.0`,
32
+ `eslint-config-prettier@~9.0.0`,
33
+ `eslint-plugin-import@~2.28.1`,
34
+ `eslint-plugin-jsdoc@~46.5.0`,
35
35
  `eslint-plugin-prefer-arrow@~1.2.3`,
36
36
  `eslint-plugin-prettier@~5.0.0`,
37
- `eslint-plugin-deprecation@~1.4.1`,
38
- `prettier@^3.0.0`,
39
- `husky@^7.0.4`,
37
+ `eslint-plugin-deprecation@~1.5.0`,
38
+ `prettier@^3.0.2`,
39
+ `husky@^8.0.3`,
40
40
  `ng-alain@${version}`,
41
41
  `ng-alain-plugin-theme@^15.0.1`,
42
42
  `source-map-explorer@^2.5.3`,
43
- `@angular/language-service@^16.1.0`,
43
+ `@angular/language-service@^16.2.0`,
44
44
  `@delon/testing@${version}`
45
45
  ], 'devDependencies');
46
46
  (0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^16.1.0`]);
package/utils/versions.ts CHANGED
@@ -17,26 +17,26 @@ export function UpgradeMainVersions(tree: Tree, version: string = VERSION): void
17
17
  addPackage(
18
18
  tree,
19
19
  [
20
- `@angular-eslint/builder@~16.1.0`,
21
- `@angular-eslint/eslint-plugin@~16.1.0`,
22
- `@angular-eslint/eslint-plugin-template@~16.1.0`,
23
- `@angular-eslint/schematics@~16.1.0`,
24
- `@angular-eslint/template-parser@~16.1.0`,
25
- `@typescript-eslint/eslint-plugin@~6.1.0`,
26
- `@typescript-eslint/parser@~6.1.0`,
27
- `eslint@^8.45.0`,
28
- `eslint-config-prettier@~8.8.0`,
29
- `eslint-plugin-import@~2.27.5`,
30
- `eslint-plugin-jsdoc@~46.4.4`,
20
+ `@angular-eslint/builder@~16.1.1`,
21
+ `@angular-eslint/eslint-plugin@~16.1.1`,
22
+ `@angular-eslint/eslint-plugin-template@~16.1.1`,
23
+ `@angular-eslint/schematics@~16.1.1`,
24
+ `@angular-eslint/template-parser@~16.1.1`,
25
+ `@typescript-eslint/eslint-plugin@~6.4.1`,
26
+ `@typescript-eslint/parser@~6.4.1`,
27
+ `eslint@^8.48.0`,
28
+ `eslint-config-prettier@~9.0.0`,
29
+ `eslint-plugin-import@~2.28.1`,
30
+ `eslint-plugin-jsdoc@~46.5.0`,
31
31
  `eslint-plugin-prefer-arrow@~1.2.3`,
32
32
  `eslint-plugin-prettier@~5.0.0`,
33
- `eslint-plugin-deprecation@~1.4.1`,
34
- `prettier@^3.0.0`,
35
- `husky@^7.0.4`,
33
+ `eslint-plugin-deprecation@~1.5.0`,
34
+ `prettier@^3.0.2`,
35
+ `husky@^8.0.3`,
36
36
  `ng-alain@${version}`,
37
37
  `ng-alain-plugin-theme@^15.0.1`,
38
38
  `source-map-explorer@^2.5.3`,
39
- `@angular/language-service@^16.1.0`,
39
+ `@angular/language-service@^16.2.0`,
40
40
  `@delon/testing@${version}`
41
41
  ],
42
42
  'devDependencies'