mapa-library-ui 1.6.2 → 1.7.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 +322 -168
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +318 -166
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +80 -6
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +80 -6
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +318 -166
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +320 -168
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +320 -163
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +332 -176
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +2 -2
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +78 -4
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +78 -4
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +76 -2
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +79 -4
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +78 -4
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +76 -2
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs +1 -0
- package/fesm2022/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +391 -412
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +50 -73
- package/mapa-library-ui-1.7.0.tgz +0 -0
- package/package.json +1 -9
- package/src/lib/components/capability/index.d.ts +71 -55
- package/src/lib/components/dropdown/index.d.ts +51 -55
- package/src/lib/core/guards/authorize-guard/index.d.ts +2 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-v2.mjs +0 -303
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-v2.mjs.map +0 -1
- package/mapa-library-ui-1.6.2.tgz +0 -0
- package/src/lib/components/dropdown-v2/index.d.ts +0 -165
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
import { Md5 } from 'ts-md5';
|
|
9
8
|
import * as i2 from '@angular/material/expansion';
|
|
10
9
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
@@ -419,8 +418,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
419
418
|
}], ctorParameters: () => [{ type: HtmlSanitizerService }] });
|
|
420
419
|
|
|
421
420
|
const MAPA_UI_TEXTS = new InjectionToken("MAPA_UI_TEXTS");
|
|
421
|
+
function formatPaginatorRange(page, pageSize, length) {
|
|
422
|
+
if (length === 0 || pageSize === 0) {
|
|
423
|
+
return `0 de ${length}`;
|
|
424
|
+
}
|
|
425
|
+
const safeLength = Math.max(length, 0);
|
|
426
|
+
const startIndex = page * pageSize;
|
|
427
|
+
const endIndex = startIndex < safeLength
|
|
428
|
+
? Math.min(startIndex + pageSize, safeLength)
|
|
429
|
+
: startIndex + pageSize;
|
|
430
|
+
return `${startIndex + 1} - ${endIndex} de ${safeLength}`;
|
|
431
|
+
}
|
|
432
|
+
function formatPaginatorShowingRange(page, pageSize, length) {
|
|
433
|
+
if (length === 0 || pageSize === 0) {
|
|
434
|
+
return "Mostrando 0 - 0 de 0 item";
|
|
435
|
+
}
|
|
436
|
+
const safeLength = Math.max(length, 0);
|
|
437
|
+
const startIndex = page * pageSize;
|
|
438
|
+
const endIndex = startIndex < safeLength
|
|
439
|
+
? Math.min(startIndex + pageSize, safeLength)
|
|
440
|
+
: startIndex + pageSize;
|
|
441
|
+
const itemLabel = safeLength === 1 ? "item" : "itens";
|
|
442
|
+
return `Mostrando ${startIndex + 1} - ${endIndex} de ${safeLength} ${itemLabel}`;
|
|
443
|
+
}
|
|
444
|
+
const DEFAULT_MAPA_UI_TEXTS = {
|
|
445
|
+
common: {
|
|
446
|
+
selectAll: "Selecionar todos",
|
|
447
|
+
},
|
|
448
|
+
filters: {
|
|
449
|
+
clear: "Limpar filtros",
|
|
450
|
+
submit: "Filtrar",
|
|
451
|
+
},
|
|
452
|
+
datepicker: {
|
|
453
|
+
startDatePlaceholder: "Data inicial",
|
|
454
|
+
endDatePlaceholder: "Data final",
|
|
455
|
+
},
|
|
456
|
+
capability: {
|
|
457
|
+
groupAverageTitle: "Média geral do grupo",
|
|
458
|
+
individualAverageTitle: "Média geral do indivíduo",
|
|
459
|
+
conceptTitle: "Conceito",
|
|
460
|
+
resultTitle: "Resultado",
|
|
461
|
+
positiveIndicatorsTitle: "Indicadores positivos",
|
|
462
|
+
negativeIndicatorsTitle: "Indicadores negativos",
|
|
463
|
+
riskIndicatorsTitle: "Indicadores de risco",
|
|
464
|
+
precipitationRiskTitle: "Risco de acidente por precipitação",
|
|
465
|
+
negligenceRiskTitle: "Risco de acidente por negligência",
|
|
466
|
+
negativeDirectionLabel: "Direção Negativa |",
|
|
467
|
+
positiveDirectionLabel: "Direção Positiva |",
|
|
468
|
+
},
|
|
469
|
+
paginator: {
|
|
470
|
+
itemsPerPage: "Itens por página",
|
|
471
|
+
nextPage: "Próxima página",
|
|
472
|
+
previousPage: "Página anterior",
|
|
473
|
+
rangeLabel: formatPaginatorRange,
|
|
474
|
+
showingRangeLabel: formatPaginatorShowingRange,
|
|
475
|
+
},
|
|
476
|
+
warning: {
|
|
477
|
+
lowReliabilityTitle: "Nível baixo de confiabilidade no(s) teste(s):",
|
|
478
|
+
expirationLimitTitle: "O prazo de validade do(s) teste(s) está no limite:",
|
|
479
|
+
},
|
|
480
|
+
table: {
|
|
481
|
+
emptyTitle: "Não foram encontrados resultados",
|
|
482
|
+
emptySubtitle: "",
|
|
483
|
+
},
|
|
484
|
+
validation: {
|
|
485
|
+
cnpj: "CNPJ inválido",
|
|
486
|
+
cpf: "CPF inválido",
|
|
487
|
+
email: "E-mail inválido",
|
|
488
|
+
max: (context) => `O valor máximo permitido é ${context?.max ?? ""}`.trim(),
|
|
489
|
+
maxLength: (context) => `O máximo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
|
|
490
|
+
min: (context) => `O valor mínimo permitido é ${context?.min ?? ""}`.trim(),
|
|
491
|
+
minLength: (context) => `O mínimo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
|
|
492
|
+
pattern: "Formato inválido",
|
|
493
|
+
required: "Campo obrigatório",
|
|
494
|
+
},
|
|
495
|
+
};
|
|
422
496
|
function getDefaultTexts() {
|
|
423
|
-
return
|
|
497
|
+
return DEFAULT_MAPA_UI_TEXTS;
|
|
424
498
|
}
|
|
425
499
|
function mergeMapaUiTexts(customTexts) {
|
|
426
500
|
const defaults = getDefaultTexts();
|