@confidencesystemsinc/sdk 2.0.14 → 2.0.16

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,9 +1,9 @@
1
1
  import { CommentType } from '../../types/comments.types';
2
- export declare const CommentContextMenu: ({ commentType, onEdit, onSaveCommentType, onDelete, taskVerified, isUsernameAuthor, }: {
2
+ export declare const CommentContextMenu: ({ commentType, onEdit, onSaveCommentType, onDelete, taskVerified, disabled, }: {
3
3
  commentType: CommentType;
4
4
  onEdit: () => void;
5
5
  onSaveCommentType: (type: CommentType) => void;
6
6
  onDelete: () => void;
7
7
  taskVerified: boolean;
8
- isUsernameAuthor: boolean;
8
+ disabled: boolean;
9
9
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,32 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
1
2
  import { CommentType } from '../../../types/comments.types';
3
+ export declare const COMMENT_TYPE_PICKER_STYLE_MAP: {
4
+ Info: {
5
+ selectedLiBg: string;
6
+ accentButton: string;
7
+ selectedAccentButton: string;
8
+ icon: IconDefinition;
9
+ };
10
+ Success: {
11
+ selectedLiBg: string;
12
+ accentButton: string;
13
+ selectedAccentButton: string;
14
+ icon: IconDefinition;
15
+ };
16
+ Warning: {
17
+ selectedLiBg: string;
18
+ accentButton: string;
19
+ selectedAccentButton: string;
20
+ icon: IconDefinition;
21
+ };
22
+ Danger: {
23
+ selectedLiBg: string;
24
+ accentButton: string;
25
+ selectedAccentButton: string;
26
+ icon: IconDefinition;
27
+ };
28
+ };
29
+ export declare const COMMENT_TYPE_ORDER: readonly ["Info", "Success", "Warning", "Danger"];
2
30
  export declare function CommentToolbar({ commentType, onCommentTypeChange, isCommentTypeEditable, actions, setIsLinkEditMode, onAddAttachments, }: {
3
31
  commentType: CommentType;
4
32
  onCommentTypeChange?: (type: CommentType) => void;
@@ -8,21 +8,21 @@ export declare const COMMENT_TYPE_STYLE_MAP: {
8
8
  iconColor: string;
9
9
  fontColor: string;
10
10
  };
11
- Warning: {
11
+ Success: {
12
12
  icon: IconDefinition;
13
13
  bg: string;
14
14
  border: string;
15
15
  iconColor: string;
16
16
  fontColor: string;
17
17
  };
18
- Danger: {
18
+ Warning: {
19
19
  icon: IconDefinition;
20
20
  bg: string;
21
21
  border: string;
22
22
  iconColor: string;
23
23
  fontColor: string;
24
24
  };
25
- Success: {
25
+ Danger: {
26
26
  icon: IconDefinition;
27
27
  bg: string;
28
28
  border: string;
@@ -37,6 +37,8 @@ export declare const COMMENT_TYPE_BUTTONS: {
37
37
  title: string;
38
38
  }[];
39
39
  export interface ConfidenceCommentBoxProps {
40
+ /** When set, drawer size/position follow measured playbook anchor rect. */
41
+ anchorBounds?: DOMRect | null;
40
42
  comments: ConfidenceComment[];
41
43
  onClose: () => void;
42
44
  isOpen: boolean;
@@ -46,4 +48,4 @@ export interface ConfidenceCommentBoxProps {
46
48
  playbookInstanceId: string | number;
47
49
  taskVerification: boolean;
48
50
  }
49
- export declare const ConfidenceCommentBox: ({ comments, onClose, isOpen, taskName, taskInstanceId, isLoading, playbookInstanceId, taskVerification, }: ConfidenceCommentBoxProps) => import("react/jsx-runtime").JSX.Element;
51
+ export declare const ConfidenceCommentBox: ({ anchorBounds, comments, onClose, isOpen, taskName, taskInstanceId, isLoading, playbookInstanceId, taskVerification, }: ConfidenceCommentBoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -27,18 +27,17 @@ export declare const ConfidencePlaybook: {
27
27
  playbookMode: "list" | "card";
28
28
  playbookStyle?: ConfidencePlaybookStyleConfiguration;
29
29
  username: string | undefined;
30
- /** Whether the playbook starts expanded. Defaults to true. Cookie persistence overrides this on subsequent loads. */
30
+ /** Whether the playbook starts expanded. Defaults to true. */
31
31
  defaultExpanded?: boolean;
32
32
  }): import("react/jsx-runtime").JSX.Element;
33
33
  Context: ({ children, }: {
34
34
  children: React.ReactNode;
35
35
  }) => import("react/jsx-runtime").JSX.Element;
36
- View: ({ playbook, playbookMode, onTaskButtonClick, playbookStyle, defaultExpanded, }: {
36
+ View: ({ playbook, playbookMode, onTaskButtonClick, playbookStyle, }: {
37
37
  playbookMode: "list" | "card";
38
38
  playbook: Playbook;
39
39
  onTaskButtonClick: (btn: TaskButton, taskId: number) => Promise<void>;
40
40
  playbookStyle?: ConfidencePlaybookStyleConfiguration;
41
- defaultExpanded?: boolean;
42
41
  }) => import("react/jsx-runtime").JSX.Element;
43
42
  AutoInstantiated: ({ email, playbookId, playbookMode, playbookStyle, bank, timezone, persistKey, playbookInstanceId: externalPlaybookInstanceId, defaultExpanded, }: {
44
43
  email: string;
@@ -49,7 +48,7 @@ export declare const ConfidencePlaybook: {
49
48
  playbookStyle?: ConfidencePlaybookStyleConfiguration;
50
49
  persistKey?: string;
51
50
  playbookInstanceId?: number | null;
52
- /** Whether the playbook starts expanded. Defaults to true. Cookie persistence overrides this on subsequent loads. */
51
+ /** Whether the playbook starts expanded. Defaults to true. */
53
52
  defaultExpanded?: boolean;
54
53
  }) => import("react/jsx-runtime").JSX.Element;
55
54
  WithInstantiateButton: ({ playbookId, playbookMode, playbookStyle, btnLabel, btnColor, persistKey, onSetUsername, onSetPlaybookInstanceId, playbookInstanceId: externalPlaybookInstanceId, username: externalUsername, defaultExpanded, renderPlaybook, }: {
@@ -64,7 +63,7 @@ export declare const ConfidencePlaybook: {
64
63
  onSetPlaybookInstanceId?: (playbookInstanceId: number) => void;
65
64
  playbookInstanceId?: number | null;
66
65
  username?: string;
67
- /** Whether the playbook starts expanded. Defaults to true. Cookie persistence overrides this on subsequent loads. */
66
+ /** Whether the playbook starts expanded. Defaults to true. */
68
67
  defaultExpanded?: boolean;
69
68
  /** When set (e.g. embedded layout), only the playbook node is wrapped; the instantiate button stays a sibling outside that wrapper. */
70
69
  renderPlaybook?: (playbook: ReactNode | null) => ReactNode;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ type CommentBoundsContextValue = {
3
+ bounds: DOMRect | null;
4
+ setAnchorElement: (element: HTMLElement | null) => void;
5
+ };
6
+ export declare const useCommentBounds: () => CommentBoundsContextValue;
7
+ export declare const CommentBoundsProvider: ({ children, }: {
8
+ children: ReactNode;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,10 +1,12 @@
1
1
  import { ConfidenceComment } from '../types/comments.types';
2
2
  export declare const useCommentContext: () => {
3
3
  comments: ConfidenceComment[];
4
+ isLoading: boolean;
4
5
  username: string | undefined;
5
6
  openTaskDetails: {
6
7
  taskInstanceId: number | null;
7
8
  taskName: string;
9
+ taskVerification: boolean;
8
10
  } | null;
9
11
  prefetchQuery: (taskInstanceId: number) => void;
10
12
  setOpenTaskDetails: (openTaskDetails: {
@@ -13,8 +15,9 @@ export declare const useCommentContext: () => {
13
15
  taskVerification: boolean;
14
16
  } | null) => void;
15
17
  };
16
- export declare const CommentProvider: ({ playbookInstanceId, children, username, }: {
18
+ export declare const CommentProvider: ({ playbookInstanceId, isExpanded, children, username, }: {
17
19
  children: React.ReactNode;
18
20
  playbookInstanceId: string | number;
19
21
  username: string | undefined;
22
+ isExpanded: boolean;
20
23
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export type ExpandContextValue = {
3
+ isExpanded: boolean;
4
+ toggleExpanded: (value: boolean) => void;
5
+ };
6
+ export type ExpandProviderValue = {
7
+ isExpanded?: boolean;
8
+ toggleExpanded?: (value: boolean) => void;
9
+ };
10
+ type ExpandProviderProps = {
11
+ children: ReactNode;
12
+ defaultExpanded?: boolean;
13
+ value?: ExpandProviderValue;
14
+ };
15
+ export declare const ExpandProvider: ({ children, value, defaultExpanded, }: ExpandProviderProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const useExpandContext: () => ExpandContextValue;
17
+ export {};