lib-portal-angular 0.0.84 → 0.0.85
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/esm2022/lib/components/components.module.mjs +42 -37
- package/esm2022/lib/components/drag-drop-list/drag-drop-list.component.mjs +91 -0
- package/esm2022/lib/components/tables/data-table.component.mjs +13 -7
- package/esm2022/lib/lib-portal-angular.module.mjs +4 -1
- package/esm2022/lib/service/excel-service.service.mjs +81 -0
- package/esm2022/public-api.mjs +7 -27
- package/fesm2022/lib-portal-angular.mjs +376 -201
- package/fesm2022/lib-portal-angular.mjs.map +1 -1
- package/lib/components/components.module.d.ts +8 -7
- package/lib/components/drag-drop-list/drag-drop-list.component.d.ts +35 -0
- package/lib/components/tables/data-table.component.d.ts +9 -7
- package/lib/service/excel-service.service.d.ts +40 -0
- package/package.json +4 -2
- package/public-api.d.ts +5 -26
@@ -30,14 +30,15 @@ import * as i28 from "./calendar-argenta/calendar-argenta.component";
|
|
30
30
|
import * as i29 from "./accordion/accordion.component";
|
31
31
|
import * as i30 from "./json-viewer/json-viewer.component";
|
32
32
|
import * as i31 from "./modal/modal.component";
|
33
|
-
import * as i32 from "./
|
34
|
-
import * as i33 from "./dynamic-
|
35
|
-
import * as i34 from "
|
36
|
-
import * as i35 from "@angular/
|
37
|
-
import * as i36 from "@
|
38
|
-
import * as i37 from "
|
33
|
+
import * as i32 from "./drag-drop-list/drag-drop-list.component";
|
34
|
+
import * as i33 from "./dynamic-modal/dynamic-modal.component";
|
35
|
+
import * as i34 from "./dynamic-table/dynamic-table.component";
|
36
|
+
import * as i35 from "@angular/common";
|
37
|
+
import * as i36 from "@angular/forms";
|
38
|
+
import * as i37 from "@ng-select/ng-select";
|
39
|
+
import * as i38 from "../icons/lucide-icons.module";
|
39
40
|
export declare class ComponentsModule {
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
|
41
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i14.AutofocusDirective, typeof i15.CepMaskDirective, typeof i16.CnpjMaskDirective, typeof i17.CpfMaskDirective, typeof i18.CustomPaginationComponent, typeof i19.TreeNodeComponent, typeof i20.SearchInputComponent, typeof i21.AppBackgroundComponent, typeof i22.BasicRegistrationComponent, typeof i23.CustomSwitchComponent, typeof i24.SearchCustomerComponent, typeof i25.TabComponent, typeof i26.FileUploadComponent, typeof i27.MultiSelectCategoryComponent, typeof i28.CalendarArgentaComponent, typeof i29.AccordionArgentaComponent, typeof i30.JsonViewerComponent, typeof i31.ModalComponent, typeof i32.
|
42
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i14.AutofocusDirective, typeof i15.CepMaskDirective, typeof i16.CnpjMaskDirective, typeof i17.CpfMaskDirective, typeof i18.CustomPaginationComponent, typeof i19.TreeNodeComponent, typeof i20.SearchInputComponent, typeof i21.AppBackgroundComponent, typeof i22.BasicRegistrationComponent, typeof i23.CustomSwitchComponent, typeof i24.SearchCustomerComponent, typeof i25.TabComponent, typeof i26.FileUploadComponent, typeof i27.MultiSelectCategoryComponent, typeof i28.CalendarArgentaComponent, typeof i29.AccordionArgentaComponent, typeof i30.JsonViewerComponent, typeof i31.ModalComponent, typeof i32.DragDropListComponent, typeof i33.DynamicModalComponent, typeof i34.DynamicTableComponent], [typeof i35.CommonModule, typeof i36.FormsModule, typeof i36.ReactiveFormsModule, typeof i37.NgSelectModule, typeof i38.LucideIconsModule], [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i36.FormsModule, typeof i36.ReactiveFormsModule, typeof i37.NgSelectModule, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i14.AutofocusDirective, typeof i15.CepMaskDirective, typeof i16.CnpjMaskDirective, typeof i17.CpfMaskDirective, typeof i18.CustomPaginationComponent, typeof i19.TreeNodeComponent, typeof i20.SearchInputComponent, typeof i38.LucideIconsModule, typeof i21.AppBackgroundComponent, typeof i22.BasicRegistrationComponent, typeof i23.CustomSwitchComponent, typeof i24.SearchCustomerComponent, typeof i25.TabComponent, typeof i26.FileUploadComponent, typeof i27.MultiSelectCategoryComponent, typeof i28.CalendarArgentaComponent, typeof i29.AccordionArgentaComponent, typeof i30.JsonViewerComponent, typeof i31.ModalComponent, typeof i32.DragDropListComponent, typeof i33.DynamicModalComponent, typeof i34.DynamicTableComponent]>;
|
42
43
|
static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
|
43
44
|
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
2
|
+
import { ButtonClasses } from "../../enum/ButtonClassesEnum";
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
interface ListItem {
|
5
|
+
id: string;
|
6
|
+
descricao: string;
|
7
|
+
}
|
8
|
+
export declare class DragDropListComponent {
|
9
|
+
nonSelectedTitle: string;
|
10
|
+
nonSelectedList: ListItem[];
|
11
|
+
nonSelectedButtonLabel?: string;
|
12
|
+
nonSelectedButtonClick: EventEmitter<void>;
|
13
|
+
nonSelectedInputChanged: EventEmitter<string>;
|
14
|
+
selectedTitle: string;
|
15
|
+
selectedList: ListItem[];
|
16
|
+
selectedButtonLabel?: string;
|
17
|
+
selectedButtonClick: EventEmitter<void>;
|
18
|
+
selectedInputChanged: EventEmitter<string>;
|
19
|
+
private nonSelectedListInputSubject;
|
20
|
+
private selectedListInputSubject;
|
21
|
+
ButtonClasses: typeof ButtonClasses;
|
22
|
+
draggedItem: ListItem | null;
|
23
|
+
constructor();
|
24
|
+
onDragStart(item: ListItem): void;
|
25
|
+
onDragOver(event: DragEvent): void;
|
26
|
+
onDrop(list: ListItem[], event: DragEvent): void;
|
27
|
+
private removeItem;
|
28
|
+
nonSelectedListInputChange(event: any): void;
|
29
|
+
selectedListInputChange(event: any): void;
|
30
|
+
selButtonClick(): void;
|
31
|
+
nonSelButtonClick(): void;
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragDropListComponent, never>;
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DragDropListComponent, "argenta-drag-drop-list", never, { "nonSelectedTitle": { "alias": "nonSelectedTitle"; "required": false; }; "nonSelectedList": { "alias": "nonSelectedList"; "required": false; }; "nonSelectedButtonLabel": { "alias": "nonSelectedButtonLabel"; "required": false; }; "selectedTitle": { "alias": "selectedTitle"; "required": false; }; "selectedList": { "alias": "selectedList"; "required": false; }; "selectedButtonLabel": { "alias": "selectedButtonLabel"; "required": false; }; }, { "nonSelectedButtonClick": "nonSelectedButtonClick"; "nonSelectedInputChanged": "nonSelectedInputChanged"; "selectedButtonClick": "selectedButtonClick"; "selectedInputChanged": "selectedInputChanged"; }, never, never, false, never>;
|
34
|
+
}
|
35
|
+
export {};
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from
|
2
|
-
import { Observable } from
|
3
|
-
import { ButtonClasses } from
|
4
|
-
import { AuthService } from
|
5
|
-
import { RefreshService } from
|
6
|
-
import { IDataIndexPaginate, IPaginateResult } from
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
2
|
+
import { Observable } from 'rxjs';
|
3
|
+
import { ButtonClasses } from '../../enum/ButtonClassesEnum';
|
4
|
+
import { AuthService } from '../../service/auth-service.service';
|
5
|
+
import { RefreshService } from '../../service/refresh-service.service';
|
6
|
+
import { IDataIndexPaginate, IPaginateResult } from './data-paginate.service';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
export declare class DataTableComponent implements OnInit, OnDestroy {
|
9
9
|
private cdr;
|
@@ -31,6 +31,8 @@ export declare class DataTableComponent implements OnInit, OnDestroy {
|
|
31
31
|
buttonLabel: string;
|
32
32
|
pagedData: any[];
|
33
33
|
initialFilterField: string | null;
|
34
|
+
buttonList?: TemplateRef<any>[];
|
35
|
+
sortChange: EventEmitter<any>;
|
34
36
|
pageChange: EventEmitter<number>;
|
35
37
|
itemsPerPageChange: EventEmitter<number>;
|
36
38
|
onEditTable: EventEmitter<any>;
|
@@ -67,5 +69,5 @@ export declare class DataTableComponent implements OnInit, OnDestroy {
|
|
67
69
|
onSearch(searchText: string): void;
|
68
70
|
onNewButtonClick(): void;
|
69
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableComponent, never>;
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "argenta-list-data-table", never, { "columns": { "alias": "columns"; "required": false; }; "hiddenColumns": { "alias": "hiddenColumns"; "required": false; }; "defaultItemsPerPage": { "alias": "defaultItemsPerPage"; "required": false; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "actionColumnLabel": { "alias": "actionColumnLabel"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "fetchDataFunction": { "alias": "fetchDataFunction"; "required": false; }; "editPermissions": { "alias": "editPermissions"; "required": false; }; "deletePermissions": { "alias": "deletePermissions"; "required": false; }; "viewPermissions": { "alias": "viewPermissions"; "required": false; }; "showPageInfo": { "alias": "showPageInfo"; "required": false; }; "pageText": { "alias": "pageText"; "required": false; }; "ofText": { "alias": "ofText"; "required": false; }; "filterDescription": { "alias": "filterDescription"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "pagedData": { "alias": "pagedData"; "required": false; }; "initialFilterField": { "alias": "initialFilterField"; "required": false; }; }, { "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "onEditTable": "onEditTable"; "onDeleteTable": "onDeleteTable"; "onViewTable": "onViewTable"; "onButtonClick": "onButtonClick"; "filterFieldChange": "filterFieldChange"; }, never, never, false, never>;
|
72
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "argenta-list-data-table", never, { "columns": { "alias": "columns"; "required": false; }; "hiddenColumns": { "alias": "hiddenColumns"; "required": false; }; "defaultItemsPerPage": { "alias": "defaultItemsPerPage"; "required": false; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "actionColumnLabel": { "alias": "actionColumnLabel"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "fetchDataFunction": { "alias": "fetchDataFunction"; "required": false; }; "editPermissions": { "alias": "editPermissions"; "required": false; }; "deletePermissions": { "alias": "deletePermissions"; "required": false; }; "viewPermissions": { "alias": "viewPermissions"; "required": false; }; "showPageInfo": { "alias": "showPageInfo"; "required": false; }; "pageText": { "alias": "pageText"; "required": false; }; "ofText": { "alias": "ofText"; "required": false; }; "filterDescription": { "alias": "filterDescription"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "pagedData": { "alias": "pagedData"; "required": false; }; "initialFilterField": { "alias": "initialFilterField"; "required": false; }; "buttonList": { "alias": "buttonList"; "required": false; }; }, { "sortChange": "sortChange"; "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "onEditTable": "onEditTable"; "onDeleteTable": "onDeleteTable"; "onViewTable": "onViewTable"; "onButtonClick": "onButtonClick"; "filterFieldChange": "filterFieldChange"; }, never, never, false, never>;
|
71
73
|
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import * as ExcelJS from 'exceljs';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export interface Column {
|
4
|
+
header: string;
|
5
|
+
key: string;
|
6
|
+
width?: number;
|
7
|
+
}
|
8
|
+
export interface ConditionalStyle {
|
9
|
+
columnKey: string;
|
10
|
+
condition: string;
|
11
|
+
trueStyle: Partial<ExcelJS.Style>;
|
12
|
+
falseStyle: Partial<ExcelJS.Style>;
|
13
|
+
}
|
14
|
+
export interface Sheet {
|
15
|
+
sheetName: string;
|
16
|
+
columns: Column[];
|
17
|
+
styles?: {
|
18
|
+
font?: Partial<ExcelJS.Font>;
|
19
|
+
alignment?: Partial<ExcelJS.Alignment>;
|
20
|
+
};
|
21
|
+
data: any[];
|
22
|
+
conditionalStyles?: ConditionalStyle[];
|
23
|
+
}
|
24
|
+
export interface SheetData {
|
25
|
+
[key: number]: {
|
26
|
+
data: any[];
|
27
|
+
};
|
28
|
+
}
|
29
|
+
export declare class ExcelService {
|
30
|
+
sheets: Sheet[];
|
31
|
+
fileName: string;
|
32
|
+
constructor();
|
33
|
+
createExcel(conf: {
|
34
|
+
fileName: string;
|
35
|
+
sheets: Sheet[];
|
36
|
+
}, data: SheetData): Promise<void>;
|
37
|
+
mapData(item: any, columns: Column[]): any;
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExcelService, never>;
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExcelService>;
|
40
|
+
}
|
package/package.json
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "lib-portal-angular",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.85",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": "^16.2.0",
|
6
|
-
"@angular/core": "^16.2.0"
|
6
|
+
"@angular/core": "^16.2.0",
|
7
|
+
"exceljs": "^4.4.0",
|
8
|
+
"file-saver": "^2.0.5"
|
7
9
|
},
|
8
10
|
"dependencies": {
|
9
11
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
@@ -11,29 +11,9 @@ export * from "./lib/components/code-highlight/code-highlight.component";
|
|
11
11
|
export * from "./lib/components/confirmation/confirmation.component";
|
12
12
|
export * from "./lib/components/custom-pagination/custom-pagination.component";
|
13
13
|
export * from "./lib/components/custom-switch/custom-switch.component";
|
14
|
-
export * from "./lib/components/
|
15
|
-
export * from "./lib/components/
|
16
|
-
export * from "./lib/components/
|
17
|
-
export * from "./lib/components/multi-select/multi-select.component";
|
18
|
-
export * from "./lib/components/radio/radio.component";
|
19
|
-
export * from "./lib/components/search-customer/search-customer.component";
|
20
|
-
export * from "./lib/components/search-input/search-input.component";
|
21
|
-
export * from "./lib/components/select/select.component";
|
22
|
-
export * from "./lib/components/tab/tab.component";
|
23
|
-
export * from "./lib/components/tables/data-table.component";
|
24
|
-
export * from "./lib/components/textarea/textarea.component";
|
25
|
-
export * from "./lib/components/tree-node/tree-node.component";
|
26
|
-
export * from "./lib/components/alert/alert.component";
|
27
|
-
export * from "./lib/components/app-background/app-background.component";
|
28
|
-
export * from "./lib/components/badge/badge.component";
|
29
|
-
export * from "./lib/components/basic-registration/basic-registration.component";
|
30
|
-
export * from "./lib/components/button/button.component";
|
31
|
-
export * from "./lib/components/card/card.component";
|
32
|
-
export * from "./lib/components/checkbox/checkbox.component";
|
33
|
-
export * from "./lib/components/code-highlight/code-highlight.component";
|
34
|
-
export * from "./lib/components/confirmation/confirmation.component";
|
35
|
-
export * from "./lib/components/custom-pagination/custom-pagination.component";
|
36
|
-
export * from "./lib/components/custom-switch/custom-switch.component";
|
14
|
+
export * from "./lib/components/drag-drop-list/drag-drop-list.component";
|
15
|
+
export * from "./lib/components/dynamic-modal/dynamic-modal.component";
|
16
|
+
export * from "./lib/components/dynamic-table/dynamic-table.component";
|
37
17
|
export * from "./lib/components/file-upload/file-upload.component";
|
38
18
|
export * from "./lib/components/imput/input.component";
|
39
19
|
export * from "./lib/components/json-viewer/json-viewer.component";
|
@@ -48,8 +28,6 @@ export * from "./lib/components/tab/tab.component";
|
|
48
28
|
export * from "./lib/components/tables/data-table.component";
|
49
29
|
export * from "./lib/components/textarea/textarea.component";
|
50
30
|
export * from "./lib/components/tree-node/tree-node.component";
|
51
|
-
export * from "./lib/components/dynamic-modal/dynamic-modal.component";
|
52
|
-
export * from "./lib/components/dynamic-table/dynamic-table.component";
|
53
31
|
export * from "./lib/components/dynamic-table/dynamic-table-config";
|
54
32
|
export * from "./lib/directive/autofocus-directive/autofocus.directive";
|
55
33
|
export * from "./lib/directive/cep-mask.directive";
|
@@ -62,7 +40,8 @@ export * from "./lib/lib-portal-angular.module";
|
|
62
40
|
export * from "./lib/components/alert/notification.service";
|
63
41
|
export * from "./lib/components/confirmation/confirmation.service";
|
64
42
|
export * from "./lib/components/tables/data-paginate.service";
|
43
|
+
export * from "./lib/service/excel-service.service";
|
65
44
|
export * from "./lib/service/refresh-service.service";
|
66
45
|
export * from "./lib/service/route-parameter.service";
|
67
|
-
export * from "./lib/function/SetThemeColors";
|
68
46
|
export * from "./lib/function/ConvertToSnakeCase";
|
47
|
+
export * from "./lib/function/SetThemeColors";
|