@livetiles/reach-components-react 0.4.0-preview.361 → 0.4.0-preview.366

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.
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { EventItem } from '@livetiles/reach/util/common';
3
+ export interface EventGridCardProps {
4
+ item: EventItem;
5
+ baseRoute?: string;
6
+ openTargetInNewWindow?: boolean;
7
+ onCardClick?: (event: React.MouseEvent<unknown>) => unknown;
8
+ onChannelClick?: (channel: string) => unknown;
9
+ className?: string;
10
+ }
11
+ export declare const EventGridCard: FC<EventGridCardProps>;
12
+ export declare const Host: import("styled-components").StyledComponent<"div", any, {
13
+ showHighlight?: boolean;
14
+ }, never>;
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { EventItem } from '@livetiles/reach/util/common';
3
+ import { EventFilterDefinition } from '@livetiles/reach/feature/content';
4
+ export interface EventGridProps {
5
+ filter?: EventFilterDefinition;
6
+ searchText?: string;
7
+ hidePagination?: boolean;
8
+ columnCount?: number;
9
+ rowCount?: number;
10
+ onItemClick?: (item: EventItem, itemUrl?: string) => unknown;
11
+ onChannelClick?: (channel: string) => unknown;
12
+ className?: string;
13
+ }
14
+ export declare const EventsGrid: FC<EventGridProps>;
package/common/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { NewsItem } from '@livetiles/reach/util/common';
2
- import { NewsFilterDefinition } from '@livetiles/reach/feature/content';
1
+ import { PublishableItem } from '@livetiles/reach/util/common';
2
+ import { EventFilterDefinition, NewsFilterDefinition } from '@livetiles/reach/feature/content';
3
3
  import { LibNewsFilterDefinition } from './filter/LibNewsFilterDefinition';
4
- export declare function useNewsItemClickHandler(): (e: React.MouseEvent<unknown>, item: NewsItem, shouldHandleExternalContent: boolean, onItemClick?: (item: NewsItem, itemUrl?: string) => unknown, newTab?: boolean) => void;
4
+ export declare function useItemClickHandler<TItem extends PublishableItem>(): (e: React.MouseEvent<unknown>, item: TItem, shouldHandleExternalContent: boolean, onItemClick?: (item: TItem, itemUrl?: string) => unknown, newTab?: boolean) => void;
5
5
  export declare function useNewsLoaderWithFiltersAndPagination(pageSize: number, filter?: LibNewsFilterDefinition, searchText?: string): {
6
6
  items: any[];
7
7
  isInitialLoading: boolean;
@@ -14,6 +14,18 @@ export declare function useNewsLoaderWithFiltersAndPagination(pageSize: number,
14
14
  isLastPage: boolean;
15
15
  isEmpty: boolean;
16
16
  };
17
+ export declare function useEventsLoaderWithFiltersAndPagination(pageSize: number, filter?: EventFilterDefinition, searchText?: string): {
18
+ items: any[];
19
+ isInitialLoading: boolean;
20
+ isLoadingNextPage: boolean;
21
+ error: any;
22
+ getFirstPage: () => void;
23
+ getPrevPage: () => void;
24
+ getNextPage: () => Promise<void>;
25
+ isFirstPage: boolean;
26
+ isLastPage: boolean;
27
+ isEmpty: boolean;
28
+ };
17
29
  export declare function useEditorNewsLoaderWithFiltersAndPagination(pageSize: number, filter?: NewsFilterDefinition): {
18
30
  items: any[];
19
31
  isInitialLoading: boolean;