valtech-components 2.0.528 → 2.0.530
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/molecules/command-display/command-display.component.mjs +4 -2
- package/esm2022/lib/components/molecules/plain-code-box/plain-code-box.component.mjs +4 -2
- package/esm2022/lib/components/molecules/share-buttons/share-buttons.component.mjs +4 -2
- package/esm2022/lib/components/organisms/comment-section/comment-section.component.mjs +15 -10
- package/esm2022/lib/components/organisms/infinite-list/infinite-list.component.mjs +20 -18
- package/esm2022/lib/services/i18n/default-content.mjs +99 -1
- package/fesm2022/valtech-components.mjs +134 -28
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/command-display/command-display.component.d.ts +2 -2
- package/lib/components/molecules/plain-code-box/plain-code-box.component.d.ts +4 -4
- package/lib/components/molecules/share-buttons/share-buttons.component.d.ts +1 -0
- package/lib/components/organisms/comment-section/comment-section.component.d.ts +2 -0
- package/lib/components/organisms/infinite-list/infinite-list.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3479,6 +3479,55 @@ const VALTECH_DEFAULT_CONTENT = {
|
|
|
3479
3479
|
notes: 'Notas:',
|
|
3480
3480
|
// Footer
|
|
3481
3481
|
allRightsReserved: 'Todos los derechos reservados.',
|
|
3482
|
+
// Clipboard
|
|
3483
|
+
linkCopied: '¡Enlace copiado!',
|
|
3484
|
+
// Selection
|
|
3485
|
+
select: 'Seleccionar',
|
|
3486
|
+
selectOptions: 'Seleccionar opciones',
|
|
3487
|
+
// Comments
|
|
3488
|
+
pinned: 'Fijado',
|
|
3489
|
+
edited: '(editado)',
|
|
3490
|
+
showComment: 'Mostrar comentario',
|
|
3491
|
+
hideReplies: 'Ocultar respuestas',
|
|
3492
|
+
loadMoreReplies: 'Cargar más respuestas',
|
|
3493
|
+
viewReplies: 'Ver respuestas',
|
|
3494
|
+
comments: 'Comentarios',
|
|
3495
|
+
noCommentsYet: 'Sin comentarios aún',
|
|
3496
|
+
publish: 'Publicar',
|
|
3497
|
+
sortBy: 'Ordenar por',
|
|
3498
|
+
writeComment: 'Escribe un comentario...',
|
|
3499
|
+
beFirstToComment: '¡Sé el primero en compartir tu opinión!',
|
|
3500
|
+
// Timestamps
|
|
3501
|
+
justNow: 'Ahora mismo',
|
|
3502
|
+
minutesAgo: 'hace {minutes}m',
|
|
3503
|
+
hoursAgo: 'hace {hours}h',
|
|
3504
|
+
daysAgo: 'hace {days}d',
|
|
3505
|
+
// Lists
|
|
3506
|
+
loadMore: 'Cargar más',
|
|
3507
|
+
noMoreItems: 'No hay más items',
|
|
3508
|
+
loadingItems: 'Cargando items...',
|
|
3509
|
+
allItemsLoaded: 'Todos los items han sido cargados',
|
|
3510
|
+
errorOccurred: 'Ocurrió un error',
|
|
3511
|
+
retry: 'Reintentar',
|
|
3512
|
+
// Navigation
|
|
3513
|
+
seeMore: 'Ver más',
|
|
3514
|
+
// Forms - Range
|
|
3515
|
+
from: 'Inicial',
|
|
3516
|
+
to: 'Final',
|
|
3517
|
+
// Stepper
|
|
3518
|
+
decrease: 'Disminuir',
|
|
3519
|
+
increase: 'Aumentar',
|
|
3520
|
+
// Misc
|
|
3521
|
+
random: 'Aleatorio',
|
|
3522
|
+
pullToRefresh: 'Arrastra para actualizar',
|
|
3523
|
+
timeExpired: 'Tiempo agotado',
|
|
3524
|
+
qrCode: 'Código QR',
|
|
3525
|
+
// Payment status
|
|
3526
|
+
paymentPending: 'Pendiente',
|
|
3527
|
+
paymentProcessing: 'Procesando',
|
|
3528
|
+
paymentPaid: 'Pagado',
|
|
3529
|
+
paymentRefunded: 'Reembolsado',
|
|
3530
|
+
paymentFailed: 'Fallido',
|
|
3482
3531
|
},
|
|
3483
3532
|
en: {
|
|
3484
3533
|
// Common actions
|
|
@@ -3566,6 +3615,55 @@ const VALTECH_DEFAULT_CONTENT = {
|
|
|
3566
3615
|
notes: 'Notes:',
|
|
3567
3616
|
// Footer
|
|
3568
3617
|
allRightsReserved: 'All rights reserved.',
|
|
3618
|
+
// Clipboard
|
|
3619
|
+
linkCopied: 'Link copied!',
|
|
3620
|
+
// Selection
|
|
3621
|
+
select: 'Select',
|
|
3622
|
+
selectOptions: 'Select options',
|
|
3623
|
+
// Comments
|
|
3624
|
+
pinned: 'Pinned',
|
|
3625
|
+
edited: '(edited)',
|
|
3626
|
+
showComment: 'Show comment',
|
|
3627
|
+
hideReplies: 'Hide replies',
|
|
3628
|
+
loadMoreReplies: 'Load more replies',
|
|
3629
|
+
viewReplies: 'View replies',
|
|
3630
|
+
comments: 'Comments',
|
|
3631
|
+
noCommentsYet: 'No comments yet',
|
|
3632
|
+
publish: 'Publish',
|
|
3633
|
+
sortBy: 'Sort by',
|
|
3634
|
+
writeComment: 'Write a comment...',
|
|
3635
|
+
beFirstToComment: 'Be the first to share your thoughts!',
|
|
3636
|
+
// Timestamps
|
|
3637
|
+
justNow: 'Just now',
|
|
3638
|
+
minutesAgo: '{minutes}m ago',
|
|
3639
|
+
hoursAgo: '{hours}h ago',
|
|
3640
|
+
daysAgo: '{days}d ago',
|
|
3641
|
+
// Lists
|
|
3642
|
+
loadMore: 'Load more',
|
|
3643
|
+
noMoreItems: 'No more items',
|
|
3644
|
+
loadingItems: 'Loading items...',
|
|
3645
|
+
allItemsLoaded: 'All items loaded',
|
|
3646
|
+
errorOccurred: 'An error occurred',
|
|
3647
|
+
retry: 'Retry',
|
|
3648
|
+
// Navigation
|
|
3649
|
+
seeMore: 'See more',
|
|
3650
|
+
// Forms - Range
|
|
3651
|
+
from: 'From',
|
|
3652
|
+
to: 'To',
|
|
3653
|
+
// Stepper
|
|
3654
|
+
decrease: 'Decrease',
|
|
3655
|
+
increase: 'Increase',
|
|
3656
|
+
// Misc
|
|
3657
|
+
random: 'Random',
|
|
3658
|
+
pullToRefresh: 'Pull to refresh',
|
|
3659
|
+
timeExpired: 'Time expired',
|
|
3660
|
+
qrCode: 'QR Code',
|
|
3661
|
+
// Payment status
|
|
3662
|
+
paymentPending: 'Pending',
|
|
3663
|
+
paymentProcessing: 'Processing',
|
|
3664
|
+
paymentPaid: 'Paid',
|
|
3665
|
+
paymentRefunded: 'Refunded',
|
|
3666
|
+
paymentFailed: 'Failed',
|
|
3569
3667
|
},
|
|
3570
3668
|
},
|
|
3571
3669
|
};
|
|
@@ -8491,13 +8589,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8491
8589
|
class CommandDisplayComponent {
|
|
8492
8590
|
constructor() {
|
|
8493
8591
|
this.toast = inject(ToastController);
|
|
8592
|
+
this.i18n = inject(I18nService);
|
|
8494
8593
|
}
|
|
8495
8594
|
async copyCommand() {
|
|
8496
8595
|
if (this.props.text) {
|
|
8497
8596
|
await Clipboard.write({
|
|
8498
8597
|
string: this.props.text,
|
|
8499
8598
|
});
|
|
8500
|
-
this.presentToast('
|
|
8599
|
+
this.presentToast(this.i18n.t('copiedToClipboard'));
|
|
8501
8600
|
}
|
|
8502
8601
|
}
|
|
8503
8602
|
async presentToast(message) {
|
|
@@ -8574,6 +8673,7 @@ class PlainCodeBoxComponent {
|
|
|
8574
8673
|
constructor() {
|
|
8575
8674
|
this.toast = inject(ToastController);
|
|
8576
8675
|
this.cdr = inject(ChangeDetectorRef);
|
|
8676
|
+
this.i18n = inject(I18nService);
|
|
8577
8677
|
this.props = { lines: [] };
|
|
8578
8678
|
}
|
|
8579
8679
|
ngOnChanges(changes) {
|
|
@@ -8596,7 +8696,7 @@ class PlainCodeBoxComponent {
|
|
|
8596
8696
|
await Clipboard.write({
|
|
8597
8697
|
string: fullCode,
|
|
8598
8698
|
});
|
|
8599
|
-
this.presentToast('
|
|
8699
|
+
this.presentToast(this.i18n.t('copiedToClipboard'));
|
|
8600
8700
|
}
|
|
8601
8701
|
}
|
|
8602
8702
|
async presentToast(message) {
|
|
@@ -13415,6 +13515,7 @@ class ShareButtonsComponent {
|
|
|
13415
13515
|
constructor() {
|
|
13416
13516
|
this.shareComplete = new EventEmitter();
|
|
13417
13517
|
this.toastController = inject(ToastController$1);
|
|
13518
|
+
this.i18n = inject(I18nService);
|
|
13418
13519
|
}
|
|
13419
13520
|
getButtons() {
|
|
13420
13521
|
if (this.props.buttons?.length) {
|
|
@@ -13528,7 +13629,7 @@ class ShareButtonsComponent {
|
|
|
13528
13629
|
}
|
|
13529
13630
|
}
|
|
13530
13631
|
getCopySuccessMessage() {
|
|
13531
|
-
return this.props.copySuccessMessage || '
|
|
13632
|
+
return this.props.copySuccessMessage || this.i18n.t('linkCopied');
|
|
13532
13633
|
}
|
|
13533
13634
|
isNativeShareSupported() {
|
|
13534
13635
|
return typeof navigator !== 'undefined' && !!navigator.share;
|
|
@@ -18816,6 +18917,7 @@ addIcons({
|
|
|
18816
18917
|
*/
|
|
18817
18918
|
class CommentSectionComponent {
|
|
18818
18919
|
constructor() {
|
|
18920
|
+
this.i18n = inject(I18nService);
|
|
18819
18921
|
// Section events
|
|
18820
18922
|
this.sortChange = new EventEmitter();
|
|
18821
18923
|
this.commentSubmit = new EventEmitter();
|
|
@@ -18839,8 +18941,11 @@ class CommentSectionComponent {
|
|
|
18839
18941
|
this.updateDisplayTexts();
|
|
18840
18942
|
}
|
|
18841
18943
|
updateDisplayTexts() {
|
|
18842
|
-
this.displayTitle = this.props.title || '
|
|
18843
|
-
this.displayLoadMoreLabel = this.props.loadMoreLabel || '
|
|
18944
|
+
this.displayTitle = this.props.title || this.i18n.t('comments');
|
|
18945
|
+
this.displayLoadMoreLabel = this.props.loadMoreLabel || this.i18n.t('loadMoreComments');
|
|
18946
|
+
}
|
|
18947
|
+
getSortByLabel() {
|
|
18948
|
+
return this.i18n.t('sortBy');
|
|
18844
18949
|
}
|
|
18845
18950
|
formatCount(count) {
|
|
18846
18951
|
if (count >= 1000000) {
|
|
@@ -18855,16 +18960,16 @@ class CommentSectionComponent {
|
|
|
18855
18960
|
return option.label;
|
|
18856
18961
|
}
|
|
18857
18962
|
getInputPlaceholder() {
|
|
18858
|
-
return this.props.inputConfig?.placeholder || '
|
|
18963
|
+
return this.props.inputConfig?.placeholder || this.i18n.t('writeComment');
|
|
18859
18964
|
}
|
|
18860
18965
|
getSubmitLabel() {
|
|
18861
|
-
return this.props.inputConfig?.submitLabel || '
|
|
18966
|
+
return this.props.inputConfig?.submitLabel || this.i18n.t('publish');
|
|
18862
18967
|
}
|
|
18863
18968
|
getEmptyTitle() {
|
|
18864
|
-
return this.props.emptyState?.title || '
|
|
18969
|
+
return this.props.emptyState?.title || this.i18n.t('noCommentsYet');
|
|
18865
18970
|
}
|
|
18866
18971
|
getEmptyMessage() {
|
|
18867
|
-
return this.props.emptyState?.message || '
|
|
18972
|
+
return this.props.emptyState?.message || this.i18n.t('beFirstToComment');
|
|
18868
18973
|
}
|
|
18869
18974
|
getSkeletonArray() {
|
|
18870
18975
|
const count = this.props.skeletonCount || 3;
|
|
@@ -18960,7 +19065,7 @@ class CommentSectionComponent {
|
|
|
18960
19065
|
<ion-icon name="swap-vertical-outline" slot="start" class="sort-icon"></ion-icon>
|
|
18961
19066
|
<ion-select
|
|
18962
19067
|
[value]="props.selectedSort"
|
|
18963
|
-
[placeholder]="props.sortLabel ||
|
|
19068
|
+
[placeholder]="props.sortLabel || getSortByLabel()"
|
|
18964
19069
|
interface="popover"
|
|
18965
19070
|
(ionChange)="onSortChange($event)"
|
|
18966
19071
|
>
|
|
@@ -19130,7 +19235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
19130
19235
|
<ion-icon name="swap-vertical-outline" slot="start" class="sort-icon"></ion-icon>
|
|
19131
19236
|
<ion-select
|
|
19132
19237
|
[value]="props.selectedSort"
|
|
19133
|
-
[placeholder]="props.sortLabel ||
|
|
19238
|
+
[placeholder]="props.sortLabel || getSortByLabel()"
|
|
19134
19239
|
interface="popover"
|
|
19135
19240
|
(ionChange)="onSortChange($event)"
|
|
19136
19241
|
>
|
|
@@ -21402,6 +21507,7 @@ class InfiniteListComponent {
|
|
|
21402
21507
|
constructor() {
|
|
21403
21508
|
this.skeletonService = inject(SkeletonService);
|
|
21404
21509
|
this.cdr = inject(ChangeDetectorRef);
|
|
21510
|
+
this.i18n = inject(I18nService);
|
|
21405
21511
|
// === Events ===
|
|
21406
21512
|
this.loadMore = new EventEmitter();
|
|
21407
21513
|
this.refresh = new EventEmitter();
|
|
@@ -21427,11 +21533,11 @@ class InfiniteListComponent {
|
|
|
21427
21533
|
this.statusAnnouncement = computed(() => {
|
|
21428
21534
|
switch (this.state()) {
|
|
21429
21535
|
case 'loading':
|
|
21430
|
-
return '
|
|
21536
|
+
return this.i18n.t('loadingItems');
|
|
21431
21537
|
case 'error':
|
|
21432
|
-
return
|
|
21538
|
+
return `${this.i18n.t('error')}: ${this.error()?.message || this.i18n.t('errorOccurred')}`;
|
|
21433
21539
|
case 'complete':
|
|
21434
|
-
return '
|
|
21540
|
+
return this.i18n.t('allItemsLoaded');
|
|
21435
21541
|
default:
|
|
21436
21542
|
return '';
|
|
21437
21543
|
}
|
|
@@ -21715,11 +21821,11 @@ class InfiniteListComponent {
|
|
|
21715
21821
|
} @else {
|
|
21716
21822
|
<ion-icon name="alert-circle-outline" color="danger" size="large"></ion-icon>
|
|
21717
21823
|
}
|
|
21718
|
-
<h3>{{ mergedProps.errorState?.title || '
|
|
21719
|
-
<p>{{ mergedProps.errorState?.message || error()?.message || '
|
|
21824
|
+
<h3>{{ mergedProps.errorState?.title || i18n.t('error') }}</h3>
|
|
21825
|
+
<p>{{ mergedProps.errorState?.message || error()?.message || i18n.t('errorOccurred') }}</p>
|
|
21720
21826
|
@if (mergedProps.errorState?.showRetry !== false) {
|
|
21721
21827
|
<ion-button fill="outline" (click)="retry()">
|
|
21722
|
-
{{ mergedProps.errorState?.retryText || '
|
|
21828
|
+
{{ mergedProps.errorState?.retryText || i18n.t('retry') }}
|
|
21723
21829
|
</ion-button>
|
|
21724
21830
|
}
|
|
21725
21831
|
}
|
|
@@ -21760,10 +21866,10 @@ class InfiniteListComponent {
|
|
|
21760
21866
|
@if (state() === 'loading') {
|
|
21761
21867
|
<ion-spinner [name]="mergedProps.spinnerType" slot="start"></ion-spinner>
|
|
21762
21868
|
}
|
|
21763
|
-
{{ mergedProps.loadMoreText || '
|
|
21869
|
+
{{ mergedProps.loadMoreText || i18n.t('loadMore') }}
|
|
21764
21870
|
</ion-button>
|
|
21765
21871
|
} @else {
|
|
21766
|
-
<ion-text color="medium">{{ mergedProps.noMoreText || '
|
|
21872
|
+
<ion-text color="medium">{{ mergedProps.noMoreText || i18n.t('noMoreItems') }}</ion-text>
|
|
21767
21873
|
}
|
|
21768
21874
|
</div>
|
|
21769
21875
|
} @else {
|
|
@@ -21774,7 +21880,7 @@ class InfiniteListComponent {
|
|
|
21774
21880
|
>
|
|
21775
21881
|
<ion-infinite-scroll-content
|
|
21776
21882
|
[loadingSpinner]="mergedProps.spinnerType"
|
|
21777
|
-
[loadingText]="state() === 'loading' ? '
|
|
21883
|
+
[loadingText]="state() === 'loading' ? i18n.t('loading') : ''"
|
|
21778
21884
|
></ion-infinite-scroll-content>
|
|
21779
21885
|
</ion-infinite-scroll>
|
|
21780
21886
|
}
|
|
@@ -21783,7 +21889,7 @@ class InfiniteListComponent {
|
|
|
21783
21889
|
<!-- No more items indicator -->
|
|
21784
21890
|
@if (!hasMoreBottom() && items().length > 0 && !mergedProps.useLoadMoreButton) {
|
|
21785
21891
|
<div class="infinite-list-end">
|
|
21786
|
-
<ion-text color="medium">{{ mergedProps.noMoreText || '
|
|
21892
|
+
<ion-text color="medium">{{ mergedProps.noMoreText || i18n.t('noMoreItems') }}</ion-text>
|
|
21787
21893
|
</div>
|
|
21788
21894
|
}
|
|
21789
21895
|
</div>
|
|
@@ -21873,11 +21979,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
21873
21979
|
} @else {
|
|
21874
21980
|
<ion-icon name="alert-circle-outline" color="danger" size="large"></ion-icon>
|
|
21875
21981
|
}
|
|
21876
|
-
<h3>{{ mergedProps.errorState?.title || '
|
|
21877
|
-
<p>{{ mergedProps.errorState?.message || error()?.message || '
|
|
21982
|
+
<h3>{{ mergedProps.errorState?.title || i18n.t('error') }}</h3>
|
|
21983
|
+
<p>{{ mergedProps.errorState?.message || error()?.message || i18n.t('errorOccurred') }}</p>
|
|
21878
21984
|
@if (mergedProps.errorState?.showRetry !== false) {
|
|
21879
21985
|
<ion-button fill="outline" (click)="retry()">
|
|
21880
|
-
{{ mergedProps.errorState?.retryText || '
|
|
21986
|
+
{{ mergedProps.errorState?.retryText || i18n.t('retry') }}
|
|
21881
21987
|
</ion-button>
|
|
21882
21988
|
}
|
|
21883
21989
|
}
|
|
@@ -21918,10 +22024,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
21918
22024
|
@if (state() === 'loading') {
|
|
21919
22025
|
<ion-spinner [name]="mergedProps.spinnerType" slot="start"></ion-spinner>
|
|
21920
22026
|
}
|
|
21921
|
-
{{ mergedProps.loadMoreText || '
|
|
22027
|
+
{{ mergedProps.loadMoreText || i18n.t('loadMore') }}
|
|
21922
22028
|
</ion-button>
|
|
21923
22029
|
} @else {
|
|
21924
|
-
<ion-text color="medium">{{ mergedProps.noMoreText || '
|
|
22030
|
+
<ion-text color="medium">{{ mergedProps.noMoreText || i18n.t('noMoreItems') }}</ion-text>
|
|
21925
22031
|
}
|
|
21926
22032
|
</div>
|
|
21927
22033
|
} @else {
|
|
@@ -21932,7 +22038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
21932
22038
|
>
|
|
21933
22039
|
<ion-infinite-scroll-content
|
|
21934
22040
|
[loadingSpinner]="mergedProps.spinnerType"
|
|
21935
|
-
[loadingText]="state() === 'loading' ? '
|
|
22041
|
+
[loadingText]="state() === 'loading' ? i18n.t('loading') : ''"
|
|
21936
22042
|
></ion-infinite-scroll-content>
|
|
21937
22043
|
</ion-infinite-scroll>
|
|
21938
22044
|
}
|
|
@@ -21941,7 +22047,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
21941
22047
|
<!-- No more items indicator -->
|
|
21942
22048
|
@if (!hasMoreBottom() && items().length > 0 && !mergedProps.useLoadMoreButton) {
|
|
21943
22049
|
<div class="infinite-list-end">
|
|
21944
|
-
<ion-text color="medium">{{ mergedProps.noMoreText || '
|
|
22050
|
+
<ion-text color="medium">{{ mergedProps.noMoreText || i18n.t('noMoreItems') }}</ion-text>
|
|
21945
22051
|
</div>
|
|
21946
22052
|
}
|
|
21947
22053
|
</div>
|