@telia-ace/knowledge-widget-ui 1.0.38 → 1.0.39

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
- Copyright © 2021, Telia Company AB. All rights reserved.
2
-
3
- THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
- THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
- AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
1
+ Copyright © 2021, Telia Company AB. All rights reserved.
2
+
3
+ THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
+ THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
+ AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
6
6
  http://www.humany.com/legal
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # `@telia-ace/knowledge-widget-ui`
2
-
3
- Generic UI components for ACE knowledge widgets.
1
+ # `@telia-ace/knowledge-widget-ui`
2
+
3
+ Generic UI components for ACE knowledge widgets.
@@ -1,12 +1,12 @@
1
- import React from 'react';
2
- import { LinkProps } from '../missing-type-exports';
3
- export type Props = Merge<LinkProps, {
4
- parent: {
5
- id: string;
6
- title: string;
7
- };
8
- type: 'guide' | 'link' | 'default';
9
- connection?: string;
10
- }>;
11
- declare const DialogLink: React.FC<Props>;
12
- export default DialogLink;
1
+ import React from 'react';
2
+ import { LinkProps } from '../missing-type-exports';
3
+ export type Props = Merge<LinkProps, {
4
+ parent: {
5
+ id: string;
6
+ title: string;
7
+ };
8
+ type: 'guide' | 'link' | 'default';
9
+ connection?: string;
10
+ }>;
11
+ declare const DialogLink: React.FC<Props>;
12
+ export default DialogLink;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLUListElement>>;
3
- export default _default;
1
+ import React from 'react';
2
+ declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLUListElement>>;
3
+ export default _default;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { DrawerProps, ItemListProps } from '../missing-type-exports';
3
- type Props = Merge<ItemListProps, DrawerProps>;
4
- declare const DrawerList: React.FC<Props>;
5
- export default DrawerList;
1
+ import React from 'react';
2
+ import { DrawerProps, ItemListProps } from '../missing-type-exports';
3
+ type Props = Merge<ItemListProps, DrawerProps>;
4
+ declare const DrawerList: React.FC<Props>;
5
+ export default DrawerList;
@@ -1,12 +1,12 @@
1
- import { ItemRenderer } from '@telia-ace/widget-ui';
2
- import React from 'react';
3
- type Props = {
4
- trigger: React.ReactElement;
5
- header?: React.ReactElement;
6
- items?: any[];
7
- renderItem?: ItemRenderer;
8
- className?: string;
9
- children?: React.ReactNode;
10
- };
11
- declare const DropdownActions: React.FC<Props>;
12
- export default DropdownActions;
1
+ import { ItemRenderer } from '@telia-ace/widget-ui';
2
+ import React from 'react';
3
+ type Props = {
4
+ trigger: React.ReactElement;
5
+ header?: React.ReactElement;
6
+ items?: any[];
7
+ renderItem?: ItemRenderer;
8
+ className?: string;
9
+ children?: React.ReactNode;
10
+ };
11
+ declare const DropdownActions: React.FC<Props>;
12
+ export default DropdownActions;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { DropdownProps, ItemListProps } from '../missing-type-exports';
3
- export type Props = Merge<DropdownProps, ItemListProps>;
4
- declare const DropdownList: React.FC<Props>;
5
- export default DropdownList;
1
+ import React from 'react';
2
+ import { DropdownProps, ItemListProps } from '../missing-type-exports';
3
+ export type Props = Merge<DropdownProps, ItemListProps>;
4
+ declare const DropdownList: React.FC<Props>;
5
+ export default DropdownList;
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- import { FavoriteActions } from '../hooks';
3
- type Props = {
4
- isFavorite: boolean;
5
- actions: FavoriteActions;
6
- id: string;
7
- addFavoriteTooltip?: string;
8
- removeFavoriteCancelLabel?: string;
9
- removeFavoriteConfirmLabel?: string;
10
- removeFavoriteHeader?: string;
11
- removeFavoriteLabel?: string;
12
- removeFavoriteTooltip?: string;
13
- buttonLabel?: string;
14
- guideTitle?: string;
15
- };
16
- declare const FavoriteButton: React.FC<Props>;
17
- export default FavoriteButton;
1
+ import React from 'react';
2
+ import { FavoriteActions } from '../hooks';
3
+ type Props = {
4
+ isFavorite: boolean;
5
+ actions: FavoriteActions;
6
+ id: string;
7
+ addFavoriteTooltip?: string;
8
+ removeFavoriteCancelLabel?: string;
9
+ removeFavoriteConfirmLabel?: string;
10
+ removeFavoriteHeader?: string;
11
+ removeFavoriteLabel?: string;
12
+ removeFavoriteTooltip?: string;
13
+ buttonLabel?: string;
14
+ guideTitle?: string;
15
+ };
16
+ declare const FavoriteButton: React.FC<Props>;
17
+ export default FavoriteButton;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- export type Props = {
3
- onFeedback?: (feedback: 'positive' | 'negative') => void;
4
- positive?: string;
5
- negative?: string;
6
- header?: string;
7
- selected?: 'positive' | 'negative';
8
- direction?: 'horizontal' | 'vertical';
9
- } & any;
10
- declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLDivElement>>;
11
- export default _default;
1
+ import React from 'react';
2
+ export type Props = {
3
+ onFeedback?: (feedback: 'positive' | 'negative') => void;
4
+ positive?: string;
5
+ negative?: string;
6
+ header?: string;
7
+ selected?: 'positive' | 'negative';
8
+ direction?: 'horizontal' | 'vertical';
9
+ } & any;
10
+ declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLDivElement>>;
11
+ export default _default;
@@ -1,45 +1,45 @@
1
- import { Guide } from '@telia-ace/knowledge-widget-core';
2
- import { DispatchAction, ItemRenderer } from '@telia-ace/widget-ui';
3
- import { Params } from '@telia-ace/widget-utilities';
4
- import React from 'react';
5
- import { Props as MetadataProps } from './metadata';
6
- type Routing = {
7
- guide?: string;
8
- page?: string;
9
- };
10
- type ParamMappers = {
11
- guide?: (guide: Guide) => Params;
12
- page?: () => Params;
13
- };
14
- export type Props = {
15
- paramMappers?: ParamMappers;
16
- routing?: Routing;
17
- pageLabel?: string;
18
- symbolSize?: number;
19
- renderItem?: ItemRenderer;
20
- pageRole?: 'link' | 'button';
21
- pageCaret?: 'right' | 'down';
22
- showTags?: boolean;
23
- showFavoriteToggle?: boolean;
24
- addFavoriteTooltip?: string;
25
- removeFavoriteCancelLabel?: string;
26
- removeFavoriteConfirmLabel?: string;
27
- removeFavoriteHeader?: string;
28
- removeFavoriteLabel?: string;
29
- removeFavoriteTooltip?: string;
30
- metadata?: Partial<MetadataProps>;
31
- dispatch?: DispatchAction;
32
- localPaging?: boolean;
33
- expandable?: boolean;
34
- onItemClick?: (e: React.MouseEvent, guide: Guide) => void;
35
- } & any;
36
- export declare const AccordionListItem: React.ForwardRefExoticComponent<{
37
- title: string;
38
- id: string;
39
- route: string;
40
- symbolSize?: number | undefined;
41
- collapseUri?: string | undefined;
42
- children?: React.ReactNode;
43
- } & React.RefAttributes<HTMLLIElement>>;
44
- declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLDivElement>>;
45
- export default _default;
1
+ import { Guide } from '@telia-ace/knowledge-widget-core';
2
+ import { DispatchAction, ItemRenderer } from '@telia-ace/widget-ui';
3
+ import { Params } from '@telia-ace/widget-utilities';
4
+ import React from 'react';
5
+ import { Props as MetadataProps } from './metadata';
6
+ type Routing = {
7
+ guide?: string;
8
+ page?: string;
9
+ };
10
+ type ParamMappers = {
11
+ guide?: (guide: Guide) => Params;
12
+ page?: () => Params;
13
+ };
14
+ export type Props = {
15
+ paramMappers?: ParamMappers;
16
+ routing?: Routing;
17
+ pageLabel?: string;
18
+ symbolSize?: number;
19
+ renderItem?: ItemRenderer;
20
+ pageRole?: 'link' | 'button';
21
+ pageCaret?: 'right' | 'down';
22
+ showTags?: boolean;
23
+ showFavoriteToggle?: boolean;
24
+ addFavoriteTooltip?: string;
25
+ removeFavoriteCancelLabel?: string;
26
+ removeFavoriteConfirmLabel?: string;
27
+ removeFavoriteHeader?: string;
28
+ removeFavoriteLabel?: string;
29
+ removeFavoriteTooltip?: string;
30
+ metadata?: Partial<MetadataProps>;
31
+ dispatch?: DispatchAction;
32
+ localPaging?: boolean;
33
+ expandable?: boolean;
34
+ onItemClick?: (e: React.MouseEvent, guide: Guide) => void;
35
+ } & any;
36
+ export declare const AccordionListItem: React.ForwardRefExoticComponent<{
37
+ title: string;
38
+ id: string;
39
+ route: string;
40
+ symbolSize?: number | undefined;
41
+ collapseUri?: string | undefined;
42
+ children?: React.ReactNode;
43
+ } & React.RefAttributes<HTMLLIElement>>;
44
+ declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLDivElement>>;
45
+ export default _default;
@@ -1,11 +1,11 @@
1
- export { default as DialogLink } from './dialog-link';
2
- export { default as DialogList } from './dialog-list';
3
- export { default as DrawerList } from './drawer-list';
4
- export { default as DropdownActions } from './dropdown-actions';
5
- export { default as DropdownList } from './dropdown-list';
6
- export { default as FavoriteButton } from './favorite-button';
7
- export { default as Feedback } from './feedback';
8
- export { AccordionListItem, default as GuideList } from './guide-list';
9
- export { default as Loader, Wrapper as LoaderWrapper } from './loader';
10
- export { default as Metadata } from './metadata';
11
- export { default as NotificationList } from './notification-list';
1
+ export { default as DialogLink } from './dialog-link';
2
+ export { default as DialogList } from './dialog-list';
3
+ export { default as DrawerList } from './drawer-list';
4
+ export { default as DropdownActions } from './dropdown-actions';
5
+ export { default as DropdownList } from './dropdown-list';
6
+ export { default as FavoriteButton } from './favorite-button';
7
+ export { default as Feedback } from './feedback';
8
+ export { AccordionListItem, default as GuideList } from './guide-list';
9
+ export { default as Loader, Wrapper as LoaderWrapper } from './loader';
10
+ export { default as Metadata } from './metadata';
11
+ export { default as NotificationList } from './notification-list';
@@ -1,12 +1,12 @@
1
- import React from 'react';
2
- type Props = {
3
- loading: boolean | undefined;
4
- };
5
- export declare const Wrapper: import("@emotion/styled").StyledComponent<{
6
- theme?: import("@emotion/react").Theme | undefined;
7
- as?: React.ElementType<any> | undefined;
8
- } & {
9
- 'data-loading': boolean;
10
- }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
- declare const Loader: React.FC<Props>;
12
- export default Loader;
1
+ import React from 'react';
2
+ type Props = {
3
+ loading: boolean | undefined;
4
+ };
5
+ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
6
+ theme?: import("@emotion/react").Theme | undefined;
7
+ as?: React.ElementType<any> | undefined;
8
+ } & {
9
+ 'data-loading': boolean;
10
+ }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
+ declare const Loader: React.FC<Props>;
12
+ export default Loader;
@@ -1,17 +1,17 @@
1
- import { DateFormats } from '@telia-ace/widget-ui';
2
- import React from 'react';
3
- export type Props = {
4
- className?: string;
5
- modified?: string;
6
- published?: string;
7
- modifiedBy?: string | null;
8
- publishedBy?: string | null;
9
- showModified?: boolean;
10
- showPublished?: boolean;
11
- modifiedLabel?: string;
12
- publishedLabel?: string;
13
- byLabel?: string;
14
- format?: DateFormats;
15
- };
16
- declare const Metadata: React.FC<Props>;
17
- export default Metadata;
1
+ import { DateFormats } from '@telia-ace/widget-ui';
2
+ import React from 'react';
3
+ export type Props = {
4
+ className?: string;
5
+ modified?: string;
6
+ published?: string;
7
+ modifiedBy?: string | null;
8
+ publishedBy?: string | null;
9
+ showModified?: boolean;
10
+ showPublished?: boolean;
11
+ modifiedLabel?: string;
12
+ publishedLabel?: string;
13
+ byLabel?: string;
14
+ format?: DateFormats;
15
+ };
16
+ declare const Metadata: React.FC<Props>;
17
+ export default Metadata;
@@ -1,19 +1,19 @@
1
- import { Notification } from '@telia-ace/knowledge-widget-core';
2
- import { Symbol } from '@telia-ace/widget-ui';
3
- import React from 'react';
4
- type Props = {
5
- className?: string;
6
- showHeader?: boolean;
7
- loading: boolean;
8
- notificationList?: {
9
- id: string;
10
- title?: string;
11
- symbol?: Symbol;
12
- notifications: Notification[];
13
- defaultHeaderOptions?: {
14
- visible: boolean;
15
- };
16
- };
17
- };
18
- declare const NotificationList: React.FC<Props>;
19
- export default NotificationList;
1
+ import { Notification } from '@telia-ace/knowledge-widget-core';
2
+ import { Symbol } from '@telia-ace/widget-ui';
3
+ import React from 'react';
4
+ type Props = {
5
+ className?: string;
6
+ showHeader?: boolean;
7
+ loading: boolean;
8
+ notificationList?: {
9
+ id: string;
10
+ title?: string;
11
+ symbol?: Symbol;
12
+ notifications: Notification[];
13
+ defaultHeaderOptions?: {
14
+ visible: boolean;
15
+ };
16
+ };
17
+ };
18
+ declare const NotificationList: React.FC<Props>;
19
+ export default NotificationList;
@@ -1,5 +1,5 @@
1
- export { default as useArrowKeys } from './use-arrow-keys';
2
- export { default as useDebounce } from './use-debounce';
3
- export { default as useFavorites } from './use-favorites';
4
- export type { FavoriteActions } from './use-favorites';
5
- export { default as useHover } from './use-hover';
1
+ export { default as useArrowKeys } from './use-arrow-keys';
2
+ export { default as useDebounce } from './use-debounce';
3
+ export { default as useFavorites } from './use-favorites';
4
+ export type { FavoriteActions } from './use-favorites';
5
+ export { default as useHover } from './use-hover';
@@ -1,3 +1,3 @@
1
- type ArrowKey = 'up' | 'down' | 'left' | 'right';
2
- declare const useArrowKeys: () => ArrowKey | null;
3
- export default useArrowKeys;
1
+ type ArrowKey = 'up' | 'down' | 'left' | 'right';
2
+ declare const useArrowKeys: () => ArrowKey | null;
3
+ export default useArrowKeys;
@@ -1,2 +1,2 @@
1
- declare const useDebounce: (value: string, delay: number) => string;
2
- export default useDebounce;
1
+ declare const useDebounce: (value: string, delay: number) => string;
2
+ export default useDebounce;
@@ -1,8 +1,8 @@
1
- export type FavoriteActions = {
2
- addFavorite: (guideId: string) => Promise<string[]>;
3
- clearFavorites: () => Promise<string[]>;
4
- removeFavorite: (guideId: string) => Promise<string[]>;
5
- toggleFavorite: (guideId: string) => Promise<string[]>;
6
- };
7
- declare const useFavorites: () => [string[], FavoriteActions];
8
- export default useFavorites;
1
+ export type FavoriteActions = {
2
+ addFavorite: (guideId: string) => Promise<string[]>;
3
+ clearFavorites: () => Promise<string[]>;
4
+ removeFavorite: (guideId: string) => Promise<string[]>;
5
+ toggleFavorite: (guideId: string) => Promise<string[]>;
6
+ };
7
+ declare const useFavorites: () => [string[], FavoriteActions];
8
+ export default useFavorites;
@@ -1,2 +1,2 @@
1
- declare const _default: () => [boolean, React.MutableRefObject<HTMLElement | undefined>];
2
- export default _default;
1
+ declare const _default: () => [boolean, React.MutableRefObject<HTMLElement | undefined>];
2
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { AccordionListItem, DialogLink, DialogList, DrawerList, DropdownActions, DropdownList, FavoriteButton, Feedback, GuideList, Loader, LoaderWrapper, Metadata, NotificationList } from './components';
2
- import { FavoriteActions, useArrowKeys, useDebounce, useFavorites, useHover } from './hooks';
3
- import { loadingOpacity, SmallCaret, StyledHeaderText, StyledListButton } from './styles';
4
- import { guideRenderInstructions } from './utils';
5
- export * from '@telia-ace/widget-ui';
6
- export { useFavorites, useDebounce, useArrowKeys, useHover, guideRenderInstructions, Metadata, NotificationList, AccordionListItem, GuideList, DialogLink, DialogList, FavoriteButton, Feedback, Loader, LoaderWrapper, DrawerList, DropdownActions, DropdownList, SmallCaret, StyledHeaderText, StyledListButton, loadingOpacity, };
7
- export type { FavoriteActions };
1
+ import { AccordionListItem, DialogLink, DialogList, DrawerList, DropdownActions, DropdownList, FavoriteButton, Feedback, GuideList, Loader, LoaderWrapper, Metadata, NotificationList } from './components';
2
+ import { FavoriteActions, useArrowKeys, useDebounce, useFavorites, useHover } from './hooks';
3
+ import { loadingOpacity, SmallCaret, StyledHeaderText, StyledListButton } from './styles';
4
+ import { guideRenderInstructions } from './utils';
5
+ export * from '@telia-ace/widget-ui';
6
+ export { useFavorites, useDebounce, useArrowKeys, useHover, guideRenderInstructions, Metadata, NotificationList, AccordionListItem, GuideList, DialogLink, DialogList, FavoriteButton, Feedback, Loader, LoaderWrapper, DrawerList, DropdownActions, DropdownList, SmallCaret, StyledHeaderText, StyledListButton, loadingOpacity, };
7
+ export type { FavoriteActions };