@flywheel-io/vision 20.1.2 → 20.1.3

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.
@@ -351,6 +351,9 @@ class FwAvatarComponent {
351
351
  constructor() {
352
352
  this.bordered = input(false, ...(ngDevMode ? [{ debugName: "bordered" }] : []));
353
353
  this.color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
354
+ /**
355
+ * A seed that will be hashed to choose a color, overrides the `color` prop if set
356
+ */
354
357
  this.colorSeed = model(...(ngDevMode ? [undefined, { debugName: "colorSeed" }] : []));
355
358
  this.content = input('icon', ...(ngDevMode ? [{ debugName: "content" }] : []));
356
359
  this.icon = input('user', ...(ngDevMode ? [{ debugName: "icon" }] : []));
@@ -358,6 +361,9 @@ class FwAvatarComponent {
358
361
  this.imageUrl = input('', ...(ngDevMode ? [{ debugName: "imageUrl" }] : []));
359
362
  this.initial = input('', ...(ngDevMode ? [{ debugName: "initial" }] : []));
360
363
  this.selectable = input(false, ...(ngDevMode ? [{ debugName: "selectable" }] : []));
364
+ /**
365
+ * Applies selected styling, they can also be applied by host-context
366
+ */
361
367
  this.selected = model(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
362
368
  this.size = input('small', ...(ngDevMode ? [{ debugName: "size" }] : []));
363
369
  this.variant = input('circular', ...(ngDevMode ? [{ debugName: "variant" }] : []));
@@ -372,8 +378,8 @@ class FwAvatarComponent {
372
378
  ];
373
379
  return classes.filter(Boolean).join(' ');
374
380
  }, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
375
- this.hasedColor = computed(() => pickColorViaHash(this.colorSeed()), ...(ngDevMode ? [{ debugName: "hasedColor" }] : []));
376
- this.colorToDisplay = computed(() => this.colorSeed() ? this.hasedColor() : namedColorMap[this.color()], ...(ngDevMode ? [{ debugName: "colorToDisplay" }] : []));
381
+ this.hashedColor = computed(() => pickColorViaHash(this.colorSeed()), ...(ngDevMode ? [{ debugName: "hashedColor" }] : []));
382
+ this.colorToDisplay = computed(() => this.colorSeed() ? this.hashedColor() : namedColorMap[this.color()], ...(ngDevMode ? [{ debugName: "colorToDisplay" }] : []));
377
383
  this.isImageBroken = signal(false, ...(ngDevMode ? [{ debugName: "isImageBroken" }] : []));
378
384
  this.reloadImageOnUrlChange = effect(() => {
379
385
  this.imageUrl(); // establish dependency
@@ -1159,9 +1165,10 @@ class FwTooltipDirective {
1159
1165
  const tagsToCloseFor = ['mat-option', 'mat-select', 'fw-menu-item'];
1160
1166
  const tagName = nativeElement.tagName.toLowerCase();
1161
1167
  if (tagsToCloseFor.includes(tagName)) {
1168
+ // capture: true so stopPropagation() inside fw-menu-item's handleClick doesn't block this
1162
1169
  nativeElement.addEventListener('click', () => {
1163
1170
  this.hideTooltip();
1164
- });
1171
+ }, { capture: true });
1165
1172
  }
1166
1173
  }, ...(ngDevMode ? [{ debugName: "addMouseEventListeners" }] : []));
1167
1174
  this.openDelayTimer = 0;