@apolitical/component-library 7.0.3-ac.0 → 7.0.3-ac.10

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 +1,2 @@
1
- export { default as RichTextEditorContext } from './context';
1
+ export { default as RichTextEditorContext } from './rich-text-editor-context';
2
+ export { default as ToolbarContext } from './toolbar-context';
@@ -6,12 +6,6 @@ import { ReportError, IMentionPopOver } from './../../rich-text-editor.types';
6
6
  declare const RichTextEditorContext: import("react").Context<{
7
7
  /** The id of the editor */
8
8
  id: string;
9
- /** The toolbar option that is currently tabbable */
10
- tabbableOption: string;
11
- /** The function to set focus on the toolbar options */
12
- setFocus: (option: string | null) => void;
13
- /** The tooltip that is currently open */
14
- openTooltip: string | null;
15
9
  /** Whether the link editor is open */
16
10
  showLinkEditor: boolean;
17
11
  /** The data for the mention popover, including if it's showing, the selected user for the popover, and the possible users */
@@ -0,0 +1,12 @@
1
+ import { Dispatch } from 'react';
2
+ declare const ToolbarContext: import("react").Context<{
3
+ /** The toolbar option that is currently tabbable */
4
+ tabbableOption: string;
5
+ /** The function to set focus on the toolbar options */
6
+ setFocus: (option: string | null) => void;
7
+ /** The tooltip that is currently open */
8
+ openTooltip: string | null;
9
+ /** The function to update the state */
10
+ dispatch: Dispatch<any>;
11
+ }>;
12
+ export default ToolbarContext;
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import React from 'react';
2
2
  import { BaseProps } from './../../rich-text-editor.types';
3
- declare const Toolbar: ({ styling, ...props }: PropsWithChildren<BaseProps>) => import("react/jsx-runtime").JSX.Element;
4
- export default Toolbar;
3
+ declare const _default: React.MemoExoticComponent<({ styling, ...props }: React.PropsWithChildren<BaseProps>) => import("react/jsx-runtime").JSX.Element>;
4
+ export default _default;
@@ -7,8 +7,8 @@ export default function transform<T extends InputNodeTypes>(node: MdastNode, opt
7
7
  }[];
8
8
  } | {
9
9
  value?: string | undefined;
10
- alt?: string | undefined;
11
10
  url?: string | undefined;
11
+ alt?: string | undefined;
12
12
  position?: any;
13
13
  ordered?: boolean | undefined;
14
14
  checked?: any;
@@ -54,8 +54,6 @@ export interface IRTEInitialState {
54
54
  editorKey: string | null;
55
55
  originalValue: string | null;
56
56
  initialValue: Descendant[] | null;
57
- tabbableOption: string;
58
- openTooltip: string | null;
59
57
  showLinkEditor: boolean;
60
58
  mentionPopover: IMentionPopOver;
61
59
  lastAnchor: Point | null;
@@ -65,6 +63,14 @@ export interface IRTEInitialState {
65
63
  hasLoaded: boolean;
66
64
  enrichedUrl: IEnrichedUrlData | false | undefined;
67
65
  }
66
+ export interface IToolbarInitialState {
67
+ tabbableOption: string;
68
+ openTooltip: string | null;
69
+ }
70
+ export interface IToolbarReducer {
71
+ type: keyof IToolbarInitialState;
72
+ value: any;
73
+ }
68
74
  export interface IRTEReducer {
69
75
  type: keyof IRTEInitialState;
70
76
  value: any;
@@ -18,6 +18,7 @@ export interface ButtonPropsType {
18
18
  styling?: {
19
19
  muted?: boolean;
20
20
  fullWidth?: boolean;
21
+ showTooltipIfNotDisabled?: boolean;
21
22
  };
22
23
  /** The icon to show on the button */
23
24
  icon?: ButtonIconType;
@@ -38,5 +38,5 @@ interface Props {
38
38
  /** The id of the tooltip */
39
39
  id?: string;
40
40
  }
41
- declare const Tooltip: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement | null>>;
42
- export default Tooltip;
41
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement | null>>>;
42
+ export default _default;
package/helpers/intl.d.ts CHANGED
@@ -426,12 +426,14 @@ export declare const checkIntlPathExists: (path: string, language?: {
426
426
  footer_legal_dataProtection: string;
427
427
  footer_legal_euDataProtection: string;
428
428
  footer_contact: string;
429
- footer_contact_correspondence: string;
430
- footer_contact_correspondence_address: string;
429
+ footer_contact_london: string;
430
+ footer_contact_london_address: string;
431
431
  footer_contact_registered: string;
432
432
  footer_contact_registered_address: string;
433
433
  footer_contact_berlin: string;
434
434
  footer_contact_berlin_address: string;
435
+ footer_contact_washington: string;
436
+ footer_contact_washington_address: string;
435
437
  footer_contact_support: string;
436
438
  footer_contact_business: string;
437
439
  footer_social_linkedin: string;
@@ -553,6 +555,11 @@ export declare const checkIntlPathExists: (path: string, language?: {
553
555
  member_connection_pending: string;
554
556
  member_connection_requested: string;
555
557
  member_connection_remove: string;
558
+ member_show_email_hide: string;
559
+ member_show_email_show: string;
560
+ member_show_email_tooltip: string;
561
+ member_show_email_tooltip_copied: string;
562
+ member_show_email_tooltip_mine: string;
556
563
  }) => boolean;
557
564
  export declare const getIntlPath: (callback: (args1: {
558
565
  id: string;