commons-shared-web-ui 0.0.20 → 0.0.21

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
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnDestroy, EventEmitter, OnChanges, SimpleChanges, ElementRef, PipeTransform, AfterViewInit, QueryList, ChangeDetectorRef, NgZone } from '@angular/core';
2
+ import { OnInit, EventEmitter, ElementRef, OnDestroy, OnChanges, SimpleChanges, PipeTransform, AfterViewInit, QueryList, ChangeDetectorRef, NgZone } from '@angular/core';
3
3
  import * as i2$1 from '@angular/common';
4
4
  import * as i1 from '@angular/material/card';
5
5
  import * as i2 from '@angular/material/snack-bar';
@@ -32,13 +32,13 @@ import * as i26 from '@angular/material/paginator';
32
32
  import * as i27 from '@angular/material/table';
33
33
  import * as i28 from '@angular/material/expansion';
34
34
  import * as i29 from '@angular/cdk/accordion';
35
- import * as i3$1 from '@angular/forms';
36
- import { ControlValueAccessor, FormGroup, FormBuilder, AbstractControl, FormControl, FormArray, ValidatorFn, ValidationErrors } from '@angular/forms';
37
35
  import * as i3$2 from '@angular/router';
38
36
  import { Router, ActivatedRoute } from '@angular/router';
37
+ import { HttpClient, HttpHeaders } from '@angular/common/http';
38
+ import * as i3$1 from '@angular/forms';
39
+ import { ControlValueAccessor, FormGroup, FormBuilder, AbstractControl, FormControl, FormArray, ValidatorFn, ValidationErrors } from '@angular/forms';
39
40
  import * as i11$1 from '@angular/cdk/scrolling';
40
41
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
41
- import { HttpClient, HttpHeaders } from '@angular/common/http';
42
42
  import { Observable, Subject } from 'rxjs';
43
43
  import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
44
44
  import * as i10$1 from 'ngx-quill';
@@ -145,6 +145,23 @@ declare class ButtonModule {
145
145
  static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
146
146
  }
147
147
 
148
+ interface DropdownAction {
149
+ label: string;
150
+ type: 'api' | 'route' | 'callback';
151
+ icon?: string;
152
+ color?: string;
153
+ variant?: ButtonVariant;
154
+ route?: string;
155
+ apiUrl?: string;
156
+ apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
157
+ apiPayload?: any;
158
+ callback?: (data: any) => void;
159
+ disabled?: boolean;
160
+ confirmationNeeded?: boolean;
161
+ confirmationMessage?: string;
162
+ confirmationTitle?: string;
163
+ }
164
+
148
165
  interface ConfirmationModalConfig {
149
166
  title: string;
150
167
  headerTheme?: 'light' | 'dark';
@@ -194,6 +211,48 @@ interface ConfirmationModalConfig {
194
211
  };
195
212
  }
196
213
 
214
+ declare class ButtonDropdownComponent {
215
+ private elementRef;
216
+ private router;
217
+ private http;
218
+ label: string;
219
+ variant: ButtonVariant;
220
+ menuTheme: 'light' | 'dark';
221
+ icon: string;
222
+ actions: DropdownAction[];
223
+ data: any;
224
+ disabled: boolean;
225
+ apiActionStart: EventEmitter<DropdownAction>;
226
+ apiActionSuccess: EventEmitter<{
227
+ action: DropdownAction;
228
+ response: any;
229
+ }>;
230
+ apiActionError: EventEmitter<{
231
+ action: DropdownAction;
232
+ error: any;
233
+ }>;
234
+ actionClick: EventEmitter<{
235
+ action: DropdownAction;
236
+ data: any;
237
+ }>;
238
+ isOpen: boolean;
239
+ isConfirmModalOpen: boolean;
240
+ pendingAction: DropdownAction | null;
241
+ confirmConfig: ConfirmationModalConfig | null;
242
+ confirmMessage: string;
243
+ constructor(elementRef: ElementRef, router: Router, http: HttpClient);
244
+ onClickOutside(event: Event): void;
245
+ toggleDropdown(event: Event): void;
246
+ onActionItemClick(action: DropdownAction, event: Event): void;
247
+ private executeAction;
248
+ private navigateToRoute;
249
+ private executeApiCall;
250
+ invokePendingAction(): void;
251
+ closeConfirmModal(): void;
252
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonDropdownComponent, never>;
253
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonDropdownComponent, "lib-button-dropdown", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "menuTheme": { "alias": "menuTheme"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "data": { "alias": "data"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "apiActionStart": "apiActionStart"; "apiActionSuccess": "apiActionSuccess"; "apiActionError": "apiActionError"; "actionClick": "actionClick"; }, never, never, false, never>;
254
+ }
255
+
197
256
  declare class ConfirmationModalComponent implements OnInit, OnDestroy {
198
257
  config: ConfirmationModalConfig;
199
258
  isOpen: boolean;
@@ -231,6 +290,12 @@ declare class ConfirmationModalModule {
231
290
  static ɵinj: i0.ɵɵInjectorDeclaration<ConfirmationModalModule>;
232
291
  }
233
292
 
293
+ declare class ButtonDropdownModule {
294
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonDropdownModule, never>;
295
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonDropdownModule, [typeof ButtonDropdownComponent], [typeof i2$1.CommonModule, typeof i3$2.RouterModule, typeof ButtonModule, typeof ConfirmationModalModule], [typeof ButtonDropdownComponent]>;
296
+ static ɵinj: i0.ɵɵInjectorDeclaration<ButtonDropdownModule>;
297
+ }
298
+
234
299
  type InputType = 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'textarea';
235
300
  interface InputLabels {
236
301
  label?: string;
@@ -2412,7 +2477,7 @@ declare class SideNavModule {
2412
2477
 
2413
2478
  declare class SharedUiModule {
2414
2479
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
2415
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule]>;
2480
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule]>;
2416
2481
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
2417
2482
  }
2418
2483
 
@@ -2846,5 +2911,5 @@ declare class SnackbarModule {
2846
2911
  static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
2847
2912
  }
2848
2913
 
2849
- export { AlertComponent, AlertModule, ButtonComponent, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, 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, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
2850
- 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, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, 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 };
2914
+ export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, 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, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
2915
+ export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, 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, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, 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.20",
3
+ "version": "0.0.21",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",