@koobiq/components 18.38.1 → 18.39.0
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/styles/visual/_layout.scss +10 -0
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/filter-bar/filter-bar.mjs +3 -3
- package/esm2022/filter-bar/filter-search.mjs +39 -11
- package/esm2022/list/list-selection.component.mjs +10 -4
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/fesm2022/koobiq-components-core.mjs +1 -1
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +40 -14
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +9 -3
- 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/filter-bar/filter-bar.d.ts +1 -1
- package/filter-bar/filter-search.d.ts +17 -4
- package/list/list-selection.component.d.ts +4 -2
- package/package.json +4 -4
- package/popover/popover.scss +3 -2
- package/schematics/ng-add/index.js +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ChangeDetectorRef, DestroyRef, afterNextRender, TemplateRef, Directive, ElementRef, Input, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, ContentChild, viewChild, ViewChild, ViewChildren, EventEmitter, Output, Injector, ViewContainerRef, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ChangeDetectorRef, DestroyRef, afterNextRender, TemplateRef, Directive, ElementRef, Input, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, ContentChild, viewChild, ViewChild, ViewChildren, EventEmitter, Output, input, numberAttribute, Injector, ViewContainerRef, NgModule } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import * as i5$1 from '@koobiq/components/core';
|
|
5
5
|
import { isMac, KbqComponentColors, KBQ_TITLE_TEXT_REF, DateAdapter, DateFormatter, PopUpPlacements, kbqDisableLegacyValidationDirectiveProvider, KbqFormattersModule, KbqOption, KbqPseudoCheckboxModule, KbqHighlightModule, ruRULocaleData, PopUpSizes, KbqFormsModule, KBQ_LOCALE_SERVICE, KbqOptionModule, KbqSelectMatcher } from '@koobiq/components/core';
|
|
6
6
|
import * as i4 from '@koobiq/components/divider';
|
|
7
7
|
import { KbqDividerModule } from '@koobiq/components/divider';
|
|
8
|
-
import { Subject, merge, Subscription, throttleTime, Observable, of, BehaviorSubject } from 'rxjs';
|
|
8
|
+
import { Subject, merge, Subscription, throttleTime, Observable, of, BehaviorSubject, distinctUntilChanged as distinctUntilChanged$1, debounceTime as debounceTime$1 } from 'rxjs';
|
|
9
9
|
import * as i1$1 from '@angular/forms';
|
|
10
10
|
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule, UntypedFormControl, Validators } from '@angular/forms';
|
|
11
11
|
import { ENTER } from '@koobiq/cdk/keycodes';
|
|
@@ -1987,7 +1987,7 @@ class KbqFilterBar {
|
|
|
1987
1987
|
</div>
|
|
1988
1988
|
|
|
1989
1989
|
<div class="kbq-filter-bar__right">
|
|
1990
|
-
<ng-content select="kbq-filter-search, [kbq-filter-search]" />
|
|
1990
|
+
<ng-content select="kbq-filter-search, [kbq-filter-search], kbq-search-expandable" />
|
|
1991
1991
|
|
|
1992
1992
|
<ng-content select="kbq-filter-refresher, [kbq-filter-refresher]" />
|
|
1993
1993
|
</div>
|
|
@@ -2007,7 +2007,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2007
2007
|
</div>
|
|
2008
2008
|
|
|
2009
2009
|
<div class="kbq-filter-bar__right">
|
|
2010
|
-
<ng-content select="kbq-filter-search, [kbq-filter-search]" />
|
|
2010
|
+
<ng-content select="kbq-filter-search, [kbq-filter-search], kbq-search-expandable" />
|
|
2011
2011
|
|
|
2012
2012
|
<ng-content select="kbq-filter-refresher, [kbq-filter-refresher]" />
|
|
2013
2013
|
</div>
|
|
@@ -2067,28 +2067,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2067
2067
|
}, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:64px}\n"] }]
|
|
2068
2068
|
}] });
|
|
2069
2069
|
|
|
2070
|
+
const defaultOnSearchTimeout = 0;
|
|
2070
2071
|
class KbqFilterBarSearch {
|
|
2071
|
-
/** localized data
|
|
2072
|
-
* @docs-private */
|
|
2073
|
-
get localeData() {
|
|
2074
|
-
return this.filterBar.configuration.search;
|
|
2075
|
-
}
|
|
2076
2072
|
constructor() {
|
|
2077
2073
|
/** KbqFilterBar instance */
|
|
2078
2074
|
this.filterBar = inject(KbqFilterBar);
|
|
2079
2075
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
2076
|
+
this.destroyRef = inject(DestroyRef);
|
|
2080
2077
|
/** control for search */
|
|
2081
2078
|
this.searchControl = new UntypedFormControl();
|
|
2082
2079
|
/** Whether the search active */
|
|
2083
2080
|
this.isSearchActive = false;
|
|
2081
|
+
/**
|
|
2082
|
+
/** Timeout in milliseconds for emit event. The default value is taken from defaultOnSearchTimeout
|
|
2083
|
+
* @default 0
|
|
2084
|
+
*/
|
|
2085
|
+
this.onSearchTimeout = input(defaultOnSearchTimeout, { transform: numberAttribute });
|
|
2086
|
+
/** Emit event by enter or not. Default is false */
|
|
2087
|
+
this.emitValueByEnter = input(false, { transform: booleanAttribute });
|
|
2088
|
+
/** Value of the field after initialization */
|
|
2089
|
+
this.initialValue = input();
|
|
2084
2090
|
/** event that is generated whenever a user performs a search. */
|
|
2085
2091
|
this.onSearch = new EventEmitter();
|
|
2086
2092
|
/** @docs-private */
|
|
2087
2093
|
this.onReset = () => {
|
|
2088
2094
|
this.changeDetectorRef.markForCheck();
|
|
2089
2095
|
};
|
|
2090
|
-
|
|
2091
|
-
|
|
2096
|
+
}
|
|
2097
|
+
/** localized data
|
|
2098
|
+
* @docs-private */
|
|
2099
|
+
get localeData() {
|
|
2100
|
+
return this.filterBar.configuration.search;
|
|
2101
|
+
}
|
|
2102
|
+
ngAfterViewInit() {
|
|
2103
|
+
this.filterBar.filterReset?.onResetFilter.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.onReset);
|
|
2104
|
+
if (this.initialValue()) {
|
|
2105
|
+
this.searchControl.setValue(this.initialValue(), { emitEvent: false });
|
|
2106
|
+
}
|
|
2107
|
+
this.searchControl.valueChanges
|
|
2108
|
+
.pipe(distinctUntilChanged$1(), filter(() => !this.emitValueByEnter()), debounceTime$1(this.onSearchTimeout()), takeUntilDestroyed(this.destroyRef))
|
|
2109
|
+
.subscribe(this.onSearch);
|
|
2092
2110
|
}
|
|
2093
2111
|
openSearch() {
|
|
2094
2112
|
this.isSearchActive = true;
|
|
@@ -2107,6 +2125,12 @@ class KbqFilterBarSearch {
|
|
|
2107
2125
|
this.tooltip.hide();
|
|
2108
2126
|
}
|
|
2109
2127
|
/** @docs-private */
|
|
2128
|
+
onEnter() {
|
|
2129
|
+
if (this.emitValueByEnter()) {
|
|
2130
|
+
this.onSearch.emit(this.searchControl.value);
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
/** @docs-private */
|
|
2110
2134
|
onClear() {
|
|
2111
2135
|
this.isSearchActive = false;
|
|
2112
2136
|
setTimeout(() => {
|
|
@@ -2115,7 +2139,7 @@ class KbqFilterBarSearch {
|
|
|
2115
2139
|
});
|
|
2116
2140
|
}
|
|
2117
2141
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqFilterBarSearch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2118
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2142
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: KbqFilterBarSearch, isStandalone: true, selector: "kbq-filter-search, [kbq-filter-search]", inputs: { onSearchTimeout: { classPropertyName: "onSearchTimeout", publicName: "onSearchTimeout", isSignal: true, isRequired: false, transformFunction: null }, emitValueByEnter: { classPropertyName: "emitValueByEnter", publicName: "emitValueByEnter", isSignal: true, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSearch: "onSearch" }, host: { classAttribute: "kbq-filter-search" }, viewQueries: [{ propertyName: "input", first: true, predicate: KbqInput, descendants: true }, { propertyName: "button", first: true, predicate: KbqButton, descendants: true }, { propertyName: "tooltip", first: true, predicate: KbqTooltipTrigger, descendants: true }], ngImport: i0, template: `
|
|
2119
2143
|
<button
|
|
2120
2144
|
kbq-button
|
|
2121
2145
|
[class.kbq-filter_hidden]="isSearchActive"
|
|
@@ -2137,6 +2161,7 @@ class KbqFilterBarSearch {
|
|
|
2137
2161
|
placeholder="{{ localeData.placeholder }}"
|
|
2138
2162
|
(blur)="onBlur()"
|
|
2139
2163
|
(keydown.escape)="onEscape()"
|
|
2164
|
+
(keydown.enter)="onEnter()"
|
|
2140
2165
|
/>
|
|
2141
2166
|
|
|
2142
2167
|
<kbq-cleaner (click)="onClear()" />
|
|
@@ -2167,6 +2192,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2167
2192
|
placeholder="{{ localeData.placeholder }}"
|
|
2168
2193
|
(blur)="onBlur()"
|
|
2169
2194
|
(keydown.escape)="onEscape()"
|
|
2195
|
+
(keydown.enter)="onEnter()"
|
|
2170
2196
|
/>
|
|
2171
2197
|
|
|
2172
2198
|
<kbq-cleaner (click)="onClear()" />
|
|
@@ -2182,7 +2208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2182
2208
|
], host: {
|
|
2183
2209
|
class: 'kbq-filter-search'
|
|
2184
2210
|
}, styles: [".kbq-filter-search{display:flex;align-items:start}.kbq-filter-search .kbq-form-field{width:260px}.kbq-filter-search .kbq-filter_hidden{display:none}\n"] }]
|
|
2185
|
-
}],
|
|
2211
|
+
}], propDecorators: { input: [{
|
|
2186
2212
|
type: ViewChild,
|
|
2187
2213
|
args: [KbqInput]
|
|
2188
2214
|
}], button: [{
|
|
@@ -2408,5 +2434,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2408
2434
|
* Generated bundle index. Do not edit.
|
|
2409
2435
|
*/
|
|
2410
2436
|
|
|
2411
|
-
export { KBQ_FILTER_BAR_CONFIGURATION, KBQ_FILTER_BAR_DEFAULT_CONFIGURATION, KBQ_FILTER_BAR_PIPES, KBQ_PIPE_DATA, KbqBasePipe, KbqFilterBar, KbqFilterBarButton, KbqFilterBarModule, KbqFilterBarRefresher, KbqFilterBarSearch, KbqFilterReset, KbqFilters, KbqPipeAdd, KbqPipeButton, KbqPipeDateComponent, KbqPipeDatetimeComponent, KbqPipeDirective, KbqPipeMinWidth, KbqPipeMultiSelectComponent, KbqPipeReadonlyComponent, KbqPipeSelectComponent, KbqPipeState, KbqPipeTextComponent, KbqPipeTitleDirective, KbqPipeTreeSelectComponent, KbqPipeTypes, KbqSaveFilterStatuses, KbqTreeSelectFlatNode, defaultFilterBarPipes, getId, kbqBuildTree, kbqFilterBarPipesProvider };
|
|
2437
|
+
export { KBQ_FILTER_BAR_CONFIGURATION, KBQ_FILTER_BAR_DEFAULT_CONFIGURATION, KBQ_FILTER_BAR_PIPES, KBQ_PIPE_DATA, KbqBasePipe, KbqFilterBar, KbqFilterBarButton, KbqFilterBarModule, KbqFilterBarRefresher, KbqFilterBarSearch, KbqFilterReset, KbqFilters, KbqPipeAdd, KbqPipeButton, KbqPipeDateComponent, KbqPipeDatetimeComponent, KbqPipeDirective, KbqPipeMinWidth, KbqPipeMultiSelectComponent, KbqPipeReadonlyComponent, KbqPipeSelectComponent, KbqPipeState, KbqPipeTextComponent, KbqPipeTitleDirective, KbqPipeTreeSelectComponent, KbqPipeTypes, KbqSaveFilterStatuses, KbqTreeSelectFlatNode, defaultFilterBarPipes, defaultOnSearchTimeout, getId, kbqBuildTree, kbqFilterBarPipesProvider };
|
|
2412
2438
|
//# sourceMappingURL=koobiq-components-filter-bar.mjs.map
|