@engagently/types 4.2.0 → 4.3.1
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.
|
@@ -6,6 +6,7 @@ import type { EgyEntities, MessageEvents } from './WidgetDefinitions';
|
|
|
6
6
|
import type { DsmFeatureName } from '../lib/api/enums';
|
|
7
7
|
export declare enum ExperienceCallBackNames {
|
|
8
8
|
POLL_BAR = "POLL_BAR",
|
|
9
|
+
POLL_GRID = "POLL_GRID",
|
|
9
10
|
POLL_SLIDER = "POLL_SLIDER"
|
|
10
11
|
}
|
|
11
12
|
export type CallbackFn = (data: {
|
|
@@ -54,6 +55,7 @@ export type CommunityConfig = {
|
|
|
54
55
|
discussion: {
|
|
55
56
|
settings: {
|
|
56
57
|
BOOKMARK_MAX_COUNT: number;
|
|
58
|
+
IGNORE_MAX_COUNT: number;
|
|
57
59
|
COMMENTARY_MAX_LENGTH: number;
|
|
58
60
|
COMMENTARY_PREVIEW_LENGTH: number;
|
|
59
61
|
LIST_COMMENTARIES_SIZE: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VNode } from 'preact';
|
|
2
2
|
import type { ExperienceParticipationFragment } from '../../widgets/src/poll/data/ExperienceFragments.generated';
|
|
3
|
-
import type { PollBarData, ChartData } from '../../ui/core/_types';
|
|
3
|
+
import type { PollBarData, PollGridData, ChartData } from '../../ui/core/_types';
|
|
4
4
|
/**
|
|
5
5
|
* Type Definitions for all available entities
|
|
6
6
|
*
|
|
@@ -15,6 +15,7 @@ export declare enum EgyEntities {
|
|
|
15
15
|
EGY_DISCUSSION = "egy-discussion",
|
|
16
16
|
EGY_POLL = "egy-poll",
|
|
17
17
|
EGY_POLL_BAR = "egy-poll-bar",
|
|
18
|
+
EGY_POLL_GRID = "egy-poll-grid",
|
|
18
19
|
EGY_POLL_SLIDER = "egy-poll-slider"
|
|
19
20
|
}
|
|
20
21
|
export type EgyEntitiesValues = `${EgyEntities}`;
|
|
@@ -31,6 +32,7 @@ export declare enum DiscussionAttributes {
|
|
|
31
32
|
SCROLL_CONTAINER_ID = "scrollContainerId",
|
|
32
33
|
DISCUSSION_TITLE = "discussionTitle",
|
|
33
34
|
SIGNATURE = "signature",
|
|
35
|
+
DISCUSSION_DATA = "discussionData",
|
|
34
36
|
URL = "url",
|
|
35
37
|
IS_LIVE = "isLive",
|
|
36
38
|
IMAGE_URL = "imageUrl"
|
|
@@ -40,6 +42,7 @@ export type DiscussionAttributesHTMLElement = {
|
|
|
40
42
|
'scroll-container-id'?: string;
|
|
41
43
|
'discussion-title'?: string;
|
|
42
44
|
signature?: string;
|
|
45
|
+
'discussion-data'?: string;
|
|
43
46
|
url?: string;
|
|
44
47
|
'is-live'?: boolean;
|
|
45
48
|
'image-url'?: string;
|
|
@@ -49,6 +52,7 @@ export type DiscussionAttributesComponent = {
|
|
|
49
52
|
scrollContainerId?: string;
|
|
50
53
|
discussionTitle?: string;
|
|
51
54
|
signature?: string;
|
|
55
|
+
discussionData?: string;
|
|
52
56
|
url?: string;
|
|
53
57
|
isLive?: boolean;
|
|
54
58
|
imageUrl?: string;
|
|
@@ -69,6 +73,8 @@ export declare enum DiscussionIconSlots {
|
|
|
69
73
|
BOOKMARK_ICON_ACTIVE = "bookmarkIconActive",
|
|
70
74
|
DELETE_ICON = "deleteIcon",
|
|
71
75
|
EDIT_ICON = "editIcon",
|
|
76
|
+
IGNORE_ICON = "ignoreIcon",
|
|
77
|
+
IGNORE_ICON_ACTIVE = "ignoreIconActive",
|
|
72
78
|
LIVE_MODE_ICON = "liveModeIcon",
|
|
73
79
|
MODERATE_ICON = "moderateIcon",
|
|
74
80
|
REACTION1 = "reaction1",
|
|
@@ -97,6 +103,7 @@ export interface DiscussionWidget {
|
|
|
97
103
|
}
|
|
98
104
|
export declare enum DiscussionCommentaryActions {
|
|
99
105
|
BOOKMARK = "bookmark",
|
|
106
|
+
IGNORE = "ignore",
|
|
100
107
|
DELETE = "delete",
|
|
101
108
|
EDIT = "edit",
|
|
102
109
|
MODERATE = "moderate",
|
|
@@ -211,6 +218,67 @@ export interface PollBarWidget {
|
|
|
211
218
|
slots: Array<PollSlotValues>;
|
|
212
219
|
attributes: Array<`${PollBarAttributes}`>;
|
|
213
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* MAKE SURE TO UPDATE THE TYPES IN THE FOLLOWING PLACES WHEN CHANGING ATTRS:
|
|
223
|
+
* - PollGridAttributesHTMLElement
|
|
224
|
+
* - PollGridAttributesComponent
|
|
225
|
+
*
|
|
226
|
+
* also make sure to update the assignment in the PollGridPortal component, and
|
|
227
|
+
* extend the PollGrid Widget!
|
|
228
|
+
*/
|
|
229
|
+
export declare enum PollGridAttributes {
|
|
230
|
+
POLL_DATA = "poll-data",
|
|
231
|
+
CURRENT_USER_PARTICIPATION = "current-user-participation",
|
|
232
|
+
SHOW_SKELETON = "show-skeleton",
|
|
233
|
+
IS_LOADING = "is-loading",
|
|
234
|
+
IS_DISABLED = "is-disabled",
|
|
235
|
+
VOTE_ACTION_ENABLED = "vote-action-enabled",
|
|
236
|
+
VOTE_DISPLAY = "vote-display",
|
|
237
|
+
VOTE_CTA_ENABLED = "vote-cta-enabled",
|
|
238
|
+
VOTE_CTA_MESSAGE = "vote-cta-message",
|
|
239
|
+
RESULT_ACTION_ENABLED = "result-action-enabled",
|
|
240
|
+
RESULT_DISPLAY = "result-display",
|
|
241
|
+
RESULT_CTA_ENABLED = "result-cta-enabled",
|
|
242
|
+
RESULT_CTA_MESSAGE = "result-cta-message",
|
|
243
|
+
DISPLAY_STATS = "display-stats"
|
|
244
|
+
}
|
|
245
|
+
export interface PollGridAttributesHTMLElement {
|
|
246
|
+
['poll-data']?: PollGridData | null;
|
|
247
|
+
['current-user-participation']?: ExperienceParticipationFragment | null;
|
|
248
|
+
['show-skeleton']?: boolean | string;
|
|
249
|
+
['is-loading']?: boolean | string;
|
|
250
|
+
['is-disabled']?: boolean | string;
|
|
251
|
+
['vote-action-enabled']?: boolean | string;
|
|
252
|
+
['vote-display']?: boolean | string;
|
|
253
|
+
['vote-cta-enabled']?: boolean | string;
|
|
254
|
+
['vote-cta-message']?: string | null;
|
|
255
|
+
['result-action-enabled']?: boolean | string;
|
|
256
|
+
['result-display']?: boolean | string;
|
|
257
|
+
['result-cta-enabled']?: boolean | string;
|
|
258
|
+
['result-cta-message']?: string | null;
|
|
259
|
+
['display-stats']?: boolean | string;
|
|
260
|
+
}
|
|
261
|
+
export interface PollGridAttributesComponent {
|
|
262
|
+
pollData?: PollGridData | null;
|
|
263
|
+
currentUserParticipation?: ExperienceParticipationFragment | null;
|
|
264
|
+
showSkeleton?: boolean;
|
|
265
|
+
isLoading?: boolean;
|
|
266
|
+
isDisabled?: boolean;
|
|
267
|
+
voteActionEnabled?: boolean;
|
|
268
|
+
voteDisplay?: boolean;
|
|
269
|
+
voteCtaEnabled?: boolean;
|
|
270
|
+
voteCtaMessage?: string | null;
|
|
271
|
+
resultActionEnabled?: boolean;
|
|
272
|
+
resultDisplay?: boolean;
|
|
273
|
+
resultCtaEnabled?: boolean;
|
|
274
|
+
resultCtaMessage?: string | null;
|
|
275
|
+
displayStats?: boolean;
|
|
276
|
+
}
|
|
277
|
+
export interface PollGridWidget {
|
|
278
|
+
name: EgyEntities.EGY_POLL_GRID;
|
|
279
|
+
slots: Array<PollSlotValues>;
|
|
280
|
+
attributes: Array<`${PollGridAttributes}`>;
|
|
281
|
+
}
|
|
214
282
|
/**
|
|
215
283
|
* MAKE SURE TO UPDATE THE TYPES IN THE FOLLOWING PLACES WHEN CHANGING ATTRS:
|
|
216
284
|
* - PollSliderAttributesHTMLElement
|
|
@@ -17,6 +17,7 @@ export declare enum DsmDiscussionState {
|
|
|
17
17
|
export declare enum DsmFeatureName {
|
|
18
18
|
Comment = "COMMENT",
|
|
19
19
|
CommentaryRead = "COMMENTARY_READ",
|
|
20
|
+
Ignore = "IGNORE",
|
|
20
21
|
InstantContext = "INSTANT_CONTEXT",
|
|
21
22
|
MyProfile = "MY_PROFILE",
|
|
22
23
|
Profile = "PROFILE",
|
|
@@ -68,12 +69,6 @@ export declare enum PageStatus {
|
|
|
68
69
|
Full = "FULL",
|
|
69
70
|
Partial = "PARTIAL"
|
|
70
71
|
}
|
|
71
|
-
export declare enum TieBreakerSort {
|
|
72
|
-
CreatedAtAsc = "CREATED_AT_ASC",
|
|
73
|
-
CreatedAtDesc = "CREATED_AT_DESC",
|
|
74
|
-
IdAsc = "ID_ASC",
|
|
75
|
-
IdDesc = "ID_DESC"
|
|
76
|
-
}
|
|
77
72
|
export declare enum UserDeletionStatus {
|
|
78
73
|
Completed = "COMPLETED",
|
|
79
74
|
InProgress = "IN_PROGRESS",
|
package/dist/i18n/i18n.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare const defaultResources: {
|
|
|
31
31
|
comment_other: string;
|
|
32
32
|
commentary: string;
|
|
33
33
|
commentary_other: string;
|
|
34
|
+
confirm: string;
|
|
34
35
|
"copy-to-clipboard": string;
|
|
35
36
|
"date-and-time": string;
|
|
36
37
|
edited: string;
|
|
@@ -64,13 +65,20 @@ export declare const defaultResources: {
|
|
|
64
65
|
title_one: string;
|
|
65
66
|
title_other: string;
|
|
66
67
|
};
|
|
67
|
-
limit: {
|
|
68
|
+
"bookmark-limit": {
|
|
69
|
+
message: string;
|
|
70
|
+
};
|
|
71
|
+
"ignore-user-limit": {
|
|
68
72
|
message: string;
|
|
69
73
|
};
|
|
70
74
|
"no-bookmarks": {
|
|
71
75
|
message: string;
|
|
72
76
|
title: string;
|
|
73
77
|
};
|
|
78
|
+
"no-ignored-users": {
|
|
79
|
+
message: string;
|
|
80
|
+
title: string;
|
|
81
|
+
};
|
|
74
82
|
"no-comments": {
|
|
75
83
|
message: string;
|
|
76
84
|
title: string;
|
|
@@ -83,6 +91,9 @@ export declare const defaultResources: {
|
|
|
83
91
|
active: string;
|
|
84
92
|
deletable: string;
|
|
85
93
|
};
|
|
94
|
+
ignore: string;
|
|
95
|
+
unignore: string;
|
|
96
|
+
"ignore-hint": string;
|
|
86
97
|
edit: string;
|
|
87
98
|
delete: string;
|
|
88
99
|
moderate: string;
|
|
@@ -173,6 +184,7 @@ export declare const defaultResources: {
|
|
|
173
184
|
tabs: {
|
|
174
185
|
comments: string;
|
|
175
186
|
bookmarks: string;
|
|
187
|
+
"ignored-users": string;
|
|
176
188
|
};
|
|
177
189
|
};
|
|
178
190
|
settings: {
|
|
@@ -233,6 +245,9 @@ export declare const defaultResources: {
|
|
|
233
245
|
SHARE: {
|
|
234
246
|
"call-to-action": string;
|
|
235
247
|
};
|
|
248
|
+
IGNORE: {
|
|
249
|
+
"call-to-action": string;
|
|
250
|
+
};
|
|
236
251
|
};
|
|
237
252
|
interpolation: {
|
|
238
253
|
comment: string;
|
|
@@ -302,6 +317,7 @@ export declare const defaultResources: {
|
|
|
302
317
|
comment_other: string;
|
|
303
318
|
commentary: string;
|
|
304
319
|
commentary_other: string;
|
|
320
|
+
confirm: string;
|
|
305
321
|
"copy-to-clipboard": string;
|
|
306
322
|
"date-and-time": string;
|
|
307
323
|
edited: string;
|
|
@@ -335,13 +351,20 @@ export declare const defaultResources: {
|
|
|
335
351
|
title_one: string;
|
|
336
352
|
title_other: string;
|
|
337
353
|
};
|
|
338
|
-
limit: {
|
|
354
|
+
"bookmark-limit": {
|
|
355
|
+
message: string;
|
|
356
|
+
};
|
|
357
|
+
"ignore-user-limit": {
|
|
339
358
|
message: string;
|
|
340
359
|
};
|
|
341
360
|
"no-bookmarks": {
|
|
342
361
|
message: string;
|
|
343
362
|
title: string;
|
|
344
363
|
};
|
|
364
|
+
"no-ignored-users": {
|
|
365
|
+
message: string;
|
|
366
|
+
title: string;
|
|
367
|
+
};
|
|
345
368
|
"no-comments": {
|
|
346
369
|
message: string;
|
|
347
370
|
title: string;
|
|
@@ -354,6 +377,9 @@ export declare const defaultResources: {
|
|
|
354
377
|
active: string;
|
|
355
378
|
deletable: string;
|
|
356
379
|
};
|
|
380
|
+
ignore: string;
|
|
381
|
+
unignore: string;
|
|
382
|
+
"ignore-hint": string;
|
|
357
383
|
edit: string;
|
|
358
384
|
delete: string;
|
|
359
385
|
moderate: string;
|
|
@@ -443,6 +469,7 @@ export declare const defaultResources: {
|
|
|
443
469
|
tabs: {
|
|
444
470
|
comments: string;
|
|
445
471
|
bookmarks: string;
|
|
472
|
+
"ignored-users": string;
|
|
446
473
|
};
|
|
447
474
|
};
|
|
448
475
|
settings: {
|
|
@@ -503,6 +530,9 @@ export declare const defaultResources: {
|
|
|
503
530
|
SHARE: {
|
|
504
531
|
"call-to-action": string;
|
|
505
532
|
};
|
|
533
|
+
IGNORE: {
|
|
534
|
+
"call-to-action": string;
|
|
535
|
+
};
|
|
506
536
|
};
|
|
507
537
|
interpolation: {
|
|
508
538
|
comment: string;
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
DiscussionAttributesComponent,
|
|
10
10
|
PollAttributesComponent,
|
|
11
11
|
PollBarAttributesHTMLElement,
|
|
12
|
+
PollGridAttributesHTMLElement,
|
|
12
13
|
PollSliderAttributesHTMLElement,
|
|
13
14
|
} from '../common/_types/WidgetDefinitions';
|
|
14
15
|
|
|
@@ -24,6 +25,7 @@ export {
|
|
|
24
25
|
DiscussionAttributesComponent,
|
|
25
26
|
PollAttributesComponent,
|
|
26
27
|
PollBarAttributesHTMLElement,
|
|
28
|
+
PollGridAttributesHTMLElement,
|
|
27
29
|
PollSliderAttributesHTMLElement,
|
|
28
30
|
};
|
|
29
31
|
|
|
@@ -56,6 +58,10 @@ declare global {
|
|
|
56
58
|
React.HTMLAttributes<HTMLElement> & PollBarAttributesHTMLElement,
|
|
57
59
|
HTMLElement
|
|
58
60
|
>;
|
|
61
|
+
'egy-poll-grid': React.DetailedHTMLProps<
|
|
62
|
+
React.HTMLAttributes<HTMLElement> & PollGridAttributesHTMLElement,
|
|
63
|
+
HTMLElement
|
|
64
|
+
>;
|
|
59
65
|
'egy-poll-slider': React.DetailedHTMLProps<
|
|
60
66
|
React.HTMLAttributes<HTMLElement> & PollSliderAttributesHTMLElement,
|
|
61
67
|
HTMLElement
|
package/dist/ui/core/_types.d.ts
CHANGED
|
@@ -20,6 +20,25 @@ export type PollBarChoice = {
|
|
|
20
20
|
clicks: number;
|
|
21
21
|
};
|
|
22
22
|
} | null;
|
|
23
|
+
/** Poll Data for the PollGrid widget */
|
|
24
|
+
export type PollGridData = {
|
|
25
|
+
question?: {
|
|
26
|
+
id?: string | null;
|
|
27
|
+
text?: string | null;
|
|
28
|
+
};
|
|
29
|
+
choices?: Array<PollGridChoice> | null;
|
|
30
|
+
stats: {
|
|
31
|
+
clicks: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type PollGridChoice = {
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
imageUrl?: string | null;
|
|
38
|
+
stats: {
|
|
39
|
+
clicks: number;
|
|
40
|
+
};
|
|
41
|
+
} | null;
|
|
23
42
|
/** Poll Data for the PollSlider widget */
|
|
24
43
|
export type ChartData = {
|
|
25
44
|
question?: {
|