ln-20-lib-components 0.0.11 → 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/fesm2022/ln-20-lib-components-selected-items-management.component-CH9UC-8E.mjs +86 -0
- package/fesm2022/ln-20-lib-components-selected-items-management.component-CH9UC-8E.mjs.map +1 -0
- package/fesm2022/ln-20-lib-components-selected-items-management.component-CrgtLkUn.mjs +86 -0
- package/fesm2022/ln-20-lib-components-selected-items-management.component-CrgtLkUn.mjs.map +1 -0
- package/fesm2022/ln-20-lib-components-selected-items-management.component-xRoZB_NZ.mjs +86 -0
- package/fesm2022/ln-20-lib-components-selected-items-management.component-xRoZB_NZ.mjs.map +1 -0
- package/fesm2022/ln-20-lib-components.mjs +2352 -56
- package/fesm2022/ln-20-lib-components.mjs.map +1 -1
- package/lib/components/origin/disabled-container/disabled-container.component.d.ts +6 -0
- package/lib/components/origin/form/components/custom-input/custom-input.component.d.ts +25 -0
- package/lib/components/origin/form/components/form-child/form-child.component.d.ts +13 -0
- package/lib/components/origin/form/components/inline-input/inline-input.component.d.ts +78 -0
- package/lib/components/origin/form/components/inline-input/interfaces/index.d.ts +26 -0
- package/lib/components/origin/form/enums/index.d.ts +36 -0
- package/lib/components/origin/form/form.component.d.ts +19 -0
- package/lib/components/origin/form/index.d.ts +4 -0
- package/lib/components/origin/form/interfaces/index.d.ts +58 -0
- package/lib/components/origin/http-message/http-message.component.d.ts +10 -0
- package/lib/components/origin/http-message/interfaces/index.d.ts +11 -0
- package/lib/components/origin/index.d.ts +1 -2
- package/lib/components/origin/pick-list/interfaces/index.d.ts +12 -0
- package/lib/components/prime-ng/badge/badge-ng.component.d.ts +11 -0
- package/lib/components/prime-ng/badge/interfaces/index.d.ts +8 -0
- package/lib/components/prime-ng/dynamic-dialog/components/base-dialog.component.d.ts +21 -0
- package/lib/components/prime-ng/index.d.ts +2 -0
- package/lib/components/prime-ng/interfaces/index.d.ts +12 -0
- package/lib/components/prime-ng/table-ng/components/selected-items-management/selected-items-management.component.d.ts +17 -0
- package/lib/components/prime-ng/table-ng/interfaces/index.d.ts +191 -0
- package/lib/components/prime-ng/table-ng/services/table-ng-edit.service.d.ts +17 -0
- package/lib/components/prime-ng/table-ng/services/table-ng-general.service.d.ts +7 -0
- package/lib/components/prime-ng/table-ng/services/table-ng.service.d.ts +32 -0
- package/lib/components/prime-ng/table-ng/table-ng.component.d.ts +162 -0
- package/lib/components/prime-ng/toolbar-ng/toolbar-ng.component.d.ts +5 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/pipes/key-to-display-name.pipe.d.ts +7 -0
- package/lib/utils/api-error.util.d.ts +58 -0
- package/lib/utils/cookie.util.d.ts +37 -0
- package/lib/utils/currency.util.d.ts +1 -0
- package/lib/utils/date.util.d.ts +3 -0
- package/lib/utils/documents.util.d.ts +88 -0
- package/lib/utils/id.util.d.ts +1 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/number.util.d.ts +2 -0
- package/lib/utils/objects.util.d.ts +20 -0
- package/lib/utils/prime-ng.util.d.ts +3 -0
- package/ln-20-lib-components-0.0.12.tgz +0 -0
- package/ln-20-lib-components-0.0.13.tgz +0 -0
- package/package.json +1 -1
- package/lib/components/origin/button/button.component.d.ts +0 -11
- package/lib/components/origin/empty-message/empty-message.component.d.ts +0 -6
- package/ln-20-lib-components-0.0.10.tgz +0 -0
- package/ln-20-lib-components-0.0.11.tgz +0 -0
- package/ln-20-lib-components-0.0.9.tgz +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class DisabledContainerComponent {
|
|
3
|
+
disabled: import("@angular/core").ModelSignal<boolean>;
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DisabledContainerComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DisabledContainerComponent, "lib-disabled-container", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; }, never, ["*"], true, never>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Signal } from '@angular/core';
|
|
2
|
+
import type { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
+
import { ETypeInput } from '../../enums';
|
|
4
|
+
import type { IControlConfig } from '../../interfaces';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CustomInputComponent implements ControlValueAccessor {
|
|
7
|
+
controlData: import("@angular/core").InputSignal<IControlConfig>;
|
|
8
|
+
controlUpperName: Signal<string>;
|
|
9
|
+
showPassword: boolean;
|
|
10
|
+
output: import("@angular/core").OutputEmitterRef<IControlConfig>;
|
|
11
|
+
onTouched: () => void;
|
|
12
|
+
onChange: (_value: any) => void;
|
|
13
|
+
constructor();
|
|
14
|
+
writeValue(value: any): void;
|
|
15
|
+
get showLabel(): boolean;
|
|
16
|
+
get inputTypesEnum(): typeof ETypeInput;
|
|
17
|
+
onCheckboxChange(event: Event, control: FormControl): void;
|
|
18
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
19
|
+
registerOnTouched(fn: () => void): void;
|
|
20
|
+
generateUniqueId(baseString: string): string;
|
|
21
|
+
togglePasswordVisibility(): void;
|
|
22
|
+
onSelectChange(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomInputComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputComponent, "lib-custom-input", never, { "controlData": { "alias": "controlData"; "required": true; "isSignal": true; }; }, { "output": "output"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FormGroup } from '@angular/forms';
|
|
2
|
+
import type { IControlConfig } from '../../interfaces';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FormChildComponent {
|
|
5
|
+
controlsData: import("@angular/core").InputSignal<IControlConfig[]>;
|
|
6
|
+
formGroup: import("@angular/core").InputSignal<FormGroup<any>>;
|
|
7
|
+
formSubmit: import("@angular/core").OutputEmitterRef<FormGroup<any>>;
|
|
8
|
+
constructor();
|
|
9
|
+
submit(): void;
|
|
10
|
+
onSelectChange(controlConfig: IControlConfig): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormChildComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormChildComponent, "lib-form-child", never, { "controlsData": { "alias": "controlsData"; "required": true; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Signal, OnDestroy, WritableSignal, OnInit, QueryList } from '@angular/core';
|
|
2
|
+
import { type ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { ETypeInput } from '../../enums';
|
|
4
|
+
import type { InlineControlConfig } from './interfaces/index';
|
|
5
|
+
import type { PrimeTemplate as PrimeTemplateType } from 'primeng/api';
|
|
6
|
+
import { IPrimeNgSelection } from '../../../../prime-ng/interfaces';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class InlineInputComponent<T = string | number | boolean | null> implements ControlValueAccessor, OnDestroy, OnInit {
|
|
9
|
+
config: import("@angular/core").InputSignal<InlineControlConfig>;
|
|
10
|
+
value: import("@angular/core").ModelSignal<T | null>;
|
|
11
|
+
outputValue: import("@angular/core").OutputEmitterRef<T>;
|
|
12
|
+
outputBlur: import("@angular/core").OutputEmitterRef<T>;
|
|
13
|
+
outputDebounced: import("@angular/core").OutputEmitterRef<T>;
|
|
14
|
+
templates: QueryList<PrimeTemplateType>;
|
|
15
|
+
chips: string[];
|
|
16
|
+
currentInput: string;
|
|
17
|
+
showDuplicateMessage: boolean;
|
|
18
|
+
duplicateChips: string[];
|
|
19
|
+
duplicateMessageTimer: ReturnType<typeof setTimeout> | null;
|
|
20
|
+
constructor();
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
onChange: (value: any) => void;
|
|
23
|
+
onTouched: () => void;
|
|
24
|
+
writeValue(value: string | number | boolean | null): void;
|
|
25
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
26
|
+
registerOnTouched(fn: () => void): void;
|
|
27
|
+
onChangeValue(value: string | number | boolean | null | IPrimeNgSelection<string | boolean>): void;
|
|
28
|
+
onBlur(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Maneja eventos de teclado para prevenir la navegación de PrimeNG Table
|
|
31
|
+
* cuando se usan las flechas izquierda/derecha dentro del input
|
|
32
|
+
*/
|
|
33
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
34
|
+
private isSelection;
|
|
35
|
+
valueSelect: WritableSignal<IPrimeNgSelection<string | boolean> | undefined>;
|
|
36
|
+
setValueSelect(value: IPrimeNgSelection<string | boolean> | undefined): void;
|
|
37
|
+
get type(): ETypeInput;
|
|
38
|
+
get ETypeInput(): typeof ETypeInput;
|
|
39
|
+
get duplicatesText(): string;
|
|
40
|
+
get currency(): string;
|
|
41
|
+
get locale(): string;
|
|
42
|
+
get minFractionDigits(): number;
|
|
43
|
+
get maxFractionDigits(): number;
|
|
44
|
+
protected knobValueInput: Signal<number>;
|
|
45
|
+
protected knobValueTemplate: Signal<string>;
|
|
46
|
+
onChipInputChange(event: Event): void;
|
|
47
|
+
onChipKeydown(event: KeyboardEvent): void;
|
|
48
|
+
onChipPaste(event: ClipboardEvent): void;
|
|
49
|
+
addChip(): void;
|
|
50
|
+
removeChip(index: number): void;
|
|
51
|
+
private updateChipsValue;
|
|
52
|
+
private showDuplicateAlert;
|
|
53
|
+
private hideDuplicateAlert;
|
|
54
|
+
private processPastedText;
|
|
55
|
+
/**
|
|
56
|
+
* Método público para establecer chips desde un array externo
|
|
57
|
+
* @param chipsArray Array de strings que representan las chips
|
|
58
|
+
*/
|
|
59
|
+
setChipsFromArray(chipsArray: string[]): void;
|
|
60
|
+
/**
|
|
61
|
+
* Método público para obtener las chips actuales como array
|
|
62
|
+
* @returns Array de strings con las chips actuales
|
|
63
|
+
*/
|
|
64
|
+
getChipsAsArray(): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Método público para limpiar todas las chips
|
|
67
|
+
*/
|
|
68
|
+
clearAllChips(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Método público para agregar múltiples chips desde un array
|
|
71
|
+
* Evita duplicados y muestra mensajes de alerta si es necesario
|
|
72
|
+
* @param chipsArray Array de strings a agregar
|
|
73
|
+
*/
|
|
74
|
+
addChipsFromArray(chipsArray: string[]): void;
|
|
75
|
+
ngOnDestroy(): void;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineInputComponent<any>, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlineInputComponent<any>, "lib-inline-input", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "outputValue": "outputValue"; "outputBlur": "outputBlur"; "outputDebounced": "outputDebounced"; }, ["templates"], never, true, never>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IDefaultControlConfig, ITextareaConfig } from '../../../interfaces';
|
|
2
|
+
export interface INumberLikeConfig {
|
|
3
|
+
locale?: string;
|
|
4
|
+
minFractionDigits?: number;
|
|
5
|
+
maxFractionDigits?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ICurrencyConfig extends INumberLikeConfig {
|
|
8
|
+
currency?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IKnobConfig {
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
step?: number;
|
|
14
|
+
valueTemplate?: string;
|
|
15
|
+
size?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface INumberConfig extends INumberLikeConfig {
|
|
18
|
+
}
|
|
19
|
+
export interface InlineControlConfig extends IDefaultControlConfig {
|
|
20
|
+
currencyConfig?: ICurrencyConfig;
|
|
21
|
+
numberConfig?: INumberConfig;
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
knobConfig?: IKnobConfig;
|
|
25
|
+
textareaConfig?: ITextareaConfig;
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare enum ETypeInput {
|
|
2
|
+
TEXT = "text",
|
|
3
|
+
PASSWORD = "password",
|
|
4
|
+
EMAIL = "email",
|
|
5
|
+
NUMBER = "number",
|
|
6
|
+
DATE = "date",
|
|
7
|
+
TIME = "time",
|
|
8
|
+
DATETIME_LOCAL = "datetime-local",
|
|
9
|
+
SEARCH = "search",
|
|
10
|
+
TEL = "tel",
|
|
11
|
+
URL = "url",
|
|
12
|
+
COLOR = "color",
|
|
13
|
+
MONTH = "month",
|
|
14
|
+
WEEK = "week",
|
|
15
|
+
FILE = "file",
|
|
16
|
+
CHECKBOX = "checkbox",
|
|
17
|
+
RADIO = "radio",
|
|
18
|
+
RANGE = "range",
|
|
19
|
+
HIDDEN = "hidden",
|
|
20
|
+
TEXTAREA = "textarea",
|
|
21
|
+
SELECT = "select",
|
|
22
|
+
MULTISELECT = "multiselect",
|
|
23
|
+
AUTOCOMPLETE = "autocomplete",
|
|
24
|
+
SWITCH = "switch",
|
|
25
|
+
CALENDAR = "calendar",
|
|
26
|
+
DROPDOWN = "dropdown",
|
|
27
|
+
CHIPS = "chips",
|
|
28
|
+
TOGGLE = "toggle",
|
|
29
|
+
OTP = "otp",
|
|
30
|
+
CURRENCY = "currency",
|
|
31
|
+
KNOB = "knob",
|
|
32
|
+
BADGE = "badge",
|
|
33
|
+
DECIMAL = "decimal",
|
|
34
|
+
IMAGE = "image",
|
|
35
|
+
COMPONENT = "component"
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FormGroup } from '@angular/forms';
|
|
2
|
+
import type { IControlConfig, IFormConfig } from './interfaces';
|
|
3
|
+
import type { IHttpMessage } from '../http-message/interfaces';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FormComponent {
|
|
6
|
+
formGroup: import("@angular/core").ModelSignal<FormGroup<any>>;
|
|
7
|
+
controls: import("@angular/core").InputSignal<IControlConfig[]>;
|
|
8
|
+
formConfig: import("@angular/core").InputSignal<IFormConfig | undefined>;
|
|
9
|
+
httpMessage: import("@angular/core").ModelSignal<IHttpMessage | undefined>;
|
|
10
|
+
formSubmit: import("@angular/core").OutputEmitterRef<FormGroup<any>>;
|
|
11
|
+
formChanges: import("@angular/core").OutputEmitterRef<FormGroup<any>>;
|
|
12
|
+
formChangesDebounced: import("@angular/core").OutputEmitterRef<FormGroup<any>>;
|
|
13
|
+
constructor();
|
|
14
|
+
anyInteracted(formGroup: FormGroup): boolean;
|
|
15
|
+
submit(formGroup: FormGroup): void;
|
|
16
|
+
clearHttpMessage(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "lib-form", never, { "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; "controls": { "alias": "controls"; "required": true; "isSignal": true; }; "formConfig": { "alias": "formConfig"; "required": false; "isSignal": true; }; "httpMessage": { "alias": "httpMessage"; "required": false; "isSignal": true; }; }, { "formGroup": "formGroupChange"; "httpMessage": "httpMessageChange"; "formSubmit": "formSubmit"; "formChanges": "formChanges"; "formChangesDebounced": "formChangesDebounced"; }, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { FormControl } from '@angular/forms';
|
|
2
|
+
import type { IPrimeNgSelection } from '../../../prime-ng/interfaces';
|
|
3
|
+
import type { ETypeInput } from '../enums';
|
|
4
|
+
import type { ICurrencyConfig } from '../components/inline-input/interfaces';
|
|
5
|
+
export interface IControlConfig extends IDefaultControlConfig {
|
|
6
|
+
controlName: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
}
|
|
9
|
+
export interface IFormConfig {
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IDateConfig {
|
|
13
|
+
minDate?: Date;
|
|
14
|
+
maxDate?: Date;
|
|
15
|
+
selectionMode?: 'multiple' | 'range' | 'single';
|
|
16
|
+
}
|
|
17
|
+
export interface IMultiSelectConfig extends ICommonSelectConfig {
|
|
18
|
+
}
|
|
19
|
+
export interface ISelectConfig extends ICommonSelectConfig {
|
|
20
|
+
change?: (controlConfig: IControlConfig) => void;
|
|
21
|
+
}
|
|
22
|
+
interface ICommonSelectConfig {
|
|
23
|
+
options: IPrimeNgSelection<any>[];
|
|
24
|
+
optionLabel?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IToggleButtonConfig {
|
|
27
|
+
onLabel: string;
|
|
28
|
+
offLabel: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ITextareaConfig {
|
|
31
|
+
rows?: number;
|
|
32
|
+
cols?: number;
|
|
33
|
+
autoResize?: boolean;
|
|
34
|
+
height?: string | number;
|
|
35
|
+
maxHeight?: string | number;
|
|
36
|
+
minHeight?: string | number;
|
|
37
|
+
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
38
|
+
variant?: 'outlined' | 'filled';
|
|
39
|
+
}
|
|
40
|
+
export interface IDefaultControlConfig {
|
|
41
|
+
typeInput: ETypeInput;
|
|
42
|
+
readonly?: boolean;
|
|
43
|
+
label?: string;
|
|
44
|
+
dateConfig?: IDateConfig;
|
|
45
|
+
multiSelectConfig?: IMultiSelectConfig;
|
|
46
|
+
selectConfig?: ISelectConfig;
|
|
47
|
+
toggleConfig?: IToggleButtonConfig;
|
|
48
|
+
otpConfig?: {
|
|
49
|
+
length: number;
|
|
50
|
+
mask?: boolean;
|
|
51
|
+
integerOnly?: boolean;
|
|
52
|
+
};
|
|
53
|
+
textareaConfig?: ITextareaConfig;
|
|
54
|
+
colSpan?: number;
|
|
55
|
+
hideLabel?: boolean;
|
|
56
|
+
currencyConfig?: ICurrencyConfig;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IHttpMessage } from './interfaces';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HttpMessageComponent {
|
|
4
|
+
httpMessage: import("@angular/core").ModelSignal<IHttpMessage | undefined>;
|
|
5
|
+
clearMessage(): void;
|
|
6
|
+
get isError(): boolean;
|
|
7
|
+
get isSuccess(): boolean;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpMessageComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HttpMessageComponent, "lib-http-message", never, { "httpMessage": { "alias": "httpMessage"; "required": false; "isSignal": true; }; }, { "httpMessage": "httpMessageChange"; }, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IHttpErrorMessage {
|
|
2
|
+
code: string;
|
|
3
|
+
message: string;
|
|
4
|
+
type: 'error';
|
|
5
|
+
}
|
|
6
|
+
export interface IHttpSuccessMessage {
|
|
7
|
+
code: string;
|
|
8
|
+
message: string;
|
|
9
|
+
type: 'success';
|
|
10
|
+
}
|
|
11
|
+
export type IHttpMessage = IHttpErrorMessage | IHttpSuccessMessage;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './empty-message/empty-message.component';
|
|
1
|
+
export * from './form/index';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IButtonConfig, IButtonSeverity } from '../../../prime-ng/button-ng/interfaces';
|
|
2
|
+
export interface IPickListConfig {
|
|
3
|
+
cols?: number;
|
|
4
|
+
targetSeverityButton?: IButtonSeverity['severity'];
|
|
5
|
+
sourceSeverityButton?: IButtonSeverity['severity'];
|
|
6
|
+
}
|
|
7
|
+
export interface IPickListElement {
|
|
8
|
+
buttonConfig?: IButtonConfig<IPickListElement>;
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
colSpan?: number;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IBadgeConfig, IBadgeSeverity, IBadgeSize } from './interfaces';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BadgeNgComponent {
|
|
4
|
+
config: import("@angular/core").ModelSignal<IBadgeConfig>;
|
|
5
|
+
get value(): string;
|
|
6
|
+
get severity(): IBadgeSeverity;
|
|
7
|
+
get badgeSize(): IBadgeSize;
|
|
8
|
+
get fullWidth(): boolean;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeNgComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BadgeNgComponent, "lib-badge-ng", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "config": "configChange"; }, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type IBadgeSeverity = 'info' | 'success' | 'warn' | 'danger' | 'secondary' | 'contrast';
|
|
2
|
+
export type IBadgeSize = 'small' | 'large' | 'xlarge';
|
|
3
|
+
export interface IBadgeConfig {
|
|
4
|
+
value: string;
|
|
5
|
+
severity: IBadgeSeverity;
|
|
6
|
+
badgeSize?: IBadgeSize;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OnDestroy } from '@angular/core';
|
|
2
|
+
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface IDialogResult<T = any> {
|
|
6
|
+
success: boolean;
|
|
7
|
+
data?: T;
|
|
8
|
+
message?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class BaseDialogComponent implements OnDestroy {
|
|
11
|
+
protected destroy$: Subject<void>;
|
|
12
|
+
protected data: any;
|
|
13
|
+
ref: DynamicDialogRef<any>;
|
|
14
|
+
config: DynamicDialogConfig<any, any>;
|
|
15
|
+
constructor();
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
close<T>(result?: IDialogResult<T>): void;
|
|
18
|
+
dismiss(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseDialogComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface IPrimeNgSelection<T = string> {
|
|
2
|
+
name: string;
|
|
3
|
+
code: T;
|
|
4
|
+
}
|
|
5
|
+
export interface ITooltipConfig {
|
|
6
|
+
pTooltip: string;
|
|
7
|
+
tooltipPosition?: 'right' | 'top' | 'bottom' | 'left';
|
|
8
|
+
}
|
|
9
|
+
export interface IColumnPrimeNg {
|
|
10
|
+
field: string;
|
|
11
|
+
header: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OnInit, Signal } from '@angular/core';
|
|
2
|
+
import type { IButtonConfig } from '../../../button-ng/interfaces';
|
|
3
|
+
import { BaseDialogComponent } from '../../../dynamic-dialog/components/base-dialog.component';
|
|
4
|
+
import type { ITableNgConfig, ITableNgData } from '../../interfaces';
|
|
5
|
+
import { TableNgComponent } from '../../table-ng.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class SelectedItemsManagementComponent extends BaseDialogComponent implements OnInit {
|
|
8
|
+
tableNg: TableNgComponent;
|
|
9
|
+
constructor();
|
|
10
|
+
protected selectedItems: ITableNgData[];
|
|
11
|
+
protected configTable?: ITableNgConfig | undefined;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
buttonsSubmit: Signal<IButtonConfig[]>;
|
|
14
|
+
submitSelection(flag: 'accept' | 'reject'): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectedItemsManagementComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectedItemsManagementComponent, "lib-selected-items-management", never, {}, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { type TemplateRef } from '@angular/core';
|
|
2
|
+
import { type FormControl } from '@angular/forms';
|
|
3
|
+
import type { FilterMetadata } from 'primeng/api';
|
|
4
|
+
import type { ICurrencyConfig, InlineControlConfig } from '../../../origin/form/components/inline-input/interfaces/index';
|
|
5
|
+
import { type ETypeInput } from '../../../origin/form/enums';
|
|
6
|
+
import type { IButtonConfig } from '../../button-ng/interfaces';
|
|
7
|
+
import type { IColumnPrimeNg, IPrimeNgSelection } from '../../interfaces';
|
|
8
|
+
import type { Observable } from 'rxjs';
|
|
9
|
+
export interface ITableNgData<T = IRowData, R = unknown> {
|
|
10
|
+
rowData: T;
|
|
11
|
+
rowDataButtons?: Record<string, IButtonConfig[]>;
|
|
12
|
+
rowDataComponents?: Record<string, TemplateRef<{
|
|
13
|
+
$implicit: T;
|
|
14
|
+
}>>;
|
|
15
|
+
typeCell?: Record<string, ETypeInput>;
|
|
16
|
+
currencyTypeCellConfig?: Record<string, ICurrencyConfig>;
|
|
17
|
+
componentTypeCellConfig?: Record<string, TemplateRef<unknown>>;
|
|
18
|
+
raw: R;
|
|
19
|
+
onClick: (data?: unknown) => void;
|
|
20
|
+
sortConfig?: ISortConfig;
|
|
21
|
+
id: string;
|
|
22
|
+
isSelected?: boolean;
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface IMetaPagination {
|
|
26
|
+
limit?: number;
|
|
27
|
+
skip?: number;
|
|
28
|
+
sortBy?: 'createdAt' | 'updatedAt';
|
|
29
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
30
|
+
}
|
|
31
|
+
export type IRowData<T = Record<string, any>> = T;
|
|
32
|
+
export type SortButtonKey = 'label' | 'icon' | 'loading' | 'severity' | 'disabled';
|
|
33
|
+
export interface ISortConfig {
|
|
34
|
+
/**
|
|
35
|
+
* Objeto que define la configuración de ordenamiento.
|
|
36
|
+
* - La clave representa el nombre de la columna a ordenar.
|
|
37
|
+
* - El valor indica la propiedad del botón que se utilizará para reflejar el estado del ordenamiento.
|
|
38
|
+
*
|
|
39
|
+
* Ejemplo:
|
|
40
|
+
* {
|
|
41
|
+
* "Acciones": "label",
|
|
42
|
+
* }
|
|
43
|
+
*/
|
|
44
|
+
buttonKeyToSort?: Record<string, SortButtonKey>;
|
|
45
|
+
}
|
|
46
|
+
export interface IGlobalSearchForm {
|
|
47
|
+
search?: FormControl<string>;
|
|
48
|
+
}
|
|
49
|
+
export interface IPaginationConfig {
|
|
50
|
+
paginator: boolean;
|
|
51
|
+
rows: number;
|
|
52
|
+
rowsPerPageOptions: number[];
|
|
53
|
+
}
|
|
54
|
+
export interface IColumnConfig {
|
|
55
|
+
sizeByKey?: Record<string, number>;
|
|
56
|
+
}
|
|
57
|
+
export interface ITableNgConfig {
|
|
58
|
+
keys: string[];
|
|
59
|
+
keysNames?: Record<string, string>;
|
|
60
|
+
paginationConfig: IPaginationConfig;
|
|
61
|
+
globalFilterConfig?: IGlobalFilterConfig;
|
|
62
|
+
selectionTableConfig?: ISelectionTableConfig;
|
|
63
|
+
filterConfigByKey?: Record<string, IFilterConfigByKey>;
|
|
64
|
+
frozenColumnConfigByKey?: Record<string, boolean>;
|
|
65
|
+
scrollConfig?: IScrollConfig;
|
|
66
|
+
lazyLoadingConfig?: ITableNgLazyLoading;
|
|
67
|
+
columnConfig?: IColumnConfig;
|
|
68
|
+
titleConfig?: ITitleConfig;
|
|
69
|
+
selectedColumns?: IColumnPrimeNg[];
|
|
70
|
+
rowExpansionConfig?: IRowExpansionConfig;
|
|
71
|
+
toolbarConfig?: IToolbarConfig;
|
|
72
|
+
hideToolbar?: boolean;
|
|
73
|
+
excelConfig?: IExcelConfig;
|
|
74
|
+
pdfConfig?: IPdfConfig;
|
|
75
|
+
}
|
|
76
|
+
export interface IExcelConfig {
|
|
77
|
+
isEnabled: boolean;
|
|
78
|
+
name: string;
|
|
79
|
+
}
|
|
80
|
+
export interface IPdfConfig {
|
|
81
|
+
isEnabled: boolean;
|
|
82
|
+
name: string;
|
|
83
|
+
}
|
|
84
|
+
export interface IToolbarConfig {
|
|
85
|
+
isEnabled: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface IRowExpansionConfig {
|
|
88
|
+
isEnabled: boolean;
|
|
89
|
+
template?: TemplateRef<unknown>;
|
|
90
|
+
}
|
|
91
|
+
export interface ITitleConfig {
|
|
92
|
+
isEnabled?: boolean;
|
|
93
|
+
title: string;
|
|
94
|
+
}
|
|
95
|
+
export interface ITableNgLazyLoading {
|
|
96
|
+
isEnabled: boolean;
|
|
97
|
+
totalRecords: number;
|
|
98
|
+
excelLazyLoadingConfig?: IExcelLazyLoadingConfig;
|
|
99
|
+
}
|
|
100
|
+
export interface IExcelLazyLoadingConfig<T = IRowData> {
|
|
101
|
+
callback: (filters: Record<string, any>) => Observable<ITableNgData<T>[]>;
|
|
102
|
+
}
|
|
103
|
+
export interface IScrollConfig {
|
|
104
|
+
isEnabled: boolean;
|
|
105
|
+
scrollHeight: string;
|
|
106
|
+
}
|
|
107
|
+
export interface IGlobalFilterConfig {
|
|
108
|
+
isEnabled?: boolean;
|
|
109
|
+
globalFilterFields?: string[];
|
|
110
|
+
advancedIdentifierFiltersConfig?: IAdvancedIdentifierFiltersConfig;
|
|
111
|
+
}
|
|
112
|
+
export interface IAdvancedIdentifierFiltersConfig {
|
|
113
|
+
isEnabled: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface ISelectionTableConfig {
|
|
116
|
+
isEnabled?: boolean;
|
|
117
|
+
showManagementConfig?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface IFilterConfigByKey {
|
|
120
|
+
isEnabled?: boolean;
|
|
121
|
+
primeNgColumnFilterConfig?: IPrimeNgColumnFilterConfig;
|
|
122
|
+
customColumnFilterConfig?: ICustomColumnFilterConfig;
|
|
123
|
+
}
|
|
124
|
+
export interface IPrimeNgColumnFilterConfig {
|
|
125
|
+
showMatchModes?: boolean;
|
|
126
|
+
showOperator?: boolean;
|
|
127
|
+
showAddButton?: boolean;
|
|
128
|
+
showApplyButton?: boolean;
|
|
129
|
+
showClearButton?: boolean;
|
|
130
|
+
matchMode?: TPrimeNgTextMatchMode;
|
|
131
|
+
type?: TPrimeNgColumnFilterType;
|
|
132
|
+
}
|
|
133
|
+
export interface ICustomColumnFilterConfig {
|
|
134
|
+
isEnabled: boolean;
|
|
135
|
+
mode?: TCustomColumnFilterModes;
|
|
136
|
+
multiselectConfig?: ICustomColumnMultiSelectConfig;
|
|
137
|
+
inlineControlConfig?: InlineControlConfig;
|
|
138
|
+
}
|
|
139
|
+
export interface ICustomColumnMultiSelectConfig {
|
|
140
|
+
label: string;
|
|
141
|
+
options: IPrimeNgSelection[];
|
|
142
|
+
}
|
|
143
|
+
export type TCustomColumnFilterModes = 'multiselect';
|
|
144
|
+
export interface IArrayStringFilterConfig {
|
|
145
|
+
filterValues: string[];
|
|
146
|
+
mode: 'contains' | 'exact';
|
|
147
|
+
}
|
|
148
|
+
export interface ILazyLoadResponse {
|
|
149
|
+
filters: Record<string, FilterMetadata | FilterMetadata[] | undefined>;
|
|
150
|
+
metaPagination: IMetaPagination;
|
|
151
|
+
}
|
|
152
|
+
export type TPrimeNgTextMatchMode = 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'arrayStringFilter' | 'arrayStringExactFilter';
|
|
153
|
+
export type TPrimeNgColumnFilterType = 'text' | 'numeric' | 'date' | 'boolean';
|
|
154
|
+
export interface IEditTableNgConfig<T = IRowData> {
|
|
155
|
+
isEnabled: boolean;
|
|
156
|
+
type: 'cell' | 'row';
|
|
157
|
+
inlineControls?: IInlineControls;
|
|
158
|
+
rowEditConfig?: IRowEditConfig<T>;
|
|
159
|
+
cellEditConfig?: IConfigEditCellAndRow<T>;
|
|
160
|
+
}
|
|
161
|
+
export interface IFooterConfig {
|
|
162
|
+
isEnabled: boolean;
|
|
163
|
+
footerRows: IFooterRow[][];
|
|
164
|
+
}
|
|
165
|
+
export interface IFooterRow {
|
|
166
|
+
value: string | number;
|
|
167
|
+
colSpan: number;
|
|
168
|
+
class: string;
|
|
169
|
+
pipeConfig?: IPipeConfig;
|
|
170
|
+
}
|
|
171
|
+
export interface IPipeConfig {
|
|
172
|
+
pipe: string;
|
|
173
|
+
args: any[];
|
|
174
|
+
}
|
|
175
|
+
export type IInlineControls = Record<string, InlineControlConfig>;
|
|
176
|
+
export interface IRowEditConfig<T = IRowData> extends IConfigEditCellAndRow<T> {
|
|
177
|
+
rowErrorConfig?: IRowErrorConfig;
|
|
178
|
+
}
|
|
179
|
+
export interface IConfigEditCellAndRow<T = IRowData> {
|
|
180
|
+
defaultTableNgData: ITableNgData<T>;
|
|
181
|
+
isDisabledAddButton?: boolean;
|
|
182
|
+
isDisabledDeleteButton?: boolean;
|
|
183
|
+
}
|
|
184
|
+
export interface IRowErrorConfig {
|
|
185
|
+
isEnabled: boolean;
|
|
186
|
+
fieldErrors: Record<string, Record<string, IErrorConfig>>;
|
|
187
|
+
}
|
|
188
|
+
export interface IErrorConfig {
|
|
189
|
+
fieldName: string;
|
|
190
|
+
message: string;
|
|
191
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Signal, WritableSignal } from '@angular/core';
|
|
2
|
+
import type { IEditTableNgConfig, IGlobalSearchForm } from '../interfaces';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import type { IControlConfig } from '../../../origin/form/interfaces';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TableNgEditService {
|
|
7
|
+
private editConfig;
|
|
8
|
+
private keysNames;
|
|
9
|
+
constructor();
|
|
10
|
+
setEditConfig(editConfig: IEditTableNgConfig | undefined): void;
|
|
11
|
+
setKeysNames(keysNames: Record<string, string>): void;
|
|
12
|
+
private fb;
|
|
13
|
+
controls: Signal<IControlConfig[]>;
|
|
14
|
+
searchFormGroup: WritableSignal<FormGroup<IGlobalSearchForm>>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableNgEditService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableNgEditService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TableNgGeneralService {
|
|
3
|
+
constructor();
|
|
4
|
+
readonly MOCK_EMPTY_DATE: Date;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableNgGeneralService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableNgGeneralService>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Signal, WritableSignal } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import type { SortEvent } from 'primeng/api';
|
|
4
|
+
import type { Table } from 'primeng/table';
|
|
5
|
+
import type { IControlConfig } from '../../../origin/form/interfaces';
|
|
6
|
+
import type { IButtonConfig } from '../../button-ng/interfaces';
|
|
7
|
+
import type { IGlobalSearchForm, ITableNgConfig, ITableNgData } from '../interfaces';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class TableNgService {
|
|
10
|
+
private readonly tableNgGeneralService;
|
|
11
|
+
private readonly filterService;
|
|
12
|
+
private initialValue;
|
|
13
|
+
constructor();
|
|
14
|
+
get MOCK_EMPTY_DATE(): Date;
|
|
15
|
+
setInitialValue(data: ITableNgData[]): void;
|
|
16
|
+
customSort(event: SortEvent): void;
|
|
17
|
+
private getFieldValue;
|
|
18
|
+
private compareValues;
|
|
19
|
+
private fb;
|
|
20
|
+
controls: Signal<IControlConfig[]>;
|
|
21
|
+
searchFormGroup: WritableSignal<FormGroup<IGlobalSearchForm>>;
|
|
22
|
+
values: Signal<Partial<{
|
|
23
|
+
search?: string | undefined;
|
|
24
|
+
}> | undefined>;
|
|
25
|
+
submitGlobalSearch(formGroup: FormGroup<IGlobalSearchForm>, dt: Table): void;
|
|
26
|
+
clearSearchInput(): void;
|
|
27
|
+
openModalManagementSelectedItems(selectedItems: WritableSignal<ITableNgData[]>, config?: ITableNgConfig): Promise<void>;
|
|
28
|
+
excelButton: Signal<IButtonConfig>;
|
|
29
|
+
pdfButton: Signal<IButtonConfig>;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableNgService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableNgService>;
|
|
32
|
+
}
|