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
|
@@ -1,24 +1,87 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
1
|
+
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, Input, Component, ElementRef, DestroyRef, booleanAttribute, Directive, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, Input, Component, ElementRef, DestroyRef, booleanAttribute, Directive, effect, ChangeDetectorRef, EventEmitter, HostListener, ViewChild, Output, ChangeDetectionStrategy } from '@angular/core';
|
|
5
4
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import * as i2
|
|
5
|
+
import * as i2 from '@angular/common';
|
|
6
|
+
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
7
|
+
import * as i1 from '@angular/forms';
|
|
7
8
|
import { NgControl, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import
|
|
9
|
-
import * as i3 from '@angular/material/datepicker';
|
|
10
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
11
|
-
import * as i4 from '@angular/material/form-field';
|
|
9
|
+
import * as i2$1 from '@angular/material/form-field';
|
|
12
10
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
13
|
-
import
|
|
14
|
-
import * as i5 from '@angular/material/input';
|
|
11
|
+
import * as i3 from '@angular/material/input';
|
|
15
12
|
import { MatInputModule } from '@angular/material/input';
|
|
16
13
|
import { NgxMaskDirective, NgxMaskService, provideNgxMask } from 'ngx-mask';
|
|
14
|
+
import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
|
|
17
15
|
import { AutofillMonitor } from '@angular/cdk/text-field';
|
|
18
16
|
import { filter } from 'rxjs/operators';
|
|
19
17
|
import { getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
class ElementBase {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
this.value = options.value || "";
|
|
22
|
+
this.key = options.key || "";
|
|
23
|
+
this.label = options.label || "";
|
|
24
|
+
this.required = !!options.required;
|
|
25
|
+
this.order = options.order === undefined ? 1 : options.order;
|
|
26
|
+
this.controlType = options.controlType || "";
|
|
27
|
+
this.type = options.type || "";
|
|
28
|
+
this.placeholder = options.placeholder || "";
|
|
29
|
+
this.readonly = options.readonly || false;
|
|
30
|
+
this.hint = options.hint || "";
|
|
31
|
+
this.prefix = options.prefix || "";
|
|
32
|
+
this.suffix = options.suffix || "";
|
|
33
|
+
this.autosize = options.autosize || false;
|
|
34
|
+
this.autosizeMinWidth = options.autosizeMinWidth || "212px";
|
|
35
|
+
this.autosizeMaxWidth = options.autosizeMaxWidth || "400px";
|
|
36
|
+
this.autosizeMinRow = options.autosizeMinRow || 2;
|
|
37
|
+
this.autosizeMaxRow = options.autosizeMaxRow || 5;
|
|
38
|
+
this.options = options.options || [];
|
|
39
|
+
this.tree = options.tree || [];
|
|
40
|
+
this.multiple = options.multiple || false;
|
|
41
|
+
this.search = options.search || undefined;
|
|
42
|
+
this.maxLength = options.maxLength || null;
|
|
43
|
+
this.errors = options.errors || undefined;
|
|
44
|
+
this.actionButton = options.actionButton || undefined;
|
|
45
|
+
this.mask = options.mask || undefined;
|
|
46
|
+
this.autocomplete = options.autocomplete || "";
|
|
47
|
+
this.clearValue =
|
|
48
|
+
options.clearValue !== undefined ? options.clearValue : true;
|
|
49
|
+
this.minDate = options.minDate || undefined;
|
|
50
|
+
this.maxDate = options.maxDate || undefined;
|
|
51
|
+
this.status = options.status || undefined;
|
|
52
|
+
this.checkParent = options.checkParent || false;
|
|
53
|
+
this.checkChildren = options.checkChildren || false;
|
|
54
|
+
this.openedChange = options.openedChange || undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
class Datepicker extends ElementBase {
|
|
59
|
+
constructor(options = {}) {
|
|
60
|
+
super(options);
|
|
61
|
+
this.controlType = 'datepicker';
|
|
62
|
+
this.mode = options.mode || 'single';
|
|
63
|
+
this.disabledDates = options.disabledDates || undefined;
|
|
64
|
+
this.isInvalidDate = options.isInvalidDate || undefined;
|
|
65
|
+
this.presets = options.presets || undefined;
|
|
66
|
+
this.presetsLabel = options.presetsLabel || undefined;
|
|
67
|
+
this.calendars = options.calendars || undefined;
|
|
68
|
+
this.weekStart = options.weekStart ?? null;
|
|
69
|
+
this.closeOnSelect =
|
|
70
|
+
options.closeOnSelect !== undefined ? options.closeOnSelect : true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Use `Datepicker` with `mode: "range"`.
|
|
75
|
+
* Kept as a compatibility bridge for 2.x consumers.
|
|
76
|
+
*/
|
|
77
|
+
class DatepickerRange extends Datepicker {
|
|
78
|
+
constructor(options = {}) {
|
|
79
|
+
super({ ...options, mode: 'range' });
|
|
80
|
+
this.controlType = 'datepicker-range';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const MAPA_UI_TEXTS = new InjectionToken('MAPA_UI_TEXTS');
|
|
22
85
|
function formatPaginatorRange(page, pageSize, length) {
|
|
23
86
|
if (length === 0 || pageSize === 0) {
|
|
24
87
|
return `0 de ${length}`;
|
|
@@ -32,66 +95,73 @@ function formatPaginatorRange(page, pageSize, length) {
|
|
|
32
95
|
}
|
|
33
96
|
function formatPaginatorShowingRange(page, pageSize, length) {
|
|
34
97
|
if (length === 0 || pageSize === 0) {
|
|
35
|
-
return
|
|
98
|
+
return 'Mostrando 0 - 0 de 0 item';
|
|
36
99
|
}
|
|
37
100
|
const safeLength = Math.max(length, 0);
|
|
38
101
|
const startIndex = page * pageSize;
|
|
39
102
|
const endIndex = startIndex < safeLength
|
|
40
103
|
? Math.min(startIndex + pageSize, safeLength)
|
|
41
104
|
: startIndex + pageSize;
|
|
42
|
-
const itemLabel = safeLength === 1 ?
|
|
105
|
+
const itemLabel = safeLength === 1 ? 'item' : 'itens';
|
|
43
106
|
return `Mostrando ${startIndex + 1} - ${endIndex} de ${safeLength} ${itemLabel}`;
|
|
44
107
|
}
|
|
45
108
|
const DEFAULT_MAPA_UI_TEXTS = {
|
|
46
109
|
common: {
|
|
47
|
-
selectAll:
|
|
110
|
+
selectAll: 'Selecionar todos',
|
|
111
|
+
retry: 'Tentar novamente',
|
|
48
112
|
},
|
|
49
113
|
filters: {
|
|
50
|
-
clear:
|
|
51
|
-
submit:
|
|
114
|
+
clear: 'Limpar filtros',
|
|
115
|
+
submit: 'Filtrar',
|
|
52
116
|
},
|
|
53
117
|
datepicker: {
|
|
54
|
-
startDatePlaceholder:
|
|
55
|
-
endDatePlaceholder:
|
|
118
|
+
startDatePlaceholder: 'Data inicial',
|
|
119
|
+
endDatePlaceholder: 'Data final',
|
|
56
120
|
},
|
|
57
121
|
capability: {
|
|
58
|
-
groupAverageTitle:
|
|
59
|
-
individualAverageTitle:
|
|
60
|
-
conceptTitle:
|
|
61
|
-
resultTitle:
|
|
62
|
-
positiveIndicatorsTitle:
|
|
63
|
-
negativeIndicatorsTitle:
|
|
64
|
-
riskIndicatorsTitle:
|
|
65
|
-
precipitationRiskTitle:
|
|
66
|
-
negligenceRiskTitle:
|
|
67
|
-
negativeDirectionLabel:
|
|
68
|
-
positiveDirectionLabel:
|
|
122
|
+
groupAverageTitle: 'Média geral do grupo',
|
|
123
|
+
individualAverageTitle: 'Média geral do indivíduo',
|
|
124
|
+
conceptTitle: 'Conceito',
|
|
125
|
+
resultTitle: 'Resultado',
|
|
126
|
+
positiveIndicatorsTitle: 'Indicadores positivos',
|
|
127
|
+
negativeIndicatorsTitle: 'Indicadores negativos',
|
|
128
|
+
riskIndicatorsTitle: 'Indicadores de risco',
|
|
129
|
+
precipitationRiskTitle: 'Risco de acidente por precipitação',
|
|
130
|
+
negligenceRiskTitle: 'Risco de acidente por negligência',
|
|
131
|
+
negativeDirectionLabel: 'Direção Negativa |',
|
|
132
|
+
positiveDirectionLabel: 'Direção Positiva |',
|
|
69
133
|
},
|
|
70
134
|
paginator: {
|
|
71
|
-
itemsPerPage:
|
|
72
|
-
nextPage:
|
|
73
|
-
previousPage:
|
|
135
|
+
itemsPerPage: 'Itens por página',
|
|
136
|
+
nextPage: 'Próxima página',
|
|
137
|
+
previousPage: 'Página anterior',
|
|
74
138
|
rangeLabel: formatPaginatorRange,
|
|
75
139
|
showingRangeLabel: formatPaginatorShowingRange,
|
|
76
140
|
},
|
|
77
141
|
warning: {
|
|
78
|
-
lowReliabilityTitle:
|
|
79
|
-
expirationLimitTitle:
|
|
142
|
+
lowReliabilityTitle: 'Nível baixo de confiabilidade no(s) teste(s):',
|
|
143
|
+
expirationLimitTitle: 'O prazo de validade do(s) teste(s) está no limite:',
|
|
80
144
|
},
|
|
81
145
|
table: {
|
|
82
|
-
emptyTitle:
|
|
83
|
-
emptySubtitle:
|
|
146
|
+
emptyTitle: 'Não foram encontrados resultados',
|
|
147
|
+
emptySubtitle: '',
|
|
148
|
+
loading: 'Carregando resultados',
|
|
149
|
+
errorTitle: 'Não foi possível carregar os resultados.',
|
|
150
|
+
selectAllVisible: 'Selecionar todos os itens desta página',
|
|
151
|
+
selectionColumn: 'Seleção',
|
|
152
|
+
selectRow: 'Selecionar item',
|
|
153
|
+
selectNamedRow: (item) => `Selecionar ${item}`,
|
|
84
154
|
},
|
|
85
155
|
validation: {
|
|
86
|
-
cnpj:
|
|
87
|
-
cpf:
|
|
88
|
-
email:
|
|
89
|
-
max: (context) => `O valor máximo permitido é ${context?.max ??
|
|
90
|
-
maxLength: (context) => `O máximo permitido é ${context?.requiredLength ??
|
|
91
|
-
min: (context) => `O valor mínimo permitido é ${context?.min ??
|
|
92
|
-
minLength: (context) => `O mínimo permitido é ${context?.requiredLength ??
|
|
93
|
-
pattern:
|
|
94
|
-
required:
|
|
156
|
+
cnpj: 'CNPJ inválido',
|
|
157
|
+
cpf: 'CPF inválido',
|
|
158
|
+
email: 'E-mail inválido',
|
|
159
|
+
max: (context) => `O valor máximo permitido é ${context?.max ?? ''}`.trim(),
|
|
160
|
+
maxLength: (context) => `O máximo permitido é ${context?.requiredLength ?? ''} caracteres`.trim(),
|
|
161
|
+
min: (context) => `O valor mínimo permitido é ${context?.min ?? ''}`.trim(),
|
|
162
|
+
minLength: (context) => `O mínimo permitido é ${context?.requiredLength ?? ''} caracteres`.trim(),
|
|
163
|
+
pattern: 'Formato inválido',
|
|
164
|
+
required: 'Campo obrigatório',
|
|
95
165
|
},
|
|
96
166
|
};
|
|
97
167
|
function getDefaultTexts() {
|
|
@@ -430,9 +500,6 @@ function isMonthFirstDateLocale(locale = getActiveDateLocale()) {
|
|
|
430
500
|
function getActiveDateFormat(locale = getActiveDateLocale()) {
|
|
431
501
|
return isMonthFirstDateLocale(locale) ? "MM/DD/YYYY" : "DD/MM/YYYY";
|
|
432
502
|
}
|
|
433
|
-
function getActiveMaterialDateFormat(locale = getActiveDateLocale()) {
|
|
434
|
-
return isMonthFirstDateLocale(locale) ? "MM/dd/yyyy" : "dd/MM/yyyy";
|
|
435
|
-
}
|
|
436
503
|
function getDateInputMask(_locale = getActiveDateLocale()) {
|
|
437
504
|
return "00/00/0000";
|
|
438
505
|
}
|
|
@@ -600,134 +667,590 @@ function toUtcDayExclusiveEndIso(value) {
|
|
|
600
667
|
return date ? buildUtcDate(date, 1, 3, 0, 0, 0).toISOString() : undefined;
|
|
601
668
|
}
|
|
602
669
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
670
|
+
/**
|
|
671
|
+
* Locale de data ativo exposto como sinal.
|
|
672
|
+
*
|
|
673
|
+
* `getActiveDateLocale()` lê do localStorage, que não é reativo. Em vez de
|
|
674
|
+
* consultar o valor a cada ciclo de change detection, observamos o
|
|
675
|
+
* `textsSignal` do `MapaI18nService`: toda troca de idioma do ecossistema
|
|
676
|
+
* passa por `setTexts()`. Como effects do Angular são agendados e não
|
|
677
|
+
* síncronos, quando o corpo do effect roda a gravação no localStorage feita
|
|
678
|
+
* logo após o `setTexts()` já aconteceu.
|
|
679
|
+
*
|
|
680
|
+
* Root-provided de propósito: um effect para toda a aplicação em vez de um por
|
|
681
|
+
* instância de datepicker.
|
|
682
|
+
*/
|
|
683
|
+
class MapaDateLocaleService {
|
|
684
|
+
constructor() {
|
|
685
|
+
this.i18n = inject(MapaI18nService);
|
|
686
|
+
this.localeState = signal(getActiveDateLocale(), ...(ngDevMode ? [{ debugName: "localeState" }] : []));
|
|
687
|
+
this.localeSignal = this.localeState.asReadonly();
|
|
688
|
+
effect(() => {
|
|
689
|
+
this.i18n.textsSignal();
|
|
690
|
+
this.refresh();
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Relê o locale do storage. Cinto de segurança para consumidores que trocam
|
|
695
|
+
* o idioma sem passar por `setTexts()`.
|
|
696
|
+
*/
|
|
697
|
+
refresh() {
|
|
698
|
+
const nextLocale = getActiveDateLocale();
|
|
699
|
+
if (this.localeState() !== nextLocale) {
|
|
700
|
+
this.localeState.set(nextLocale);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDateLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
704
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDateLocaleService, providedIn: "root" }); }
|
|
705
|
+
}
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDateLocaleService, decorators: [{
|
|
707
|
+
type: Injectable,
|
|
708
|
+
args: [{ providedIn: "root" }]
|
|
709
|
+
}], ctorParameters: () => [] });
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Fallback do gatilho de presets. Literal como o `aria-label="Limpar"` que o
|
|
713
|
+
* v1 e o `mapa-dropdown` já embarcam — `MapaUiTextGroups["datepicker"]` vem do
|
|
714
|
+
* pacote externo `mapa-frontend-i18n`, então uma chave nova exigiria publicar
|
|
715
|
+
* aquele pacote antes. Consumidores sobrescrevem via `element.presetsLabel`.
|
|
716
|
+
*/
|
|
717
|
+
const DEFAULT_PRESETS_LABEL = 'Período';
|
|
718
|
+
/**
|
|
719
|
+
* O `Intl` interno do ngxsmk trabalha melhor com tags BCP47 completas — `en`
|
|
720
|
+
* sozinho deixa a ordem dia/mês ambígua para ele.
|
|
721
|
+
*/
|
|
722
|
+
const NGXSMK_LOCALE_BY_MAPA_LOCALE = {
|
|
723
|
+
'pt-BR': 'pt-BR',
|
|
724
|
+
en: 'en-US',
|
|
725
|
+
es: 'es-ES',
|
|
613
726
|
};
|
|
614
727
|
class MapaDatepicker {
|
|
615
|
-
constructor(
|
|
616
|
-
this.cdr =
|
|
728
|
+
constructor() {
|
|
729
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
617
730
|
this.destroyRef = inject(DestroyRef);
|
|
618
|
-
this.
|
|
619
|
-
|
|
731
|
+
this.i18n = inject(MapaI18nService);
|
|
732
|
+
this.dateLocale = inject(MapaDateLocaleService);
|
|
733
|
+
this.openedChange = new EventEmitter();
|
|
734
|
+
/** Camada visível: strings mascaradas. `single` usa apenas `startDate`. */
|
|
735
|
+
this.formDisplay = new FormGroup({
|
|
736
|
+
startDate: new FormControl(null),
|
|
737
|
+
endDate: new FormControl(null),
|
|
620
738
|
});
|
|
739
|
+
/** Camada do calendário: `Date`, no formato que o ngxsmk consome. */
|
|
740
|
+
this.pickerValue = signal(null, ...(ngDevMode ? [{ debugName: "pickerValue" }] : []));
|
|
741
|
+
this.isOpenState = signal(false, ...(ngDevMode ? [{ debugName: "isOpenState" }] : []));
|
|
742
|
+
this.isPresetsOpenState = signal(false, ...(ngDevMode ? [{ debugName: "isPresetsOpenState" }] : []));
|
|
743
|
+
this.localeState = null;
|
|
744
|
+
this.syncing = false;
|
|
745
|
+
this.overlayPositions = [
|
|
746
|
+
{
|
|
747
|
+
originX: 'start',
|
|
748
|
+
originY: 'bottom',
|
|
749
|
+
overlayX: 'start',
|
|
750
|
+
overlayY: 'top',
|
|
751
|
+
offsetY: 8,
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
originX: 'start',
|
|
755
|
+
originY: 'top',
|
|
756
|
+
overlayX: 'start',
|
|
757
|
+
overlayY: 'bottom',
|
|
758
|
+
offsetY: -8,
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
originX: 'end',
|
|
762
|
+
originY: 'bottom',
|
|
763
|
+
overlayX: 'end',
|
|
764
|
+
overlayY: 'top',
|
|
765
|
+
offsetY: 8,
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
originX: 'end',
|
|
769
|
+
originY: 'top',
|
|
770
|
+
overlayX: 'end',
|
|
771
|
+
overlayY: 'bottom',
|
|
772
|
+
offsetY: -8,
|
|
773
|
+
},
|
|
774
|
+
];
|
|
775
|
+
/**
|
|
776
|
+
* Referências estáveis: com OnPush, devolver um literal novo a cada ciclo
|
|
777
|
+
* marcaria o input do ngxsmk como alterado em toda change detection.
|
|
778
|
+
*/
|
|
779
|
+
this.ngxsmkClasses = { inputGroup: 'mapa-datepicker__ngxsmk-group' };
|
|
780
|
+
this.emptyDisabledDates = [];
|
|
781
|
+
this.neverInvalid = () => false;
|
|
782
|
+
this.localeSync = effect(() => {
|
|
783
|
+
this.handleLocaleChange(this.dateLocale.localeSignal());
|
|
784
|
+
}, ...(ngDevMode ? [{ debugName: "localeSync" }] : []));
|
|
621
785
|
}
|
|
622
786
|
ngOnInit() {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
787
|
+
if (!this.element?.key) {
|
|
788
|
+
throw new Error('mapa-datepicker: element.key é obrigatório.');
|
|
789
|
+
}
|
|
790
|
+
const control = this.formGroup?.get(this.element.key);
|
|
791
|
+
if (!control) {
|
|
792
|
+
throw new Error(`mapa-datepicker: controle "${this.element.key}" não encontrado no formGroup.`);
|
|
793
|
+
}
|
|
794
|
+
this.control = control;
|
|
795
|
+
this.applyExternal(this.control.value);
|
|
796
|
+
this.control.valueChanges
|
|
626
797
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
627
|
-
.subscribe((value) =>
|
|
628
|
-
|
|
629
|
-
});
|
|
630
|
-
this.formDatepicker.controls.date.valueChanges
|
|
798
|
+
.subscribe((value) => this.applyExternal(value));
|
|
799
|
+
this.control.statusChanges
|
|
631
800
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
632
|
-
.subscribe((
|
|
633
|
-
|
|
634
|
-
|
|
801
|
+
.subscribe(() => this.cdr.markForCheck());
|
|
802
|
+
this.formDisplay.valueChanges
|
|
803
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
804
|
+
.subscribe(() => this.handleDisplayChange());
|
|
805
|
+
}
|
|
806
|
+
// --- estado exposto ao template -----------------------------------------
|
|
807
|
+
mode() {
|
|
808
|
+
return this.element?.mode ?? 'single';
|
|
809
|
+
}
|
|
810
|
+
isOpen() {
|
|
811
|
+
return this.isOpenState();
|
|
812
|
+
}
|
|
813
|
+
isDisabled() {
|
|
814
|
+
return !!this.control?.disabled;
|
|
815
|
+
}
|
|
816
|
+
isReadonly() {
|
|
817
|
+
return !!this.element?.readonly;
|
|
818
|
+
}
|
|
819
|
+
hasValue() {
|
|
820
|
+
return this.serializeExternal(this.control?.value) !== '';
|
|
821
|
+
}
|
|
822
|
+
showClear() {
|
|
823
|
+
return this.hasValue() && !this.isDisabled() && !!this.element.clearValue;
|
|
635
824
|
}
|
|
636
|
-
|
|
825
|
+
shouldShowError() {
|
|
826
|
+
return (!!this.control &&
|
|
827
|
+
this.control.invalid &&
|
|
828
|
+
(this.control.dirty || this.control.touched));
|
|
829
|
+
}
|
|
830
|
+
/** Texto somente leitura do modo `multiple` — evita chaves novas de i18n. */
|
|
831
|
+
selectedLabel() {
|
|
832
|
+
const value = this.control?.value;
|
|
833
|
+
return Array.isArray(value) ? value.join(', ') : '';
|
|
834
|
+
}
|
|
835
|
+
mask() {
|
|
836
|
+
return this.element.mask ?? getDateInputMask(this.locale());
|
|
837
|
+
}
|
|
838
|
+
singlePlaceholder() {
|
|
839
|
+
return this.element.placeholder || this.element.label || '';
|
|
840
|
+
}
|
|
841
|
+
get startDatePlaceholder() {
|
|
842
|
+
return this.i18n.textsSignal().datepicker.startDatePlaceholder;
|
|
843
|
+
}
|
|
844
|
+
get endDatePlaceholder() {
|
|
845
|
+
return this.i18n.textsSignal().datepicker.endDatePlaceholder;
|
|
846
|
+
}
|
|
847
|
+
// --- entradas repassadas ao ngxsmk --------------------------------------
|
|
848
|
+
ngxsmkLocale() {
|
|
849
|
+
return NGXSMK_LOCALE_BY_MAPA_LOCALE[this.locale()];
|
|
850
|
+
}
|
|
851
|
+
displayFormat() {
|
|
852
|
+
return getActiveDateFormat(this.locale());
|
|
853
|
+
}
|
|
854
|
+
minDate() {
|
|
637
855
|
return parseDateValue(this.element.minDate);
|
|
638
856
|
}
|
|
639
|
-
|
|
857
|
+
maxDate() {
|
|
640
858
|
return parseDateValue(this.element.maxDate);
|
|
641
859
|
}
|
|
642
|
-
|
|
643
|
-
return
|
|
860
|
+
disabledDates() {
|
|
861
|
+
return this.element.disabledDates ?? this.emptyDisabledDates;
|
|
644
862
|
}
|
|
645
|
-
|
|
646
|
-
this.
|
|
647
|
-
|
|
863
|
+
isInvalidDate() {
|
|
864
|
+
return this.element.isInvalidDate ?? this.neverInvalid;
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Um mês por padrão em todos os modos, para o painel ficar na largura do
|
|
868
|
+
* campo. Dois meses são opt-in via `element.calendars`.
|
|
869
|
+
*/
|
|
870
|
+
calendars() {
|
|
871
|
+
return this.element.calendars ?? 1;
|
|
872
|
+
}
|
|
873
|
+
weekStart() {
|
|
874
|
+
return this.element.weekStart;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Presets já resolvidos em datas. Memoizado pela referência de
|
|
878
|
+
* `element.presets` para não reconstruir `Date`s a cada change detection.
|
|
879
|
+
*
|
|
880
|
+
* Alimenta o nosso dropdown, não o painel nativo do ngxsmk: o layout dele é
|
|
881
|
+
* ditado por media queries duplicadas que nenhum input ou variável controla
|
|
882
|
+
* (coluna lateral acima de 992px, cards de 45px acima de 1024px), e o input
|
|
883
|
+
* `classes` do componente de presets é morto — o template dele nunca o lê.
|
|
884
|
+
*/
|
|
885
|
+
presetList() {
|
|
886
|
+
const presets = this.element.presets;
|
|
887
|
+
const cache = this.presetsCache;
|
|
888
|
+
if (cache && cache.source === presets) {
|
|
889
|
+
return cache.entries;
|
|
890
|
+
}
|
|
891
|
+
const entries = this.buildPresetEntries(presets);
|
|
892
|
+
this.presetsCache = { source: presets, entries };
|
|
893
|
+
return entries;
|
|
894
|
+
}
|
|
895
|
+
hasPresets() {
|
|
896
|
+
return this.presetList().length > 0;
|
|
897
|
+
}
|
|
898
|
+
isPresetsOpen() {
|
|
899
|
+
return this.isPresetsOpenState();
|
|
900
|
+
}
|
|
901
|
+
isPresetActive(entry) {
|
|
902
|
+
const locale = this.locale();
|
|
903
|
+
return (this.serializeExternal({
|
|
904
|
+
startDate: formatDateForLocale(entry.range[0], locale),
|
|
905
|
+
endDate: formatDateForLocale(entry.range[1], locale),
|
|
906
|
+
}) === this.serializeExternal(this.control?.value));
|
|
907
|
+
}
|
|
908
|
+
presetsTriggerLabel() {
|
|
909
|
+
const active = this.presetList().find((entry) => this.isPresetActive(entry));
|
|
910
|
+
return active?.label ?? this.element.presetsLabel ?? DEFAULT_PRESETS_LABEL;
|
|
911
|
+
}
|
|
912
|
+
togglePresets() {
|
|
913
|
+
this.isPresetsOpenState.update((isOpen) => !isOpen);
|
|
914
|
+
}
|
|
915
|
+
closePresets() {
|
|
916
|
+
if (this.isPresetsOpenState()) {
|
|
917
|
+
this.isPresetsOpenState.set(false);
|
|
918
|
+
this.cdr.markForCheck();
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
applyPreset(entry) {
|
|
922
|
+
this.closePresets();
|
|
923
|
+
if (this.isDisabled()) {
|
|
648
924
|
return;
|
|
649
925
|
}
|
|
650
|
-
|
|
651
|
-
|
|
926
|
+
// `selectRange` reposiciona o mês visível para o início da faixa e emite
|
|
927
|
+
// `valueChange` uma única vez, caindo no `handlePickerValue`. Em modo
|
|
928
|
+
// inline ele não fecha nada — quem fecha continua sendo o nosso overlay.
|
|
929
|
+
if (this.picker) {
|
|
930
|
+
this.picker.selectRange([entry.range[0], entry.range[1]]);
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
this.handlePickerValue({ start: entry.range[0], end: entry.range[1] });
|
|
652
934
|
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
// independentemente do idioma ativo — a leitura precisa casar com a escrita.
|
|
657
|
-
const nextDate = parseDateFieldValue(value, "pt-BR");
|
|
658
|
-
const currentDate = this.formDatepicker.controls.date.value;
|
|
659
|
-
if (this.areDatesEqual(currentDate, nextDate)) {
|
|
935
|
+
// --- interação ------------------------------------------------------------
|
|
936
|
+
toggleCalendar() {
|
|
937
|
+
if (this.isDisabled() || this.isReadonly()) {
|
|
660
938
|
return;
|
|
661
939
|
}
|
|
662
|
-
this.
|
|
663
|
-
|
|
940
|
+
const isOpening = !this.isOpenState();
|
|
941
|
+
if (isOpening) {
|
|
942
|
+
this.dateLocale.refresh();
|
|
943
|
+
}
|
|
944
|
+
this.setOpenState(isOpening);
|
|
945
|
+
if (!isOpening) {
|
|
946
|
+
this.control.markAsTouched();
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
closeCalendar() {
|
|
950
|
+
if (this.isOpenState()) {
|
|
951
|
+
this.setOpenState(false);
|
|
952
|
+
}
|
|
953
|
+
this.control?.markAsTouched();
|
|
664
954
|
}
|
|
665
|
-
|
|
666
|
-
if (
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
955
|
+
handleOverlayOutsideClick(event) {
|
|
956
|
+
if (this.toggleButton?.nativeElement.contains(event.target)) {
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
this.closeCalendar();
|
|
960
|
+
}
|
|
961
|
+
handleEscape() {
|
|
962
|
+
// Dois estágios: o Escape fecha primeiro o dropdown de presets, e só o
|
|
963
|
+
// segundo fecha o calendário.
|
|
964
|
+
if (this.isPresetsOpenState()) {
|
|
965
|
+
this.closePresets();
|
|
966
|
+
return;
|
|
967
|
+
}
|
|
968
|
+
if (this.isOpenState()) {
|
|
969
|
+
this.closeCalendar();
|
|
970
|
+
this.toggleButton?.nativeElement.focus();
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
/** Seleção vinda do calendário. */
|
|
974
|
+
handlePickerValue(value) {
|
|
975
|
+
const next = this.toExternal(value, this.locale());
|
|
976
|
+
this.closePresets();
|
|
977
|
+
this.patchDisplay(this.toDisplayValue(next));
|
|
978
|
+
this.pickerValue.set(value);
|
|
979
|
+
// Um range pela metade nunca chega ao consumidor: o ngxsmk emite
|
|
980
|
+
// `{ start, end: null }` já no primeiro clique.
|
|
981
|
+
if (this.mode() === 'range' && !this.isCompleteRange(next)) {
|
|
982
|
+
this.cdr.markForCheck();
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
this.emitExternal(next);
|
|
986
|
+
if (this.element.closeOnSelect && this.shouldCloseAfterSelect(next)) {
|
|
987
|
+
this.closeCalendar();
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
clear(event) {
|
|
991
|
+
event?.stopPropagation();
|
|
992
|
+
if (this.isDisabled()) {
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
this.patchDisplay({ startDate: null, endDate: null });
|
|
996
|
+
this.pickerValue.set(null);
|
|
997
|
+
this.emitExternal(this.emptyValue());
|
|
998
|
+
this.control.markAsTouched();
|
|
999
|
+
}
|
|
1000
|
+
// --- sincronização --------------------------------------------------------
|
|
1001
|
+
locale() {
|
|
1002
|
+
return this.localeState ?? this.dateLocale.localeSignal();
|
|
1003
|
+
}
|
|
1004
|
+
handleLocaleChange(locale) {
|
|
1005
|
+
const previousLocale = this.localeState;
|
|
1006
|
+
this.localeState = locale;
|
|
1007
|
+
// O effect roda uma primeira vez antes de haver troca real de idioma, e
|
|
1008
|
+
// pode rodar antes do ngOnInit resolver o controle.
|
|
1009
|
+
if (!this.control || previousLocale === null || previousLocale === locale) {
|
|
1010
|
+
this.cdr.markForCheck();
|
|
1011
|
+
return;
|
|
1012
|
+
}
|
|
1013
|
+
const picker = this.pickerValue();
|
|
1014
|
+
// Reformatamos a partir das datas já resolvidas, nunca reinterpretando o
|
|
1015
|
+
// texto: assim um valor meio digitado ou inválido sobrevive à troca.
|
|
1016
|
+
if (!picker) {
|
|
1017
|
+
this.cdr.markForCheck();
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
const next = this.toExternal(picker, locale);
|
|
1021
|
+
this.patchDisplay(this.toDisplayValue(next));
|
|
1022
|
+
this.emitExternal(next);
|
|
1023
|
+
}
|
|
1024
|
+
/** Digitação no campo mascarado. Passa o texto adiante verbatim. */
|
|
1025
|
+
handleDisplayChange() {
|
|
1026
|
+
if (this.syncing || this.mode() === 'multiple' || !this.control) {
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
const display = this.formDisplay.getRawValue();
|
|
1030
|
+
const next = this.mode() === 'range'
|
|
1031
|
+
? {
|
|
1032
|
+
startDate: display.startDate || null,
|
|
1033
|
+
endDate: display.endDate || null,
|
|
670
1034
|
}
|
|
1035
|
+
: (display.startDate ?? '');
|
|
1036
|
+
this.pickerValue.set(this.toPickerValue(next, this.locale()));
|
|
1037
|
+
this.emitExternal(next);
|
|
1038
|
+
}
|
|
1039
|
+
applyExternal(value) {
|
|
1040
|
+
if (this.syncing) {
|
|
671
1041
|
return;
|
|
672
1042
|
}
|
|
673
|
-
const
|
|
674
|
-
|
|
1043
|
+
const display = this.toDisplayValue(value);
|
|
1044
|
+
const current = this.formDisplay.getRawValue();
|
|
1045
|
+
if (current.startDate !== display.startDate ||
|
|
1046
|
+
current.endDate !== display.endDate) {
|
|
1047
|
+
this.patchDisplay(display);
|
|
1048
|
+
}
|
|
1049
|
+
this.pickerValue.set(this.toPickerValue(value, this.locale()));
|
|
1050
|
+
this.cdr.markForCheck();
|
|
1051
|
+
}
|
|
1052
|
+
emitExternal(next) {
|
|
1053
|
+
// Comparação pela string formatada, não por `Date`: presets devolvem o fim
|
|
1054
|
+
// do range às 23:59:59.999 e um guard por `getTime()` reemitiria em loop.
|
|
1055
|
+
if (this.serializeExternal(this.control.value) ===
|
|
1056
|
+
this.serializeExternal(next)) {
|
|
1057
|
+
this.cdr.markForCheck();
|
|
675
1058
|
return;
|
|
676
1059
|
}
|
|
677
|
-
this.
|
|
1060
|
+
this.syncing = true;
|
|
1061
|
+
try {
|
|
1062
|
+
this.control.patchValue(next);
|
|
1063
|
+
this.control.markAsDirty();
|
|
1064
|
+
}
|
|
1065
|
+
finally {
|
|
1066
|
+
this.syncing = false;
|
|
1067
|
+
}
|
|
678
1068
|
this.cdr.markForCheck();
|
|
679
1069
|
}
|
|
680
|
-
|
|
681
|
-
|
|
1070
|
+
patchDisplay(display) {
|
|
1071
|
+
this.syncing = true;
|
|
1072
|
+
try {
|
|
1073
|
+
this.formDisplay.patchValue(display, { emitEvent: false });
|
|
1074
|
+
}
|
|
1075
|
+
finally {
|
|
1076
|
+
this.syncing = false;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
// --- conversões -----------------------------------------------------------
|
|
1080
|
+
toPickerValue(value, locale) {
|
|
1081
|
+
switch (this.mode()) {
|
|
1082
|
+
case 'range': {
|
|
1083
|
+
const range = this.asRangeValue(value);
|
|
1084
|
+
const start = parseDateFieldValue(range.startDate, locale);
|
|
1085
|
+
const end = parseDateFieldValue(range.endDate, locale);
|
|
1086
|
+
return start || end ? { start, end } : null;
|
|
1087
|
+
}
|
|
1088
|
+
case 'multiple': {
|
|
1089
|
+
const dates = (Array.isArray(value) ? value : [])
|
|
1090
|
+
.map((item) => parseDateFieldValue(item, locale))
|
|
1091
|
+
.filter((date) => !!date);
|
|
1092
|
+
return dates.length ? dates : null;
|
|
1093
|
+
}
|
|
1094
|
+
default:
|
|
1095
|
+
return parseDateFieldValue(value, locale);
|
|
1096
|
+
}
|
|
682
1097
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
1098
|
+
toExternal(value, locale) {
|
|
1099
|
+
switch (this.mode()) {
|
|
1100
|
+
case 'range': {
|
|
1101
|
+
const range = this.asPickerRange(value);
|
|
1102
|
+
return {
|
|
1103
|
+
startDate: range.start
|
|
1104
|
+
? formatDateForLocale(range.start, locale)
|
|
1105
|
+
: null,
|
|
1106
|
+
endDate: range.end ? formatDateForLocale(range.end, locale) : null,
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
case 'multiple':
|
|
1110
|
+
return (Array.isArray(value) ? value : []).map((date) => formatDateForLocale(date, locale));
|
|
1111
|
+
default:
|
|
1112
|
+
return value instanceof Date ? formatDateForLocale(value, locale) : '';
|
|
686
1113
|
}
|
|
687
|
-
|
|
688
|
-
|
|
1114
|
+
}
|
|
1115
|
+
toDisplayValue(value) {
|
|
1116
|
+
switch (this.mode()) {
|
|
1117
|
+
case 'range': {
|
|
1118
|
+
const range = this.asRangeValue(value);
|
|
1119
|
+
return { startDate: range.startDate, endDate: range.endDate };
|
|
1120
|
+
}
|
|
1121
|
+
case 'multiple':
|
|
1122
|
+
return { startDate: null, endDate: null };
|
|
1123
|
+
default:
|
|
1124
|
+
return {
|
|
1125
|
+
startDate: typeof value === 'string' ? value : '',
|
|
1126
|
+
endDate: null,
|
|
1127
|
+
};
|
|
689
1128
|
}
|
|
690
|
-
return first.getTime() === second.getTime();
|
|
691
1129
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
1130
|
+
/** Forma canônica usada só para comparar — nunca é gravada no controle. */
|
|
1131
|
+
serializeExternal(value) {
|
|
1132
|
+
switch (this.mode()) {
|
|
1133
|
+
case 'range': {
|
|
1134
|
+
const range = this.asRangeValue(value);
|
|
1135
|
+
const serialized = `${range.startDate ?? ''}|${range.endDate ?? ''}`;
|
|
1136
|
+
return serialized === '|' ? '' : serialized;
|
|
1137
|
+
}
|
|
1138
|
+
case 'multiple':
|
|
1139
|
+
return (Array.isArray(value) ? value : []).join('|');
|
|
1140
|
+
default:
|
|
1141
|
+
return typeof value === 'string' ? value : '';
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
emptyValue() {
|
|
1145
|
+
switch (this.mode()) {
|
|
1146
|
+
case 'range':
|
|
1147
|
+
return { startDate: null, endDate: null };
|
|
1148
|
+
case 'multiple':
|
|
1149
|
+
return [];
|
|
1150
|
+
default:
|
|
1151
|
+
return '';
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
asRangeValue(value) {
|
|
1155
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
1156
|
+
return {
|
|
1157
|
+
startDate: value.startDate ?? null,
|
|
1158
|
+
endDate: value.endDate ?? null,
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
return { startDate: null, endDate: null };
|
|
1162
|
+
}
|
|
1163
|
+
asPickerRange(value) {
|
|
1164
|
+
if (value && !Array.isArray(value) && !(value instanceof Date)) {
|
|
1165
|
+
return { start: value.start ?? null, end: value.end ?? null };
|
|
1166
|
+
}
|
|
1167
|
+
return { start: null, end: null };
|
|
1168
|
+
}
|
|
1169
|
+
isCompleteRange(value) {
|
|
1170
|
+
const range = this.asRangeValue(value);
|
|
1171
|
+
return !!range.startDate && !!range.endDate;
|
|
1172
|
+
}
|
|
1173
|
+
shouldCloseAfterSelect(value) {
|
|
1174
|
+
switch (this.mode()) {
|
|
1175
|
+
case 'multiple':
|
|
1176
|
+
return false;
|
|
1177
|
+
case 'range':
|
|
1178
|
+
return this.isCompleteRange(value);
|
|
1179
|
+
default:
|
|
1180
|
+
return typeof value === 'string' && !!value;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
buildPresetEntries(presets) {
|
|
1184
|
+
if (this.mode() !== 'range' || !presets?.length) {
|
|
1185
|
+
return [];
|
|
1186
|
+
}
|
|
1187
|
+
return presets.map((preset) => ({
|
|
1188
|
+
label: preset.label,
|
|
1189
|
+
range: this.resolvePreset(preset),
|
|
1190
|
+
}));
|
|
1191
|
+
}
|
|
1192
|
+
resolvePreset(preset) {
|
|
1193
|
+
if (preset.startDate && preset.endDate) {
|
|
1194
|
+
return [preset.startDate, preset.endDate];
|
|
1195
|
+
}
|
|
1196
|
+
// Atenção: `getRelativeDateRange` devolve o fim às 23:59:59.999. Só o
|
|
1197
|
+
// guard por string formatada de `emitExternal` tolera isso — um guard por
|
|
1198
|
+
// `getTime()` reemitiria em loop.
|
|
1199
|
+
const { startDate, endDate } = getRelativeDateRange(preset.daysBack ?? 0);
|
|
1200
|
+
return [startDate, endDate];
|
|
1201
|
+
}
|
|
1202
|
+
setOpenState(isOpen) {
|
|
1203
|
+
this.isOpenState.set(isOpen);
|
|
1204
|
+
this.isPresetsOpenState.set(false);
|
|
1205
|
+
this.openedChange.emit(isOpen);
|
|
1206
|
+
}
|
|
1207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDatepicker, isStandalone: true, selector: "mapa-datepicker, mapa-datepicker-range", inputs: { formGroup: "formGroup", element: "element" }, outputs: { openedChange: "openedChange" }, host: { listeners: { "document:keydown.escape": "handleEscape()" } }, providers: [provideNgxMask()], viewQueries: [{ propertyName: "toggleButton", first: true, predicate: ["toggleButton"], descendants: true }, { propertyName: "picker", first: true, predicate: NgxsmkDatepickerComponent, descendants: true }], ngImport: i0, template: "@if (element && formGroup) {\n <div\n class=\"mapa-datepicker\"\n [class.mapa-datepicker--open]=\"isOpen()\"\n [class.mapa-datepicker--disabled]=\"isDisabled()\"\n >\n @if (element.label) {\n <label class=\"mapa-datepicker__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <!-- A origem do overlay precisa ficar fora do @if: refer\u00EAncias de template\n n\u00E3o atravessam blocos de controle de fluxo. -->\n <div\n class=\"mapa-datepicker__origin\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n [formGroup]=\"formDisplay\"\n >\n @if (mode() === \"range\") {\n <div class=\"mapa-datepicker__range\">\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker__range-start\"\n >\n <input\n matInput\n formControlName=\"startDate\"\n [attr.id]=\"element.key || null\"\n [placeholder]=\"startDatePlaceholder\"\n [mask]=\"mask()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isReadonly()\"\n />\n </mat-form-field>\n\n <span class=\"mapa-datepicker__divider\">–</span>\n\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker__range-end\"\n >\n <input\n matInput\n formControlName=\"endDate\"\n [placeholder]=\"endDatePlaceholder\"\n [mask]=\"mask()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isReadonly()\"\n />\n\n @if (showClear()) {\n <button\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__clear\"\n aria-label=\"Limpar\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n ×\n </button>\n }\n\n <button\n #toggleButton\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__toggle\"\n [disabled]=\"isDisabled() || isReadonly()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"dialog\"\n aria-label=\"Abrir calend\u00E1rio\"\n (click)=\"toggleCalendar()\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarIcon\"></ng-container>\n </button>\n </mat-form-field>\n </div>\n } @else {\n <div class=\"mapa-datepicker__field\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n @if (mode() === \"multiple\") {\n <input\n matInput\n [attr.id]=\"element.key || null\"\n [value]=\"selectedLabel()\"\n [placeholder]=\"singlePlaceholder()\"\n readonly\n (click)=\"toggleCalendar()\"\n />\n } @else {\n <input\n matInput\n formControlName=\"startDate\"\n [attr.id]=\"element.key || null\"\n [placeholder]=\"singlePlaceholder()\"\n [mask]=\"mask()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isReadonly()\"\n />\n }\n\n @if (showClear()) {\n <button\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__clear\"\n aria-label=\"Limpar\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n ×\n </button>\n }\n\n <button\n #toggleButton\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__toggle\"\n [disabled]=\"isDisabled() || isReadonly()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"dialog\"\n aria-label=\"Abrir calend\u00E1rio\"\n (click)=\"toggleCalendar()\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarIcon\"></ng-container>\n </button>\n </mat-form-field>\n </div>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayPush]=\"true\"\n cdkConnectedOverlayPanelClass=\"mapa-datepicker__overlay-pane\"\n (overlayOutsideClick)=\"handleOverlayOutsideClick($event)\"\n >\n <div class=\"mapa-datepicker__panel\" role=\"dialog\">\n @if (hasPresets()) {\n <div class=\"mapa-datepicker__presets\">\n <button\n type=\"button\"\n class=\"mapa-datepicker__presets-trigger\"\n [class.mapa-datepicker__presets-trigger--open]=\"isPresetsOpen()\"\n [attr.aria-expanded]=\"isPresetsOpen()\"\n aria-haspopup=\"listbox\"\n (click)=\"togglePresets()\"\n >\n <span>{{ presetsTriggerLabel() }}</span>\n <svg\n class=\"mapa-datepicker__presets-chevron\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M6 9l6 6 6-6\"></path>\n </svg>\n </button>\n\n @if (isPresetsOpen()) {\n <ul class=\"mapa-datepicker__presets-list\" role=\"listbox\">\n @for (preset of presetList(); track preset.label) {\n <li role=\"option\" [attr.aria-selected]=\"isPresetActive(preset)\">\n <button\n type=\"button\"\n class=\"mapa-datepicker__presets-option\"\n [class.mapa-datepicker__presets-option--active]=\"\n isPresetActive(preset)\n \"\n (click)=\"applyPreset(preset)\"\n >\n {{ preset.label }}\n </button>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n <ngxsmk-datepicker\n [inline]=\"true\"\n [mode]=\"mode()\"\n [value]=\"pickerValue()\"\n [locale]=\"ngxsmkLocale()\"\n [displayFormat]=\"displayFormat()\"\n [theme]=\"'light'\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabledDates]=\"disabledDates()\"\n [isInvalidDate]=\"isInvalidDate()\"\n [showRanges]=\"false\"\n [calendars]=\"calendars()\"\n [weekStart]=\"weekStart()\"\n [showCalendarButton]=\"false\"\n [classes]=\"ngxsmkClasses\"\n (valueChange)=\"handlePickerValue($event)\"\n ></ngxsmk-datepicker>\n </div>\n </ng-template>\n\n @if (shouldShowError()) {\n <p class=\"mapa-datepicker__error\">\n <mapa-form-errors\n [control]=\"control\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </p>\n } @else if (element.hint) {\n <p class=\"mapa-datepicker__hint\">{{ element.hint }}</p>\n }\n </div>\n}\n\n<ng-template #calendarIcon>\n <svg\n class=\"mapa-datepicker__icon\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"3\"></rect>\n <path d=\"M3 10h18M8 3v4M16 3v4\"></path>\n </svg>\n</ng-template>\n", styles: [":host{display:inline-block;width:310px;max-width:100%;min-width:0;box-sizing:border-box}:host ::ng-deep .mapa-datepicker{display:flex;flex-direction:column;gap:8px}:host ::ng-deep .mapa-datepicker__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 .mdc-text-field{padding:0}:host ::ng-deep .mapa-datepicker__origin{display:block;width:100%;min-width:0}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field{width:100%;max-width:100%!important}:host ::ng-deep .mapa-datepicker__field .mat-mdc-text-field-wrapper{height:48px;border-radius:var(--mapa-radius-sm, 12px);background-color:var(--mapa-color-surface, #ffffff)}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-icon-suffix{display:flex;align-items:center;gap:4px;margin-right:12px}:host ::ng-deep .mapa-datepicker__field .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-infix{padding-bottom:12px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline{border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline__leading,:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline__notch,:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-subscript-wrapper{min-height:0}: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 8px 0 16px;min-height:48px;height:48px;width:100%}:host ::ng-deep .mapa-datepicker__range-start,:host ::ng-deep .mapa-datepicker__range-end{display:flex;flex:1 1 0;align-items:center;align-self:stretch;min-width:0}:host ::ng-deep .mapa-datepicker__range-start .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker__range-start .mat-mdc-text-field-wrapper,:host ::ng-deep .mapa-datepicker__range-end .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker__range-end .mat-mdc-text-field-wrapper{width:100%;min-width:0}:host ::ng-deep .mapa-datepicker__range-end{flex-basis:72px}: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-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__divider{flex:none;margin:0 8px;color:var(--mapa-color-muted, #555555)}:host ::ng-deep .mapa-datepicker__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__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-datepicker__toggle{display:flex;flex:0 0 24px;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);cursor:pointer}:host ::ng-deep .mapa-datepicker__toggle:hover:not(:disabled){background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-datepicker__toggle:disabled{cursor:default;opacity:.5}:host ::ng-deep .mapa-datepicker__icon{display:block;pointer-events:none}:host ::ng-deep .mapa-datepicker__error,:host ::ng-deep .mapa-datepicker__hint{margin:8px 0 0;padding-left:4px;font-size:13px;line-height:18px}:host ::ng-deep .mapa-datepicker__error{color:#b54242}:host ::ng-deep .mapa-datepicker__hint{color:var(--mapa-color-muted, #555555)}:host ::ng-deep .mapa-datepicker .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-datepicker .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-datepicker .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-datepicker--open :host ::ng-deep .mapa-datepicker__toggle{color:var(--mapa-color-accent, #ff560b)}.mapa-datepicker__panel{display:block;max-width:calc(100vw - 32px);overflow-x:auto;padding:8px;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);box-sizing:border-box}.mapa-datepicker__panel ::ng-deep ngxsmk-datepicker,.mapa-datepicker__panel ::ng-deep .ngxsmk-popover-container,.mapa-datepicker__panel ::ng-deep .ngxsmk-backdrop{--datepicker-primary-color: var(--mapa-color-accent, #ff560b);--datepicker-primary-contrast: var(--mapa-color-surface, #ffffff);--datepicker-background: var(--mapa-color-surface, #ffffff);--datepicker-text-color: var(--mapa-color-ink, #1a1a1a);--datepicker-subtle-text-color: var(--mapa-color-muted, #555555);--datepicker-border-color: var( --mapa-color-border-soft, rgba(26, 26, 26, .08) );--datepicker-hover-background: rgba(255, 86, 11, .08);--datepicker-range-background: rgba(255, 86, 11, .12);--datepicker-radius-sm: 8px;--datepicker-radius-md: var(--mapa-radius-sm, 12px);--datepicker-radius-lg: var(--mapa-radius-md, 16px);--datepicker-border-radius: var(--mapa-radius-md, 16px);--datepicker-spacing-xs: 2px;--datepicker-spacing-sm: 6px;--datepicker-spacing-md: 8px;--datepicker-spacing-lg: 12px;--datepicker-spacing-xl: 12px;--datepicker-spacing-2xl: 16px;--datepicker-font-size-xs: 10px;--datepicker-font-size-sm: 11px;--datepicker-font-size-base: 13px;--datepicker-font-size-lg: 15px;--datepicker-font-family: var( --mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif );--ngxsmk-cell-size-desktop: 36px;--ngxsmk-touch-target: 36px;--ngxsmk-space-sm: 6px;--ngxsmk-space-md: 8px;--ngxsmk-font-size-sm: 11px;--datepicker-shadow-sm: none;--datepicker-shadow-md: none;--datepicker-shadow-lg: none;--datepicker-z-index-base: 0;display:block}.mapa-datepicker__panel ::ng-deep .mapa-datepicker__ngxsmk-group{display:none}.mapa-datepicker__panel ::ng-deep .ngxsmk-datepicker-wrapper,.mapa-datepicker__panel ::ng-deep .ngxsmk-datepicker-container{box-shadow:none;border:0;background:transparent}.mapa-datepicker__panel ::ng-deep .ngxsmk-day-number{width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;max-height:36px}.mapa-datepicker__panel ::ng-deep .ngxsmk-popover-container{min-width:0}.mapa-datepicker__panel ::ng-deep .ngxsmk-calendar-month-multi{min-width:0}.mapa-datepicker__presets{position:relative;z-index:10;margin-bottom:8px}.mapa-datepicker__presets-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:36px;padding:0 12px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:inherit;font-size:13px;line-height:18px;text-align:left;cursor:pointer}.mapa-datepicker__presets-trigger:hover,.mapa-datepicker__presets-trigger--open{border-color:var(--mapa-color-accent, #ff560b)}.mapa-datepicker__presets-chevron{flex:none;color:var(--mapa-color-muted, #555555);transition:transform .12s ease}.mapa-datepicker__presets-trigger--open .mapa-datepicker__presets-chevron{transform:rotate(180deg)}.mapa-datepicker__presets-list{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:11;max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-sm, 12px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));box-sizing:border-box}.mapa-datepicker__presets-option{display:block;width:100%;padding:8px 12px;border:0;border-radius:8px;background:transparent;color:var(--mapa-color-ink, #1a1a1a);font-family:inherit;font-size:13px;line-height:18px;text-align:left;cursor:pointer}.mapa-datepicker__presets-option:hover{background:#1a1a1a0f}.mapa-datepicker__presets-option--active{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b);font-weight:600}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.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: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: NgxsmkDatepickerComponent, selector: "ngxsmk-datepicker", inputs: ["mode", "calendarViewMode", "isInvalidDate", "asyncDateFilter", "showRanges", "showTime", "timeOnly", "timeRangeMode", "showCalendarButton", "minuteInterval", "use24Hour", "secondInterval", "showSeconds", "holidayProvider", "disableHolidays", "disabledDates", "disabledRanges", "recurringPattern", "dateTemplate", "placeholder", "inline", "responsive", "inputId", "name", "autocomplete", "translations", "translationService", "clearLabel", "closeLabel", "prevMonthAriaLabel", "nextMonthAriaLabel", "clearAriaLabel", "closeAriaLabel", "weekStart", "yearRange", "timezone", "showOtherMonths", "hooks", "enableKeyboardShortcuts", "customShortcuts", "autoApplyClose", "allowSameDay", "displayFormat", "allowTyping", "inputMask", "enableNaturalLanguage", "naturalLanguagePreviewTemplate", "calendars", "rangePresetFactory", "showTimezoneSelector", "defaultTimezone", "calendarCount", "calendarLayout", "changeActiveMonthOnSelection", "showWeekNumbers", "weekNumberLabel", "secondaryCalendar", "dayMetadata", "calendarHeaderTemplate", "calendarFooterTemplate", "defaultMonthOffset", "syncScroll", "align", "useNativePicker", "enableHapticFeedback", "mobileModalStyle", "mobileTimePickerStyle", "enablePullToRefresh", "mobileTheme", "enableVoiceInput", "autoDetectMobile", "disableFocusTrap", "appendToBody", "value", "field", "startAt", "locale", "theme", "dateFormatPattern", "animationConfig", "rtl", "classes", "disabledState", "required", "errorState", "userAriaDescribedBy", "minDate", "maxDate", "ranges", "comparisonRange"], outputs: ["asyncDateFilterLoading", "asyncDateFilterError", "naturalLanguageResolved", "invalidRange", "timezoneChange", "valueChange", "action", "validationError"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
697
1209
|
}
|
|
698
1210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDatepicker, decorators: [{
|
|
699
1211
|
type: Component,
|
|
700
|
-
args: [{ selector:
|
|
701
|
-
|
|
1212
|
+
args: [{ selector: 'mapa-datepicker, mapa-datepicker-range', standalone: true, imports: [
|
|
1213
|
+
NgTemplateOutlet,
|
|
702
1214
|
ReactiveFormsModule,
|
|
703
1215
|
NgxMaskDirective,
|
|
704
1216
|
MapaMaskAutofillSyncDirective,
|
|
705
|
-
MatDatepickerModule,
|
|
706
1217
|
MatFormFieldModule,
|
|
707
|
-
MatIconModule,
|
|
708
1218
|
MatInputModule,
|
|
1219
|
+
CdkConnectedOverlay,
|
|
1220
|
+
CdkOverlayOrigin,
|
|
1221
|
+
NgxsmkDatepickerComponent,
|
|
709
1222
|
MapaFormErrorsComponent,
|
|
710
|
-
], providers: [
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { formGroup: [{
|
|
715
|
-
type: Input
|
|
1223
|
+
], providers: [provideNgxMask()], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (element && formGroup) {\n <div\n class=\"mapa-datepicker\"\n [class.mapa-datepicker--open]=\"isOpen()\"\n [class.mapa-datepicker--disabled]=\"isDisabled()\"\n >\n @if (element.label) {\n <label class=\"mapa-datepicker__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <!-- A origem do overlay precisa ficar fora do @if: refer\u00EAncias de template\n n\u00E3o atravessam blocos de controle de fluxo. -->\n <div\n class=\"mapa-datepicker__origin\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n [formGroup]=\"formDisplay\"\n >\n @if (mode() === \"range\") {\n <div class=\"mapa-datepicker__range\">\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker__range-start\"\n >\n <input\n matInput\n formControlName=\"startDate\"\n [attr.id]=\"element.key || null\"\n [placeholder]=\"startDatePlaceholder\"\n [mask]=\"mask()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isReadonly()\"\n />\n </mat-form-field>\n\n <span class=\"mapa-datepicker__divider\">–</span>\n\n <mat-form-field\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n class=\"mapa-datepicker__range-end\"\n >\n <input\n matInput\n formControlName=\"endDate\"\n [placeholder]=\"endDatePlaceholder\"\n [mask]=\"mask()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isReadonly()\"\n />\n\n @if (showClear()) {\n <button\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__clear\"\n aria-label=\"Limpar\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n ×\n </button>\n }\n\n <button\n #toggleButton\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__toggle\"\n [disabled]=\"isDisabled() || isReadonly()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"dialog\"\n aria-label=\"Abrir calend\u00E1rio\"\n (click)=\"toggleCalendar()\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarIcon\"></ng-container>\n </button>\n </mat-form-field>\n </div>\n } @else {\n <div class=\"mapa-datepicker__field\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n @if (mode() === \"multiple\") {\n <input\n matInput\n [attr.id]=\"element.key || null\"\n [value]=\"selectedLabel()\"\n [placeholder]=\"singlePlaceholder()\"\n readonly\n (click)=\"toggleCalendar()\"\n />\n } @else {\n <input\n matInput\n formControlName=\"startDate\"\n [attr.id]=\"element.key || null\"\n [placeholder]=\"singlePlaceholder()\"\n [mask]=\"mask()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isReadonly()\"\n />\n }\n\n @if (showClear()) {\n <button\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__clear\"\n aria-label=\"Limpar\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n ×\n </button>\n }\n\n <button\n #toggleButton\n matSuffix\n type=\"button\"\n class=\"mapa-datepicker__toggle\"\n [disabled]=\"isDisabled() || isReadonly()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"dialog\"\n aria-label=\"Abrir calend\u00E1rio\"\n (click)=\"toggleCalendar()\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarIcon\"></ng-container>\n </button>\n </mat-form-field>\n </div>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayPush]=\"true\"\n cdkConnectedOverlayPanelClass=\"mapa-datepicker__overlay-pane\"\n (overlayOutsideClick)=\"handleOverlayOutsideClick($event)\"\n >\n <div class=\"mapa-datepicker__panel\" role=\"dialog\">\n @if (hasPresets()) {\n <div class=\"mapa-datepicker__presets\">\n <button\n type=\"button\"\n class=\"mapa-datepicker__presets-trigger\"\n [class.mapa-datepicker__presets-trigger--open]=\"isPresetsOpen()\"\n [attr.aria-expanded]=\"isPresetsOpen()\"\n aria-haspopup=\"listbox\"\n (click)=\"togglePresets()\"\n >\n <span>{{ presetsTriggerLabel() }}</span>\n <svg\n class=\"mapa-datepicker__presets-chevron\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M6 9l6 6 6-6\"></path>\n </svg>\n </button>\n\n @if (isPresetsOpen()) {\n <ul class=\"mapa-datepicker__presets-list\" role=\"listbox\">\n @for (preset of presetList(); track preset.label) {\n <li role=\"option\" [attr.aria-selected]=\"isPresetActive(preset)\">\n <button\n type=\"button\"\n class=\"mapa-datepicker__presets-option\"\n [class.mapa-datepicker__presets-option--active]=\"\n isPresetActive(preset)\n \"\n (click)=\"applyPreset(preset)\"\n >\n {{ preset.label }}\n </button>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n <ngxsmk-datepicker\n [inline]=\"true\"\n [mode]=\"mode()\"\n [value]=\"pickerValue()\"\n [locale]=\"ngxsmkLocale()\"\n [displayFormat]=\"displayFormat()\"\n [theme]=\"'light'\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabledDates]=\"disabledDates()\"\n [isInvalidDate]=\"isInvalidDate()\"\n [showRanges]=\"false\"\n [calendars]=\"calendars()\"\n [weekStart]=\"weekStart()\"\n [showCalendarButton]=\"false\"\n [classes]=\"ngxsmkClasses\"\n (valueChange)=\"handlePickerValue($event)\"\n ></ngxsmk-datepicker>\n </div>\n </ng-template>\n\n @if (shouldShowError()) {\n <p class=\"mapa-datepicker__error\">\n <mapa-form-errors\n [control]=\"control\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </p>\n } @else if (element.hint) {\n <p class=\"mapa-datepicker__hint\">{{ element.hint }}</p>\n }\n </div>\n}\n\n<ng-template #calendarIcon>\n <svg\n class=\"mapa-datepicker__icon\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"3\"></rect>\n <path d=\"M3 10h18M8 3v4M16 3v4\"></path>\n </svg>\n</ng-template>\n", styles: [":host{display:inline-block;width:310px;max-width:100%;min-width:0;box-sizing:border-box}:host ::ng-deep .mapa-datepicker{display:flex;flex-direction:column;gap:8px}:host ::ng-deep .mapa-datepicker__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 .mdc-text-field{padding:0}:host ::ng-deep .mapa-datepicker__origin{display:block;width:100%;min-width:0}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field{width:100%;max-width:100%!important}:host ::ng-deep .mapa-datepicker__field .mat-mdc-text-field-wrapper{height:48px;border-radius:var(--mapa-radius-sm, 12px);background-color:var(--mapa-color-surface, #ffffff)}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-icon-suffix{display:flex;align-items:center;gap:4px;margin-right:12px}:host ::ng-deep .mapa-datepicker__field .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-infix{padding-bottom:12px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline{border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline__leading,:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline__notch,:host ::ng-deep .mapa-datepicker__field .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-datepicker__field .mat-mdc-form-field-subscript-wrapper{min-height:0}: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 8px 0 16px;min-height:48px;height:48px;width:100%}:host ::ng-deep .mapa-datepicker__range-start,:host ::ng-deep .mapa-datepicker__range-end{display:flex;flex:1 1 0;align-items:center;align-self:stretch;min-width:0}:host ::ng-deep .mapa-datepicker__range-start .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker__range-start .mat-mdc-text-field-wrapper,:host ::ng-deep .mapa-datepicker__range-end .mat-mdc-input-element,:host ::ng-deep .mapa-datepicker__range-end .mat-mdc-text-field-wrapper{width:100%;min-width:0}:host ::ng-deep .mapa-datepicker__range-end{flex-basis:72px}: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-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__divider{flex:none;margin:0 8px;color:var(--mapa-color-muted, #555555)}:host ::ng-deep .mapa-datepicker__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__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-datepicker__toggle{display:flex;flex:0 0 24px;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);cursor:pointer}:host ::ng-deep .mapa-datepicker__toggle:hover:not(:disabled){background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-datepicker__toggle:disabled{cursor:default;opacity:.5}:host ::ng-deep .mapa-datepicker__icon{display:block;pointer-events:none}:host ::ng-deep .mapa-datepicker__error,:host ::ng-deep .mapa-datepicker__hint{margin:8px 0 0;padding-left:4px;font-size:13px;line-height:18px}:host ::ng-deep .mapa-datepicker__error{color:#b54242}:host ::ng-deep .mapa-datepicker__hint{color:var(--mapa-color-muted, #555555)}:host ::ng-deep .mapa-datepicker .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-datepicker .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-datepicker .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-datepicker--open :host ::ng-deep .mapa-datepicker__toggle{color:var(--mapa-color-accent, #ff560b)}.mapa-datepicker__panel{display:block;max-width:calc(100vw - 32px);overflow-x:auto;padding:8px;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);box-sizing:border-box}.mapa-datepicker__panel ::ng-deep ngxsmk-datepicker,.mapa-datepicker__panel ::ng-deep .ngxsmk-popover-container,.mapa-datepicker__panel ::ng-deep .ngxsmk-backdrop{--datepicker-primary-color: var(--mapa-color-accent, #ff560b);--datepicker-primary-contrast: var(--mapa-color-surface, #ffffff);--datepicker-background: var(--mapa-color-surface, #ffffff);--datepicker-text-color: var(--mapa-color-ink, #1a1a1a);--datepicker-subtle-text-color: var(--mapa-color-muted, #555555);--datepicker-border-color: var( --mapa-color-border-soft, rgba(26, 26, 26, .08) );--datepicker-hover-background: rgba(255, 86, 11, .08);--datepicker-range-background: rgba(255, 86, 11, .12);--datepicker-radius-sm: 8px;--datepicker-radius-md: var(--mapa-radius-sm, 12px);--datepicker-radius-lg: var(--mapa-radius-md, 16px);--datepicker-border-radius: var(--mapa-radius-md, 16px);--datepicker-spacing-xs: 2px;--datepicker-spacing-sm: 6px;--datepicker-spacing-md: 8px;--datepicker-spacing-lg: 12px;--datepicker-spacing-xl: 12px;--datepicker-spacing-2xl: 16px;--datepicker-font-size-xs: 10px;--datepicker-font-size-sm: 11px;--datepicker-font-size-base: 13px;--datepicker-font-size-lg: 15px;--datepicker-font-family: var( --mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif );--ngxsmk-cell-size-desktop: 36px;--ngxsmk-touch-target: 36px;--ngxsmk-space-sm: 6px;--ngxsmk-space-md: 8px;--ngxsmk-font-size-sm: 11px;--datepicker-shadow-sm: none;--datepicker-shadow-md: none;--datepicker-shadow-lg: none;--datepicker-z-index-base: 0;display:block}.mapa-datepicker__panel ::ng-deep .mapa-datepicker__ngxsmk-group{display:none}.mapa-datepicker__panel ::ng-deep .ngxsmk-datepicker-wrapper,.mapa-datepicker__panel ::ng-deep .ngxsmk-datepicker-container{box-shadow:none;border:0;background:transparent}.mapa-datepicker__panel ::ng-deep .ngxsmk-day-number{width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;max-height:36px}.mapa-datepicker__panel ::ng-deep .ngxsmk-popover-container{min-width:0}.mapa-datepicker__panel ::ng-deep .ngxsmk-calendar-month-multi{min-width:0}.mapa-datepicker__presets{position:relative;z-index:10;margin-bottom:8px}.mapa-datepicker__presets-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:36px;padding:0 12px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:inherit;font-size:13px;line-height:18px;text-align:left;cursor:pointer}.mapa-datepicker__presets-trigger:hover,.mapa-datepicker__presets-trigger--open{border-color:var(--mapa-color-accent, #ff560b)}.mapa-datepicker__presets-chevron{flex:none;color:var(--mapa-color-muted, #555555);transition:transform .12s ease}.mapa-datepicker__presets-trigger--open .mapa-datepicker__presets-chevron{transform:rotate(180deg)}.mapa-datepicker__presets-list{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:11;max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-sm, 12px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));box-sizing:border-box}.mapa-datepicker__presets-option{display:block;width:100%;padding:8px 12px;border:0;border-radius:8px;background:transparent;color:var(--mapa-color-ink, #1a1a1a);font-family:inherit;font-size:13px;line-height:18px;text-align:left;cursor:pointer}.mapa-datepicker__presets-option:hover{background:#1a1a1a0f}.mapa-datepicker__presets-option--active{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b);font-weight:600}\n"] }]
|
|
1224
|
+
}], propDecorators: { formGroup: [{
|
|
1225
|
+
type: Input,
|
|
1226
|
+
args: [{ required: true }]
|
|
716
1227
|
}], element: [{
|
|
717
|
-
type: Input
|
|
1228
|
+
type: Input,
|
|
1229
|
+
args: [{ required: true }]
|
|
1230
|
+
}], openedChange: [{
|
|
1231
|
+
type: Output
|
|
1232
|
+
}], toggleButton: [{
|
|
1233
|
+
type: ViewChild,
|
|
1234
|
+
args: ['toggleButton']
|
|
1235
|
+
}], picker: [{
|
|
1236
|
+
type: ViewChild,
|
|
1237
|
+
args: [NgxsmkDatepickerComponent]
|
|
1238
|
+
}], handleEscape: [{
|
|
1239
|
+
type: HostListener,
|
|
1240
|
+
args: ['document:keydown.escape']
|
|
718
1241
|
}] } });
|
|
719
1242
|
|
|
720
1243
|
/*
|
|
721
|
-
* Public API Surface of mapa-library-ui datepicker
|
|
1244
|
+
* Public API Surface of mapa-library-ui datepicker
|
|
722
1245
|
*/
|
|
723
1246
|
|
|
724
1247
|
/*
|
|
725
|
-
* Public API Surface of mapa-library-ui datepicker
|
|
1248
|
+
* Public API Surface of mapa-library-ui datepicker
|
|
726
1249
|
*/
|
|
727
1250
|
|
|
728
1251
|
/**
|
|
729
1252
|
* Generated bundle index. Do not edit.
|
|
730
1253
|
*/
|
|
731
1254
|
|
|
732
|
-
export {
|
|
1255
|
+
export { Datepicker, DatepickerRange, ElementBase, MapaDatepicker, MapaDatepicker as MapaDatepickerRange };
|
|
733
1256
|
//# sourceMappingURL=mapa-library-ui-src-lib-components-datepicker.mjs.map
|