@devjuliovilla/jv-ui 1.9.0 → 1.10.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 +4 -3
- package/fesm2022/devjuliovilla-jv-ui.mjs +667 -181
- package/fesm2022/devjuliovilla-jv-ui.mjs.map +1 -1
- package/package.json +4 -1
- package/types/devjuliovilla-jv-ui.d.ts +102 -7
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devjuliovilla/jv-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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"
|
|
@@ -214,14 +214,30 @@ 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';
|
|
218
228
|
interface JvUiConfig {
|
|
219
229
|
theme: JvTheme;
|
|
220
230
|
density: JvDensity;
|
|
221
231
|
language: string;
|
|
222
|
-
locale
|
|
232
|
+
locale?: string;
|
|
233
|
+
messagesLocale: JvMessagesLocale;
|
|
234
|
+
formatLocale: string;
|
|
235
|
+
formats: JvUiFormats;
|
|
223
236
|
toastPosition: JvToastPosition;
|
|
224
237
|
}
|
|
238
|
+
type JvUiConfigInput = Omit<Partial<JvUiConfig>, 'formats'> & {
|
|
239
|
+
formats?: Partial<JvUiFormats>;
|
|
240
|
+
};
|
|
225
241
|
declare const JV_UI_DEFAULT_CONFIG: JvUiConfig;
|
|
226
242
|
|
|
227
243
|
interface JvToastItem {
|
|
@@ -398,6 +414,7 @@ declare class JvTranslationService {
|
|
|
398
414
|
readonly locale: _angular_core.WritableSignal<JvLocale>;
|
|
399
415
|
initialize(): void;
|
|
400
416
|
setLocale(locale: JvLocale): void;
|
|
417
|
+
setMessagesLocale(locale: JvLocale): void;
|
|
401
418
|
translate(key: string, params?: Record<string, string | number>): string;
|
|
402
419
|
private resolveLocale;
|
|
403
420
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvTranslationService, never>;
|
|
@@ -411,6 +428,7 @@ interface JvDatePickerCell {
|
|
|
411
428
|
}
|
|
412
429
|
declare class JvDatePickerComponent implements ControlValueAccessor {
|
|
413
430
|
readonly translation: JvTranslationService;
|
|
431
|
+
private readonly formatService;
|
|
414
432
|
private readonly announcementService;
|
|
415
433
|
private readonly instanceId;
|
|
416
434
|
private readonly calendarRootRef;
|
|
@@ -467,6 +485,51 @@ declare class JvDatePickerComponent implements ControlValueAccessor {
|
|
|
467
485
|
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
486
|
}
|
|
469
487
|
|
|
488
|
+
interface JvFileInputRejection {
|
|
489
|
+
files: File[];
|
|
490
|
+
reason: 'accept' | 'maxFiles';
|
|
491
|
+
}
|
|
492
|
+
declare class JvFileInputComponent {
|
|
493
|
+
protected readonly translation: JvTranslationService;
|
|
494
|
+
private readonly instanceId;
|
|
495
|
+
private readonly nativeInputRef;
|
|
496
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
497
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
498
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
499
|
+
readonly describedBy: _angular_core.InputSignal<string>;
|
|
500
|
+
readonly inputId: _angular_core.InputSignal<string>;
|
|
501
|
+
readonly accept: _angular_core.InputSignal<string>;
|
|
502
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
503
|
+
readonly maxFiles: _angular_core.InputSignal<number>;
|
|
504
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
505
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
506
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
507
|
+
readonly filesInput: _angular_core.InputSignal<readonly File[] | null | undefined>;
|
|
508
|
+
readonly filesChange: _angular_core.OutputEmitterRef<File[]>;
|
|
509
|
+
readonly filesRejected: _angular_core.OutputEmitterRef<JvFileInputRejection>;
|
|
510
|
+
protected readonly dragActive: _angular_core.WritableSignal<boolean>;
|
|
511
|
+
protected readonly rejectionMessage: _angular_core.WritableSignal<string>;
|
|
512
|
+
private readonly internalFiles;
|
|
513
|
+
protected readonly currentFiles: _angular_core.Signal<File[]>;
|
|
514
|
+
protected readonly selectionSummary: _angular_core.Signal<string>;
|
|
515
|
+
protected readonly dropzoneAriaLabel: _angular_core.Signal<string>;
|
|
516
|
+
protected openFileDialog(): void;
|
|
517
|
+
protected handleDropzoneKeydown(event: KeyboardEvent): void;
|
|
518
|
+
protected onNativeInputChange(fileList: FileList | null): void;
|
|
519
|
+
protected onDragEnter(event: DragEvent): void;
|
|
520
|
+
protected onDragOver(event: DragEvent): void;
|
|
521
|
+
protected onDragLeave(event: DragEvent): void;
|
|
522
|
+
protected onDrop(event: DragEvent): void;
|
|
523
|
+
protected removeFile(index: number): void;
|
|
524
|
+
protected trackFile(index: number, file: File): string;
|
|
525
|
+
protected formatBytes(size: number): string;
|
|
526
|
+
private consumeFiles;
|
|
527
|
+
private updateFiles;
|
|
528
|
+
private matchesAccept;
|
|
529
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvFileInputComponent, never>;
|
|
530
|
+
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>;
|
|
531
|
+
}
|
|
532
|
+
|
|
470
533
|
declare class JvModalSelectorComponent implements ControlValueAccessor {
|
|
471
534
|
private readonly announcementService;
|
|
472
535
|
protected readonly translation: JvTranslationService;
|
|
@@ -636,9 +699,9 @@ interface JvIconDefinition {
|
|
|
636
699
|
declare const JV_FALLBACK_ICON_NAME = "circle-alert";
|
|
637
700
|
declare const JV_LUCIDE_ICON_REGISTRY: Record<string, JvIconDefinition>;
|
|
638
701
|
|
|
639
|
-
declare const JV_UI_CONFIG: InjectionToken<
|
|
702
|
+
declare const JV_UI_CONFIG: InjectionToken<JvUiConfigInput[]>;
|
|
640
703
|
declare const JV_UI_CONFIG_DEFAULTS: InjectionToken<JvUiConfig>;
|
|
641
|
-
declare function provideJvUi(config?:
|
|
704
|
+
declare function provideJvUi(config?: JvUiConfigInput): _angular_core.EnvironmentProviders;
|
|
642
705
|
|
|
643
706
|
declare class JvDialogService {
|
|
644
707
|
private readonly announcementService;
|
|
@@ -827,6 +890,29 @@ declare class JvAnnouncementService {
|
|
|
827
890
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<JvAnnouncementService>;
|
|
828
891
|
}
|
|
829
892
|
|
|
893
|
+
type JvFormatKind = keyof JvUiFormats;
|
|
894
|
+
type JvFormatOverrides = Intl.DateTimeFormatOptions & Intl.NumberFormatOptions;
|
|
895
|
+
declare class JvFormatService {
|
|
896
|
+
private readonly config;
|
|
897
|
+
readonly formatLocale: _angular_core.WritableSignal<string>;
|
|
898
|
+
readonly formats: _angular_core.WritableSignal<JvUiFormats>;
|
|
899
|
+
readonly firstDayOfWeek: _angular_core.Signal<number>;
|
|
900
|
+
initialize(): void;
|
|
901
|
+
setFormatLocale(locale: string): void;
|
|
902
|
+
setFormats(formats: Partial<JvUiFormats>): void;
|
|
903
|
+
format(kind: JvFormatKind, value: unknown, overrides?: JvFormatOverrides): string;
|
|
904
|
+
toComparable(kind: JvFormatKind, value: unknown): string | number | boolean | null;
|
|
905
|
+
toDate(value: unknown): Date | null;
|
|
906
|
+
toNumber(value: unknown): number | null;
|
|
907
|
+
toSearchValue(kind: JvFormatKind, value: unknown): string;
|
|
908
|
+
private resolveFormats;
|
|
909
|
+
private resolveDateOptions;
|
|
910
|
+
private resolveNumberOptions;
|
|
911
|
+
private resolveFirstDayOfWeek;
|
|
912
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvFormatService, never>;
|
|
913
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<JvFormatService>;
|
|
914
|
+
}
|
|
915
|
+
|
|
830
916
|
declare class JvListComponent {
|
|
831
917
|
readonly role: _angular_core.InputSignal<"list" | "navigation">;
|
|
832
918
|
readonly ariaRole: _angular_core.InputSignal<string | null>;
|
|
@@ -937,6 +1023,8 @@ interface JvGridSortState {
|
|
|
937
1023
|
columnKey: string;
|
|
938
1024
|
direction: JvGridSortDirection;
|
|
939
1025
|
}
|
|
1026
|
+
type JvGridColumnType = 'text' | 'integer' | 'number' | 'currency' | 'percent' | 'date' | 'time' | 'datetime' | 'boolean';
|
|
1027
|
+
type JvGridColumnFormatOptions = Intl.NumberFormatOptions & Intl.DateTimeFormatOptions;
|
|
940
1028
|
interface JvGridColumn<T = any> {
|
|
941
1029
|
key: keyof T | string;
|
|
942
1030
|
header: string;
|
|
@@ -951,7 +1039,8 @@ interface JvGridColumn<T = any> {
|
|
|
951
1039
|
minWidth?: string;
|
|
952
1040
|
maxWidth?: string;
|
|
953
1041
|
align?: 'start' | 'center' | 'end';
|
|
954
|
-
type?:
|
|
1042
|
+
type?: JvGridColumnType;
|
|
1043
|
+
formatOptions?: JvGridColumnFormatOptions;
|
|
955
1044
|
cellClass?: string;
|
|
956
1045
|
headerClass?: string;
|
|
957
1046
|
format?: (value: unknown, row: T) => string;
|
|
@@ -1027,6 +1116,7 @@ declare const JV_GRID_DEFAULT_OPTIONS: JvGridOptions;
|
|
|
1027
1116
|
|
|
1028
1117
|
declare class JvGridComponent<T = any> {
|
|
1029
1118
|
private readonly gridId;
|
|
1119
|
+
private readonly formatService;
|
|
1030
1120
|
private readonly translationService;
|
|
1031
1121
|
readonly data: _angular_core.InputSignal<T[]>;
|
|
1032
1122
|
readonly columns: _angular_core.InputSignal<JvGridColumn<T>[]>;
|
|
@@ -1121,7 +1211,12 @@ declare class JvGridComponent<T = any> {
|
|
|
1121
1211
|
protected getRawCellValue(row: T, col: JvGridColumn<T>): unknown;
|
|
1122
1212
|
protected getCellValue(row: T, col: JvGridColumn<T>): unknown;
|
|
1123
1213
|
protected getEditValue(row: T, col: JvGridColumn<T>): string;
|
|
1124
|
-
protected formatValue(value: unknown, col: JvGridColumn<T
|
|
1214
|
+
protected formatValue(value: unknown, col: JvGridColumn<T>, _row: T): string;
|
|
1215
|
+
protected getComparableValue(value: unknown, col: JvGridColumn<T>): string | number | boolean | null;
|
|
1216
|
+
protected getSearchValue(value: unknown, col: JvGridColumn<T>): string;
|
|
1217
|
+
protected getExportValue(value: unknown, col: JvGridColumn<T>): string;
|
|
1218
|
+
protected resolveColumnType(col: JvGridColumn<T>): JvGridColumnType;
|
|
1219
|
+
protected getFormatOverrides(col: JvGridColumn<T>): JvFormatOverrides | undefined;
|
|
1125
1220
|
protected getAriaSort(col: JvGridColumn<T>): 'ascending' | 'descending' | 'none' | null;
|
|
1126
1221
|
protected getSortLabel(col: JvGridColumn<T>): string;
|
|
1127
1222
|
protected getColumnWidth(col: JvGridColumn<T>): string | undefined;
|
|
@@ -1191,5 +1286,5 @@ declare class JvPaginationComponent {
|
|
|
1191
1286
|
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
1287
|
}
|
|
1193
1288
|
|
|
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 };
|
|
1289
|
+
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, JvInputComponent, JvListComponent, JvListItemComponent, JvLoaderComponent, JvLoaderService, JvLoginPageComponent, JvModalSelectorComponent, JvPageComponent, JvPaginationComponent, JvRadioComponent, JvSectionComponent, JvSelectComponent, JvSidebarComponent, JvSwitchComponent, JvTabPanelDirective, JvTabsComponent, JvTextareaComponent, JvThemeService, JvToastComponent, JvToastService, JvTooltipDirective, JvTopbarComponent, JvTranslationService, provideJvUi };
|
|
1290
|
+
export type { JvAccordionItem, JvActiveConfirmDialog, JvBreadcrumbItem, JvChangePasswordSubmitEvent, JvCodeFont, JvCollapsiblePanelVariant, JvConfirmOptions, JvDensity, JvFileInputRejection, JvForgotPasswordSubmitEvent, JvFormatKind, JvFormatOverrides, 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, JvTabItem, JvTheme, JvThemeOption, JvToastItem, JvToastPosition, JvToastViewport, JvTone, JvTooltipPosition, JvTopbarAction, JvUiConfig, JvUiConfigInput, JvUiFormats };
|