@koobiq/components 20.3.3 → 20.4.1

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.
Files changed (42) hide show
  1. package/core/index.d.ts +114 -6
  2. package/core/option/_option-theme.scss +3 -0
  3. package/ellipsis-center/ellipsis-center.scss +31 -0
  4. package/ellipsis-center/index.d.ts +3 -3
  5. package/fesm2022/koobiq-components-core.mjs +173 -16
  6. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  7. package/fesm2022/koobiq-components-ellipsis-center.mjs +27 -15
  8. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  9. package/fesm2022/koobiq-components-file-upload.mjs +4 -4
  10. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  11. package/fesm2022/koobiq-components-filter-bar.mjs +36 -32
  12. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  13. package/fesm2022/koobiq-components-inline-edit.mjs +177 -14
  14. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  15. package/fesm2022/koobiq-components-list.mjs +357 -42
  16. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  17. package/fesm2022/koobiq-components-navbar.mjs +5 -1
  18. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  19. package/fesm2022/koobiq-components-search-expandable.mjs +2 -1
  20. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  21. package/fesm2022/koobiq-components-select.mjs +20 -2
  22. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  23. package/fesm2022/koobiq-components-tabs.mjs +453 -196
  24. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  25. package/fesm2022/koobiq-components-timezone.mjs +2 -2
  26. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  27. package/file-upload/file-upload.scss +0 -29
  28. package/filter-bar/index.d.ts +16 -0
  29. package/filter-bar/pipes/base-pipe.scss +11 -0
  30. package/inline-edit/index.d.ts +87 -8
  31. package/inline-edit/inline-edit-tokens.scss +1 -0
  32. package/inline-edit/inline-edit.scss +26 -0
  33. package/list/index.d.ts +126 -5
  34. package/navbar/index.d.ts +5 -1
  35. package/package.json +3 -3
  36. package/schematics/ng-add/index.js +1 -1
  37. package/select/index.d.ts +6 -0
  38. package/tabs/_tabs-common.scss +111 -2
  39. package/tabs/index.d.ts +78 -48
  40. package/tabs/tab-group.scss +0 -4
  41. package/tabs/tab-header.scss +0 -2
  42. 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
- return this.textElement.clientWidth < this.textElement.scrollWidth;
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;