commons-shared-web-ui 0.0.7 → 0.0.9

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;
@@ -2234,6 +2246,7 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
2234
2246
  [key: string]: any;
2235
2247
  };
2236
2248
  hasStickyColumns: boolean;
2249
+ openDropdownId: string | null;
2237
2250
  searchSubject: Subject<string>;
2238
2251
  stickyHeaders: QueryList<ElementRef>;
2239
2252
  private resizeObserver;
@@ -2252,7 +2265,9 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
2252
2265
  onSearch(event: Event): void;
2253
2266
  onFilterChange(key: string, event: Event): void;
2254
2267
  onAction(action: TableAction, row: any): void;
2268
+ onActionItemClick(item: any, row: any, event: Event): void;
2255
2269
  onTopAction(action: TableAction): void;
2270
+ private executeApiAction;
2256
2271
  onSelectAll(event: Event): void;
2257
2272
  onRowSelect(row: any): void;
2258
2273
  updateSelectedRows(): void;
@@ -2267,13 +2282,15 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
2267
2282
  get columnCount(): number;
2268
2283
  onColumnClick(row: any, col: TableColumn): void;
2269
2284
  private getHeaders;
2285
+ toggleDropdown(id: string, event: Event): void;
2286
+ closeDropdown(): void;
2270
2287
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
2271
2288
  static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "columnClick": "columnClick"; }, never, never, false, never>;
2272
2289
  }
2273
2290
 
2274
2291
  declare class SmartTableModule {
2275
2292
  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]>;
2293
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof SmartTableComponent], [typeof i2$1.CommonModule, typeof i3$1.FormsModule, typeof PaginationModule, typeof ButtonModule, typeof MaterialModule], [typeof SmartTableComponent]>;
2277
2294
  static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
2278
2295
  }
2279
2296
 
@@ -2309,4 +2326,4 @@ declare namespace smartForm_examples_d {
2309
2326
  }
2310
2327
 
2311
2328
  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 };
2329
+ 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.9",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",