@sixbell-telco/sdk 1.2.1 → 1.4.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 +93 -0
- package/README.md +210 -70
- package/_index.css +232 -55
- package/assets/styles/toast.css +8 -0
- package/components/data-table/expandable/expandable.component.d.ts +129 -0
- package/components/{forms/datepicker → data-table}/index.d.ts +1 -1
- package/components/data-table/public-api.d.ts +7 -0
- package/components/data-table/selection/selection.component.d.ts +41 -0
- package/components/data-table/sortable-header/sortable-header.component.d.ts +61 -0
- package/components/data-table/src/data-table-context.service.d.ts +18 -0
- package/components/data-table/src/data-table.component.d.ts +158 -0
- package/components/data-table/src/models.d.ts +58 -0
- package/components/data-table/sub-component-toggle/index.d.ts +1 -0
- package/components/data-table/sub-component-toggle/sub-component-toggle.component.d.ts +12 -0
- package/components/dropdown/dropdown-group/dropdown-group.component.d.ts +1 -1
- package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +2 -2
- package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +2 -2
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +2 -2
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +2 -2
- package/components/forms/date-picker/constants/date-picker.constants.d.ts +13 -0
- package/components/forms/date-picker/index.d.ts +5 -0
- package/components/forms/date-picker/public-api.d.ts +3 -0
- package/components/forms/date-picker/src/date-picker.component.d.ts +323 -0
- package/components/forms/date-picker/types/date-picker.types.d.ts +39 -0
- package/components/overlay/index.d.ts +5 -0
- package/components/overlay/overlay-content/overlay-content.component.d.ts +23 -0
- package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +48 -0
- package/components/overlay/public-api.d.ts +3 -0
- package/components/overlay/src/overlay.component.d.ts +158 -0
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +8 -3
- package/components/paginator/pipes/pagination.pipe.d.ts +40 -0
- package/components/paginator/public-api.d.ts +1 -0
- package/components/paginator/src/paginator.component.d.ts +14 -12
- package/components/sonner/index.d.ts +5 -0
- package/components/sonner/public-api.d.ts +2 -0
- package/components/sonner/src/sonner.component.d.ts +39 -0
- package/components/sonner/toaster/index.d.ts +5 -0
- package/components/sonner/toaster/public-api.d.ts +1 -0
- package/components/sonner/toaster/src/toaster.component.d.ts +89 -0
- package/components/table/src/table.component.d.ts +9 -6
- package/components/toast/public-api.d.ts +9 -0
- package/components/toast/services/toast.service.d.ts +3 -0
- package/components/toast/toast-message/toast-message.component.d.ts +3 -0
- package/components/toast/toasts-container/toasts-container.component.d.ts +3 -0
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +103 -0
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +1091 -0
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +6 -6
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +12 -10
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +4 -5
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +885 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -0
- 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-input.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +408 -0
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +150 -35
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +132 -0
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +179 -0
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +15 -6
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +14 -0
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs +242 -0
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-sync.mjs +84 -0
- package/fesm2022/sixbell-telco-sdk-utils-sync.mjs.map +1 -0
- package/package.json +77 -47
- package/utils/date/index.d.ts +5 -0
- package/utils/date/public-api.d.ts +1 -0
- package/utils/date/src/date-utils.d.ts +125 -0
- package/utils/sync/index.d.ts +5 -0
- package/utils/sync/public-api.d.ts +1 -0
- package/utils/sync/src/sync.d.ts +37 -0
- package/components/forms/datepicker/public-api.d.ts +0 -2
- package/components/forms/datepicker/src/datepicker-format-month.pipe.d.ts +0 -10
- package/components/forms/datepicker/src/datepicker.component.d.ts +0 -54
- package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs +0 -212
- package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-sonner-toaster.mjs","sources":["../../../projects/sdk/components/sonner/toaster/src/toaster.component.ts","../../../projects/sdk/components/sonner/toaster/sixbell-telco-sdk-components-sonner-toaster.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { NgxSonnerToaster } from 'ngx-sonner';\n\n/**\n * Sixbell Telco Sonner Toaster Component\n *\n * A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.\n * This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.\n *\n * @example\n * ```html\n * <st-sonner-toaster\n * [theme]=\"'light'\"\n * [position]=\"'bottom-right'\"\n * [richColors]=\"true\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-sonner-toaster',\n\timports: [CommonModule, NgxSonnerToaster],\n\ttemplate: `\n\t\t<ngx-sonner-toaster\n\t\t\t[dir]=\"dir()\"\n\t\t\t[expand]=\"expand()\"\n\t\t\t[visibleToasts]=\"visibleToasts()\"\n\t\t\t[position]=\"position()\"\n\t\t\t[offset]=\"offset()\"\n\t\t\t[closeButton]=\"closeButton()\"\n\t\t\t[duration]=\"duration()\"\n\t\t\t[toastOptions]=\"toastOptions()\"\n\t\t/>\n\t`,\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SonnerToasterComponent {\n\t/**\n\t * Direction for the toasts\n\t * @defaultValue 'ltr'\n\t */\n\tdir = input<'ltr' | 'rtl'>('ltr');\n\n\t/**\n\t * Whether to use rich colors for semantic toasts\n\t * @defaultValue true\n\t */\n\trichColors = input<boolean>(false);\n\n\t/**\n\t * Whether to expand the toast on hover\n\t * @defaultValue false\n\t */\n\texpand = input<boolean>(false);\n\n\t/**\n\t * Maximum number of visible toasts\n\t * @defaultValue 3\n\t */\n\tvisibleToasts = input<number>(3);\n\n\t/**\n\t * Position of the toasts\n\t * @defaultValue 'bottom-right'\n\t */\n\tposition = input<'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'>('bottom-right');\n\n\t/**\n\t * Offset from the edge of the screen\n\t * @defaultValue '16px'\n\t */\n\toffset = input<string>('16px');\n\n\t/**\n\t * Whether to show close button\n\t * @defaultValue false\n\t */\n\tcloseButton = input<boolean>(false);\n\n\t/**\n\t * Duration for the toast in milliseconds\n\t * @defaultValue 4000\n\t */\n\tduration = input<number>(4000);\n\n\t/**\n\t * Default toast options with semantic styling\n\t */\n\ttoastOptions = computed(() => {\n\t\tconst baseClasses = {\n\t\t\ttoast: cn(\n\t\t\t\t'p-4! w-[22rem]! bg-base-200! data-[type=loading]:border-neutral! data-[type=default]:border-neutral! border! text-base-content! rounded-box shadow-main-lg! text-pretty! transition-[transform,opacity,height,box-shadow,border-color,color]! duration-[400ms,400ms,400ms,200ms,200ms,200ms]!',\n\t\t\t\t{ 'border-neutral!': this.richColors() === false },\n\t\t\t),\n\t\t\ttitle: cn('font-medium! font-heading!'),\n\t\t\tdescription: cn('text-base-content/70!'),\n\t\t\tactionButton: cn('btn! btn-primary! btn-xs! text-pretty! font-body! font-medium! leading-normal!'),\n\t\t\tcancelButton: cn('btn! btn-secondary! btn-xs! text-pretty! font-body! font-medium! leading-normal!'),\n\t\t\tcloseButton: cn('btn! btn-circle! btn-xs! text-pretty! font-body! border-neutral! border!'),\n\t\t};\n\n\t\tconst semanticClasses = this.richColors()\n\t\t\t? {\n\t\t\t\t\tsuccess: cn('bg-base-200! border-success! text-success!'),\n\t\t\t\t\terror: cn('bg-base-200! border-error! text-error!'),\n\t\t\t\t\twarning: cn('bg-base-200! border-warning! text-warning!'),\n\t\t\t\t\tinfo: cn('bg-base-200! border-info! text-info!'),\n\t\t\t\t}\n\t\t\t: {};\n\n\t\treturn {\n\t\t\tunstyled: false,\n\t\t\tclasses: {\n\t\t\t\t...baseClasses,\n\t\t\t\t...semanticClasses,\n\t\t\t},\n\t\t};\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKA;;;;;;;;;;;;;;AAcG;M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AEG;;;;"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import { toast as toast$1, NgxSonnerToaster } from 'ngx-sonner';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
+
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* Generates base toast classes with style variants for semantic colors
|
|
11
|
+
*/
|
|
12
|
+
const toastVariants = cva('', {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: '',
|
|
16
|
+
success: 'text-success',
|
|
17
|
+
error: 'text-error',
|
|
18
|
+
warning: 'text-warning',
|
|
19
|
+
info: 'text-info',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: 'default',
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* Toast function with semantic variants and Tailwind styling
|
|
28
|
+
* Proxies ngx-sonner toast functionality with SDK styling
|
|
29
|
+
*/
|
|
30
|
+
function createToast(message, options) {
|
|
31
|
+
return toast$1(message, options);
|
|
32
|
+
}
|
|
33
|
+
// Add methods to the function
|
|
34
|
+
createToast.success = (message, options) => {
|
|
35
|
+
return toast$1.success(message, options);
|
|
36
|
+
};
|
|
37
|
+
createToast.error = (message, options) => {
|
|
38
|
+
return toast$1.error(message, options);
|
|
39
|
+
};
|
|
40
|
+
// IMPORTANT: use the variant helpers so ngx-sonner applies variant metadata (was plain toast before)
|
|
41
|
+
createToast.warning = (message, options) => {
|
|
42
|
+
return toast$1.warning(message, options);
|
|
43
|
+
};
|
|
44
|
+
createToast.info = (message, options) => {
|
|
45
|
+
return toast$1.info(message, options);
|
|
46
|
+
};
|
|
47
|
+
createToast.loading = (message, options) => toast$1.loading(message, options);
|
|
48
|
+
createToast.promise = (promise, options) => toast$1.promise(promise, options);
|
|
49
|
+
createToast.custom = (component, options) => toast$1.custom(component, options);
|
|
50
|
+
createToast.dismiss = (id) => toast$1.dismiss(id);
|
|
51
|
+
createToast.dismissAll = () => toast$1.dismiss();
|
|
52
|
+
const toast = createToast;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Sixbell Telco Sonner Toaster Component
|
|
56
|
+
*
|
|
57
|
+
* A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.
|
|
58
|
+
* This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```html
|
|
62
|
+
* <st-sonner-toaster
|
|
63
|
+
* [theme]="'light'"
|
|
64
|
+
* [position]="'bottom-right'"
|
|
65
|
+
* [richColors]="true"
|
|
66
|
+
* />
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
class SonnerToasterComponent {
|
|
70
|
+
/**
|
|
71
|
+
* Direction for the toasts
|
|
72
|
+
* @defaultValue 'ltr'
|
|
73
|
+
*/
|
|
74
|
+
dir = input('ltr');
|
|
75
|
+
/**
|
|
76
|
+
* Whether to use rich colors for semantic toasts
|
|
77
|
+
* @defaultValue true
|
|
78
|
+
*/
|
|
79
|
+
richColors = input(false);
|
|
80
|
+
/**
|
|
81
|
+
* Whether to expand the toast on hover
|
|
82
|
+
* @defaultValue false
|
|
83
|
+
*/
|
|
84
|
+
expand = input(false);
|
|
85
|
+
/**
|
|
86
|
+
* Maximum number of visible toasts
|
|
87
|
+
* @defaultValue 3
|
|
88
|
+
*/
|
|
89
|
+
visibleToasts = input(3);
|
|
90
|
+
/**
|
|
91
|
+
* Position of the toasts
|
|
92
|
+
* @defaultValue 'bottom-right'
|
|
93
|
+
*/
|
|
94
|
+
position = input('bottom-right');
|
|
95
|
+
/**
|
|
96
|
+
* Offset from the edge of the screen
|
|
97
|
+
* @defaultValue '16px'
|
|
98
|
+
*/
|
|
99
|
+
offset = input('16px');
|
|
100
|
+
/**
|
|
101
|
+
* Whether to show close button
|
|
102
|
+
* @defaultValue false
|
|
103
|
+
*/
|
|
104
|
+
closeButton = input(false);
|
|
105
|
+
/**
|
|
106
|
+
* Duration for the toast in milliseconds
|
|
107
|
+
* @defaultValue 4000
|
|
108
|
+
*/
|
|
109
|
+
duration = input(4000);
|
|
110
|
+
/**
|
|
111
|
+
* Default toast options with semantic styling
|
|
112
|
+
*/
|
|
113
|
+
toastOptions = computed(() => {
|
|
114
|
+
const baseClasses = {
|
|
115
|
+
toast: cn('p-4! w-[22rem]! bg-base-200! data-[type=loading]:border-neutral! data-[type=default]:border-neutral! border! text-base-content! rounded-box shadow-main-lg! text-pretty! transition-[transform,opacity,height,box-shadow,border-color,color]! duration-[400ms,400ms,400ms,200ms,200ms,200ms]!', { 'border-neutral!': this.richColors() === false }),
|
|
116
|
+
title: cn('font-medium! font-heading!'),
|
|
117
|
+
description: cn('text-base-content/70!'),
|
|
118
|
+
actionButton: cn('btn! btn-primary! btn-xs! text-pretty! font-body! font-medium! leading-normal!'),
|
|
119
|
+
cancelButton: cn('btn! btn-secondary! btn-xs! text-pretty! font-body! font-medium! leading-normal!'),
|
|
120
|
+
closeButton: cn('btn! btn-circle! btn-xs! text-pretty! font-body! border-neutral! border!'),
|
|
121
|
+
};
|
|
122
|
+
const semanticClasses = this.richColors()
|
|
123
|
+
? {
|
|
124
|
+
success: cn('bg-base-200! border-success! text-success!'),
|
|
125
|
+
error: cn('bg-base-200! border-error! text-error!'),
|
|
126
|
+
warning: cn('bg-base-200! border-warning! text-warning!'),
|
|
127
|
+
info: cn('bg-base-200! border-info! text-info!'),
|
|
128
|
+
}
|
|
129
|
+
: {};
|
|
130
|
+
return {
|
|
131
|
+
unstyled: false,
|
|
132
|
+
classes: {
|
|
133
|
+
...baseClasses,
|
|
134
|
+
...semanticClasses,
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: SonnerToasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: SonnerToasterComponent, isStandalone: true, selector: "st-sonner-toaster", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, richColors: { classPropertyName: "richColors", publicName: "richColors", isSignal: true, isRequired: false, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null }, visibleToasts: { classPropertyName: "visibleToasts", publicName: "visibleToasts", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, closeButton: { classPropertyName: "closeButton", publicName: "closeButton", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
140
|
+
<ngx-sonner-toaster
|
|
141
|
+
[dir]="dir()"
|
|
142
|
+
[expand]="expand()"
|
|
143
|
+
[visibleToasts]="visibleToasts()"
|
|
144
|
+
[position]="position()"
|
|
145
|
+
[offset]="offset()"
|
|
146
|
+
[closeButton]="closeButton()"
|
|
147
|
+
[duration]="duration()"
|
|
148
|
+
[toastOptions]="toastOptions()"
|
|
149
|
+
/>
|
|
150
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NgxSonnerToaster, selector: "ngx-sonner-toaster", inputs: ["invert", "theme", "position", "hotKey", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir", "class", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
151
|
+
}
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: SonnerToasterComponent, decorators: [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{
|
|
155
|
+
selector: 'st-sonner-toaster',
|
|
156
|
+
imports: [CommonModule, NgxSonnerToaster],
|
|
157
|
+
template: `
|
|
158
|
+
<ngx-sonner-toaster
|
|
159
|
+
[dir]="dir()"
|
|
160
|
+
[expand]="expand()"
|
|
161
|
+
[visibleToasts]="visibleToasts()"
|
|
162
|
+
[position]="position()"
|
|
163
|
+
[offset]="offset()"
|
|
164
|
+
[closeButton]="closeButton()"
|
|
165
|
+
[duration]="duration()"
|
|
166
|
+
[toastOptions]="toastOptions()"
|
|
167
|
+
/>
|
|
168
|
+
`,
|
|
169
|
+
standalone: true,
|
|
170
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
171
|
+
}]
|
|
172
|
+
}] });
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Generated bundle index. Do not edit.
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
export { SonnerToasterComponent, toast, toastVariants };
|
|
179
|
+
//# sourceMappingURL=sixbell-telco-sdk-components-sonner.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-sonner.mjs","sources":["../../../projects/sdk/components/sonner/src/sonner.component.ts","../../../projects/sdk/components/sonner/toaster/src/toaster.component.ts","../../../projects/sdk/components/sonner/sixbell-telco-sdk-components-sonner.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { cva } from 'class-variance-authority';\nimport { toast as ngxToast } from 'ngx-sonner';\n\n/**\n * @internal\n * Generates base toast classes with style variants for semantic colors\n */\nexport const toastVariants = cva('', {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: '',\n\t\t\tsuccess: 'text-success',\n\t\t\terror: 'text-error',\n\t\t\twarning: 'text-warning',\n\t\t\tinfo: 'text-info',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'default',\n\t},\n});\n\n/** Possible toast style variants */\nexport type ToastVariantProps = 'default' | 'success' | 'error' | 'warning' | 'info' | null | undefined;\n\n/**\n * Toast function with semantic variants and Tailwind styling\n * Proxies ngx-sonner toast functionality with SDK styling\n */\nfunction createToast(message: string, options?: Record<string, unknown>) {\n\treturn ngxToast(message, options);\n}\n\n// Add methods to the function\ncreateToast.success = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.success(message, options);\n};\n\ncreateToast.error = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.error(message, options);\n};\n\n// IMPORTANT: use the variant helpers so ngx-sonner applies variant metadata (was plain toast before)\ncreateToast.warning = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.warning(message, options);\n};\n\ncreateToast.info = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.info(message, options);\n};\n\ncreateToast.loading = (message: string, options?: Record<string, unknown>) => ngxToast.loading(message, options);\n\ncreateToast.promise = (promise: Promise<unknown>, options: Record<string, unknown>) => ngxToast.promise(promise, options);\n\ncreateToast.custom = (component: Type<unknown>, options?: Record<string, unknown>) => ngxToast.custom(component, options);\n\ncreateToast.dismiss = (id?: string | number) => ngxToast.dismiss(id);\n\ncreateToast.dismissAll = () => ngxToast.dismiss();\n\nexport const toast = createToast as typeof createToast & {\n\tsuccess: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\terror: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\twarning: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tinfo: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tloading: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tpromise: (promise: Promise<unknown>, options: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tcustom: (component: Type<unknown>, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tdismiss: (id?: string | number) => ReturnType<typeof ngxToast>;\n\tdismissAll: () => ReturnType<typeof ngxToast>;\n};\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { NgxSonnerToaster } from 'ngx-sonner';\n\n/**\n * Sixbell Telco Sonner Toaster Component\n *\n * A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.\n * This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.\n *\n * @example\n * ```html\n * <st-sonner-toaster\n * [theme]=\"'light'\"\n * [position]=\"'bottom-right'\"\n * [richColors]=\"true\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-sonner-toaster',\n\timports: [CommonModule, NgxSonnerToaster],\n\ttemplate: `\n\t\t<ngx-sonner-toaster\n\t\t\t[dir]=\"dir()\"\n\t\t\t[expand]=\"expand()\"\n\t\t\t[visibleToasts]=\"visibleToasts()\"\n\t\t\t[position]=\"position()\"\n\t\t\t[offset]=\"offset()\"\n\t\t\t[closeButton]=\"closeButton()\"\n\t\t\t[duration]=\"duration()\"\n\t\t\t[toastOptions]=\"toastOptions()\"\n\t\t/>\n\t`,\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SonnerToasterComponent {\n\t/**\n\t * Direction for the toasts\n\t * @defaultValue 'ltr'\n\t */\n\tdir = input<'ltr' | 'rtl'>('ltr');\n\n\t/**\n\t * Whether to use rich colors for semantic toasts\n\t * @defaultValue true\n\t */\n\trichColors = input<boolean>(false);\n\n\t/**\n\t * Whether to expand the toast on hover\n\t * @defaultValue false\n\t */\n\texpand = input<boolean>(false);\n\n\t/**\n\t * Maximum number of visible toasts\n\t * @defaultValue 3\n\t */\n\tvisibleToasts = input<number>(3);\n\n\t/**\n\t * Position of the toasts\n\t * @defaultValue 'bottom-right'\n\t */\n\tposition = input<'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'>('bottom-right');\n\n\t/**\n\t * Offset from the edge of the screen\n\t * @defaultValue '16px'\n\t */\n\toffset = input<string>('16px');\n\n\t/**\n\t * Whether to show close button\n\t * @defaultValue false\n\t */\n\tcloseButton = input<boolean>(false);\n\n\t/**\n\t * Duration for the toast in milliseconds\n\t * @defaultValue 4000\n\t */\n\tduration = input<number>(4000);\n\n\t/**\n\t * Default toast options with semantic styling\n\t */\n\ttoastOptions = computed(() => {\n\t\tconst baseClasses = {\n\t\t\ttoast: cn(\n\t\t\t\t'p-4! w-[22rem]! bg-base-200! data-[type=loading]:border-neutral! data-[type=default]:border-neutral! border! text-base-content! rounded-box shadow-main-lg! text-pretty! transition-[transform,opacity,height,box-shadow,border-color,color]! duration-[400ms,400ms,400ms,200ms,200ms,200ms]!',\n\t\t\t\t{ 'border-neutral!': this.richColors() === false },\n\t\t\t),\n\t\t\ttitle: cn('font-medium! font-heading!'),\n\t\t\tdescription: cn('text-base-content/70!'),\n\t\t\tactionButton: cn('btn! btn-primary! btn-xs! text-pretty! font-body! font-medium! leading-normal!'),\n\t\t\tcancelButton: cn('btn! btn-secondary! btn-xs! text-pretty! font-body! font-medium! leading-normal!'),\n\t\t\tcloseButton: cn('btn! btn-circle! btn-xs! text-pretty! font-body! border-neutral! border!'),\n\t\t};\n\n\t\tconst semanticClasses = this.richColors()\n\t\t\t? {\n\t\t\t\t\tsuccess: cn('bg-base-200! border-success! text-success!'),\n\t\t\t\t\terror: cn('bg-base-200! border-error! text-error!'),\n\t\t\t\t\twarning: cn('bg-base-200! border-warning! text-warning!'),\n\t\t\t\t\tinfo: cn('bg-base-200! border-info! text-info!'),\n\t\t\t\t}\n\t\t\t: {};\n\n\t\treturn {\n\t\t\tunstyled: false,\n\t\t\tclasses: {\n\t\t\t\t...baseClasses,\n\t\t\t\t...semanticClasses,\n\t\t\t},\n\t\t};\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ngxToast"],"mappings":";;;;;;;AAIA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AA,EAAA,CAAA;;2FAgB5B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAlBlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AACzC,oBAAA,QAAQ,EAAE;;;;;;;;;;;AAWT,CAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;ACrCD;;AAEG;;;;"}
|
|
@@ -9,7 +9,7 @@ import { matInfoOutline } from '@sixbell-telco/sdk/components/icon/material/outl
|
|
|
9
9
|
import { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';
|
|
10
10
|
import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
|
|
11
11
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
12
|
-
import { cva
|
|
12
|
+
import { cva } from 'class-variance-authority';
|
|
13
13
|
import { CheckboxComponent } from '@sixbell-telco/sdk/components/forms/checkbox';
|
|
14
14
|
import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
15
15
|
import { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';
|
|
@@ -145,6 +145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
145
145
|
type: Host
|
|
146
146
|
}] }] });
|
|
147
147
|
|
|
148
|
+
/** Type definition for pagination display variants */
|
|
148
149
|
/**
|
|
149
150
|
* @internal
|
|
150
151
|
* Generates base table classes with size variants
|
|
@@ -157,7 +158,6 @@ const tableContent = cva([
|
|
|
157
158
|
'text-pretty',
|
|
158
159
|
'[&_tbody]:font-body',
|
|
159
160
|
'[&_thead]:font-heading',
|
|
160
|
-
// '[&_thead]:whitespace-normal',
|
|
161
161
|
'[&_thead]:leading-normal',
|
|
162
162
|
'[&_tbody]:leading-tight',
|
|
163
163
|
'[&_th]:bg-neutral [&_th]:text-neutral-content',
|
|
@@ -202,7 +202,7 @@ const tableContainer = cva(['rounded-t-box', 'overflow-y-clip'], {
|
|
|
202
202
|
* @internal
|
|
203
203
|
* Combines table content and container classes
|
|
204
204
|
*/
|
|
205
|
-
const tableComponent = ({ size, containerHeight } = {}) =>
|
|
205
|
+
const tableComponent = ({ size, containerHeight } = {}) => cn(tableContent({ size }), tableContainer({ containerHeight }));
|
|
206
206
|
/**
|
|
207
207
|
* A feature-rich data table component with sorting, pagination, and row selection
|
|
208
208
|
*
|
|
@@ -280,7 +280,7 @@ class TableComponent {
|
|
|
280
280
|
});
|
|
281
281
|
/**
|
|
282
282
|
* Maximum number of pagination buttons to display
|
|
283
|
-
* @defaultValue
|
|
283
|
+
* @defaultValue 4
|
|
284
284
|
*/
|
|
285
285
|
maxSize = input(4);
|
|
286
286
|
/** Event emitted when page changes */
|
|
@@ -313,6 +313,15 @@ class TableComponent {
|
|
|
313
313
|
* @defaultValue false
|
|
314
314
|
*/
|
|
315
315
|
allowHeaderOverflow = input(false);
|
|
316
|
+
/**
|
|
317
|
+
* Computed total number of pages for the internal paginator.
|
|
318
|
+
* Calculated from totalItems and itemsPerPage.
|
|
319
|
+
*/
|
|
320
|
+
totalPages = computed(() => {
|
|
321
|
+
const itemsPerPage = this.pagination().itemsPerPage || 1;
|
|
322
|
+
const totalItems = this.totalItems();
|
|
323
|
+
return Math.ceil(totalItems / itemsPerPage);
|
|
324
|
+
});
|
|
316
325
|
/**
|
|
317
326
|
* Computed display range for current page entries
|
|
318
327
|
* @example "1-10" of 100 entries
|
|
@@ -435,11 +444,11 @@ class TableComponent {
|
|
|
435
444
|
this.header()?.checked.set(false);
|
|
436
445
|
}
|
|
437
446
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
-
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 dataVar = data();\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 heightVar = height();\n@let showshowFooterVar = showFooter();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\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\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator
|
|
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 dataVar = data();\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 heightVar = height();\n@let showshowFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\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\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\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\t</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n} @else {\n\t<div class=\"rounded-box border-neutral grid h-full place-content-center gap-4 border border-solid p-6\">\n\t\t<div>\n\t\t\t<div class=\"text-info grid place-content-center\">\n\t\t\t\t<st-icon [icon]=\"infoIcon\" size=\"lg\" color=\"inherit\" size=\"lg\"></st-icon>\n\t\t\t</div>\n\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.emptyListMessage' | translate }}</span>\n\t\t</div>\n\t</div>\n}\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", "ghost", "name", "placeholder", "label", "value", "options", "displayKey", "valueKey", "allowClear", "parentForm", "formControlName", "disabled"], outputs: ["valueChange", "disabledChange", "blurred", "valueUpdated"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
439
448
|
}
|
|
440
449
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableComponent, decorators: [{
|
|
441
450
|
type: Component,
|
|
442
|
-
args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TypographyDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let dataVar = data();\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 heightVar = height();\n@let showshowFooterVar = showFooter();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\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\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator
|
|
451
|
+
args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TypographyDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let dataVar = data();\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 heightVar = height();\n@let showshowFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\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\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\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\t</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n} @else {\n\t<div class=\"rounded-box border-neutral grid h-full place-content-center gap-4 border border-solid p-6\">\n\t\t<div>\n\t\t\t<div class=\"text-info grid place-content-center\">\n\t\t\t\t<st-icon [icon]=\"infoIcon\" size=\"lg\" color=\"inherit\" size=\"lg\"></st-icon>\n\t\t\t</div>\n\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.emptyListMessage' | translate }}</span>\n\t\t</div>\n\t</div>\n}\n" }]
|
|
443
452
|
}] });
|
|
444
453
|
|
|
445
454
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-table.mjs","sources":["../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.ts","../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.html","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.ts","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.html","../../../projects/sdk/components/table/src/table.component.ts","../../../projects/sdk/components/table/src/table.component.html","../../../projects/sdk/components/table/table-action/table-action.component.ts","../../../projects/sdk/components/table/table-action/table-action.component.html","../../../projects/sdk/components/table/table-actions/table-actions.component.ts","../../../projects/sdk/components/table/table-actions/table-actions.component.html","../../../projects/sdk/components/table/sixbell-telco-sdk-components-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n/**\n * Header checkbox component for the table.\n *\n * This component renders a checkbox within a table header row,\n * allowing users to select or deselect all rows in the table.\n *\n * @remarks\n * Utilizes Angular's dependency injection to access the parent {@link TableComponent}\n * and propagate the checkbox state changes.\n *\n * @example\n * ```html\n * <tr header-checkbox></tr>\n * ```\n */\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'tr[header-checkbox]',\n\timports: [CheckboxComponent],\n\ttemplateUrl: './table-header-checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableHeaderCheckboxComponent {\n\t/**\n\t * Defines the variant styling of the checkbox.\n\t *\n\t * @defaultValue 'primary'\n\t */\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\n\t/**\n\t * Defines the size of the checkbox.\n\t *\n\t * @defaultValue 'md'\n\t */\n\tcheckboxSize = input<CheckboxSizeProps>('sm');\n\n\t/**\n\t * Signal that tracks the checked state of the header checkbox.\n\t *\n\t * @defaultValue false\n\t */\n\tchecked = signal<boolean>(false);\n\n\t/**\n\t * Creates an instance of TableHeaderCheckboxComponent.\n\t *\n\t * @param table - Reference to the parent {@link TableComponent} to access table-level operations.\n\t */\n\tconstructor(@Host() private table: TableComponent) {}\n\n\t/**\n\t * Handles the event when the header checkbox is toggled.\n\t *\n\t * This method notifies the parent table component to either select or deselect all rows.\n\t *\n\t * @param value - The new checked state (true to select all rows, false to deselect all).\n\t */\n\thandleSelectAll(value: boolean) {\n\t\tthis.table.handleToggleAll(value);\n\t}\n}\n","<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","import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n/**\n * Row checkbox component for table row selection.\n *\n * This component renders a checkbox within a table row,\n * enabling individual row selection. It interacts with the parent\n * {@link TableComponent} to update the selection state.\n *\n * @example\n * ```html\n * <tr row-checkbox [identifier]=\"rowId\"></tr>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'tr[row-checkbox]',\n imports: [CheckboxComponent],\n templateUrl: './table-row-checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TableRowCheckboxComponent {\n\t/**\n\t * Defines the variant styling of the checkbox.\n\t *\n\t * @defaultValue 'primary'\n\t */\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\n\t/**\n\t * Defines the size of the checkbox.\n\t *\n\t * @defaultValue 'md'\n\t */\n\tcheckboxSize = input<CheckboxSizeProps>('md');\n\n\t/**\n\t * Unique identifier for the table row.\n\t *\n\t * This input is required to track the specific row in the table.\n\t */\n\tidentifier = input.required();\n\n\t/**\n\t * Signal that tracks the checked state of the row checkbox.\n\t *\n\t * @defaultValue false\n\t */\n\tchecked = signal<boolean>(false);\n\n\t/**\n\t * Creates an instance of TableRowCheckboxComponent.\n\t *\n\t * @param table - Reference to the parent {@link TableComponent} to access\n\t * table-level operations for row selection.\n\t */\n\tconstructor(@Host() private table: TableComponent) {}\n\n\t/**\n\t * Handles the selection event of the row checkbox.\n\t *\n\t * This method notifies the parent table component to update the selection state\n\t * for the corresponding row, based on the checkbox's new value.\n\t *\n\t * @param value - The new checked state (true for selected, false for deselected).\n\t */\n\thandleSelect(value: boolean) {\n\t\tthis.table.handleToggleCheckbox(value, this.identifier());\n\t}\n}\n","<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, input, output, signal } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matInfoOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';\nimport { TypographyDirective, TypographyVariantProps } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva, cx } from 'class-variance-authority';\nimport { TableHeaderCheckboxComponent } from '../table-header-checkbox/table-header-checkbox.component';\nimport { TableRowCheckboxComponent } from '../table-row-checkbox/table-row-checkbox.component';\n\n/** Type definition for pagination display variants */\nexport type PaginationType = 'default' | 'dots';\n\n/**\n * @internal\n * Generates base table classes with size variants\n */\nexport const tableContent = cva(\n\t[\n\t\t'table',\n\t\t'relative',\n\t\t'border-separate',\n\t\t'border-spacing-0',\n\t\t'text-pretty',\n\t\t'[&_tbody]:font-body',\n\t\t'[&_thead]:font-heading',\n\t\t// '[&_thead]:whitespace-normal',\n\t\t'[&_thead]:leading-normal',\n\t\t'[&_tbody]:leading-tight',\n\t\t'[&_th]:bg-neutral [&_th]:text-neutral-content',\n\t\t'[&_th]:px-4',\n\t\t'[&_td]:px-4',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\txs: ['table-xs'],\n\t\t\t\tsm: ['table-sm'],\n\t\t\t\tmd: ['table-md'],\n\t\t\t\tlg: ['table-lg'],\n\t\t\t\txl: ['table-xl'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tsize: 'sm',\n\t\t},\n\t},\n);\n\n/** Possible table size variants */\nexport type TableContentSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/**\n * @internal\n * Generates table container classes with height variants\n */\nexport const tableContainer = cva(['rounded-t-box', 'overflow-y-clip'], {\n\tvariants: {\n\t\tcontainerHeight: {\n\t\t\tauto: ['h-auto'],\n\t\t\tfull: ['h-full'],\n\t\t\tsm: ['min-h-72 h-72 overscroll-contain overflow-y-auto'],\n\t\t\tmd: ['min-h-80 h-80 overscroll-contain overflow-y-auto'],\n\t\t\tlg: ['min-h-96 h-lg overscroll-contain overflow-y-auto'],\n\t\t\txl: ['min-h-[36rem] h-[36rem] overscroll-contain overflow-y-auto'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tcontainerHeight: 'auto',\n\t},\n});\n\n/** Possible table container height values */\nexport type TableContainerHeightProps = 'auto' | 'full' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/** Configuration object for table styling variants */\nexport type TableVariantProps = {\n\tsize?: TableContentSizeProps;\n\tcontainerHeight?: TableContainerHeightProps;\n};\n\n/**\n * @internal\n * Combines table content and container classes\n */\nexport const tableComponent = ({ size, containerHeight }: TableVariantProps = {}) => cx(tableContent({ size }), tableContainer({ containerHeight }));\n\n/** Pagination configuration structure */\nexport type TablePagination = {\n\tid: string;\n\tcurrentPage: number;\n\titemsPerPage: number;\n\tsearch: string;\n};\n\n/**\n * A feature-rich data table component with sorting, pagination, and row selection\n *\n * @remarks\n * Integrates with Tailwind CSS for styling and supports responsive layouts.\n * Includes built-in pagination controls and checkbox selection functionality.\n *\n * @example\n * ```html\n * <st-table\n * [data]=\"users\"\n * [totalItems]=\"100\"\n * [pagination]=\"{ currentPage: 1, itemsPerPage: 10 }\"\n * (pageChanged)=\"handlePageChange($event)\"\n * size=\"md\"\n * height=\"lg\"\n * zebra\n * >\n * <!-- Table columns and content -->\n * </st-table>\n * ```\n */\n@Component({\n\tselector: 'st-table',\n\timports: [CommonModule, PaginatorComponent, TypographyDirective, SelectComponent, IconComponent, TranslatePipe],\n\ttemplateUrl: './table.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent {\n\t/**\n\t * Table size variant\n\t * @defaultValue 'sm'\n\t */\n\tsize = input<TableContentSizeProps>();\n\n\t/**\n\t * Table container height preset\n\t * @defaultValue 'auto'\n\t */\n\theight = input<TableContainerHeightProps>('auto');\n\n\t/**\n\t * Enable sticky header row\n\t * @defaultValue false\n\t */\n\tpinRows = input<boolean>(false);\n\n\t/**\n\t * Enable sticky first column\n\t * @defaultValue false\n\t */\n\tpinColumns = input<boolean>(false);\n\n\t/**\n\t * Apply zebra-striping to rows\n\t * @defaultValue false\n\t */\n\tzebra = input<boolean>(false);\n\n\t/**\n\t * Pagination control display variant\n\t * @defaultValue 'default'\n\t */\n\tpaginatorType = input<PaginationType>('default');\n\n\t/** @internal Info icon reference */\n\tinfoIcon = matInfoOutline;\n\n\t/**\n\t * Array of data items to display\n\t * @defaultValue []\n\t */\n\tdata = input<unknown[]>([]);\n\n\t/**\n\t * Total number of items across all pages\n\t * @defaultValue 0\n\t */\n\ttotalItems = input<number>(0);\n\n\t/**\n\t * Pagination configuration\n\t * @defaultValue { id: 'paginator', currentPage: 1, itemsPerPage: 10, search: '' }\n\t */\n\tpagination = input<TablePagination>({\n\t\tid: 'paginator',\n\t\tcurrentPage: 1,\n\t\titemsPerPage: 10,\n\t\tsearch: '',\n\t});\n\n\t/**\n\t * Maximum number of pagination buttons to display\n\t * @defaultValue 7\n\t */\n\tmaxSize = input<number>(4);\n\n\t/** Event emitted when page changes */\n\tpageChanged = output<number>();\n\n\t/** Event emitted when page size changes */\n\tpageSizeChanged = output<number>();\n\n\t/**\n\t * Show items per page selector\n\t * @defaultValue true\n\t */\n\tshowItemsPerPage = input<boolean>(true);\n\n\t/**\n\t * Show entries count display\n\t * @defaultValue true\n\t */\n\tshowEntries = input<boolean>(true);\n\n\t/**\n\t * Show pagination controls\n\t * @defaultValue true\n\t */\n\tshowPagination = input<boolean>(true);\n\n\t/**\n\t * Show footer with additional information\n\t * @defaultValue true\n\t */\n\tshowFooter = input<boolean>(true);\n\t/**\n\t * Controls whether table headers should overflow with horizontal scrolling (true)\n\t * or wrap text normally (false)\n\t * @defaultValue false\n\t */\n\tallowHeaderOverflow = input<boolean>(false);\n\n\t/**\n\t * Computed display range for current page entries\n\t * @example \"1-10\" of 100 entries\n\t */\n\tpaginationRange = computed(() => {\n\t\tconst start = this.pagination().currentPage * this.pagination().itemsPerPage - this.pagination().itemsPerPage + 1;\n\t\tconst end = Math.min(this.pagination().currentPage * this.pagination().itemsPerPage, this.totalItems());\n\t\treturn `${start}-${end}`;\n\t});\n\n\t/**\n\t * Handles page navigation events\n\t * @param page - New page number\n\t */\n\thandlePageChange(page: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.pageChanged.emit(page);\n\t}\n\n\t/**\n\t * Handles page size changes\n\t * @param size - New items per page value\n\t */\n\thandlePageSizeChange(size: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.pageSizeChanged.emit(size);\n\t}\n\n\t/**\n\t * @internal\n\t * Computes table element classes based on current configuration\n\t */\n\ttableClass = computed(() =>\n\t\tcn(\n\t\t\ttableContent({\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{\n\t\t\t\t'table-pin-rows': this.pinRows(),\n\t\t\t\t'table-pin-cols': this.pinColumns(),\n\t\t\t\t'table-zebra': this.zebra(),\n\t\t\t},\n\t\t),\n\t);\n\n\t/**\n\t * @internal\n\t * Computes table container classes based on height input\n\t */\n\ttableContainerClass = computed(() =>\n\t\tcn(\n\t\t\ttableContainer({\n\t\t\t\tcontainerHeight: this.height(),\n\t\t\t}),\n\t\t\t{ 'overflow-x-auto': this.allowHeaderOverflow(), '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() },\n\t\t),\n\t);\n\n\t/**\n\t * @internal\n\t * Computes outer container classes based on size\n\t */\n\tcontainerClass = computed(() =>\n\t\tcn('flex flex-col gap-3 rounded-box border border-solid border-neutral pb-3', {\n\t\t\t'gap-3 pb-3': this.size() === 'xs' || this.size() === 'sm' || this.size() === 'md',\n\t\t\t'gap-4 pb-4': this.size() === 'lg',\n\t\t\t'gap-5 pb-5': this.size() === 'xl',\n\t\t}),\n\t);\n\n\t/**\n\t * @internal\n\t * Computes typography variant for paginator text based on table size\n\t */\n\tpaginatorTextSize = computed<TypographyVariantProps>(() => {\n\t\tswitch (this.size()) {\n\t\t\tcase 'xs':\n\t\t\t\treturn 'body-xxs';\n\t\t\tcase 'sm':\n\t\t\t\treturn 'body-xs';\n\t\t\tcase 'md':\n\t\t\t\treturn 'body-sm';\n\t\t\tcase 'lg':\n\t\t\t\treturn 'body';\n\t\t\tcase 'xl':\n\t\t\t\treturn 'body';\n\t\t\tdefault:\n\t\t\t\treturn 'body-xs';\n\t\t}\n\t});\n\n\t/** @internal Reference to header checkbox component */\n\theader = contentChild(TableHeaderCheckboxComponent, { descendants: true });\n\n\t/** @internal List of row checkbox components */\n\trows = contentChildren(TableRowCheckboxComponent, { descendants: true });\n\n\t/** @internal Track selected row identifiers */\n\tidentifiers = signal<Set<unknown>>(new Set());\n\n\t/** Event emitted with array of selected item identifiers */\n\tcheckedItems = output<unknown[]>();\n\n\t/** @internal Sync checkbox state with output */\n\tcheckEffect = effect(() => {\n\t\tthis.checkedItems.emit(Array.from(this.identifiers()));\n\t});\n\n\t/**\n\t * Toggle all row checkboxes\n\t * @param value - Whether to check or uncheck all rows\n\t */\n\thandleToggleAll(value: boolean) {\n\t\tif (!value) {\n\t\t\tthis.clearList();\n\t\t}\n\n\t\tthis.rows().forEach((row) => {\n\t\t\trow.checked.set(value);\n\t\t\tif (value) {\n\t\t\t\tthis.identifiers.update((items) => new Set(items).add(row.identifier()));\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Handle individual checkbox toggle\n\t * @param value - Checkbox state\n\t * @param identifier - Unique row identifier\n\t */\n\thandleToggleCheckbox(value: boolean, identifier: unknown) {\n\t\tif (value) {\n\t\t\tthis.identifiers.update((items) => new Set(items).add(identifier));\n\t\t} else {\n\t\t\tthis.header()?.checked.set(false);\n\t\t\tthis.identifiers.update((items) => {\n\t\t\t\titems.delete(identifier);\n\t\t\t\treturn new Set(items);\n\t\t\t});\n\t\t}\n\t}\n\n\t/** @internal Clear all selections */\n\tprivate clearList() {\n\t\tthis.identifiers.set(new Set());\n\t\tthis.header()?.checked.set(false);\n\t}\n}\n","@let total = totalItems();\n@let dataVar = data();\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 heightVar = height();\n@let showshowFooterVar = showFooter();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\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\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator [paginatorId]=\"paginationVar.id\" (pageChanged)=\"handlePageChange($event)\" type=\"dots\"></st-paginator>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\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\t</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n} @else {\n\t<div class=\"rounded-box border-neutral grid h-full place-content-center gap-4 border border-solid p-6\">\n\t\t<div>\n\t\t\t<div class=\"text-info grid place-content-center\">\n\t\t\t\t<st-icon [icon]=\"infoIcon\" size=\"lg\" color=\"inherit\" size=\"lg\"></st-icon>\n\t\t\t</div>\n\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.emptyListMessage' | translate }}</span>\n\t\t</div>\n\t</div>\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ButtonComponent, ButtonSizeProps, ButtonVariantProps } from '@sixbell-telco/sdk/components/button';\nimport { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n/**\n * Component to render a table action, typically a button with optional tooltip.\n *\n * @remarks\n * This component encapsulates a button within a table, allowing for consistent styling\n * and easy integration with tooltips.\n *\n * @example\n * ```html\n * <st-table-action tooltip=\"Delete\" icon=\"delete\">\n * Delete\n * </st-table-action>\n * ```\n */\n@Component({\n\tselector: 'st-table-action',\n\timports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe],\n\ttemplateUrl: './table-action.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableActionComponent {\n\t/**\n\t * Button style variant.\n\t * @defaultValue 'primary'\n\t */\n\tvariant = input<ButtonVariantProps>('primary');\n\t/**\n\t * Tooltip text (optional).\n\t */\n\ttooltip = input<string | undefined>();\n\t/**\n\t * Icon name (optional).\n\t */\n\ticon = input<string | undefined>();\n\t/**\n\t * Button size.\n\t * @defaultValue 'md'\n\t */\n\tsize = input<ButtonSizeProps>('md');\n\n\t/**\n\t * Computes CSS classes for the table action text size based on the current size setting.\n\t *\n\t * @returns A string of CSS classes determined by the component's size:\n\t * - 'xs' size: applies 'text-[0.6875rem]' class\n\t * - 'sm' size: applies 'text-xs' class\n\t * - 'md' size: applies 'text-sm' class\n\t * - 'lg' or 'xl' size: applies 'text-lg' class\n\t */\n\ttableActionClass = computed(() => {\n\t\treturn cn({\n\t\t\t'text-[0.6875rem]': this.size() === 'xs',\n\t\t\t'text-xs': this.size() === 'sm',\n\t\t\t'text-sm': this.size() === 'md',\n\t\t\t'text-lg': this.size() === 'lg' || this.size() === 'xl',\n\t\t});\n\t});\n}\n","@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","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\n/**\n * Component to render a container for table actions.\n *\n * @remarks\n * This component is a simple container for action buttons or other interactive elements\n * within a table. It provides basic styling and layout.\n *\n * @example\n * ```html\n * <st-table-actions>\n * <button>Action 1</button>\n * <button>Action 2</button>\n * </st-table-actions>\n * ```\n */\n@Component({\n\tselector: 'st-table-actions',\n\timports: [CommonModule],\n\ttemplateUrl: './table-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableActionsComponent {\n\t/**\n\t * @internal\n\t * Computed class string for the table actions container.\n\t */\n\tcomponentClass = computed(() => cn('inline-flex items-center gap-2 grow-0 align-top justify-cente'));\n}\n","<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TableComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;AAcG;MAQU,4BAA4B,CAAA;AA2BZ,IAAA,KAAA;AA1B5B;;;;AAIG;AACH,IAAA,eAAe,GAAG,KAAK,CAAuB,SAAS,CAAC;AAExD;;;;AAIG;AACH,IAAA,YAAY,GAAG,KAAK,CAAoB,IAAI,CAAC;AAE7C;;;;AAIG;AACH,IAAA,OAAO,GAAG,MAAM,C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AA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBlC,2EAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDkBW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WACnB,CAAC,YAAY,CAAC,EAEN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2EAAA,EAAA;;;AEvBhD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-table.mjs","sources":["../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.ts","../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.html","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.ts","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.html","../../../projects/sdk/components/table/src/table.component.ts","../../../projects/sdk/components/table/src/table.component.html","../../../projects/sdk/components/table/table-action/table-action.component.ts","../../../projects/sdk/components/table/table-action/table-action.component.html","../../../projects/sdk/components/table/table-actions/table-actions.component.ts","../../../projects/sdk/components/table/table-actions/table-actions.component.html","../../../projects/sdk/components/table/sixbell-telco-sdk-components-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n/**\n * Header checkbox component for the table.\n *\n * This component renders a checkbox within a table header row,\n * allowing users to select or deselect all rows in the table.\n *\n * @remarks\n * Utilizes Angular's dependency injection to access the parent {@link TableComponent}\n * and propagate the checkbox state changes.\n *\n * @example\n * ```html\n * <tr header-checkbox></tr>\n * ```\n */\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'tr[header-checkbox]',\n\timports: [CheckboxComponent],\n\ttemplateUrl: './table-header-checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableHeaderCheckboxComponent {\n\t/**\n\t * Defines the variant styling of the checkbox.\n\t *\n\t * @defaultValue 'primary'\n\t */\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\n\t/**\n\t * Defines the size of the checkbox.\n\t *\n\t * @defaultValue 'md'\n\t */\n\tcheckboxSize = input<CheckboxSizeProps>('sm');\n\n\t/**\n\t * Signal that tracks the checked state of the header checkbox.\n\t *\n\t * @defaultValue false\n\t */\n\tchecked = signal<boolean>(false);\n\n\t/**\n\t * Creates an instance of TableHeaderCheckboxComponent.\n\t *\n\t * @param table - Reference to the parent {@link TableComponent} to access table-level operations.\n\t */\n\tconstructor(@Host() private table: TableComponent) {}\n\n\t/**\n\t * Handles the event when the header checkbox is toggled.\n\t *\n\t * This method notifies the parent table component to either select or deselect all rows.\n\t *\n\t * @param value - The new checked state (true to select all rows, false to deselect all).\n\t */\n\thandleSelectAll(value: boolean) {\n\t\tthis.table.handleToggleAll(value);\n\t}\n}\n","<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","import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n/**\n * Row checkbox component for table row selection.\n *\n * This component renders a checkbox within a table row,\n * enabling individual row selection. It interacts with the parent\n * {@link TableComponent} to update the selection state.\n *\n * @example\n * ```html\n * <tr row-checkbox [identifier]=\"rowId\"></tr>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'tr[row-checkbox]',\n imports: [CheckboxComponent],\n templateUrl: './table-row-checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TableRowCheckboxComponent {\n\t/**\n\t * Defines the variant styling of the checkbox.\n\t *\n\t * @defaultValue 'primary'\n\t */\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\n\t/**\n\t * Defines the size of the checkbox.\n\t *\n\t * @defaultValue 'md'\n\t */\n\tcheckboxSize = input<CheckboxSizeProps>('md');\n\n\t/**\n\t * Unique identifier for the table row.\n\t *\n\t * This input is required to track the specific row in the table.\n\t */\n\tidentifier = input.required();\n\n\t/**\n\t * Signal that tracks the checked state of the row checkbox.\n\t *\n\t * @defaultValue false\n\t */\n\tchecked = signal<boolean>(false);\n\n\t/**\n\t * Creates an instance of TableRowCheckboxComponent.\n\t *\n\t * @param table - Reference to the parent {@link TableComponent} to access\n\t * table-level operations for row selection.\n\t */\n\tconstructor(@Host() private table: TableComponent) {}\n\n\t/**\n\t * Handles the selection event of the row checkbox.\n\t *\n\t * This method notifies the parent table component to update the selection state\n\t * for the corresponding row, based on the checkbox's new value.\n\t *\n\t * @param value - The new checked state (true for selected, false for deselected).\n\t */\n\thandleSelect(value: boolean) {\n\t\tthis.table.handleToggleCheckbox(value, this.identifier());\n\t}\n}\n","<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, input, output, signal } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matInfoOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { Pagination, PaginationType, PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';\nimport { TypographyDirective, TypographyVariantProps } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { TableHeaderCheckboxComponent } from '../table-header-checkbox/table-header-checkbox.component';\nimport { TableRowCheckboxComponent } from '../table-row-checkbox/table-row-checkbox.component';\n\n/** Type definition for pagination display variants */\n/**\n * @internal\n * Generates base table classes with size variants\n */\nexport const tableContent = cva(\n\t[\n\t\t'table',\n\t\t'relative',\n\t\t'border-separate',\n\t\t'border-spacing-0',\n\t\t'text-pretty',\n\t\t'[&_tbody]:font-body',\n\t\t'[&_thead]:font-heading',\n\t\t'[&_thead]:leading-normal',\n\t\t'[&_tbody]:leading-tight',\n\t\t'[&_th]:bg-neutral [&_th]:text-neutral-content',\n\t\t'[&_th]:px-4',\n\t\t'[&_td]:px-4',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\txs: ['table-xs'],\n\t\t\t\tsm: ['table-sm'],\n\t\t\t\tmd: ['table-md'],\n\t\t\t\tlg: ['table-lg'],\n\t\t\t\txl: ['table-xl'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tsize: 'sm',\n\t\t},\n\t},\n);\n\n/** Possible table size variants */\nexport type TableContentSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/**\n * @internal\n * Generates table container classes with height variants\n */\nexport const tableContainer = cva(['rounded-t-box', 'overflow-y-clip'], {\n\tvariants: {\n\t\tcontainerHeight: {\n\t\t\tauto: ['h-auto'],\n\t\t\tfull: ['h-full'],\n\t\t\tsm: ['min-h-72 h-72 overscroll-contain overflow-y-auto'],\n\t\t\tmd: ['min-h-80 h-80 overscroll-contain overflow-y-auto'],\n\t\t\tlg: ['min-h-96 h-lg overscroll-contain overflow-y-auto'],\n\t\t\txl: ['min-h-[36rem] h-[36rem] overscroll-contain overflow-y-auto'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tcontainerHeight: 'auto',\n\t},\n});\n\n/** Possible table container height values */\nexport type TableContainerHeightProps = 'auto' | 'full' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/** Configuration object for table styling variants */\nexport type TableVariantProps = {\n\tsize?: TableContentSizeProps;\n\tcontainerHeight?: TableContainerHeightProps;\n};\n\n/**\n * @internal\n * Combines table content and container classes\n */\nexport const tableComponent = ({ size, containerHeight }: TableVariantProps = {}) => cn(tableContent({ size }), tableContainer({ containerHeight }));\n\n/** Pagination configuration structure */\nexport interface TablePagination extends Pagination {\n\tid: string;\n\tsearch: string;\n}\n\n/**\n * A feature-rich data table component with sorting, pagination, and row selection\n *\n * @remarks\n * Integrates with Tailwind CSS for styling and supports responsive layouts.\n * Includes built-in pagination controls and checkbox selection functionality.\n *\n * @example\n * ```html\n * <st-table\n * [data]=\"users\"\n * [totalItems]=\"100\"\n * [pagination]=\"{ currentPage: 1, itemsPerPage: 10 }\"\n * (pageChanged)=\"handlePageChange($event)\"\n * size=\"md\"\n * height=\"lg\"\n * zebra\n * >\n * <!-- Table columns and content -->\n * </st-table>\n * ```\n */\n@Component({\n\tselector: 'st-table',\n\timports: [CommonModule, PaginatorComponent, TypographyDirective, SelectComponent, IconComponent, TranslatePipe],\n\ttemplateUrl: './table.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent {\n\t/**\n\t * Table size variant\n\t * @defaultValue 'sm'\n\t */\n\tsize = input<TableContentSizeProps>();\n\n\t/**\n\t * Table container height preset\n\t * @defaultValue 'auto'\n\t */\n\theight = input<TableContainerHeightProps>('auto');\n\n\t/**\n\t * Enable sticky header row\n\t * @defaultValue false\n\t */\n\tpinRows = input<boolean>(false);\n\n\t/**\n\t * Enable sticky first column\n\t * @defaultValue false\n\t */\n\tpinColumns = input<boolean>(false);\n\n\t/**\n\t * Apply zebra-striping to rows\n\t * @defaultValue false\n\t */\n\tzebra = input<boolean>(false);\n\n\t/**\n\t * Pagination control display variant\n\t * @defaultValue 'default'\n\t */\n\tpaginatorType = input<PaginationType>('default');\n\n\t/** @internal Info icon reference */\n\tinfoIcon = matInfoOutline;\n\n\t/**\n\t * Array of data items to display\n\t * @defaultValue []\n\t */\n\tdata = input<unknown[]>([]);\n\n\t/**\n\t * Total number of items across all pages\n\t * @defaultValue 0\n\t */\n\ttotalItems = input<number>(0);\n\n\t/**\n\t * Pagination configuration\n\t * @defaultValue { id: 'paginator', currentPage: 1, itemsPerPage: 10, search: '' }\n\t */\n\tpagination = input<TablePagination>({\n\t\tid: 'paginator',\n\t\tcurrentPage: 1,\n\t\titemsPerPage: 10,\n\t\tsearch: '',\n\t});\n\n\t/**\n\t * Maximum number of pagination buttons to display\n\t * @defaultValue 4\n\t */\n\tmaxSize = input<number>(4);\n\n\t/** Event emitted when page changes */\n\tpageChanged = output<number>();\n\n\t/** Event emitted when page size changes */\n\tpageSizeChanged = output<number>();\n\n\t/**\n\t * Show items per page selector\n\t * @defaultValue true\n\t */\n\tshowItemsPerPage = input<boolean>(true);\n\n\t/**\n\t * Show entries count display\n\t * @defaultValue true\n\t */\n\tshowEntries = input<boolean>(true);\n\n\t/**\n\t * Show pagination controls\n\t * @defaultValue true\n\t */\n\tshowPagination = input<boolean>(true);\n\n\t/**\n\t * Show footer with additional information\n\t * @defaultValue true\n\t */\n\tshowFooter = input<boolean>(true);\n\t/**\n\t * Controls whether table headers should overflow with horizontal scrolling (true)\n\t * or wrap text normally (false)\n\t * @defaultValue false\n\t */\n\tallowHeaderOverflow = input<boolean>(false);\n\n\t/**\n\t * Computed total number of pages for the internal paginator.\n\t * Calculated from totalItems and itemsPerPage.\n\t */\n\treadonly totalPages = computed(() => {\n\t\tconst itemsPerPage = this.pagination().itemsPerPage || 1;\n\t\tconst totalItems = this.totalItems();\n\t\treturn Math.ceil(totalItems / itemsPerPage);\n\t});\n\n\t/**\n\t * Computed display range for current page entries\n\t * @example \"1-10\" of 100 entries\n\t */\n\tpaginationRange = computed(() => {\n\t\tconst start = this.pagination().currentPage * this.pagination().itemsPerPage - this.pagination().itemsPerPage + 1;\n\t\tconst end = Math.min(this.pagination().currentPage * this.pagination().itemsPerPage, this.totalItems());\n\t\treturn `${start}-${end}`;\n\t});\n\n\t/**\n\t * Handles page navigation events\n\t * @param page - New page number\n\t */\n\thandlePageChange(page: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.pageChanged.emit(page);\n\t}\n\n\t/**\n\t * Handles page size changes\n\t * @param size - New items per page value\n\t */\n\thandlePageSizeChange(size: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.pageSizeChanged.emit(size);\n\t}\n\n\t/**\n\t * @internal\n\t * Computes table element classes based on current configuration\n\t */\n\ttableClass = computed(() =>\n\t\tcn(\n\t\t\ttableContent({\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{\n\t\t\t\t'table-pin-rows': this.pinRows(),\n\t\t\t\t'table-pin-cols': this.pinColumns(),\n\t\t\t\t'table-zebra': this.zebra(),\n\t\t\t},\n\t\t),\n\t);\n\n\t/**\n\t * @internal\n\t * Computes table container classes based on height input\n\t */\n\ttableContainerClass = computed(() =>\n\t\tcn(\n\t\t\ttableContainer({\n\t\t\t\tcontainerHeight: this.height(),\n\t\t\t}),\n\t\t\t{ 'overflow-x-auto': this.allowHeaderOverflow(), '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() },\n\t\t),\n\t);\n\n\t/**\n\t * @internal\n\t * Computes outer container classes based on size\n\t */\n\tcontainerClass = computed(() =>\n\t\tcn('flex flex-col gap-3 rounded-box border border-solid border-neutral pb-3', {\n\t\t\t'gap-3 pb-3': this.size() === 'xs' || this.size() === 'sm' || this.size() === 'md',\n\t\t\t'gap-4 pb-4': this.size() === 'lg',\n\t\t\t'gap-5 pb-5': this.size() === 'xl',\n\t\t}),\n\t);\n\n\t/**\n\t * @internal\n\t * Computes typography variant for paginator text based on table size\n\t */\n\tpaginatorTextSize = computed<TypographyVariantProps>(() => {\n\t\tswitch (this.size()) {\n\t\t\tcase 'xs':\n\t\t\t\treturn 'body-xxs';\n\t\t\tcase 'sm':\n\t\t\t\treturn 'body-xs';\n\t\t\tcase 'md':\n\t\t\t\treturn 'body-sm';\n\t\t\tcase 'lg':\n\t\t\t\treturn 'body';\n\t\t\tcase 'xl':\n\t\t\t\treturn 'body';\n\t\t\tdefault:\n\t\t\t\treturn 'body-xs';\n\t\t}\n\t});\n\n\t/** @internal Reference to header checkbox component */\n\theader = contentChild(TableHeaderCheckboxComponent, { descendants: true });\n\n\t/** @internal List of row checkbox components */\n\trows = contentChildren(TableRowCheckboxComponent, { descendants: true });\n\n\t/** @internal Track selected row identifiers */\n\tidentifiers = signal<Set<unknown>>(new Set());\n\n\t/** Event emitted with array of selected item identifiers */\n\tcheckedItems = output<unknown[]>();\n\n\t/** @internal Sync checkbox state with output */\n\tcheckEffect = effect(() => {\n\t\tthis.checkedItems.emit(Array.from(this.identifiers()));\n\t});\n\n\t/**\n\t * Toggle all row checkboxes\n\t * @param value - Whether to check or uncheck all rows\n\t */\n\thandleToggleAll(value: boolean) {\n\t\tif (!value) {\n\t\t\tthis.clearList();\n\t\t}\n\n\t\tthis.rows().forEach((row) => {\n\t\t\trow.checked.set(value);\n\t\t\tif (value) {\n\t\t\t\tthis.identifiers.update((items) => new Set(items).add(row.identifier()));\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Handle individual checkbox toggle\n\t * @param value - Checkbox state\n\t * @param identifier - Unique row identifier\n\t */\n\thandleToggleCheckbox(value: boolean, identifier: unknown) {\n\t\tif (value) {\n\t\t\tthis.identifiers.update((items) => new Set(items).add(identifier));\n\t\t} else {\n\t\t\tthis.header()?.checked.set(false);\n\t\t\tthis.identifiers.update((items) => {\n\t\t\t\titems.delete(identifier);\n\t\t\t\treturn new Set(items);\n\t\t\t});\n\t\t}\n\t}\n\n\t/** @internal Clear all selections */\n\tprivate clearList() {\n\t\tthis.identifiers.set(new Set());\n\t\tthis.header()?.checked.set(false);\n\t}\n}\n","@let total = totalItems();\n@let dataVar = data();\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 heightVar = height();\n@let showshowFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\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\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\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\t</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n} @else {\n\t<div class=\"rounded-box border-neutral grid h-full place-content-center gap-4 border border-solid p-6\">\n\t\t<div>\n\t\t\t<div class=\"text-info grid place-content-center\">\n\t\t\t\t<st-icon [icon]=\"infoIcon\" size=\"lg\" color=\"inherit\" size=\"lg\"></st-icon>\n\t\t\t</div>\n\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.emptyListMessage' | translate }}</span>\n\t\t</div>\n\t</div>\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ButtonComponent, ButtonSizeProps, ButtonVariantProps } from '@sixbell-telco/sdk/components/button';\nimport { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n/**\n * Component to render a table action, typically a button with optional tooltip.\n *\n * @remarks\n * This component encapsulates a button within a table, allowing for consistent styling\n * and easy integration with tooltips.\n *\n * @example\n * ```html\n * <st-table-action tooltip=\"Delete\" icon=\"delete\">\n * Delete\n * </st-table-action>\n * ```\n */\n@Component({\n\tselector: 'st-table-action',\n\timports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe],\n\ttemplateUrl: './table-action.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableActionComponent {\n\t/**\n\t * Button style variant.\n\t * @defaultValue 'primary'\n\t */\n\tvariant = input<ButtonVariantProps>('primary');\n\t/**\n\t * Tooltip text (optional).\n\t */\n\ttooltip = input<string | undefined>();\n\t/**\n\t * Icon name (optional).\n\t */\n\ticon = input<string | undefined>();\n\t/**\n\t * Button size.\n\t * @defaultValue 'md'\n\t */\n\tsize = input<ButtonSizeProps>('md');\n\n\t/**\n\t * Computes CSS classes for the table action text size based on the current size setting.\n\t *\n\t * @returns A string of CSS classes determined by the component's size:\n\t * - 'xs' size: applies 'text-[0.6875rem]' class\n\t * - 'sm' size: applies 'text-xs' class\n\t * - 'md' size: applies 'text-sm' class\n\t * - 'lg' or 'xl' size: applies 'text-lg' class\n\t */\n\ttableActionClass = computed(() => {\n\t\treturn cn({\n\t\t\t'text-[0.6875rem]': this.size() === 'xs',\n\t\t\t'text-xs': this.size() === 'sm',\n\t\t\t'text-sm': this.size() === 'md',\n\t\t\t'text-lg': this.size() === 'lg' || this.size() === 'xl',\n\t\t});\n\t});\n}\n","@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","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\n/**\n * Component to render a container for table actions.\n *\n * @remarks\n * This component is a simple container for action buttons or other interactive elements\n * within a table. It provides basic styling and layout.\n *\n * @example\n * ```html\n * <st-table-actions>\n * <button>Action 1</button>\n * <button>Action 2</button>\n * </st-table-actions>\n * ```\n */\n@Component({\n\tselector: 'st-table-actions',\n\timports: [CommonModule],\n\ttemplateUrl: './table-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableActionsComponent {\n\t/**\n\t * @internal\n\t * Computed class string for the table actions container.\n\t */\n\tcomponentClass = computed(() => cn('inline-flex items-center gap-2 grow-0 align-top justify-cente'));\n}\n","<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TableComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;AAcG;MAQU,4BAA4B,CAAA;AA2BZ,IAAA,KAAA;AA1B5B;;;;AAIG;AACH,IAAA,eAAe,GAAG,KAAK,CAAuB,SAAS,CAAC;AAExD;;;;AAIG;AACH,IAAA,YAAY,GAAG,KAAK,CAAoB,IAAI,CAAC;AAE7C;;;;AAIG;AACH,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,CAAC;AAEhC;;;;AAIG;AACH,IAAA,WAAA,CAA4B,KAAqB,EAAA;QAArB,IAAK,CAAA,KAAA,GAAL,KAAK;;AAEjC;;;;;;AAMG;AAC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,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBlC,2EAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDkBW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WACnB,CAAC,YAAY,CAAC,EAEN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2EAAA,EAAA;;;AEvBhD;;AAEG;;;;"}
|
|
@@ -15,6 +15,9 @@ var ToastTypes;
|
|
|
15
15
|
ToastTypes["INFO"] = "toast-info";
|
|
16
16
|
ToastTypes["WARNING"] = "toast-warning";
|
|
17
17
|
})(ToastTypes || (ToastTypes = {}));
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated This toast service is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
20
|
+
*/
|
|
18
21
|
class ToastService {
|
|
19
22
|
toastsSignal = signal([]);
|
|
20
23
|
expandedSignal = signal(false);
|
|
@@ -23,6 +26,7 @@ class ToastService {
|
|
|
23
26
|
expanded = computed(() => this.expandedSignal());
|
|
24
27
|
isEmpty = computed(() => this.toasts().length === 0);
|
|
25
28
|
notify(type, message, title = '', duration = 10000) {
|
|
29
|
+
console.warn('ToastService is deprecated. Migrate to @sixbell-telco/sdk/components/sonner.');
|
|
26
30
|
const toast = {
|
|
27
31
|
id: generateUniqueId(),
|
|
28
32
|
type,
|
|
@@ -88,6 +92,9 @@ const toastComponent = cva([
|
|
|
88
92
|
variant: 'info',
|
|
89
93
|
},
|
|
90
94
|
});
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated This component is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
97
|
+
*/
|
|
91
98
|
class ToastMessageComponent {
|
|
92
99
|
variant = input();
|
|
93
100
|
classes = input('');
|
|
@@ -127,6 +134,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
127
134
|
args: [{ selector: 'st-toast-message', imports: [TypographyDirective, IconComponent, NgClass], template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"componentClass()\"\n\t[ngClass]=\"{\n\t\t'animate-toast-slide-out bottom-0': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<st-icon [icon]=\"iconCheckCircle\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<st-icon [icon]=\"iconWarning\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<st-icon [icon]=\"iconError\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<st-icon [icon]=\"iconInfo\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-4\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<div typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'semibold'\">{{ toast().title }}</div>\n\t\t\t<div typography [tyVariant]=\"'body-xs'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">\n\t\t\t\t{{ toast().message }}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</li>\n" }]
|
|
128
135
|
}] });
|
|
129
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated This component is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
139
|
+
*/
|
|
130
140
|
class ToastsContainerComponent {
|
|
131
141
|
toastService = inject(ToastService);
|
|
132
142
|
containerClasses = computed(() => {
|
|
@@ -163,6 +173,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
163
173
|
args: [{ selector: 'st-toasts-container', imports: [ToastMessageComponent, NgClass], template: "<section class=\"fixed right-4 bottom-2 z-[1001]\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n" }]
|
|
164
174
|
}] });
|
|
165
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated This toast system is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
178
|
+
*/
|
|
179
|
+
|
|
166
180
|
/**
|
|
167
181
|
* Generated bundle index. Do not edit.
|
|
168
182
|
*/
|