@koobiq/components 20.3.1 → 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/accordion/accordion.scss +4 -1
- package/accordion/index.d.ts +36 -12
- package/alert/index.d.ts +8 -0
- package/breadcrumbs/index.d.ts +2 -0
- package/button-toggle/button-toggle-tokens.scss +14 -0
- package/button-toggle/button-toggle.scss +75 -3
- package/core/index.d.ts +146 -5
- package/core/option/_option-theme.scss +3 -0
- package/core/styles/common/_select.scss +98 -3
- package/core/styles/typography/_typography.scss +8 -0
- package/ellipsis-center/ellipsis-center.scss +31 -0
- package/ellipsis-center/index.d.ts +35 -2
- package/fesm2022/koobiq-components-accordion.mjs +143 -44
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +17 -1
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +2 -2
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +8 -3
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +10 -5
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +214 -11
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +2 -2
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +101 -34
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +7 -7
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +94 -55
- 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 +359 -44
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +6 -2
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +48 -7
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +117 -12
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +5 -1
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +25 -6
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +460 -197
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +388 -74
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +4 -4
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +15 -3
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +2 -2
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +14 -4
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/file-upload.scss +0 -18
- package/file-upload/index.d.ts +1 -1
- package/file-upload/multiple-file-upload.component.scss +15 -3
- package/file-upload/single-file-upload.component.scss +10 -2
- package/filter-bar/filter-bar-tokens.scss +2 -1
- package/filter-bar/index.d.ts +41 -4
- package/filter-bar/pipes/base-pipe.scss +24 -6
- package/filter-bar/pipes/pipe-input.scss +3 -1
- 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/link/_link-theme.scss +50 -15
- package/list/index.d.ts +126 -5
- package/markdown/index.d.ts +2 -0
- package/modal/index.d.ts +16 -7
- package/navbar/_navbar-item_horizontal.scss +5 -0
- package/package.json +3 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/migrations/alert-signals/index.js +4 -1
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +3 -34
- package/schematics/migrations/empty-state-size-attr/index.js +3 -34
- package/schematics/migrations/filter-bar-signals/index.js +4 -1
- package/schematics/migrations/loader-overlay-size-attr/index.js +3 -34
- package/schematics/migrations/v20-upgrade/index.js +4 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/utils/angular-parsing.js +11 -12
- package/schematics/utils/package-config.js +5 -4
- package/schematics/utils/typescript.js +24 -0
- package/select/_select-theme.scss +9 -1
- package/select/index.d.ts +18 -2
- package/select/select.scss +13 -0
- package/sidebar/index.d.ts +1 -0
- package/sidepanel/index.d.ts +9 -0
- package/tabs/_tabs-common.scss +111 -2
- package/tabs/index.d.ts +79 -48
- package/tabs/tab-group.scss +0 -4
- package/tabs/tab-header.scss +0 -2
- package/tabs/tab-nav-bar.scss +3 -11
- package/time-range/index.d.ts +140 -5
- package/time-range/time-range.scss +16 -1
- package/title/index.d.ts +10 -2
- package/tree/index.d.ts +1 -0
|
@@ -1,32 +1,76 @@
|
|
|
1
|
+
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
2
|
+
import { _CdkPrivateStyleLoader } from '@angular/cdk/private';
|
|
1
3
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, input, numberAttribute, Input, Directive, NgModule } from '@angular/core';
|
|
4
|
+
import { ViewEncapsulation, Component, inject, ChangeDetectorRef, input, numberAttribute, Input, Directive, NgModule } from '@angular/core';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
6
|
import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
4
|
-
import { Subject
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
5
8
|
import { debounceTime } from 'rxjs/operators';
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Component used to load the `.kbq-ellipsis-center` styles.
|
|
12
|
+
*/
|
|
13
|
+
class EllipsisCenterStyleLoader {
|
|
14
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: EllipsisCenterStyleLoader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.30", type: EllipsisCenterStyleLoader, isStandalone: true, selector: "ellipsis-center-style-loader", ngImport: i0, template: '', isInline: true, styles: [".kbq-ellipsis-center{position:relative;display:flex;max-width:100%;min-width:0;overflow:hidden}.kbq-ellipsis-center .kbq-ellipsis-center_data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-ellipsis-center .kbq-ellipsis-center_data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: EllipsisCenterStyleLoader, decorators: [{
|
|
18
|
+
type: Component,
|
|
19
|
+
args: [{ selector: 'ellipsis-center-style-loader', template: '', encapsulation: ViewEncapsulation.None, styles: [".kbq-ellipsis-center{position:relative;display:flex;max-width:100%;min-width:0;overflow:hidden}.kbq-ellipsis-center .kbq-ellipsis-center_data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-ellipsis-center .kbq-ellipsis-center_data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n"] }]
|
|
20
|
+
}] });
|
|
21
|
+
/**
|
|
22
|
+
* Renders text as two spans and moves the ellipsis into the middle, so the tail — a file extension, the
|
|
23
|
+
* digits that tell two reports apart — stays readable when the host is too narrow for the whole string. A
|
|
24
|
+
* tooltip spells out the full text, and is enabled only while something is actually hidden.
|
|
25
|
+
*/
|
|
8
26
|
class KbqEllipsisCenterDirective extends KbqTooltipTrigger {
|
|
27
|
+
// TODO: Skipped for migration because:
|
|
28
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
29
|
+
set kbqEllipsisCenter(value) {
|
|
30
|
+
this._kbqEllipsisCenter = value;
|
|
31
|
+
this.refresh();
|
|
32
|
+
// check the view to properly calculate text-start and text-end on text initialized
|
|
33
|
+
this.cdr.detectChanges();
|
|
34
|
+
}
|
|
9
35
|
constructor() {
|
|
10
|
-
super(
|
|
36
|
+
super();
|
|
11
37
|
this.cdr = inject(ChangeDetectorRef);
|
|
12
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Application-wide `ResizeObserver` shared by every consumer, as `KbqTitleDirective` uses. Unlike the
|
|
40
|
+
* `window:resize` listener this directive used to carry, it also reacts to container-only resizes — a
|
|
41
|
+
* splitter drag, a sidebar collapse, or the vertical scrollbar that appears once a file list fills up —
|
|
42
|
+
* none of which resize the window, all of which change where the text has to be split.
|
|
43
|
+
*/
|
|
44
|
+
this.resizeObserver = inject(SharedResizeObserver);
|
|
45
|
+
/** The two spans this directive renders have no styles of their own until this is loaded. */
|
|
46
|
+
this.styleLoader = inject(_CdkPrivateStyleLoader);
|
|
47
|
+
/**
|
|
48
|
+
* Shortest text worth splitting in the middle. Anything below it keeps its natural order and is cut off
|
|
49
|
+
* at the end by the host's own `text-overflow`.
|
|
50
|
+
*
|
|
51
|
+
* Defaults to `0` — every overflowing text is split — because that is what the directive has always
|
|
52
|
+
* done: the input was declared but never read, so any other default would silently end-truncate labels
|
|
53
|
+
* that consumers expect to see split.
|
|
54
|
+
*/
|
|
55
|
+
this.minVisibleLength = input(0, ...(ngDevMode ? [{ debugName: "minVisibleLength" }] : []));
|
|
56
|
+
/**
|
|
57
|
+
* Lower bound, in pixels, for the average glyph width used to decide how many characters fit in the
|
|
58
|
+
* tail. The rendered text is measured as well and the wider of the two wins, so an underestimate here
|
|
59
|
+
* can no longer push the extension out of the tail — raising it only shortens the tail further.
|
|
60
|
+
*/
|
|
13
61
|
this.charWidth = input(7, ...(ngDevMode ? [{ debugName: "charWidth" }] : []));
|
|
14
62
|
/**
|
|
15
63
|
* Debounce time (ms) for resize events before recalculating ellipsis position.
|
|
16
64
|
* @default 50
|
|
17
65
|
*/
|
|
18
66
|
this.debounceInterval = input(50, ...(ngDevMode ? [{ debugName: "debounceInterval", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
19
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated No longer read. Resizes now come from the shared `ResizeObserver`, which also catches the
|
|
69
|
+
* container-only ones a `window:resize` listener cannot see; the host listener that used to feed this
|
|
70
|
+
* subject is gone, and nothing subscribes to it. Kept as a no-op and removed in the next major version.
|
|
71
|
+
* @docs-private */
|
|
20
72
|
this.resizeStream = new Subject();
|
|
21
|
-
this.
|
|
22
|
-
}
|
|
23
|
-
// TODO: Skipped for migration because:
|
|
24
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
25
|
-
set kbqEllipsisCenter(value) {
|
|
26
|
-
this._kbqEllipsisCenter = value;
|
|
27
|
-
this.refresh();
|
|
28
|
-
// check the view to properly calculate text-start and text-end on text initialized
|
|
29
|
-
this.cdr.detectChanges();
|
|
73
|
+
this.styleLoader.load(EllipsisCenterStyleLoader);
|
|
30
74
|
}
|
|
31
75
|
ngOnInit() {
|
|
32
76
|
super.ngOnInit();
|
|
@@ -34,13 +78,19 @@ class KbqEllipsisCenterDirective extends KbqTooltipTrigger {
|
|
|
34
78
|
this.refresh();
|
|
35
79
|
}
|
|
36
80
|
ngAfterViewInit() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.
|
|
81
|
+
super.ngAfterViewInit();
|
|
82
|
+
this.resizeObserver
|
|
83
|
+
.observe(this.elementRef.nativeElement)
|
|
84
|
+
.pipe(debounceTime(this.debounceInterval()), takeUntilDestroyed(this.destroyRef))
|
|
85
|
+
.subscribe(() => {
|
|
86
|
+
if (this.elementRef.nativeElement.clientWidth !== this.lastMeasuredWidth) {
|
|
87
|
+
this.refresh();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
40
90
|
}
|
|
41
91
|
ngOnDestroy() {
|
|
92
|
+
clearTimeout(this.refreshTimeoutId);
|
|
42
93
|
super.ngOnDestroy();
|
|
43
|
-
this.resizeSubscription.unsubscribe();
|
|
44
94
|
}
|
|
45
95
|
/**
|
|
46
96
|
* Updates the displayed text with center ellipsis truncation based on container width.
|
|
@@ -65,39 +115,56 @@ class KbqEllipsisCenterDirective extends KbqTooltipTrigger {
|
|
|
65
115
|
});
|
|
66
116
|
this.renderer.appendChild(dataTextStart, this.renderer.createText(this._kbqEllipsisCenter));
|
|
67
117
|
this.renderer.appendChild(dataTextEnd, this.renderer.createText(end));
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
118
|
+
// A queued callback outlives both the spans it measures and the directive itself: it would measure
|
|
119
|
+
// elements a newer `refresh()` has already detached (`scrollWidth === 0`, so the text reads as
|
|
120
|
+
// fitting) and then call `hide()` on a torn-down trigger.
|
|
121
|
+
clearTimeout(this.refreshTimeoutId);
|
|
122
|
+
this.refreshTimeoutId = setTimeout(() => {
|
|
123
|
+
const { clientWidth } = this.elementRef.nativeElement;
|
|
124
|
+
// The full text is still in the start element at this point, so this is the width it needs.
|
|
125
|
+
const textWidth = dataTextStart.scrollWidth;
|
|
126
|
+
const truncated = clientWidth < textWidth;
|
|
127
|
+
this.lastMeasuredWidth = clientWidth;
|
|
128
|
+
if (truncated && this._kbqEllipsisCenter.length >= this.minVisibleLength()) {
|
|
129
|
+
// What the text actually rendered at, not what `charWidth` assumes: with glyphs wider than
|
|
130
|
+
// the Latin-sized default (Cyrillic, CJK, uppercase) the estimate hands the tail more
|
|
131
|
+
// characters than the cell can hold, and the tail does not shrink — so `overflow: hidden`
|
|
132
|
+
// would swallow the extension the split exists to keep.
|
|
133
|
+
const averageCharWidth = Math.max(this.charWidth(), textWidth / this._kbqEllipsisCenter.length);
|
|
134
|
+
const lastCharsLength = Math.round(clientWidth / 2 / averageCharWidth);
|
|
135
|
+
// Both halves have to keep at least one character: an empty start element drops the ellipsis
|
|
136
|
+
// (it is the only one carrying `text-overflow`), an empty end element drops the extension.
|
|
137
|
+
const sliceIndex = Math.max(1, Math.min(Math.round(this._kbqEllipsisCenter.length - lastCharsLength), this._kbqEllipsisCenter.length - 1));
|
|
78
138
|
start = this._kbqEllipsisCenter.slice(0, sliceIndex);
|
|
79
139
|
end = this._kbqEllipsisCenter.slice(sliceIndex);
|
|
80
140
|
}
|
|
141
|
+
else {
|
|
142
|
+
// Text that is not split goes into the start element, the only one carrying
|
|
143
|
+
// `text-overflow: ellipsis` — the end element cannot shrink, so text parked there would
|
|
144
|
+
// overflow the host instead of being cut off.
|
|
145
|
+
start = this._kbqEllipsisCenter;
|
|
146
|
+
end = '';
|
|
147
|
+
}
|
|
81
148
|
dataTextStart.innerText = start;
|
|
82
149
|
dataTextEnd.innerText = end;
|
|
150
|
+
this.disabled = !truncated;
|
|
83
151
|
this.cdr.markForCheck();
|
|
84
152
|
});
|
|
85
153
|
this.renderer.appendChild(this.elementRef.nativeElement, dataTextStart);
|
|
86
154
|
this.renderer.appendChild(this.elementRef.nativeElement, dataTextEnd);
|
|
87
155
|
}
|
|
88
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqEllipsisCenterDirective, deps:
|
|
89
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqEllipsisCenterDirective, isStandalone: true, selector: "[kbqEllipsisCenter]", inputs: { kbqEllipsisCenter: { classPropertyName: "kbqEllipsisCenter", publicName: "kbqEllipsisCenter", isSignal: false, isRequired: false, transformFunction: null }, minVisibleLength: { classPropertyName: "minVisibleLength", publicName: "minVisibleLength", isSignal: true, isRequired: false, transformFunction: null }, charWidth: { classPropertyName: "charWidth", publicName: "charWidth", isSignal: true, isRequired: false, transformFunction: null }, debounceInterval: { classPropertyName: "debounceInterval", publicName: "debounceInterval", isSignal: true, isRequired: false, transformFunction: null } }, host: {
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqEllipsisCenterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqEllipsisCenterDirective, isStandalone: true, selector: "[kbqEllipsisCenter]", inputs: { kbqEllipsisCenter: { classPropertyName: "kbqEllipsisCenter", publicName: "kbqEllipsisCenter", isSignal: false, isRequired: false, transformFunction: null }, minVisibleLength: { classPropertyName: "minVisibleLength", publicName: "minVisibleLength", isSignal: true, isRequired: false, transformFunction: null }, charWidth: { classPropertyName: "charWidth", publicName: "charWidth", isSignal: true, isRequired: false, transformFunction: null }, debounceInterval: { classPropertyName: "debounceInterval", publicName: "debounceInterval", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "kbq-ellipsis-center" }, usesInheritance: true, ngImport: i0 }); }
|
|
90
158
|
}
|
|
91
159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqEllipsisCenterDirective, decorators: [{
|
|
92
160
|
type: Directive,
|
|
93
161
|
args: [{
|
|
94
162
|
selector: '[kbqEllipsisCenter]',
|
|
95
163
|
host: {
|
|
96
|
-
class: 'kbq-ellipsis-center'
|
|
97
|
-
'(window:resize)': 'resizeStream.next($event)'
|
|
164
|
+
class: 'kbq-ellipsis-center'
|
|
98
165
|
}
|
|
99
166
|
}]
|
|
100
|
-
}], propDecorators: { kbqEllipsisCenter: [{
|
|
167
|
+
}], ctorParameters: () => [], propDecorators: { kbqEllipsisCenter: [{
|
|
101
168
|
type: Input
|
|
102
169
|
}], minVisibleLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minVisibleLength", required: false }] }], charWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "charWidth", required: false }] }], debounceInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceInterval", required: false }] }] } });
|
|
103
170
|
class KbqEllipsisCenterModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-ellipsis-center.mjs","sources":["../../../packages/components/ellipsis-center/ellipsis-center.directive.ts","../../../packages/components/ellipsis-center/koobiq-components-ellipsis-center.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n inject,\n Input,\n input,\n NgModule,\n numberAttribute,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport { KbqTooltipTrigger } from '@koobiq/components/tooltip';\nimport { Subject, Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nconst MIN_VISIBLE_LENGTH = 50;\n\n@Directive({\n selector: '[kbqEllipsisCenter]',\n host: {\n class: 'kbq-ellipsis-center',\n '(window:resize)': 'resizeStream.next($event)'\n }\n})\nexport class KbqEllipsisCenterDirective extends KbqTooltipTrigger implements OnInit, AfterViewInit, OnDestroy {\n private cdr: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input() set kbqEllipsisCenter(value: string) {\n this._kbqEllipsisCenter = value;\n this.refresh();\n // check the view to properly calculate text-start and text-end on text initialized\n this.cdr.detectChanges();\n }\n\n readonly minVisibleLength = input<number>(MIN_VISIBLE_LENGTH);\n\n readonly charWidth = input(7);\n\n /**\n * Debounce time (ms) for resize events before recalculating ellipsis position.\n * @default 50\n */\n readonly debounceInterval = input<number, unknown>(50, { transform: numberAttribute });\n\n /** @docs-private */\n readonly resizeStream = new Subject<Event>();\n\n private _kbqEllipsisCenter: string;\n\n private resizeSubscription = Subscription.EMPTY;\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.content = this._kbqEllipsisCenter;\n this.refresh();\n }\n\n ngAfterViewInit(): void {\n this.resizeSubscription = this.resizeStream\n .pipe(debounceTime(this.debounceInterval()))\n .subscribe(() => this.refresh());\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.resizeSubscription.unsubscribe();\n }\n\n /**\n * Updates the displayed text with center ellipsis truncation based on container width.\n * Recreates start/end span elements, measures available space, and adjusts text accordingly.\n * @docs-private\n */\n refresh(): void {\n let start = '';\n let end = '';\n\n this.content = this._kbqEllipsisCenter;\n\n const [dataTextStart, dataTextEnd] = [\n 'kbq-ellipsis-center_data-text-start',\n 'kbq-ellipsis-center_data-text-end'\n ].map((querySelector) => {\n const element = this.elementRef.nativeElement.querySelector(`.${querySelector}`);\n\n if (element) {\n this.renderer.removeChild(this.elementRef.nativeElement, element);\n }\n\n const newElement = this.renderer.createElement('span');\n\n this.renderer.addClass(newElement, querySelector);\n\n return newElement;\n });\n\n this.renderer.appendChild(dataTextStart, this.renderer.createText(this._kbqEllipsisCenter));\n this.renderer.appendChild(dataTextEnd, this.renderer.createText(end));\n setTimeout(() => {\n this.disabled = this.elementRef.nativeElement.clientWidth > dataTextStart.scrollWidth;\n\n if (this.disabled) {\n start = '';\n end = this._kbqEllipsisCenter;\n } else {\n const averageCharWidth = this.charWidth();\n const lastCharsLength = Math.round(this.elementRef.nativeElement.clientWidth / 2 / averageCharWidth);\n const sliceIndex: number = Math.round(this._kbqEllipsisCenter.length - lastCharsLength);\n\n start = this._kbqEllipsisCenter.slice(0, sliceIndex);\n end = this._kbqEllipsisCenter.slice(sliceIndex);\n }\n\n dataTextStart.innerText = start;\n dataTextEnd.innerText = end;\n\n this.cdr.markForCheck();\n });\n\n this.renderer.appendChild(this.elementRef.nativeElement, dataTextStart);\n this.renderer.appendChild(this.elementRef.nativeElement, dataTextEnd);\n }\n}\n\n@NgModule({\n imports: [KbqEllipsisCenterDirective],\n exports: [KbqEllipsisCenterDirective]\n})\nexport class KbqEllipsisCenterModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAgBA,MAAM,kBAAkB,GAAG,EAAE;AASvB,MAAO,0BAA2B,SAAQ,iBAAiB,CAAA;AAPjE,IAAA,WAAA,GAAA;;AAQY,QAAA,IAAA,CAAA,GAAG,GAAsB,MAAM,CAAC,iBAAiB,CAAC;AAWjD,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAS,kBAAkB,4DAAC;AAEpD,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,CAAC,qDAAC;AAE7B;;;AAGG;AACM,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAkB,EAAE,oDAAI,SAAS,EAAE,eAAe,EAAA,CAAA,GAAA,CAA5B,EAAE,SAAS,EAAE,eAAe,EAAE,GAAC;;AAG7E,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAS;AAIpC,QAAA,IAAA,CAAA,kBAAkB,GAAG,YAAY,CAAC,KAAK;AAyElD,IAAA;;;IA/FG,IAAa,iBAAiB,CAAC,KAAa,EAAA;AACxC,QAAA,IAAI,CAAC,kBAAkB,GAAG,KAAK;QAC/B,IAAI,CAAC,OAAO,EAAE;;AAEd,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE;IAC5B;IAmBS,QAAQ,GAAA;QACb,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,kBAAkB;QACtC,IAAI,CAA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A,EAAA,CA1GvB,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAA1B,0BAA0B,CAAA,EAAA,CAAA,CAAA;mIA0G1B,uBAAuB,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,0BAA0B,CAAC;oBACrC,OAAO,EAAE,CAAC,0BAA0B;AACvC,iBAAA;;;AClID;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-ellipsis-center.mjs","sources":["../../../packages/components/ellipsis-center/ellipsis-center.directive.ts","../../../packages/components/ellipsis-center/koobiq-components-ellipsis-center.ts"],"sourcesContent":["import { SharedResizeObserver } from '@angular/cdk/observers/private';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n Directive,\n inject,\n Input,\n input,\n NgModule,\n numberAttribute,\n OnDestroy,\n OnInit,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqTooltipTrigger } from '@koobiq/components/tooltip';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\n/**\n * Component used to load the `.kbq-ellipsis-center` styles.\n */\n@Component({\n selector: 'ellipsis-center-style-loader',\n template: '',\n styleUrl: 'ellipsis-center.scss',\n encapsulation: ViewEncapsulation.None\n})\nclass EllipsisCenterStyleLoader {}\n\n/**\n * Renders text as two spans and moves the ellipsis into the middle, so the tail — a file extension, the\n * digits that tell two reports apart — stays readable when the host is too narrow for the whole string. A\n * tooltip spells out the full text, and is enabled only while something is actually hidden.\n */\n@Directive({\n selector: '[kbqEllipsisCenter]',\n host: {\n class: 'kbq-ellipsis-center'\n }\n})\nexport class KbqEllipsisCenterDirective extends KbqTooltipTrigger implements OnInit, AfterViewInit, OnDestroy {\n private cdr: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Application-wide `ResizeObserver` shared by every consumer, as `KbqTitleDirective` uses. Unlike the\n * `window:resize` listener this directive used to carry, it also reacts to container-only resizes — a\n * splitter drag, a sidebar collapse, or the vertical scrollbar that appears once a file list fills up —\n * none of which resize the window, all of which change where the text has to be split.\n */\n private readonly resizeObserver = inject(SharedResizeObserver);\n\n /** The two spans this directive renders have no styles of their own until this is loaded. */\n private readonly styleLoader = inject(_CdkPrivateStyleLoader);\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input() set kbqEllipsisCenter(value: string) {\n this._kbqEllipsisCenter = value;\n this.refresh();\n // check the view to properly calculate text-start and text-end on text initialized\n this.cdr.detectChanges();\n }\n\n /**\n * Shortest text worth splitting in the middle. Anything below it keeps its natural order and is cut off\n * at the end by the host's own `text-overflow`.\n *\n * Defaults to `0` — every overflowing text is split — because that is what the directive has always\n * done: the input was declared but never read, so any other default would silently end-truncate labels\n * that consumers expect to see split.\n */\n readonly minVisibleLength = input<number>(0);\n\n /**\n * Lower bound, in pixels, for the average glyph width used to decide how many characters fit in the\n * tail. The rendered text is measured as well and the wider of the two wins, so an underestimate here\n * can no longer push the extension out of the tail — raising it only shortens the tail further.\n */\n readonly charWidth = input(7);\n\n /**\n * Debounce time (ms) for resize events before recalculating ellipsis position.\n * @default 50\n */\n readonly debounceInterval = input<number, unknown>(50, { transform: numberAttribute });\n\n /**\n * @deprecated No longer read. Resizes now come from the shared `ResizeObserver`, which also catches the\n * container-only ones a `window:resize` listener cannot see; the host listener that used to feed this\n * subject is gone, and nothing subscribes to it. Kept as a no-op and removed in the next major version.\n * @docs-private */\n readonly resizeStream = new Subject<Event>();\n\n private _kbqEllipsisCenter: string;\n\n // Host width the last completed `refresh()` measured, so a resize that leaves it untouched (the host is\n // clamped to its container) does not schedule work that would produce the same split.\n private lastMeasuredWidth: number | undefined;\n\n private refreshTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n constructor() {\n super();\n\n this.styleLoader.load(EllipsisCenterStyleLoader);\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.content = this._kbqEllipsisCenter;\n this.refresh();\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n\n this.resizeObserver\n .observe(this.elementRef.nativeElement)\n .pipe(debounceTime(this.debounceInterval()), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.elementRef.nativeElement.clientWidth !== this.lastMeasuredWidth) {\n this.refresh();\n }\n });\n }\n\n ngOnDestroy() {\n clearTimeout(this.refreshTimeoutId);\n\n super.ngOnDestroy();\n }\n\n /**\n * Updates the displayed text with center ellipsis truncation based on container width.\n * Recreates start/end span elements, measures available space, and adjusts text accordingly.\n * @docs-private\n */\n refresh(): void {\n let start = '';\n let end = '';\n\n this.content = this._kbqEllipsisCenter;\n\n const [dataTextStart, dataTextEnd] = [\n 'kbq-ellipsis-center_data-text-start',\n 'kbq-ellipsis-center_data-text-end'\n ].map((querySelector) => {\n const element = this.elementRef.nativeElement.querySelector(`.${querySelector}`);\n\n if (element) {\n this.renderer.removeChild(this.elementRef.nativeElement, element);\n }\n\n const newElement = this.renderer.createElement('span');\n\n this.renderer.addClass(newElement, querySelector);\n\n return newElement;\n });\n\n this.renderer.appendChild(dataTextStart, this.renderer.createText(this._kbqEllipsisCenter));\n this.renderer.appendChild(dataTextEnd, this.renderer.createText(end));\n\n // A queued callback outlives both the spans it measures and the directive itself: it would measure\n // elements a newer `refresh()` has already detached (`scrollWidth === 0`, so the text reads as\n // fitting) and then call `hide()` on a torn-down trigger.\n clearTimeout(this.refreshTimeoutId);\n\n this.refreshTimeoutId = setTimeout(() => {\n const { clientWidth } = this.elementRef.nativeElement;\n // The full text is still in the start element at this point, so this is the width it needs.\n const textWidth = dataTextStart.scrollWidth;\n const truncated = clientWidth < textWidth;\n\n this.lastMeasuredWidth = clientWidth;\n\n if (truncated && this._kbqEllipsisCenter.length >= this.minVisibleLength()) {\n // What the text actually rendered at, not what `charWidth` assumes: with glyphs wider than\n // the Latin-sized default (Cyrillic, CJK, uppercase) the estimate hands the tail more\n // characters than the cell can hold, and the tail does not shrink — so `overflow: hidden`\n // would swallow the extension the split exists to keep.\n const averageCharWidth = Math.max(this.charWidth(), textWidth / this._kbqEllipsisCenter.length);\n const lastCharsLength = Math.round(clientWidth / 2 / averageCharWidth);\n\n // Both halves have to keep at least one character: an empty start element drops the ellipsis\n // (it is the only one carrying `text-overflow`), an empty end element drops the extension.\n const sliceIndex = Math.max(\n 1,\n Math.min(\n Math.round(this._kbqEllipsisCenter.length - lastCharsLength),\n this._kbqEllipsisCenter.length - 1\n )\n );\n\n start = this._kbqEllipsisCenter.slice(0, sliceIndex);\n end = this._kbqEllipsisCenter.slice(sliceIndex);\n } else {\n // Text that is not split goes into the start element, the only one carrying\n // `text-overflow: ellipsis` — the end element cannot shrink, so text parked there would\n // overflow the host instead of being cut off.\n start = this._kbqEllipsisCenter;\n end = '';\n }\n\n dataTextStart.innerText = start;\n dataTextEnd.innerText = end;\n\n this.disabled = !truncated;\n this.cdr.markForCheck();\n });\n\n this.renderer.appendChild(this.elementRef.nativeElement, dataTextStart);\n this.renderer.appendChild(this.elementRef.nativeElement, dataTextEnd);\n }\n}\n\n@NgModule({\n imports: [KbqEllipsisCenterDirective],\n exports: [KbqEllipsisCenterDirective]\n})\nexport class KbqEllipsisCenterModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAqBA;;AAEG;AACH,MAMM,yBAAyB,CAAA;kIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,wFAJjB,EAAE,EAAA,QAAA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