commons-shared-web-ui 0.0.29 → 0.0.30
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/commons-shared-web-ui-0.0.30.tgz +0 -0
- package/fesm2022/commons-shared-web-ui.mjs +105 -20
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +24 -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,13 @@ 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
|
+
};
|
|
3562
3575
|
deleteModalOpen: boolean;
|
|
3563
3576
|
deleteModalConfig: any;
|
|
3564
3577
|
private pendingDeleteAction;
|
|
@@ -3584,6 +3597,14 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3584
3597
|
onSort(col: TableColumn): void;
|
|
3585
3598
|
onSearch(event: Event): void;
|
|
3586
3599
|
onFilterChange(key: string, event: Event): void;
|
|
3600
|
+
private applyFilter;
|
|
3601
|
+
toggleFilter(key: string, event: Event): void;
|
|
3602
|
+
selectFilterOption(filter: any, opt: {
|
|
3603
|
+
label: string;
|
|
3604
|
+
value: any;
|
|
3605
|
+
} | null): void;
|
|
3606
|
+
getFilterDisplay(filter: any): string;
|
|
3607
|
+
isFilterActive(filter: any): boolean;
|
|
3587
3608
|
/**
|
|
3588
3609
|
* Assembles the current table state into a `TableDataChangeEvent` object.
|
|
3589
3610
|
* Emitted to the parent in external-data mode so it can fetch and supply new data.
|
|
@@ -3602,7 +3623,8 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3602
3623
|
updateSelectedRows(): void;
|
|
3603
3624
|
getCellValue(row: any, col: TableColumn): any;
|
|
3604
3625
|
getBadgeClass(row: any, col: TableColumn): string;
|
|
3605
|
-
|
|
3626
|
+
getAscOpacity(key: string): number;
|
|
3627
|
+
getDescOpacity(key: string): number;
|
|
3606
3628
|
private replaceParams;
|
|
3607
3629
|
private loadFilterOptions;
|
|
3608
3630
|
private getValueByPath;
|
|
@@ -3611,7 +3633,7 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3611
3633
|
get columnCount(): number;
|
|
3612
3634
|
onColumnClick(row: any, col: TableColumn): void;
|
|
3613
3635
|
private getHeaders;
|
|
3614
|
-
toggleDropdown(id: string, event: Event): void;
|
|
3636
|
+
toggleDropdown(id: string, event: Event, items: any[], row: any): void;
|
|
3615
3637
|
closeDropdown(): void;
|
|
3616
3638
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
|
|
3617
3639
|
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
|
+
}
|