@porscheinformatik/material-addons 22.1.3 → 22.2.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.
package/README.md CHANGED
@@ -51,6 +51,18 @@ Material addons requires an already set-up Angular Material project. To do a fre
51
51
 
52
52
  Material Addons exposes CSS variables for customization:
53
53
 
54
+ | Variable | Default | Description |
55
+ | --- | --- | --- |
56
+ | `--mad-form-field-outlined-floating-label-scale` | `0.875` | Controls the scale of floating labels in outlined form fields. Use `0.75` for the Angular Material default or `1` to keep the floating label at full size. |
57
+
58
+ For example, restore the Angular Material floating-label scale globally:
59
+
60
+ ```scss
61
+ :root {
62
+ --mad-form-field-outlined-floating-label-scale: 0.75;
63
+ }
64
+ ```
65
+
54
66
  ```scss
55
67
  // Existing variables (v21.x and earlier)
56
68
  --main-primary, --selection-background, --hover-color
@@ -2479,6 +2479,7 @@ class DataTableComponent {
2479
2479
  this._selectionModel = new SelectionModel(true);
2480
2480
  this._sort = null;
2481
2481
  this._pendingSort = null;
2482
+ this._awaitingAsyncSortedData = false;
2482
2483
  this.pageState = signal(DEFAULT_PAGE, ...(ngDevMode ? [{ debugName: "pageState" }] : []));
2483
2484
  this.dataLength = signal(0, ...(ngDevMode ? [{ debugName: "dataLength" }] : []));
2484
2485
  this._filterValue = signal(undefined, ...(ngDevMode ? [{ debugName: "_filterValue" }] : []));
@@ -2510,6 +2511,7 @@ class DataTableComponent {
2510
2511
  this.registerDisplayedColumnDefinitionEffect();
2511
2512
  this.registerForceSelectionModeEffect();
2512
2513
  this.registerAllColumnsEffect();
2514
+ this.registerAsyncDataSortSyncEffect();
2513
2515
  }
2514
2516
  registerMatSortEffect() {
2515
2517
  effect(() => {
@@ -2610,6 +2612,21 @@ class DataTableComponent {
2610
2612
  }
2611
2613
  });
2612
2614
  }
2615
+ registerAsyncDataSortSyncEffect() {
2616
+ effect(() => {
2617
+ this.tableData();
2618
+ untracked(() => {
2619
+ if (!this.useAsync() || !this.tableData()) {
2620
+ return;
2621
+ }
2622
+ if (this._awaitingAsyncSortedData) {
2623
+ this._awaitingAsyncSortedData = false;
2624
+ return;
2625
+ }
2626
+ this.clearSort();
2627
+ });
2628
+ });
2629
+ }
2613
2630
  /** TABLE DISPLAY HANDLING */
2614
2631
  getDataTableHeaderType(column) {
2615
2632
  if (column.isSortable && !column.isFilterable) {
@@ -2788,6 +2805,7 @@ class DataTableComponent {
2788
2805
  /** SORT HANDLING */
2789
2806
  onSortingEvent(sort) {
2790
2807
  if (this.useAsync()) {
2808
+ this._awaitingAsyncSortedData = true;
2791
2809
  this.sortEvent.emit(sort);
2792
2810
  }
2793
2811
  if (this.effectivePersistenceConfig().persistSort) {
@@ -2894,6 +2912,13 @@ class DataTableComponent {
2894
2912
  this.setSort(pendingSort);
2895
2913
  }
2896
2914
  }
2915
+ clearSort() {
2916
+ if (this.dataSource.sort) {
2917
+ this.dataSource.sort.active = '';
2918
+ this.dataSource.sort.direction = '';
2919
+ this.dataSource.sort._stateChanges.next();
2920
+ }
2921
+ }
2897
2922
  initFilterState() {
2898
2923
  const filter = this.persistenceService.loadFilter(this.id());
2899
2924
  this.filter()?.updateFilterables(filter);
@@ -4248,7 +4273,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
4248
4273
  args: [{ selector: 'mad-breadcrumb', imports: [RouterLink, IconButtonComponent, MatIcon, MatTooltip], template: "@if (breadcrumbs().length) {\n <div class=\"breadcrumb\">\n <nav data-cy=\"breadcrumb-nav\" class=\"breadcrumb__nav\">\n @for (crumb of breadcrumbs(); track crumb.label; let last = $last) {\n @if (crumb.route?.length) {\n <a data-cy=\"breadcrumb-link\" [routerLink]=\"crumb.route\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else if (crumb.href?.length) {\n <a data-cy=\"breadcrumb-link\" [href]=\"crumb.href\" target=\"_blank\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else {\n <span data-cy=\"breadcrumb-current\" class=\"breadcrumb__current\">{{ crumb.label }}</span>\n }\n @if (!last) {\n <span data-cy=\"breadcrumb-separator\" class=\"breadcrumb__separator\">/</span>\n }\n }\n </nav>\n @if (showCopy()) {\n <mad-icon-button\n data-cy=\"breadcrumb-copy\"\n class=\"breadcrumb__copy\"\n (click)=\"copy.emit()\"\n [matTooltip]=\"title()\"\n matTooltipPosition=\"above\"\n >\n <mat-icon>content_copy</mat-icon>\n </mad-icon-button>\n }\n </div>\n}\n", styles: [".breadcrumb{display:flex;align-items:center;gap:.5rem}.breadcrumb__nav{display:flex;align-items:center;gap:.625rem;min-height:3.5rem;padding-block:.25rem;font-size:.875rem;line-height:1.25rem}.breadcrumb__link{color:var(--main-primary);text-decoration:none}.breadcrumb__link:hover{text-decoration:underline}.breadcrumb__current,.breadcrumb__separator{color:var(--breadcrumb-separator-color)}.breadcrumb__copy{flex-shrink:0}\n"] }]
4249
4274
  }], propDecorators: { breadcrumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumbs", required: true }] }], showCopy: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCopy", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], copy: [{ type: i0.Output, args: ["copy"] }] } });
4250
4275
 
4251
- const VERSION = '22.1.3';
4276
+ const VERSION = '22.2.0';
4252
4277
 
4253
4278
  const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
4254
4279
  providedIn: 'root',