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
@@ -1,733 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, ElementRef, DestroyRef, booleanAttribute, Input, Directive, InjectionToken, Injector, signal, Optional, Inject, Injectable, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
5
- import * as i2 from '@angular/forms';
6
- import { NgControl, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
7
- import { DateAdapter, provideNativeDateAdapter } from '@angular/material/core';
8
- import * as i3 from '@angular/material/datepicker';
9
- import { MatDatepickerModule } from '@angular/material/datepicker';
10
- import * as i4 from '@angular/material/form-field';
11
- import { MatFormFieldModule } from '@angular/material/form-field';
12
- import { MatIconModule } from '@angular/material/icon';
13
- import * as i5 from '@angular/material/input';
14
- import { MatInputModule } from '@angular/material/input';
15
- import { NgxMaskDirective, NgxMaskService, provideNgxMask } from 'ngx-mask';
16
- import { AutofillMonitor } from '@angular/cdk/text-field';
17
- import { filter } from 'rxjs/operators';
18
- import { getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
19
-
20
- /**
21
- * Máscaras numéricas cujo valor de modelo não é a simples projeção
22
- * "texto renderizado menos caracteres especiais". `separator` ainda altera
23
- * `NgxMaskService.specialCharacters` em runtime, o que quebra a simetria da
24
- * comparação feita aqui. Nenhuma delas é produzida por autofill.
25
- */
26
- const SKIPPED_MASK_PREFIXES = ['separator', 'percent'];
27
- /**
28
- * Mantém o FormControl em sincronia com `input.value` quando o valor foi escrito
29
- * por algo que não é o usuário: autofill do navegador, gerenciador de senhas ou
30
- * extensão (geradores de CPF/CNPJ).
31
- *
32
- * A NgxMaskDirective é o ControlValueAccessor de todo input com máscara desta
33
- * biblioteca e só empurra valor para o modelo a partir do seu host listener de
34
- * `input`. O handler de `blur` chama `onTouch()` mas nunca `onChange()`, e não
35
- * existe listener de `change`. Um agente externo que atribui `element.value` sem
36
- * disparar um evento `input` nativo deixa o controle no valor anterior, mantendo
37
- * o erro `required` na tela até o usuário redigitar o campo.
38
- *
39
- * Esta diretiva detecta a divergência e reenvia o evento `input` que faltou,
40
- * fazendo a NgxMaskDirective analisar, re-renderizar e emitir exatamente como se
41
- * o usuário tivesse colado o valor. É no-op enquanto DOM e modelo concordam.
42
- */
43
- class MapaMaskAutofillSyncDirective {
44
- constructor() {
45
- /** Permite desligar a reconciliação em um campo específico. */
46
- this.mapaMaskAutofillSync = true;
47
- this.elementRef = inject(ElementRef);
48
- this.destroyRef = inject(DestroyRef);
49
- this.autofillMonitor = inject(AutofillMonitor);
50
- this.maskDirective = inject(NgxMaskDirective, {
51
- self: true,
52
- optional: true,
53
- });
54
- this.maskService = inject(NgxMaskService, {
55
- self: true,
56
- optional: true,
57
- });
58
- this.ngControl = inject(NgControl, { self: true, optional: true });
59
- this.reconciling = false;
60
- }
61
- ngOnInit() {
62
- // monitor() é idempotente por elemento e devolve um Subject compartilhado
63
- // com o MatInput, que já monitora este mesmo elemento. Nunca chamar
64
- // stopMonitoring(): ele completa esse Subject e remove o listener de
65
- // animação para todos os consumidores. O MatInput cuida do teardown.
66
- this.autofillMonitor
67
- .monitor(this.elementRef.nativeElement)
68
- .pipe(filter((event) => event.isAutofilled), takeUntilDestroyed(this.destroyRef))
69
- .subscribe(() => this.reconcile());
70
- }
71
- /** Idempotente: não faz nada enquanto DOM e modelo concordam. */
72
- reconcile() {
73
- if (!this.mapaMaskAutofillSync || this.reconciling) {
74
- return;
75
- }
76
- const element = this.elementRef.nativeElement;
77
- // ngControl.control só existe depois do ngOnChanges da FormControlDirective,
78
- // por isso é lido aqui e não no construtor.
79
- const control = this.ngControl?.control;
80
- if (!control || control.disabled || element.readOnly) {
81
- return;
82
- }
83
- if (element instanceof HTMLInputElement && element.type === 'number') {
84
- return;
85
- }
86
- const mask = this.maskDirective?.mask() ?? '';
87
- if (SKIPPED_MASK_PREFIXES.some((prefix) => mask.startsWith(prefix))) {
88
- return;
89
- }
90
- if (this.isInSync(element, control, mask)) {
91
- return;
92
- }
93
- const previousValue = control.value;
94
- this.reconciling = true;
95
- try {
96
- // Reenvia o que o navegador deveria ter emitido. A NgxMaskDirective relê
97
- // element.value, reaplica a máscara, re-renderiza o campo e empurra o
98
- // valor pelo seu próprio pipeline de CVA — marcando o controle como dirty
99
- // e reexecutando todos os validadores.
100
- element.dispatchEvent(new Event('input', { bubbles: true }));
101
- if (control.value === previousValue) {
102
- // O evento não moveu o modelo. Acontece com controles criados como
103
- // { updateOn: 'blur' | 'submit' }, em que o value accessor apenas
104
- // enfileira a mudança em vez de comitá-la.
105
- control.setValue(this.toModelValue(element.value, mask));
106
- control.markAsDirty();
107
- }
108
- }
109
- finally {
110
- this.reconciling = false;
111
- }
112
- }
113
- isInSync(element, control, mask) {
114
- return (this.toComparable(element.value, mask) ===
115
- this.toComparable(this.stringify(control.value), mask));
116
- }
117
- /**
118
- * Sem máscara, o texto renderizado e o valor de modelo são a mesma string. Com
119
- * máscara eles diferem apenas pelos caracteres especiais, então limpar os dois
120
- * lados com as regras da própria NgxMaskService vale tanto para
121
- * `dropSpecialCharacters: true` quanto para `false`.
122
- */
123
- toComparable(value, mask) {
124
- return mask && this.maskService ? this.maskService.removeMask(value) : value;
125
- }
126
- toModelValue(domValue, mask) {
127
- return mask && this.maskService && this.maskService.dropSpecialCharacters
128
- ? this.maskService.removeMask(domValue)
129
- : domValue;
130
- }
131
- stringify(value) {
132
- return value === null || value === undefined ? '' : String(value);
133
- }
134
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaMaskAutofillSyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
135
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.21", type: MapaMaskAutofillSyncDirective, isStandalone: true, selector: "input[mask], textarea[mask]", inputs: { mapaMaskAutofillSync: ["mapaMaskAutofillSync", "mapaMaskAutofillSync", booleanAttribute] }, host: { listeners: { "change": "reconcile()", "focusout": "reconcile()" } }, exportAs: ["mapaMaskAutofillSync"], ngImport: i0 }); }
136
- }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaMaskAutofillSyncDirective, decorators: [{
138
- type: Directive,
139
- args: [{
140
- selector: 'input[mask], textarea[mask]',
141
- standalone: true,
142
- exportAs: 'mapaMaskAutofillSync',
143
- host: {
144
- '(change)': 'reconcile()',
145
- '(focusout)': 'reconcile()',
146
- },
147
- }]
148
- }], propDecorators: { mapaMaskAutofillSync: [{
149
- type: Input,
150
- args: [{ transform: booleanAttribute }]
151
- }] } });
152
-
153
- const DAY_MONTH_YEAR_PATTERN = /^(\d{2})\/(\d{2})\/(\d{4})$/;
154
- const MONTH_DAY_YEAR_PATTERN = /^(\d{2})\/(\d{2})\/(\d{4})$/;
155
- const ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}([T ].*)?$/;
156
- const DOCS_LANGUAGE_STORAGE_KEY = "mapa-library-ui-docs-language";
157
- function isValidDate(date) {
158
- return !Number.isNaN(date.getTime());
159
- }
160
- function buildUtcDate(date, dayOffset, hours, minutes, seconds, milliseconds) {
161
- return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate() + dayOffset, hours, minutes, seconds, milliseconds));
162
- }
163
- function formatDateAsDayMonthYear(date) {
164
- const day = `${date.getDate()}`.padStart(2, "0");
165
- const month = `${date.getMonth() + 1}`.padStart(2, "0");
166
- const year = `${date.getFullYear()}`;
167
- return `${day}/${month}/${year}`;
168
- }
169
- function formatDateAsMonthDayYear(date) {
170
- const day = `${date.getDate()}`.padStart(2, "0");
171
- const month = `${date.getMonth() + 1}`.padStart(2, "0");
172
- const year = `${date.getFullYear()}`;
173
- return `${month}/${day}/${year}`;
174
- }
175
- function normalizeDateLocale(value) {
176
- if (typeof value !== "string") {
177
- return "pt-BR";
178
- }
179
- const normalizedValue = value.trim().toLowerCase();
180
- if (normalizedValue.startsWith("en")) {
181
- return "en";
182
- }
183
- if (normalizedValue.startsWith("es")) {
184
- return "es";
185
- }
186
- return "pt-BR";
187
- }
188
- function getDocsStoredLanguage() {
189
- if (typeof window === "undefined") {
190
- return null;
191
- }
192
- try {
193
- return window.localStorage.getItem(DOCS_LANGUAGE_STORAGE_KEY);
194
- }
195
- catch {
196
- return null;
197
- }
198
- }
199
- function getActiveDateLocale() {
200
- return normalizeDateLocale(getDocsStoredLanguage() ?? getStoredAppLanguage());
201
- }
202
- function isMonthFirstDateLocale(locale = getActiveDateLocale()) {
203
- return normalizeDateLocale(locale) === "en";
204
- }
205
- function getActiveDateFormat(locale = getActiveDateLocale()) {
206
- return isMonthFirstDateLocale(locale) ? "MM/DD/YYYY" : "DD/MM/YYYY";
207
- }
208
- function getActiveMaterialDateFormat(locale = getActiveDateLocale()) {
209
- return isMonthFirstDateLocale(locale) ? "MM/dd/yyyy" : "dd/MM/yyyy";
210
- }
211
- function getDateInputMask(_locale = getActiveDateLocale()) {
212
- return "00/00/0000";
213
- }
214
- function formatDateForLocale(date, locale = getActiveDateLocale()) {
215
- return isMonthFirstDateLocale(locale)
216
- ? formatDateAsMonthDayYear(date)
217
- : formatDateAsDayMonthYear(date);
218
- }
219
- function parseOrderedDate(value, pattern, order) {
220
- const match = pattern.exec(value.trim());
221
- if (!match) {
222
- return null;
223
- }
224
- const [, firstValue, secondValue, yearValue] = match;
225
- const year = Number(yearValue);
226
- const month = Number(order === "month-first" ? firstValue : secondValue);
227
- const day = Number(order === "month-first" ? secondValue : firstValue);
228
- const parsedDate = new Date(year, month - 1, day);
229
- if (parsedDate.getFullYear() !== year ||
230
- parsedDate.getMonth() !== month - 1 ||
231
- parsedDate.getDate() !== day) {
232
- return null;
233
- }
234
- return parsedDate;
235
- }
236
- function parseLocaleDateValue(value, locale = getActiveDateLocale()) {
237
- const normalizedLocale = normalizeDateLocale(locale);
238
- const parsers = normalizedLocale === "en"
239
- ? [
240
- () => parseOrderedDate(value, MONTH_DAY_YEAR_PATTERN, "month-first"),
241
- () => parseOrderedDate(value, DAY_MONTH_YEAR_PATTERN, "day-first"),
242
- ]
243
- : [
244
- () => parseOrderedDate(value, DAY_MONTH_YEAR_PATTERN, "day-first"),
245
- () => parseOrderedDate(value, MONTH_DAY_YEAR_PATTERN, "month-first"),
246
- ];
247
- for (const parse of parsers) {
248
- const parsedDate = parse();
249
- if (parsedDate) {
250
- return parsedDate;
251
- }
252
- }
253
- return null;
254
- }
255
- function parseDateValue(value, locale = getActiveDateLocale()) {
256
- if (value instanceof Date) {
257
- return isValidDate(value) ? new Date(value.getTime()) : null;
258
- }
259
- if (typeof value === "number") {
260
- const parsedDate = new Date(value);
261
- return isValidDate(parsedDate) ? parsedDate : null;
262
- }
263
- if (typeof value !== "string") {
264
- return null;
265
- }
266
- const trimmedValue = value.trim();
267
- if (!trimmedValue) {
268
- return null;
269
- }
270
- const localeDate = parseLocaleDateValue(trimmedValue, locale);
271
- if (localeDate) {
272
- return localeDate;
273
- }
274
- if (DAY_MONTH_YEAR_PATTERN.test(trimmedValue) || MONTH_DAY_YEAR_PATTERN.test(trimmedValue)) {
275
- return null;
276
- }
277
- const parsedDate = new Date(trimmedValue);
278
- return isValidDate(parsedDate) ? parsedDate : null;
279
- }
280
- /**
281
- * Parse estrito para o texto de um campo de data mascarado.
282
- *
283
- * Diferente de `parseDateValue`, não cai em `new Date(string)` para qualquer
284
- * entrada. O motor de datas do V8 aceita fragmentos numéricos e devolve datas
285
- * inventadas — `"2"` vira 01/02/2001 e `"251220"` vira o ano 251220 —, o que
286
- * fazia os datepickers moverem o calendário a cada tecla enquanto o usuário
287
- * ainda estava digitando.
288
- *
289
- * Aceita apenas uma data completa no formato do locale ativo (com validação de
290
- * faixa de dia/mês) ou uma data ISO-8601, para não quebrar valores vindos de
291
- * API que o consumidor grave direto no controle.
292
- */
293
- function parseDateFieldValue(value, locale = getActiveDateLocale()) {
294
- if (value instanceof Date || typeof value === "number") {
295
- return parseDateValue(value, locale);
296
- }
297
- if (typeof value !== "string") {
298
- return null;
299
- }
300
- const trimmedValue = value.trim();
301
- if (!trimmedValue) {
302
- return null;
303
- }
304
- const localeDate = parseLocaleDateValue(trimmedValue, locale);
305
- if (localeDate) {
306
- return localeDate;
307
- }
308
- return ISO_DATE_PATTERN.test(trimmedValue)
309
- ? parseDateValue(trimmedValue, locale)
310
- : null;
311
- }
312
- function isDateValue(value) {
313
- return parseDateValue(value) !== null;
314
- }
315
- function parseBrazilianDate(value) {
316
- return parseOrderedDate(value, DAY_MONTH_YEAR_PATTERN, "day-first");
317
- }
318
- function normalizeDateInput(value) {
319
- return parseDateValue(value);
320
- }
321
- function formatBrazilianDate(value) {
322
- const date = normalizeDateInput(value);
323
- return date ? formatDateAsDayMonthYear(date) : "";
324
- }
325
- function addDays(date, days) {
326
- const nextDate = new Date(date);
327
- nextDate.setDate(nextDate.getDate() + days);
328
- return nextDate;
329
- }
330
- function formatLocaleDate(value, dateStyle = "short") {
331
- const date = normalizeDateInput(value);
332
- if (!date) {
333
- return "";
334
- }
335
- return new Intl.DateTimeFormat(getIntlLocale(getActiveDateLocale()), {
336
- dateStyle,
337
- }).format(date);
338
- }
339
- function formatLocaleDateTime(value, options = {}) {
340
- const date = normalizeDateInput(value);
341
- if (!date) {
342
- return "";
343
- }
344
- const { dateStyle = "short", timeStyle = "short" } = options;
345
- return new Intl.DateTimeFormat(getIntlLocale(getActiveDateLocale()), {
346
- dateStyle,
347
- timeStyle,
348
- }).format(date);
349
- }
350
- function getDefaultDateRange(days = 60) {
351
- const today = new Date();
352
- return {
353
- startDate: formatBrazilianDate(addDays(today, -days)),
354
- endDate: formatBrazilianDate(today),
355
- };
356
- }
357
- function getRelativeDateRange(daysBack) {
358
- const endDate = new Date();
359
- endDate.setHours(23, 59, 59, 999);
360
- const startDate = new Date();
361
- startDate.setHours(0, 0, 0, 0);
362
- startDate.setDate(startDate.getDate() - daysBack);
363
- return { startDate, endDate };
364
- }
365
- function toUtcRangeStartIso(value) {
366
- const date = normalizeDateInput(value);
367
- return date ? buildUtcDate(date, 0, 3, 0, 0, 0).toISOString() : undefined;
368
- }
369
- function toUtcRangeEndIso(value) {
370
- const date = normalizeDateInput(value);
371
- return date ? buildUtcDate(date, 1, 2, 59, 59, 999).toISOString() : undefined;
372
- }
373
- function toUtcDayExclusiveEndIso(value) {
374
- const date = normalizeDateInput(value);
375
- return date ? buildUtcDate(date, 1, 3, 0, 0, 0).toISOString() : undefined;
376
- }
377
-
378
- const MAPA_UI_TEXTS = new InjectionToken("MAPA_UI_TEXTS");
379
- function formatPaginatorRange(page, pageSize, length) {
380
- if (length === 0 || pageSize === 0) {
381
- return `0 de ${length}`;
382
- }
383
- const safeLength = Math.max(length, 0);
384
- const startIndex = page * pageSize;
385
- const endIndex = startIndex < safeLength
386
- ? Math.min(startIndex + pageSize, safeLength)
387
- : startIndex + pageSize;
388
- return `${startIndex + 1} - ${endIndex} de ${safeLength}`;
389
- }
390
- function formatPaginatorShowingRange(page, pageSize, length) {
391
- if (length === 0 || pageSize === 0) {
392
- return "Mostrando 0 - 0 de 0 item";
393
- }
394
- const safeLength = Math.max(length, 0);
395
- const startIndex = page * pageSize;
396
- const endIndex = startIndex < safeLength
397
- ? Math.min(startIndex + pageSize, safeLength)
398
- : startIndex + pageSize;
399
- const itemLabel = safeLength === 1 ? "item" : "itens";
400
- return `Mostrando ${startIndex + 1} - ${endIndex} de ${safeLength} ${itemLabel}`;
401
- }
402
- const DEFAULT_MAPA_UI_TEXTS = {
403
- common: {
404
- selectAll: "Selecionar todos",
405
- },
406
- filters: {
407
- clear: "Limpar filtros",
408
- submit: "Filtrar",
409
- },
410
- datepicker: {
411
- startDatePlaceholder: "Data inicial",
412
- endDatePlaceholder: "Data final",
413
- },
414
- capability: {
415
- groupAverageTitle: "Média geral do grupo",
416
- individualAverageTitle: "Média geral do indivíduo",
417
- conceptTitle: "Conceito",
418
- resultTitle: "Resultado",
419
- positiveIndicatorsTitle: "Indicadores positivos",
420
- negativeIndicatorsTitle: "Indicadores negativos",
421
- riskIndicatorsTitle: "Indicadores de risco",
422
- precipitationRiskTitle: "Risco de acidente por precipitação",
423
- negligenceRiskTitle: "Risco de acidente por negligência",
424
- negativeDirectionLabel: "Direção Negativa |",
425
- positiveDirectionLabel: "Direção Positiva |",
426
- },
427
- paginator: {
428
- itemsPerPage: "Itens por página",
429
- nextPage: "Próxima página",
430
- previousPage: "Página anterior",
431
- rangeLabel: formatPaginatorRange,
432
- showingRangeLabel: formatPaginatorShowingRange,
433
- },
434
- warning: {
435
- lowReliabilityTitle: "Nível baixo de confiabilidade no(s) teste(s):",
436
- expirationLimitTitle: "O prazo de validade do(s) teste(s) está no limite:",
437
- },
438
- table: {
439
- emptyTitle: "Não foram encontrados resultados",
440
- emptySubtitle: "",
441
- },
442
- validation: {
443
- cnpj: "CNPJ inválido",
444
- cpf: "CPF inválido",
445
- email: "E-mail inválido",
446
- max: (context) => `O valor máximo permitido é ${context?.max ?? ""}`.trim(),
447
- maxLength: (context) => `O máximo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
448
- min: (context) => `O valor mínimo permitido é ${context?.min ?? ""}`.trim(),
449
- minLength: (context) => `O mínimo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
450
- pattern: "Formato inválido",
451
- required: "Campo obrigatório",
452
- },
453
- };
454
- function getDefaultTexts() {
455
- return DEFAULT_MAPA_UI_TEXTS;
456
- }
457
- function mergeMapaUiTexts(customTexts) {
458
- const defaults = getDefaultTexts();
459
- return {
460
- common: { ...defaults.common, ...(customTexts?.common ?? {}) },
461
- filters: { ...defaults.filters, ...(customTexts?.filters ?? {}) },
462
- datepicker: { ...defaults.datepicker, ...(customTexts?.datepicker ?? {}) },
463
- capability: { ...defaults.capability, ...(customTexts?.capability ?? {}) },
464
- paginator: { ...defaults.paginator, ...(customTexts?.paginator ?? {}) },
465
- warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
466
- table: { ...defaults.table, ...(customTexts?.table ?? {}) },
467
- validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
468
- };
469
- }
470
- function provideMapaUiTexts(texts) {
471
- return {
472
- provide: MAPA_UI_TEXTS,
473
- useValue: texts,
474
- };
475
- }
476
-
477
- class MapaI18nService {
478
- constructor(customTexts) {
479
- this.injector = inject(Injector);
480
- this.textsState = signal(mergeMapaUiTexts(), ...(ngDevMode ? [{ debugName: "textsState" }] : []));
481
- this.textsSignal = this.textsState.asReadonly();
482
- this.texts$ = toObservable(this.textsSignal, { injector: this.injector });
483
- if (customTexts) {
484
- this.textsState.set(mergeMapaUiTexts(customTexts));
485
- }
486
- }
487
- get texts() {
488
- return this.textsState();
489
- }
490
- setTexts(texts) {
491
- this.textsState.set(mergeMapaUiTexts(texts));
492
- }
493
- resolveValidationText(key, context) {
494
- return this.resolveText(this.texts.validation[key], context);
495
- }
496
- resolveText(value, context) {
497
- return typeof value === "function" ? value(context) : value;
498
- }
499
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaI18nService, deps: [{ token: MAPA_UI_TEXTS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
500
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaI18nService, providedIn: "root" }); }
501
- }
502
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaI18nService, decorators: [{
503
- type: Injectable,
504
- args: [{
505
- providedIn: "root",
506
- }]
507
- }], ctorParameters: () => [{ type: undefined, decorators: [{
508
- type: Optional
509
- }, {
510
- type: Inject,
511
- args: [MAPA_UI_TEXTS]
512
- }] }] });
513
-
514
- function getMapaDatepickerRangeFormats() {
515
- const dateInput = getActiveMaterialDateFormat();
516
- return {
517
- parse: {
518
- dateInput,
519
- },
520
- display: {
521
- dateInput,
522
- monthYearLabel: "MMM YYYY",
523
- dateA11yLabel: "LL",
524
- monthYearA11yLabel: "MMMM YYYY",
525
- },
526
- };
527
- }
528
- class MapaDatepickerRange {
529
- constructor(i18n, cdr) {
530
- this.i18n = i18n;
531
- this.cdr = cdr;
532
- this.destroyRef = inject(DestroyRef);
533
- this.dateAdapter = inject((DateAdapter));
534
- this.emptyValue = {
535
- startDate: null,
536
- endDate: null,
537
- };
538
- this.currentLocale = null;
539
- this.formDatepicker = new FormGroup({
540
- startDate: new FormControl(null),
541
- endDate: new FormControl(null),
542
- });
543
- this.formDisplay = new FormGroup({
544
- startDate: new FormControl(null),
545
- endDate: new FormControl(null),
546
- });
547
- }
548
- get texts() {
549
- return this.i18n.textsSignal();
550
- }
551
- get dateInputMask() {
552
- return getDateInputMask(this.getLocale());
553
- }
554
- get activeDateFormat() {
555
- return getActiveDateFormat(this.getLocale());
556
- }
557
- ngOnInit() {
558
- this.syncLocaleSettings();
559
- if (!this.element?.key) {
560
- throw new Error("mapa-datepicker-range requires element.key to resolve the target control.");
561
- }
562
- this.rangeControl = this.formGroup.get(this.element.key);
563
- if (!this.rangeControl) {
564
- throw new Error(`mapa-datepicker-range could not find control '${this.element.key}' in formGroup.`);
565
- }
566
- this.syncFromExternal(this.rangeControl.value);
567
- this.rangeControl.valueChanges
568
- .pipe(takeUntilDestroyed(this.destroyRef))
569
- .subscribe((value) => {
570
- this.syncFromExternal(value);
571
- });
572
- this.formDisplay.valueChanges
573
- .pipe(takeUntilDestroyed(this.destroyRef))
574
- .subscribe((value) => {
575
- this.updateExternalFromDisplay(value);
576
- });
577
- this.formDatepicker.valueChanges
578
- .pipe(takeUntilDestroyed(this.destroyRef))
579
- .subscribe((value) => {
580
- this.updateExternalFromDatepicker(value);
581
- });
582
- }
583
- ngDoCheck() {
584
- this.syncLocaleSettings();
585
- }
586
- get startDatePlaceholder() {
587
- return this.texts.datepicker.startDatePlaceholder;
588
- }
589
- get endDatePlaceholder() {
590
- return this.texts.datepicker.endDatePlaceholder;
591
- }
592
- syncFromExternal(value) {
593
- this.syncLocaleSettings();
594
- const nextValue = value ?? this.emptyValue;
595
- const displayValue = {
596
- startDate: nextValue.startDate,
597
- endDate: nextValue.endDate,
598
- };
599
- const datepickerValue = {
600
- startDate: parseDateFieldValue(nextValue.startDate, this.getLocale()),
601
- endDate: parseDateFieldValue(nextValue.endDate, this.getLocale()),
602
- };
603
- const currentDisplay = this.formDisplay.getRawValue();
604
- if (currentDisplay.startDate !== displayValue.startDate ||
605
- currentDisplay.endDate !== displayValue.endDate) {
606
- this.formDisplay.patchValue(displayValue, { emitEvent: false });
607
- }
608
- const currentDatepicker = this.formDatepicker.getRawValue();
609
- if (!this.areDatesEqual(currentDatepicker.startDate, datepickerValue.startDate) ||
610
- !this.areDatesEqual(currentDatepicker.endDate, datepickerValue.endDate)) {
611
- this.formDatepicker.patchValue(datepickerValue, { emitEvent: false });
612
- }
613
- this.cdr.markForCheck();
614
- }
615
- updateExternalFromDisplay(value) {
616
- this.syncLocaleSettings();
617
- const nextValue = {
618
- startDate: value.startDate ?? null,
619
- endDate: value.endDate ?? null,
620
- };
621
- this.patchExternalValue(nextValue);
622
- const nextDatepickerValue = {
623
- startDate: parseDateFieldValue(nextValue.startDate, this.getLocale()),
624
- endDate: parseDateFieldValue(nextValue.endDate, this.getLocale()),
625
- };
626
- this.formDatepicker.patchValue(nextDatepickerValue, { emitEvent: false });
627
- this.cdr.markForCheck();
628
- }
629
- updateExternalFromDatepicker(value) {
630
- this.syncLocaleSettings();
631
- if (!value.startDate || !value.endDate) {
632
- return;
633
- }
634
- const nextValue = {
635
- startDate: formatDateForLocale(value.startDate, this.getLocale()),
636
- endDate: formatDateForLocale(value.endDate, this.getLocale()),
637
- };
638
- this.patchExternalValue(nextValue);
639
- this.formDisplay.patchValue(nextValue, { emitEvent: false });
640
- this.cdr.markForCheck();
641
- }
642
- patchExternalValue(nextValue) {
643
- const currentValue = this.rangeControl.value;
644
- if (currentValue?.startDate === nextValue.startDate &&
645
- currentValue?.endDate === nextValue.endDate) {
646
- return;
647
- }
648
- this.rangeControl.patchValue(nextValue);
649
- }
650
- areDatesEqual(first, second) {
651
- if (first === second) {
652
- return true;
653
- }
654
- if (!first || !second) {
655
- return false;
656
- }
657
- return first.getTime() === second.getTime();
658
- }
659
- cleanDatepicker() {
660
- const defaultRange = {
661
- startDate: null,
662
- endDate: null,
663
- };
664
- this.formDatepicker.patchValue(defaultRange, { emitEvent: false });
665
- this.formDisplay.patchValue(defaultRange, { emitEvent: false });
666
- this.patchExternalValue(defaultRange);
667
- this.cdr.markForCheck();
668
- }
669
- getLocale() {
670
- return this.currentLocale ?? getActiveDateLocale();
671
- }
672
- syncLocaleSettings() {
673
- const nextLocale = getActiveDateLocale();
674
- if (this.currentLocale === nextLocale) {
675
- return;
676
- }
677
- this.currentLocale = nextLocale;
678
- this.dateAdapter.setLocale(nextLocale);
679
- const datepickerValue = this.formDatepicker.getRawValue();
680
- const hasDateRange = !!datepickerValue.startDate && !!datepickerValue.endDate;
681
- if (hasDateRange) {
682
- const formattedRange = {
683
- startDate: formatDateForLocale(datepickerValue.startDate, nextLocale),
684
- endDate: formatDateForLocale(datepickerValue.endDate, nextLocale),
685
- };
686
- this.formDisplay.patchValue(formattedRange, { emitEvent: false });
687
- if (this.rangeControl) {
688
- this.patchExternalValue(formattedRange);
689
- }
690
- }
691
- this.cdr.markForCheck();
692
- }
693
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDatepickerRange, deps: [{ token: MapaI18nService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
694
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDatepickerRange, isStandalone: true, selector: "mapa-datepicker-range", inputs: { formGroup: "formGroup", element: "element" }, providers: [
695
- provideNgxMask(),
696
- provideNativeDateAdapter(getMapaDatepickerRangeFormats()),
697
- ], ngImport: i0, template: "@if (element.label) {\n <div class=\"mapa-datepicker-range__label\">\n {{ element.label }}\n </div>\n}\n<section class=\"mapa-datepicker-range\" [formGroup]=\"formDisplay\">\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker-range__start-date\"\n >\n <input\n matInput\n formControlName=\"startDate\"\n [placeholder]=\"startDatePlaceholder\"\n [mask]=\"dateInputMask\"\n [dropSpecialCharacters]=\"false\"\n [attr.data-date-format]=\"activeDateFormat\"\n />\n </mat-form-field>\n <div class=\"mapa-datepicker-range__divider\">&ndash;</div>\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker-range__end-date\"\n >\n <input\n matInput\n formControlName=\"endDate\"\n [placeholder]=\"endDatePlaceholder\"\n [mask]=\"dateInputMask\"\n [dropSpecialCharacters]=\"false\"\n [attr.data-date-format]=\"activeDateFormat\"\n />\n <button\n type=\"button\"\n matSuffix\n aria-label=\"Limpar\"\n class=\"mapa-datepicker-range__clear\"\n (click)=\"cleanDatepicker()\"\n tabindex=\"-1\"\n >\n &times;\n </button>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker touchUi=\"true\" #picker></mat-date-range-picker>\n </mat-form-field>\n</section>\n<section class=\"mapa--hidden\">\n <mat-form-field [formGroup]=\"formDatepicker\">\n <mat-date-range-input [rangePicker]=\"picker\">\n <input matStartDate formControlName=\"startDate\" />\n <input matEndDate formControlName=\"endDate\" />\n </mat-date-range-input>\n </mat-form-field>\n</section>\n", styles: [":host{display:inline-block;width:310px;max-width:100%;min-width:0;box-sizing:border-box}:host ::ng-deep .mat-mdc-form-field-type-mat-date-range-input .mdc-text-field--outlined{background-color:#fff}:host ::ng-deep .mat-mdc-form-field-type-mat-date-range-input .mat-mdc-text-field-wrapper{min-height:48px!important;height:48px!important}:host ::ng-deep .mat-mdc-form-field-type-mat-date-range-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-datepicker-range{display:flex;align-items:center;justify-content:flex-start;background-color:var(--mapa-color-surface, #ffffff);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);overflow:hidden;box-sizing:border-box;padding:0 0 0 16px;min-height:48px;height:48px;width:100%}:host ::ng-deep .mapa-datepicker-range__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-datepicker-range__start-date,:host ::ng-deep .mapa-datepicker-range__end-date{display:flex;flex:1 1 0;align-items:center;align-self:stretch;min-width:0}:host ::ng-deep .mapa-datepicker-range__start-date .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker-range__start-date .mat-mdc-text-field-wrapper,:host ::ng-deep .mapa-datepicker-range__end-date .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker-range__end-date .mat-mdc-text-field-wrapper{width:100%;min-width:0}:host ::ng-deep .mapa-datepicker-range__end-date{flex-basis:72px}:host ::ng-deep .mapa-datepicker-range__divider{flex:none;margin:0 8px}:host ::ng-deep .mapa-datepicker-range__clear{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-datepicker-range__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix{display:flex;flex:none;align-items:center;gap:4px;margin-left:0;padding:unset!important}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix .mat-datepicker-toggle{margin:0}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-flex{display:flex;align-items:center;min-height:100%;height:48px!important}:host ::ng-deep .mapa-datepicker-range .mat-mdc-text-field-wrapper{padding:0!important;align-items:center!important;display:flex;background:var(--mapa-color-surface, #ffffff);min-height:100%}:host ::ng-deep .mapa-datepicker-range .mdc-notched-outline{display:none}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-infix{padding:0!important;margin-left:0!important;min-height:unset!important;border-top:unset!important;display:flex;align-items:center;height:100%}:host ::ng-deep .mapa-datepicker-range .mat-mdc-input-element{align-self:center;height:100%;line-height:24px;margin:0!important;padding:0 8px 0 0!important;text-align:left;vertical-align:middle}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa--hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "directive", type: MapaMaskAutofillSyncDirective, selector: "input[mask], textarea[mask]", inputs: ["mapaMaskAutofillSync"], exportAs: ["mapaMaskAutofillSync"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i3.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i3.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i3.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i3.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
698
- }
699
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDatepickerRange, decorators: [{
700
- type: Component,
701
- args: [{ selector: "mapa-datepicker-range", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
702
- CommonModule,
703
- ReactiveFormsModule,
704
- NgxMaskDirective,
705
- MapaMaskAutofillSyncDirective,
706
- MatDatepickerModule,
707
- MatFormFieldModule,
708
- MatIconModule,
709
- MatInputModule,
710
- ], providers: [
711
- provideNgxMask(),
712
- provideNativeDateAdapter(getMapaDatepickerRangeFormats()),
713
- ], standalone: true, template: "@if (element.label) {\n <div class=\"mapa-datepicker-range__label\">\n {{ element.label }}\n </div>\n}\n<section class=\"mapa-datepicker-range\" [formGroup]=\"formDisplay\">\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker-range__start-date\"\n >\n <input\n matInput\n formControlName=\"startDate\"\n [placeholder]=\"startDatePlaceholder\"\n [mask]=\"dateInputMask\"\n [dropSpecialCharacters]=\"false\"\n [attr.data-date-format]=\"activeDateFormat\"\n />\n </mat-form-field>\n <div class=\"mapa-datepicker-range__divider\">&ndash;</div>\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker-range__end-date\"\n >\n <input\n matInput\n formControlName=\"endDate\"\n [placeholder]=\"endDatePlaceholder\"\n [mask]=\"dateInputMask\"\n [dropSpecialCharacters]=\"false\"\n [attr.data-date-format]=\"activeDateFormat\"\n />\n <button\n type=\"button\"\n matSuffix\n aria-label=\"Limpar\"\n class=\"mapa-datepicker-range__clear\"\n (click)=\"cleanDatepicker()\"\n tabindex=\"-1\"\n >\n &times;\n </button>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker touchUi=\"true\" #picker></mat-date-range-picker>\n </mat-form-field>\n</section>\n<section class=\"mapa--hidden\">\n <mat-form-field [formGroup]=\"formDatepicker\">\n <mat-date-range-input [rangePicker]=\"picker\">\n <input matStartDate formControlName=\"startDate\" />\n <input matEndDate formControlName=\"endDate\" />\n </mat-date-range-input>\n </mat-form-field>\n</section>\n", styles: [":host{display:inline-block;width:310px;max-width:100%;min-width:0;box-sizing:border-box}:host ::ng-deep .mat-mdc-form-field-type-mat-date-range-input .mdc-text-field--outlined{background-color:#fff}:host ::ng-deep .mat-mdc-form-field-type-mat-date-range-input .mat-mdc-text-field-wrapper{min-height:48px!important;height:48px!important}:host ::ng-deep .mat-mdc-form-field-type-mat-date-range-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-datepicker-range{display:flex;align-items:center;justify-content:flex-start;background-color:var(--mapa-color-surface, #ffffff);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);overflow:hidden;box-sizing:border-box;padding:0 0 0 16px;min-height:48px;height:48px;width:100%}:host ::ng-deep .mapa-datepicker-range__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-datepicker-range__start-date,:host ::ng-deep .mapa-datepicker-range__end-date{display:flex;flex:1 1 0;align-items:center;align-self:stretch;min-width:0}:host ::ng-deep .mapa-datepicker-range__start-date .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker-range__start-date .mat-mdc-text-field-wrapper,:host ::ng-deep .mapa-datepicker-range__end-date .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker-range__end-date .mat-mdc-text-field-wrapper{width:100%;min-width:0}:host ::ng-deep .mapa-datepicker-range__end-date{flex-basis:72px}:host ::ng-deep .mapa-datepicker-range__divider{flex:none;margin:0 8px}:host ::ng-deep .mapa-datepicker-range__clear{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-datepicker-range__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix{display:flex;flex:none;align-items:center;gap:4px;margin-left:0;padding:unset!important}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix .mat-datepicker-toggle{margin:0}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-flex{display:flex;align-items:center;min-height:100%;height:48px!important}:host ::ng-deep .mapa-datepicker-range .mat-mdc-text-field-wrapper{padding:0!important;align-items:center!important;display:flex;background:var(--mapa-color-surface, #ffffff);min-height:100%}:host ::ng-deep .mapa-datepicker-range .mdc-notched-outline{display:none}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-infix{padding:0!important;margin-left:0!important;min-height:unset!important;border-top:unset!important;display:flex;align-items:center;height:100%}:host ::ng-deep .mapa-datepicker-range .mat-mdc-input-element{align-self:center;height:100%;line-height:24px;margin:0!important;padding:0 8px 0 0!important;text-align:left;vertical-align:middle}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa--hidden{display:none}\n"] }]
714
- }], ctorParameters: () => [{ type: MapaI18nService }, { type: i0.ChangeDetectorRef }], propDecorators: { formGroup: [{
715
- type: Input
716
- }], element: [{
717
- type: Input
718
- }] } });
719
-
720
- /*
721
- * Public API Surface of mapa-library-ui datepicker-range
722
- */
723
-
724
- /*
725
- * Public API Surface of mapa-library-ui datepicker-range
726
- */
727
-
728
- /**
729
- * Generated bundle index. Do not edit.
730
- */
731
-
732
- export { MapaDatepickerRange, getMapaDatepickerRangeFormats };
733
- //# sourceMappingURL=mapa-library-ui-src-lib-components-datepicker-range.mjs.map