mapa-library-ui 2.13.2 → 2.14.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/docs/GUIDE_V5_COMPONENTS.md +76 -0
- package/docs/TABLE_EXPORT.md +55 -2
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +67 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +67 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +67 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +67 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +67 -0
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-core-excel-export.mjs +73 -41
- package/fesm2022/mapa-library-ui-src-lib-core-excel-export.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-core-export.mjs +92 -26
- package/fesm2022/mapa-library-ui-src-lib-core-export.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +956 -4
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +842 -475
- package/mapa-library-ui-2.14.0.tgz +0 -0
- package/package.json +38 -2
- package/src/lib/components/capability/index.d.ts +61 -8
- package/src/lib/components/filters/index.d.ts +61 -8
- package/src/lib/components/scale/index.d.ts +61 -8
- package/src/lib/components/scale-parameterization/index.d.ts +61 -8
- package/src/lib/components/table/index.d.ts +59 -6
- package/src/lib/components/warning/index.d.ts +59 -6
- package/src/lib/core/excel-export/index.d.ts +23 -2
- package/src/lib/core/export/index.d.ts +166 -0
- package/worker/excel-export.runtime.d.ts +2 -2
- package/worker/excel-export.runtime.js +17 -17
- package/worker/excel-export.worker.js +19 -19
- package/mapa-library-ui-2.13.2.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 { getExportUiTexts } 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';
|
|
@@ -417,6 +418,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
417
418
|
}]
|
|
418
419
|
}], ctorParameters: () => [{ type: HtmlSanitizerService }] });
|
|
419
420
|
|
|
421
|
+
function joinAlternatives(items, separator) {
|
|
422
|
+
if (items.length <= 1) {
|
|
423
|
+
return items.join('');
|
|
424
|
+
}
|
|
425
|
+
return `${items.slice(0, -1).join(', ')} ${separator} ${items[items.length - 1]}`;
|
|
426
|
+
}
|
|
427
|
+
const MAPA_GUIDE_TEXTS_PT_BR = {
|
|
428
|
+
wizardSteps: {
|
|
429
|
+
navigationLabel: 'Etapas',
|
|
430
|
+
doneStatus: 'concluída',
|
|
431
|
+
lockedStatus: 'bloqueada',
|
|
432
|
+
},
|
|
433
|
+
deadlineField: {
|
|
434
|
+
unit: (value) => (value === 1 ? 'dia' : 'dias'),
|
|
435
|
+
integerError: 'Informe um número inteiro de dias',
|
|
436
|
+
},
|
|
437
|
+
welcomePreview: {
|
|
438
|
+
previewLabel: 'Prévia · como a pessoa vê',
|
|
439
|
+
startLabel: 'Começar',
|
|
440
|
+
},
|
|
441
|
+
catalogOrder: {
|
|
442
|
+
addLabel: 'Adicionar',
|
|
443
|
+
addItemLabel: (name) => `Adicionar ${name}`,
|
|
444
|
+
moveUpLabel: (name) => `Mover ${name} para cima`,
|
|
445
|
+
moveDownLabel: (name) => `Mover ${name} para baixo`,
|
|
446
|
+
removeLabel: (name) => `Remover ${name}`,
|
|
447
|
+
catalogEmpty: 'Todos os itens do catálogo já foram adicionados.',
|
|
448
|
+
orderEmptyTitle: 'Nenhum item adicionado',
|
|
449
|
+
orderEmptyDescription: 'Adicione pelo catálogo.',
|
|
450
|
+
addedAnnouncement: (name, position, total) => `${name} adicionado na posição ${position} de ${total}.`,
|
|
451
|
+
movedAnnouncement: (name, position, total) => `${name} movido para a posição ${position} de ${total}.`,
|
|
452
|
+
removedAnnouncement: (name) => `${name} removido.`,
|
|
453
|
+
},
|
|
454
|
+
palettePicker: {
|
|
455
|
+
defaultBadge: 'Padrão',
|
|
456
|
+
},
|
|
457
|
+
launchOptions: {
|
|
458
|
+
recommendedBadge: 'Indicado',
|
|
459
|
+
},
|
|
460
|
+
fileDrop: {
|
|
461
|
+
dropTitle: 'Arraste o arquivo para cá',
|
|
462
|
+
separator: 'ou',
|
|
463
|
+
selectLabel: 'Selecionar arquivo',
|
|
464
|
+
replaceLabel: 'Trocar arquivo',
|
|
465
|
+
acceptedTypes: (types) => joinAlternatives(types, 'ou'),
|
|
466
|
+
invalidType: (fileName, types) => `Não foi possível usar ${fileName}. Envie um arquivo ${joinAlternatives(types, 'ou')}.`,
|
|
467
|
+
tooLarge: (fileName, maxSize) => `${fileName} passa do limite de ${maxSize}.`,
|
|
468
|
+
},
|
|
469
|
+
};
|
|
470
|
+
function mergeMapaGuideTexts(customTexts) {
|
|
471
|
+
const defaults = MAPA_GUIDE_TEXTS_PT_BR;
|
|
472
|
+
return {
|
|
473
|
+
wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
|
|
474
|
+
deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
|
|
475
|
+
welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
|
|
476
|
+
catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
|
|
477
|
+
palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
|
|
478
|
+
launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
|
|
479
|
+
fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
|
|
420
483
|
const MAPA_UI_TEXTS = new InjectionToken('MAPA_UI_TEXTS');
|
|
421
484
|
function formatPaginatorRange(page, pageSize, length) {
|
|
422
485
|
if (length === 0 || pageSize === 0) {
|
|
@@ -445,6 +508,7 @@ function formatItemCount(count) {
|
|
|
445
508
|
return `${count} ${count === 1 ? 'item' : 'itens'}`;
|
|
446
509
|
}
|
|
447
510
|
const DEFAULT_MAPA_UI_TEXTS = {
|
|
511
|
+
export: getExportUiTexts('pt-BR'),
|
|
448
512
|
common: {
|
|
449
513
|
selectAll: 'Selecionar todos',
|
|
450
514
|
retry: 'Tentar novamente',
|
|
@@ -560,6 +624,7 @@ const DEFAULT_MAPA_UI_TEXTS = {
|
|
|
560
624
|
pattern: 'Formato inválido',
|
|
561
625
|
required: 'Campo obrigatório',
|
|
562
626
|
},
|
|
627
|
+
...MAPA_GUIDE_TEXTS_PT_BR,
|
|
563
628
|
};
|
|
564
629
|
function getDefaultTexts() {
|
|
565
630
|
return DEFAULT_MAPA_UI_TEXTS;
|
|
@@ -567,6 +632,7 @@ function getDefaultTexts() {
|
|
|
567
632
|
function mergeMapaUiTexts(customTexts) {
|
|
568
633
|
const defaults = getDefaultTexts();
|
|
569
634
|
return {
|
|
635
|
+
export: { ...defaults.export, ...(customTexts?.export ?? {}) },
|
|
570
636
|
common: { ...defaults.common, ...(customTexts?.common ?? {}) },
|
|
571
637
|
filters: { ...defaults.filters, ...(customTexts?.filters ?? {}) },
|
|
572
638
|
datepicker: { ...defaults.datepicker, ...(customTexts?.datepicker ?? {}) },
|
|
@@ -576,6 +642,7 @@ function mergeMapaUiTexts(customTexts) {
|
|
|
576
642
|
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
577
643
|
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
578
644
|
validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
|
|
645
|
+
...mergeMapaGuideTexts(customTexts),
|
|
579
646
|
};
|
|
580
647
|
}
|
|
581
648
|
function provideMapaUiTexts(texts) {
|