@koobiq/components 18.39.2 → 18.39.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.
- package/core/highlight/highlight.pipe.d.ts +2 -0
- package/core/option/action.d.ts +5 -6
- package/datepicker/datepicker-input.directive.d.ts +6 -1
- package/esm2022/core/highlight/highlight.pipe.mjs +23 -5
- package/esm2022/core/option/action.mjs +21 -22
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/datepicker-input.directive.mjs +9 -2
- package/esm2022/datepicker/datepicker.component.mjs +2 -2
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +3 -2
- package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +3 -3
- package/esm2022/form-field/cleaner.mjs +3 -3
- package/esm2022/form-field/fieldset.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +2 -2
- package/esm2022/form-field/password-toggle.mjs +3 -3
- package/esm2022/icon/icon-button.component.mjs +2 -2
- package/esm2022/inline-edit/inline-edit.mjs +4 -4
- package/esm2022/list/list-selection.component.mjs +12 -2
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/esm2022/search-expandable/search-expandable.mjs +50 -23
- package/esm2022/select/select.component.mjs +7 -4
- package/esm2022/tags/tag-input.mjs +7 -6
- package/esm2022/tags/tag-list.component.mjs +11 -3
- package/esm2022/tags/tag.component.mjs +9 -3
- package/fesm2022/koobiq-components-core.mjs +42 -26
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +9 -2
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +2 -1
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +2 -2
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +8 -8
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +3 -3
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +11 -1
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +49 -22
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +6 -3
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +24 -9
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +2 -2
- package/form-field/form-field.scss +0 -1
- package/icon/icon-button.scss +5 -4
- package/inline-edit/inline-edit-tokens.scss +1 -1
- package/inline-edit/inline-edit.d.ts +2 -2
- package/inline-edit/inline-edit.scss +1 -1
- package/list/list-selection.component.d.ts +1 -0
- package/package.json +4 -4
- package/popover/_popover-theme.scss +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/search-expandable/search-expandable.d.ts +19 -4
- package/select/select.component.d.ts +2 -1
- package/tags/tag-list.component.d.ts +7 -1
- package/tags/tag.component.d.ts +2 -0
|
@@ -107,6 +107,10 @@ class KbqTagEditInput {
|
|
|
107
107
|
this.tag = inject(KbqTag);
|
|
108
108
|
}
|
|
109
109
|
/** @docs-private */
|
|
110
|
+
handleClick(event) {
|
|
111
|
+
event.stopPropagation();
|
|
112
|
+
}
|
|
113
|
+
/** @docs-private */
|
|
110
114
|
handleKeydown(event) {
|
|
111
115
|
switch (event.keyCode) {
|
|
112
116
|
case ESCAPE: {
|
|
@@ -130,7 +134,7 @@ class KbqTagEditInput {
|
|
|
130
134
|
}
|
|
131
135
|
}
|
|
132
136
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
133
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagEditInput, isStandalone: true, selector: "[kbqTagEditInput]", host: { listeners: { "keydown": "handleKeydown($event)" }, classAttribute: "kbq-tag-edit-input" }, exportAs: ["kbqTagEditInput"], hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
137
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagEditInput, isStandalone: true, selector: "[kbqTagEditInput]", host: { listeners: { "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, classAttribute: "kbq-tag-edit-input" }, exportAs: ["kbqTagEditInput"], hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
134
138
|
}
|
|
135
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditInput, decorators: [{
|
|
136
140
|
type: Directive,
|
|
@@ -140,7 +144,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
140
144
|
exportAs: 'kbqTagEditInput',
|
|
141
145
|
host: {
|
|
142
146
|
class: 'kbq-tag-edit-input',
|
|
143
|
-
'(keydown)': 'handleKeydown($event)'
|
|
147
|
+
'(keydown)': 'handleKeydown($event)',
|
|
148
|
+
'(click)': 'handleClick($event)'
|
|
144
149
|
},
|
|
145
150
|
hostDirectives: [KbqFieldSizingContent]
|
|
146
151
|
}]
|
|
@@ -425,6 +430,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
425
430
|
const input = this.editInputElementRef?.nativeElement;
|
|
426
431
|
if (!input)
|
|
427
432
|
throw getTagEditInputMissingError();
|
|
433
|
+
this.focusMonitor.focusVia(this.elementRef.nativeElement, 'keyboard');
|
|
428
434
|
input.select();
|
|
429
435
|
});
|
|
430
436
|
}
|
|
@@ -865,6 +871,11 @@ class KbqTagList {
|
|
|
865
871
|
this.selectable = true;
|
|
866
872
|
/** Whether the tags in the list are editable. */
|
|
867
873
|
this.editable = false;
|
|
874
|
+
/**
|
|
875
|
+
* Whether to emit change events when tags are added/removed.
|
|
876
|
+
* Set to `false` to prevent the form control from being marked as dirty during programmatic updates.
|
|
877
|
+
*/
|
|
878
|
+
this.emitOnTagChanges = true;
|
|
868
879
|
this._removable = true;
|
|
869
880
|
this._tabIndex = 0;
|
|
870
881
|
/**
|
|
@@ -958,7 +969,7 @@ class KbqTagList {
|
|
|
958
969
|
Promise.resolve().then(() => {
|
|
959
970
|
this.stateChanges.next();
|
|
960
971
|
// do not call on initial
|
|
961
|
-
if (currentTags) {
|
|
972
|
+
if (currentTags && this.emitOnTagChanges) {
|
|
962
973
|
this.propagateTagsChanges();
|
|
963
974
|
}
|
|
964
975
|
});
|
|
@@ -1304,7 +1315,7 @@ class KbqTagList {
|
|
|
1304
1315
|
});
|
|
1305
1316
|
}
|
|
1306
1317
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagList, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ErrorStateMatcher }, { token: i2$1.Directionality, optional: true }, { token: i3.NgForm, optional: true }, { token: i3.FormGroupDirective, optional: true }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1307
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqTagList, selector: "kbq-tag-list", inputs: { multiple: ["multiple", "multiple", booleanAttribute], compareWith: "compareWith", value: "value", required: "required", placeholder: "placeholder", disabled: ["disabled", "disabled", booleanAttribute], draggable: ["draggable", "draggable", booleanAttribute], selectable: ["selectable", "selectable", booleanAttribute], editable: ["editable", "editable", booleanAttribute], removable: ["removable", "removable", booleanAttribute], tabIndex: "tabIndex", errorStateMatcher: "errorStateMatcher", orientation: "orientation" }, outputs: { dropped: "dropped", valueChange: "valueChange", change: "change" }, host: { listeners: { "focus": "focus()", "blur": "blur()", "keydown": "keydown($event)" }, properties: { "class.kbq-disabled": "disabled", "class.kbq-invalid": "errorState", "class.kbq-tag-list_selectable": "selectable", "class.kbq-tag-list_editable": "editable", "class.kbq-tag-list_removable": "removable", "class.kbq-tag-list_draggable": "draggable", "attr.tabindex": "tabIndex", "id": "uid" }, classAttribute: "kbq-tag-list" }, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTagList }], queries: [{ propertyName: "cleaner", first: true, predicate: ["kbqTagListCleaner"], descendants: true, static: true }, { propertyName: "tags", predicate: KbqTag, descendants: true }], exportAs: ["kbqTagList"], hostDirectives: [{ directive: i2.CdkDropList }], ngImport: i0, template: `
|
|
1318
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqTagList, selector: "kbq-tag-list", inputs: { multiple: ["multiple", "multiple", booleanAttribute], compareWith: "compareWith", value: "value", required: "required", placeholder: "placeholder", disabled: ["disabled", "disabled", booleanAttribute], draggable: ["draggable", "draggable", booleanAttribute], selectable: ["selectable", "selectable", booleanAttribute], editable: ["editable", "editable", booleanAttribute], emitOnTagChanges: ["emitOnTagChanges", "emitOnTagChanges", booleanAttribute], removable: ["removable", "removable", booleanAttribute], tabIndex: "tabIndex", errorStateMatcher: "errorStateMatcher", orientation: "orientation" }, outputs: { dropped: "dropped", valueChange: "valueChange", change: "change" }, host: { listeners: { "focus": "focus()", "blur": "blur()", "keydown": "keydown($event)" }, properties: { "class.kbq-disabled": "disabled", "class.kbq-invalid": "errorState", "class.kbq-tag-list_selectable": "selectable", "class.kbq-tag-list_editable": "editable", "class.kbq-tag-list_removable": "removable", "class.kbq-tag-list_draggable": "draggable", "attr.tabindex": "tabIndex", "id": "uid" }, classAttribute: "kbq-tag-list" }, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTagList }], queries: [{ propertyName: "cleaner", first: true, predicate: ["kbqTagListCleaner"], descendants: true, static: true }, { propertyName: "tags", predicate: KbqTag, descendants: true }], exportAs: ["kbqTagList"], hostDirectives: [{ directive: i2.CdkDropList }], ngImport: i0, template: `
|
|
1308
1319
|
<div class="kbq-tags-list__list-container">
|
|
1309
1320
|
<ng-content />
|
|
1310
1321
|
</div>
|
|
@@ -1377,6 +1388,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1377
1388
|
}], editable: [{
|
|
1378
1389
|
type: Input,
|
|
1379
1390
|
args: [{ transform: booleanAttribute }]
|
|
1391
|
+
}], emitOnTagChanges: [{
|
|
1392
|
+
type: Input,
|
|
1393
|
+
args: [{ transform: booleanAttribute }]
|
|
1380
1394
|
}], removable: [{
|
|
1381
1395
|
type: Input,
|
|
1382
1396
|
args: [{ transform: booleanAttribute }]
|
|
@@ -1559,14 +1573,15 @@ class KbqTagInput {
|
|
|
1559
1573
|
const dividedString = separatorsInString.length > 0 ?
|
|
1560
1574
|
[...data.split(new RegExp(`${separatorsInString.join('|')}`))] :
|
|
1561
1575
|
[data];
|
|
1562
|
-
|
|
1576
|
+
let items = dividedString.map((item) => this.trimValue(item));
|
|
1563
1577
|
if (items.length === 0) {
|
|
1564
1578
|
items.push(data);
|
|
1565
1579
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
.filter((item) => !tagValues.includes(item))
|
|
1569
|
-
|
|
1580
|
+
if (this.distinct) {
|
|
1581
|
+
const tagValues = this._tagList.tags.map(({ value }) => value);
|
|
1582
|
+
items = items.filter((item) => !tagValues.includes(item));
|
|
1583
|
+
}
|
|
1584
|
+
items.forEach((item) => this.tagEnd.emit({ input: this.inputElement, value: item }));
|
|
1570
1585
|
$event.preventDefault();
|
|
1571
1586
|
$event.stopPropagation();
|
|
1572
1587
|
}
|