mapa-library-ui 1.4.1 → 1.5.1
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 +237 -2
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +158 -43
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +97 -23
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +157 -42
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +97 -23
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +158 -43
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +24 -7
- package/mapa-library-ui-1.5.1.tgz +0 -0
- package/package.json +2 -2
- package/src/lib/components/datepicker-range/index.d.ts +11 -5
- package/mapa-library-ui-1.4.1.tgz +0 -0
|
@@ -13,7 +13,7 @@ import * as i1$2 from '@angular/common';
|
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
14
14
|
import * as i3 from '@angular/material/form-field';
|
|
15
15
|
import { MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
16
|
-
import { getMapaUiTexts,
|
|
16
|
+
import { getMapaUiTexts, getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
|
|
17
17
|
import * as i1$3 from '@angular/platform-browser';
|
|
18
18
|
import * as i2$1 from '@angular/router';
|
|
19
19
|
import { RouterModule } from '@angular/router';
|
|
@@ -30,7 +30,7 @@ import * as i7 from '@angular/material/select';
|
|
|
30
30
|
import { MatSelectModule, MAT_SELECT_CONFIG } from '@angular/material/select';
|
|
31
31
|
import * as i8 from 'ngx-mat-select-search';
|
|
32
32
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
33
|
-
import { provideNativeDateAdapter } from '@angular/material/core';
|
|
33
|
+
import { provideNativeDateAdapter, DateAdapter } from '@angular/material/core';
|
|
34
34
|
import * as i3$2 from '@angular/material/datepicker';
|
|
35
35
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
36
36
|
import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
|
|
@@ -4353,6 +4353,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
4353
4353
|
}] });
|
|
4354
4354
|
|
|
4355
4355
|
const DAY_MONTH_YEAR_PATTERN = /^(\d{2})\/(\d{2})\/(\d{4})$/;
|
|
4356
|
+
const MONTH_DAY_YEAR_PATTERN = /^(\d{2})\/(\d{2})\/(\d{4})$/;
|
|
4357
|
+
const DOCS_LANGUAGE_STORAGE_KEY = "mapa-library-ui-docs-language";
|
|
4356
4358
|
function isValidDate(date) {
|
|
4357
4359
|
return !Number.isNaN(date.getTime());
|
|
4358
4360
|
}
|
|
@@ -4365,7 +4367,93 @@ function formatDateAsDayMonthYear(date) {
|
|
|
4365
4367
|
const year = `${date.getFullYear()}`;
|
|
4366
4368
|
return `${day}/${month}/${year}`;
|
|
4367
4369
|
}
|
|
4368
|
-
function
|
|
4370
|
+
function formatDateAsMonthDayYear(date) {
|
|
4371
|
+
const day = `${date.getDate()}`.padStart(2, "0");
|
|
4372
|
+
const month = `${date.getMonth() + 1}`.padStart(2, "0");
|
|
4373
|
+
const year = `${date.getFullYear()}`;
|
|
4374
|
+
return `${month}/${day}/${year}`;
|
|
4375
|
+
}
|
|
4376
|
+
function normalizeDateLocale(value) {
|
|
4377
|
+
if (typeof value !== "string") {
|
|
4378
|
+
return "pt-BR";
|
|
4379
|
+
}
|
|
4380
|
+
const normalizedValue = value.trim().toLowerCase();
|
|
4381
|
+
if (normalizedValue.startsWith("en")) {
|
|
4382
|
+
return "en";
|
|
4383
|
+
}
|
|
4384
|
+
if (normalizedValue.startsWith("es")) {
|
|
4385
|
+
return "es";
|
|
4386
|
+
}
|
|
4387
|
+
return "pt-BR";
|
|
4388
|
+
}
|
|
4389
|
+
function getDocsStoredLanguage() {
|
|
4390
|
+
if (typeof window === "undefined") {
|
|
4391
|
+
return null;
|
|
4392
|
+
}
|
|
4393
|
+
try {
|
|
4394
|
+
return window.localStorage.getItem(DOCS_LANGUAGE_STORAGE_KEY);
|
|
4395
|
+
}
|
|
4396
|
+
catch {
|
|
4397
|
+
return null;
|
|
4398
|
+
}
|
|
4399
|
+
}
|
|
4400
|
+
function getActiveDateLocale() {
|
|
4401
|
+
return normalizeDateLocale(getDocsStoredLanguage() ?? getStoredAppLanguage());
|
|
4402
|
+
}
|
|
4403
|
+
function isMonthFirstDateLocale(locale = getActiveDateLocale()) {
|
|
4404
|
+
return normalizeDateLocale(locale) === "en";
|
|
4405
|
+
}
|
|
4406
|
+
function getActiveDateFormat(locale = getActiveDateLocale()) {
|
|
4407
|
+
return isMonthFirstDateLocale(locale) ? "MM/DD/YYYY" : "DD/MM/YYYY";
|
|
4408
|
+
}
|
|
4409
|
+
function getActiveMaterialDateFormat(locale = getActiveDateLocale()) {
|
|
4410
|
+
return isMonthFirstDateLocale(locale) ? "MM/dd/yyyy" : "dd/MM/yyyy";
|
|
4411
|
+
}
|
|
4412
|
+
function getDateInputMask(_locale = getActiveDateLocale()) {
|
|
4413
|
+
return "00/00/0000";
|
|
4414
|
+
}
|
|
4415
|
+
function formatDateForLocale(date, locale = getActiveDateLocale()) {
|
|
4416
|
+
return isMonthFirstDateLocale(locale)
|
|
4417
|
+
? formatDateAsMonthDayYear(date)
|
|
4418
|
+
: formatDateAsDayMonthYear(date);
|
|
4419
|
+
}
|
|
4420
|
+
function parseOrderedDate(value, pattern, order) {
|
|
4421
|
+
const match = pattern.exec(value.trim());
|
|
4422
|
+
if (!match) {
|
|
4423
|
+
return null;
|
|
4424
|
+
}
|
|
4425
|
+
const [, firstValue, secondValue, yearValue] = match;
|
|
4426
|
+
const year = Number(yearValue);
|
|
4427
|
+
const month = Number(order === "month-first" ? firstValue : secondValue);
|
|
4428
|
+
const day = Number(order === "month-first" ? secondValue : firstValue);
|
|
4429
|
+
const parsedDate = new Date(year, month - 1, day);
|
|
4430
|
+
if (parsedDate.getFullYear() !== year ||
|
|
4431
|
+
parsedDate.getMonth() !== month - 1 ||
|
|
4432
|
+
parsedDate.getDate() !== day) {
|
|
4433
|
+
return null;
|
|
4434
|
+
}
|
|
4435
|
+
return parsedDate;
|
|
4436
|
+
}
|
|
4437
|
+
function parseLocaleDateValue(value, locale = getActiveDateLocale()) {
|
|
4438
|
+
const normalizedLocale = normalizeDateLocale(locale);
|
|
4439
|
+
const parsers = normalizedLocale === "en"
|
|
4440
|
+
? [
|
|
4441
|
+
() => parseOrderedDate(value, MONTH_DAY_YEAR_PATTERN, "month-first"),
|
|
4442
|
+
() => parseOrderedDate(value, DAY_MONTH_YEAR_PATTERN, "day-first"),
|
|
4443
|
+
]
|
|
4444
|
+
: [
|
|
4445
|
+
() => parseOrderedDate(value, DAY_MONTH_YEAR_PATTERN, "day-first"),
|
|
4446
|
+
() => parseOrderedDate(value, MONTH_DAY_YEAR_PATTERN, "month-first"),
|
|
4447
|
+
];
|
|
4448
|
+
for (const parse of parsers) {
|
|
4449
|
+
const parsedDate = parse();
|
|
4450
|
+
if (parsedDate) {
|
|
4451
|
+
return parsedDate;
|
|
4452
|
+
}
|
|
4453
|
+
}
|
|
4454
|
+
return null;
|
|
4455
|
+
}
|
|
4456
|
+
function parseDateValue(value, locale = getActiveDateLocale()) {
|
|
4369
4457
|
if (value instanceof Date) {
|
|
4370
4458
|
return isValidDate(value) ? new Date(value.getTime()) : null;
|
|
4371
4459
|
}
|
|
@@ -4380,11 +4468,11 @@ function parseDateValue(value) {
|
|
|
4380
4468
|
if (!trimmedValue) {
|
|
4381
4469
|
return null;
|
|
4382
4470
|
}
|
|
4383
|
-
const
|
|
4384
|
-
if (
|
|
4385
|
-
return
|
|
4471
|
+
const localeDate = parseLocaleDateValue(trimmedValue, locale);
|
|
4472
|
+
if (localeDate) {
|
|
4473
|
+
return localeDate;
|
|
4386
4474
|
}
|
|
4387
|
-
if (DAY_MONTH_YEAR_PATTERN.test(trimmedValue)) {
|
|
4475
|
+
if (DAY_MONTH_YEAR_PATTERN.test(trimmedValue) || MONTH_DAY_YEAR_PATTERN.test(trimmedValue)) {
|
|
4388
4476
|
return null;
|
|
4389
4477
|
}
|
|
4390
4478
|
const parsedDate = new Date(trimmedValue);
|
|
@@ -4394,21 +4482,7 @@ function isDateValue(value) {
|
|
|
4394
4482
|
return parseDateValue(value) !== null;
|
|
4395
4483
|
}
|
|
4396
4484
|
function parseBrazilianDate(value) {
|
|
4397
|
-
|
|
4398
|
-
if (!match) {
|
|
4399
|
-
return null;
|
|
4400
|
-
}
|
|
4401
|
-
const [, dayValue, monthValue, yearValue] = match;
|
|
4402
|
-
const day = Number(dayValue);
|
|
4403
|
-
const month = Number(monthValue);
|
|
4404
|
-
const year = Number(yearValue);
|
|
4405
|
-
const parsedDate = new Date(year, month - 1, day);
|
|
4406
|
-
if (parsedDate.getFullYear() !== year ||
|
|
4407
|
-
parsedDate.getMonth() !== month - 1 ||
|
|
4408
|
-
parsedDate.getDate() !== day) {
|
|
4409
|
-
return null;
|
|
4410
|
-
}
|
|
4411
|
-
return parsedDate;
|
|
4485
|
+
return parseOrderedDate(value, DAY_MONTH_YEAR_PATTERN, "day-first");
|
|
4412
4486
|
}
|
|
4413
4487
|
function normalizeDateInput(value) {
|
|
4414
4488
|
return parseDateValue(value);
|
|
@@ -4427,7 +4501,7 @@ function formatLocaleDate(value, dateStyle = "short") {
|
|
|
4427
4501
|
if (!date) {
|
|
4428
4502
|
return "";
|
|
4429
4503
|
}
|
|
4430
|
-
return new Intl.DateTimeFormat(getIntlLocale(
|
|
4504
|
+
return new Intl.DateTimeFormat(getIntlLocale(getActiveDateLocale()), {
|
|
4431
4505
|
dateStyle,
|
|
4432
4506
|
}).format(date);
|
|
4433
4507
|
}
|
|
@@ -4437,7 +4511,7 @@ function formatLocaleDateTime(value, options = {}) {
|
|
|
4437
4511
|
return "";
|
|
4438
4512
|
}
|
|
4439
4513
|
const { dateStyle = "short", timeStyle = "short" } = options;
|
|
4440
|
-
return new Intl.DateTimeFormat(getIntlLocale(
|
|
4514
|
+
return new Intl.DateTimeFormat(getIntlLocale(getActiveDateLocale()), {
|
|
4441
4515
|
dateStyle,
|
|
4442
4516
|
timeStyle,
|
|
4443
4517
|
}).format(date);
|
|
@@ -5850,27 +5924,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
5850
5924
|
* Public API Surface of mapa-library-ui datepicker (single)
|
|
5851
5925
|
*/
|
|
5852
5926
|
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5927
|
+
function getMapaDatepickerRangeFormats() {
|
|
5928
|
+
const dateInput = getActiveMaterialDateFormat();
|
|
5929
|
+
return {
|
|
5930
|
+
parse: {
|
|
5931
|
+
dateInput,
|
|
5932
|
+
},
|
|
5933
|
+
display: {
|
|
5934
|
+
dateInput,
|
|
5935
|
+
monthYearLabel: "MMM YYYY",
|
|
5936
|
+
dateA11yLabel: "LL",
|
|
5937
|
+
monthYearA11yLabel: "MMMM YYYY",
|
|
5938
|
+
},
|
|
5939
|
+
};
|
|
5940
|
+
}
|
|
5864
5941
|
class MapaDatepickerRange {
|
|
5865
5942
|
constructor(i18n, cdr) {
|
|
5866
5943
|
this.i18n = i18n;
|
|
5867
5944
|
this.cdr = cdr;
|
|
5868
5945
|
this.destroyRef = inject(DestroyRef);
|
|
5869
|
-
this.
|
|
5946
|
+
this.dateAdapter = inject((DateAdapter));
|
|
5870
5947
|
this.emptyValue = {
|
|
5871
5948
|
startDate: null,
|
|
5872
5949
|
endDate: null,
|
|
5873
5950
|
};
|
|
5951
|
+
this.currentLocale = null;
|
|
5874
5952
|
this.formDatepicker = new FormGroup({
|
|
5875
5953
|
startDate: new FormControl(null),
|
|
5876
5954
|
endDate: new FormControl(null),
|
|
@@ -5883,7 +5961,14 @@ class MapaDatepickerRange {
|
|
|
5883
5961
|
get texts() {
|
|
5884
5962
|
return this.i18n.textsSignal();
|
|
5885
5963
|
}
|
|
5964
|
+
get dateInputMask() {
|
|
5965
|
+
return getDateInputMask(this.getLocale());
|
|
5966
|
+
}
|
|
5967
|
+
get activeDateFormat() {
|
|
5968
|
+
return getActiveDateFormat(this.getLocale());
|
|
5969
|
+
}
|
|
5886
5970
|
ngOnInit() {
|
|
5971
|
+
this.syncLocaleSettings();
|
|
5887
5972
|
if (!this.element?.key) {
|
|
5888
5973
|
throw new Error("mapa-datepicker-range requires element.key to resolve the target control.");
|
|
5889
5974
|
}
|
|
@@ -5908,6 +5993,9 @@ class MapaDatepickerRange {
|
|
|
5908
5993
|
this.updateExternalFromDatepicker(value);
|
|
5909
5994
|
});
|
|
5910
5995
|
}
|
|
5996
|
+
ngDoCheck() {
|
|
5997
|
+
this.syncLocaleSettings();
|
|
5998
|
+
}
|
|
5911
5999
|
get startDatePlaceholder() {
|
|
5912
6000
|
return this.texts.datepicker.startDatePlaceholder;
|
|
5913
6001
|
}
|
|
@@ -5915,6 +6003,7 @@ class MapaDatepickerRange {
|
|
|
5915
6003
|
return this.texts.datepicker.endDatePlaceholder;
|
|
5916
6004
|
}
|
|
5917
6005
|
syncFromExternal(value) {
|
|
6006
|
+
this.syncLocaleSettings();
|
|
5918
6007
|
const nextValue = value ?? this.emptyValue;
|
|
5919
6008
|
const displayValue = {
|
|
5920
6009
|
startDate: nextValue.startDate,
|
|
@@ -5937,6 +6026,7 @@ class MapaDatepickerRange {
|
|
|
5937
6026
|
this.cdr.markForCheck();
|
|
5938
6027
|
}
|
|
5939
6028
|
updateExternalFromDisplay(value) {
|
|
6029
|
+
this.syncLocaleSettings();
|
|
5940
6030
|
const nextValue = {
|
|
5941
6031
|
startDate: value.startDate ?? null,
|
|
5942
6032
|
endDate: value.endDate ?? null,
|
|
@@ -5950,12 +6040,13 @@ class MapaDatepickerRange {
|
|
|
5950
6040
|
this.cdr.markForCheck();
|
|
5951
6041
|
}
|
|
5952
6042
|
updateExternalFromDatepicker(value) {
|
|
6043
|
+
this.syncLocaleSettings();
|
|
5953
6044
|
if (!value.startDate || !value.endDate) {
|
|
5954
6045
|
return;
|
|
5955
6046
|
}
|
|
5956
6047
|
const nextValue = {
|
|
5957
|
-
startDate:
|
|
5958
|
-
endDate:
|
|
6048
|
+
startDate: formatDateForLocale(value.startDate, this.getLocale()),
|
|
6049
|
+
endDate: formatDateForLocale(value.endDate, this.getLocale()),
|
|
5959
6050
|
};
|
|
5960
6051
|
this.patchExternalValue(nextValue);
|
|
5961
6052
|
this.formDisplay.patchValue(nextValue, { emitEvent: false });
|
|
@@ -5988,11 +6079,35 @@ class MapaDatepickerRange {
|
|
|
5988
6079
|
this.patchExternalValue(defaultRange);
|
|
5989
6080
|
this.cdr.markForCheck();
|
|
5990
6081
|
}
|
|
6082
|
+
getLocale() {
|
|
6083
|
+
return this.currentLocale ?? getActiveDateLocale();
|
|
6084
|
+
}
|
|
6085
|
+
syncLocaleSettings() {
|
|
6086
|
+
const nextLocale = getActiveDateLocale();
|
|
6087
|
+
if (this.currentLocale === nextLocale) {
|
|
6088
|
+
return;
|
|
6089
|
+
}
|
|
6090
|
+
this.currentLocale = nextLocale;
|
|
6091
|
+
this.dateAdapter.setLocale(nextLocale);
|
|
6092
|
+
const datepickerValue = this.formDatepicker.getRawValue();
|
|
6093
|
+
const hasDateRange = !!datepickerValue.startDate && !!datepickerValue.endDate;
|
|
6094
|
+
if (hasDateRange) {
|
|
6095
|
+
const formattedRange = {
|
|
6096
|
+
startDate: formatDateForLocale(datepickerValue.startDate, nextLocale),
|
|
6097
|
+
endDate: formatDateForLocale(datepickerValue.endDate, nextLocale),
|
|
6098
|
+
};
|
|
6099
|
+
this.formDisplay.patchValue(formattedRange, { emitEvent: false });
|
|
6100
|
+
if (this.rangeControl) {
|
|
6101
|
+
this.patchExternalValue(formattedRange);
|
|
6102
|
+
}
|
|
6103
|
+
}
|
|
6104
|
+
this.cdr.markForCheck();
|
|
6105
|
+
}
|
|
5991
6106
|
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 }); }
|
|
5992
6107
|
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: [
|
|
5993
6108
|
provideNgxMask(),
|
|
5994
|
-
provideNativeDateAdapter(
|
|
5995
|
-
], 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=\"
|
|
6109
|
+
provideNativeDateAdapter(getMapaDatepickerRangeFormats()),
|
|
6110
|
+
], 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 [attr.data-date-format]=\"activeDateFormat\"\n />\n </mat-form-field>\n <div class=\"mapa-datepicker-range__divider\">–</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 [attr.data-date-format]=\"activeDateFormat\"\n />\n <mat-icon matSuffix (click)=\"cleanDatepicker()\">close</mat-icon>\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 ::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:#fff;border:2px solid #a7aaad;border-radius:8px;padding:0 .75em;min-height:48px;height:48px;width:310px}: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{width:100px!important;display:flex;align-items:center;align-self:stretch}: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{width:100px!important}:host ::ng-deep .mapa-datepicker-range__end-date{width:100px!important;min-width:100px!important;display:flex;align-items:center;align-self:stretch}: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:100px!important;min-width:100px!important}:host ::ng-deep .mapa-datepicker-range__divider{margin:0 8px}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix{display:flex;align-items:center;gap:4px;margin-left:96px;padding:unset!important}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix .mat-icon,: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%}:host ::ng-deep .mapa-datepicker-range .mat-mdc-text-field-wrapper{padding:0!important;align-items:center!important;display:flex;background:#fff;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;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:center;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: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i3$2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i3$2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i3$2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i3$2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.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 }); }
|
|
5996
6111
|
}
|
|
5997
6112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDatepickerRange, decorators: [{
|
|
5998
6113
|
type: Component,
|
|
@@ -6006,8 +6121,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
6006
6121
|
MatInputModule,
|
|
6007
6122
|
], providers: [
|
|
6008
6123
|
provideNgxMask(),
|
|
6009
|
-
provideNativeDateAdapter(
|
|
6010
|
-
], 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=\"
|
|
6124
|
+
provideNativeDateAdapter(getMapaDatepickerRangeFormats()),
|
|
6125
|
+
], 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 [attr.data-date-format]=\"activeDateFormat\"\n />\n </mat-form-field>\n <div class=\"mapa-datepicker-range__divider\">–</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 [attr.data-date-format]=\"activeDateFormat\"\n />\n <mat-icon matSuffix (click)=\"cleanDatepicker()\">close</mat-icon>\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 ::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:#fff;border:2px solid #a7aaad;border-radius:8px;padding:0 .75em;min-height:48px;height:48px;width:310px}: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{width:100px!important;display:flex;align-items:center;align-self:stretch}: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{width:100px!important}:host ::ng-deep .mapa-datepicker-range__end-date{width:100px!important;min-width:100px!important;display:flex;align-items:center;align-self:stretch}: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:100px!important;min-width:100px!important}:host ::ng-deep .mapa-datepicker-range__divider{margin:0 8px}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix{display:flex;align-items:center;gap:4px;margin-left:96px;padding:unset!important}:host ::ng-deep .mapa-datepicker-range .mat-mdc-form-field-icon-suffix .mat-icon,: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%}:host ::ng-deep .mapa-datepicker-range .mat-mdc-text-field-wrapper{padding:0!important;align-items:center!important;display:flex;background:#fff;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;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:center;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"] }]
|
|
6011
6126
|
}], ctorParameters: () => [{ type: MapaI18nService }, { type: i0.ChangeDetectorRef }], propDecorators: { formGroup: [{
|
|
6012
6127
|
type: Input
|
|
6013
6128
|
}], element: [{
|
|
@@ -7658,5 +7773,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
7658
7773
|
* Generated bundle index. Do not edit.
|
|
7659
7774
|
*/
|
|
7660
7775
|
|
|
7661
|
-
export { AIH_ESTADOS, AIH_TIPOS, BubblePaginationDirective, ButtonComponent, ButtonIconComponent, CEPRange, CID_NAME, CID_REGEX, CORES, CPFPipe, CapabilityClassificationService, CheckboxComponent, Datepicker, DatepickerRange, Dropdown, DropdownTree, ESTADOS, ESTADOS_SIGLA, ElementBase, FiltersComponent, HtmlSanitizerService, IPTUCREATE, IPTUMASKS, IPTUVALIDATE, IconComponent, InputText, LOCALIZACAO_BAIRROS, LOCALIZACAO_CIDADES, LOCALIZACAO_COMPLEMENTOS, LOCALIZACAO_ESTADOS, LOCALIZACAO_LOGRADOUROS, LOCALIZACAO_RUAS, LocaleDatePipe, LocaleDateTimePipe, MAPA_DATEPICKER_FORMATS,
|
|
7776
|
+
export { AIH_ESTADOS, AIH_TIPOS, BubblePaginationDirective, ButtonComponent, ButtonIconComponent, CEPRange, CID_NAME, CID_REGEX, CORES, CPFPipe, CapabilityClassificationService, CheckboxComponent, Datepicker, DatepickerRange, Dropdown, DropdownTree, ESTADOS, ESTADOS_SIGLA, ElementBase, FiltersComponent, HtmlSanitizerService, IPTUCREATE, IPTUMASKS, IPTUVALIDATE, IconComponent, InputText, LOCALIZACAO_BAIRROS, LOCALIZACAO_CIDADES, LOCALIZACAO_COMPLEMENTOS, LOCALIZACAO_ESTADOS, LOCALIZACAO_LOGRADOUROS, LOCALIZACAO_RUAS, LocaleDatePipe, LocaleDateTimePipe, MAPA_DATEPICKER_FORMATS, MAPA_UI_TEXTS, MASKSIE, MapaBenchmarkChartComponent, MapaBenchmarkIndicatorComponent, MapaBreadcrumbComponent, MapaCapabilityComparativeChartComponent, MapaCapabilityComparativeComponent, MapaCapabilityComparativeHeaderComponent, MapaCapabilityDetailComponent, MapaCapabilityDotComponent, MapaCapabilityExpandComponent, MapaCapabilityIndicatorChartComponent, MapaCapabilityIndicatorComponent, MapaCapabilityIndicatorListComponent, MapaCapabilityIntervalBarComponent, MapaCapabilityIntervalComponent, MapaChartComponent, MapaDatepicker, MapaDatepickerRange, MapaDetailsComponent, MapaDialogComponent, MapaDropdownComponent, MapaDropdownTreeComponent, MapaEmptyStateComponent, MapaFormComponent, MapaFormErrorsComponent, MapaGroupReportComponent, MapaI18nService, MapaInputComponent, MapaMenuComponent, MapaNavListComponent, MapaProgressbarComponent, MapaScaleComponent, MapaScaleParameterizationComponent, MapaSvgIconComponent, MapaTableComponent, MapaTextareaComponent, MapaTooltipComponent, MapaTooltipDirective, MapaWarningComponent, MatInputAutosizeDirective, PLACAS_INVALID, PLACAS_RANGE, RadioButton, RadioButtonComponent, ReportItemComponent, SafeHtmlPipe, SlideToggle, SlideToggleComponent, TagComponent, Textarea, ValidationMessageResolverService, addDays, allNumbersAreSame, buildDetailedIndicatorSections, buildIndicatorCollections, cep_ranges, create_aih, create_cartaocredito, create_certidao, create_cnh, create_cnhespelho, create_cnpj, create_cns, create_cpf, create_ect, create_iptu, create_iptu_ctba, create_iptu_sp, create_pispasep, create_processo, create_renachestadual, create_renachseguranca, create_renavam, create_titulo, create_titulo_atual, creditCardValidator, currencyToNumber, customPaginatorFactory, faker_iptu, fillString, formatBrazilianDate, formatDateAsDayMonthYear, formatDateAsMonthDayYear, formatDateForLocale, formatLocaleDate, formatLocaleDateTime, generateInscricaoEstadual, getActiveDateFormat, getActiveDateLocale, getActiveMaterialDateFormat, getAllDigits, getAllWords, getDateInputMask, getDefaultDateRange, getMapaDatepickerRangeFormats, getRelativeDateRange, getSpecialProperty, isArray, isDateValue, isMonthFirstDateLocale, isNil, isNumber, isPresent, isString, makeGenericFaker, maskBr, mask_iptu, mergeMapaUiTexts, modulo11, modulo11Custom, modulo11a, normalizeDateInput, normalizeDateLocale, normalizeLookup, normalizeText, numberToCurrency, openDialog, parseBrazilianDate, parseDateValue, parseLocaleDateValue, processCaretTraps, provideMapaUiTexts, rand, randArray, randomEstadoSigla, randomLetter, randomLetterOrNumber, randomNumber, rg_rj, rg_sp, sanitizeHtmlContent, slugify, toUtcDayExclusiveEndIso, toUtcRangeEndIso, toUtcRangeStartIso, utilsBr, validateBr, validate_aih, validate_cartaocredito, validate_celular, validate_cep, validate_certidao, validate_chassi, validate_cnh, validate_cnhespelho, validate_cnpj, validate_cns, validate_cpf, validate_currency, validate_datahora, validate_datetime, validate_ect, validate_inscricaoestadual, validate_iptu, validate_iptu_contagem, validate_iptu_ctba, validate_iptu_sp, validate_number, validate_pispasep, validate_placa, validate_porcentagem, validate_processo, validate_renachestadual, validate_renachseguranca, validate_renavam, validate_rg, validate_sped, validate_telefone, validate_time, validate_titulo };
|
|
7662
7777
|
//# sourceMappingURL=mapa-library-ui.mjs.map
|