@engagently/types 5.5.1 → 7.0.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.
@@ -9,7 +9,8 @@ export declare enum ExperienceCallBackNames {
9
9
  POLL_BAR = "POLL_BAR",
10
10
  POLL_GRID = "POLL_GRID",
11
11
  POLL_SLIDER = "POLL_SLIDER",
12
- QUIZ_BAR = "QUIZ_BAR"
12
+ QUIZ_BAR = "QUIZ_BAR",
13
+ DEBATE_POLL = "DEBATE_POLL"
13
14
  }
14
15
  export type CallbackFn = (data: {
15
16
  from: EgyEntities;
@@ -1,6 +1,7 @@
1
1
  import type { VNode } from 'preact';
2
2
  import type { ExperienceParticipationFragment } from '../../widgets/src/poll/data/ExperienceFragments.generated';
3
- import type { PollBarData, PollGridData, ChartData, PollStats, QuizBarData, QuizStats, QuizQuestionStats } from '../../ui/core/_types';
3
+ import type { ExmParticipationFragment } from '../../widgets/src/debate/data/ParticipationFragment.generated';
4
+ import type { PollBarData, PollGridData, ChartData, PollStats, QuizBarData, QuizStats, QuizQuestionStats, DebatePollData, DebateStats } from '../../ui/core/_types';
4
5
  /**
5
6
  * Type Definitions for all available entities
6
7
  *
@@ -13,6 +14,10 @@ import type { PollBarData, PollGridData, ChartData, PollStats, QuizBarData, Quiz
13
14
  export declare enum EgyEntities {
14
15
  EGY_TS = "engagently.ts",
15
16
  EGY_DISCUSSION = "egy-discussion",
17
+ EGY_DEBATE = "egy-debate",
18
+ EGY_DEBATES = "egy-debates",
19
+ EGY_DEBATE_PREVIEW = "egy-debate-preview",
20
+ EGY_DEBATE_POLL = "egy-debate-poll",
16
21
  EGY_QUIZ = "egy-quiz",
17
22
  EGY_QUIZ_BAR = "egy-quiz-bar",
18
23
  EGY_POLL = "egy-poll",
@@ -123,6 +128,167 @@ export type CommentaryActionPlacements = {
123
128
  menu?: Array<`${DiscussionCommentaryActions}`>;
124
129
  };
125
130
  export declare const DEFAULT_COMMENT_ACTIONS_PLACEMENTS: CommentaryActionPlacements;
131
+ export declare enum DebateAttributes {
132
+ DEBATE_ID = "debateId"
133
+ }
134
+ export type DebateAttributesHTMLElement = {
135
+ 'debate-id': string;
136
+ };
137
+ export type DebateAttributesComponent = {
138
+ debateId: string;
139
+ };
140
+ export declare enum DebateIconSlots {
141
+ VISITS_ICON = "visitsIcon",
142
+ PARTICIPATIONS_ICON = "participationsIcon",
143
+ USER_ICON = "userIcon",
144
+ SETTINGS_ICON = "settingsIcon",
145
+ REPLY_ICON = "replyIcon",
146
+ REACTION1 = "reaction1",
147
+ REACTION1_active = "reaction1_active",
148
+ REACTION2 = "reaction2",
149
+ REACTION2_active = "reaction2_active",
150
+ REPLIES_TOGGLE_ICON_open = "repliesToggleIcon_open",
151
+ REPLIES_TOGGLE_ICON_closed = "repliesToggleIcon_closed"
152
+ }
153
+ export declare enum DebateSlots {
154
+ CUSTOM_CALL_TO_ACTION = "customCallToAction"
155
+ }
156
+ export declare enum DebateMessagesSlots {
157
+ DEBATE_CLOSED = "messages_debateClosed",
158
+ DEBATE_FINISHED = "messages_debateFinished",
159
+ DEBATE_GLOBAL_CLOSED = "messages_debateGlobalClosed",
160
+ DEBATE_PREAMBLE = "messages_debatePreamble",
161
+ LOG_IN_TO_COMMENT = "messages_logInToComment",
162
+ USER_SANCTION_BLOCK = "messages_userSanctionBlock",
163
+ USER_SANCTION_BLOCK_UNTIL = "messages_userSanctionBlockUntil",
164
+ USER_SANCTION_WARN = "messages_userSanctionWarn",
165
+ USERNAME_CHANGE = "messages_usernameChange",
166
+ USERNAME_CHANGE_PRESCRIBED = "messages_usernameChangePrescribed",
167
+ VOTE_TO_DEBATE = "messages_voteToDebate"
168
+ }
169
+ export type DebateSlotValues = `${SharedSlots}` | `${DebateIconSlots}` | `${DebateSlots}` | `${DebateMessagesSlots}`;
170
+ export interface DebateWidget {
171
+ name: EgyEntities.EGY_DEBATE;
172
+ attributes: Array<`${DebateAttributes}`>;
173
+ slots: Array<DebateSlotValues>;
174
+ }
175
+ export declare enum DebatesAttributes {
176
+ COUNT = "count",
177
+ TARGET = "target"
178
+ }
179
+ export type DebatesAttributesHTMLElement = {
180
+ count?: string;
181
+ target?: '_blank' | '_self';
182
+ };
183
+ export type DebatesAttributesComponent = {
184
+ count?: string;
185
+ target?: '_blank' | '_self';
186
+ };
187
+ export interface DebatesWidget {
188
+ name: EgyEntities.EGY_DEBATES;
189
+ attributes: Array<`${DebatesAttributes}`>;
190
+ slots: Array<DebateSlotValues>;
191
+ }
192
+ export type DebatesSlotValues = `${SharedSlots}`;
193
+ export declare enum DebatePreviewAttributes {
194
+ DEBATE_ID = "debate-id",
195
+ JSON_URL = "json-url",
196
+ TARGET = "target"
197
+ }
198
+ export type DebatePreviewAttributesHTMLElement = {
199
+ 'debate-id'?: string;
200
+ 'json-url'?: string;
201
+ target?: '_blank' | '_self';
202
+ };
203
+ export type DebatePreviewAttributesComponent = {
204
+ debateId?: string;
205
+ jsonUrl?: string;
206
+ target?: '_blank' | '_self';
207
+ };
208
+ export interface DebatePreviewWidget {
209
+ name: EgyEntities.EGY_DEBATE_PREVIEW;
210
+ attributes: Array<`${DebatePreviewAttributes}`>;
211
+ }
212
+ export type DebatePreviewSlotValues = `${SharedSlots}`;
213
+ export declare enum DebatePollEvents {
214
+ INIT = "egy-debate-poll:init",
215
+ VOTE = "egy-debate-poll:vote"
216
+ }
217
+ export declare enum DebatePollAttributes {
218
+ POLL_DATA = "poll-data",
219
+ CURRENT_USER_PARTICIPATION = "current-user-participation",
220
+ SHOW_SKELETON = "show-skeleton",
221
+ IS_LOADING = "is-loading",
222
+ IS_DISABLED = "is-disabled",
223
+ VOTE_ACTION_ENABLED = "vote-action-enabled",
224
+ VOTE_DISPLAY = "vote-display",
225
+ VOTE_CTA_ENABLED = "vote-cta-enabled",
226
+ VOTE_CTA_MESSAGE = "vote-cta-message",
227
+ RESULT_ACTION_ENABLED = "result-action-enabled",
228
+ RESULT_DISPLAY = "result-display",
229
+ RESULT_CTA_ENABLED = "result-cta-enabled",
230
+ RESULT_CTA_MESSAGE = "result-cta-message",
231
+ DISPLAY_STATS = "display-stats",
232
+ STATS = "stats",
233
+ SHOW_VISITS = "show-visits",
234
+ SHOW_PARTICIPATIONS = "show-participations",
235
+ COLOR_SCHEME = "color-scheme"
236
+ }
237
+ export interface DebatePollWidgetEvents {
238
+ [DebatePollEvents.INIT]: CustomEvent<{
239
+ entity: EgyEntities;
240
+ }>;
241
+ [DebatePollEvents.VOTE]: CustomEvent<{
242
+ optionId?: string;
243
+ value?: number;
244
+ entity: EgyEntities;
245
+ }>;
246
+ }
247
+ export type DebatePollAttributesHTMLElement = {
248
+ 'poll-data'?: DebatePollData | null;
249
+ 'current-user-participation'?: ExmParticipationFragment | null;
250
+ 'show-skeleton'?: boolean | string;
251
+ 'is-loading'?: boolean | string;
252
+ 'is-disabled'?: boolean | string;
253
+ 'vote-action-enabled'?: boolean | string;
254
+ 'vote-display'?: boolean | string;
255
+ 'vote-cta-enabled'?: boolean | string;
256
+ 'vote-cta-message'?: string | null;
257
+ 'result-action-enabled'?: boolean | string;
258
+ 'result-display'?: boolean | string;
259
+ 'result-cta-enabled'?: boolean | string;
260
+ 'result-cta-message'?: string | null;
261
+ 'display-stats'?: boolean | string;
262
+ stats?: DebateStats | null;
263
+ 'show-visits'?: boolean | string;
264
+ 'show-participations'?: boolean | string;
265
+ 'color-scheme'?: string;
266
+ };
267
+ export type DebatePollAttributesComponent = {
268
+ colorScheme?: 'dark' | 'light';
269
+ currentUserParticipation?: ExmParticipationFragment | null;
270
+ displayStats?: boolean;
271
+ isDisabled?: boolean;
272
+ isLoading?: boolean;
273
+ pollData?: DebatePollData | null;
274
+ resultActionEnabled?: boolean;
275
+ resultCtaEnabled?: boolean;
276
+ resultCtaMessage?: string | null;
277
+ resultDisplay?: boolean;
278
+ showParticipations?: boolean;
279
+ showSkeleton?: boolean;
280
+ showVisits?: boolean;
281
+ stats?: DebateStats | null;
282
+ voteActionEnabled?: boolean;
283
+ voteCtaEnabled?: boolean;
284
+ voteCtaMessage?: string | null;
285
+ voteDisplay?: boolean;
286
+ };
287
+ export interface DebatePollWidget {
288
+ name: EgyEntities.EGY_DEBATE_POLL;
289
+ attributes: Array<`${DebatePollAttributes}`>;
290
+ slots: Array<DebateSlotValues>;
291
+ }
126
292
  /**
127
293
  * MAKE SURE TO UPDATE THE TYPES IN THE FOLLOWING PLACES WHEN CHANGING ATTRS:
128
294
  * - PollAttributesHTMLElement
@@ -59,8 +59,13 @@ export declare enum EgyAssetState {
59
59
  Inactive = "INACTIVE"
60
60
  }
61
61
  export declare enum EgyAssetType {
62
+ Debate = "DEBATE",
62
63
  Discussion = "DISCUSSION"
63
64
  }
65
+ export declare enum ExmDebatesSort {
66
+ PublishedAtAsc = "PUBLISHED_AT_ASC",
67
+ PublishedAtDesc = "PUBLISHED_AT_DESC"
68
+ }
64
69
  export declare enum ExmExperienceParticipation {
65
70
  Anonymous = "ANONYMOUS",
66
71
  Any = "ANY",
@@ -72,9 +77,9 @@ export declare enum ExmExperienceSummaryAnimation {
72
77
  Flash = "FLASH"
73
78
  }
74
79
  export declare enum ExmExperienceTypeName {
80
+ Debate = "DEBATE",
75
81
  Poll = "POLL",
76
- Quiz = "QUIZ",
77
- Survey = "SURVEY"
82
+ Quiz = "QUIZ"
78
83
  }
79
84
  export declare enum ExmQuestionChoiceType {
80
85
  Bucket = "BUCKET",
@@ -65,6 +65,60 @@ export declare const defaultResources: {
65
65
  vote: string;
66
66
  vote_other: string;
67
67
  "are-you-sure": string;
68
+ aria: {
69
+ "scroll-left": string;
70
+ "scroll-right": string;
71
+ };
72
+ };
73
+ readonly debate: {
74
+ "thank-you-for-vote": string;
75
+ "call-to-action": string;
76
+ "live-poll": string;
77
+ "load-more-debates": string;
78
+ viewed: string;
79
+ vote_one: string;
80
+ vote_other: string;
81
+ "no-debates": string;
82
+ "desc-header": string;
83
+ "your-vote-heading": string;
84
+ "all-arguments": string;
85
+ "filter-by": string;
86
+ "back-to-debate": string;
87
+ "aria-labels": {
88
+ "positive-sentiment": string;
89
+ "negative-sentiment": string;
90
+ };
91
+ option_one: string;
92
+ option_other: string;
93
+ placeholders: {
94
+ "new-commentary": string;
95
+ };
96
+ "no-arguments-yet": string;
97
+ inactive: string;
98
+ "current-debates": string;
99
+ filters: {
100
+ ALL: {
101
+ title: string;
102
+ description: string;
103
+ };
104
+ ACTIVE: {
105
+ title: string;
106
+ description: string;
107
+ };
108
+ PUBLISHED_AT_DESC: {
109
+ title: string;
110
+ description: string;
111
+ };
112
+ PUBLISHED_AT_ASC: {
113
+ title: string;
114
+ description: string;
115
+ };
116
+ };
117
+ labels: {
118
+ "filter-debates": string;
119
+ "sort-debates": string;
120
+ };
121
+ voted: string;
68
122
  };
69
123
  readonly discussions: {
70
124
  alerts: {
@@ -294,6 +348,8 @@ export declare const defaultResources: {
294
348
  conversations: string;
295
349
  discussion: string;
296
350
  discussions: string;
351
+ debate: string;
352
+ debates: string;
297
353
  list: string;
298
354
  lists: string;
299
355
  message: string;
@@ -311,6 +367,10 @@ export declare const defaultResources: {
311
367
  participations: string;
312
368
  };
313
369
  readonly messages: {
370
+ "debate-closed": string;
371
+ "debate-global-closed": string;
372
+ "debate-finished": string;
373
+ "debate-preamble": string;
314
374
  "discussion-closed": string;
315
375
  "discussion-global-closed": string;
316
376
  "discussion-live-closed": string;
@@ -326,6 +386,7 @@ export declare const defaultResources: {
326
386
  NEEDS_VERIFIED_EMAIL: string;
327
387
  };
328
388
  };
389
+ "vote-to-debate": string;
329
390
  };
330
391
  readonly poll: {
331
392
  "thank-you-for-vote": string;
@@ -411,6 +472,60 @@ export declare const defaultResources: {
411
472
  vote: string;
412
473
  vote_other: string;
413
474
  "are-you-sure": string;
475
+ aria: {
476
+ "scroll-left": string;
477
+ "scroll-right": string;
478
+ };
479
+ };
480
+ readonly debate: {
481
+ "thank-you-for-vote": string;
482
+ "call-to-action": string;
483
+ "live-poll": string;
484
+ "load-more-debates": string;
485
+ viewed: string;
486
+ vote_one: string;
487
+ vote_other: string;
488
+ "no-debates": string;
489
+ "desc-header": string;
490
+ "your-vote-heading": string;
491
+ "all-arguments": string;
492
+ "filter-by": string;
493
+ "back-to-debate": string;
494
+ "aria-labels": {
495
+ "positive-sentiment": string;
496
+ "negative-sentiment": string;
497
+ };
498
+ option_one: string;
499
+ option_other: string;
500
+ placeholders: {
501
+ "new-commentary": string;
502
+ };
503
+ "no-arguments-yet": string;
504
+ inactive: string;
505
+ "current-debates": string;
506
+ filters: {
507
+ ALL: {
508
+ title: string;
509
+ description: string;
510
+ };
511
+ ACTIVE: {
512
+ title: string;
513
+ description: string;
514
+ };
515
+ PUBLISHED_AT_DESC: {
516
+ title: string;
517
+ description: string;
518
+ };
519
+ PUBLISHED_AT_ASC: {
520
+ title: string;
521
+ description: string;
522
+ };
523
+ };
524
+ labels: {
525
+ "filter-debates": string;
526
+ "sort-debates": string;
527
+ };
528
+ voted: string;
414
529
  };
415
530
  readonly discussions: {
416
531
  alerts: {
@@ -639,6 +754,8 @@ export declare const defaultResources: {
639
754
  conversations: string;
640
755
  discussion: string;
641
756
  discussions: string;
757
+ debate: string;
758
+ debates: string;
642
759
  list: string;
643
760
  lists: string;
644
761
  message: string;
@@ -656,6 +773,10 @@ export declare const defaultResources: {
656
773
  participations: string;
657
774
  };
658
775
  readonly messages: {
776
+ "debate-closed": string;
777
+ "debate-global-closed": string;
778
+ "debate-finished": string;
779
+ "debate-preamble": string;
659
780
  "discussion-closed": string;
660
781
  "discussion-global-closed": string;
661
782
  "discussion-live-closed": string;
@@ -671,6 +792,7 @@ export declare const defaultResources: {
671
792
  NEEDS_VERIFIED_EMAIL: string;
672
793
  };
673
794
  };
795
+ "vote-to-debate": string;
674
796
  };
675
797
  readonly poll: {
676
798
  "thank-you-for-vote": string;
@@ -758,6 +880,60 @@ declare const resources: {
758
880
  vote: string;
759
881
  vote_other: string;
760
882
  "are-you-sure": string;
883
+ aria: {
884
+ "scroll-left": string;
885
+ "scroll-right": string;
886
+ };
887
+ };
888
+ readonly debate: {
889
+ "thank-you-for-vote": string;
890
+ "call-to-action": string;
891
+ "live-poll": string;
892
+ "load-more-debates": string;
893
+ viewed: string;
894
+ vote_one: string;
895
+ vote_other: string;
896
+ "no-debates": string;
897
+ "desc-header": string;
898
+ "your-vote-heading": string;
899
+ "all-arguments": string;
900
+ "filter-by": string;
901
+ "back-to-debate": string;
902
+ "aria-labels": {
903
+ "positive-sentiment": string;
904
+ "negative-sentiment": string;
905
+ };
906
+ option_one: string;
907
+ option_other: string;
908
+ placeholders: {
909
+ "new-commentary": string;
910
+ };
911
+ "no-arguments-yet": string;
912
+ inactive: string;
913
+ "current-debates": string;
914
+ filters: {
915
+ ALL: {
916
+ title: string;
917
+ description: string;
918
+ };
919
+ ACTIVE: {
920
+ title: string;
921
+ description: string;
922
+ };
923
+ PUBLISHED_AT_DESC: {
924
+ title: string;
925
+ description: string;
926
+ };
927
+ PUBLISHED_AT_ASC: {
928
+ title: string;
929
+ description: string;
930
+ };
931
+ };
932
+ labels: {
933
+ "filter-debates": string;
934
+ "sort-debates": string;
935
+ };
936
+ voted: string;
761
937
  };
762
938
  readonly discussions: {
763
939
  alerts: {
@@ -987,6 +1163,8 @@ declare const resources: {
987
1163
  conversations: string;
988
1164
  discussion: string;
989
1165
  discussions: string;
1166
+ debate: string;
1167
+ debates: string;
990
1168
  list: string;
991
1169
  lists: string;
992
1170
  message: string;
@@ -1004,6 +1182,10 @@ declare const resources: {
1004
1182
  participations: string;
1005
1183
  };
1006
1184
  readonly messages: {
1185
+ "debate-closed": string;
1186
+ "debate-global-closed": string;
1187
+ "debate-finished": string;
1188
+ "debate-preamble": string;
1007
1189
  "discussion-closed": string;
1008
1190
  "discussion-global-closed": string;
1009
1191
  "discussion-live-closed": string;
@@ -1019,6 +1201,7 @@ declare const resources: {
1019
1201
  NEEDS_VERIFIED_EMAIL: string;
1020
1202
  };
1021
1203
  };
1204
+ "vote-to-debate": string;
1022
1205
  };
1023
1206
  readonly poll: {
1024
1207
  "thank-you-for-vote": string;
@@ -1104,6 +1287,60 @@ declare const resources: {
1104
1287
  vote: string;
1105
1288
  vote_other: string;
1106
1289
  "are-you-sure": string;
1290
+ aria: {
1291
+ "scroll-left": string;
1292
+ "scroll-right": string;
1293
+ };
1294
+ };
1295
+ readonly debate: {
1296
+ "thank-you-for-vote": string;
1297
+ "call-to-action": string;
1298
+ "live-poll": string;
1299
+ "load-more-debates": string;
1300
+ viewed: string;
1301
+ vote_one: string;
1302
+ vote_other: string;
1303
+ "no-debates": string;
1304
+ "desc-header": string;
1305
+ "your-vote-heading": string;
1306
+ "all-arguments": string;
1307
+ "filter-by": string;
1308
+ "back-to-debate": string;
1309
+ "aria-labels": {
1310
+ "positive-sentiment": string;
1311
+ "negative-sentiment": string;
1312
+ };
1313
+ option_one: string;
1314
+ option_other: string;
1315
+ placeholders: {
1316
+ "new-commentary": string;
1317
+ };
1318
+ "no-arguments-yet": string;
1319
+ inactive: string;
1320
+ "current-debates": string;
1321
+ filters: {
1322
+ ALL: {
1323
+ title: string;
1324
+ description: string;
1325
+ };
1326
+ ACTIVE: {
1327
+ title: string;
1328
+ description: string;
1329
+ };
1330
+ PUBLISHED_AT_DESC: {
1331
+ title: string;
1332
+ description: string;
1333
+ };
1334
+ PUBLISHED_AT_ASC: {
1335
+ title: string;
1336
+ description: string;
1337
+ };
1338
+ };
1339
+ labels: {
1340
+ "filter-debates": string;
1341
+ "sort-debates": string;
1342
+ };
1343
+ voted: string;
1107
1344
  };
1108
1345
  readonly discussions: {
1109
1346
  alerts: {
@@ -1332,6 +1569,8 @@ declare const resources: {
1332
1569
  conversations: string;
1333
1570
  discussion: string;
1334
1571
  discussions: string;
1572
+ debate: string;
1573
+ debates: string;
1335
1574
  list: string;
1336
1575
  lists: string;
1337
1576
  message: string;
@@ -1349,6 +1588,10 @@ declare const resources: {
1349
1588
  participations: string;
1350
1589
  };
1351
1590
  readonly messages: {
1591
+ "debate-closed": string;
1592
+ "debate-global-closed": string;
1593
+ "debate-finished": string;
1594
+ "debate-preamble": string;
1352
1595
  "discussion-closed": string;
1353
1596
  "discussion-global-closed": string;
1354
1597
  "discussion-live-closed": string;
@@ -1364,6 +1607,7 @@ declare const resources: {
1364
1607
  NEEDS_VERIFIED_EMAIL: string;
1365
1608
  };
1366
1609
  };
1610
+ "vote-to-debate": string;
1367
1611
  };
1368
1612
  readonly poll: {
1369
1613
  "thank-you-for-vote": string;
@@ -3,17 +3,26 @@ import type { HTMLAttributes } from 'vue';
3
3
  import type { Engagently } from '../main/lib/engagently';
4
4
  import { PollEvents, QuizEvents } from '../common/_types/WidgetDefinitions';
5
5
  import type {
6
- PollWidgetEvents,
7
- QuizWidgetEvents,
8
- DiscussionAttributesHTMLElement,
9
- PollAttributesHTMLElement,
6
+ DebateAttributesComponent,
7
+ DebateAttributesHTMLElement,
8
+ DebatePollAttributesComponent,
9
+ DebatePollAttributesHTMLElement,
10
+ DebatePollWidgetEvents,
11
+ DebatePreviewAttributesComponent,
12
+ DebatePreviewAttributesHTMLElement,
13
+ DebatesAttributesComponent,
14
+ DebatesAttributesHTMLElement,
10
15
  DiscussionAttributesComponent,
16
+ DiscussionAttributesHTMLElement,
11
17
  PollAttributesComponent,
18
+ PollAttributesHTMLElement,
12
19
  PollBarAttributesHTMLElement,
13
20
  PollGridAttributesHTMLElement,
14
21
  PollSliderAttributesHTMLElement,
15
- QuizBarAttributesHTMLElement,
22
+ PollWidgetEvents,
16
23
  QuizAttributesHTMLElement,
24
+ QuizBarAttributesHTMLElement,
25
+ QuizWidgetEvents,
17
26
  } from '../common/_types/WidgetDefinitions';
18
27
 
19
28
  ////// exposed types package exports
@@ -21,22 +30,40 @@ import type {
21
30
  declare const webkit: Webkit;
22
31
  export { EngageConfig } from '../common/_types/ConfigDefinition';
23
32
 
24
- export { PollEvents, PollWidgetEvents, QuizEvents, QuizWidgetEvents };
25
33
  export {
26
- DiscussionAttributesHTMLElement,
27
- PollAttributesHTMLElement,
34
+ PollEvents,
35
+ PollWidgetEvents,
36
+ QuizEvents,
37
+ QuizWidgetEvents,
38
+ DebatePollWidgetEvents,
39
+ };
40
+ export {
41
+ DebateAttributesComponent,
42
+ DebateAttributesHTMLElement,
43
+ DebatePollAttributesComponent,
44
+ DebatePollAttributesHTMLElement,
45
+ DebatePreviewAttributesComponent,
46
+ DebatePreviewAttributesHTMLElement,
47
+ DebatesAttributesComponent,
48
+ DebatesAttributesHTMLElement,
28
49
  DiscussionAttributesComponent,
50
+ DiscussionAttributesHTMLElement,
29
51
  PollAttributesComponent,
52
+ PollAttributesHTMLElement,
30
53
  PollBarAttributesHTMLElement,
31
54
  PollGridAttributesHTMLElement,
32
55
  PollSliderAttributesHTMLElement,
33
- QuizBarAttributesHTMLElement,
34
56
  QuizAttributesHTMLElement,
57
+ QuizBarAttributesHTMLElement,
35
58
  };
36
59
 
37
60
  //////
38
61
  declare module 'vue' {
39
62
  export interface GlobalComponents {
63
+ EgyDebate: HTMLAttributes & DebateAttributesComponent;
64
+ EgyDebatePoll: HTMLAttributes & DebatePollAttributesComponent;
65
+ EgyDebatePreview: HTMLAttributes & DebatePreviewAttributesComponent;
66
+ EgyDebates: HTMLAttributes & DebatesAttributesComponent;
40
67
  EgyDiscussion: HTMLAttributes & DiscussionAttributesComponent;
41
68
  EgyPoll: HTMLAttributes & PollAttributesComponent;
42
69
  EgyQuiz: HTMLAttributes & QuizAttributesComponent;
@@ -52,6 +79,22 @@ declare global {
52
79
 
53
80
  namespace JSX {
54
81
  interface IntrinsicElements {
82
+ 'egy-debate': React.DetailedHTMLProps<
83
+ React.HTMLAttributes<HTMLElement> & DebateAttributesHTMLElement,
84
+ HTMLElement
85
+ >;
86
+ 'egy-debate-poll': React.DetailedHTMLProps<
87
+ React.HTMLAttributes<HTMLElement> & DebatePollAttributesHTMLElement,
88
+ HTMLElement
89
+ >;
90
+ 'egy-debate-preview': React.DetailedHTMLProps<
91
+ React.HTMLAttributes<HTMLElement> & DebatePreviewAttributesHTMLElement,
92
+ HTMLElement
93
+ >;
94
+ 'egy-debates': React.DetailedHTMLProps<
95
+ React.HTMLAttributes<HTMLElement> & DebatesAttributesHTMLElement,
96
+ HTMLElement
97
+ >;
55
98
  'egy-discussion': React.DetailedHTMLProps<
56
99
  React.HTMLAttributes<HTMLElement> & DiscussionAttributesHTMLElement,
57
100
  HTMLElement
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * These types will be shared with the ts package
3
3
  */
4
- import type { ExmExperienceSummaryAnimation } from '../../common/lib/api/schema';
4
+ import type { EgyAssetEffectiveState, ExmExperienceSummaryAnimation } from '../../common/lib/api/schema';
5
5
  /** Poll Stats for all poll widgets */
6
6
  export type PollStats = {
7
7
  participations: number;
@@ -104,3 +104,44 @@ export interface QuizStats {
104
104
  participations?: number;
105
105
  visits?: number;
106
106
  }
107
+ /** Poll Data for the Debate Poll widget */
108
+ export type DebatePollData = {
109
+ config: {
110
+ effectiveState?: EgyAssetEffectiveState;
111
+ };
112
+ publishedAt: string;
113
+ id?: string | null;
114
+ url?: string;
115
+ appearance?: {
116
+ imageUrl?: string | null;
117
+ imageCredits?: string | null;
118
+ };
119
+ description?: string | null;
120
+ question?: {
121
+ id?: string | null;
122
+ text?: string | null;
123
+ };
124
+ choices?: Array<DebatePollChoice> | null;
125
+ stats: {
126
+ showParticipations?: boolean;
127
+ participations?: number;
128
+ showVisits?: boolean;
129
+ visits?: number;
130
+ };
131
+ };
132
+ export type DebatePollChoice = {
133
+ id?: string;
134
+ label?: string | null;
135
+ explanation?: string | null;
136
+ color?: string | null;
137
+ stats?: {
138
+ clicks: number;
139
+ comments?: number;
140
+ };
141
+ } | null;
142
+ export interface DebateStats {
143
+ showParticipations?: boolean;
144
+ participations?: number;
145
+ showVisits?: boolean;
146
+ visits?: number;
147
+ }
@@ -44,6 +44,7 @@ export type ThemePalette = {
44
44
  primary: string;
45
45
  secondary: string;
46
46
  hint: string;
47
+ base: string;
47
48
  };
48
49
  black: string;
49
50
  white: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engagently/types",
3
- "version": "5.5.1",
3
+ "version": "7.0.0",
4
4
  "main": "./index.ts",
5
5
  "types": "dist/types/engagently.d.ts",
6
6
  "files": [