@ascentgl/ads-ui 20.26.0 → 20.28.0

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
@@ -43,7 +43,7 @@ import { MatDialogRef } from '@angular/material/dialog';
43
43
  import * as i7 from '@angular/material/expansion';
44
44
  import { MatExpansionPanel, MatAccordion } from '@angular/material/expansion';
45
45
  import * as ag_grid_community from 'ag-grid-community';
46
- import { GridOptions, ColDef, GridApi, GridReadyEvent, FirstDataRenderedEvent } from 'ag-grid-community';
46
+ import { GridOptions, ColDef, GridApi, SortChangedEvent, FilterChangedEvent, GridReadyEvent, FirstDataRenderedEvent } from 'ag-grid-community';
47
47
  import * as i4$6 from 'ag-grid-angular';
48
48
  import * as i4$7 from '@angular/material/menu';
49
49
  import { MatMenu } from '@angular/material/menu';
@@ -210,8 +210,10 @@ declare class AdsButtonComponent {
210
210
  size: i0.InputSignal<Size>;
211
211
  /** Sets the "type" attribute on the button */
212
212
  type: i0.InputSignal<"button" | "submit" | "reset">;
213
+ /** Makes the button take 100% width of its container */
214
+ fullWidth: i0.InputSignal<boolean>;
213
215
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsButtonComponent, never>;
214
- static ɵcmp: i0.ɵɵComponentDeclaration<AdsButtonComponent, "ads-button", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
216
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsButtonComponent, "ads-button", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
215
217
  }
216
218
 
217
219
  declare class AdsButtonModule {
@@ -2034,6 +2036,12 @@ declare class AdsRadioButtonModule {
2034
2036
  declare class AdsSlideToggleComponent extends AbstractBaseComponent {
2035
2037
  /** Set to "true" to make the toggle title "Yes" or "No" */
2036
2038
  enableYesOrNo: boolean;
2039
+ /**
2040
+ * Optional custom titles for the toggle states.
2041
+ * Array with two strings: [enabled_text, disabled_text]
2042
+ * Example: ['Show', 'Hide'] or ['Active', 'Inactive']
2043
+ */
2044
+ customTitles?: [string, string];
2037
2045
  /** @ignore */
2038
2046
  valueControl: FormControl;
2039
2047
  /** Form control, associated with input field */
@@ -2048,8 +2056,10 @@ declare class AdsSlideToggleComponent extends AbstractBaseComponent {
2048
2056
  toggle(): void;
2049
2057
  /** @ignore */
2050
2058
  getTitle(enabled: boolean): string;
2059
+ /** @ignore */
2060
+ getToggleWidth(): string;
2051
2061
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsSlideToggleComponent, never>;
2052
- static ɵcmp: i0.ɵɵComponentDeclaration<AdsSlideToggleComponent, "ads-slide-toggle", never, { "enableYesOrNo": { "alias": "enableYesOrNo"; "required": false; }; "control": { "alias": "control"; "required": false; }; "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, false, never>;
2062
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsSlideToggleComponent, "ads-slide-toggle", never, { "enableYesOrNo": { "alias": "enableYesOrNo"; "required": false; }; "customTitles": { "alias": "customTitles"; "required": false; }; "control": { "alias": "control"; "required": false; }; "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, false, never>;
2053
2063
  }
2054
2064
 
2055
2065
  declare class AdsSlideToggle {
@@ -2334,10 +2344,17 @@ declare enum TableBreakpoint {
2334
2344
  LG = "lg",
2335
2345
  XL = "xl"
2336
2346
  }
2347
+ interface ColumnVisibilityControl {
2348
+ field: string;
2349
+ headerName: string;
2350
+ control: FormControl<boolean>;
2351
+ }
2337
2352
  declare class AdsTableComponent implements AfterViewInit, OnDestroy {
2338
2353
  private elementRef;
2354
+ private registry;
2355
+ private cdr;
2339
2356
  /** @ignore */
2340
- constructor(elementRef: ElementRef);
2357
+ constructor(elementRef: ElementRef, registry: AdsIconRegistry, cdr: ChangeDetectorRef);
2341
2358
  /** The grid's width */
2342
2359
  width: string;
2343
2360
  /** The grid's height */
@@ -2356,23 +2373,98 @@ declare class AdsTableComponent implements AfterViewInit, OnDestroy {
2356
2373
  loading: boolean;
2357
2374
  /** Columns data by breakPoints */
2358
2375
  columnDefsByBreakpoint: Record<TableBreakpoint, ColDef[]>;
2376
+ /** Show/hide the header with column visibility button */
2377
+ showHeaderActions: boolean;
2378
+ /** @ignore */
2379
+ hideColumnButton: ElementRef;
2359
2380
  /** @ignore */
2360
2381
  tableColumnDefs: i0.WritableSignal<ColDef<any, any>[]>;
2361
2382
  /** @ignore */
2383
+ columnVisibilityList: i0.WritableSignal<ColumnVisibilityControl[]>;
2384
+ /** @ignore */
2385
+ isDropdownOpen: boolean;
2386
+ /** @ignore */
2387
+ dropdownPosition: {
2388
+ top: string;
2389
+ left: string;
2390
+ };
2391
+ /** @ignore */
2392
+ private destroy$;
2393
+ /** @ignore */
2362
2394
  private cachedDefaultColDef;
2363
2395
  /** @ignore */
2364
2396
  private currentBreakpoint?;
2365
2397
  /** @ignore */
2366
2398
  private resizeObserver?;
2367
2399
  /** @ignore */
2400
+ gridApi?: GridApi;
2401
+ /** @ignore */
2402
+ private truncationStates;
2403
+ /** @ignore */
2404
+ private currentSortField;
2405
+ /** @ignore */
2406
+ private currentSortDirection;
2407
+ /** @ignore */
2408
+ filteredColumns: string[];
2409
+ /** @ignore */
2368
2410
  private getBreakpoint;
2369
2411
  /** @ignore */
2370
2412
  getDefaultColDef(): ColDef<GENERIC_COLLECTION>;
2371
2413
  /** @ignore */
2372
- gridApi?: GridApi;
2373
- /** @ignore */
2374
2414
  ngAfterViewInit(): void;
2375
2415
  /** @ignore */
2416
+ private initializeColumnVisibility;
2417
+ /** @ignore */
2418
+ private unsubscribeFromControls;
2419
+ /** @ignore */
2420
+ private getActiveColumnDefs;
2421
+ /** @ignore */
2422
+ openColumnVisibilityDropdown(): void;
2423
+ /** @ignore */
2424
+ private onDocumentClick;
2425
+ /** @ignore */
2426
+ closeDropdown(): void;
2427
+ /** @ignore */
2428
+ onDropdownClick(event: Event): void;
2429
+ /** @ignore */
2430
+ hideAllColumns(): void;
2431
+ /** @ignore */
2432
+ showAllColumns(): void;
2433
+ /** @ignore */
2434
+ get allColumnsVisible(): boolean;
2435
+ /** @ignore */
2436
+ get allColumnsHidden(): boolean;
2437
+ /** @ignore */
2438
+ get hiddenColumnsCount(): number;
2439
+ /** @ignore */
2440
+ get hideColumnButtonLabel(): string;
2441
+ /** @ignore */
2442
+ get sortButtonLabel(): string;
2443
+ /** @ignore */
2444
+ get filterButtonLabel(): string;
2445
+ /** @ignore */
2446
+ get isSortedTable(): boolean;
2447
+ /** @ignore */
2448
+ get isFilteredTable(): boolean;
2449
+ /** @ignore */
2450
+ private updateSortingState;
2451
+ /** @ignore */
2452
+ private updateFilteringState;
2453
+ /** @ignore */
2454
+ private onSortChanged;
2455
+ /** @ignore */
2456
+ private onFilterChanged;
2457
+ /** @ignore */
2458
+ sortChanged($event: SortChangedEvent): void;
2459
+ /** @ignore */
2460
+ filterChanged($event: FilterChangedEvent): void;
2461
+ /** @ignore */
2462
+ clearAllFilters(): void;
2463
+ /** @ignore */
2464
+ clearAllSorting(): void;
2465
+ /** @ignore */
2466
+ private updateGridColumns;
2467
+ /** @ignore */
2376
2468
  private onGridReady;
2377
2469
  /** @ignore */
2378
2470
  private onFirstDataRendered;
@@ -2387,15 +2479,36 @@ declare class AdsTableComponent implements AfterViewInit, OnDestroy {
2387
2479
  /** @ignore */
2388
2480
  private getFallbackColumnDefs;
2389
2481
  /** @ignore */
2482
+ private updateTruncationStates;
2483
+ /** @ignore */
2484
+ getTooltipDisabled(headerName: string): boolean;
2485
+ /** @ignore */
2390
2486
  ngOnDestroy(): void;
2391
2487
  protected readonly themeQuartz: ag_grid_community.Theme<ag_grid_community.ThemeDefaultParams>;
2392
2488
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsTableComponent, never>;
2393
- static ɵcmp: i0.ɵɵComponentDeclaration<AdsTableComponent, "ads-table", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "gridOptions": { "alias": "gridOptions"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "defaultColDef": { "alias": "defaultColDef"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "columnDefsByBreakpoint": { "alias": "columnDefsByBreakpoint"; "required": false; }; }, {}, never, never, false, never>;
2489
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsTableComponent, "ads-table", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "gridOptions": { "alias": "gridOptions"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "defaultColDef": { "alias": "defaultColDef"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "columnDefsByBreakpoint": { "alias": "columnDefsByBreakpoint"; "required": false; }; "showHeaderActions": { "alias": "showHeaderActions"; "required": false; }; }, {}, never, never, false, never>;
2490
+ }
2491
+
2492
+ declare class AdsTableButtonComponent {
2493
+ /** The unique ID for the button */
2494
+ id: i0.InputSignal<string>;
2495
+ /** Whether the button is disabled */
2496
+ disabled: i0.InputSignal<boolean>;
2497
+ /** Makes the button take 100% width of its container */
2498
+ fullWidth: i0.InputSignal<boolean>;
2499
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdsTableButtonComponent, never>;
2500
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsTableButtonComponent, "ads-table-button", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
2501
+ }
2502
+
2503
+ declare class AdsTableButtonModule {
2504
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdsTableButtonModule, never>;
2505
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AdsTableButtonModule, [typeof AdsTableButtonComponent], [typeof i2.CommonModule, typeof i3$1.MatButtonModule], [typeof AdsTableButtonComponent]>;
2506
+ static ɵinj: i0.ɵɵInjectorDeclaration<AdsTableButtonModule>;
2394
2507
  }
2395
2508
 
2396
2509
  declare class AdsTableModule {
2397
2510
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsTableModule, never>;
2398
- static ɵmod: i0.ɵɵNgModuleDeclaration<AdsTableModule, [typeof AdsTableComponent], [typeof i2.CommonModule, typeof i4.AdsIconModule, typeof i4$6.AgGridAngular], [typeof AdsTableComponent]>;
2511
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AdsTableModule, [typeof AdsTableComponent], [typeof i2.CommonModule, typeof i4.AdsIconModule, typeof i4$6.AgGridAngular, typeof i2$1.MatDialogModule, typeof AdsSlideToggle, typeof AdsButtonModule, typeof AdsTableButtonModule, typeof AdsDividerModule, typeof i16.MatTooltip], [typeof AdsTableComponent]>;
2399
2512
  static ɵinj: i0.ɵɵInjectorDeclaration<AdsTableModule>;
2400
2513
  }
2401
2514
 
@@ -3184,4 +3297,4 @@ declare class AdsProgressStepperModule {
3184
3297
  }
3185
3298
 
3186
3299
  export { AdsAscentLogoComponent, AdsAscentLogoModule, AdsAvatarComponent, AdsAvatarModule, AdsBreadcrumbComponent, AdsBreadcrumbModule, AdsBubbleComponent, AdsBubbleModule, AdsButtonComponent, AdsButtonContainerComponent, AdsButtonContainerModule, AdsButtonModule, AdsCardComponent, AdsCardModule, AdsCheckboxComponent, AdsCheckboxModule, AdsChipComponent, AdsChipModule, AdsCreateTagComponent, AdsCreateTagModule, AdsDatepickerComponent, AdsDatepickerModule, AdsDatetimepickerComponent, AdsDatetimepickerModule, AdsDividerModule, AdsDragAndDropListComponent, AdsDragAndDropListModule, AdsDropdownComponent, AdsDropdownModule, AdsErrorPageCodeComponent, AdsErrorPageCodeModule, AdsErrorPageComponent, AdsErrorPageModule, AdsExpansionPanelComponent, AdsExpansionPanelModule, AdsFooterComponent, AdsFooterContainerComponent, AdsFooterContainerModule, AdsFooterModule, AdsHeaderComponent, AdsHeaderContainerComponent, AdsHeaderContainerModule, AdsHeaderModule, AdsHorizontalNavBarComponent, AdsHorizontalNavBarModule, AdsIconButtonComponent, AdsIconButtonModule, AdsIconHoverComponent, AdsIconHoverModule, AdsInputComponent, AdsInputDropdownComponent, AdsInputDropdownModule, AdsInputModule, AdsInternationalPhoneFieldComponent, AdsInternationalPhoneFieldModule, AdsLinkButtonComponent, AdsLinkButtonModule, AdsMainMenuComponent, AdsMainMenuModule, AdsModalComponent, AdsModalModule, AdsMultiSelectDropdownComponent, AdsMultiSelectDropdownModule, AdsNavMenuComponent, AdsNavMenuModule, AdsNavigationCollapseHandleComponent, AdsNavigationCollapseHandleModule, AdsNavigationComponent, AdsNavigationHeaderComponent, AdsNavigationHeaderModule, AdsNavigationItemComponent, AdsNavigationItemModule, AdsNavigationItemsContainerComponent, AdsNavigationItemsContainerModule, AdsNavigationModule, AdsNumericBadgeComponent, AdsNumericBadgeModule, AdsNumericStepperComponent, AdsNumericStepperModule, AdsOrgDisplayTextComponent, AdsOrgDisplayTextModule, AdsPeakEssentialsLogoComponent, AdsPeakEssentialsLogoModule, AdsPeakMarketplaceLogoComponent, AdsPeakMarketplaceLogoModule, AdsPeakOrderManagementLogoComponent, AdsPeakOrderManagementLogoModule, AdsPhoneFieldComponent, AdsPhoneFieldModule, AdsPrimaryLogoComponent, AdsPrimaryLogoModule, AdsProgressBarComponent, AdsProgressBarModule, AdsProgressIndicatorSpinnerComponent, AdsProgressIndicatorSpinnerModule, AdsProgressSpinnerComponent, AdsProgressSpinnerModule, AdsProgressStepperComponent, AdsProgressStepperModule, AdsRadioButtonComponent, AdsRadioButtonModule, AdsScmsLogoComponent, AdsScmsLogoModule, AdsScmsSideNavBarComponent, AdsScmsSideNavBarModule, AdsSearchDropdownComponent, AdsSearchDropdownModule, AdsSearchInputComponent, AdsSearchInputModule, AdsShellLayoutModule, AdsSideNavBarComponent, AdsSideNavBarModule, AdsSlideToggle, AdsSlideToggleComponent, AdsSliderComponent, AdsSliderModule, AdsSnackbarComponent, AdsSnackbarModule, AdsSplashPageComponent, AdsSplashPageModule, AdsStepperComponent, AdsStepperModule, AdsTableComponent, AdsTableModule, AdsTabsComponent, AdsTabsModule, AdsTagComponent, AdsTagContainerComponent, AdsTagContainerModule, AdsTagModule, AdsTextareaComponent, AdsTextareaModule, AdsTimeFieldComponent, AdsTimeFieldModule, AdsTimepickerComponent, AdsTimepickerModule, AdsWizardStepperComponent, AdsWizardStepperModule, AscentCardComponent, AscentCardModule, BadgeColor, Colors, CustomDatetimeAdapter, DividerComponent, ErrorPageDefault, MainMenuService, ModalActionType, ModalPanelClass, PanelClass, ShellLayoutComponent, SpinnerSize, StepStatus, TableBreakpoint, ViewportService, WindowService, WizardStepStatus };
3187
- export type { AdsModalData, Breadcrumb, Copyright, DROP_CALLBACK_INDEXES, DividerStyle, ErrorPageConfig, ErrorPageInfoColumn, HorizontalNavLink, IconButtonSize, Link, MainMenuItem, NavItem, NavMenuItem, NumericStep, ProgressStep, ScmsNavItem, ScmsNavSubItem, Size, SnackBarData, Step, Tab, Tag, UNSUBSCRIBE_FUNCTIONS_COLLECTION, Variant, WizardStep };
3300
+ export type { AdsModalData, Breadcrumb, ColumnVisibilityControl, Copyright, DROP_CALLBACK_INDEXES, DividerStyle, ErrorPageConfig, ErrorPageInfoColumn, HorizontalNavLink, IconButtonSize, Link, MainMenuItem, NavItem, NavMenuItem, NumericStep, ProgressStep, ScmsNavItem, ScmsNavSubItem, Size, SnackBarData, Step, Tab, Tag, UNSUBSCRIBE_FUNCTIONS_COLLECTION, Variant, WizardStep };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ascentgl/ads-ui",
3
- "version": "20.26.0",
3
+ "version": "20.28.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": ">=20.3.0",
6
6
  "date-fns": ">=4.1.0",