@koobiq/components 20.3.2 → 20.4.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/index.d.ts +114 -5
- package/core/option/_option-theme.scss +3 -0
- package/ellipsis-center/ellipsis-center.scss +31 -0
- package/ellipsis-center/index.d.ts +3 -3
- package/fesm2022/koobiq-components-core.mjs +173 -8
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +27 -15
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +4 -4
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +36 -32
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +177 -14
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +357 -42
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +20 -2
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +453 -196
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/file-upload/file-upload.scss +0 -29
- package/filter-bar/index.d.ts +16 -0
- package/filter-bar/pipes/base-pipe.scss +11 -0
- package/inline-edit/index.d.ts +87 -8
- package/inline-edit/inline-edit-tokens.scss +1 -0
- package/inline-edit/inline-edit.scss +26 -0
- package/list/index.d.ts +126 -5
- package/package.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/select/index.d.ts +6 -0
- package/tabs/_tabs-common.scss +111 -2
- package/tabs/index.d.ts +78 -48
- package/tabs/tab-group.scss +0 -4
- package/tabs/tab-header.scss +0 -2
- package/tabs/tab-nav-bar.scss +3 -11
|
@@ -5,7 +5,7 @@ import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';
|
|
|
5
5
|
import { ContentObserver } from '@angular/cdk/observers';
|
|
6
6
|
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
7
7
|
import { Platform, _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
8
|
-
import { KbqOption, KbqAbstractSelect, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, getSelectAllState, KbqComponentColors, ErrorStateMatcher, KBQ_SELECT_SCROLL_STRATEGY, KBQ_LOCALE_SERVICE, defaultOffsetY, KBQ_CONNECTED_OVERLAY_BELOW_CLASS, KBQ_CONNECTED_OVERLAY_ABOVE_CLASS, KbqSelectFooter, KbqSelectTrigger, KbqSelectMatcher, KbqOptgroup, KbqSelectSearch, KbqSelectSearchEmptyResult, ruRULocaleData, KBQ_PANEL_DEFAULT_MIN_WIDTH, kbqResolvePanelMaxHeightToken, toggleSelectAll, KbqSelectAllEvent, isUndefined, kbqGetElementHeight, DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, ESCAPE, TAB, HOME, END, PAGE_UP, PAGE_DOWN, isSelectAll, BACKSPACE, DELETE, getKbqSelectNonArrayValueError, runCompareWith, KbqVirtualOption, ActiveDescendantKeyManager, isInput, shouldSelectSearchText, kbqSelectAnimations, KbqPseudoCheckbox, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_POPUP, kbqSiblingPopupProvider, KbqOptionModule, KbqSelectFooterItem } from '@koobiq/components/core';
|
|
8
|
+
import { KbqOption, KBQ_WINDOW, KbqAbstractSelect, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, getSelectAllState, KbqComponentColors, ErrorStateMatcher, KBQ_SELECT_SCROLL_STRATEGY, KBQ_LOCALE_SERVICE, defaultOffsetY, KBQ_CONNECTED_OVERLAY_BELOW_CLASS, KBQ_CONNECTED_OVERLAY_ABOVE_CLASS, KbqSelectFooter, KbqSelectTrigger, KbqSelectMatcher, KbqOptgroup, KbqSelectSearch, KbqSelectSearchEmptyResult, ruRULocaleData, KBQ_PANEL_DEFAULT_MIN_WIDTH, kbqResolvePanelMaxHeightToken, toggleSelectAll, KbqSelectAllEvent, isUndefined, kbqGetElementHeight, DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, ESCAPE, TAB, HOME, END, PAGE_UP, PAGE_DOWN, isSelectAll, BACKSPACE, DELETE, getKbqSelectNonArrayValueError, runCompareWith, KbqVirtualOption, ActiveDescendantKeyManager, isInput, shouldSelectSearchText, kbqSelectAnimations, KbqPseudoCheckbox, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_POPUP, kbqSiblingPopupProvider, KbqOptionModule, KbqSelectFooterItem } from '@koobiq/components/core';
|
|
9
9
|
import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
10
10
|
import { Subscription, throttleTime, Subject, defer, merge, EMPTY, BehaviorSubject, fromEvent } from 'rxjs';
|
|
11
11
|
import { debounceTime, switchMap, startWith, take, filter, map, delay, distinctUntilChanged, auditTime, takeUntil } from 'rxjs/operators';
|
|
@@ -122,7 +122,24 @@ class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
|
122
122
|
get isOverflown() {
|
|
123
123
|
if (!this.isBrowser)
|
|
124
124
|
return false;
|
|
125
|
-
|
|
125
|
+
const textElement = this.textElement;
|
|
126
|
+
// A two-line option's lines clip themselves, so they never widen this element's `scrollWidth`.
|
|
127
|
+
return textElement.clientWidth < textElement.scrollWidth || this.hasClippedLine(textElement);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Whether one of the option's own line boxes is truncating its text. The ellipsis is part of the
|
|
131
|
+
* condition, so a child clipping for another reason is not read as truncated text.
|
|
132
|
+
*/
|
|
133
|
+
hasClippedLine(textElement) {
|
|
134
|
+
const { children } = textElement;
|
|
135
|
+
for (let index = 0; index < children.length; index++) {
|
|
136
|
+
const line = children[index];
|
|
137
|
+
if (line.clientWidth < line.scrollWidth &&
|
|
138
|
+
this.window.getComputedStyle(line).textOverflow.includes('ellipsis')) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
126
143
|
}
|
|
127
144
|
constructor() {
|
|
128
145
|
super();
|
|
@@ -130,6 +147,7 @@ class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
|
130
147
|
this.resizeObserver = inject(SharedResizeObserver);
|
|
131
148
|
this.contentObserver = inject(ContentObserver);
|
|
132
149
|
this.isBrowser = inject(Platform).isBrowser;
|
|
150
|
+
this.window = inject(KBQ_WINDOW);
|
|
133
151
|
this.debounceInterval = 100;
|
|
134
152
|
this.resizeSubscription = Subscription.EMPTY;
|
|
135
153
|
this.contentObserverSubscription = Subscription.EMPTY;
|