@atlaskit/reactions 34.4.11 → 34.4.13
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/CHANGELOG.md +14 -0
- package/ConnectedReactionPicker/package.json +1 -8
- package/ConnectedReactionsView/package.json +1 -8
- package/MemoryReactionsStore/package.json +1 -8
- package/MockReactionsClient/package.json +1 -8
- package/Reaction/package.json +1 -8
- package/ReactionConsumer/package.json +1 -8
- package/ReactionPicker/package.json +1 -8
- package/ReactionServiceClient/package.json +1 -8
- package/Reactions/package.json +1 -8
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Selector.js +17 -6
- package/dist/cjs/shared/constants.js +28 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Selector.js +15 -7
- package/dist/es2019/shared/constants.js +24 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Selector.js +19 -8
- package/dist/esm/shared/constants.js +27 -0
- package/dist/types/MockReactionsClient.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/constants.d.ts +5 -0
- package/package.json +2 -2
- package/reaction/package.json +1 -8
- package/store/package.json +1 -8
- package/types/package.json +1 -8
- package/useCloseManager/package.json +1 -8
- package/dist/types-ts4.5/MockReactionsClient.d.ts +0 -27
- package/dist/types-ts4.5/analytics/index.d.ts +0 -121
- package/dist/types-ts4.5/client/ReactionServiceClient.d.ts +0 -35
- package/dist/types-ts4.5/client/index.d.ts +0 -1
- package/dist/types-ts4.5/components/Counter.d.ts +0 -51
- package/dist/types-ts4.5/components/EmojiButton.d.ts +0 -24
- package/dist/types-ts4.5/components/FlashAnimation.d.ts +0 -23
- package/dist/types-ts4.5/components/Reaction.d.ts +0 -67
- package/dist/types-ts4.5/components/ReactionButton.d.ts +0 -22
- package/dist/types-ts4.5/components/ReactionParticleEffect.d.ts +0 -22
- package/dist/types-ts4.5/components/ReactionPicker.d.ts +0 -119
- package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +0 -61
- package/dist/types-ts4.5/components/ReactionSummaryView.d.ts +0 -81
- package/dist/types-ts4.5/components/ReactionTooltip.d.ts +0 -43
- package/dist/types-ts4.5/components/ReactionView.d.ts +0 -12
- package/dist/types-ts4.5/components/Reactions.d.ts +0 -206
- package/dist/types-ts4.5/components/ReactionsDialog.d.ts +0 -32
- package/dist/types-ts4.5/components/ReactionsDialogHeader.d.ts +0 -15
- package/dist/types-ts4.5/components/ReactionsDialogTrigger.d.ts +0 -5
- package/dist/types-ts4.5/components/ReactionsList.d.ts +0 -20
- package/dist/types-ts4.5/components/RepositionOnUpdate.d.ts +0 -13
- package/dist/types-ts4.5/components/Selector.d.ts +0 -36
- package/dist/types-ts4.5/components/ShowMore.d.ts +0 -15
- package/dist/types-ts4.5/components/StaticReaction.d.ts +0 -11
- package/dist/types-ts4.5/components/Trigger.d.ts +0 -83
- package/dist/types-ts4.5/components/UfoErrorBoundary.d.ts +0 -17
- package/dist/types-ts4.5/components/index.d.ts +0 -9
- package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -23
- package/dist/types-ts4.5/containers/ConnectedReactionPicker/index.d.ts +0 -2
- package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +0 -56
- package/dist/types-ts4.5/containers/ConnectedReactionsView/index.d.ts +0 -2
- package/dist/types-ts4.5/containers/index.d.ts +0 -2
- package/dist/types-ts4.5/hooks/useCloseManager.d.ts +0 -20
- package/dist/types-ts4.5/hooks/useDelayedState.d.ts +0 -6
- package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +0 -5
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -27
- package/dist/types-ts4.5/i18n/da.d.ts +0 -27
- package/dist/types-ts4.5/i18n/de.d.ts +0 -26
- package/dist/types-ts4.5/i18n/en.d.ts +0 -27
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -27
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -27
- package/dist/types-ts4.5/i18n/es.d.ts +0 -27
- package/dist/types-ts4.5/i18n/et.d.ts +0 -11
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -26
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -27
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -27
- package/dist/types-ts4.5/i18n/index.d.ts +0 -37
- package/dist/types-ts4.5/i18n/is.d.ts +0 -6
- package/dist/types-ts4.5/i18n/it.d.ts +0 -27
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -27
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -26
- package/dist/types-ts4.5/i18n/languages.d.ts +0 -28
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -26
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -27
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -27
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -27
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -11
- package/dist/types-ts4.5/i18n/ro.d.ts +0 -6
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -26
- package/dist/types-ts4.5/i18n/sk.d.ts +0 -11
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -27
- package/dist/types-ts4.5/i18n/th.d.ts +0 -27
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -27
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -27
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -27
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -27
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -26
- package/dist/types-ts4.5/index.d.ts +0 -34
- package/dist/types-ts4.5/shared/constants.d.ts +0 -29
- package/dist/types-ts4.5/shared/i18n.d.ts +0 -87
- package/dist/types-ts4.5/shared/utils.d.ts +0 -18
- package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +0 -99
- package/dist/types-ts4.5/store/ReactionConsumer.d.ts +0 -57
- package/dist/types-ts4.5/store/batched.d.ts +0 -2
- package/dist/types-ts4.5/store/index.d.ts +0 -3
- package/dist/types-ts4.5/store/utils.d.ts +0 -11
- package/dist/types-ts4.5/types/Actions.d.ts +0 -28
- package/dist/types-ts4.5/types/Updater.d.ts +0 -2
- package/dist/types-ts4.5/types/User.d.ts +0 -21
- package/dist/types-ts4.5/types/client.d.ts +0 -38
- package/dist/types-ts4.5/types/index.d.ts +0 -25
- package/dist/types-ts4.5/types/reaction.d.ts +0 -117
- package/dist/types-ts4.5/types/store.d.ts +0 -71
- package/dist/types-ts4.5/ufo/index.d.ts +0 -54
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type Reactions, type Client, type ReactionSummary } from './types';
|
|
2
|
-
export declare const containerAri = "ari:cloud:owner:demo-cloud-id:container/1";
|
|
3
|
-
export declare const ari = "ari:cloud:owner:demo-cloud-id:item/1";
|
|
4
|
-
export declare const getReactionSummary: (shortName: string, count: number, reacted: boolean, extendedReactions?: boolean) => ReactionSummary;
|
|
5
|
-
export declare const getUser: (id: string, displayName: string) => {
|
|
6
|
-
id: string;
|
|
7
|
-
displayName: string;
|
|
8
|
-
profilePicture: {
|
|
9
|
-
path: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const simpleMockData: {
|
|
13
|
-
[key: string]: ReactionSummary[];
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Mocked version of the client to fetch user information
|
|
17
|
-
*/
|
|
18
|
-
export declare class MockReactionsClient implements Client {
|
|
19
|
-
private delay;
|
|
20
|
-
private mockData;
|
|
21
|
-
constructor(delay?: number, showExtendedReactions?: boolean);
|
|
22
|
-
private delayPromise;
|
|
23
|
-
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
24
|
-
getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
|
|
25
|
-
addReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary[]>;
|
|
26
|
-
deleteReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary[]>;
|
|
27
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { UIAnalyticsEvent, type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { type EventType } from '@atlaskit/analytics-gas-types';
|
|
3
|
-
import { type ReactionSummary, type ReactionSource } from '../types';
|
|
4
|
-
export type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: move to utility package?
|
|
7
|
-
* A random sampling function
|
|
8
|
-
* sampling algorithm is from @atlassian/jira-coinflip at https://stash.atlassian.com/projects/JIRACLOUD/repos/jira-frontend/browse/src/packages/platform/app-framework/coinflip/src/index.tsx
|
|
9
|
-
* E.g. isSampled(2) will pass 50% of the time
|
|
10
|
-
* @param rate The chance that it will pass (1 in <rate> times)
|
|
11
|
-
* @returns bool, if it passes or not
|
|
12
|
-
*/
|
|
13
|
-
export declare const isSampled: (rate: number) => boolean;
|
|
14
|
-
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
|
|
15
|
-
export declare const createAndFireSafe: <U extends any[], T extends (...args: U) => AnalyticsEventPayload>(createAnalyticsEvent: CreateUIAnalyticsEvent | void, creator: T, ...args: U) => void;
|
|
16
|
-
export declare const createRestSucceededEvent: (actionSubject: string) => {
|
|
17
|
-
action: string;
|
|
18
|
-
actionSubject: string;
|
|
19
|
-
eventType: EventType;
|
|
20
|
-
actionSubjectId: string | undefined;
|
|
21
|
-
attributes: {
|
|
22
|
-
packageName: string;
|
|
23
|
-
packageVersion: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const createRestFailedEvent: (actionSubject: string, errorCode?: number) => {
|
|
27
|
-
action: string;
|
|
28
|
-
actionSubject: string;
|
|
29
|
-
eventType: EventType;
|
|
30
|
-
actionSubjectId: string | undefined;
|
|
31
|
-
attributes: {
|
|
32
|
-
packageName: string;
|
|
33
|
-
packageVersion: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export declare const createReactionsRenderedEvent: (startTime: number) => {
|
|
37
|
-
action: string;
|
|
38
|
-
actionSubject: string;
|
|
39
|
-
eventType: EventType;
|
|
40
|
-
actionSubjectId: string | undefined;
|
|
41
|
-
attributes: {
|
|
42
|
-
packageName: string;
|
|
43
|
-
packageVersion: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export declare const createPickerButtonClickedEvent: (reactionEmojiCount: number) => {
|
|
47
|
-
action: string;
|
|
48
|
-
actionSubject: string;
|
|
49
|
-
eventType: EventType;
|
|
50
|
-
actionSubjectId: string | undefined;
|
|
51
|
-
attributes: {
|
|
52
|
-
packageName: string;
|
|
53
|
-
packageVersion: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export declare const createPickerCancelledEvent: (startTime?: number) => {
|
|
57
|
-
action: string;
|
|
58
|
-
actionSubject: string;
|
|
59
|
-
eventType: EventType;
|
|
60
|
-
actionSubjectId: string | undefined;
|
|
61
|
-
attributes: {
|
|
62
|
-
packageName: string;
|
|
63
|
-
packageVersion: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export declare const createPickerMoreClickedEvent: (startTime?: number) => {
|
|
67
|
-
action: string;
|
|
68
|
-
actionSubject: string;
|
|
69
|
-
eventType: EventType;
|
|
70
|
-
actionSubjectId: string | undefined;
|
|
71
|
-
attributes: {
|
|
72
|
-
packageName: string;
|
|
73
|
-
packageVersion: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
export declare const createReactionSelectionEvent: (source: ReactionSource, emojiId: string, reaction?: ReactionSummary, startTime?: number) => {
|
|
77
|
-
action: string;
|
|
78
|
-
actionSubject: string;
|
|
79
|
-
eventType: EventType;
|
|
80
|
-
actionSubjectId: string | undefined;
|
|
81
|
-
attributes: {
|
|
82
|
-
packageName: string;
|
|
83
|
-
packageVersion: string;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
export declare const createReactionHoveredEvent: (startTime?: number) => {
|
|
87
|
-
action: string;
|
|
88
|
-
actionSubject: string;
|
|
89
|
-
eventType: EventType;
|
|
90
|
-
actionSubjectId: string | undefined;
|
|
91
|
-
attributes: {
|
|
92
|
-
packageName: string;
|
|
93
|
-
packageVersion: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
export declare const createReactionFocusedEvent: (startTime?: number) => {
|
|
97
|
-
action: string;
|
|
98
|
-
actionSubject: string;
|
|
99
|
-
eventType: EventType;
|
|
100
|
-
actionSubjectId: string | undefined;
|
|
101
|
-
attributes: {
|
|
102
|
-
packageName: string;
|
|
103
|
-
packageVersion: string;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
export declare const createReactionClickedEvent: (added: boolean, emojiId: string) => {
|
|
107
|
-
action: string;
|
|
108
|
-
actionSubject: string;
|
|
109
|
-
eventType: EventType;
|
|
110
|
-
actionSubjectId: string | undefined;
|
|
111
|
-
attributes: {
|
|
112
|
-
packageName: string;
|
|
113
|
-
packageVersion: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Used for store failure metadata for analytics
|
|
118
|
-
* @param error The error could be a service error with {code, reason} or an Error
|
|
119
|
-
* @returns any
|
|
120
|
-
*/
|
|
121
|
-
export declare const extractErrorInfo: (error: any) => any;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { type Reactions, type ReactionSummary, type Client } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Utility class to retrieve/modify all actions on reactions collection
|
|
4
|
-
*/
|
|
5
|
-
export declare class ReactionServiceClient implements Client {
|
|
6
|
-
/**
|
|
7
|
-
* oAuth token
|
|
8
|
-
*/
|
|
9
|
-
private sessionToken?;
|
|
10
|
-
/**
|
|
11
|
-
* API config
|
|
12
|
-
*/
|
|
13
|
-
private serviceConfig;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param baseUrl base domain url
|
|
17
|
-
* @param sessionToken oAuth token for reactions emoji services
|
|
18
|
-
*/
|
|
19
|
-
constructor(baseUrl: string, sessionToken?: string);
|
|
20
|
-
/**
|
|
21
|
-
* Get http headers for the "fetch" request
|
|
22
|
-
* @param hasBody
|
|
23
|
-
*/
|
|
24
|
-
private getHeaders;
|
|
25
|
-
/**
|
|
26
|
-
* Send a request to remote service
|
|
27
|
-
* @param path endpoint api url
|
|
28
|
-
* @param options Optional custom params
|
|
29
|
-
*/
|
|
30
|
-
private requestService;
|
|
31
|
-
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
32
|
-
getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
|
|
33
|
-
addReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
|
|
34
|
-
deleteReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
|
|
35
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ReactionServiceClient } from './ReactionServiceClient';
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type Durations } from '@atlaskit/motion';
|
|
2
|
-
/**
|
|
3
|
-
* Test id for component top level div
|
|
4
|
-
*/
|
|
5
|
-
export declare const RENDER_COMPONENT_WRAPPER = "counter-wrapper";
|
|
6
|
-
/**
|
|
7
|
-
* Test id for wrapper div of the counter inside the slider
|
|
8
|
-
*/
|
|
9
|
-
export declare const RENDER_COUNTER_TESTID = "counter-container";
|
|
10
|
-
/**
|
|
11
|
-
* Counter label value wrapper div
|
|
12
|
-
*/
|
|
13
|
-
export declare const RENDER_LABEL_TESTID = "counter_label_wrapper";
|
|
14
|
-
export interface CounterProps {
|
|
15
|
-
/**
|
|
16
|
-
* Duration of how long the motion will take (defaults to "medium" from '@atlaskit/motion')
|
|
17
|
-
*/
|
|
18
|
-
animationDuration?: Durations;
|
|
19
|
-
/**
|
|
20
|
-
* Optional wrapper class name
|
|
21
|
-
*/
|
|
22
|
-
className?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Has the emoji been selected by given user (defaults to false)
|
|
25
|
-
*/
|
|
26
|
-
highlight?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Max threshold of selections to show before having a label (defaults to 1000)
|
|
29
|
-
*/
|
|
30
|
-
limit?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Label to show when the value surpasses the limit value (defaults to "1k+")
|
|
33
|
-
*/
|
|
34
|
-
overLimitLabel?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Optional prop to use a darker text color for the counter
|
|
37
|
-
*/
|
|
38
|
-
useDarkerFont?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Optional prop to show updated styling for counter
|
|
41
|
-
*/
|
|
42
|
-
useUpdatedStyles?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Count of emoji been selected
|
|
45
|
-
*/
|
|
46
|
-
value: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Display reaction count next to the emoji button
|
|
50
|
-
*/
|
|
51
|
-
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, useUpdatedStyles, }: CounterProps) => JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type EmojiId, type OnEmojiEvent, type EmojiProvider } from '@atlaskit/emoji';
|
|
2
|
-
export declare const RENDER_BUTTON_TESTID = "button-emoji-id";
|
|
3
|
-
export interface EmojiButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* identifier info for a given emoji
|
|
6
|
-
*/
|
|
7
|
-
emojiId: EmojiId;
|
|
8
|
-
/**
|
|
9
|
-
* Async provider to fetch the emoji
|
|
10
|
-
*/
|
|
11
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
12
|
-
/**
|
|
13
|
-
* Optional prop for hoverable reaction picker selector emoji
|
|
14
|
-
*/
|
|
15
|
-
hoverableReactionPickerSelectorEmoji?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Event handler when a new emoji is selected
|
|
18
|
-
*/
|
|
19
|
-
onClick: OnEmojiEvent;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* custom button to render the custom emoji selector inside the reaction picker
|
|
23
|
-
*/
|
|
24
|
-
export declare const EmojiButton: ({ emojiId, onClick, emojiProvider, hoverableReactionPickerSelectorEmoji, }: EmojiButtonProps) => JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type PropsWithChildren } from 'react';
|
|
6
|
-
export type FlashAnimationProps = PropsWithChildren<{
|
|
7
|
-
/**
|
|
8
|
-
* Optional wrapper div class anme
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Show custom animation or render as standard without animation (defaults to false)
|
|
13
|
-
*/
|
|
14
|
-
flash?: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
/**
|
|
17
|
-
* Test id for wrapper FlashAnimation div
|
|
18
|
-
*/
|
|
19
|
-
export declare const RENDER_FLASHANIMATION_TESTID = "flash-animation";
|
|
20
|
-
/**
|
|
21
|
-
* Flash animation background component. See Reaction component for usage.
|
|
22
|
-
*/
|
|
23
|
-
export declare const FlashAnimation: (props: FlashAnimationProps) => JSX.Element;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type EmojiProvider } from '@atlaskit/emoji';
|
|
2
|
-
import { type ReactionSummary, type ReactionClick, type ReactionMouseEnter } from '../types';
|
|
3
|
-
import { type ReactionFocused } from '../types/reaction';
|
|
4
|
-
import { type OpenReactionsDialogOptions } from './Reactions';
|
|
5
|
-
/**
|
|
6
|
-
* Test id for Reaction item wrapper div
|
|
7
|
-
*/
|
|
8
|
-
export declare const RENDER_REACTION_TESTID = "render_reaction_wrapper";
|
|
9
|
-
export interface ReactionProps {
|
|
10
|
-
/**
|
|
11
|
-
* Optional prop for enabling the Reactions Dialog
|
|
12
|
-
*/
|
|
13
|
-
allowUserDialog?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Provider for loading emojis
|
|
16
|
-
*/
|
|
17
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
18
|
-
/**
|
|
19
|
-
* Show custom animation or render as standard without animation (defaults to false)
|
|
20
|
-
*/
|
|
21
|
-
flash?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Optional function when the user wants to open the Reactions Dialog
|
|
24
|
-
*/
|
|
25
|
-
handleOpenReactionsDialog?: (options?: OpenReactionsDialogOptions) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Optional prop for controlling if the reactions component is view only, disabling adding reactions
|
|
28
|
-
*/
|
|
29
|
-
isViewOnly?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* event handler when the emoji button is clicked
|
|
32
|
-
*/
|
|
33
|
-
onClick: ReactionClick;
|
|
34
|
-
/**
|
|
35
|
-
* Optional event when focused the reaction
|
|
36
|
-
*/
|
|
37
|
-
onFocused?: ReactionFocused;
|
|
38
|
-
/**
|
|
39
|
-
* Optional event when the mouse cursor hovers over the reaction
|
|
40
|
-
*/
|
|
41
|
-
onMouseEnter?: ReactionMouseEnter;
|
|
42
|
-
/**
|
|
43
|
-
* Data for the reaction
|
|
44
|
-
*/
|
|
45
|
-
reaction: ReactionSummary;
|
|
46
|
-
/**
|
|
47
|
-
* Optional prop for using an opaque button background instead of a transparent background
|
|
48
|
-
*/
|
|
49
|
-
showOpaqueBackground?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Show a floating emoji particle effect (usually in response to a new reaction) (defaults to false)
|
|
52
|
-
*/
|
|
53
|
-
showParticleEffect?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Optional prop for controlling if the reaction displayed is a default one and should not have a border
|
|
56
|
-
*/
|
|
57
|
-
showSubtleStyle?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Optional URL to optimistically render the emoji image before the catalogue arrives.
|
|
60
|
-
* When provided, the emoji will render immediately without waiting for the emoji provider to resolve.
|
|
61
|
-
*/
|
|
62
|
-
optimisticImageURL?: string;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Render an emoji reaction button
|
|
66
|
-
*/
|
|
67
|
-
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, showOpaqueBackground, allowUserDialog, handleOpenReactionsDialog, isViewOnly, showSubtleStyle, optimisticImageURL, }: ReactionProps) => JSX.Element;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ReactionProps } from './Reaction';
|
|
2
|
-
interface ReactionButtonProps extends Pick<ReactionProps, 'flash'> {
|
|
3
|
-
ariaExpanded?: boolean;
|
|
4
|
-
ariaLabel: string;
|
|
5
|
-
ariaPressed?: boolean;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
dataAttributes?: {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
-
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
13
|
-
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
-
onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
15
|
-
reacted?: boolean;
|
|
16
|
-
showOpaqueBackground?: boolean;
|
|
17
|
-
showSubtleStyle?: boolean;
|
|
18
|
-
testId?: string;
|
|
19
|
-
useCompactStyles?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const ReactionButton: ({ onClick, flash, showSubtleStyle, showOpaqueBackground, useCompactStyles, reacted, ariaLabel, ariaExpanded, ariaPressed, onMouseEnter, onMouseLeave, onFocus, children, dataAttributes, testId, }: ReactionButtonProps) => JSX.Element;
|
|
22
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type EmojiProvider, type EmojiId } from '@atlaskit/emoji';
|
|
6
|
-
export declare const PARTICLE_COUNT = 4;
|
|
7
|
-
interface ReactionParticleEffectProps {
|
|
8
|
-
/**
|
|
9
|
-
* ID of the emoji to show within the particle effect
|
|
10
|
-
*/
|
|
11
|
-
emojiId: EmojiId;
|
|
12
|
-
/**
|
|
13
|
-
* Provider for loading emojis
|
|
14
|
-
*/
|
|
15
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional URL to optimistically render the emoji image before the catalogue arrives.
|
|
18
|
-
*/
|
|
19
|
-
optimisticImageURL?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare const ReactionParticleEffect: ({ emojiProvider, emojiId, optimisticImageURL, }: ReactionParticleEffectProps) => JSX.Element;
|
|
22
|
-
export {};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React, { type PropsWithChildren } from 'react';
|
|
6
|
-
import { type PickerSize } from '@atlaskit/emoji/types';
|
|
7
|
-
import { type EmojiProvider } from '@atlaskit/emoji/resource';
|
|
8
|
-
import { type PopperProps, type Placement } from '@atlaskit/popper';
|
|
9
|
-
import { type ReactionSource } from '../types';
|
|
10
|
-
import { type SelectorProps } from './Selector';
|
|
11
|
-
import { type TriggerProps } from './Trigger';
|
|
12
|
-
/**
|
|
13
|
-
* Test id for wrapper ReactionPicker div
|
|
14
|
-
*/
|
|
15
|
-
export declare const RENDER_REACTIONPICKER_TESTID = "reactionPicker-testid";
|
|
16
|
-
/**
|
|
17
|
-
* Test id for ReactionPicker panel div
|
|
18
|
-
*/
|
|
19
|
-
export declare const RENDER_REACTIONPICKERPANEL_TESTID = "reactionPickerPanel-testid";
|
|
20
|
-
export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Partial<Pick<TriggerProps, 'tooltipContent' | 'miniMode'>> {
|
|
21
|
-
/**
|
|
22
|
-
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
23
|
-
*/
|
|
24
|
-
allowAllEmojis?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Optional class name
|
|
27
|
-
*/
|
|
28
|
-
className?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Enable/Disable the button to be clickable (defaults to false)
|
|
31
|
-
*/
|
|
32
|
-
disabled?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Optional emoji picker size to control the size of emoji picker
|
|
35
|
-
*/
|
|
36
|
-
emojiPickerSize?: PickerSize;
|
|
37
|
-
/**
|
|
38
|
-
* Provider for loading emojis
|
|
39
|
-
*/
|
|
40
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
41
|
-
/**
|
|
42
|
-
* Optional prop for hoverable reaction picker
|
|
43
|
-
*/
|
|
44
|
-
hoverableReactionPicker?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Optional prop to set a delay for the reaction picker when it opens/closes on hover
|
|
47
|
-
*/
|
|
48
|
-
hoverableReactionPickerDelay?: number;
|
|
49
|
-
/**
|
|
50
|
-
* Optional prop to say if the reactions component is in a list
|
|
51
|
-
*/
|
|
52
|
-
isListItem?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Optional event handler when the emoji picker is clicked outside and closed
|
|
55
|
-
*/
|
|
56
|
-
onCancel?: () => void;
|
|
57
|
-
/**
|
|
58
|
-
* Optional event handler when the emoji picker is opened
|
|
59
|
-
*/
|
|
60
|
-
onOpen?: () => void;
|
|
61
|
-
/**
|
|
62
|
-
* Event callback when an emoji button is selected
|
|
63
|
-
* @param emojiId emoji unique id
|
|
64
|
-
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
65
|
-
*/
|
|
66
|
-
onSelection: (emojiId: string, source: ReactionSource) => void;
|
|
67
|
-
/**
|
|
68
|
-
* Optional event handler when the custom emoji picker icon is selected
|
|
69
|
-
*/
|
|
70
|
-
onShowMore?: () => void;
|
|
71
|
-
/**
|
|
72
|
-
* Optional prop for controlling the picker location
|
|
73
|
-
*/
|
|
74
|
-
reactionPickerPlacement?: Placement;
|
|
75
|
-
/**
|
|
76
|
-
* Optional zIndex for the reaction picker popper
|
|
77
|
-
*/
|
|
78
|
-
reactionPickerPopperZIndex?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Optional prop to set the strategy of the reaction picker popup
|
|
81
|
-
*/
|
|
82
|
-
reactionPickerStrategy?: PopperProps<{}>['strategy'];
|
|
83
|
-
/**
|
|
84
|
-
* Optional prop for controlling icon inside Trigger
|
|
85
|
-
*/
|
|
86
|
-
reactionPickerTriggerIcon?: React.ReactNode;
|
|
87
|
-
/**
|
|
88
|
-
* Optional prop for controlling text of the trigger button
|
|
89
|
-
*/
|
|
90
|
-
reactionPickerTriggerText?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Optional prop for displaying text to add a reaction
|
|
93
|
-
*/
|
|
94
|
-
showAddReactionText?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Optional prop for using an opaque button background instead of a transparent background
|
|
97
|
-
*/
|
|
98
|
-
showOpaqueBackground?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Optional prop for applying subtle styling to reaction summary and picker
|
|
101
|
-
*/
|
|
102
|
-
subtleReactionsSummaryAndPicker?: boolean;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Picker component for adding reactions
|
|
106
|
-
*/
|
|
107
|
-
export declare const ReactionPicker: React.MemoExoticComponent<(props: ReactionPickerProps) => JSX.Element>;
|
|
108
|
-
export interface PopperWrapperProps {
|
|
109
|
-
isOpen: boolean;
|
|
110
|
-
onClose: () => void;
|
|
111
|
-
popperModifiers?: PopperProps<{}>['modifiers'];
|
|
112
|
-
settings: {
|
|
113
|
-
popperPlacement: Placement;
|
|
114
|
-
showFullPicker: boolean;
|
|
115
|
-
};
|
|
116
|
-
triggerRef: HTMLDivElement | HTMLButtonElement | null;
|
|
117
|
-
zIndex?: number;
|
|
118
|
-
}
|
|
119
|
-
export declare const PopperWrapper: (props: PropsWithChildren<PopperWrapperProps>) => JSX.Element;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
6
|
-
import { type ReactionsProps } from './Reactions';
|
|
7
|
-
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'useButtonAlignmentStyling'> {
|
|
8
|
-
/**
|
|
9
|
-
* The number of emojis to show in the summary button
|
|
10
|
-
*/
|
|
11
|
-
emojisToShow?: number;
|
|
12
|
-
/**
|
|
13
|
-
* event handler when the summary button is clicked to view all reactions
|
|
14
|
-
*/
|
|
15
|
-
onClick: () => void;
|
|
16
|
-
/**
|
|
17
|
-
* Optional event handler when mouse enters the button
|
|
18
|
-
*/
|
|
19
|
-
onMouseEnter?: () => void;
|
|
20
|
-
/**
|
|
21
|
-
* Optional event handler when mouse leaves the button
|
|
22
|
-
*/
|
|
23
|
-
onMouseLeave?: () => void;
|
|
24
|
-
/**
|
|
25
|
-
* Optional prop for using an opaque button background instead of a transparent background
|
|
26
|
-
*/
|
|
27
|
-
showOpaqueBackground?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Optional prop for applying subtle styling to reaction summary button
|
|
30
|
-
*/
|
|
31
|
-
subtleReactionsSummaryAndPicker?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Optional prop to add an icon to the end of the summary button
|
|
34
|
-
*/
|
|
35
|
-
summaryButtonIconAfter?: React.ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* Optional prop for the optimistic image URL
|
|
38
|
-
*/
|
|
39
|
-
summaryGetOptimisticImageURL?: (emojiId: string) => string;
|
|
40
|
-
/**
|
|
41
|
-
* Optional prop to set the most recently clicked emoji id
|
|
42
|
-
*/
|
|
43
|
-
summaryViewParticleEffectEmojiId?: {
|
|
44
|
-
id: string;
|
|
45
|
-
shortName: string;
|
|
46
|
-
} | null;
|
|
47
|
-
/**
|
|
48
|
-
* Optional prop to indicate whether the summary popup is open, used for aria-expanded
|
|
49
|
-
*/
|
|
50
|
-
isOpen?: boolean;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Test id for summary reaction wrapper button
|
|
54
|
-
*/
|
|
55
|
-
export declare const RENDER_SUMMARY_BUTTON_TESTID = "reaction-summary-button";
|
|
56
|
-
/**
|
|
57
|
-
* Test id for emojis displayed inside summary button. All emoji's in the summary button will have this test id
|
|
58
|
-
*/
|
|
59
|
-
export declare const RENDER_SUMMARY_EMOJI_TESTID = "summary-emoji-display";
|
|
60
|
-
export declare const ReactionSummaryButton: ForwardRefExoticComponent<ReactionSummaryButtonProps & RefAttributes<HTMLDivElement>>;
|
|
61
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type Placement } from '@atlaskit/popper';
|
|
2
|
-
import { type ReactionClick, type ReactionFocused, type ReactionMouseEnter, type ReactionSource } from '../types';
|
|
3
|
-
import { type ReactionsProps, type OpenReactionsDialogOptions } from './Reactions';
|
|
4
|
-
import { type TriggerProps } from './Trigger';
|
|
5
|
-
/**
|
|
6
|
-
* Test id for the Reactions summary view popup
|
|
7
|
-
*/
|
|
8
|
-
export declare const RENDER_SUMMARY_VIEW_POPUP_TESTID = "render-summary-view-popup";
|
|
9
|
-
interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize' | 'useButtonAlignmentStyling' | 'reactionPickerTriggerText'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
|
|
10
|
-
/**
|
|
11
|
-
* Optional prop for enabling the Reactions Dialog
|
|
12
|
-
*/
|
|
13
|
-
allowUserDialog?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Optional function when the user wants to open the Reactions Dialog
|
|
16
|
-
*/
|
|
17
|
-
handleOpenReactionsDialog?: (options?: OpenReactionsDialogOptions) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Optional prop to make the summary view open on hover
|
|
20
|
-
*/
|
|
21
|
-
hoverableSummaryView?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Optional prop to set a delay for the summary view when it opens/closes on hover
|
|
24
|
-
*/
|
|
25
|
-
hoverableSummaryViewDelay?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Optional prop for controlling if the reactions component is view only, disabling adding reactions
|
|
28
|
-
*/
|
|
29
|
-
isViewOnly?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Optional event handler when the emoji picker is opened
|
|
32
|
-
*/
|
|
33
|
-
onOpen?: () => void;
|
|
34
|
-
/**
|
|
35
|
-
* event handler when a a reaction button is clicked inside the summary
|
|
36
|
-
*/
|
|
37
|
-
onReactionClick: ReactionClick;
|
|
38
|
-
/**
|
|
39
|
-
* Optional event when focused a reaction inside the summary
|
|
40
|
-
*/
|
|
41
|
-
onReactionFocused?: ReactionFocused;
|
|
42
|
-
/**
|
|
43
|
-
* Optional event when the mouse cursor hovers over a reaction button inside the summary
|
|
44
|
-
*/
|
|
45
|
-
onReactionMouseEnter?: ReactionMouseEnter;
|
|
46
|
-
/**
|
|
47
|
-
* Event callback when an emoji button is selected
|
|
48
|
-
* @param emojiId emoji unique id
|
|
49
|
-
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
50
|
-
*/
|
|
51
|
-
onSelection: (emojiId: string, source: ReactionSource) => void;
|
|
52
|
-
/**
|
|
53
|
-
* Optional prop to change the placement of the summary popup reaction list
|
|
54
|
-
*/
|
|
55
|
-
placement?: Placement;
|
|
56
|
-
/**
|
|
57
|
-
* Optional prop for using an opaque button background instead of a transparent background
|
|
58
|
-
*/
|
|
59
|
-
showOpaqueBackground?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Optional prop for applying subtle styling to reaction picker
|
|
62
|
-
*/
|
|
63
|
-
subtleReactionsSummaryAndPicker?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Optional prop to control if the side picker is shown
|
|
66
|
-
*/
|
|
67
|
-
summaryButtonIconAfter?: React.ReactNode;
|
|
68
|
-
/**
|
|
69
|
-
* Optional prop for the optimistic image URL
|
|
70
|
-
*/
|
|
71
|
-
summaryGetOptimisticImageURL?: (emojiId: string) => string;
|
|
72
|
-
/**
|
|
73
|
-
* Optional prop to set the most recently clicked id
|
|
74
|
-
*/
|
|
75
|
-
summaryViewParticleEffectEmojiId?: {
|
|
76
|
-
id: string;
|
|
77
|
-
shortName: string;
|
|
78
|
-
} | null;
|
|
79
|
-
}
|
|
80
|
-
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, isViewOnly, allowSelectFromSummaryView, disabled, emojiPickerSize, onSelection, tooltipContent, reactionPickerTriggerIcon, onOpen, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, hoverableSummaryViewDelay, summaryGetOptimisticImageURL, summaryButtonIconAfter, summaryViewParticleEffectEmojiId, }: ReactionSummaryViewProps) => JSX.Element;
|
|
81
|
-
export {};
|