@gravitee/ui-schematics 13.12.0 → 14.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/ui-schematics",
3
- "version": "13.12.0",
3
+ "version": "14.0.0",
4
4
  "description": "Gravitee.io - UI Schematics",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,8 +27,7 @@ import { <%= classify(name) %>Component, <%= classify(name) %>Data, <%= classify
27
27
  @Component({
28
28
  selector: 'test-component',
29
29
  template: ``,
30
- imports: [<%= classify(name) %>Component, MatDialogModule, MatIconTestingModule],
31
- standalone: true,
30
+ imports: [MatDialogModule, MatIconTestingModule],
32
31
  })
33
32
  class SpecDialogComponent {
34
33
  constructor(private readonly matDialog: MatDialog) {}
@@ -25,7 +25,6 @@ export type <%= classify(name) %>Result = boolean;
25
25
  selector: '<%= dasherize(name) %>',
26
26
  templateUrl: './<%= dasherize(name) %>.component.html',
27
27
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
28
- standalone: true,
29
28
  changeDetection: ChangeDetectionStrategy.OnPush,
30
29
  imports: [MatDialogModule, MatButtonModule],
31
30
  })
@@ -24,8 +24,7 @@ import { <%= classify(name) %>Component, <%= classify(name) %>Data, <%= classify
24
24
  @Component({
25
25
  selector: 'story-component',
26
26
  template: `<button id="open-dialog" (click)="open()">Open dialog</button>`,
27
- imports: [<%= classify(name) %>Component, MatDialogModule, MatIconTestingModule],
28
- standalone: true,
27
+ imports: [MatDialogModule, MatIconTestingModule],
29
28
  })
30
29
  class StoryDialogComponent {
31
30
  constructor(private readonly matDialog: MatDialog) {}
@@ -29,7 +29,7 @@
29
29
  icon="search"
30
30
  title="Empty state title"
31
31
  subtitle="Empty state subtitle"
32
- ></gio-card-empty-state>
32
+ />
33
33
  </mat-card-content>
34
34
  </mat-card>
35
35
  <% } else { %>
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { CommonModule } from '@angular/common';
17
- import { Component } from '@angular/core';
17
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
18
18
  import { MatCardModule } from '@angular/material/card';
19
19
  import { MatButtonModule } from '@angular/material/button';
20
20
  <% if (isEmptyState) {%>import { GioCardEmptyStateModule, GioIconsModule } from '@gravitee/ui-particles-angular';<% } %>
@@ -24,7 +24,6 @@ import { MatButtonModule } from '@angular/material/button';
24
24
  templateUrl: './<%= dasherize(name) %>.component.html',
25
25
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
26
26
  imports: [CommonModule,<% if (isEmptyState) {%> GioCardEmptyStateModule, GioIconsModule,<% } %> MatCardModule, MatButtonModule],
27
- standalone: true,
28
27
  changeDetection: ChangeDetectionStrategy.OnPush,
29
28
  })
30
29
  export class <%= classify(name) %>Component {}
@@ -21,7 +21,7 @@
21
21
  <mat-card-subtitle>Add a description here</mat-card-subtitle>
22
22
  </mat-card-header>
23
23
  <mat-card-content>
24
- <form *ngIf="<%= camelize(name) %>Form" [formGroup]="<%= camelize(name) %>Form">
24
+ <form [formGroup]="<%= camelize(name) %>Form">
25
25
  <mat-form-field>
26
26
  <mat-label>Name</mat-label>
27
27
  <input matInput formControlName="name" required />
@@ -30,4 +30,4 @@
30
30
  </form>
31
31
  </mat-card-content>
32
32
  </mat-card>
33
- <gio-save-bar [form]="<%= camelize(name) %>Form" (resetClicked)="reset()" (submitted)="submit()"></gio-save-bar>
33
+ <gio-save-bar [form]="<%= camelize(name) %>Form" (resetClicked)="reset()" (submitted)="submit()" />
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { CommonModule } from '@angular/common';
17
- import { Component } from '@angular/core';
17
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
18
18
  import { MatCardModule } from '@angular/material/card';
19
19
  import { ReactiveFormsModule, Validators } from '@angular/forms';
20
20
  import { FormControl, FormGroup } from '@angular/forms';
@@ -27,7 +27,6 @@ import { GioSaveBarModule } from "@gravitee/ui-particles-angular";
27
27
  templateUrl: './<%= dasherize(name) %>.component.html',
28
28
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
29
29
  imports: [CommonModule, GioSaveBarModule, MatCardModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule],
30
- standalone: true,
31
30
  changeDetection: ChangeDetectionStrategy.OnPush,
32
31
  })
33
32
  export class <%= classify(name) %>Component {
@@ -33,7 +33,7 @@
33
33
  matTooltip="Edit"
34
34
  (click)="edit.emit(element.id)"
35
35
  >
36
- <mat-icon svgIcon="gio:edit-pencil"></mat-icon>
36
+ <mat-icon svgIcon="gio:edit-pencil" />
37
37
  </button>
38
38
 
39
39
  <button
@@ -42,7 +42,7 @@
42
42
  matTooltip="Delete"
43
43
  (click)="delete.emit(element)"
44
44
  >
45
- <mat-icon svgIcon="gio:trash"></mat-icon>
45
+ <mat-icon svgIcon="gio:trash" />
46
46
  </button>
47
47
  </div>
48
48
  </td>
@@ -53,11 +53,12 @@
53
53
 
54
54
  <!-- Row shown when there is no data -->
55
55
  <tr class="mat-mdc-row mdc-data-table__row" *matNoDataRow>
56
- <td *ngIf="!loading" class="mat-mdc-cell mdc-data-table__cell" [attr.colspan]="displayedColumns.length">
57
- No data to display.
58
- </td>
59
- <td *ngIf="loading" class="mat-mdc-cell mdc-data-table__cell" [attr.colspan]="displayedColumns.length">
60
- <gio-loader></gio-loader>
56
+ <td class="mat-mdc-cell mdc-data-table__cell" [attr.colspan]="displayedColumns.length">
57
+ @if (loading) {
58
+ <gio-loader />
59
+ } @else {
60
+ No data to display.
61
+ }
61
62
  </td>
62
63
  </tr>
63
64
  </table>
@@ -24,7 +24,8 @@ import { MatIconTestingModule } from "@angular/material/icon/testing";
24
24
 
25
25
  @Component({
26
26
  selector: 'test-component',
27
- template: ` <<%= dasherize(name) %> [dataSource]="dataSource" [loading]="loading"></<%= dasherize(name) %>>`,
27
+ template: ` <<%= dasherize(name) %> [dataSource]="dataSource" [loading]="loading" />`,
28
+ imports: [<%= classify(name) %>Component],
28
29
  })
29
30
  class TestComponent {
30
31
  loading = false;
@@ -38,8 +39,7 @@ describe('<%= classify(name) %>Component', () => {
38
39
 
39
40
  beforeEach(async () => {
40
41
  await TestBed.configureTestingModule({
41
- declarations: [TestComponent],
42
- imports: [MatIconTestingModule, NoopAnimationsModule, <%= classify(name) %>Component]
42
+ imports: [MatIconTestingModule, NoopAnimationsModule, TestComponent]
43
43
  })
44
44
  .compileComponents();
45
45
 
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { CommonModule } from '@angular/common';
17
- import { Component, EventEmitter, Input, Output } from "@angular/core";
17
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from "@angular/core";
18
18
  import { MatButtonModule } from '@angular/material/button';
19
19
  import { MatTableModule } from '@angular/material/table';
20
20
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -25,7 +25,6 @@ import { GioIconsModule, GioLoaderModule } from "@gravitee/ui-particles-angular"
25
25
  templateUrl: './<%= dasherize(name) %>.component.html',
26
26
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
27
27
  imports: [CommonModule, GioIconsModule, GioLoaderModule, MatButtonModule, MatTableModule, MatTooltipModule],
28
- standalone: true,
29
28
  changeDetection: ChangeDetectionStrategy.OnPush,
30
29
  })
31
30
  export class <%= classify(name) %>Component {