mapa-library-ui 2.14.0 → 2.14.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/docs/GUIDE_V5_COMPONENTS.md +5 -8
- 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.mjs +17 -66
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +221 -76
- package/mapa-library-ui-2.14.1.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/mapa-library-ui-2.14.0.tgz +0 -0
|
@@ -38,17 +38,14 @@ import { MapaWizardStepsComponent } from 'mapa-library-ui';
|
|
|
38
38
|
|
|
39
39
|
Rótulos de acessibilidade, botões e mensagens fixas usam os grupos `wizardSteps`,
|
|
40
40
|
`deadlineField`, `welcomePreview`, `catalogOrder`, `palettePicker`, `launchOptions` e
|
|
41
|
-
`fileDrop` de `MapaUiTexts`,
|
|
42
|
-
de mínimo, máximo e obrigatório do campo de
|
|
41
|
+
`fileDrop` de `MapaUiTexts`, publicados pelo `mapa-frontend-i18n` (2.11.0 em diante) em
|
|
42
|
+
pt-BR, en e es. O padrão é o português. Os erros de mínimo, máximo e obrigatório do campo de
|
|
43
|
+
prazo reaproveitam o grupo `validation`.
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
`getMapaUiTexts(idioma)` recebe o português. Para outro idioma, some os grupos ao provider:
|
|
45
|
+
Para outro idioma, passe ao provider os textos do idioma:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
|
-
provideMapaUiTexts(
|
|
49
|
-
...getMapaUiTexts(language),
|
|
50
|
-
wizardSteps: { navigationLabel: 'Steps', doneStatus: 'done', lockedStatus: 'locked' },
|
|
51
|
-
});
|
|
48
|
+
provideMapaUiTexts(getMapaUiTexts(language));
|
|
52
49
|
```
|
|
53
50
|
|
|
54
51
|
Títulos, descrições e conteúdo vêm por input e são traduzidos pelo consumidor.
|
|
@@ -8,7 +8,7 @@ import { merge, EMPTY } from 'rxjs';
|
|
|
8
8
|
import * as i1 from '@angular/common';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
10
10
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
-
import { getExportUiTexts } from 'mapa-frontend-i18n';
|
|
11
|
+
import { MAPA_UI_TEXTS_PT_BR, getExportUiTexts } from 'mapa-frontend-i18n';
|
|
12
12
|
import * as i1$1 from '@angular/platform-browser';
|
|
13
13
|
import * as i1$3 from '@angular/material/icon';
|
|
14
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
@@ -47,68 +47,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
47
47
|
* Public API Surface of mapa-library-ui button
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
|
-
function joinAlternatives(items, separator) {
|
|
51
|
-
if (items.length <= 1) {
|
|
52
|
-
return items.join('');
|
|
53
|
-
}
|
|
54
|
-
return `${items.slice(0, -1).join(', ')} ${separator} ${items[items.length - 1]}`;
|
|
55
|
-
}
|
|
56
|
-
const MAPA_GUIDE_TEXTS_PT_BR = {
|
|
57
|
-
wizardSteps: {
|
|
58
|
-
navigationLabel: 'Etapas',
|
|
59
|
-
doneStatus: 'concluída',
|
|
60
|
-
lockedStatus: 'bloqueada',
|
|
61
|
-
},
|
|
62
|
-
deadlineField: {
|
|
63
|
-
unit: (value) => (value === 1 ? 'dia' : 'dias'),
|
|
64
|
-
integerError: 'Informe um número inteiro de dias',
|
|
65
|
-
},
|
|
66
|
-
welcomePreview: {
|
|
67
|
-
previewLabel: 'Prévia · como a pessoa vê',
|
|
68
|
-
startLabel: 'Começar',
|
|
69
|
-
},
|
|
70
|
-
catalogOrder: {
|
|
71
|
-
addLabel: 'Adicionar',
|
|
72
|
-
addItemLabel: (name) => `Adicionar ${name}`,
|
|
73
|
-
moveUpLabel: (name) => `Mover ${name} para cima`,
|
|
74
|
-
moveDownLabel: (name) => `Mover ${name} para baixo`,
|
|
75
|
-
removeLabel: (name) => `Remover ${name}`,
|
|
76
|
-
catalogEmpty: 'Todos os itens do catálogo já foram adicionados.',
|
|
77
|
-
orderEmptyTitle: 'Nenhum item adicionado',
|
|
78
|
-
orderEmptyDescription: 'Adicione pelo catálogo.',
|
|
79
|
-
addedAnnouncement: (name, position, total) => `${name} adicionado na posição ${position} de ${total}.`,
|
|
80
|
-
movedAnnouncement: (name, position, total) => `${name} movido para a posição ${position} de ${total}.`,
|
|
81
|
-
removedAnnouncement: (name) => `${name} removido.`,
|
|
82
|
-
},
|
|
83
|
-
palettePicker: {
|
|
84
|
-
defaultBadge: 'Padrão',
|
|
85
|
-
},
|
|
86
|
-
launchOptions: {
|
|
87
|
-
recommendedBadge: 'Indicado',
|
|
88
|
-
},
|
|
89
|
-
fileDrop: {
|
|
90
|
-
dropTitle: 'Arraste o arquivo para cá',
|
|
91
|
-
separator: 'ou',
|
|
92
|
-
selectLabel: 'Selecionar arquivo',
|
|
93
|
-
replaceLabel: 'Trocar arquivo',
|
|
94
|
-
acceptedTypes: (types) => joinAlternatives(types, 'ou'),
|
|
95
|
-
invalidType: (fileName, types) => `Não foi possível usar ${fileName}. Envie um arquivo ${joinAlternatives(types, 'ou')}.`,
|
|
96
|
-
tooLarge: (fileName, maxSize) => `${fileName} passa do limite de ${maxSize}.`,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
function mergeMapaGuideTexts(customTexts) {
|
|
100
|
-
const defaults = MAPA_GUIDE_TEXTS_PT_BR;
|
|
101
|
-
return {
|
|
102
|
-
wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
|
|
103
|
-
deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
|
|
104
|
-
welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
|
|
105
|
-
catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
|
|
106
|
-
palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
|
|
107
|
-
launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
|
|
108
|
-
fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
50
|
const MAPA_UI_TEXTS = new InjectionToken('MAPA_UI_TEXTS');
|
|
113
51
|
function formatPaginatorRange(page, pageSize, length) {
|
|
114
52
|
if (length === 0 || pageSize === 0) {
|
|
@@ -253,7 +191,14 @@ const DEFAULT_MAPA_UI_TEXTS = {
|
|
|
253
191
|
pattern: 'Formato inválido',
|
|
254
192
|
required: 'Campo obrigatório',
|
|
255
193
|
},
|
|
256
|
-
|
|
194
|
+
// Guia V5 components (21.x) use the pt-BR texts published by mapa-frontend-i18n.
|
|
195
|
+
wizardSteps: MAPA_UI_TEXTS_PT_BR.wizardSteps,
|
|
196
|
+
deadlineField: MAPA_UI_TEXTS_PT_BR.deadlineField,
|
|
197
|
+
welcomePreview: MAPA_UI_TEXTS_PT_BR.welcomePreview,
|
|
198
|
+
catalogOrder: MAPA_UI_TEXTS_PT_BR.catalogOrder,
|
|
199
|
+
palettePicker: MAPA_UI_TEXTS_PT_BR.palettePicker,
|
|
200
|
+
launchOptions: MAPA_UI_TEXTS_PT_BR.launchOptions,
|
|
201
|
+
fileDrop: MAPA_UI_TEXTS_PT_BR.fileDrop,
|
|
257
202
|
};
|
|
258
203
|
function getDefaultTexts() {
|
|
259
204
|
return DEFAULT_MAPA_UI_TEXTS;
|
|
@@ -271,7 +216,13 @@ function mergeMapaUiTexts(customTexts) {
|
|
|
271
216
|
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
272
217
|
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
273
218
|
validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
|
|
274
|
-
...
|
|
219
|
+
wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
|
|
220
|
+
deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
|
|
221
|
+
welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
|
|
222
|
+
catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
|
|
223
|
+
palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
|
|
224
|
+
launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
|
|
225
|
+
fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
|
|
275
226
|
};
|
|
276
227
|
}
|
|
277
228
|
function provideMapaUiTexts(texts) {
|