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.
Files changed (51) hide show
  1. package/docs/GUIDE_V5_COMPONENTS.md +76 -0
  2. package/docs/TABLE_EXPORT.md +55 -2
  3. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +67 -0
  4. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  5. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +67 -0
  6. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
  7. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +67 -1
  8. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
  9. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +67 -0
  10. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
  11. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +67 -0
  12. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  13. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +67 -0
  14. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
  15. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +67 -1
  16. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
  17. package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +67 -1
  18. package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
  19. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +67 -0
  20. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
  21. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +67 -0
  22. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
  23. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +67 -0
  24. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
  25. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +67 -1
  26. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
  27. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +67 -0
  28. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
  29. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +67 -0
  30. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
  31. package/fesm2022/mapa-library-ui-src-lib-core-excel-export.mjs +73 -41
  32. package/fesm2022/mapa-library-ui-src-lib-core-excel-export.mjs.map +1 -1
  33. package/fesm2022/mapa-library-ui-src-lib-core-export.mjs +92 -26
  34. package/fesm2022/mapa-library-ui-src-lib-core-export.mjs.map +1 -1
  35. package/fesm2022/mapa-library-ui.mjs +956 -4
  36. package/fesm2022/mapa-library-ui.mjs.map +1 -1
  37. package/index.d.ts +842 -475
  38. package/mapa-library-ui-2.14.0.tgz +0 -0
  39. package/package.json +38 -2
  40. package/src/lib/components/capability/index.d.ts +61 -8
  41. package/src/lib/components/filters/index.d.ts +61 -8
  42. package/src/lib/components/scale/index.d.ts +61 -8
  43. package/src/lib/components/scale-parameterization/index.d.ts +61 -8
  44. package/src/lib/components/table/index.d.ts +59 -6
  45. package/src/lib/components/warning/index.d.ts +59 -6
  46. package/src/lib/core/excel-export/index.d.ts +23 -2
  47. package/src/lib/core/export/index.d.ts +166 -0
  48. package/worker/excel-export.runtime.d.ts +2 -2
  49. package/worker/excel-export.runtime.js +17 -17
  50. package/worker/excel-export.worker.js +19 -19
  51. package/mapa-library-ui-2.13.2.tgz +0 -0
@@ -14,7 +14,7 @@ import * as i3 from '@angular/material/menu';
14
14
  import { MatMenuModule } from '@angular/material/menu';
15
15
  import { RouterLink } from '@angular/router';
16
16
  import * as i1$1 from '@angular/platform-browser';
17
- import { getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
17
+ import { getExportUiTexts, getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
18
18
  import * as i1$2 from '@angular/common/http';
19
19
 
20
20
  class BubblePaginationDirective {
@@ -321,6 +321,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
321
321
  }]
322
322
  }], ctorParameters: () => [{ type: HtmlSanitizerService }] });
323
323
 
324
+ function joinAlternatives(items, separator) {
325
+ if (items.length <= 1) {
326
+ return items.join('');
327
+ }
328
+ return `${items.slice(0, -1).join(', ')} ${separator} ${items[items.length - 1]}`;
329
+ }
330
+ const MAPA_GUIDE_TEXTS_PT_BR = {
331
+ wizardSteps: {
332
+ navigationLabel: 'Etapas',
333
+ doneStatus: 'concluída',
334
+ lockedStatus: 'bloqueada',
335
+ },
336
+ deadlineField: {
337
+ unit: (value) => (value === 1 ? 'dia' : 'dias'),
338
+ integerError: 'Informe um número inteiro de dias',
339
+ },
340
+ welcomePreview: {
341
+ previewLabel: 'Prévia · como a pessoa vê',
342
+ startLabel: 'Começar',
343
+ },
344
+ catalogOrder: {
345
+ addLabel: 'Adicionar',
346
+ addItemLabel: (name) => `Adicionar ${name}`,
347
+ moveUpLabel: (name) => `Mover ${name} para cima`,
348
+ moveDownLabel: (name) => `Mover ${name} para baixo`,
349
+ removeLabel: (name) => `Remover ${name}`,
350
+ catalogEmpty: 'Todos os itens do catálogo já foram adicionados.',
351
+ orderEmptyTitle: 'Nenhum item adicionado',
352
+ orderEmptyDescription: 'Adicione pelo catálogo.',
353
+ addedAnnouncement: (name, position, total) => `${name} adicionado na posição ${position} de ${total}.`,
354
+ movedAnnouncement: (name, position, total) => `${name} movido para a posição ${position} de ${total}.`,
355
+ removedAnnouncement: (name) => `${name} removido.`,
356
+ },
357
+ palettePicker: {
358
+ defaultBadge: 'Padrão',
359
+ },
360
+ launchOptions: {
361
+ recommendedBadge: 'Indicado',
362
+ },
363
+ fileDrop: {
364
+ dropTitle: 'Arraste o arquivo para cá',
365
+ separator: 'ou',
366
+ selectLabel: 'Selecionar arquivo',
367
+ replaceLabel: 'Trocar arquivo',
368
+ acceptedTypes: (types) => joinAlternatives(types, 'ou'),
369
+ invalidType: (fileName, types) => `Não foi possível usar ${fileName}. Envie um arquivo ${joinAlternatives(types, 'ou')}.`,
370
+ tooLarge: (fileName, maxSize) => `${fileName} passa do limite de ${maxSize}.`,
371
+ },
372
+ };
373
+ function mergeMapaGuideTexts(customTexts) {
374
+ const defaults = MAPA_GUIDE_TEXTS_PT_BR;
375
+ return {
376
+ wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
377
+ deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
378
+ welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
379
+ catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
380
+ palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
381
+ launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
382
+ fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
383
+ };
384
+ }
385
+
324
386
  const MAPA_UI_TEXTS = new InjectionToken('MAPA_UI_TEXTS');
325
387
  function formatPaginatorRange(page, pageSize, length) {
326
388
  if (length === 0 || pageSize === 0) {
@@ -349,6 +411,7 @@ function formatItemCount(count) {
349
411
  return `${count} ${count === 1 ? 'item' : 'itens'}`;
350
412
  }
351
413
  const DEFAULT_MAPA_UI_TEXTS = {
414
+ export: getExportUiTexts('pt-BR'),
352
415
  common: {
353
416
  selectAll: 'Selecionar todos',
354
417
  retry: 'Tentar novamente',
@@ -464,6 +527,7 @@ const DEFAULT_MAPA_UI_TEXTS = {
464
527
  pattern: 'Formato inválido',
465
528
  required: 'Campo obrigatório',
466
529
  },
530
+ ...MAPA_GUIDE_TEXTS_PT_BR,
467
531
  };
468
532
  function getDefaultTexts() {
469
533
  return DEFAULT_MAPA_UI_TEXTS;
@@ -471,6 +535,7 @@ function getDefaultTexts() {
471
535
  function mergeMapaUiTexts(customTexts) {
472
536
  const defaults = getDefaultTexts();
473
537
  return {
538
+ export: { ...defaults.export, ...(customTexts?.export ?? {}) },
474
539
  common: { ...defaults.common, ...(customTexts?.common ?? {}) },
475
540
  filters: { ...defaults.filters, ...(customTexts?.filters ?? {}) },
476
541
  datepicker: { ...defaults.datepicker, ...(customTexts?.datepicker ?? {}) },
@@ -480,6 +545,7 @@ function mergeMapaUiTexts(customTexts) {
480
545
  warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
481
546
  table: { ...defaults.table, ...(customTexts?.table ?? {}) },
482
547
  validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
548
+ ...mergeMapaGuideTexts(customTexts),
483
549
  };
484
550
  }
485
551
  function provideMapaUiTexts(texts) {