@eagami/ui 5.27.0 → 5.28.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/fesm2022/eagami-ui.mjs +305 -138
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +13 -2
package/fesm2022/eagami-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer, inject, CSP_NONCE, signal, effect, computed, Injectable, input, ChangeDetectionStrategy, Component, HostBinding, Directive, model, output, Injector, afterNextRender, DestroyRef, viewChild, ElementRef, HostListener, forwardRef, Renderer2, ViewContainerRef, TemplateRef, RendererStyleFlags2,
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer, inject, CSP_NONCE, signal, effect, computed, Injectable, input, ChangeDetectionStrategy, Component, HostBinding, Directive, model, output, Injector, afterNextRender, DestroyRef, viewChild, ElementRef, untracked, HostListener, forwardRef, Renderer2, ViewContainerRef, TemplateRef, RendererStyleFlags2, ViewEncapsulation, contentChild, viewChildren, PLATFORM_ID, afterRenderEffect } from '@angular/core';
|
|
3
3
|
import { NgClass, NgComponentOutlet, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import { NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
|
|
@@ -438,7 +438,7 @@ const messages$e = {
|
|
|
438
438
|
},
|
|
439
439
|
avatarEditor: {
|
|
440
440
|
upload: 'تحميل صورة',
|
|
441
|
-
dropzone: 'أفلت الصورة أو انقر
|
|
441
|
+
dropzone: 'أفلت الصورة أو انقر للاختيار',
|
|
442
442
|
canvas: 'معاينة الصورة، اسحب أو استخدم مفاتيح الأسهم للتحريك، وشريط التمرير للتكبير',
|
|
443
443
|
canvasInstructions: 'استخدم مفاتيح الأسهم لتحريك الصورة، وعلامتي الزائد والناقص للتكبير والتصغير، وEnter أو المسافة لاختيار صورة أخرى',
|
|
444
444
|
change: 'تغيير الصورة',
|
|
@@ -647,7 +647,7 @@ const messages$d = {
|
|
|
647
647
|
},
|
|
648
648
|
avatarEditor: {
|
|
649
649
|
upload: 'Bild hochladen',
|
|
650
|
-
dropzone: 'Bild ablegen oder zum
|
|
650
|
+
dropzone: 'Bild ablegen oder zum Auswählen klicken',
|
|
651
651
|
canvas: 'Bildvorschau, ziehen oder Pfeiltasten zum Verschieben verwenden, Schieberegler zum Zoomen',
|
|
652
652
|
canvasInstructions: 'Pfeiltasten zum Verschieben des Bildes, Plus und Minus zum Zoomen, Eingabetaste oder Leertaste zum Auswählen eines anderen Fotos verwenden',
|
|
653
653
|
change: 'Foto ändern',
|
|
@@ -848,7 +848,7 @@ const messages$c = {
|
|
|
848
848
|
},
|
|
849
849
|
avatarEditor: {
|
|
850
850
|
upload: 'Μεταφόρτωση εικόνας',
|
|
851
|
-
dropzone: 'Αποθέστε μια εικόνα ή κάντε κλικ για
|
|
851
|
+
dropzone: 'Αποθέστε μια εικόνα ή κάντε κλικ για επιλογή',
|
|
852
852
|
canvas: 'Προεπισκόπηση εικόνας, σύρετε ή χρησιμοποιήστε τα βέλη για μετακίνηση, το ρυθμιστικό για ζουμ',
|
|
853
853
|
canvasInstructions: 'Χρησιμοποιήστε τα βέλη για να μετακινήσετε την εικόνα, το συν και το πλην για ζουμ, και Enter ή Space για να επιλέξετε διαφορετική φωτογραφία',
|
|
854
854
|
change: 'Αλλαγή φωτογραφίας',
|
|
@@ -1049,7 +1049,7 @@ const messages$b = {
|
|
|
1049
1049
|
},
|
|
1050
1050
|
avatarEditor: {
|
|
1051
1051
|
upload: 'Upload image',
|
|
1052
|
-
dropzone: 'Drop image or click to
|
|
1052
|
+
dropzone: 'Drop image or click to browse',
|
|
1053
1053
|
canvas: 'Image preview, drag or use arrow keys to pan, slider to zoom',
|
|
1054
1054
|
canvasInstructions: 'Use the arrow keys to move the image, plus and minus to zoom, and Enter or Space to choose a different photo',
|
|
1055
1055
|
change: 'Change photo',
|
|
@@ -1250,7 +1250,7 @@ const messages$a = {
|
|
|
1250
1250
|
},
|
|
1251
1251
|
avatarEditor: {
|
|
1252
1252
|
upload: 'Subir imagen',
|
|
1253
|
-
dropzone: 'Suelta una imagen o haz clic para
|
|
1253
|
+
dropzone: 'Suelta una imagen o haz clic para elegir',
|
|
1254
1254
|
canvas: 'Vista previa de la imagen, arrastra o usa las flechas para desplazar, el control deslizante para ampliar',
|
|
1255
1255
|
canvasInstructions: 'Usa las flechas para mover la imagen, más y menos para ampliar, y Intro o Espacio para elegir otra foto',
|
|
1256
1256
|
change: 'Cambiar foto',
|
|
@@ -1451,7 +1451,7 @@ const messages$9 = {
|
|
|
1451
1451
|
},
|
|
1452
1452
|
avatarEditor: {
|
|
1453
1453
|
upload: 'Téléverser une image',
|
|
1454
|
-
dropzone: 'Déposez une image ou cliquez pour
|
|
1454
|
+
dropzone: 'Déposez une image ou cliquez pour parcourir',
|
|
1455
1455
|
canvas: "Aperçu de l'image, faites glisser ou utilisez les flèches pour déplacer, le curseur pour zoomer",
|
|
1456
1456
|
canvasInstructions: "Utilisez les flèches pour déplacer l'image, plus et moins pour zoomer, et Entrée ou Espace pour choisir une autre photo",
|
|
1457
1457
|
change: 'Changer la photo',
|
|
@@ -1652,7 +1652,7 @@ const messages$8 = {
|
|
|
1652
1652
|
},
|
|
1653
1653
|
avatarEditor: {
|
|
1654
1654
|
upload: 'העלאת תמונה',
|
|
1655
|
-
dropzone: 'גרור תמונה או לחץ
|
|
1655
|
+
dropzone: 'גרור תמונה או לחץ לבחירה',
|
|
1656
1656
|
canvas: 'תצוגה מקדימה של התמונה, גרור או השתמש במקשי החצים להזזה ובמחוון לזום',
|
|
1657
1657
|
canvasInstructions: 'השתמש במקשי החצים להזזת התמונה, בפלוס ומינוס לזום, וב-Enter או ברווח לבחירת תמונה אחרת',
|
|
1658
1658
|
change: 'החלפת תמונה',
|
|
@@ -1853,7 +1853,7 @@ const messages$7 = {
|
|
|
1853
1853
|
},
|
|
1854
1854
|
avatarEditor: {
|
|
1855
1855
|
upload: 'छवि अपलोड करें',
|
|
1856
|
-
dropzone: 'छवि छोड़ें या
|
|
1856
|
+
dropzone: 'छवि छोड़ें या चुनने के लिए क्लिक करें',
|
|
1857
1857
|
canvas: 'छवि पूर्वावलोकन, पैन करने के लिए खींचें या तीर कुंजियों का उपयोग करें, ज़ूम के लिए स्लाइडर',
|
|
1858
1858
|
canvasInstructions: 'छवि को हिलाने के लिए तीर कुंजियों का उपयोग करें, ज़ूम के लिए प्लस और माइनस, और दूसरी फ़ोटो चुनने के लिए Enter या Space दबाएं',
|
|
1859
1859
|
change: 'फ़ोटो बदलें',
|
|
@@ -2054,7 +2054,7 @@ const messages$6 = {
|
|
|
2054
2054
|
},
|
|
2055
2055
|
avatarEditor: {
|
|
2056
2056
|
upload: 'Hlaða upp mynd',
|
|
2057
|
-
dropzone: 'Slepptu mynd eða smelltu til að
|
|
2057
|
+
dropzone: 'Slepptu mynd eða smelltu til að velja',
|
|
2058
2058
|
canvas: 'Forskoðun myndar, dragðu eða notaðu örvatakka til að hreyfa, sleða til að aðdrátta',
|
|
2059
2059
|
canvasInstructions: 'Notaðu örvatakkana til að hreyfa myndina, plús og mínus til að breyta aðdrætti og Enter eða bilslá til að velja aðra mynd',
|
|
2060
2060
|
change: 'Skipta um mynd',
|
|
@@ -2255,7 +2255,7 @@ const messages$5 = {
|
|
|
2255
2255
|
},
|
|
2256
2256
|
avatarEditor: {
|
|
2257
2257
|
upload: 'Afbeelding uploaden',
|
|
2258
|
-
dropzone: 'Sleep een afbeelding hierheen of klik om te
|
|
2258
|
+
dropzone: 'Sleep een afbeelding hierheen of klik om te bladeren',
|
|
2259
2259
|
canvas: 'Voorbeeld van afbeelding, sleep of gebruik de pijltjestoetsen om te verplaatsen, schuifregelaar om te zoomen',
|
|
2260
2260
|
canvasInstructions: 'Gebruik de pijltjestoetsen om de afbeelding te verplaatsen, plus en min om te zoomen, en Enter of de spatiebalk om een andere foto te kiezen',
|
|
2261
2261
|
change: 'Foto wijzigen',
|
|
@@ -2456,7 +2456,7 @@ const messages$4 = {
|
|
|
2456
2456
|
},
|
|
2457
2457
|
avatarEditor: {
|
|
2458
2458
|
upload: 'Prześlij obraz',
|
|
2459
|
-
dropzone: 'Upuść obraz lub kliknij, aby
|
|
2459
|
+
dropzone: 'Upuść obraz lub kliknij, aby wybrać',
|
|
2460
2460
|
canvas: 'Podgląd obrazu, przeciągnij lub użyj strzałek, aby przesunąć, suwaka, aby przybliżyć',
|
|
2461
2461
|
canvasInstructions: 'Użyj strzałek, aby przesunąć obraz, plusa i minusa, aby zmienić powiększenie, oraz Enter lub spacji, aby wybrać inne zdjęcie',
|
|
2462
2462
|
change: 'Zmień zdjęcie',
|
|
@@ -2657,7 +2657,7 @@ const messages$3 = {
|
|
|
2657
2657
|
},
|
|
2658
2658
|
avatarEditor: {
|
|
2659
2659
|
upload: 'Enviar imagem',
|
|
2660
|
-
dropzone: 'Solte a imagem ou clique para
|
|
2660
|
+
dropzone: 'Solte a imagem ou clique para escolher',
|
|
2661
2661
|
canvas: 'Pré-visualização da imagem, arraste ou use as setas para deslocar, o controle deslizante para ampliar',
|
|
2662
2662
|
canvasInstructions: 'Use as setas para mover a imagem, mais e menos para ajustar o zoom, e Enter ou Espaço para escolher outra foto',
|
|
2663
2663
|
change: 'Trocar foto',
|
|
@@ -2858,7 +2858,7 @@ const messages$2 = {
|
|
|
2858
2858
|
},
|
|
2859
2859
|
avatarEditor: {
|
|
2860
2860
|
upload: 'Загрузить изображение',
|
|
2861
|
-
dropzone: 'Перетащите изображение или
|
|
2861
|
+
dropzone: 'Перетащите изображение или нажмите, чтобы выбрать',
|
|
2862
2862
|
canvas: 'Предпросмотр изображения, перетаскивайте или используйте стрелки для перемещения, ползунок для масштабирования',
|
|
2863
2863
|
canvasInstructions: 'Используйте стрелки, чтобы перемещать изображение, плюс и минус для масштабирования, а Enter или пробел, чтобы выбрать другую фотографию',
|
|
2864
2864
|
change: 'Изменить фото',
|
|
@@ -3059,7 +3059,7 @@ const messages$1 = {
|
|
|
3059
3059
|
},
|
|
3060
3060
|
avatarEditor: {
|
|
3061
3061
|
upload: 'Завантажити зображення',
|
|
3062
|
-
dropzone: 'Перетягніть зображення або натисніть, щоб
|
|
3062
|
+
dropzone: 'Перетягніть зображення або натисніть, щоб вибрати',
|
|
3063
3063
|
canvas: 'Попередній перегляд зображення, перетягуйте або використовуйте стрілки для переміщення, повзунок для масштабування',
|
|
3064
3064
|
canvasInstructions: 'Використовуйте стрілки, щоб переміщувати зображення, плюс і мінус, щоб змінювати масштаб, а Enter або пробіл, щоб вибрати інше фото',
|
|
3065
3065
|
change: 'Змінити фото',
|
|
@@ -3260,7 +3260,7 @@ const messages = {
|
|
|
3260
3260
|
},
|
|
3261
3261
|
avatarEditor: {
|
|
3262
3262
|
upload: '上传图片',
|
|
3263
|
-
dropzone: '
|
|
3263
|
+
dropzone: '拖放图片或点击选择',
|
|
3264
3264
|
canvas: '图片预览,拖动或使用方向键平移,使用滑块缩放',
|
|
3265
3265
|
canvasInstructions: '使用方向键移动图片,加号和减号缩放,按 Enter 或空格键选择其他照片',
|
|
3266
3266
|
change: '更换照片',
|
|
@@ -4272,6 +4272,74 @@ function isRtl(element) {
|
|
|
4272
4272
|
return getComputedStyle(element).direction === 'rtl';
|
|
4273
4273
|
}
|
|
4274
4274
|
|
|
4275
|
+
/**
|
|
4276
|
+
* Tracks where the press behind the current `click` started and ended.
|
|
4277
|
+
*
|
|
4278
|
+
* A `click` is dispatched on the nearest common ancestor of the press and the
|
|
4279
|
+
* release, so a drag that begins on a panel and ends on the backdrop arrives as
|
|
4280
|
+
* a click on the backdrop. Dismissal handlers that only read `event.target`
|
|
4281
|
+
* therefore treat "select text in a dialog, release outside it" as an outside
|
|
4282
|
+
* click, and shut the dialog under the user. Consulting both ends of the press
|
|
4283
|
+
* keeps a dismissal to presses that stayed outside from start to finish.
|
|
4284
|
+
*
|
|
4285
|
+
* Both ends read `null` for a click with no pointer behind it (keyboard
|
|
4286
|
+
* activation, `element.click()`), which every check below treats as a plain
|
|
4287
|
+
* click on its target.
|
|
4288
|
+
*/
|
|
4289
|
+
class PointerPressTracker {
|
|
4290
|
+
downTarget = null;
|
|
4291
|
+
upTarget = null;
|
|
4292
|
+
onDown = (event) => {
|
|
4293
|
+
this.downTarget = event.target;
|
|
4294
|
+
this.upTarget = null;
|
|
4295
|
+
};
|
|
4296
|
+
onUp = (event) => {
|
|
4297
|
+
this.upTarget = event.target;
|
|
4298
|
+
};
|
|
4299
|
+
// A keyboard-driven click carries no pointer events of its own, and would
|
|
4300
|
+
// otherwise be read against whichever press came before it
|
|
4301
|
+
onKeydown = () => {
|
|
4302
|
+
this.downTarget = null;
|
|
4303
|
+
this.upTarget = null;
|
|
4304
|
+
};
|
|
4305
|
+
constructor() {
|
|
4306
|
+
if (typeof document === 'undefined') {
|
|
4307
|
+
return;
|
|
4308
|
+
}
|
|
4309
|
+
// Capture phase, so a handler that stops propagation cannot hide the press
|
|
4310
|
+
document.addEventListener('pointerdown', this.onDown, true);
|
|
4311
|
+
document.addEventListener('pointerup', this.onUp, true);
|
|
4312
|
+
document.addEventListener('keydown', this.onKeydown, true);
|
|
4313
|
+
inject(DestroyRef).onDestroy(() => {
|
|
4314
|
+
document.removeEventListener('pointerdown', this.onDown, true);
|
|
4315
|
+
document.removeEventListener('pointerup', this.onUp, true);
|
|
4316
|
+
document.removeEventListener('keydown', this.onKeydown, true);
|
|
4317
|
+
});
|
|
4318
|
+
}
|
|
4319
|
+
/** True when either end of the press landed on `el` or inside it. */
|
|
4320
|
+
touchedInside(el) {
|
|
4321
|
+
if (!el) {
|
|
4322
|
+
return false;
|
|
4323
|
+
}
|
|
4324
|
+
return ((this.downTarget !== null && el.contains(this.downTarget)) ||
|
|
4325
|
+
(this.upTarget !== null && el.contains(this.upTarget)));
|
|
4326
|
+
}
|
|
4327
|
+
/** True when neither end of the press landed anywhere but `el` itself. */
|
|
4328
|
+
stayedOn(el) {
|
|
4329
|
+
if (!el) {
|
|
4330
|
+
return false;
|
|
4331
|
+
}
|
|
4332
|
+
return ((this.downTarget === null || this.downTarget === el) &&
|
|
4333
|
+
(this.upTarget === null || this.upTarget === el));
|
|
4334
|
+
}
|
|
4335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: PointerPressTracker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4336
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: PointerPressTracker, providedIn: 'root' });
|
|
4337
|
+
}
|
|
4338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: PointerPressTracker, decorators: [{
|
|
4339
|
+
type: Injectable,
|
|
4340
|
+
args: [{ providedIn: 'root' }]
|
|
4341
|
+
}], ctorParameters: () => [] });
|
|
4342
|
+
|
|
4275
4343
|
/*
|
|
4276
4344
|
* A modal `<dialog>` (`showModal()`) renders in the browser's top layer, which
|
|
4277
4345
|
* paints above every z-index in the normal layer. An overlay portaled to
|
|
@@ -4514,6 +4582,7 @@ function computePopoverPosition(anchorRect, popoverRect, viewport, options) {
|
|
|
4514
4582
|
*/
|
|
4515
4583
|
class PopoverComponent {
|
|
4516
4584
|
destroyRef = inject(DestroyRef);
|
|
4585
|
+
press = inject(PointerPressTracker);
|
|
4517
4586
|
surfaceEl = viewChild('surfaceEl', /* @ts-ignore */
|
|
4518
4587
|
...(ngDevMode ? [{ debugName: "surfaceEl" }] : /* istanbul ignore next */ []));
|
|
4519
4588
|
/** Anchor element the popover positions itself against. */
|
|
@@ -4572,6 +4641,14 @@ class PopoverComponent {
|
|
|
4572
4641
|
closeRequested = output();
|
|
4573
4642
|
position = signal(null, /* @ts-ignore */
|
|
4574
4643
|
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
4644
|
+
/* The side an open panel settled on, fed back in as the requested placement
|
|
4645
|
+
on every later reposition. Content shrinking (a filtered option list losing
|
|
4646
|
+
rows) frees up room on the original side again, and recomputing from the
|
|
4647
|
+
input placement would jump the panel back across the anchor mid-interaction;
|
|
4648
|
+
going through the flip logic keeps the move available for when the settled
|
|
4649
|
+
side genuinely stops fitting. Keyed by the requested placement so a changed
|
|
4650
|
+
input still wins. */
|
|
4651
|
+
latched = null;
|
|
4575
4652
|
/** True placement after flip, for class-based styling (e.g. arrow direction). */
|
|
4576
4653
|
effectivePlacement = computed(() => this.position()?.placement ?? this.placement(), /* @ts-ignore */
|
|
4577
4654
|
...(ngDevMode ? [{ debugName: "effectivePlacement" }] : /* istanbul ignore next */ []));
|
|
@@ -4647,6 +4724,7 @@ class PopoverComponent {
|
|
|
4647
4724
|
}
|
|
4648
4725
|
this.position.set(null);
|
|
4649
4726
|
this.stable.set(false);
|
|
4727
|
+
this.latched = null;
|
|
4650
4728
|
return;
|
|
4651
4729
|
}
|
|
4652
4730
|
// Join the top layer before the first measurement below, so a popover
|
|
@@ -4795,14 +4873,22 @@ class PopoverComponent {
|
|
|
4795
4873
|
}
|
|
4796
4874
|
const anchorRect = anchor.getBoundingClientRect();
|
|
4797
4875
|
const surfaceRect = surface.getBoundingClientRect();
|
|
4798
|
-
|
|
4799
|
-
|
|
4876
|
+
const requested = this.placement();
|
|
4877
|
+
// The opening measurements can read the surface at its natural size, so the
|
|
4878
|
+
// side they resolve is only worth holding on to once `stable` has latched
|
|
4879
|
+
const placement = untracked(this.stable) && this.latched?.requested === requested
|
|
4880
|
+
? this.latched.resolved
|
|
4881
|
+
: requested;
|
|
4882
|
+
const result = computePopoverPosition(anchorRect, { width: surfaceRect.width, height: surfaceRect.height }, { width: window.innerWidth, height: window.innerHeight }, {
|
|
4883
|
+
placement,
|
|
4800
4884
|
offset: this.offset(),
|
|
4801
4885
|
flip: this.flip(),
|
|
4802
4886
|
clamp: this.clamp(),
|
|
4803
4887
|
matchAnchorWidth: this.matchAnchorWidth(),
|
|
4804
4888
|
rtl: isRtl(anchor),
|
|
4805
|
-
})
|
|
4889
|
+
});
|
|
4890
|
+
this.latched = { requested, resolved: result.placement };
|
|
4891
|
+
this.position.set(result);
|
|
4806
4892
|
}
|
|
4807
4893
|
onDocumentClick(event) {
|
|
4808
4894
|
if (!this.open() || !this.closeOnOutsideClick()) {
|
|
@@ -4813,10 +4899,13 @@ class PopoverComponent {
|
|
|
4813
4899
|
return;
|
|
4814
4900
|
}
|
|
4815
4901
|
const anchor = this.resolveAnchor();
|
|
4816
|
-
|
|
4902
|
+
const surface = this.surfaceEl()?.nativeElement;
|
|
4903
|
+
if (anchor?.contains(target) || surface?.contains(target)) {
|
|
4817
4904
|
return;
|
|
4818
4905
|
}
|
|
4819
|
-
|
|
4906
|
+
// A drag that started or ended on the panel (selecting text, dragging a
|
|
4907
|
+
// slider) lands its click on an ancestor of both, which is not a dismissal
|
|
4908
|
+
if (this.press.touchedInside(anchor) || this.press.touchedInside(surface)) {
|
|
4820
4909
|
return;
|
|
4821
4910
|
}
|
|
4822
4911
|
this.closeRequested.emit();
|
|
@@ -5506,75 +5595,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
5506
5595
|
}]
|
|
5507
5596
|
}] });
|
|
5508
5597
|
|
|
5509
|
-
class UploadIconComponent extends IconComponentBase {
|
|
5510
|
-
static slug = 'upload';
|
|
5511
|
-
static category = 'feather';
|
|
5512
|
-
static defaultStrokeWidth = 1.5;
|
|
5513
|
-
static tags = [
|
|
5514
|
-
'upload',
|
|
5515
|
-
'send',
|
|
5516
|
-
'arrow',
|
|
5517
|
-
'share',
|
|
5518
|
-
'submit',
|
|
5519
|
-
'téléverser',
|
|
5520
|
-
'envoyer',
|
|
5521
|
-
'subir',
|
|
5522
|
-
'cargar',
|
|
5523
|
-
'μεταφόρτωση',
|
|
5524
|
-
'ανέβασμα',
|
|
5525
|
-
'prześlij',
|
|
5526
|
-
'wgraj',
|
|
5527
|
-
];
|
|
5528
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UploadIconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5529
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.2", type: UploadIconComponent, isStandalone: true, selector: "ea-icon-upload", usesInheritance: true, ngImport: i0, template: `
|
|
5530
|
-
<svg
|
|
5531
|
-
viewBox="0 0 24 24"
|
|
5532
|
-
fill="none"
|
|
5533
|
-
stroke="currentColor"
|
|
5534
|
-
[attr.stroke-width]="strokeWidth()"
|
|
5535
|
-
stroke-linecap="round"
|
|
5536
|
-
stroke-linejoin="round"
|
|
5537
|
-
aria-hidden="true"
|
|
5538
|
-
width="100%"
|
|
5539
|
-
height="100%">
|
|
5540
|
-
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
5541
|
-
<polyline points="17 8 12 3 7 8" />
|
|
5542
|
-
<line
|
|
5543
|
-
x1="12"
|
|
5544
|
-
y1="3"
|
|
5545
|
-
x2="12"
|
|
5546
|
-
y2="15" />
|
|
5547
|
-
</svg>
|
|
5548
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5549
|
-
}
|
|
5550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UploadIconComponent, decorators: [{
|
|
5551
|
-
type: Component,
|
|
5552
|
-
args: [{
|
|
5553
|
-
selector: 'ea-icon-upload',
|
|
5554
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5555
|
-
template: `
|
|
5556
|
-
<svg
|
|
5557
|
-
viewBox="0 0 24 24"
|
|
5558
|
-
fill="none"
|
|
5559
|
-
stroke="currentColor"
|
|
5560
|
-
[attr.stroke-width]="strokeWidth()"
|
|
5561
|
-
stroke-linecap="round"
|
|
5562
|
-
stroke-linejoin="round"
|
|
5563
|
-
aria-hidden="true"
|
|
5564
|
-
width="100%"
|
|
5565
|
-
height="100%">
|
|
5566
|
-
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
5567
|
-
<polyline points="17 8 12 3 7 8" />
|
|
5568
|
-
<line
|
|
5569
|
-
x1="12"
|
|
5570
|
-
y1="3"
|
|
5571
|
-
x2="12"
|
|
5572
|
-
y2="15" />
|
|
5573
|
-
</svg>
|
|
5574
|
-
`,
|
|
5575
|
-
}]
|
|
5576
|
-
}] });
|
|
5577
|
-
|
|
5578
5598
|
/**
|
|
5579
5599
|
* Loading placeholder rendered as a pulsing block in one of three shapes.
|
|
5580
5600
|
* Honours `prefers-reduced-motion` by suppressing the pulse animation when
|
|
@@ -5736,6 +5756,13 @@ class TooltipDirective {
|
|
|
5736
5756
|
}
|
|
5737
5757
|
});
|
|
5738
5758
|
};
|
|
5759
|
+
/* A resize, and a page zoom with it, re-lays out the text at a new
|
|
5760
|
+
device-pixel grid, so the width is re-derived before the bubble is placed
|
|
5761
|
+
again. Scrolling moves the bubble without touching its text. */
|
|
5762
|
+
relayoutHandler = () => {
|
|
5763
|
+
this.shrinkToContent();
|
|
5764
|
+
this.repositionHandler();
|
|
5765
|
+
};
|
|
5739
5766
|
/* Capture-phase scroll listener catches scrolls on any ancestor, not just
|
|
5740
5767
|
window. Without `capture: true`, only window-level scrolls fire here. */
|
|
5741
5768
|
scrollListenerOptions = {
|
|
@@ -5830,6 +5857,9 @@ class TooltipDirective {
|
|
|
5830
5857
|
if (this.maxWidth() == null || !this.tooltipEl) {
|
|
5831
5858
|
return;
|
|
5832
5859
|
}
|
|
5860
|
+
// A width pinned earlier is the wrap point the text would be measured
|
|
5861
|
+
// against, so the bubble could only ever get narrower from here
|
|
5862
|
+
this.renderer.removeStyle(this.tooltipEl, 'width');
|
|
5833
5863
|
const range = document.createRange();
|
|
5834
5864
|
range.selectNodeContents(this.tooltipEl);
|
|
5835
5865
|
const textWidth = range.getBoundingClientRect().width;
|
|
@@ -5837,14 +5867,19 @@ class TooltipDirective {
|
|
|
5837
5867
|
return;
|
|
5838
5868
|
}
|
|
5839
5869
|
const style = getComputedStyle(this.tooltipEl);
|
|
5840
|
-
const
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5870
|
+
const contentWidth = parseFloat(style.width);
|
|
5871
|
+
if (!Number.isFinite(contentWidth)) {
|
|
5872
|
+
return;
|
|
5873
|
+
}
|
|
5874
|
+
/* Whatever the border box holds beyond its content box: padding, borders,
|
|
5875
|
+
and a scrollbar if the height clamp put one there. Read as the difference
|
|
5876
|
+
between two fractional widths; `offsetWidth` and `clientWidth` round to
|
|
5877
|
+
whole pixels, and under a page zoom the box sits on fractional ones, so
|
|
5878
|
+
rounded arithmetic pins the bubble a hair narrower than its own text and
|
|
5879
|
+
the last word drops to a second line inside a box sized for one. */
|
|
5845
5880
|
const horizontalChrome = style.boxSizing === 'border-box'
|
|
5846
|
-
?
|
|
5847
|
-
:
|
|
5881
|
+
? this.tooltipEl.getBoundingClientRect().width - contentWidth
|
|
5882
|
+
: 0;
|
|
5848
5883
|
this.renderer.setStyle(this.tooltipEl, 'width', `${Math.ceil(textWidth + horizontalChrome)}px`);
|
|
5849
5884
|
}
|
|
5850
5885
|
/* A scrollable bubble has to be reachable, so leaving the trigger only
|
|
@@ -5891,12 +5926,12 @@ class TooltipDirective {
|
|
|
5891
5926
|
if (typeof window === 'undefined') {
|
|
5892
5927
|
return;
|
|
5893
5928
|
}
|
|
5894
|
-
window.addEventListener('resize', this.
|
|
5929
|
+
window.addEventListener('resize', this.relayoutHandler);
|
|
5895
5930
|
/* `capture: true` so we catch scrolls on any ancestor (modal body, sidebar,
|
|
5896
5931
|
overflow:auto wrappers), not just the window. */
|
|
5897
5932
|
window.addEventListener('scroll', this.repositionHandler, this.scrollListenerOptions);
|
|
5898
5933
|
if (typeof ResizeObserver !== 'undefined') {
|
|
5899
|
-
this.resizeObserver = new ResizeObserver(this.
|
|
5934
|
+
this.resizeObserver = new ResizeObserver(this.relayoutHandler);
|
|
5900
5935
|
this.resizeObserver.observe(this.el.nativeElement);
|
|
5901
5936
|
/* Body observer catches layout shifts that don't move the trigger
|
|
5902
5937
|
(sibling content loads pushing the viewport's bottom around). */
|
|
@@ -5907,7 +5942,7 @@ class TooltipDirective {
|
|
|
5907
5942
|
if (typeof window === 'undefined') {
|
|
5908
5943
|
return;
|
|
5909
5944
|
}
|
|
5910
|
-
window.removeEventListener('resize', this.
|
|
5945
|
+
window.removeEventListener('resize', this.relayoutHandler);
|
|
5911
5946
|
window.removeEventListener('scroll', this.repositionHandler, this.scrollListenerOptions);
|
|
5912
5947
|
this.resizeObserver?.disconnect();
|
|
5913
5948
|
this.resizeObserver = null;
|
|
@@ -6181,14 +6216,33 @@ class AvatarEditorComponent {
|
|
|
6181
6216
|
document.removeEventListener('touchmove', this.onTouchMoveBound);
|
|
6182
6217
|
document.removeEventListener('touchend', this.onTouchEndBound);
|
|
6183
6218
|
}
|
|
6219
|
+
// Handled alongside dragover so browsers that settle the drop target on
|
|
6220
|
+
// dragenter take one, and so a wrapping element listening for the pair is not
|
|
6221
|
+
// left with its own drag state stuck on
|
|
6222
|
+
onDragEnter(event) {
|
|
6223
|
+
this.acceptDrag(event);
|
|
6224
|
+
}
|
|
6184
6225
|
onDragOver(event) {
|
|
6226
|
+
this.acceptDrag(event);
|
|
6227
|
+
}
|
|
6228
|
+
acceptDrag(event) {
|
|
6185
6229
|
event.preventDefault();
|
|
6186
6230
|
event.stopPropagation();
|
|
6231
|
+
if (event.dataTransfer) {
|
|
6232
|
+
event.dataTransfer.dropEffect = 'copy';
|
|
6233
|
+
}
|
|
6187
6234
|
this.isDragOver.set(true);
|
|
6188
6235
|
}
|
|
6189
6236
|
onDragLeave(event) {
|
|
6190
6237
|
event.preventDefault();
|
|
6191
6238
|
event.stopPropagation();
|
|
6239
|
+
// dragleave also fires when the pointer crosses onto a child of the drop
|
|
6240
|
+
// target (the canvas, the hover overlay), where the drop is still on offer
|
|
6241
|
+
const target = event.currentTarget;
|
|
6242
|
+
const next = event.relatedTarget;
|
|
6243
|
+
if (target && next && target.contains(next)) {
|
|
6244
|
+
return;
|
|
6245
|
+
}
|
|
6192
6246
|
this.isDragOver.set(false);
|
|
6193
6247
|
}
|
|
6194
6248
|
onDrop(event) {
|
|
@@ -6535,15 +6589,23 @@ class AvatarEditorComponent {
|
|
|
6535
6589
|
};
|
|
6536
6590
|
reader.readAsDataURL(file);
|
|
6537
6591
|
}
|
|
6592
|
+
// Replacing an image the editor already holds changes no signal the template
|
|
6593
|
+
// reads, so there is no render to defer to; a canvas that is already mounted
|
|
6594
|
+
// is drawn straight away
|
|
6538
6595
|
scheduleDrawAfterRender() {
|
|
6539
|
-
|
|
6540
|
-
this.
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6596
|
+
if (this.canvasEl()) {
|
|
6597
|
+
this.drawLoadedImage();
|
|
6598
|
+
return;
|
|
6599
|
+
}
|
|
6600
|
+
afterNextRender(() => this.drawLoadedImage(), { injector: this.injector });
|
|
6601
|
+
}
|
|
6602
|
+
drawLoadedImage() {
|
|
6603
|
+
this.draw();
|
|
6604
|
+
this.isFetching.set(false);
|
|
6605
|
+
this._suppressCropStateEmit = false;
|
|
6606
|
+
const canvas = this.canvasEl()?.nativeElement;
|
|
6607
|
+
canvas?.removeEventListener('wheel', this.boundWheel);
|
|
6608
|
+
canvas?.addEventListener('wheel', this.boundWheel, { passive: false });
|
|
6547
6609
|
}
|
|
6548
6610
|
centerImage() {
|
|
6549
6611
|
if (!this.image) {
|
|
@@ -6685,7 +6747,7 @@ class AvatarEditorComponent {
|
|
|
6685
6747
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
6686
6748
|
}
|
|
6687
6749
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: AvatarEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6688
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: AvatarEditorComponent, isStandalone: true, selector: "ea-avatar-editor", inputs: { shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, canvasSize: { classPropertyName: "canvasSize", publicName: "canvasSize", isSignal: true, isRequired: false, transformFunction: null }, currentSrc: { classPropertyName: "currentSrc", publicName: "currentSrc", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, exportQuality: { classPropertyName: "exportQuality", publicName: "exportQuality", isSignal: true, isRequired: false, transformFunction: null }, exportType: { classPropertyName: "exportType", publicName: "exportType", isSignal: true, isRequired: false, transformFunction: null }, cropState: { classPropertyName: "cropState", publicName: "cropState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cropped: "cropped", fileSelected: "fileSelected", removed: "removed", errored: "errored", cropStateChanged: "cropStateChanged" }, viewQueries: [{ propertyName: "canvasEl", first: true, predicate: ["canvasEl"], descendants: true, isSignal: true }, { propertyName: "fileInputEl", first: true, predicate: ["fileInputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ea-avatar-editor\"\n [ngClass]=\"hostClasses()\"\n [style.--ea-avatar-editor-canvas.px]=\"canvasSize()\">\n <input\n #fileInputEl\n type=\"file\"\n class=\"ea-avatar-editor__file-input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [accept]=\"accept()\"\n (change)=\"onFileSelected($event)\" />\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n [id]=\"instructionsId\">\n {{ i18n.messages().avatarEditor.canvasInstructions }}\n </span>\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n role=\"alert\">\n {{ lastError() }}\n </span>\n\n @if (!hasImage() && !isLoading()) {\n <button\n type=\"button\"\n class=\"ea-avatar-editor__dropzone\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n (click)=\"openFilePicker()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n <ea-icon-upload class=\"ea-avatar-editor__upload-icon\" />\n <span class=\"ea-avatar-editor__dropzone-text\">\n {{ i18n.messages().avatarEditor.dropzone }}\n </span>\n </button>\n }\n\n @if (hasImage() || isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-wrapper\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n [attr.aria-busy]=\"isLoading() || null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n @if (isLoading()) {\n <ea-skeleton\n [variant]=\"shape() === 'circle' ? 'circle' : 'rect'\"\n [width]=\"canvasSize() + 'px'\"\n [height]=\"canvasSize() + 'px'\" />\n }\n\n @if (hasImage()) {\n <canvas\n #canvasEl\n class=\"ea-avatar-editor__canvas\"\n role=\"application\"\n tabindex=\"0\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.canvas\"\n [attr.aria-describedby]=\"instructionsId\"\n [style.display]=\"isLoading() ? 'none' : 'block'\"\n [width]=\"canvasSize()\"\n [height]=\"canvasSize()\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (keydown)=\"onCanvasKeydown($event)\"></canvas>\n\n @if (!isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-overlay\"\n [class.ea-avatar-editor__canvas-overlay--on-light]=\"!isImageDark()\">\n <ea-icon-camera class=\"ea-avatar-editor__overlay-icon\" />\n <span>{{ i18n.messages().avatarEditor.change }}</span>\n </div>\n }\n }\n </div>\n }\n\n <div class=\"ea-avatar-editor__controls\">\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.revert\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.revert\"\n [disabled]=\"!canRevert() || isLoading()\"\n (click)=\"revertImage()\">\n <ea-icon-rotate-ccw />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomOut\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomOut\"\n [disabled]=\"!hasImage() || isLoading() || zoom() <= minZoom()\"\n (click)=\"setZoom(zoom() - 0.1)\">\n <ea-icon-minus />\n </button>\n\n <input\n type=\"range\"\n class=\"ea-avatar-editor__zoom-slider\"\n [min]=\"minZoom()\"\n [max]=\"maxZoom()\"\n step=\"0.01\"\n [value]=\"zoom()\"\n [disabled]=\"!hasImage() || isLoading()\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoom\"\n (input)=\"onZoomInput($event)\" />\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomIn\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomIn\"\n [disabled]=\"!hasImage() || isLoading() || zoom() >= maxZoom()\"\n (click)=\"setZoom(zoom() + 0.1)\">\n <ea-icon-plus />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn ea-avatar-editor__icon-btn--danger\"\n [eaTooltip]=\"i18n.messages().avatarEditor.remove\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.remove\"\n [disabled]=\"!hasImage() || isLoading()\"\n (click)=\"removeImage()\">\n <ea-icon-trash />\n </button>\n </div>\n</div>\n", styles: [".ea-avatar-editor{display:inline-flex;flex-direction:column;align-items:center;gap:.75em;font-family:var(--font-family-sans);font-size:clamp(.625rem,var(--ea-avatar-editor-canvas, 200px) * .075,.875rem)}.ea-avatar-editor__file-input,.ea-avatar-editor__visually-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-avatar-editor__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5em;padding:1em;font-family:inherit;font-size:inherit;line-height:var(--line-height-normal);border:2px dashed var(--color-border-default);border-radius:var(--radius-lg);background-color:var(--color-bg-subtle);color:var(--color-text-tertiary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__dropzone:hover{border-color:var(--color-border-focus);background-color:var(--color-state-hover);color:var(--color-text-secondary)}.ea-avatar-editor__dropzone:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__dropzone:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor--drag-over .ea-avatar-editor__dropzone{border-color:var(--color-border-focus);background-color:var(--color-brand-subtle);color:var(--color-brand-default)}.ea-avatar-editor--circle .ea-avatar-editor__dropzone{border-radius:var(--radius-full)}.ea-avatar-editor__upload-icon{width:2.25em;height:2.25em;opacity:.6}.ea-avatar-editor__dropzone-text{text-align:center}.ea-avatar-editor__canvas-wrapper{position:relative;overflow:hidden;border-radius:var(--radius-lg)}.ea-avatar-editor--circle .ea-avatar-editor__canvas-wrapper{border-radius:var(--radius-full)}.ea-avatar-editor__canvas{display:block;cursor:grab}.ea-avatar-editor__canvas:active{cursor:grabbing}.ea-avatar-editor__canvas-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-1);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-neutral-0);opacity:0;pointer-events:none;transition:opacity var(--duration-fast) var(--easing-default),color var(--duration-fast) var(--easing-default)}.ea-avatar-editor__canvas-overlay--on-light{color:var(--color-neutral-950)}.ea-avatar-editor__overlay-icon{width:1.75em;height:1.75em}.ea-avatar-editor__canvas-wrapper:hover .ea-avatar-editor__canvas-overlay{opacity:1}.ea-avatar-editor__controls{display:flex;align-items:center;gap:.5em}.ea-avatar-editor__icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__icon-btn>*{font-size:1.25em}.ea-avatar-editor__icon-btn:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-avatar-editor__icon-btn:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__icon-btn:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__icon-btn:disabled{cursor:not-allowed;opacity:.5}.ea-avatar-editor__icon-btn{border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:hover:not(:disabled){border-color:var(--color-border-focus)}.ea-avatar-editor__icon-btn--danger{color:var(--color-error-default)}.ea-avatar-editor__icon-btn--danger:hover:not(:disabled){border-color:var(--color-error-default);color:var(--color-error-default)}.ea-avatar-editor__zoom-slider{width:8em;height:.3em;border-radius:var(--radius-full);background:var(--color-neutral-200);appearance:none;cursor:pointer}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);appearance:none;cursor:grab}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider::-moz-range-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);cursor:grab}.ea-avatar-editor__zoom-slider::-moz-range-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider:focus-visible{outline:none}.ea-avatar-editor__zoom-slider:focus-visible::-webkit-slider-thumb{box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__zoom-slider:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__zoom-slider:disabled{opacity:.4;cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: CameraIconComponent, selector: "ea-icon-camera" }, { kind: "component", type: MinusIconComponent, selector: "ea-icon-minus" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PlusIconComponent, selector: "ea-icon-plus" }, { kind: "component", type: RotateCcwIconComponent, selector: "ea-icon-rotate-ccw" }, { kind: "component", type: SkeletonComponent, selector: "ea-skeleton", inputs: ["variant", "width", "height", "animated"] }, { kind: "directive", type: TooltipDirective, selector: "[eaTooltip]", inputs: ["eaTooltip", "tooltipPosition", "maxWidth", "dismissDelay"] }, { kind: "component", type: TrashIconComponent, selector: "ea-icon-trash" }, { kind: "component", type: UploadIconComponent, selector: "ea-icon-upload" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6750
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: AvatarEditorComponent, isStandalone: true, selector: "ea-avatar-editor", inputs: { shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, canvasSize: { classPropertyName: "canvasSize", publicName: "canvasSize", isSignal: true, isRequired: false, transformFunction: null }, currentSrc: { classPropertyName: "currentSrc", publicName: "currentSrc", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, exportQuality: { classPropertyName: "exportQuality", publicName: "exportQuality", isSignal: true, isRequired: false, transformFunction: null }, exportType: { classPropertyName: "exportType", publicName: "exportType", isSignal: true, isRequired: false, transformFunction: null }, cropState: { classPropertyName: "cropState", publicName: "cropState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cropped: "cropped", fileSelected: "fileSelected", removed: "removed", errored: "errored", cropStateChanged: "cropStateChanged" }, viewQueries: [{ propertyName: "canvasEl", first: true, predicate: ["canvasEl"], descendants: true, isSignal: true }, { propertyName: "fileInputEl", first: true, predicate: ["fileInputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ea-avatar-editor\"\n [ngClass]=\"hostClasses()\"\n [style.--ea-avatar-editor-canvas.px]=\"canvasSize()\">\n <input\n #fileInputEl\n type=\"file\"\n class=\"ea-avatar-editor__file-input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [accept]=\"accept()\"\n (change)=\"onFileSelected($event)\" />\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n [id]=\"instructionsId\">\n {{ i18n.messages().avatarEditor.canvasInstructions }}\n </span>\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n role=\"alert\">\n {{ lastError() }}\n </span>\n\n @if (!hasImage() && !isLoading()) {\n <button\n type=\"button\"\n class=\"ea-avatar-editor__dropzone\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n (click)=\"openFilePicker()\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n <ea-icon-camera class=\"ea-avatar-editor__upload-icon\" />\n <span class=\"ea-avatar-editor__dropzone-text\">\n {{ i18n.messages().avatarEditor.dropzone }}\n </span>\n </button>\n }\n\n @if (hasImage() || isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-wrapper\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n [attr.aria-busy]=\"isLoading() || null\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n @if (isLoading()) {\n <ea-skeleton\n [variant]=\"shape() === 'circle' ? 'circle' : 'rect'\"\n [width]=\"canvasSize() + 'px'\"\n [height]=\"canvasSize() + 'px'\" />\n }\n\n @if (hasImage()) {\n <canvas\n #canvasEl\n class=\"ea-avatar-editor__canvas\"\n role=\"application\"\n tabindex=\"0\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.canvas\"\n [attr.aria-describedby]=\"instructionsId\"\n [style.display]=\"isLoading() ? 'none' : 'block'\"\n [width]=\"canvasSize()\"\n [height]=\"canvasSize()\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (keydown)=\"onCanvasKeydown($event)\"></canvas>\n\n @if (!isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-overlay\"\n [class.ea-avatar-editor__canvas-overlay--on-light]=\"!isImageDark()\">\n <ea-icon-camera class=\"ea-avatar-editor__overlay-icon\" />\n <span>\n {{\n isDragOver()\n ? i18n.messages().avatarEditor.dropzone\n : i18n.messages().avatarEditor.change\n }}\n </span>\n </div>\n }\n }\n </div>\n }\n\n <div class=\"ea-avatar-editor__controls\">\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.revert\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.revert\"\n [disabled]=\"!canRevert() || isLoading()\"\n (click)=\"revertImage()\">\n <ea-icon-rotate-ccw />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomOut\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomOut\"\n [disabled]=\"!hasImage() || isLoading() || zoom() <= minZoom()\"\n (click)=\"setZoom(zoom() - 0.1)\">\n <ea-icon-minus />\n </button>\n\n <input\n type=\"range\"\n class=\"ea-avatar-editor__zoom-slider\"\n [min]=\"minZoom()\"\n [max]=\"maxZoom()\"\n step=\"0.01\"\n [value]=\"zoom()\"\n [disabled]=\"!hasImage() || isLoading()\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoom\"\n (input)=\"onZoomInput($event)\" />\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomIn\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomIn\"\n [disabled]=\"!hasImage() || isLoading() || zoom() >= maxZoom()\"\n (click)=\"setZoom(zoom() + 0.1)\">\n <ea-icon-plus />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn ea-avatar-editor__icon-btn--danger\"\n [eaTooltip]=\"i18n.messages().avatarEditor.remove\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.remove\"\n [disabled]=\"!hasImage() || isLoading()\"\n (click)=\"removeImage()\">\n <ea-icon-trash />\n </button>\n </div>\n</div>\n", styles: [".ea-avatar-editor{display:inline-flex;flex-direction:column;align-items:center;gap:.75em;font-family:var(--font-family-sans);font-size:clamp(.625rem,var(--ea-avatar-editor-canvas, 200px) * .075,.875rem)}.ea-avatar-editor__file-input,.ea-avatar-editor__visually-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-avatar-editor__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5em;padding:1em;font-family:inherit;font-size:inherit;line-height:var(--line-height-normal);border:2px dashed var(--color-border-default);border-radius:var(--radius-lg);background-color:var(--color-bg-subtle);color:var(--color-text-tertiary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__dropzone:hover{border-color:var(--color-border-focus);background-color:var(--color-state-hover);color:var(--color-text-secondary)}.ea-avatar-editor__dropzone:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__dropzone:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor--drag-over .ea-avatar-editor__dropzone{border-color:var(--color-border-focus);background-color:var(--color-brand-subtle);color:var(--color-brand-default)}.ea-avatar-editor--circle .ea-avatar-editor__dropzone{border-radius:var(--radius-full)}.ea-avatar-editor__upload-icon{width:2.25em;height:2.25em;opacity:.6}.ea-avatar-editor__dropzone-text{text-align:center}.ea-avatar-editor__canvas-wrapper{position:relative;overflow:hidden;border-radius:var(--radius-lg)}.ea-avatar-editor--circle .ea-avatar-editor__canvas-wrapper{border-radius:var(--radius-full)}.ea-avatar-editor--drag-over .ea-avatar-editor__canvas-wrapper:after{position:absolute;inset:0;border:2px dotted var(--color-brand-default);border-radius:inherit;pointer-events:none;content:\"\"}.ea-avatar-editor__canvas{display:block;cursor:grab}.ea-avatar-editor__canvas:active{cursor:grabbing}.ea-avatar-editor__canvas-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-1);padding:0 1em;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);text-align:center;color:var(--color-neutral-0);opacity:0;pointer-events:none;transition:opacity var(--duration-fast) var(--easing-default),color var(--duration-fast) var(--easing-default)}.ea-avatar-editor__canvas-overlay--on-light{color:var(--color-neutral-950)}.ea-avatar-editor__overlay-icon{width:1.75em;height:1.75em}.ea-avatar-editor__canvas-wrapper:hover .ea-avatar-editor__canvas-overlay,.ea-avatar-editor--drag-over .ea-avatar-editor__canvas-overlay{opacity:1}.ea-avatar-editor__controls{display:flex;align-items:center;gap:.5em}.ea-avatar-editor__icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__icon-btn>*{font-size:1.25em}.ea-avatar-editor__icon-btn:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-avatar-editor__icon-btn:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__icon-btn:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__icon-btn:disabled{cursor:not-allowed;opacity:.5}.ea-avatar-editor__icon-btn{border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:hover:not(:disabled){border-color:var(--color-border-focus)}.ea-avatar-editor__icon-btn--danger{color:var(--color-error-default)}.ea-avatar-editor__icon-btn--danger:hover:not(:disabled){border-color:var(--color-error-default);color:var(--color-error-default)}.ea-avatar-editor__zoom-slider{width:8em;height:.3em;border-radius:var(--radius-full);background:var(--color-neutral-200);appearance:none;cursor:pointer}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);appearance:none;cursor:grab}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider::-moz-range-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);cursor:grab}.ea-avatar-editor__zoom-slider::-moz-range-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider:focus-visible{outline:none}.ea-avatar-editor__zoom-slider:focus-visible::-webkit-slider-thumb{box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__zoom-slider:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__zoom-slider:disabled{opacity:.4;cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: CameraIconComponent, selector: "ea-icon-camera" }, { kind: "component", type: MinusIconComponent, selector: "ea-icon-minus" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PlusIconComponent, selector: "ea-icon-plus" }, { kind: "component", type: RotateCcwIconComponent, selector: "ea-icon-rotate-ccw" }, { kind: "component", type: SkeletonComponent, selector: "ea-skeleton", inputs: ["variant", "width", "height", "animated"] }, { kind: "directive", type: TooltipDirective, selector: "[eaTooltip]", inputs: ["eaTooltip", "tooltipPosition", "maxWidth", "dismissDelay"] }, { kind: "component", type: TrashIconComponent, selector: "ea-icon-trash" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6689
6751
|
}
|
|
6690
6752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: AvatarEditorComponent, decorators: [{
|
|
6691
6753
|
type: Component,
|
|
@@ -6698,8 +6760,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
6698
6760
|
SkeletonComponent,
|
|
6699
6761
|
TooltipDirective,
|
|
6700
6762
|
TrashIconComponent,
|
|
6701
|
-
UploadIconComponent,
|
|
6702
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ea-avatar-editor\"\n [ngClass]=\"hostClasses()\"\n [style.--ea-avatar-editor-canvas.px]=\"canvasSize()\">\n <input\n #fileInputEl\n type=\"file\"\n class=\"ea-avatar-editor__file-input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [accept]=\"accept()\"\n (change)=\"onFileSelected($event)\" />\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n [id]=\"instructionsId\">\n {{ i18n.messages().avatarEditor.canvasInstructions }}\n </span>\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n role=\"alert\">\n {{ lastError() }}\n </span>\n\n @if (!hasImage() && !isLoading()) {\n <button\n type=\"button\"\n class=\"ea-avatar-editor__dropzone\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n (click)=\"openFilePicker()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n <ea-icon-upload class=\"ea-avatar-editor__upload-icon\" />\n <span class=\"ea-avatar-editor__dropzone-text\">\n {{ i18n.messages().avatarEditor.dropzone }}\n </span>\n </button>\n }\n\n @if (hasImage() || isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-wrapper\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n [attr.aria-busy]=\"isLoading() || null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n @if (isLoading()) {\n <ea-skeleton\n [variant]=\"shape() === 'circle' ? 'circle' : 'rect'\"\n [width]=\"canvasSize() + 'px'\"\n [height]=\"canvasSize() + 'px'\" />\n }\n\n @if (hasImage()) {\n <canvas\n #canvasEl\n class=\"ea-avatar-editor__canvas\"\n role=\"application\"\n tabindex=\"0\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.canvas\"\n [attr.aria-describedby]=\"instructionsId\"\n [style.display]=\"isLoading() ? 'none' : 'block'\"\n [width]=\"canvasSize()\"\n [height]=\"canvasSize()\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (keydown)=\"onCanvasKeydown($event)\"></canvas>\n\n @if (!isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-overlay\"\n [class.ea-avatar-editor__canvas-overlay--on-light]=\"!isImageDark()\">\n <ea-icon-camera class=\"ea-avatar-editor__overlay-icon\" />\n <span>{{ i18n.messages().avatarEditor.change }}</span>\n </div>\n }\n }\n </div>\n }\n\n <div class=\"ea-avatar-editor__controls\">\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.revert\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.revert\"\n [disabled]=\"!canRevert() || isLoading()\"\n (click)=\"revertImage()\">\n <ea-icon-rotate-ccw />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomOut\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomOut\"\n [disabled]=\"!hasImage() || isLoading() || zoom() <= minZoom()\"\n (click)=\"setZoom(zoom() - 0.1)\">\n <ea-icon-minus />\n </button>\n\n <input\n type=\"range\"\n class=\"ea-avatar-editor__zoom-slider\"\n [min]=\"minZoom()\"\n [max]=\"maxZoom()\"\n step=\"0.01\"\n [value]=\"zoom()\"\n [disabled]=\"!hasImage() || isLoading()\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoom\"\n (input)=\"onZoomInput($event)\" />\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomIn\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomIn\"\n [disabled]=\"!hasImage() || isLoading() || zoom() >= maxZoom()\"\n (click)=\"setZoom(zoom() + 0.1)\">\n <ea-icon-plus />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn ea-avatar-editor__icon-btn--danger\"\n [eaTooltip]=\"i18n.messages().avatarEditor.remove\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.remove\"\n [disabled]=\"!hasImage() || isLoading()\"\n (click)=\"removeImage()\">\n <ea-icon-trash />\n </button>\n </div>\n</div>\n", styles: [".ea-avatar-editor{display:inline-flex;flex-direction:column;align-items:center;gap:.75em;font-family:var(--font-family-sans);font-size:clamp(.625rem,var(--ea-avatar-editor-canvas, 200px) * .075,.875rem)}.ea-avatar-editor__file-input,.ea-avatar-editor__visually-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-avatar-editor__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5em;padding:1em;font-family:inherit;font-size:inherit;line-height:var(--line-height-normal);border:2px dashed var(--color-border-default);border-radius:var(--radius-lg);background-color:var(--color-bg-subtle);color:var(--color-text-tertiary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__dropzone:hover{border-color:var(--color-border-focus);background-color:var(--color-state-hover);color:var(--color-text-secondary)}.ea-avatar-editor__dropzone:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__dropzone:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor--drag-over .ea-avatar-editor__dropzone{border-color:var(--color-border-focus);background-color:var(--color-brand-subtle);color:var(--color-brand-default)}.ea-avatar-editor--circle .ea-avatar-editor__dropzone{border-radius:var(--radius-full)}.ea-avatar-editor__upload-icon{width:2.25em;height:2.25em;opacity:.6}.ea-avatar-editor__dropzone-text{text-align:center}.ea-avatar-editor__canvas-wrapper{position:relative;overflow:hidden;border-radius:var(--radius-lg)}.ea-avatar-editor--circle .ea-avatar-editor__canvas-wrapper{border-radius:var(--radius-full)}.ea-avatar-editor__canvas{display:block;cursor:grab}.ea-avatar-editor__canvas:active{cursor:grabbing}.ea-avatar-editor__canvas-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-1);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-neutral-0);opacity:0;pointer-events:none;transition:opacity var(--duration-fast) var(--easing-default),color var(--duration-fast) var(--easing-default)}.ea-avatar-editor__canvas-overlay--on-light{color:var(--color-neutral-950)}.ea-avatar-editor__overlay-icon{width:1.75em;height:1.75em}.ea-avatar-editor__canvas-wrapper:hover .ea-avatar-editor__canvas-overlay{opacity:1}.ea-avatar-editor__controls{display:flex;align-items:center;gap:.5em}.ea-avatar-editor__icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__icon-btn>*{font-size:1.25em}.ea-avatar-editor__icon-btn:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-avatar-editor__icon-btn:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__icon-btn:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__icon-btn:disabled{cursor:not-allowed;opacity:.5}.ea-avatar-editor__icon-btn{border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:hover:not(:disabled){border-color:var(--color-border-focus)}.ea-avatar-editor__icon-btn--danger{color:var(--color-error-default)}.ea-avatar-editor__icon-btn--danger:hover:not(:disabled){border-color:var(--color-error-default);color:var(--color-error-default)}.ea-avatar-editor__zoom-slider{width:8em;height:.3em;border-radius:var(--radius-full);background:var(--color-neutral-200);appearance:none;cursor:pointer}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);appearance:none;cursor:grab}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider::-moz-range-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);cursor:grab}.ea-avatar-editor__zoom-slider::-moz-range-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider:focus-visible{outline:none}.ea-avatar-editor__zoom-slider:focus-visible::-webkit-slider-thumb{box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__zoom-slider:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__zoom-slider:disabled{opacity:.4;cursor:not-allowed}\n"] }]
|
|
6763
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ea-avatar-editor\"\n [ngClass]=\"hostClasses()\"\n [style.--ea-avatar-editor-canvas.px]=\"canvasSize()\">\n <input\n #fileInputEl\n type=\"file\"\n class=\"ea-avatar-editor__file-input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [accept]=\"accept()\"\n (change)=\"onFileSelected($event)\" />\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n [id]=\"instructionsId\">\n {{ i18n.messages().avatarEditor.canvasInstructions }}\n </span>\n\n <span\n class=\"ea-avatar-editor__visually-hidden\"\n role=\"alert\">\n {{ lastError() }}\n </span>\n\n @if (!hasImage() && !isLoading()) {\n <button\n type=\"button\"\n class=\"ea-avatar-editor__dropzone\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n (click)=\"openFilePicker()\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n <ea-icon-camera class=\"ea-avatar-editor__upload-icon\" />\n <span class=\"ea-avatar-editor__dropzone-text\">\n {{ i18n.messages().avatarEditor.dropzone }}\n </span>\n </button>\n }\n\n @if (hasImage() || isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-wrapper\"\n [style.width.px]=\"canvasSize()\"\n [style.height.px]=\"canvasSize()\"\n [attr.aria-busy]=\"isLoading() || null\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n @if (isLoading()) {\n <ea-skeleton\n [variant]=\"shape() === 'circle' ? 'circle' : 'rect'\"\n [width]=\"canvasSize() + 'px'\"\n [height]=\"canvasSize() + 'px'\" />\n }\n\n @if (hasImage()) {\n <canvas\n #canvasEl\n class=\"ea-avatar-editor__canvas\"\n role=\"application\"\n tabindex=\"0\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.canvas\"\n [attr.aria-describedby]=\"instructionsId\"\n [style.display]=\"isLoading() ? 'none' : 'block'\"\n [width]=\"canvasSize()\"\n [height]=\"canvasSize()\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (keydown)=\"onCanvasKeydown($event)\"></canvas>\n\n @if (!isLoading()) {\n <div\n class=\"ea-avatar-editor__canvas-overlay\"\n [class.ea-avatar-editor__canvas-overlay--on-light]=\"!isImageDark()\">\n <ea-icon-camera class=\"ea-avatar-editor__overlay-icon\" />\n <span>\n {{\n isDragOver()\n ? i18n.messages().avatarEditor.dropzone\n : i18n.messages().avatarEditor.change\n }}\n </span>\n </div>\n }\n }\n </div>\n }\n\n <div class=\"ea-avatar-editor__controls\">\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.revert\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.revert\"\n [disabled]=\"!canRevert() || isLoading()\"\n (click)=\"revertImage()\">\n <ea-icon-rotate-ccw />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomOut\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomOut\"\n [disabled]=\"!hasImage() || isLoading() || zoom() <= minZoom()\"\n (click)=\"setZoom(zoom() - 0.1)\">\n <ea-icon-minus />\n </button>\n\n <input\n type=\"range\"\n class=\"ea-avatar-editor__zoom-slider\"\n [min]=\"minZoom()\"\n [max]=\"maxZoom()\"\n step=\"0.01\"\n [value]=\"zoom()\"\n [disabled]=\"!hasImage() || isLoading()\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoom\"\n (input)=\"onZoomInput($event)\" />\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn\"\n [eaTooltip]=\"i18n.messages().avatarEditor.zoomIn\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.zoomIn\"\n [disabled]=\"!hasImage() || isLoading() || zoom() >= maxZoom()\"\n (click)=\"setZoom(zoom() + 0.1)\">\n <ea-icon-plus />\n </button>\n\n <button\n type=\"button\"\n class=\"ea-avatar-editor__icon-btn ea-avatar-editor__icon-btn--danger\"\n [eaTooltip]=\"i18n.messages().avatarEditor.remove\"\n [attr.aria-label]=\"i18n.messages().avatarEditor.remove\"\n [disabled]=\"!hasImage() || isLoading()\"\n (click)=\"removeImage()\">\n <ea-icon-trash />\n </button>\n </div>\n</div>\n", styles: [".ea-avatar-editor{display:inline-flex;flex-direction:column;align-items:center;gap:.75em;font-family:var(--font-family-sans);font-size:clamp(.625rem,var(--ea-avatar-editor-canvas, 200px) * .075,.875rem)}.ea-avatar-editor__file-input,.ea-avatar-editor__visually-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-avatar-editor__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5em;padding:1em;font-family:inherit;font-size:inherit;line-height:var(--line-height-normal);border:2px dashed var(--color-border-default);border-radius:var(--radius-lg);background-color:var(--color-bg-subtle);color:var(--color-text-tertiary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__dropzone:hover{border-color:var(--color-border-focus);background-color:var(--color-state-hover);color:var(--color-text-secondary)}.ea-avatar-editor__dropzone:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__dropzone:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor--drag-over .ea-avatar-editor__dropzone{border-color:var(--color-border-focus);background-color:var(--color-brand-subtle);color:var(--color-brand-default)}.ea-avatar-editor--circle .ea-avatar-editor__dropzone{border-radius:var(--radius-full)}.ea-avatar-editor__upload-icon{width:2.25em;height:2.25em;opacity:.6}.ea-avatar-editor__dropzone-text{text-align:center}.ea-avatar-editor__canvas-wrapper{position:relative;overflow:hidden;border-radius:var(--radius-lg)}.ea-avatar-editor--circle .ea-avatar-editor__canvas-wrapper{border-radius:var(--radius-full)}.ea-avatar-editor--drag-over .ea-avatar-editor__canvas-wrapper:after{position:absolute;inset:0;border:2px dotted var(--color-brand-default);border-radius:inherit;pointer-events:none;content:\"\"}.ea-avatar-editor__canvas{display:block;cursor:grab}.ea-avatar-editor__canvas:active{cursor:grabbing}.ea-avatar-editor__canvas-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-1);padding:0 1em;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);text-align:center;color:var(--color-neutral-0);opacity:0;pointer-events:none;transition:opacity var(--duration-fast) var(--easing-default),color var(--duration-fast) var(--easing-default)}.ea-avatar-editor__canvas-overlay--on-light{color:var(--color-neutral-950)}.ea-avatar-editor__overlay-icon{width:1.75em;height:1.75em}.ea-avatar-editor__canvas-wrapper:hover .ea-avatar-editor__canvas-overlay,.ea-avatar-editor--drag-over .ea-avatar-editor__canvas-overlay{opacity:1}.ea-avatar-editor__controls{display:flex;align-items:center;gap:.5em}.ea-avatar-editor__icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-avatar-editor__icon-btn>*{font-size:1.25em}.ea-avatar-editor__icon-btn:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-avatar-editor__icon-btn:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__icon-btn:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__icon-btn:disabled{cursor:not-allowed;opacity:.5}.ea-avatar-editor__icon-btn{border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary)}.ea-avatar-editor__icon-btn:hover:not(:disabled){border-color:var(--color-border-focus)}.ea-avatar-editor__icon-btn--danger{color:var(--color-error-default)}.ea-avatar-editor__icon-btn--danger:hover:not(:disabled){border-color:var(--color-error-default);color:var(--color-error-default)}.ea-avatar-editor__zoom-slider{width:8em;height:.3em;border-radius:var(--radius-full);background:var(--color-neutral-200);appearance:none;cursor:pointer}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);appearance:none;cursor:grab}.ea-avatar-editor__zoom-slider::-webkit-slider-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider::-moz-range-thumb{width:1.15em;height:1.15em;border:2px solid var(--color-brand-default);border-radius:var(--radius-full);background:var(--color-bg-base);cursor:grab}.ea-avatar-editor__zoom-slider::-moz-range-thumb:active{cursor:grabbing}.ea-avatar-editor__zoom-slider:focus-visible{outline:none}.ea-avatar-editor__zoom-slider:focus-visible::-webkit-slider-thumb{box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-avatar-editor__zoom-slider:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-avatar-editor__zoom-slider:disabled{opacity:.4;cursor:not-allowed}\n"] }]
|
|
6703
6764
|
}], ctorParameters: () => [], propDecorators: { canvasEl: [{ type: i0.ViewChild, args: ['canvasEl', { isSignal: true }] }], fileInputEl: [{ type: i0.ViewChild, args: ['fileInputEl', { isSignal: true }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], canvasSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "canvasSize", required: false }] }], currentSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentSrc", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], minZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "minZoom", required: false }] }], maxZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxZoom", required: false }] }], exportQuality: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportQuality", required: false }] }], exportType: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportType", required: false }] }], cropState: [{ type: i0.Input, args: [{ isSignal: true, alias: "cropState", required: false }] }], cropped: [{ type: i0.Output, args: ["cropped"] }], fileSelected: [{ type: i0.Output, args: ["fileSelected"] }], removed: [{ type: i0.Output, args: ["removed"] }], errored: [{ type: i0.Output, args: ["errored"] }], cropStateChanged: [{ type: i0.Output, args: ["cropStateChanged"] }] } });
|
|
6704
6765
|
|
|
6705
6766
|
class UserIconComponent extends IconComponentBase {
|
|
@@ -7644,6 +7705,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
7644
7705
|
class CommandPaletteComponent {
|
|
7645
7706
|
i18n = inject(EagamiI18nService);
|
|
7646
7707
|
hostEl = inject(ElementRef);
|
|
7708
|
+
press = inject(PointerPressTracker);
|
|
7647
7709
|
items = input.required(/* @ts-ignore */
|
|
7648
7710
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
7649
7711
|
open = model(false, /* @ts-ignore */
|
|
@@ -7907,8 +7969,12 @@ class CommandPaletteComponent {
|
|
|
7907
7969
|
onBackdropClick(event) {
|
|
7908
7970
|
/* Native `<dialog>` clicks land on the dialog itself when the user clicks
|
|
7909
7971
|
the backdrop; clicks inside content bubble up via the panel. So a click
|
|
7910
|
-
whose target IS the dialog element means the user clicked the backdrop
|
|
7911
|
-
|
|
7972
|
+
whose target IS the dialog element means the user clicked the backdrop,
|
|
7973
|
+
unless the press behind it touched the panel at either end: the dialog is
|
|
7974
|
+
the first ancestor the two share, so a drag out of the panel reports the
|
|
7975
|
+
same target. */
|
|
7976
|
+
const dialog = this.dialogEl()?.nativeElement;
|
|
7977
|
+
if (event.target === dialog && this.press.stayedOn(dialog)) {
|
|
7912
7978
|
this.open.set(false);
|
|
7913
7979
|
}
|
|
7914
7980
|
}
|
|
@@ -10516,6 +10582,7 @@ class DialogComponent {
|
|
|
10516
10582
|
previouslyFocused = null;
|
|
10517
10583
|
i18n = inject(EagamiI18nService);
|
|
10518
10584
|
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
10585
|
+
press = inject(PointerPressTracker);
|
|
10519
10586
|
width = input('md', /* @ts-ignore */
|
|
10520
10587
|
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
10521
10588
|
closeOnBackdrop = input(true, /* @ts-ignore */
|
|
@@ -10578,7 +10645,10 @@ class DialogComponent {
|
|
|
10578
10645
|
return;
|
|
10579
10646
|
}
|
|
10580
10647
|
const dialogRef = this.dialogEl()?.nativeElement;
|
|
10581
|
-
|
|
10648
|
+
// A press that touched the panel at either end reaches the dialog element
|
|
10649
|
+
// as a click too, since that is the first ancestor the panel and the
|
|
10650
|
+
// backdrop share; only a press confined to the backdrop dismisses
|
|
10651
|
+
if (event.target === dialogRef && this.press.stayedOn(dialogRef)) {
|
|
10582
10652
|
this.handleClose();
|
|
10583
10653
|
}
|
|
10584
10654
|
}
|
|
@@ -10635,9 +10705,10 @@ class DrawerComponent {
|
|
|
10635
10705
|
pushRaf = null;
|
|
10636
10706
|
leaveTimer = null;
|
|
10637
10707
|
leaveOnEnd = null;
|
|
10638
|
-
|
|
10708
|
+
documentClickListener = null;
|
|
10639
10709
|
i18n = inject(EagamiI18nService);
|
|
10640
10710
|
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
10711
|
+
press = inject(PointerPressTracker);
|
|
10641
10712
|
position = input('right', /* @ts-ignore */
|
|
10642
10713
|
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
10643
10714
|
/**
|
|
@@ -10952,7 +11023,7 @@ class DrawerComponent {
|
|
|
10952
11023
|
// the document. Deferred a tick so the click that opened the drawer does not
|
|
10953
11024
|
// immediately close it.
|
|
10954
11025
|
addPushDismiss() {
|
|
10955
|
-
if (this.
|
|
11026
|
+
if (this.documentClickListener || !this.isBrowser) {
|
|
10956
11027
|
return;
|
|
10957
11028
|
}
|
|
10958
11029
|
const listener = (event) => {
|
|
@@ -10960,21 +11031,27 @@ class DrawerComponent {
|
|
|
10960
11031
|
return;
|
|
10961
11032
|
}
|
|
10962
11033
|
const panel = this.panelEl()?.nativeElement;
|
|
10963
|
-
if (panel
|
|
10964
|
-
|
|
11034
|
+
if (!panel || panel.contains(event.target)) {
|
|
11035
|
+
return;
|
|
11036
|
+
}
|
|
11037
|
+
// A drag out of the panel (selecting text, dragging a control) lands its
|
|
11038
|
+
// click outside, and is not a dismissal
|
|
11039
|
+
if (this.press.touchedInside(panel)) {
|
|
11040
|
+
return;
|
|
10965
11041
|
}
|
|
11042
|
+
this.handleClose();
|
|
10966
11043
|
};
|
|
10967
|
-
this.
|
|
11044
|
+
this.documentClickListener = listener;
|
|
10968
11045
|
setTimeout(() => {
|
|
10969
|
-
if (this.
|
|
10970
|
-
document.addEventListener('
|
|
11046
|
+
if (this.documentClickListener === listener) {
|
|
11047
|
+
document.addEventListener('click', listener);
|
|
10971
11048
|
}
|
|
10972
11049
|
});
|
|
10973
11050
|
}
|
|
10974
11051
|
removePushDismiss() {
|
|
10975
|
-
if (this.
|
|
10976
|
-
document.removeEventListener('
|
|
10977
|
-
this.
|
|
11052
|
+
if (this.documentClickListener) {
|
|
11053
|
+
document.removeEventListener('click', this.documentClickListener);
|
|
11054
|
+
this.documentClickListener = null;
|
|
10978
11055
|
}
|
|
10979
11056
|
}
|
|
10980
11057
|
// Removes the push styles immediately, for teardown where no animation is wanted
|
|
@@ -10999,7 +11076,10 @@ class DrawerComponent {
|
|
|
10999
11076
|
return;
|
|
11000
11077
|
}
|
|
11001
11078
|
const drawerRef = this.drawerEl()?.nativeElement;
|
|
11002
|
-
|
|
11079
|
+
// A press that touched the panel at either end reaches the drawer element
|
|
11080
|
+
// as a click too, since that is the first ancestor the panel and the
|
|
11081
|
+
// backdrop share; only a press confined to the backdrop dismisses
|
|
11082
|
+
if (event.target === drawerRef && this.press.stayedOn(drawerRef)) {
|
|
11003
11083
|
this.handleClose();
|
|
11004
11084
|
}
|
|
11005
11085
|
}
|
|
@@ -13312,6 +13392,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
13312
13392
|
class MultiSelectComponent {
|
|
13313
13393
|
wrapperEl = viewChild('wrapperEl', /* @ts-ignore */
|
|
13314
13394
|
...(ngDevMode ? [{ debugName: "wrapperEl" }] : /* istanbul ignore next */ []));
|
|
13395
|
+
popover = viewChild(PopoverComponent, /* @ts-ignore */
|
|
13396
|
+
...(ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []));
|
|
13315
13397
|
triggerEl = viewChild('triggerEl', /* @ts-ignore */
|
|
13316
13398
|
...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
|
|
13317
13399
|
searchEl = viewChild('searchEl', /* @ts-ignore */
|
|
@@ -13518,6 +13600,14 @@ class MultiSelectComponent {
|
|
|
13518
13600
|
this.optionLabelEls();
|
|
13519
13601
|
this.measureClippedOptions();
|
|
13520
13602
|
});
|
|
13603
|
+
// The panel stays invisible until the popover has measured itself, and an
|
|
13604
|
+
// invisible input cannot take focus. Waiting on that signal from the
|
|
13605
|
+
// after-render phase puts the focus call after the frame that reveals it.
|
|
13606
|
+
afterRenderEffect(() => {
|
|
13607
|
+
if (this.searchable() && this.popover()?.isPositioned()) {
|
|
13608
|
+
untracked(() => this.searchEl()?.nativeElement.focus());
|
|
13609
|
+
}
|
|
13610
|
+
});
|
|
13521
13611
|
afterNextRender(() => this.watchListWidth(), { injector: this.injector });
|
|
13522
13612
|
}
|
|
13523
13613
|
writeValue(val) {
|
|
@@ -13538,10 +13628,7 @@ class MultiSelectComponent {
|
|
|
13538
13628
|
}
|
|
13539
13629
|
const opening = !this.isOpen();
|
|
13540
13630
|
this.isOpen.set(opening);
|
|
13541
|
-
if (opening) {
|
|
13542
|
-
this.focusSearchWhenReady();
|
|
13543
|
-
}
|
|
13544
|
-
else {
|
|
13631
|
+
if (!opening) {
|
|
13545
13632
|
this.resetEditState();
|
|
13546
13633
|
}
|
|
13547
13634
|
}
|
|
@@ -13567,6 +13654,7 @@ class MultiSelectComponent {
|
|
|
13567
13654
|
set.add(opt.value);
|
|
13568
13655
|
}
|
|
13569
13656
|
this.commit(this.orderedValues(set));
|
|
13657
|
+
this.clearSearchForNextValue();
|
|
13570
13658
|
}
|
|
13571
13659
|
/**
|
|
13572
13660
|
* Clicks on the bordered box (trigger, padding, chevron) all toggle; the
|
|
@@ -13649,7 +13737,23 @@ class MultiSelectComponent {
|
|
|
13649
13737
|
onSearchInput(event) {
|
|
13650
13738
|
const target = event.target;
|
|
13651
13739
|
this.searchTerm.set(target.value);
|
|
13740
|
+
this.focusedIndex.set(this.soleOptionRow());
|
|
13741
|
+
}
|
|
13742
|
+
// Narrowing the list to a single selectable option makes Enter unambiguous,
|
|
13743
|
+
// so that row takes focus and the value can be taken without arrowing to it
|
|
13744
|
+
soleOptionRow() {
|
|
13745
|
+
const options = this.filteredOptions();
|
|
13746
|
+
return options.length === 1 && !options[0].disabled ? this.selectAllOffset() : -1;
|
|
13747
|
+
}
|
|
13748
|
+
// A query that has served its purpose otherwise has to be cleared by hand
|
|
13749
|
+
// before the next value can be searched for
|
|
13750
|
+
clearSearchForNextValue() {
|
|
13751
|
+
if (!this.searchTerm()) {
|
|
13752
|
+
return;
|
|
13753
|
+
}
|
|
13754
|
+
this.searchTerm.set('');
|
|
13652
13755
|
this.focusedIndex.set(-1);
|
|
13756
|
+
this.restoreTypingFocus();
|
|
13653
13757
|
}
|
|
13654
13758
|
handleTriggerKeydown(event) {
|
|
13655
13759
|
if (this.isDisabled() || this.readonly()) {
|
|
@@ -13665,7 +13769,6 @@ class MultiSelectComponent {
|
|
|
13665
13769
|
event.preventDefault();
|
|
13666
13770
|
if (!this.isOpen()) {
|
|
13667
13771
|
this.isOpen.set(true);
|
|
13668
|
-
this.focusSearchWhenReady();
|
|
13669
13772
|
}
|
|
13670
13773
|
}
|
|
13671
13774
|
else if (event.key === 'Escape' && this.isOpen()) {
|
|
@@ -13725,11 +13828,6 @@ class MultiSelectComponent {
|
|
|
13725
13828
|
this.close();
|
|
13726
13829
|
}
|
|
13727
13830
|
}
|
|
13728
|
-
focusSearchWhenReady() {
|
|
13729
|
-
afterNextRender(() => this.searchEl()?.nativeElement.focus(), {
|
|
13730
|
-
injector: this.injector,
|
|
13731
|
-
});
|
|
13732
|
-
}
|
|
13733
13831
|
moveFocusedRow(row) {
|
|
13734
13832
|
this.focusedIndex.set(row);
|
|
13735
13833
|
const activeId = this.activeOptionId();
|
|
@@ -13818,7 +13916,7 @@ class MultiSelectComponent {
|
|
|
13818
13916
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
13819
13917
|
multi: true,
|
|
13820
13918
|
},
|
|
13821
|
-
], viewQueries: [{ propertyName: "wrapperEl", first: true, predicate: ["wrapperEl"], descendants: true, isSignal: true }, { propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true, isSignal: true }, { propertyName: "searchEl", first: true, predicate: ["searchEl"], descendants: true, isSignal: true }, { propertyName: "listEl", first: true, predicate: ["listEl"], descendants: true, isSignal: true }, { propertyName: "optionLabelEls", predicate: ["optionLabelEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ea-multi-select-field ea-multi-select-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [forId]=\"id()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\" />\n }\n\n <div class=\"ea-multi-select\">\n <div\n #wrapperEl\n class=\"ea-multi-select__trigger-wrapper\"\n [ngClass]=\"wrapperClasses()\"\n (click)=\"onTriggerAreaClick()\">\n <div\n #triggerEl\n class=\"ea-multi-select__trigger\"\n [ngClass]=\"triggerClasses()\"\n [id]=\"id()\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"isOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"isOpen() && !searchable() ? activeOptionId() : null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (keydown)=\"handleTriggerKeydown($event)\">\n <span class=\"ea-multi-select__trigger-content\">\n @if (!hasValue()) {\n <span class=\"ea-multi-select__trigger-placeholder\">\n <bdi>{{ resolvedPlaceholder() }}</bdi>\n </span>\n } @else {\n @for (opt of visibleChips(); track opt.value) {\n <ea-tag\n [size]=\"size()\"\n variant=\"default\"\n [maxWidth]=\"maxChipWidth()\"\n [removable]=\"!isDisabled() && !readonly()\"\n [removeTabbable]=\"false\"\n [removeLabel]=\"i18n.messages().multiSelect.removeOption(opt.label)\"\n (removed)=\"removeChip(opt)\">\n <span>{{ opt.label }}</span>\n </ea-tag>\n }\n @if (hiddenChipCount() > 0) {\n <span class=\"ea-multi-select__more\">+{{ hiddenChipCount() }}</span>\n }\n }\n </span>\n </div>\n @if (hasValue() && !isDisabled() && !readonly()) {\n <button\n type=\"button\"\n class=\"ea-multi-select__clear\"\n [attr.aria-label]=\"i18n.messages().multiSelect.clearAll\"\n (click)=\"clear($event)\">\n <ea-icon-x\n class=\"ea-multi-select__clear-icon\"\n aria-hidden=\"true\" />\n </button>\n }\n <ea-icon-chevron-down\n class=\"ea-multi-select__trigger-icon\"\n aria-hidden=\"true\" />\n </div>\n\n <ea-popover\n [anchor]=\"wrapperEl\"\n [open]=\"isOpen()\"\n placement=\"bottom-start\"\n [aria-label]=\"i18n.messages().multiSelect.dialogLabel\"\n [matchAnchorWidth]=\"true\"\n [maxWidth]=\"popoverMaxWidth()\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"reposition\"\n (closeRequested)=\"onPopoverCloseRequested()\">\n <div\n class=\"ea-multi-select__popover\"\n [ngClass]=\"menuClasses()\">\n @if (searchable()) {\n <div class=\"ea-multi-select__search\">\n <ea-icon-search\n class=\"ea-multi-select__search-icon\"\n aria-hidden=\"true\" />\n <input\n #searchEl\n type=\"text\"\n dir=\"auto\"\n class=\"ea-multi-select__search-input\"\n autocomplete=\"off\"\n [placeholder]=\"resolvedSearchPlaceholder()\"\n [value]=\"searchTerm()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"handlePopoverKeydown($event)\" />\n </div>\n }\n\n <ul\n #listEl\n class=\"ea-multi-select__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId()\"\n [attr.aria-label]=\"label() ?? ariaLabel() ?? null\">\n @if (selectAllVisible()) {\n <li\n class=\"ea-multi-select__option ea-multi-select__option--select-all\"\n [class.ea-multi-select__option--focused]=\"focusedIndex() === 0\"\n [id]=\"id() + '-opt-0'\"\n role=\"option\"\n [attr.aria-selected]=\"selectAllState() === 'all'\"\n [attr.aria-checked]=\"selectAllAriaChecked()\"\n (click)=\"onSelectAllClick()\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectAllState() === 'all'\"\n [indeterminate]=\"selectAllState() === 'some'\" />\n <span class=\"ea-multi-select__option-label\">\n {{ i18n.messages().multiSelect.selectAll }}\n </span>\n </li>\n }\n @for (group of renderedGroups(); track $index) {\n <li\n class=\"ea-multi-select__group\"\n [class.ea-multi-select__group--ruled]=\"group.rule\"\n role=\"presentation\">\n @if (group.label; as groupLabel) {\n <span\n class=\"ea-multi-select__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </span>\n }\n <ul\n class=\"ea-multi-select__group-options\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @for (entry of group.options; track entry.option.value) {\n <li\n class=\"ea-multi-select__option\"\n [class.ea-multi-select__option--focused]=\"\n focusedIndex() === entry.index + selectAllOffset()\n \"\n [class.ea-multi-select__option--disabled]=\"entry.option.disabled\"\n [id]=\"id() + '-opt-' + (entry.index + selectAllOffset())\"\n role=\"option\"\n [attr.aria-selected]=\"selectedSet().has(entry.option.value)\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (click)=\"onOptionClick(entry.option, entry.index)\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectedSet().has(entry.option.value)\"\n [disabled]=\"!!entry.option.disabled\" />\n <span\n #optionLabelEl\n class=\"ea-multi-select__option-label\"\n [attr.data-value]=\"entry.option.value\"\n [eaTooltip]=\"\n clippedOptions().has(entry.option.value) ? entry.option.label : ''\n \">\n {{ entry.option.label }}\n </span>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n @if (filteredOptions().length === 0) {\n <div\n class=\"ea-multi-select__empty\"\n role=\"status\">\n {{ i18n.messages().multiSelect.searchEmpty }}\n </div>\n }\n </div>\n </ea-popover>\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n", styles: [".ea-multi-select-field{display:flex;flex-direction:column;gap:.375em;--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-multi-select-field--2xs{font-size:var(--font-size-2xs)}.ea-multi-select-field--xs{font-size:var(--font-size-xs)}.ea-multi-select-field--sm{font-size:var(--font-size-sm)}.ea-multi-select-field--md{font-size:var(--font-size-md)}.ea-multi-select-field--lg{font-size:var(--font-size-lg)}.ea-multi-select-field--xl{font-size:var(--font-size-xl)}.ea-multi-select{position:relative}.ea-multi-select__trigger-wrapper{position:relative;display:flex;align-items:center;gap:.5em;width:100%;min-height:2.5em;padding:.375em .75em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors),var(--transition-shadow)}.ea-multi-select__trigger-wrapper:has(ea-tag){padding-block:.125em}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){border-color:var(--color-border-focus);box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error){border-color:var(--color-error-default)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--disabled){background-color:var(--color-bg-muted);opacity:.6;cursor:not-allowed}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly){cursor:default}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){border-color:var(--color-border-focus);box-shadow:none}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger{display:flex;align-items:center;flex:1;min-width:0;text-align:start;font-family:var(--font-family-sans);cursor:pointer}.ea-multi-select__trigger:focus-visible{outline:none}.ea-multi-select__trigger--disabled{cursor:not-allowed}.ea-multi-select__trigger--readonly{cursor:default}.ea-multi-select__trigger-content{display:flex;flex-wrap:nowrap;align-items:center;gap:.25em;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin}.ea-multi-select__trigger-content ea-tag{flex-shrink:0;--ea-tag-padding-block: 0}.ea-multi-select__trigger-placeholder{color:var(--color-text-tertiary)}.ea-multi-select__trigger-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-secondary);transition:var(--transition-transform)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open) .ea-multi-select__trigger-icon{transform:rotate(180deg)}.ea-multi-select__more{display:inline-flex;flex-shrink:0;align-items:center;padding:0 .4411764706em;border-radius:var(--radius-lg);background-color:var(--color-bg-muted);font-size:.85em;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-multi-select__clear{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__clear>*{font-size:1.25em}.ea-multi-select__clear:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-multi-select__clear:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-multi-select__clear:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__clear:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__clear:disabled{cursor:not-allowed;opacity:.5}.ea-multi-select__clear{flex-shrink:0}.ea-multi-select__popover{display:flex;flex-direction:column;overflow:hidden;max-height:20rem;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--ea-multi-select-popover-background-color, var(--color-bg-elevated))}@media(forced-colors:active){.ea-multi-select__popover{border:1px solid CanvasText}}.ea-multi-select__popover--2xs{font-size:var(--font-size-2xs)}.ea-multi-select__popover--xs{font-size:var(--font-size-xs)}.ea-multi-select__popover--sm{font-size:var(--font-size-sm)}.ea-multi-select__popover--md{font-size:var(--font-size-md)}.ea-multi-select__popover--lg{font-size:var(--font-size-lg)}.ea-multi-select__popover--xl{font-size:var(--font-size-xl)}.ea-multi-select__search{display:flex;align-items:center;gap:.5em;flex-shrink:0;padding:.5em .75em;border-bottom:var(--border-width-thin) solid var(--color-border-default)}.ea-multi-select__search-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-tertiary)}.ea-multi-select__search-input{flex:1;min-width:0;padding:0;border:none;background:none;font-family:var(--font-family-sans);font-size:inherit;color:var(--color-text-primary)}.ea-multi-select__search-input::placeholder{color:var(--color-text-tertiary);opacity:1}.ea-multi-select__search-input:focus{outline:none}.ea-multi-select__list{overflow-y:auto;overscroll-behavior:none;flex:1;margin:0;padding:.25em 0;list-style:none}.ea-multi-select__group{position:relative}.ea-multi-select__group--ruled{padding-top:.25em;margin-top:.25em}.ea-multi-select__group--ruled:before{position:absolute;top:0;inset-inline-end:0;inset-inline-start:0;height:var(--border-width-thin);background-color:var(--color-divider);content:\"\"}.ea-multi-select__group-options{padding:0;margin:0;list-style:none}.ea-multi-select__group-label{display:block;padding:.5em .75em .125em;font-size:.8125em;font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-multi-select__option{display:flex;align-items:center;gap:.5em;padding:.375em .75em;font-size:inherit;font-family:var(--font-family-sans);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__option--focused{background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option--focused{background-color:Highlight;color:HighlightText}}.ea-multi-select__option--disabled{color:var(--color-text-disabled);cursor:not-allowed}@media(forced-colors:active){.ea-multi-select__option--disabled{color:GrayText}}.ea-multi-select__option--select-all{border-bottom:var(--border-width-thin) solid var(--color-border-default);font-weight:var(--font-weight-medium)}.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:Highlight;color:HighlightText}}.ea-multi-select__option ea-checkbox{pointer-events:none;display:inline-flex;align-items:center;line-height:1}.ea-multi-select__option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ea-multi-select__empty{padding:.75em;font-size:inherit;text-align:center;color:var(--color-text-tertiary);list-style:none}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ea-checkbox", inputs: ["label", "count", "hint", "errorMsg", "errorMessages", "size", "disabled", "required", "indeterminate", "aria-label", "id", "checked"], outputs: ["checkedChange", "changed"] }, { kind: "component", type: ChevronDownIconComponent, selector: "ea-icon-chevron-down" }, { kind: "component", type: FieldLabelComponent, selector: "ea-field-label", inputs: ["text", "forId", "required", "labelId"] }, { kind: "component", type: FieldMessagesComponent, selector: "ea-field-messages", inputs: ["id", "error", "hint"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PopoverComponent, selector: "ea-popover", inputs: ["anchor", "open", "placement", "role", "aria-label", "aria-labelledby", "trapFocus", "surfaceId", "offset", "flip", "clamp", "matchAnchorWidth", "maxWidth", "closeOnOutsideClick", "closeOnEscape", "scrollBehavior"], outputs: ["closeRequested"] }, { kind: "component", type: SearchIconComponent, selector: "ea-icon-search" }, { kind: "component", type: TagComponent, selector: "ea-tag", inputs: ["variant", "size", "removable", "disabled", "removeLabel", "maxWidth", "tooltip", "removeTabbable"], outputs: ["removed"] }, { kind: "directive", type: TooltipDirective, selector: "[eaTooltip]", inputs: ["eaTooltip", "tooltipPosition", "maxWidth", "dismissDelay"] }, { kind: "component", type: XIconComponent, selector: "ea-icon-x" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13919
|
+
], viewQueries: [{ propertyName: "wrapperEl", first: true, predicate: ["wrapperEl"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true, isSignal: true }, { propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true, isSignal: true }, { propertyName: "searchEl", first: true, predicate: ["searchEl"], descendants: true, isSignal: true }, { propertyName: "listEl", first: true, predicate: ["listEl"], descendants: true, isSignal: true }, { propertyName: "optionLabelEls", predicate: ["optionLabelEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ea-multi-select-field ea-multi-select-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [forId]=\"id()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\" />\n }\n\n <div class=\"ea-multi-select\">\n <div\n #wrapperEl\n class=\"ea-multi-select__trigger-wrapper\"\n [ngClass]=\"wrapperClasses()\"\n (click)=\"onTriggerAreaClick()\">\n <div\n #triggerEl\n class=\"ea-multi-select__trigger\"\n [ngClass]=\"triggerClasses()\"\n [id]=\"id()\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"isOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"isOpen() && !searchable() ? activeOptionId() : null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (keydown)=\"handleTriggerKeydown($event)\">\n <span class=\"ea-multi-select__trigger-content\">\n @if (!hasValue()) {\n <span class=\"ea-multi-select__trigger-placeholder\">\n <bdi>{{ resolvedPlaceholder() }}</bdi>\n </span>\n } @else {\n @for (opt of visibleChips(); track opt.value) {\n <ea-tag\n [size]=\"size()\"\n variant=\"default\"\n [maxWidth]=\"maxChipWidth()\"\n [removable]=\"!isDisabled() && !readonly()\"\n [removeTabbable]=\"false\"\n [removeLabel]=\"i18n.messages().multiSelect.removeOption(opt.label)\"\n (removed)=\"removeChip(opt)\">\n <span>{{ opt.label }}</span>\n </ea-tag>\n }\n @if (hiddenChipCount() > 0) {\n <span class=\"ea-multi-select__more\">+{{ hiddenChipCount() }}</span>\n }\n }\n </span>\n </div>\n @if (hasValue() && !isDisabled() && !readonly()) {\n <button\n type=\"button\"\n class=\"ea-multi-select__clear\"\n [attr.aria-label]=\"i18n.messages().multiSelect.clearAll\"\n (click)=\"clear($event)\">\n <ea-icon-x\n class=\"ea-multi-select__clear-icon\"\n aria-hidden=\"true\" />\n </button>\n }\n <ea-icon-chevron-down\n class=\"ea-multi-select__trigger-icon\"\n aria-hidden=\"true\" />\n </div>\n\n <ea-popover\n [anchor]=\"wrapperEl\"\n [open]=\"isOpen()\"\n placement=\"bottom-start\"\n [aria-label]=\"i18n.messages().multiSelect.dialogLabel\"\n [matchAnchorWidth]=\"true\"\n [maxWidth]=\"popoverMaxWidth()\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"reposition\"\n (closeRequested)=\"onPopoverCloseRequested()\">\n <div\n class=\"ea-multi-select__popover\"\n [ngClass]=\"menuClasses()\">\n @if (searchable()) {\n <div class=\"ea-multi-select__search\">\n <ea-icon-search\n class=\"ea-multi-select__search-icon\"\n aria-hidden=\"true\" />\n <input\n #searchEl\n type=\"text\"\n dir=\"auto\"\n class=\"ea-multi-select__search-input\"\n autocomplete=\"off\"\n [placeholder]=\"resolvedSearchPlaceholder()\"\n [value]=\"searchTerm()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"handlePopoverKeydown($event)\" />\n </div>\n }\n\n <ul\n #listEl\n class=\"ea-multi-select__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId()\"\n [attr.aria-label]=\"label() ?? ariaLabel() ?? null\">\n @if (selectAllVisible()) {\n <li\n class=\"ea-multi-select__option ea-multi-select__option--select-all\"\n [class.ea-multi-select__option--focused]=\"focusedIndex() === 0\"\n [id]=\"id() + '-opt-0'\"\n role=\"option\"\n [attr.aria-selected]=\"selectAllState() === 'all'\"\n [attr.aria-checked]=\"selectAllAriaChecked()\"\n (click)=\"onSelectAllClick()\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectAllState() === 'all'\"\n [indeterminate]=\"selectAllState() === 'some'\" />\n <span class=\"ea-multi-select__option-label\">\n {{ i18n.messages().multiSelect.selectAll }}\n </span>\n </li>\n }\n @for (group of renderedGroups(); track $index) {\n <li\n class=\"ea-multi-select__group\"\n [class.ea-multi-select__group--ruled]=\"group.rule\"\n role=\"presentation\">\n @if (group.label; as groupLabel) {\n <span\n class=\"ea-multi-select__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </span>\n }\n <ul\n class=\"ea-multi-select__group-options\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @for (entry of group.options; track entry.option.value) {\n <li\n class=\"ea-multi-select__option\"\n [class.ea-multi-select__option--focused]=\"\n focusedIndex() === entry.index + selectAllOffset()\n \"\n [class.ea-multi-select__option--disabled]=\"entry.option.disabled\"\n [id]=\"id() + '-opt-' + (entry.index + selectAllOffset())\"\n role=\"option\"\n [attr.aria-selected]=\"selectedSet().has(entry.option.value)\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (click)=\"onOptionClick(entry.option, entry.index)\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectedSet().has(entry.option.value)\"\n [disabled]=\"!!entry.option.disabled\" />\n <span\n #optionLabelEl\n class=\"ea-multi-select__option-label\"\n [attr.data-value]=\"entry.option.value\"\n [eaTooltip]=\"\n clippedOptions().has(entry.option.value) ? entry.option.label : ''\n \">\n {{ entry.option.label }}\n </span>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n @if (filteredOptions().length === 0) {\n <div\n class=\"ea-multi-select__empty\"\n role=\"status\">\n {{ i18n.messages().multiSelect.searchEmpty }}\n </div>\n }\n </div>\n </ea-popover>\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n", styles: [".ea-multi-select-field{display:flex;flex-direction:column;gap:.375em;--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-multi-select-field--2xs{font-size:var(--font-size-2xs)}.ea-multi-select-field--xs{font-size:var(--font-size-xs)}.ea-multi-select-field--sm{font-size:var(--font-size-sm)}.ea-multi-select-field--md{font-size:var(--font-size-md)}.ea-multi-select-field--lg{font-size:var(--font-size-lg)}.ea-multi-select-field--xl{font-size:var(--font-size-xl)}.ea-multi-select{position:relative}.ea-multi-select__trigger-wrapper{position:relative;display:flex;align-items:center;gap:.5em;width:100%;min-height:2.5em;padding:.375em .75em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors),var(--transition-shadow)}.ea-multi-select__trigger-wrapper:has(ea-tag){padding-block:.125em}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){border-color:var(--color-border-focus);box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error){border-color:var(--color-error-default)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--disabled){background-color:var(--color-bg-muted);opacity:.6;cursor:not-allowed}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly){cursor:default}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){border-color:var(--color-border-focus);box-shadow:none}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger{display:flex;align-items:center;flex:1;min-width:0;text-align:start;font-family:var(--font-family-sans);cursor:pointer}.ea-multi-select__trigger:focus-visible{outline:none}.ea-multi-select__trigger--disabled{cursor:not-allowed}.ea-multi-select__trigger--readonly{cursor:default}.ea-multi-select__trigger-content{display:flex;flex-wrap:nowrap;align-items:center;gap:.25em;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}.ea-multi-select__trigger-content::-webkit-scrollbar{display:none}.ea-multi-select__trigger-content ea-tag{flex-shrink:0;--ea-tag-padding-block: 0}.ea-multi-select__trigger-placeholder{color:var(--color-text-tertiary)}.ea-multi-select__trigger-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-secondary);transition:var(--transition-transform)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open) .ea-multi-select__trigger-icon{transform:rotate(180deg)}.ea-multi-select__more{display:inline-flex;flex-shrink:0;align-items:center;padding:0 .4411764706em;border-radius:var(--radius-lg);background-color:var(--color-bg-muted);font-size:.85em;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-multi-select__clear{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__clear>*{font-size:1.25em}.ea-multi-select__clear:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-multi-select__clear:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-multi-select__clear:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__clear:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__clear:disabled{cursor:not-allowed;opacity:.5}.ea-multi-select__clear{flex-shrink:0}.ea-multi-select__popover{display:flex;flex-direction:column;overflow:hidden;max-height:20rem;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--ea-multi-select-popover-background-color, var(--color-bg-elevated))}@media(forced-colors:active){.ea-multi-select__popover{border:1px solid CanvasText}}.ea-multi-select__popover--2xs{font-size:var(--font-size-2xs)}.ea-multi-select__popover--xs{font-size:var(--font-size-xs)}.ea-multi-select__popover--sm{font-size:var(--font-size-sm)}.ea-multi-select__popover--md{font-size:var(--font-size-md)}.ea-multi-select__popover--lg{font-size:var(--font-size-lg)}.ea-multi-select__popover--xl{font-size:var(--font-size-xl)}.ea-multi-select__search{display:flex;align-items:center;gap:.5em;flex-shrink:0;padding:.5em .75em;border-bottom:var(--border-width-thin) solid var(--color-border-default)}.ea-multi-select__search-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-tertiary)}.ea-multi-select__search-input{flex:1;min-width:0;padding:0;border:none;background:none;font-family:var(--font-family-sans);font-size:inherit;color:var(--color-text-primary)}.ea-multi-select__search-input::placeholder{color:var(--color-text-tertiary);opacity:1}.ea-multi-select__search-input:focus{outline:none}.ea-multi-select__list{overflow-y:auto;overscroll-behavior:none;flex:1;margin:0;padding:.25em 0;list-style:none}.ea-multi-select__group{position:relative}.ea-multi-select__group--ruled{padding-top:.25em;margin-top:.25em}.ea-multi-select__group--ruled:before{position:absolute;top:0;inset-inline-end:0;inset-inline-start:0;height:var(--border-width-thin);background-color:var(--color-divider);content:\"\"}.ea-multi-select__group-options{padding:0;margin:0;list-style:none}.ea-multi-select__group-label{display:block;padding:.5em .75em .125em;font-size:.8125em;font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-multi-select__option{display:flex;align-items:center;gap:.5em;padding:.375em .75em;font-size:inherit;font-family:var(--font-family-sans);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__option--focused{background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option--focused{background-color:Highlight;color:HighlightText}}.ea-multi-select__option--disabled{color:var(--color-text-disabled);cursor:not-allowed}@media(forced-colors:active){.ea-multi-select__option--disabled{color:GrayText}}.ea-multi-select__option--select-all{border-bottom:var(--border-width-thin) solid var(--color-border-default);font-weight:var(--font-weight-medium)}.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:Highlight;color:HighlightText}}.ea-multi-select__option ea-checkbox{pointer-events:none;display:inline-flex;align-items:center;line-height:1}.ea-multi-select__option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ea-multi-select__empty{padding:.75em;font-size:inherit;text-align:center;color:var(--color-text-tertiary);list-style:none}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ea-checkbox", inputs: ["label", "count", "hint", "errorMsg", "errorMessages", "size", "disabled", "required", "indeterminate", "aria-label", "id", "checked"], outputs: ["checkedChange", "changed"] }, { kind: "component", type: ChevronDownIconComponent, selector: "ea-icon-chevron-down" }, { kind: "component", type: FieldLabelComponent, selector: "ea-field-label", inputs: ["text", "forId", "required", "labelId"] }, { kind: "component", type: FieldMessagesComponent, selector: "ea-field-messages", inputs: ["id", "error", "hint"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PopoverComponent, selector: "ea-popover", inputs: ["anchor", "open", "placement", "role", "aria-label", "aria-labelledby", "trapFocus", "surfaceId", "offset", "flip", "clamp", "matchAnchorWidth", "maxWidth", "closeOnOutsideClick", "closeOnEscape", "scrollBehavior"], outputs: ["closeRequested"] }, { kind: "component", type: SearchIconComponent, selector: "ea-icon-search" }, { kind: "component", type: TagComponent, selector: "ea-tag", inputs: ["variant", "size", "removable", "disabled", "removeLabel", "maxWidth", "tooltip", "removeTabbable"], outputs: ["removed"] }, { kind: "directive", type: TooltipDirective, selector: "[eaTooltip]", inputs: ["eaTooltip", "tooltipPosition", "maxWidth", "dismissDelay"] }, { kind: "component", type: XIconComponent, selector: "ea-icon-x" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13822
13920
|
}
|
|
13823
13921
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
13824
13922
|
type: Component,
|
|
@@ -13839,8 +13937,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
13839
13937
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
13840
13938
|
multi: true,
|
|
13841
13939
|
},
|
|
13842
|
-
], template: "<div class=\"ea-multi-select-field ea-multi-select-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [forId]=\"id()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\" />\n }\n\n <div class=\"ea-multi-select\">\n <div\n #wrapperEl\n class=\"ea-multi-select__trigger-wrapper\"\n [ngClass]=\"wrapperClasses()\"\n (click)=\"onTriggerAreaClick()\">\n <div\n #triggerEl\n class=\"ea-multi-select__trigger\"\n [ngClass]=\"triggerClasses()\"\n [id]=\"id()\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"isOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"isOpen() && !searchable() ? activeOptionId() : null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (keydown)=\"handleTriggerKeydown($event)\">\n <span class=\"ea-multi-select__trigger-content\">\n @if (!hasValue()) {\n <span class=\"ea-multi-select__trigger-placeholder\">\n <bdi>{{ resolvedPlaceholder() }}</bdi>\n </span>\n } @else {\n @for (opt of visibleChips(); track opt.value) {\n <ea-tag\n [size]=\"size()\"\n variant=\"default\"\n [maxWidth]=\"maxChipWidth()\"\n [removable]=\"!isDisabled() && !readonly()\"\n [removeTabbable]=\"false\"\n [removeLabel]=\"i18n.messages().multiSelect.removeOption(opt.label)\"\n (removed)=\"removeChip(opt)\">\n <span>{{ opt.label }}</span>\n </ea-tag>\n }\n @if (hiddenChipCount() > 0) {\n <span class=\"ea-multi-select__more\">+{{ hiddenChipCount() }}</span>\n }\n }\n </span>\n </div>\n @if (hasValue() && !isDisabled() && !readonly()) {\n <button\n type=\"button\"\n class=\"ea-multi-select__clear\"\n [attr.aria-label]=\"i18n.messages().multiSelect.clearAll\"\n (click)=\"clear($event)\">\n <ea-icon-x\n class=\"ea-multi-select__clear-icon\"\n aria-hidden=\"true\" />\n </button>\n }\n <ea-icon-chevron-down\n class=\"ea-multi-select__trigger-icon\"\n aria-hidden=\"true\" />\n </div>\n\n <ea-popover\n [anchor]=\"wrapperEl\"\n [open]=\"isOpen()\"\n placement=\"bottom-start\"\n [aria-label]=\"i18n.messages().multiSelect.dialogLabel\"\n [matchAnchorWidth]=\"true\"\n [maxWidth]=\"popoverMaxWidth()\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"reposition\"\n (closeRequested)=\"onPopoverCloseRequested()\">\n <div\n class=\"ea-multi-select__popover\"\n [ngClass]=\"menuClasses()\">\n @if (searchable()) {\n <div class=\"ea-multi-select__search\">\n <ea-icon-search\n class=\"ea-multi-select__search-icon\"\n aria-hidden=\"true\" />\n <input\n #searchEl\n type=\"text\"\n dir=\"auto\"\n class=\"ea-multi-select__search-input\"\n autocomplete=\"off\"\n [placeholder]=\"resolvedSearchPlaceholder()\"\n [value]=\"searchTerm()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"handlePopoverKeydown($event)\" />\n </div>\n }\n\n <ul\n #listEl\n class=\"ea-multi-select__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId()\"\n [attr.aria-label]=\"label() ?? ariaLabel() ?? null\">\n @if (selectAllVisible()) {\n <li\n class=\"ea-multi-select__option ea-multi-select__option--select-all\"\n [class.ea-multi-select__option--focused]=\"focusedIndex() === 0\"\n [id]=\"id() + '-opt-0'\"\n role=\"option\"\n [attr.aria-selected]=\"selectAllState() === 'all'\"\n [attr.aria-checked]=\"selectAllAriaChecked()\"\n (click)=\"onSelectAllClick()\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectAllState() === 'all'\"\n [indeterminate]=\"selectAllState() === 'some'\" />\n <span class=\"ea-multi-select__option-label\">\n {{ i18n.messages().multiSelect.selectAll }}\n </span>\n </li>\n }\n @for (group of renderedGroups(); track $index) {\n <li\n class=\"ea-multi-select__group\"\n [class.ea-multi-select__group--ruled]=\"group.rule\"\n role=\"presentation\">\n @if (group.label; as groupLabel) {\n <span\n class=\"ea-multi-select__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </span>\n }\n <ul\n class=\"ea-multi-select__group-options\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @for (entry of group.options; track entry.option.value) {\n <li\n class=\"ea-multi-select__option\"\n [class.ea-multi-select__option--focused]=\"\n focusedIndex() === entry.index + selectAllOffset()\n \"\n [class.ea-multi-select__option--disabled]=\"entry.option.disabled\"\n [id]=\"id() + '-opt-' + (entry.index + selectAllOffset())\"\n role=\"option\"\n [attr.aria-selected]=\"selectedSet().has(entry.option.value)\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (click)=\"onOptionClick(entry.option, entry.index)\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectedSet().has(entry.option.value)\"\n [disabled]=\"!!entry.option.disabled\" />\n <span\n #optionLabelEl\n class=\"ea-multi-select__option-label\"\n [attr.data-value]=\"entry.option.value\"\n [eaTooltip]=\"\n clippedOptions().has(entry.option.value) ? entry.option.label : ''\n \">\n {{ entry.option.label }}\n </span>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n @if (filteredOptions().length === 0) {\n <div\n class=\"ea-multi-select__empty\"\n role=\"status\">\n {{ i18n.messages().multiSelect.searchEmpty }}\n </div>\n }\n </div>\n </ea-popover>\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n", styles: [".ea-multi-select-field{display:flex;flex-direction:column;gap:.375em;--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-multi-select-field--2xs{font-size:var(--font-size-2xs)}.ea-multi-select-field--xs{font-size:var(--font-size-xs)}.ea-multi-select-field--sm{font-size:var(--font-size-sm)}.ea-multi-select-field--md{font-size:var(--font-size-md)}.ea-multi-select-field--lg{font-size:var(--font-size-lg)}.ea-multi-select-field--xl{font-size:var(--font-size-xl)}.ea-multi-select{position:relative}.ea-multi-select__trigger-wrapper{position:relative;display:flex;align-items:center;gap:.5em;width:100%;min-height:2.5em;padding:.375em .75em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors),var(--transition-shadow)}.ea-multi-select__trigger-wrapper:has(ea-tag){padding-block:.125em}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){border-color:var(--color-border-focus);box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error){border-color:var(--color-error-default)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--disabled){background-color:var(--color-bg-muted);opacity:.6;cursor:not-allowed}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly){cursor:default}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){border-color:var(--color-border-focus);box-shadow:none}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger{display:flex;align-items:center;flex:1;min-width:0;text-align:start;font-family:var(--font-family-sans);cursor:pointer}.ea-multi-select__trigger:focus-visible{outline:none}.ea-multi-select__trigger--disabled{cursor:not-allowed}.ea-multi-select__trigger--readonly{cursor:default}.ea-multi-select__trigger-content{display:flex;flex-wrap:nowrap;align-items:center;gap:.25em;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin}.ea-multi-select__trigger-content ea-tag{flex-shrink:0;--ea-tag-padding-block: 0}.ea-multi-select__trigger-placeholder{color:var(--color-text-tertiary)}.ea-multi-select__trigger-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-secondary);transition:var(--transition-transform)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open) .ea-multi-select__trigger-icon{transform:rotate(180deg)}.ea-multi-select__more{display:inline-flex;flex-shrink:0;align-items:center;padding:0 .4411764706em;border-radius:var(--radius-lg);background-color:var(--color-bg-muted);font-size:.85em;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-multi-select__clear{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__clear>*{font-size:1.25em}.ea-multi-select__clear:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-multi-select__clear:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-multi-select__clear:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__clear:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__clear:disabled{cursor:not-allowed;opacity:.5}.ea-multi-select__clear{flex-shrink:0}.ea-multi-select__popover{display:flex;flex-direction:column;overflow:hidden;max-height:20rem;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--ea-multi-select-popover-background-color, var(--color-bg-elevated))}@media(forced-colors:active){.ea-multi-select__popover{border:1px solid CanvasText}}.ea-multi-select__popover--2xs{font-size:var(--font-size-2xs)}.ea-multi-select__popover--xs{font-size:var(--font-size-xs)}.ea-multi-select__popover--sm{font-size:var(--font-size-sm)}.ea-multi-select__popover--md{font-size:var(--font-size-md)}.ea-multi-select__popover--lg{font-size:var(--font-size-lg)}.ea-multi-select__popover--xl{font-size:var(--font-size-xl)}.ea-multi-select__search{display:flex;align-items:center;gap:.5em;flex-shrink:0;padding:.5em .75em;border-bottom:var(--border-width-thin) solid var(--color-border-default)}.ea-multi-select__search-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-tertiary)}.ea-multi-select__search-input{flex:1;min-width:0;padding:0;border:none;background:none;font-family:var(--font-family-sans);font-size:inherit;color:var(--color-text-primary)}.ea-multi-select__search-input::placeholder{color:var(--color-text-tertiary);opacity:1}.ea-multi-select__search-input:focus{outline:none}.ea-multi-select__list{overflow-y:auto;overscroll-behavior:none;flex:1;margin:0;padding:.25em 0;list-style:none}.ea-multi-select__group{position:relative}.ea-multi-select__group--ruled{padding-top:.25em;margin-top:.25em}.ea-multi-select__group--ruled:before{position:absolute;top:0;inset-inline-end:0;inset-inline-start:0;height:var(--border-width-thin);background-color:var(--color-divider);content:\"\"}.ea-multi-select__group-options{padding:0;margin:0;list-style:none}.ea-multi-select__group-label{display:block;padding:.5em .75em .125em;font-size:.8125em;font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-multi-select__option{display:flex;align-items:center;gap:.5em;padding:.375em .75em;font-size:inherit;font-family:var(--font-family-sans);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__option--focused{background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option--focused{background-color:Highlight;color:HighlightText}}.ea-multi-select__option--disabled{color:var(--color-text-disabled);cursor:not-allowed}@media(forced-colors:active){.ea-multi-select__option--disabled{color:GrayText}}.ea-multi-select__option--select-all{border-bottom:var(--border-width-thin) solid var(--color-border-default);font-weight:var(--font-weight-medium)}.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:Highlight;color:HighlightText}}.ea-multi-select__option ea-checkbox{pointer-events:none;display:inline-flex;align-items:center;line-height:1}.ea-multi-select__option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ea-multi-select__empty{padding:.75em;font-size:inherit;text-align:center;color:var(--color-text-tertiary);list-style:none}\n"] }]
|
|
13843
|
-
}], ctorParameters: () => [], propDecorators: { wrapperEl: [{ type: i0.ViewChild, args: ['wrapperEl', { isSignal: true }] }], triggerEl: [{ type: i0.ViewChild, args: ['triggerEl', { isSignal: true }] }], searchEl: [{ type: i0.ViewChild, args: ['searchEl', { isSignal: true }] }], listEl: [{ type: i0.ViewChild, args: ['listEl', { isSignal: true }] }], optionLabelEls: [{ type: i0.ViewChildren, args: ['optionLabelEl', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMsg: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMsg", required: false }] }], errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], selectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAll", required: false }] }], maxVisibleChips: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleChips", required: false }] }], maxChipWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxChipWidth", required: false }] }], popoverMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverMaxWidth", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
|
|
13940
|
+
], template: "<div class=\"ea-multi-select-field ea-multi-select-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [forId]=\"id()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\" />\n }\n\n <div class=\"ea-multi-select\">\n <div\n #wrapperEl\n class=\"ea-multi-select__trigger-wrapper\"\n [ngClass]=\"wrapperClasses()\"\n (click)=\"onTriggerAreaClick()\">\n <div\n #triggerEl\n class=\"ea-multi-select__trigger\"\n [ngClass]=\"triggerClasses()\"\n [id]=\"id()\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"isOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"isOpen() && !searchable() ? activeOptionId() : null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (keydown)=\"handleTriggerKeydown($event)\">\n <span class=\"ea-multi-select__trigger-content\">\n @if (!hasValue()) {\n <span class=\"ea-multi-select__trigger-placeholder\">\n <bdi>{{ resolvedPlaceholder() }}</bdi>\n </span>\n } @else {\n @for (opt of visibleChips(); track opt.value) {\n <ea-tag\n [size]=\"size()\"\n variant=\"default\"\n [maxWidth]=\"maxChipWidth()\"\n [removable]=\"!isDisabled() && !readonly()\"\n [removeTabbable]=\"false\"\n [removeLabel]=\"i18n.messages().multiSelect.removeOption(opt.label)\"\n (removed)=\"removeChip(opt)\">\n <span>{{ opt.label }}</span>\n </ea-tag>\n }\n @if (hiddenChipCount() > 0) {\n <span class=\"ea-multi-select__more\">+{{ hiddenChipCount() }}</span>\n }\n }\n </span>\n </div>\n @if (hasValue() && !isDisabled() && !readonly()) {\n <button\n type=\"button\"\n class=\"ea-multi-select__clear\"\n [attr.aria-label]=\"i18n.messages().multiSelect.clearAll\"\n (click)=\"clear($event)\">\n <ea-icon-x\n class=\"ea-multi-select__clear-icon\"\n aria-hidden=\"true\" />\n </button>\n }\n <ea-icon-chevron-down\n class=\"ea-multi-select__trigger-icon\"\n aria-hidden=\"true\" />\n </div>\n\n <ea-popover\n [anchor]=\"wrapperEl\"\n [open]=\"isOpen()\"\n placement=\"bottom-start\"\n [aria-label]=\"i18n.messages().multiSelect.dialogLabel\"\n [matchAnchorWidth]=\"true\"\n [maxWidth]=\"popoverMaxWidth()\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"reposition\"\n (closeRequested)=\"onPopoverCloseRequested()\">\n <div\n class=\"ea-multi-select__popover\"\n [ngClass]=\"menuClasses()\">\n @if (searchable()) {\n <div class=\"ea-multi-select__search\">\n <ea-icon-search\n class=\"ea-multi-select__search-icon\"\n aria-hidden=\"true\" />\n <input\n #searchEl\n type=\"text\"\n dir=\"auto\"\n class=\"ea-multi-select__search-input\"\n autocomplete=\"off\"\n [placeholder]=\"resolvedSearchPlaceholder()\"\n [value]=\"searchTerm()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"handlePopoverKeydown($event)\" />\n </div>\n }\n\n <ul\n #listEl\n class=\"ea-multi-select__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId()\"\n [attr.aria-label]=\"label() ?? ariaLabel() ?? null\">\n @if (selectAllVisible()) {\n <li\n class=\"ea-multi-select__option ea-multi-select__option--select-all\"\n [class.ea-multi-select__option--focused]=\"focusedIndex() === 0\"\n [id]=\"id() + '-opt-0'\"\n role=\"option\"\n [attr.aria-selected]=\"selectAllState() === 'all'\"\n [attr.aria-checked]=\"selectAllAriaChecked()\"\n (click)=\"onSelectAllClick()\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectAllState() === 'all'\"\n [indeterminate]=\"selectAllState() === 'some'\" />\n <span class=\"ea-multi-select__option-label\">\n {{ i18n.messages().multiSelect.selectAll }}\n </span>\n </li>\n }\n @for (group of renderedGroups(); track $index) {\n <li\n class=\"ea-multi-select__group\"\n [class.ea-multi-select__group--ruled]=\"group.rule\"\n role=\"presentation\">\n @if (group.label; as groupLabel) {\n <span\n class=\"ea-multi-select__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </span>\n }\n <ul\n class=\"ea-multi-select__group-options\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @for (entry of group.options; track entry.option.value) {\n <li\n class=\"ea-multi-select__option\"\n [class.ea-multi-select__option--focused]=\"\n focusedIndex() === entry.index + selectAllOffset()\n \"\n [class.ea-multi-select__option--disabled]=\"entry.option.disabled\"\n [id]=\"id() + '-opt-' + (entry.index + selectAllOffset())\"\n role=\"option\"\n [attr.aria-selected]=\"selectedSet().has(entry.option.value)\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (click)=\"onOptionClick(entry.option, entry.index)\">\n <ea-checkbox\n size=\"sm\"\n inert\n aria-hidden=\"true\"\n [checked]=\"selectedSet().has(entry.option.value)\"\n [disabled]=\"!!entry.option.disabled\" />\n <span\n #optionLabelEl\n class=\"ea-multi-select__option-label\"\n [attr.data-value]=\"entry.option.value\"\n [eaTooltip]=\"\n clippedOptions().has(entry.option.value) ? entry.option.label : ''\n \">\n {{ entry.option.label }}\n </span>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n @if (filteredOptions().length === 0) {\n <div\n class=\"ea-multi-select__empty\"\n role=\"status\">\n {{ i18n.messages().multiSelect.searchEmpty }}\n </div>\n }\n </div>\n </ea-popover>\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n", styles: [".ea-multi-select-field{display:flex;flex-direction:column;gap:.375em;--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-multi-select-field--2xs{font-size:var(--font-size-2xs)}.ea-multi-select-field--xs{font-size:var(--font-size-xs)}.ea-multi-select-field--sm{font-size:var(--font-size-sm)}.ea-multi-select-field--md{font-size:var(--font-size-md)}.ea-multi-select-field--lg{font-size:var(--font-size-lg)}.ea-multi-select-field--xl{font-size:var(--font-size-xl)}.ea-multi-select{position:relative}.ea-multi-select__trigger-wrapper{position:relative;display:flex;align-items:center;gap:.5em;width:100%;min-height:2.5em;padding:.375em .75em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors),var(--transition-shadow)}.ea-multi-select__trigger-wrapper:has(ea-tag){padding-block:.125em}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){border-color:var(--color-border-focus);box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error){border-color:var(--color-error-default)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--error.ea-multi-select__trigger--open){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--disabled){background-color:var(--color-bg-muted);opacity:.6;cursor:not-allowed}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly){cursor:default}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){border-color:var(--color-border-focus);box-shadow:none}@media(forced-colors:active){.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--readonly:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__trigger{display:flex;align-items:center;flex:1;min-width:0;text-align:start;font-family:var(--font-family-sans);cursor:pointer}.ea-multi-select__trigger:focus-visible{outline:none}.ea-multi-select__trigger--disabled{cursor:not-allowed}.ea-multi-select__trigger--readonly{cursor:default}.ea-multi-select__trigger-content{display:flex;flex-wrap:nowrap;align-items:center;gap:.25em;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}.ea-multi-select__trigger-content::-webkit-scrollbar{display:none}.ea-multi-select__trigger-content ea-tag{flex-shrink:0;--ea-tag-padding-block: 0}.ea-multi-select__trigger-placeholder{color:var(--color-text-tertiary)}.ea-multi-select__trigger-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-secondary);transition:var(--transition-transform)}.ea-multi-select__trigger-wrapper:has(.ea-multi-select__trigger--open) .ea-multi-select__trigger-icon{transform:rotate(180deg)}.ea-multi-select__more{display:inline-flex;flex-shrink:0;align-items:center;padding:0 .4411764706em;border-radius:var(--radius-lg);background-color:var(--color-bg-muted);font-size:.85em;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-multi-select__clear{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__clear>*{font-size:1.25em}.ea-multi-select__clear:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-multi-select__clear:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-multi-select__clear:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring)}@media(forced-colors:active){.ea-multi-select__clear:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-multi-select__clear:disabled{cursor:not-allowed;opacity:.5}.ea-multi-select__clear{flex-shrink:0}.ea-multi-select__popover{display:flex;flex-direction:column;overflow:hidden;max-height:20rem;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--ea-multi-select-popover-background-color, var(--color-bg-elevated))}@media(forced-colors:active){.ea-multi-select__popover{border:1px solid CanvasText}}.ea-multi-select__popover--2xs{font-size:var(--font-size-2xs)}.ea-multi-select__popover--xs{font-size:var(--font-size-xs)}.ea-multi-select__popover--sm{font-size:var(--font-size-sm)}.ea-multi-select__popover--md{font-size:var(--font-size-md)}.ea-multi-select__popover--lg{font-size:var(--font-size-lg)}.ea-multi-select__popover--xl{font-size:var(--font-size-xl)}.ea-multi-select__search{display:flex;align-items:center;gap:.5em;flex-shrink:0;padding:.5em .75em;border-bottom:var(--border-width-thin) solid var(--color-border-default)}.ea-multi-select__search-icon{flex-shrink:0;width:1em;height:1em;color:var(--color-text-tertiary)}.ea-multi-select__search-input{flex:1;min-width:0;padding:0;border:none;background:none;font-family:var(--font-family-sans);font-size:inherit;color:var(--color-text-primary)}.ea-multi-select__search-input::placeholder{color:var(--color-text-tertiary);opacity:1}.ea-multi-select__search-input:focus{outline:none}.ea-multi-select__list{overflow-y:auto;overscroll-behavior:none;flex:1;margin:0;padding:.25em 0;list-style:none}.ea-multi-select__group{position:relative}.ea-multi-select__group--ruled{padding-top:.25em;margin-top:.25em}.ea-multi-select__group--ruled:before{position:absolute;top:0;inset-inline-end:0;inset-inline-start:0;height:var(--border-width-thin);background-color:var(--color-divider);content:\"\"}.ea-multi-select__group-options{padding:0;margin:0;list-style:none}.ea-multi-select__group-label{display:block;padding:.5em .75em .125em;font-size:.8125em;font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-multi-select__option{display:flex;align-items:center;gap:.5em;padding:.375em .75em;font-size:inherit;font-family:var(--font-family-sans);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors)}.ea-multi-select__option--focused{background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option--focused{background-color:Highlight;color:HighlightText}}.ea-multi-select__option--disabled{color:var(--color-text-disabled);cursor:not-allowed}@media(forced-colors:active){.ea-multi-select__option--disabled{color:GrayText}}.ea-multi-select__option--select-all{border-bottom:var(--border-width-thin) solid var(--color-border-default);font-weight:var(--font-weight-medium)}.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-multi-select__option:hover:not(.ea-multi-select__option--disabled){background-color:Highlight;color:HighlightText}}.ea-multi-select__option ea-checkbox{pointer-events:none;display:inline-flex;align-items:center;line-height:1}.ea-multi-select__option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ea-multi-select__empty{padding:.75em;font-size:inherit;text-align:center;color:var(--color-text-tertiary);list-style:none}\n"] }]
|
|
13941
|
+
}], ctorParameters: () => [], propDecorators: { wrapperEl: [{ type: i0.ViewChild, args: ['wrapperEl', { isSignal: true }] }], popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => PopoverComponent), { isSignal: true }] }], triggerEl: [{ type: i0.ViewChild, args: ['triggerEl', { isSignal: true }] }], searchEl: [{ type: i0.ViewChild, args: ['searchEl', { isSignal: true }] }], listEl: [{ type: i0.ViewChild, args: ['listEl', { isSignal: true }] }], optionLabelEls: [{ type: i0.ViewChildren, args: ['optionLabelEl', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMsg: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMsg", required: false }] }], errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], selectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAll", required: false }] }], maxVisibleChips: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleChips", required: false }] }], maxChipWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxChipWidth", required: false }] }], popoverMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverMaxWidth", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
|
|
13844
13942
|
|
|
13845
13943
|
/**
|
|
13846
13944
|
* Numeric field with min/max/step bounds, native arrow-key stepping, and
|
|
@@ -41144,6 +41242,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
41144
41242
|
}]
|
|
41145
41243
|
}] });
|
|
41146
41244
|
|
|
41245
|
+
class UploadIconComponent extends IconComponentBase {
|
|
41246
|
+
static slug = 'upload';
|
|
41247
|
+
static category = 'feather';
|
|
41248
|
+
static defaultStrokeWidth = 1.5;
|
|
41249
|
+
static tags = [
|
|
41250
|
+
'upload',
|
|
41251
|
+
'send',
|
|
41252
|
+
'arrow',
|
|
41253
|
+
'share',
|
|
41254
|
+
'submit',
|
|
41255
|
+
'téléverser',
|
|
41256
|
+
'envoyer',
|
|
41257
|
+
'subir',
|
|
41258
|
+
'cargar',
|
|
41259
|
+
'μεταφόρτωση',
|
|
41260
|
+
'ανέβασμα',
|
|
41261
|
+
'prześlij',
|
|
41262
|
+
'wgraj',
|
|
41263
|
+
];
|
|
41264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UploadIconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
41265
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.2", type: UploadIconComponent, isStandalone: true, selector: "ea-icon-upload", usesInheritance: true, ngImport: i0, template: `
|
|
41266
|
+
<svg
|
|
41267
|
+
viewBox="0 0 24 24"
|
|
41268
|
+
fill="none"
|
|
41269
|
+
stroke="currentColor"
|
|
41270
|
+
[attr.stroke-width]="strokeWidth()"
|
|
41271
|
+
stroke-linecap="round"
|
|
41272
|
+
stroke-linejoin="round"
|
|
41273
|
+
aria-hidden="true"
|
|
41274
|
+
width="100%"
|
|
41275
|
+
height="100%">
|
|
41276
|
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
41277
|
+
<polyline points="17 8 12 3 7 8" />
|
|
41278
|
+
<line
|
|
41279
|
+
x1="12"
|
|
41280
|
+
y1="3"
|
|
41281
|
+
x2="12"
|
|
41282
|
+
y2="15" />
|
|
41283
|
+
</svg>
|
|
41284
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
41285
|
+
}
|
|
41286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UploadIconComponent, decorators: [{
|
|
41287
|
+
type: Component,
|
|
41288
|
+
args: [{
|
|
41289
|
+
selector: 'ea-icon-upload',
|
|
41290
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41291
|
+
template: `
|
|
41292
|
+
<svg
|
|
41293
|
+
viewBox="0 0 24 24"
|
|
41294
|
+
fill="none"
|
|
41295
|
+
stroke="currentColor"
|
|
41296
|
+
[attr.stroke-width]="strokeWidth()"
|
|
41297
|
+
stroke-linecap="round"
|
|
41298
|
+
stroke-linejoin="round"
|
|
41299
|
+
aria-hidden="true"
|
|
41300
|
+
width="100%"
|
|
41301
|
+
height="100%">
|
|
41302
|
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
41303
|
+
<polyline points="17 8 12 3 7 8" />
|
|
41304
|
+
<line
|
|
41305
|
+
x1="12"
|
|
41306
|
+
y1="3"
|
|
41307
|
+
x2="12"
|
|
41308
|
+
y2="15" />
|
|
41309
|
+
</svg>
|
|
41310
|
+
`,
|
|
41311
|
+
}]
|
|
41312
|
+
}] });
|
|
41313
|
+
|
|
41147
41314
|
class UserCheckIconComponent extends IconComponentBase {
|
|
41148
41315
|
static slug = 'user-check';
|
|
41149
41316
|
static category = 'feather';
|