@firestitch/chip 18.0.1 → 18.0.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.
@@ -1,221 +1,52 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, HostBinding, Input, Output, HostListener, forwardRef, ContentChildren, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
1
+ import * as i2 from '@angular/common';
4
2
  import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/material/icon';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, forwardRef, ViewChild, ContentChildren, TemplateRef, Optional, NgModule } from '@angular/core';
5
+ import * as i2$1 from '@angular/cdk/drag-drop';
6
+ import { moveItemInArray, CdkDropList, DragDropModule } from '@angular/cdk/drag-drop';
7
+ import * as i3 from '@angular/material/icon';
6
8
  import { MatIconModule } from '@angular/material/icon';
7
9
  import { FsLabelModule } from '@firestitch/label';
8
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
10
  import { Subject } from 'rxjs';
11
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
12
  import { takeUntil } from 'rxjs/operators';
11
13
 
12
- class FsChipComponent {
13
- _cdRef;
14
- fsChip = true;
15
- _outlined = false;
16
- selectable = false;
17
- removable = true;
18
- actionable = true;
19
- styleBackgroundColor = '';
20
- styleColor = '';
21
- styleBorderColor = '';
22
- classSmall = false;
23
- classTiny = false;
24
- classMicro = false;
25
- value;
26
- actions = [];
14
+ class FsChipActionComponent {
27
15
  icon;
28
- image;
29
- selected = false;
30
- selectedToggled = new EventEmitter();
31
- removed = new EventEmitter();
32
- _destroy$ = new Subject();
33
- _backgroundColor = '';
34
- _color = '';
35
- constructor(_cdRef) {
36
- this._cdRef = _cdRef;
37
- }
38
- set setSize(value) {
39
- this.classSmall = value === 'small';
40
- this.classTiny = value === 'tiny';
41
- this.classMicro = value === 'micro';
42
- }
43
- click() {
44
- if (this.selectable) {
45
- this.selected = !this.selected;
46
- this.selectedToggled.emit({ value: this.value, selected: this.selected });
47
- }
48
- }
49
- set backgroundColor(value) {
50
- this._backgroundColor = value;
51
- this._updateStyles();
52
- }
53
- set borderColor(value) {
54
- this.styleBorderColor = value;
55
- this._updateStyles();
56
- }
57
- set color(value) {
58
- this._color = value;
59
- this._updateStyles();
60
- }
61
- get destroy$() {
62
- return this._destroy$.asObservable();
63
- }
64
- set outlined(value) {
65
- this._outlined = value;
66
- this._updateStyles();
67
- }
68
- select() {
69
- this.selected = true;
70
- this._cdRef.markForCheck();
71
- }
72
- unselect() {
73
- this.selected = false;
74
- this._cdRef.markForCheck();
75
- }
76
- ngOnChanges() {
77
- this.actions = this.actions
78
- .filter((action) => action.type !== 'remove');
79
- if (this.removed.observed && this.removable) {
80
- this.actions.push({
81
- icon: 'remove_circle_outline',
82
- click: (event) => this.remove(event),
83
- type: 'remove',
84
- });
85
- }
86
- this.actionable = this.actions.length !== 0;
87
- }
88
- ngOnDestroy() {
89
- this._destroy$.next(null);
90
- this._destroy$.complete();
91
- }
92
- remove(event) {
93
- event.stopImmediatePropagation();
94
- event.stopPropagation();
95
- this.removed.next(event);
96
- }
97
- _isContrastYIQBlack(hexcolor) {
98
- if (!hexcolor) {
99
- return true;
100
- }
101
- hexcolor = hexcolor.replace('#', '');
102
- const r = parseInt(hexcolor.substr(0, 2), 16);
103
- const g = parseInt(hexcolor.substr(2, 2), 16);
104
- const b = parseInt(hexcolor.substr(4, 2), 16);
105
- const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
106
- return yiq >= 200;
107
- }
108
- _updateStyles() {
109
- this.styleBackgroundColor = this._backgroundColor;
110
- if (this._color) {
111
- this.styleColor = this._color;
112
- }
113
- else if (!this._outlined) {
114
- this.styleColor = this._isContrastYIQBlack(this.styleBackgroundColor) ? '#474747' : '#fff';
115
- }
116
- if (this._outlined) {
117
- this.styleBackgroundColor = '';
118
- if (this._color) {
119
- this.styleBorderColor = this._color;
120
- }
121
- }
122
- this._cdRef.markForCheck();
123
- }
124
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
125
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsChipComponent, selector: "fs-chip", inputs: { selectable: "selectable", removable: "removable", actionable: "actionable", value: "value", actions: "actions", icon: "icon", image: "image", selected: "selected", setSize: ["size", "setSize"], backgroundColor: "backgroundColor", borderColor: "borderColor", color: "color", outlined: "outlined" }, outputs: { selectedToggled: "selectedToggled", removed: "removed" }, host: { listeners: { "click": "click()" }, properties: { "class.fs-chip": "this.fsChip", "class.outlined": "this._outlined", "class.selectable": "this.selectable", "class.removable": "this.removable", "class.actionable": "this.actionable", "style.backgroundColor": "this.styleBackgroundColor", "style.color": "this.styleColor", "style.borderColor": "this.styleBorderColor", "class.size-small": "this.classSmall", "class.size-tiny": "this.classTiny", "class.size-micro": "this.classMicro", "class.iconed": "this.icon", "class.imaged": "this.image", "class.selected": "this.selected" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"image\">\n <img [src]=\"image\" class=\"image\" alt=\"\">\n</ng-container>\n<ng-container *ngIf=\"icon\">\n <mat-icon class=\"icon\">{{icon}}</mat-icon>\n</ng-container>\n<div class=\"fs-chip-content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"selected\">\n <div class=\"selected-check\">\n <mat-icon [style.color]=\"styleColor\">check</mat-icon>\n </div>\n</ng-container>\n@for (action of actions; track action.icon) {\n <mat-icon \n [style.color]=\"styleColor\" \n class=\"action\"\n (click)=\"action.click($event)\">\n {{action.icon}}\n </mat-icon>\n}", styles: [":host{-webkit-user-select:none;user-select:none;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);display:inline-flex;padding:0 12px;border-radius:16px;align-items:center;cursor:default;height:30px;background-color:#e0e0e0;overflow:hidden}:host.imaged{overflow:visible;padding-left:0;vertical-align:middle}:host.imaged.outlined .image{margin-left:-2px}:host.iconed:not(.imaged){padding-left:5px}:host.actionable,:host.selected{padding-right:3px}:host.selectable{cursor:pointer}:host.outlined{background-color:transparent;border:1px solid #e0e0e0;box-sizing:border-box}:host .icon{margin-right:5px}:host mat-icon{font-size:25px}:host .image{height:30px;width:30px;border-radius:50%;object-fit:cover;margin-left:-1px;margin-right:8px}:host .fs-chip-content{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .selected-check{margin:0 5px;display:flex}:host .action{display:flex;margin-left:5px;cursor:pointer}:host.size-micro{padding:0 5px;height:16px;line-height:normal}:host.size-micro .fs-chip-content{font-size:65%}:host.size-micro .image{height:100%;width:16px;margin-right:2px}:host.size-micro .action{margin-left:1px}:host.size-micro .selected-check{margin:0 1px 0 0}:host.size-micro.imaged{padding-left:0}:host.size-micro.actionable,:host.size-micro.selected{padding-right:0}:host.size-micro mat-icon{width:12px;height:12px;font-size:11px}:host.size-tiny{padding:0 6px;height:18px;line-height:normal}:host.size-tiny .fs-chip-content{font-size:75%}:host.size-tiny .image{height:18px;width:18px;margin-right:3px}:host.size-tiny.iconed:not(.imaged){padding-left:3px}:host.size-tiny .action{margin-left:2px;margin-right:2px}:host.size-tiny .selected-check{margin:0 1px 0 0}:host.size-tiny.imaged{padding-left:0}:host.size-tiny.actionable,:host.size-tiny.selected{padding-right:0}:host.size-tiny mat-icon{height:13px;width:13px;font-size:13px}:host.size-small{padding:0 8px;font-size:85%;height:25px;line-height:normal}:host.size-small .image{height:25px;width:25px;margin-right:5px}:host.size-small.iconed:not(.imaged){padding-left:4px}:host.size-small.imaged{padding-left:0}:host.size-small .action{margin-right:2px}:host.size-small .selected-check{margin:0 2px 0 0}:host.size-small .selected-check mat-icon{transform:scale(.7)}:host.size-small.actionable,:host.size-small.selected{padding-right:0}:host.size-small mat-icon{height:22px;width:22px;font-size:22px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16
+ link;
17
+ linkTarget;
18
+ color;
19
+ actionClick = new EventEmitter();
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsChipActionComponent, selector: "fs-chip-action", inputs: { icon: "icon", link: "link", linkTarget: "linkTarget", color: "color" }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: "@if (link) {\n <a\n [href]=\"link\"\n [target]=\"linkTarget || '_self'\">\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n </a>\n} @else {\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n}\n<ng-template #actionTemplate>\n <mat-icon\n cdkHighlight\n [style.color]=\"color\"\n class=\"action\"\n (click)=\"actionClick.emit($event)\">\n {{ icon }}\n </mat-icon>\n</ng-template>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
126
22
  }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipComponent, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipActionComponent, decorators: [{
128
24
  type: Component,
129
- args: [{ selector: 'fs-chip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"image\">\n <img [src]=\"image\" class=\"image\" alt=\"\">\n</ng-container>\n<ng-container *ngIf=\"icon\">\n <mat-icon class=\"icon\">{{icon}}</mat-icon>\n</ng-container>\n<div class=\"fs-chip-content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"selected\">\n <div class=\"selected-check\">\n <mat-icon [style.color]=\"styleColor\">check</mat-icon>\n </div>\n</ng-container>\n@for (action of actions; track action.icon) {\n <mat-icon \n [style.color]=\"styleColor\" \n class=\"action\"\n (click)=\"action.click($event)\">\n {{action.icon}}\n </mat-icon>\n}", styles: [":host{-webkit-user-select:none;user-select:none;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);display:inline-flex;padding:0 12px;border-radius:16px;align-items:center;cursor:default;height:30px;background-color:#e0e0e0;overflow:hidden}:host.imaged{overflow:visible;padding-left:0;vertical-align:middle}:host.imaged.outlined .image{margin-left:-2px}:host.iconed:not(.imaged){padding-left:5px}:host.actionable,:host.selected{padding-right:3px}:host.selectable{cursor:pointer}:host.outlined{background-color:transparent;border:1px solid #e0e0e0;box-sizing:border-box}:host .icon{margin-right:5px}:host mat-icon{font-size:25px}:host .image{height:30px;width:30px;border-radius:50%;object-fit:cover;margin-left:-1px;margin-right:8px}:host .fs-chip-content{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .selected-check{margin:0 5px;display:flex}:host .action{display:flex;margin-left:5px;cursor:pointer}:host.size-micro{padding:0 5px;height:16px;line-height:normal}:host.size-micro .fs-chip-content{font-size:65%}:host.size-micro .image{height:100%;width:16px;margin-right:2px}:host.size-micro .action{margin-left:1px}:host.size-micro .selected-check{margin:0 1px 0 0}:host.size-micro.imaged{padding-left:0}:host.size-micro.actionable,:host.size-micro.selected{padding-right:0}:host.size-micro mat-icon{width:12px;height:12px;font-size:11px}:host.size-tiny{padding:0 6px;height:18px;line-height:normal}:host.size-tiny .fs-chip-content{font-size:75%}:host.size-tiny .image{height:18px;width:18px;margin-right:3px}:host.size-tiny.iconed:not(.imaged){padding-left:3px}:host.size-tiny .action{margin-left:2px;margin-right:2px}:host.size-tiny .selected-check{margin:0 1px 0 0}:host.size-tiny.imaged{padding-left:0}:host.size-tiny.actionable,:host.size-tiny.selected{padding-right:0}:host.size-tiny mat-icon{height:13px;width:13px;font-size:13px}:host.size-small{padding:0 8px;font-size:85%;height:25px;line-height:normal}:host.size-small .image{height:25px;width:25px;margin-right:5px}:host.size-small.iconed:not(.imaged){padding-left:4px}:host.size-small.imaged{padding-left:0}:host.size-small .action{margin-right:2px}:host.size-small .selected-check{margin:0 2px 0 0}:host.size-small .selected-check mat-icon{transform:scale(.7)}:host.size-small.actionable,:host.size-small.selected{padding-right:0}:host.size-small mat-icon{height:22px;width:22px;font-size:22px}\n"] }]
130
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { fsChip: [{
131
- type: HostBinding,
132
- args: ['class.fs-chip']
133
- }], _outlined: [{
134
- type: HostBinding,
135
- args: ['class.outlined']
136
- }], selectable: [{
25
+ args: [{ selector: 'fs-chip-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (link) {\n <a\n [href]=\"link\"\n [target]=\"linkTarget || '_self'\">\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n </a>\n} @else {\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n}\n<ng-template #actionTemplate>\n <mat-icon\n cdkHighlight\n [style.color]=\"color\"\n class=\"action\"\n (click)=\"actionClick.emit($event)\">\n {{ icon }}\n </mat-icon>\n</ng-template>" }]
26
+ }], propDecorators: { icon: [{
137
27
  type: Input
138
- }, {
139
- type: HostBinding,
140
- args: ['class.selectable']
141
- }], removable: [{
142
- type: Input
143
- }, {
144
- type: HostBinding,
145
- args: ['class.removable']
146
- }], actionable: [{
28
+ }], link: [{
147
29
  type: Input
148
- }, {
149
- type: HostBinding,
150
- args: ['class.actionable']
151
- }], styleBackgroundColor: [{
152
- type: HostBinding,
153
- args: ['style.backgroundColor']
154
- }], styleColor: [{
155
- type: HostBinding,
156
- args: ['style.color']
157
- }], styleBorderColor: [{
158
- type: HostBinding,
159
- args: ['style.borderColor']
160
- }], classSmall: [{
161
- type: HostBinding,
162
- args: ['class.size-small']
163
- }], classTiny: [{
164
- type: HostBinding,
165
- args: ['class.size-tiny']
166
- }], classMicro: [{
167
- type: HostBinding,
168
- args: ['class.size-micro']
169
- }], value: [{
170
- type: Input
171
- }], actions: [{
172
- type: Input
173
- }], icon: [{
174
- type: Input
175
- }, {
176
- type: HostBinding,
177
- args: ['class.iconed']
178
- }], image: [{
179
- type: Input
180
- }, {
181
- type: HostBinding,
182
- args: ['class.imaged']
183
- }], selected: [{
184
- type: Input
185
- }, {
186
- type: HostBinding,
187
- args: ['class.selected']
188
- }], selectedToggled: [{
189
- type: Output
190
- }], removed: [{
191
- type: Output
192
- }], setSize: [{
193
- type: Input,
194
- args: ['size']
195
- }], click: [{
196
- type: HostListener,
197
- args: ['click']
198
- }], backgroundColor: [{
199
- type: Input
200
- }], borderColor: [{
30
+ }], linkTarget: [{
201
31
  type: Input
202
32
  }], color: [{
203
33
  type: Input
204
- }], outlined: [{
205
- type: Input
34
+ }], actionClick: [{
35
+ type: Output
206
36
  }] } });
207
37
 
208
38
  class FsChipsComponent {
209
39
  _cdRef;
210
40
  _iterable;
211
- classFsChips = true;
212
- classHasChips = false;
41
+ dropList;
213
42
  chips;
214
43
  compare;
215
44
  multiple = true;
45
+ sortable = false;
216
46
  onChange;
217
47
  onTouch;
218
48
  _value = [];
49
+ _selectable = false;
219
50
  _destroy$ = new Subject();
220
51
  _chipDiffer;
221
52
  constructor(_cdRef, _iterable) {
@@ -223,12 +54,13 @@ class FsChipsComponent {
223
54
  this._iterable = _iterable;
224
55
  this._chipDiffer = this._iterable.find([]).create();
225
56
  }
226
- setDisabledState(isDisabled) {
227
- //
57
+ drop(event) {
58
+ moveItemInArray(this._value, event.previousIndex, event.currentIndex);
59
+ this.onChange(this._value);
228
60
  }
229
61
  ngAfterContentInit() {
230
- this._subscribeToSelectionChanges();
231
- this._subscribeToItemsChange();
62
+ this._subscribeToSelectionChange();
63
+ this._subscribeChanges();
232
64
  }
233
65
  set value(value) {
234
66
  if (this._value !== value) {
@@ -259,50 +91,48 @@ class FsChipsComponent {
259
91
  _subscribeToSelectionChange() {
260
92
  const changed = this._chipDiffer.diff(this.chips);
261
93
  changed?.forEachAddedItem((change) => {
94
+ this._selectable = this.chips.some((chip) => chip.selectable);
262
95
  change.item.selectedToggled
263
96
  .pipe(takeUntil(change.item.destroy$), takeUntil(this._destroy$))
264
97
  .subscribe(({ selected, value }) => {
265
- if (!selected) {
266
- const valueIndex = this.value.findIndex((item) => {
267
- return this._compareFn(item, value);
268
- });
269
- if (valueIndex > -1) {
270
- this.value.splice(valueIndex, 1);
271
- this.onChange(this._value);
272
- this.onTouch(this._value);
98
+ if (this.multiple) {
99
+ if (selected) {
100
+ this.value.push(value);
101
+ }
102
+ else {
103
+ const valueIndex = this.value.findIndex((item) => {
104
+ return this._compareFn(item, value);
105
+ });
106
+ if (valueIndex > -1) {
107
+ this.value.splice(valueIndex, 1);
108
+ }
273
109
  }
274
110
  }
275
111
  else {
276
- this.value.push(value);
277
- this.onChange(this._value);
278
- this.onTouch(this._value);
112
+ this.chips
113
+ .forEach((chip) => {
114
+ if (!this._compareFn(chip.value, value)) {
115
+ chip.unselect();
116
+ }
117
+ });
118
+ this.value = selected ? value : null;
279
119
  }
120
+ this.onChange(this._value);
121
+ this.onTouch(this._value);
280
122
  });
281
123
  });
282
124
  }
283
- /**
284
- * Update ngModel value when selection changed
285
- */
286
- _subscribeToSelectionChanges() {
287
- this._subscribeToSelectionChange();
288
- this.chips.changes
289
- .pipe(takeUntil(this._destroy$))
290
- .subscribe(() => {
291
- this._subscribeToSelectionChange();
292
- });
293
- }
294
125
  /**
295
126
  * Update selection if item was added or removed
296
127
  */
297
- _subscribeToItemsChange() {
128
+ _subscribeChanges() {
298
129
  this.chips.changes
299
130
  .pipe(takeUntil(this._destroy$))
300
131
  .subscribe(() => {
301
- this.classHasChips = this.chips.length !== 0;
132
+ this._subscribeToSelectionChange();
302
133
  this._cdRef.markForCheck();
303
134
  this._updateChips();
304
135
  });
305
- this.classHasChips = this.chips.length !== 0;
306
136
  this._cdRef.markForCheck();
307
137
  }
308
138
  _compareFn(o1, o2) {
@@ -312,29 +142,31 @@ class FsChipsComponent {
312
142
  return o1 === o2;
313
143
  }
314
144
  _updateChips() {
315
- if (this.multiple && Array.isArray(this.value) && this.chips) {
316
- this.chips.forEach((chip) => {
317
- const selected = this.value
318
- .some((o) => {
319
- return this._compareFn(o, chip.value);
145
+ if (this.multiple && this._selectable) {
146
+ if (Array.isArray(this.value)) {
147
+ this.chips.forEach((chip) => {
148
+ const selected = this.value
149
+ .some((item) => {
150
+ return this._compareFn(item, chip.value);
151
+ });
152
+ if (selected) {
153
+ chip.select();
154
+ }
155
+ else {
156
+ chip.unselect();
157
+ }
320
158
  });
321
- if (selected) {
322
- chip.select();
323
- }
324
- else {
325
- chip.unselect();
326
- }
327
- });
159
+ }
328
160
  }
329
161
  }
330
162
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
331
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsChipsComponent, selector: "fs-chips", inputs: { compare: "compare", multiple: "multiple" }, host: { properties: { "class.fs-chips": "this.classFsChips", "class.has-chips": "this.classHasChips" } }, providers: [
163
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsChipsComponent, selector: "fs-chips", inputs: { compare: "compare", multiple: "multiple", sortable: "sortable" }, providers: [
332
164
  {
333
165
  provide: NG_VALUE_ACCESSOR,
334
166
  useExisting: forwardRef(() => FsChipsComponent),
335
167
  multi: true,
336
168
  },
337
- ], queries: [{ propertyName: "chips", predicate: FsChipComponent }], ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-wrap:wrap}:host.has-chips{margin-top:-5px}:host ::ng-deep .fs-chip{margin-top:5px}:host ::ng-deep .fs-chip+.fs-chip{margin-left:5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
169
+ ], queries: [{ propertyName: "chips", predicate: FsChipComponent }], viewQueries: [{ propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, static: true }], ngImport: i0, template: "@if (sortable) {\n <div\n class=\"fs-chips chips-sortable\"\n cdkDropList\n [cdkDropListLockAxis]=\"'y'\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (chip of chips; track chip) {\n <div\n class=\"chip-container\"\n cdkDrag\n [cdkDragPreviewClass]=\"'fs-chip-drag-preview'\">\n <a\n class=\"chip-handle\"\n mat-icon-button\n cdkDragHandle>\n <mat-icon>\n drag_indicator\n </mat-icon>\n </a>\n <ng-component [ngTemplateOutlet]=\"chip.templateRef\"></ng-component>\n </div>\n }\n </div>\n} @else {\n <div class=\"fs-chips\">\n @for (chip of chips; track chip) {\n <div class=\"chip-container\">\n <ng-component [ngTemplateOutlet]=\"chip.templateRef\"></ng-component>\n </div>\n }\n </div>\n}", styles: [".fs-chips{display:flex}.fs-chips:not(.chips-sortable){gap:5px}.fs-chips.chips-sortable{flex-direction:column}.fs-chips.chips-sortable .chip-container{display:flex;align-items:center}.fs-chips.chips-sortable .chip-container+.chip-container{border-top:7px solid transparent}.fs-chips.chips-sortable .chip-container .chip-handle{color:inherit;display:flex;align-items:center}.fs-chips.chips-sortable ::ng-deep .cdk-drag-placeholder{opacity:.3}.fs-chips .fs-chip-container{display:flex}::ng-deep .fs-chip-drag-preview{display:flex;overflow:visible}::ng-deep .fs-chip-drag-preview .chip-handle{color:inherit;display:flex;align-items:center}::ng-deep .fs-chip-drag-preview.chip-container .fs-chip{box-shadow:3px 3px 3px #c4c4c4}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
338
170
  }
339
171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipsComponent, decorators: [{
340
172
  type: Component,
@@ -344,13 +176,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
344
176
  useExisting: forwardRef(() => FsChipsComponent),
345
177
  multi: true,
346
178
  },
347
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-wrap:wrap}:host.has-chips{margin-top:-5px}:host ::ng-deep .fs-chip{margin-top:5px}:host ::ng-deep .fs-chip+.fs-chip{margin-left:5px}\n"] }]
348
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }], propDecorators: { classFsChips: [{
349
- type: HostBinding,
350
- args: ['class.fs-chips']
351
- }], classHasChips: [{
352
- type: HostBinding,
353
- args: ['class.has-chips']
179
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (sortable) {\n <div\n class=\"fs-chips chips-sortable\"\n cdkDropList\n [cdkDropListLockAxis]=\"'y'\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (chip of chips; track chip) {\n <div\n class=\"chip-container\"\n cdkDrag\n [cdkDragPreviewClass]=\"'fs-chip-drag-preview'\">\n <a\n class=\"chip-handle\"\n mat-icon-button\n cdkDragHandle>\n <mat-icon>\n drag_indicator\n </mat-icon>\n </a>\n <ng-component [ngTemplateOutlet]=\"chip.templateRef\"></ng-component>\n </div>\n }\n </div>\n} @else {\n <div class=\"fs-chips\">\n @for (chip of chips; track chip) {\n <div class=\"chip-container\">\n <ng-component [ngTemplateOutlet]=\"chip.templateRef\"></ng-component>\n </div>\n }\n </div>\n}", styles: [".fs-chips{display:flex}.fs-chips:not(.chips-sortable){gap:5px}.fs-chips.chips-sortable{flex-direction:column}.fs-chips.chips-sortable .chip-container{display:flex;align-items:center}.fs-chips.chips-sortable .chip-container+.chip-container{border-top:7px solid transparent}.fs-chips.chips-sortable .chip-container .chip-handle{color:inherit;display:flex;align-items:center}.fs-chips.chips-sortable ::ng-deep .cdk-drag-placeholder{opacity:.3}.fs-chips .fs-chip-container{display:flex}::ng-deep .fs-chip-drag-preview{display:flex;overflow:visible}::ng-deep .fs-chip-drag-preview .chip-handle{color:inherit;display:flex;align-items:center}::ng-deep .fs-chip-drag-preview.chip-container .fs-chip{box-shadow:3px 3px 3px #c4c4c4}\n"] }]
180
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }], propDecorators: { dropList: [{
181
+ type: ViewChild,
182
+ args: [CdkDropList, { static: true }]
354
183
  }], chips: [{
355
184
  type: ContentChildren,
356
185
  args: [FsChipComponent]
@@ -358,21 +187,197 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
358
187
  type: Input
359
188
  }], multiple: [{
360
189
  type: Input
190
+ }], sortable: [{
191
+ type: Input
192
+ }] } });
193
+
194
+ class FsChipComponent {
195
+ chips;
196
+ _cdRef;
197
+ templateRef;
198
+ selectable = false;
199
+ removable = true;
200
+ value;
201
+ maxWidth;
202
+ width;
203
+ backgroundColor;
204
+ borderColor;
205
+ color;
206
+ outlined;
207
+ actions = [];
208
+ icon;
209
+ image;
210
+ set setSelected(value) {
211
+ this.classes.selected = value;
212
+ this._selected = value;
213
+ }
214
+ get selected() {
215
+ return this._selected;
216
+ }
217
+ selectedToggled = new EventEmitter();
218
+ removed = new EventEmitter();
219
+ styles = {};
220
+ classes = {};
221
+ _destroy$ = new Subject();
222
+ _selected = false;
223
+ constructor(chips, _cdRef) {
224
+ this.chips = chips;
225
+ this._cdRef = _cdRef;
226
+ }
227
+ set setSize(value) {
228
+ this.classes['size-small'] = value === 'small';
229
+ this.classes['size-tiny'] = value === 'tiny';
230
+ this.classes['size-micro'] = value === 'micro';
231
+ }
232
+ click() {
233
+ if (this.selectable) {
234
+ this.setSelected = !this.selected;
235
+ this.selectedToggled.emit({ value: this.value, selected: this.selected });
236
+ }
237
+ }
238
+ select() {
239
+ this.setSelected = true;
240
+ this._cdRef.markForCheck();
241
+ }
242
+ unselect() {
243
+ this.setSelected = false;
244
+ this._cdRef.markForCheck();
245
+ }
246
+ get destroy$() {
247
+ return this._destroy$.asObservable();
248
+ }
249
+ ngOnChanges(changes) {
250
+ this.actions = this.actions
251
+ .filter((action) => action.type !== 'remove');
252
+ if (changes.selectable) {
253
+ this.classes.selectable = this.selectable;
254
+ }
255
+ if (changes.removable) {
256
+ this.classes.removable = this.removable;
257
+ }
258
+ if (changes.icon) {
259
+ this.classes.iconed = !!this.icon;
260
+ }
261
+ if (changes.image) {
262
+ this.classes.imaged = !!this.image;
263
+ }
264
+ if (this.removed.observed && this.removable) {
265
+ this.actions.push({
266
+ icon: 'remove_circle_outline',
267
+ click: (event) => this.remove(event),
268
+ type: 'remove',
269
+ });
270
+ }
271
+ this.classes.actionable = this.actions.length !== 0;
272
+ this._updateStyles();
273
+ }
274
+ actionClick(action, event) {
275
+ if (action.click) {
276
+ action.click(event);
277
+ }
278
+ }
279
+ ngOnDestroy() {
280
+ this._destroy$.next(null);
281
+ this._destroy$.complete();
282
+ }
283
+ remove(event) {
284
+ event.stopImmediatePropagation();
285
+ event.stopPropagation();
286
+ this.removed.next(event);
287
+ }
288
+ _isContrastYIQBlack(hexcolor) {
289
+ if (!hexcolor) {
290
+ return true;
291
+ }
292
+ hexcolor = hexcolor.replace('#', '');
293
+ const r = parseInt(hexcolor.substr(0, 2), 16);
294
+ const g = parseInt(hexcolor.substr(2, 2), 16);
295
+ const b = parseInt(hexcolor.substr(4, 2), 16);
296
+ const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
297
+ return yiq >= 200;
298
+ }
299
+ _updateStyles() {
300
+ this.styles.backgroundColor = this.backgroundColor;
301
+ this.styles.borderColor = this.borderColor;
302
+ this.styles.width = this.width;
303
+ this.classes.outlined = this.outlined;
304
+ if (this.color) {
305
+ this.styles.color = this.color;
306
+ }
307
+ else if (!this.outlined) {
308
+ this.styles.color = this._isContrastYIQBlack(this.backgroundColor) ? '#474747' : '#fff';
309
+ }
310
+ if (this.outlined) {
311
+ this.styles.backgroundColor = '';
312
+ if (this.color) {
313
+ this.styles.borderColor = this.color;
314
+ }
315
+ }
316
+ this._cdRef.markForCheck();
317
+ }
318
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipComponent, deps: [{ token: FsChipsComponent, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
319
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsChipComponent, selector: "fs-chip", inputs: { selectable: "selectable", removable: "removable", value: "value", maxWidth: "maxWidth", width: "width", backgroundColor: "backgroundColor", borderColor: "borderColor", color: "color", outlined: "outlined", actions: "actions", icon: "icon", image: "image", setSelected: ["selected", "setSelected"], setSize: ["size", "setSize"] }, outputs: { selectedToggled: "selectedToggled", removed: "removed" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template>\n <div\n class=\"fs-chip\"\n (click)=\"click()\"\n [ngStyle]=\"styles\"\n [ngClass]=\"classes\">\n <ng-container *ngIf=\"image\">\n <img\n [src]=\"image\"\n class=\"image\"\n alt=\"\">\n </ng-container>\n <ng-container *ngIf=\"icon\">\n <mat-icon class=\"icon\">\n {{ icon }}\n </mat-icon>\n </ng-container>\n <div\n class=\"fs-chip-content\"\n [ngStyle]=\"{ 'max-width': maxWidth }\">\n <ng-content></ng-content>\n </div>\n @if (selected) {\n <div class=\"selected-check\">\n <mat-icon [style.color]=\"styles.color\">\n check\n </mat-icon>\n </div>\n }\n @if (actions) {\n <div class=\"actions\">\n @for (action of actions; track action.icon) {\n <fs-chip-action\n [icon]=\"action.icon\"\n [link]=\"action.link\"\n [linkTarget]=\"action.linkTarget\"\n [color]=\"styles.color\"\n (actionClick)=\"actionClick(action, $event)\">\n </fs-chip-action>\n }\n </div>\n }\n </div>\n</ng-template>\n@if (!chips) {\n <ng-container [ngTemplateOutlet]=\"templateRef\"></ng-container>\n}", styles: [".fs-chip{-webkit-user-select:none;user-select:none;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);display:inline-flex;padding:0 12px;border-radius:16px;align-items:center;cursor:default;height:30px;background-color:#e7e7e7;overflow:hidden}.fs-chip.imaged{overflow:visible;padding-left:0;vertical-align:middle}.fs-chip.imaged.outlined .image{margin-left:-2px}.fs-chip.iconed:not(.imaged){padding-left:5px}.fs-chip.actionable,.fs-chip.selected{padding-right:3px}.fs-chip.selectable{cursor:pointer}.fs-chip.outlined{background-color:transparent;border:1px solid #e0e0e0;box-sizing:border-box}.fs-chip .icon{margin-right:5px}.fs-chip mat-icon{font-size:25px}.fs-chip .actions{display:flex;flex-direction:row;margin-left:5px}.fs-chip .image{height:30px;width:30px;border-radius:50%;object-fit:cover;margin-left:-1px;margin-right:8px}.fs-chip .fs-chip-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fs-chip .selected-check{margin:0 5px;display:flex}.fs-chip fs-chip-action{display:flex;cursor:pointer}.fs-chip.size-micro{padding:0 5px;height:16px;line-height:normal}.fs-chip.size-micro .fs-chip-content{font-size:65%}.fs-chip.size-micro .image{height:100%;width:16px;margin-right:2px}.fs-chip.size-micro fs-chip-action{margin-left:1px}.fs-chip.size-micro .selected-check{margin:0 1px 0 0}.fs-chip.size-micro.imaged{padding-left:0}.fs-chip.size-micro.actionable,.fs-chip.size-micro.selected{padding-right:0}.fs-chip.size-micro mat-icon{width:12px;height:12px;font-size:11px}.fs-chip.size-tiny{padding:0 6px;height:18px;line-height:normal}.fs-chip.size-tiny .fs-chip-content{font-size:75%}.fs-chip.size-tiny .image{height:18px;width:18px;margin-right:3px}.fs-chip.size-tiny.iconed:not(.imaged){padding-left:3px}.fs-chip.size-tiny fs-chip-action{margin-left:2px;margin-right:2px}.fs-chip.size-tiny .selected-check{margin:0 1px 0 0}.fs-chip.size-tiny.imaged{padding-left:0}.fs-chip.size-tiny.actionable,.fs-chip.size-tiny.selected{padding-right:0}.fs-chip.size-tiny mat-icon{height:13px;width:13px;font-size:13px}.fs-chip.size-small{padding:0 8px;font-size:85%;height:25px;line-height:normal}.fs-chip.size-small .image{height:25px;width:25px;margin-right:5px}.fs-chip.size-small.iconed:not(.imaged){padding-left:4px}.fs-chip.size-small.imaged{padding-left:0}.fs-chip.size-small fs-chip-action{margin-right:2px}.fs-chip.size-small .selected-check{margin:0 2px 0 0}.fs-chip.size-small .selected-check mat-icon{transform:scale(.7)}.fs-chip.size-small.actionable,.fs-chip.size-small.selected{padding-right:0}.fs-chip.size-small mat-icon{height:22px;width:22px;font-size:22px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FsChipActionComponent, selector: "fs-chip-action", inputs: ["icon", "link", "linkTarget", "color"], outputs: ["actionClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
320
+ }
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipComponent, decorators: [{
322
+ type: Component,
323
+ args: [{ selector: 'fs-chip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <div\n class=\"fs-chip\"\n (click)=\"click()\"\n [ngStyle]=\"styles\"\n [ngClass]=\"classes\">\n <ng-container *ngIf=\"image\">\n <img\n [src]=\"image\"\n class=\"image\"\n alt=\"\">\n </ng-container>\n <ng-container *ngIf=\"icon\">\n <mat-icon class=\"icon\">\n {{ icon }}\n </mat-icon>\n </ng-container>\n <div\n class=\"fs-chip-content\"\n [ngStyle]=\"{ 'max-width': maxWidth }\">\n <ng-content></ng-content>\n </div>\n @if (selected) {\n <div class=\"selected-check\">\n <mat-icon [style.color]=\"styles.color\">\n check\n </mat-icon>\n </div>\n }\n @if (actions) {\n <div class=\"actions\">\n @for (action of actions; track action.icon) {\n <fs-chip-action\n [icon]=\"action.icon\"\n [link]=\"action.link\"\n [linkTarget]=\"action.linkTarget\"\n [color]=\"styles.color\"\n (actionClick)=\"actionClick(action, $event)\">\n </fs-chip-action>\n }\n </div>\n }\n </div>\n</ng-template>\n@if (!chips) {\n <ng-container [ngTemplateOutlet]=\"templateRef\"></ng-container>\n}", styles: [".fs-chip{-webkit-user-select:none;user-select:none;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);display:inline-flex;padding:0 12px;border-radius:16px;align-items:center;cursor:default;height:30px;background-color:#e7e7e7;overflow:hidden}.fs-chip.imaged{overflow:visible;padding-left:0;vertical-align:middle}.fs-chip.imaged.outlined .image{margin-left:-2px}.fs-chip.iconed:not(.imaged){padding-left:5px}.fs-chip.actionable,.fs-chip.selected{padding-right:3px}.fs-chip.selectable{cursor:pointer}.fs-chip.outlined{background-color:transparent;border:1px solid #e0e0e0;box-sizing:border-box}.fs-chip .icon{margin-right:5px}.fs-chip mat-icon{font-size:25px}.fs-chip .actions{display:flex;flex-direction:row;margin-left:5px}.fs-chip .image{height:30px;width:30px;border-radius:50%;object-fit:cover;margin-left:-1px;margin-right:8px}.fs-chip .fs-chip-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fs-chip .selected-check{margin:0 5px;display:flex}.fs-chip fs-chip-action{display:flex;cursor:pointer}.fs-chip.size-micro{padding:0 5px;height:16px;line-height:normal}.fs-chip.size-micro .fs-chip-content{font-size:65%}.fs-chip.size-micro .image{height:100%;width:16px;margin-right:2px}.fs-chip.size-micro fs-chip-action{margin-left:1px}.fs-chip.size-micro .selected-check{margin:0 1px 0 0}.fs-chip.size-micro.imaged{padding-left:0}.fs-chip.size-micro.actionable,.fs-chip.size-micro.selected{padding-right:0}.fs-chip.size-micro mat-icon{width:12px;height:12px;font-size:11px}.fs-chip.size-tiny{padding:0 6px;height:18px;line-height:normal}.fs-chip.size-tiny .fs-chip-content{font-size:75%}.fs-chip.size-tiny .image{height:18px;width:18px;margin-right:3px}.fs-chip.size-tiny.iconed:not(.imaged){padding-left:3px}.fs-chip.size-tiny fs-chip-action{margin-left:2px;margin-right:2px}.fs-chip.size-tiny .selected-check{margin:0 1px 0 0}.fs-chip.size-tiny.imaged{padding-left:0}.fs-chip.size-tiny.actionable,.fs-chip.size-tiny.selected{padding-right:0}.fs-chip.size-tiny mat-icon{height:13px;width:13px;font-size:13px}.fs-chip.size-small{padding:0 8px;font-size:85%;height:25px;line-height:normal}.fs-chip.size-small .image{height:25px;width:25px;margin-right:5px}.fs-chip.size-small.iconed:not(.imaged){padding-left:4px}.fs-chip.size-small.imaged{padding-left:0}.fs-chip.size-small fs-chip-action{margin-right:2px}.fs-chip.size-small .selected-check{margin:0 2px 0 0}.fs-chip.size-small .selected-check mat-icon{transform:scale(.7)}.fs-chip.size-small.actionable,.fs-chip.size-small.selected{padding-right:0}.fs-chip.size-small mat-icon{height:22px;width:22px;font-size:22px}\n"] }]
324
+ }], ctorParameters: () => [{ type: FsChipsComponent, decorators: [{
325
+ type: Optional
326
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { templateRef: [{
327
+ type: ViewChild,
328
+ args: [TemplateRef, { static: true }]
329
+ }], selectable: [{
330
+ type: Input
331
+ }], removable: [{
332
+ type: Input
333
+ }], value: [{
334
+ type: Input
335
+ }], maxWidth: [{
336
+ type: Input
337
+ }], width: [{
338
+ type: Input
339
+ }], backgroundColor: [{
340
+ type: Input
341
+ }], borderColor: [{
342
+ type: Input
343
+ }], color: [{
344
+ type: Input
345
+ }], outlined: [{
346
+ type: Input
347
+ }], actions: [{
348
+ type: Input
349
+ }], icon: [{
350
+ type: Input
351
+ }], image: [{
352
+ type: Input
353
+ }], setSelected: [{
354
+ type: Input,
355
+ args: ['selected']
356
+ }], selectedToggled: [{
357
+ type: Output
358
+ }], removed: [{
359
+ type: Output
360
+ }], setSize: [{
361
+ type: Input,
362
+ args: ['size']
361
363
  }] } });
362
364
 
363
365
  class FsChipModule {
364
366
  static forRoot() {
365
367
  return {
366
- ngModule: FsChipModule
368
+ ngModule: FsChipModule,
367
369
  };
368
370
  }
369
371
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
370
372
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsChipModule, declarations: [FsChipsComponent,
371
- FsChipComponent], imports: [CommonModule,
373
+ FsChipComponent,
374
+ FsChipActionComponent], imports: [CommonModule,
375
+ DragDropModule,
372
376
  MatIconModule,
373
377
  FsLabelModule], exports: [FsChipsComponent,
374
378
  FsChipComponent] });
375
379
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsChipModule, imports: [CommonModule,
380
+ DragDropModule,
376
381
  MatIconModule,
377
382
  FsLabelModule] });
378
383
  }
@@ -381,8 +386,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
381
386
  args: [{
382
387
  imports: [
383
388
  CommonModule,
389
+ DragDropModule,
384
390
  MatIconModule,
385
- FsLabelModule
391
+ FsLabelModule,
386
392
  ],
387
393
  exports: [
388
394
  FsChipsComponent,
@@ -391,7 +397,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
391
397
  declarations: [
392
398
  FsChipsComponent,
393
399
  FsChipComponent,
394
- ]
400
+ FsChipActionComponent,
401
+ ],
395
402
  }]
396
403
  }] });
397
404