@tectra-ng/ui 0.4.3 → 0.4.5
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/amount/README.md +19 -1
- package/analog-clock/README.md +1 -1
- package/autocomplete/README.md +1 -1
- package/avatar/README.md +24 -4
- package/cascade-select/README.md +1 -1
- package/chips-input/README.md +10 -5
- package/color-picker/README.md +5 -0
- package/countdown/README.md +7 -1
- package/country/README.md +14 -1
- package/country-select/README.md +2 -1
- package/export/README.md +27 -2
- package/export-font/README.md +1 -1
- package/fesm2022/tectra-ng-ui-accordion.mjs +21 -21
- package/fesm2022/tectra-ng-ui-amount.mjs +99 -17
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +12 -25
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +8 -7
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-avatar.mjs +68 -26
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-badge.mjs +3 -3
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +9 -9
- package/fesm2022/tectra-ng-ui-button-group.mjs +3 -3
- package/fesm2022/tectra-ng-ui-button.mjs +11 -11
- package/fesm2022/tectra-ng-ui-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-card.mjs +5 -5
- package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-carousel.mjs +15 -15
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +10 -7
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-checkbox.mjs +9 -9
- package/fesm2022/tectra-ng-ui-chip.mjs +3 -3
- package/fesm2022/tectra-ng-ui-chips-input.mjs +120 -21
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +96 -9
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-swatches.mjs +3 -3
- package/fesm2022/tectra-ng-ui-confirm.mjs +9 -9
- package/fesm2022/tectra-ng-ui-countdown.mjs +48 -19
- package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country-select.mjs +31 -8
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country.mjs +18 -9
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-data-view.mjs +30 -30
- package/fesm2022/tectra-ng-ui-datepicker.mjs +53 -40
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-dialog.mjs +30 -30
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-divider.mjs +3 -3
- package/fesm2022/tectra-ng-ui-drawer.mjs +9 -9
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs +3 -3
- package/fesm2022/tectra-ng-ui-export.mjs +1264 -111
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +4 -3
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-fieldset.mjs +5 -5
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +12 -12
- package/fesm2022/tectra-ng-ui-galleria.mjs +21 -21
- package/fesm2022/tectra-ng-ui-highlight-text.mjs +3 -3
- package/fesm2022/tectra-ng-ui-icon-field.mjs +63 -35
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-image.mjs +9 -9
- package/fesm2022/tectra-ng-ui-input-group.mjs +6 -6
- package/fesm2022/tectra-ng-ui-input-mask.mjs +3 -3
- package/fesm2022/tectra-ng-ui-input-number.mjs +5 -5
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-otp.mjs +3 -3
- package/fesm2022/tectra-ng-ui-input.mjs +11 -10
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-key-filter.mjs +87 -22
- package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-knob.mjs +30 -8
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-label.mjs +77 -18
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-link.mjs +44 -20
- package/fesm2022/tectra-ng-ui-link.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-list-input.mjs +3 -3
- package/fesm2022/tectra-ng-ui-listbox.mjs +3 -3
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs +19 -8
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menu.mjs +15 -15
- package/fesm2022/tectra-ng-ui-menubar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-message.mjs +23 -19
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-month-calendar.mjs +32 -15
- package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-multiselect.mjs +6 -5
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs +3 -3
- package/fesm2022/tectra-ng-ui-paginator.mjs +9 -9
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +51 -20
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel.mjs +7 -5
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password-generator.mjs +24 -7
- package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password.mjs +14 -14
- package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-pill.mjs +39 -19
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-popover.mjs +15 -15
- package/fesm2022/tectra-ng-ui-progress-bar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs +3 -3
- package/fesm2022/tectra-ng-ui-radio-button.mjs +6 -6
- package/fesm2022/tectra-ng-ui-rating.mjs +11 -11
- package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +3 -3
- package/fesm2022/tectra-ng-ui-select-button.mjs +6 -6
- package/fesm2022/tectra-ng-ui-select.mjs +66 -43
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-skeleton.mjs +6 -6
- package/fesm2022/tectra-ng-ui-slider.mjs +3 -3
- package/fesm2022/tectra-ng-ui-sparkline.mjs +3 -3
- package/fesm2022/tectra-ng-ui-speed-dial.mjs +3 -3
- package/fesm2022/tectra-ng-ui-split-button.mjs +3 -3
- package/fesm2022/tectra-ng-ui-splitter.mjs +6 -6
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +99 -14
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-status-icon.mjs +43 -6
- package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stepper.mjs +41 -35
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +74 -60
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +18 -18
- package/fesm2022/tectra-ng-ui-tag.mjs +8 -8
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-textarea.mjs +9 -9
- package/fesm2022/tectra-ng-ui-timeline.mjs +15 -15
- package/fesm2022/tectra-ng-ui-toast.mjs +11 -11
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toggle-button.mjs +3 -3
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +6 -6
- package/fesm2022/tectra-ng-ui-toolbar.mjs +12 -12
- package/fesm2022/tectra-ng-ui-tooltip.mjs +9 -9
- package/fesm2022/tectra-ng-ui-tree-select.mjs +13 -11
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +7 -7
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree.mjs +30 -30
- package/fesm2022/tectra-ng-ui-truncate-text.mjs +36 -12
- package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +15 -15
- package/fesm2022/tectra-ng-ui.mjs +1 -1
- package/icon-field/README.md +2 -1
- package/input/README.md +1 -1
- package/key-filter/README.md +3 -2
- package/knob/README.md +3 -1
- package/label/README.md +4 -1
- package/link/README.md +4 -1
- package/message/README.md +2 -2
- package/month-calendar/README.md +2 -1
- package/multiselect/README.md +1 -1
- package/package.json +4 -4
- package/panel/README.md +3 -1
- package/panel-menu/README.md +3 -2
- package/password-generator/README.md +2 -0
- package/pill/README.md +4 -4
- package/select/README.md +1 -1
- package/stat-tiles/README.md +17 -1
- package/status-icon/README.md +3 -1
- package/table/README.md +1 -1
- package/tag/README.md +2 -0
- package/tree-select/README.md +1 -1
- package/truncate-text/README.md +2 -1
- package/types/tectra-ng-ui-amount.d.ts +41 -1
- package/types/tectra-ng-ui-amount.d.ts.map +1 -1
- package/types/tectra-ng-ui-analog-clock.d.ts +1 -4
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
- package/types/tectra-ng-ui-autocomplete.d.ts +1 -1
- package/types/tectra-ng-ui-avatar.d.ts +45 -12
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
- package/types/tectra-ng-ui-cascade-select.d.ts +3 -2
- package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-chips-input.d.ts +54 -6
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-color-picker.d.ts +38 -1
- package/types/tectra-ng-ui-color-picker.d.ts.map +1 -1
- package/types/tectra-ng-ui-countdown.d.ts +12 -1
- package/types/tectra-ng-ui-countdown.d.ts.map +1 -1
- package/types/tectra-ng-ui-country-select.d.ts +17 -4
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-country.d.ts +7 -1
- package/types/tectra-ng-ui-country.d.ts.map +1 -1
- package/types/tectra-ng-ui-datepicker.d.ts +4 -2
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
- package/types/tectra-ng-ui-export.d.ts +68 -8
- package/types/tectra-ng-ui-export.d.ts.map +1 -1
- package/types/tectra-ng-ui-icon-field.d.ts +9 -2
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
- package/types/tectra-ng-ui-input.d.ts +1 -1
- package/types/tectra-ng-ui-key-filter.d.ts +19 -4
- package/types/tectra-ng-ui-key-filter.d.ts.map +1 -1
- package/types/tectra-ng-ui-knob.d.ts +10 -2
- package/types/tectra-ng-ui-knob.d.ts.map +1 -1
- package/types/tectra-ng-ui-label.d.ts +8 -1
- package/types/tectra-ng-ui-label.d.ts.map +1 -1
- package/types/tectra-ng-ui-link.d.ts +8 -2
- package/types/tectra-ng-ui-link.d.ts.map +1 -1
- package/types/tectra-ng-ui-mention-textarea.d.ts +5 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +1 -1
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- package/types/tectra-ng-ui-month-calendar.d.ts +14 -4
- package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -1
- package/types/tectra-ng-ui-multiselect.d.ts +1 -1
- package/types/tectra-ng-ui-panel-menu.d.ts +34 -6
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel.d.ts +1 -1
- package/types/tectra-ng-ui-panel.d.ts.map +1 -1
- package/types/tectra-ng-ui-password-generator.d.ts +10 -3
- package/types/tectra-ng-ui-password-generator.d.ts.map +1 -1
- package/types/tectra-ng-ui-pill.d.ts +9 -5
- package/types/tectra-ng-ui-pill.d.ts.map +1 -1
- package/types/tectra-ng-ui-select.d.ts +5 -2
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-stat-tiles.d.ts +49 -5
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
- package/types/tectra-ng-ui-status-icon.d.ts +20 -2
- package/types/tectra-ng-ui-status-icon.d.ts.map +1 -1
- package/types/tectra-ng-ui-stepper.d.ts +1 -0
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +2 -1
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +3 -3
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-truncate-text.d.ts +7 -2
- package/types/tectra-ng-ui-truncate-text.d.ts.map +1 -1
- package/types/tectra-ng-ui.d.ts +1 -1
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, numberAttribute, output, signal } from "@angular/core";
|
|
4
4
|
import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
5
|
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
6
|
-
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
6
|
+
import { optionalBoolean, writeToClipboard } from "@tectra-ng/core/utils";
|
|
7
7
|
import { TxIcon, provideTxIconDefaults, txIconCheck, txIconClone, txIconCopy, txIconLink, txIconText } from "@tectra-ng/icons";
|
|
8
8
|
import { toStyleObject, truncateTextTokens } from "@tectra-ng/themes";
|
|
9
9
|
import { TxHighlightText } from "@tectra-ng/ui/highlight-text";
|
|
@@ -21,6 +21,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
21
21
|
truncateTextTheme = injectTokens(TRUNCATE_TEXT_THEME);
|
|
22
22
|
document = inject(DOCUMENT);
|
|
23
23
|
timer = null;
|
|
24
|
+
destroyed = false;
|
|
24
25
|
text = input("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
25
26
|
limit = input(15, {
|
|
26
27
|
...ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {},
|
|
@@ -47,35 +48,51 @@ var TxTruncateText = class TxTruncateText {
|
|
|
47
48
|
transform: optionalBoolean
|
|
48
49
|
});
|
|
49
50
|
copied = output();
|
|
51
|
+
copyFailed = output();
|
|
50
52
|
translations = injectTranslations();
|
|
51
53
|
isUnstyled = injectUnstyled(this.unstyled);
|
|
52
54
|
passThrough = injectPassThrough("truncateText", this, this.pt, this.ptOptions);
|
|
53
55
|
isCopied = signal(false, ...ngDevMode ? [{ debugName: "isCopied" }] : /* istanbul ignore next */ []);
|
|
56
|
+
isCopyFailed = signal(false, ...ngDevMode ? [{ debugName: "isCopyFailed" }] : /* istanbul ignore next */ []);
|
|
54
57
|
fullText = computed(() => String(this.text() ?? ""), ...ngDevMode ? [{ debugName: "fullText" }] : /* istanbul ignore next */ []);
|
|
55
58
|
isTruncated = computed(() => this.limit() >= 0 && Array.from(this.fullText()).length > this.limit(), ...ngDevMode ? [{ debugName: "isTruncated" }] : /* istanbul ignore next */ []);
|
|
56
59
|
displayText = computed(() => this.isTruncated() ? Array.from(this.fullText()).slice(0, this.limit()).join("") + this.ellipsis() : this.fullText(), ...ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []);
|
|
57
60
|
tooltip = computed(() => this.isTruncated() ? this.fullText() : null, ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
|
|
58
61
|
linkHref = computed(() => this.href() || (this.openLink() ? this.fullText() : null) || null, ...ngDevMode ? [{ debugName: "linkHref" }] : /* istanbul ignore next */ []);
|
|
59
62
|
relation = computed(() => this.target() === "_blank" ? "noopener noreferrer" : null, ...ngDevMode ? [{ debugName: "relation" }] : /* istanbul ignore next */ []);
|
|
60
|
-
copyLabel = computed(() =>
|
|
63
|
+
copyLabel = computed(() => {
|
|
64
|
+
const translations = this.translations();
|
|
65
|
+
if (this.isCopied()) return translations.copied;
|
|
66
|
+
return this.isCopyFailed() ? translations.copyToClipboardFailed : translations.copy;
|
|
67
|
+
}, ...ngDevMode ? [{ debugName: "copyLabel" }] : /* istanbul ignore next */ []);
|
|
61
68
|
hostStyle = computed(() => ({
|
|
62
69
|
...toStyleObject(this.dt(), "--tx-truncate-text"),
|
|
63
70
|
...this.passThrough().root?.style
|
|
64
71
|
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
65
72
|
constructor() {
|
|
66
|
-
inject(DestroyRef).onDestroy(() =>
|
|
73
|
+
inject(DestroyRef).onDestroy(() => {
|
|
74
|
+
this.destroyed = true;
|
|
75
|
+
if (this.timer) clearTimeout(this.timer);
|
|
76
|
+
});
|
|
67
77
|
}
|
|
68
|
-
copy() {
|
|
78
|
+
async copy() {
|
|
69
79
|
const text = this.fullText();
|
|
70
|
-
this.document
|
|
71
|
-
this.
|
|
72
|
-
this.isCopied.set(
|
|
80
|
+
const done = await writeToClipboard(text, this.document);
|
|
81
|
+
if (this.destroyed) return done;
|
|
82
|
+
this.isCopied.set(done);
|
|
83
|
+
this.isCopyFailed.set(!done);
|
|
84
|
+
if (done) this.copied.emit(text);
|
|
85
|
+
else this.copyFailed.emit(text);
|
|
73
86
|
if (this.timer) clearTimeout(this.timer);
|
|
74
|
-
this.timer = setTimeout(() =>
|
|
87
|
+
this.timer = setTimeout(() => {
|
|
88
|
+
this.isCopied.set(false);
|
|
89
|
+
this.isCopyFailed.set(false);
|
|
90
|
+
}, COPIED_FOR);
|
|
91
|
+
return done;
|
|
75
92
|
}
|
|
76
93
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
77
94
|
minVersion: "12.0.0",
|
|
78
|
-
version: "22.2.
|
|
95
|
+
version: "22.2.6",
|
|
79
96
|
ngImport: i0,
|
|
80
97
|
type: TxTruncateText,
|
|
81
98
|
deps: [],
|
|
@@ -83,7 +100,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
83
100
|
});
|
|
84
101
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
85
102
|
minVersion: "17.0.0",
|
|
86
|
-
version: "22.2.
|
|
103
|
+
version: "22.2.6",
|
|
87
104
|
type: TxTruncateText,
|
|
88
105
|
isStandalone: true,
|
|
89
106
|
selector: "tx-truncate-text",
|
|
@@ -180,7 +197,10 @@ var TxTruncateText = class TxTruncateText {
|
|
|
180
197
|
transformFunction: null
|
|
181
198
|
}
|
|
182
199
|
},
|
|
183
|
-
outputs: {
|
|
200
|
+
outputs: {
|
|
201
|
+
copied: "copied",
|
|
202
|
+
copyFailed: "copyFailed"
|
|
203
|
+
},
|
|
184
204
|
host: {
|
|
185
205
|
properties: {
|
|
186
206
|
"class": "passThrough().root?.class",
|
|
@@ -258,7 +278,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
258
278
|
};
|
|
259
279
|
i0.ɵɵngDeclareClassMetadata({
|
|
260
280
|
minVersion: "12.0.0",
|
|
261
|
-
version: "22.2.
|
|
281
|
+
version: "22.2.6",
|
|
262
282
|
ngImport: i0,
|
|
263
283
|
type: TxTruncateText,
|
|
264
284
|
decorators: [{
|
|
@@ -393,6 +413,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
393
413
|
copied: [{
|
|
394
414
|
type: i0.Output,
|
|
395
415
|
args: ["copied"]
|
|
416
|
+
}],
|
|
417
|
+
copyFailed: [{
|
|
418
|
+
type: i0.Output,
|
|
419
|
+
args: ["copyFailed"]
|
|
396
420
|
}]
|
|
397
421
|
}
|
|
398
422
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-ui-truncate-text.mjs","names":[],"sources":["../../../../packages/ui/truncate-text/src/truncate-text.icons.ts","../../../../packages/ui/truncate-text/src/truncate-text.theme.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.html"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconClone, txIconCopy, txIconLink, txIconText } from '@tectra-ng/icons';\n\nexport const TRUNCATE_TEXT_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n clone: txIconClone,\n copy: txIconCopy,\n link: txIconLink,\n text: txIconText,\n};\n","import { truncateTextTokens } from '@tectra-ng/themes';\n\nexport const TRUNCATE_TEXT_THEME = {\n truncateText: truncateTextTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, numberAttribute, output, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxPlacement } from '@tectra-ng/core/overlay';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTruncateTextTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxHighlightTerms, TxHighlightText } from '@tectra-ng/ui/highlight-text';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTruncateTextPart } from './truncate-text.types';\nimport { TRUNCATE_TEXT_ICON_DEFAULTS } from './truncate-text.icons';\nimport { TRUNCATE_TEXT_THEME } from './truncate-text.theme';\n\nconst COPIED_FOR = 1600;\n\n@Component({\n selector: 'tx-truncate-text',\n imports: [NgTemplateOutlet, TxHighlightText, TxIcon, TxTooltip],\n templateUrl: './truncate-text.component.html',\n styleUrl: './truncate-text.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-truncate-text',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-truncate-text--truncated]': 'isTruncated()',\n },\n viewProviders: [provideTxIconDefaults(TRUNCATE_TEXT_ICON_DEFAULTS)],\n})\nexport class TxTruncateText {\n private readonly truncateTextTheme = injectTokens(TRUNCATE_TEXT_THEME);\n\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly text = input<string | number | null | undefined>('');\n readonly limit = input<number, unknown>(15, { transform: numberAttribute });\n readonly ellipsis = input<string>('...');\n readonly href = input<string | null | undefined>(undefined);\n readonly openLink = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly target = input<string>('_blank');\n readonly highlight = input<TxHighlightTerms>('');\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly tooltipPlacement = input<TxPlacement>('top');\n readonly dt = input<TectraDeepPartial<TectraTruncateTextTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTruncateTextPart, TxTruncateText> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly copied = output<string>();\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('truncateText', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n\n readonly fullText = computed(() => String(this.text() ?? ''));\n readonly isTruncated = computed(() => this.limit() >= 0 && Array.from(this.fullText()).length > this.limit());\n readonly displayText = computed(() => (this.isTruncated() ? Array.from(this.fullText()).slice(0, this.limit()).join('') + this.ellipsis() : this.fullText()));\n readonly tooltip = computed(() => (this.isTruncated() ? this.fullText() : null));\n readonly linkHref = computed(() => this.href() || (this.openLink() ? this.fullText() : null) || null);\n readonly relation = computed(() => (this.target() === '_blank' ? 'noopener noreferrer' : null));\n readonly copyLabel = computed(() => (this.isCopied() ? this.translations().copied : this.translations().copy));\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-truncate-text'), ...this.passThrough().root?.style }));\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));\n }\n\n copy(): void {\n const text = this.fullText();\n this.document.defaultView?.navigator.clipboard?.writeText(text);\n this.copied.emit(text);\n this.isCopied.set(true);\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => this.isCopied.set(false), COPIED_FOR);\n }\n}\n","@if (copyable() && fullText()) {\n <button\n type=\"button\"\n class=\"tx-truncate-text__copy\"\n [class.tx-truncate-text__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"copyLabel()\"\n [txTooltip]=\"copyLabel()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n (click)=\"copy()\"\n >\n <span class=\"tx-copy-swap\" [class.tx-copy-swap--done]=\"isCopied()\"><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--idle\" name=\"clone\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n}\n<ng-template #content>\n @if (isTruncated()) {\n <span aria-hidden=\"true\"><tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" /></span>\n <span class=\"tx-truncate-text__full\">{{ fullText() }}</span>\n } @else {\n <tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" />\n }\n</ng-template>\n@if (linkHref(); as link) {\n <a\n class=\"tx-truncate-text__text tx-truncate-text__link\"\n [href]=\"link\"\n [attr.target]=\"target()\"\n [attr.rel]=\"relation()\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <span\n class=\"tx-truncate-text__text\"\n [attr.tabindex]=\"isTruncated() ? 0 : null\"\n [class]=\"passThrough().text?.class\"\n [style]=\"passThrough().text?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </span>\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,8BAAyC;CACpD,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;AACP;ACND,MAAa,sBAAsB,EACjC,cAAc,mBACf;ACUD,MAAM,aAAa;AAiBnB,IAAa,iBAAb,MAAa,eAAc;CACR,oBAAoB,aAAa,mBAAmB;CAE7D,WAAW,OAAO,QAAQ;CAC1B,QAA8C;CAE7C,OAAO,MAA0C,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACpD,QAAQ,MAAuB,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAC/D,WAAW,MAAc,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,OAAO,MAAiC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,WAAW,MAAwB,OAAK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AAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,uCAAuC;GACxC;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,u1EAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-truncate-text.mjs","names":[],"sources":["../../../../packages/ui/truncate-text/src/truncate-text.icons.ts","../../../../packages/ui/truncate-text/src/truncate-text.theme.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.html"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconClone, txIconCopy, txIconLink, txIconText } from '@tectra-ng/icons';\n\nexport const TRUNCATE_TEXT_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n clone: txIconClone,\n copy: txIconCopy,\n link: txIconLink,\n text: txIconText,\n};\n","import { truncateTextTokens } from '@tectra-ng/themes';\n\nexport const TRUNCATE_TEXT_THEME = {\n truncateText: truncateTextTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, numberAttribute, output, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxPlacement } from '@tectra-ng/core/overlay';\nimport { optionalBoolean, writeToClipboard } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTruncateTextTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxHighlightTerms, TxHighlightText } from '@tectra-ng/ui/highlight-text';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTruncateTextPart } from './truncate-text.types';\nimport { TRUNCATE_TEXT_ICON_DEFAULTS } from './truncate-text.icons';\nimport { TRUNCATE_TEXT_THEME } from './truncate-text.theme';\n\nconst COPIED_FOR = 1600;\n\n@Component({\n selector: 'tx-truncate-text',\n imports: [NgTemplateOutlet, TxHighlightText, TxIcon, TxTooltip],\n templateUrl: './truncate-text.component.html',\n styleUrl: './truncate-text.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-truncate-text',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-truncate-text--truncated]': 'isTruncated()',\n },\n viewProviders: [provideTxIconDefaults(TRUNCATE_TEXT_ICON_DEFAULTS)],\n})\nexport class TxTruncateText {\n private readonly truncateTextTheme = injectTokens(TRUNCATE_TEXT_THEME);\n\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n private destroyed = false;\n\n readonly text = input<string | number | null | undefined>('');\n readonly limit = input<number, unknown>(15, { transform: numberAttribute });\n readonly ellipsis = input<string>('...');\n readonly href = input<string | null | undefined>(undefined);\n readonly openLink = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly target = input<string>('_blank');\n readonly highlight = input<TxHighlightTerms>('');\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly tooltipPlacement = input<TxPlacement>('top');\n readonly dt = input<TectraDeepPartial<TectraTruncateTextTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTruncateTextPart, TxTruncateText> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly copied = output<string>();\n readonly copyFailed = output<string>();\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('truncateText', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n readonly isCopyFailed = signal(false);\n\n readonly fullText = computed(() => String(this.text() ?? ''));\n readonly isTruncated = computed(() => this.limit() >= 0 && Array.from(this.fullText()).length > this.limit());\n readonly displayText = computed(() => (this.isTruncated() ? Array.from(this.fullText()).slice(0, this.limit()).join('') + this.ellipsis() : this.fullText()));\n readonly tooltip = computed(() => (this.isTruncated() ? this.fullText() : null));\n readonly linkHref = computed(() => this.href() || (this.openLink() ? this.fullText() : null) || null);\n readonly relation = computed(() => (this.target() === '_blank' ? 'noopener noreferrer' : null));\n readonly copyLabel = computed(() => {\n const translations = this.translations();\n if (this.isCopied()) return translations.copied;\n return this.isCopyFailed() ? translations.copyToClipboardFailed : translations.copy;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-truncate-text'), ...this.passThrough().root?.style }));\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n if (this.timer) clearTimeout(this.timer);\n });\n }\n\n async copy(): Promise<boolean> {\n const text = this.fullText();\n const done = await writeToClipboard(text, this.document);\n if (this.destroyed) {\n return done;\n }\n this.isCopied.set(done);\n this.isCopyFailed.set(!done);\n if (done) {\n this.copied.emit(text);\n } else {\n this.copyFailed.emit(text);\n }\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => {\n this.isCopied.set(false);\n this.isCopyFailed.set(false);\n }, COPIED_FOR);\n return done;\n }\n}\n","@if (copyable() && fullText()) {\n <button\n type=\"button\"\n class=\"tx-truncate-text__copy\"\n [class.tx-truncate-text__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"copyLabel()\"\n [txTooltip]=\"copyLabel()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n (click)=\"copy()\"\n >\n <span class=\"tx-copy-swap\" [class.tx-copy-swap--done]=\"isCopied()\"><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--idle\" name=\"clone\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n}\n<ng-template #content>\n @if (isTruncated()) {\n <span aria-hidden=\"true\"><tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" /></span>\n <span class=\"tx-truncate-text__full\">{{ fullText() }}</span>\n } @else {\n <tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" />\n }\n</ng-template>\n@if (linkHref(); as link) {\n <a\n class=\"tx-truncate-text__text tx-truncate-text__link\"\n [href]=\"link\"\n [attr.target]=\"target()\"\n [attr.rel]=\"relation()\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <span\n class=\"tx-truncate-text__text\"\n [attr.tabindex]=\"isTruncated() ? 0 : null\"\n [class]=\"passThrough().text?.class\"\n [style]=\"passThrough().text?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </span>\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,8BAAyC;CACpD,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;AACP;ACND,MAAa,sBAAsB,EACjC,cAAc,mBACf;ACUD,MAAM,aAAa;AAiBnB,IAAa,iBAAb,MAAa,eAAc;CACR,oBAAoB,aAAa,mBAAmB;CAE7D,WAAW,OAAO,QAAQ;CAC1B,QAA8C;CAC9C,YAAY;CAEX,OAAO,MAA0C,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACpD,QAAQ,MAAuB,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAC/D,WAAW,MAAc,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CA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A;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,gBAAA,eAAA;IAAA,UAAA,CAAA,WAAA;GAAA;EAAA;EAAA,eAW/C,CAAC,sBAAsB,2BAA2B,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAExD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAf1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,SACnB;IAAC;IAAkB;IAAiB;IAAQ;GAAS;GAAC,iBAG9C,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,uCAAuC;GACxC;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,u1EAAA;EAAA,CAAA"}
|
|
@@ -14,7 +14,7 @@ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
|
|
|
14
14
|
}
|
|
15
15
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
16
16
|
minVersion: "12.0.0",
|
|
17
|
-
version: "22.2.
|
|
17
|
+
version: "22.2.6",
|
|
18
18
|
ngImport: i0,
|
|
19
19
|
type: TxVirtualScrollerItem,
|
|
20
20
|
deps: [],
|
|
@@ -22,7 +22,7 @@ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
|
|
|
22
22
|
});
|
|
23
23
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
24
24
|
minVersion: "17.1.0",
|
|
25
|
-
version: "22.2.
|
|
25
|
+
version: "22.2.6",
|
|
26
26
|
type: TxVirtualScrollerItem,
|
|
27
27
|
isStandalone: true,
|
|
28
28
|
selector: "ng-template[txVirtualScrollerItem]",
|
|
@@ -38,7 +38,7 @@ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
|
|
|
38
38
|
};
|
|
39
39
|
i0.ɵɵngDeclareClassMetadata({
|
|
40
40
|
minVersion: "12.0.0",
|
|
41
|
-
version: "22.2.
|
|
41
|
+
version: "22.2.6",
|
|
42
42
|
ngImport: i0,
|
|
43
43
|
type: TxVirtualScrollerItem,
|
|
44
44
|
decorators: [{
|
|
@@ -61,7 +61,7 @@ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
|
|
|
61
61
|
}
|
|
62
62
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
63
63
|
minVersion: "12.0.0",
|
|
64
|
-
version: "22.2.
|
|
64
|
+
version: "22.2.6",
|
|
65
65
|
ngImport: i0,
|
|
66
66
|
type: TxVirtualScrollerLoader,
|
|
67
67
|
deps: [],
|
|
@@ -69,7 +69,7 @@ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
|
|
|
69
69
|
});
|
|
70
70
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
71
71
|
minVersion: "14.0.0",
|
|
72
|
-
version: "22.2.
|
|
72
|
+
version: "22.2.6",
|
|
73
73
|
type: TxVirtualScrollerLoader,
|
|
74
74
|
isStandalone: true,
|
|
75
75
|
selector: "ng-template[txVirtualScrollerLoader]",
|
|
@@ -78,7 +78,7 @@ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
|
|
|
78
78
|
};
|
|
79
79
|
i0.ɵɵngDeclareClassMetadata({
|
|
80
80
|
minVersion: "12.0.0",
|
|
81
|
-
version: "22.2.
|
|
81
|
+
version: "22.2.6",
|
|
82
82
|
ngImport: i0,
|
|
83
83
|
type: TxVirtualScrollerLoader,
|
|
84
84
|
decorators: [{
|
|
@@ -90,7 +90,7 @@ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
|
|
|
90
90
|
templateRef = inject(TemplateRef);
|
|
91
91
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
92
92
|
minVersion: "12.0.0",
|
|
93
|
-
version: "22.2.
|
|
93
|
+
version: "22.2.6",
|
|
94
94
|
ngImport: i0,
|
|
95
95
|
type: TxVirtualScrollerLoadingIcon,
|
|
96
96
|
deps: [],
|
|
@@ -98,7 +98,7 @@ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
|
|
|
98
98
|
});
|
|
99
99
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
100
100
|
minVersion: "14.0.0",
|
|
101
|
-
version: "22.2.
|
|
101
|
+
version: "22.2.6",
|
|
102
102
|
type: TxVirtualScrollerLoadingIcon,
|
|
103
103
|
isStandalone: true,
|
|
104
104
|
selector: "ng-template[txVirtualScrollerLoadingIcon]",
|
|
@@ -107,7 +107,7 @@ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
|
|
|
107
107
|
};
|
|
108
108
|
i0.ɵɵngDeclareClassMetadata({
|
|
109
109
|
minVersion: "12.0.0",
|
|
110
|
-
version: "22.2.
|
|
110
|
+
version: "22.2.6",
|
|
111
111
|
ngImport: i0,
|
|
112
112
|
type: TxVirtualScrollerLoadingIcon,
|
|
113
113
|
decorators: [{
|
|
@@ -123,7 +123,7 @@ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
|
|
|
123
123
|
}
|
|
124
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
125
|
minVersion: "12.0.0",
|
|
126
|
-
version: "22.2.
|
|
126
|
+
version: "22.2.6",
|
|
127
127
|
ngImport: i0,
|
|
128
128
|
type: TxVirtualScrollerContent,
|
|
129
129
|
deps: [],
|
|
@@ -131,7 +131,7 @@ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
|
|
|
131
131
|
});
|
|
132
132
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
133
133
|
minVersion: "17.1.0",
|
|
134
|
-
version: "22.2.
|
|
134
|
+
version: "22.2.6",
|
|
135
135
|
type: TxVirtualScrollerContent,
|
|
136
136
|
isStandalone: true,
|
|
137
137
|
selector: "ng-template[txVirtualScrollerContent]",
|
|
@@ -147,7 +147,7 @@ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
|
|
|
147
147
|
};
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({
|
|
149
149
|
minVersion: "12.0.0",
|
|
150
|
-
version: "22.2.
|
|
150
|
+
version: "22.2.6",
|
|
151
151
|
ngImport: i0,
|
|
152
152
|
type: TxVirtualScrollerContent,
|
|
153
153
|
decorators: [{
|
|
@@ -473,7 +473,7 @@ var TxVirtualScroller = class TxVirtualScroller {
|
|
|
473
473
|
}
|
|
474
474
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
475
475
|
minVersion: "12.0.0",
|
|
476
|
-
version: "22.2.
|
|
476
|
+
version: "22.2.6",
|
|
477
477
|
ngImport: i0,
|
|
478
478
|
type: TxVirtualScroller,
|
|
479
479
|
deps: [],
|
|
@@ -481,7 +481,7 @@ var TxVirtualScroller = class TxVirtualScroller {
|
|
|
481
481
|
});
|
|
482
482
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
483
483
|
minVersion: "17.0.0",
|
|
484
|
-
version: "22.2.
|
|
484
|
+
version: "22.2.6",
|
|
485
485
|
type: TxVirtualScroller,
|
|
486
486
|
isStandalone: true,
|
|
487
487
|
selector: "tx-virtual-scroller",
|
|
@@ -724,7 +724,7 @@ var TxVirtualScroller = class TxVirtualScroller {
|
|
|
724
724
|
};
|
|
725
725
|
i0.ɵɵngDeclareClassMetadata({
|
|
726
726
|
minVersion: "12.0.0",
|
|
727
|
-
version: "22.2.
|
|
727
|
+
version: "22.2.6",
|
|
728
728
|
ngImport: i0,
|
|
729
729
|
type: TxVirtualScroller,
|
|
730
730
|
decorators: [{
|
package/icon-field/README.md
CHANGED
|
@@ -21,7 +21,8 @@ Icons, text, a clear button or a copy button inside a field. Items before the in
|
|
|
21
21
|
| Name | Description |
|
|
22
22
|
|---|---|
|
|
23
23
|
| cleared | `tx-input-clear`: the field was cleared |
|
|
24
|
-
| copied | `tx-input-copy`: the value that was copied |
|
|
24
|
+
| copied | `tx-input-copy`: the value that was copied. Copying uses the Clipboard API and falls back to a selection outside a secure context |
|
|
25
|
+
| copyFailed | `tx-input-copy`: the browser refused to copy; gives the value. The button says "Could not copy" for a moment instead of the check mark — show your own message from here |
|
|
25
26
|
|
|
26
27
|
## Keyboard
|
|
27
28
|
| Key | Action |
|
package/input/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Input
|
|
2
2
|
|
|
3
|
-
Styles a native `input` or `textarea` with the shared `formField` tokens (also used by select, password, number…). Native `readonly` and `disabled` are styled too. Works with `[formControl]`, `ngModel` and signal forms as is — it is the native element.
|
|
3
|
+
Styles a native `input` or `textarea` with the shared `formField` tokens (also used by select, password, number…). Native `readonly` and `disabled` are styled too; a `readonly` input with a `data-picker` attribute (no typing, a picker opens on click, like `tx-datepicker readonlyInput`) keeps the normal field look. Works with `[formControl]`, `ngModel` and signal forms as is — it is the native element.
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
| Name | Description |
|
package/key-filter/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# KeyFilter
|
|
2
2
|
|
|
3
|
-
Lets only allowed characters into an `input` or `textarea`: blocks typing, cleans pasted and dropped text. With `validateOnly` it does not block anything and reports a `keyFilter` error to the form instead.
|
|
3
|
+
Lets only allowed characters into an `input` or `textarea`: blocks typing, cleans pasted and dropped text. With `validateOnly` it does not block anything and reports a `keyFilter` error to the form instead. Text that arrives without a beforeinput event the browser lets it cancel — an Android keyboard, an IME composition, autocorrect, autofill — is cleaned right after it lands (at the end of a composition), and the caret stays in place.
|
|
4
4
|
|
|
5
5
|
| Preset | Allows |
|
|
6
6
|
|---|---|
|
|
@@ -20,7 +20,7 @@ Lets only allowed characters into an `input` or `textarea`: blocks typing, clean
|
|
|
20
20
|
## Inputs
|
|
21
21
|
| Name | Description |
|
|
22
22
|
|---|---|
|
|
23
|
-
| txKeyFilter | A preset name or a `RegExp` that one character must match |
|
|
23
|
+
| txKeyFilter | A preset name or a `RegExp` that one character must match; `null`, `undefined`, `false` or `''` switch the filter off (no blocking, cleaning or validation) |
|
|
24
24
|
| keyFilterExtra | Extra characters allowed on top of the preset, e.g. `'-_ '` |
|
|
25
25
|
| validateOnly | Do not block input; add a `keyFilter` error to the form control when the value has other characters |
|
|
26
26
|
|
|
@@ -29,3 +29,4 @@ Lets only allowed characters into an `input` or `textarea`: blocks typing, clean
|
|
|
29
29
|
|---|---|
|
|
30
30
|
| Typing | Characters outside the filter are ignored |
|
|
31
31
|
| Paste / drop | The text is inserted without the characters outside the filter |
|
|
32
|
+
| Composition / autocorrect / autofill | Characters outside the filter are removed when the text lands; a change that breaks the whole value (e.g. a second separator for `positive`) is undone |
|
package/knob/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Knob
|
|
2
2
|
|
|
3
|
-
A value on a dial: drag along the ring or use the keyboard. `arc="dial"` leaves a gap at the bottom (270°), `arc="ring"` is a full circle with a handle. `limit` caps the value below `max` and shows the unreachable part of the ring.
|
|
3
|
+
A value on a dial: drag along the ring or use the keyboard. `arc="dial"` leaves a gap at the bottom (270°), `arc="ring"` is a full circle with a handle. `limit` caps the value below `max` and shows the unreachable part of the ring. A `ControlValueAccessor` — works with `[formControl]`, `ngModel`, signal forms and `[(value)]`.
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
6
|
<tx-knob formControlName="volume" [step]="5" valueTemplate="{value}%" ariaLabel="Volume" />
|
|
@@ -10,6 +10,7 @@ A value on a dial: drag along the ring or use the keyboard. `arc="dial"` leaves
|
|
|
10
10
|
## Inputs
|
|
11
11
|
| Name | Description |
|
|
12
12
|
|---|---|
|
|
13
|
+
| value | Two-way: the value (`null` shows `min`); use it or a form control |
|
|
13
14
|
| min | Smallest value |
|
|
14
15
|
| max | Largest value of the scale |
|
|
15
16
|
| step | Step of dragging and the arrow keys |
|
|
@@ -35,6 +36,7 @@ A value on a dial: drag along the ring or use the keyboard. `arc="dial"` leaves
|
|
|
35
36
|
| Name | Description |
|
|
36
37
|
|---|---|
|
|
37
38
|
| changed | `{ value, originalEvent }` while dragging or after a key |
|
|
39
|
+
| valueChange | The value changed (also from the form control) |
|
|
38
40
|
|
|
39
41
|
## Slots
|
|
40
42
|
| Name | Description |
|
package/label/README.md
CHANGED
|
@@ -12,6 +12,8 @@ Names a field. Three forms: `<tx-label>` above the field, `<tx-float-label>` ins
|
|
|
12
12
|
</tx-float-label>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
The text row of `tx-label` is an inline flex row with its own line height. Both are tokens: `label.root.textDisplay` (`inline-flex`) and `label.root.lineHeight` / `label.subtle.lineHeight` (`1.3`). Set `textDisplay` to `flex` when the row must be exactly as tall as its text, without the line box of the surrounding text.
|
|
16
|
+
|
|
15
17
|
## Inputs
|
|
16
18
|
| Name | Description |
|
|
17
19
|
|---|---|
|
|
@@ -19,7 +21,8 @@ Names a field. Three forms: `<tx-label>` above the field, `<tx-float-label>` ins
|
|
|
19
21
|
| required | `tx-label`: shows a required mark (also put `required` on the field) |
|
|
20
22
|
| colon | `tx-label`: adds `:` after the text |
|
|
21
23
|
| subtle | `tx-label`: smaller, muted — for filters and dense forms |
|
|
22
|
-
|
|
|
24
|
+
| filled | `tx-label`: shows a check mark after the text — bind it to whether the field has a value |
|
|
25
|
+
| tooltip | `tx-label`: help icon after the text; the hint opens in a `txTooltip` on hover and focus |
|
|
23
26
|
| variant | `tx-float-label`: `over` (moves above the field), `in` (moves to the top inside), `on` (sits on the border) |
|
|
24
27
|
|
|
25
28
|
## Keyboard
|
package/link/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
`<tx-link>` shows a URL, an email or a phone number as a link: it builds the `href`, shortens long text, marks search matches and can add a copy button. Web links open in a new tab with `rel="noopener noreferrer"`, an arrow icon and a hidden "opens in a new tab" for screen readers. `<tx-icon-link>` is an icon with text for menus and footers — a router link with the active state, an external link, or a button.
|
|
4
4
|
|
|
5
|
+
The styles of both weigh as much as one class, so your own rule for a part (`.menu .item`, a `pt` class under a parent) wins without `!important`.
|
|
6
|
+
|
|
5
7
|
```html
|
|
6
8
|
<tx-link link="docs.example.com" [copyable]="true" />
|
|
7
9
|
<tx-link link="ann@example.com" type="email" />
|
|
@@ -32,7 +34,8 @@
|
|
|
32
34
|
## Outputs
|
|
33
35
|
| Name | Description |
|
|
34
36
|
|---|---|
|
|
35
|
-
| copied | `tx-link`: the link was copied; gives the copied text |
|
|
37
|
+
| copied | `tx-link`: the link was copied; gives the copied text. Copying uses the Clipboard API and falls back to a selection outside a secure context |
|
|
38
|
+
| copyFailed | `tx-link`: the browser refused to copy; gives the text. The button says "Could not copy" for a moment instead of the check mark — show your own message from here |
|
|
36
39
|
|
|
37
40
|
## Slots
|
|
38
41
|
| Name | Description |
|
package/message/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Inline feedback. `<tx-message>` is a box with a severity, an optional icon and a
|
|
|
10
10
|
<tx-field-error for="email" [control]="email" />
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Error texts: `messages` on the field, then `provideTectra({ validationMessages })`, then `error.message` of a custom validator, then the built-in text of the locale (`required`, `email`, `minlength`, `maxlength`, `min`, `max`, `pattern`, and the keys of `TxValidators` from `@tectra-ng/utils/validators
|
|
13
|
+
Error texts: `messages` on the field, then `provideTectra({ validationMessages })`, then `error.message` of a custom validator, then the built-in text of the locale (`required`, `email`, `minlength`, `maxlength`, `min`, `max`, `pattern`, and the keys of `TxValidators` from `@tectra-ng/utils/validators`). A key without any of these takes the `'*'` entry — of `messages`, then of `validationMessages` — and "Invalid value" when there is none. `{param}` is replaced with the fields of the error object, e.g. `{requiredLength}`, `{min}`.
|
|
14
14
|
|
|
15
15
|
## Inputs
|
|
16
16
|
| Name | Description |
|
|
@@ -27,7 +27,7 @@ Error texts: `messages` on the field, then `provideTectra({ validationMessages }
|
|
|
27
27
|
| errorText | `tx-field-error`: an error from outside the form (e.g. the server) — shown as is, before the control's errors |
|
|
28
28
|
| showImmediately | `tx-field-error`: shows the error, and the success text, before the control is touched or changed |
|
|
29
29
|
| successText | `tx-field-error`: text shown when the control has a valid value and was touched or changed (at once with `showImmediately`) |
|
|
30
|
-
| messages | `tx-field-error`: own texts per error key — a string with `{param}` or a function of the error |
|
|
30
|
+
| messages | `tx-field-error`: own texts per error key — a string with `{param}` or a function of the error; `'*'` is the text for keys that have no text of their own |
|
|
31
31
|
| for | `tx-field-hint`, `tx-field-error`: id of the field; adds this text to its `aria-describedby` |
|
|
32
32
|
| id | `tx-field-hint`, `tx-field-error`: own id instead of a generated one |
|
|
33
33
|
| dt | Design tokens of this instance (`message` or `fieldMessage`) |
|
package/month-calendar/README.md
CHANGED
|
@@ -15,9 +15,10 @@ A month grid that draws events as continuous bars across days, with day markers,
|
|
|
15
15
|
| selectedDate | Highlighted day: a `Date` or `'yyyy-MM-dd'`; it gets the keyboard focus |
|
|
16
16
|
| weekStartsOn | First day of the week: 0 Sunday … 6 Saturday; locale default |
|
|
17
17
|
| maxLanes | Bar rows per week; the rest goes to the `+N` link of the day |
|
|
18
|
-
| labels | Own texts `{ more, today, region }`: `more` with a `{count}` placeholder, `today` added to the name of today, `region` the name of the grid;
|
|
18
|
+
| labels | Own texts `{ more, today, region }`: `more` with a `{count}` placeholder, `today` added to the name of today, `region` the name of the grid; a missing, empty or `null` text stays translated |
|
|
19
19
|
| locale | BCP 47 locale for weekday names and day names; the kit locale by default |
|
|
20
20
|
| today | The day treated as today (the day of creation by default); pass it from a clock if the page stays open over midnight |
|
|
21
|
+
| eventTemplate | Content of a bar as a `TemplateRef` — for a component that wraps the calendar and gets the template from its own content; it wins over a `txMonthCalendarEvent` template inside the calendar |
|
|
21
22
|
| dt | Design tokens of this instance (`monthCalendar`) |
|
|
22
23
|
| pt | Classes and styles of the parts: `root`, `grid`, `head`, `weekday`, `week`, `cell`, `day`, `number`, `marker`, `event`, `more` |
|
|
23
24
|
| ptOptions | How `pt` merges with the global pass-through |
|
package/multiselect/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Multiselect
|
|
2
2
|
|
|
3
|
-
Pick several values from a list. The value is an array; works with `[formControl]`, `ngModel` and signal forms. Shares the option engine, keyboard and panel with `tx-select`: groups, search, virtual scroll, lazy loading and templates work the same.
|
|
3
|
+
Pick several values from a list. The value is an array; works with `[formControl]`, `ngModel` and signal forms. Shares the option engine, keyboard and panel with `tx-select`: groups, search, virtual scroll, lazy loading and templates work the same. The panel sizes itself like the one of `tx-select`.
|
|
4
4
|
|
|
5
5
|
Texts come from the tectra locale — `selectAll`, `selectedOfTotal`, `selectedItems`, `searchPlaceholder`, `emptyMessage`, `clear`. Override them for the whole app with `provideTectra({ translations: { selectAll: '…' } })`, switch languages at runtime with `TxLocaleService.setLocale(…)`, or set them on one field with `selectAllLabel`, `countLabel`, `selectedItemsLabel`, `filterPlaceholder`, `emptyMessage`.
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Angular UI components on signals: table, datepicker, select, multiselect, dialog, drawer, toast, tooltip, tree and 80+ more. Standalone, OnPush, zoneless, accessible and themable, one entry point per component.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@angular/forms": "^22.2.0",
|
|
61
61
|
"@angular/router": "^22.2.0",
|
|
62
62
|
"rxjs": "^7.8.0",
|
|
63
|
-
"@tectra-ng/core": "^0.4.
|
|
64
|
-
"@tectra-ng/icons": "^0.4.
|
|
65
|
-
"@tectra-ng/themes": "^0.4.
|
|
63
|
+
"@tectra-ng/core": "^0.4.5",
|
|
64
|
+
"@tectra-ng/icons": "^0.4.5",
|
|
65
|
+
"@tectra-ng/themes": "^0.4.5"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"@angular/router": {
|
package/panel/README.md
CHANGED
|
@@ -9,6 +9,8 @@ A titled section of a page: an icon, a title and a subtitle, actions in the head
|
|
|
9
9
|
</tx-panel>
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
Give the panel a height (`height: 100%` in a grid cell, a flex item that grows) and the body grows with it, so content with `height: 100%` fills the panel. A panel that is not `toggleable` does not clip its content: shadows and negative margins stay visible. A `toggleable` panel clips it so the collapse animation stays inside the box.
|
|
13
|
+
|
|
12
14
|
## Inputs
|
|
13
15
|
| Name | Description |
|
|
14
16
|
|---|---|
|
|
@@ -16,7 +18,7 @@ A titled section of a page: an icon, a title and a subtitle, actions in the head
|
|
|
16
18
|
| subtitle | Muted line under the title |
|
|
17
19
|
| icon | Icon in a tinted square before the title |
|
|
18
20
|
| variant | `card`, `inset` or `plain` |
|
|
19
|
-
| align | Vertical alignment of the title and the actions: `start`, `center`, `end` |
|
|
21
|
+
| align | Vertical alignment of the title and the actions: `start`, `center`, `end`; with `end` the actions also line up at their bottom edge, e.g. a button next to a labelled field |
|
|
20
22
|
| headingLevel | Heading level of the title, 2 by default |
|
|
21
23
|
| toggleable | Adds a button that collapses the content |
|
|
22
24
|
| collapsed | Two-way: the content is collapsed |
|
package/panel-menu/README.md
CHANGED
|
@@ -7,7 +7,7 @@ A vertical menu of collapsible sections for app navigation. Two looks: `panel` (
|
|
|
7
7
|
<tx-panel-menu variant="sidebar" ariaLabel="Main" [model]="navigation" [(expandedKeys)]="open" />
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Items are `TxPanelMenuItem` — the kit menu item (`label`, `icon`, `routerLink`, `queryParams`, `fragment`, `url`, `target`, `command`, `disabled`, `visible`, `separator`, `badge`, `title`, `items`, `id`) plus `expanded` (open at the start), `active` (marks the current item yourself — for items that run a `command`; without it the current item comes from the route)
|
|
10
|
+
Items are `TxPanelMenuItem` — the kit menu item (`label`, `icon`, `routerLink`, `queryParams`, `fragment`, `url`, `target`, `command`, `disabled`, `visible`, `separator`, `badge`, `title`, `items`, `id`) plus `expanded` (open at the start), `active` (marks the current item yourself — for items that run a `command`; without it the current item comes from the route), `routerLinkActiveOptions` (`{ exact: true }` or router match options; a subset match by default) and `routerLinkActiveExclude` (router links whose pages do not make the item active — `['/projects/owners']` on a `/projects` item next to an own "Owners" item). `badge` also takes a signal, so a counter updates in place. Only links are highlighted: an item with nested items does not navigate, so on the page of its own `routerLink` it just opens; in `sidebar` a section with an empty `label` gets no title.
|
|
11
11
|
|
|
12
12
|
## Inputs
|
|
13
13
|
| Name | Description |
|
|
@@ -19,6 +19,7 @@ Items are `TxPanelMenuItem` — the kit menu item (`label`, `icon`, `routerLink`
|
|
|
19
19
|
| expandedKeys | Two-way: the open items, `{ [key]: boolean }`; a key is the item `id` or its index path (`0-1-2`) |
|
|
20
20
|
| badgeMax | `sidebar`: numbers above it show as `99+` (zero and less are hidden) |
|
|
21
21
|
| ariaLabel | Makes the menu a `navigation` landmark with this name |
|
|
22
|
+
| translate | Translate function: item labels, section titles and item titles are keys passed through it; a function that reads signals updates the menu when they change |
|
|
22
23
|
| dt | Design tokens of this instance (`panelMenu`) |
|
|
23
24
|
| pt | Classes and styles of the parts: `root`, `panel`, `header`, `section`, `tree`, `item`, `icon`, `label`, `badge`, `lock`, `submenuIcon`, `separator` |
|
|
24
25
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
@@ -33,7 +34,7 @@ Items are `TxPanelMenuItem` — the kit menu item (`label`, `icon`, `routerLink`
|
|
|
33
34
|
## Slots
|
|
34
35
|
| Name | Description |
|
|
35
36
|
|---|---|
|
|
36
|
-
| txPanelMenuItem | `<ng-template txPanelMenuItem let-item let-level="level" let-active="active" let-expanded="expanded" let-hasSubmenu="hasSubmenu">` — content of every header and item |
|
|
37
|
+
| txPanelMenuItem | `<ng-template txPanelMenuItem let-item let-level="level" let-active="active" let-expanded="expanded" let-hasSubmenu="hasSubmenu" let-label="label">` — content of every header and item; `label` is the translated label |
|
|
37
38
|
|
|
38
39
|
## Keyboard
|
|
39
40
|
| Key | Action |
|
|
@@ -11,6 +11,8 @@ Strong random passwords from `crypto.getRandomValues` (no bias, at least one cha
|
|
|
11
11
|
const password = inject(TxPasswordGenerator).generate({ length: 24, symbols: false });
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
`txPasswordGenerate` works on any `button`, also a `txButton`. An icon-only button without its own `aria-label`, `aria-labelledby` or `title` gets the translated "Generate password" (locale key `generatePassword`) as its accessible name; use the same key for a tooltip: `[txTooltip]="translations().generatePassword"` with `translations = injectTranslations()`.
|
|
15
|
+
|
|
14
16
|
## Inputs
|
|
15
17
|
| Name | Description |
|
|
16
18
|
|---|---|
|
package/pill/README.md
CHANGED
|
@@ -15,12 +15,12 @@ A small rounded label for a status, a category or a count — in tables, lists a
|
|
|
15
15
|
| tone | `neutral`, `primary`, `success`, `info`, `warn`, `danger`, `help`, `contrast`; `secondary` is the same as `neutral`, so tag and badge severities (and `txHttpStatusTone`) fit |
|
|
16
16
|
| variant | `soft` (tinted, default), `solid` or `outline` |
|
|
17
17
|
| size | `small`, `medium` (`normal` is the same), `large` |
|
|
18
|
-
| icon | Icon before the text: tectra name, `pi-` name or icon class |
|
|
18
|
+
| icon | Icon before the text: tectra name, `pi-` name or icon class. Words after a tectra name are classes of the icon; `spin` (or `pi-spin`) turns it: `icon="spinner spin"` |
|
|
19
19
|
| dot | A status dot instead of the icon |
|
|
20
20
|
| removable | Adds a remove button |
|
|
21
|
-
| removeLabel | Label of the remove button (translated "Remove"
|
|
21
|
+
| removeLabel | Label of the remove button (translated "Remove" when not set or empty) |
|
|
22
22
|
| dt | Design tokens of this instance (`pill`) |
|
|
23
|
-
| pt | Classes and styles of the parts: `root`, `icon`, `label`, `remove` |
|
|
23
|
+
| pt | Classes and styles of the parts: `root`, `icon`, `leading`, `label`, `remove` |
|
|
24
24
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
25
25
|
| unstyled | Removes the tectra styles |
|
|
26
26
|
|
|
@@ -33,7 +33,7 @@ A small rounded label for a status, a category or a count — in tables, lists a
|
|
|
33
33
|
| Name | Description |
|
|
34
34
|
|---|---|
|
|
35
35
|
| default | The text |
|
|
36
|
-
| txPillLeading | An element before the text, e.g. a flag or a tiny avatar: `<img txPillLeading
|
|
36
|
+
| txPillLeading | An element before the text, e.g. a flag or a tiny avatar: `<img txPillLeading …>`. A component that wraps the pill can pass its own content on with `<ng-container ngProjectAs="[txPillLeading]">` — the slot styles whatever lands in it |
|
|
37
37
|
|
|
38
38
|
## Keyboard
|
|
39
39
|
| Key | Action |
|
package/select/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Select
|
|
2
2
|
|
|
3
|
-
Pick one value from a list. A `ControlValueAccessor`: works with `[formControl]`, `ngModel` and signal forms. The panel is a CDK overlay, so it is never cut by `overflow: hidden` and flips up at the bottom of the screen. Long lists scroll virtually and can load page by page from a server.
|
|
3
|
+
Pick one value from a list. A `ControlValueAccessor`: works with `[formControl]`, `ngModel` and signal forms. The panel is a CDK overlay, so it is never cut by `overflow: hidden` and flips up at the bottom of the screen. Long lists scroll virtually and can load page by page from a server. The panel is at least as wide as the field and grows with its options up to `--tx-form-field-panel-max-width` (300px; one field changes it with `[dt]="{ overlay: { maxWidth: '520px' } }"`), never past the screen; it keeps the width it opened with while you search, scroll or load more, and lines up with the end of the field when there is no room on the right.
|
|
4
4
|
|
|
5
5
|
The option engine (`buildOptionRows`, `readOptionField`, `foldText`) is exported for other list controls.
|
|
6
6
|
|
package/stat-tiles/README.md
CHANGED
|
@@ -13,7 +13,8 @@ A responsive grid of key numbers — totals, rates, counts — each tile with a
|
|
|
13
13
|
| Name | Description |
|
|
14
14
|
|---|---|
|
|
15
15
|
| minWidth | `tx-stat-tiles` — narrowest column before the grid wraps; without it columns stay at least the `floorWidth` token (210px) unless `compact`, an explicit value wins over that floor |
|
|
16
|
-
|
|
|
16
|
+
| floorWidth | `tx-stat-tiles` — lowest column width that `minWidth` cannot go below, e.g. `15rem` to keep long labels readable while `minWidth` sets the wrap point; not used when `compact` |
|
|
17
|
+
| compact | `tx-stat-tiles`: tighter gap, padding, icon and value; columns down to `minWidth` |
|
|
17
18
|
| ariaLabel | `tx-stat-tiles` — accessible name of the list |
|
|
18
19
|
| ariaLabelledBy | `tx-stat-tiles` — id of the element that names the list |
|
|
19
20
|
| label | `tx-stat-tile` — what the number is; one line, cut with an ellipsis and shown in full as a title, so values of a row stay on one line next to an aside |
|
|
@@ -27,6 +28,7 @@ A responsive grid of key numbers — totals, rates, counts — each tile with a
|
|
|
27
28
|
| fitValue | `tx-stat-tile` — the value shrinks with the tile width instead of wrapping |
|
|
28
29
|
| accentValue | `tx-stat-tile` — the value in the tone colour |
|
|
29
30
|
| highlighted | `tx-stat-tile` — tinted background and ring in the tone |
|
|
31
|
+
| compact | `tx-stat-tile`: the compact look of this tile; without it the tile follows its grid |
|
|
30
32
|
| link | `tx-stat-tile` — router link of the whole tile |
|
|
31
33
|
| queryParams | `tx-stat-tile` — query params of the router link |
|
|
32
34
|
| href | `tx-stat-tile` — plain URL of the whole tile |
|
|
@@ -36,6 +38,20 @@ A responsive grid of key numbers — totals, rates, counts — each tile with a
|
|
|
36
38
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
37
39
|
| unstyled | Removes the tectra styles |
|
|
38
40
|
|
|
41
|
+
## Grid in a wrapper component
|
|
42
|
+
|
|
43
|
+
A tile reads `compact` from its grid through the `TX_STAT_TILES` token. Tiles projected into a component that wraps `tx-stat-tiles` cannot see the grid, because Angular resolves them where they are written. Add `provideTxStatTilesRelay()` to the wrapper's `providers` — the grid inside it then reaches the projected tiles — or set `compact` on each tile.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
@Component({
|
|
47
|
+
selector: 'kpi-row',
|
|
48
|
+
imports: [TxStatTiles],
|
|
49
|
+
providers: [provideTxStatTilesRelay()],
|
|
50
|
+
template: `<tx-stat-tiles compact ariaLabel="Key numbers"><ng-content /></tx-stat-tiles>`,
|
|
51
|
+
})
|
|
52
|
+
export class KpiRow {}
|
|
53
|
+
```
|
|
54
|
+
|
|
39
55
|
## Slots
|
|
40
56
|
| Name | Description |
|
|
41
57
|
|---|---|
|