@rxap/schematic-angular 21.0.1-dev.0 → 21.0.1

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/package.json +7 -7
  3. package/src/lib/coerce-minimum-table-component.js +12 -7
  4. package/src/lib/coerce-minimum-table-component.js.map +1 -1
  5. package/src/lib/form/control/table-select-form-control.js +4 -4
  6. package/src/lib/form/control/table-select-form-control.js.map +1 -1
  7. package/src/lib/rules/table-cell-component-rule.js +2 -3
  8. package/src/lib/rules/table-cell-component-rule.js.map +1 -1
  9. package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.hbs +10 -7
  10. package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.html.template +3 -1
  11. package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.html.template +6 -5
  12. package/src/schematics/accordion/templates/switch-accordion-item.hbs +10 -10
  13. package/src/schematics/data-grid-component/__snapshots__/index.spec.ts.snap +2 -2
  14. package/src/schematics/data-grid-component/component-rule.js +14 -6
  15. package/src/schematics/data-grid-component/component-rule.js.map +1 -1
  16. package/src/schematics/data-grid-component/files/component/__componentName__.component.html.hbs +1 -1
  17. package/src/schematics/dialog-component/__snapshots__/index.spec.ts.snap +16 -14
  18. package/src/schematics/dialog-component/files/component/__componentName__.component.html.template +3 -1
  19. package/src/schematics/form/control/autocomplete-table-select-form-control/__snapshots__/normalize-table-select-form-control-options.spec.ts.snap +36 -4
  20. package/src/schematics/form/control/table-select-form-control/__snapshots__/normalize-table-select-form-control-options.spec.ts.snap +36 -4
  21. package/src/schematics/form/form-component/__snapshots__/index.spec.ts.snap +3 -2
  22. package/src/schematics/form/form-component/coerce-form-component.js +1 -1
  23. package/src/schematics/form/form-component/coerce-form-component.js.map +1 -1
  24. package/src/schematics/form/form-component/files/window/open-__componentName__-window.method.ts.template +26 -16
  25. package/src/schematics/form/form-definition/__snapshots__/index.spec.ts.snap +1 -0
  26. package/src/schematics/table/table-component/__snapshots__/index.spec.ts.snap +21 -21
  27. package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +14 -11
  28. package/src/schematics/table/table-component/select-column-rule.js +3 -1
  29. package/src/schematics/table/table-component/select-column-rule.js.map +1 -1
  30. package/src/schematics/table/templates/spinner-table-column.hbs +5 -7
  31. package/src/schematics/table/tree-table-component/__snapshots__/index.spec.ts.snap +15 -17
  32. package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +14 -11
@@ -81,20 +81,21 @@
81
81
  </mat-card-header>
82
82
 
83
83
  <mat-card-content>
84
+ @if (tableDataSourceDirective.hasError$ | async) {
84
85
  <rxap-data-source-error
85
- *ngIf="tableDataSourceDirective.hasError$ | async"
86
86
  [dataSourceLike]="tableDataSourceDirective">
87
87
  </rxap-data-source-error>
88
+ }
88
89
  <div class="table-scroll-container mt-4 overflow-x-auto overscroll-auto">
89
90
  <table
90
- [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
91
+ [class.hidden]="tableDataSourceDirective.hasError$ | async"
91
92
  mat-table
92
93
  #tableDataSourceDirective="rxapTableDataSource"
93
94
  {{#ifeq backend "data-source"}}
94
- [dataSource]="dataSource"
95
+ [dataSource]="dataSource()"
95
96
  {{/ifeq}}
96
97
  rxapTableDataSource
97
- [parameters]="parameters"
98
+ [parameters]="parameters()"
98
99
  id="{{name}}"
99
100
  {{#if cssClass}}
100
101
  {{> cssClass cssClass=cssClass}}
@@ -144,6 +145,7 @@
144
145
  <div class="flex flex-row" *rxapSelectedRows="let selected">
145
146
  {{#each actionList}}
146
147
  {{#if this.inHeader}}
148
+ @if (selected | rxapRowActionCheck:'{{this.type}}') {
147
149
  <button
148
150
  rxapTableRowHeaderAction="{{this.type}}"
149
151
  mat-icon-button
@@ -153,7 +155,6 @@
153
155
  {{#if this.cssClass}}
154
156
  {{> cssClass cssClass=this.cssClass}}
155
157
  {{/if}}
156
- *ngIf="selected | rxapRowActionCheck:'{{this.type}}'"
157
158
  {{#if this.permission}}
158
159
  rxapHasEnablePermission="{{this.permission}}"
159
160
  {{/if}}
@@ -171,6 +172,7 @@
171
172
  mode="indeterminate"
172
173
  ></mat-progress-bar>
173
174
  </button>
175
+ }
174
176
  {{/if}}
175
177
  {{/each}}
176
178
  </div>
@@ -182,6 +184,7 @@
182
184
  <td class="drop-shadow-2xl" mat-cell *matCellDef="let element">
183
185
  <div class="flex flex-row">
184
186
  {{#each actionList}}
187
+ @if (element | rxapRowActionCheck:'{{this.type}}') {
185
188
  <button
186
189
  rxapTableRowAction="{{this.type}}"
187
190
  [element]="element"
@@ -192,7 +195,6 @@
192
195
  {{> cssClass cssClass=this.cssClass}}
193
196
  {{/if}}
194
197
  mat-icon-button
195
- *ngIf="element | rxapRowActionCheck:'{{this.type}}'"
196
198
  {{#if this.permission}}
197
199
  rxapHasEnablePermission="{{this.permission}}"
198
200
  {{/if}}
@@ -210,6 +212,7 @@
210
212
  mode="indeterminate"
211
213
  ></mat-progress-bar>
212
214
  </button>
215
+ }
213
216
  {{/each}}
214
217
  </div>
215
218
  </td>
@@ -224,7 +227,7 @@
224
227
  <!-- endregion -->
225
228
  {{#if hasCustomFilter}}
226
229
  <ng-container matColumnDef="custom_filter">
227
- <th *matHeaderCellDef [colSpan]="rxapTableColumns.displayColumns.length" mat-header-cell>
230
+ <th *matHeaderCellDef [colSpan]="rxapTableColumns.displayColumns().length" mat-header-cell>
228
231
  <div class="flex flex-row gap-6">
229
232
  {{#each filterList}}
230
233
  {{ indent (compile this.handlebars control=this prefix=../prefix) 16 }}
@@ -271,14 +274,14 @@
271
274
  <tr
272
275
  class="rxap-filter-header"
273
276
  mat-header-row
274
- *matHeaderRowDef="rxapTableColumns.displayColumns | toFilterColumnNames"
277
+ *matHeaderRowDef="rxapTableColumns.displayColumns() | toFilterColumnNames"
275
278
  ></tr>
276
279
  {{/if}}
277
280
 
278
281
  {{#if withHeader}}
279
282
  <tr
280
283
  mat-header-row
281
- *matHeaderRowDef="rxapTableColumns.displayColumns"
284
+ *matHeaderRowDef="rxapTableColumns.displayColumns()"
282
285
  ></tr>
283
286
  {{/if}}
284
287
 
@@ -289,7 +292,7 @@
289
292
  class="hover:!bg-neutral-400 dark:hover:!bg-neutral-800"
290
293
  *matRowDef="
291
294
  let element;
292
- columns: rxapTableColumns.displayColumns;
295
+ columns: rxapTableColumns.displayColumns();
293
296
  let odd = odd;
294
297
  let even = even
295
298
  "
@@ -300,7 +303,7 @@
300
303
  {{#if hasPaginator}}
301
304
  <mat-card-footer>
302
305
  <mat-paginator
303
- [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
306
+ [class.hidden]="tableDataSourceDirective.hasError$ | async"
304
307
  rxapPersistent
305
308
  [pageSizeOptions]="[5,10,25,50,100]"
306
309
  [pageSize]="10"