@engagently/types 4.2.0 → 4.3.0
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
|
|
@@ -68,12 +68,6 @@ export declare enum PageStatus {
|
|
|
68
68
|
Full = "FULL",
|
|
69
69
|
Partial = "PARTIAL"
|
|
70
70
|
}
|
|
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
71
|
export declare enum UserDeletionStatus {
|
|
78
72
|
Completed = "COMPLETED",
|
|
79
73
|
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: {
|
|
@@ -302,6 +314,7 @@ export declare const defaultResources: {
|
|
|
302
314
|
comment_other: string;
|
|
303
315
|
commentary: string;
|
|
304
316
|
commentary_other: string;
|
|
317
|
+
confirm: string;
|
|
305
318
|
"copy-to-clipboard": string;
|
|
306
319
|
"date-and-time": string;
|
|
307
320
|
edited: string;
|
|
@@ -335,13 +348,20 @@ export declare const defaultResources: {
|
|
|
335
348
|
title_one: string;
|
|
336
349
|
title_other: string;
|
|
337
350
|
};
|
|
338
|
-
limit: {
|
|
351
|
+
"bookmark-limit": {
|
|
352
|
+
message: string;
|
|
353
|
+
};
|
|
354
|
+
"ignore-user-limit": {
|
|
339
355
|
message: string;
|
|
340
356
|
};
|
|
341
357
|
"no-bookmarks": {
|
|
342
358
|
message: string;
|
|
343
359
|
title: string;
|
|
344
360
|
};
|
|
361
|
+
"no-ignored-users": {
|
|
362
|
+
message: string;
|
|
363
|
+
title: string;
|
|
364
|
+
};
|
|
345
365
|
"no-comments": {
|
|
346
366
|
message: string;
|
|
347
367
|
title: string;
|
|
@@ -354,6 +374,9 @@ export declare const defaultResources: {
|
|
|
354
374
|
active: string;
|
|
355
375
|
deletable: string;
|
|
356
376
|
};
|
|
377
|
+
ignore: string;
|
|
378
|
+
unignore: string;
|
|
379
|
+
"ignore-hint": string;
|
|
357
380
|
edit: string;
|
|
358
381
|
delete: string;
|
|
359
382
|
moderate: string;
|
|
@@ -443,6 +466,7 @@ export declare const defaultResources: {
|
|
|
443
466
|
tabs: {
|
|
444
467
|
comments: string;
|
|
445
468
|
bookmarks: string;
|
|
469
|
+
"ignored-users": string;
|
|
446
470
|
};
|
|
447
471
|
};
|
|
448
472
|
settings: {
|
|
@@ -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?: {
|