@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.
Files changed (62) hide show
  1. package/README.md +169 -0
  2. package/config/inputs-config.d.ts +18 -0
  3. package/config/media-adapters.d.ts +24 -0
  4. package/fesm2022/xosue-utils-inputs.mjs +11332 -0
  5. package/fesm2022/xosue-utils-inputs.mjs.map +1 -0
  6. package/index.d.ts +5 -0
  7. package/lib/boolean-entry/boolean-entry.component.d.ts +35 -0
  8. package/lib/color-picker/color-picker.component.d.ts +49 -0
  9. package/lib/color-picker/services/color-picker-modal/color-picker-modal.service.d.ts +23 -0
  10. package/lib/counter-entry/counter-entry.component.d.ts +37 -0
  11. package/lib/date-picker/date-picker.component.d.ts +85 -0
  12. package/lib/date-picker/date-picker.types.d.ts +6 -0
  13. package/lib/date-picker/services/date-picker-modal/date-picker-modal.service.d.ts +45 -0
  14. package/lib/datetime-picker/datetime-picker.component.d.ts +93 -0
  15. package/lib/datetime-picker/services/datetime-picker-modal/datetime-picker-modal.service.d.ts +51 -0
  16. package/lib/decimal-entry/decimal-entry.component.d.ts +31 -0
  17. package/lib/email-entry/email-entry.component.d.ts +29 -0
  18. package/lib/index.d.ts +84 -0
  19. package/lib/input-overlay-coordinator.service.d.ts +16 -0
  20. package/lib/integer-entry/integer-entry.component.d.ts +30 -0
  21. package/lib/media-entry/media-entry.component.d.ts +163 -0
  22. package/lib/month-picker/month-picker.component.d.ts +78 -0
  23. package/lib/month-picker/services/month-picker-modal/month-picker-modal.service.d.ts +38 -0
  24. package/lib/multichoice-entry/multichoice-entry.component.d.ts +28 -0
  25. package/lib/multiselect-combobox/multiselect-combobox.component.d.ts +100 -0
  26. package/lib/multiselect-combobox/services/multiselect-combobox-modal/multiselect-combobox-modal.service.d.ts +30 -0
  27. package/lib/only-select/only-select.component.d.ts +90 -0
  28. package/lib/only-select/only-select.types.d.ts +9 -0
  29. package/lib/only-select/services/only-select-modal/only-select-modal.service.d.ts +29 -0
  30. package/lib/onlychoice-entry/onlychoice-entry.component.d.ts +28 -0
  31. package/lib/otp-entry/otp-entry.component.d.ts +35 -0
  32. package/lib/password-entry/password-entry.component.d.ts +34 -0
  33. package/lib/phone-entry/phone-display.util.d.ts +19 -0
  34. package/lib/phone-entry/phone-entry.component.d.ts +80 -0
  35. package/lib/phone-entry/phone-entry.types.d.ts +6 -0
  36. package/lib/phone-entry/services/phone-entry-modal/phone-entry-modal.service.d.ts +24 -0
  37. package/lib/price-entry/price-entry.component.d.ts +42 -0
  38. package/lib/range-entry/range-entry.component.d.ts +74 -0
  39. package/lib/rating-entry/rating-entry.component.d.ts +25 -0
  40. package/lib/rich-text-entry/caludy-image.node.d.ts +36 -0
  41. package/lib/rich-text-entry/lexical-editor-theme.d.ts +3 -0
  42. package/lib/rich-text-entry/rich-text-entry.component.d.ts +92 -0
  43. package/lib/search-entry/search-entry.component.d.ts +65 -0
  44. package/lib/search-entry/search-entry.types.d.ts +8 -0
  45. package/lib/search-entry/services/search-entry-modal/search-entry-modal.service.d.ts +29 -0
  46. package/lib/signature-entry/signature-entry.component.d.ts +47 -0
  47. package/lib/slider-entry/slider-entry.component.d.ts +69 -0
  48. package/lib/switch-entry/switch-entry.component.d.ts +66 -0
  49. package/lib/tags-entry/tags-entry.component.d.ts +35 -0
  50. package/lib/text-area-entry/text-area-entry.component.d.ts +27 -0
  51. package/lib/text-entry/text-entry.component.d.ts +38 -0
  52. package/lib/time-picker/services/time-picker-modal/time-picker-modal.service.d.ts +30 -0
  53. package/lib/time-picker/time-picker.component.d.ts +70 -0
  54. package/lib/url-entry/url-entry.component.d.ts +29 -0
  55. package/package.json +55 -0
  56. package/public-api.d.ts +8 -0
  57. package/vendor/context-menu-service/context-menu-service.component.d.ts +37 -0
  58. package/vendor/context-menu-service/context-menu.service.d.ts +63 -0
  59. package/vendor/drag-scroll.directive.d.ts +10 -0
  60. package/vendor/field-help-tooltip/field-help-tooltip.component.d.ts +9 -0
  61. package/vendor/file-size.pipe.d.ts +7 -0
  62. package/vendor/lucide-icon/lucide-icon.component.d.ts +26 -0
@@ -0,0 +1,34 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PasswordEntryComponent implements ControlValueAccessor, OnInit {
5
+ hostElement: HTMLElement;
6
+ private cdr;
7
+ private elementRef;
8
+ label: string;
9
+ description: string;
10
+ opcional: boolean;
11
+ placeholder: string;
12
+ toggleVisibility: boolean;
13
+ get hostDisabledClass(): boolean;
14
+ set disabled(value: boolean);
15
+ value: string | null;
16
+ isDisabled: boolean;
17
+ isFocus: boolean;
18
+ isPasswordVisible: boolean;
19
+ ngOnInit(): void;
20
+ private onChange;
21
+ onTouched: () => void;
22
+ writeValue(value: string | null): void;
23
+ registerOnChange(fn: (value: string | null) => void): void;
24
+ registerOnTouched(fn: () => void): void;
25
+ setDisabledState(isDisabled: boolean): void;
26
+ onInput(event: Event): void;
27
+ onFocus(event: FocusEvent): void;
28
+ onBlur(event: FocusEvent): void;
29
+ private emitValue;
30
+ togglePasswordVisibility(event?: Event): void;
31
+ manualClick(event?: MouseEvent): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<PasswordEntryComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<PasswordEntryComponent, "password-entry", never, { "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "toggleVisibility": { "alias": "toggleVisibility"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
34
+ }
@@ -0,0 +1,19 @@
1
+ import { PhoneCountry } from './phone-entry.types';
2
+ /** Normaliza prefijo a formato +NNN */
3
+ export declare function normalizePhonePrefix(prefix: string | null | undefined): string;
4
+ /**
5
+ * Quita el código de país del número si ya está incluido (solo para mostrar o editar en el input).
6
+ * Ej: prefix +51, number +51932454853 → 932454853
7
+ */
8
+ export declare function stripCountryCodeFromNumber(number: string | null | undefined, prefix: string | null | undefined): string;
9
+ /** Formato legible: "+51 932454853" sin duplicar el prefijo */
10
+ export declare function formatPhoneForDisplay(prefix: string | null | undefined, number: string | null | undefined, fallback?: string): string;
11
+ /**
12
+ * Detecta código de país en un número pegado o completo.
13
+ * Usa la lista de países (prefijo más largo primero).
14
+ */
15
+ export declare function parseEmbeddedCountryCode(raw: string, countries: readonly PhoneCountry[]): {
16
+ prefix: string;
17
+ localNumber: string;
18
+ country: PhoneCountry | null;
19
+ };
@@ -0,0 +1,80 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { PhoneCountry } from './phone-entry.types';
4
+ import * as i0 from "@angular/core";
5
+ export type { PhoneCountry } from './phone-entry.types';
6
+ export { formatPhoneForDisplay, stripCountryCodeFromNumber, } from './phone-display.util';
7
+ export declare class PhoneEntryComponent implements ControlValueAccessor, OnInit, OnDestroy {
8
+ private cdr;
9
+ private elementRef;
10
+ private phoneEntryModal;
11
+ private inputOverlayCoordinator;
12
+ private readonly overlayToken;
13
+ label: string;
14
+ opcional: boolean;
15
+ description: string;
16
+ placeholder: string;
17
+ defaultCountry: string;
18
+ get hostDisabledClass(): boolean;
19
+ set disabled(value: boolean);
20
+ isDisabled: boolean;
21
+ isFocus: boolean;
22
+ textValue: string;
23
+ error: boolean;
24
+ countries: PhoneCountry[];
25
+ selectedCountry: PhoneCountry;
26
+ showPicker: boolean;
27
+ searchQuery: string;
28
+ filteredCountries: PhoneCountry[];
29
+ customPrefix: string;
30
+ isEditingPrefix: boolean;
31
+ constructor();
32
+ ngOnInit(): void;
33
+ ngOnDestroy(): void;
34
+ private onChange;
35
+ private onTouched;
36
+ writeValue(value: [string, string] | string | null): void;
37
+ /** Separa prefijo y número local si el valor guardado incluye el código duplicado */
38
+ private resolveLocalNumber;
39
+ private applyPrefixSelection;
40
+ registerOnChange(fn: (value: [string, string] | null) => void): void;
41
+ registerOnTouched(fn: () => void): void;
42
+ setDisabledState(isDisabled: boolean): void;
43
+ onFocus(): void;
44
+ onBlur(): void;
45
+ onInput(event: Event): void;
46
+ onKeyDown(event: KeyboardEvent): void;
47
+ onPaste(event: ClipboardEvent): void;
48
+ isValidPhone(value: string): boolean;
49
+ togglePicker(): void;
50
+ private buildModalView;
51
+ private syncModalView;
52
+ private openModalPortal;
53
+ private closeModalPortal;
54
+ private onOverlayDismissedByCoordinator;
55
+ selectCountry(country: PhoneCountry): void;
56
+ onSearchChange(e: Event): void;
57
+ /**
58
+ * Aplica la búsqueda y reordena los países por relevancia.
59
+ * @param query Texto de búsqueda.
60
+ */
61
+ private applySearch;
62
+ /**
63
+ * Calcula el score de relevancia de un país basado en la búsqueda.
64
+ * @param country País a evaluar.
65
+ * @param query Query de búsqueda normalizado.
66
+ * @returns Score de relevancia (mayor = más relevante).
67
+ */
68
+ private calculateRelevanceScore;
69
+ onPrefixFocus(): void;
70
+ onPrefixBlur(): void;
71
+ onPrefixInput(e: Event): void;
72
+ onPrefixKeyDown(e: KeyboardEvent): void;
73
+ /**
74
+ * Valida y establece el prefijo personalizado.
75
+ */
76
+ private validateAndSetCustomPrefix;
77
+ manualClick(event?: MouseEvent): void;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<PhoneEntryComponent, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<PhoneEntryComponent, "phone-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultCountry": { "alias": "defaultCountry"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
80
+ }
@@ -0,0 +1,6 @@
1
+ export interface PhoneCountry {
2
+ img?: string;
3
+ code: string;
4
+ prefix: string;
5
+ name: string;
6
+ }
@@ -0,0 +1,24 @@
1
+ import { PhoneCountry } from '../../phone-entry.types';
2
+ import * as i0 from "@angular/core";
3
+ export interface PhoneEntryModalViewModel {
4
+ searchQuery: string;
5
+ filteredCountries: PhoneCountry[];
6
+ }
7
+ export interface PhoneEntryModalHandlers {
8
+ onSearchInput: (e: Event) => void;
9
+ onBackdropClick: (e: Event) => void;
10
+ onSelectCountry: (country: PhoneCountry, e: Event) => void;
11
+ }
12
+ export interface PhoneEntryModalSession {
13
+ view: PhoneEntryModalViewModel;
14
+ handlers: PhoneEntryModalHandlers;
15
+ }
16
+ export declare class PhoneEntryModalService {
17
+ private readonly state;
18
+ readonly state$: import("rxjs").Observable<PhoneEntryModalSession>;
19
+ open(session: PhoneEntryModalSession): void;
20
+ patchView(patch: Partial<PhoneEntryModalViewModel>): void;
21
+ close(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<PhoneEntryModalService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<PhoneEntryModalService>;
24
+ }
@@ -0,0 +1,42 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PriceEntryComponent implements ControlValueAccessor, OnInit {
5
+ private cdr;
6
+ private elementRef;
7
+ label: string;
8
+ opcional: boolean;
9
+ description: string;
10
+ placeholder: string;
11
+ symbol: string;
12
+ decimals: number;
13
+ decimalSeparator: string;
14
+ thousandSeparator: string;
15
+ get hostDisabledClass(): boolean;
16
+ set disabled(value: boolean);
17
+ isDisabled: boolean;
18
+ isFocus: boolean;
19
+ internalValue: string | null;
20
+ ansInternalValue: string | null;
21
+ realValue: number | null;
22
+ repValue: string | null;
23
+ ngOnInit(): void;
24
+ private onChange;
25
+ onTouched: () => void;
26
+ writeValue(value: number | null | undefined): void;
27
+ registerOnChange(fn: (value: number | null) => void): void;
28
+ registerOnTouched(fn: () => void): void;
29
+ setDisabledState(isDisabled: boolean): void;
30
+ private emitValue;
31
+ handleKeyDown(event: KeyboardEvent): void;
32
+ private forceCursorToEnd;
33
+ onFocus(): void;
34
+ onBlur(): void;
35
+ private updateView;
36
+ private formatToInternal;
37
+ private parseInternalToDecimal;
38
+ private formatNumber;
39
+ manualClick(event?: MouseEvent): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<PriceEntryComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<PriceEntryComponent, "price-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "symbol": { "alias": "symbol"; "required": false; }; "decimals": { "alias": "decimals"; "required": false; }; "decimalSeparator": { "alias": "decimalSeparator"; "required": false; }; "thousandSeparator": { "alias": "thousandSeparator"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
42
+ }
@@ -0,0 +1,74 @@
1
+ import { ElementRef, OnInit, OnDestroy } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RangeEntryComponent implements ControlValueAccessor, OnInit, OnDestroy {
5
+ private cdr;
6
+ private elementRef;
7
+ private platformId;
8
+ trackWrapper: ElementRef<HTMLDivElement>;
9
+ trackRef: ElementRef<HTMLDivElement>;
10
+ label: string;
11
+ opcional: boolean;
12
+ description: string;
13
+ min: number;
14
+ max: number;
15
+ gap: number;
16
+ decimal: boolean;
17
+ get hostDisabledClass(): boolean;
18
+ set disabled(value: boolean);
19
+ minValue: number;
20
+ maxValue: number;
21
+ isDisabled: boolean;
22
+ isDraggingMin: boolean;
23
+ isDraggingMax: boolean;
24
+ activeThumb: 'min' | 'max' | null;
25
+ private documentMouseMoveHandler;
26
+ private documentMouseUpHandler;
27
+ private documentTouchMoveHandler;
28
+ private documentTouchEndHandler;
29
+ private onChange;
30
+ private onTouched;
31
+ writeValue(value: [number, number] | null): void;
32
+ registerOnChange(fn: (value: [number, number]) => void): void;
33
+ registerOnTouched(fn: () => void): void;
34
+ setDisabledState(disabled: boolean): void;
35
+ private emit;
36
+ onMinChange(event: Event): void;
37
+ onMaxChange(event: Event): void;
38
+ onSliderRelease(): void;
39
+ onValueKeydown(event: KeyboardEvent): void;
40
+ /**
41
+ * Normaliza un valor según el modo decimal.
42
+ * - Si decimal es true: redondea a 2 decimales (o formatea enteros con .00)
43
+ * - Si decimal es false: convierte a entero
44
+ * @param value - Valor a normalizar
45
+ * @returns Valor normalizado
46
+ */
47
+ private normalizeValue;
48
+ /**
49
+ * Retorna el step según el modo decimal.
50
+ * - decimal true: 0.01 (2 decimales)
51
+ * - decimal false: 1 (enteros)
52
+ */
53
+ get step(): number;
54
+ get leftPercent(): number;
55
+ get rightPercent(): number;
56
+ get rangeStyle(): {
57
+ [key: string]: string;
58
+ };
59
+ ngOnInit(): void;
60
+ ngOnDestroy(): void;
61
+ onThumbMouseDown(thumb: 'min' | 'max', event: MouseEvent): void;
62
+ onThumbTouchStart(thumb: 'min' | 'max', event: TouchEvent): void;
63
+ onTrackClick(event: MouseEvent): void;
64
+ onTrackTouchStart(event: TouchEvent): void;
65
+ private handleDocumentMouseMove;
66
+ private handleDocumentMouseUp;
67
+ private handleDocumentTouchMove;
68
+ private handleDocumentTouchEnd;
69
+ private touchToMouseEvent;
70
+ private updateValueFromEvent;
71
+ manualClick(event?: MouseEvent): void;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<RangeEntryComponent, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<RangeEntryComponent, "range-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "decimal": { "alias": "decimal"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
74
+ }
@@ -0,0 +1,25 @@
1
+ import { ControlValueAccessor } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RatingEntryComponent implements ControlValueAccessor {
4
+ private cdr;
5
+ private elementRef;
6
+ label: string;
7
+ opcional: boolean;
8
+ description: string;
9
+ maxStars: number;
10
+ get hostDisabledClass(): boolean;
11
+ set disabled(value: boolean);
12
+ value: number | null;
13
+ isDisabled: boolean;
14
+ get stars(): number[];
15
+ private onChange;
16
+ private onTouched;
17
+ writeValue(value: number | null): void;
18
+ registerOnChange(fn: (value: number | null) => void): void;
19
+ registerOnTouched(fn: () => void): void;
20
+ setDisabledState(disabled: boolean): void;
21
+ select(value: number): void;
22
+ manualClick(event?: MouseEvent): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<RatingEntryComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<RatingEntryComponent, "rating-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "maxStars": { "alias": "maxStars"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
25
+ }
@@ -0,0 +1,36 @@
1
+ import type { DOMConversionMap, DOMExportOutput, LexicalNode, NodeKey, SerializedLexicalNode } from 'lexical';
2
+ import { DecoratorNode } from 'lexical';
3
+ export type CaludyImagePayload = Readonly<{
4
+ src: string;
5
+ altText?: string;
6
+ width?: number;
7
+ height?: number;
8
+ }>;
9
+ export type SerializedCaludyImageNode = SerializedLexicalNode & {
10
+ type: 'caludy-image';
11
+ version: 1;
12
+ src: string;
13
+ altText: string;
14
+ width?: number;
15
+ height?: number;
16
+ };
17
+ export declare class CaludyImageNode extends DecoratorNode<null> {
18
+ __src: string;
19
+ __altText: string;
20
+ __width?: number;
21
+ __height?: number;
22
+ static getType(): string;
23
+ static clone(node: CaludyImageNode): CaludyImageNode;
24
+ constructor(payload: CaludyImagePayload, key?: NodeKey);
25
+ createDOM(): HTMLElement;
26
+ updateDOM(prevNode: CaludyImageNode, dom: HTMLElement): boolean;
27
+ exportDOM(): DOMExportOutput;
28
+ static importDOM(): DOMConversionMap | null;
29
+ exportJSON(): SerializedCaludyImageNode;
30
+ static importJSON(serialized: SerializedCaludyImageNode): CaludyImageNode;
31
+ isInline(): boolean;
32
+ decorate(): null;
33
+ setDimensions(width?: number, height?: number): void;
34
+ }
35
+ export declare function $createCaludyImageNode(payload: CaludyImagePayload): CaludyImageNode;
36
+ export declare function $isCaludyImageNode(node: LexicalNode | null | undefined): boolean;
@@ -0,0 +1,3 @@
1
+ import type { EditorThemeClasses } from 'lexical';
2
+ /** Theme compartido: clases estables para estilar nodos generados por Lexical. */
3
+ export declare const RICH_TEXT_LEXICAL_THEME: EditorThemeClasses;
@@ -0,0 +1,92 @@
1
+ import { OnInit, OnDestroy, ElementRef, AfterViewInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RichTextEntryComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
5
+ private cdr;
6
+ private elementRef;
7
+ private platformId;
8
+ label: string;
9
+ opcional: boolean;
10
+ description: string;
11
+ placeholder: string;
12
+ get hostDisabledClass(): boolean;
13
+ set disabled(value: boolean);
14
+ /** Solo true en el navegador; en SSR no se instancia el editor. */
15
+ readonly isBrowser: boolean;
16
+ contentEditable?: ElementRef<HTMLElement>;
17
+ imageInput?: ElementRef<HTMLInputElement>;
18
+ imageOverlay?: ElementRef<HTMLElement>;
19
+ tableOverlay?: ElementRef<HTMLElement>;
20
+ private editor;
21
+ private lastEmittedHtml;
22
+ private pendingHtmlWrite;
23
+ private lastIncomingWriteHtml;
24
+ showPlaceholder: boolean;
25
+ isDisabled: boolean;
26
+ canUndo: boolean;
27
+ canRedo: boolean;
28
+ isBold: boolean;
29
+ isItalic: boolean;
30
+ isUnderline: boolean;
31
+ isStrikethrough: boolean;
32
+ isAlignLeft: boolean;
33
+ isAlignCenter: boolean;
34
+ isAlignRight: boolean;
35
+ isAlignJustify: boolean;
36
+ isH1: boolean;
37
+ isLink: boolean;
38
+ isOnImage: boolean;
39
+ isInTable: boolean;
40
+ imageOverlayVisible: boolean;
41
+ imageOverlayTop: number;
42
+ imageOverlayLeft: number;
43
+ imageOverlayKey: string | null;
44
+ private imageResizeActive;
45
+ private imageResizeStartX;
46
+ private imageResizeStartW;
47
+ private imageResizeStartH;
48
+ private imageResizeAspect;
49
+ tableOverlayVisible: boolean;
50
+ tableOverlayTop: number;
51
+ tableOverlayLeft: number;
52
+ tableOverlayMaxHeight: number;
53
+ private tableOverlayAnchorX;
54
+ private tableOverlayAnchorY;
55
+ private lastTableRect;
56
+ private onChange;
57
+ private onTouched;
58
+ private imageResizeCleanup;
59
+ private overlayCleanup;
60
+ ngOnInit(): void;
61
+ ngAfterViewInit(): void;
62
+ ngOnDestroy(): void;
63
+ onEditorBlur(event: FocusEvent): void;
64
+ onToolbarMouseDown(event: MouseEvent): void;
65
+ onInput(): void;
66
+ manualClick(event?: MouseEvent): void;
67
+ private applyEditorInteractionStyles;
68
+ writeValue(value: string | null): void;
69
+ registerOnChange(fn: (value: string | null) => void): void;
70
+ registerOnTouched(fn: () => void): void;
71
+ setDisabledState(disabled: boolean): void;
72
+ exec(action: 'undo' | 'redo' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'h1' | 'link' | 'image' | 'table' | 'image-move-up' | 'image-move-down' | 'table-row-after' | 'table-row-before' | 'table-col-after' | 'table-col-before' | 'table-row-delete' | 'table-col-delete' | 'table-delete' | 'ol' | 'ul' | 'align-left' | 'align-center' | 'align-right' | 'align-justify'): void;
73
+ private moveSelectedImage;
74
+ private setupImageResizeHandles;
75
+ private setupOverlays;
76
+ onImageResizeStart(event: PointerEvent): void;
77
+ private hideImageOverlay;
78
+ private hideTableOverlay;
79
+ private toggleLink;
80
+ private pickImage;
81
+ onImageSelected(event: Event): Promise<void>;
82
+ private compressAndResizeImageToDataUrl;
83
+ private readImageBitmap;
84
+ private blobToDataUrl;
85
+ private toggleH1;
86
+ private setEditorHtml;
87
+ private emitChangeFromEditor;
88
+ private updatePlaceholderFlag;
89
+ private updateToolbarState;
90
+ static ɵfac: i0.ɵɵFactoryDeclaration<RichTextEntryComponent, never>;
91
+ static ɵcmp: i0.ɵɵComponentDeclaration<RichTextEntryComponent, "rich-text-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
92
+ }
@@ -0,0 +1,65 @@
1
+ import { ChangeDetectorRef, OnInit, OnChanges, OnDestroy, SimpleChanges, ElementRef } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { Router } from '@angular/router';
4
+ import { HttpClient } from '@angular/common/http';
5
+ import { SearchOption } from './search-entry.types';
6
+ import * as i0 from "@angular/core";
7
+ export type { SearchOption } from './search-entry.types';
8
+ export declare class SearchEntryComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy {
9
+ private http;
10
+ private elementRef;
11
+ private cdr;
12
+ private router;
13
+ private readonly inputsConfig;
14
+ label: string;
15
+ placeholder: string;
16
+ opcional: boolean;
17
+ options: SearchOption[];
18
+ api?: string;
19
+ search: boolean;
20
+ minSearch: number;
21
+ get hostDisabledClass(): boolean;
22
+ set disabled(value: boolean);
23
+ isOpen: boolean;
24
+ isFocus: boolean;
25
+ isDisabled: boolean;
26
+ filteredOptions: SearchOption[];
27
+ internalOptions: SearchOption[];
28
+ searchText: string;
29
+ loading: boolean;
30
+ error: boolean;
31
+ private pendingValue;
32
+ private isExternalUpdate;
33
+ private search$;
34
+ private sub?;
35
+ private searchEntryModal;
36
+ private inputOverlayCoordinator;
37
+ private readonly overlayToken;
38
+ constructor(http: HttpClient, elementRef: ElementRef, cdr: ChangeDetectorRef, router: Router);
39
+ ngOnInit(): void;
40
+ ngOnChanges(changes: SimpleChanges): void;
41
+ ngOnDestroy(): void;
42
+ private buildModalView;
43
+ private syncModalView;
44
+ private openModalPortal;
45
+ private closeModalPortal;
46
+ private onOverlayDismissedByCoordinator;
47
+ writeValue(value: string | null): void;
48
+ registerOnChange(fn: (value: string | null) => void): void;
49
+ registerOnTouched(fn: () => void): void;
50
+ setDisabledState(isDisabled: boolean): void;
51
+ onSearchChange(e: Event): void;
52
+ private filterLocalOptions;
53
+ private fetchFromApi;
54
+ private loadLocalOptions;
55
+ toggleOpenOptions(e: Event): void;
56
+ clear(): void;
57
+ focus(): void;
58
+ blur(): void;
59
+ shouldShowSearchInput(): boolean;
60
+ onChange: (value: string | null) => void;
61
+ onTouched: () => void;
62
+ onEnter(event: Event): void;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchEntryComponent, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<SearchEntryComponent, "search-entry", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "options": { "alias": "options"; "required": false; }; "api": { "alias": "api"; "required": false; }; "search": { "alias": "search"; "required": false; }; "minSearch": { "alias": "minSearch"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
65
+ }
@@ -0,0 +1,8 @@
1
+ export interface SearchOption {
2
+ image?: string;
3
+ color?: string;
4
+ to: string;
5
+ name: string;
6
+ description?: string;
7
+ param?: string;
8
+ }
@@ -0,0 +1,29 @@
1
+ import { SearchOption } from '../../search-entry.types';
2
+ import * as i0 from "@angular/core";
3
+ export interface SearchEntryModalViewModel {
4
+ searchText: string;
5
+ placeholder: string;
6
+ filteredOptions: SearchOption[];
7
+ loading: boolean;
8
+ error: boolean;
9
+ shouldShowSearch: boolean;
10
+ }
11
+ export interface SearchEntryModalHandlers {
12
+ onSearchInput: (e: Event) => void;
13
+ onBackdropClick: (e: Event) => void;
14
+ onCloseIconClick: (e: Event) => void;
15
+ onResultNavigate: () => void;
16
+ }
17
+ export interface SearchEntryModalSession {
18
+ view: SearchEntryModalViewModel;
19
+ handlers: SearchEntryModalHandlers;
20
+ }
21
+ export declare class SearchEntryModalService {
22
+ private readonly state;
23
+ readonly state$: import("rxjs").Observable<SearchEntryModalSession>;
24
+ open(session: SearchEntryModalSession): void;
25
+ patchView(patch: Partial<SearchEntryModalViewModel>): void;
26
+ close(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchEntryModalService, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<SearchEntryModalService>;
29
+ }
@@ -0,0 +1,47 @@
1
+ import { ElementRef, AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SignatureEntryComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {
5
+ private cdr;
6
+ private elementRef;
7
+ private platformId;
8
+ label: string;
9
+ opcional: boolean;
10
+ description: string;
11
+ clearText: string;
12
+ quality: number;
13
+ exportWidth: number;
14
+ get hostDisabledClass(): boolean;
15
+ set disabled(value: boolean);
16
+ isDisabled: boolean;
17
+ canvasRef: ElementRef<HTMLCanvasElement>;
18
+ private ctx;
19
+ private drawing;
20
+ private dpr;
21
+ private lastPos;
22
+ private lastTimestamp;
23
+ private onChange;
24
+ private onTouched;
25
+ private listeners;
26
+ ngAfterViewInit(): void;
27
+ ngOnDestroy(): void;
28
+ private initCanvas;
29
+ writeValue(value: string | null): void;
30
+ registerOnChange(fn: (value: string | null) => void): void;
31
+ registerOnTouched(fn: () => void): void;
32
+ setDisabledState(isDisabled: boolean): void;
33
+ private emitValue;
34
+ /**
35
+ * Comprime y redimensiona la imagen del canvas y emite el valor base64.
36
+ * El canvas se mantiene en alta calidad para dibujar.
37
+ * Al exportar: redimensiona a exportWidth de ancho (manteniendo relación de aspecto) y aplica compresión JPEG.
38
+ * Captura TODO el contenido del canvas original sin recortar.
39
+ */
40
+ private compressAndEmit;
41
+ /** Solo vista: usado por `writeValue(null)` sin notificar al modelo (el `FormControl` ya está vacío). */
42
+ private paintBlankCanvas;
43
+ clearCanvas(): void;
44
+ private registerEvents;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignatureEntryComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignatureEntryComponent, "signature-entry", never, { "label": { "alias": "label"; "required": false; }; "opcional": { "alias": "opcional"; "required": false; }; "description": { "alias": "description"; "required": false; }; "clearText": { "alias": "clearText"; "required": false; }; "quality": { "alias": "quality"; "required": false; }; "exportWidth": { "alias": "exportWidth"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
47
+ }