@sixbell-telco/sdk 3.3.1 → 4.0.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 +130 -1
- package/README.md +45 -45
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/_index.css +673 -76
- package/components/audio-player/README.md +1 -0
- package/components/audio-player/button-play/button-play.component.d.ts +3 -0
- package/components/audio-player/src/audio-player.component.d.ts +8 -0
- package/components/audio-player/volume-control/volume-control.component.d.ts +3 -0
- package/components/button/README.md +13 -0
- package/components/button/src/button.component.d.ts +30 -5
- package/components/data-table/README.md +53 -3
- package/components/data-table/expandable/expandable.component.d.ts +15 -2
- package/components/data-table/public-api.d.ts +2 -0
- package/components/data-table/sortable-header/sortable-header.component.d.ts +15 -1
- package/components/data-table/src/aria-sort.d.ts +22 -0
- package/components/data-table/src/data-table-context.service.d.ts +11 -3
- package/components/data-table/src/data-table.component.d.ts +39 -3
- package/components/data-table/src/sort-icon.component.d.ts +22 -0
- package/components/data-table/src/toggle-size.d.ts +7 -0
- package/components/data-table/sub-component-toggle/sub-component-toggle.component.d.ts +13 -0
- package/components/dialog/README.md +1 -0
- package/components/dialog/src/dialog.component.d.ts +9 -2
- package/components/divider/src/divider.component.d.ts +5 -0
- package/components/dropdown/README.md +21 -0
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +4 -0
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +36 -0
- package/components/dropdown/src/dropdown-item-focus.d.ts +6 -0
- package/components/dropdown/src/dropdown.component.d.ts +5 -2
- package/components/dual-list/src/dual-list.component.d.ts +6 -0
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +6 -0
- package/components/forms/combobox/src/combobox.component.d.ts +7 -0
- package/components/forms/date-picker/README.md +2 -0
- package/components/forms/date-picker/src/date-picker.component.d.ts +6 -0
- package/components/forms/select/src/select.component.d.ts +3 -0
- package/components/icon/README.md +8 -1
- package/components/icon/src/icon.component.d.ts +9 -1
- package/components/notification/README.md +8 -0
- package/components/notification/src/notification.component.d.ts +8 -1
- package/components/paginator/README.md +1 -0
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +7 -1
- package/components/paginator/src/paginator.component.d.ts +10 -0
- package/components/sonner/toaster/src/toaster.component.d.ts +2 -1
- package/components/table/README.md +25 -0
- package/components/table/public-api.d.ts +1 -0
- package/components/table/src/table-loading.d.ts +18 -0
- package/components/table/src/table.component.d.ts +32 -4
- package/components/text/README.md +1 -0
- package/components/tooltip/src/tooltip.component.d.ts +2 -0
- package/directives/text/src/text.directive.d.ts +2 -2
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +48 -10
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +83 -4
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +34 -33
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +429 -361
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +42 -22
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs +8 -2
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +7 -7
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +247 -47
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +10 -3
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +16 -8
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +13 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +9 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +8 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +3 -15
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +2 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +12 -4
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs +17 -8
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +24 -5
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +2 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +2 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +99 -22
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +21 -3
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +919 -0
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-cn.mjs +2 -3
- package/fesm2022/sixbell-telco-sdk-utils-cn.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-http.mjs +39 -0
- package/fesm2022/sixbell-telco-sdk-utils-http.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs +150 -0
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +103 -4
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +71 -2
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/layouts/README.md +278 -0
- package/layouts/index.d.ts +5 -0
- package/layouts/public-api.d.ts +23 -0
- package/layouts/src/app-layout/app-layout.component.d.ts +71 -0
- package/layouts/src/layout-account.d.ts +16 -0
- package/layouts/src/layout-logo.d.ts +10 -0
- package/layouts/src/layout-switcher/layout-switcher.component.d.ts +13 -0
- package/layouts/src/layout.config.d.ts +18 -0
- package/layouts/src/layout.service.d.ts +17 -0
- package/layouts/src/menu/menu-active.d.ts +24 -0
- package/layouts/src/menu/menu-animation.d.ts +34 -0
- package/layouts/src/menu/menu-search.d.ts +13 -0
- package/layouts/src/menu/menu-sections.d.ts +23 -0
- package/layouts/src/menu/menu-url.d.ts +12 -0
- package/layouts/src/menu/menu.model.d.ts +15 -0
- package/layouts/src/navbar/navbar.component.d.ts +33 -0
- package/layouts/src/page-banner/page-banner.component.d.ts +40 -0
- package/layouts/src/side-menu/side-menu.component.d.ts +89 -0
- package/layouts/src/user-menu/user-menu.component.d.ts +91 -0
- package/package.json +26 -15
- package/utils/cn/src/cn.d.ts +1 -1
- package/utils/http/README.md +26 -0
- package/utils/http/index.d.ts +5 -0
- package/utils/http/public-api.d.ts +3 -0
- package/utils/http/src/bearer-token.interceptor.d.ts +19 -0
- package/utils/http/src/http-context.d.ts +3 -0
- package/utils/mfe/README.md +35 -0
- package/utils/mfe/index.d.ts +5 -0
- package/utils/mfe/public-api.d.ts +5 -0
- package/utils/mfe/src/mfe-shadow-root.d.ts +23 -0
- package/utils/mfe/src/mfe-shadow-shell.component.d.ts +20 -0
- package/utils/mfe/src/provide-mfe-shadow-shell.d.ts +20 -0
- package/utils/mfe/src/shadow-root-overlay-container.d.ts +13 -0
- package/utils/theme/README.md +14 -0
- package/utils/theme/public-api.d.ts +3 -1
- package/utils/theme/src/models/theme.d.ts +18 -0
- package/utils/theme/src/scheme-favicon/scheme-favicon.d.ts +26 -0
- package/utils/theme/src/theme-assets/theme-assets.service.d.ts +31 -1
- package/utils/theme/src/theme-assets/theme-assets.types.d.ts +6 -0
- package/utils/translation/README.md +12 -0
- package/utils/translation/public-api.d.ts +4 -0
- package/utils/translation/src/title-strategy/translated-title-strategy.d.ts +27 -0
- package/utils/translation/src/translated-label/translated-label.d.ts +21 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, signal, afterRenderEffect, computed, input, ChangeDetectionStrategy, Component, output, contentChild, contentChildren } from '@angular/core';
|
|
3
|
+
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
1
4
|
import * as i1 from '@angular/common';
|
|
2
5
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, signal, inject, computed, ChangeDetectionStrategy, Component, output, contentChild, contentChildren, effect } from '@angular/core';
|
|
5
6
|
import { heroDocumentText, heroMagnifyingGlass } from '@ng-icons/heroicons/outline';
|
|
6
7
|
import { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';
|
|
7
8
|
import { IconComponent } from '@sixbell-telco/sdk/components/icon';
|
|
8
9
|
import { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';
|
|
9
10
|
import { TextDirective } from '@sixbell-telco/sdk/directives/text';
|
|
10
|
-
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
11
11
|
import { TranslateService, TranslatePipe } from '@sixbell-telco/sdk/utils/translation';
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
13
|
import { CheckboxComponent } from '@sixbell-telco/sdk/components/forms/checkbox';
|
|
@@ -17,6 +17,45 @@ import { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';
|
|
|
17
17
|
import { DropdownMenuComponent, DropdownMenuTriggerComponent, DropdownMenuContentComponent, DropdownMenuItemComponent } from '@sixbell-telco/sdk/components/dropdown-menu';
|
|
18
18
|
import { matMoreVert } from '@sixbell-telco/sdk/components/icon/material/baseline';
|
|
19
19
|
|
|
20
|
+
const TABLE_SKELETON_HEIGHT_BY_SIZE = {
|
|
21
|
+
xs: 'h-3',
|
|
22
|
+
sm: 'h-4',
|
|
23
|
+
md: 'h-4',
|
|
24
|
+
lg: 'h-5',
|
|
25
|
+
xl: 'h-6',
|
|
26
|
+
};
|
|
27
|
+
function range(count) {
|
|
28
|
+
const length = Number.isFinite(count) ? Math.max(1, Math.floor(count)) : 1;
|
|
29
|
+
return Array.from({ length }, (_, index) => index);
|
|
30
|
+
}
|
|
31
|
+
function countHeaderColumns(thead) {
|
|
32
|
+
const firstRow = thead?.querySelector('tr');
|
|
33
|
+
if (!firstRow)
|
|
34
|
+
return 0;
|
|
35
|
+
return Array.from(firstRow.children).reduce((total, cell) => total + Math.max(1, Number(cell.getAttribute('colspan')) || 1), 0);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* Builds the loading skeleton of a table shell: one row per entry of `rowCount`, one cell per projected header
|
|
40
|
+
* column (colspan included, measured after render while loading). Call it in an injection context.
|
|
41
|
+
*/
|
|
42
|
+
function injectTableLoadingSkeleton(options) {
|
|
43
|
+
const host = inject(ElementRef);
|
|
44
|
+
const measuredColumns = signal(1);
|
|
45
|
+
afterRenderEffect(() => {
|
|
46
|
+
if (!options.loading())
|
|
47
|
+
return;
|
|
48
|
+
const count = countHeaderColumns(host.nativeElement.querySelector('table > thead'));
|
|
49
|
+
if (count > 0)
|
|
50
|
+
measuredColumns.set(count);
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
rows: computed(() => range(options.rowCount())),
|
|
54
|
+
columns: computed(() => range(measuredColumns())),
|
|
55
|
+
cellClass: computed(() => cn('skeleton w-full motion-reduce:animate-none', TABLE_SKELETON_HEIGHT_BY_SIZE[options.size()])),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
20
59
|
/**
|
|
21
60
|
* Header checkbox component for the table.
|
|
22
61
|
*
|
|
@@ -485,7 +524,6 @@ function getTableHierarchyTypographyClasses(size) {
|
|
|
485
524
|
...TABLE_HEADER_TYPOGRAPHY_CLASS_BY_PRESET[headerPreset],
|
|
486
525
|
...TABLE_BODY_TYPOGRAPHY_CLASS_BY_PRESET[bodyPreset],
|
|
487
526
|
...TABLE_FOOTER_TYPOGRAPHY_CLASS_BY_PRESET[footerPreset],
|
|
488
|
-
'[&_thead_th]:align-middle',
|
|
489
527
|
];
|
|
490
528
|
}
|
|
491
529
|
/** Type definition for pagination display variants */
|
|
@@ -500,6 +538,7 @@ const tableContent = cva([
|
|
|
500
538
|
'border-spacing-0',
|
|
501
539
|
'text-pretty',
|
|
502
540
|
'[&_th]:bg-base-300 [&_th]:text-base-content',
|
|
541
|
+
'[&_thead_td]:bg-base-300 [&_thead_td]:text-base-content',
|
|
503
542
|
'[&_th]:px-4',
|
|
504
543
|
'[&_td]:px-4',
|
|
505
544
|
], {
|
|
@@ -528,7 +567,7 @@ const tableContainer = cva(['rounded-t-box', 'overflow-y-clip'], {
|
|
|
528
567
|
full: ['h-full'],
|
|
529
568
|
sm: ['h-72 min-h-72 overflow-y-auto overscroll-contain'],
|
|
530
569
|
md: ['h-80 min-h-80 overflow-y-auto overscroll-contain'],
|
|
531
|
-
lg: ['h-
|
|
570
|
+
lg: ['h-96 min-h-96 overflow-y-auto overscroll-contain'],
|
|
532
571
|
xl: ['h-[36rem] min-h-[36rem] overflow-y-auto overscroll-contain'],
|
|
533
572
|
},
|
|
534
573
|
},
|
|
@@ -596,6 +635,24 @@ class TableComponent {
|
|
|
596
635
|
* @defaultValue false
|
|
597
636
|
*/
|
|
598
637
|
bordered = input(false);
|
|
638
|
+
/**
|
|
639
|
+
* Highlight body rows on hover with the `--color-table-row-hover` tint (12% `base-content` by default)
|
|
640
|
+
* layered over each cell's own background, so zebra rows and pinned first-column cells follow it
|
|
641
|
+
* @defaultValue true
|
|
642
|
+
*/
|
|
643
|
+
rowHover = input(true);
|
|
644
|
+
/**
|
|
645
|
+
* Show a loading state: the projected header and the table frame stay in place and the body
|
|
646
|
+
* shows skeleton rows. The table is marked `aria-busy` and a status message is announced.
|
|
647
|
+
* The empty states are not shown while loading.
|
|
648
|
+
* @defaultValue false
|
|
649
|
+
*/
|
|
650
|
+
loading = input(false);
|
|
651
|
+
/**
|
|
652
|
+
* Number of skeleton rows shown while loading. Defaults to the page size (`pagination.itemsPerPage`).
|
|
653
|
+
* @defaultValue null
|
|
654
|
+
*/
|
|
655
|
+
loadingRows = input(null);
|
|
599
656
|
/**
|
|
600
657
|
* Pagination control display variant
|
|
601
658
|
* @defaultValue 'default'
|
|
@@ -702,6 +759,21 @@ class TableComponent {
|
|
|
702
759
|
const pagination = this.pagination();
|
|
703
760
|
return !!pagination.search?.trim();
|
|
704
761
|
});
|
|
762
|
+
skeleton = injectTableLoadingSkeleton({
|
|
763
|
+
loading: this.loading,
|
|
764
|
+
rowCount: computed(() => this.loadingRows() ?? this.pagination().itemsPerPage),
|
|
765
|
+
size: computed(() => resolveTableSize(this.size())),
|
|
766
|
+
});
|
|
767
|
+
/** @internal */
|
|
768
|
+
skeletonRows = this.skeleton.rows;
|
|
769
|
+
/** @internal */
|
|
770
|
+
skeletonColumns = this.skeleton.columns;
|
|
771
|
+
/** @internal */
|
|
772
|
+
skeletonClass = this.skeleton.cellClass;
|
|
773
|
+
/** @internal */
|
|
774
|
+
showNoData = computed(() => !this.loading() && this.hasNoData());
|
|
775
|
+
/** @internal */
|
|
776
|
+
showNoResults = computed(() => !this.loading() && this.hasNoResults());
|
|
705
777
|
/**
|
|
706
778
|
* Computed boolean indicating if we should show "no results" vs "no data"
|
|
707
779
|
*/
|
|
@@ -766,6 +838,7 @@ class TableComponent {
|
|
|
766
838
|
'table-pin-cols': this.pinColumns(),
|
|
767
839
|
'table-zebra': this.zebra(),
|
|
768
840
|
'table-bordered': this.bordered(),
|
|
841
|
+
'table-row-hover': this.rowHover(),
|
|
769
842
|
}));
|
|
770
843
|
/**
|
|
771
844
|
* @internal
|
|
@@ -773,16 +846,19 @@ class TableComponent {
|
|
|
773
846
|
*/
|
|
774
847
|
tableContainerClass = computed(() => cn(tableContainer({
|
|
775
848
|
containerHeight: this.height(),
|
|
776
|
-
}), { '
|
|
849
|
+
}), { '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() }, 'w-full flex-grow overflow-x-auto'));
|
|
777
850
|
/**
|
|
778
851
|
* @internal
|
|
779
852
|
* Computes outer container classes based on size
|
|
780
853
|
*/
|
|
781
|
-
containerClass = computed(() =>
|
|
782
|
-
|
|
783
|
-
'
|
|
784
|
-
|
|
785
|
-
|
|
854
|
+
containerClass = computed(() => {
|
|
855
|
+
const size = resolveTableSize(this.size());
|
|
856
|
+
return cn('rounded-box border-neutral @container flex min-w-0 flex-col gap-3 border border-solid', {
|
|
857
|
+
'gap-3 pb-3': size === 'xs' || size === 'sm' || size === 'md',
|
|
858
|
+
'gap-4 pb-4': size === 'lg',
|
|
859
|
+
'gap-5 pb-5': size === 'xl',
|
|
860
|
+
});
|
|
861
|
+
});
|
|
786
862
|
sizeTokens = computed(() => getTableSizeTokens(this.size()));
|
|
787
863
|
footerLayoutTokens = computed(() => getTableFooterLayoutTokens(this.size()));
|
|
788
864
|
/**
|
|
@@ -803,12 +879,11 @@ class TableComponent {
|
|
|
803
879
|
rows = contentChildren(TableRowCheckboxComponent, { descendants: true });
|
|
804
880
|
/** @internal Track selected row identifiers */
|
|
805
881
|
identifiers = signal(new Set());
|
|
806
|
-
/** Event emitted with
|
|
882
|
+
/** Event emitted with the selected item identifiers after each selection change (not on init) */
|
|
807
883
|
checkedItems = output();
|
|
808
|
-
|
|
809
|
-
checkEffect = effect(() => {
|
|
884
|
+
emitCheckedItems() {
|
|
810
885
|
this.checkedItems.emit(Array.from(this.identifiers()));
|
|
811
|
-
}
|
|
886
|
+
}
|
|
812
887
|
/**
|
|
813
888
|
* Toggle all row checkboxes
|
|
814
889
|
* @param value - Whether to check or uncheck all rows
|
|
@@ -823,6 +898,7 @@ class TableComponent {
|
|
|
823
898
|
this.identifiers.update((items) => new Set(items).add(row.identifier()));
|
|
824
899
|
}
|
|
825
900
|
});
|
|
901
|
+
this.emitCheckedItems();
|
|
826
902
|
}
|
|
827
903
|
/**
|
|
828
904
|
* Handle individual checkbox toggle
|
|
@@ -840,6 +916,7 @@ class TableComponent {
|
|
|
840
916
|
return new Set(items);
|
|
841
917
|
});
|
|
842
918
|
}
|
|
919
|
+
this.emitCheckedItems();
|
|
843
920
|
}
|
|
844
921
|
/** @internal Clear all selections */
|
|
845
922
|
clearList() {
|
|
@@ -847,11 +924,11 @@ class TableComponent {
|
|
|
847
924
|
this.header()?.checked.set(false);
|
|
848
925
|
}
|
|
849
926
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
850
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TableComponent, isStandalone: true, selector: "st-table", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, pinRows: { classPropertyName: "pinRows", publicName: "pinRows", isSignal: true, isRequired: false, transformFunction: null }, pinColumns: { classPropertyName: "pinColumns", publicName: "pinColumns", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, paginatorType: { classPropertyName: "paginatorType", publicName: "paginatorType", isSignal: true, isRequired: false, transformFunction: null }, noDataIcon: { classPropertyName: "noDataIcon", publicName: "noDataIcon", isSignal: true, isRequired: false, transformFunction: null }, noResultsIcon: { classPropertyName: "noResultsIcon", publicName: "noResultsIcon", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, showItemsPerPage: { classPropertyName: "showItemsPerPage", publicName: "showItemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, showEntries: { classPropertyName: "showEntries", publicName: "showEntries", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, hasActiveFiltersCallback: { classPropertyName: "hasActiveFiltersCallback", publicName: "hasActiveFiltersCallback", isSignal: true, isRequired: false, transformFunction: null }, allowHeaderOverflow: { classPropertyName: "allowHeaderOverflow", publicName: "allowHeaderOverflow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChanged: "pageChanged", pageSizeChanged: "pageSizeChanged", checkedItems: "checkedItems" }, queries: [{ propertyName: "header", first: true, predicate: TableHeaderCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "rows", predicate: TableRowCheckboxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let total = totalItems();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let footerSelectSizeVar = footerSelectSize();\n@let footerPaginatorSizeVar = footerPaginatorSize();\n@let footerWrapperClassVar = footerWrapperClass();\n@let footerDividerClassVar = footerDividerClass();\n@let footerContentClassVar = footerContentClass();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let showFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n<div [class]=\"containerClassVar\">\n\t<div [class]=\"tableContainerClassVar\">\n\t\t<div class=\"w-full flex-grow overflow-x-auto\">\n\t\t\t@if (hasNoData()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noDataIcon()\" size=\"lg\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else if (hasNoResults()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noResultsIcon()\" size=\"xl\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t\t<ng-content select=\"st-table-empty-actions\"></ng-content>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t\t\t<ng-content select=\"tfoot\"></ng-content>\n\t\t\t\t</table>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t@if (total > 0) {\n\t\t@if (showFooterVar) {\n\t\t\t<div [class]=\"footerWrapperClassVar\">\n\t\t\t\t<div [class]=\"footerDividerClassVar\"></div>\n\t\t\t\t<div [class]=\"footerContentClassVar\">\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex justify-center\">\n\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t[options]=\"entriesPerPageOptions()\"\n\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\tvalueKey=\"value\"\n\t\t\t\t\t\t\t\tdisplayKey=\"text\"\n\t\t\t\t\t\t\t\t[size]=\"footerSelectSizeVar\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t}\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaginatorComponent, selector: "st-paginator", inputs: ["paginatorId", "maxSize", "type", "pages", "size", "currentPage"], outputs: ["pageChanged", "currentPageChange"] }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }, { kind: "component", type: SelectComponent, selector: "st-select", inputs: ["variant", "size", "showOptional", "optionalText", "ghost", "name", "placeholder", "label", "value", "options", "displayKey", "valueKey", "allowClear", "parentForm", "formControlName", "disabled", "stopPropagation"], outputs: ["valueChange", "disabledChange", "blurred", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
927
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TableComponent, isStandalone: true, selector: "st-table", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, pinRows: { classPropertyName: "pinRows", publicName: "pinRows", isSignal: true, isRequired: false, transformFunction: null }, pinColumns: { classPropertyName: "pinColumns", publicName: "pinColumns", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, rowHover: { classPropertyName: "rowHover", publicName: "rowHover", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingRows: { classPropertyName: "loadingRows", publicName: "loadingRows", isSignal: true, isRequired: false, transformFunction: null }, paginatorType: { classPropertyName: "paginatorType", publicName: "paginatorType", isSignal: true, isRequired: false, transformFunction: null }, noDataIcon: { classPropertyName: "noDataIcon", publicName: "noDataIcon", isSignal: true, isRequired: false, transformFunction: null }, noResultsIcon: { classPropertyName: "noResultsIcon", publicName: "noResultsIcon", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, showItemsPerPage: { classPropertyName: "showItemsPerPage", publicName: "showItemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, showEntries: { classPropertyName: "showEntries", publicName: "showEntries", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, hasActiveFiltersCallback: { classPropertyName: "hasActiveFiltersCallback", publicName: "hasActiveFiltersCallback", isSignal: true, isRequired: false, transformFunction: null }, allowHeaderOverflow: { classPropertyName: "allowHeaderOverflow", publicName: "allowHeaderOverflow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChanged: "pageChanged", pageSizeChanged: "pageSizeChanged", checkedItems: "checkedItems" }, queries: [{ propertyName: "header", first: true, predicate: TableHeaderCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "rows", predicate: TableRowCheckboxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let total = totalItems();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let footerSelectSizeVar = footerSelectSize();\n@let footerPaginatorSizeVar = footerPaginatorSize();\n@let footerWrapperClassVar = footerWrapperClass();\n@let footerDividerClassVar = footerDividerClass();\n@let footerContentClassVar = footerContentClass();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let showFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@let loadingVar = loading();\n\n<div [class]=\"containerClassVar\">\n\t<span role=\"status\" class=\"sr-only\">\n\t\t@if (loadingVar) {\n\t\t\t{{ 'sdk.table.loading' | translate }}\n\t\t}\n\t</span>\n\t<div [class]=\"tableContainerClassVar\">\n\t\t<div class=\"w-full\">\n\t\t\t@if (showNoData()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noDataIcon()\" size=\"lg\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else if (showNoResults()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noResultsIcon()\" size=\"xl\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t\t<ng-content select=\"st-table-empty-actions\"></ng-content>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<table [class]=\"tableClassVar\" [attr.aria-busy]=\"loadingVar || null\">\n\t\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t\t@if (loadingVar) {\n\t\t\t\t\t\t<tbody data-st-skeleton aria-hidden=\"true\">\n\t\t\t\t\t\t\t@for (row of skeletonRows(); track row) {\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t@for (column of skeletonColumns(); track column) {\n\t\t\t\t\t\t\t\t\t\t<td><div [class]=\"skeletonClass()\"></div></td>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t\t\t\t<ng-content select=\"tfoot\"></ng-content>\n\t\t\t\t\t}\n\t\t\t\t</table>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t@if (total > 0) {\n\t\t@if (showFooterVar) {\n\t\t\t<div [class]=\"footerWrapperClassVar\">\n\t\t\t\t<div [class]=\"footerDividerClassVar\"></div>\n\t\t\t\t<div [class]=\"footerContentClassVar\">\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex justify-center\">\n\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t[options]=\"entriesPerPageOptions()\"\n\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\tvalueKey=\"value\"\n\t\t\t\t\t\t\t\tdisplayKey=\"text\"\n\t\t\t\t\t\t\t\t[size]=\"footerSelectSizeVar\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t}\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaginatorComponent, selector: "st-paginator", inputs: ["paginatorId", "maxSize", "type", "pages", "size", "currentPage"], outputs: ["pageChanged", "currentPageChange"] }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }, { kind: "component", type: SelectComponent, selector: "st-select", inputs: ["variant", "size", "showOptional", "optionalText", "ghost", "name", "placeholder", "label", "value", "options", "displayKey", "valueKey", "allowClear", "parentForm", "formControlName", "disabled", "stopPropagation"], outputs: ["valueChange", "disabledChange", "blurred", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
851
928
|
}
|
|
852
929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TableComponent, decorators: [{
|
|
853
930
|
type: Component,
|
|
854
|
-
args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TextDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let footerSelectSizeVar = footerSelectSize();\n@let footerPaginatorSizeVar = footerPaginatorSize();\n@let footerWrapperClassVar = footerWrapperClass();\n@let footerDividerClassVar = footerDividerClass();\n@let footerContentClassVar = footerContentClass();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let showFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n<div [class]=\"containerClassVar\">\n\t<div [class]=\"tableContainerClassVar\">\n\t\t<div class=\"w-full
|
|
931
|
+
args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TextDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let footerSelectSizeVar = footerSelectSize();\n@let footerPaginatorSizeVar = footerPaginatorSize();\n@let footerWrapperClassVar = footerWrapperClass();\n@let footerDividerClassVar = footerDividerClass();\n@let footerContentClassVar = footerContentClass();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let showFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@let loadingVar = loading();\n\n<div [class]=\"containerClassVar\">\n\t<span role=\"status\" class=\"sr-only\">\n\t\t@if (loadingVar) {\n\t\t\t{{ 'sdk.table.loading' | translate }}\n\t\t}\n\t</span>\n\t<div [class]=\"tableContainerClassVar\">\n\t\t<div class=\"w-full\">\n\t\t\t@if (showNoData()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noDataIcon()\" size=\"lg\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else if (showNoResults()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noResultsIcon()\" size=\"xl\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t\t<ng-content select=\"st-table-empty-actions\"></ng-content>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<table [class]=\"tableClassVar\" [attr.aria-busy]=\"loadingVar || null\">\n\t\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t\t@if (loadingVar) {\n\t\t\t\t\t\t<tbody data-st-skeleton aria-hidden=\"true\">\n\t\t\t\t\t\t\t@for (row of skeletonRows(); track row) {\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t@for (column of skeletonColumns(); track column) {\n\t\t\t\t\t\t\t\t\t\t<td><div [class]=\"skeletonClass()\"></div></td>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t\t\t\t<ng-content select=\"tfoot\"></ng-content>\n\t\t\t\t\t}\n\t\t\t\t</table>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t@if (total > 0) {\n\t\t@if (showFooterVar) {\n\t\t\t<div [class]=\"footerWrapperClassVar\">\n\t\t\t\t<div [class]=\"footerDividerClassVar\"></div>\n\t\t\t\t<div [class]=\"footerContentClassVar\">\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex justify-center\">\n\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t[options]=\"entriesPerPageOptions()\"\n\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\tvalueKey=\"value\"\n\t\t\t\t\t\t\t\tdisplayKey=\"text\"\n\t\t\t\t\t\t\t\t[size]=\"footerSelectSizeVar\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t}\n</div>\n" }]
|
|
855
932
|
}] });
|
|
856
933
|
|
|
857
934
|
/**
|
|
@@ -947,11 +1024,11 @@ class TableActionComponent {
|
|
|
947
1024
|
this.triggered.emit();
|
|
948
1025
|
}
|
|
949
1026
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TableActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
950
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TableActionComponent, isStandalone: true, selector: "st-table-action", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipVariant: { classPropertyName: "tooltipVariant", publicName: "tooltipVariant", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", triggered: "triggered" }, ngImport: i0, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n@let textPresetVar = textPreset();\n@let disabledVar = disabled();\n@let stopPropagationVar = stopPropagation();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button\n\t\t[class]=\"tableActionClass()\"\n\t\t[variant]=\"variantVar\"\n\t\t[icon]=\"iconVar\"\n\t\t[link]=\"true\"\n\t\t[size]=\"sizeVar\"\n\t\t[disabled]=\"disabledVar\"\n\t\t[stopPropagation]=\"stopPropagationVar\"\n\t\t(clicked)=\"onClicked($event)\"\n\t>\n\t\t<span [stText]=\"textPresetVar\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip [variant]=\"tooltipVariant()\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TooltipComponent, selector: "st-tooltip", inputs: ["variant", "position", "label", "icon", "iconPosition"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1027
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TableActionComponent, isStandalone: true, selector: "st-table-action", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipVariant: { classPropertyName: "tooltipVariant", publicName: "tooltipVariant", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", triggered: "triggered" }, ngImport: i0, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n@let textPresetVar = textPreset();\n@let disabledVar = disabled();\n@let stopPropagationVar = stopPropagation();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button\n\t\t[class]=\"tableActionClass()\"\n\t\t[variant]=\"variantVar\"\n\t\t[icon]=\"iconVar\"\n\t\t[link]=\"true\"\n\t\t[size]=\"sizeVar\"\n\t\t[disabled]=\"disabledVar\"\n\t\t[stopPropagation]=\"stopPropagationVar\"\n\t\t[ariaLabel]=\"tooltipVar ? (tooltipVar | translate) : null\"\n\t\t(clicked)=\"onClicked($event)\"\n\t>\n\t\t<span [stText]=\"textPresetVar\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip [variant]=\"tooltipVariant()\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TooltipComponent, selector: "st-tooltip", inputs: ["variant", "position", "label", "icon", "iconPosition"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
951
1028
|
}
|
|
952
1029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TableActionComponent, decorators: [{
|
|
953
1030
|
type: Component,
|
|
954
|
-
args: [{ selector: 'st-table-action', imports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe$1, TextDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n@let textPresetVar = textPreset();\n@let disabledVar = disabled();\n@let stopPropagationVar = stopPropagation();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button\n\t\t[class]=\"tableActionClass()\"\n\t\t[variant]=\"variantVar\"\n\t\t[icon]=\"iconVar\"\n\t\t[link]=\"true\"\n\t\t[size]=\"sizeVar\"\n\t\t[disabled]=\"disabledVar\"\n\t\t[stopPropagation]=\"stopPropagationVar\"\n\t\t(clicked)=\"onClicked($event)\"\n\t>\n\t\t<span [stText]=\"textPresetVar\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip [variant]=\"tooltipVariant()\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n" }]
|
|
1031
|
+
args: [{ selector: 'st-table-action', imports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe$1, TextDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n@let textPresetVar = textPreset();\n@let disabledVar = disabled();\n@let stopPropagationVar = stopPropagation();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button\n\t\t[class]=\"tableActionClass()\"\n\t\t[variant]=\"variantVar\"\n\t\t[icon]=\"iconVar\"\n\t\t[link]=\"true\"\n\t\t[size]=\"sizeVar\"\n\t\t[disabled]=\"disabledVar\"\n\t\t[stopPropagation]=\"stopPropagationVar\"\n\t\t[ariaLabel]=\"tooltipVar ? (tooltipVar | translate) : null\"\n\t\t(clicked)=\"onClicked($event)\"\n\t>\n\t\t<span [stText]=\"textPresetVar\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip [variant]=\"tooltipVariant()\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n" }]
|
|
955
1032
|
}] });
|
|
956
1033
|
|
|
957
1034
|
/**
|
|
@@ -1025,7 +1102,7 @@ class TableActionsComponent {
|
|
|
1025
1102
|
}
|
|
1026
1103
|
}
|
|
1027
1104
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TableActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1028
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TableActionsComponent, isStandalone: true, selector: "st-table-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, triggerIcon: { classPropertyName: "triggerIcon", publicName: "triggerIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered" }, ngImport: i0, template: "@if (hasActions()) {\n\t@if (mode() === 'inline') {\n\t\t<div [class]=\"componentClass()\">\n\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t<st-table-action\n\t\t\t\t\t[variant]=\"action.variant ?? 'primary'\"\n\t\t\t\t\t[icon]=\"action.icon\"\n\t\t\t\t\t[tooltip]=\"action.tooltip\"\n\t\t\t\t\t[size]=\"size()\"\n\t\t\t\t\t[disabled]=\"action.disabled ?? false\"\n\t\t\t\t\t(clicked)=\"onActionClick(action)\"\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t} @else {\n\t\t<st-dropdown-menu>\n\t\t\t<st-dropdown-menu-trigger [menuTriggerFor]=\"content.template\">\n\t\t\t\t<st-button [icon]=\"triggerIcon()\" [ghost]=\"true\" [size]=\"size()\" variant=\"base\" />\n\t\t\t</st-dropdown-menu-trigger>\n\t\t\t<st-dropdown-menu-content #content [size]=\"size()\">\n\t\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t\t<st-dropdown-menu-item [disabled]=\"action.disabled ?? false\" (triggered)=\"onActionClick(action)\">\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" size=\"auto\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (action.label) {\n\t\t\t\t\t\t\t\t{{ action.label | translate }}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</st-dropdown-menu-item>\n\t\t\t\t}\n\t\t\t</st-dropdown-menu-content>\n\t\t</st-dropdown-menu>\n\t}\n} @else {\n\t<div [class]=\"componentClass()\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }, { kind: "component", type: TableActionComponent, selector: "st-table-action", inputs: ["variant", "tooltip", "tooltipVariant", "icon", "size", "disabled", "stopPropagation"], outputs: ["clicked", "triggered"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "component", type: DropdownMenuComponent, selector: "st-dropdown-menu" }, { kind: "component", type: DropdownMenuTriggerComponent, selector: "st-dropdown-menu-trigger" }, { kind: "component", type: DropdownMenuContentComponent, selector: "st-dropdown-menu-content", inputs: ["class", "size"], outputs: ["closed"], exportAs: ["menuContent"] }, { kind: "component", type: DropdownMenuItemComponent, selector: "st-dropdown-menu-item", inputs: ["disabled", "active", "shortcut", "class", "stopPropagation"], outputs: ["triggered", "clicked", "keyDownEnter", "keyDownSpace"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TableActionsComponent, isStandalone: true, selector: "st-table-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, triggerIcon: { classPropertyName: "triggerIcon", publicName: "triggerIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered" }, ngImport: i0, template: "@if (hasActions()) {\n\t@if (mode() === 'inline') {\n\t\t<div [class]=\"componentClass()\">\n\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t<st-table-action\n\t\t\t\t\t[variant]=\"action.variant ?? 'primary'\"\n\t\t\t\t\t[icon]=\"action.icon\"\n\t\t\t\t\t[tooltip]=\"action.tooltip\"\n\t\t\t\t\t[size]=\"size()\"\n\t\t\t\t\t[disabled]=\"action.disabled ?? false\"\n\t\t\t\t\t(clicked)=\"onActionClick(action)\"\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t} @else {\n\t\t<st-dropdown-menu>\n\t\t\t<st-dropdown-menu-trigger [menuTriggerFor]=\"content.template\">\n\t\t\t\t<st-button [icon]=\"triggerIcon()\" [ghost]=\"true\" [size]=\"size()\" variant=\"base\" [ariaLabel]=\"'sdk.table.actions' | translate\" />\n\t\t\t</st-dropdown-menu-trigger>\n\t\t\t<st-dropdown-menu-content #content [size]=\"size()\">\n\t\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t\t<st-dropdown-menu-item [disabled]=\"action.disabled ?? false\" (triggered)=\"onActionClick(action)\">\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" size=\"auto\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (action.label) {\n\t\t\t\t\t\t\t\t{{ action.label | translate }}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</st-dropdown-menu-item>\n\t\t\t\t}\n\t\t\t</st-dropdown-menu-content>\n\t\t</st-dropdown-menu>\n\t}\n} @else {\n\t<div [class]=\"componentClass()\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }, { kind: "component", type: TableActionComponent, selector: "st-table-action", inputs: ["variant", "tooltip", "tooltipVariant", "icon", "size", "disabled", "stopPropagation"], outputs: ["clicked", "triggered"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "component", type: DropdownMenuComponent, selector: "st-dropdown-menu" }, { kind: "component", type: DropdownMenuTriggerComponent, selector: "st-dropdown-menu-trigger" }, { kind: "component", type: DropdownMenuContentComponent, selector: "st-dropdown-menu-content", inputs: ["class", "size"], outputs: ["closed"], exportAs: ["menuContent"] }, { kind: "component", type: DropdownMenuItemComponent, selector: "st-dropdown-menu-item", inputs: ["disabled", "active", "shortcut", "class", "stopPropagation"], outputs: ["triggered", "clicked", "keyDownEnter", "keyDownSpace"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1029
1106
|
}
|
|
1030
1107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TableActionsComponent, decorators: [{
|
|
1031
1108
|
type: Component,
|
|
@@ -1039,7 +1116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1039
1116
|
DropdownMenuTriggerComponent,
|
|
1040
1117
|
DropdownMenuContentComponent,
|
|
1041
1118
|
DropdownMenuItemComponent,
|
|
1042
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (hasActions()) {\n\t@if (mode() === 'inline') {\n\t\t<div [class]=\"componentClass()\">\n\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t<st-table-action\n\t\t\t\t\t[variant]=\"action.variant ?? 'primary'\"\n\t\t\t\t\t[icon]=\"action.icon\"\n\t\t\t\t\t[tooltip]=\"action.tooltip\"\n\t\t\t\t\t[size]=\"size()\"\n\t\t\t\t\t[disabled]=\"action.disabled ?? false\"\n\t\t\t\t\t(clicked)=\"onActionClick(action)\"\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t} @else {\n\t\t<st-dropdown-menu>\n\t\t\t<st-dropdown-menu-trigger [menuTriggerFor]=\"content.template\">\n\t\t\t\t<st-button [icon]=\"triggerIcon()\" [ghost]=\"true\" [size]=\"size()\" variant=\"base\" />\n\t\t\t</st-dropdown-menu-trigger>\n\t\t\t<st-dropdown-menu-content #content [size]=\"size()\">\n\t\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t\t<st-dropdown-menu-item [disabled]=\"action.disabled ?? false\" (triggered)=\"onActionClick(action)\">\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" size=\"auto\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (action.label) {\n\t\t\t\t\t\t\t\t{{ action.label | translate }}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</st-dropdown-menu-item>\n\t\t\t\t}\n\t\t\t</st-dropdown-menu-content>\n\t\t</st-dropdown-menu>\n\t}\n} @else {\n\t<div [class]=\"componentClass()\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n" }]
|
|
1119
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (hasActions()) {\n\t@if (mode() === 'inline') {\n\t\t<div [class]=\"componentClass()\">\n\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t<st-table-action\n\t\t\t\t\t[variant]=\"action.variant ?? 'primary'\"\n\t\t\t\t\t[icon]=\"action.icon\"\n\t\t\t\t\t[tooltip]=\"action.tooltip\"\n\t\t\t\t\t[size]=\"size()\"\n\t\t\t\t\t[disabled]=\"action.disabled ?? false\"\n\t\t\t\t\t(clicked)=\"onActionClick(action)\"\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t} @else {\n\t\t<st-dropdown-menu>\n\t\t\t<st-dropdown-menu-trigger [menuTriggerFor]=\"content.template\">\n\t\t\t\t<st-button [icon]=\"triggerIcon()\" [ghost]=\"true\" [size]=\"size()\" variant=\"base\" [ariaLabel]=\"'sdk.table.actions' | translate\" />\n\t\t\t</st-dropdown-menu-trigger>\n\t\t\t<st-dropdown-menu-content #content [size]=\"size()\">\n\t\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t\t<st-dropdown-menu-item [disabled]=\"action.disabled ?? false\" (triggered)=\"onActionClick(action)\">\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" size=\"auto\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (action.label) {\n\t\t\t\t\t\t\t\t{{ action.label | translate }}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</st-dropdown-menu-item>\n\t\t\t\t}\n\t\t\t</st-dropdown-menu-content>\n\t\t</st-dropdown-menu>\n\t}\n} @else {\n\t<div [class]=\"componentClass()\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n" }]
|
|
1043
1120
|
}] });
|
|
1044
1121
|
|
|
1045
1122
|
class TableEmptyActionsComponent {
|
|
@@ -1055,5 +1132,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1055
1132
|
* Generated bundle index. Do not edit.
|
|
1056
1133
|
*/
|
|
1057
1134
|
|
|
1058
|
-
export { TableActionComponent, TableActionsComponent, TableComponent, TableEmptyActionsComponent, TableHeaderCheckboxComponent, TableRowCheckboxComponent, getTableFooterLayoutTokens, getTableHierarchyTypographyClasses, getTableSizeTokens, resolveTableSize, tableComponent, tableContainer, tableContent };
|
|
1135
|
+
export { TableActionComponent, TableActionsComponent, TableComponent, TableEmptyActionsComponent, TableHeaderCheckboxComponent, TableRowCheckboxComponent, getTableFooterLayoutTokens, getTableHierarchyTypographyClasses, getTableSizeTokens, injectTableLoadingSkeleton, resolveTableSize, tableComponent, tableContainer, tableContent };
|
|
1059
1136
|
//# sourceMappingURL=sixbell-telco-sdk-components-table.mjs.map
|