@devjuliovilla/jv-ui 1.9.0 → 1.11.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 +266 -3
- package/fesm2022/devjuliovilla-jv-ui.mjs +1317 -208
- package/fesm2022/devjuliovilla-jv-ui.mjs.map +1 -1
- package/package.json +4 -1
- package/types/devjuliovilla-jv-ui.d.ts +193 -9
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devjuliovilla/jv-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Accessibility-first Angular component library — components, forms, data grids, dialogs, layout, services, and i18n infrastructure built with signals and standalone APIs.",
|
|
5
5
|
"author": "@devjuliovilla",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
7
10
|
"repository": {
|
|
8
11
|
"type": "git",
|
|
9
12
|
"url": "git+https://github.com/devjuliovilla/JV_UI.git"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, InjectionToken, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { TemplateRef, ElementRef, InjectionToken, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as _angular_forms from '@angular/forms';
|
|
4
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
5
|
import * as _devjuliovilla_jv_ui from '@devjuliovilla/jv-ui';
|
|
@@ -214,14 +214,32 @@ declare class JvBadgeComponent {
|
|
|
214
214
|
|
|
215
215
|
type JvTheme = 'light' | 'dark' | 'high-contrast';
|
|
216
216
|
type JvDensity = 'compact' | 'normal' | 'comfortable';
|
|
217
|
+
type JvMessagesLocale = 'es' | 'en';
|
|
218
|
+
interface JvUiFormats {
|
|
219
|
+
date: Intl.DateTimeFormatOptions;
|
|
220
|
+
time: Intl.DateTimeFormatOptions;
|
|
221
|
+
datetime: Intl.DateTimeFormatOptions;
|
|
222
|
+
integer: Intl.NumberFormatOptions;
|
|
223
|
+
number: Intl.NumberFormatOptions;
|
|
224
|
+
currency: Intl.NumberFormatOptions;
|
|
225
|
+
percent: Intl.NumberFormatOptions;
|
|
226
|
+
}
|
|
217
227
|
type JvToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
228
|
+
type JvTabTransition = 'none' | 'fade' | 'slide';
|
|
218
229
|
interface JvUiConfig {
|
|
219
230
|
theme: JvTheme;
|
|
220
231
|
density: JvDensity;
|
|
221
232
|
language: string;
|
|
222
|
-
locale
|
|
233
|
+
locale?: string;
|
|
234
|
+
messagesLocale: JvMessagesLocale;
|
|
235
|
+
formatLocale: string;
|
|
236
|
+
formats: JvUiFormats;
|
|
223
237
|
toastPosition: JvToastPosition;
|
|
238
|
+
tabsTransition: JvTabTransition;
|
|
224
239
|
}
|
|
240
|
+
type JvUiConfigInput = Omit<Partial<JvUiConfig>, 'formats'> & {
|
|
241
|
+
formats?: Partial<JvUiFormats>;
|
|
242
|
+
};
|
|
225
243
|
declare const JV_UI_DEFAULT_CONFIG: JvUiConfig;
|
|
226
244
|
|
|
227
245
|
interface JvToastItem {
|
|
@@ -398,6 +416,7 @@ declare class JvTranslationService {
|
|
|
398
416
|
readonly locale: _angular_core.WritableSignal<JvLocale>;
|
|
399
417
|
initialize(): void;
|
|
400
418
|
setLocale(locale: JvLocale): void;
|
|
419
|
+
setMessagesLocale(locale: JvLocale): void;
|
|
401
420
|
translate(key: string, params?: Record<string, string | number>): string;
|
|
402
421
|
private resolveLocale;
|
|
403
422
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvTranslationService, never>;
|
|
@@ -411,6 +430,7 @@ interface JvDatePickerCell {
|
|
|
411
430
|
}
|
|
412
431
|
declare class JvDatePickerComponent implements ControlValueAccessor {
|
|
413
432
|
readonly translation: JvTranslationService;
|
|
433
|
+
private readonly formatService;
|
|
414
434
|
private readonly announcementService;
|
|
415
435
|
private readonly instanceId;
|
|
416
436
|
private readonly calendarRootRef;
|
|
@@ -467,6 +487,51 @@ declare class JvDatePickerComponent implements ControlValueAccessor {
|
|
|
467
487
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvDatePickerComponent, "jv-date-picker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "dialogTitle": { "alias": "dialogTitle"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "describedBy": { "alias": "describedBy"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
468
488
|
}
|
|
469
489
|
|
|
490
|
+
interface JvFileInputRejection {
|
|
491
|
+
files: File[];
|
|
492
|
+
reason: 'accept' | 'maxFiles';
|
|
493
|
+
}
|
|
494
|
+
declare class JvFileInputComponent {
|
|
495
|
+
protected readonly translation: JvTranslationService;
|
|
496
|
+
private readonly instanceId;
|
|
497
|
+
private readonly nativeInputRef;
|
|
498
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
499
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
500
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
501
|
+
readonly describedBy: _angular_core.InputSignal<string>;
|
|
502
|
+
readonly inputId: _angular_core.InputSignal<string>;
|
|
503
|
+
readonly accept: _angular_core.InputSignal<string>;
|
|
504
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
505
|
+
readonly maxFiles: _angular_core.InputSignal<number>;
|
|
506
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
507
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
508
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
509
|
+
readonly filesInput: _angular_core.InputSignal<readonly File[] | null | undefined>;
|
|
510
|
+
readonly filesChange: _angular_core.OutputEmitterRef<File[]>;
|
|
511
|
+
readonly filesRejected: _angular_core.OutputEmitterRef<JvFileInputRejection>;
|
|
512
|
+
protected readonly dragActive: _angular_core.WritableSignal<boolean>;
|
|
513
|
+
protected readonly rejectionMessage: _angular_core.WritableSignal<string>;
|
|
514
|
+
private readonly internalFiles;
|
|
515
|
+
protected readonly currentFiles: _angular_core.Signal<File[]>;
|
|
516
|
+
protected readonly selectionSummary: _angular_core.Signal<string>;
|
|
517
|
+
protected readonly dropzoneAriaLabel: _angular_core.Signal<string>;
|
|
518
|
+
protected openFileDialog(): void;
|
|
519
|
+
protected handleDropzoneKeydown(event: KeyboardEvent): void;
|
|
520
|
+
protected onNativeInputChange(fileList: FileList | null): void;
|
|
521
|
+
protected onDragEnter(event: DragEvent): void;
|
|
522
|
+
protected onDragOver(event: DragEvent): void;
|
|
523
|
+
protected onDragLeave(event: DragEvent): void;
|
|
524
|
+
protected onDrop(event: DragEvent): void;
|
|
525
|
+
protected removeFile(index: number): void;
|
|
526
|
+
protected trackFile(index: number, file: File): string;
|
|
527
|
+
protected formatBytes(size: number): string;
|
|
528
|
+
private consumeFiles;
|
|
529
|
+
private updateFiles;
|
|
530
|
+
private matchesAccept;
|
|
531
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvFileInputComponent, never>;
|
|
532
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvFileInputComponent, "jv-file-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "describedBy": { "alias": "describedBy"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "filesInput": { "alias": "files"; "required": false; "isSignal": true; }; }, { "filesChange": "filesChange"; "filesRejected": "filesRejected"; }, never, never, true, never>;
|
|
533
|
+
}
|
|
534
|
+
|
|
470
535
|
declare class JvModalSelectorComponent implements ControlValueAccessor {
|
|
471
536
|
private readonly announcementService;
|
|
472
537
|
protected readonly translation: JvTranslationService;
|
|
@@ -612,6 +677,86 @@ declare class JvTextareaComponent implements ControlValueAccessor {
|
|
|
612
677
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvTextareaComponent, "jv-textarea", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "describedBy": { "alias": "describedBy"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
613
678
|
}
|
|
614
679
|
|
|
680
|
+
interface JvGalleryImage {
|
|
681
|
+
src: string;
|
|
682
|
+
alt: string;
|
|
683
|
+
thumbnail?: string;
|
|
684
|
+
}
|
|
685
|
+
interface JvGalleryAction {
|
|
686
|
+
id: string;
|
|
687
|
+
label: string;
|
|
688
|
+
icon?: string;
|
|
689
|
+
tone?: JvIntent;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
declare class JvImageGalleryComponent {
|
|
693
|
+
private readonly translation;
|
|
694
|
+
readonly images: _angular_core.InputSignal<JvGalleryImage[]>;
|
|
695
|
+
readonly stripHeightVh: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
696
|
+
readonly actions: _angular_core.InputSignal<JvGalleryAction[]>;
|
|
697
|
+
readonly imageClick: _angular_core.OutputEmitterRef<JvGalleryImage>;
|
|
698
|
+
readonly actionClick: _angular_core.OutputEmitterRef<{
|
|
699
|
+
actionId: string;
|
|
700
|
+
image: JvGalleryImage;
|
|
701
|
+
}>;
|
|
702
|
+
protected readonly strip: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
703
|
+
protected readonly dialogOpen: _angular_core.WritableSignal<boolean>;
|
|
704
|
+
protected readonly currentIndex: _angular_core.WritableSignal<number>;
|
|
705
|
+
protected readonly slideDirection: _angular_core.WritableSignal<"left" | "right" | null>;
|
|
706
|
+
protected readonly hasMultiple: _angular_core.Signal<boolean>;
|
|
707
|
+
protected readonly stripHeightStyle: _angular_core.Signal<string>;
|
|
708
|
+
protected readonly currentImage: _angular_core.Signal<JvGalleryImage>;
|
|
709
|
+
protected readonly dialogTitle: _angular_core.Signal<string>;
|
|
710
|
+
protected readonly translatedLabels: _angular_core.Signal<{
|
|
711
|
+
close: string;
|
|
712
|
+
prev: string;
|
|
713
|
+
next: string;
|
|
714
|
+
}>;
|
|
715
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
716
|
+
protected onWheel(event: WheelEvent): void;
|
|
717
|
+
protected openDialog(index: number): void;
|
|
718
|
+
protected closeDialog(): void;
|
|
719
|
+
protected previous(): void;
|
|
720
|
+
protected next(): void;
|
|
721
|
+
protected onAction(action: JvGalleryAction): void;
|
|
722
|
+
private clampStripHeight;
|
|
723
|
+
private showImage;
|
|
724
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvImageGalleryComponent, never>;
|
|
725
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvImageGalleryComponent, "jv-image-gallery", never, { "images": { "alias": "images"; "required": false; "isSignal": true; }; "stripHeightVh": { "alias": "stripHeightVh"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "imageClick": "imageClick"; "actionClick": "actionClick"; }, never, never, true, never>;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
interface JvSliderImage {
|
|
729
|
+
src: string;
|
|
730
|
+
alt: string;
|
|
731
|
+
description?: string;
|
|
732
|
+
thumbnail?: string;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
declare class JvImageSliderComponent {
|
|
736
|
+
private readonly thumbnailStripRef;
|
|
737
|
+
private readonly translation;
|
|
738
|
+
readonly images: _angular_core.InputSignal<JvSliderImage[]>;
|
|
739
|
+
readonly showThumbnails: _angular_core.InputSignal<boolean>;
|
|
740
|
+
readonly showDescription: _angular_core.InputSignal<boolean>;
|
|
741
|
+
readonly imageChange: _angular_core.OutputEmitterRef<number>;
|
|
742
|
+
protected readonly currentIndex: _angular_core.WritableSignal<number>;
|
|
743
|
+
protected readonly hasMultiple: _angular_core.Signal<boolean>;
|
|
744
|
+
protected readonly currentImage: _angular_core.Signal<JvSliderImage>;
|
|
745
|
+
protected readonly translatedAriaLabels: _angular_core.Signal<{
|
|
746
|
+
prev: string;
|
|
747
|
+
next: string;
|
|
748
|
+
thumbnailList: string;
|
|
749
|
+
}>;
|
|
750
|
+
constructor();
|
|
751
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
752
|
+
protected previous(): void;
|
|
753
|
+
protected next(): void;
|
|
754
|
+
protected goTo(index: number): void;
|
|
755
|
+
private scrollThumbnailIntoView;
|
|
756
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvImageSliderComponent, never>;
|
|
757
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvImageSliderComponent, "jv-image-slider", never, { "images": { "alias": "images"; "required": false; "isSignal": true; }; "showThumbnails": { "alias": "showThumbnails"; "required": false; "isSignal": true; }; "showDescription": { "alias": "showDescription"; "required": false; "isSignal": true; }; }, { "imageChange": "imageChange"; }, never, never, true, never>;
|
|
758
|
+
}
|
|
759
|
+
|
|
615
760
|
declare class JvIconComponent {
|
|
616
761
|
private readonly warnedNames;
|
|
617
762
|
readonly name: _angular_core.InputSignal<string>;
|
|
@@ -636,9 +781,9 @@ interface JvIconDefinition {
|
|
|
636
781
|
declare const JV_FALLBACK_ICON_NAME = "circle-alert";
|
|
637
782
|
declare const JV_LUCIDE_ICON_REGISTRY: Record<string, JvIconDefinition>;
|
|
638
783
|
|
|
639
|
-
declare const JV_UI_CONFIG: InjectionToken<
|
|
784
|
+
declare const JV_UI_CONFIG: InjectionToken<JvUiConfigInput[]>;
|
|
640
785
|
declare const JV_UI_CONFIG_DEFAULTS: InjectionToken<JvUiConfig>;
|
|
641
|
-
declare function provideJvUi(config?:
|
|
786
|
+
declare function provideJvUi(config?: JvUiConfigInput): _angular_core.EnvironmentProviders;
|
|
642
787
|
|
|
643
788
|
declare class JvDialogService {
|
|
644
789
|
private readonly announcementService;
|
|
@@ -827,6 +972,29 @@ declare class JvAnnouncementService {
|
|
|
827
972
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<JvAnnouncementService>;
|
|
828
973
|
}
|
|
829
974
|
|
|
975
|
+
type JvFormatKind = keyof JvUiFormats;
|
|
976
|
+
type JvFormatOverrides = Intl.DateTimeFormatOptions & Intl.NumberFormatOptions;
|
|
977
|
+
declare class JvFormatService {
|
|
978
|
+
private readonly config;
|
|
979
|
+
readonly formatLocale: _angular_core.WritableSignal<string>;
|
|
980
|
+
readonly formats: _angular_core.WritableSignal<JvUiFormats>;
|
|
981
|
+
readonly firstDayOfWeek: _angular_core.Signal<number>;
|
|
982
|
+
initialize(): void;
|
|
983
|
+
setFormatLocale(locale: string): void;
|
|
984
|
+
setFormats(formats: Partial<JvUiFormats>): void;
|
|
985
|
+
format(kind: JvFormatKind, value: unknown, overrides?: JvFormatOverrides): string;
|
|
986
|
+
toComparable(kind: JvFormatKind, value: unknown): string | number | boolean | null;
|
|
987
|
+
toDate(value: unknown): Date | null;
|
|
988
|
+
toNumber(value: unknown): number | null;
|
|
989
|
+
toSearchValue(kind: JvFormatKind, value: unknown): string;
|
|
990
|
+
private resolveFormats;
|
|
991
|
+
private resolveDateOptions;
|
|
992
|
+
private resolveNumberOptions;
|
|
993
|
+
private resolveFirstDayOfWeek;
|
|
994
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvFormatService, never>;
|
|
995
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<JvFormatService>;
|
|
996
|
+
}
|
|
997
|
+
|
|
830
998
|
declare class JvListComponent {
|
|
831
999
|
readonly role: _angular_core.InputSignal<"list" | "navigation">;
|
|
832
1000
|
readonly ariaRole: _angular_core.InputSignal<string | null>;
|
|
@@ -877,12 +1045,18 @@ declare class JvTabsComponent implements AfterViewInit {
|
|
|
877
1045
|
private readonly instanceId;
|
|
878
1046
|
private readonly panelTemplates;
|
|
879
1047
|
private readonly tabListRef;
|
|
1048
|
+
private readonly config;
|
|
880
1049
|
readonly tabs: _angular_core.InputSignal<JvTabItem[]>;
|
|
881
1050
|
readonly activeTabId: _angular_core.InputSignal<string | null>;
|
|
882
1051
|
readonly keepMounted: _angular_core.InputSignal<boolean>;
|
|
1052
|
+
readonly transition: _angular_core.InputSignal<JvTabTransition | null>;
|
|
883
1053
|
readonly activeTabChange: _angular_core.OutputEmitterRef<string>;
|
|
884
1054
|
protected readonly showScrollLeft: _angular_core.WritableSignal<boolean>;
|
|
885
1055
|
protected readonly showScrollRight: _angular_core.WritableSignal<boolean>;
|
|
1056
|
+
protected readonly slideDirection: _angular_core.WritableSignal<"left" | "right">;
|
|
1057
|
+
protected readonly outgoingPanelId: _angular_core.WritableSignal<string | null>;
|
|
1058
|
+
private readonly previousActiveTabId;
|
|
1059
|
+
protected readonly effectiveTransition: _angular_core.Signal<JvTabTransition>;
|
|
886
1060
|
protected readonly resolvedActiveTabId: _angular_core.Signal<string>;
|
|
887
1061
|
constructor();
|
|
888
1062
|
ngAfterViewInit(): void;
|
|
@@ -890,6 +1064,7 @@ declare class JvTabsComponent implements AfterViewInit {
|
|
|
890
1064
|
protected isActive(tabId: string): boolean;
|
|
891
1065
|
protected getTabIndex(tabId: string, disabled: boolean): 0 | -1;
|
|
892
1066
|
protected activateTab(tabId: string): void;
|
|
1067
|
+
protected handleTransitionEnd(event: TransitionEvent): void;
|
|
893
1068
|
protected handleKeydown(event: KeyboardEvent, currentTabId: string): void;
|
|
894
1069
|
protected scrollTabs(direction: -1 | 1): void;
|
|
895
1070
|
protected updateScrollControls(): void;
|
|
@@ -901,7 +1076,7 @@ declare class JvTabsComponent implements AfterViewInit {
|
|
|
901
1076
|
private focusTabButton;
|
|
902
1077
|
private getTabButton;
|
|
903
1078
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvTabsComponent, never>;
|
|
904
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvTabsComponent, "jv-tabs", never, { "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "activeTabId": { "alias": "activeTabId"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, { "activeTabChange": "activeTabChange"; }, ["panelTemplates"], never, true, never>;
|
|
1079
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvTabsComponent, "jv-tabs", never, { "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "activeTabId": { "alias": "activeTabId"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; }, { "activeTabChange": "activeTabChange"; }, ["panelTemplates"], never, true, never>;
|
|
905
1080
|
}
|
|
906
1081
|
|
|
907
1082
|
type JvTooltipPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -937,6 +1112,8 @@ interface JvGridSortState {
|
|
|
937
1112
|
columnKey: string;
|
|
938
1113
|
direction: JvGridSortDirection;
|
|
939
1114
|
}
|
|
1115
|
+
type JvGridColumnType = 'text' | 'integer' | 'number' | 'currency' | 'percent' | 'date' | 'time' | 'datetime' | 'boolean';
|
|
1116
|
+
type JvGridColumnFormatOptions = Intl.NumberFormatOptions & Intl.DateTimeFormatOptions;
|
|
940
1117
|
interface JvGridColumn<T = any> {
|
|
941
1118
|
key: keyof T | string;
|
|
942
1119
|
header: string;
|
|
@@ -951,7 +1128,8 @@ interface JvGridColumn<T = any> {
|
|
|
951
1128
|
minWidth?: string;
|
|
952
1129
|
maxWidth?: string;
|
|
953
1130
|
align?: 'start' | 'center' | 'end';
|
|
954
|
-
type?:
|
|
1131
|
+
type?: JvGridColumnType;
|
|
1132
|
+
formatOptions?: JvGridColumnFormatOptions;
|
|
955
1133
|
cellClass?: string;
|
|
956
1134
|
headerClass?: string;
|
|
957
1135
|
format?: (value: unknown, row: T) => string;
|
|
@@ -1027,6 +1205,7 @@ declare const JV_GRID_DEFAULT_OPTIONS: JvGridOptions;
|
|
|
1027
1205
|
|
|
1028
1206
|
declare class JvGridComponent<T = any> {
|
|
1029
1207
|
private readonly gridId;
|
|
1208
|
+
private readonly formatService;
|
|
1030
1209
|
private readonly translationService;
|
|
1031
1210
|
readonly data: _angular_core.InputSignal<T[]>;
|
|
1032
1211
|
readonly columns: _angular_core.InputSignal<JvGridColumn<T>[]>;
|
|
@@ -1121,7 +1300,12 @@ declare class JvGridComponent<T = any> {
|
|
|
1121
1300
|
protected getRawCellValue(row: T, col: JvGridColumn<T>): unknown;
|
|
1122
1301
|
protected getCellValue(row: T, col: JvGridColumn<T>): unknown;
|
|
1123
1302
|
protected getEditValue(row: T, col: JvGridColumn<T>): string;
|
|
1124
|
-
protected formatValue(value: unknown, col: JvGridColumn<T
|
|
1303
|
+
protected formatValue(value: unknown, col: JvGridColumn<T>, _row: T): string;
|
|
1304
|
+
protected getComparableValue(value: unknown, col: JvGridColumn<T>): string | number | boolean | null;
|
|
1305
|
+
protected getSearchValue(value: unknown, col: JvGridColumn<T>): string;
|
|
1306
|
+
protected getExportValue(value: unknown, col: JvGridColumn<T>): string;
|
|
1307
|
+
protected resolveColumnType(col: JvGridColumn<T>): JvGridColumnType;
|
|
1308
|
+
protected getFormatOverrides(col: JvGridColumn<T>): JvFormatOverrides | undefined;
|
|
1125
1309
|
protected getAriaSort(col: JvGridColumn<T>): 'ascending' | 'descending' | 'none' | null;
|
|
1126
1310
|
protected getSortLabel(col: JvGridColumn<T>): string;
|
|
1127
1311
|
protected getColumnWidth(col: JvGridColumn<T>): string | undefined;
|
|
@@ -1191,5 +1375,5 @@ declare class JvPaginationComponent {
|
|
|
1191
1375
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvPaginationComponent, "jv-pagination", never, { "totalItems": { "alias": "totalItems"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; "maxVisiblePages": { "alias": "maxVisiblePages"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
|
|
1192
1376
|
}
|
|
1193
1377
|
|
|
1194
|
-
export { EN, ES, JV_DEFAULT_LOCALE, JV_FALLBACK_ICON_NAME, JV_GRID_DEFAULT_OPTIONS, JV_LOCALE_DICTIONARIES, JV_LUCIDE_ICON_REGISTRY, JV_UI_CONFIG, JV_UI_CONFIG_DEFAULTS, JV_UI_DEFAULT_CONFIG, JvAccordionComponent, JvAccordionPanelDirective, JvAlertComponent, JvAnnouncementService, JvBadgeComponent, JvBreadcrumbComponent, JvButtonComponent, JvButtonGroupComponent, JvCardComponent, JvChangePasswordPageComponent, JvCheckboxComponent, JvCodeComponent, JvCollapsiblePanelComponent, JvConfirmDialogComponent, JvDashboardShellComponent, JvDatePickerComponent, JvDialogComponent, JvDialogService, JvDividerComponent, JvForgotPasswordPageComponent, JvFormContainerComponent, JvGridComponent, JvIconButtonComponent, JvIconComponent, JvInputComponent, JvListComponent, JvListItemComponent, JvLoaderComponent, JvLoaderService, JvLoginPageComponent, JvModalSelectorComponent, JvPageComponent, JvPaginationComponent, JvRadioComponent, JvSectionComponent, JvSelectComponent, JvSidebarComponent, JvSwitchComponent, JvTabPanelDirective, JvTabsComponent, JvTextareaComponent, JvThemeService, JvToastComponent, JvToastService, JvTooltipDirective, JvTopbarComponent, JvTranslationService, provideJvUi };
|
|
1195
|
-
export type { JvAccordionItem, JvActiveConfirmDialog, JvBreadcrumbItem, JvChangePasswordSubmitEvent, JvCodeFont, JvCollapsiblePanelVariant, JvConfirmOptions, JvDensity, JvForgotPasswordSubmitEvent, JvGridAction, JvGridColumn, JvGridColumnFilter, JvGridColumnReorderEvent, JvGridColumnResizeEvent, JvGridColumnWidth, JvGridFilterOperator, JvGridOptions, JvGridPageEvent, JvGridRowEditEvent, JvGridRowId, JvGridSortDirection, JvGridSortState, JvGridTrackBy, JvIconDefinition, JvIconElement, JvIntent, JvListItemModel, JvLoaderState, JvLocale, JvLoginSubmitEvent, JvModalSelectorOption, JvNavItem, JvPaginationEvent, JvSelectOption, JvTabItem, JvTheme, JvThemeOption, JvToastItem, JvToastPosition, JvToastViewport, JvTone, JvTooltipPosition, JvTopbarAction, JvUiConfig };
|
|
1378
|
+
export { EN, ES, JV_DEFAULT_LOCALE, JV_FALLBACK_ICON_NAME, JV_GRID_DEFAULT_OPTIONS, JV_LOCALE_DICTIONARIES, JV_LUCIDE_ICON_REGISTRY, JV_UI_CONFIG, JV_UI_CONFIG_DEFAULTS, JV_UI_DEFAULT_CONFIG, JvAccordionComponent, JvAccordionPanelDirective, JvAlertComponent, JvAnnouncementService, JvBadgeComponent, JvBreadcrumbComponent, JvButtonComponent, JvButtonGroupComponent, JvCardComponent, JvChangePasswordPageComponent, JvCheckboxComponent, JvCodeComponent, JvCollapsiblePanelComponent, JvConfirmDialogComponent, JvDashboardShellComponent, JvDatePickerComponent, JvDialogComponent, JvDialogService, JvDividerComponent, JvFileInputComponent, JvForgotPasswordPageComponent, JvFormContainerComponent, JvFormatService, JvGridComponent, JvIconButtonComponent, JvIconComponent, JvImageGalleryComponent, JvImageSliderComponent, JvInputComponent, JvListComponent, JvListItemComponent, JvLoaderComponent, JvLoaderService, JvLoginPageComponent, JvModalSelectorComponent, JvPageComponent, JvPaginationComponent, JvRadioComponent, JvSectionComponent, JvSelectComponent, JvSidebarComponent, JvSwitchComponent, JvTabPanelDirective, JvTabsComponent, JvTextareaComponent, JvThemeService, JvToastComponent, JvToastService, JvTooltipDirective, JvTopbarComponent, JvTranslationService, provideJvUi };
|
|
1379
|
+
export type { JvAccordionItem, JvActiveConfirmDialog, JvBreadcrumbItem, JvChangePasswordSubmitEvent, JvCodeFont, JvCollapsiblePanelVariant, JvConfirmOptions, JvDensity, JvFileInputRejection, JvForgotPasswordSubmitEvent, JvFormatKind, JvFormatOverrides, JvGalleryAction, JvGalleryImage, JvGridAction, JvGridColumn, JvGridColumnFilter, JvGridColumnFormatOptions, JvGridColumnReorderEvent, JvGridColumnResizeEvent, JvGridColumnType, JvGridColumnWidth, JvGridFilterOperator, JvGridOptions, JvGridPageEvent, JvGridRowEditEvent, JvGridRowId, JvGridSortDirection, JvGridSortState, JvGridTrackBy, JvIconDefinition, JvIconElement, JvIntent, JvListItemModel, JvLoaderState, JvLocale, JvLoginSubmitEvent, JvMessagesLocale, JvModalSelectorOption, JvNavItem, JvPaginationEvent, JvSelectOption, JvSliderImage, JvTabItem, JvTabTransition, JvTheme, JvThemeOption, JvToastItem, JvToastPosition, JvToastViewport, JvTone, JvTooltipPosition, JvTopbarAction, JvUiConfig, JvUiConfigInput, JvUiFormats };
|