@xosue-utils/inputs 0.1.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.
- package/README.md +169 -0
- package/config/inputs-config.d.ts +18 -0
- package/config/media-adapters.d.ts +24 -0
- package/fesm2022/xosue-utils-inputs.mjs +11332 -0
- package/fesm2022/xosue-utils-inputs.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/boolean-entry/boolean-entry.component.d.ts +35 -0
- package/lib/color-picker/color-picker.component.d.ts +49 -0
- package/lib/color-picker/services/color-picker-modal/color-picker-modal.service.d.ts +23 -0
- package/lib/counter-entry/counter-entry.component.d.ts +37 -0
- package/lib/date-picker/date-picker.component.d.ts +85 -0
- package/lib/date-picker/date-picker.types.d.ts +6 -0
- package/lib/date-picker/services/date-picker-modal/date-picker-modal.service.d.ts +45 -0
- package/lib/datetime-picker/datetime-picker.component.d.ts +93 -0
- package/lib/datetime-picker/services/datetime-picker-modal/datetime-picker-modal.service.d.ts +51 -0
- package/lib/decimal-entry/decimal-entry.component.d.ts +31 -0
- package/lib/email-entry/email-entry.component.d.ts +29 -0
- package/lib/index.d.ts +84 -0
- package/lib/input-overlay-coordinator.service.d.ts +16 -0
- package/lib/integer-entry/integer-entry.component.d.ts +30 -0
- package/lib/media-entry/media-entry.component.d.ts +163 -0
- package/lib/month-picker/month-picker.component.d.ts +78 -0
- package/lib/month-picker/services/month-picker-modal/month-picker-modal.service.d.ts +38 -0
- package/lib/multichoice-entry/multichoice-entry.component.d.ts +28 -0
- package/lib/multiselect-combobox/multiselect-combobox.component.d.ts +100 -0
- package/lib/multiselect-combobox/services/multiselect-combobox-modal/multiselect-combobox-modal.service.d.ts +30 -0
- package/lib/only-select/only-select.component.d.ts +90 -0
- package/lib/only-select/only-select.types.d.ts +9 -0
- package/lib/only-select/services/only-select-modal/only-select-modal.service.d.ts +29 -0
- package/lib/onlychoice-entry/onlychoice-entry.component.d.ts +28 -0
- package/lib/otp-entry/otp-entry.component.d.ts +35 -0
- package/lib/password-entry/password-entry.component.d.ts +34 -0
- package/lib/phone-entry/phone-display.util.d.ts +19 -0
- package/lib/phone-entry/phone-entry.component.d.ts +80 -0
- package/lib/phone-entry/phone-entry.types.d.ts +6 -0
- package/lib/phone-entry/services/phone-entry-modal/phone-entry-modal.service.d.ts +24 -0
- package/lib/price-entry/price-entry.component.d.ts +42 -0
- package/lib/range-entry/range-entry.component.d.ts +74 -0
- package/lib/rating-entry/rating-entry.component.d.ts +25 -0
- package/lib/rich-text-entry/caludy-image.node.d.ts +36 -0
- package/lib/rich-text-entry/lexical-editor-theme.d.ts +3 -0
- package/lib/rich-text-entry/rich-text-entry.component.d.ts +92 -0
- package/lib/search-entry/search-entry.component.d.ts +65 -0
- package/lib/search-entry/search-entry.types.d.ts +8 -0
- package/lib/search-entry/services/search-entry-modal/search-entry-modal.service.d.ts +29 -0
- package/lib/signature-entry/signature-entry.component.d.ts +47 -0
- package/lib/slider-entry/slider-entry.component.d.ts +69 -0
- package/lib/switch-entry/switch-entry.component.d.ts +66 -0
- package/lib/tags-entry/tags-entry.component.d.ts +35 -0
- package/lib/text-area-entry/text-area-entry.component.d.ts +27 -0
- package/lib/text-entry/text-entry.component.d.ts +38 -0
- package/lib/time-picker/services/time-picker-modal/time-picker-modal.service.d.ts +30 -0
- package/lib/time-picker/time-picker.component.d.ts +70 -0
- package/lib/url-entry/url-entry.component.d.ts +29 -0
- package/package.json +55 -0
- package/public-api.d.ts +8 -0
- package/vendor/context-menu-service/context-menu-service.component.d.ts +37 -0
- package/vendor/context-menu-service/context-menu.service.d.ts +63 -0
- package/vendor/drag-scroll.directive.d.ts +10 -0
- package/vendor/field-help-tooltip/field-help-tooltip.component.d.ts +9 -0
- package/vendor/file-size.pipe.d.ts +7 -0
- package/vendor/lucide-icon/lucide-icon.component.d.ts +26 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BooleanEntryComponent implements ControlValueAccessor {
|
|
4
|
+
private cdr;
|
|
5
|
+
private elementRef;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
opcional: boolean;
|
|
9
|
+
text: string;
|
|
10
|
+
/**
|
|
11
|
+
* Textos según el valor del control:
|
|
12
|
+
* - 1 elemento: mismo texto para true, false y null (default).
|
|
13
|
+
* - 2 elementos: [0] = true, [1] = false; null usa {@link description} (si vacío, {@link text}).
|
|
14
|
+
* - 3+ elementos: [0] = true, [1] = false, [2] = null/default.
|
|
15
|
+
*/
|
|
16
|
+
valuesOnValue: string[] | null | undefined;
|
|
17
|
+
get hostDisabledClass(): boolean;
|
|
18
|
+
set disabled(value: boolean);
|
|
19
|
+
value: boolean | null;
|
|
20
|
+
isDisabled: boolean;
|
|
21
|
+
private onChange;
|
|
22
|
+
private onTouched;
|
|
23
|
+
writeValue(value: boolean | null): void;
|
|
24
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
25
|
+
registerOnTouched(fn: () => void): void;
|
|
26
|
+
setDisabledState(isDisabled: boolean): void;
|
|
27
|
+
toggle(): void;
|
|
28
|
+
get iconName(): 'check' | 'x' | 'minus';
|
|
29
|
+
/** Texto junto al icono: {@link valuesOnValue} si aplica; si no, {@link text}. */
|
|
30
|
+
get displayValueText(): string;
|
|
31
|
+
onClick(): void;
|
|
32
|
+
manualClick(event?: MouseEvent): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanEntryComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanEntryComponent, "boolean-entry", never, { "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "text": { "alias": "text"; "required": false; }; "valuesOnValue": { "alias": "valuesOnValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ColorPickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
5
|
+
private cdr;
|
|
6
|
+
private elementRef;
|
|
7
|
+
private colorPickerModal;
|
|
8
|
+
private inputOverlayCoordinator;
|
|
9
|
+
private readonly overlayToken;
|
|
10
|
+
label: string;
|
|
11
|
+
description: string;
|
|
12
|
+
opcional: boolean;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
mode: 'hex' | 'rgb';
|
|
15
|
+
get hostDisabledClass(): boolean;
|
|
16
|
+
set disabled(value: boolean);
|
|
17
|
+
isDisabled: boolean;
|
|
18
|
+
isFocus: boolean;
|
|
19
|
+
textValue: string;
|
|
20
|
+
error: boolean;
|
|
21
|
+
showPicker: boolean;
|
|
22
|
+
/** Borrador dentro del modal; se confirma solo con Aceptar. */
|
|
23
|
+
private modalDraftValue;
|
|
24
|
+
private onChange;
|
|
25
|
+
private onTouched;
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
writeValue(value: string | null): void;
|
|
29
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
30
|
+
registerOnTouched(fn: () => void): void;
|
|
31
|
+
setDisabledState(isDisabled: boolean): void;
|
|
32
|
+
onFocus(): void;
|
|
33
|
+
onBlur(): void;
|
|
34
|
+
onInput(event: Event): void;
|
|
35
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
36
|
+
isValidColor(value: string): boolean;
|
|
37
|
+
togglePicker(): void;
|
|
38
|
+
private buildModalView;
|
|
39
|
+
private syncModalView;
|
|
40
|
+
private openModalPortal;
|
|
41
|
+
private closeModalPortal;
|
|
42
|
+
private onOverlayDismissedByCoordinator;
|
|
43
|
+
private onModalTextValueChange;
|
|
44
|
+
private onModalCancel;
|
|
45
|
+
private onModalAccept;
|
|
46
|
+
manualClick(event?: MouseEvent): void;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "color-picker", never, { "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface ColorPickerModalViewModel {
|
|
3
|
+
mode: 'hex' | 'rgb';
|
|
4
|
+
textValue: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ColorPickerModalHandlers {
|
|
7
|
+
onTextValueChange: (v: string) => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onAccept: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface ColorPickerModalSession {
|
|
12
|
+
view: ColorPickerModalViewModel;
|
|
13
|
+
handlers: ColorPickerModalHandlers;
|
|
14
|
+
}
|
|
15
|
+
export declare class ColorPickerModalService {
|
|
16
|
+
private readonly state;
|
|
17
|
+
readonly state$: import("rxjs").Observable<ColorPickerModalSession>;
|
|
18
|
+
open(session: ColorPickerModalSession): void;
|
|
19
|
+
patchView(patch: Partial<ColorPickerModalViewModel>): void;
|
|
20
|
+
close(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerModalService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ColorPickerModalService>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CounterEntryComponent implements ControlValueAccessor {
|
|
5
|
+
hostElement: HTMLElement;
|
|
6
|
+
private cdr;
|
|
7
|
+
private elementRef;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
opcional: boolean;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
max: number | null;
|
|
13
|
+
get hostDisabledClass(): boolean;
|
|
14
|
+
set disabled(value: boolean);
|
|
15
|
+
inputRef: ElementRef<HTMLInputElement>;
|
|
16
|
+
isDisabled: boolean;
|
|
17
|
+
isFocus: boolean;
|
|
18
|
+
textValue: string;
|
|
19
|
+
value: number | null;
|
|
20
|
+
private onChange;
|
|
21
|
+
private onTouched;
|
|
22
|
+
writeValue(val: number | null): void;
|
|
23
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
24
|
+
registerOnTouched(fn: () => void): void;
|
|
25
|
+
setDisabledState(isDisabled: boolean): void;
|
|
26
|
+
onFocus(): void;
|
|
27
|
+
onBlur(): void;
|
|
28
|
+
onInput(event: Event): void;
|
|
29
|
+
increment(): void;
|
|
30
|
+
decrement(): void;
|
|
31
|
+
private emitValue;
|
|
32
|
+
get isMax(): boolean;
|
|
33
|
+
get isMin(): boolean;
|
|
34
|
+
manualClick(event?: MouseEvent): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CounterEntryComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CounterEntryComponent, "counter-entry", never, { "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { CalendarDay } from './date-picker.types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DatePickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
6
|
+
private cdr;
|
|
7
|
+
private elementRef;
|
|
8
|
+
private datePickerModal;
|
|
9
|
+
private inputOverlayCoordinator;
|
|
10
|
+
private readonly overlayToken;
|
|
11
|
+
private static readonly modalRootSelector;
|
|
12
|
+
private get hostElement();
|
|
13
|
+
label: string;
|
|
14
|
+
opcional: boolean;
|
|
15
|
+
description: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
format: string;
|
|
18
|
+
get hostDisabledClass(): boolean;
|
|
19
|
+
set disabled(value: boolean);
|
|
20
|
+
selectionChange: EventEmitter<string>;
|
|
21
|
+
private onChange;
|
|
22
|
+
private onTouched;
|
|
23
|
+
writeValue(value: string | null): void;
|
|
24
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
25
|
+
registerOnTouched(fn: () => void): void;
|
|
26
|
+
setDisabledState(isDisabled: boolean): void;
|
|
27
|
+
selectedValue: string;
|
|
28
|
+
private previousSelectedValue;
|
|
29
|
+
selectedYear: number;
|
|
30
|
+
selectedMonth: number;
|
|
31
|
+
selectedDay: number | null;
|
|
32
|
+
currentYear: number;
|
|
33
|
+
isFocus: boolean;
|
|
34
|
+
isDisabled: boolean;
|
|
35
|
+
showPicker: boolean;
|
|
36
|
+
showMonths: boolean;
|
|
37
|
+
showYears: boolean;
|
|
38
|
+
years: number[];
|
|
39
|
+
months: number[];
|
|
40
|
+
calendarDays: CalendarDay[];
|
|
41
|
+
readonly MONTH_NAMES: string[];
|
|
42
|
+
ngOnInit(): void;
|
|
43
|
+
ngOnDestroy(): void;
|
|
44
|
+
private setFromDate;
|
|
45
|
+
private updateSelectedValue;
|
|
46
|
+
private parseDate;
|
|
47
|
+
private updateCalendar;
|
|
48
|
+
onIncrementMonth(): void;
|
|
49
|
+
onDecrementMonth(): void;
|
|
50
|
+
onIncrementYear(): void;
|
|
51
|
+
onDecrementYear(): void;
|
|
52
|
+
onClickDay(d: CalendarDay): void;
|
|
53
|
+
onSelectMonth(month: number): void;
|
|
54
|
+
onSelectYear(year: number): void;
|
|
55
|
+
scrollToCurrentMonth(): void;
|
|
56
|
+
scrollToCurrentYear(): void;
|
|
57
|
+
openMonths(): void;
|
|
58
|
+
openYears(): void;
|
|
59
|
+
toggleShowPicker(e: Event): void;
|
|
60
|
+
private applyCancelState;
|
|
61
|
+
onCancel(): void;
|
|
62
|
+
onAccept(): void;
|
|
63
|
+
onClear(): void;
|
|
64
|
+
private buildModalView;
|
|
65
|
+
private syncModalView;
|
|
66
|
+
private openModalPortal;
|
|
67
|
+
private closeModalPortal;
|
|
68
|
+
private onOverlayDismissedByCoordinator;
|
|
69
|
+
private closePicker;
|
|
70
|
+
private buildHandlers;
|
|
71
|
+
focus(): void;
|
|
72
|
+
defocus(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Simula un click en el input interno (si existe) para enfocarlo.
|
|
75
|
+
* @param event Evento del mouse (opcional).
|
|
76
|
+
*/
|
|
77
|
+
manualClick(event?: MouseEvent): void;
|
|
78
|
+
get selectedValueExtended(): string;
|
|
79
|
+
get formattedMonthAndYear(): string;
|
|
80
|
+
get formattedSelected(): string;
|
|
81
|
+
private generateYears;
|
|
82
|
+
private generateCalendarDays;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "date-picker", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "format": { "alias": "format"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CalendarDay } from '../../date-picker.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface DatePickerModalViewModel {
|
|
4
|
+
selectedValue: string;
|
|
5
|
+
years: number[];
|
|
6
|
+
months: number[];
|
|
7
|
+
calendarDays: CalendarDay[];
|
|
8
|
+
showYears: boolean;
|
|
9
|
+
showMonths: boolean;
|
|
10
|
+
selectedYear: number;
|
|
11
|
+
selectedMonth: number;
|
|
12
|
+
selectedDay: number | null;
|
|
13
|
+
MONTH_NAMES: readonly string[];
|
|
14
|
+
formattedMonthAndYear: string;
|
|
15
|
+
selectedValueExtended: string;
|
|
16
|
+
formattedSelected: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DatePickerModalHandlers {
|
|
19
|
+
toggleShowPicker: (e: Event) => void;
|
|
20
|
+
onSelectYear: (y: number, e: Event) => void;
|
|
21
|
+
onDecrementYear: (e: Event) => void;
|
|
22
|
+
onIncrementYear: (e: Event) => void;
|
|
23
|
+
onSelectMonth: (m: number, e: Event) => void;
|
|
24
|
+
openYears: (e: Event) => void;
|
|
25
|
+
openMonths: (e: Event) => void;
|
|
26
|
+
onDecrementMonth: (e: Event) => void;
|
|
27
|
+
onIncrementMonth: (e: Event) => void;
|
|
28
|
+
onClickDay: (d: CalendarDay, e: Event) => void;
|
|
29
|
+
onCancel: () => void;
|
|
30
|
+
onClear: () => void;
|
|
31
|
+
onAccept: () => void;
|
|
32
|
+
}
|
|
33
|
+
export interface DatePickerModalSession {
|
|
34
|
+
view: DatePickerModalViewModel;
|
|
35
|
+
handlers: DatePickerModalHandlers;
|
|
36
|
+
}
|
|
37
|
+
export declare class DatePickerModalService {
|
|
38
|
+
private readonly state;
|
|
39
|
+
readonly state$: import("rxjs").Observable<DatePickerModalSession>;
|
|
40
|
+
open(session: DatePickerModalSession): void;
|
|
41
|
+
patchView(patch: Partial<DatePickerModalViewModel>): void;
|
|
42
|
+
close(): void;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerModalService, never>;
|
|
44
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DatePickerModalService>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { CalendarDay } from '../date-picker/date-picker.types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DatetimePickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
6
|
+
private cdr;
|
|
7
|
+
private elementRef;
|
|
8
|
+
private datetimePickerModal;
|
|
9
|
+
private inputOverlayCoordinator;
|
|
10
|
+
private readonly overlayToken;
|
|
11
|
+
private static readonly modalRootSelector;
|
|
12
|
+
private get hostElement();
|
|
13
|
+
label: string;
|
|
14
|
+
opcional: boolean;
|
|
15
|
+
description: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
format: string;
|
|
18
|
+
get hostDisabledClass(): boolean;
|
|
19
|
+
set disabled(value: boolean);
|
|
20
|
+
selectionChange: EventEmitter<string>;
|
|
21
|
+
private onChange;
|
|
22
|
+
private onTouched;
|
|
23
|
+
writeValue(value: string | null): void;
|
|
24
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
25
|
+
registerOnTouched(fn: () => void): void;
|
|
26
|
+
setDisabledState(isDisabled: boolean): void;
|
|
27
|
+
selectedValue: string;
|
|
28
|
+
private previousSelectedValue;
|
|
29
|
+
selectedYear: number;
|
|
30
|
+
selectedMonth: number;
|
|
31
|
+
selectedDay: number | null;
|
|
32
|
+
selectedHour: number;
|
|
33
|
+
selectedMinute: number;
|
|
34
|
+
currentYear: number;
|
|
35
|
+
years: number[];
|
|
36
|
+
months: number[];
|
|
37
|
+
calendarDays: CalendarDay[];
|
|
38
|
+
readonly MONTH_NAMES: string[];
|
|
39
|
+
readonly HOURS: number[];
|
|
40
|
+
readonly MINUTES: number[];
|
|
41
|
+
isFocus: boolean;
|
|
42
|
+
isDisabled: boolean;
|
|
43
|
+
showPicker: boolean;
|
|
44
|
+
showMonths: boolean;
|
|
45
|
+
showYears: boolean;
|
|
46
|
+
ngOnInit(): void;
|
|
47
|
+
ngOnDestroy(): void;
|
|
48
|
+
private setFromDate;
|
|
49
|
+
private parseDate;
|
|
50
|
+
private updateSelectedValue;
|
|
51
|
+
private updateCalendar;
|
|
52
|
+
private generateYears;
|
|
53
|
+
private generateCalendarDays;
|
|
54
|
+
onClickDay(d: CalendarDay): void;
|
|
55
|
+
onSelectMonth(month: number): void;
|
|
56
|
+
onSelectYear(year: number): void;
|
|
57
|
+
onSelectHour(hour: number): void;
|
|
58
|
+
onSelectMinute(minute: number): void;
|
|
59
|
+
onIncrementMonth(): void;
|
|
60
|
+
onDecrementMonth(): void;
|
|
61
|
+
onIncrementYear(): void;
|
|
62
|
+
onDecrementYear(): void;
|
|
63
|
+
toggleShowPicker(e: Event): void;
|
|
64
|
+
private applyCancelState;
|
|
65
|
+
onCancel(): void;
|
|
66
|
+
onAccept(): void;
|
|
67
|
+
onClear(): void;
|
|
68
|
+
private buildModalView;
|
|
69
|
+
private syncModalView;
|
|
70
|
+
private openModalPortal;
|
|
71
|
+
private closeModalPortal;
|
|
72
|
+
private onOverlayDismissedByCoordinator;
|
|
73
|
+
private closePicker;
|
|
74
|
+
private buildHandlers;
|
|
75
|
+
scrollToCurrentHours(): void;
|
|
76
|
+
scrollToCurrentMinutes(): void;
|
|
77
|
+
openMonths(): void;
|
|
78
|
+
openYears(): void;
|
|
79
|
+
scrollToCurrentMonth(): void;
|
|
80
|
+
scrollToCurrentYear(): void;
|
|
81
|
+
focus(): void;
|
|
82
|
+
defocus(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Simula un click en el input interno (si existe) para enfocarlo.
|
|
85
|
+
* @param event Evento del mouse (opcional).
|
|
86
|
+
*/
|
|
87
|
+
manualClick(event?: MouseEvent): void;
|
|
88
|
+
get selectedDateExtended(): string;
|
|
89
|
+
get formattedMonthAndYear(): string;
|
|
90
|
+
get formattedSelected(): string;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimePickerComponent, never>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePickerComponent, "datetime-picker", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "format": { "alias": "format"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
93
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CalendarDay } from '../../../date-picker/date-picker.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface DatetimePickerModalViewModel {
|
|
4
|
+
selectedValue: string;
|
|
5
|
+
years: number[];
|
|
6
|
+
months: number[];
|
|
7
|
+
calendarDays: CalendarDay[];
|
|
8
|
+
showYears: boolean;
|
|
9
|
+
showMonths: boolean;
|
|
10
|
+
selectedYear: number;
|
|
11
|
+
selectedMonth: number;
|
|
12
|
+
selectedDay: number | null;
|
|
13
|
+
selectedHour: number;
|
|
14
|
+
selectedMinute: number;
|
|
15
|
+
MONTH_NAMES: readonly string[];
|
|
16
|
+
formattedMonthAndYear: string;
|
|
17
|
+
selectedDateExtended: string;
|
|
18
|
+
formattedSelected: string;
|
|
19
|
+
HOURS: readonly number[];
|
|
20
|
+
MINUTES: readonly number[];
|
|
21
|
+
}
|
|
22
|
+
export interface DatetimePickerModalHandlers {
|
|
23
|
+
toggleShowPicker: (e: Event) => void;
|
|
24
|
+
onSelectYear: (y: number, e: Event) => void;
|
|
25
|
+
onDecrementYear: (e: Event) => void;
|
|
26
|
+
onIncrementYear: (e: Event) => void;
|
|
27
|
+
onSelectMonth: (m: number, e: Event) => void;
|
|
28
|
+
openYears: (e: Event) => void;
|
|
29
|
+
openMonths: (e: Event) => void;
|
|
30
|
+
onDecrementMonth: (e: Event) => void;
|
|
31
|
+
onIncrementMonth: (e: Event) => void;
|
|
32
|
+
onClickDay: (d: CalendarDay, e: Event) => void;
|
|
33
|
+
onSelectHour: (h: number, e: Event) => void;
|
|
34
|
+
onSelectMinute: (m: number, e: Event) => void;
|
|
35
|
+
onCancel: () => void;
|
|
36
|
+
onClear: () => void;
|
|
37
|
+
onAccept: () => void;
|
|
38
|
+
}
|
|
39
|
+
export interface DatetimePickerModalSession {
|
|
40
|
+
view: DatetimePickerModalViewModel;
|
|
41
|
+
handlers: DatetimePickerModalHandlers;
|
|
42
|
+
}
|
|
43
|
+
export declare class DatetimePickerModalService {
|
|
44
|
+
private readonly state;
|
|
45
|
+
readonly state$: import("rxjs").Observable<DatetimePickerModalSession>;
|
|
46
|
+
open(session: DatetimePickerModalSession): void;
|
|
47
|
+
patchView(patch: Partial<DatetimePickerModalViewModel>): void;
|
|
48
|
+
close(): void;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimePickerModalService, never>;
|
|
50
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DatetimePickerModalService>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DecimalEntryComponent implements ControlValueAccessor {
|
|
5
|
+
private cdr;
|
|
6
|
+
private elementRef;
|
|
7
|
+
label: string;
|
|
8
|
+
opcional: boolean;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
description: string;
|
|
12
|
+
get hostDisabledClass(): boolean;
|
|
13
|
+
set disabled(value: boolean);
|
|
14
|
+
inputRef: ElementRef<HTMLInputElement>;
|
|
15
|
+
isDisabled: boolean;
|
|
16
|
+
isFocus: boolean;
|
|
17
|
+
textValue: string;
|
|
18
|
+
private onChange;
|
|
19
|
+
private onTouched;
|
|
20
|
+
writeValue(value: number | null): void;
|
|
21
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
22
|
+
registerOnTouched(fn: () => void): void;
|
|
23
|
+
setDisabledState(isDisabled: boolean): void;
|
|
24
|
+
onFocus(): void;
|
|
25
|
+
onBlur(): void;
|
|
26
|
+
onInput(event: Event): void;
|
|
27
|
+
private isValidInput;
|
|
28
|
+
manualClick(event?: MouseEvent): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalEntryComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DecimalEntryComponent, "decimal-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "decimals": { "alias": "decimals"; "required": false; }; "description": { "alias": "description"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class EmailEntryComponent implements ControlValueAccessor {
|
|
4
|
+
private cdr;
|
|
5
|
+
private elementRef;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
opcional: boolean;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
get hostDisabledClass(): boolean;
|
|
11
|
+
set disabled(value: boolean);
|
|
12
|
+
isDisabled: boolean;
|
|
13
|
+
isFocus: boolean;
|
|
14
|
+
textValue: string;
|
|
15
|
+
error: boolean;
|
|
16
|
+
private onChange;
|
|
17
|
+
private onTouched;
|
|
18
|
+
writeValue(value: string | null): void;
|
|
19
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
20
|
+
registerOnTouched(fn: () => void): void;
|
|
21
|
+
setDisabledState(isDisabled: boolean): void;
|
|
22
|
+
onFocus(): void;
|
|
23
|
+
onBlur(): void;
|
|
24
|
+
onInput(event: Event): void;
|
|
25
|
+
private isValidEmail;
|
|
26
|
+
manualClick(event?: MouseEvent): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailEntryComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmailEntryComponent, "email-entry", never, { "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel export para todos los componentes de inputs.
|
|
3
|
+
*
|
|
4
|
+
* Este archivo centraliza todas las exportaciones de los componentes de inputs,
|
|
5
|
+
* permitiendo importaciones más limpias y organizadas.
|
|
6
|
+
*
|
|
7
|
+
* Uso individual:
|
|
8
|
+
* import { TextEntryComponent, EmailEntryComponent, ... } from '@shared/components/inputs';
|
|
9
|
+
*
|
|
10
|
+
* Uso como array (recomendado):
|
|
11
|
+
* import { ALL_INPUT_COMPONENTS } from '@shared/components/inputs';
|
|
12
|
+
* imports: [ALL_INPUT_COMPONENTS]
|
|
13
|
+
*/
|
|
14
|
+
export { TextEntryComponent } from './text-entry/text-entry.component';
|
|
15
|
+
export { TextAreaEntryComponent } from './text-area-entry/text-area-entry.component';
|
|
16
|
+
export { EmailEntryComponent } from './email-entry/email-entry.component';
|
|
17
|
+
export { UrlEntryComponent } from './url-entry/url-entry.component';
|
|
18
|
+
export { PasswordEntryComponent } from './password-entry/password-entry.component';
|
|
19
|
+
export { SearchEntryComponent } from './search-entry/search-entry.component';
|
|
20
|
+
export { TagsEntryComponent } from './tags-entry/tags-entry.component';
|
|
21
|
+
export { IntegerEntryComponent } from './integer-entry/integer-entry.component';
|
|
22
|
+
export { DecimalEntryComponent } from './decimal-entry/decimal-entry.component';
|
|
23
|
+
export { CounterEntryComponent } from './counter-entry/counter-entry.component';
|
|
24
|
+
export { PriceEntryComponent } from './price-entry/price-entry.component';
|
|
25
|
+
export { RangeEntryComponent } from './range-entry/range-entry.component';
|
|
26
|
+
export { SliderEntryComponent } from './slider-entry/slider-entry.component';
|
|
27
|
+
export { RatingEntryComponent } from './rating-entry/rating-entry.component';
|
|
28
|
+
export { DatePickerComponent } from './date-picker/date-picker.component';
|
|
29
|
+
export { TimePickerComponent } from './time-picker/time-picker.component';
|
|
30
|
+
export { MonthPickerComponent } from './month-picker/month-picker.component';
|
|
31
|
+
export { DatetimePickerComponent } from './datetime-picker/datetime-picker.component';
|
|
32
|
+
export { OnlySelectComponent } from './only-select/only-select.component';
|
|
33
|
+
export { MultiselectComboboxComponent } from './multiselect-combobox/multiselect-combobox.component';
|
|
34
|
+
export { BooleanEntryComponent } from './boolean-entry/boolean-entry.component';
|
|
35
|
+
export { MultichoiceEntryComponent } from './multichoice-entry/multichoice-entry.component';
|
|
36
|
+
export { OnlychoiceEntryComponent } from './onlychoice-entry/onlychoice-entry.component';
|
|
37
|
+
export { SwitchEntryComponent } from './switch-entry/switch-entry.component';
|
|
38
|
+
export { PhoneEntryComponent } from './phone-entry/phone-entry.component';
|
|
39
|
+
export { ColorPickerComponent } from './color-picker/color-picker.component';
|
|
40
|
+
export { OtpEntryComponent } from './otp-entry/otp-entry.component';
|
|
41
|
+
export { RichTextEntryComponent } from './rich-text-entry/rich-text-entry.component';
|
|
42
|
+
export { SignatureEntryComponent } from './signature-entry/signature-entry.component';
|
|
43
|
+
export { MediaEntryComponent } from './media-entry/media-entry.component';
|
|
44
|
+
import { TextEntryComponent } from './text-entry/text-entry.component';
|
|
45
|
+
import { TextAreaEntryComponent } from './text-area-entry/text-area-entry.component';
|
|
46
|
+
import { EmailEntryComponent } from './email-entry/email-entry.component';
|
|
47
|
+
import { UrlEntryComponent } from './url-entry/url-entry.component';
|
|
48
|
+
import { PasswordEntryComponent } from './password-entry/password-entry.component';
|
|
49
|
+
import { SearchEntryComponent } from './search-entry/search-entry.component';
|
|
50
|
+
import { TagsEntryComponent } from './tags-entry/tags-entry.component';
|
|
51
|
+
import { IntegerEntryComponent } from './integer-entry/integer-entry.component';
|
|
52
|
+
import { DecimalEntryComponent } from './decimal-entry/decimal-entry.component';
|
|
53
|
+
import { CounterEntryComponent } from './counter-entry/counter-entry.component';
|
|
54
|
+
import { PriceEntryComponent } from './price-entry/price-entry.component';
|
|
55
|
+
import { RangeEntryComponent } from './range-entry/range-entry.component';
|
|
56
|
+
import { SliderEntryComponent } from './slider-entry/slider-entry.component';
|
|
57
|
+
import { RatingEntryComponent } from './rating-entry/rating-entry.component';
|
|
58
|
+
import { DatePickerComponent } from './date-picker/date-picker.component';
|
|
59
|
+
import { TimePickerComponent } from './time-picker/time-picker.component';
|
|
60
|
+
import { MonthPickerComponent } from './month-picker/month-picker.component';
|
|
61
|
+
import { DatetimePickerComponent } from './datetime-picker/datetime-picker.component';
|
|
62
|
+
import { OnlySelectComponent } from './only-select/only-select.component';
|
|
63
|
+
import { MultiselectComboboxComponent } from './multiselect-combobox/multiselect-combobox.component';
|
|
64
|
+
import { BooleanEntryComponent } from './boolean-entry/boolean-entry.component';
|
|
65
|
+
import { MultichoiceEntryComponent } from './multichoice-entry/multichoice-entry.component';
|
|
66
|
+
import { OnlychoiceEntryComponent } from './onlychoice-entry/onlychoice-entry.component';
|
|
67
|
+
import { SwitchEntryComponent } from './switch-entry/switch-entry.component';
|
|
68
|
+
import { PhoneEntryComponent } from './phone-entry/phone-entry.component';
|
|
69
|
+
import { ColorPickerComponent } from './color-picker/color-picker.component';
|
|
70
|
+
import { OtpEntryComponent } from './otp-entry/otp-entry.component';
|
|
71
|
+
import { RichTextEntryComponent } from './rich-text-entry/rich-text-entry.component';
|
|
72
|
+
import { SignatureEntryComponent } from './signature-entry/signature-entry.component';
|
|
73
|
+
import { MediaEntryComponent } from './media-entry/media-entry.component';
|
|
74
|
+
/**
|
|
75
|
+
* Array con todos los componentes de inputs completamente standalone.
|
|
76
|
+
*
|
|
77
|
+
* Uso:
|
|
78
|
+
* import { ALL_INPUT_COMPONENTS } from '@shared/components/inputs';
|
|
79
|
+
*
|
|
80
|
+
* @Component({
|
|
81
|
+
* imports: [...ALL_INPUT_COMPONENTS]
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
export declare const ALL_INPUT_COMPONENTS: (typeof TextEntryComponent | typeof TextAreaEntryComponent | typeof EmailEntryComponent | typeof UrlEntryComponent | typeof PasswordEntryComponent | typeof SearchEntryComponent | typeof TagsEntryComponent | typeof IntegerEntryComponent | typeof DecimalEntryComponent | typeof CounterEntryComponent | typeof PriceEntryComponent | typeof RangeEntryComponent | typeof SliderEntryComponent | typeof RatingEntryComponent | typeof DatePickerComponent | typeof TimePickerComponent | typeof MonthPickerComponent | typeof DatetimePickerComponent | typeof OnlySelectComponent | typeof MultiselectComboboxComponent | typeof BooleanEntryComponent | typeof MultichoiceEntryComponent | typeof OnlychoiceEntryComponent | typeof SwitchEntryComponent | typeof PhoneEntryComponent | typeof ColorPickerComponent | typeof OtpEntryComponent | typeof RichTextEntryComponent | typeof SignatureEntryComponent | typeof MediaEntryComponent)[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Garantiza que solo un overlay de inputs (select, date picker, etc.) esté activo.
|
|
4
|
+
* Cada overlay registra un token con `close`; al abrir otro, se invoca el anterior.
|
|
5
|
+
*/
|
|
6
|
+
export declare class InputOverlayCoordinatorService {
|
|
7
|
+
private active;
|
|
8
|
+
openExclusive(token: {
|
|
9
|
+
close: () => void;
|
|
10
|
+
}): void;
|
|
11
|
+
release(token: {
|
|
12
|
+
close: () => void;
|
|
13
|
+
}): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputOverlayCoordinatorService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InputOverlayCoordinatorService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class IntegerEntryComponent implements ControlValueAccessor {
|
|
5
|
+
private cdr;
|
|
6
|
+
private elementRef;
|
|
7
|
+
label: string;
|
|
8
|
+
opcional: boolean;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
description: string;
|
|
11
|
+
get hostDisabledClass(): boolean;
|
|
12
|
+
set disabled(value: boolean);
|
|
13
|
+
inputRef: ElementRef<HTMLInputElement>;
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
isFocus: boolean;
|
|
16
|
+
textValue: string;
|
|
17
|
+
private onChange;
|
|
18
|
+
private onTouched;
|
|
19
|
+
writeValue(value: number | null): void;
|
|
20
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
21
|
+
registerOnTouched(fn: () => void): void;
|
|
22
|
+
setDisabledState(isDisabled: boolean): void;
|
|
23
|
+
onFocus(): void;
|
|
24
|
+
onBlur(): void;
|
|
25
|
+
onInput(event: Event): void;
|
|
26
|
+
private isValidInput;
|
|
27
|
+
manualClick(event?: MouseEvent): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntegerEntryComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IntegerEntryComponent, "integer-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "description": { "alias": "description"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|