@sixbell-telco/sdk 1.6.0 → 2.1.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 +260 -711
- package/README.md +337 -278
- package/_index.css +3 -3
- package/components/accordion/accordion-item/accordion-item.component.d.ts +3 -4
- package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +29 -2
- package/components/audio-player/services/audio.service.d.ts +14 -14
- package/components/audio-player/src/audio-player.component.d.ts +7 -3
- package/components/audio-player/volume-control/volume-control.component.d.ts +28 -1
- package/components/button/src/button.component.d.ts +46 -1
- package/components/countdown/src/countdown.component.d.ts +1 -1
- package/components/data-table/data-table-empty-actions/data-table-empty-actions.component.d.ts +5 -0
- package/components/data-table/public-api.d.ts +1 -0
- package/components/data-table/src/data-table.component.d.ts +11 -3
- package/components/dialog/src/dialog.component.d.ts +51 -5
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +2 -1
- package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +37 -1
- package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +33 -1
- package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +33 -1
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +53 -2
- package/components/dropdown/src/dropdown.component.d.ts +2 -2
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +2 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +33 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +33 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +33 -1
- package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +1 -3
- package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +4 -4
- package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +33 -1
- package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +2 -1
- package/components/dual-list/src/dual-list.component.d.ts +4 -2
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +53 -8
- package/components/file-upload/file-uploader/file-uploader.component.d.ts +40 -9
- package/components/forms/checkbox/src/checkbox.component.d.ts +46 -2
- package/components/forms/combobox/src/combobox.component.d.ts +40 -5
- package/components/forms/date-picker/src/date-picker.component.d.ts +11 -1
- package/components/forms/form-group/README.md +114 -0
- package/components/forms/form-group/index.d.ts +5 -0
- package/components/forms/form-group/public-api.d.ts +1 -0
- package/components/forms/form-group/src/form-group.component.d.ts +150 -0
- package/components/forms/form-item/README.md +17 -0
- package/components/forms/form-item/index.d.ts +5 -0
- package/components/forms/form-item/public-api.d.ts +1 -0
- package/components/forms/form-item/src/form-item.component.d.ts +5 -0
- package/components/forms/input/src/input.component.d.ts +45 -2
- package/components/forms/radio/src/radio.component.d.ts +46 -2
- package/components/forms/range/src/range.component.d.ts +38 -1
- package/components/forms/select/src/select.component.d.ts +40 -5
- package/components/forms/switch/src/switch.component.d.ts +46 -2
- package/components/forms/textarea/src/textarea.component.d.ts +62 -12
- package/components/forms/toggle/src/toggle.component.d.ts +46 -1
- package/components/link/src/link.component.d.ts +0 -3
- package/components/overlay/overlay-content/overlay-content.component.d.ts +2 -1
- package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +37 -5
- package/components/overlay/src/overlay.component.d.ts +4 -5
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +37 -1
- package/components/tab/directives/tab-content/tab-content.directive.d.ts +5 -6
- package/components/tab/directives/tab-header/tab-header.directive.d.ts +2 -2
- package/components/table/public-api.d.ts +1 -0
- package/components/table/src/table.component.d.ts +36 -4
- package/components/table/table-empty-actions/table-empty-actions.component.d.ts +5 -0
- package/components/table/table-header-checkbox/table-header-checkbox.component.d.ts +5 -11
- package/components/table/table-row-checkbox/table-row-checkbox.component.d.ts +5 -11
- package/components/toast/toast-message/toast-message.component.d.ts +42 -1
- package/components/tooltip/src/tooltip.component.d.ts +10 -1
- package/components/wizard/services/wizard.service.d.ts +5 -5
- package/components/wizard/wizard-marker/wizard-marker.component.d.ts +2 -3
- package/directives/auto-focus/public-api.d.ts +1 -1
- package/directives/auto-focus/src/{autofocus.directive.d.ts → auto-focus.directive.d.ts} +9 -15
- package/directives/click-outside/src/click-outside.directive.d.ts +1 -3
- package/directives/only-numbers/public-api.d.ts +6 -1
- package/directives/only-numbers/src/only-numbers.directive.d.ts +36 -0
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +6 -9
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +133 -51
- 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 +78 -4
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +53 -27
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +82 -12
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +166 -13
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +68 -24
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +283 -16
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +12 -9
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +151 -10
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +69 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +96 -19
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +15 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs +159 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +20 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +62 -6
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +69 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +57 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +91 -20
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +80 -6
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +131 -13
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +69 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +2 -7
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +94 -42
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +71 -10
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +5 -9
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +131 -47
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +69 -4
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +15 -3
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +29 -49
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs +7 -10
- package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +48 -17
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-runtime-config.mjs +339 -0
- package/fesm2022/sixbell-telco-sdk-utils-runtime-config.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-sync.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-sync.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +1062 -730
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +350 -267
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/package.json +55 -46
- package/utils/runtime-config/README.md +235 -0
- package/utils/{resource-loader → runtime-config}/index.d.ts +1 -1
- package/utils/runtime-config/public-api.d.ts +5 -0
- package/utils/runtime-config/src/http-client.d.ts +11 -0
- package/utils/runtime-config/src/runtime-config-loader.d.ts +23 -0
- package/utils/runtime-config/src/runtime-config-store.d.ts +11 -0
- package/utils/runtime-config/src/runtime-update-adapter.d.ts +15 -0
- package/utils/runtime-config/src/types.d.ts +66 -0
- package/utils/theme/README.md +324 -986
- package/utils/theme/public-api.d.ts +4 -4
- package/utils/theme/src/constants.d.ts +6 -12
- package/utils/theme/src/models/theme.d.ts +46 -173
- package/utils/theme/src/providers/theme.provider.d.ts +0 -10
- package/utils/theme/src/providers/theme.provider.types.d.ts +16 -15
- package/utils/theme/src/theme-assets/theme-assets.service.d.ts +16 -12
- package/utils/theme/src/theme-dom/theme-dom.service.d.ts +10 -3
- package/utils/theme/src/theme.service.d.ts +24 -27
- package/utils/theme/src/utils/utils.d.ts +2 -10
- package/utils/translation/README.md +170 -1390
- package/utils/translation/public-api.d.ts +3 -3
- package/utils/translation/src/constants.d.ts +7 -9
- package/utils/translation/src/models/translation.d.ts +9 -10
- package/utils/translation/src/providers/translation.provider.d.ts +17 -28
- package/utils/translation/src/providers/translation.provider.types.d.ts +13 -6
- package/utils/translation/src/translation-dom/translation-dom.service.d.ts +2 -3
- package/utils/translation/src/translation.service.d.ts +37 -9
- package/directives/only-numbers/src/just-numbers.directive.d.ts +0 -9
- package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs +0 -1222
- package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs.map +0 -1
- package/utils/resource-loader/README.md +0 -460
- package/utils/resource-loader/public-api.d.ts +0 -1
- package/utils/resource-loader/src/cache/index.d.ts +0 -2
- package/utils/resource-loader/src/cache/layers/factory.d.ts +0 -38
- package/utils/resource-loader/src/cache/layers/index.d.ts +0 -3
- package/utils/resource-loader/src/cache/layers/indexed-db-cache.d.ts +0 -118
- package/utils/resource-loader/src/cache/layers/local-storage-cache.d.ts +0 -86
- package/utils/resource-loader/src/cache/layers/memory-cache.d.ts +0 -76
- package/utils/resource-loader/src/cache/types.d.ts +0 -107
- package/utils/resource-loader/src/config/index.d.ts +0 -1
- package/utils/resource-loader/src/config/load-config.d.ts +0 -32
- package/utils/resource-loader/src/constants.d.ts +0 -38
- package/utils/resource-loader/src/http/index.d.ts +0 -1
- package/utils/resource-loader/src/http/retryable-client.d.ts +0 -43
- package/utils/resource-loader/src/index.d.ts +0 -1
- package/utils/resource-loader/src/resource-loader.d.ts +0 -67
- package/utils/resource-loader/src/types.d.ts +0 -152
- package/utils/resource-loader/src/utils/cache-validator.d.ts +0 -72
- package/utils/resource-loader/src/utils/helpers.d.ts +0 -15
- package/utils/resource-loader/src/utils/index.d.ts +0 -2
- package/utils/theme/src/providers/constants.d.ts +0 -7
- package/utils/translation/src/providers/constants.d.ts +0 -11
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, signal,
|
|
5
|
-
import {
|
|
4
|
+
import { input, signal, inject, computed, ChangeDetectionStrategy, Component, output, contentChild, contentChildren, effect } from '@angular/core';
|
|
5
|
+
import { heroDocumentText, heroMagnifyingGlass } from '@ng-icons/heroicons/outline';
|
|
6
6
|
import { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';
|
|
7
7
|
import { IconComponent } from '@sixbell-telco/sdk/components/icon';
|
|
8
|
-
import { matInfoOutline } from '@sixbell-telco/sdk/components/icon/material/outline';
|
|
9
8
|
import { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';
|
|
10
9
|
import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
|
|
11
10
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
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';
|
|
14
|
+
import { TranslatePipe as TranslatePipe$1 } from '@ngx-translate/core';
|
|
14
15
|
import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
15
16
|
import { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';
|
|
16
17
|
|
|
@@ -30,19 +31,12 @@ import { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';
|
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
33
|
class TableHeaderCheckboxComponent {
|
|
33
|
-
table;
|
|
34
34
|
/**
|
|
35
35
|
* Defines the variant styling of the checkbox.
|
|
36
36
|
*
|
|
37
37
|
* @defaultValue 'primary'
|
|
38
38
|
*/
|
|
39
39
|
checkboxVariant = input('primary');
|
|
40
|
-
/**
|
|
41
|
-
* Defines the size of the checkbox.
|
|
42
|
-
*
|
|
43
|
-
* @defaultValue 'md'
|
|
44
|
-
*/
|
|
45
|
-
checkboxSize = input('sm');
|
|
46
40
|
/**
|
|
47
41
|
* Signal that tracks the checked state of the header checkbox.
|
|
48
42
|
*
|
|
@@ -54,9 +48,23 @@ class TableHeaderCheckboxComponent {
|
|
|
54
48
|
*
|
|
55
49
|
* @param table - Reference to the parent {@link TableComponent} to access table-level operations.
|
|
56
50
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
table = inject(TableComponent, { host: true });
|
|
52
|
+
checkboxSize = computed(() => {
|
|
53
|
+
switch (this.table.size()) {
|
|
54
|
+
case 'xs':
|
|
55
|
+
return 'xs';
|
|
56
|
+
case 'sm':
|
|
57
|
+
return 'sm';
|
|
58
|
+
case 'md':
|
|
59
|
+
return 'md';
|
|
60
|
+
case 'lg':
|
|
61
|
+
return 'lg';
|
|
62
|
+
case 'xl':
|
|
63
|
+
return 'lg';
|
|
64
|
+
default:
|
|
65
|
+
return 'sm';
|
|
66
|
+
}
|
|
67
|
+
});
|
|
60
68
|
/**
|
|
61
69
|
* Handles the event when the header checkbox is toggled.
|
|
62
70
|
*
|
|
@@ -67,15 +75,13 @@ class TableHeaderCheckboxComponent {
|
|
|
67
75
|
handleSelectAll(value) {
|
|
68
76
|
this.table.handleToggleAll(value);
|
|
69
77
|
}
|
|
70
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableHeaderCheckboxComponent, deps: [
|
|
71
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableHeaderCheckboxComponent, isStandalone: true, selector: "tr[header-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null }
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableHeaderCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableHeaderCheckboxComponent, isStandalone: true, selector: "tr[header-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<th class=\"w-6\">\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</th>\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: CheckboxComponent, selector: "st-checkbox", inputs: ["variant", "size", "label", "name", "value", "parentForm", "formControlName", "stopPropagation", "disabled"], outputs: ["valueChange", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
80
|
}
|
|
73
81
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableHeaderCheckboxComponent, decorators: [{
|
|
74
82
|
type: Component,
|
|
75
83
|
args: [{ selector: 'tr[header-checkbox]', imports: [CheckboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<th class=\"w-6\">\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</th>\n<ng-content></ng-content>\n" }]
|
|
76
|
-
}]
|
|
77
|
-
type: Host
|
|
78
|
-
}] }] });
|
|
84
|
+
}] });
|
|
79
85
|
|
|
80
86
|
/**
|
|
81
87
|
* Row checkbox component for table row selection.
|
|
@@ -90,19 +96,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
90
96
|
* ```
|
|
91
97
|
*/
|
|
92
98
|
class TableRowCheckboxComponent {
|
|
93
|
-
table;
|
|
94
99
|
/**
|
|
95
100
|
* Defines the variant styling of the checkbox.
|
|
96
101
|
*
|
|
97
102
|
* @defaultValue 'primary'
|
|
98
103
|
*/
|
|
99
104
|
checkboxVariant = input('primary');
|
|
100
|
-
/**
|
|
101
|
-
* Defines the size of the checkbox.
|
|
102
|
-
*
|
|
103
|
-
* @defaultValue 'md'
|
|
104
|
-
*/
|
|
105
|
-
checkboxSize = input('md');
|
|
106
105
|
/**
|
|
107
106
|
* Unique identifier for the table row.
|
|
108
107
|
*
|
|
@@ -121,9 +120,23 @@ class TableRowCheckboxComponent {
|
|
|
121
120
|
* @param table - Reference to the parent {@link TableComponent} to access
|
|
122
121
|
* table-level operations for row selection.
|
|
123
122
|
*/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
table = inject(TableComponent, { host: true });
|
|
124
|
+
checkboxSize = computed(() => {
|
|
125
|
+
switch (this.table.size()) {
|
|
126
|
+
case 'xs':
|
|
127
|
+
return 'xs';
|
|
128
|
+
case 'sm':
|
|
129
|
+
return 'sm';
|
|
130
|
+
case 'md':
|
|
131
|
+
return 'md';
|
|
132
|
+
case 'lg':
|
|
133
|
+
return 'lg';
|
|
134
|
+
case 'xl':
|
|
135
|
+
return 'lg';
|
|
136
|
+
default:
|
|
137
|
+
return 'sm';
|
|
138
|
+
}
|
|
139
|
+
});
|
|
127
140
|
/**
|
|
128
141
|
* Handles the selection event of the row checkbox.
|
|
129
142
|
*
|
|
@@ -135,15 +148,13 @@ class TableRowCheckboxComponent {
|
|
|
135
148
|
handleSelect(value) {
|
|
136
149
|
this.table.handleToggleCheckbox(value, this.identifier());
|
|
137
150
|
}
|
|
138
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableRowCheckboxComponent, deps: [
|
|
139
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableRowCheckboxComponent, isStandalone: true, selector: "tr[row-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null },
|
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableRowCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
152
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableRowCheckboxComponent, isStandalone: true, selector: "tr[row-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null }, identifier: { classPropertyName: "identifier", publicName: "identifier", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: CheckboxComponent, selector: "st-checkbox", inputs: ["variant", "size", "label", "name", "value", "parentForm", "formControlName", "stopPropagation", "disabled"], outputs: ["valueChange", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
140
153
|
}
|
|
141
154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableRowCheckboxComponent, decorators: [{
|
|
142
155
|
type: Component,
|
|
143
156
|
args: [{ selector: 'tr[row-checkbox]', imports: [CheckboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n" }]
|
|
144
|
-
}]
|
|
145
|
-
type: Host
|
|
146
|
-
}] }] });
|
|
157
|
+
}] });
|
|
147
158
|
|
|
148
159
|
/** Type definition for pagination display variants */
|
|
149
160
|
/**
|
|
@@ -187,10 +198,10 @@ const tableContainer = cva(['rounded-t-box', 'overflow-y-clip'], {
|
|
|
187
198
|
containerHeight: {
|
|
188
199
|
auto: ['h-auto'],
|
|
189
200
|
full: ['h-full'],
|
|
190
|
-
sm: ['
|
|
191
|
-
md: ['
|
|
192
|
-
lg: ['min-h-96
|
|
193
|
-
xl: ['
|
|
201
|
+
sm: ['h-72 min-h-72 overflow-y-auto overscroll-contain'],
|
|
202
|
+
md: ['h-80 min-h-80 overflow-y-auto overscroll-contain'],
|
|
203
|
+
lg: ['h-lg min-h-96 overflow-y-auto overscroll-contain'],
|
|
204
|
+
xl: ['h-[36rem] min-h-[36rem] overflow-y-auto overscroll-contain'],
|
|
194
205
|
},
|
|
195
206
|
},
|
|
196
207
|
compoundVariants: [],
|
|
@@ -226,6 +237,7 @@ const tableComponent = ({ size, containerHeight } = {}) => cn(tableContent({ siz
|
|
|
226
237
|
* ```
|
|
227
238
|
*/
|
|
228
239
|
class TableComponent {
|
|
240
|
+
translationService = inject(TranslateService);
|
|
229
241
|
/**
|
|
230
242
|
* Table size variant
|
|
231
243
|
* @defaultValue 'sm'
|
|
@@ -256,8 +268,16 @@ class TableComponent {
|
|
|
256
268
|
* @defaultValue 'default'
|
|
257
269
|
*/
|
|
258
270
|
paginatorType = input('default');
|
|
259
|
-
/**
|
|
260
|
-
|
|
271
|
+
/**
|
|
272
|
+
* Empty state icon for no data state
|
|
273
|
+
* @defaultValue heroDocumentText
|
|
274
|
+
*/
|
|
275
|
+
noDataIcon = input(heroDocumentText);
|
|
276
|
+
/**
|
|
277
|
+
* Empty state icon for no results state
|
|
278
|
+
* @defaultValue heroMagnifyingGlass
|
|
279
|
+
*/
|
|
280
|
+
noResultsIcon = input(heroMagnifyingGlass);
|
|
261
281
|
/**
|
|
262
282
|
* Array of data items to display
|
|
263
283
|
* @defaultValue []
|
|
@@ -287,6 +307,17 @@ class TableComponent {
|
|
|
287
307
|
pageChanged = output();
|
|
288
308
|
/** Event emitted when page size changes */
|
|
289
309
|
pageSizeChanged = output();
|
|
310
|
+
ENTRIES = [5, 10, 20, 50, 100];
|
|
311
|
+
entriesPerPageOptions = computed(() => {
|
|
312
|
+
return this.ENTRIES.map((n) => {
|
|
313
|
+
const translatedText = this.translationService.instant('sdk.table.perPage', { count: n });
|
|
314
|
+
const fallbackText = `${n} / page`;
|
|
315
|
+
return {
|
|
316
|
+
value: n,
|
|
317
|
+
text: translatedText && translatedText !== 'sdk.table.perPage' ? translatedText : fallbackText,
|
|
318
|
+
};
|
|
319
|
+
});
|
|
320
|
+
});
|
|
290
321
|
/**
|
|
291
322
|
* Show items per page selector
|
|
292
323
|
* @defaultValue true
|
|
@@ -307,6 +338,11 @@ class TableComponent {
|
|
|
307
338
|
* @defaultValue true
|
|
308
339
|
*/
|
|
309
340
|
showFooter = input(true);
|
|
341
|
+
/**
|
|
342
|
+
* Function to determine if any filters are currently active
|
|
343
|
+
* This allows the parent component to define what constitutes an "active filter"
|
|
344
|
+
*/
|
|
345
|
+
hasActiveFiltersCallback = input();
|
|
310
346
|
/**
|
|
311
347
|
* Controls whether table headers should overflow with horizontal scrolling (true)
|
|
312
348
|
* or wrap text normally (false)
|
|
@@ -322,6 +358,31 @@ class TableComponent {
|
|
|
322
358
|
const totalItems = this.totalItems();
|
|
323
359
|
return Math.ceil(totalItems / itemsPerPage);
|
|
324
360
|
});
|
|
361
|
+
/**
|
|
362
|
+
* Computed boolean indicating if any filters are currently active
|
|
363
|
+
*/
|
|
364
|
+
hasActiveFilters = computed(() => {
|
|
365
|
+
const callback = this.hasActiveFiltersCallback();
|
|
366
|
+
if (callback) {
|
|
367
|
+
return callback();
|
|
368
|
+
}
|
|
369
|
+
const pagination = this.pagination();
|
|
370
|
+
return !!pagination.search?.trim();
|
|
371
|
+
});
|
|
372
|
+
/**
|
|
373
|
+
* Computed boolean indicating if we should show "no results" vs "no data"
|
|
374
|
+
*/
|
|
375
|
+
hasNoResults = computed(() => {
|
|
376
|
+
const hasItems = this.totalItems() > 0 || this.data().length > 0;
|
|
377
|
+
return !hasItems && this.hasActiveFilters();
|
|
378
|
+
});
|
|
379
|
+
/**
|
|
380
|
+
* Computed boolean indicating if we should show "no data" state
|
|
381
|
+
*/
|
|
382
|
+
hasNoData = computed(() => {
|
|
383
|
+
const hasItems = this.totalItems() > 0 || this.data().length > 0;
|
|
384
|
+
return !hasItems && !this.hasActiveFilters();
|
|
385
|
+
});
|
|
325
386
|
/**
|
|
326
387
|
* Computed display range for current page entries
|
|
327
388
|
* @example "1-10" of 100 entries
|
|
@@ -345,7 +406,21 @@ class TableComponent {
|
|
|
345
406
|
*/
|
|
346
407
|
handlePageSizeChange(size) {
|
|
347
408
|
this.handleToggleAll(false);
|
|
348
|
-
|
|
409
|
+
let resolved;
|
|
410
|
+
if (typeof size === 'number') {
|
|
411
|
+
resolved = size;
|
|
412
|
+
}
|
|
413
|
+
else if (size && typeof size === 'object' && 'value' in size) {
|
|
414
|
+
const v = size['value'];
|
|
415
|
+
const safeStringify = (x) => (['string', 'number', 'boolean'].includes(typeof x) ? String(x) : '0');
|
|
416
|
+
resolved = typeof v === 'number' ? v : Number(safeStringify(v));
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
const safeStringify = (x) => (['string', 'number', 'boolean'].includes(typeof x) ? String(x) : '0');
|
|
420
|
+
resolved = Number(safeStringify(size)) || undefined;
|
|
421
|
+
}
|
|
422
|
+
const pageSize = Number(resolved || 1);
|
|
423
|
+
this.pageSizeChanged.emit(pageSize);
|
|
349
424
|
}
|
|
350
425
|
/**
|
|
351
426
|
* @internal
|
|
@@ -364,12 +439,12 @@ class TableComponent {
|
|
|
364
439
|
*/
|
|
365
440
|
tableContainerClass = computed(() => cn(tableContainer({
|
|
366
441
|
containerHeight: this.height(),
|
|
367
|
-
}), { 'overflow-x-auto': this.allowHeaderOverflow(), '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() }));
|
|
442
|
+
}), { 'overflow-x-auto': this.allowHeaderOverflow(), '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() }, 'w-full flex-grow'));
|
|
368
443
|
/**
|
|
369
444
|
* @internal
|
|
370
445
|
* Computes outer container classes based on size
|
|
371
446
|
*/
|
|
372
|
-
containerClass = computed(() => cn('flex flex-col gap-3
|
|
447
|
+
containerClass = computed(() => cn('rounded-box border-neutral @container flex min-w-0 flex-col gap-3 overflow-x-auto border border-solid', {
|
|
373
448
|
'gap-3 pb-3': this.size() === 'xs' || this.size() === 'sm' || this.size() === 'md',
|
|
374
449
|
'gap-4 pb-4': this.size() === 'lg',
|
|
375
450
|
'gap-5 pb-5': this.size() === 'xl',
|
|
@@ -444,11 +519,11 @@ class TableComponent {
|
|
|
444
519
|
this.header()?.checked.set(false);
|
|
445
520
|
}
|
|
446
521
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
447
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", 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 }, paginatorType: { classPropertyName: "paginatorType", publicName: "paginatorType", 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 }, 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
|
|
522
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", 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 }, 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 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 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40 mb-3\">\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<h3 typography tyVariant=\"h6\" class=\"text-base-content/60 mb-2\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t<p typography tyVariant=\"body-sm\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\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 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40 mb-3\">\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<h3 typography tyVariant=\"h6\" class=\"text-base-content/60 mb-2\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t<p typography tyVariant=\"body-sm\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t<div class=\"mt-4\">\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</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=\"@container flex w-full flex-col gap-4 overflow-x-auto pb-3\">\n\t\t\t\t<div class=\"divider divider-neutral my-0 h-[0.0625rem] px-4 before:h-[0.0625rem] after:h-[0.0625rem]\"></div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"flex flex-col items-center gap-4 px-4 @2xl:flex-row @2xl:justify-between @2xl:gap-2 @4xl:grid @4xl:grid-cols-[auto_1fr_auto] @4xl:items-center\"\n\t\t\t\t>\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 typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\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 typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\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[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(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\tsize=\"sm\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\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", "currentPage"], outputs: ["pageChanged", "currentPageChange"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }, { 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 });
|
|
448
523
|
}
|
|
449
524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableComponent, decorators: [{
|
|
450
525
|
type: Component,
|
|
451
|
-
args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TypographyDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let
|
|
526
|
+
args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TypographyDirective, 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 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 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40 mb-3\">\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<h3 typography tyVariant=\"h6\" class=\"text-base-content/60 mb-2\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t<p typography tyVariant=\"body-sm\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\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 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40 mb-3\">\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<h3 typography tyVariant=\"h6\" class=\"text-base-content/60 mb-2\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t<p typography tyVariant=\"body-sm\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t<div class=\"mt-4\">\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</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=\"@container flex w-full flex-col gap-4 overflow-x-auto pb-3\">\n\t\t\t\t<div class=\"divider divider-neutral my-0 h-[0.0625rem] px-4 before:h-[0.0625rem] after:h-[0.0625rem]\"></div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"flex flex-col items-center gap-4 px-4 @2xl:flex-row @2xl:justify-between @2xl:gap-2 @4xl:grid @4xl:grid-cols-[auto_1fr_auto] @4xl:items-center\"\n\t\t\t\t>\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 typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\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 typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\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[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(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\tsize=\"sm\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\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" }]
|
|
452
527
|
}] });
|
|
453
528
|
|
|
454
529
|
/**
|
|
@@ -502,11 +577,11 @@ class TableActionComponent {
|
|
|
502
577
|
});
|
|
503
578
|
});
|
|
504
579
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
505
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<ng-content></ng-content>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [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"] }, { 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"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<ng-content></ng-content>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
506
581
|
}
|
|
507
582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableActionComponent, decorators: [{
|
|
508
583
|
type: Component,
|
|
509
|
-
args: [{ selector: 'st-table-action', imports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<ng-content></ng-content>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [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" }]
|
|
584
|
+
args: [{ selector: 'st-table-action', imports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe$1], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<ng-content></ng-content>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [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" }]
|
|
510
585
|
}] });
|
|
511
586
|
|
|
512
587
|
/**
|
|
@@ -538,9 +613,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
538
613
|
args: [{ selector: 'st-table-actions', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n" }]
|
|
539
614
|
}] });
|
|
540
615
|
|
|
616
|
+
class TableEmptyActionsComponent {
|
|
617
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableEmptyActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
618
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: TableEmptyActionsComponent, isStandalone: true, selector: "st-table-empty-actions", ngImport: i0, template: "<ng-content></ng-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
619
|
+
}
|
|
620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableEmptyActionsComponent, decorators: [{
|
|
621
|
+
type: Component,
|
|
622
|
+
args: [{ selector: 'st-table-empty-actions', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
623
|
+
}] });
|
|
624
|
+
|
|
541
625
|
/**
|
|
542
626
|
* Generated bundle index. Do not edit.
|
|
543
627
|
*/
|
|
544
628
|
|
|
545
|
-
export { TableActionComponent, TableActionsComponent, TableComponent, TableHeaderCheckboxComponent, TableRowCheckboxComponent, tableComponent, tableContainer, tableContent };
|
|
629
|
+
export { TableActionComponent, TableActionsComponent, TableComponent, TableEmptyActionsComponent, TableHeaderCheckboxComponent, TableRowCheckboxComponent, tableComponent, tableContainer, tableContent };
|
|
546
630
|
//# sourceMappingURL=sixbell-telco-sdk-components-table.mjs.map
|