commons-shared-web-ui 0.0.29 → 0.0.31
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/fesm2022/commons-shared-web-ui.mjs +123 -24
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +31 -2
- package/package.json +1 -1
- package/src/lib/modules/pagination/pagination.theme.scss +66 -66
- package/src/lib/modules/smart-table/smart-table.theme.scss +323 -222
- package/src/lib/modules/snackbar/snackbar.theme.scss +93 -93
package/index.d.ts
CHANGED
|
@@ -2469,6 +2469,11 @@ interface ConfirmationModalConfig {
|
|
|
2469
2469
|
width?: string;
|
|
2470
2470
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
2471
2471
|
customClass?: string;
|
|
2472
|
+
type?: 'modal' | 'side-panel';
|
|
2473
|
+
panelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
2474
|
+
panelSpacing?: string;
|
|
2475
|
+
panelWidth?: string;
|
|
2476
|
+
panelHeight?: string;
|
|
2472
2477
|
backgroundColor?: string;
|
|
2473
2478
|
borderRadius?: string;
|
|
2474
2479
|
borderTopLeftRadius?: string;
|
|
@@ -2574,6 +2579,7 @@ declare class ConfirmationModalComponent implements OnInit, OnDestroy {
|
|
|
2574
2579
|
onClose(): void;
|
|
2575
2580
|
onShowCodeSnippet(): void;
|
|
2576
2581
|
getModalWidth(): string;
|
|
2582
|
+
getModalStyles(): any;
|
|
2577
2583
|
getConfirmButtonClass(): string;
|
|
2578
2584
|
getHeaderClass(): string;
|
|
2579
2585
|
resolveIconType(icon: any): 'material' | 'custom' | 'img';
|
|
@@ -3559,6 +3565,20 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3559
3565
|
top: number;
|
|
3560
3566
|
right: number;
|
|
3561
3567
|
};
|
|
3568
|
+
/** Items and row for the currently open dropdown — rendered in a portal outside the table. */
|
|
3569
|
+
activeDropdownItems: any[] | null;
|
|
3570
|
+
activeDropdownRow: any;
|
|
3571
|
+
openFilterKey: string | null;
|
|
3572
|
+
activeFilterLabels: {
|
|
3573
|
+
[key: string]: string;
|
|
3574
|
+
};
|
|
3575
|
+
/** Viewport-relative position used to render the filter panel as position:fixed. */
|
|
3576
|
+
filterPosition: {
|
|
3577
|
+
top: number;
|
|
3578
|
+
left: number;
|
|
3579
|
+
};
|
|
3580
|
+
/** The filter config for the currently open filter panel. */
|
|
3581
|
+
activeFilterData: any | null;
|
|
3562
3582
|
deleteModalOpen: boolean;
|
|
3563
3583
|
deleteModalConfig: any;
|
|
3564
3584
|
private pendingDeleteAction;
|
|
@@ -3584,6 +3604,14 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3584
3604
|
onSort(col: TableColumn): void;
|
|
3585
3605
|
onSearch(event: Event): void;
|
|
3586
3606
|
onFilterChange(key: string, event: Event): void;
|
|
3607
|
+
private applyFilter;
|
|
3608
|
+
toggleFilter(key: string, event: Event): void;
|
|
3609
|
+
selectFilterOption(filter: any, opt: {
|
|
3610
|
+
label: string;
|
|
3611
|
+
value: any;
|
|
3612
|
+
} | null): void;
|
|
3613
|
+
getFilterDisplay(filter: any): string;
|
|
3614
|
+
isFilterActive(filter: any): boolean;
|
|
3587
3615
|
/**
|
|
3588
3616
|
* Assembles the current table state into a `TableDataChangeEvent` object.
|
|
3589
3617
|
* Emitted to the parent in external-data mode so it can fetch and supply new data.
|
|
@@ -3602,7 +3630,8 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3602
3630
|
updateSelectedRows(): void;
|
|
3603
3631
|
getCellValue(row: any, col: TableColumn): any;
|
|
3604
3632
|
getBadgeClass(row: any, col: TableColumn): string;
|
|
3605
|
-
|
|
3633
|
+
getAscOpacity(key: string): number;
|
|
3634
|
+
getDescOpacity(key: string): number;
|
|
3606
3635
|
private replaceParams;
|
|
3607
3636
|
private loadFilterOptions;
|
|
3608
3637
|
private getValueByPath;
|
|
@@ -3611,7 +3640,7 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3611
3640
|
get columnCount(): number;
|
|
3612
3641
|
onColumnClick(row: any, col: TableColumn): void;
|
|
3613
3642
|
private getHeaders;
|
|
3614
|
-
toggleDropdown(id: string, event: Event): void;
|
|
3643
|
+
toggleDropdown(id: string, event: Event, items: any[], row: any): void;
|
|
3615
3644
|
closeDropdown(): void;
|
|
3616
3645
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
|
|
3617
3646
|
static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "totalItemsCount": { "alias": "totalItemsCount"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "columnClick": "columnClick"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; }, never, never, false, never>;
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
// Default configuration for the pagination theme
|
|
4
|
-
$default-pagination-config: (
|
|
5
|
-
// Font & Text
|
|
6
|
-
font-family: ('Roboto', sans-serif),
|
|
7
|
-
text-color: #757575,
|
|
8
|
-
font-size: 14px,
|
|
9
|
-
|
|
10
|
-
// Select Dropdown
|
|
11
|
-
select-bg: #f5f5f5,
|
|
12
|
-
select-border: none,
|
|
13
|
-
select-radius: 4px,
|
|
14
|
-
select-padding: 6px 12px,
|
|
15
|
-
select-text-color: #333,
|
|
16
|
-
select-arrow-color: #f44336, // Red arrow
|
|
17
|
-
|
|
18
|
-
// Buttons
|
|
19
|
-
btn-size: 32px,
|
|
20
|
-
btn-bg: #ffffff,
|
|
21
|
-
btn-border: 1px solid #e0e0e0,
|
|
22
|
-
btn-radius: 4px,
|
|
23
|
-
btn-text-color: #333,
|
|
24
|
-
|
|
25
|
-
// States
|
|
26
|
-
btn-hover-bg: #f5f5f5,
|
|
27
|
-
btn-active-bg: #fff,
|
|
28
|
-
btn-active-border: 1px solid #ff4081, // Pinkish red
|
|
29
|
-
btn-active-text: #ff4081,
|
|
30
|
-
|
|
31
|
-
// Disabled
|
|
32
|
-
disabled-opacity: 0.5,
|
|
33
|
-
disabled-bg: #f9f9f9
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
// Mixin to generate CSS variables for the pagination component
|
|
37
|
-
@mixin pagination-theme($user-config: ()) {
|
|
38
|
-
// Merge user config with defaults
|
|
39
|
-
$config: map.merge($default-pagination-config, $user-config);
|
|
40
|
-
|
|
41
|
-
// Generate CSS Variables
|
|
42
|
-
--cc-pagination-font-family: #{map.get($config, font-family)};
|
|
43
|
-
--cc-pagination-text-color: #{map.get($config, text-color)};
|
|
44
|
-
--cc-pagination-font-size: #{map.get($config, font-size)};
|
|
45
|
-
|
|
46
|
-
--cc-pagination-select-bg: #{map.get($config, select-bg)};
|
|
47
|
-
--cc-pagination-select-border: #{map.get($config, select-border)};
|
|
48
|
-
--cc-pagination-select-radius: #{map.get($config, select-radius)};
|
|
49
|
-
--cc-pagination-select-padding: #{map.get($config, select-padding)};
|
|
50
|
-
--cc-pagination-select-text-color: #{map.get($config, select-text-color)};
|
|
51
|
-
--cc-pagination-select-arrow-color: #{map.get($config, select-arrow-color)};
|
|
52
|
-
|
|
53
|
-
--cc-pagination-btn-size: #{map.get($config, btn-size)};
|
|
54
|
-
--cc-pagination-btn-bg: #{map.get($config, btn-bg)};
|
|
55
|
-
--cc-pagination-btn-border: #{map.get($config, btn-border)};
|
|
56
|
-
--cc-pagination-btn-radius: #{map.get($config, btn-radius)};
|
|
57
|
-
--cc-pagination-btn-text-color: #{map.get($config, btn-text-color)};
|
|
58
|
-
|
|
59
|
-
--cc-pagination-btn-hover-bg: #{map.get($config, btn-hover-bg)};
|
|
60
|
-
--cc-pagination-btn-active-bg: #{map.get($config, btn-active-bg)};
|
|
61
|
-
--cc-pagination-btn-active-border: #{map.get($config, btn-active-border)};
|
|
62
|
-
--cc-pagination-btn-active-text: #{map.get($config, btn-active-text)};
|
|
63
|
-
|
|
64
|
-
--cc-pagination-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
65
|
-
--cc-pagination-disabled-bg: #{map.get($config, disabled-bg)};
|
|
66
|
-
}
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// Default configuration for the pagination theme
|
|
4
|
+
$default-pagination-config: (
|
|
5
|
+
// Font & Text
|
|
6
|
+
font-family: ('Roboto', sans-serif),
|
|
7
|
+
text-color: #757575,
|
|
8
|
+
font-size: 14px,
|
|
9
|
+
|
|
10
|
+
// Select Dropdown
|
|
11
|
+
select-bg: #f5f5f5,
|
|
12
|
+
select-border: none,
|
|
13
|
+
select-radius: 4px,
|
|
14
|
+
select-padding: 6px 12px,
|
|
15
|
+
select-text-color: #333,
|
|
16
|
+
select-arrow-color: #f44336, // Red arrow
|
|
17
|
+
|
|
18
|
+
// Buttons
|
|
19
|
+
btn-size: 32px,
|
|
20
|
+
btn-bg: #ffffff,
|
|
21
|
+
btn-border: 1px solid #e0e0e0,
|
|
22
|
+
btn-radius: 4px,
|
|
23
|
+
btn-text-color: #333,
|
|
24
|
+
|
|
25
|
+
// States
|
|
26
|
+
btn-hover-bg: #f5f5f5,
|
|
27
|
+
btn-active-bg: #fff,
|
|
28
|
+
btn-active-border: 1px solid #ff4081, // Pinkish red
|
|
29
|
+
btn-active-text: #ff4081,
|
|
30
|
+
|
|
31
|
+
// Disabled
|
|
32
|
+
disabled-opacity: 0.5,
|
|
33
|
+
disabled-bg: #f9f9f9
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// Mixin to generate CSS variables for the pagination component
|
|
37
|
+
@mixin pagination-theme($user-config: ()) {
|
|
38
|
+
// Merge user config with defaults
|
|
39
|
+
$config: map.merge($default-pagination-config, $user-config);
|
|
40
|
+
|
|
41
|
+
// Generate CSS Variables
|
|
42
|
+
--cc-pagination-font-family: #{map.get($config, font-family)};
|
|
43
|
+
--cc-pagination-text-color: #{map.get($config, text-color)};
|
|
44
|
+
--cc-pagination-font-size: #{map.get($config, font-size)};
|
|
45
|
+
|
|
46
|
+
--cc-pagination-select-bg: #{map.get($config, select-bg)};
|
|
47
|
+
--cc-pagination-select-border: #{map.get($config, select-border)};
|
|
48
|
+
--cc-pagination-select-radius: #{map.get($config, select-radius)};
|
|
49
|
+
--cc-pagination-select-padding: #{map.get($config, select-padding)};
|
|
50
|
+
--cc-pagination-select-text-color: #{map.get($config, select-text-color)};
|
|
51
|
+
--cc-pagination-select-arrow-color: #{map.get($config, select-arrow-color)};
|
|
52
|
+
|
|
53
|
+
--cc-pagination-btn-size: #{map.get($config, btn-size)};
|
|
54
|
+
--cc-pagination-btn-bg: #{map.get($config, btn-bg)};
|
|
55
|
+
--cc-pagination-btn-border: #{map.get($config, btn-border)};
|
|
56
|
+
--cc-pagination-btn-radius: #{map.get($config, btn-radius)};
|
|
57
|
+
--cc-pagination-btn-text-color: #{map.get($config, btn-text-color)};
|
|
58
|
+
|
|
59
|
+
--cc-pagination-btn-hover-bg: #{map.get($config, btn-hover-bg)};
|
|
60
|
+
--cc-pagination-btn-active-bg: #{map.get($config, btn-active-bg)};
|
|
61
|
+
--cc-pagination-btn-active-border: #{map.get($config, btn-active-border)};
|
|
62
|
+
--cc-pagination-btn-active-text: #{map.get($config, btn-active-text)};
|
|
63
|
+
|
|
64
|
+
--cc-pagination-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
65
|
+
--cc-pagination-disabled-bg: #{map.get($config, disabled-bg)};
|
|
66
|
+
}
|