@ng-matero/extensions 16.1.3 → 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.
Files changed (147) hide show
  1. package/_index.scss +0 -3
  2. package/_theming.scss +0 -3
  3. package/alert/_alert-theme.scss +12 -28
  4. package/alert/alert.scss +28 -0
  5. package/colorpicker/_colorpicker-theme.scss +20 -8
  6. package/colorpicker/colorpicker-toggle.scss +23 -17
  7. package/column-resize/column-resize-notifier.d.ts +1 -1
  8. package/column-resize/polyfill.d.ts +1 -3
  9. package/column-resize/resizable.d.ts +1 -0
  10. package/column-resize/resize-strategy.d.ts +4 -3
  11. package/core/style/_sass-utils.scss +49 -0
  12. package/core/theming/_all-theme.scss +0 -2
  13. package/core/tokens/_token-utils.scss +127 -0
  14. package/core/tokens/m2/_index.scss +49 -0
  15. package/core/tokens/m2/mdc/_plain-tooltip.scss +72 -0
  16. package/core/tokens/m2/mtx/_alert.scss +55 -0
  17. package/core/tokens/m2/mtx/_colorpicker.scss +55 -0
  18. package/core/tokens/m2/mtx/_datetimepicker.scss +155 -0
  19. package/core/tokens/m2/mtx/_drawer.scss +45 -0
  20. package/core/tokens/m2/mtx/_grid.scss +57 -0
  21. package/core/tokens/m2/mtx/_loader.scss +45 -0
  22. package/core/tokens/m2/mtx/_popover.scss +46 -0
  23. package/core/tokens/m2/mtx/_progress.scss +56 -0
  24. package/core/tokens/m2/mtx/_select.scss +83 -0
  25. package/core/tokens/m2/mtx/_split.scss +54 -0
  26. package/core/typography/_typography.scss +203 -36
  27. package/datetimepicker/_datetimepicker-theme.scss +31 -183
  28. package/datetimepicker/calendar-body.scss +81 -1
  29. package/datetimepicker/calendar.scss +33 -3
  30. package/datetimepicker/clock.scss +50 -10
  31. package/datetimepicker/datetimepicker-content.scss +12 -0
  32. package/datetimepicker/datetimepicker-toggle.scss +23 -17
  33. package/datetimepicker/time.scss +41 -1
  34. package/drawer/_drawer-theme.scss +6 -10
  35. package/drawer/drawer-container.scss +11 -0
  36. package/esm2022/alert/alert.mjs +4 -4
  37. package/esm2022/colorpicker/colorpicker-toggle.mjs +2 -2
  38. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -9
  39. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -9
  40. package/esm2022/column-resize/column-resize-directives/constants.mjs +1 -1
  41. package/esm2022/column-resize/column-resize-notifier.mjs +7 -2
  42. package/esm2022/column-resize/column-resize.mjs +3 -3
  43. package/esm2022/column-resize/event-dispatcher.mjs +5 -2
  44. package/esm2022/column-resize/polyfill.mjs +3 -19
  45. package/esm2022/column-resize/resizable.mjs +7 -7
  46. package/esm2022/column-resize/resize-ref.mjs +1 -1
  47. package/esm2022/column-resize/resize-strategy.mjs +16 -10
  48. package/esm2022/datetimepicker/calendar-body.mjs +2 -2
  49. package/esm2022/datetimepicker/calendar.mjs +3 -3
  50. package/esm2022/datetimepicker/clock.mjs +2 -2
  51. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +2 -2
  52. package/esm2022/datetimepicker/datetimepicker.mjs +3 -3
  53. package/esm2022/datetimepicker/time.mjs +3 -3
  54. package/esm2022/drawer/drawer-container.mjs +3 -3
  55. package/esm2022/grid/cell.mjs +3 -19
  56. package/esm2022/grid/column-resize/column-resize-directives/common.mjs +1 -8
  57. package/esm2022/grid/column-resize/overlay-handle.mjs +11 -6
  58. package/esm2022/grid/column-resize/resizable-directives/common.mjs +1 -1
  59. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -2
  60. package/esm2022/grid/column-resize/resize-strategy.mjs +10 -5
  61. package/esm2022/grid/grid-module.mjs +13 -9
  62. package/esm2022/grid/grid-utils.mjs +1 -9
  63. package/esm2022/grid/grid.mjs +28 -21
  64. package/esm2022/loader/loader.mjs +2 -2
  65. package/esm2022/photoviewer/mtxPhotoviewer.mjs +5 -0
  66. package/esm2022/photoviewer/photoviewer-module.mjs +17 -0
  67. package/esm2022/photoviewer/photoviewer.mjs +63 -0
  68. package/esm2022/photoviewer/public-api.mjs +3 -0
  69. package/esm2022/popover/popover-interfaces.mjs +1 -1
  70. package/esm2022/popover/popover.mjs +13 -3
  71. package/esm2022/progress/progress.mjs +4 -4
  72. package/esm2022/select/select.mjs +11 -3
  73. package/esm2022/split/split.mjs +2 -2
  74. package/esm2022/tooltip/tooltip.mjs +2 -2
  75. package/fesm2022/mtxAlert.mjs +3 -3
  76. package/fesm2022/mtxAlert.mjs.map +1 -1
  77. package/fesm2022/mtxColorpicker.mjs +2 -2
  78. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  79. package/fesm2022/mtxColumnResize.mjs +38 -52
  80. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  81. package/fesm2022/mtxDatetimepicker.mjs +12 -12
  82. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  83. package/fesm2022/mtxDrawer.mjs +2 -2
  84. package/fesm2022/mtxDrawer.mjs.map +1 -1
  85. package/fesm2022/mtxGrid.mjs +188 -197
  86. package/fesm2022/mtxGrid.mjs.map +1 -1
  87. package/fesm2022/mtxLoader.mjs +2 -2
  88. package/fesm2022/mtxLoader.mjs.map +1 -1
  89. package/fesm2022/mtxPhotoviewer.mjs +84 -0
  90. package/fesm2022/mtxPhotoviewer.mjs.map +1 -0
  91. package/fesm2022/mtxPopover.mjs +12 -2
  92. package/fesm2022/mtxPopover.mjs.map +1 -1
  93. package/fesm2022/mtxProgress.mjs +3 -3
  94. package/fesm2022/mtxProgress.mjs.map +1 -1
  95. package/fesm2022/mtxSelect.mjs +10 -2
  96. package/fesm2022/mtxSelect.mjs.map +1 -1
  97. package/fesm2022/mtxSplit.mjs +2 -2
  98. package/fesm2022/mtxSplit.mjs.map +1 -1
  99. package/fesm2022/mtxTooltip.mjs +2 -2
  100. package/fesm2022/mtxTooltip.mjs.map +1 -1
  101. package/grid/_grid-theme.scss +14 -86
  102. package/grid/cell.d.ts +0 -2
  103. package/grid/cell.scss +0 -1
  104. package/grid/column-resize/_column-resize.scss +88 -94
  105. package/grid/column-resize/column-resize-directives/common.d.ts +0 -7
  106. package/grid/column-resize/overlay-handle.d.ts +1 -0
  107. package/grid/column-resize/resize-strategy.d.ts +2 -2
  108. package/grid/grid-module.d.ts +4 -4
  109. package/grid/grid-utils.d.ts +0 -6
  110. package/grid/grid.d.ts +10 -7
  111. package/grid/grid.scss +103 -15
  112. package/loader/_loader-theme.scss +6 -6
  113. package/loader/loader.scss +7 -0
  114. package/package.json +25 -25
  115. package/{slider → photoviewer}/index.d.ts +1 -1
  116. package/photoviewer/photoviewer-module.d.ts +7 -0
  117. package/photoviewer/photoviewer.d.ts +17 -0
  118. package/photoviewer/public-api.d.ts +2 -0
  119. package/popover/_popover-theme.scss +6 -40
  120. package/popover/popover-interfaces.d.ts +1 -0
  121. package/popover/popover.d.ts +6 -1
  122. package/popover/popover.scss +36 -2
  123. package/prebuilt-themes/deeppurple-amber.css +1 -1
  124. package/prebuilt-themes/indigo-pink.css +1 -1
  125. package/prebuilt-themes/pink-bluegrey.css +1 -1
  126. package/prebuilt-themes/purple-green.css +1 -1
  127. package/progress/_progress-theme.scss +6 -25
  128. package/progress/progress.scss +42 -0
  129. package/select/_select-theme.scss +19 -133
  130. package/select/select.d.ts +1 -0
  131. package/select/select.scss +147 -36
  132. package/split/_split-theme.scss +21 -18
  133. package/split/split.scss +13 -0
  134. package/tooltip/_tooltip-theme.scss +19 -24
  135. package/tooltip/tooltip.scss +18 -17
  136. package/esm2022/slider/mtxSlider.mjs +0 -5
  137. package/esm2022/slider/public-api.mjs +0 -3
  138. package/esm2022/slider/slider-module.mjs +0 -19
  139. package/esm2022/slider/slider.mjs +0 -1115
  140. package/fesm2022/mtxSlider.mjs +0 -1137
  141. package/fesm2022/mtxSlider.mjs.map +0 -1
  142. package/slider/_slider-theme.import.scss +0 -2
  143. package/slider/_slider-theme.scss +0 -232
  144. package/slider/public-api.d.ts +0 -2
  145. package/slider/slider-module.d.ts +0 -9
  146. package/slider/slider.d.ts +0 -277
  147. package/slider/slider.scss +0 -514
@@ -1,127 +1,121 @@
1
1
  @use 'sass:map';
2
- @use '../../core/style/variables';
3
- @use '../../core/style/vendor-prefixes';
4
- @use '../../core/theming/theming';
5
-
6
- @mixin color($config-or-theme) {
7
- $config: theming.get-color-config($config-or-theme);
8
- $primary: map.get($config, primary);
9
- $foreground: map.get($config, foreground);
10
-
11
- $non-resizable-hover-divider: theming.get-color-from-palette($foreground, divider);
12
- $resizable-hover-divider: theming.get-color-from-palette($primary, 200);
13
- $resizable-active-divider: theming.get-color-from-palette($primary, 500);
14
-
15
- // Required for resizing to work properly.
16
- .mat-column-resize-table.cdk-column-resize-with-resized-column {
17
- table-layout: fixed;
18
- }
2
+ @use '@angular/material' as mat;
3
+ @use '../../core/tokens/token-utils';
4
+ @use '../../core/tokens/m2/mtx/grid' as tokens-mtx-grid;
19
5
 
20
- .mat-column-resize-flex {
21
- .mat-mdc-header-cell,
22
- .mat-mdc-cell {
23
- box-sizing: border-box;
24
- min-width: 32px;
25
- }
26
- }
6
+ $_tokens: tokens-mtx-grid.$prefix, tokens-mtx-grid.get-token-slots();
27
7
 
28
- .mat-mdc-header-cell {
29
- position: relative;
30
- }
8
+ // Required for resizing to work properly.
9
+ .mat-column-resize-table.cdk-column-resize-with-resized-column {
10
+ table-layout: fixed;
11
+ }
31
12
 
32
- .mat-resizable {
13
+ .mat-column-resize-flex {
14
+ .mat-mdc-header-cell,
15
+ .mat-mdc-cell {
33
16
  box-sizing: border-box;
17
+ min-width: 32px;
34
18
  }
19
+ }
20
+
21
+ .mat-mdc-header-cell {
22
+ position: relative;
23
+ }
35
24
 
25
+ .mat-resizable {
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ .mat-mdc-header-cell:not(.mat-resizable)::after,
30
+ .mat-resizable-handle {
31
+ position: absolute;
32
+ bottom: 0;
33
+ top: 0;
34
+ right: 0;
35
+ width: 1px;
36
+ background: transparent;
37
+ transition: background mat.$private-swift-ease-in-duration mat.$private-swift-ease-in-timing-function;
38
+ }
39
+
40
+ .mat-mdc-header-cell:not(.mat-resizable)::after {
41
+ content: '';
42
+ }
43
+
44
+ [dir='rtl'] {
36
45
  .mat-mdc-header-cell:not(.mat-resizable)::after,
37
46
  .mat-resizable-handle {
38
- position: absolute;
39
- bottom: 0;
40
- top: 0;
41
- right: 0;
42
- width: 1px;
43
- background: transparent;
44
- transition:
45
- background variables.$swift-ease-in-duration
46
- variables.$swift-ease-in-timing-function;
47
+ left: 0;
48
+ right: auto;
47
49
  }
48
50
 
49
- .mat-mdc-header-cell:not(.mat-resizable)::after {
50
- content: '';
51
+ .mat-mdc-header-row.cdk-column-resize-hover-or-active {
52
+ .mat-header-cell,
53
+ .mat-mdc-header-cell {
54
+ border-left: none;
55
+ }
51
56
  }
57
+ }
52
58
 
53
- [dir='rtl'] .mat-mdc-header-cell:not(.mat-resizable)::after,
54
- [dir='rtl'] .mat-resizable-handle {
55
- left: 0;
56
- right: auto;
59
+ .mat-mdc-header-row.cdk-column-resize-hover-or-active {
60
+ .mat-mdc-header-cell {
61
+ border-right: none;
57
62
  }
58
63
 
59
- .mat-mdc-header-row.cdk-column-resize-hover-or-active {
64
+ @include token-utils.use-tokens($_tokens...) {
60
65
  .mat-mdc-header-cell:not(.mat-resizable)::after {
61
- background: $non-resizable-hover-divider;
66
+ @include token-utils.create-token-slot(background-color, resizable-handle-disabled-background-color);
62
67
  }
63
68
 
64
69
  .mat-resizable-handle {
65
- background: $resizable-hover-divider;
70
+ @include token-utils.create-token-slot(background-color, resizable-handle-hover-background-color);
66
71
  }
67
72
  }
73
+ }
68
74
 
69
- .mat-resizable.cdk-resizable-overlay-thumb-active > .mat-resizable-handle {
70
- opacity: 0;
71
- transition: none;
72
- }
75
+ .mat-resizable.cdk-resizable-overlay-thumb-active>.mat-resizable-handle {
76
+ opacity: 0;
77
+ transition: none;
78
+ }
73
79
 
74
- .mat-resizable-handle:focus,
75
- .mat-mdc-header-row.cdk-column-resize-hover-or-active .mat-resizable-handle:focus {
76
- background: $resizable-active-divider;
77
- outline: none;
78
- }
80
+ .mat-resizable-handle:focus,
81
+ .mat-mdc-header-row.cdk-column-resize-hover-or-active .mat-resizable-handle:focus {
82
+ outline: none;
79
83
 
80
- .mat-column-resize-overlay-thumb {
81
- background: transparent;
82
- cursor: col-resize;
83
- height: 100%;
84
- transition:
85
- background variables.$swift-ease-in-duration
86
- variables.$swift-ease-in-timing-function;
87
- width: 100%;
88
- @include vendor-prefixes.user-select(none);
89
-
90
- &:active {
91
- background:
92
- linear-gradient(
93
- 90deg,
94
- transparent,
95
- transparent 7px,
96
- $resizable-active-divider,
97
- $resizable-active-divider 1px,
98
- transparent 8px,
99
- transparent
100
- );
101
- will-change: transform;
102
- }
84
+ @include token-utils.use-tokens($_tokens...) {
85
+ @include token-utils.create-token-slot(background-color, resizable-handle-active-background-color);
103
86
  }
104
87
  }
105
88
 
106
- @mixin typography($config-or-theme) {}
89
+ .mat-column-resize-overlay-thumb {
90
+ background: transparent;
91
+ cursor: col-resize;
92
+ width: 100%;
93
+ height: 100%;
94
+ transition: background mat.$private-swift-ease-in-duration mat.$private-swift-ease-in-timing-function;
107
95
 
108
- @mixin density($config-or-theme) {}
96
+ @include mat.private-user-select(none);
109
97
 
110
- @mixin theme($theme-or-color-config) {
111
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
112
- @include theming.private-check-duplicate-theme-styles($theme, 'mat-column-resize') {
113
- $color: theming.get-color-config($theme);
114
- $density: theming.get-density-config($theme);
115
- $typography: theming.get-typography-config($theme);
98
+ &:active {
99
+ will-change: transform;
116
100
 
117
- @if $color != null {
118
- @include color($color);
119
- }
120
- @if $density != null {
121
- @include density($density);
122
- }
123
- @if $typography != null {
124
- @include typography($typography);
101
+ @include token-utils.use-tokens($_tokens...) {
102
+ $background-color: token-utils.get-token-variable(resizable-handle-active-background-color);
103
+
104
+ background: linear-gradient(90deg,
105
+ transparent, transparent 7px,
106
+ var($background-color) 7px, var($background-color) 9px,
107
+ transparent 9px, transparent);
108
+
109
+ .mat-column-resize-overlay-thumb-top {
110
+ background: linear-gradient(90deg,
111
+ transparent, transparent 4px,
112
+ var($background-color) 4px, var($background-color) 12px,
113
+ transparent 12px, transparent);
114
+ }
125
115
  }
126
116
  }
127
117
  }
118
+
119
+ .mat-column-resize-overlay-thumb-top {
120
+ width: 100%;
121
+ }
@@ -1,10 +1,3 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
1
  import { Provider } from '@angular/core';
9
2
  import { ColumnResize } from '@ng-matero/extensions/column-resize';
10
3
  export declare const TABLE_PROVIDERS: Provider[];
@@ -25,6 +25,7 @@ export declare class MatColumnResizeOverlayHandle extends ResizeOverlayHandle {
25
25
  protected readonly resizeRef: ResizeRef;
26
26
  protected readonly styleScheduler: _CoalescedStyleScheduler;
27
27
  protected readonly document: Document;
28
+ topElement: ElementRef<HTMLElement>;
28
29
  constructor(columnDef: CdkColumnDef, columnResize: ColumnResize, directionality: Directionality, elementRef: ElementRef, eventDispatcher: HeaderRowEventDispatcher, ngZone: NgZone, resizeNotifier: ColumnResizeNotifierSource, resizeRef: ResizeRef, styleScheduler: _CoalescedStyleScheduler, document: any);
29
30
  protected updateResizeActive(active: boolean): void;
30
31
  static ɵfac: i0.ɵɵFactoryDeclaration<MatColumnResizeOverlayHandle, never>;
@@ -14,9 +14,9 @@ export { TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER };
14
14
  * Overrides CdkFlexTableResizeStrategy to match mat-column elements.
15
15
  */
16
16
  export declare class MatFlexTableResizeStrategy extends CdkFlexTableResizeStrategy {
17
- constructor(columnResize: ColumnResize, styleScheduler: _CoalescedStyleScheduler, table: CdkTable<unknown>, document: any);
17
+ constructor(columnResize: ColumnResize, styleScheduler: _CoalescedStyleScheduler, table: CdkTable<unknown>, document: any, nonce?: string | null);
18
18
  protected getColumnCssClass(cssFriendlyColumnName: string): string;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<MatFlexTableResizeStrategy, never>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatFlexTableResizeStrategy, [null, null, null, null, { optional: true; }]>;
20
20
  static ɵprov: i0.ɵɵInjectableDeclaration<MatFlexTableResizeStrategy>;
21
21
  }
22
22
  export declare const FLEX_RESIZE_STRATEGY_PROVIDER: Provider;
@@ -20,11 +20,11 @@ import * as i18 from "@angular/material/select";
20
20
  import * as i19 from "@angular/material/form-field";
21
21
  import * as i20 from "@angular/material/menu";
22
22
  import * as i21 from "@angular/cdk/drag-drop";
23
- import * as i22 from "@ng-matero/extensions/dialog";
24
- import * as i23 from "@ng-matero/extensions/core";
25
- import * as i24 from "./column-resize/column-resize-module";
23
+ import * as i22 from "./column-resize/column-resize-module";
24
+ import * as i23 from "@ng-matero/extensions/dialog";
25
+ import * as i24 from "@ng-matero/extensions/core";
26
26
  export declare class MtxGridModule {
27
27
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridModule, never>;
28
- static ɵmod: i0.ɵɵNgModuleDeclaration<MtxGridModule, [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionsPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionBadgePipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.MatTableModule, typeof i9.MatSortModule, typeof i10.MatPaginatorModule, typeof i11.MatCheckboxModule, typeof i12.MatButtonModule, typeof i13.MatProgressBarModule, typeof i14.MatChipsModule, typeof i15.MatTooltipModule, typeof i16.MatBadgeModule, typeof i17.MatIconModule, typeof i18.MatSelectModule, typeof i19.MatFormFieldModule, typeof i20.MatMenuModule, typeof i21.DragDropModule, typeof i22.MtxDialogModule, typeof i23.MtxPipesModule, typeof i24.MatColumnResizeModule], [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i24.MatColumnResizeModule, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe]>;
28
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxGridModule, [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionsPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionBadgePipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.MatTableModule, typeof i9.MatSortModule, typeof i10.MatPaginatorModule, typeof i11.MatCheckboxModule, typeof i12.MatButtonModule, typeof i13.MatProgressBarModule, typeof i14.MatChipsModule, typeof i15.MatTooltipModule, typeof i16.MatBadgeModule, typeof i17.MatIconModule, typeof i18.MatSelectModule, typeof i19.MatFormFieldModule, typeof i20.MatMenuModule, typeof i21.DragDropModule, typeof i22.MatColumnResizeModule, typeof i23.MtxDialogModule, typeof i24.MtxPipesModule], [typeof i22.MatColumnResizeModule, typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionsPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionBadgePipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe]>;
29
29
  static ɵinj: i0.ɵɵInjectorDeclaration<MtxGridModule>;
30
30
  }
@@ -16,12 +16,6 @@ export declare class MtxGridUtils {
16
16
  * @returns
17
17
  */
18
18
  getColData(data: any[], colDef: MtxGridColumn): any[];
19
- /**
20
- * Remove white spaces in a string and convert string to array
21
- * @param str
22
- * @returns
23
- */
24
- str2arr(str: string): string[];
25
19
  /**
26
20
  * Whether the value is empty (`null`, `undefined`, `''`, `[]`)
27
21
  * @param value
package/grid/grid.d.ts CHANGED
@@ -86,6 +86,8 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
86
86
  rowStriped: boolean;
87
87
  /** Event emitted when the user clicks the row. */
88
88
  rowClick: EventEmitter<any>;
89
+ /** Event emitted when the user attempts to open a context menu. */
90
+ rowContextMenu: EventEmitter<any>;
89
91
  expansionRowStates: any[];
90
92
  /** Whether the row is expandable. */
91
93
  expandable: boolean;
@@ -98,8 +100,6 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
98
100
  multiSelectable: boolean;
99
101
  /** Whether the user can select multiple rows with click. */
100
102
  multiSelectionWithClick: boolean;
101
- /** The selected row items. */
102
- rowSelected: any[];
103
103
  /** Whether the row is selectable. */
104
104
  rowSelectable: boolean;
105
105
  /** Whether to hide the row selection checkbox. */
@@ -110,13 +110,15 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
110
110
  rowSelectionFormatter: MtxGridRowSelectionFormatter;
111
111
  /** The formatter to set the row's class. */
112
112
  rowClassFormatter?: MtxGridRowClassFormatter;
113
+ /** The selected row items. */
114
+ rowSelected: any[];
113
115
  /** Event emitted when the row is selected. */
114
- rowSelectionChange: EventEmitter<any[]>;
116
+ rowSelectedChange: EventEmitter<any[]>;
115
117
  cellSelection: any[];
116
118
  /** Whether the cell is selectable. */
117
119
  cellSelectable: boolean;
118
120
  /** Event emitted when the cell is selected. */
119
- cellSelectionChange: EventEmitter<any[]>;
121
+ cellSelectedChange: EventEmitter<any[]>;
120
122
  private _selectedCell?;
121
123
  /** Whether to show the toolbar. */
122
124
  showToolbar: boolean;
@@ -221,8 +223,9 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
221
223
  _onPage(e: PageEvent): void;
222
224
  scrollTop(value?: number): number | void;
223
225
  scrollLeft(value?: number): number | void;
226
+ _contextmenu(event: MouseEvent, rowData: Record<string, any>, index: number): void;
224
227
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGrid, [null, null, { optional: true; }]>;
225
- static ɵcmp: i0.ɵɵComponentDeclaration<MtxGrid, "mtx-grid", ["mtxGrid"], { "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "length": { "alias": "length"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "columnResizable": { "alias": "columnResizable"; "required": false; }; "emptyValuePlaceholder": { "alias": "emptyValuePlaceholder"; "required": false; }; "pageOnFront": { "alias": "pageOnFront"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "pageDisabled": { "alias": "pageDisabled"; "required": false; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; }; "paginationTemplate": { "alias": "paginationTemplate"; "required": false; }; "sortOnFront": { "alias": "sortOnFront"; "required": false; }; "sortActive": { "alias": "sortActive"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortDisableClear": { "alias": "sortDisableClear"; "required": false; }; "sortDisabled": { "alias": "sortDisabled"; "required": false; }; "sortStart": { "alias": "sortStart"; "required": false; }; "rowHover": { "alias": "rowHover"; "required": false; }; "rowStriped": { "alias": "rowStriped"; "required": false; }; "expandable": { "alias": "expandable"; "required": false; }; "expansionTemplate": { "alias": "expansionTemplate"; "required": false; }; "multiSelectable": { "alias": "multiSelectable"; "required": false; }; "multiSelectionWithClick": { "alias": "multiSelectionWithClick"; "required": false; }; "rowSelected": { "alias": "rowSelected"; "required": false; }; "rowSelectable": { "alias": "rowSelectable"; "required": false; }; "hideRowSelectionCheckbox": { "alias": "hideRowSelectionCheckbox"; "required": false; }; "disableRowClickSelection": { "alias": "disableRowClickSelection"; "required": false; }; "rowSelectionFormatter": { "alias": "rowSelectionFormatter"; "required": false; }; "rowClassFormatter": { "alias": "rowClassFormatter"; "required": false; }; "cellSelectable": { "alias": "cellSelectable"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarTitle": { "alias": "toolbarTitle"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "columnHideable": { "alias": "columnHideable"; "required": false; }; "columnHideableChecked": { "alias": "columnHideableChecked"; "required": false; }; "columnSortable": { "alias": "columnSortable"; "required": false; }; "columnPinnable": { "alias": "columnPinnable"; "required": false; }; "columnPinOptions": { "alias": "columnPinOptions"; "required": false; }; "showColumnMenuButton": { "alias": "showColumnMenuButton"; "required": false; }; "columnMenuButtonText": { "alias": "columnMenuButtonText"; "required": false; }; "columnMenuButtonType": { "alias": "columnMenuButtonType"; "required": false; }; "columnMenuButtonColor": { "alias": "columnMenuButtonColor"; "required": false; }; "columnMenuButtonClass": { "alias": "columnMenuButtonClass"; "required": false; }; "columnMenuButtonIcon": { "alias": "columnMenuButtonIcon"; "required": false; }; "showColumnMenuHeader": { "alias": "showColumnMenuHeader"; "required": false; }; "columnMenuHeaderText": { "alias": "columnMenuHeaderText"; "required": false; }; "columnMenuHeaderTemplate": { "alias": "columnMenuHeaderTemplate"; "required": false; }; "showColumnMenuFooter": { "alias": "showColumnMenuFooter"; "required": false; }; "columnMenuFooterText": { "alias": "columnMenuFooterText"; "required": false; }; "columnMenuFooterTemplate": { "alias": "columnMenuFooterTemplate"; "required": false; }; "noResultText": { "alias": "noResultText"; "required": false; }; "noResultTemplate": { "alias": "noResultTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "headerExtraTemplate": { "alias": "headerExtraTemplate"; "required": false; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; }; "useContentRowTemplate": { "alias": "useContentRowTemplate"; "required": false; }; "useContentHeaderRowTemplate": { "alias": "useContentHeaderRowTemplate"; "required": false; }; "useContentFooterRowTemplate": { "alias": "useContentFooterRowTemplate"; "required": false; }; "showSummary": { "alias": "showSummary"; "required": false; }; "summaryTemplate": { "alias": "summaryTemplate"; "required": false; }; "showSidebar": { "alias": "showSidebar"; "required": false; }; "sidebarTemplate": { "alias": "sidebarTemplate"; "required": false; }; "showStatusbar": { "alias": "showStatusbar"; "required": false; }; "statusbarTemplate": { "alias": "statusbarTemplate"; "required": false; }; }, { "page": "page"; "sortChange": "sortChange"; "rowClick": "rowClick"; "expansionChange": "expansionChange"; "rowSelectionChange": "rowSelectionChange"; "cellSelectionChange": "cellSelectionChange"; "columnChange": "columnChange"; }, ["rowDefs", "headerRowDefs", "footerRowDefs"], never, false, never>;
228
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxGrid, "mtx-grid", ["mtxGrid"], { "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "length": { "alias": "length"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "columnResizable": { "alias": "columnResizable"; "required": false; }; "emptyValuePlaceholder": { "alias": "emptyValuePlaceholder"; "required": false; }; "pageOnFront": { "alias": "pageOnFront"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "pageDisabled": { "alias": "pageDisabled"; "required": false; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; }; "paginationTemplate": { "alias": "paginationTemplate"; "required": false; }; "sortOnFront": { "alias": "sortOnFront"; "required": false; }; "sortActive": { "alias": "sortActive"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortDisableClear": { "alias": "sortDisableClear"; "required": false; }; "sortDisabled": { "alias": "sortDisabled"; "required": false; }; "sortStart": { "alias": "sortStart"; "required": false; }; "rowHover": { "alias": "rowHover"; "required": false; }; "rowStriped": { "alias": "rowStriped"; "required": false; }; "expandable": { "alias": "expandable"; "required": false; }; "expansionTemplate": { "alias": "expansionTemplate"; "required": false; }; "multiSelectable": { "alias": "multiSelectable"; "required": false; }; "multiSelectionWithClick": { "alias": "multiSelectionWithClick"; "required": false; }; "rowSelectable": { "alias": "rowSelectable"; "required": false; }; "hideRowSelectionCheckbox": { "alias": "hideRowSelectionCheckbox"; "required": false; }; "disableRowClickSelection": { "alias": "disableRowClickSelection"; "required": false; }; "rowSelectionFormatter": { "alias": "rowSelectionFormatter"; "required": false; }; "rowClassFormatter": { "alias": "rowClassFormatter"; "required": false; }; "rowSelected": { "alias": "rowSelected"; "required": false; }; "cellSelectable": { "alias": "cellSelectable"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarTitle": { "alias": "toolbarTitle"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "columnHideable": { "alias": "columnHideable"; "required": false; }; "columnHideableChecked": { "alias": "columnHideableChecked"; "required": false; }; "columnSortable": { "alias": "columnSortable"; "required": false; }; "columnPinnable": { "alias": "columnPinnable"; "required": false; }; "columnPinOptions": { "alias": "columnPinOptions"; "required": false; }; "showColumnMenuButton": { "alias": "showColumnMenuButton"; "required": false; }; "columnMenuButtonText": { "alias": "columnMenuButtonText"; "required": false; }; "columnMenuButtonType": { "alias": "columnMenuButtonType"; "required": false; }; "columnMenuButtonColor": { "alias": "columnMenuButtonColor"; "required": false; }; "columnMenuButtonClass": { "alias": "columnMenuButtonClass"; "required": false; }; "columnMenuButtonIcon": { "alias": "columnMenuButtonIcon"; "required": false; }; "showColumnMenuHeader": { "alias": "showColumnMenuHeader"; "required": false; }; "columnMenuHeaderText": { "alias": "columnMenuHeaderText"; "required": false; }; "columnMenuHeaderTemplate": { "alias": "columnMenuHeaderTemplate"; "required": false; }; "showColumnMenuFooter": { "alias": "showColumnMenuFooter"; "required": false; }; "columnMenuFooterText": { "alias": "columnMenuFooterText"; "required": false; }; "columnMenuFooterTemplate": { "alias": "columnMenuFooterTemplate"; "required": false; }; "noResultText": { "alias": "noResultText"; "required": false; }; "noResultTemplate": { "alias": "noResultTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "headerExtraTemplate": { "alias": "headerExtraTemplate"; "required": false; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; }; "useContentRowTemplate": { "alias": "useContentRowTemplate"; "required": false; }; "useContentHeaderRowTemplate": { "alias": "useContentHeaderRowTemplate"; "required": false; }; "useContentFooterRowTemplate": { "alias": "useContentFooterRowTemplate"; "required": false; }; "showSummary": { "alias": "showSummary"; "required": false; }; "summaryTemplate": { "alias": "summaryTemplate"; "required": false; }; "showSidebar": { "alias": "showSidebar"; "required": false; }; "sidebarTemplate": { "alias": "sidebarTemplate"; "required": false; }; "showStatusbar": { "alias": "showStatusbar"; "required": false; }; "statusbarTemplate": { "alias": "statusbarTemplate"; "required": false; }; }, { "page": "page"; "sortChange": "sortChange"; "rowClick": "rowClick"; "rowContextMenu": "rowContextMenu"; "expansionChange": "expansionChange"; "rowSelectedChange": "rowSelectedChange"; "cellSelectedChange": "cellSelectedChange"; "columnChange": "columnChange"; }, ["rowDefs", "headerRowDefs", "footerRowDefs"], never, false, never>;
226
229
  }
227
230
  export declare class MtxGridSelectableCell {
228
231
  private _grid;
@@ -232,12 +235,12 @@ export declare class MtxGridSelectableCell {
232
235
  shiftKeyPressed: boolean;
233
236
  get selected(): boolean;
234
237
  set mtxSelectableRowData(value: any);
235
- cellSelectionChange: EventEmitter<MtxGridSelectableCell>;
238
+ cellSelectedChange: EventEmitter<MtxGridSelectableCell>;
236
239
  constructor(_grid: MtxGrid);
237
240
  onClick(event: MouseEvent): void;
238
241
  select(): void;
239
242
  deselect(): void;
240
243
  toggle(): void;
241
244
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridSelectableCell, never>;
242
- static ɵdir: i0.ɵɵDirectiveDeclaration<MtxGridSelectableCell, "[mtx-grid-selectable-cell]", never, { "mtxSelectableRowData": { "alias": "mtxSelectableRowData"; "required": false; }; }, { "cellSelectionChange": "cellSelectionChange"; }, never, never, false, never>;
245
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MtxGridSelectableCell, "[mtx-grid-selectable-cell]", never, { "mtxSelectableRowData": { "alias": "mtxSelectableRowData"; "required": false; }; }, { "cellSelectedChange": "cellSelectedChange"; }, never, never, false, never>;
243
246
  }
package/grid/grid.scss CHANGED
@@ -1,9 +1,41 @@
1
+ @use '../core/tokens/token-utils';
2
+ @use '../core/tokens/m2/mtx/grid' as tokens-mtx-grid;
3
+
4
+ $_tokens: tokens-mtx-grid.$prefix, tokens-mtx-grid.get-token-slots();
5
+
1
6
  .mtx-grid {
2
7
  position: relative;
3
8
  display: flex;
4
9
  flex-direction: column;
5
10
  width: 100%;
6
11
 
12
+ @include token-utils.use-tokens($_tokens...) {
13
+ $border-color: token-utils.get-token-variable(outline-color);
14
+
15
+ border: 1px solid var($border-color);
16
+
17
+ .mat-mdc-table {
18
+ &.mat-table-striped .mat-row-odd {
19
+ @include token-utils.create-token-slot(background-color, table-row-striped-background-color);
20
+ }
21
+
22
+ &.mat-table-hover .mat-mdc-row:hover {
23
+ @include token-utils.create-token-slot(background-color, table-row-hover-background-color);
24
+ }
25
+
26
+ .mat-mdc-row.selected,
27
+ .mat-mdc-row.mat-row-odd.selected {
28
+ @include token-utils.create-token-slot(background-color, table-row-selected-background-color);
29
+ }
30
+
31
+ .mat-mdc-cell.selected {
32
+ $shadow: token-utils.get-token-variable(table-cell-selected-outline-color);
33
+
34
+ box-shadow: inset 0 0 0 1px var($shadow);
35
+ }
36
+ }
37
+ }
38
+
7
39
  .mat-table-container {
8
40
  overflow: auto;
9
41
 
@@ -26,24 +58,20 @@
26
58
  }
27
59
 
28
60
  .mat-table-sticky-left {
29
- border-right-width: 1px;
30
- border-right-style: solid;
61
+ border-right: 1px solid var(--mat-table-row-item-outline-color);
31
62
 
32
63
  [dir='rtl'] & {
33
64
  border-right-width: 0;
34
- border-left-width: 1px;
35
- border-left-style: solid;
65
+ border-left: 1px solid var(--mat-table-row-item-outline-color);
36
66
  }
37
67
  }
38
68
 
39
69
  .mat-table-sticky-right {
40
- border-left-width: 1px;
41
- border-left-style: solid;
70
+ border-left: 1px solid var(--mat-table-row-item-outline-color);
42
71
 
43
72
  [dir='rtl'] & {
44
73
  border-left-width: 0;
45
- border-right-width: 1px;
46
- border-right-style: solid;
74
+ border-right: 1px solid var(--mat-table-row-item-outline-color);
47
75
  }
48
76
  }
49
77
 
@@ -82,6 +110,14 @@
82
110
  }
83
111
  }
84
112
 
113
+ .mat-mdc-footer-cell {
114
+ border-top: 1px solid var(--mat-table-row-item-outline-color);
115
+
116
+ @include token-utils.use-tokens($_tokens...) {
117
+ @include token-utils.create-token-slot(background-color, table-footer-background-color);
118
+ }
119
+ }
120
+
85
121
  .mat-mdc-row {
86
122
  &.mtx-grid-expansion {
87
123
  height: 0;
@@ -111,6 +147,14 @@
111
147
  align-items: center;
112
148
  }
113
149
 
150
+ .mat-mdc-paginator {
151
+ @include token-utils.use-tokens($_tokens...) {
152
+ $border-color: token-utils.get-token-variable(outline-color);
153
+
154
+ border-top: 1px solid var($border-color);
155
+ }
156
+ }
157
+
114
158
  .mat-paginator-hidden {
115
159
  display: none;
116
160
  }
@@ -130,6 +174,12 @@
130
174
  min-height: 48px;
131
175
  padding: 8px;
132
176
  box-sizing: border-box;
177
+
178
+ @include token-utils.use-tokens($_tokens...) {
179
+ $border-color: token-utils.get-token-variable(outline-color);
180
+
181
+ border-bottom: 1px solid var($border-color);
182
+ }
133
183
  }
134
184
 
135
185
  .mtx-grid-layout {
@@ -145,13 +195,16 @@
145
195
 
146
196
  .mtx-grid-sidebar {
147
197
  max-width: 50%;
148
- border-left-width: 1px;
149
- border-left-style: solid;
150
198
 
151
- [dir='rtl'] & {
152
- border-left-width: 0;
153
- border-right-width: 1px;
154
- border-right-style: solid;
199
+ @include token-utils.use-tokens($_tokens...) {
200
+ $border-color: token-utils.get-token-variable(outline-color);
201
+
202
+ border-left: 1px solid var($border-color);
203
+
204
+ [dir='rtl'] & {
205
+ border-left-width: 0;
206
+ border-right: 1px solid var($border-color);
207
+ }
155
208
  }
156
209
  }
157
210
 
@@ -165,6 +218,12 @@
165
218
  align-items: center;
166
219
  min-height: 56px;
167
220
  padding: 8px;
221
+
222
+ @include token-utils.use-tokens($_tokens...) {
223
+ $border-color: token-utils.get-token-variable(outline-color);
224
+
225
+ border-top: 1px solid var($border-color);
226
+ }
168
227
  }
169
228
 
170
229
  .mtx-grid-no-result {
@@ -215,7 +274,7 @@
215
274
  transform: rotate(90deg);
216
275
  }
217
276
 
218
- + mtx-grid-cell {
277
+ +mtx-grid-cell {
219
278
  vertical-align: middle;
220
279
  }
221
280
 
@@ -230,3 +289,32 @@
230
289
  height: 20px;
231
290
  font-size: 20px;
232
291
  }
292
+
293
+ .mtx-grid-column-menu-item {
294
+ @include token-utils.use-tokens($_tokens...) {
295
+ @include token-utils.create-token-slot(color, column-menu-text-color);
296
+ }
297
+ }
298
+
299
+ .mtx-grid-column-menu-header,
300
+ .mtx-grid-column-menu-footer {
301
+ @include token-utils.use-tokens($_tokens...) {
302
+ @include token-utils.create-token-slot(color, column-menu-text-color);
303
+ }
304
+ }
305
+
306
+ .mtx-grid-column-menu-header {
307
+ @include token-utils.use-tokens($_tokens...) {
308
+ $border-color: token-utils.get-token-variable(column-menu-divider-color);
309
+
310
+ border-bottom: 1px solid var($border-color);
311
+ }
312
+ }
313
+
314
+ .mtx-grid-column-menu-footer {
315
+ @include token-utils.use-tokens($_tokens...) {
316
+ $border-color: token-utils.get-token-variable(column-menu-divider-color);
317
+
318
+ border-top: 1px solid var($border-color);
319
+ }
320
+ }
@@ -1,14 +1,14 @@
1
- @use 'sass:map';
2
1
  @use '../core/theming/theming';
2
+ @use '../core/style/sass-utils';
3
+ @use '../core/tokens/token-utils';
4
+ @use '../core/tokens/m2/mtx/loader' as tokens-mtx-loader;
3
5
 
4
6
  @mixin color($config-or-theme) {
5
7
  $config: theming.get-color-config($config-or-theme);
6
- $is-dark-theme: map.get($config, is-dark);
7
- $foreground: map.get($config, foreground);
8
- $background: map.get($config, background);
9
8
 
10
- .mtx-loader-backdrop {
11
- background-color: theming.get-color-from-palette($background, background, .75);
9
+ @include sass-utils.current-selector-or-root() {
10
+ @include token-utils.create-token-values(tokens-mtx-loader.$prefix,
11
+ tokens-mtx-loader.get-color-tokens($config));
12
12
  }
13
13
  }
14
14
 
@@ -1,3 +1,6 @@
1
+ @use '../core/tokens/token-utils';
2
+ @use '../core/tokens/m2/mtx/loader' as tokens-mtx-loader;
3
+
1
4
  .mtx-loader {
2
5
  position: relative;
3
6
  display: block;
@@ -37,4 +40,8 @@
37
40
  width: 100%;
38
41
  height: 100%;
39
42
  content: '';
43
+
44
+ @include token-utils.use-tokens(tokens-mtx-loader.$prefix, tokens-mtx-loader.get-token-slots()) {
45
+ @include token-utils.create-token-slot(background-color, backdrop-background-color);
46
+ }
40
47
  }