mapa-library-ui 0.1.1 → 0.3.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 (76) hide show
  1. package/esm2020/src/lib/components/capability/capability.mjs +2 -2
  2. package/esm2020/src/lib/components/capability/lib/components/capability/public-api.mjs +7 -1
  3. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative/capability-comparative.component.mjs +39 -0
  4. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative/capability-comparative.module.mjs +32 -0
  5. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.component.mjs +21 -0
  6. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.module.mjs +19 -0
  7. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative-header/capability-comparative-header.component.mjs +20 -0
  8. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative-header/capability-comparative-header.module.mjs +19 -0
  9. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.component.mjs +19 -0
  10. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.module.mjs +18 -0
  11. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-detail/capability-detail.component.mjs +2 -2
  12. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-dot/capability-dot.component.mjs +2 -2
  13. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-indicator/capability-indicator.component.mjs +3 -3
  14. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-indicator-chart/capability-indicator-chart.component.mjs +2 -2
  15. package/esm2020/src/lib/components/capability/lib/components/capability/src/capability-indicator-list/capability-indicator-list.component.mjs +2 -2
  16. package/esm2020/src/lib/components/capability/lib/components/capability/src/essentials/interfaces/capability-comparative.interface.mjs +2 -0
  17. package/esm2020/src/lib/components/capability/lib/components/dropdown/public-api.mjs +6 -0
  18. package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.mjs +103 -0
  19. package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.module.mjs +63 -0
  20. package/esm2020/src/lib/components/capability/lib/core/directives/custom-paginator-legacy.directive.mjs +227 -0
  21. package/esm2020/src/lib/components/capability/lib/core/directives/mat-input-autosize.directive.mjs +96 -0
  22. package/esm2020/src/lib/components/capability/lib/core/elements/dropdown.mjs +8 -0
  23. package/esm2020/src/lib/components/capability/lib/core/elements/element-base.mjs +26 -0
  24. package/esm2020/src/lib/components/capability/lib/core/elements/element-search.mjs +2 -0
  25. package/esm2020/src/lib/components/capability/lib/core/elements/errors.mjs +2 -0
  26. package/esm2020/src/lib/components/capability/lib/core/elements/input-text.mjs +8 -0
  27. package/esm2020/src/lib/components/capability/lib/core/elements/radio-button.mjs +8 -0
  28. package/esm2020/src/lib/components/capability/lib/core/elements/textarea.mjs +8 -0
  29. package/esm2020/src/lib/components/capability/lib/core/interfaces/button-icon.interface.mjs +2 -0
  30. package/esm2020/src/lib/components/capability/lib/core/interfaces/chart-options.interface.mjs +2 -0
  31. package/esm2020/src/lib/components/capability/lib/core/interfaces/dialog-data.interface.mjs +2 -0
  32. package/esm2020/src/lib/components/capability/lib/core/interfaces/option.interface.mjs +2 -0
  33. package/esm2020/src/lib/components/capability/public-api.mjs +16 -0
  34. package/esm2020/src/lib/components/table/lib/components/table/src/group-report-interface.mjs +2 -0
  35. package/esm2020/src/lib/components/table/lib/components/table/src/table.component.mjs +91 -5
  36. package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs +413 -100
  37. package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  38. package/fesm2015/mapa-library-ui-src-lib-components-table.mjs +90 -4
  39. package/fesm2015/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
  40. package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs +411 -100
  41. package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  42. package/fesm2020/mapa-library-ui-src-lib-components-table.mjs +90 -4
  43. package/fesm2020/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
  44. package/mapa-library-ui-0.3.0.tgz +0 -0
  45. package/package.json +1 -1
  46. package/src/lib/components/capability/capability.d.ts +1 -1
  47. package/src/lib/components/capability/lib/components/capability/public-api.d.ts +6 -0
  48. package/src/lib/components/capability/lib/components/capability/src/capability-comparative/capability-comparative.component.d.ts +16 -0
  49. package/src/lib/components/capability/lib/components/capability/src/capability-comparative/capability-comparative.module.d.ts +11 -0
  50. package/src/lib/components/capability/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.component.d.ts +9 -0
  51. package/src/lib/components/capability/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.module.d.ts +9 -0
  52. package/src/lib/components/capability/lib/components/capability/src/capability-comparative-header/capability-comparative-header.component.d.ts +9 -0
  53. package/src/lib/components/capability/lib/components/capability/src/capability-comparative-header/capability-comparative-header.module.d.ts +9 -0
  54. package/src/lib/components/capability/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.component.d.ts +9 -0
  55. package/src/lib/components/capability/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.module.d.ts +8 -0
  56. package/src/lib/components/capability/lib/components/capability/src/essentials/interfaces/capability-comparative.interface.d.ts +10 -0
  57. package/src/lib/components/capability/lib/components/dropdown/public-api.d.ts +2 -0
  58. package/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.d.ts +30 -0
  59. package/src/lib/components/capability/lib/components/dropdown/src/dropdown.module.d.ts +13 -0
  60. package/src/lib/components/capability/lib/core/directives/custom-paginator-legacy.directive.d.ts +27 -0
  61. package/src/lib/components/capability/lib/core/directives/mat-input-autosize.directive.d.ts +26 -0
  62. package/src/lib/components/capability/lib/core/elements/dropdown.d.ts +4 -0
  63. package/src/lib/components/capability/lib/core/elements/element-base.d.ts +49 -0
  64. package/src/lib/components/capability/lib/core/elements/element-search.d.ts +6 -0
  65. package/src/lib/components/capability/lib/core/elements/errors.d.ts +7 -0
  66. package/src/lib/components/capability/lib/core/elements/input-text.d.ts +4 -0
  67. package/src/lib/components/capability/lib/core/elements/radio-button.d.ts +4 -0
  68. package/src/lib/components/capability/lib/core/elements/textarea.d.ts +4 -0
  69. package/src/lib/components/capability/lib/core/interfaces/button-icon.interface.d.ts +7 -0
  70. package/src/lib/components/capability/lib/core/interfaces/chart-options.interface.d.ts +19 -0
  71. package/src/lib/components/capability/lib/core/interfaces/dialog-data.interface.d.ts +9 -0
  72. package/src/lib/components/capability/lib/core/interfaces/option.interface.d.ts +4 -0
  73. package/src/lib/components/capability/public-api.d.ts +12 -0
  74. package/src/lib/components/table/lib/components/table/src/group-report-interface.d.ts +22 -0
  75. package/src/lib/components/table/lib/components/table/src/table.component.d.ts +16 -3
  76. package/mapa-library-ui-0.1.1.tgz +0 -0
@@ -0,0 +1,30 @@
1
+ import { AfterViewInit, OnDestroy, OnInit } from "@angular/core";
2
+ import { FormControl } from "@angular/forms";
3
+ import { MatSelect } from "@angular/material/select";
4
+ import { ReplaySubject } from "rxjs/internal/ReplaySubject";
5
+ import { Subject } from "rxjs/internal/Subject";
6
+ import { ElementOption } from "../../../core/interfaces/option.interface";
7
+ import { Dropdown } from "../../../core/elements/dropdown";
8
+ import * as i0 from "@angular/core";
9
+ export declare class MapaDropdownComponent implements OnInit, AfterViewInit, OnDestroy {
10
+ formControl: FormControl;
11
+ formControlSearch: FormControl;
12
+ element: Dropdown;
13
+ border: "soft" | "tag" | "highlight" | null | undefined;
14
+ dropdown: MatSelect;
15
+ filteredOptions: ReplaySubject<ElementOption[]>;
16
+ protected filteredOptionsCache: ElementOption[];
17
+ protected _onDestroy: Subject<void>;
18
+ isIndeterminate: boolean;
19
+ isChecked: boolean;
20
+ constructor();
21
+ ngOnInit(): void;
22
+ ngAfterViewInit(): void;
23
+ ngOnDestroy(): void;
24
+ protected filterOptions(): void;
25
+ protected setInitialValue(): void;
26
+ protected setToggleAllCheckboxState(): void;
27
+ toggleSelectAll(selectAllValue: boolean): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapaDropdownComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapaDropdownComponent, "mapa-dropdown", never, { "formControl": "formControl"; "formControlSearch": "formControlSearch"; "element": "element"; "border": "border"; }, {}, never, never, false, never>;
30
+ }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./dropdown.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/material/list";
6
+ import * as i5 from "@angular/material/icon";
7
+ import * as i6 from "@angular/material/select";
8
+ import * as i7 from "ngx-mat-select-search";
9
+ export declare class MapaDropdownModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapaDropdownModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MapaDropdownModule, [typeof i1.MapaDropdownComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatListModule, typeof i5.MatIconModule, typeof i6.MatSelectModule, typeof i7.NgxMatSelectSearchModule], [typeof i1.MapaDropdownComponent]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<MapaDropdownModule>;
13
+ }
@@ -0,0 +1,27 @@
1
+ import { AfterViewInit, DoCheck, Renderer2, ViewContainerRef } from '@angular/core';
2
+ import { MatPaginator } from '@angular/material/paginator';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PaginatorLegacyDirective implements DoCheck, AfterViewInit {
5
+ private readonly matPag;
6
+ private readonly ViewContainer;
7
+ private readonly renderer;
8
+ private currentPage;
9
+ private pageGapTxt;
10
+ private rangeStart;
11
+ private rangeEnd;
12
+ private buttons;
13
+ private showTotalPages;
14
+ private checkPage;
15
+ constructor(matPag: MatPaginator, ViewContainer: ViewContainerRef, renderer: Renderer2);
16
+ ngDoCheck(): void;
17
+ private buildPageNumbers;
18
+ private createButton;
19
+ /**
20
+ * @description calculates the button range based on class input parameters and based on current page index value.
21
+ */
22
+ private initPageRange;
23
+ private switchPage;
24
+ ngAfterViewInit(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorLegacyDirective, [{ optional: true; host: true; self: true; }, null, null]>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PaginatorLegacyDirective, "[appStylePaginatorMv]", never, {}, {}, never, never, true, never>;
27
+ }
@@ -0,0 +1,26 @@
1
+ import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
2
+ import { NgModel } from '@angular/forms';
3
+ import { MatInput } from '@angular/material/input';
4
+ import { Subscription } from 'rxjs';
5
+ import * as i0 from "@angular/core";
6
+ export declare class MatInputAutosizeDirective implements AfterViewInit, OnDestroy {
7
+ private childMatInput;
8
+ private childNgModel;
9
+ inputElement: HTMLInputElement;
10
+ hiddenText: Text;
11
+ changeDetectSub: Subscription;
12
+ matInputAutosizeMaxWidth: any;
13
+ matInputAutosizeMinWidth: string;
14
+ matInputAutosizeFontStyle: any;
15
+ constructor(el: ElementRef<HTMLInputElement>, childMatInput: MatInput, childNgModel: NgModel);
16
+ ngAfterViewInit(): void;
17
+ ngOnDestroy(): void;
18
+ checkErrors(): void;
19
+ overwriteParentWidth(): void;
20
+ createHiddenTextContainer(): void;
21
+ setOwnStyles(): void;
22
+ subscribeToChanges(): void;
23
+ changeHiddenText: (newValue: string) => void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatInputAutosizeDirective, [null, { self: true; }, { optional: true; self: true; }]>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatInputAutosizeDirective, "[matInputAutosize]", never, { "matInputAutosizeMaxWidth": "matInputAutosizeMaxWidth"; "matInputAutosizeMinWidth": "matInputAutosizeMinWidth"; "matInputAutosizeFontStyle": "matInputAutosizeFontStyle"; }, {}, never, never, true, never>;
26
+ }
@@ -0,0 +1,4 @@
1
+ import { ElementBase } from './element-base';
2
+ export declare class Dropdown extends ElementBase {
3
+ controlType: string;
4
+ }
@@ -0,0 +1,49 @@
1
+ import { ElementOption } from "../interfaces/option.interface";
2
+ import { ElementSearch } from "./element-search";
3
+ import { Errors } from "./errors";
4
+ export declare class ElementBase {
5
+ value: string;
6
+ key: string;
7
+ label: string;
8
+ required: boolean;
9
+ order: number;
10
+ controlType: string;
11
+ type: string;
12
+ placeholder?: string;
13
+ hint?: string;
14
+ prefix?: string;
15
+ suffix?: string;
16
+ autosize?: boolean;
17
+ autosizeMinWidth?: string;
18
+ autosizeMaxWidth?: string;
19
+ autosizeMinRow?: number;
20
+ autosizeMaxRow?: number;
21
+ options: ElementOption[];
22
+ multiple?: boolean;
23
+ search?: ElementSearch;
24
+ maxLength: string | number | null;
25
+ errors?: Errors;
26
+ constructor(options?: {
27
+ value?: string;
28
+ key?: string;
29
+ label?: string;
30
+ required?: boolean;
31
+ order?: number;
32
+ controlType?: string;
33
+ type?: string;
34
+ placeholder?: string;
35
+ hint?: string;
36
+ prefix?: string;
37
+ suffix?: string;
38
+ autosize?: boolean;
39
+ autosizeMinWidth?: string;
40
+ autosizeMaxWidth?: string;
41
+ autosizeMinRow?: number;
42
+ autosizeMaxRow?: number;
43
+ options?: ElementOption[];
44
+ multiple?: boolean;
45
+ search?: ElementSearch;
46
+ maxLength?: string | number | null;
47
+ errors?: Errors;
48
+ });
49
+ }
@@ -0,0 +1,6 @@
1
+ import { FormControl } from "@angular/forms";
2
+ export interface ElementSearch {
3
+ placeholder?: string;
4
+ noEntriesFoundLabel?: string;
5
+ formControl?: FormControl;
6
+ }
@@ -0,0 +1,7 @@
1
+ export interface Errors {
2
+ required?: string;
3
+ minlength?: string;
4
+ cpf?: string;
5
+ cnpj?: string;
6
+ email?: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { ElementBase } from './element-base';
2
+ export declare class InputText extends ElementBase {
3
+ controlType: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ElementBase } from './element-base';
2
+ export declare class RadioButton extends ElementBase {
3
+ controlType: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ElementBase } from './element-base';
2
+ export declare class Textarea extends ElementBase {
3
+ controlType: string;
4
+ }
@@ -0,0 +1,7 @@
1
+ export interface ButtonIcon {
2
+ id: number;
3
+ icon: string;
4
+ description: string;
5
+ objectData: string;
6
+ originList?: string;
7
+ }
@@ -0,0 +1,19 @@
1
+ import { ApexAxisChartSeries, ApexTitleSubtitle, ApexChart, ApexXAxis, ApexFill, ApexStroke, ApexMarkers, ApexYAxis, ApexLegend, ApexResponsive } from "ng-apexcharts";
2
+ import { Dropdown } from "../elements/dropdown";
3
+ import { FormControl } from "@angular/forms";
4
+ export type ChartOptions = {
5
+ series: ApexAxisChartSeries;
6
+ chart: ApexChart;
7
+ title: ApexTitleSubtitle;
8
+ xaxis: ApexXAxis;
9
+ stroke?: ApexStroke;
10
+ fill?: ApexFill;
11
+ markers?: ApexMarkers;
12
+ yaxis?: ApexYAxis;
13
+ legend?: ApexLegend;
14
+ responsive?: ApexResponsive[];
15
+ dropdown?: {
16
+ element: Dropdown;
17
+ formControl: FormControl;
18
+ };
19
+ };
@@ -0,0 +1,9 @@
1
+ export interface DialogData {
2
+ title: string;
3
+ description: string;
4
+ actions: {
5
+ close?: string;
6
+ save?: string;
7
+ };
8
+ imgBase64?: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ export interface ElementOption {
2
+ key: string;
3
+ value: string;
4
+ }
@@ -0,0 +1,12 @@
1
+ export * from './lib/core/elements/element-search';
2
+ export * from './lib/core/elements/element-base';
3
+ export * from './lib/core/elements/dropdown';
4
+ export * from './lib/core/elements/input-text';
5
+ export * from './lib/core/elements/radio-button';
6
+ export * from './lib/core/elements/textarea';
7
+ export * from './lib/core/interfaces/button-icon.interface';
8
+ export * from './lib/core/interfaces/chart-options.interface';
9
+ export * from './lib/core/interfaces/dialog-data.interface';
10
+ export * from './lib/core/interfaces/option.interface';
11
+ export * from './lib/core/directives/mat-input-autosize.directive';
12
+ export * from './lib/core/directives/custom-paginator-legacy.directive';
@@ -0,0 +1,22 @@
1
+ export interface Candidate {
2
+ name: string;
3
+ cpf: string;
4
+ general: number;
5
+ }
6
+ export interface Dimension {
7
+ dimensionName: string;
8
+ direction: string;
9
+ escoreT: number;
10
+ sort?: boolean;
11
+ }
12
+ export interface Indicator {
13
+ name: string;
14
+ direction: string;
15
+ interval: number;
16
+ sort?: boolean;
17
+ }
18
+ export interface GroupReportItem {
19
+ candidate: Candidate;
20
+ dimensions: Dimension[];
21
+ indicators: Indicator[];
22
+ }
@@ -1,19 +1,22 @@
1
1
  import { SelectionModel } from "@angular/cdk/collections";
2
- import { EventEmitter } from "@angular/core";
2
+ import { AfterViewInit, EventEmitter, OnInit } from "@angular/core";
3
3
  import { FormGroup } from "@angular/forms";
4
4
  import { MatPaginator } from "@angular/material/paginator";
5
5
  import { MatSort, Sort } from "@angular/material/sort";
6
6
  import { MatTableDataSource } from "@angular/material/table";
7
7
  import { RowClickEvent } from "../../../core/interfaces/table-row-click-event.interface";
8
8
  import { TableColumn } from "../../../core/interfaces/table-column.interface";
9
+ import { GroupReportItem } from "./group-report-interface";
9
10
  import * as i0 from "@angular/core";
10
- export declare class MapaTableComponent {
11
+ export declare class MapaTableComponent implements OnInit, AfterViewInit {
11
12
  columns: TableColumn[];
12
13
  data: Object[];
13
14
  checkbox: boolean | undefined;
14
15
  actions: boolean | undefined;
15
16
  rowClick: EventEmitter<RowClickEvent>;
16
17
  selectedRows: EventEmitter<any[]>;
18
+ groupReport: GroupReportItem[];
19
+ isGroupReport: boolean | undefined;
17
20
  paginator: MatPaginator;
18
21
  sort: MatSort;
19
22
  checkboxGroup: FormGroup;
@@ -22,6 +25,7 @@ export declare class MapaTableComponent {
22
25
  currentSort: Sort | undefined;
23
26
  selection: SelectionModel<any>;
24
27
  constructor();
28
+ ngOnInit(): void;
25
29
  ngAfterViewInit(): void;
26
30
  isAllSelected(): boolean;
27
31
  toggleAllRows(): void;
@@ -32,9 +36,18 @@ export declare class MapaTableComponent {
32
36
  emitRowClick(row: string, action: string): void;
33
37
  toggleSelection(row: any): void;
34
38
  getSelectedValues(): void;
39
+ generateColumns(): void;
40
+ columnExists(columns: TableColumn[], key: string): boolean;
41
+ generateGroupData(): void;
35
42
  isBoolean(column: TableColumn, row: any): boolean;
36
43
  isMaskedData(column: TableColumn, row: any): boolean;
37
44
  getValueAsDate(column: TableColumn, row: any): Date;
45
+ getCellClass(column: TableColumn, row: any): {
46
+ [key: string]: boolean;
47
+ };
48
+ getRowClass(): {
49
+ [key: string]: boolean;
50
+ };
38
51
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaTableComponent, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<MapaTableComponent, "mapa-table", never, { "columns": "columns"; "data": "data"; "checkbox": "checkbox"; "actions": "actions"; }, { "rowClick": "rowClick"; "selectedRows": "selectedRows"; }, never, never, false, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapaTableComponent, "mapa-table", never, { "columns": "columns"; "data": "data"; "checkbox": "checkbox"; "actions": "actions"; "groupReport": "groupReport"; "isGroupReport": "isGroupReport"; }, { "rowClick": "rowClick"; "selectedRows": "selectedRows"; }, never, never, false, never>;
40
53
  }
Binary file