@solcre-org/core-ui 2.14.1 → 2.14.2

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/index.d.ts CHANGED
@@ -1895,7 +1895,21 @@ declare class DropdownService {
1895
1895
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<DropdownService>;
1896
1896
  }
1897
1897
 
1898
- interface CustomAction<T> {
1898
+ interface SwitchOption<T = any> {
1899
+ value: T;
1900
+ icon?: string;
1901
+ label?: string;
1902
+ disabled?: boolean;
1903
+ tooltip?: string;
1904
+ }
1905
+
1906
+ interface SwitchActionConfig {
1907
+ isSwitch?: boolean;
1908
+ switchOptions?: SwitchOption[];
1909
+ switchAriaLabel?: string;
1910
+ }
1911
+
1912
+ interface CustomAction<T> extends SwitchActionConfig {
1899
1913
  label?: string;
1900
1914
  title: string;
1901
1915
  icon?: string;
@@ -1911,6 +1925,8 @@ interface CustomAction<T> {
1911
1925
  buttonConfig?: Partial<ButtonConfig>;
1912
1926
  shouldShow?: (row: T) => boolean;
1913
1927
  shouldDisable?: (row: T) => boolean;
1928
+ switchValue?: (row: T) => any;
1929
+ onSwitchChange?: (value: any, row: T) => void;
1914
1930
  }
1915
1931
 
1916
1932
  interface TableActionConfig<T = any> {
@@ -2152,7 +2168,7 @@ interface ExpansionConfig<T> {
2152
2168
  buttonClass?: string;
2153
2169
  }
2154
2170
 
2155
- interface GlobalAction<T> {
2171
+ interface GlobalAction<T> extends SwitchActionConfig {
2156
2172
  label?: string;
2157
2173
  icon?: string;
2158
2174
  class?: string;
@@ -2168,6 +2184,8 @@ interface GlobalAction<T> {
2168
2184
  isDisabled?: boolean;
2169
2185
  tooltip?: string;
2170
2186
  tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
2187
+ switchSelectedValue?: any;
2188
+ onSwitchChange?: (value: any, selectedRows: T[]) => void;
2171
2189
  }
2172
2190
 
2173
2191
  interface MoreDataConfig<T extends DataBaseModelInterface> {
@@ -2723,6 +2741,7 @@ declare class GenericTableComponent<T extends DataBaseModelInterface & {
2723
2741
  hasAction(action: TableAction): boolean;
2724
2742
  triggerAction(action: TableAction, row?: T): void;
2725
2743
  triggerCustomAction(action: CustomAction<T>, row: T): void;
2744
+ onCustomActionSwitchChange(value: any, action: CustomAction<T>, row: T): void;
2726
2745
  triggerGlobalAction(action: GlobalAction<T>): void;
2727
2746
  isGlobalActionDisabled(action: GlobalAction<T>): boolean;
2728
2747
  onModalSave(updatedData: T): void;
@@ -3566,6 +3585,7 @@ declare class HeaderComponent implements OnInit {
3566
3585
  getCreateButtonConfig(): ButtonConfig;
3567
3586
  private getButtonTypeFromClass;
3568
3587
  onGlobalButtonClick(event: ButtonActionEvent, action: GlobalAction<any>): void;
3588
+ onGlobalSwitchChange(value: any, action: GlobalAction<any>): void;
3569
3589
  onCustomButtonClick(event: ButtonActionEvent, action: HeaderActionConfig): void;
3570
3590
  onFilterButtonClick(): void;
3571
3591
  onCreateButtonClick(): void;
@@ -4801,14 +4821,6 @@ declare class GalleryModalGlobalService {
4801
4821
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<GalleryModalGlobalService>;
4802
4822
  }
4803
4823
 
4804
- interface SwitchOption<T = any> {
4805
- value: T;
4806
- icon?: string;
4807
- label?: string;
4808
- disabled?: boolean;
4809
- tooltip?: string;
4810
- }
4811
-
4812
4824
  declare class GenericSwitchComponent<T = any> {
4813
4825
  options: _angular_core.InputSignal<SwitchOption<T>[]>;
4814
4826
  selectedValue: _angular_core.InputSignal<T | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solcre-org/core-ui",
3
- "version": "2.14.1",
3
+ "version": "2.14.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"