@recursyve/nice-ui-kit.v2 14.0.0-beta.111 → 14.0.0-beta.113

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.
@@ -1841,7 +1841,10 @@ class NiceAssetsCarouselComponent {
1841
1841
  this.activeAsset = index;
1842
1842
  }
1843
1843
  async onFilesChange(event) {
1844
- const files = event.target?.files;
1844
+ let files = event.target?.files;
1845
+ if (this.imagesProcessor) {
1846
+ files = await this.getProcessedFiles(files);
1847
+ }
1845
1848
  await this.onFilesDrop(files);
1846
1849
  this.inputElement.nativeElement.value = "";
1847
1850
  }
@@ -1893,9 +1896,15 @@ class NiceAssetsCarouselComponent {
1893
1896
  await this._activeVideoElement.nativeElement.play();
1894
1897
  await this._assetsElement.get(this._active).nativeElement.firstElementChild.play();
1895
1898
  }
1899
+ async getProcessedFiles(files) {
1900
+ try {
1901
+ return await this.imagesProcessor(files);
1902
+ }
1903
+ catch (e) { }
1904
+ }
1896
1905
  }
1897
1906
  NiceAssetsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAssetsCarouselComponent, deps: [{ token: NICE_ASSETS_CAROUSEL_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1898
- NiceAssetsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAssetsCarouselComponent, selector: "nice-assets-carousel", inputs: { color: "color", edit: "edit", accept: "accept", customActions: "customActions", multipleUpload: "multipleUpload", visiblePreviewAsset: "visiblePreviewAsset", showAddAssetContainer: "showAddAssetContainer", assets: "assets" }, outputs: { activeChange: "activeChange", removedAsset: "removedAsset" }, providers: [
1907
+ NiceAssetsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAssetsCarouselComponent, selector: "nice-assets-carousel", inputs: { color: "color", edit: "edit", accept: "accept", customActions: "customActions", imagesProcessor: "imagesProcessor", multipleUpload: "multipleUpload", visiblePreviewAsset: "visiblePreviewAsset", showAddAssetContainer: "showAddAssetContainer", assets: "assets" }, outputs: { activeChange: "activeChange", removedAsset: "removedAsset" }, providers: [
1899
1908
  {
1900
1909
  provide: NG_VALUE_ACCESSOR,
1901
1910
  useExisting: forwardRef(() => NiceAssetsCarouselComponent),
@@ -1927,6 +1936,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
1927
1936
  type: Input
1928
1937
  }], customActions: [{
1929
1938
  type: Input
1939
+ }], imagesProcessor: [{
1940
+ type: Input
1930
1941
  }], multipleUpload: [{
1931
1942
  type: Input
1932
1943
  }], visiblePreviewAsset: [{
@@ -8157,6 +8168,7 @@ class NiceShowHintDirective {
8157
8168
  this._overlayRef.detach();
8158
8169
  }
8159
8170
  this._hintInstance = null;
8171
+ this._hintService.setActiveHint(false);
8160
8172
  }
8161
8173
  _isHintVisible() {
8162
8174
  return !!this._hintInstance;
@@ -8820,6 +8832,7 @@ class NiceVerticalNavigationComponent extends NiceNavigationComponent {
8820
8832
  this._router = _router;
8821
8833
  this._scrollStrategyOptions = _scrollStrategyOptions;
8822
8834
  this._hintService = _hintService;
8835
+ this._forceHovered = false;
8823
8836
  this._animationsEnabled = false;
8824
8837
  this._scrollStrategy = this._scrollStrategyOptions.block();
8825
8838
  this.name = this._niceUtilsService.randomId();
@@ -8854,6 +8867,11 @@ class NiceVerticalNavigationComponent extends NiceNavigationComponent {
8854
8867
  get navigation() {
8855
8868
  return this._navigation;
8856
8869
  }
8870
+ set forceHovered(forceHovered) {
8871
+ this._forceHovered = forceHovered;
8872
+ this.hoveredChanged.next((this.hovered || this._forceHovered) || this.hasHint);
8873
+ this._changeDetectorRef.markForCheck();
8874
+ }
8857
8875
  // -----------------------------------------------------------------------------------------------------
8858
8876
  // @ Accessors
8859
8877
  // -----------------------------------------------------------------------------------------------------
@@ -8864,7 +8882,7 @@ class NiceVerticalNavigationComponent extends NiceNavigationComponent {
8864
8882
  return {
8865
8883
  "nice-vertical-navigation-animations-enabled": this._animationsEnabled,
8866
8884
  [`nice-vertical-navigation-appearance-${this.appearance}`]: true,
8867
- "nice-vertical-navigation-hover": this.hovered,
8885
+ "nice-vertical-navigation-hover": this.hovered || this._forceHovered,
8868
8886
  "nice-vertical-navigation-inner": this.inner,
8869
8887
  "nice-vertical-navigation-mode-over": this.mode === "over",
8870
8888
  "nice-vertical-navigation-mode-side": this.mode === "side",
@@ -9002,7 +9020,7 @@ class NiceVerticalNavigationComponent extends NiceNavigationComponent {
9002
9020
  });
9003
9021
  this._hintService.hasActiveHint$.pipe(takeUntil(this._unsubscribeAll)).subscribe(hasHint => {
9004
9022
  this.hasHint = hasHint;
9005
- this.hoveredChanged.next(this.hovered || this.hasHint);
9023
+ this.hoveredChanged.next((this.hovered || this._forceHovered) || this.hasHint);
9006
9024
  });
9007
9025
  }
9008
9026
  /**
@@ -9268,7 +9286,7 @@ class NiceVerticalNavigationComponent extends NiceNavigationComponent {
9268
9286
  this._enableAnimations();
9269
9287
  // Set the hovered
9270
9288
  this.hovered = true;
9271
- this.hoveredChanged.next(this.hovered);
9289
+ this.hoveredChanged.next(this.hovered || this._forceHovered);
9272
9290
  }
9273
9291
  /**
9274
9292
  * On mouseleave
@@ -9278,7 +9296,7 @@ class NiceVerticalNavigationComponent extends NiceNavigationComponent {
9278
9296
  this._enableAnimations();
9279
9297
  // Set the hovered
9280
9298
  this.hovered = false;
9281
- this.hoveredChanged.next(this.hovered || this.hasHint);
9299
+ this.hoveredChanged.next(this.hovered || this._forceHovered || this.hasHint);
9282
9300
  }
9283
9301
  /**
9284
9302
  * Open/close the navigation