@plurid/plurid-ui-components-react 0.0.0-14 → 0.0.0-15

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
1
  import React from 'react';
2
2
  import { Theme } from '@plurid/plurid-themes';
3
- import { notifications } from '@plurid/plurid-ui-state-react';
3
+ import { DispatchAction, Notification, notifications } from '@plurid/plurid-ui-state-react';
4
4
  export interface NotificationOwnProperties {
5
- data: notifications.Types.Notification;
5
+ data: Notification;
6
6
  theme: Theme;
7
- remove: (payload: notifications.Types.RemoveNotificationPayload) => void;
7
+ remove: DispatchAction<typeof notifications.actions.removeNotification>;
8
8
  elements?: Record<string, JSX.Element>;
9
9
  style?: React.CSSProperties;
10
10
  className?: string;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { StateOfAny, themes as themesStateService, notifications as notificationsStateService } from '@plurid/plurid-ui-state-react';
3
2
  import { Theme } from '@plurid/plurid-themes';
3
+ import { DispatchAction, StateOfAny, themes as themesStateService, notifications as notificationsStateService, Notification as INotification } from '@plurid/plurid-ui-state-react';
4
4
  export declare type NotificationsState = StateOfAny & {
5
- themes: themesStateService.Types.State;
6
- notifications: notificationsStateService.Types.State;
5
+ themes: themesStateService.ThemesState;
6
+ notifications: notificationsStateService.NotificationsState;
7
7
  };
8
8
  export declare type NotificationsSelectors = StateOfAny & {
9
9
  themes: typeof themesStateService.selectors;
@@ -16,10 +16,10 @@ export interface NotificationsOwnProperties {
16
16
  }
17
17
  export interface NotificationsStateProperties {
18
18
  stateGeneralTheme: Theme;
19
- stateNotifications: notificationsStateService.Types.Notification[];
19
+ stateNotifications: INotification[];
20
20
  }
21
21
  export interface NotificationsDispatchProperties {
22
- dispatchRemoveNotification: typeof notificationsStateService.actions.removeNotification;
22
+ dispatchRemoveNotification: DispatchAction<typeof notificationsStateService.actions.removeNotification>;
23
23
  }
24
24
  export declare type NotificationsProperties = NotificationsOwnProperties & NotificationsStateProperties & NotificationsDispatchProperties;
25
25
  declare const ConnectedNotifications: import("react-redux").ConnectedComponent<React.FC<NotificationsProperties>, Omit<NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & NotificationsOwnProperties & import("react-redux").ConnectProps>;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { Theme } from '@plurid/plurid-themes';
3
3
  export interface SittingsOwnProperties {
4
4
  selectors: any;
5
+ context: React.Context<any>;
5
6
  }
6
7
  export interface SittingsStateProperties {
7
8
  stateInteractionTheme: Theme;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { Theme } from '@plurid/plurid-themes';
3
3
  export interface StateImageOwnProperties {
4
4
  selectors: any;
5
+ context: React.Context<any>;
5
6
  }
6
7
  export interface StateImageStateProperties {
7
8
  stateInteractionTheme: Theme;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface StateLineProperties {
3
3
  theme: any;
4
+ context: React.Context<any>;
4
5
  }
5
6
  declare const ConnectedStateLine: import("react-redux").ConnectedComponent<React.FC<StateLineProperties>, any>;
6
7
  export default ConnectedStateLine;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  export interface StateLinkProperties {
3
3
  theme: any;
4
4
  currentLink: string;
5
+ context: React.Context<any>;
5
6
  }
6
7
  declare const ConnectedStateLink: import("react-redux").ConnectedComponent<React.FC<StateLinkProperties>, any>;
7
8
  export default ConnectedStateLink;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Theme } from '@plurid/plurid-themes';
3
3
  export interface SittingTrayOwnProperties {
4
4
  selectors: any;
5
- context: any;
5
+ context: React.Context<any>;
6
6
  }
7
7
  export interface SittingTrayStateProperties {
8
8
  stateInteractionTheme: Theme;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { sitting } from '@plurid/plurid-ui-state-react';
3
2
  import { Theme } from '@plurid/plurid-themes';
3
+ import { DispatchAction, sitting } from '@plurid/plurid-ui-state-react';
4
4
  import { ToolbarButton } from "../../../../data/interfaces";
5
5
  export interface ToolbarGeneralOwnProperties {
6
6
  buttons: ToolbarButton[];
7
7
  selectors: any;
8
- context: any;
8
+ context: React.Context<any>;
9
9
  handleClick: (type: any) => void;
10
10
  speakButton?: boolean;
11
11
  sittingButton?: boolean;
@@ -17,7 +17,7 @@ export interface ToolbarGeneralStateProperties {
17
17
  stateInteractionTheme: Theme;
18
18
  }
19
19
  export interface ToolbarGeneralDispatchProperties {
20
- dispatchToggleSittingTray: typeof sitting.actions.toggleSittingTray;
20
+ dispatchToggleSittingTray: DispatchAction<typeof sitting.actions.toggleSittingTray>;
21
21
  }
22
22
  export declare type ToolbarGeneralProperties = ToolbarGeneralOwnProperties & ToolbarGeneralStateProperties & ToolbarGeneralDispatchProperties;
23
23
  declare const ConnectedToolbarGeneral: import("react-redux").ConnectedComponent<React.FC<ToolbarGeneralProperties>, any>;
@@ -2622,9 +2622,7 @@ const Notification = properties => {
2622
2622
  useEffect((() => {
2623
2623
  if (timeout) {
2624
2624
  notificationTimeout.current = setTimeout((() => {
2625
- remove({
2626
- id: id
2627
- });
2625
+ remove(id);
2628
2626
  }), timeout);
2629
2627
  }
2630
2628
  return () => {
@@ -2653,9 +2651,7 @@ const Notification = properties => {
2653
2651
  style: Object.assign({}, style),
2654
2652
  className: className
2655
2653
  }, content, React.createElement(StyledNotificationClose, null, React.createElement(PluridIconDelete, {
2656
- atClick: () => remove({
2657
- id: id
2658
- })
2654
+ atClick: () => remove(id)
2659
2655
  })));
2660
2656
  };
2661
2657