@recursyve/nice-ui-kit.v2 13.2.0-beta.107 → 13.2.0-beta.109

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.
@@ -1688,6 +1688,7 @@ class NiceAssetsCarouselComponent {
1688
1688
  this.multipleUpload = false;
1689
1689
  this.showAddAssetContainer = true;
1690
1690
  this.activeChange = new EventEmitter();
1691
+ this.removedAsset = new EventEmitter();
1691
1692
  this.listStyle = { transform: "translateX(0px)" };
1692
1693
  if (!this.options) {
1693
1694
  this.options = {
@@ -1821,6 +1822,7 @@ class NiceAssetsCarouselComponent {
1821
1822
  }
1822
1823
  }
1823
1824
  clickRemove() {
1825
+ this.removedAsset.emit(this._assets[this._active]);
1824
1826
  this._assets.splice(this._active, 1);
1825
1827
  if (this._lastAsset) {
1826
1828
  this.clickAsset(this._assets.length - 1);
@@ -1842,7 +1844,7 @@ class NiceAssetsCarouselComponent {
1842
1844
  }
1843
1845
  }
1844
1846
  NiceAssetsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceAssetsCarouselComponent, deps: [{ token: NICE_ASSETS_CAROUSEL_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1845
- NiceAssetsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceAssetsCarouselComponent, selector: "nice-assets-carousel", inputs: { color: "color", edit: "edit", accept: "accept", customActions: "customActions", multipleUpload: "multipleUpload", showAddAssetContainer: "showAddAssetContainer", assets: "assets" }, outputs: { activeChange: "activeChange" }, providers: [
1847
+ NiceAssetsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceAssetsCarouselComponent, selector: "nice-assets-carousel", inputs: { color: "color", edit: "edit", accept: "accept", customActions: "customActions", multipleUpload: "multipleUpload", showAddAssetContainer: "showAddAssetContainer", assets: "assets" }, outputs: { activeChange: "activeChange", removedAsset: "removedAsset" }, providers: [
1846
1848
  {
1847
1849
  provide: NG_VALUE_ACCESSOR,
1848
1850
  useExisting: forwardRef(() => NiceAssetsCarouselComponent),
@@ -1880,6 +1882,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
1880
1882
  type: Input
1881
1883
  }], activeChange: [{
1882
1884
  type: Output
1885
+ }], removedAsset: [{
1886
+ type: Output
1883
1887
  }], activeVideoElement: [{
1884
1888
  type: ViewChild,
1885
1889
  args: ["activeVideo"]
@@ -8994,8 +8998,13 @@ class NiceChipListDirective {
8994
8998
  setupAsyncTypeahead() {
8995
8999
  this.asyncTypeahead.selected
8996
9000
  .pipe(takeUntil(this.unsubscribeAll$), filter((selected) => selected))
8997
- .subscribe((_) => {
8998
- this.addValue(this.asyncTypeahead.getActive());
9001
+ .subscribe((value) => {
9002
+ if (value instanceof NiceTypeaheadNewValue) {
9003
+ this.addValue(value);
9004
+ }
9005
+ else {
9006
+ this.addValue(this.asyncTypeahead.getActive());
9007
+ }
8999
9008
  this.asyncTypeahead.searchOptions = { ...(this.asyncTypeahead.searchOptions ?? {}), ignore: this._values ?? [] };
9000
9009
  this.asyncTypeahead.onRemove(null, this.reloadOnSelected);
9001
9010
  });
@@ -9004,6 +9013,11 @@ class NiceChipListDirective {
9004
9013
  if (this._values.includes(value)) {
9005
9014
  return;
9006
9015
  }
9016
+ if (value instanceof NiceTypeaheadNewValue) {
9017
+ if (this._values.some(x => x instanceof NiceTypeaheadNewValue && x.$new === value.$new)) {
9018
+ return;
9019
+ }
9020
+ }
9007
9021
  this._values.push(value);
9008
9022
  this.propagateChanges(this._values);
9009
9023
  this.values$.next(this._values);