mapa-library-ui 1.7.3 → 2.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.
Files changed (44) hide show
  1. package/README.md +2 -3
  2. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +42 -35
  3. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  4. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +42 -35
  5. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
  6. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +648 -125
  7. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
  8. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +42 -35
  9. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
  10. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +42 -35
  11. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  12. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +42 -35
  13. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
  14. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +569 -322
  15. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
  16. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +42 -35
  17. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
  18. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +42 -35
  19. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
  20. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +42 -35
  21. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
  22. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +522 -581
  23. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
  24. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +42 -35
  25. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
  26. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +42 -35
  27. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
  28. package/fesm2022/mapa-library-ui-src-lib-core-utils.mjs +1 -4
  29. package/fesm2022/mapa-library-ui-src-lib-core-utils.mjs.map +1 -1
  30. package/fesm2022/mapa-library-ui.mjs +1272 -1018
  31. package/fesm2022/mapa-library-ui.mjs.map +1 -1
  32. package/index.d.ts +350 -187
  33. package/mapa-library-ui-2.0.0.tgz +0 -0
  34. package/package.json +3 -10
  35. package/src/lib/components/datepicker/index.d.ts +165 -27
  36. package/src/lib/components/group-report/index.d.ts +6 -1
  37. package/src/lib/components/menu/index.d.ts +3 -1
  38. package/src/lib/components/report-item/index.d.ts +3 -1
  39. package/src/lib/components/table/index.d.ts +153 -100
  40. package/src/lib/core/utils/index.d.ts +1 -2
  41. package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +0 -733
  42. package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +0 -1
  43. package/mapa-library-ui-1.7.3.tgz +0 -0
  44. package/src/lib/components/datepicker-range/index.d.ts +0 -207
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapa-library-ui",
3
- "version": "1.7.3",
3
+ "version": "2.0.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^20.3.0",
6
6
  "@angular/cdk": "^20.2.0",
@@ -11,10 +11,11 @@
11
11
  "@angular/material": "^20.2.0",
12
12
  "@angular/router": "^20.3.0",
13
13
  "apexcharts": "^5.10.3",
14
- "mapa-frontend-i18n": "^2.0.0",
14
+ "mapa-frontend-i18n": "^2.1.0",
15
15
  "ng-apexcharts": "^2.3.0",
16
16
  "ngx-mask": "^20.0.3",
17
17
  "ngx-mat-select-search": "^8.0.4",
18
+ "ngxsmk-datepicker": "^3.0.0",
18
19
  "rxjs": "^7.8.2",
19
20
  "ts-md5": "^1.3.1"
20
21
  },
@@ -59,10 +60,6 @@
59
60
  "types": "./src/lib/components/datepicker/index.d.ts",
60
61
  "default": "./fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs"
61
62
  },
62
- "./datepicker-range": {
63
- "types": "./src/lib/components/datepicker-range/index.d.ts",
64
- "default": "./fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs"
65
- },
66
63
  "./dialog": {
67
64
  "types": "./src/lib/components/dialog/index.d.ts",
68
65
  "default": "./fesm2022/mapa-library-ui-src-lib-components-dialog.mjs"
@@ -194,10 +191,6 @@
194
191
  "types": "./src/lib/components/datepicker/index.d.ts",
195
192
  "default": "./fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs"
196
193
  },
197
- "./src/lib/components/datepicker-range": {
198
- "types": "./src/lib/components/datepicker-range/index.d.ts",
199
- "default": "./fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs"
200
- },
201
194
  "./src/lib/components/dialog": {
202
195
  "types": "./src/lib/components/dialog/index.d.ts",
203
196
  "default": "./fesm2022/mapa-library-ui-src-lib-components-dialog.mjs"
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';
2
+ import { EventEmitter, OnInit } from '@angular/core';
3
3
  import { FormControl, FormGroup } from '@angular/forms';
4
- import { MatDatepicker } from '@angular/material/datepicker';
4
+ import { ConnectedPosition } from '@angular/cdk/overlay';
5
+ import { DatepickerValue } from 'ngxsmk-datepicker';
5
6
 
6
7
  interface ElementTreeNode {
7
8
  key: string;
@@ -119,42 +120,179 @@ declare class ElementBase {
119
120
  });
120
121
  }
121
122
 
123
+ type DatepickerMode = 'single' | 'range' | 'multiple';
124
+ /**
125
+ * Atalho de período exibido no painel do modo `range`.
126
+ *
127
+ * Use `daysBack` para uma faixa relativa a hoje (resolvida por
128
+ * `getRelativeDateRange`) ou `startDate`/`endDate` para uma faixa fixa. Quando
129
+ * ambos são informados, a faixa fixa prevalece.
130
+ */
131
+ interface DatepickerPreset {
132
+ label: string;
133
+ daysBack?: number;
134
+ startDate?: Date;
135
+ endDate?: Date;
136
+ }
137
+ type ElementBaseOptions = NonNullable<ConstructorParameters<typeof ElementBase>[0]>;
138
+ interface DatepickerOptions extends ElementBaseOptions {
139
+ mode?: DatepickerMode;
140
+ disabledDates?: (string | Date)[];
141
+ isInvalidDate?: (date: Date) => boolean;
142
+ presets?: DatepickerPreset[];
143
+ presetsLabel?: string;
144
+ calendars?: 1 | 2 | 3;
145
+ weekStart?: number | null;
146
+ closeOnSelect?: boolean;
147
+ }
122
148
  declare class Datepicker extends ElementBase {
123
149
  controlType: string;
150
+ mode: DatepickerMode;
151
+ disabledDates?: (string | Date)[];
152
+ isInvalidDate?: (date: Date) => boolean;
153
+ presets?: DatepickerPreset[];
154
+ /** Rótulo do gatilho de presets enquanto nenhum atalho está ativo. */
155
+ presetsLabel?: string;
156
+ /** `undefined` resolve para 2 no modo `range` e 1 nos demais. */
157
+ calendars?: 1 | 2 | 3;
158
+ weekStart: number | null;
159
+ closeOnSelect: boolean;
160
+ constructor(options?: DatepickerOptions);
161
+ }
162
+ /**
163
+ * @deprecated Use `Datepicker` with `mode: "range"`.
164
+ * Kept as a compatibility bridge for 2.x consumers.
165
+ */
166
+ declare class DatepickerRange extends Datepicker {
167
+ controlType: string;
168
+ constructor(options?: DatepickerOptions);
124
169
  }
125
170
 
126
- declare const MAPA_DATEPICKER_FORMATS: {
127
- parse: {
128
- dateInput: string;
129
- };
130
- display: {
131
- dateInput: string;
132
- monthYearLabel: string;
133
- dateA11yLabel: string;
134
- monthYearA11yLabel: string;
135
- };
136
- };
171
+ interface MapaDatepickerRangeValue {
172
+ startDate: string | null;
173
+ endDate: string | null;
174
+ }
175
+ /** @deprecated Use `MapaDatepickerRangeValue`. */
176
+ type MapaDatepickerRangeControlValue = MapaDatepickerRangeValue;
177
+ /** @deprecated Use `FormGroup`. */
178
+ type MapaDatepickerRangeFormGroup = FormGroup;
179
+ type MapaDatepickerControlValue = string | MapaDatepickerRangeValue | string[] | null;
180
+ /** Preset já resolvido em datas concretas, pronto para o dropdown. */
181
+ interface MapaDatepickerPresetEntry {
182
+ label: string;
183
+ range: [Date, Date];
184
+ }
137
185
  declare class MapaDatepicker implements OnInit {
138
186
  private readonly cdr;
187
+ private readonly destroyRef;
188
+ private readonly i18n;
189
+ private readonly dateLocale;
139
190
  formGroup: FormGroup;
140
191
  element: Datepicker;
141
- private readonly destroyRef;
142
- readonly formDatepicker: FormGroup<{
143
- date: FormControl<Date | null>;
192
+ openedChange: EventEmitter<boolean>;
193
+ private toggleButton?;
194
+ private picker?;
195
+ /** Controle do consumidor, resolvido por `element.key` no `ngOnInit`. */
196
+ control: FormControl<MapaDatepickerControlValue>;
197
+ /** Camada visível: strings mascaradas. `single` usa apenas `startDate`. */
198
+ readonly formDisplay: FormGroup<{
199
+ startDate: FormControl<string | null>;
200
+ endDate: FormControl<string | null>;
144
201
  }>;
145
- formControl: FormControl<string | null>;
146
- constructor(cdr: ChangeDetectorRef);
202
+ /** Camada do calendário: `Date`, no formato que o ngxsmk consome. */
203
+ readonly pickerValue: i0.WritableSignal<DatepickerValue>;
204
+ private readonly isOpenState;
205
+ private readonly isPresetsOpenState;
206
+ private localeState;
207
+ private syncing;
208
+ private presetsCache?;
209
+ readonly overlayPositions: ConnectedPosition[];
210
+ /**
211
+ * Referências estáveis: com OnPush, devolver um literal novo a cada ciclo
212
+ * marcaria o input do ngxsmk como alterado em toda change detection.
213
+ */
214
+ readonly ngxsmkClasses: {
215
+ inputGroup: string;
216
+ };
217
+ private readonly emptyDisabledDates;
218
+ private readonly neverInvalid;
219
+ private readonly localeSync;
147
220
  ngOnInit(): void;
148
- get minDate(): Date | null;
149
- get maxDate(): Date | null;
221
+ mode(): DatepickerMode;
222
+ isOpen(): boolean;
223
+ isDisabled(): boolean;
224
+ isReadonly(): boolean;
150
225
  hasValue(): boolean;
151
- cleanDatepicker(): void;
152
- private syncDatepickerControl;
153
- private updateExternalControl;
154
- closePicker(picker: MatDatepicker<Date>): void;
155
- private areDatesEqual;
226
+ showClear(): boolean;
227
+ shouldShowError(): boolean;
228
+ /** Texto somente leitura do modo `multiple` — evita chaves novas de i18n. */
229
+ selectedLabel(): string;
230
+ mask(): string;
231
+ singlePlaceholder(): string;
232
+ get startDatePlaceholder(): string;
233
+ get endDatePlaceholder(): string;
234
+ ngxsmkLocale(): string;
235
+ displayFormat(): string;
236
+ minDate(): Date | null;
237
+ maxDate(): Date | null;
238
+ disabledDates(): (string | Date)[];
239
+ isInvalidDate(): (date: Date) => boolean;
240
+ /**
241
+ * Um mês por padrão em todos os modos, para o painel ficar na largura do
242
+ * campo. Dois meses são opt-in via `element.calendars`.
243
+ */
244
+ calendars(): number;
245
+ weekStart(): number | null;
246
+ /**
247
+ * Presets já resolvidos em datas. Memoizado pela referência de
248
+ * `element.presets` para não reconstruir `Date`s a cada change detection.
249
+ *
250
+ * Alimenta o nosso dropdown, não o painel nativo do ngxsmk: o layout dele é
251
+ * ditado por media queries duplicadas que nenhum input ou variável controla
252
+ * (coluna lateral acima de 992px, cards de 45px acima de 1024px), e o input
253
+ * `classes` do componente de presets é morto — o template dele nunca o lê.
254
+ */
255
+ presetList(): MapaDatepickerPresetEntry[];
256
+ hasPresets(): boolean;
257
+ isPresetsOpen(): boolean;
258
+ isPresetActive(entry: MapaDatepickerPresetEntry): boolean;
259
+ presetsTriggerLabel(): string;
260
+ togglePresets(): void;
261
+ closePresets(): void;
262
+ applyPreset(entry: MapaDatepickerPresetEntry): void;
263
+ toggleCalendar(): void;
264
+ closeCalendar(): void;
265
+ handleOverlayOutsideClick(event: Event): void;
266
+ handleEscape(): void;
267
+ /** Seleção vinda do calendário. */
268
+ handlePickerValue(value: DatepickerValue): void;
269
+ clear(event?: Event): void;
270
+ private locale;
271
+ private handleLocaleChange;
272
+ /** Digitação no campo mascarado. Passa o texto adiante verbatim. */
273
+ private handleDisplayChange;
274
+ private applyExternal;
275
+ private emitExternal;
276
+ private patchDisplay;
277
+ private toPickerValue;
278
+ private toExternal;
279
+ private toDisplayValue;
280
+ /** Forma canônica usada só para comparar — nunca é gravada no controle. */
281
+ private serializeExternal;
282
+ private emptyValue;
283
+ private asRangeValue;
284
+ private asPickerRange;
285
+ private isCompleteRange;
286
+ private shouldCloseAfterSelect;
287
+ private buildPresetEntries;
288
+ private resolvePreset;
289
+ private setOpenState;
156
290
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaDatepicker, never>;
157
- static ɵcmp: i0.ɵɵComponentDeclaration<MapaDatepicker, "mapa-datepicker", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "element": { "alias": "element"; "required": false; }; }, {}, never, never, true, never>;
291
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapaDatepicker, "mapa-datepicker, mapa-datepicker-range", never, { "formGroup": { "alias": "formGroup"; "required": true; }; "element": { "alias": "element"; "required": true; }; }, { "openedChange": "openedChange"; }, never, never, true, never>;
158
292
  }
159
293
 
160
- export { MAPA_DATEPICKER_FORMATS, MapaDatepicker };
294
+ /** @deprecated Use `MapaDatepicker`. */
295
+ type MapaDatepickerRangeComponent = MapaDatepicker;
296
+
297
+ export { Datepicker, DatepickerRange, ElementBase, MapaDatepicker, MapaDatepicker as MapaDatepickerRange };
298
+ export type { DatepickerMode, DatepickerOptions, DatepickerPreset, Errors, MapaDatepickerControlValue, MapaDatepickerPresetEntry, MapaDatepickerRangeComponent, MapaDatepickerRangeControlValue, MapaDatepickerRangeFormGroup, MapaDatepickerRangeValue, Status };
@@ -14,14 +14,19 @@ interface TableColumnStatus {
14
14
  label?: string[];
15
15
  color?: string[];
16
16
  textColor?: string[];
17
- style?: "square" | "round";
17
+ style?: 'square' | 'round';
18
18
  }
19
19
  interface TableColumn {
20
20
  key: string;
21
21
  label: string;
22
+ /** @deprecated Prefer `sortable` in new integrations. */
22
23
  sort?: boolean;
24
+ sortable?: boolean;
23
25
  status?: TableColumnStatus;
26
+ /** @deprecated Prefer `dateFormat` in new integrations. */
24
27
  mask?: string;
28
+ dateFormat?: string;
29
+ fallback?: string;
25
30
  width?: string;
26
31
  collapse?: string;
27
32
  align?: string;
@@ -1,3 +1,4 @@
1
+ import { UrlTree, Params } from '@angular/router';
1
2
  import * as i0 from '@angular/core';
2
3
  import { EventEmitter } from '@angular/core';
3
4
  import { MatMenuTrigger } from '@angular/material/menu';
@@ -5,7 +6,8 @@ import { MatMenuTrigger } from '@angular/material/menu';
5
6
  interface MenuActionItem {
6
7
  image?: string;
7
8
  icon?: string;
8
- route?: string;
9
+ route?: string | unknown[] | UrlTree;
10
+ queryParams?: Params;
9
11
  showText?: boolean;
10
12
  svg?: string;
11
13
  text: string;
@@ -1,10 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
3
+ import { UrlTree, Params } from '@angular/router';
3
4
 
4
5
  interface MenuActionItem {
5
6
  image?: string;
6
7
  icon?: string;
7
- route?: string;
8
+ route?: string | unknown[] | UrlTree;
9
+ queryParams?: Params;
8
10
  showText?: boolean;
9
11
  svg?: string;
10
12
  text: string;
@@ -1,14 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, Renderer2, SimpleChanges, Injector, ChangeDetectorRef } from '@angular/core';
2
+ import { AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, Renderer2, SimpleChanges, Injector, TemplateRef } from '@angular/core';
3
3
  import { MatPaginator, MatPaginatorIntl, PageEvent } from '@angular/material/paginator';
4
+ import { UrlTree, Params } from '@angular/router';
4
5
  import * as rxjs from 'rxjs';
5
6
  import * as mapa_frontend_i18n from 'mapa-frontend-i18n';
6
7
  import { MapaUiTextGroups, ValidationContext, PartialMapaUiTexts } from 'mapa-frontend-i18n';
7
8
  import { SelectionModel } from '@angular/cdk/collections';
8
9
  import { FormControl } from '@angular/forms';
9
- import { Sort, MatSort } from '@angular/material/sort';
10
- import { MatTable, MatTableDataSource } from '@angular/material/table';
11
- import { MatMenuTrigger } from '@angular/material/menu';
10
+ import { SortDirection, Sort } from '@angular/material/sort';
12
11
 
13
12
  declare class BubblePaginationDirective implements AfterViewInit, OnChanges, OnDestroy {
14
13
  private readonly matPag;
@@ -62,17 +61,14 @@ interface TableEmptyState {
62
61
  interface MenuActionItem {
63
62
  image?: string;
64
63
  icon?: string;
65
- route?: string;
64
+ route?: string | unknown[] | UrlTree;
65
+ queryParams?: Params;
66
66
  showText?: boolean;
67
67
  svg?: string;
68
68
  text: string;
69
69
  action: string;
70
70
  disabled?: boolean;
71
71
  }
72
- interface MenuActionEvent<TData = unknown> {
73
- action: string;
74
- data: TData;
75
- }
76
72
 
77
73
  interface TableCellStyleClass {
78
74
  key: string;
@@ -118,9 +114,6 @@ declare class MapaI18nService {
118
114
 
119
115
  declare function customPaginatorFactory(i18n: MapaI18nService, injector: Injector): MatPaginatorIntl;
120
116
 
121
- interface MenuItem extends MenuActionItem {
122
- }
123
-
124
117
  interface Classification {
125
118
  classificationId?: number;
126
119
  classificationName?: string;
@@ -132,14 +125,19 @@ interface TableColumnStatus {
132
125
  label?: string[];
133
126
  color?: string[];
134
127
  textColor?: string[];
135
- style?: "square" | "round";
128
+ style?: 'square' | 'round';
136
129
  }
137
130
  interface TableColumn {
138
131
  key: string;
139
132
  label: string;
133
+ /** @deprecated Prefer `sortable` in new integrations. */
140
134
  sort?: boolean;
135
+ sortable?: boolean;
141
136
  status?: TableColumnStatus;
137
+ /** @deprecated Prefer `dateFormat` in new integrations. */
142
138
  mask?: string;
139
+ dateFormat?: string;
140
+ fallback?: string;
143
141
  width?: string;
144
142
  collapse?: string;
145
143
  align?: string;
@@ -147,106 +145,161 @@ interface TableColumn {
147
145
  classification?: Classification;
148
146
  }
149
147
 
150
- declare class MapaTableComponent implements AfterViewInit, OnChanges {
151
- private cdr;
152
- private readonly i18n;
153
- columns: TableColumn[];
154
- data: TableRowData[];
148
+ interface MenuItem extends MenuActionItem {
149
+ }
150
+
151
+ type DataTableAlignment = 'start' | 'center' | 'end';
152
+ type DataTableSortDirection = SortDirection;
153
+ type DataTableColumn = TableColumn;
154
+ interface DataTablePageChange {
155
+ pageIndex: number;
156
+ pageSize: number;
157
+ }
158
+ interface DataTableSortChange {
159
+ active: string;
160
+ direction: DataTableSortDirection;
161
+ }
162
+ interface DataTableSelectionChange {
163
+ selectedKeys: string[];
164
+ }
165
+ interface MapaTableCellContext {
166
+ $implicit: unknown;
167
+ row: unknown;
168
+ column: TableColumn;
169
+ }
170
+ declare class MapaTableCellDirective {
171
+ columnKey: string;
172
+ readonly templateRef: TemplateRef<MapaTableCellContext>;
173
+ static ngTemplateContextGuard(_directive: MapaTableCellDirective, context: unknown): context is MapaTableCellContext;
174
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapaTableCellDirective, never>;
175
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MapaTableCellDirective, "ng-template[mapaTableCell]", never, { "columnKey": { "alias": "mapaTableCell"; "required": true; }; }, {}, never, never, true, never>;
176
+ }
177
+ declare class MapaTableComponent {
178
+ columns: readonly TableColumn[];
179
+ data: readonly unknown[];
180
+ rowKey: string;
181
+ caption: string;
182
+ selectable?: boolean;
183
+ showSelectAll: boolean;
184
+ selectedKeys?: readonly string[];
185
+ selectionLabelKey: string;
186
+ /** @deprecated Prefer `selectable`. */
187
+ checkbox?: boolean;
188
+ /** @deprecated Prefer `selectedKeys`, `rowKey` and `selectionChange`. */
189
+ selection?: SelectionModel<TableRowData>;
190
+ loading?: boolean;
191
+ finished?: boolean;
192
+ error: boolean;
193
+ emptyTitle?: string;
194
+ emptySubtitle?: string | null;
195
+ errorTitle?: string;
196
+ errorSubtitle?: string | null;
197
+ retryLabel?: string;
198
+ /** @deprecated Prefer the individual state inputs. */
199
+ status: TableStatus;
200
+ /** @deprecated Prefer `emptyTitle` and `emptySubtitle`. */
201
+ empty: TableEmptyState;
202
+ pagination?: boolean;
155
203
  pageIndex: number;
156
204
  pageSize: number;
157
205
  totalCount: number;
206
+ pageSizeOptions: readonly number[];
207
+ /** @deprecated The paginator derives its pages from `totalCount` and `pageSize`. */
158
208
  totalPages: number;
159
- checkbox: boolean | undefined;
160
- selection: SelectionModel<TableRowData> | undefined;
161
- actions?: MenuItem[] | undefined;
162
- filterControl: FormControl<string | null> | undefined;
163
- menuItems: MenuItem[];
164
- menu: boolean | undefined;
209
+ /** @deprecated Prefer `pagination`. */
165
210
  showPaginator: boolean;
166
- status: TableStatus;
167
- empty: TableEmptyState;
168
211
  paginatorShowFirstButton: boolean;
169
212
  paginatorShowLastButton: boolean;
170
213
  paginatorRenderButtonsNumber: number;
171
214
  paginatorHideDefaultArrows: boolean;
172
- trigger: MatMenuTrigger;
173
- table?: MatTable<TableRowData>;
174
- rowClick: EventEmitter<RowClickEvent>;
175
- selectedRows: EventEmitter<SelectedTableRow[]>;
176
- onChangePage: EventEmitter<PageEvent>;
177
- onSortChange: EventEmitter<Sort>;
178
- paginator: MatPaginator;
179
- sort: MatSort;
180
- dataSource: MatTableDataSource<TableRowData>;
181
- displayedColumns: string[];
182
- currentSort: Sort | undefined;
183
- desktopTableVisible: boolean;
215
+ sortActive: string;
216
+ sortDirection: DataTableSortDirection;
217
+ /** @deprecated Prefer projected cells for new integrations. */
218
+ actions?: MenuItem[];
219
+ /** @deprecated Prefer projected cells for new integrations. */
220
+ menuItems: MenuItem[];
221
+ /** @deprecated The presence of a `menu` column controls menu rendering. */
222
+ menu?: boolean;
223
+ /** @deprecated Prefer filtering in the consuming feature. */
224
+ filterControl?: FormControl<string | null>;
225
+ readonly pageChange: EventEmitter<DataTablePageChange>;
226
+ readonly sortChange: EventEmitter<DataTableSortChange>;
227
+ readonly selectionChange: EventEmitter<DataTableSelectionChange>;
228
+ readonly retry: EventEmitter<void>;
229
+ /** @deprecated Prefer `pageChange`. */
230
+ readonly onChangePage: EventEmitter<PageEvent>;
231
+ /** @deprecated Prefer `sortChange`. */
232
+ readonly onSortChange: EventEmitter<Sort>;
233
+ /** @deprecated Prefer `selectionChange`. */
234
+ readonly selectedRows: EventEmitter<SelectedTableRow<TableRowData>[]>;
235
+ readonly rowClick: EventEmitter<RowClickEvent<TableRowData>>;
236
+ private readonly projectedCells;
237
+ private readonly cdr;
184
238
  private readonly destroyRef;
185
- private filterControlSubscription?;
186
- constructor(cdr: ChangeDetectorRef, i18n: MapaI18nService);
187
- get texts(): mapa_frontend_i18n.MapaUiTextGroups;
188
- get selectAllLabel(): string;
189
- get paginatorPageIndex(): number;
190
- get shouldShowPaginator(): boolean;
191
- get resolvedEmptyTitle(): string;
192
- get resolvedEmptySubtitle(): string | null;
193
- get skeletonRows(): number[];
194
- ngAfterViewInit(): void;
195
- ngOnChanges(changes: SimpleChanges): void;
196
- private hasViewStateChanges;
197
- private refreshTableState;
198
- private rebuildDesktopTable;
199
- trackColumn(index: number, column: TableColumn): string;
200
- getSkeletonColumnWidth(column: TableColumn): string;
201
- setupFilter(): void;
202
- isAllSelected(): boolean;
203
- toggleAllRows(): void;
204
- checkboxLabel(row?: TableRowData): string;
205
- sortData(column: TableColumn): void;
206
- sortDataFunction(sort: Sort): void;
207
- emitRowClick(row: TableRowData, action: string): void;
208
- toggleSelection(row: TableRowData): void;
209
- getSelectedValues(): void;
210
- generateColumns(): void;
211
- columnExists(columns: TableColumn[], key: string): boolean;
212
- generateGroupData(): void;
213
- isBoolean(column: TableColumn, row: TableRowData): boolean;
214
- isMaskedData(column: TableColumn, row: TableRowData): boolean;
215
- getValueAsDate(column: TableColumn, row: TableRowData): Date;
216
- getCellClass(column: TableColumn, row: TableRowData): string;
217
- getCellBg(column: TableColumn, row: TableRowData): string;
218
- getCellTextColor(column: TableColumn, row: TableRowData): string;
219
- getValue(row: {
220
- value?: string | number | null;
221
- }): string;
222
- changePage(event: PageEvent): void;
223
- toggleMenu(): void;
224
- getBackgroundColor(column: TableColumn, row: TableRowData): string;
225
- getTextColor(column: TableColumn, row: TableRowData): string;
226
- hasCustomClass(column: TableColumn, row: TableRowData, key: string): boolean;
227
- getCustomClass(column: TableColumn, row: TableRowData, key: string): string;
228
- hasCellStyleClass(row: TableRowData, key: string): boolean;
229
- getCellStyleClass(row: TableRowData, key: string): string;
230
- handleMenu(selected: MenuActionEvent<unknown>): void;
231
- hasIndividualMenu(row: TableRowData | undefined): boolean;
232
- getMenuItems(row: TableRowData | undefined): MenuItem[];
233
- getActionItems(row: TableRowData | undefined): MenuItem[];
234
- getStatusLabel(column: TableColumn, row: TableRowData): string;
235
- getCellContent(row: TableRowData, key: string): string;
236
- hasActionsColumn(): boolean;
237
- hasMenuColumn(): boolean;
238
- setSvgName(image: string): string;
239
+ private readonly i18n;
240
+ private localSort;
241
+ private filterValue;
242
+ private observedFilter?;
243
+ private filterSubscription?;
244
+ protected get texts(): mapa_frontend_i18n.MapaUiTextGroups;
245
+ protected get visibleData(): readonly unknown[];
246
+ protected get isSelectable(): boolean;
247
+ protected get isLoading(): boolean;
248
+ protected get isFinished(): boolean;
249
+ protected get resolvedEmptyTitle(): string;
250
+ protected get resolvedEmptySubtitle(): string | null;
251
+ protected get resolvedErrorTitle(): string;
252
+ protected get resolvedErrorSubtitle(): string | null;
253
+ protected get resolvedRetryLabel(): string;
254
+ protected get zeroBasedPageIndex(): number;
255
+ protected get shouldShowPaginator(): boolean;
256
+ protected get skeletonRows(): number[];
257
+ protected skeletonColumnWidth(column: TableColumn): string;
258
+ protected rowIdentity(row: unknown, index: number): unknown;
259
+ protected getRowKey(row: unknown): string;
260
+ protected isSelected(row: unknown): boolean;
261
+ protected allVisibleSelected(): boolean;
262
+ protected someVisibleSelected(): boolean;
263
+ protected toggleRow(row: unknown, selected: boolean): void;
264
+ protected toggleVisibleRows(selected: boolean): void;
265
+ protected selectionLabel(row: unknown): string;
266
+ protected cellTemplate(columnKey: string): TemplateRef<MapaTableCellContext> | null;
267
+ protected isSortable(column: TableColumn): boolean;
268
+ protected ariaSort(column: TableColumn): 'ascending' | 'descending' | 'none' | null;
269
+ protected sortIcon(column: TableColumn): string;
270
+ protected changeSort(column: TableColumn): void;
271
+ protected handlePage(event: PageEvent): void;
272
+ protected cellValue(row: unknown, column: TableColumn): string;
273
+ protected dateValue(row: unknown, column: TableColumn): Date | null;
274
+ protected dateFormat(column: TableColumn): string | null;
275
+ protected statusLabel(column: TableColumn, row: unknown): string;
276
+ protected statusBackground(column: TableColumn, row: unknown): string | null;
277
+ protected statusTextColor(column: TableColumn, row: unknown): string | null;
278
+ protected cellClasses(column: TableColumn, row: unknown): string[];
279
+ protected isCenterAligned(column: TableColumn): boolean;
280
+ protected isEndAligned(column: TableColumn): boolean;
281
+ protected getActionItems(row: unknown): MenuItem[];
282
+ protected getMenuItems(row: unknown): MenuItem[];
283
+ protected emitAction(row: unknown, item: MenuActionItem, event: Event): void;
284
+ protected emitRowInteraction(event: Event, row: unknown): void;
285
+ protected emitRowKeyboard(event: KeyboardEvent, row: unknown): void;
286
+ protected route(item: MenuActionItem): string | unknown[] | UrlTree | null;
287
+ protected queryParams(item: MenuActionItem): Params | null;
288
+ protected svgName(svg: string): string;
289
+ private activeSort;
290
+ private activeDirection;
291
+ private emitLegacySelection;
292
+ private observeFilterControl;
239
293
  private getColumnValue;
240
- private getColumnRecord;
241
- private getRecordStringValue;
242
- private getStatusIndex;
294
+ private statusIndex;
295
+ private normalizeCollapse;
243
296
  private getFilterValue;
244
297
  private getMenuActionItems;
245
- private isMenuItem;
246
- private isTableRowData;
298
+ private asRow;
299
+ private isInteractiveTarget;
247
300
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaTableComponent, never>;
248
- static ɵcmp: i0.ɵɵComponentDeclaration<MapaTableComponent, "mapa-table", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalCount": { "alias": "totalCount"; "required": false; }; "totalPages": { "alias": "totalPages"; "required": false; }; "checkbox": { "alias": "checkbox"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "filterControl": { "alias": "filterControl"; "required": false; }; "menuItems": { "alias": "menuItems"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "status": { "alias": "status"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; "paginatorShowFirstButton": { "alias": "paginatorShowFirstButton"; "required": false; }; "paginatorShowLastButton": { "alias": "paginatorShowLastButton"; "required": false; }; "paginatorRenderButtonsNumber": { "alias": "paginatorRenderButtonsNumber"; "required": false; }; "paginatorHideDefaultArrows": { "alias": "paginatorHideDefaultArrows"; "required": false; }; }, { "rowClick": "rowClick"; "selectedRows": "selectedRows"; "onChangePage": "onChangePage"; "onSortChange": "onSortChange"; }, never, never, true, never>;
301
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapaTableComponent, "mapa-table", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "rowKey": { "alias": "rowKey"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "showSelectAll": { "alias": "showSelectAll"; "required": false; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; }; "selectionLabelKey": { "alias": "selectionLabelKey"; "required": false; }; "checkbox": { "alias": "checkbox"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "finished": { "alias": "finished"; "required": false; }; "error": { "alias": "error"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptySubtitle": { "alias": "emptySubtitle"; "required": false; }; "errorTitle": { "alias": "errorTitle"; "required": false; }; "errorSubtitle": { "alias": "errorSubtitle"; "required": false; }; "retryLabel": { "alias": "retryLabel"; "required": false; }; "status": { "alias": "status"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalCount": { "alias": "totalCount"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "totalPages": { "alias": "totalPages"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "paginatorShowFirstButton": { "alias": "paginatorShowFirstButton"; "required": false; }; "paginatorShowLastButton": { "alias": "paginatorShowLastButton"; "required": false; }; "paginatorRenderButtonsNumber": { "alias": "paginatorRenderButtonsNumber"; "required": false; }; "paginatorHideDefaultArrows": { "alias": "paginatorHideDefaultArrows"; "required": false; }; "sortActive": { "alias": "sortActive"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "menuItems": { "alias": "menuItems"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; "filterControl": { "alias": "filterControl"; "required": false; }; }, { "pageChange": "pageChange"; "sortChange": "sortChange"; "selectionChange": "selectionChange"; "retry": "retry"; "onChangePage": "onChangePage"; "onSortChange": "onSortChange"; "selectedRows": "selectedRows"; "rowClick": "rowClick"; }, ["projectedCells"], never, true, never>;
249
302
  }
250
303
 
251
- export { BubblePaginationDirective, MapaTableComponent, customPaginatorFactory };
252
- export type { RowClickEvent, SelectedTableRow, TableCellStyleClass, TableEmptyState, TableRowData, TableStatus };
304
+ export { BubblePaginationDirective, MapaTableCellDirective, MapaTableComponent, customPaginatorFactory };
305
+ export type { DataTableAlignment, DataTableColumn, DataTablePageChange, DataTableSelectionChange, DataTableSortChange, DataTableSortDirection, MapaTableCellContext, RowClickEvent, SelectedTableRow, TableCellStyleClass, TableEmptyState, TableRowData, TableStatus };