@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,40 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type Pagination = {
|
|
4
|
+
currentPage: number;
|
|
5
|
+
itemsPerPage: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A pipe to manually paginate an array of items.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This pipe takes an array and a pagination configuration object (currentPage, itemsPerPage)
|
|
12
|
+
* and returns a sliced version of the array, representing the items for the current page.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* @for (item of items | pagination: { currentPage: 2, itemsPerPage: 10 }; track item.id) {
|
|
17
|
+
* <li>{{ item.name }}</li>
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare class PaginationPipe implements PipeTransform {
|
|
22
|
+
transform<T>(items: T[], pagination: {
|
|
23
|
+
currentPage: number;
|
|
24
|
+
itemsPerPage: number;
|
|
25
|
+
}): T[];
|
|
26
|
+
transform<T>(items: T[] | null, pagination: {
|
|
27
|
+
currentPage: number;
|
|
28
|
+
itemsPerPage: number;
|
|
29
|
+
}): T[] | null;
|
|
30
|
+
transform<T>(items: T[] | undefined, pagination: {
|
|
31
|
+
currentPage: number;
|
|
32
|
+
itemsPerPage: number;
|
|
33
|
+
}): T[] | undefined;
|
|
34
|
+
transform<T>(items: T[] | null | undefined, pagination: {
|
|
35
|
+
currentPage: number;
|
|
36
|
+
itemsPerPage: number;
|
|
37
|
+
}): T[] | null | undefined;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationPipe, never>;
|
|
39
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<PaginationPipe, "paginate", true>;
|
|
40
|
+
}
|
|
@@ -6,8 +6,7 @@ export type PaginationType = 'default' | 'dots';
|
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Supports both traditional numbered pagination and dot indicators.
|
|
9
|
-
*
|
|
10
|
-
* custom styling and navigation controls.
|
|
9
|
+
* Provides custom styling and navigation controls.
|
|
11
10
|
*
|
|
12
11
|
* @example
|
|
13
12
|
* ```html
|
|
@@ -34,8 +33,9 @@ export declare class PaginatorComponent {
|
|
|
34
33
|
*/
|
|
35
34
|
paginatorId: import("@angular/core").InputSignal<string>;
|
|
36
35
|
/**
|
|
37
|
-
* Maximum number of visible page items
|
|
38
|
-
*
|
|
36
|
+
* Maximum number of visible numeric page items (excluding arrows and ellipses).
|
|
37
|
+
* This controls the window of page numbers shown around the current page.
|
|
38
|
+
* @defaultValue 4
|
|
39
39
|
*/
|
|
40
40
|
maxSize: import("@angular/core").InputSignal<number>;
|
|
41
41
|
/**
|
|
@@ -53,12 +53,7 @@ export declare class PaginatorComponent {
|
|
|
53
53
|
*/
|
|
54
54
|
pages: import("@angular/core").InputSignal<number>;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
* Computed array of page numbers
|
|
58
|
-
*/
|
|
59
|
-
pageCounter: import("@angular/core").Signal<number[]>;
|
|
60
|
-
/**
|
|
61
|
-
* Current active page
|
|
56
|
+
* Current active page (1-based)
|
|
62
57
|
* @defaultValue 1
|
|
63
58
|
*/
|
|
64
59
|
currentPage: import("@angular/core").ModelSignal<number>;
|
|
@@ -82,12 +77,19 @@ export declare class PaginatorComponent {
|
|
|
82
77
|
* Double right arrow icon reference
|
|
83
78
|
*/
|
|
84
79
|
iconDoubleArrowRight: string;
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* Computed array of page numbers and ellipses for display.
|
|
83
|
+
* Implements the logic to show a limited range of pages around the current page
|
|
84
|
+
* with '...' for skipped pages.
|
|
85
|
+
*/
|
|
86
|
+
pageNumbersForDisplay: import("@angular/core").Signal<(string | number)[]>;
|
|
85
87
|
/**
|
|
86
88
|
* @internal
|
|
87
89
|
* Handles page navigation changes
|
|
88
|
-
* @param page - New page number
|
|
90
|
+
* @param page - New page number (or '...' if clicked on ellipsis, which is ignored)
|
|
89
91
|
*/
|
|
90
|
-
handlePageChange(page: number): void;
|
|
92
|
+
handlePageChange(page: number | string): void;
|
|
91
93
|
/**
|
|
92
94
|
* @internal
|
|
93
95
|
* Navigates to previous page if available
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { toast as ngxToast } from 'ngx-sonner';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* Generates base toast classes with style variants for semantic colors
|
|
6
|
+
*/
|
|
7
|
+
export declare const toastVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "success" | "error" | "warning" | "info" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/** Possible toast style variants */
|
|
11
|
+
export type ToastVariantProps = 'default' | 'success' | 'error' | 'warning' | 'info' | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Toast function with semantic variants and Tailwind styling
|
|
14
|
+
* Proxies ngx-sonner toast functionality with SDK styling
|
|
15
|
+
*/
|
|
16
|
+
declare function createToast(message: string, options?: Record<string, unknown>): string | number;
|
|
17
|
+
declare namespace createToast {
|
|
18
|
+
var success: (message: string, options?: Record<string, unknown>) => string | number;
|
|
19
|
+
var error: (message: string, options?: Record<string, unknown>) => string | number;
|
|
20
|
+
var warning: (message: string, options?: Record<string, unknown>) => string | number;
|
|
21
|
+
var info: (message: string, options?: Record<string, unknown>) => string | number;
|
|
22
|
+
var loading: (message: string, options?: Record<string, unknown>) => string | number;
|
|
23
|
+
var promise: (promise: Promise<unknown>, options: Record<string, unknown>) => string | number | undefined;
|
|
24
|
+
var custom: (component: Type<unknown>, options?: Record<string, unknown>) => string | number;
|
|
25
|
+
var dismiss: (id?: string | number) => string | number | undefined;
|
|
26
|
+
var dismissAll: () => string | number | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare const toast: typeof createToast & {
|
|
29
|
+
success: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
30
|
+
error: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
31
|
+
warning: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
32
|
+
info: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
33
|
+
loading: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
34
|
+
promise: (promise: Promise<unknown>, options: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
35
|
+
custom: (component: Type<unknown>, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
|
|
36
|
+
dismiss: (id?: string | number) => ReturnType<typeof ngxToast>;
|
|
37
|
+
dismissAll: () => ReturnType<typeof ngxToast>;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/toaster.component';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Sixbell Telco Sonner Toaster Component
|
|
4
|
+
*
|
|
5
|
+
* A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.
|
|
6
|
+
* This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <st-sonner-toaster
|
|
11
|
+
* [theme]="'light'"
|
|
12
|
+
* [position]="'bottom-right'"
|
|
13
|
+
* [richColors]="true"
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class SonnerToasterComponent {
|
|
18
|
+
/**
|
|
19
|
+
* Direction for the toasts
|
|
20
|
+
* @defaultValue 'ltr'
|
|
21
|
+
*/
|
|
22
|
+
dir: import("@angular/core").InputSignal<"ltr" | "rtl">;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to use rich colors for semantic toasts
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
richColors: import("@angular/core").InputSignal<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to expand the toast on hover
|
|
30
|
+
* @defaultValue false
|
|
31
|
+
*/
|
|
32
|
+
expand: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Maximum number of visible toasts
|
|
35
|
+
* @defaultValue 3
|
|
36
|
+
*/
|
|
37
|
+
visibleToasts: import("@angular/core").InputSignal<number>;
|
|
38
|
+
/**
|
|
39
|
+
* Position of the toasts
|
|
40
|
+
* @defaultValue 'bottom-right'
|
|
41
|
+
*/
|
|
42
|
+
position: import("@angular/core").InputSignal<"top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center">;
|
|
43
|
+
/**
|
|
44
|
+
* Offset from the edge of the screen
|
|
45
|
+
* @defaultValue '16px'
|
|
46
|
+
*/
|
|
47
|
+
offset: import("@angular/core").InputSignal<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to show close button
|
|
50
|
+
* @defaultValue false
|
|
51
|
+
*/
|
|
52
|
+
closeButton: import("@angular/core").InputSignal<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Duration for the toast in milliseconds
|
|
55
|
+
* @defaultValue 4000
|
|
56
|
+
*/
|
|
57
|
+
duration: import("@angular/core").InputSignal<number>;
|
|
58
|
+
/**
|
|
59
|
+
* Default toast options with semantic styling
|
|
60
|
+
*/
|
|
61
|
+
toastOptions: import("@angular/core").Signal<{
|
|
62
|
+
unstyled: boolean;
|
|
63
|
+
classes: {
|
|
64
|
+
success: string;
|
|
65
|
+
error: string;
|
|
66
|
+
warning: string;
|
|
67
|
+
info: string;
|
|
68
|
+
toast: string;
|
|
69
|
+
title: string;
|
|
70
|
+
description: string;
|
|
71
|
+
actionButton: string;
|
|
72
|
+
cancelButton: string;
|
|
73
|
+
closeButton: string;
|
|
74
|
+
} | {
|
|
75
|
+
success?: undefined;
|
|
76
|
+
error?: undefined;
|
|
77
|
+
warning?: undefined;
|
|
78
|
+
info?: undefined;
|
|
79
|
+
toast: string;
|
|
80
|
+
title: string;
|
|
81
|
+
description: string;
|
|
82
|
+
actionButton: string;
|
|
83
|
+
cancelButton: string;
|
|
84
|
+
closeButton: string;
|
|
85
|
+
};
|
|
86
|
+
}>;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SonnerToasterComponent, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SonnerToasterComponent, "st-sonner-toaster", never, { "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "richColors": { "alias": "richColors"; "required": false; "isSignal": true; }; "expand": { "alias": "expand"; "required": false; "isSignal": true; }; "visibleToasts": { "alias": "visibleToasts"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "closeButton": { "alias": "closeButton"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
89
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Pagination, PaginationType } from '@sixbell-telco/sdk/components/paginator';
|
|
1
2
|
import { TypographyVariantProps } from '@sixbell-telco/sdk/directives/typography';
|
|
2
3
|
import { TableHeaderCheckboxComponent } from '../table-header-checkbox/table-header-checkbox.component';
|
|
3
4
|
import { TableRowCheckboxComponent } from '../table-row-checkbox/table-row-checkbox.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/** Type definition for pagination display variants */
|
|
6
|
-
export type PaginationType = 'default' | 'dots';
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
* Generates base table classes with size variants
|
|
@@ -33,12 +33,10 @@ export type TableVariantProps = {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare const tableComponent: ({ size, containerHeight }?: TableVariantProps) => string;
|
|
35
35
|
/** Pagination configuration structure */
|
|
36
|
-
export
|
|
36
|
+
export interface TablePagination extends Pagination {
|
|
37
37
|
id: string;
|
|
38
|
-
currentPage: number;
|
|
39
|
-
itemsPerPage: number;
|
|
40
38
|
search: string;
|
|
41
|
-
}
|
|
39
|
+
}
|
|
42
40
|
/**
|
|
43
41
|
* A feature-rich data table component with sorting, pagination, and row selection
|
|
44
42
|
*
|
|
@@ -111,7 +109,7 @@ export declare class TableComponent {
|
|
|
111
109
|
pagination: import("@angular/core").InputSignal<TablePagination>;
|
|
112
110
|
/**
|
|
113
111
|
* Maximum number of pagination buttons to display
|
|
114
|
-
* @defaultValue
|
|
112
|
+
* @defaultValue 4
|
|
115
113
|
*/
|
|
116
114
|
maxSize: import("@angular/core").InputSignal<number>;
|
|
117
115
|
/** Event emitted when page changes */
|
|
@@ -144,6 +142,11 @@ export declare class TableComponent {
|
|
|
144
142
|
* @defaultValue false
|
|
145
143
|
*/
|
|
146
144
|
allowHeaderOverflow: import("@angular/core").InputSignal<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Computed total number of pages for the internal paginator.
|
|
147
|
+
* Calculated from totalItems and itemsPerPage.
|
|
148
|
+
*/
|
|
149
|
+
readonly totalPages: import("@angular/core").Signal<number>;
|
|
147
150
|
/**
|
|
148
151
|
* Computed display range for current page entries
|
|
149
152
|
* @example "1-10" of 100 entries
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated This toast system is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
3
|
+
*/
|
|
1
4
|
export * from './services/toast.service';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This toast system is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
7
|
+
*/
|
|
2
8
|
export * from './toast-message/toast-message.component';
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated This toast system is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
11
|
+
*/
|
|
3
12
|
export * from './toasts-container/toasts-container.component';
|
|
@@ -13,6 +13,9 @@ export type Toast = {
|
|
|
13
13
|
duration: number;
|
|
14
14
|
animate: 'enter' | 'leave';
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated This toast service is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
18
|
+
*/
|
|
16
19
|
export declare class ToastService {
|
|
17
20
|
private toastsSignal;
|
|
18
21
|
private expandedSignal;
|
|
@@ -7,6 +7,9 @@ export type ToastVariantProps = 'info' | 'success' | 'warning' | 'error' | null
|
|
|
7
7
|
export type ToastProps = {
|
|
8
8
|
variant?: ToastVariantProps;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated This component is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
12
|
+
*/
|
|
10
13
|
export declare class ToastMessageComponent {
|
|
11
14
|
variant: import("@angular/core").InputSignal<ToastVariantProps>;
|
|
12
15
|
classes: import("@angular/core").InputSignal<string>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Toast, ToastService } from '../services/toast.service';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This component is deprecated. Use @sixbell-telco/sdk/components/sonner instead.
|
|
5
|
+
*/
|
|
3
6
|
export declare class ToastsContainerComponent {
|
|
4
7
|
toastService: ToastService;
|
|
5
8
|
protected containerClasses: import("@angular/core").Signal<{
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
5
|
+
import { IconComponent } from '@sixbell-telco/sdk/components/icon';
|
|
6
|
+
import { matKeyboardArrowDown, matInfo } from '@sixbell-telco/sdk/components/icon/material/baseline';
|
|
7
|
+
|
|
8
|
+
class DataTableSubComponentToggleCellComponent {
|
|
9
|
+
row = input.required();
|
|
10
|
+
isExpanded = input.required(); // Current state of the sub-component for this row
|
|
11
|
+
toggled = output(); // Emits row.id when clicked to trigger parent component update
|
|
12
|
+
// Input to determine if this specific row is eligible to display a sub-component
|
|
13
|
+
canToggleSubComponent = input(false);
|
|
14
|
+
iconChevronDown = matKeyboardArrowDown;
|
|
15
|
+
iconInfo = matInfo;
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DataTableSubComponentToggleCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: DataTableSubComponentToggleCellComponent, isStandalone: true, selector: "st-data-table-sub-component-toggle-cell", inputs: { row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null }, isExpanded: { classPropertyName: "isExpanded", publicName: "isExpanded", isSignal: true, isRequired: true, transformFunction: null }, canToggleSubComponent: { classPropertyName: "canToggleSubComponent", publicName: "canToggleSubComponent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggled: "toggled" }, ngImport: i0, template: `
|
|
18
|
+
@if (canToggleSubComponent()) {
|
|
19
|
+
<st-button
|
|
20
|
+
variant="secondary"
|
|
21
|
+
size="xs"
|
|
22
|
+
[circle]="true"
|
|
23
|
+
[ghost]="true"
|
|
24
|
+
class="group"
|
|
25
|
+
(click)="toggled.emit(row().id)"
|
|
26
|
+
[attr.aria-expanded]="isExpanded()"
|
|
27
|
+
title="{{ isExpanded() ? 'Hide Details' : 'Show Details' }}"
|
|
28
|
+
>
|
|
29
|
+
<st-icon
|
|
30
|
+
class="transition-transform duration-300 ease-in-out group-aria-[expanded=false]:rotate-0 group-aria-[expanded=true]:rotate-180"
|
|
31
|
+
[icon]="iconChevronDown"
|
|
32
|
+
size="sm"
|
|
33
|
+
></st-icon>
|
|
34
|
+
<span class="sr-only">{{ isExpanded() ? 'Hide Details' : 'Show Details' }}</span>
|
|
35
|
+
</st-button>
|
|
36
|
+
} @else {
|
|
37
|
+
<!-- Display an informational icon if a sub-component cannot be shown for this row -->
|
|
38
|
+
<st-button
|
|
39
|
+
variant="secondary"
|
|
40
|
+
size="xs"
|
|
41
|
+
[circle]="true"
|
|
42
|
+
[ghost]="true"
|
|
43
|
+
[attr.aria-expanded]="isExpanded()"
|
|
44
|
+
title="{{ isExpanded() ? 'Hide Details' : 'Show Details' }}"
|
|
45
|
+
[disabled]="true"
|
|
46
|
+
>
|
|
47
|
+
<st-icon [icon]="iconInfo" size="sm"></st-icon>
|
|
48
|
+
<span class="sr-only">{{ isExpanded() ? 'Hide Details' : 'Show Details' }}</span>
|
|
49
|
+
</st-button>
|
|
50
|
+
}
|
|
51
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
52
|
+
}
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DataTableSubComponentToggleCellComponent, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{
|
|
56
|
+
standalone: true,
|
|
57
|
+
selector: 'st-data-table-sub-component-toggle-cell',
|
|
58
|
+
imports: [CommonModule, IconComponent, ButtonComponent],
|
|
59
|
+
template: `
|
|
60
|
+
@if (canToggleSubComponent()) {
|
|
61
|
+
<st-button
|
|
62
|
+
variant="secondary"
|
|
63
|
+
size="xs"
|
|
64
|
+
[circle]="true"
|
|
65
|
+
[ghost]="true"
|
|
66
|
+
class="group"
|
|
67
|
+
(click)="toggled.emit(row().id)"
|
|
68
|
+
[attr.aria-expanded]="isExpanded()"
|
|
69
|
+
title="{{ isExpanded() ? 'Hide Details' : 'Show Details' }}"
|
|
70
|
+
>
|
|
71
|
+
<st-icon
|
|
72
|
+
class="transition-transform duration-300 ease-in-out group-aria-[expanded=false]:rotate-0 group-aria-[expanded=true]:rotate-180"
|
|
73
|
+
[icon]="iconChevronDown"
|
|
74
|
+
size="sm"
|
|
75
|
+
></st-icon>
|
|
76
|
+
<span class="sr-only">{{ isExpanded() ? 'Hide Details' : 'Show Details' }}</span>
|
|
77
|
+
</st-button>
|
|
78
|
+
} @else {
|
|
79
|
+
<!-- Display an informational icon if a sub-component cannot be shown for this row -->
|
|
80
|
+
<st-button
|
|
81
|
+
variant="secondary"
|
|
82
|
+
size="xs"
|
|
83
|
+
[circle]="true"
|
|
84
|
+
[ghost]="true"
|
|
85
|
+
[attr.aria-expanded]="isExpanded()"
|
|
86
|
+
title="{{ isExpanded() ? 'Hide Details' : 'Show Details' }}"
|
|
87
|
+
[disabled]="true"
|
|
88
|
+
>
|
|
89
|
+
<st-icon [icon]="iconInfo" size="sm"></st-icon>
|
|
90
|
+
<span class="sr-only">{{ isExpanded() ? 'Hide Details' : 'Show Details' }}</span>
|
|
91
|
+
</st-button>
|
|
92
|
+
}
|
|
93
|
+
`,
|
|
94
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
95
|
+
}]
|
|
96
|
+
}] });
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Generated bundle index. Do not edit.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
export { DataTableSubComponentToggleCellComponent };
|
|
103
|
+
//# sourceMappingURL=sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs","sources":["../../../projects/sdk/components/data-table/sub-component-toggle/sub-component-toggle.component.ts","../../../projects/sdk/components/data-table/sub-component-toggle/sixbell-telco-sdk-components-data-table-sub-component-toggle.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport { ButtonComponent } from '@sixbell-telco/sdk/components/button';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matInfo, matKeyboardArrowDown } from '@sixbell-telco/sdk/components/icon/material/baseline';\nimport { Row, RowData } from '@tanstack/angular-table';\n\n@Component({\n\tstandalone: true,\n\tselector: 'st-data-table-sub-component-toggle-cell',\n\timports: [CommonModule, IconComponent, ButtonComponent],\n\ttemplate: `\n\t\t@if (canToggleSubComponent()) {\n\t\t\t<st-button\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tsize=\"xs\"\n\t\t\t\t[circle]=\"true\"\n\t\t\t\t[ghost]=\"true\"\n\t\t\t\tclass=\"group\"\n\t\t\t\t(click)=\"toggled.emit(row().id)\"\n\t\t\t\t[attr.aria-expanded]=\"isExpanded()\"\n\t\t\t\ttitle=\"{{ isExpanded() ? 'Hide Details' : 'Show Details' }}\"\n\t\t\t>\n\t\t\t\t<st-icon\n\t\t\t\t\tclass=\"transition-transform duration-300 ease-in-out group-aria-[expanded=false]:rotate-0 group-aria-[expanded=true]:rotate-180\"\n\t\t\t\t\t[icon]=\"iconChevronDown\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t></st-icon>\n\t\t\t\t<span class=\"sr-only\">{{ isExpanded() ? 'Hide Details' : 'Show Details' }}</span>\n\t\t\t</st-button>\n\t\t} @else {\n\t\t\t<!-- Display an informational icon if a sub-component cannot be shown for this row -->\n\t\t\t<st-button\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tsize=\"xs\"\n\t\t\t\t[circle]=\"true\"\n\t\t\t\t[ghost]=\"true\"\n\t\t\t\t[attr.aria-expanded]=\"isExpanded()\"\n\t\t\t\ttitle=\"{{ isExpanded() ? 'Hide Details' : 'Show Details' }}\"\n\t\t\t\t[disabled]=\"true\"\n\t\t\t>\n\t\t\t\t<st-icon [icon]=\"iconInfo\" size=\"sm\"></st-icon>\n\t\t\t\t<span class=\"sr-only\">{{ isExpanded() ? 'Hide Details' : 'Show Details' }}</span>\n\t\t\t</st-button>\n\t\t}\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DataTableSubComponentToggleCellComponent<T extends RowData> {\n\treadonly row = input.required<Row<T>>();\n\treadonly isExpanded = input.required<boolean>(); // Current state of the sub-component for this row\n\treadonly toggled = output<string>(); // Emits row.id when clicked to trigger parent component update\n\n\t// Input to determine if this specific row is eligible to display a sub-component\n\treadonly canToggleSubComponent = input<boolean>(false);\n\n\treadonly iconChevronDown = matKeyboardArrowDown;\n\treadonly iconInfo = matInfo;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAgDa,wCAAwC,CAAA;AAC3C,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAU;AAC9B,IAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,EAAW,CAAC;AACvC,IAAA,OAAO,GAAG,MAAM,EAAU,CAAC;;AAG3B,IAAA,qBAAqB,GAAG,KAAK,CAAU,KAAK,CAAC;IAE7C,eAAe,GAAG,oBAAoB;IACtC,QAAQ,GAAG,OAAO;uGATf,wCAAwC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wCAAwC,EArC1C,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,qBAAA,EAAA,EAAA,iBAAA,EAAA,uBAAA,EAAA,UAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,CAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAnCS,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,OAAA,EAAA,OAAA,EAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,cAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAsC1C,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAzCpD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,yCAAyC;AACnD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;AACvD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,CAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;AC/CD;;AAEG;;;;"}
|