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.
- package/README.md +2 -3
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +648 -125
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +569 -322
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +522 -581
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +42 -35
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-core-utils.mjs +1 -4
- package/fesm2022/mapa-library-ui-src-lib-core-utils.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +1272 -1018
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +350 -187
- package/mapa-library-ui-2.0.0.tgz +0 -0
- package/package.json +3 -10
- package/src/lib/components/datepicker/index.d.ts +165 -27
- package/src/lib/components/group-report/index.d.ts +6 -1
- package/src/lib/components/menu/index.d.ts +3 -1
- package/src/lib/components/report-item/index.d.ts +3 -1
- package/src/lib/components/table/index.d.ts +153 -100
- package/src/lib/core/utils/index.d.ts +1 -2
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +0 -733
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +0 -1
- package/mapa-library-ui-1.7.3.tgz +0 -0
- 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": "
|
|
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.
|
|
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
|
|
2
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
3
3
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
4
|
-
import {
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
146
|
-
|
|
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
|
-
|
|
149
|
-
|
|
221
|
+
mode(): DatepickerMode;
|
|
222
|
+
isOpen(): boolean;
|
|
223
|
+
isDisabled(): boolean;
|
|
224
|
+
isReadonly(): boolean;
|
|
150
225
|
hasValue(): boolean;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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":
|
|
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
|
-
|
|
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?:
|
|
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,
|
|
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 {
|
|
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?:
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
get
|
|
191
|
-
get
|
|
192
|
-
get
|
|
193
|
-
get
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
|
241
|
-
private
|
|
242
|
-
private getStatusIndex;
|
|
294
|
+
private statusIndex;
|
|
295
|
+
private normalizeCollapse;
|
|
243
296
|
private getFilterValue;
|
|
244
297
|
private getMenuActionItems;
|
|
245
|
-
private
|
|
246
|
-
private
|
|
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; }; "
|
|
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 };
|