@fundamental-ngx/core 0.58.0-rc.68 → 0.58.0-rc.69

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.
@@ -14,7 +14,6 @@ import { UserMenuComponent } from '@fundamental-ngx/core/user-menu';
14
14
  import { AvatarComponent } from '@fundamental-ngx/core/avatar';
15
15
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
16
16
  import { ResizeObserverService, RtlService, ClickedDirective } from '@fundamental-ngx/cdk/utils';
17
- import { isEqual, sortBy } from 'lodash-es';
18
17
  import { NgTemplateOutlet } from '@angular/common';
19
18
  import equal from 'fast-deep-equal';
20
19
  import { BehaviorSubject, distinctUntilChanged } from 'rxjs';
@@ -571,7 +570,7 @@ class ShellbarContextAreaComponent {
571
570
  lastItem.el.style.display = 'none';
572
571
  }
573
572
  }
574
- if (!isEqual(sortBy(this._hiddenItems), sortBy(newHiddenItems))) {
573
+ if (!this._arraysEqual(this._hiddenItems, newHiddenItems)) {
575
574
  this._hiddenItems = newHiddenItems;
576
575
  this.contentItemVisibilityChange.emit(newHiddenItems);
577
576
  }
@@ -603,6 +602,21 @@ class ShellbarContextAreaComponent {
603
602
  })
604
603
  .sort((a, b) => a.priority - b.priority);
605
604
  }
605
+ /**
606
+ * Compares two arrays of HTMLElements for equality.
607
+ * Sorts both arrays and checks if all elements are the same.
608
+ */
609
+ _arraysEqual(arr1, arr2) {
610
+ if (!arr1 && arr2.length === 0) {
611
+ return true;
612
+ }
613
+ if (!arr1 || arr1.length !== arr2.length) {
614
+ return false;
615
+ }
616
+ const sorted1 = [...arr1].sort();
617
+ const sorted2 = [...arr2].sort();
618
+ return sorted1.every((el, index) => el === sorted2[index]);
619
+ }
606
620
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ShellbarContextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
607
621
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ShellbarContextAreaComponent, isStandalone: true, selector: "fd-shellbar-context-area", outputs: { contentItemVisibilityChange: "contentItemVisibilityChange" }, host: { properties: { "class.fd-shellbar__group": "true", "class.fd-shellbar__group--context-area": "true" } }, ngImport: i0, template: ` <ng-content></ng-content>`, isInline: true, styles: [":host{min-width:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
608
622
  }