valtech-components 2.0.507 → 2.0.509
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/esm2022/lib/components/atoms/qr-code/qr-code.component.mjs +6 -4
- package/esm2022/lib/components/molecules/code-display/code-display.component.mjs +4 -2
- package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +18 -7
- package/esm2022/lib/components/molecules/date-range-input/date-range-input.component.mjs +41 -16
- package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +17 -6
- package/esm2022/lib/components/molecules/language-selector/language-selector.component.mjs +5 -5
- package/esm2022/lib/components/molecules/multi-select-search/multi-select-search.component.mjs +53 -27
- package/esm2022/lib/components/molecules/participant-card/participant-card.component.mjs +28 -10
- package/esm2022/lib/components/molecules/popover-selector/popover-selector.component.mjs +8 -6
- package/esm2022/lib/components/molecules/searchbar/searchbar.component.mjs +21 -7
- package/esm2022/lib/components/molecules/select-input/select-input.component.mjs +11 -7
- package/esm2022/lib/components/molecules/select-search/select-search.component.mjs +21 -7
- package/esm2022/lib/components/organisms/data-table/data-table.component.mjs +52 -17
- package/esm2022/lib/services/i18n/config.mjs +64 -4
- package/esm2022/lib/services/i18n/default-content.mjs +203 -0
- package/esm2022/lib/services/i18n/index.mjs +3 -1
- package/esm2022/lib/services/i18n/types.mjs +2 -1
- package/fesm2022/valtech-components.mjs +998 -583
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/qr-code/qr-code.component.d.ts +1 -0
- package/lib/components/molecules/code-display/code-display.component.d.ts +2 -2
- package/lib/components/molecules/date-input/date-input.component.d.ts +5 -0
- package/lib/components/molecules/date-range-input/date-range-input.component.d.ts +11 -0
- package/lib/components/molecules/file-input/file-input.component.d.ts +3 -0
- package/lib/components/molecules/multi-select-search/multi-select-search.component.d.ts +13 -0
- package/lib/components/molecules/participant-card/participant-card.component.d.ts +9 -0
- package/lib/components/molecules/popover-selector/popover-selector.component.d.ts +1 -0
- package/lib/components/molecules/searchbar/searchbar.component.d.ts +14 -1
- package/lib/components/molecules/select-input/select-input.component.d.ts +1 -0
- package/lib/components/molecules/select-search/select-search.component.d.ts +7 -0
- package/lib/components/organisms/data-table/data-table.component.d.ts +17 -2
- package/lib/services/i18n/default-content.d.ts +30 -0
- package/lib/services/i18n/index.d.ts +1 -0
- package/lib/services/i18n/types.d.ts +35 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ToastController } from '@ionic/angular';
|
|
3
2
|
import 'prismjs/components/prism-css';
|
|
4
3
|
import 'prismjs/components/prism-javascript';
|
|
5
4
|
import 'prismjs/components/prism-markup';
|
|
@@ -10,7 +9,8 @@ export declare class CodeDisplayComponent implements AfterViewInit, OnChanges {
|
|
|
10
9
|
private cdr;
|
|
11
10
|
codeElement: ElementRef<HTMLElement>;
|
|
12
11
|
props: CodeDisplayMetadata;
|
|
13
|
-
toast
|
|
12
|
+
private toast;
|
|
13
|
+
private i18n;
|
|
14
14
|
selectedTab: number;
|
|
15
15
|
constructor(cdr: ChangeDetectorRef);
|
|
16
16
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -9,6 +9,11 @@ export declare class DateInputComponent implements OnInit {
|
|
|
9
9
|
* @property hint - The hint text for the input.
|
|
10
10
|
*/
|
|
11
11
|
props: DateInputMetadata;
|
|
12
|
+
private i18n;
|
|
13
|
+
/** Done button text - from props or i18n default */
|
|
14
|
+
get doneText(): string;
|
|
15
|
+
/** Cancel button text - from props or i18n default */
|
|
16
|
+
get cancelText(): string;
|
|
12
17
|
constructor();
|
|
13
18
|
ngOnInit(): void;
|
|
14
19
|
private applyDefaultValue;
|
|
@@ -16,7 +16,18 @@ export declare class DateRangeInputComponent implements OnInit, OnDestroy {
|
|
|
16
16
|
startDatetimeId: string;
|
|
17
17
|
endDatetimeId: string;
|
|
18
18
|
showDayCount: boolean;
|
|
19
|
+
private i18n;
|
|
19
20
|
private valueSubscription;
|
|
21
|
+
/** Get done button text from props or i18n */
|
|
22
|
+
getDoneText(): string;
|
|
23
|
+
/** Get cancel button text from props or i18n */
|
|
24
|
+
getCancelText(): string;
|
|
25
|
+
/** Get start date fallback label */
|
|
26
|
+
getStartDateFallback(): string;
|
|
27
|
+
/** Get end date fallback label */
|
|
28
|
+
getEndDateFallback(): string;
|
|
29
|
+
/** Get day/days label based on count */
|
|
30
|
+
getDayLabel(): string;
|
|
20
31
|
ngOnInit(): void;
|
|
21
32
|
ngOnDestroy(): void;
|
|
22
33
|
getLabel(): string;
|
|
@@ -11,10 +11,13 @@ export declare class FileInputComponent implements OnInit {
|
|
|
11
11
|
*/
|
|
12
12
|
props: FileInputMetadata;
|
|
13
13
|
fileInput: any;
|
|
14
|
+
private i18n;
|
|
14
15
|
contrastButton: ButtonMetadata;
|
|
15
16
|
selectedFile: File;
|
|
16
17
|
constructor();
|
|
17
18
|
ngOnInit(): void;
|
|
19
|
+
/** Get display text for file status */
|
|
20
|
+
getFileDisplayText(): string;
|
|
18
21
|
onFileSelected(event: any): void;
|
|
19
22
|
reset(): void;
|
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent, never>;
|
|
@@ -12,6 +12,19 @@ export declare class MultiSelectSearchComponent implements OnChanges, OnDestroy
|
|
|
12
12
|
props: InputMetadata;
|
|
13
13
|
icon: IconService;
|
|
14
14
|
private changeDetector;
|
|
15
|
+
private i18n;
|
|
16
|
+
/** Get close button text */
|
|
17
|
+
getCloseText(): string;
|
|
18
|
+
/** Get no results text */
|
|
19
|
+
getNoResultsText(): string;
|
|
20
|
+
/** Get select all text */
|
|
21
|
+
getSelectAllText(): string;
|
|
22
|
+
/** Get clear text */
|
|
23
|
+
getClearText(): string;
|
|
24
|
+
/** Get apply text */
|
|
25
|
+
getApplyText(): string;
|
|
26
|
+
/** Get items selected text */
|
|
27
|
+
getItemsSelectedText(count: number): string;
|
|
15
28
|
searchTerm: string;
|
|
16
29
|
filteredItems: InputOption[];
|
|
17
30
|
selectedItems: InputOption[];
|
|
@@ -5,7 +5,16 @@ export declare class ParticipantCardComponent {
|
|
|
5
5
|
props: ParticipantCardMetadata;
|
|
6
6
|
cardClick: EventEmitter<ParticipantCardClickEvent>;
|
|
7
7
|
actionClick: EventEmitter<ParticipantCardActionEvent>;
|
|
8
|
+
private i18n;
|
|
8
9
|
showAllTickets: boolean;
|
|
10
|
+
/** Get winner badge text */
|
|
11
|
+
getWinnerText(): string;
|
|
12
|
+
/** Get tickets count text */
|
|
13
|
+
getTicketsCountText(count: number): string;
|
|
14
|
+
/** Get more tickets text */
|
|
15
|
+
getMoreText(count: number): string;
|
|
16
|
+
/** Get notes label */
|
|
17
|
+
getNotesLabel(): string;
|
|
9
18
|
get ticketNumbers(): (number | ParticipantTicket)[];
|
|
10
19
|
get visibleTickets(): (number | ParticipantTicket)[];
|
|
11
20
|
get hiddenTicketsCount(): number;
|
|
@@ -5,6 +5,14 @@ export declare class SearchbarComponent {
|
|
|
5
5
|
* Whether the searchbar is disabled.
|
|
6
6
|
*/
|
|
7
7
|
disabled: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Custom placeholder text (optional - uses i18n default if not provided)
|
|
10
|
+
*/
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom cancel button text (optional - uses i18n default if not provided)
|
|
14
|
+
*/
|
|
15
|
+
cancelText?: string;
|
|
8
16
|
/**
|
|
9
17
|
* Emits the search term on input.
|
|
10
18
|
*/
|
|
@@ -17,10 +25,15 @@ export declare class SearchbarComponent {
|
|
|
17
25
|
* Emits when the searchbar loses focus.
|
|
18
26
|
*/
|
|
19
27
|
blurEvent: EventEmitter<void>;
|
|
28
|
+
private i18n;
|
|
29
|
+
/** Get placeholder text */
|
|
30
|
+
getPlaceholder(): string;
|
|
31
|
+
/** Get cancel button text */
|
|
32
|
+
getCancelText(): string;
|
|
20
33
|
constructor();
|
|
21
34
|
onSearch($event: any): void;
|
|
22
35
|
onFocus(): void;
|
|
23
36
|
onBlur(): void;
|
|
24
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<SearchbarComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "val-searchbar", never, { "disabled": { "alias": "disabled"; "required": false; }; }, { "filterEvent": "filterEvent"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; }, never, never, true, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "val-searchbar", never, { "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; }, { "filterEvent": "filterEvent"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; }, never, never, true, never>;
|
|
26
39
|
}
|
|
@@ -21,6 +21,13 @@ export declare class SelectSearchComponent implements OnChanges, OnDestroy {
|
|
|
21
21
|
props: InputMetadata;
|
|
22
22
|
icon: IconService;
|
|
23
23
|
private changeDetector;
|
|
24
|
+
private i18n;
|
|
25
|
+
/** Get close button text */
|
|
26
|
+
getCloseText(): string;
|
|
27
|
+
/** Get no results text */
|
|
28
|
+
getNoResultsText(): string;
|
|
29
|
+
/** Get items selected text */
|
|
30
|
+
getItemsSelectedText(count: number): string;
|
|
24
31
|
searchTerm: string;
|
|
25
32
|
filteredItems: InputOption[];
|
|
26
33
|
selectedItems: InputOption[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { DataTableMetadata, DataTableColumn, DataTableSort, DataTableRowClickEvent, DataTableSelectionChangeEvent, DataTableSortChangeEvent, DataTablePageChangeEvent } from './types';
|
|
2
|
+
import { DataTableMetadata, DataTableColumn, DataTableSort, DataTableRowClickEvent, DataTableSelectionChangeEvent, DataTableSortChangeEvent, DataTablePageChangeEvent, DataTableEmptyState } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DataTableComponent<T = any> implements OnInit, OnChanges {
|
|
5
5
|
props: DataTableMetadata<T>;
|
|
@@ -13,6 +13,7 @@ export declare class DataTableComponent<T = any> implements OnInit, OnChanges {
|
|
|
13
13
|
/** Cached visible columns for performance */
|
|
14
14
|
private _visibleColumns;
|
|
15
15
|
private cdr;
|
|
16
|
+
private i18n;
|
|
16
17
|
ngOnInit(): void;
|
|
17
18
|
ngOnChanges(changes: SimpleChanges): void;
|
|
18
19
|
private initializeState;
|
|
@@ -20,7 +21,21 @@ export declare class DataTableComponent<T = any> implements OnInit, OnChanges {
|
|
|
20
21
|
private sortData;
|
|
21
22
|
get visibleColumns(): DataTableColumn<T>[];
|
|
22
23
|
get totalColumns(): number;
|
|
23
|
-
get emptyState():
|
|
24
|
+
get emptyState(): DataTableEmptyState;
|
|
25
|
+
/** Get actions column label */
|
|
26
|
+
getActionsLabel(): string;
|
|
27
|
+
/** Get pagination info text */
|
|
28
|
+
getPaginationInfoText(): string;
|
|
29
|
+
/** Get per page text */
|
|
30
|
+
getPerPageText(size: number): string;
|
|
31
|
+
/** Get first page aria label */
|
|
32
|
+
getFirstPageLabel(): string;
|
|
33
|
+
/** Get previous page aria label */
|
|
34
|
+
getPreviousPageLabel(): string;
|
|
35
|
+
/** Get next page aria label */
|
|
36
|
+
getNextPageLabel(): string;
|
|
37
|
+
/** Get last page aria label */
|
|
38
|
+
getLastPageLabel(): string;
|
|
24
39
|
get pageSizeOptions(): number[];
|
|
25
40
|
get totalPages(): number;
|
|
26
41
|
get paginationStart(): number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ContentStore } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Traducciones por defecto de valtech-components.
|
|
4
|
+
*
|
|
5
|
+
* Estas traducciones se cargan automáticamente cuando se usa provideValtechI18n()
|
|
6
|
+
* sin necesidad de configuración adicional.
|
|
7
|
+
*
|
|
8
|
+
* Las apps pueden sobrescribir cualquier key pasando su propio content:
|
|
9
|
+
*
|
|
10
|
+
* @example Sobrescribir traducciones específicas
|
|
11
|
+
* ```typescript
|
|
12
|
+
* provideValtechI18n({
|
|
13
|
+
* content: {
|
|
14
|
+
* _global: {
|
|
15
|
+
* es: { success: '¡Lo hicimos!' }, // Sobrescribe solo esta key
|
|
16
|
+
* en: { success: 'We did it!' },
|
|
17
|
+
* },
|
|
18
|
+
* },
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example Desactivar traducciones por defecto
|
|
23
|
+
* ```typescript
|
|
24
|
+
* provideValtechI18n({
|
|
25
|
+
* includeDefaultContent: false,
|
|
26
|
+
* content: MY_CUSTOM_CONTENT,
|
|
27
|
+
* })
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const VALTECH_DEFAULT_CONTENT: ContentStore;
|
|
@@ -2,3 +2,4 @@ export { I18nLang, LanguagesContent, ContentStore, I18nConfig, LANG_STORAGE_KEY,
|
|
|
2
2
|
export { I18nService } from './i18n.service';
|
|
3
3
|
export { TranslatePipe } from './translate.pipe';
|
|
4
4
|
export { provideValtechI18n } from './config';
|
|
5
|
+
export { VALTECH_DEFAULT_CONTENT } from './default-content';
|
|
@@ -45,9 +45,43 @@ export interface I18nConfig {
|
|
|
45
45
|
*/
|
|
46
46
|
detectBrowserLanguage?: boolean;
|
|
47
47
|
/**
|
|
48
|
-
* Contenido inicial de traducciones por namespace
|
|
48
|
+
* Contenido inicial de traducciones por namespace.
|
|
49
|
+
* Si includeDefaultContent es true, este contenido se mergea
|
|
50
|
+
* con VALTECH_DEFAULT_CONTENT (las keys del usuario ganan).
|
|
49
51
|
*/
|
|
50
52
|
content?: ContentStore;
|
|
53
|
+
/**
|
|
54
|
+
* Si es true, incluye traducciones por defecto de valtech-components.
|
|
55
|
+
* Las traducciones del usuario sobrescriben las por defecto.
|
|
56
|
+
*
|
|
57
|
+
* @default true
|
|
58
|
+
*
|
|
59
|
+
* @example Usar defaults (comportamiento por defecto)
|
|
60
|
+
* ```typescript
|
|
61
|
+
* provideValtechI18n() // Funciona sin configuración
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example Sobrescribir keys específicas
|
|
65
|
+
* ```typescript
|
|
66
|
+
* provideValtechI18n({
|
|
67
|
+
* content: {
|
|
68
|
+
* _global: {
|
|
69
|
+
* es: { success: '¡Lo hicimos!' },
|
|
70
|
+
* en: { success: 'We did it!' },
|
|
71
|
+
* },
|
|
72
|
+
* },
|
|
73
|
+
* })
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example Desactivar defaults completamente
|
|
77
|
+
* ```typescript
|
|
78
|
+
* provideValtechI18n({
|
|
79
|
+
* includeDefaultContent: false,
|
|
80
|
+
* content: MY_CUSTOM_CONTENT,
|
|
81
|
+
* })
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
includeDefaultContent?: boolean;
|
|
51
85
|
}
|
|
52
86
|
/**
|
|
53
87
|
* Valores por defecto de configuración
|