valtech-components 2.0.910 → 2.0.912
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/avatar-upload/avatar-upload.component.mjs +45 -11
- package/esm2022/lib/services/i18n/default-content.mjs +5 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +48 -10
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +2 -2
- package/lib/components/organisms/avatar-upload/avatar-upload.component.d.ts +2 -0
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +1 -1
- 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.912';
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Servicio para gestionar presets de componentes.
|
|
@@ -4688,6 +4688,8 @@ const VALTECH_DEFAULT_CONTENT = {
|
|
|
4688
4688
|
es: {
|
|
4689
4689
|
// Actions
|
|
4690
4690
|
changePhoto: 'Cambiar foto',
|
|
4691
|
+
viewPhoto: 'Ver foto',
|
|
4692
|
+
closePhoto: 'Cerrar',
|
|
4691
4693
|
cropImage: 'Recortar imagen',
|
|
4692
4694
|
confirm: 'Confirmar',
|
|
4693
4695
|
// Status
|
|
@@ -4704,6 +4706,8 @@ const VALTECH_DEFAULT_CONTENT = {
|
|
|
4704
4706
|
en: {
|
|
4705
4707
|
// Actions
|
|
4706
4708
|
changePhoto: 'Change photo',
|
|
4709
|
+
viewPhoto: 'View photo',
|
|
4710
|
+
closePhoto: 'Close',
|
|
4707
4711
|
cropImage: 'Crop image',
|
|
4708
4712
|
confirm: 'Confirm',
|
|
4709
4713
|
// Status
|
|
@@ -38781,6 +38785,11 @@ class AvatarUploadComponent {
|
|
|
38781
38785
|
this.i18n.lang();
|
|
38782
38786
|
return this.i18n.t('viewPhoto', this.config().i18nNamespace) || 'Ver foto';
|
|
38783
38787
|
});
|
|
38788
|
+
/** Label for close button inside photo viewer */
|
|
38789
|
+
this.closePhotoLabel = computed(() => {
|
|
38790
|
+
this.i18n.lang();
|
|
38791
|
+
return this.i18n.t('closePhoto', this.config().i18nNamespace) || 'Cerrar';
|
|
38792
|
+
});
|
|
38784
38793
|
}
|
|
38785
38794
|
/** Open file picker dialog */
|
|
38786
38795
|
openFilePicker() {
|
|
@@ -38983,12 +38992,21 @@ class AvatarUploadComponent {
|
|
|
38983
38992
|
<ion-modal
|
|
38984
38993
|
[isOpen]="showViewModal()"
|
|
38985
38994
|
(didDismiss)="showViewModal.set(false)"
|
|
38986
|
-
[breakpoints]="[0, 0.
|
|
38987
|
-
[initialBreakpoint]="0.
|
|
38995
|
+
[breakpoints]="[0, 0.55]"
|
|
38996
|
+
[initialBreakpoint]="0.55"
|
|
38988
38997
|
[handle]="true"
|
|
38989
38998
|
>
|
|
38990
38999
|
<ng-template>
|
|
38991
|
-
<ion-
|
|
39000
|
+
<ion-header [translucent]="true">
|
|
39001
|
+
<ion-toolbar>
|
|
39002
|
+
<ion-buttons slot="end">
|
|
39003
|
+
<ion-button fill="clear" color="dark" (click)="showViewModal.set(false)">
|
|
39004
|
+
<strong>{{ closePhotoLabel() }}</strong>
|
|
39005
|
+
</ion-button>
|
|
39006
|
+
</ion-buttons>
|
|
39007
|
+
</ion-toolbar>
|
|
39008
|
+
</ion-header>
|
|
39009
|
+
<ion-content>
|
|
38992
39010
|
<div class="photo-viewer">
|
|
38993
39011
|
<img class="photo-viewer__img" [src]="displayUrl()" alt="Photo" />
|
|
38994
39012
|
</div>
|
|
@@ -38996,11 +39014,22 @@ class AvatarUploadComponent {
|
|
|
38996
39014
|
</ng-template>
|
|
38997
39015
|
</ion-modal>
|
|
38998
39016
|
</div>
|
|
38999
|
-
`, isInline: true, styles: [".avatar-upload{--avatar-size: 100px;--edit-button-size: 32px;--edit-button-offset: 4px;display:inline-block}.avatar-container{position:relative;width:var(--avatar-size);height:var(--avatar-size);border-radius:50%;overflow:visible}.avatar-image{width:100%;height:100%;border-radius:50%;object-fit:cover;background-color:var(--ion-color-light)}.avatar-initials{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--avatar-size) * .4);font-weight:600;color:#fff;text-transform:uppercase;-webkit-user-select:none;user-select:none}.edit-button{position:absolute;bottom:var(--edit-button-offset);right:var(--edit-button-offset);width:var(--edit-button-size);height:var(--edit-button-size);border-radius:50%;border:2px solid white;background:var(--ion-color-primary);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .2s ease,background-color .2s ease;box-shadow:0 2px 8px #00000026}.edit-button ion-icon{font-size:calc(var(--edit-button-size) * .5)}.edit-button:hover{transform:scale(1.1);background:var(--ion-color-primary-shade)}.edit-button:active{transform:scale(.95)}.edit-button:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:2px}.loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background:#00000080;display:flex;align-items:center;justify-content:center}.loading-overlay ion-spinner{--color: white;width:calc(var(--avatar-size) * .4);height:calc(var(--avatar-size) * .4)}.avatar-upload--loading .edit-button{display:none}.avatar-upload--loading .avatar-image,.avatar-upload--loading .avatar-initials{filter:brightness(.7)}.view-photo-btn{display:block;background:none;border:none;padding:0;margin-top:6px;font-size:.8rem;color:var(--ion-color-primary);cursor:pointer;font-family:inherit;text-decoration:underline;text-underline-offset:2px;text-align:center;width:var(--avatar-size)}.view-photo-btn:active{opacity:.7}.photo-viewer
|
|
39017
|
+
`, isInline: true, styles: [".avatar-upload{--avatar-size: 100px;--edit-button-size: 32px;--edit-button-offset: 4px;display:inline-block}.avatar-container{position:relative;width:var(--avatar-size);height:var(--avatar-size);border-radius:50%;overflow:visible}.avatar-image{width:100%;height:100%;border-radius:50%;object-fit:cover;background-color:var(--ion-color-light)}.avatar-initials{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--avatar-size) * .4);font-weight:600;color:#fff;text-transform:uppercase;-webkit-user-select:none;user-select:none}.edit-button{position:absolute;bottom:var(--edit-button-offset);right:var(--edit-button-offset);width:var(--edit-button-size);height:var(--edit-button-size);border-radius:50%;border:2px solid white;background:var(--ion-color-primary);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .2s ease,background-color .2s ease;box-shadow:0 2px 8px #00000026}.edit-button ion-icon{font-size:calc(var(--edit-button-size) * .5)}.edit-button:hover{transform:scale(1.1);background:var(--ion-color-primary-shade)}.edit-button:active{transform:scale(.95)}.edit-button:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:2px}.loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background:#00000080;display:flex;align-items:center;justify-content:center}.loading-overlay ion-spinner{--color: white;width:calc(var(--avatar-size) * .4);height:calc(var(--avatar-size) * .4)}.avatar-upload--loading .edit-button{display:none}.avatar-upload--loading .avatar-image,.avatar-upload--loading .avatar-initials{filter:brightness(.7)}.view-photo-btn{display:block;background:none;border:none;padding:0;margin-top:6px;font-size:.8rem;color:var(--ion-color-primary);cursor:pointer;font-family:inherit;text-decoration:underline;text-underline-offset:2px;text-align:center;width:var(--avatar-size)}.view-photo-btn:active{opacity:.7}.photo-viewer{display:flex;align-items:center;justify-content:center;padding:20px 24px 28px}.photo-viewer__img{width:min(72vw,280px);height:min(72vw,280px);border-radius:20px;object-fit:cover;box-shadow:0 8px 32px #0000002e}@container (max-width: 60px){.edit-button{--edit-button-size: 24px;--edit-button-offset: 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: ImageCropComponent, selector: "val-image-crop", inputs: ["image", "aspectRatio", "roundCropper", "resizeToWidth", "i18nNamespace"], outputs: ["cropComplete", "cancel", "loadFailed"] }] }); }
|
|
39000
39018
|
}
|
|
39001
39019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AvatarUploadComponent, decorators: [{
|
|
39002
39020
|
type: Component,
|
|
39003
|
-
args: [{ selector: 'val-avatar-upload', standalone: true, imports: [
|
|
39021
|
+
args: [{ selector: 'val-avatar-upload', standalone: true, imports: [
|
|
39022
|
+
CommonModule,
|
|
39023
|
+
IonIcon,
|
|
39024
|
+
IonSpinner,
|
|
39025
|
+
IonModal,
|
|
39026
|
+
IonContent,
|
|
39027
|
+
IonHeader,
|
|
39028
|
+
IonToolbar,
|
|
39029
|
+
IonButtons,
|
|
39030
|
+
IonButton,
|
|
39031
|
+
ImageCropComponent,
|
|
39032
|
+
], template: `
|
|
39004
39033
|
<div class="avatar-upload" [style.--avatar-size.px]="config().size" [class.avatar-upload--loading]="loading()">
|
|
39005
39034
|
<div class="avatar-container">
|
|
39006
39035
|
<!-- Avatar Image or Initials -->
|
|
@@ -39070,12 +39099,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
39070
39099
|
<ion-modal
|
|
39071
39100
|
[isOpen]="showViewModal()"
|
|
39072
39101
|
(didDismiss)="showViewModal.set(false)"
|
|
39073
|
-
[breakpoints]="[0, 0.
|
|
39074
|
-
[initialBreakpoint]="0.
|
|
39102
|
+
[breakpoints]="[0, 0.55]"
|
|
39103
|
+
[initialBreakpoint]="0.55"
|
|
39075
39104
|
[handle]="true"
|
|
39076
39105
|
>
|
|
39077
39106
|
<ng-template>
|
|
39078
|
-
<ion-
|
|
39107
|
+
<ion-header [translucent]="true">
|
|
39108
|
+
<ion-toolbar>
|
|
39109
|
+
<ion-buttons slot="end">
|
|
39110
|
+
<ion-button fill="clear" color="dark" (click)="showViewModal.set(false)">
|
|
39111
|
+
<strong>{{ closePhotoLabel() }}</strong>
|
|
39112
|
+
</ion-button>
|
|
39113
|
+
</ion-buttons>
|
|
39114
|
+
</ion-toolbar>
|
|
39115
|
+
</ion-header>
|
|
39116
|
+
<ion-content>
|
|
39079
39117
|
<div class="photo-viewer">
|
|
39080
39118
|
<img class="photo-viewer__img" [src]="displayUrl()" alt="Photo" />
|
|
39081
39119
|
</div>
|
|
@@ -39083,7 +39121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
39083
39121
|
</ng-template>
|
|
39084
39122
|
</ion-modal>
|
|
39085
39123
|
</div>
|
|
39086
|
-
`, styles: [".avatar-upload{--avatar-size: 100px;--edit-button-size: 32px;--edit-button-offset: 4px;display:inline-block}.avatar-container{position:relative;width:var(--avatar-size);height:var(--avatar-size);border-radius:50%;overflow:visible}.avatar-image{width:100%;height:100%;border-radius:50%;object-fit:cover;background-color:var(--ion-color-light)}.avatar-initials{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--avatar-size) * .4);font-weight:600;color:#fff;text-transform:uppercase;-webkit-user-select:none;user-select:none}.edit-button{position:absolute;bottom:var(--edit-button-offset);right:var(--edit-button-offset);width:var(--edit-button-size);height:var(--edit-button-size);border-radius:50%;border:2px solid white;background:var(--ion-color-primary);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .2s ease,background-color .2s ease;box-shadow:0 2px 8px #00000026}.edit-button ion-icon{font-size:calc(var(--edit-button-size) * .5)}.edit-button:hover{transform:scale(1.1);background:var(--ion-color-primary-shade)}.edit-button:active{transform:scale(.95)}.edit-button:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:2px}.loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background:#00000080;display:flex;align-items:center;justify-content:center}.loading-overlay ion-spinner{--color: white;width:calc(var(--avatar-size) * .4);height:calc(var(--avatar-size) * .4)}.avatar-upload--loading .edit-button{display:none}.avatar-upload--loading .avatar-image,.avatar-upload--loading .avatar-initials{filter:brightness(.7)}.view-photo-btn{display:block;background:none;border:none;padding:0;margin-top:6px;font-size:.8rem;color:var(--ion-color-primary);cursor:pointer;font-family:inherit;text-decoration:underline;text-underline-offset:2px;text-align:center;width:var(--avatar-size)}.view-photo-btn:active{opacity:.7}.photo-viewer
|
|
39124
|
+
`, styles: [".avatar-upload{--avatar-size: 100px;--edit-button-size: 32px;--edit-button-offset: 4px;display:inline-block}.avatar-container{position:relative;width:var(--avatar-size);height:var(--avatar-size);border-radius:50%;overflow:visible}.avatar-image{width:100%;height:100%;border-radius:50%;object-fit:cover;background-color:var(--ion-color-light)}.avatar-initials{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--avatar-size) * .4);font-weight:600;color:#fff;text-transform:uppercase;-webkit-user-select:none;user-select:none}.edit-button{position:absolute;bottom:var(--edit-button-offset);right:var(--edit-button-offset);width:var(--edit-button-size);height:var(--edit-button-size);border-radius:50%;border:2px solid white;background:var(--ion-color-primary);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .2s ease,background-color .2s ease;box-shadow:0 2px 8px #00000026}.edit-button ion-icon{font-size:calc(var(--edit-button-size) * .5)}.edit-button:hover{transform:scale(1.1);background:var(--ion-color-primary-shade)}.edit-button:active{transform:scale(.95)}.edit-button:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:2px}.loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background:#00000080;display:flex;align-items:center;justify-content:center}.loading-overlay ion-spinner{--color: white;width:calc(var(--avatar-size) * .4);height:calc(var(--avatar-size) * .4)}.avatar-upload--loading .edit-button{display:none}.avatar-upload--loading .avatar-image,.avatar-upload--loading .avatar-initials{filter:brightness(.7)}.view-photo-btn{display:block;background:none;border:none;padding:0;margin-top:6px;font-size:.8rem;color:var(--ion-color-primary);cursor:pointer;font-family:inherit;text-decoration:underline;text-underline-offset:2px;text-align:center;width:var(--avatar-size)}.view-photo-btn:active{opacity:.7}.photo-viewer{display:flex;align-items:center;justify-content:center;padding:20px 24px 28px}.photo-viewer__img{width:min(72vw,280px);height:min(72vw,280px);border-radius:20px;object-fit:cover;box-shadow:0 8px 32px #0000002e}@container (max-width: 60px){.edit-button{--edit-button-size: 24px;--edit-button-offset: 0}}\n"] }]
|
|
39087
39125
|
}], propDecorators: { fileInput: [{
|
|
39088
39126
|
type: ViewChild,
|
|
39089
39127
|
args: ['fileInput']
|