@recursyve/nice-ui-kit.v2 13.2.0-beta.113 → 13.2.0-beta.115

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.
@@ -9926,22 +9926,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9926
9926
  args: [{ selector: "[niceChipListItemLabel]" }]
9927
9927
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
9928
9928
 
9929
+ const NICE_CHIP_LIST_OPTIONS = new InjectionToken("nice_chip_list_options");
9930
+
9929
9931
  class NiceChipListItemsComponent {
9930
- constructor() {
9932
+ constructor(options) {
9933
+ this.options = options;
9931
9934
  this.color = "primary";
9932
9935
  this.removeChip = new EventEmitter();
9933
9936
  this.defaultColor = "primary";
9937
+ if (!this.options) {
9938
+ this.options = {
9939
+ closeButtonIcon: {
9940
+ matIcon: "cancel"
9941
+ }
9942
+ };
9943
+ }
9934
9944
  }
9935
9945
  remove(index) {
9936
9946
  this.removeChip.next(index);
9937
9947
  }
9938
9948
  }
9939
- NiceChipListItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9940
- NiceChipListItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceChipListItemsComponent, selector: "nice-chip-list-items", inputs: { color: "color", items$: "items$" }, outputs: { removeChip: "removeChip" }, queries: [{ propertyName: "itemLabel", first: true, predicate: ChipListItemLabelDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"nice-items-row\" *ngIf=\"(items$ | async)?.length\">\n <div\n class=\"nice-chip\"\n *ngFor=\"let value of items$ | async; let i = index\"\n [ngClass]=\"color\"\n >\n <span *ngIf=\"!itemLabel\">{{ value }}</span>\n <ng-container *ngIf=\"itemLabel\">\n <ng-container *ngTemplateOutlet=\"itemLabel; context: { $implicit: value }\"></ng-container>\n </ng-container>\n <button (click)=\"remove(i)\">\n <mat-icon class=\"close-icon\">cancel</mat-icon>\n </button>\n </div>\n</div>\n", components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i6.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9949
+ NiceChipListItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListItemsComponent, deps: [{ token: NICE_CHIP_LIST_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
9950
+ NiceChipListItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceChipListItemsComponent, selector: "nice-chip-list-items", inputs: { color: "color", items$: "items$" }, outputs: { removeChip: "removeChip" }, queries: [{ propertyName: "itemLabel", first: true, predicate: ChipListItemLabelDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"nice-items-row\" *ngIf=\"(items$ | async)?.length\">\n <div\n class=\"nice-chip\"\n *ngFor=\"let value of items$ | async; let i = index\"\n [ngClass]=\"color\"\n >\n <span *ngIf=\"!itemLabel\">{{ value }}</span>\n <ng-container *ngIf=\"itemLabel\">\n <ng-container *ngTemplateOutlet=\"itemLabel; context: { $implicit: value }\"></ng-container>\n </ng-container>\n <button (click)=\"remove(i)\">\n <mat-icon *ngIf=\"options.closeButtonIcon.matIcon\">\n {{ options.closeButtonIcon.matIcon }}\n </mat-icon>\n <mat-icon\n *ngIf=\"options.closeButtonIcon.svgIcon\"\n [svgIcon]=\"options.closeButtonIcon.svgIcon\"\n ></mat-icon>\n </button>\n </div>\n</div>\n", components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i6.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9941
9951
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListItemsComponent, decorators: [{
9942
9952
  type: Component,
9943
- args: [{ selector: "nice-chip-list-items", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"nice-items-row\" *ngIf=\"(items$ | async)?.length\">\n <div\n class=\"nice-chip\"\n *ngFor=\"let value of items$ | async; let i = index\"\n [ngClass]=\"color\"\n >\n <span *ngIf=\"!itemLabel\">{{ value }}</span>\n <ng-container *ngIf=\"itemLabel\">\n <ng-container *ngTemplateOutlet=\"itemLabel; context: { $implicit: value }\"></ng-container>\n </ng-container>\n <button (click)=\"remove(i)\">\n <mat-icon class=\"close-icon\">cancel</mat-icon>\n </button>\n </div>\n</div>\n" }]
9944
- }], propDecorators: { itemLabel: [{
9953
+ args: [{ selector: "nice-chip-list-items", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"nice-items-row\" *ngIf=\"(items$ | async)?.length\">\n <div\n class=\"nice-chip\"\n *ngFor=\"let value of items$ | async; let i = index\"\n [ngClass]=\"color\"\n >\n <span *ngIf=\"!itemLabel\">{{ value }}</span>\n <ng-container *ngIf=\"itemLabel\">\n <ng-container *ngTemplateOutlet=\"itemLabel; context: { $implicit: value }\"></ng-container>\n </ng-container>\n <button (click)=\"remove(i)\">\n <mat-icon *ngIf=\"options.closeButtonIcon.matIcon\">\n {{ options.closeButtonIcon.matIcon }}\n </mat-icon>\n <mat-icon\n *ngIf=\"options.closeButtonIcon.svgIcon\"\n [svgIcon]=\"options.closeButtonIcon.svgIcon\"\n ></mat-icon>\n </button>\n </div>\n</div>\n" }]
9954
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
9955
+ type: Optional
9956
+ }, {
9957
+ type: Inject,
9958
+ args: [NICE_CHIP_LIST_OPTIONS]
9959
+ }] }]; }, propDecorators: { itemLabel: [{
9945
9960
  type: ContentChild,
9946
9961
  args: [ChipListItemLabelDirective, { read: TemplateRef }]
9947
9962
  }], color: [{
@@ -10070,6 +10085,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10070
10085
  }] } });
10071
10086
 
10072
10087
  class NiceChipListDirectiveModule {
10088
+ static forRoot(options) {
10089
+ if (!options) {
10090
+ options = {
10091
+ closeButtonIcon: {
10092
+ matIcon: "cancel"
10093
+ }
10094
+ };
10095
+ }
10096
+ return {
10097
+ ngModule: NiceChipListDirectiveModule,
10098
+ providers: [
10099
+ {
10100
+ provide: NICE_CHIP_LIST_OPTIONS,
10101
+ useValue: options
10102
+ }
10103
+ ]
10104
+ };
10105
+ }
10073
10106
  }
10074
10107
  NiceChipListDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10075
10108
  NiceChipListDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirectiveModule, declarations: [NiceChipListDirective, NiceChipListItemsComponent, ChipListItemLabelDirective], imports: [CommonModule, MatIconModule], exports: [NiceChipListDirective, NiceChipListItemsComponent, ChipListItemLabelDirective] });