commons-shared-web-ui 0.0.7 → 0.0.8

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
@@ -2116,9 +2116,20 @@ interface TableFilter {
2116
2116
  requestKey?: string;
2117
2117
  dataPath?: string;
2118
2118
  }
2119
+ interface TableActionItem {
2120
+ label: string;
2121
+ type: 'api' | 'callback' | 'route';
2122
+ icon?: string;
2123
+ apiUrl?: string;
2124
+ apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
2125
+ route?: string;
2126
+ confirmationNeeded?: boolean;
2127
+ confirmationMessage?: string;
2128
+ callback?: (row: any) => void;
2129
+ }
2119
2130
  interface TableAction {
2120
2131
  label: string;
2121
- type: 'api' | 'callback' | 'route' | 'edit';
2132
+ type: 'api' | 'callback' | 'route' | 'edit' | 'dropdown';
2122
2133
  icon?: string;
2123
2134
  btnVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
2124
2135
  apiUrl?: string;
@@ -2127,6 +2138,7 @@ interface TableAction {
2127
2138
  confirmationNeeded?: boolean;
2128
2139
  confirmationMessage?: string;
2129
2140
  callback?: (row: any) => void;
2141
+ items?: TableActionItem[];
2130
2142
  }
2131
2143
  interface PaginationConfig {
2132
2144
  enabled: boolean;
@@ -2252,7 +2264,9 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
2252
2264
  onSearch(event: Event): void;
2253
2265
  onFilterChange(key: string, event: Event): void;
2254
2266
  onAction(action: TableAction, row: any): void;
2267
+ onActionItemClick(item: any, row: any, event: Event): void;
2255
2268
  onTopAction(action: TableAction): void;
2269
+ private executeApiAction;
2256
2270
  onSelectAll(event: Event): void;
2257
2271
  onRowSelect(row: any): void;
2258
2272
  updateSelectedRows(): void;
@@ -2273,7 +2287,7 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
2273
2287
 
2274
2288
  declare class SmartTableModule {
2275
2289
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableModule, never>;
2276
- static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof SmartTableComponent], [typeof i2$1.CommonModule, typeof i3$1.FormsModule, typeof PaginationModule, typeof ButtonModule], [typeof SmartTableComponent]>;
2290
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof SmartTableComponent], [typeof i2$1.CommonModule, typeof i3$1.FormsModule, typeof PaginationModule, typeof ButtonModule, typeof i16.MatMenuModule, typeof i12.MatIconModule], [typeof SmartTableComponent]>;
2277
2291
  static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
2278
2292
  }
2279
2293
 
@@ -2309,4 +2323,4 @@ declare namespace smartForm_examples_d {
2309
2323
  }
2310
2324
 
2311
2325
  export { AlertComponent, AlertModule, ButtonComponent, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DatepickerComponent, DropdownComponent, ExpressionService, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
2312
- export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig$1 as OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableColumn, TableConfig, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
2326
+ export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig$1 as OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableConfig, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",