@oc-digital/react-component-library 8.14.0-beta.5 → 8.14.0-beta.6

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.
@@ -6,11 +6,11 @@ export interface INavigationLink {
6
6
  Icon: React.FC<ISvgComponentProps>;
7
7
  hasSecondary?: boolean;
8
8
  }
9
- export type IExpandedOptions = {
9
+ type IExpandedOptions = {
10
10
  view: string;
11
11
  expanded: boolean;
12
12
  };
13
- export interface IMainNavigationItem {
13
+ interface IMainNavigationItem {
14
14
  id: string;
15
15
  name: ReactChild;
16
16
  route: string;
@@ -27,6 +27,7 @@ export interface ISecondaryNavigationItem<T = any> {
27
27
  startDate: string;
28
28
  original?: T;
29
29
  }
30
+ export type SortingFunction<T = any> = (a: ISecondaryNavigationItem<T>, b: ISecondaryNavigationItem<T>) => number;
30
31
  export interface ISecondaryNavigationElement<T = any> {
31
32
  items: ISecondaryNavigationItem<T>[];
32
33
  archivedItems?: ISecondaryNavigationItem<T>[];
@@ -36,7 +37,7 @@ export interface ISecondaryNavigationElement<T = any> {
36
37
  };
37
38
  defaultSortDirection?: "asc" | "desc";
38
39
  onSortReverse?: (direction: -1 | 1) => void;
39
- sortFunction?: (a: ISecondaryNavigationItem<T>, b: ISecondaryNavigationItem<T>) => number;
40
+ sortFunction?: SortingFunction<T>;
40
41
  }
41
42
  export interface ISecondaryNavigationElements<T = any> {
42
43
  [key: string]: ISecondaryNavigationElement<T>;
@@ -48,14 +49,14 @@ export interface IPrimaryConfig {
48
49
  moveLastItemToBottom?: boolean;
49
50
  activeBorderColor?: string;
50
51
  }
51
- export interface ISecondaryMainConfig {
52
+ interface ISecondaryMainConfig {
52
53
  mainBackground?: string;
53
54
  mainText?: string;
54
55
  mainHover?: string;
55
56
  mainIcon?: string;
56
57
  mainActiveText?: string;
57
58
  }
58
- export interface ISecondarySubConfig {
59
+ interface ISecondarySubConfig {
59
60
  subItemBackground?: string;
60
61
  subItemText?: string;
61
62
  subItemHover?: string;
@@ -63,7 +64,7 @@ export interface ISecondarySubConfig {
63
64
  subItemActiveHover?: string;
64
65
  subItemActiveText?: string;
65
66
  }
66
- interface IBaseSecondaryConfig {
67
+ interface ISecondaryConfig {
67
68
  mainItemColors?: ISecondaryMainConfig;
68
69
  subItemColors?: ISecondarySubConfig;
69
70
  closeButtonSvg?: ReactNode;
@@ -74,7 +75,7 @@ interface IBaseSecondaryConfig {
74
75
  export interface ISideNavConfig {
75
76
  rootRouteName: string;
76
77
  primary?: IPrimaryConfig;
77
- secondary?: IBaseSecondaryConfig;
78
+ secondary?: ISecondaryConfig;
78
79
  }
79
80
  export interface ILeftNavigationProps<T = any> {
80
81
  primaryNavItems: INavigationLink[];