mapa-library-ui 1.1.8 → 1.2.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/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +23 -103
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +13 -95
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +80 -7
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +39 -109
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +32 -75
- package/mapa-library-ui-1.2.0.tgz +0 -0
- package/package.json +10 -8
- package/src/lib/components/capability/index.d.ts +11 -65
- package/src/lib/components/datepicker-range/index.d.ts +7 -61
- package/src/lib/components/dropdown/index.d.ts +7 -61
- package/src/lib/components/filters/index.d.ts +8 -62
- package/src/lib/components/scale/index.d.ts +8 -62
- package/src/lib/components/scale-parameterization/index.d.ts +8 -62
- package/src/lib/components/table/index.d.ts +11 -64
- package/src/lib/components/warning/index.d.ts +25 -0
- package/mapa-library-ui-1.1.8.tgz +0 -0
|
@@ -4,6 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { Injectable, Input, Component, inject, DestroyRef, EnvironmentInjector, createComponent, HostListener, Directive, SecurityContext, Pipe, InjectionToken, Injector, signal, Optional, Inject, EventEmitter, Output, ViewChild, ChangeDetectionStrategy } from '@angular/core';
|
|
5
5
|
import * as i1$1 from '@angular/platform-browser';
|
|
6
6
|
import { toObservable } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { getMapaUiTexts } from 'mapa-frontend-i18n';
|
|
7
8
|
import { Md5 } from 'ts-md5';
|
|
8
9
|
import * as i2 from '@angular/material/expansion';
|
|
9
10
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
@@ -418,103 +419,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
418
419
|
}], ctorParameters: () => [{ type: HtmlSanitizerService }] });
|
|
419
420
|
|
|
420
421
|
const MAPA_UI_TEXTS = new InjectionToken("MAPA_UI_TEXTS");
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
},
|
|
425
|
-
filters: {
|
|
426
|
-
clear: "Limpar filtros",
|
|
427
|
-
submit: "Filtrar",
|
|
428
|
-
},
|
|
429
|
-
datepicker: {
|
|
430
|
-
startDatePlaceholder: "Data inicial",
|
|
431
|
-
endDatePlaceholder: "Data final",
|
|
432
|
-
},
|
|
433
|
-
capability: {
|
|
434
|
-
groupAverageTitle: "Média geral do grupo",
|
|
435
|
-
individualAverageTitle: "Média geral do indivíduo",
|
|
436
|
-
conceptTitle: "Conceito",
|
|
437
|
-
resultTitle: "Resultado",
|
|
438
|
-
positiveIndicatorsTitle: "Indicadores positivos",
|
|
439
|
-
negativeIndicatorsTitle: "Indicadores negativos",
|
|
440
|
-
riskIndicatorsTitle: "Indicadores de risco",
|
|
441
|
-
precipitationRiskTitle: "Risco de acidente por precipitação",
|
|
442
|
-
negligenceRiskTitle: "Risco de acidente por negligência",
|
|
443
|
-
negativeDirectionLabel: "Direção Negativa |",
|
|
444
|
-
positiveDirectionLabel: "Direção Positiva |",
|
|
445
|
-
},
|
|
446
|
-
paginator: {
|
|
447
|
-
itemsPerPage: "Itens por página",
|
|
448
|
-
nextPage: "Próxima página",
|
|
449
|
-
previousPage: "Página anterior",
|
|
450
|
-
rangeLabel: (page, pageSize, length) => {
|
|
451
|
-
if (length === 0 || pageSize === 0) {
|
|
452
|
-
return `0 de ${length}`;
|
|
453
|
-
}
|
|
454
|
-
const startIndex = page * pageSize;
|
|
455
|
-
const endIndex = startIndex < length
|
|
456
|
-
? Math.min(startIndex + pageSize, length)
|
|
457
|
-
: startIndex + pageSize;
|
|
458
|
-
return `${startIndex + 1} - ${endIndex} de ${length}`;
|
|
459
|
-
},
|
|
460
|
-
showingRangeLabel: (page, pageSize, length) => {
|
|
461
|
-
if (length === 0) {
|
|
462
|
-
return "Mostrando 0 - 0 de 0 item";
|
|
463
|
-
}
|
|
464
|
-
const startIndex = page * pageSize;
|
|
465
|
-
const endIndex = startIndex < length
|
|
466
|
-
? Math.min(startIndex + pageSize, length)
|
|
467
|
-
: startIndex + pageSize;
|
|
468
|
-
const itemLabel = length === 1 ? "item" : "itens";
|
|
469
|
-
return `Mostrando ${startIndex + 1} - ${endIndex} de ${length} ${itemLabel}`;
|
|
470
|
-
},
|
|
471
|
-
},
|
|
472
|
-
table: {
|
|
473
|
-
emptyTitle: "Nao foram encontrados resultados",
|
|
474
|
-
emptySubtitle: "",
|
|
475
|
-
},
|
|
476
|
-
validation: {
|
|
477
|
-
cnpj: "CNPJ inválido",
|
|
478
|
-
cpf: "CPF inválido",
|
|
479
|
-
email: "E-mail inválido",
|
|
480
|
-
max: (context) => `O valor máximo permitido é ${context?.max ?? ""}`.trim(),
|
|
481
|
-
maxLength: (context) => `O máximo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
|
|
482
|
-
min: (context) => `O valor minimo permitido é ${context?.min ?? ""}`.trim(),
|
|
483
|
-
minLength: (context) => `O mínimo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
|
|
484
|
-
pattern: "Formato inválido",
|
|
485
|
-
required: "Campo obrigatório",
|
|
486
|
-
},
|
|
487
|
-
};
|
|
422
|
+
function getDefaultTexts() {
|
|
423
|
+
return getMapaUiTexts("pt-BR");
|
|
424
|
+
}
|
|
488
425
|
function mergeMapaUiTexts(customTexts) {
|
|
426
|
+
const defaults = getDefaultTexts();
|
|
489
427
|
return {
|
|
490
|
-
common: {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
},
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
datepicker: {
|
|
499
|
-
...MAPA_UI_DEFAULT_TEXTS.datepicker,
|
|
500
|
-
...(customTexts?.datepicker ?? {}),
|
|
501
|
-
},
|
|
502
|
-
capability: {
|
|
503
|
-
...MAPA_UI_DEFAULT_TEXTS.capability,
|
|
504
|
-
...(customTexts?.capability ?? {}),
|
|
505
|
-
},
|
|
506
|
-
paginator: {
|
|
507
|
-
...MAPA_UI_DEFAULT_TEXTS.paginator,
|
|
508
|
-
...(customTexts?.paginator ?? {}),
|
|
509
|
-
},
|
|
510
|
-
table: {
|
|
511
|
-
...MAPA_UI_DEFAULT_TEXTS.table,
|
|
512
|
-
...(customTexts?.table ?? {}),
|
|
513
|
-
},
|
|
514
|
-
validation: {
|
|
515
|
-
...MAPA_UI_DEFAULT_TEXTS.validation,
|
|
516
|
-
...(customTexts?.validation ?? {}),
|
|
517
|
-
},
|
|
428
|
+
common: { ...defaults.common, ...(customTexts?.common ?? {}) },
|
|
429
|
+
filters: { ...defaults.filters, ...(customTexts?.filters ?? {}) },
|
|
430
|
+
datepicker: { ...defaults.datepicker, ...(customTexts?.datepicker ?? {}) },
|
|
431
|
+
capability: { ...defaults.capability, ...(customTexts?.capability ?? {}) },
|
|
432
|
+
paginator: { ...defaults.paginator, ...(customTexts?.paginator ?? {}) },
|
|
433
|
+
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
434
|
+
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
435
|
+
validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
|
|
518
436
|
};
|
|
519
437
|
}
|
|
520
438
|
function provideMapaUiTexts(texts) {
|