@engagently/types 4.1.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,12 +55,15 @@ 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;
62
+ LIST_COMMENTARIES_SIZE_ANONYMOUS: number;
60
63
  LIST_MORE_COMMENTARIES_SIZE: number;
61
64
  PREAMBLE_ENABLED: boolean;
62
65
  THREAD_COMMENTS_SIZE: number;
66
+ THREAD_COMMENTS_SIZE_ANONYMOUS: number;
63
67
  THREAD_INCLUDE_TOMBSTONES: boolean;
64
68
  THREAD_MORE_COMMENTS_SIZE: number;
65
69
  THREAD_MORE_REPLIES_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",
@@ -20,6 +20,7 @@ export declare const defaultResources: {
20
20
  "go-to-discussion": string;
21
21
  na: string;
22
22
  save: string;
23
+ edit: string;
23
24
  send: string;
24
25
  "show-all-comments": string;
25
26
  view: string;
@@ -30,6 +31,7 @@ export declare const defaultResources: {
30
31
  comment_other: string;
31
32
  commentary: string;
32
33
  commentary_other: string;
34
+ confirm: string;
33
35
  "copy-to-clipboard": string;
34
36
  "date-and-time": string;
35
37
  edited: string;
@@ -63,13 +65,20 @@ export declare const defaultResources: {
63
65
  title_one: string;
64
66
  title_other: string;
65
67
  };
66
- limit: {
68
+ "bookmark-limit": {
69
+ message: string;
70
+ };
71
+ "ignore-user-limit": {
67
72
  message: string;
68
73
  };
69
74
  "no-bookmarks": {
70
75
  message: string;
71
76
  title: string;
72
77
  };
78
+ "no-ignored-users": {
79
+ message: string;
80
+ title: string;
81
+ };
73
82
  "no-comments": {
74
83
  message: string;
75
84
  title: string;
@@ -82,6 +91,9 @@ export declare const defaultResources: {
82
91
  active: string;
83
92
  deletable: string;
84
93
  };
94
+ ignore: string;
95
+ unignore: string;
96
+ "ignore-hint": string;
85
97
  edit: string;
86
98
  delete: string;
87
99
  moderate: string;
@@ -172,6 +184,7 @@ export declare const defaultResources: {
172
184
  tabs: {
173
185
  comments: string;
174
186
  bookmarks: string;
187
+ "ignored-users": string;
175
188
  };
176
189
  };
177
190
  settings: {
@@ -290,6 +303,7 @@ export declare const defaultResources: {
290
303
  "go-to-discussion": string;
291
304
  na: string;
292
305
  save: string;
306
+ edit: string;
293
307
  send: string;
294
308
  "show-all-comments": string;
295
309
  view: string;
@@ -300,6 +314,7 @@ export declare const defaultResources: {
300
314
  comment_other: string;
301
315
  commentary: string;
302
316
  commentary_other: string;
317
+ confirm: string;
303
318
  "copy-to-clipboard": string;
304
319
  "date-and-time": string;
305
320
  edited: string;
@@ -333,13 +348,20 @@ export declare const defaultResources: {
333
348
  title_one: string;
334
349
  title_other: string;
335
350
  };
336
- limit: {
351
+ "bookmark-limit": {
352
+ message: string;
353
+ };
354
+ "ignore-user-limit": {
337
355
  message: string;
338
356
  };
339
357
  "no-bookmarks": {
340
358
  message: string;
341
359
  title: string;
342
360
  };
361
+ "no-ignored-users": {
362
+ message: string;
363
+ title: string;
364
+ };
343
365
  "no-comments": {
344
366
  message: string;
345
367
  title: string;
@@ -352,6 +374,9 @@ export declare const defaultResources: {
352
374
  active: string;
353
375
  deletable: string;
354
376
  };
377
+ ignore: string;
378
+ unignore: string;
379
+ "ignore-hint": string;
355
380
  edit: string;
356
381
  delete: string;
357
382
  moderate: string;
@@ -441,6 +466,7 @@ export declare const defaultResources: {
441
466
  tabs: {
442
467
  comments: string;
443
468
  bookmarks: string;
469
+ "ignored-users": string;
444
470
  };
445
471
  };
446
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
@@ -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?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engagently/types",
3
- "version": "4.1.0",
3
+ "version": "4.3.0",
4
4
  "main": "./index.ts",
5
5
  "types": "dist/types/engagently.d.ts",
6
6
  "files": [