@bnsights/bbsf-controls 1.0.166 → 1.0.168

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.
@@ -53,4 +53,6 @@ export declare class PagingOptions<T = any> {
53
53
  resetFilterButtonName: string;
54
54
  disableBlockUI: boolean;
55
55
  startPagingCallback: Function;
56
+ /** Enable browser back/forward navigation support for paging state */
57
+ enableBrowserNavigation: boolean;
56
58
  }
@@ -20,6 +20,7 @@ export declare class DropdownListComponent implements OnInit {
20
20
  constructor(onChangeService: OnPagingFiltersChangeService, controlUtility: ControlUtility, controlContainer: ControlContainer, dropdownListControlHost: FormGroupDirective, utilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings);
21
21
  group: FormGroup;
22
22
  options: DropdownOptions;
23
+ DropdownTemplateVariable: any;
23
24
  dropdownListFormControl: AbstractControl;
24
25
  dropdownSettings: {};
25
26
  selectedItems: DropdownListItem[];
@@ -51,5 +52,5 @@ export declare class DropdownListComponent implements OnInit {
51
52
  isValid: () => void;
52
53
  updateDataSource: (dataSource: DropdownListItem[]) => void;
53
54
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownListComponent, [null, null, { optional: true; }, null, null, null, null]>;
54
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownListComponent, "BBSF-DropdownList", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "onChange": "onChange"; "onClear": "onClear"; }, never, never, false, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownListComponent, "BBSF-DropdownList", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; "DropdownTemplateVariable": { "alias": "DropdownTemplateVariable"; "required": false; }; }, { "onChange": "onChange"; "onClear": "onClear"; }, never, never, false, never>;
55
56
  }
@@ -25,6 +25,7 @@ export declare class MapAutoCompleteComponent implements OnInit {
25
25
  OnChange: EventEmitter<any>;
26
26
  searchElementRef: ElementRef;
27
27
  advancedMapModal: any;
28
+ setLocationSearch: HTMLInputElement;
28
29
  mapAutoCompleteFormControl: AbstractControl;
29
30
  mapAutoCompleteModel: MapAutocompleteDTO;
30
31
  currentLanguage: string;
@@ -1,18 +1,22 @@
1
- import { OnInit, EventEmitter, OnDestroy } from '@angular/core';
2
- import { Router } from '@angular/router';
1
+ import { OnInit, EventEmitter, OnDestroy, ChangeDetectorRef } from '@angular/core';
2
+ import { Router, ActivatedRoute } from '@angular/router';
3
3
  import { HttpClient, HttpHeaders } from '@angular/common/http';
4
4
  import { PagingOptions } from '../../Shared/Models/PagingOptions';
5
5
  import { Subscription } from 'rxjs';
6
6
  import { FormGroup } from '@angular/forms';
7
7
  import { OnPagingFiltersChangeService } from '../../Shared/services/OnPagingFiltersChange.service';
8
8
  import { RequestHandlerService, UtilityService } from '@bnsights/bbsf-utilities';
9
+ import { Location } from '@angular/common';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class PagingComponent<T> implements OnInit, OnDestroy {
11
12
  utilityService: UtilityService;
12
13
  private http;
13
14
  private router;
15
+ private route;
16
+ private location;
14
17
  private onChangeService;
15
18
  private requestHandlerService;
19
+ private cdr;
16
20
  items: any[];
17
21
  pageOfItems: Array<any>;
18
22
  result: T[];
@@ -35,12 +39,44 @@ export declare class PagingComponent<T> implements OnInit, OnDestroy {
35
39
  isFirstCall: boolean;
36
40
  previousFilters: any;
37
41
  Items: EventEmitter<T[]>;
42
+ pageStateRestored: EventEmitter<{
43
+ page: number;
44
+ pageSize: number;
45
+ }>;
38
46
  options: PagingOptions;
39
47
  group: FormGroup;
40
48
  subscriptions: Subscription;
41
- constructor(utilityService: UtilityService, http: HttpClient, router: Router, onChangeService: OnPagingFiltersChangeService, requestHandlerService: RequestHandlerService);
49
+ private isNavigatingBack;
50
+ private isRestoringFilters;
51
+ private pageHistory;
52
+ private currentHistoryIndex;
53
+ constructor(utilityService: UtilityService, http: HttpClient, router: Router, route: ActivatedRoute, location: Location, onChangeService: OnPagingFiltersChangeService, requestHandlerService: RequestHandlerService, cdr: ChangeDetectorRef);
42
54
  ngOnDestroy(): void;
43
55
  ngOnInit(): void;
56
+ /**
57
+ * Initialize browser navigation support
58
+ */
59
+ private initializeBrowserNavigation;
60
+ /**
61
+ * Restore state from browser history on initial load
62
+ */
63
+ private restoreStateFromBrowserHistory;
64
+ /**
65
+ * Listen to browser back/forward navigation
66
+ */
67
+ onPopState(event: PopStateEvent): void;
68
+ /**
69
+ * Restore page state from browser history
70
+ */
71
+ private restorePageStateFromHistory;
72
+ /**
73
+ * Update local history index to match browser state
74
+ */
75
+ private updateLocalHistoryIndex;
76
+ /**
77
+ * Update browser history state with current page and page size
78
+ */
79
+ private updateHistoryState;
44
80
  ngAfterViewInit(): void;
45
81
  onDropDownChange(result: any): void;
46
82
  onChangePage(Page: any): void;
@@ -49,10 +85,26 @@ export declare class PagingComponent<T> implements OnInit, OnDestroy {
49
85
  getItemList(page: any, IsFilterUpdated?: boolean): void;
50
86
  reinitializePaging: () => void;
51
87
  updatePaging: () => void;
88
+ /**
89
+ * Force update the current page (useful for external components)
90
+ */
91
+ setCurrentPage(page: number): void;
92
+ /**
93
+ * Get the current page number
94
+ */
95
+ getCurrentPage(): number;
96
+ /**
97
+ * Restore filter values to form controls
98
+ */
99
+ private restoreFilterValues;
52
100
  castItems(objectArr: any[]): T[];
53
101
  setText(pagesNumber: number, itemsNumber: number): void;
54
102
  clearFilters(): void;
103
+ /**
104
+ * Clear page history state
105
+ */
106
+ private clearHistoryState;
55
107
  getFiltersValue(): {};
56
108
  static ɵfac: i0.ɵɵFactoryDeclaration<PagingComponent<any>, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<PagingComponent<any>, "BBSF-Paging", never, { "options": { "alias": "options"; "required": false; }; "group": { "alias": "group"; "required": false; }; }, { "Items": "Items"; }, never, never, false, never>;
109
+ static ɵcmp: i0.ɵɵComponentDeclaration<PagingComponent<any>, "BBSF-Paging", never, { "options": { "alias": "options"; "required": false; }; "group": { "alias": "group"; "required": false; }; }, { "Items": "Items"; "pageStateRestored": "pageStateRestored"; }, never, never, false, never>;
58
110
  }
@@ -58,6 +58,7 @@ export declare class TextAreaComponent implements OnInit {
58
58
  loadSelectedSpeechLanguage(): void;
59
59
  startSpeechRecognition(): void;
60
60
  stopSpeechRecognition(): void;
61
+ fireOnChange(text: any): void;
61
62
  ngOnDestroy(): void;
62
63
  onSpeechLanguageChange(event: any): void;
63
64
  enableOrDisableLanguageSelect(isEnabled?: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bnsights/bbsf-controls",
3
- "version": "1.0.166",
3
+ "version": "1.0.168",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^17.0.5",
6
6
  "@angular/cdk": "^17.0.2",