cps-ui-kit 0.162.0 → 0.163.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.
@@ -1,10 +1,10 @@
1
- import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
1
+ import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
2
2
  import { CpsTabComponent } from './cps-tab/cps-tab.component';
3
3
  import { Subscription } from 'rxjs';
4
4
  import * as i0 from "@angular/core";
5
5
  export interface TabChangeEvent {
6
- currentTabIndex: number;
7
- newTabIndex?: number;
6
+ previousIndex: number;
7
+ newIndex: number;
8
8
  }
9
9
  export type CpsTabsAnimationType = 'slide' | 'fade';
10
10
  export type CpsTabsAlignmentType = 'left' | 'center' | 'right';
@@ -12,13 +12,14 @@ export type CpsTabsAlignmentType = 'left' | 'center' | 'right';
12
12
  * CpsTabGroupComponent is a navigation component that displays items as tab headers.
13
13
  * @group Components
14
14
  */
15
- export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {
15
+ export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterViewInit, OnChanges, OnDestroy {
16
16
  private cdRef;
17
17
  /**
18
18
  * Index of the selected tab.
19
19
  * @group Props
20
20
  */
21
- selectedIndex: number;
21
+ set selectedIndex(value: number);
22
+ get selectedIndex(): number;
22
23
  /**
23
24
  * Determines whether to apply an alternative 'subtabs' styling.
24
25
  * @group Props
@@ -40,19 +41,24 @@ export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, A
40
41
  */
41
42
  animationType: CpsTabsAnimationType;
42
43
  /**
43
- * Background styling of tabs.
44
+ * Background color of navigation buttons.
45
+ * @group Props
46
+ */
47
+ navButtonsBackground: string;
48
+ /**
49
+ * Background color of tabs.
44
50
  * @group Props
45
51
  */
46
52
  tabsBackground: string;
47
53
  /**
48
54
  * Callback to invoke before tab change.
49
- * @param {TabChangeEvent} any - tab changed.
55
+ * @param {TabChangeEvent} any - tab change event.
50
56
  * @group Emits
51
57
  */
52
58
  beforeTabChanged: EventEmitter<TabChangeEvent>;
53
59
  /**
54
60
  * Callback to invoke after tab change.
55
- * @param {TabChangeEvent} any - tab changed.
61
+ * @param {TabChangeEvent} any - tab change event.
56
62
  * @group Emits
57
63
  */
58
64
  afterTabChanged: EventEmitter<TabChangeEvent>;
@@ -65,13 +71,17 @@ export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, A
65
71
  animationState: 'slideLeft' | 'slideRight' | 'fadeIn' | 'fadeOut';
66
72
  windowResize$: Subscription;
67
73
  listScroll$: Subscription;
74
+ private _currentTabIndex;
75
+ private _previousTabIndex;
68
76
  constructor(cdRef: ChangeDetectorRef);
69
77
  ngOnInit(): void;
78
+ ngOnChanges(changes: SimpleChanges): void;
70
79
  ngAfterContentInit(): void;
71
80
  ngAfterViewInit(): void;
72
81
  ngOnDestroy(): void;
73
82
  get selectedTab(): CpsTabComponent | undefined;
74
- selectTab(newSelectedIndex: number): void;
83
+ onTabClick(index: number): void;
84
+ selectTab(): void;
75
85
  onScroll(event: any): void;
76
86
  onResize(): void;
77
87
  navBackward(): void;
@@ -80,5 +90,5 @@ export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, A
80
90
  private _getVisibleButtonWidths;
81
91
  private _getWidth;
82
92
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsTabGroupComponent, never>;
83
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsTabGroupComponent, "cps-tab-group", never, { "selectedIndex": "selectedIndex"; "isSubTabs": "isSubTabs"; "alignment": "alignment"; "stretched": "stretched"; "animationType": "animationType"; "tabsBackground": "tabsBackground"; }, { "beforeTabChanged": "beforeTabChanged"; "afterTabChanged": "afterTabChanged"; }, ["tabs"], never, true, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsTabGroupComponent, "cps-tab-group", never, { "selectedIndex": "selectedIndex"; "isSubTabs": "isSubTabs"; "alignment": "alignment"; "stretched": "stretched"; "animationType": "animationType"; "navButtonsBackground": "navButtonsBackground"; "tabsBackground": "tabsBackground"; }, { "beforeTabChanged": "beforeTabChanged"; "afterTabChanged": "afterTabChanged"; }, ["tabs"], never, true, never>;
84
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "0.162.0",
3
+ "version": "0.163.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "15 - 16",
6
6
  "@angular/core": "15 - 16",