mapa-library-ui 2.14.0 → 2.15.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 +5 -8
- package/docs/TABLE_EXPORT.md +6 -6
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +16 -65
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-core-export.mjs +11 -2
- package/fesm2022/mapa-library-ui-src-lib-core-export.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +17 -66
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +221 -76
- package/mapa-library-ui-2.15.0.tgz +0 -0
- package/package.json +2 -2
- package/src/lib/components/capability/index.d.ts +8 -61
- package/src/lib/components/filters/index.d.ts +8 -61
- package/src/lib/components/scale/index.d.ts +8 -61
- package/src/lib/components/scale-parameterization/index.d.ts +8 -61
- package/src/lib/components/table/index.d.ts +6 -59
- package/src/lib/components/warning/index.d.ts +6 -59
- package/src/lib/core/export/index.d.ts +1 -0
- package/mapa-library-ui-2.14.0.tgz +0 -0
|
@@ -3,7 +3,7 @@ import { CommonModule, NgClass, NgTemplateOutlet, DatePipe } from '@angular/comm
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, effect, EventEmitter, DestroyRef, Input, Output, Directive, SecurityContext, Pipe, Component, TemplateRef, contentChildren, ChangeDetectorRef, viewChild, afterEveryRender, ChangeDetectionStrategy } from '@angular/core';
|
|
5
5
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { getExportUiTexts, getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
|
|
6
|
+
import { MAPA_UI_TEXTS_PT_BR, getExportUiTexts, getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
|
|
7
7
|
import * as i1 from '@angular/material/paginator';
|
|
8
8
|
import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
|
|
9
9
|
import * as i1$3 from '@angular/material/checkbox';
|
|
@@ -17,68 +17,6 @@ import { map, startWith } from 'rxjs/operators';
|
|
|
17
17
|
import * as i1$1 from '@angular/platform-browser';
|
|
18
18
|
import * as i1$2 from '@angular/common/http';
|
|
19
19
|
|
|
20
|
-
function joinAlternatives(items, separator) {
|
|
21
|
-
if (items.length <= 1) {
|
|
22
|
-
return items.join('');
|
|
23
|
-
}
|
|
24
|
-
return `${items.slice(0, -1).join(', ')} ${separator} ${items[items.length - 1]}`;
|
|
25
|
-
}
|
|
26
|
-
const MAPA_GUIDE_TEXTS_PT_BR = {
|
|
27
|
-
wizardSteps: {
|
|
28
|
-
navigationLabel: 'Etapas',
|
|
29
|
-
doneStatus: 'concluída',
|
|
30
|
-
lockedStatus: 'bloqueada',
|
|
31
|
-
},
|
|
32
|
-
deadlineField: {
|
|
33
|
-
unit: (value) => (value === 1 ? 'dia' : 'dias'),
|
|
34
|
-
integerError: 'Informe um número inteiro de dias',
|
|
35
|
-
},
|
|
36
|
-
welcomePreview: {
|
|
37
|
-
previewLabel: 'Prévia · como a pessoa vê',
|
|
38
|
-
startLabel: 'Começar',
|
|
39
|
-
},
|
|
40
|
-
catalogOrder: {
|
|
41
|
-
addLabel: 'Adicionar',
|
|
42
|
-
addItemLabel: (name) => `Adicionar ${name}`,
|
|
43
|
-
moveUpLabel: (name) => `Mover ${name} para cima`,
|
|
44
|
-
moveDownLabel: (name) => `Mover ${name} para baixo`,
|
|
45
|
-
removeLabel: (name) => `Remover ${name}`,
|
|
46
|
-
catalogEmpty: 'Todos os itens do catálogo já foram adicionados.',
|
|
47
|
-
orderEmptyTitle: 'Nenhum item adicionado',
|
|
48
|
-
orderEmptyDescription: 'Adicione pelo catálogo.',
|
|
49
|
-
addedAnnouncement: (name, position, total) => `${name} adicionado na posição ${position} de ${total}.`,
|
|
50
|
-
movedAnnouncement: (name, position, total) => `${name} movido para a posição ${position} de ${total}.`,
|
|
51
|
-
removedAnnouncement: (name) => `${name} removido.`,
|
|
52
|
-
},
|
|
53
|
-
palettePicker: {
|
|
54
|
-
defaultBadge: 'Padrão',
|
|
55
|
-
},
|
|
56
|
-
launchOptions: {
|
|
57
|
-
recommendedBadge: 'Indicado',
|
|
58
|
-
},
|
|
59
|
-
fileDrop: {
|
|
60
|
-
dropTitle: 'Arraste o arquivo para cá',
|
|
61
|
-
separator: 'ou',
|
|
62
|
-
selectLabel: 'Selecionar arquivo',
|
|
63
|
-
replaceLabel: 'Trocar arquivo',
|
|
64
|
-
acceptedTypes: (types) => joinAlternatives(types, 'ou'),
|
|
65
|
-
invalidType: (fileName, types) => `Não foi possível usar ${fileName}. Envie um arquivo ${joinAlternatives(types, 'ou')}.`,
|
|
66
|
-
tooLarge: (fileName, maxSize) => `${fileName} passa do limite de ${maxSize}.`,
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
function mergeMapaGuideTexts(customTexts) {
|
|
70
|
-
const defaults = MAPA_GUIDE_TEXTS_PT_BR;
|
|
71
|
-
return {
|
|
72
|
-
wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
|
|
73
|
-
deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
|
|
74
|
-
welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
|
|
75
|
-
catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
|
|
76
|
-
palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
|
|
77
|
-
launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
|
|
78
|
-
fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
20
|
const MAPA_UI_TEXTS = new InjectionToken('MAPA_UI_TEXTS');
|
|
83
21
|
function formatPaginatorRange(page, pageSize, length) {
|
|
84
22
|
if (length === 0 || pageSize === 0) {
|
|
@@ -223,7 +161,14 @@ const DEFAULT_MAPA_UI_TEXTS = {
|
|
|
223
161
|
pattern: 'Formato inválido',
|
|
224
162
|
required: 'Campo obrigatório',
|
|
225
163
|
},
|
|
226
|
-
|
|
164
|
+
// Guia V5 components (21.x) use the pt-BR texts published by mapa-frontend-i18n.
|
|
165
|
+
wizardSteps: MAPA_UI_TEXTS_PT_BR.wizardSteps,
|
|
166
|
+
deadlineField: MAPA_UI_TEXTS_PT_BR.deadlineField,
|
|
167
|
+
welcomePreview: MAPA_UI_TEXTS_PT_BR.welcomePreview,
|
|
168
|
+
catalogOrder: MAPA_UI_TEXTS_PT_BR.catalogOrder,
|
|
169
|
+
palettePicker: MAPA_UI_TEXTS_PT_BR.palettePicker,
|
|
170
|
+
launchOptions: MAPA_UI_TEXTS_PT_BR.launchOptions,
|
|
171
|
+
fileDrop: MAPA_UI_TEXTS_PT_BR.fileDrop,
|
|
227
172
|
};
|
|
228
173
|
function getDefaultTexts() {
|
|
229
174
|
return DEFAULT_MAPA_UI_TEXTS;
|
|
@@ -241,7 +186,13 @@ function mergeMapaUiTexts(customTexts) {
|
|
|
241
186
|
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
242
187
|
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
243
188
|
validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
|
|
244
|
-
...
|
|
189
|
+
wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
|
|
190
|
+
deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
|
|
191
|
+
welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
|
|
192
|
+
catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
|
|
193
|
+
palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
|
|
194
|
+
launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
|
|
195
|
+
fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
|
|
245
196
|
};
|
|
246
197
|
}
|
|
247
198
|
function provideMapaUiTexts(texts) {
|