@rt-tools/ui-kit-v2 0.39.0 → 0.39.2
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/fesm2022/rt-tools-ui-kit-v2-aside.mjs +4 -4
- package/fesm2022/rt-tools-ui-kit-v2-aside.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs +14 -0
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs +5 -5
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs +48 -45
- package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs +62 -9
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs +93 -12
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-field.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-field.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs +4 -1
- package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-icon.mjs +10 -0
- package/fesm2022/rt-tools-ui-kit-v2-icon.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs +76 -5
- package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-input.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-message.mjs +3 -3
- package/fesm2022/rt-tools-ui-kit-v2-message.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs +4 -4
- package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs +37 -16
- package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-table-core.mjs +101 -0
- package/fesm2022/rt-tools-ui-kit-v2-table-core.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs +130 -42
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +41 -4
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +2 -0
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -1
- package/package.json +5 -1
- package/src/assets/icons-material/bookmark.fill.svg +5 -0
- package/src/assets/icons-material/bookmark.svg +5 -0
- package/src/assets/icons-material/flag.fill.svg +3 -0
- package/src/assets/icons-material/flag.svg +5 -0
- package/src/lib/components/aside/footer/CONTEXT.md +27 -0
- package/src/lib/components/aside/footer/rt-aside-footer.component.scss +8 -3
- package/src/lib/components/aside/header/rt-aside-header.component.scss +11 -3
- package/src/lib/components/button/rt-button.directive.scss +5 -1
- package/src/lib/components/data-table/CONTEXT.md +8 -2
- package/src/lib/components/date-picker/panel/rt-date-panel.component.scss +51 -2
- package/src/lib/components/date-range/panel/rt-date-range-panel.component.scss +95 -2
- package/src/lib/components/detail-list/CONTEXT.md +3 -0
- package/src/lib/components/detail-list/rt-detail-row.component.scss +1 -0
- package/src/lib/components/field/CONTEXT.md +4 -2
- package/src/lib/components/field/rt-field.component.scss +14 -0
- package/src/lib/components/form-control/CONTEXT.md +13 -8
- package/src/lib/components/input/rt-input.component.scss +4 -0
- package/src/lib/components/input-number/CONTEXT.md +8 -0
- package/src/lib/components/input-number/rt-input-number.component.scss +50 -0
- package/src/lib/components/message/CONTEXT.md +1 -1
- package/src/lib/components/message/rt-message.component.scss +2 -1
- package/src/lib/components/multiselect/rt-multiselect.component.scss +21 -0
- package/src/lib/components/service-block/stories/component/test-service-block-panel.component.scss +29 -0
- package/src/lib/components/stat-tile/CONTEXT.md +11 -6
- package/src/lib/components/stat-tile/rt-stat-tile.component.scss +21 -0
- package/src/lib/components/stat-tile/stories/component/test-stat-tile-matrix.component.scss +15 -0
- package/src/lib/components/table/CONTEXT.md +23 -0
- package/src/lib/components/table/copy-cell/CONTEXT.md +32 -0
- package/src/lib/components/table/copy-cell/rt-copy-cell.component.scss +26 -0
- package/src/lib/components/table/rt-table.component.scss +77 -22
- package/src/lib/components/table/stories/component/test-table-pinned.component.scss +76 -0
- package/src/lib/components/tabs/CONTEXT.md +18 -16
- package/src/lib/components/tabs/rt-tabs.component.scss +25 -1
- package/src/styles/_form.scss +10 -0
- package/src/styles/_primitives.scss +2 -0
- package/src/styles/_semantic.scss +11 -1
- package/src/styles/_theme-dark.scss +2 -0
- package/styles/tokens.css +95 -9
- package/types/rt-tools-ui-kit-v2-core.d.ts +28 -5
- package/types/rt-tools-ui-kit-v2-data-table.d.ts +23 -9
- package/types/rt-tools-ui-kit-v2-date-picker.d.ts +14 -0
- package/types/rt-tools-ui-kit-v2-form-control.d.ts +2 -2
- package/types/rt-tools-ui-kit-v2-input-number.d.ts +30 -2
- package/types/rt-tools-ui-kit-v2-message.d.ts +1 -1
- package/types/rt-tools-ui-kit-v2-stat-tile.d.ts +29 -6
- package/types/rt-tools-ui-kit-v2-table-core.d.ts +76 -0
- package/types/rt-tools-ui-kit-v2-table.d.ts +52 -18
- package/types/rt-tools-ui-kit-v2-tabs.d.ts +26 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Clipboard } from "@angular/cdk/clipboard";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, ElementRef, Injectable, Pipe, TemplateRef, ViewChild, ViewEncapsulation, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, linkedSignal, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
-
import { BlockDirective, ElemDirective, IDBStorageService, ModDirective } from "@rt-tools/core";
|
|
3
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, ElementRef, Injectable, Injector, Pipe, TemplateRef, ViewChild, ViewEncapsulation, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, linkedSignal, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { BlockDirective, ElemDirective, IDBStorageService, ModDirective, WINDOW } from "@rt-tools/core";
|
|
5
5
|
import { BreakpointsService, ERtStorageKeys, RT_KIT_LABELS, rtKitLabel } from "@rt-tools/ui-kit-v2/core";
|
|
6
6
|
import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
|
|
7
7
|
import { RtTooltipDirective } from "@rt-tools/ui-kit-v2/tooltip";
|
|
8
8
|
import { NgTemplateOutlet } from "@angular/common";
|
|
9
9
|
import { EFilterOperatorType, EListSortOrder } from "@rt-tools/utils";
|
|
10
10
|
import { RtIconComponent } from "@rt-tools/ui-kit-v2/icon";
|
|
11
|
+
import { rtAriaSortOf, rtFilterOf, rtFiltersWithOperator, rtFiltersWithValue, rtNextSort, rtSortDirectionOf } from "@rt-tools/ui-kit-v2/table-core";
|
|
11
12
|
import { CDK_TABLE, CdkCell, CdkCellDef, CdkColumnDef, CdkHeaderCell, CdkHeaderCellDef, CdkTable, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, NoDataRowOutlet } from "@angular/cdk/table";
|
|
12
13
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
13
14
|
import { RtEmptyStateComponent } from "@rt-tools/ui-kit-v2/empty-state";
|
|
@@ -50,7 +51,7 @@ var RtCopyCellComponent = class RtCopyCellComponent {
|
|
|
50
51
|
this.#copiedLabel = rtKitLabel(COPIED_KEY);
|
|
51
52
|
this.copied = signal(false, ...ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []);
|
|
52
53
|
this.hint = signal("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
53
|
-
this.iconName = computed(() => this.copied() ? "check" : "copy", ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
|
|
54
|
+
this.iconName = computed(() => this.copied() ? "check" : "ico-copy", ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
|
|
54
55
|
this.actionLabel = computed(() => this.copied() ? this.#copiedLabel() : this.#copyLabel(), ...ngDevMode ? [{ debugName: "actionLabel" }] : /* istanbul ignore next */ []);
|
|
55
56
|
this.value = input(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
56
57
|
this.variant = input("ghost", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
@@ -58,6 +59,10 @@ var RtCopyCellComponent = class RtCopyCellComponent {
|
|
|
58
59
|
...ngDevMode ? { debugName: "revealOnHover" } : /* istanbul ignore next */ {},
|
|
59
60
|
transform: booleanAttribute
|
|
60
61
|
});
|
|
62
|
+
this.framed = input(false, {
|
|
63
|
+
...ngDevMode ? { debugName: "framed" } : /* istanbul ignore next */ {},
|
|
64
|
+
transform: booleanAttribute
|
|
65
|
+
});
|
|
61
66
|
this.#destroyRef.onDestroy(() => this.#clearTimer());
|
|
62
67
|
}
|
|
63
68
|
measureTruncation() {
|
|
@@ -125,6 +130,13 @@ var RtCopyCellComponent = class RtCopyCellComponent {
|
|
|
125
130
|
isSignal: true,
|
|
126
131
|
isRequired: false,
|
|
127
132
|
transformFunction: null
|
|
133
|
+
},
|
|
134
|
+
framed: {
|
|
135
|
+
classPropertyName: "framed",
|
|
136
|
+
publicName: "framed",
|
|
137
|
+
isSignal: true,
|
|
138
|
+
isRequired: false,
|
|
139
|
+
transformFunction: null
|
|
128
140
|
}
|
|
129
141
|
},
|
|
130
142
|
host: {
|
|
@@ -132,12 +144,15 @@ var RtCopyCellComponent = class RtCopyCellComponent {
|
|
|
132
144
|
"mouseenter": "measureTruncation()",
|
|
133
145
|
"focusin": "measureTruncation()"
|
|
134
146
|
},
|
|
135
|
-
properties: {
|
|
147
|
+
properties: {
|
|
148
|
+
"class.rt-copy-cell--static": "!revealOnHover() || framed()",
|
|
149
|
+
"class.rt-copy-cell--framed": "framed()"
|
|
150
|
+
},
|
|
136
151
|
classAttribute: "rt-copy-cell"
|
|
137
152
|
},
|
|
138
153
|
ngImport: i0,
|
|
139
154
|
template: "<ng-container rtBlock=\"rt-copy-cell\">\n <span rtElem=\"content\" qa-dataid=\"copy-cell-content\" [rtTooltip]=\"hint()\"><ng-content /></span>\n <rt-icon-button\n rtElem=\"button\"\n qa-dataid=\"copy-cell-button\"\n size=\"sm\"\n [icon]=\"iconName()\"\n [variant]=\"variant()\"\n [ariaLabel]=\"actionLabel()\"\n [tooltip]=\"actionLabel()\"\n (clicked)=\"onCopy($event)\" />\n</ng-container>\n",
|
|
140
|
-
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-copy-cell{--rt-copy-cell-transition-duration: var(--rt-duration-fast);display:inline-flex;min-width:0;align-items:center;gap:var(--rt-space-xs)}.rt-copy-cell__content{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.rt-copy-cell__button{flex:0 0 auto;opacity:0;transition:opacity var(--rt-copy-cell-transition-duration) ease}.rt-copy-cell:hover .rt-copy-cell__button,.rt-copy-cell:focus-within .rt-copy-cell__button{opacity:1}.rt-copy-cell--static .rt-copy-cell__button{opacity:1}.rt-table tbody tr:hover .rt-copy-cell__button,.rt-table tbody tr:focus-within .rt-copy-cell__button{opacity:1}}\n"],
|
|
155
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-copy-cell{--rt-copy-cell-transition-duration: var(--rt-duration-fast);display:inline-flex;min-width:0;align-items:center;gap:var(--rt-space-xs)}.rt-copy-cell__content{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.rt-copy-cell__button{flex:0 0 auto;opacity:0;transition:opacity var(--rt-copy-cell-transition-duration) ease}.rt-copy-cell:hover .rt-copy-cell__button,.rt-copy-cell:focus-within .rt-copy-cell__button{opacity:1}.rt-copy-cell--static .rt-copy-cell__button{opacity:1}.rt-copy-cell--framed{display:flex;width:100%;box-sizing:border-box;padding:var(--rt-space-1) var(--rt-space-1) var(--rt-space-1) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-input-radius);background-color:var(--rt-input-color-bg);color:var(--rt-color-text-primary);font-size:var(--rt-text-sm);gap:var(--rt-space-sm);line-height:var(--rt-leading-normal)}.rt-copy-cell--framed .rt-copy-cell__content{flex:1 1 auto;overflow-wrap:anywhere;text-overflow:clip;white-space:normal}.rt-table tbody tr:hover .rt-copy-cell__button,.rt-table tbody tr:focus-within .rt-copy-cell__button{opacity:1}}\n"],
|
|
141
156
|
dependencies: [
|
|
142
157
|
{
|
|
143
158
|
kind: "component",
|
|
@@ -217,12 +232,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
217
232
|
],
|
|
218
233
|
host: {
|
|
219
234
|
class: BEM_BLOCK$5,
|
|
220
|
-
"[class.rt-copy-cell--static]": "!revealOnHover()",
|
|
235
|
+
"[class.rt-copy-cell--static]": "!revealOnHover() || framed()",
|
|
236
|
+
"[class.rt-copy-cell--framed]": "framed()",
|
|
221
237
|
"(mouseenter)": "measureTruncation()",
|
|
222
238
|
"(focusin)": "measureTruncation()"
|
|
223
239
|
},
|
|
224
240
|
template: "<ng-container rtBlock=\"rt-copy-cell\">\n <span rtElem=\"content\" qa-dataid=\"copy-cell-content\" [rtTooltip]=\"hint()\"><ng-content /></span>\n <rt-icon-button\n rtElem=\"button\"\n qa-dataid=\"copy-cell-button\"\n size=\"sm\"\n [icon]=\"iconName()\"\n [variant]=\"variant()\"\n [ariaLabel]=\"actionLabel()\"\n [tooltip]=\"actionLabel()\"\n (clicked)=\"onCopy($event)\" />\n</ng-container>\n",
|
|
225
|
-
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-copy-cell{--rt-copy-cell-transition-duration: var(--rt-duration-fast);display:inline-flex;min-width:0;align-items:center;gap:var(--rt-space-xs)}.rt-copy-cell__content{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.rt-copy-cell__button{flex:0 0 auto;opacity:0;transition:opacity var(--rt-copy-cell-transition-duration) ease}.rt-copy-cell:hover .rt-copy-cell__button,.rt-copy-cell:focus-within .rt-copy-cell__button{opacity:1}.rt-copy-cell--static .rt-copy-cell__button{opacity:1}.rt-table tbody tr:hover .rt-copy-cell__button,.rt-table tbody tr:focus-within .rt-copy-cell__button{opacity:1}}\n"]
|
|
241
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-copy-cell{--rt-copy-cell-transition-duration: var(--rt-duration-fast);display:inline-flex;min-width:0;align-items:center;gap:var(--rt-space-xs)}.rt-copy-cell__content{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.rt-copy-cell__button{flex:0 0 auto;opacity:0;transition:opacity var(--rt-copy-cell-transition-duration) ease}.rt-copy-cell:hover .rt-copy-cell__button,.rt-copy-cell:focus-within .rt-copy-cell__button{opacity:1}.rt-copy-cell--static .rt-copy-cell__button{opacity:1}.rt-copy-cell--framed{display:flex;width:100%;box-sizing:border-box;padding:var(--rt-space-1) var(--rt-space-1) var(--rt-space-1) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-input-radius);background-color:var(--rt-input-color-bg);color:var(--rt-color-text-primary);font-size:var(--rt-text-sm);gap:var(--rt-space-sm);line-height:var(--rt-leading-normal)}.rt-copy-cell--framed .rt-copy-cell__content{flex:1 1 auto;overflow-wrap:anywhere;text-overflow:clip;white-space:normal}.rt-table tbody tr:hover .rt-copy-cell__button,.rt-table tbody tr:focus-within .rt-copy-cell__button{opacity:1}}\n"]
|
|
226
242
|
}]
|
|
227
243
|
}],
|
|
228
244
|
ctorParameters: () => [],
|
|
@@ -250,27 +266,25 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
250
266
|
alias: "revealOnHover",
|
|
251
267
|
required: false
|
|
252
268
|
}]
|
|
269
|
+
}],
|
|
270
|
+
framed: [{
|
|
271
|
+
type: i0.Input,
|
|
272
|
+
args: [{
|
|
273
|
+
isSignal: true,
|
|
274
|
+
alias: "framed",
|
|
275
|
+
required: false
|
|
276
|
+
}]
|
|
253
277
|
}]
|
|
254
278
|
}
|
|
255
279
|
});
|
|
256
280
|
function nextSort(current, propertyName) {
|
|
257
|
-
|
|
258
|
-
propertyName,
|
|
259
|
-
sortDirection: EListSortOrder.ASC
|
|
260
|
-
};
|
|
261
|
-
if (current.sortDirection === EListSortOrder.ASC) return {
|
|
262
|
-
propertyName,
|
|
263
|
-
sortDirection: EListSortOrder.DESC
|
|
264
|
-
};
|
|
265
|
-
return null;
|
|
281
|
+
return rtNextSort(current, propertyName, "clears");
|
|
266
282
|
}
|
|
267
283
|
function sortDirectionOf(current, propertyName) {
|
|
268
|
-
return current
|
|
284
|
+
return rtSortDirectionOf(current, propertyName);
|
|
269
285
|
}
|
|
270
286
|
function ariaSortOf(current, propertyName) {
|
|
271
|
-
|
|
272
|
-
if (direction === null) return "none";
|
|
273
|
-
return direction === EListSortOrder.ASC ? "ascending" : "descending";
|
|
287
|
+
return rtAriaSortOf(current, propertyName);
|
|
274
288
|
}
|
|
275
289
|
function isColumnSortable(config, key) {
|
|
276
290
|
const column = config.find((candidate) => candidate.key === key);
|
|
@@ -307,30 +321,15 @@ function withoutLockedHidden(config, settings) {
|
|
|
307
321
|
function filterValueOf(value) {
|
|
308
322
|
return value instanceof Date ? value.toISOString() : value ?? "";
|
|
309
323
|
}
|
|
324
|
+
const RT_TABLE_EMPTY_MODE = "empty-string";
|
|
310
325
|
function filterOf(filters, propertyName) {
|
|
311
|
-
return filters
|
|
326
|
+
return rtFilterOf(filters, propertyName);
|
|
312
327
|
}
|
|
313
328
|
function filtersWithValue(filters, propertyName, operatorType, value) {
|
|
314
|
-
|
|
315
|
-
if (value === "") return current === null ? filters : filters.filter((filter) => filter !== current);
|
|
316
|
-
if (current === null) return [...filters, {
|
|
317
|
-
propertyName,
|
|
318
|
-
operatorType,
|
|
319
|
-
value
|
|
320
|
-
}];
|
|
321
|
-
if (current.value === value) return filters;
|
|
322
|
-
return filters.map((filter) => filter === current ? {
|
|
323
|
-
...filter,
|
|
324
|
-
value
|
|
325
|
-
} : filter);
|
|
329
|
+
return rtFiltersWithValue(filters, propertyName, operatorType, value, RT_TABLE_EMPTY_MODE);
|
|
326
330
|
}
|
|
327
331
|
function filtersWithOperator(filters, propertyName, operatorType) {
|
|
328
|
-
|
|
329
|
-
if (current === null || current.operatorType === operatorType) return filters;
|
|
330
|
-
return filters.map((filter) => filter === current ? {
|
|
331
|
-
...filter,
|
|
332
|
-
operatorType
|
|
333
|
-
} : filter);
|
|
332
|
+
return rtFiltersWithOperator(filters, propertyName, operatorType, "", RT_TABLE_EMPTY_MODE);
|
|
334
333
|
}
|
|
335
334
|
function startOperatorOf(allowed, start) {
|
|
336
335
|
if (start !== void 0) return start;
|
|
@@ -621,7 +620,9 @@ var RtTableFilterHeaderComponent = class RtTableFilterHeaderComponent {
|
|
|
621
620
|
"max",
|
|
622
621
|
"minFractionDigits",
|
|
623
622
|
"maxFractionDigits",
|
|
624
|
-
"grouped"
|
|
623
|
+
"grouped",
|
|
624
|
+
"step",
|
|
625
|
+
"stepper"
|
|
625
626
|
]
|
|
626
627
|
},
|
|
627
628
|
{
|
|
@@ -1166,6 +1167,70 @@ var RtTableColumnSettings = class {
|
|
|
1166
1167
|
if (tableId !== null) this.#persistence.save(tableId, settings);
|
|
1167
1168
|
}
|
|
1168
1169
|
};
|
|
1170
|
+
const EDGE_TOLERANCE = 1;
|
|
1171
|
+
function hiddenEdges(scrollLeft, scrollWidth, clientWidth) {
|
|
1172
|
+
const offset = Math.abs(scrollLeft);
|
|
1173
|
+
return {
|
|
1174
|
+
start: offset > EDGE_TOLERANCE,
|
|
1175
|
+
end: offset + clientWidth < scrollWidth - EDGE_TOLERANCE
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
function horizontalScrollParentOf(element, view) {
|
|
1179
|
+
let node = element.parentElement;
|
|
1180
|
+
while (node) {
|
|
1181
|
+
const overflowX = view.getComputedStyle(node).overflowX;
|
|
1182
|
+
if (overflowX === "auto" || overflowX === "scroll") return node;
|
|
1183
|
+
node = node.parentElement;
|
|
1184
|
+
}
|
|
1185
|
+
return null;
|
|
1186
|
+
}
|
|
1187
|
+
var RtTablePinnedEdges = class {
|
|
1188
|
+
#changed;
|
|
1189
|
+
#container = null;
|
|
1190
|
+
#observer = null;
|
|
1191
|
+
#scrollWidth = 0;
|
|
1192
|
+
#clientWidth = 0;
|
|
1193
|
+
#onScroll = () => this.#report();
|
|
1194
|
+
#onResize = () => {
|
|
1195
|
+
this.#measure();
|
|
1196
|
+
this.#report();
|
|
1197
|
+
};
|
|
1198
|
+
constructor(changed) {
|
|
1199
|
+
this.#changed = changed;
|
|
1200
|
+
}
|
|
1201
|
+
watch(table, view) {
|
|
1202
|
+
this.stop();
|
|
1203
|
+
const container = horizontalScrollParentOf(table, view);
|
|
1204
|
+
if (!container) return;
|
|
1205
|
+
this.#container = container;
|
|
1206
|
+
const resizable = typeof ResizeObserver !== "undefined";
|
|
1207
|
+
container.addEventListener("scroll", resizable ? this.#onScroll : this.#onResize, { passive: true });
|
|
1208
|
+
if (resizable) {
|
|
1209
|
+
this.#observer = new ResizeObserver(this.#onResize);
|
|
1210
|
+
this.#observer.observe(container);
|
|
1211
|
+
this.#observer.observe(table);
|
|
1212
|
+
}
|
|
1213
|
+
this.#onResize();
|
|
1214
|
+
}
|
|
1215
|
+
stop() {
|
|
1216
|
+
this.#container?.removeEventListener("scroll", this.#onScroll);
|
|
1217
|
+
this.#container?.removeEventListener("scroll", this.#onResize);
|
|
1218
|
+
this.#observer?.disconnect();
|
|
1219
|
+
this.#container = null;
|
|
1220
|
+
this.#observer = null;
|
|
1221
|
+
}
|
|
1222
|
+
#measure() {
|
|
1223
|
+
const container = this.#container;
|
|
1224
|
+
if (container) {
|
|
1225
|
+
this.#scrollWidth = container.scrollWidth;
|
|
1226
|
+
this.#clientWidth = container.clientWidth;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
#report() {
|
|
1230
|
+
const container = this.#container;
|
|
1231
|
+
if (container) this.#changed(hiddenEdges(container.scrollLeft, this.#scrollWidth, this.#clientWidth));
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1169
1234
|
const BEM_BLOCK$3 = "rt-table";
|
|
1170
1235
|
const DEFAULT_SKELETON_ROWS = 5;
|
|
1171
1236
|
const DEFAULT_EMPTY_KEY = "uiNoRows";
|
|
@@ -1175,10 +1240,22 @@ var RtTableComponent = class RtTableComponent extends CdkTable {
|
|
|
1175
1240
|
this.#t_uiNoRows = rtKitLabel(DEFAULT_EMPTY_KEY);
|
|
1176
1241
|
this.#destroyRef = inject(DestroyRef);
|
|
1177
1242
|
this.#breakpoints = inject(BreakpointsService);
|
|
1243
|
+
this.#injector = inject(Injector);
|
|
1244
|
+
this.#host = inject(ElementRef).nativeElement;
|
|
1245
|
+
this.#window = inject(WINDOW);
|
|
1178
1246
|
this.#dataSourceVersion = signal(0, ...ngDevMode ? [{ debugName: "#dataSourceVersion" }] : /* istanbul ignore next */ []);
|
|
1247
|
+
this.#hiddenEdges = signal({
|
|
1248
|
+
start: false,
|
|
1249
|
+
end: false
|
|
1250
|
+
}, {
|
|
1251
|
+
...ngDevMode ? { debugName: "#hiddenEdges" } : /* istanbul ignore next */ {},
|
|
1252
|
+
equal: (a, b) => a.start === b.start && a.end === b.end
|
|
1253
|
+
});
|
|
1254
|
+
this.#pinnedEdges = new RtTablePinnedEdges((edges) => this.#hiddenEdges.set(edges));
|
|
1179
1255
|
this.#sort = linkedSignal(() => this.sort(), ...ngDevMode ? [{ debugName: "#sort" }] : /* istanbul ignore next */ []);
|
|
1180
1256
|
this.#columnSettings = new RtTableColumnSettings(() => this.columnsConfig(), () => this.tableId());
|
|
1181
1257
|
this.hostRole = inject(ElementRef).nativeElement.tagName === "RT-TABLE" ? "table" : null;
|
|
1258
|
+
this.hiddenEdges = this.#hiddenEdges.asReadonly();
|
|
1182
1259
|
this.isInitialLoading = computed(() => this.loading() && this.#hasData() === false, ...ngDevMode ? [{ debugName: "isInitialLoading" }] : /* istanbul ignore next */ []);
|
|
1183
1260
|
this.isEmpty = computed(() => !this.loading() && !this.fetching() && this.#hasData() === false, ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
|
|
1184
1261
|
this.skeletonRowIndexes = computed(() => Array.from({ length: this.skeletonRows() }, (_, i) => i), ...ngDevMode ? [{ debugName: "skeletonRowIndexes" }] : /* istanbul ignore next */ []);
|
|
@@ -1250,7 +1327,12 @@ var RtTableComponent = class RtTableComponent extends CdkTable {
|
|
|
1250
1327
|
#t_uiNoRows;
|
|
1251
1328
|
#destroyRef;
|
|
1252
1329
|
#breakpoints;
|
|
1330
|
+
#injector;
|
|
1331
|
+
#host;
|
|
1332
|
+
#window;
|
|
1253
1333
|
#dataSourceVersion;
|
|
1334
|
+
#hiddenEdges;
|
|
1335
|
+
#pinnedEdges;
|
|
1254
1336
|
#sort;
|
|
1255
1337
|
#columnSettings;
|
|
1256
1338
|
ngOnInit() {
|
|
@@ -1261,11 +1343,13 @@ var RtTableComponent = class RtTableComponent extends CdkTable {
|
|
|
1261
1343
|
this.addColumnDef(this.actionsColumnDef);
|
|
1262
1344
|
}
|
|
1263
1345
|
this.#columnSettings.start();
|
|
1346
|
+
afterNextRender(() => this.#pinnedEdges.watch(this.#host, this.#window), { injector: this.#injector });
|
|
1264
1347
|
this.#columnSettings.saved().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((settings) => this.applyColumnSettings(settings));
|
|
1265
1348
|
}
|
|
1266
1349
|
ngOnDestroy() {
|
|
1267
1350
|
if (this.actionsColumnDef !== void 0) this.removeColumnDef(this.actionsColumnDef);
|
|
1268
1351
|
this.#columnSettings.stop();
|
|
1352
|
+
this.#pinnedEdges.stop();
|
|
1269
1353
|
super.ngOnDestroy();
|
|
1270
1354
|
}
|
|
1271
1355
|
toggleSort(propertyName) {
|
|
@@ -1447,6 +1531,8 @@ var RtTableComponent = class RtTableComponent extends CdkTable {
|
|
|
1447
1531
|
"class.rt-table--fetching": "fetching()",
|
|
1448
1532
|
"class.rt-table--empty": "isEmpty()",
|
|
1449
1533
|
"class.rt-table--cards": "showCards()",
|
|
1534
|
+
"class.rt-table--hidden-start": "hiddenEdges().start",
|
|
1535
|
+
"class.rt-table--hidden-end": "hiddenEdges().end",
|
|
1450
1536
|
"attr.role": "hostRole",
|
|
1451
1537
|
"attr.aria-label": "ariaLabel()",
|
|
1452
1538
|
"attr.aria-busy": "isInitialLoading() || fetching() ? 'true' : null"
|
|
@@ -1518,7 +1604,7 @@ var RtTableComponent = class RtTableComponent extends CdkTable {
|
|
|
1518
1604
|
}],
|
|
1519
1605
|
ngImport: i0,
|
|
1520
1606
|
template: "<ng-container rtBlock=\"rt-table\">\n <ng-content select=\"caption\" />\n <ng-content select=\"colgroup, col\" />\n\n <ng-container cdkColumnDef=\"rtRowActions\">\n <th *cdkHeaderCellDef rtElem=\"actions-header\" cdk-header-cell aria-hidden=\"true\"></th>\n <td *cdkCellDef=\"let row\" rtElem=\"actions-cell\" qa-dataid=\"table-row-actions\" cdk-cell>\n @if (rowActions()?.template; as tpl) {\n @if (row | rtRowHasActions: rowHasActions()) {\n <div rtElem=\"actions-float\">\n <rt-menu>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </rt-menu>\n </div>\n }\n }\n </td>\n </ng-container>\n\n <ng-container headerRowOutlet />\n\n @if (showFilters()) {\n <tr rtElem=\"filter-row\" qa-dataid=\"table-filter-row\">\n @for (cell of filterCells(); track cell.key) {\n <th\n rtElem=\"filter-cell\"\n qa-dataid=\"table-filter-cell\"\n [rtMod]=\"{ actions: cell.actions }\"\n [attr.aria-hidden]=\"cell.actions || null\">\n @if (cell.filter) {\n <rt-table-filter-header\n [propertyName]=\"cell.key\"\n [filter]=\"cell.filter\"\n [filters]=\"filters()\"\n (filtersChange)=\"reportFilters($event)\" />\n }\n </th>\n }\n </tr>\n }\n\n @if (isInitialLoading()) {\n @for (i of skeletonRowIndexes(); track i) {\n <tr rtElem=\"skeleton-row\" qa-dataid=\"table-skeleton-row\">\n @for (col of displayedColumns(); track col) {\n <td rtElem=\"skeleton-cell\">\n <rt-skeleton rtElem=\"skeleton-bar\" />\n </td>\n }\n </tr>\n }\n }\n\n <ng-container rowOutlet />\n <ng-container noDataRowOutlet />\n <ng-container footerRowOutlet />\n\n @if (isEmpty()) {\n <tr rtElem=\"empty-row\" qa-dataid=\"table-empty-row\">\n <td rtElem=\"empty\" [attr.colspan]=\"displayedColumns().length || null\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <rt-empty-state\n rtElem=\"empty-message\"\n qa-dataid=\"table-empty\"\n [icon]=\"emptyIcon()\"\n [title]=\"emptyText()\"\n [description]=\"emptyDescription()\" />\n }\n </td>\n </tr>\n }\n\n @if (showCards()) {\n <div rtElem=\"cards\" qa-dataid=\"table-cards\" role=\"list\">\n @if (isInitialLoading()) {\n @for (i of skeletonRowIndexes(); track i) {\n <article rtElem=\"card\" qa-dataid=\"table-skeleton-card\" [rtMod]=\"{ skeleton: true }\">\n <rt-skeleton rtElem=\"card-skeleton-bar\" />\n <rt-skeleton rtElem=\"card-skeleton-bar\" />\n </article>\n }\n } @else if (isEmpty()) {\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <rt-empty-state\n rtElem=\"empty-message\"\n qa-dataid=\"table-empty\"\n [icon]=\"emptyIcon()\"\n [title]=\"emptyText()\"\n [description]=\"emptyDescription()\" />\n }\n } @else {\n @for (row of cardRows(); track row; let index = $index) {\n <article\n rtElem=\"card\"\n qa-dataid=\"table-card\"\n role=\"listitem\"\n [rtTableCardActivation]=\"index\"\n [rtTableCardActivationEnabled]=\"clickable()\">\n @if (cardTemplate()?.template; as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @else {\n @for (col of cardColumns(); track col.key) {\n <div rtElem=\"card-field\" qa-dataid=\"table-card-field\" [attr.data-key]=\"col.key\">\n <span rtElem=\"card-label\" qa-dataid=\"table-card-label\">{{ col.label }}</span>\n <div rtElem=\"card-value\" qa-dataid=\"table-card-value\">\n <ng-container [ngTemplateOutlet]=\"col.cell\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </div>\n </div>\n }\n @if (rowActions()?.template; as tpl) {\n @if (row | rtRowHasActions: rowHasActions()) {\n <div rtElem=\"card-actions\" qa-dataid=\"table-card-actions\">\n <rt-menu>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </rt-menu>\n </div>\n }\n }\n }\n </article>\n }\n }\n </div>\n }\n</ng-container>\n",
|
|
1521
|
-
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-table{--rt-table-border-width: var(--rt-border-width-thin);--rt-table-card-radius: var(--rt-radius-md);position:relative;display:table;width:100%;background:var(--rt-color-bg
|
|
1607
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-table{--rt-table-border-width: var(--rt-border-width-thin);--rt-table-card-radius: var(--rt-radius-md);--rt-table-row-bg: transparent;--rt-table-pinned-bg: var(--rt-color-table-bg);--rt-table-pinned-shadow-color: var(--rt-color-table-pinned-shadow);--rt-table-pinned-shadow-width: 12px;position:relative;display:table;width:100%;background:var(--rt-color-table-bg);border-collapse:collapse;color:var(--rt-color-text-primary)}.rt-table .cdk-header-row,.rt-table .cdk-row,.rt-table__skeleton-row{height:50px}.rt-table .cdk-header-cell,.rt-table .cdk-cell,.rt-table__filter-cell,.rt-table__skeleton-cell{position:relative;padding:var(--rt-space-2) var(--rt-space-5);border-bottom:var(--rt-table-border-width) solid var(--rt-color-border-subtle);border-left:var(--rt-table-border-width) solid var(--rt-color-border-subtle);font-size:var(--rt-text-sm);font-weight:var(--rt-font-weight-medium);text-align:start;vertical-align:middle}.rt-table .cdk-header-cell[data-align=right],.rt-table .cdk-cell[data-align=right],.rt-table__filter-cell[data-align=right],.rt-table__skeleton-cell[data-align=right],.rt-table .cdk-header-cell[data-align=right] input,.rt-table .cdk-cell[data-align=right] input,.rt-table__filter-cell[data-align=right] input,.rt-table__skeleton-cell[data-align=right] input{text-align:right}.rt-table .cdk-header-cell:first-child,.rt-table .cdk-cell:first-child,.rt-table__filter-cell:first-child,.rt-table__skeleton-cell:first-child{border-left:none}.rt-table .cdk-header-cell{border-top:var(--rt-table-border-width) solid var(--rt-color-border-subtle);background:var(--rt-color-table-bg);color:var(--rt-color-text-muted)}.rt-table .cdk-cell{color:var(--rt-color-text-primary);overflow-wrap:anywhere}.rt-table__filter-row{display:table-row}.rt-table__filter-cell{height:auto;background:var(--rt-color-bg-surface);padding-block:var(--rt-space-1);vertical-align:middle}.rt-table__filter-cell--actions,.rt-table__actions-header.cdk-header-cell{width:0;padding:0;border:none}.rt-table__actions-cell.cdk-cell{position:sticky;z-index:1;right:0;width:0;padding:0;border:none;background:transparent}.rt-table__actions-float{position:absolute;display:flex;height:100%;align-items:center;padding:0 var(--rt-space-2) 0 var(--rt-space-8);background:linear-gradient(to right,transparent 0%,var(--rt-color-bg-hover) 45%);inset:0 0 0 auto;pointer-events:none}.rt-table__actions-float .rt-menu{pointer-events:auto}@media(hover:hover){.rt-table__actions-cell.cdk-cell{visibility:hidden}.cdk-row:hover .rt-table__actions-cell.cdk-cell,.cdk-row:focus-within .rt-table__actions-cell.cdk-cell,.rt-table__actions-cell.cdk-cell:has(.rt-menu--open){visibility:visible}}.rt-table .cdk-row,.rt-table .cdk-footer-row{background:var(--rt-table-row-bg)}.rt-table .cdk-row:hover{--rt-table-row-bg: var(--rt-color-bg-hover)}.rt-table .cdk-row.rt-table__row--danger,.rt-table .cdk-row.rt-table__row--danger:hover{--rt-table-row-bg: var(--rt-color-state-danger-bg)}.rt-table .cdk-cell.cdk-table-sticky,.rt-table .cdk-footer-cell.cdk-table-sticky{background:linear-gradient(var(--rt-table-row-bg),var(--rt-table-row-bg)),var(--rt-table-pinned-bg)}.rt-table .cdk-table-sticky-border-elem-left:after,.rt-table .cdk-table-sticky-border-elem-right:after{position:absolute;top:0;bottom:0;width:var(--rt-table-pinned-shadow-width);pointer-events:none}.rt-table .cdk-table-sticky-border-elem-left:after{left:100%;background:linear-gradient(to right,var(--rt-table-pinned-shadow-color),transparent)}.rt-table .cdk-table-sticky-border-elem-right:after{right:100%;background:linear-gradient(to left,var(--rt-table-pinned-shadow-color),transparent)}.rt-table--hidden-start:dir(ltr) .cdk-table-sticky-border-elem-left:after,.rt-table--hidden-end:dir(ltr) .cdk-table-sticky-border-elem-right:after,.rt-table--hidden-start:dir(rtl) .cdk-table-sticky-border-elem-right:after,.rt-table--hidden-end:dir(rtl) .cdk-table-sticky-border-elem-left:after{content:\"\"}.rt-table--clickable .cdk-row,.rt-table--clickable .rt-table__card{cursor:pointer}.rt-table--clickable .cdk-row:focus-visible,.rt-table--clickable .rt-table__card:focus-visible{outline:2px solid var(--rt-color-action-primary);outline-offset:-2px}.rt-table a{text-decoration:none}.rt-table--density--compact .cdk-header-row,.rt-table--density--compact .cdk-row,.rt-table--density--compact .rt-table__skeleton-row{height:36px}.rt-table--density--compact .cdk-header-cell,.rt-table--density--compact .cdk-cell,.rt-table--density--compact .rt-table__skeleton-cell{padding:var(--rt-space-xs) var(--rt-space-sm)}.rt-table__skeleton-bar{display:block;width:80%;height:14px}.rt-table__empty-row{display:table-row}.rt-table__empty{padding:var(--rt-space-6) var(--rt-space-5);border-bottom:var(--rt-table-border-width) solid var(--rt-color-border-subtle);background:var(--rt-color-table-bg);color:var(--rt-color-text-muted);text-align:center}.rt-table__empty-message{margin:0;font-size:var(--rt-text-sm)}.rt-table__overlay{position:absolute;z-index:1;display:grid;min-height:100%;inset:0;place-items:center;pointer-events:none}.rt-table__overlay-backdrop{position:absolute;background:var(--rt-color-table-bg);inset:0;opacity:.72}.rt-table__overlay-spinner{position:sticky;z-index:1;top:50%;display:flex;align-items:center;justify-content:center;transform:translateY(-50%)}.rt-table__cards{display:none}.rt-table--cards{display:block;min-width:0;max-width:100%}.rt-table--cards .cdk-header-row,.rt-table--cards .cdk-row,.rt-table--cards .rt-table__skeleton-row,.rt-table--cards .rt-table__empty-row,.rt-table--cards .rt-table__filter-row{display:none}.rt-table--cards .rt-table__cards{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-table--cards:not(.rt-table--empty){background:transparent}.rt-table__card{display:flex;flex-direction:column;padding:var(--rt-space-md);border:var(--rt-table-border-width) solid var(--rt-color-border-default);border-radius:var(--rt-table-card-radius);background:var(--rt-color-bg-surface);gap:var(--rt-space-xs)}.rt-table__card-field{display:flex;align-items:baseline;justify-content:space-between;gap:var(--rt-space-md)}.rt-table__card-label{flex:0 0 auto;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-table__card-value{min-width:0;overflow-wrap:anywhere;text-align:right}.rt-table__card-value .cdk-cell{display:inline;height:auto;padding:0;border:none;font:inherit;min-inline-size:0;text-align:inherit}.rt-table__card-actions{display:flex;justify-content:flex-end}.rt-table__card-skeleton-bar{display:block;width:60%;height:14px}.rt-table__card-skeleton-bar:first-child{width:80%}.rt-table[data-rt-radius=none]{--rt-table-card-radius: var(--rt-radius-none)}.rt-table[data-rt-radius=xs]{--rt-table-card-radius: var(--rt-radius-xs)}.rt-table[data-rt-radius=sm]{--rt-table-card-radius: var(--rt-radius-sm)}.rt-table[data-rt-radius=ms]{--rt-table-card-radius: var(--rt-radius-ms)}.rt-table[data-rt-radius=md]{--rt-table-card-radius: var(--rt-radius-md)}.rt-table[data-rt-radius=lg]{--rt-table-card-radius: var(--rt-radius-lg)}.rt-table[data-rt-radius=xl]{--rt-table-card-radius: var(--rt-radius-xl)}.rt-table[data-rt-radius=\"2xl\"]{--rt-table-card-radius: var(--rt-radius-2xl)}.rt-table[data-rt-radius=full]{--rt-table-card-radius: var(--rt-radius-full)}}\n"],
|
|
1522
1608
|
dependencies: [
|
|
1523
1609
|
{
|
|
1524
1610
|
kind: "directive",
|
|
@@ -1714,12 +1800,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1714
1800
|
"[class.rt-table--fetching]": "fetching()",
|
|
1715
1801
|
"[class.rt-table--empty]": "isEmpty()",
|
|
1716
1802
|
"[class.rt-table--cards]": "showCards()",
|
|
1803
|
+
"[class.rt-table--hidden-start]": "hiddenEdges().start",
|
|
1804
|
+
"[class.rt-table--hidden-end]": "hiddenEdges().end",
|
|
1717
1805
|
"[attr.role]": "hostRole",
|
|
1718
1806
|
"[attr.aria-label]": "ariaLabel()",
|
|
1719
1807
|
"[attr.aria-busy]": "isInitialLoading() || fetching() ? 'true' : null"
|
|
1720
1808
|
},
|
|
1721
1809
|
template: "<ng-container rtBlock=\"rt-table\">\n <ng-content select=\"caption\" />\n <ng-content select=\"colgroup, col\" />\n\n <ng-container cdkColumnDef=\"rtRowActions\">\n <th *cdkHeaderCellDef rtElem=\"actions-header\" cdk-header-cell aria-hidden=\"true\"></th>\n <td *cdkCellDef=\"let row\" rtElem=\"actions-cell\" qa-dataid=\"table-row-actions\" cdk-cell>\n @if (rowActions()?.template; as tpl) {\n @if (row | rtRowHasActions: rowHasActions()) {\n <div rtElem=\"actions-float\">\n <rt-menu>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </rt-menu>\n </div>\n }\n }\n </td>\n </ng-container>\n\n <ng-container headerRowOutlet />\n\n @if (showFilters()) {\n <tr rtElem=\"filter-row\" qa-dataid=\"table-filter-row\">\n @for (cell of filterCells(); track cell.key) {\n <th\n rtElem=\"filter-cell\"\n qa-dataid=\"table-filter-cell\"\n [rtMod]=\"{ actions: cell.actions }\"\n [attr.aria-hidden]=\"cell.actions || null\">\n @if (cell.filter) {\n <rt-table-filter-header\n [propertyName]=\"cell.key\"\n [filter]=\"cell.filter\"\n [filters]=\"filters()\"\n (filtersChange)=\"reportFilters($event)\" />\n }\n </th>\n }\n </tr>\n }\n\n @if (isInitialLoading()) {\n @for (i of skeletonRowIndexes(); track i) {\n <tr rtElem=\"skeleton-row\" qa-dataid=\"table-skeleton-row\">\n @for (col of displayedColumns(); track col) {\n <td rtElem=\"skeleton-cell\">\n <rt-skeleton rtElem=\"skeleton-bar\" />\n </td>\n }\n </tr>\n }\n }\n\n <ng-container rowOutlet />\n <ng-container noDataRowOutlet />\n <ng-container footerRowOutlet />\n\n @if (isEmpty()) {\n <tr rtElem=\"empty-row\" qa-dataid=\"table-empty-row\">\n <td rtElem=\"empty\" [attr.colspan]=\"displayedColumns().length || null\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <rt-empty-state\n rtElem=\"empty-message\"\n qa-dataid=\"table-empty\"\n [icon]=\"emptyIcon()\"\n [title]=\"emptyText()\"\n [description]=\"emptyDescription()\" />\n }\n </td>\n </tr>\n }\n\n @if (showCards()) {\n <div rtElem=\"cards\" qa-dataid=\"table-cards\" role=\"list\">\n @if (isInitialLoading()) {\n @for (i of skeletonRowIndexes(); track i) {\n <article rtElem=\"card\" qa-dataid=\"table-skeleton-card\" [rtMod]=\"{ skeleton: true }\">\n <rt-skeleton rtElem=\"card-skeleton-bar\" />\n <rt-skeleton rtElem=\"card-skeleton-bar\" />\n </article>\n }\n } @else if (isEmpty()) {\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <rt-empty-state\n rtElem=\"empty-message\"\n qa-dataid=\"table-empty\"\n [icon]=\"emptyIcon()\"\n [title]=\"emptyText()\"\n [description]=\"emptyDescription()\" />\n }\n } @else {\n @for (row of cardRows(); track row; let index = $index) {\n <article\n rtElem=\"card\"\n qa-dataid=\"table-card\"\n role=\"listitem\"\n [rtTableCardActivation]=\"index\"\n [rtTableCardActivationEnabled]=\"clickable()\">\n @if (cardTemplate()?.template; as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @else {\n @for (col of cardColumns(); track col.key) {\n <div rtElem=\"card-field\" qa-dataid=\"table-card-field\" [attr.data-key]=\"col.key\">\n <span rtElem=\"card-label\" qa-dataid=\"table-card-label\">{{ col.label }}</span>\n <div rtElem=\"card-value\" qa-dataid=\"table-card-value\">\n <ng-container [ngTemplateOutlet]=\"col.cell\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </div>\n </div>\n }\n @if (rowActions()?.template; as tpl) {\n @if (row | rtRowHasActions: rowHasActions()) {\n <div rtElem=\"card-actions\" qa-dataid=\"table-card-actions\">\n <rt-menu>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </rt-menu>\n </div>\n }\n }\n }\n </article>\n }\n }\n </div>\n }\n</ng-container>\n",
|
|
1722
|
-
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-table{--rt-table-border-width: var(--rt-border-width-thin);--rt-table-card-radius: var(--rt-radius-md);position:relative;display:table;width:100%;background:var(--rt-color-bg
|
|
1810
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-table{--rt-table-border-width: var(--rt-border-width-thin);--rt-table-card-radius: var(--rt-radius-md);--rt-table-row-bg: transparent;--rt-table-pinned-bg: var(--rt-color-table-bg);--rt-table-pinned-shadow-color: var(--rt-color-table-pinned-shadow);--rt-table-pinned-shadow-width: 12px;position:relative;display:table;width:100%;background:var(--rt-color-table-bg);border-collapse:collapse;color:var(--rt-color-text-primary)}.rt-table .cdk-header-row,.rt-table .cdk-row,.rt-table__skeleton-row{height:50px}.rt-table .cdk-header-cell,.rt-table .cdk-cell,.rt-table__filter-cell,.rt-table__skeleton-cell{position:relative;padding:var(--rt-space-2) var(--rt-space-5);border-bottom:var(--rt-table-border-width) solid var(--rt-color-border-subtle);border-left:var(--rt-table-border-width) solid var(--rt-color-border-subtle);font-size:var(--rt-text-sm);font-weight:var(--rt-font-weight-medium);text-align:start;vertical-align:middle}.rt-table .cdk-header-cell[data-align=right],.rt-table .cdk-cell[data-align=right],.rt-table__filter-cell[data-align=right],.rt-table__skeleton-cell[data-align=right],.rt-table .cdk-header-cell[data-align=right] input,.rt-table .cdk-cell[data-align=right] input,.rt-table__filter-cell[data-align=right] input,.rt-table__skeleton-cell[data-align=right] input{text-align:right}.rt-table .cdk-header-cell:first-child,.rt-table .cdk-cell:first-child,.rt-table__filter-cell:first-child,.rt-table__skeleton-cell:first-child{border-left:none}.rt-table .cdk-header-cell{border-top:var(--rt-table-border-width) solid var(--rt-color-border-subtle);background:var(--rt-color-table-bg);color:var(--rt-color-text-muted)}.rt-table .cdk-cell{color:var(--rt-color-text-primary);overflow-wrap:anywhere}.rt-table__filter-row{display:table-row}.rt-table__filter-cell{height:auto;background:var(--rt-color-bg-surface);padding-block:var(--rt-space-1);vertical-align:middle}.rt-table__filter-cell--actions,.rt-table__actions-header.cdk-header-cell{width:0;padding:0;border:none}.rt-table__actions-cell.cdk-cell{position:sticky;z-index:1;right:0;width:0;padding:0;border:none;background:transparent}.rt-table__actions-float{position:absolute;display:flex;height:100%;align-items:center;padding:0 var(--rt-space-2) 0 var(--rt-space-8);background:linear-gradient(to right,transparent 0%,var(--rt-color-bg-hover) 45%);inset:0 0 0 auto;pointer-events:none}.rt-table__actions-float .rt-menu{pointer-events:auto}@media(hover:hover){.rt-table__actions-cell.cdk-cell{visibility:hidden}.cdk-row:hover .rt-table__actions-cell.cdk-cell,.cdk-row:focus-within .rt-table__actions-cell.cdk-cell,.rt-table__actions-cell.cdk-cell:has(.rt-menu--open){visibility:visible}}.rt-table .cdk-row,.rt-table .cdk-footer-row{background:var(--rt-table-row-bg)}.rt-table .cdk-row:hover{--rt-table-row-bg: var(--rt-color-bg-hover)}.rt-table .cdk-row.rt-table__row--danger,.rt-table .cdk-row.rt-table__row--danger:hover{--rt-table-row-bg: var(--rt-color-state-danger-bg)}.rt-table .cdk-cell.cdk-table-sticky,.rt-table .cdk-footer-cell.cdk-table-sticky{background:linear-gradient(var(--rt-table-row-bg),var(--rt-table-row-bg)),var(--rt-table-pinned-bg)}.rt-table .cdk-table-sticky-border-elem-left:after,.rt-table .cdk-table-sticky-border-elem-right:after{position:absolute;top:0;bottom:0;width:var(--rt-table-pinned-shadow-width);pointer-events:none}.rt-table .cdk-table-sticky-border-elem-left:after{left:100%;background:linear-gradient(to right,var(--rt-table-pinned-shadow-color),transparent)}.rt-table .cdk-table-sticky-border-elem-right:after{right:100%;background:linear-gradient(to left,var(--rt-table-pinned-shadow-color),transparent)}.rt-table--hidden-start:dir(ltr) .cdk-table-sticky-border-elem-left:after,.rt-table--hidden-end:dir(ltr) .cdk-table-sticky-border-elem-right:after,.rt-table--hidden-start:dir(rtl) .cdk-table-sticky-border-elem-right:after,.rt-table--hidden-end:dir(rtl) .cdk-table-sticky-border-elem-left:after{content:\"\"}.rt-table--clickable .cdk-row,.rt-table--clickable .rt-table__card{cursor:pointer}.rt-table--clickable .cdk-row:focus-visible,.rt-table--clickable .rt-table__card:focus-visible{outline:2px solid var(--rt-color-action-primary);outline-offset:-2px}.rt-table a{text-decoration:none}.rt-table--density--compact .cdk-header-row,.rt-table--density--compact .cdk-row,.rt-table--density--compact .rt-table__skeleton-row{height:36px}.rt-table--density--compact .cdk-header-cell,.rt-table--density--compact .cdk-cell,.rt-table--density--compact .rt-table__skeleton-cell{padding:var(--rt-space-xs) var(--rt-space-sm)}.rt-table__skeleton-bar{display:block;width:80%;height:14px}.rt-table__empty-row{display:table-row}.rt-table__empty{padding:var(--rt-space-6) var(--rt-space-5);border-bottom:var(--rt-table-border-width) solid var(--rt-color-border-subtle);background:var(--rt-color-table-bg);color:var(--rt-color-text-muted);text-align:center}.rt-table__empty-message{margin:0;font-size:var(--rt-text-sm)}.rt-table__overlay{position:absolute;z-index:1;display:grid;min-height:100%;inset:0;place-items:center;pointer-events:none}.rt-table__overlay-backdrop{position:absolute;background:var(--rt-color-table-bg);inset:0;opacity:.72}.rt-table__overlay-spinner{position:sticky;z-index:1;top:50%;display:flex;align-items:center;justify-content:center;transform:translateY(-50%)}.rt-table__cards{display:none}.rt-table--cards{display:block;min-width:0;max-width:100%}.rt-table--cards .cdk-header-row,.rt-table--cards .cdk-row,.rt-table--cards .rt-table__skeleton-row,.rt-table--cards .rt-table__empty-row,.rt-table--cards .rt-table__filter-row{display:none}.rt-table--cards .rt-table__cards{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-table--cards:not(.rt-table--empty){background:transparent}.rt-table__card{display:flex;flex-direction:column;padding:var(--rt-space-md);border:var(--rt-table-border-width) solid var(--rt-color-border-default);border-radius:var(--rt-table-card-radius);background:var(--rt-color-bg-surface);gap:var(--rt-space-xs)}.rt-table__card-field{display:flex;align-items:baseline;justify-content:space-between;gap:var(--rt-space-md)}.rt-table__card-label{flex:0 0 auto;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-table__card-value{min-width:0;overflow-wrap:anywhere;text-align:right}.rt-table__card-value .cdk-cell{display:inline;height:auto;padding:0;border:none;font:inherit;min-inline-size:0;text-align:inherit}.rt-table__card-actions{display:flex;justify-content:flex-end}.rt-table__card-skeleton-bar{display:block;width:60%;height:14px}.rt-table__card-skeleton-bar:first-child{width:80%}.rt-table[data-rt-radius=none]{--rt-table-card-radius: var(--rt-radius-none)}.rt-table[data-rt-radius=xs]{--rt-table-card-radius: var(--rt-radius-xs)}.rt-table[data-rt-radius=sm]{--rt-table-card-radius: var(--rt-radius-sm)}.rt-table[data-rt-radius=ms]{--rt-table-card-radius: var(--rt-radius-ms)}.rt-table[data-rt-radius=md]{--rt-table-card-radius: var(--rt-radius-md)}.rt-table[data-rt-radius=lg]{--rt-table-card-radius: var(--rt-radius-lg)}.rt-table[data-rt-radius=xl]{--rt-table-card-radius: var(--rt-radius-xl)}.rt-table[data-rt-radius=\"2xl\"]{--rt-table-card-radius: var(--rt-radius-2xl)}.rt-table[data-rt-radius=full]{--rt-table-card-radius: var(--rt-radius-full)}}\n"]
|
|
1723
1811
|
}]
|
|
1724
1812
|
}],
|
|
1725
1813
|
propDecorators: {
|