valtech-components 2.0.972 → 2.0.974
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/organisms/profile-view/profile-view.component.mjs +59 -2
- package/esm2022/lib/components/organisms/profile-view/profile-view.i18n.mjs +7 -1
- package/esm2022/lib/components/organisms/profile-view/types.mjs +1 -1
- package/esm2022/lib/components/organisms/share-profile-modal/share-profile-modal.component.mjs +13 -5
- package/esm2022/lib/components/organisms/share-profile-modal/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +75 -6
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/atoms/text/text.component.d.ts +1 -1
- package/lib/components/atoms/user-avatar/user-avatar.component.d.ts +1 -1
- package/lib/components/molecules/features-list/features-list.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +5 -5
- package/lib/components/organisms/landing-steps/landing-steps.component.d.ts +1 -1
- package/lib/components/organisms/profile-view/profile-view.component.d.ts +6 -1
- package/lib/components/organisms/profile-view/types.d.ts +12 -0
- package/lib/components/organisms/share-profile-modal/share-profile-modal.component.d.ts +1 -1
- package/lib/components/organisms/share-profile-modal/types.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -54,7 +54,7 @@ import 'prismjs/components/prism-json';
|
|
|
54
54
|
* Current version of valtech-components.
|
|
55
55
|
* This is automatically updated during the publish process.
|
|
56
56
|
*/
|
|
57
|
-
const VERSION = '2.0.
|
|
57
|
+
const VERSION = '2.0.974';
|
|
58
58
|
|
|
59
59
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
60
60
|
let isRefreshing = false;
|
|
@@ -32849,6 +32849,9 @@ class ShareProfileModalComponent {
|
|
|
32849
32849
|
[props]="{ name: config().name, avatarUrl: config().avatarUrl, email: config().email, size: 'xlarge' }"
|
|
32850
32850
|
/>
|
|
32851
32851
|
<val-display [props]="{ content: displayName(), size: 'small', color: 'dark' }" />
|
|
32852
|
+
@if (config().handle) {
|
|
32853
|
+
<p class="share-profile__handle">{{ '@' + config().handle }}</p>
|
|
32854
|
+
}
|
|
32852
32855
|
|
|
32853
32856
|
<div class="share-profile__qr">
|
|
32854
32857
|
@if (qr(); as qrResult) {
|
|
@@ -32876,7 +32879,8 @@ class ShareProfileModalComponent {
|
|
|
32876
32879
|
shareData: { title: config().shareTitle || config().name, text: config().shareText, url: config().url },
|
|
32877
32880
|
platforms: config().platforms,
|
|
32878
32881
|
layout: 'horizontal',
|
|
32879
|
-
variant: '
|
|
32882
|
+
variant: 'outline',
|
|
32883
|
+
color: 'dark',
|
|
32880
32884
|
usePlatformColors: false,
|
|
32881
32885
|
}"
|
|
32882
32886
|
(shareComplete)="shared.emit($event)"
|
|
@@ -32885,7 +32889,7 @@ class ShareProfileModalComponent {
|
|
|
32885
32889
|
</val-modal-shell>
|
|
32886
32890
|
</ng-template>
|
|
32887
32891
|
</ion-modal>
|
|
32888
|
-
`, isInline: true, styles: [".share-profile{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:.5rem 0 1rem;text-align:center}.share-profile__name{margin:0;font-size:1.5rem;font-weight:700;line-height:1.2;color:var(--ion-text-color)}.share-profile__qr{display:flex;justify-content:center}.share-profile__qr-loading{display:flex;align-items:center;justify-content:center;min-width:120px}.share-profile__qr-error{margin:0;padding:1rem;max-width:28ch;word-break:break-all;font-size:.9rem;font-weight:600;color:var(--ion-color-medium-shade)}.share-profile__caption{margin:0;max-width:32ch;font-size:.95rem;line-height:1.45;color:var(--ion-color-medium-shade)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: ModalShellComponent, selector: "val-modal-shell", inputs: ["title", "subtitle", "closeLabel", "showClose"], outputs: ["close"] }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: UserAvatarComponent, selector: "val-user-avatar", inputs: ["props"], outputs: ["onClick"] }, { kind: "component", type: QrCodeComponent, selector: "val-qr-code", inputs: ["props"], outputs: ["actionComplete", "imageLoad", "imageError"] }, { kind: "component", type: ShareButtonsComponent, selector: "val-share-buttons", inputs: ["props"], outputs: ["shareComplete"] }] }); }
|
|
32892
|
+
`, isInline: true, styles: [".share-profile{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:.5rem 0 1rem;text-align:center}.share-profile__name{margin:0;font-size:1.5rem;font-weight:700;line-height:1.2;color:var(--ion-text-color)}.share-profile__handle{margin:-.5rem 0 0;font-size:.875rem;font-weight:500;color:var(--ion-color-medium-shade);letter-spacing:.01em}.share-profile__qr{display:flex;justify-content:center}.share-profile__qr-loading{display:flex;align-items:center;justify-content:center;min-width:120px}.share-profile__qr-error{margin:0;padding:1rem;max-width:28ch;word-break:break-all;font-size:.9rem;font-weight:600;color:var(--ion-color-medium-shade)}.share-profile__caption{margin:0;max-width:32ch;font-size:.95rem;line-height:1.45;color:var(--ion-color-medium-shade)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: ModalShellComponent, selector: "val-modal-shell", inputs: ["title", "subtitle", "closeLabel", "showClose"], outputs: ["close"] }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: UserAvatarComponent, selector: "val-user-avatar", inputs: ["props"], outputs: ["onClick"] }, { kind: "component", type: QrCodeComponent, selector: "val-qr-code", inputs: ["props"], outputs: ["actionComplete", "imageLoad", "imageError"] }, { kind: "component", type: ShareButtonsComponent, selector: "val-share-buttons", inputs: ["props"], outputs: ["shareComplete"] }] }); }
|
|
32889
32893
|
}
|
|
32890
32894
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShareProfileModalComponent, decorators: [{
|
|
32891
32895
|
type: Component,
|
|
@@ -32907,6 +32911,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
32907
32911
|
[props]="{ name: config().name, avatarUrl: config().avatarUrl, email: config().email, size: 'xlarge' }"
|
|
32908
32912
|
/>
|
|
32909
32913
|
<val-display [props]="{ content: displayName(), size: 'small', color: 'dark' }" />
|
|
32914
|
+
@if (config().handle) {
|
|
32915
|
+
<p class="share-profile__handle">{{ '@' + config().handle }}</p>
|
|
32916
|
+
}
|
|
32910
32917
|
|
|
32911
32918
|
<div class="share-profile__qr">
|
|
32912
32919
|
@if (qr(); as qrResult) {
|
|
@@ -32934,7 +32941,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
32934
32941
|
shareData: { title: config().shareTitle || config().name, text: config().shareText, url: config().url },
|
|
32935
32942
|
platforms: config().platforms,
|
|
32936
32943
|
layout: 'horizontal',
|
|
32937
|
-
variant: '
|
|
32944
|
+
variant: 'outline',
|
|
32945
|
+
color: 'dark',
|
|
32938
32946
|
usePlatformColors: false,
|
|
32939
32947
|
}"
|
|
32940
32948
|
(shareComplete)="shared.emit($event)"
|
|
@@ -32943,7 +32951,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
32943
32951
|
</val-modal-shell>
|
|
32944
32952
|
</ng-template>
|
|
32945
32953
|
</ion-modal>
|
|
32946
|
-
`, styles: [".share-profile{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:.5rem 0 1rem;text-align:center}.share-profile__name{margin:0;font-size:1.5rem;font-weight:700;line-height:1.2;color:var(--ion-text-color)}.share-profile__qr{display:flex;justify-content:center}.share-profile__qr-loading{display:flex;align-items:center;justify-content:center;min-width:120px}.share-profile__qr-error{margin:0;padding:1rem;max-width:28ch;word-break:break-all;font-size:.9rem;font-weight:600;color:var(--ion-color-medium-shade)}.share-profile__caption{margin:0;max-width:32ch;font-size:.95rem;line-height:1.45;color:var(--ion-color-medium-shade)}\n"] }]
|
|
32954
|
+
`, styles: [".share-profile{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:.5rem 0 1rem;text-align:center}.share-profile__name{margin:0;font-size:1.5rem;font-weight:700;line-height:1.2;color:var(--ion-text-color)}.share-profile__handle{margin:-.5rem 0 0;font-size:.875rem;font-weight:500;color:var(--ion-color-medium-shade);letter-spacing:.01em}.share-profile__qr{display:flex;justify-content:center}.share-profile__qr-loading{display:flex;align-items:center;justify-content:center;min-width:120px}.share-profile__qr-error{margin:0;padding:1rem;max-width:28ch;word-break:break-all;font-size:.9rem;font-weight:600;color:var(--ion-color-medium-shade)}.share-profile__caption{margin:0;max-width:32ch;font-size:.95rem;line-height:1.45;color:var(--ion-color-medium-shade)}\n"] }]
|
|
32947
32955
|
}], ctorParameters: () => [], propDecorators: { isOpen: [{
|
|
32948
32956
|
type: Input
|
|
32949
32957
|
}], props: [{
|
|
@@ -41596,6 +41604,9 @@ const PROFILE_VIEW_I18N = {
|
|
|
41596
41604
|
offlineTitle: 'Sin conexión',
|
|
41597
41605
|
offlineHint: 'Revisa tu conexión a internet e intenta nuevamente.',
|
|
41598
41606
|
retry: 'Reintentar',
|
|
41607
|
+
shareCtaTitle: 'Compartí tu perfil',
|
|
41608
|
+
shareCtaDesc: 'Generá un QR para que te agreguen como contacto al instante.',
|
|
41609
|
+
shareCtaBtn: 'Mostrar QR',
|
|
41599
41610
|
},
|
|
41600
41611
|
en: {
|
|
41601
41612
|
pageTitle: 'Profile',
|
|
@@ -41627,6 +41638,9 @@ const PROFILE_VIEW_I18N = {
|
|
|
41627
41638
|
offlineTitle: 'Offline',
|
|
41628
41639
|
offlineHint: 'Check your internet connection and try again.',
|
|
41629
41640
|
retry: 'Retry',
|
|
41641
|
+
shareCtaTitle: 'Share your profile',
|
|
41642
|
+
shareCtaDesc: 'Generate a QR so people can add you as a contact instantly.',
|
|
41643
|
+
shareCtaBtn: 'Show QR',
|
|
41630
41644
|
},
|
|
41631
41645
|
};
|
|
41632
41646
|
|
|
@@ -41682,6 +41696,8 @@ class ProfileViewComponent {
|
|
|
41682
41696
|
showAvatar: merged.showAvatar ?? true,
|
|
41683
41697
|
showHandle: merged.showHandle ?? true,
|
|
41684
41698
|
showPhone: merged.showPhone ?? true,
|
|
41699
|
+
showShareCta: merged.showShareCta ?? true,
|
|
41700
|
+
profileBaseUrl: merged.profileBaseUrl ?? '',
|
|
41685
41701
|
i18nNamespace: merged.i18nNamespace ?? DEFAULT_NAMESPACE$1,
|
|
41686
41702
|
onSaved: merged.onSaved,
|
|
41687
41703
|
onAvatarUploaded: merged.onAvatarUploaded,
|
|
@@ -41699,6 +41715,41 @@ class ProfileViewComponent {
|
|
|
41699
41715
|
this.loading = signal(true);
|
|
41700
41716
|
this.saving = signal(false);
|
|
41701
41717
|
this.loadError = signal(null);
|
|
41718
|
+
this.shareOpen = signal(false);
|
|
41719
|
+
this.shareCta = computed(() => {
|
|
41720
|
+
this.i18n.lang();
|
|
41721
|
+
return {
|
|
41722
|
+
title: this.t('shareCtaTitle'),
|
|
41723
|
+
description: this.t('shareCtaDesc'),
|
|
41724
|
+
bordered: true,
|
|
41725
|
+
actions: {
|
|
41726
|
+
position: 'left',
|
|
41727
|
+
columned: false,
|
|
41728
|
+
buttons: [
|
|
41729
|
+
{
|
|
41730
|
+
text: this.t('shareCtaBtn'),
|
|
41731
|
+
color: 'dark',
|
|
41732
|
+
shape: 'round',
|
|
41733
|
+
type: 'button',
|
|
41734
|
+
state: 'ENABLED',
|
|
41735
|
+
token: 'share',
|
|
41736
|
+
},
|
|
41737
|
+
],
|
|
41738
|
+
},
|
|
41739
|
+
};
|
|
41740
|
+
});
|
|
41741
|
+
this.shareModal = computed(() => {
|
|
41742
|
+
const p = this.profile();
|
|
41743
|
+
const handle = p?.handle ?? 'me';
|
|
41744
|
+
const base = this.resolvedConfig().profileBaseUrl;
|
|
41745
|
+
return {
|
|
41746
|
+
name: p?.name ?? '',
|
|
41747
|
+
handle: p?.handle,
|
|
41748
|
+
avatarUrl: p?.avatarUrl,
|
|
41749
|
+
email: p?.email,
|
|
41750
|
+
url: base ? `${base}/u/${handle}` : `/u/${handle}`,
|
|
41751
|
+
};
|
|
41752
|
+
});
|
|
41702
41753
|
this._userId = computed(() => this.auth.user()?.userId ?? null);
|
|
41703
41754
|
this.errorState = computed(() => {
|
|
41704
41755
|
this.i18n.lang();
|
|
@@ -42122,10 +42173,18 @@ class ProfileViewComponent {
|
|
|
42122
42173
|
}
|
|
42123
42174
|
|
|
42124
42175
|
<val-form #form [props]="formMeta" (onSubmit)="onSubmit($event)" />
|
|
42176
|
+
|
|
42177
|
+
@if (resolvedConfig().showShareCta && p.handle) {
|
|
42178
|
+
<section class="settings-section share-cta-section">
|
|
42179
|
+
<val-cta-card [props]="shareCta()" (onAction)="shareOpen.set(true)" />
|
|
42180
|
+
</section>
|
|
42181
|
+
}
|
|
42125
42182
|
}
|
|
42126
42183
|
}
|
|
42127
42184
|
</div>
|
|
42128
|
-
|
|
42185
|
+
|
|
42186
|
+
<val-share-profile-modal [isOpen]="shareOpen()" [props]="shareModal()" (dismissed)="shareOpen.set(false)" />
|
|
42187
|
+
`, isInline: true, styles: [".page{padding:16px 0;max-width:720px;margin:0 auto}.page-header{margin-bottom:16px}.page-header h1{font-size:22px;font-weight:700;margin:0 0 4px}.hint{font-size:13px;opacity:.7;margin:0 0 12px}.settings-section{padding:16px 0}.settings-section+.settings-section{border-top:1px solid var(--val-border-color, rgba(0, 0, 0, .08))}.avatar-section{display:flex;align-items:center;gap:16px}.avatar-meta{display:flex;flex-direction:column;gap:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: AvatarUploadComponent, selector: "val-avatar-upload", inputs: ["props"], outputs: ["uploaded", "error", "uploadStart"] }, { kind: "component", type: EmptyStateComponent, selector: "val-empty-state", inputs: ["props"] }, { kind: "component", type: FormComponent, selector: "val-form", inputs: ["props"], outputs: ["onSubmit", "onInvalid", "onSelectChange"] }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TextComponent, selector: "val-text", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: SkeletonLayoutComponent, selector: "val-skeleton-layout", inputs: ["props"] }, { kind: "component", type: CtaCardComponent, selector: "val-cta-card", inputs: ["props"], outputs: ["onAction"] }, { kind: "component", type: ShareProfileModalComponent, selector: "val-share-profile-modal", inputs: ["isOpen", "props"], outputs: ["dismissed", "shared"] }] }); }
|
|
42129
42188
|
}
|
|
42130
42189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProfileViewComponent, decorators: [{
|
|
42131
42190
|
type: Component,
|
|
@@ -42139,6 +42198,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
42139
42198
|
TextComponent,
|
|
42140
42199
|
TitleComponent,
|
|
42141
42200
|
SkeletonLayoutComponent,
|
|
42201
|
+
CtaCardComponent,
|
|
42202
|
+
ShareProfileModalComponent,
|
|
42142
42203
|
], template: `
|
|
42143
42204
|
<div class="page">
|
|
42144
42205
|
<header class="page-header">
|
|
@@ -42198,9 +42259,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
42198
42259
|
}
|
|
42199
42260
|
|
|
42200
42261
|
<val-form #form [props]="formMeta" (onSubmit)="onSubmit($event)" />
|
|
42262
|
+
|
|
42263
|
+
@if (resolvedConfig().showShareCta && p.handle) {
|
|
42264
|
+
<section class="settings-section share-cta-section">
|
|
42265
|
+
<val-cta-card [props]="shareCta()" (onAction)="shareOpen.set(true)" />
|
|
42266
|
+
</section>
|
|
42267
|
+
}
|
|
42201
42268
|
}
|
|
42202
42269
|
}
|
|
42203
42270
|
</div>
|
|
42271
|
+
|
|
42272
|
+
<val-share-profile-modal [isOpen]="shareOpen()" [props]="shareModal()" (dismissed)="shareOpen.set(false)" />
|
|
42204
42273
|
`, styles: [".page{padding:16px 0;max-width:720px;margin:0 auto}.page-header{margin-bottom:16px}.page-header h1{font-size:22px;font-weight:700;margin:0 0 4px}.hint{font-size:13px;opacity:.7;margin:0 0 12px}.settings-section{padding:16px 0}.settings-section+.settings-section{border-top:1px solid var(--val-border-color, rgba(0, 0, 0, .08))}.avatar-section{display:flex;align-items:center;gap:16px}.avatar-meta{display:flex;flex-direction:column;gap:2px}\n"] }]
|
|
42205
42274
|
}], ctorParameters: () => [], propDecorators: { config: [{
|
|
42206
42275
|
type: Input
|