@raintonic/formaui 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +145 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs +806 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs +86 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs +1757 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs +287 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs +217 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs +161 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs +726 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs +92 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs +107 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs +68 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +55 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button.mjs +241 -0
- package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-card.mjs +270 -0
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs +295 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs +631 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs +1331 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs +41 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs +190 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +266 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs +33 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs +246 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs +482 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs +117 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-input.mjs +327 -0
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-list.mjs +149 -0
- package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs +896 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs +345 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs +139 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs +306 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs +451 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs +148 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs +260 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-select.mjs +1011 -0
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +150 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs +257 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs +50 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs +347 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs +63 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs +317 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs +197 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs +78 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs +644 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs +171 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +140 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +555 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs +314 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs +430 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-core.mjs +62 -0
- package/fesm2022/raintonic-formaui-core.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs +798 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs +391 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs +248 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs +66 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -0
- package/fesm2022/raintonic-formaui.mjs +15 -0
- package/fesm2022/raintonic-formaui.mjs.map +1 -0
- package/llms-full.txt +1627 -0
- package/llms.txt +60 -0
- package/package.json +251 -0
- package/styles/_fonts-entry.scss +3 -0
- package/styles/fonts/dm-mono-400-latin.woff2 +0 -0
- package/styles/fonts/inter-tight-latin-italic.woff2 +0 -0
- package/styles/fonts/inter-tight-latin.woff2 +0 -0
- package/styles/index.scss +127 -0
- package/styles/partials/_constants.scss +29 -0
- package/styles/partials/_fonts.scss +36 -0
- package/styles/partials/_grid.scss +171 -0
- package/styles/partials/_mixins.scss +145 -0
- package/styles/partials/_motion.scss +252 -0
- package/styles/partials/_theme.scss +275 -0
- package/styles/partials/_typography.scss +112 -0
- package/styles/partials/_utilities.scss +480 -0
- package/styles/partials/themes/_dark.scss +254 -0
- package/styles/partials/themes/_light.scss +254 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts +196 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts +62 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts +843 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts +112 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts.map +1 -0
- package/types/raintonic-formaui-components-accordion.d.ts +124 -0
- package/types/raintonic-formaui-components-accordion.d.ts.map +1 -0
- package/types/raintonic-formaui-components-alert.d.ts +143 -0
- package/types/raintonic-formaui-components-alert.d.ts.map +1 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts +193 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -0
- package/types/raintonic-formaui-components-avatar.d.ts +52 -0
- package/types/raintonic-formaui-components-avatar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-badge.d.ts +47 -0
- package/types/raintonic-formaui-components-badge.d.ts.map +1 -0
- package/types/raintonic-formaui-components-big-menu.d.ts +62 -0
- package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts +26 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button-group.d.ts +61 -0
- package/types/raintonic-formaui-components-button-group.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button.d.ts +116 -0
- package/types/raintonic-formaui-components-button.d.ts.map +1 -0
- package/types/raintonic-formaui-components-card.d.ts +191 -0
- package/types/raintonic-formaui-components-card.d.ts.map +1 -0
- package/types/raintonic-formaui-components-checkbox.d.ts +132 -0
- package/types/raintonic-formaui-components-checkbox.d.ts.map +1 -0
- package/types/raintonic-formaui-components-data-table.d.ts +368 -0
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-date-picker.d.ts +341 -0
- package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-divider.d.ts +21 -0
- package/types/raintonic-formaui-components-divider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-drawer.d.ts +48 -0
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts +412 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts.map +1 -0
- package/types/raintonic-formaui-components-empty-state.d.ts +14 -0
- package/types/raintonic-formaui-components-empty-state.d.ts.map +1 -0
- package/types/raintonic-formaui-components-file-upload.d.ts +77 -0
- package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -0
- package/types/raintonic-formaui-components-form-field.d.ts +271 -0
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-components-icon.d.ts +61 -0
- package/types/raintonic-formaui-components-icon.d.ts.map +1 -0
- package/types/raintonic-formaui-components-input.d.ts +149 -0
- package/types/raintonic-formaui-components-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-list.d.ts +48 -0
- package/types/raintonic-formaui-components-list.d.ts.map +1 -0
- package/types/raintonic-formaui-components-menu.d.ts +403 -0
- package/types/raintonic-formaui-components-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-number-input.d.ts +127 -0
- package/types/raintonic-formaui-components-number-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-paginator.d.ts +37 -0
- package/types/raintonic-formaui-components-paginator.d.ts.map +1 -0
- package/types/raintonic-formaui-components-password-input.d.ts +111 -0
- package/types/raintonic-formaui-components-password-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-popover.d.ts +131 -0
- package/types/raintonic-formaui-components-popover.d.ts.map +1 -0
- package/types/raintonic-formaui-components-progressbar.d.ts +111 -0
- package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-radio.d.ts +95 -0
- package/types/raintonic-formaui-components-radio.d.ts.map +1 -0
- package/types/raintonic-formaui-components-select.d.ts +307 -0
- package/types/raintonic-formaui-components-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-side-panel.d.ts +51 -0
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -0
- package/types/raintonic-formaui-components-sidebar.d.ts +174 -0
- package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-skeleton.d.ts +20 -0
- package/types/raintonic-formaui-components-skeleton.d.ts.map +1 -0
- package/types/raintonic-formaui-components-slider.d.ts +108 -0
- package/types/raintonic-formaui-components-slider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-spinner.d.ts +42 -0
- package/types/raintonic-formaui-components-spinner.d.ts.map +1 -0
- package/types/raintonic-formaui-components-stepper.d.ts +126 -0
- package/types/raintonic-formaui-components-stepper.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tab.d.ts +96 -0
- package/types/raintonic-formaui-components-tab.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tag.d.ts +34 -0
- package/types/raintonic-formaui-components-tag.d.ts.map +1 -0
- package/types/raintonic-formaui-components-time-picker.d.ts +172 -0
- package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toggle.d.ts +70 -0
- package/types/raintonic-formaui-components-toggle.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toolbar.d.ts +128 -0
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tooltip.d.ts +268 -0
- package/types/raintonic-formaui-components-tooltip.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-select.d.ts +80 -0
- package/types/raintonic-formaui-components-tree-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-table.d.ts +90 -0
- package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree.d.ts +104 -0
- package/types/raintonic-formaui-components-tree.d.ts.map +1 -0
- package/types/raintonic-formaui-core.d.ts +115 -0
- package/types/raintonic-formaui-core.d.ts.map +1 -0
- package/types/raintonic-formaui-services-dialog.d.ts +451 -0
- package/types/raintonic-formaui-services-dialog.d.ts.map +1 -0
- package/types/raintonic-formaui-services-notification.d.ts +221 -0
- package/types/raintonic-formaui-services-notification.d.ts.map +1 -0
- package/types/raintonic-formaui-services-theme.d.ts +126 -0
- package/types/raintonic-formaui-services-theme.d.ts.map +1 -0
- package/types/raintonic-formaui-test-utils.d.ts +24 -0
- package/types/raintonic-formaui-test-utils.d.ts.map +1 -0
- package/types/raintonic-formaui.d.ts +4 -0
- package/types/raintonic-formaui.d.ts.map +1 -0
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, signal, computed, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import { FuiButtonDirective } from '@raintonic/formaui/components/button';
|
|
8
|
+
import { FuiInputDirective } from '@raintonic/formaui/components/input';
|
|
9
|
+
import { FuiFormFieldComponent } from '@raintonic/formaui/components/form-field';
|
|
10
|
+
import { FuiMenuComponent, FuiMenuTriggerDirective } from '@raintonic/formaui/components/menu';
|
|
11
|
+
import { FuiSelectComponent, FuiOptionComponent } from '@raintonic/formaui/components/select';
|
|
12
|
+
import { FuiTooltipDirective } from '@raintonic/formaui/components/tooltip';
|
|
13
|
+
import { FuiIconComponent } from '@raintonic/formaui/components/icon';
|
|
14
|
+
import { FuiBadgeComponent } from '@raintonic/formaui/components/badge';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Filter operator types
|
|
18
|
+
*/
|
|
19
|
+
var FilterOperator;
|
|
20
|
+
(function (FilterOperator) {
|
|
21
|
+
// String operators
|
|
22
|
+
FilterOperator["CONTAINS"] = "CONTAINS";
|
|
23
|
+
FilterOperator["START_WITH"] = "START_WITH";
|
|
24
|
+
FilterOperator["END_WITH"] = "END_WITH";
|
|
25
|
+
FilterOperator["EQUAL"] = "EQUAL";
|
|
26
|
+
FilterOperator["NOT_EQUAL"] = "NOT_EQUAL";
|
|
27
|
+
// Number and Date operators
|
|
28
|
+
FilterOperator["GREATER"] = "GREATER";
|
|
29
|
+
FilterOperator["GREATER_EQUAL"] = "GREATER_EQUAL";
|
|
30
|
+
FilterOperator["LOWER"] = "LOWER";
|
|
31
|
+
FilterOperator["LOWER_EQUAL"] = "LOWER_EQUAL";
|
|
32
|
+
FilterOperator["BETWEEN"] = "BETWEEN";
|
|
33
|
+
// Boolean operators
|
|
34
|
+
FilterOperator["IS_TRUE"] = "IS_TRUE";
|
|
35
|
+
FilterOperator["IS_FALSE"] = "IS_FALSE";
|
|
36
|
+
})(FilterOperator || (FilterOperator = {}));
|
|
37
|
+
/**
|
|
38
|
+
* @component FuiAdvancedDataTableComponent
|
|
39
|
+
* @selector fui-advanced-data-table
|
|
40
|
+
* @description A feature-rich data table with configurable columns, sticky headers/columns,
|
|
41
|
+
* row selection via checkboxes, sorting, column filtering, row highlighting, and badge-based label rendering.
|
|
42
|
+
*
|
|
43
|
+
* @input config - (required) Table configuration including headers, sticky settings, and row selectability.
|
|
44
|
+
* @input data - Array of row data objects. Default [].
|
|
45
|
+
* @input enableRowHighlight - Whether clicking a row toggles highlight. Default false.
|
|
46
|
+
* @input tableAriaLabel - Accessible label for the table element. Default 'Data table'.
|
|
47
|
+
* @input emptyMessage - Message shown when data is empty. Default 'Nessun dato disponibile'.
|
|
48
|
+
* @input sort - Current sort state: { field, direction } or null.
|
|
49
|
+
* @input filters - Array of active column filters.
|
|
50
|
+
* @output sortChange - Emits when the user changes sort direction on a column.
|
|
51
|
+
* @output filtersChange - Emits when filters are applied or cleared.
|
|
52
|
+
* @output rowDblClick - Emits the row data object on double-click.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <fui-advanced-data-table
|
|
56
|
+
* [config]="tableConfig"
|
|
57
|
+
* [data]="rows"
|
|
58
|
+
* [sort]="currentSort"
|
|
59
|
+
* (sortChange)="onSort($event)"
|
|
60
|
+
* (filtersChange)="onFilter($event)"
|
|
61
|
+
* (rowDblClick)="onRowOpen($event)">
|
|
62
|
+
* </fui-advanced-data-table>
|
|
63
|
+
*/
|
|
64
|
+
class FuiAdvancedDataTableComponent {
|
|
65
|
+
/**
|
|
66
|
+
* Table configuration
|
|
67
|
+
*/
|
|
68
|
+
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
69
|
+
/**
|
|
70
|
+
* Data to display in the table
|
|
71
|
+
*/
|
|
72
|
+
data = input([], ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
73
|
+
/**
|
|
74
|
+
* Track-by function for row rendering performance.
|
|
75
|
+
* Defaults to tracking by index.
|
|
76
|
+
*/
|
|
77
|
+
trackBy = input((index) => index, ...(ngDevMode ? [{ debugName: "trackBy" }] : /* istanbul ignore next */ []));
|
|
78
|
+
/**
|
|
79
|
+
* Enable click-to-highlight feature for rows
|
|
80
|
+
*/
|
|
81
|
+
enableRowHighlight = input(false, ...(ngDevMode ? [{ debugName: "enableRowHighlight" }] : /* istanbul ignore next */ []));
|
|
82
|
+
/**
|
|
83
|
+
* Accessible label for the table
|
|
84
|
+
*/
|
|
85
|
+
tableAriaLabel = input('Data table', ...(ngDevMode ? [{ debugName: "tableAriaLabel" }] : /* istanbul ignore next */ []));
|
|
86
|
+
_liveAnnouncer;
|
|
87
|
+
/**
|
|
88
|
+
* Message shown when the data array is empty. Pass empty string to hide.
|
|
89
|
+
*/
|
|
90
|
+
emptyMessage = input('Nessun dato disponibile', ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
91
|
+
/**
|
|
92
|
+
* Current sort configuration
|
|
93
|
+
*/
|
|
94
|
+
sort = input(null, ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
|
|
95
|
+
/**
|
|
96
|
+
* Event emitted when sort changes
|
|
97
|
+
*/
|
|
98
|
+
sortChange = output();
|
|
99
|
+
/**
|
|
100
|
+
* Current filters
|
|
101
|
+
*/
|
|
102
|
+
filters = input([], ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
103
|
+
/**
|
|
104
|
+
* Event emitted when filters change
|
|
105
|
+
*/
|
|
106
|
+
filtersChange = output();
|
|
107
|
+
/**
|
|
108
|
+
* Row dblClick event
|
|
109
|
+
*/
|
|
110
|
+
rowDblClick = output();
|
|
111
|
+
/**
|
|
112
|
+
* Internal state for selected row indices
|
|
113
|
+
*/
|
|
114
|
+
selectedRows = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
|
|
115
|
+
/**
|
|
116
|
+
* Internal state for highlighted row indices
|
|
117
|
+
*/
|
|
118
|
+
highlightedRows = signal(new Set(), ...(ngDevMode ? [{ debugName: "highlightedRows" }] : /* istanbul ignore next */ []));
|
|
119
|
+
/**
|
|
120
|
+
* Temporary filter state while editing filter menu
|
|
121
|
+
*/
|
|
122
|
+
tempFilterOperator = null;
|
|
123
|
+
tempFilterValue = '';
|
|
124
|
+
tempFilterValue2 = '';
|
|
125
|
+
/**
|
|
126
|
+
* Whether all rows are selected
|
|
127
|
+
*/
|
|
128
|
+
allRowsSelected = computed(() => {
|
|
129
|
+
const dataLength = this.data().length;
|
|
130
|
+
return dataLength > 0 && this.selectedRows().size === dataLength;
|
|
131
|
+
}, ...(ngDevMode ? [{ debugName: "allRowsSelected" }] : /* istanbul ignore next */ []));
|
|
132
|
+
/**
|
|
133
|
+
* Whether some (but not all) rows are selected
|
|
134
|
+
*/
|
|
135
|
+
someRowsSelected = computed(() => {
|
|
136
|
+
const selected = this.selectedRows().size;
|
|
137
|
+
return selected > 0 && selected < this.data().length;
|
|
138
|
+
}, ...(ngDevMode ? [{ debugName: "someRowsSelected" }] : /* istanbul ignore next */ []));
|
|
139
|
+
/**
|
|
140
|
+
* Computed headers with sticky information
|
|
141
|
+
*/
|
|
142
|
+
processedHeaders = computed(() => {
|
|
143
|
+
const headers = this.config().headers;
|
|
144
|
+
const processed = headers.map((header) => ({
|
|
145
|
+
...header,
|
|
146
|
+
isStartSticky: false,
|
|
147
|
+
isEndSticky: false,
|
|
148
|
+
isLastStartSticky: false,
|
|
149
|
+
isFirstEndSticky: false,
|
|
150
|
+
startStickyPosition: 0,
|
|
151
|
+
endStickyPosition: 0,
|
|
152
|
+
}));
|
|
153
|
+
// Process start sticky columns (consecutive from start)
|
|
154
|
+
let startStickyLeft = 0;
|
|
155
|
+
let lastStartStickyIndex = -1;
|
|
156
|
+
for (let i = 0; i < processed.length; i++) {
|
|
157
|
+
if (headers[i].stickyColumnStart) {
|
|
158
|
+
processed[i].isStartSticky = true;
|
|
159
|
+
processed[i].startStickyPosition = startStickyLeft;
|
|
160
|
+
startStickyLeft += 150; // Default column width, will be adjusted by CSS
|
|
161
|
+
lastStartStickyIndex = i;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
// Stop once we find a non-sticky-start column
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// Mark the last sticky-start column for border
|
|
169
|
+
if (lastStartStickyIndex >= 0) {
|
|
170
|
+
processed[lastStartStickyIndex].isLastStartSticky = true;
|
|
171
|
+
}
|
|
172
|
+
// Process end sticky columns (consecutive from end)
|
|
173
|
+
// First, find the start index of consecutive stickyColumnEnd columns from the end
|
|
174
|
+
let endStickyStartIndex = processed.length;
|
|
175
|
+
for (let i = processed.length - 1; i >= 0; i--) {
|
|
176
|
+
if (headers[i].stickyColumnEnd) {
|
|
177
|
+
endStickyStartIndex = i;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
// Stop once we find a non-sticky-end column
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// Now calculate positions for sticky end columns (right position accumulates from rightmost)
|
|
185
|
+
let endStickyRight = 0;
|
|
186
|
+
for (let i = processed.length - 1; i >= endStickyStartIndex; i--) {
|
|
187
|
+
processed[i].isEndSticky = true;
|
|
188
|
+
processed[i].endStickyPosition = endStickyRight;
|
|
189
|
+
endStickyRight += 150; // Default column width, will be adjusted by CSS
|
|
190
|
+
}
|
|
191
|
+
// Mark the first sticky-end column for border
|
|
192
|
+
if (endStickyStartIndex < processed.length) {
|
|
193
|
+
processed[endStickyStartIndex].isFirstEndSticky = true;
|
|
194
|
+
}
|
|
195
|
+
return processed;
|
|
196
|
+
}, ...(ngDevMode ? [{ debugName: "processedHeaders" }] : /* istanbul ignore next */ []));
|
|
197
|
+
/**
|
|
198
|
+
* Get header classes
|
|
199
|
+
*/
|
|
200
|
+
getHeaderClasses(header) {
|
|
201
|
+
const classes = ['fui-advanced-data-table__header-cell'];
|
|
202
|
+
if (header.isStartSticky) {
|
|
203
|
+
classes.push('fui-advanced-data-table__header-cell--sticky-start');
|
|
204
|
+
}
|
|
205
|
+
if (header.isLastStartSticky) {
|
|
206
|
+
classes.push('fui-advanced-data-table__header-cell--sticky-start-edge');
|
|
207
|
+
}
|
|
208
|
+
if (header.isEndSticky) {
|
|
209
|
+
classes.push('fui-advanced-data-table__header-cell--sticky-end');
|
|
210
|
+
}
|
|
211
|
+
if (header.isFirstEndSticky) {
|
|
212
|
+
classes.push('fui-advanced-data-table__header-cell--sticky-end-edge');
|
|
213
|
+
}
|
|
214
|
+
return classes.join(' ');
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get cell classes
|
|
218
|
+
*/
|
|
219
|
+
getCellClasses(header) {
|
|
220
|
+
const classes = ['fui-advanced-data-table__cell'];
|
|
221
|
+
if (header.isStartSticky) {
|
|
222
|
+
classes.push('fui-advanced-data-table__cell--sticky-start');
|
|
223
|
+
}
|
|
224
|
+
if (header.isLastStartSticky) {
|
|
225
|
+
classes.push('fui-advanced-data-table__cell--sticky-start-edge');
|
|
226
|
+
}
|
|
227
|
+
if (header.isEndSticky) {
|
|
228
|
+
classes.push('fui-advanced-data-table__cell--sticky-end');
|
|
229
|
+
}
|
|
230
|
+
if (header.isFirstEndSticky) {
|
|
231
|
+
classes.push('fui-advanced-data-table__cell--sticky-end-edge');
|
|
232
|
+
}
|
|
233
|
+
return classes.join(' ');
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Get header styles for sticky positioning
|
|
237
|
+
*/
|
|
238
|
+
getHeaderStyles(header) {
|
|
239
|
+
const styles = {};
|
|
240
|
+
if (header.isStartSticky) {
|
|
241
|
+
styles['left'] = `${header.startStickyPosition}px`;
|
|
242
|
+
}
|
|
243
|
+
if (header.isEndSticky) {
|
|
244
|
+
styles['right'] = `${header.endStickyPosition}px`;
|
|
245
|
+
}
|
|
246
|
+
return styles;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Get cell styles for sticky positioning
|
|
250
|
+
*/
|
|
251
|
+
getCellStyles(header) {
|
|
252
|
+
return this.getHeaderStyles(header);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Extract value from nested object using dot notation
|
|
256
|
+
*/
|
|
257
|
+
getCellValue(row, columnPath) {
|
|
258
|
+
if (!row || !columnPath)
|
|
259
|
+
return '';
|
|
260
|
+
const keys = columnPath.split('.');
|
|
261
|
+
let value = row;
|
|
262
|
+
for (const key of keys) {
|
|
263
|
+
if (value === null || value === undefined) {
|
|
264
|
+
return '';
|
|
265
|
+
}
|
|
266
|
+
value = value[key];
|
|
267
|
+
}
|
|
268
|
+
return value ?? '';
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Format cell value based on type
|
|
272
|
+
*/
|
|
273
|
+
formatCellValue(value, type) {
|
|
274
|
+
if (value === null || value === undefined || value === '') {
|
|
275
|
+
return '';
|
|
276
|
+
}
|
|
277
|
+
switch (type.toLowerCase()) {
|
|
278
|
+
case 'string':
|
|
279
|
+
return String(value);
|
|
280
|
+
case 'number':
|
|
281
|
+
return typeof value === 'number' ? value.toLocaleString() : String(value);
|
|
282
|
+
case 'boolean':
|
|
283
|
+
return value ? 'Yes' : 'No';
|
|
284
|
+
case 'date':
|
|
285
|
+
if (value instanceof Date) {
|
|
286
|
+
return value.toLocaleDateString();
|
|
287
|
+
}
|
|
288
|
+
return new Date(value).toLocaleDateString();
|
|
289
|
+
default:
|
|
290
|
+
return String(value);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Toggle all rows selection
|
|
295
|
+
*/
|
|
296
|
+
toggleAllRows() {
|
|
297
|
+
const currentlyAllSelected = this.allRowsSelected();
|
|
298
|
+
if (currentlyAllSelected) {
|
|
299
|
+
this.selectedRows.set(new Set());
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
const allIndices = new Set(this.data().map((_, index) => index));
|
|
303
|
+
this.selectedRows.set(allIndices);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Toggle single row selection
|
|
308
|
+
*/
|
|
309
|
+
toggleRow(index) {
|
|
310
|
+
const selected = new Set(this.selectedRows());
|
|
311
|
+
if (selected.has(index)) {
|
|
312
|
+
selected.delete(index);
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
selected.add(index);
|
|
316
|
+
}
|
|
317
|
+
this.selectedRows.set(selected);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Check if a row is selected
|
|
321
|
+
*/
|
|
322
|
+
isRowSelected(index) {
|
|
323
|
+
return this.selectedRows().has(index);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Toggle row highlight (only if enableRowHighlight is true)
|
|
327
|
+
*/
|
|
328
|
+
toggleRowHighlight(index) {
|
|
329
|
+
if (!this.enableRowHighlight()) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
const highlighted = new Set(this.highlightedRows());
|
|
333
|
+
if (highlighted.has(index)) {
|
|
334
|
+
highlighted.delete(index);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
highlighted.add(index);
|
|
338
|
+
}
|
|
339
|
+
this.highlightedRows.set(highlighted);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Check if a row is highlighted
|
|
343
|
+
*/
|
|
344
|
+
isRowHighlighted(index) {
|
|
345
|
+
return this.highlightedRows().has(index);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Get ARIA sort value for a column header
|
|
349
|
+
*/
|
|
350
|
+
getAriaSortValue(field) {
|
|
351
|
+
const currentSort = this.sort();
|
|
352
|
+
// Only return aria-sort for sortable columns that have sort config
|
|
353
|
+
const header = this.config().headers.find((h) => h.field === field);
|
|
354
|
+
if (!header?.hasSort)
|
|
355
|
+
return null;
|
|
356
|
+
if (currentSort?.field !== field)
|
|
357
|
+
return 'none';
|
|
358
|
+
return currentSort.direction === 'ASC' ? 'ascending' : 'descending';
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Handle sort button click
|
|
362
|
+
* Cycles through: ASC → DESC → null (no sort)
|
|
363
|
+
*/
|
|
364
|
+
onSortClick(field) {
|
|
365
|
+
const currentSort = this.sort();
|
|
366
|
+
if (currentSort?.field !== field) {
|
|
367
|
+
// No sort or different field: set to ASC
|
|
368
|
+
this.sortChange.emit({ field, direction: 'ASC' });
|
|
369
|
+
this._announce(`Sorted ascending`);
|
|
370
|
+
}
|
|
371
|
+
else if (currentSort.direction === 'ASC') {
|
|
372
|
+
// Currently ASC: change to DESC
|
|
373
|
+
this.sortChange.emit({ field, direction: 'DESC' });
|
|
374
|
+
this._announce(`Sorted descending`);
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
// Currently DESC: remove sort
|
|
378
|
+
this.sortChange.emit(null);
|
|
379
|
+
this._announce(`Sort removed`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Get sort icon classes for a header
|
|
384
|
+
*/
|
|
385
|
+
getSortIconClasses(field) {
|
|
386
|
+
const currentSort = this.sort();
|
|
387
|
+
const classes = ['fui-advanced-data-table__sort-icon'];
|
|
388
|
+
if (currentSort?.field === field) {
|
|
389
|
+
if (currentSort.direction === 'ASC') {
|
|
390
|
+
classes.push('fui-advanced-data-table__sort-icon--asc');
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
classes.push('fui-advanced-data-table__sort-icon--desc');
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return classes.join(' ');
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Get available filter operators for a column type
|
|
400
|
+
*/
|
|
401
|
+
getFilterOperators(type) {
|
|
402
|
+
const normalizedType = type.toLowerCase();
|
|
403
|
+
switch (normalizedType) {
|
|
404
|
+
case 'string':
|
|
405
|
+
return [
|
|
406
|
+
{ value: FilterOperator.CONTAINS, label: 'Contiene', requiresInput: true, requiresSecondInput: false },
|
|
407
|
+
{ value: FilterOperator.START_WITH, label: 'Inizia con', requiresInput: true, requiresSecondInput: false },
|
|
408
|
+
{ value: FilterOperator.END_WITH, label: 'Finisce con', requiresInput: true, requiresSecondInput: false },
|
|
409
|
+
{ value: FilterOperator.EQUAL, label: 'Uguale', requiresInput: true, requiresSecondInput: false },
|
|
410
|
+
{ value: FilterOperator.NOT_EQUAL, label: 'Diverso', requiresInput: true, requiresSecondInput: false },
|
|
411
|
+
];
|
|
412
|
+
case 'number':
|
|
413
|
+
return [
|
|
414
|
+
{ value: FilterOperator.GREATER, label: 'Maggiore di', requiresInput: true, requiresSecondInput: false },
|
|
415
|
+
{
|
|
416
|
+
value: FilterOperator.GREATER_EQUAL,
|
|
417
|
+
label: 'Maggiore o uguale',
|
|
418
|
+
requiresInput: true,
|
|
419
|
+
requiresSecondInput: false,
|
|
420
|
+
},
|
|
421
|
+
{ value: FilterOperator.LOWER, label: 'Minore di', requiresInput: true, requiresSecondInput: false },
|
|
422
|
+
{
|
|
423
|
+
value: FilterOperator.LOWER_EQUAL,
|
|
424
|
+
label: 'Minore o uguale',
|
|
425
|
+
requiresInput: true,
|
|
426
|
+
requiresSecondInput: false,
|
|
427
|
+
},
|
|
428
|
+
{ value: FilterOperator.BETWEEN, label: 'Compreso tra', requiresInput: true, requiresSecondInput: true },
|
|
429
|
+
{ value: FilterOperator.EQUAL, label: 'Uguale', requiresInput: true, requiresSecondInput: false },
|
|
430
|
+
{ value: FilterOperator.NOT_EQUAL, label: 'Diverso', requiresInput: true, requiresSecondInput: false },
|
|
431
|
+
];
|
|
432
|
+
case 'date':
|
|
433
|
+
return [
|
|
434
|
+
{ value: FilterOperator.EQUAL, label: 'Uguale', requiresInput: true, requiresSecondInput: false },
|
|
435
|
+
{ value: FilterOperator.NOT_EQUAL, label: 'Diverso', requiresInput: true, requiresSecondInput: false },
|
|
436
|
+
{ value: FilterOperator.GREATER, label: 'Dopo', requiresInput: true, requiresSecondInput: false },
|
|
437
|
+
{ value: FilterOperator.GREATER_EQUAL, label: 'Dal', requiresInput: true, requiresSecondInput: false },
|
|
438
|
+
{ value: FilterOperator.LOWER, label: 'Prima', requiresInput: true, requiresSecondInput: false },
|
|
439
|
+
{ value: FilterOperator.LOWER_EQUAL, label: 'Fino al', requiresInput: true, requiresSecondInput: false },
|
|
440
|
+
{ value: FilterOperator.BETWEEN, label: 'Compreso tra', requiresInput: true, requiresSecondInput: true },
|
|
441
|
+
];
|
|
442
|
+
case 'boolean':
|
|
443
|
+
return [
|
|
444
|
+
{ value: FilterOperator.IS_TRUE, label: 'Vero', requiresInput: false, requiresSecondInput: false },
|
|
445
|
+
{ value: FilterOperator.IS_FALSE, label: 'Falso', requiresInput: false, requiresSecondInput: false },
|
|
446
|
+
];
|
|
447
|
+
case 'label':
|
|
448
|
+
return [{ value: FilterOperator.EQUAL, label: 'Uguale', requiresInput: true, requiresSecondInput: false }];
|
|
449
|
+
default:
|
|
450
|
+
return [];
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
getLabelConfig(value, labels) {
|
|
454
|
+
return labels.find((l) => l.value === String(value)) ?? null;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Initialize filter form for a field
|
|
458
|
+
* Called when menu is opened
|
|
459
|
+
*/
|
|
460
|
+
initFilterForm(field, type) {
|
|
461
|
+
if (type === 'label') {
|
|
462
|
+
const existingFilter = this.filters().find((f) => f.field === field);
|
|
463
|
+
this.tempFilterOperator = FilterOperator.EQUAL;
|
|
464
|
+
this.tempFilterValue = existingFilter ? String(existingFilter.value || '') : '';
|
|
465
|
+
this.tempFilterValue2 = '';
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
// Check if there's an existing filter for this field
|
|
469
|
+
const existingFilter = this.filters().find((f) => f.field === field);
|
|
470
|
+
if (existingFilter) {
|
|
471
|
+
this.tempFilterOperator = existingFilter.operator;
|
|
472
|
+
if (Array.isArray(existingFilter.value)) {
|
|
473
|
+
this.tempFilterValue = String(existingFilter.value[0] || '');
|
|
474
|
+
this.tempFilterValue2 = String(existingFilter.value[1] || '');
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
this.tempFilterValue = String(existingFilter.value || '');
|
|
478
|
+
this.tempFilterValue2 = '';
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
// Set default operator for the type
|
|
483
|
+
const operators = this.getFilterOperators(type);
|
|
484
|
+
this.tempFilterOperator = operators[0]?.value || null;
|
|
485
|
+
this.tempFilterValue = '';
|
|
486
|
+
this.tempFilterValue2 = '';
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Reset filter form
|
|
491
|
+
*/
|
|
492
|
+
resetFilterForm() {
|
|
493
|
+
this.tempFilterOperator = null;
|
|
494
|
+
this.tempFilterValue = '';
|
|
495
|
+
this.tempFilterValue2 = '';
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Apply filter for a field
|
|
499
|
+
*/
|
|
500
|
+
applyFilter(field, type, menu) {
|
|
501
|
+
const operator = this.tempFilterOperator;
|
|
502
|
+
if (!operator)
|
|
503
|
+
return;
|
|
504
|
+
const operatorConfig = this.getFilterOperators(type).find((op) => op.value === operator);
|
|
505
|
+
if (!operatorConfig)
|
|
506
|
+
return;
|
|
507
|
+
let value;
|
|
508
|
+
// For boolean operators, no input is needed
|
|
509
|
+
if (!operatorConfig.requiresInput) {
|
|
510
|
+
value = operator === FilterOperator.IS_TRUE;
|
|
511
|
+
}
|
|
512
|
+
// For BETWEEN operator, use array with two values
|
|
513
|
+
else if (operatorConfig.requiresSecondInput) {
|
|
514
|
+
const val1 = this.parseValueByType(this.tempFilterValue, type);
|
|
515
|
+
const val2 = this.parseValueByType(this.tempFilterValue2, type);
|
|
516
|
+
value = [val1, val2];
|
|
517
|
+
}
|
|
518
|
+
// For single value operators
|
|
519
|
+
else {
|
|
520
|
+
value = this.parseValueByType(this.tempFilterValue, type);
|
|
521
|
+
}
|
|
522
|
+
// Update filters array
|
|
523
|
+
const currentFilters = this.filters().filter((f) => f.field !== field);
|
|
524
|
+
const newFilter = { field, operator, value };
|
|
525
|
+
this.filtersChange.emit([...currentFilters, newFilter]);
|
|
526
|
+
this.resetFilterForm();
|
|
527
|
+
this._announce(`Filter applied`);
|
|
528
|
+
menu?.close();
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Clear filter for a field
|
|
532
|
+
*/
|
|
533
|
+
clearFilter(field, menu) {
|
|
534
|
+
const currentFilters = this.filters().filter((f) => f.field !== field);
|
|
535
|
+
this.filtersChange.emit(currentFilters);
|
|
536
|
+
this.resetFilterForm();
|
|
537
|
+
this._announce(`Filter cleared`);
|
|
538
|
+
menu?.close();
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Parse value by column type
|
|
542
|
+
*/
|
|
543
|
+
parseValueByType(value, type) {
|
|
544
|
+
const normalizedType = type.toLowerCase();
|
|
545
|
+
switch (normalizedType) {
|
|
546
|
+
case 'number':
|
|
547
|
+
return Number(value);
|
|
548
|
+
case 'date':
|
|
549
|
+
return new Date(value);
|
|
550
|
+
case 'label':
|
|
551
|
+
return value;
|
|
552
|
+
default:
|
|
553
|
+
return value;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Announce a message to screen readers via live region
|
|
558
|
+
*/
|
|
559
|
+
_announce(message) {
|
|
560
|
+
if (this._liveAnnouncer?.nativeElement) {
|
|
561
|
+
this._liveAnnouncer.nativeElement.textContent = message;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Check if a field has an active filter
|
|
566
|
+
*/
|
|
567
|
+
hasActiveFilter(field) {
|
|
568
|
+
return this.filters().some((f) => f.field === field);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Get filter icon classes
|
|
572
|
+
*/
|
|
573
|
+
getFilterIconClasses(field) {
|
|
574
|
+
const classes = ['fui-advanced-data-table__filter-icon'];
|
|
575
|
+
if (this.hasActiveFilter(field)) {
|
|
576
|
+
classes.push('fui-advanced-data-table__filter-icon--active');
|
|
577
|
+
}
|
|
578
|
+
return classes.join(' ');
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Check if current operator requires second input
|
|
582
|
+
*/
|
|
583
|
+
requiresSecondInput(type) {
|
|
584
|
+
const operator = this.tempFilterOperator;
|
|
585
|
+
if (!operator)
|
|
586
|
+
return false;
|
|
587
|
+
const operatorConfig = this.getFilterOperators(type).find((op) => op.value === operator);
|
|
588
|
+
return operatorConfig?.requiresSecondInput ?? false;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Check if current operator requires any input
|
|
592
|
+
*/
|
|
593
|
+
requiresInput(type) {
|
|
594
|
+
const operator = this.tempFilterOperator;
|
|
595
|
+
if (!operator)
|
|
596
|
+
return false;
|
|
597
|
+
const operatorConfig = this.getFilterOperators(type).find((op) => op.value === operator);
|
|
598
|
+
return operatorConfig?.requiresInput ?? false;
|
|
599
|
+
}
|
|
600
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiAdvancedDataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
601
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiAdvancedDataTableComponent, isStandalone: true, selector: "fui-advanced-data-table", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, enableRowHighlight: { classPropertyName: "enableRowHighlight", publicName: "enableRowHighlight", isSignal: true, isRequired: false, transformFunction: null }, tableAriaLabel: { classPropertyName: "tableAriaLabel", publicName: "tableAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange", filtersChange: "filtersChange", rowDblClick: "rowDblClick" }, host: { classAttribute: "fui-advanced-data-table" }, viewQueries: [{ propertyName: "_liveAnnouncer", first: true, predicate: ["liveAnnouncer"], descendants: true }], ngImport: i0, template: "<div class=\"fui-advanced-data-table__wrapper\">\r\n <!-- Live region for sort/filter announcements -->\r\n <div class=\"fui-sr-only\" aria-live=\"polite\" aria-atomic=\"true\" #liveAnnouncer></div>\r\n <table\r\n class=\"fui-advanced-data-table__table\"\r\n role=\"grid\"\r\n [attr.aria-label]=\"tableAriaLabel()\"\r\n [attr.aria-rowcount]=\"data().length\"\r\n >\r\n <!-- Table Header -->\r\n <thead\r\n class=\"fui-advanced-data-table__header\"\r\n [class.fui-advanced-data-table__header--sticky]=\"config().headerSticky\"\r\n >\r\n <tr class=\"fui-advanced-data-table__header-row\">\r\n <!-- Selection Checkbox Column -->\r\n @if (config().areRowsSelectable) {\r\n <th\r\n scope=\"col\"\r\n class=\"fui-advanced-data-table__header-cell fui-advanced-data-table__header-cell--checkbox\"\r\n [class.fui-advanced-data-table__header-cell--sticky-start]=\"\r\n processedHeaders()[0] && processedHeaders()[0].isStartSticky\r\n \"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"fui-advanced-data-table__checkbox\"\r\n [checked]=\"allRowsSelected()\"\r\n [indeterminate]=\"someRowsSelected()\"\r\n (change)=\"toggleAllRows()\"\r\n aria-label=\"Select all rows\"\r\n />\r\n </th>\r\n }\r\n\r\n <!-- Data Columns -->\r\n @for (header of processedHeaders(); track header.field) {\r\n <th\r\n scope=\"col\"\r\n [class]=\"getHeaderClasses(header)\"\r\n [ngStyle]=\"getHeaderStyles(header)\"\r\n [attr.aria-sort]=\"getAriaSortValue(header.field)\"\r\n >\r\n <div class=\"fui-advanced-data-table__header-content\">\r\n <span class=\"fui-advanced-data-table__header-label\">{{ header.label }}</span>\r\n\r\n @if (header.hasSort) {\r\n <button\r\n type=\"button\"\r\n class=\"fui-advanced-data-table__sort-button\"\r\n (click)=\"onSortClick(header.field)\"\r\n [attr.aria-label]=\"'Sort by ' + header.label\"\r\n fuiTooltip=\"Ordina\"\r\n fuiTooltipSize=\"sm\"\r\n fuiTooltipPosition=\"bottom\"\r\n >\r\n <svg\r\n [class]=\"getSortIconClasses(header.field)\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M8 3L12 7H4L8 3Z\" />\r\n <path d=\"M8 13L4 9H12L8 13Z\" />\r\n </svg>\r\n </button>\r\n }\r\n\r\n @if (header.hasFilter) {\r\n <button\r\n type=\"button\"\r\n class=\"fui-advanced-data-table__filter-button\"\r\n fuiMenuTrigger\r\n [menuTriggerFor]=\"filterMenu\"\r\n [menuTriggerData]=\"{ field: header.field, type: header.type }\"\r\n [attr.aria-label]=\"'Filter ' + header.label\"\r\n fuiTooltip=\"Filtra\"\r\n fuiTooltipSize=\"sm\"\r\n fuiTooltipPosition=\"bottom\"\r\n >\r\n <svg\r\n [class]=\"getFilterIconClasses(header.field)\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M2 2L6 8V13L10 15V8L14 2H2Z\" />\r\n </svg>\r\n </button>\r\n\r\n <fui-menu\r\n #filterMenu\r\n position=\"bottom-end\"\r\n size=\"md\"\r\n (openChange)=\"$event && initFilterForm(header.field, header.type)\"\r\n [closeOnClickOutside]=\"true\"\r\n >\r\n <div class=\"fui-advanced-data-table__filter-menu-content\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"fui-text-xs\">{{ header.label }}</div>\r\n @if (header.type !== 'label') {\r\n <!-- Operator Selection -->\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <fui-select [(ngModel)]=\"tempFilterOperator\" placeholder=\"Seleziona operatore\">\r\n @for (operator of getFilterOperators(header.type); track operator.value) {\r\n <fui-option [value]=\"operator.value\">\r\n {{ operator.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n </fui-form-field>\r\n\r\n <!-- Value Input(s) -->\r\n @if (requiresInput(header.type)) {\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <input\r\n fuiInput\r\n [type]=\"header.type === 'number' ? 'number' : header.type === 'date' ? 'date' : 'text'\"\r\n [(ngModel)]=\"tempFilterValue\"\r\n placeholder=\"Inserisci valore\"\r\n />\r\n </fui-form-field>\r\n\r\n @if (requiresSecondInput(header.type)) {\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <input\r\n fuiInput\r\n [type]=\"header.type === 'number' ? 'number' : header.type === 'date' ? 'date' : 'text'\"\r\n [(ngModel)]=\"tempFilterValue2\"\r\n placeholder=\"Inserisci valore finale\"\r\n />\r\n </fui-form-field>\r\n }\r\n }\r\n } @else {\r\n <!-- Label filter: select dropdown -->\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <fui-select [(ngModel)]=\"tempFilterValue\" placeholder=\"Seleziona valore\">\r\n @for (labelOpt of header.labels ?? []; track labelOpt.value) {\r\n <fui-option [value]=\"labelOpt.value\">\r\n {{ labelOpt.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n </fui-form-field>\r\n }\r\n\r\n <!-- Actions -->\r\n <div class=\"fui-advanced-data-table__filter-actions\">\r\n <button\r\n fuiButton\r\n variant=\"primary\"\r\n size=\"sm\"\r\n (click)=\"applyFilter(header.field, header.type, filterMenu)\"\r\n >\r\n Applica\r\n </button>\r\n <button fuiButton variant=\"outline\" size=\"sm\" (click)=\"clearFilter(header.field, filterMenu)\">\r\n Pulisci\r\n </button>\r\n </div>\r\n </div>\r\n </fui-menu>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <!-- Table Body -->\r\n <tbody class=\"fui-advanced-data-table__body\">\r\n @if (data().length === 0 && emptyMessage()) {\r\n <tr class=\"fui-advanced-data-table__row fui-advanced-data-table__row--empty\">\r\n <td\r\n class=\"fui-advanced-data-table__cell fui-advanced-data-table__cell--empty\"\r\n [attr.colspan]=\"processedHeaders().length + (config().areRowsSelectable ? 1 : 0)\"\r\n >\r\n <div class=\"fui-advanced-data-table__empty-state\">\r\n <fui-icon\r\n name=\"magnifying-glass\"\r\n class=\"fui-advanced-data-table__empty-state-icon\"\r\n aria-hidden=\"true\"\r\n ></fui-icon>\r\n {{ emptyMessage() }}\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n @for (row of data(); track trackBy()($index, row)) {\r\n <tr\r\n (dblclick)=\"rowDblClick.emit(row)\"\r\n class=\"fui-advanced-data-table__row\"\r\n [class.fui-advanced-data-table__row--selected]=\"isRowSelected($index)\"\r\n [class.fui-advanced-data-table__row--highlighted]=\"isRowHighlighted($index)\"\r\n [class.fui-advanced-data-table__row--clickable]=\"enableRowHighlight()\"\r\n [attr.aria-selected]=\"config().areRowsSelectable ? isRowSelected($index) : null\"\r\n [attr.aria-rowindex]=\"$index + 2\"\r\n (click)=\"toggleRowHighlight($index)\"\r\n >\r\n <!-- Selection Checkbox -->\r\n @if (config().areRowsSelectable) {\r\n <td\r\n class=\"fui-advanced-data-table__cell fui-advanced-data-table__cell--checkbox\"\r\n [class.fui-advanced-data-table__cell--sticky-start]=\"\r\n processedHeaders()[0] && processedHeaders()[0].isStartSticky\r\n \"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"fui-advanced-data-table__checkbox\"\r\n [checked]=\"isRowSelected($index)\"\r\n (change)=\"toggleRow($index)\"\r\n [attr.aria-label]=\"'Select row ' + ($index + 1)\"\r\n />\r\n </td>\r\n }\r\n\r\n <!-- Data Cells -->\r\n @for (header of processedHeaders(); track header.field) {\r\n <td [class]=\"getCellClasses(header)\" [ngStyle]=\"getCellStyles(header)\">\r\n @if (header.type === 'boolean') {\r\n @if (getCellValue(row, header.field)) {\r\n <fui-icon name=\"check-circle\" class=\"fui-advanced-data-table__bool-icon--true\"></fui-icon>\r\n } @else {\r\n <fui-icon name=\"x-circle\" class=\"fui-advanced-data-table__bool-icon--false\"></fui-icon>\r\n }\r\n } @else if (header.type === 'label') {\r\n @let labelConfig = getLabelConfig(getCellValue(row, header.field), header.labels ?? []);\r\n @if (labelConfig) {\r\n <fui-badge\r\n [label]=\"labelConfig.label\"\r\n [customColor]=\"labelConfig.color\"\r\n [icon]=\"labelConfig.icon ?? null\"\r\n size=\"sm\"\r\n />\r\n } @else {\r\n <fui-badge [label]=\"'' + getCellValue(row, header.field)\" variant=\"info\" size=\"sm\" />\r\n }\r\n } @else {\r\n {{ formatCellValue(getCellValue(row, header.field), header.type) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-advanced-data-table{--fui-table-font-size: var(--fui-font-size-sm, .875rem);--fui-table-header-bg: var(--fui-surface-01);--fui-table-row-bg: var(--fui-surface-00);--fui-table-row-hover-bg: var(--fui-surface-02);--fui-table-row-height: 3rem;--fui-table-cell-padding-y: .5rem;--fui-table-cell-padding-x: 1rem;--fui-table-border-color: var(--fui-border-color);display:block;width:100%;position:relative}.fui-advanced-data-table__wrapper{width:100%;overflow-x:auto;overflow-y:visible;position:relative}.fui-advanced-data-table__wrapper::-webkit-scrollbar{height:8px}.fui-advanced-data-table__wrapper::-webkit-scrollbar-track{background:var(--fui-surface-01);border-radius:var(--fui-border-radius-sm)}.fui-advanced-data-table__wrapper::-webkit-scrollbar-thumb{background:var(--fui-border-color);border-radius:var(--fui-border-radius-sm)}.fui-advanced-data-table__wrapper::-webkit-scrollbar-thumb:hover{background:var(--fui-text-secondary)}.fui-advanced-data-table__table{width:100%;border-collapse:separate;border-spacing:0;font-family:var(--fui-font-family-sans);font-size:var(--fui-table-font-size);color:var(--fui-text-primary);background-color:var(--fui-table-row-bg)}.fui-advanced-data-table__header{background-color:var(--fui-table-header-bg);border-bottom:1px solid var(--fui-table-border-color)}.fui-advanced-data-table__header--sticky{position:sticky;top:0;z-index:10}.fui-advanced-data-table__header-row{height:var(--fui-table-row-height)}.fui-advanced-data-table__header-row .formaui-advanced-data-table__header-cell:last-child{border-right:none}.fui-advanced-data-table__header-cell{padding:var(--fui-table-cell-padding-y) var(--fui-table-cell-padding-x);text-align:left;font-weight:var(--fui-font-weight-semibold, 600);color:var(--fui-text-secondary);background-color:var(--fui-table-header-bg);border-right:1px solid var(--fui-border-color);border-bottom:1px solid var(--fui-border-color);white-space:nowrap;-webkit-user-select:none;user-select:none;position:relative;box-shadow:0 1.19px 3.57px #1018281a}.fui-advanced-data-table__header-cell--checkbox{width:48px;min-width:48px;max-width:48px;padding:.5rem;text-align:center}.fui-advanced-data-table__header-cell--sticky-start{position:sticky;z-index:11;background-color:var(--fui-surface-01)}.fui-advanced-data-table__header-cell--sticky-start-edge:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background:linear-gradient(to right,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__header-cell--sticky-end{position:sticky;z-index:11;background-color:var(--fui-surface-01)}.fui-advanced-data-table__header-cell--sticky-end-edge:before{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background:linear-gradient(to left,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__header-content{display:flex;align-items:center;gap:.25rem}.fui-advanced-data-table__header-label{flex:1;overflow:hidden;text-overflow:ellipsis}.fui-advanced-data-table__sort-button,.fui-advanced-data-table__filter-button{display:inline-flex;align-items:center;justify-content:center;padding:.125rem;border:none;background:transparent;color:var(--fui-text-secondary);cursor:pointer;border-radius:var(--fui-border-radius-sm);transition:all var(--fui-duration-fast-02, .15s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__sort-button:hover,.fui-advanced-data-table__filter-button:hover{color:var(--fui-text-primary);background-color:var(--fui-surface-02)}.fui-advanced-data-table__sort-button:focus-visible,.fui-advanced-data-table__filter-button:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-advanced-data-table__sort-icon,.fui-advanced-data-table__filter-icon{width:16px;height:16px}.fui-advanced-data-table__sort-icon{opacity:.6;transition:opacity var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__sort-icon path{transition:opacity var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__sort-icon--asc{opacity:1;color:var(--fui-primary)}.fui-advanced-data-table__sort-icon--asc path:first-child{opacity:1}.fui-advanced-data-table__sort-icon--asc path:last-child{opacity:.3}.fui-advanced-data-table__sort-icon--desc{opacity:1;color:var(--fui-primary)}.fui-advanced-data-table__sort-icon--desc path:first-child{opacity:.3}.fui-advanced-data-table__sort-icon--desc path:last-child{opacity:1}.fui-advanced-data-table__filter-icon{opacity:.6;transition:all var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__filter-icon--active{opacity:1;color:var(--fui-primary)}.fui-advanced-data-table__filter-menu-content{display:flex;flex-direction:column;gap:.75rem;padding:.75rem;min-width:280px}.fui-advanced-data-table__filter-select{width:100%}.fui-advanced-data-table__filter-actions{display:flex;gap:.25rem;justify-content:flex-end;margin-top:.25rem}.fui-advanced-data-table__body{background-color:var(--fui-surface-00)}.fui-advanced-data-table__row{height:var(--fui-table-row-height);background-color:var(--fui-table-row-bg);border-bottom:1px solid var(--fui-table-border-color);transition:background-color var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__row:hover{background-color:var(--fui-table-row-hover-bg)}.fui-advanced-data-table__row--clickable{cursor:pointer}.fui-advanced-data-table__row--selected{background-color:var(--fui-primary-10)}.fui-advanced-data-table__row--selected:hover,.fui-advanced-data-table__row--highlighted,.fui-advanced-data-table__row--highlighted:hover{background-color:var(--fui-primary-20)}.fui-advanced-data-table__row--empty{height:auto}.fui-advanced-data-table__row--empty:hover{background-color:transparent}.fui-advanced-data-table__row .formaui-advanced-data-table__cell:last-child{border-right:none}.fui-advanced-data-table__cell{padding:var(--fui-table-cell-padding-y) var(--fui-table-cell-padding-x);color:var(--fui-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;position:relative;border-bottom:1px solid var(--fui-table-border-color);border-right:1px solid var(--fui-table-border-color)}.fui-advanced-data-table__cell--checkbox{width:48px;min-width:48px;max-width:48px;padding:.5rem;text-align:center}.fui-advanced-data-table__cell--empty{padding:2.5rem 1rem;text-align:center;color:var(--fui-text-secondary);white-space:normal;border-bottom:none}.fui-advanced-data-table__cell--sticky-start{position:sticky;z-index:9;background-color:inherit}.fui-advanced-data-table__cell--sticky-start-edge:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background:linear-gradient(to right,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__cell--sticky-end{position:sticky;z-index:9;background-color:inherit}.fui-advanced-data-table__cell--sticky-end-edge:before{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background:linear-gradient(to left,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__checkbox{width:18px;height:18px;cursor:pointer;accent-color:var(--fui-primary)}.fui-advanced-data-table__checkbox:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-advanced-data-table__empty-state{padding:2.5rem;text-align:center;color:var(--fui-text-secondary);font-size:var(--fui-font-size-md, 1rem);display:flex;flex-direction:column;align-items:center;gap:.75rem}.fui-advanced-data-table__empty-state-icon{font-size:var(--fui-font-size-09);color:var(--fui-text-secondary);opacity:.5}.fui-advanced-data-table__bool-icon--true{color:var(--fui-success)}.fui-advanced-data-table__bool-icon--false{color:var(--fui-danger)}@media(max-width:768px){.fui-advanced-data-table__table{font-size:var(--fui-font-size-xs, .75rem)}.fui-advanced-data-table__header-cell,.fui-advanced-data-table__cell{padding:.25rem .5rem;max-width:200px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FuiFormFieldComponent, selector: "fui-form-field", inputs: ["readOnly", "appearance", "hideRequiredMarker", "hideSubscript"] }, { kind: "directive", type: FuiInputDirective, selector: "input[fuiInput], textarea[fuiInput], select[fuiInput]", inputs: ["type", "placeholder", "readonly", "maxlength", "minlength", "pattern", "errorStateMatcher", "disabledInput"], outputs: ["valueChange"] }, { kind: "directive", type: FuiButtonDirective, selector: "button[fuiButton], a[fuiButton]", inputs: ["variant", "size", "disabled", "fullWidth", "loading", "iconOnly", "aria-label", "type"] }, { kind: "component", type: FuiMenuComponent, selector: "fui-menu", inputs: ["position", "size", "closeOnClickOutside", "closeOnEscape", "disabled", "attachToBody"], outputs: ["openChange", "itemSelected"] }, { kind: "directive", type: FuiMenuTriggerDirective, selector: "[fuiMenuTrigger]", inputs: ["menuTriggerFor", "menuTriggerData"] }, { kind: "component", type: FuiSelectComponent, selector: "fui-select", inputs: ["placeholder", "disabled", "readonly", "multiple", "errorStateMatcher", "compareWith"], outputs: ["valueChange", "selectionChange", "openedChange"] }, { kind: "component", type: FuiOptionComponent, selector: "fui-option", inputs: ["value", "disabled"], outputs: ["selectionChange"] }, { kind: "directive", type: FuiTooltipDirective, selector: "[fuiTooltip]", inputs: ["fuiTooltip", "fuiTooltipPosition", "fuiTooltipSize", "fuiTooltipTrigger", "fuiTooltipShowDelay", "fuiTooltipHideDelay", "fuiTooltipDisabled", "fuiTooltipMaxWidth", "fuiTooltipOffset", "fuiTooltipArrow", "fuiTooltipShow"] }, { kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }, { kind: "component", type: FuiBadgeComponent, selector: "fui-badge", inputs: ["label", "icon", "customColor", "size", "variant", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
602
|
+
}
|
|
603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiAdvancedDataTableComponent, decorators: [{
|
|
604
|
+
type: Component,
|
|
605
|
+
args: [{ selector: 'fui-advanced-data-table', standalone: true, imports: [
|
|
606
|
+
CommonModule,
|
|
607
|
+
FormsModule,
|
|
608
|
+
FuiFormFieldComponent,
|
|
609
|
+
FuiInputDirective,
|
|
610
|
+
FuiButtonDirective,
|
|
611
|
+
FuiMenuComponent,
|
|
612
|
+
FuiMenuTriggerDirective,
|
|
613
|
+
FuiSelectComponent,
|
|
614
|
+
FuiOptionComponent,
|
|
615
|
+
FuiTooltipDirective,
|
|
616
|
+
FuiIconComponent,
|
|
617
|
+
FuiBadgeComponent,
|
|
618
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
619
|
+
class: 'fui-advanced-data-table',
|
|
620
|
+
}, template: "<div class=\"fui-advanced-data-table__wrapper\">\r\n <!-- Live region for sort/filter announcements -->\r\n <div class=\"fui-sr-only\" aria-live=\"polite\" aria-atomic=\"true\" #liveAnnouncer></div>\r\n <table\r\n class=\"fui-advanced-data-table__table\"\r\n role=\"grid\"\r\n [attr.aria-label]=\"tableAriaLabel()\"\r\n [attr.aria-rowcount]=\"data().length\"\r\n >\r\n <!-- Table Header -->\r\n <thead\r\n class=\"fui-advanced-data-table__header\"\r\n [class.fui-advanced-data-table__header--sticky]=\"config().headerSticky\"\r\n >\r\n <tr class=\"fui-advanced-data-table__header-row\">\r\n <!-- Selection Checkbox Column -->\r\n @if (config().areRowsSelectable) {\r\n <th\r\n scope=\"col\"\r\n class=\"fui-advanced-data-table__header-cell fui-advanced-data-table__header-cell--checkbox\"\r\n [class.fui-advanced-data-table__header-cell--sticky-start]=\"\r\n processedHeaders()[0] && processedHeaders()[0].isStartSticky\r\n \"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"fui-advanced-data-table__checkbox\"\r\n [checked]=\"allRowsSelected()\"\r\n [indeterminate]=\"someRowsSelected()\"\r\n (change)=\"toggleAllRows()\"\r\n aria-label=\"Select all rows\"\r\n />\r\n </th>\r\n }\r\n\r\n <!-- Data Columns -->\r\n @for (header of processedHeaders(); track header.field) {\r\n <th\r\n scope=\"col\"\r\n [class]=\"getHeaderClasses(header)\"\r\n [ngStyle]=\"getHeaderStyles(header)\"\r\n [attr.aria-sort]=\"getAriaSortValue(header.field)\"\r\n >\r\n <div class=\"fui-advanced-data-table__header-content\">\r\n <span class=\"fui-advanced-data-table__header-label\">{{ header.label }}</span>\r\n\r\n @if (header.hasSort) {\r\n <button\r\n type=\"button\"\r\n class=\"fui-advanced-data-table__sort-button\"\r\n (click)=\"onSortClick(header.field)\"\r\n [attr.aria-label]=\"'Sort by ' + header.label\"\r\n fuiTooltip=\"Ordina\"\r\n fuiTooltipSize=\"sm\"\r\n fuiTooltipPosition=\"bottom\"\r\n >\r\n <svg\r\n [class]=\"getSortIconClasses(header.field)\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M8 3L12 7H4L8 3Z\" />\r\n <path d=\"M8 13L4 9H12L8 13Z\" />\r\n </svg>\r\n </button>\r\n }\r\n\r\n @if (header.hasFilter) {\r\n <button\r\n type=\"button\"\r\n class=\"fui-advanced-data-table__filter-button\"\r\n fuiMenuTrigger\r\n [menuTriggerFor]=\"filterMenu\"\r\n [menuTriggerData]=\"{ field: header.field, type: header.type }\"\r\n [attr.aria-label]=\"'Filter ' + header.label\"\r\n fuiTooltip=\"Filtra\"\r\n fuiTooltipSize=\"sm\"\r\n fuiTooltipPosition=\"bottom\"\r\n >\r\n <svg\r\n [class]=\"getFilterIconClasses(header.field)\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M2 2L6 8V13L10 15V8L14 2H2Z\" />\r\n </svg>\r\n </button>\r\n\r\n <fui-menu\r\n #filterMenu\r\n position=\"bottom-end\"\r\n size=\"md\"\r\n (openChange)=\"$event && initFilterForm(header.field, header.type)\"\r\n [closeOnClickOutside]=\"true\"\r\n >\r\n <div class=\"fui-advanced-data-table__filter-menu-content\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"fui-text-xs\">{{ header.label }}</div>\r\n @if (header.type !== 'label') {\r\n <!-- Operator Selection -->\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <fui-select [(ngModel)]=\"tempFilterOperator\" placeholder=\"Seleziona operatore\">\r\n @for (operator of getFilterOperators(header.type); track operator.value) {\r\n <fui-option [value]=\"operator.value\">\r\n {{ operator.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n </fui-form-field>\r\n\r\n <!-- Value Input(s) -->\r\n @if (requiresInput(header.type)) {\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <input\r\n fuiInput\r\n [type]=\"header.type === 'number' ? 'number' : header.type === 'date' ? 'date' : 'text'\"\r\n [(ngModel)]=\"tempFilterValue\"\r\n placeholder=\"Inserisci valore\"\r\n />\r\n </fui-form-field>\r\n\r\n @if (requiresSecondInput(header.type)) {\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <input\r\n fuiInput\r\n [type]=\"header.type === 'number' ? 'number' : header.type === 'date' ? 'date' : 'text'\"\r\n [(ngModel)]=\"tempFilterValue2\"\r\n placeholder=\"Inserisci valore finale\"\r\n />\r\n </fui-form-field>\r\n }\r\n }\r\n } @else {\r\n <!-- Label filter: select dropdown -->\r\n <fui-form-field [hideSubscript]=\"true\">\r\n <fui-select [(ngModel)]=\"tempFilterValue\" placeholder=\"Seleziona valore\">\r\n @for (labelOpt of header.labels ?? []; track labelOpt.value) {\r\n <fui-option [value]=\"labelOpt.value\">\r\n {{ labelOpt.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n </fui-form-field>\r\n }\r\n\r\n <!-- Actions -->\r\n <div class=\"fui-advanced-data-table__filter-actions\">\r\n <button\r\n fuiButton\r\n variant=\"primary\"\r\n size=\"sm\"\r\n (click)=\"applyFilter(header.field, header.type, filterMenu)\"\r\n >\r\n Applica\r\n </button>\r\n <button fuiButton variant=\"outline\" size=\"sm\" (click)=\"clearFilter(header.field, filterMenu)\">\r\n Pulisci\r\n </button>\r\n </div>\r\n </div>\r\n </fui-menu>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <!-- Table Body -->\r\n <tbody class=\"fui-advanced-data-table__body\">\r\n @if (data().length === 0 && emptyMessage()) {\r\n <tr class=\"fui-advanced-data-table__row fui-advanced-data-table__row--empty\">\r\n <td\r\n class=\"fui-advanced-data-table__cell fui-advanced-data-table__cell--empty\"\r\n [attr.colspan]=\"processedHeaders().length + (config().areRowsSelectable ? 1 : 0)\"\r\n >\r\n <div class=\"fui-advanced-data-table__empty-state\">\r\n <fui-icon\r\n name=\"magnifying-glass\"\r\n class=\"fui-advanced-data-table__empty-state-icon\"\r\n aria-hidden=\"true\"\r\n ></fui-icon>\r\n {{ emptyMessage() }}\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n @for (row of data(); track trackBy()($index, row)) {\r\n <tr\r\n (dblclick)=\"rowDblClick.emit(row)\"\r\n class=\"fui-advanced-data-table__row\"\r\n [class.fui-advanced-data-table__row--selected]=\"isRowSelected($index)\"\r\n [class.fui-advanced-data-table__row--highlighted]=\"isRowHighlighted($index)\"\r\n [class.fui-advanced-data-table__row--clickable]=\"enableRowHighlight()\"\r\n [attr.aria-selected]=\"config().areRowsSelectable ? isRowSelected($index) : null\"\r\n [attr.aria-rowindex]=\"$index + 2\"\r\n (click)=\"toggleRowHighlight($index)\"\r\n >\r\n <!-- Selection Checkbox -->\r\n @if (config().areRowsSelectable) {\r\n <td\r\n class=\"fui-advanced-data-table__cell fui-advanced-data-table__cell--checkbox\"\r\n [class.fui-advanced-data-table__cell--sticky-start]=\"\r\n processedHeaders()[0] && processedHeaders()[0].isStartSticky\r\n \"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"fui-advanced-data-table__checkbox\"\r\n [checked]=\"isRowSelected($index)\"\r\n (change)=\"toggleRow($index)\"\r\n [attr.aria-label]=\"'Select row ' + ($index + 1)\"\r\n />\r\n </td>\r\n }\r\n\r\n <!-- Data Cells -->\r\n @for (header of processedHeaders(); track header.field) {\r\n <td [class]=\"getCellClasses(header)\" [ngStyle]=\"getCellStyles(header)\">\r\n @if (header.type === 'boolean') {\r\n @if (getCellValue(row, header.field)) {\r\n <fui-icon name=\"check-circle\" class=\"fui-advanced-data-table__bool-icon--true\"></fui-icon>\r\n } @else {\r\n <fui-icon name=\"x-circle\" class=\"fui-advanced-data-table__bool-icon--false\"></fui-icon>\r\n }\r\n } @else if (header.type === 'label') {\r\n @let labelConfig = getLabelConfig(getCellValue(row, header.field), header.labels ?? []);\r\n @if (labelConfig) {\r\n <fui-badge\r\n [label]=\"labelConfig.label\"\r\n [customColor]=\"labelConfig.color\"\r\n [icon]=\"labelConfig.icon ?? null\"\r\n size=\"sm\"\r\n />\r\n } @else {\r\n <fui-badge [label]=\"'' + getCellValue(row, header.field)\" variant=\"info\" size=\"sm\" />\r\n }\r\n } @else {\r\n {{ formatCellValue(getCellValue(row, header.field), header.type) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-advanced-data-table{--fui-table-font-size: var(--fui-font-size-sm, .875rem);--fui-table-header-bg: var(--fui-surface-01);--fui-table-row-bg: var(--fui-surface-00);--fui-table-row-hover-bg: var(--fui-surface-02);--fui-table-row-height: 3rem;--fui-table-cell-padding-y: .5rem;--fui-table-cell-padding-x: 1rem;--fui-table-border-color: var(--fui-border-color);display:block;width:100%;position:relative}.fui-advanced-data-table__wrapper{width:100%;overflow-x:auto;overflow-y:visible;position:relative}.fui-advanced-data-table__wrapper::-webkit-scrollbar{height:8px}.fui-advanced-data-table__wrapper::-webkit-scrollbar-track{background:var(--fui-surface-01);border-radius:var(--fui-border-radius-sm)}.fui-advanced-data-table__wrapper::-webkit-scrollbar-thumb{background:var(--fui-border-color);border-radius:var(--fui-border-radius-sm)}.fui-advanced-data-table__wrapper::-webkit-scrollbar-thumb:hover{background:var(--fui-text-secondary)}.fui-advanced-data-table__table{width:100%;border-collapse:separate;border-spacing:0;font-family:var(--fui-font-family-sans);font-size:var(--fui-table-font-size);color:var(--fui-text-primary);background-color:var(--fui-table-row-bg)}.fui-advanced-data-table__header{background-color:var(--fui-table-header-bg);border-bottom:1px solid var(--fui-table-border-color)}.fui-advanced-data-table__header--sticky{position:sticky;top:0;z-index:10}.fui-advanced-data-table__header-row{height:var(--fui-table-row-height)}.fui-advanced-data-table__header-row .formaui-advanced-data-table__header-cell:last-child{border-right:none}.fui-advanced-data-table__header-cell{padding:var(--fui-table-cell-padding-y) var(--fui-table-cell-padding-x);text-align:left;font-weight:var(--fui-font-weight-semibold, 600);color:var(--fui-text-secondary);background-color:var(--fui-table-header-bg);border-right:1px solid var(--fui-border-color);border-bottom:1px solid var(--fui-border-color);white-space:nowrap;-webkit-user-select:none;user-select:none;position:relative;box-shadow:0 1.19px 3.57px #1018281a}.fui-advanced-data-table__header-cell--checkbox{width:48px;min-width:48px;max-width:48px;padding:.5rem;text-align:center}.fui-advanced-data-table__header-cell--sticky-start{position:sticky;z-index:11;background-color:var(--fui-surface-01)}.fui-advanced-data-table__header-cell--sticky-start-edge:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background:linear-gradient(to right,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__header-cell--sticky-end{position:sticky;z-index:11;background-color:var(--fui-surface-01)}.fui-advanced-data-table__header-cell--sticky-end-edge:before{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background:linear-gradient(to left,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__header-content{display:flex;align-items:center;gap:.25rem}.fui-advanced-data-table__header-label{flex:1;overflow:hidden;text-overflow:ellipsis}.fui-advanced-data-table__sort-button,.fui-advanced-data-table__filter-button{display:inline-flex;align-items:center;justify-content:center;padding:.125rem;border:none;background:transparent;color:var(--fui-text-secondary);cursor:pointer;border-radius:var(--fui-border-radius-sm);transition:all var(--fui-duration-fast-02, .15s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__sort-button:hover,.fui-advanced-data-table__filter-button:hover{color:var(--fui-text-primary);background-color:var(--fui-surface-02)}.fui-advanced-data-table__sort-button:focus-visible,.fui-advanced-data-table__filter-button:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-advanced-data-table__sort-icon,.fui-advanced-data-table__filter-icon{width:16px;height:16px}.fui-advanced-data-table__sort-icon{opacity:.6;transition:opacity var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__sort-icon path{transition:opacity var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__sort-icon--asc{opacity:1;color:var(--fui-primary)}.fui-advanced-data-table__sort-icon--asc path:first-child{opacity:1}.fui-advanced-data-table__sort-icon--asc path:last-child{opacity:.3}.fui-advanced-data-table__sort-icon--desc{opacity:1;color:var(--fui-primary)}.fui-advanced-data-table__sort-icon--desc path:first-child{opacity:.3}.fui-advanced-data-table__sort-icon--desc path:last-child{opacity:1}.fui-advanced-data-table__filter-icon{opacity:.6;transition:all var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__filter-icon--active{opacity:1;color:var(--fui-primary)}.fui-advanced-data-table__filter-menu-content{display:flex;flex-direction:column;gap:.75rem;padding:.75rem;min-width:280px}.fui-advanced-data-table__filter-select{width:100%}.fui-advanced-data-table__filter-actions{display:flex;gap:.25rem;justify-content:flex-end;margin-top:.25rem}.fui-advanced-data-table__body{background-color:var(--fui-surface-00)}.fui-advanced-data-table__row{height:var(--fui-table-row-height);background-color:var(--fui-table-row-bg);border-bottom:1px solid var(--fui-table-border-color);transition:background-color var(--fui-duration-fast-01, .1s) var(--fui-ease-standard) 0ms}.fui-advanced-data-table__row:hover{background-color:var(--fui-table-row-hover-bg)}.fui-advanced-data-table__row--clickable{cursor:pointer}.fui-advanced-data-table__row--selected{background-color:var(--fui-primary-10)}.fui-advanced-data-table__row--selected:hover,.fui-advanced-data-table__row--highlighted,.fui-advanced-data-table__row--highlighted:hover{background-color:var(--fui-primary-20)}.fui-advanced-data-table__row--empty{height:auto}.fui-advanced-data-table__row--empty:hover{background-color:transparent}.fui-advanced-data-table__row .formaui-advanced-data-table__cell:last-child{border-right:none}.fui-advanced-data-table__cell{padding:var(--fui-table-cell-padding-y) var(--fui-table-cell-padding-x);color:var(--fui-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;position:relative;border-bottom:1px solid var(--fui-table-border-color);border-right:1px solid var(--fui-table-border-color)}.fui-advanced-data-table__cell--checkbox{width:48px;min-width:48px;max-width:48px;padding:.5rem;text-align:center}.fui-advanced-data-table__cell--empty{padding:2.5rem 1rem;text-align:center;color:var(--fui-text-secondary);white-space:normal;border-bottom:none}.fui-advanced-data-table__cell--sticky-start{position:sticky;z-index:9;background-color:inherit}.fui-advanced-data-table__cell--sticky-start-edge:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background:linear-gradient(to right,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__cell--sticky-end{position:sticky;z-index:9;background-color:inherit}.fui-advanced-data-table__cell--sticky-end-edge:before{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background:linear-gradient(to left,var(--fui-border-color),transparent);pointer-events:none}.fui-advanced-data-table__checkbox{width:18px;height:18px;cursor:pointer;accent-color:var(--fui-primary)}.fui-advanced-data-table__checkbox:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-advanced-data-table__empty-state{padding:2.5rem;text-align:center;color:var(--fui-text-secondary);font-size:var(--fui-font-size-md, 1rem);display:flex;flex-direction:column;align-items:center;gap:.75rem}.fui-advanced-data-table__empty-state-icon{font-size:var(--fui-font-size-09);color:var(--fui-text-secondary);opacity:.5}.fui-advanced-data-table__bool-icon--true{color:var(--fui-success)}.fui-advanced-data-table__bool-icon--false{color:var(--fui-danger)}@media(max-width:768px){.fui-advanced-data-table__table{font-size:var(--fui-font-size-xs, .75rem)}.fui-advanced-data-table__header-cell,.fui-advanced-data-table__cell{padding:.25rem .5rem;max-width:200px}}\n"] }]
|
|
621
|
+
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], enableRowHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRowHighlight", required: false }] }], tableAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableAriaLabel", required: false }] }], _liveAnnouncer: [{
|
|
622
|
+
type: ViewChild,
|
|
623
|
+
args: ['liveAnnouncer']
|
|
624
|
+
}], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], filtersChange: [{ type: i0.Output, args: ["filtersChange"] }], rowDblClick: [{ type: i0.Output, args: ["rowDblClick"] }] } });
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Generated bundle index. Do not edit.
|
|
628
|
+
*/
|
|
629
|
+
|
|
630
|
+
export { FilterOperator, FuiAdvancedDataTableComponent };
|
|
631
|
+
//# sourceMappingURL=raintonic-formaui-components-data-table.mjs.map
|