@maro-tech/form 0.0.8 → 0.0.10
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 +1 -1
- package/fesm2022/maro-tech-form.mjs +441 -162
- package/fesm2022/maro-tech-form.mjs.map +1 -1
- package/package.json +2 -2
- package/types/maro-tech-form.d.ts +111 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maro-tech/form",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^21.2.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@angular/core": "^21.2.0",
|
|
9
9
|
"@angular/forms": "^21.2.0",
|
|
10
10
|
"@angular/router": "^21.2.0",
|
|
11
|
-
"@maro-tech/
|
|
11
|
+
"@maro-tech/core": "^0.0.2",
|
|
12
12
|
"lucide-angular": "^0.577.0",
|
|
13
13
|
"rxjs": "~7.8.0"
|
|
14
14
|
},
|
|
@@ -44,10 +44,11 @@ declare class UiSelectComponent implements ControlValueAccessor, OnChanges {
|
|
|
44
44
|
readonly closeIcon: lucide_angular.LucideIconData;
|
|
45
45
|
readonly chevronDownIcon: lucide_angular.LucideIconData;
|
|
46
46
|
readonly checkIcon: lucide_angular.LucideIconData;
|
|
47
|
-
private static openInstance;
|
|
48
47
|
private readonly cdr;
|
|
49
48
|
private readonly destroyRef;
|
|
50
49
|
private readonly http;
|
|
50
|
+
private readonly popupService;
|
|
51
|
+
private readonly closeActivePopup;
|
|
51
52
|
label?: string;
|
|
52
53
|
placeholder?: string;
|
|
53
54
|
name?: string;
|
|
@@ -71,10 +72,13 @@ declare class UiSelectComponent implements ControlValueAccessor, OnChanges {
|
|
|
71
72
|
panelClass: string;
|
|
72
73
|
valueChange: EventEmitter<UiSelectValue>;
|
|
73
74
|
searchChange: EventEmitter<string>;
|
|
75
|
+
readonly popupMinWidth = 300;
|
|
76
|
+
readonly popupViewportMargin = 16;
|
|
77
|
+
readonly popupOffset = 8;
|
|
74
78
|
dropdownTrigger?: ElementRef<HTMLButtonElement>;
|
|
75
79
|
readonly dropdownPositions: ConnectedPosition[];
|
|
76
80
|
isOpen: boolean;
|
|
77
|
-
|
|
81
|
+
popupWidth: number;
|
|
78
82
|
value: string | null;
|
|
79
83
|
multiValue: string[];
|
|
80
84
|
selectedOptions: UiSelectOption[];
|
|
@@ -95,6 +99,8 @@ declare class UiSelectComponent implements ControlValueAccessor, OnChanges {
|
|
|
95
99
|
selectOption(option: UiSelectOption, event: Event): void;
|
|
96
100
|
markTouched(): void;
|
|
97
101
|
closeDropdown(): void;
|
|
102
|
+
onDocumentClick(): void;
|
|
103
|
+
onEscape(): void;
|
|
98
104
|
get displayLabel(): string;
|
|
99
105
|
isSelected(option: UiSelectOption): boolean;
|
|
100
106
|
getOptionValue(option: UiSelectOption): string;
|
|
@@ -472,20 +478,31 @@ declare class UiColorInputComponent implements ControlValueAccessor {
|
|
|
472
478
|
static ɵcmp: i0.ɵɵComponentDeclaration<UiColorInputComponent, "forms-color-input", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, {}, never, never, true, never>;
|
|
473
479
|
}
|
|
474
480
|
|
|
475
|
-
type UiInputElement$
|
|
481
|
+
type UiInputElement$6 = 'input' | 'textarea';
|
|
482
|
+
interface CalendarDay$1 {
|
|
483
|
+
date: string;
|
|
484
|
+
day: number;
|
|
485
|
+
currentMonth: boolean;
|
|
486
|
+
}
|
|
487
|
+
type CalendarView$1 = 'days' | 'months' | 'years';
|
|
476
488
|
declare class UiDateInputComponent implements ControlValueAccessor {
|
|
477
489
|
private readonly cdr;
|
|
490
|
+
private readonly popupService;
|
|
491
|
+
private readonly closeActivePopup;
|
|
478
492
|
label?: string;
|
|
479
493
|
hint?: string;
|
|
480
494
|
placeholder?: string;
|
|
481
495
|
name?: string;
|
|
482
496
|
id?: string;
|
|
483
497
|
readonly type = "date";
|
|
484
|
-
readonly element: UiInputElement$
|
|
498
|
+
readonly element: UiInputElement$6;
|
|
499
|
+
readonly calendarIcon: lucide_angular.LucideIconData;
|
|
500
|
+
readonly previousMonthIcon: lucide_angular.LucideIconData;
|
|
501
|
+
readonly nextMonthIcon: lucide_angular.LucideIconData;
|
|
485
502
|
rows: number;
|
|
486
503
|
required: boolean;
|
|
487
504
|
fullWidth: boolean;
|
|
488
|
-
autocomplete
|
|
505
|
+
autocomplete: string;
|
|
489
506
|
readonly: boolean;
|
|
490
507
|
pattern?: string;
|
|
491
508
|
error?: string;
|
|
@@ -494,52 +511,129 @@ declare class UiDateInputComponent implements ControlValueAccessor {
|
|
|
494
511
|
value: string | number | null;
|
|
495
512
|
private static nextId;
|
|
496
513
|
private readonly generatedId;
|
|
514
|
+
visibleMonth: Date;
|
|
515
|
+
calendarView: CalendarView$1;
|
|
516
|
+
isCalendarOpen: boolean;
|
|
497
517
|
actionTriggered: EventEmitter<UiDynamicFormFieldAction>;
|
|
498
518
|
get controlId(): string;
|
|
499
519
|
private onChange;
|
|
500
520
|
onTouched: () => void;
|
|
501
521
|
writeValue(value: string | number | null): void;
|
|
522
|
+
get monthLabel(): string;
|
|
523
|
+
get monthName(): string;
|
|
524
|
+
get yearLabel(): number;
|
|
525
|
+
get monthOptions(): Array<{
|
|
526
|
+
value: number;
|
|
527
|
+
label: string;
|
|
528
|
+
}>;
|
|
529
|
+
get yearOptions(): number[];
|
|
530
|
+
get calendarDays(): CalendarDay$1[];
|
|
531
|
+
get displayValue(): string;
|
|
532
|
+
get selectedDate(): Date | null;
|
|
533
|
+
openCalendar(event: Event): void;
|
|
534
|
+
closeCalendar(): void;
|
|
535
|
+
showMonthPicker(event: Event): void;
|
|
536
|
+
showYearPicker(event: Event): void;
|
|
537
|
+
selectMonth(month: number, event: Event): void;
|
|
538
|
+
selectYear(year: number, event: Event): void;
|
|
539
|
+
changeMonth(offset: number, event: Event): void;
|
|
540
|
+
selectDate(dateValue: string, event: Event): void;
|
|
541
|
+
isSelected(dateValue: string): boolean;
|
|
542
|
+
isSelectedMonth(month: number): boolean;
|
|
543
|
+
isSelectedYear(year: number): boolean;
|
|
544
|
+
onDocumentClick(): void;
|
|
545
|
+
onEscape(): void;
|
|
502
546
|
registerOnChange(fn: (value: string | number | null) => void): void;
|
|
503
547
|
registerOnTouched(fn: () => void): void;
|
|
504
548
|
setDisabledState(isDisabled: boolean): void;
|
|
505
549
|
onValueChange(value: string): void;
|
|
550
|
+
allowDateKey(event: KeyboardEvent): void;
|
|
551
|
+
private applyDateMask;
|
|
506
552
|
triggerAction(action: UiDynamicFormFieldAction): void;
|
|
553
|
+
private startOfMonth;
|
|
554
|
+
private parseDate;
|
|
555
|
+
private parseInputDate;
|
|
556
|
+
private toDateValue;
|
|
507
557
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiDateInputComponent, never>;
|
|
508
558
|
static ɵcmp: i0.ɵɵComponentDeclaration<UiDateInputComponent, "forms-date-input", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "required": { "alias": "required"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "error": { "alias": "error"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "actionTriggered": "actionTriggered"; }, never, never, true, never>;
|
|
509
559
|
}
|
|
510
560
|
|
|
511
|
-
|
|
561
|
+
interface CalendarDay {
|
|
562
|
+
date: string;
|
|
563
|
+
day: number;
|
|
564
|
+
currentMonth: boolean;
|
|
565
|
+
}
|
|
566
|
+
type CalendarView = 'days' | 'months' | 'years';
|
|
512
567
|
declare class UiDatetimeInputComponent implements ControlValueAccessor {
|
|
513
568
|
private readonly cdr;
|
|
569
|
+
private readonly popupService;
|
|
570
|
+
private readonly closeActivePopup;
|
|
514
571
|
label?: string;
|
|
515
572
|
hint?: string;
|
|
516
573
|
placeholder?: string;
|
|
517
574
|
name?: string;
|
|
518
575
|
id?: string;
|
|
519
|
-
readonly type = "datetime-local";
|
|
520
|
-
readonly element: UiInputElement$6;
|
|
521
576
|
rows: number;
|
|
522
577
|
required: boolean;
|
|
523
578
|
fullWidth: boolean;
|
|
524
|
-
autocomplete
|
|
579
|
+
autocomplete: string;
|
|
525
580
|
readonly: boolean;
|
|
526
581
|
pattern?: string;
|
|
527
582
|
error?: string;
|
|
528
583
|
actions: UiDynamicFormFieldAction[];
|
|
584
|
+
readonly type = "datetime-local";
|
|
585
|
+
readonly calendarIcon: lucide_angular.LucideIconData;
|
|
586
|
+
readonly previousMonthIcon: lucide_angular.LucideIconData;
|
|
587
|
+
readonly nextMonthIcon: lucide_angular.LucideIconData;
|
|
529
588
|
disabled: boolean;
|
|
530
589
|
value: string | number | null;
|
|
590
|
+
isCalendarOpen: boolean;
|
|
591
|
+
calendarView: CalendarView;
|
|
592
|
+
visibleMonth: Date;
|
|
593
|
+
selectedHour: number;
|
|
594
|
+
selectedMinute: number;
|
|
531
595
|
private static nextId;
|
|
532
596
|
private readonly generatedId;
|
|
533
597
|
actionTriggered: EventEmitter<UiDynamicFormFieldAction>;
|
|
534
|
-
get controlId(): string;
|
|
535
598
|
private onChange;
|
|
536
599
|
onTouched: () => void;
|
|
600
|
+
get controlId(): string;
|
|
601
|
+
get selectedDate(): Date | null;
|
|
602
|
+
get displayValue(): string;
|
|
603
|
+
get monthName(): string;
|
|
604
|
+
get yearLabel(): number;
|
|
605
|
+
get monthOptions(): Array<{
|
|
606
|
+
value: number;
|
|
607
|
+
label: string;
|
|
608
|
+
}>;
|
|
609
|
+
get yearOptions(): number[];
|
|
610
|
+
get calendarDays(): CalendarDay[];
|
|
537
611
|
writeValue(value: string | number | null): void;
|
|
538
612
|
registerOnChange(fn: (value: string | number | null) => void): void;
|
|
539
613
|
registerOnTouched(fn: () => void): void;
|
|
540
|
-
setDisabledState(
|
|
541
|
-
|
|
614
|
+
setDisabledState(disabled: boolean): void;
|
|
615
|
+
openCalendar(event: Event): void;
|
|
616
|
+
closeCalendar(): void;
|
|
617
|
+
changeMonth(offset: number, event: Event): void;
|
|
618
|
+
showMonthPicker(event: Event): void;
|
|
619
|
+
showYearPicker(event: Event): void;
|
|
620
|
+
selectMonth(month: number, event: Event): void;
|
|
621
|
+
selectYear(year: number, event: Event): void;
|
|
622
|
+
selectDate(dateValue: string, event: Event): void;
|
|
623
|
+
setDateTime(dateValue: string, close?: boolean): void;
|
|
624
|
+
onTimeChange(): void;
|
|
625
|
+
onValueChange(input: string): void;
|
|
626
|
+
allowDateKey(event: KeyboardEvent): void;
|
|
627
|
+
private applyMask;
|
|
628
|
+
isSelected(date: string): boolean;
|
|
629
|
+
isSelectedMonth(month: number): boolean;
|
|
630
|
+
isSelectedYear(year: number): boolean;
|
|
631
|
+
onDocumentClick(): void;
|
|
632
|
+
onEscape(): void;
|
|
542
633
|
triggerAction(action: UiDynamicFormFieldAction): void;
|
|
634
|
+
private startOfMonth;
|
|
635
|
+
private parseDate;
|
|
636
|
+
private toDateValue;
|
|
543
637
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiDatetimeInputComponent, never>;
|
|
544
638
|
static ɵcmp: i0.ɵɵComponentDeclaration<UiDatetimeInputComponent, "forms-datetime-input", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "required": { "alias": "required"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "error": { "alias": "error"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "actionTriggered": "actionTriggered"; }, never, never, true, never>;
|
|
545
639
|
}
|
|
@@ -663,6 +757,7 @@ declare class UiNumberInputComponent implements ControlValueAccessor {
|
|
|
663
757
|
registerOnTouched(fn: () => void): void;
|
|
664
758
|
setDisabledState(isDisabled: boolean): void;
|
|
665
759
|
onValueChange(value: string): void;
|
|
760
|
+
preventWheelChange(event: WheelEvent): void;
|
|
666
761
|
triggerAction(action: UiDynamicFormFieldAction): void;
|
|
667
762
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiNumberInputComponent, never>;
|
|
668
763
|
static ɵcmp: i0.ɵɵComponentDeclaration<UiNumberInputComponent, "forms-number-input", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "required": { "alias": "required"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "error": { "alias": "error"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "actionTriggered": "actionTriggered"; }, never, never, true, never>;
|
|
@@ -677,6 +772,8 @@ declare class UiPasswordInputComponent implements ControlValueAccessor {
|
|
|
677
772
|
name?: string;
|
|
678
773
|
id?: string;
|
|
679
774
|
readonly type = "password";
|
|
775
|
+
readonly showPasswordIcon: lucide_angular.LucideIconData;
|
|
776
|
+
readonly hidePasswordIcon: lucide_angular.LucideIconData;
|
|
680
777
|
readonly element: UiInputElement$2;
|
|
681
778
|
rows: number;
|
|
682
779
|
required: boolean;
|
|
@@ -687,6 +784,7 @@ declare class UiPasswordInputComponent implements ControlValueAccessor {
|
|
|
687
784
|
error?: string;
|
|
688
785
|
actions: UiDynamicFormFieldAction[];
|
|
689
786
|
disabled: boolean;
|
|
787
|
+
isPasswordVisible: boolean;
|
|
690
788
|
value: string | number | null;
|
|
691
789
|
private static nextId;
|
|
692
790
|
private readonly generatedId;
|
|
@@ -699,6 +797,7 @@ declare class UiPasswordInputComponent implements ControlValueAccessor {
|
|
|
699
797
|
registerOnTouched(fn: () => void): void;
|
|
700
798
|
setDisabledState(isDisabled: boolean): void;
|
|
701
799
|
onValueChange(value: string): void;
|
|
800
|
+
togglePassword(event: Event): void;
|
|
702
801
|
triggerAction(action: UiDynamicFormFieldAction): void;
|
|
703
802
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiPasswordInputComponent, never>;
|
|
704
803
|
static ɵcmp: i0.ɵɵComponentDeclaration<UiPasswordInputComponent, "forms-password-input", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "required": { "alias": "required"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "error": { "alias": "error"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "actionTriggered": "actionTriggered"; }, never, never, true, never>;
|