tailjng 0.0.12 → 0.0.13
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/cli/tailjng.js +105 -0
- package/fesm2022/tailjng.mjs +27 -4472
- package/fesm2022/tailjng.mjs.map +1 -1
- package/lib/services/icons.service.d.ts +9 -0
- package/lib/tailjng.component.d.ts +5 -0
- package/lib/tailjng.service.d.ts +6 -0
- package/package.json +8 -2
- package/public-api.d.ts +3 -30
- package/src/lib/components/label/label.component.css +0 -0
- package/src/lib/components/label/label.component.html +25 -0
- package/src/lib/components/label/label.component.ts +27 -0
- package/src/lib/components/tooltip/tooltip.directive.ts +341 -0
- package/src/lib/components/tooltip/tooltip.service.ts +192 -0
- package/lib/colors/colors.service.d.ts +0 -16
- package/lib/colors/theme/elements/theme.service.d.ts +0 -15
- package/lib/colors/theme/theme.component.d.ts +0 -87
- package/lib/components/alert-dialog/alert-dialog.component.d.ts +0 -24
- package/lib/components/alert-dialog/elements/alert-dialog.interface.d.ts +0 -41
- package/lib/components/alert-dialog/elements/alert-dialog.service.d.ts +0 -24
- package/lib/components/alert-toast/alert-toast.component.d.ts +0 -27
- package/lib/components/alert-toast/elements/alert-toast.interface.d.ts +0 -47
- package/lib/components/alert-toast/elements/alert-toast.service.d.ts +0 -26
- package/lib/components/button/button.component.d.ts +0 -35
- package/lib/components/checkbox/checkbox.component.d.ts +0 -21
- package/lib/components/crud/card-component/card.component.d.ts +0 -91
- package/lib/components/crud/filter-component/elements/filter.interface.d.ts +0 -62
- package/lib/components/crud/filter-component/filter.component.d.ts +0 -54
- package/lib/components/crud/form-component/components/content-form/content-form.component.d.ts +0 -8
- package/lib/components/crud/form-component/components/error-message/error-message.component.d.ts +0 -13
- package/lib/components/crud/form-component/form.component.d.ts +0 -29
- package/lib/components/crud/paginator-component/paginator.component.d.ts +0 -27
- package/lib/components/crud/table-component/elements/table.interface.d.ts +0 -65
- package/lib/components/crud/table-component/table.component.d.ts +0 -97
- package/lib/components/dialog/dialog.component.d.ts +0 -37
- package/lib/components/input/input.component.d.ts +0 -47
- package/lib/components/label/label.component.d.ts +0 -13
- package/lib/components/mode-toggle/mode-toggle.component.d.ts +0 -15
- package/lib/components/select/option/option.component.d.ts +0 -15
- package/lib/components/select/select.component.d.ts +0 -93
- package/lib/components/toggle-radio/toggle-radio.component.d.ts +0 -48
- package/lib/components/tooltip/tooltip.directive.d.ts +0 -20
- package/lib/components/tooltip/tooltip.service.d.ts +0 -16
- package/lib/http/api-url.d.ts +0 -2
- package/lib/http/converter.service.d.ts +0 -21
- package/lib/http/crud-generic.service.d.ts +0 -86
- package/lib/http/http-error.service.d.ts +0 -24
- package/lib/http/http-rest.service.d.ts +0 -9
- package/lib/http/interface/api-response.d.ts +0 -20
- package/lib/service/calendar.service.d.ts +0 -26
- package/lib/shared/dialog.shared.d.ts +0 -9
- package/lib/shared/form.shared.d.ts +0 -28
- package/tailjng-theme.css +0 -2810
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
type KeyPath<T> = T extends object ? {
|
|
2
|
-
[K in keyof T]: K extends string | number ? `${K}` | `${K}.${KeyPath<T[K]>}` : never;
|
|
3
|
-
}[keyof T] : never;
|
|
4
|
-
type ExtraColumnKeys = 'total' | 'expand' | 'extra';
|
|
5
|
-
type ExtendedKeyPath<T> = KeyPath<T> | ExtraColumnKeys;
|
|
6
|
-
export interface TableColumn<T> {
|
|
7
|
-
key: ExtendedKeyPath<T>;
|
|
8
|
-
label: string;
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
sortable?: boolean;
|
|
11
|
-
isSearchable?: boolean;
|
|
12
|
-
isDisaled?: boolean;
|
|
13
|
-
isDecorator?: boolean;
|
|
14
|
-
isCurrency?: boolean;
|
|
15
|
-
isdollar?: boolean;
|
|
16
|
-
isDate?: boolean;
|
|
17
|
-
isDateText?: boolean;
|
|
18
|
-
isDateTime?: boolean;
|
|
19
|
-
isRelativeTime?: boolean;
|
|
20
|
-
isDateTimeText?: boolean;
|
|
21
|
-
isFirstWord?: boolean;
|
|
22
|
-
styles?: {
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
};
|
|
25
|
-
valueGetter?: (row: T) => any;
|
|
26
|
-
expandTemplate?: (row: T) => string;
|
|
27
|
-
extraSearchFields?: (keyof T | string)[];
|
|
28
|
-
hidden?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export type SortDirection = 'none' | 'asc' | 'desc';
|
|
31
|
-
export type LoadingState = 'idle' | 'loading' | 'success' | 'error';
|
|
32
|
-
export interface LoadingStates {
|
|
33
|
-
initialLoad: LoadingState;
|
|
34
|
-
search: LoadingState;
|
|
35
|
-
itemsPerPage: LoadingState;
|
|
36
|
-
pagination: LoadingState;
|
|
37
|
-
sort: LoadingState;
|
|
38
|
-
checked: LoadingState;
|
|
39
|
-
action: LoadingState;
|
|
40
|
-
aditionalButtons: {
|
|
41
|
-
[buttonType: string]: LoadingState;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
type DefaultTypeOptionTable = 'edit' | 'delete' | 'disabled' | 'custom';
|
|
45
|
-
type CommonOptionTableProps = {
|
|
46
|
-
type?: `${DefaultTypeOptionTable}` | (string & {});
|
|
47
|
-
icon?: ((data?: any) => any) | any;
|
|
48
|
-
clicked?: (data: any) => void;
|
|
49
|
-
tooltip?: ((data?: any) => string) | string;
|
|
50
|
-
disabled?: ((data?: any) => boolean) | boolean;
|
|
51
|
-
isVisible?: ((data?: any) => boolean) | boolean;
|
|
52
|
-
tooltipPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
53
|
-
ngClass?: ((data?: any) => any) | any;
|
|
54
|
-
classes?: string;
|
|
55
|
-
};
|
|
56
|
-
type OptionTableWithChangeIcon = CommonOptionTableProps & {
|
|
57
|
-
isChangeIcon: boolean | (() => boolean);
|
|
58
|
-
iconChange: any;
|
|
59
|
-
};
|
|
60
|
-
type OptionTableWithoutChangeIcon = CommonOptionTableProps & {
|
|
61
|
-
isChangeIcon?: undefined;
|
|
62
|
-
iconChange?: any;
|
|
63
|
-
};
|
|
64
|
-
export type OptionsTable = OptionTableWithChangeIcon | OptionTableWithoutChangeIcon;
|
|
65
|
-
export {};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { CurrencyPipe } from '@angular/common';
|
|
3
|
-
import { Params } from '@angular/router';
|
|
4
|
-
import { LoadingState, LoadingStates, OptionsTable, SortDirection, TableColumn } from './elements/table.interface';
|
|
5
|
-
import { JConverterService } from '../../../http/converter.service';
|
|
6
|
-
import { FilterButton, FilterSelect } from '../filter-component/elements/filter.interface';
|
|
7
|
-
import { JGenericService } from '../../../http/crud-generic.service';
|
|
8
|
-
import { JAlertToastService } from '../../../../public-api';
|
|
9
|
-
import { JCalendarService } from '../../../service/calendar.service';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class JTableComponent implements OnInit {
|
|
12
|
-
private readonly currencyPipe;
|
|
13
|
-
private readonly genericService;
|
|
14
|
-
private readonly alertToastService;
|
|
15
|
-
private readonly converterService;
|
|
16
|
-
private readonly calendarService;
|
|
17
|
-
Math: Math;
|
|
18
|
-
dataLoaded: EventEmitter<void>;
|
|
19
|
-
loadingStates: LoadingStates;
|
|
20
|
-
icons: {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
endpoint: string;
|
|
24
|
-
columns: TableColumn<any>[];
|
|
25
|
-
defaultFilters: {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
};
|
|
28
|
-
isPaginator: boolean;
|
|
29
|
-
isSearch: boolean;
|
|
30
|
-
data: any[];
|
|
31
|
-
expandTemplate?: (row: any) => string;
|
|
32
|
-
expandedRows: Set<any>;
|
|
33
|
-
currentPage: number;
|
|
34
|
-
itemsPerPageOptions: number[];
|
|
35
|
-
itemsPerPage: number;
|
|
36
|
-
totalItems: number;
|
|
37
|
-
sortColumn: string | null;
|
|
38
|
-
sortDirection: SortDirection;
|
|
39
|
-
sortingColumn: string | null;
|
|
40
|
-
searchQuery: string;
|
|
41
|
-
searchPlaceholder: string;
|
|
42
|
-
filters: any;
|
|
43
|
-
displayData: any[];
|
|
44
|
-
pages: number[];
|
|
45
|
-
checked: boolean;
|
|
46
|
-
checkedValues: any[][];
|
|
47
|
-
checkedTitles: string[];
|
|
48
|
-
isChecked: boolean;
|
|
49
|
-
titleChecked: string;
|
|
50
|
-
get startIndex(): number;
|
|
51
|
-
get totalPages(): number;
|
|
52
|
-
filtersButton: FilterButton[];
|
|
53
|
-
filtersSelect: FilterSelect[];
|
|
54
|
-
optionsTable: OptionsTable[];
|
|
55
|
-
constructor(currencyPipe: CurrencyPipe, genericService: JGenericService, alertToastService: JAlertToastService, converterService: JConverterService, calendarService: JCalendarService);
|
|
56
|
-
ngOnInit(): void;
|
|
57
|
-
overrideFilterEvents(): void;
|
|
58
|
-
loadData(loadingType?: keyof LoadingStates, onFinally?: () => void): void;
|
|
59
|
-
updateDisplayData(): void;
|
|
60
|
-
onCheckboxChange(item: any, column: TableColumn<any>): void;
|
|
61
|
-
checkActiveInactive(isChecked: boolean): void;
|
|
62
|
-
onClearFilters(buttonType: string): void;
|
|
63
|
-
columnDefaults(): void;
|
|
64
|
-
getVisibleColumnsCount(): number;
|
|
65
|
-
isBoolean(value: any): boolean;
|
|
66
|
-
getValue(item: any, column: TableColumn<any>): any;
|
|
67
|
-
formatData(value: any, column: TableColumn<any>): any;
|
|
68
|
-
getQueryParams(): Params;
|
|
69
|
-
getRowNumber(index: number): number;
|
|
70
|
-
onSort(column: TableColumn<any>): void;
|
|
71
|
-
getSortKey(value: any): string;
|
|
72
|
-
onSortKeyPress(event: KeyboardEvent, column: TableColumn<any>): void;
|
|
73
|
-
onSearch(): void;
|
|
74
|
-
onItemsPerPageChange(): void;
|
|
75
|
-
generatePagination(): void;
|
|
76
|
-
handlePageChange(page: number): void;
|
|
77
|
-
onButtonClick(button: OptionsTable, element: any): void;
|
|
78
|
-
getTooltip(tooltip: string | ((data?: any) => string), data: any): string;
|
|
79
|
-
getIcon(icon: ((data?: any) => any), data: any): any;
|
|
80
|
-
getDisabled(option: OptionsTable, data: any): boolean;
|
|
81
|
-
getIsVisible(option: OptionsTable, data: any): boolean;
|
|
82
|
-
mergeNgClasses(optionNgClass: ((data?: any) => any), data: any): any;
|
|
83
|
-
isLoading(state: keyof LoadingStates): boolean;
|
|
84
|
-
isAnyLoading(): boolean;
|
|
85
|
-
setLoadingState(state: keyof LoadingStates, value: LoadingState | {
|
|
86
|
-
[buttonType: string]: LoadingState;
|
|
87
|
-
}): void;
|
|
88
|
-
setAditionalButtonLoading(buttonType: string, id?: number | string): void;
|
|
89
|
-
clearAditionalButtonLoading(buttonType: string, id?: number | string): void;
|
|
90
|
-
isAditionalButtonLoading(buttonType: string, id?: number | string): boolean;
|
|
91
|
-
hasExpandable(): boolean;
|
|
92
|
-
toggleRow(row: any): void;
|
|
93
|
-
getExpandedContent(row: any): string;
|
|
94
|
-
getExpansionState(row: any): 'expanded' | 'collapsed';
|
|
95
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JTableComponent, never>;
|
|
96
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JTableComponent, "JCrudTable", never, { "endpoint": { "alias": "endpoint"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "defaultFilters": { "alias": "defaultFilters"; "required": false; }; "isPaginator": { "alias": "isPaginator"; "required": false; }; "isSearch": { "alias": "isSearch"; "required": false; }; "itemsPerPageOptions": { "alias": "itemsPerPageOptions"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "checkedValues": { "alias": "checkedValues"; "required": false; }; "checkedTitles": { "alias": "checkedTitles"; "required": false; }; "filtersButton": { "alias": "filtersButton"; "required": false; }; "filtersSelect": { "alias": "filtersSelect"; "required": false; }; "optionsTable": { "alias": "optionsTable"; "required": false; }; }, { "dataLoaded": "dataLoaded"; }, never, never, true, never>;
|
|
97
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { TemplateRef, EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class JDialogComponent {
|
|
4
|
-
icons: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
position: 'center' | 'leftCenter' | 'rightCenter' | 'topCenter' | 'bottomCenter' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
8
|
-
offset: {
|
|
9
|
-
top?: number;
|
|
10
|
-
bottom?: number;
|
|
11
|
-
left?: number;
|
|
12
|
-
right?: number;
|
|
13
|
-
};
|
|
14
|
-
openModal: boolean;
|
|
15
|
-
closeModal: EventEmitter<void>;
|
|
16
|
-
dialogTemplate: TemplateRef<any>;
|
|
17
|
-
title: string;
|
|
18
|
-
width: number;
|
|
19
|
-
height: number | 'auto';
|
|
20
|
-
overlay: boolean;
|
|
21
|
-
draggable: boolean;
|
|
22
|
-
private isDragging;
|
|
23
|
-
private dragOffset;
|
|
24
|
-
constructor();
|
|
25
|
-
onOpen(): void;
|
|
26
|
-
onClose(): void;
|
|
27
|
-
getModalWidth(): string;
|
|
28
|
-
getModalHeight(): string;
|
|
29
|
-
handleEscape(event: KeyboardEvent): void;
|
|
30
|
-
getPositionClass(): string;
|
|
31
|
-
getOffsetStyles(): {
|
|
32
|
-
[key: string]: string;
|
|
33
|
-
};
|
|
34
|
-
startDrag(event: MouseEvent): void;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JDialogComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JDialogComponent, "JDialog", never, { "position": { "alias": "position"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "openModal": { "alias": "openModal"; "required": false; }; "dialogTemplate": { "alias": "dialogTemplate"; "required": false; }; "title": { "alias": "title"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "overlay": { "alias": "overlay"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; }, { "closeModal": "closeModal"; }, never, never, true, never>;
|
|
37
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class JInputComponent implements ControlValueAccessor {
|
|
5
|
-
icons: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
type: 'text' | 'password' | 'number' | 'date' | 'datetime-local' | 'email' | 'file' | 'textarea' | 'range';
|
|
9
|
-
placeholder: string;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
required: boolean;
|
|
12
|
-
name?: string;
|
|
13
|
-
id?: string;
|
|
14
|
-
classes: string;
|
|
15
|
-
ngClass: {
|
|
16
|
-
[key: string]: boolean;
|
|
17
|
-
};
|
|
18
|
-
accept: string;
|
|
19
|
-
multiple: boolean;
|
|
20
|
-
showImage: boolean;
|
|
21
|
-
clearButton: boolean;
|
|
22
|
-
min: number;
|
|
23
|
-
max: number;
|
|
24
|
-
step: number;
|
|
25
|
-
isLabel: boolean;
|
|
26
|
-
simbol: string;
|
|
27
|
-
fileInputRef: ElementRef<HTMLInputElement>;
|
|
28
|
-
innerValue: any;
|
|
29
|
-
previewUrl: string | null;
|
|
30
|
-
get value(): any;
|
|
31
|
-
get combinedNgClass(): {
|
|
32
|
-
'opacity-50': boolean;
|
|
33
|
-
};
|
|
34
|
-
set value(val: any);
|
|
35
|
-
onChange: any;
|
|
36
|
-
onTouched: any;
|
|
37
|
-
writeValue(val: any): void;
|
|
38
|
-
registerOnChange(fn: any): void;
|
|
39
|
-
registerOnTouched(fn: any): void;
|
|
40
|
-
setDisabledState(isDisabled: boolean): void;
|
|
41
|
-
onInput(event: Event): void;
|
|
42
|
-
onFileSelected(event: Event): void;
|
|
43
|
-
clearInput(): void;
|
|
44
|
-
clearFile(): void;
|
|
45
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JInputComponent, never>;
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JInputComponent, "JInput", never, { "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "showImage": { "alias": "showImage"; "required": false; }; "clearButton": { "alias": "clearButton"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "isLabel": { "alias": "isLabel"; "required": false; }; "simbol": { "alias": "simbol"; "required": false; }; }, {}, never, never, true, never>;
|
|
47
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class JLabelComponent {
|
|
3
|
-
for: string;
|
|
4
|
-
isRequired: boolean;
|
|
5
|
-
isConditioned: boolean;
|
|
6
|
-
isAutomated: boolean;
|
|
7
|
-
classes: string;
|
|
8
|
-
ngClass: {
|
|
9
|
-
[key: string]: boolean;
|
|
10
|
-
};
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JLabelComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JLabelComponent, "JLabel", never, { "for": { "alias": "for"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "isConditioned": { "alias": "isConditioned"; "required": false; }; "isAutomated": { "alias": "isAutomated"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class JModeToggleComponent {
|
|
3
|
-
private readonly platformId;
|
|
4
|
-
icons: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
title: string;
|
|
8
|
-
theme: string;
|
|
9
|
-
constructor(platformId: object);
|
|
10
|
-
setTheme(theme: 'light' | 'dark'): void;
|
|
11
|
-
loadTheme(): void;
|
|
12
|
-
toggleDarkMode(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JModeToggleComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JModeToggleComponent, "JModeToggle", never, {}, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ElementRef, AfterViewInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class OptionComponent implements AfterViewInit {
|
|
4
|
-
private readonly elementRef;
|
|
5
|
-
value: any;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
get dataValue(): any;
|
|
8
|
-
private _text;
|
|
9
|
-
get text(): string;
|
|
10
|
-
constructor(elementRef: ElementRef);
|
|
11
|
-
ngAfterViewInit(): void;
|
|
12
|
-
setTextContent(text: string): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "JOption", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
15
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, QueryList, AfterContentInit, ElementRef, OnDestroy, ChangeDetectorRef, AfterViewInit, OnInit, SimpleChanges, OnChanges } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { OptionComponent } from './option/option.component';
|
|
4
|
-
import { TableColumn } from '../crud/table-component/elements/table.interface';
|
|
5
|
-
import { JGenericService } from '../../http/crud-generic.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class JSelectComponent implements ControlValueAccessor, AfterContentInit, AfterViewInit, OnDestroy, OnInit, OnChanges {
|
|
8
|
-
private readonly cdr;
|
|
9
|
-
private readonly elementRef;
|
|
10
|
-
private readonly genericService;
|
|
11
|
-
icons: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
type: 'multi-table' | 'dropdown' | 'searchable';
|
|
15
|
-
btnIcon: any;
|
|
16
|
-
btnText: string;
|
|
17
|
-
title: string;
|
|
18
|
-
placeholder: string;
|
|
19
|
-
showClear: boolean;
|
|
20
|
-
columns: TableColumn<any>[];
|
|
21
|
-
options: any[];
|
|
22
|
-
optionLabel: string | string[];
|
|
23
|
-
optionValue: string;
|
|
24
|
-
labelSeparator: string;
|
|
25
|
-
isLoading: boolean;
|
|
26
|
-
endpoint: string;
|
|
27
|
-
loadOnInit: boolean;
|
|
28
|
-
defaultFilters: {
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
};
|
|
31
|
-
searchFields: any[];
|
|
32
|
-
isSearch: boolean;
|
|
33
|
-
isFilterSelect: boolean;
|
|
34
|
-
sort: 'ASC' | 'DESC';
|
|
35
|
-
updateVisibility: EventEmitter<TableColumn<any>[]>;
|
|
36
|
-
selectionChange: EventEmitter<any>;
|
|
37
|
-
optionComponents: QueryList<OptionComponent>;
|
|
38
|
-
selectButton: ElementRef;
|
|
39
|
-
isColumnSelectorOpen: boolean;
|
|
40
|
-
selectedValue: any;
|
|
41
|
-
selectedLabel: string;
|
|
42
|
-
internalOptions: Array<{
|
|
43
|
-
value: any;
|
|
44
|
-
text: string;
|
|
45
|
-
}>;
|
|
46
|
-
searchTerm: string;
|
|
47
|
-
private readonly searchSubject;
|
|
48
|
-
private searchSubscription?;
|
|
49
|
-
filteredOptions: Array<{
|
|
50
|
-
value: any;
|
|
51
|
-
text: string;
|
|
52
|
-
original?: any;
|
|
53
|
-
}>;
|
|
54
|
-
dropdownTop: number;
|
|
55
|
-
dropdownLeft: number;
|
|
56
|
-
dropdownWidth: number;
|
|
57
|
-
private onChange;
|
|
58
|
-
private onTouched;
|
|
59
|
-
disabled: boolean;
|
|
60
|
-
private clickOutsideListener;
|
|
61
|
-
constructor(cdr: ChangeDetectorRef, elementRef: ElementRef, genericService: JGenericService);
|
|
62
|
-
ngOnInit(): void;
|
|
63
|
-
ngAfterContentInit(): void;
|
|
64
|
-
ngAfterViewInit(): void;
|
|
65
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
66
|
-
ngOnDestroy(): void;
|
|
67
|
-
processOptions(): void;
|
|
68
|
-
updateColumnVisibility(): void;
|
|
69
|
-
selectOption(option: {
|
|
70
|
-
value: any;
|
|
71
|
-
text: string;
|
|
72
|
-
original?: any;
|
|
73
|
-
}): void;
|
|
74
|
-
clearSelection(event: Event): void;
|
|
75
|
-
clearSearchTerm(): void;
|
|
76
|
-
updateSelectedLabel(): void;
|
|
77
|
-
getNestedValue(obj: any, path: string): any;
|
|
78
|
-
loadData(): void;
|
|
79
|
-
onSearchInput(): void;
|
|
80
|
-
filterOptions(): void;
|
|
81
|
-
resolveLabel(option: any): string;
|
|
82
|
-
toggleColumnSelector(): void;
|
|
83
|
-
setupClickOutsideListener(): void;
|
|
84
|
-
getSelectButtonWidth(): string;
|
|
85
|
-
updateDropdownPosition(): void;
|
|
86
|
-
private findPositionedParent;
|
|
87
|
-
writeValue(value: any): void;
|
|
88
|
-
registerOnChange(fn: any): void;
|
|
89
|
-
registerOnTouched(fn: any): void;
|
|
90
|
-
private shouldTriggerLoad;
|
|
91
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JSelectComponent, never>;
|
|
92
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JSelectComponent, "JSelect", never, { "type": { "alias": "type"; "required": false; }; "btnIcon": { "alias": "btnIcon"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "title": { "alias": "title"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "labelSeparator": { "alias": "labelSeparator"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "loadOnInit": { "alias": "loadOnInit"; "required": false; }; "defaultFilters": { "alias": "defaultFilters"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "isSearch": { "alias": "isSearch"; "required": false; }; "isFilterSelect": { "alias": "isFilterSelect"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "updateVisibility": "updateVisibility"; "selectionChange": "selectionChange"; }, ["optionComponents"], never, true, never>;
|
|
93
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { JGenericService } from '../../http/crud-generic.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class JToggleRadioComponent implements OnInit, ControlValueAccessor {
|
|
6
|
-
private readonly genericService;
|
|
7
|
-
icons: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
options: any[];
|
|
11
|
-
optionLabel: string;
|
|
12
|
-
optionValue: string;
|
|
13
|
-
endpoint: string;
|
|
14
|
-
loadOnInit: boolean;
|
|
15
|
-
defaultFilters: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
showClear: boolean;
|
|
19
|
-
classes: string;
|
|
20
|
-
classesElement: string;
|
|
21
|
-
disabled: boolean;
|
|
22
|
-
sort: 'ASC' | 'DESC';
|
|
23
|
-
selectFirstOnLoad: boolean;
|
|
24
|
-
selectionChange: EventEmitter<any>;
|
|
25
|
-
internalOptions: {
|
|
26
|
-
value: any;
|
|
27
|
-
label: string;
|
|
28
|
-
}[];
|
|
29
|
-
selectedValue: any;
|
|
30
|
-
isLoading: boolean;
|
|
31
|
-
constructor(genericService: JGenericService);
|
|
32
|
-
ngOnInit(): void;
|
|
33
|
-
isComponentDisabled: boolean;
|
|
34
|
-
setDisabledState(isDisabled: boolean): void;
|
|
35
|
-
loadOptionsFromApi(): void;
|
|
36
|
-
getNestedValue(obj: any, path: string): any;
|
|
37
|
-
processOptions(): void;
|
|
38
|
-
select(value: any): void;
|
|
39
|
-
clear(): void;
|
|
40
|
-
onChange: any;
|
|
41
|
-
onTouched: any;
|
|
42
|
-
writeValue(value: any): void;
|
|
43
|
-
registerOnChange(fn: any): void;
|
|
44
|
-
registerOnTouched(fn: any): void;
|
|
45
|
-
reloadOptions(): void;
|
|
46
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JToggleRadioComponent, never>;
|
|
47
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JToggleRadioComponent, "JToggleRadio", never, { "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "loadOnInit": { "alias": "loadOnInit"; "required": false; }; "defaultFilters": { "alias": "defaultFilters"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "classesElement": { "alias": "classesElement"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "selectFirstOnLoad": { "alias": "selectFirstOnLoad"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
48
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, NgZone, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { TooltipService } from './tooltip.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class JTooltipModule implements OnDestroy {
|
|
5
|
-
private readonly el;
|
|
6
|
-
private readonly tooltipService;
|
|
7
|
-
private readonly zone;
|
|
8
|
-
private readonly viewContainerRef;
|
|
9
|
-
content: string | TemplateRef<any>;
|
|
10
|
-
jTooltipPosition: 'top' | 'right' | 'bottom' | 'left';
|
|
11
|
-
jTooltipShowArrow: boolean;
|
|
12
|
-
jTooltipOffsetX: number;
|
|
13
|
-
jTooltipOffsetY: number;
|
|
14
|
-
constructor(el: ElementRef, tooltipService: TooltipService, zone: NgZone, viewContainerRef: ViewContainerRef);
|
|
15
|
-
show(): void;
|
|
16
|
-
hide(): void;
|
|
17
|
-
ngOnDestroy(): void;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JTooltipModule, never>;
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<JTooltipModule, "[jTooltip]", never, { "content": { "alias": "jTooltip"; "required": false; }; "jTooltipPosition": { "alias": "jTooltipPosition"; "required": false; }; "jTooltipShowArrow": { "alias": "jTooltipShowArrow"; "required": false; }; "jTooltipOffsetX": { "alias": "jTooltipOffsetX"; "required": false; }; "jTooltipOffsetY": { "alias": "jTooltipOffsetY"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RendererFactory2 } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TooltipService {
|
|
4
|
-
private tooltipElement;
|
|
5
|
-
private arrowElement;
|
|
6
|
-
private readonly renderer;
|
|
7
|
-
private showArrow;
|
|
8
|
-
private offsetX;
|
|
9
|
-
private offsetY;
|
|
10
|
-
constructor(rendererFactory: RendererFactory2);
|
|
11
|
-
show(content: string | HTMLElement, target: HTMLElement, position?: string, showArrow?: boolean, offsetX?: number, offsetY?: number): void;
|
|
12
|
-
positionAbsolute(target: HTMLElement, position: string): void;
|
|
13
|
-
hide(): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipService, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TooltipService>;
|
|
16
|
-
}
|
package/lib/http/api-url.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class JConverterService {
|
|
4
|
-
constructor();
|
|
5
|
-
/**
|
|
6
|
-
* Obtener la clave de ordenación correcta
|
|
7
|
-
* @param sortColumn
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
getSortKey(sortColumn: any): string;
|
|
11
|
-
/**
|
|
12
|
-
* Convierte un objeto a un array de objetos con clave y valor para iniciar el formulario
|
|
13
|
-
* @param formGroup
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
initializeFormControls(formGroup: FormGroup): {
|
|
17
|
-
[key: string]: AbstractControl | null;
|
|
18
|
-
};
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JConverterService, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<JConverterService>;
|
|
21
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Params } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { HttpClient } from '@angular/common/http';
|
|
4
|
-
import { JConverterService } from './converter.service';
|
|
5
|
-
import { ApiResponse } from './interface/api-response';
|
|
6
|
-
import { JHttpParamsService } from './http-rest.service';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export interface QueryParams {
|
|
9
|
-
page?: number;
|
|
10
|
-
limit?: number;
|
|
11
|
-
sort?: {
|
|
12
|
-
column?: string | null;
|
|
13
|
-
direction?: string;
|
|
14
|
-
};
|
|
15
|
-
filters?: any;
|
|
16
|
-
defaultFilters?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
searchQuery?: string;
|
|
20
|
-
columns?: string[];
|
|
21
|
-
}
|
|
22
|
-
export declare class JGenericService {
|
|
23
|
-
private readonly baseUrl;
|
|
24
|
-
private readonly http;
|
|
25
|
-
private readonly HttpParamsService;
|
|
26
|
-
private readonly converterService;
|
|
27
|
-
constructor(baseUrl: string, http: HttpClient, HttpParamsService: JHttpParamsService, converterService: JConverterService);
|
|
28
|
-
/**
|
|
29
|
-
* Método genérico para obtener todos los registros desde un endpoint.
|
|
30
|
-
* @param endpoint Distintivo del endpoint ('role', 'status', etc.)
|
|
31
|
-
* @param params Parámetros de la petición.
|
|
32
|
-
* @returns Observable con la respuesta de la API.
|
|
33
|
-
*/
|
|
34
|
-
getAll<T>(endpoint: string, params?: Params): Observable<ApiResponse<T>>;
|
|
35
|
-
/**
|
|
36
|
-
* Método genérico para obtener un registro desde un endpoint.
|
|
37
|
-
* @param endpoint Distintivo del endpoint ('role', 'status', etc.)
|
|
38
|
-
* @param id Identificador del registro.
|
|
39
|
-
* @returns Observable con la respuesta de la API.
|
|
40
|
-
*/
|
|
41
|
-
getId<T>(endpoint: string, id: number): Observable<T>;
|
|
42
|
-
/**
|
|
43
|
-
* Método genérico para agregar un registro a un endpoint.
|
|
44
|
-
* @param endpoint Distintivo del endpoint ('role', 'status', etc.)
|
|
45
|
-
* @param data Datos del registro a agregar.
|
|
46
|
-
* @returns Observable con la respuesta de la API.
|
|
47
|
-
*/
|
|
48
|
-
create<T>(endpoint: string, data: T): Observable<ApiResponse<T>>;
|
|
49
|
-
/**
|
|
50
|
-
* Método genérico para actualizar un registro en un endpoint.
|
|
51
|
-
* @param endpoint Distintivo del endpoint ('role', 'status', etc.)
|
|
52
|
-
* @param id Identificador del registro.
|
|
53
|
-
* @param data Datos del registro a actualizar.
|
|
54
|
-
* @returns Observable con la respuesta de la API.
|
|
55
|
-
*/
|
|
56
|
-
update<T>(endpoint: string, id: number, data: T): Observable<ApiResponse<T>>;
|
|
57
|
-
/**
|
|
58
|
-
* Método genérico para eliminar un registro de un endpoint.
|
|
59
|
-
* @param endpoint Distintivo del endpoint ('role', 'status', etc.)
|
|
60
|
-
* @param id Identificador del registro.
|
|
61
|
-
* @returns Observable con la respuesta de la API.
|
|
62
|
-
*/
|
|
63
|
-
delete<T>(endpoint: string, id: number): Observable<ApiResponse<T>>;
|
|
64
|
-
/**
|
|
65
|
-
* Método genérico para actualizar estados de un registro en un endpoint.
|
|
66
|
-
* @param endpoint Distintivo del endpoint ('role', 'status', etc.)
|
|
67
|
-
* @param id Identificador del registro.
|
|
68
|
-
* @param data Datos de un registro booleano a actualizar.
|
|
69
|
-
* @returns Observable con la respuesta de la API.
|
|
70
|
-
*/
|
|
71
|
-
enable<T>(endpoint: string, id: number, data: T): Observable<ApiResponse<T>>;
|
|
72
|
-
/**
|
|
73
|
-
* Método genérico para obtener los parámetros de consulta para una tabla.
|
|
74
|
-
* @param page Número de página actual.
|
|
75
|
-
* @param limit Número de registros por página.
|
|
76
|
-
* @param sort Objeto que contiene la columna y la dirección de ordenamiento.
|
|
77
|
-
* @param filters Filtros aplicados a la consulta.
|
|
78
|
-
* @param defaultFilters Filtros predeterminados aplicados a la consulta.
|
|
79
|
-
* @param searchQuery Cadena de búsqueda.
|
|
80
|
-
* @param columns Columnas a buscar.
|
|
81
|
-
* @returns
|
|
82
|
-
*/
|
|
83
|
-
params({ page, limit, sort, filters, defaultFilters, searchQuery, columns }: QueryParams): Params;
|
|
84
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JGenericService, never>;
|
|
85
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<JGenericService>;
|
|
86
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class JErrorHandlerService {
|
|
3
|
-
/**
|
|
4
|
-
* Mapeo de códigos de estado HTTP a mensajes amigables y su tipo de alerta.
|
|
5
|
-
*/
|
|
6
|
-
private readonly errorMappings;
|
|
7
|
-
constructor();
|
|
8
|
-
/**
|
|
9
|
-
* Manejo de errores HTTP y retorno de un mensaje estructurado con tipo de alerta.
|
|
10
|
-
*/
|
|
11
|
-
handleHttpError(error: any): {
|
|
12
|
-
type: string;
|
|
13
|
-
title: string;
|
|
14
|
-
message: string;
|
|
15
|
-
persistent: boolean;
|
|
16
|
-
} | {
|
|
17
|
-
type: "info" | "error";
|
|
18
|
-
title: string;
|
|
19
|
-
message: any;
|
|
20
|
-
persistent: boolean;
|
|
21
|
-
};
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JErrorHandlerService, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<JErrorHandlerService>;
|
|
24
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HttpParams } from '@angular/common/http';
|
|
2
|
-
import { Params } from '@angular/router';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class JHttpParamsService {
|
|
5
|
-
constructor();
|
|
6
|
-
resParams(params: Params): HttpParams;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JHttpParamsService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<JHttpParamsService>;
|
|
9
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface ApiResponse<T> {
|
|
2
|
-
ok: boolean;
|
|
3
|
-
msg: string;
|
|
4
|
-
data: T;
|
|
5
|
-
meta?: MetaResponse;
|
|
6
|
-
}
|
|
7
|
-
export interface MetaResponse {
|
|
8
|
-
page: PageResponse;
|
|
9
|
-
sort: SortResponse;
|
|
10
|
-
}
|
|
11
|
-
export interface PageResponse {
|
|
12
|
-
currentPage: number;
|
|
13
|
-
totalPages: number;
|
|
14
|
-
totalRecords: number;
|
|
15
|
-
limit: number;
|
|
16
|
-
}
|
|
17
|
-
export interface SortResponse {
|
|
18
|
-
by: string;
|
|
19
|
-
order: "ASC" | "DESC";
|
|
20
|
-
}
|