@engagently/types 6.0.0 → 7.0.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.
- package/dist/common/_types/ConfigDefinition.d.ts +2 -1
- package/dist/common/_types/WidgetDefinitions.d.ts +167 -1
- package/dist/common/lib/api/enums.d.ts +9 -2
- package/dist/i18n/i18n.d.ts +252 -0
- package/dist/types/engagently.d.ts +52 -9
- package/dist/ui/core/_types.d.ts +42 -1
- package/dist/ui/themes/config/palette.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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 {
|
|
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
|
|
@@ -4,6 +4,7 @@ export declare enum DsmCommentariesSort {
|
|
|
4
4
|
PopularityDesc = "POPULARITY_DESC"
|
|
5
5
|
}
|
|
6
6
|
export declare enum DsmCommentaryReportReason {
|
|
7
|
+
Behaviour = "BEHAVIOUR",
|
|
7
8
|
Bully = "BULLY",
|
|
8
9
|
Fake = "FAKE",
|
|
9
10
|
Hate = "HATE",
|
|
@@ -14,6 +15,7 @@ export declare enum DsmCommentaryReportReason {
|
|
|
14
15
|
Spam = "SPAM",
|
|
15
16
|
Terms = "TERMS",
|
|
16
17
|
Toxic = "TOXIC",
|
|
18
|
+
Username = "USERNAME",
|
|
17
19
|
Violence = "VIOLENCE"
|
|
18
20
|
}
|
|
19
21
|
export declare enum DsmFeatureName {
|
|
@@ -59,8 +61,13 @@ export declare enum EgyAssetState {
|
|
|
59
61
|
Inactive = "INACTIVE"
|
|
60
62
|
}
|
|
61
63
|
export declare enum EgyAssetType {
|
|
64
|
+
Debate = "DEBATE",
|
|
62
65
|
Discussion = "DISCUSSION"
|
|
63
66
|
}
|
|
67
|
+
export declare enum ExmDebatesSort {
|
|
68
|
+
PublishedAtAsc = "PUBLISHED_AT_ASC",
|
|
69
|
+
PublishedAtDesc = "PUBLISHED_AT_DESC"
|
|
70
|
+
}
|
|
64
71
|
export declare enum ExmExperienceParticipation {
|
|
65
72
|
Anonymous = "ANONYMOUS",
|
|
66
73
|
Any = "ANY",
|
|
@@ -72,9 +79,9 @@ export declare enum ExmExperienceSummaryAnimation {
|
|
|
72
79
|
Flash = "FLASH"
|
|
73
80
|
}
|
|
74
81
|
export declare enum ExmExperienceTypeName {
|
|
82
|
+
Debate = "DEBATE",
|
|
75
83
|
Poll = "POLL",
|
|
76
|
-
Quiz = "QUIZ"
|
|
77
|
-
Survey = "SURVEY"
|
|
84
|
+
Quiz = "QUIZ"
|
|
78
85
|
}
|
|
79
86
|
export declare enum ExmQuestionChoiceType {
|
|
80
87
|
Bucket = "BUCKET",
|
package/dist/i18n/i18n.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -122,6 +176,8 @@ export declare const defaultResources: {
|
|
|
122
176
|
FAKE: string;
|
|
123
177
|
TERMS: string;
|
|
124
178
|
LEGAL: string;
|
|
179
|
+
USERNAME: string;
|
|
180
|
+
BEHAVIOUR: string;
|
|
125
181
|
};
|
|
126
182
|
submitted: string;
|
|
127
183
|
};
|
|
@@ -294,6 +350,8 @@ export declare const defaultResources: {
|
|
|
294
350
|
conversations: string;
|
|
295
351
|
discussion: string;
|
|
296
352
|
discussions: string;
|
|
353
|
+
debate: string;
|
|
354
|
+
debates: string;
|
|
297
355
|
list: string;
|
|
298
356
|
lists: string;
|
|
299
357
|
message: string;
|
|
@@ -311,6 +369,10 @@ export declare const defaultResources: {
|
|
|
311
369
|
participations: string;
|
|
312
370
|
};
|
|
313
371
|
readonly messages: {
|
|
372
|
+
"debate-closed": string;
|
|
373
|
+
"debate-global-closed": string;
|
|
374
|
+
"debate-finished": string;
|
|
375
|
+
"debate-preamble": string;
|
|
314
376
|
"discussion-closed": string;
|
|
315
377
|
"discussion-global-closed": string;
|
|
316
378
|
"discussion-live-closed": string;
|
|
@@ -326,6 +388,7 @@ export declare const defaultResources: {
|
|
|
326
388
|
NEEDS_VERIFIED_EMAIL: string;
|
|
327
389
|
};
|
|
328
390
|
};
|
|
391
|
+
"vote-to-debate": string;
|
|
329
392
|
};
|
|
330
393
|
readonly poll: {
|
|
331
394
|
"thank-you-for-vote": string;
|
|
@@ -411,6 +474,60 @@ export declare const defaultResources: {
|
|
|
411
474
|
vote: string;
|
|
412
475
|
vote_other: string;
|
|
413
476
|
"are-you-sure": string;
|
|
477
|
+
aria: {
|
|
478
|
+
"scroll-left": string;
|
|
479
|
+
"scroll-right": string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
readonly debate: {
|
|
483
|
+
"thank-you-for-vote": string;
|
|
484
|
+
"call-to-action": string;
|
|
485
|
+
"live-poll": string;
|
|
486
|
+
"load-more-debates": string;
|
|
487
|
+
viewed: string;
|
|
488
|
+
vote_one: string;
|
|
489
|
+
vote_other: string;
|
|
490
|
+
"no-debates": string;
|
|
491
|
+
"desc-header": string;
|
|
492
|
+
"your-vote-heading": string;
|
|
493
|
+
"all-arguments": string;
|
|
494
|
+
"filter-by": string;
|
|
495
|
+
"back-to-debate": string;
|
|
496
|
+
"aria-labels": {
|
|
497
|
+
"positive-sentiment": string;
|
|
498
|
+
"negative-sentiment": string;
|
|
499
|
+
};
|
|
500
|
+
option_one: string;
|
|
501
|
+
option_other: string;
|
|
502
|
+
placeholders: {
|
|
503
|
+
"new-commentary": string;
|
|
504
|
+
};
|
|
505
|
+
"no-arguments-yet": string;
|
|
506
|
+
inactive: string;
|
|
507
|
+
"current-debates": string;
|
|
508
|
+
filters: {
|
|
509
|
+
ALL: {
|
|
510
|
+
title: string;
|
|
511
|
+
description: string;
|
|
512
|
+
};
|
|
513
|
+
ACTIVE: {
|
|
514
|
+
title: string;
|
|
515
|
+
description: string;
|
|
516
|
+
};
|
|
517
|
+
PUBLISHED_AT_DESC: {
|
|
518
|
+
title: string;
|
|
519
|
+
description: string;
|
|
520
|
+
};
|
|
521
|
+
PUBLISHED_AT_ASC: {
|
|
522
|
+
title: string;
|
|
523
|
+
description: string;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
labels: {
|
|
527
|
+
"filter-debates": string;
|
|
528
|
+
"sort-debates": string;
|
|
529
|
+
};
|
|
530
|
+
voted: string;
|
|
414
531
|
};
|
|
415
532
|
readonly discussions: {
|
|
416
533
|
alerts: {
|
|
@@ -468,6 +585,8 @@ export declare const defaultResources: {
|
|
|
468
585
|
FAKE: string;
|
|
469
586
|
TERMS: string;
|
|
470
587
|
LEGAL: string;
|
|
588
|
+
USERNAME: string;
|
|
589
|
+
BEHAVIOUR: string;
|
|
471
590
|
};
|
|
472
591
|
submitted: string;
|
|
473
592
|
};
|
|
@@ -639,6 +758,8 @@ export declare const defaultResources: {
|
|
|
639
758
|
conversations: string;
|
|
640
759
|
discussion: string;
|
|
641
760
|
discussions: string;
|
|
761
|
+
debate: string;
|
|
762
|
+
debates: string;
|
|
642
763
|
list: string;
|
|
643
764
|
lists: string;
|
|
644
765
|
message: string;
|
|
@@ -656,6 +777,10 @@ export declare const defaultResources: {
|
|
|
656
777
|
participations: string;
|
|
657
778
|
};
|
|
658
779
|
readonly messages: {
|
|
780
|
+
"debate-closed": string;
|
|
781
|
+
"debate-global-closed": string;
|
|
782
|
+
"debate-finished": string;
|
|
783
|
+
"debate-preamble": string;
|
|
659
784
|
"discussion-closed": string;
|
|
660
785
|
"discussion-global-closed": string;
|
|
661
786
|
"discussion-live-closed": string;
|
|
@@ -671,6 +796,7 @@ export declare const defaultResources: {
|
|
|
671
796
|
NEEDS_VERIFIED_EMAIL: string;
|
|
672
797
|
};
|
|
673
798
|
};
|
|
799
|
+
"vote-to-debate": string;
|
|
674
800
|
};
|
|
675
801
|
readonly poll: {
|
|
676
802
|
"thank-you-for-vote": string;
|
|
@@ -758,6 +884,60 @@ declare const resources: {
|
|
|
758
884
|
vote: string;
|
|
759
885
|
vote_other: string;
|
|
760
886
|
"are-you-sure": string;
|
|
887
|
+
aria: {
|
|
888
|
+
"scroll-left": string;
|
|
889
|
+
"scroll-right": string;
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
readonly debate: {
|
|
893
|
+
"thank-you-for-vote": string;
|
|
894
|
+
"call-to-action": string;
|
|
895
|
+
"live-poll": string;
|
|
896
|
+
"load-more-debates": string;
|
|
897
|
+
viewed: string;
|
|
898
|
+
vote_one: string;
|
|
899
|
+
vote_other: string;
|
|
900
|
+
"no-debates": string;
|
|
901
|
+
"desc-header": string;
|
|
902
|
+
"your-vote-heading": string;
|
|
903
|
+
"all-arguments": string;
|
|
904
|
+
"filter-by": string;
|
|
905
|
+
"back-to-debate": string;
|
|
906
|
+
"aria-labels": {
|
|
907
|
+
"positive-sentiment": string;
|
|
908
|
+
"negative-sentiment": string;
|
|
909
|
+
};
|
|
910
|
+
option_one: string;
|
|
911
|
+
option_other: string;
|
|
912
|
+
placeholders: {
|
|
913
|
+
"new-commentary": string;
|
|
914
|
+
};
|
|
915
|
+
"no-arguments-yet": string;
|
|
916
|
+
inactive: string;
|
|
917
|
+
"current-debates": string;
|
|
918
|
+
filters: {
|
|
919
|
+
ALL: {
|
|
920
|
+
title: string;
|
|
921
|
+
description: string;
|
|
922
|
+
};
|
|
923
|
+
ACTIVE: {
|
|
924
|
+
title: string;
|
|
925
|
+
description: string;
|
|
926
|
+
};
|
|
927
|
+
PUBLISHED_AT_DESC: {
|
|
928
|
+
title: string;
|
|
929
|
+
description: string;
|
|
930
|
+
};
|
|
931
|
+
PUBLISHED_AT_ASC: {
|
|
932
|
+
title: string;
|
|
933
|
+
description: string;
|
|
934
|
+
};
|
|
935
|
+
};
|
|
936
|
+
labels: {
|
|
937
|
+
"filter-debates": string;
|
|
938
|
+
"sort-debates": string;
|
|
939
|
+
};
|
|
940
|
+
voted: string;
|
|
761
941
|
};
|
|
762
942
|
readonly discussions: {
|
|
763
943
|
alerts: {
|
|
@@ -815,6 +995,8 @@ declare const resources: {
|
|
|
815
995
|
FAKE: string;
|
|
816
996
|
TERMS: string;
|
|
817
997
|
LEGAL: string;
|
|
998
|
+
USERNAME: string;
|
|
999
|
+
BEHAVIOUR: string;
|
|
818
1000
|
};
|
|
819
1001
|
submitted: string;
|
|
820
1002
|
};
|
|
@@ -987,6 +1169,8 @@ declare const resources: {
|
|
|
987
1169
|
conversations: string;
|
|
988
1170
|
discussion: string;
|
|
989
1171
|
discussions: string;
|
|
1172
|
+
debate: string;
|
|
1173
|
+
debates: string;
|
|
990
1174
|
list: string;
|
|
991
1175
|
lists: string;
|
|
992
1176
|
message: string;
|
|
@@ -1004,6 +1188,10 @@ declare const resources: {
|
|
|
1004
1188
|
participations: string;
|
|
1005
1189
|
};
|
|
1006
1190
|
readonly messages: {
|
|
1191
|
+
"debate-closed": string;
|
|
1192
|
+
"debate-global-closed": string;
|
|
1193
|
+
"debate-finished": string;
|
|
1194
|
+
"debate-preamble": string;
|
|
1007
1195
|
"discussion-closed": string;
|
|
1008
1196
|
"discussion-global-closed": string;
|
|
1009
1197
|
"discussion-live-closed": string;
|
|
@@ -1019,6 +1207,7 @@ declare const resources: {
|
|
|
1019
1207
|
NEEDS_VERIFIED_EMAIL: string;
|
|
1020
1208
|
};
|
|
1021
1209
|
};
|
|
1210
|
+
"vote-to-debate": string;
|
|
1022
1211
|
};
|
|
1023
1212
|
readonly poll: {
|
|
1024
1213
|
"thank-you-for-vote": string;
|
|
@@ -1104,6 +1293,60 @@ declare const resources: {
|
|
|
1104
1293
|
vote: string;
|
|
1105
1294
|
vote_other: string;
|
|
1106
1295
|
"are-you-sure": string;
|
|
1296
|
+
aria: {
|
|
1297
|
+
"scroll-left": string;
|
|
1298
|
+
"scroll-right": string;
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
readonly debate: {
|
|
1302
|
+
"thank-you-for-vote": string;
|
|
1303
|
+
"call-to-action": string;
|
|
1304
|
+
"live-poll": string;
|
|
1305
|
+
"load-more-debates": string;
|
|
1306
|
+
viewed: string;
|
|
1307
|
+
vote_one: string;
|
|
1308
|
+
vote_other: string;
|
|
1309
|
+
"no-debates": string;
|
|
1310
|
+
"desc-header": string;
|
|
1311
|
+
"your-vote-heading": string;
|
|
1312
|
+
"all-arguments": string;
|
|
1313
|
+
"filter-by": string;
|
|
1314
|
+
"back-to-debate": string;
|
|
1315
|
+
"aria-labels": {
|
|
1316
|
+
"positive-sentiment": string;
|
|
1317
|
+
"negative-sentiment": string;
|
|
1318
|
+
};
|
|
1319
|
+
option_one: string;
|
|
1320
|
+
option_other: string;
|
|
1321
|
+
placeholders: {
|
|
1322
|
+
"new-commentary": string;
|
|
1323
|
+
};
|
|
1324
|
+
"no-arguments-yet": string;
|
|
1325
|
+
inactive: string;
|
|
1326
|
+
"current-debates": string;
|
|
1327
|
+
filters: {
|
|
1328
|
+
ALL: {
|
|
1329
|
+
title: string;
|
|
1330
|
+
description: string;
|
|
1331
|
+
};
|
|
1332
|
+
ACTIVE: {
|
|
1333
|
+
title: string;
|
|
1334
|
+
description: string;
|
|
1335
|
+
};
|
|
1336
|
+
PUBLISHED_AT_DESC: {
|
|
1337
|
+
title: string;
|
|
1338
|
+
description: string;
|
|
1339
|
+
};
|
|
1340
|
+
PUBLISHED_AT_ASC: {
|
|
1341
|
+
title: string;
|
|
1342
|
+
description: string;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
labels: {
|
|
1346
|
+
"filter-debates": string;
|
|
1347
|
+
"sort-debates": string;
|
|
1348
|
+
};
|
|
1349
|
+
voted: string;
|
|
1107
1350
|
};
|
|
1108
1351
|
readonly discussions: {
|
|
1109
1352
|
alerts: {
|
|
@@ -1161,6 +1404,8 @@ declare const resources: {
|
|
|
1161
1404
|
FAKE: string;
|
|
1162
1405
|
TERMS: string;
|
|
1163
1406
|
LEGAL: string;
|
|
1407
|
+
USERNAME: string;
|
|
1408
|
+
BEHAVIOUR: string;
|
|
1164
1409
|
};
|
|
1165
1410
|
submitted: string;
|
|
1166
1411
|
};
|
|
@@ -1332,6 +1577,8 @@ declare const resources: {
|
|
|
1332
1577
|
conversations: string;
|
|
1333
1578
|
discussion: string;
|
|
1334
1579
|
discussions: string;
|
|
1580
|
+
debate: string;
|
|
1581
|
+
debates: string;
|
|
1335
1582
|
list: string;
|
|
1336
1583
|
lists: string;
|
|
1337
1584
|
message: string;
|
|
@@ -1349,6 +1596,10 @@ declare const resources: {
|
|
|
1349
1596
|
participations: string;
|
|
1350
1597
|
};
|
|
1351
1598
|
readonly messages: {
|
|
1599
|
+
"debate-closed": string;
|
|
1600
|
+
"debate-global-closed": string;
|
|
1601
|
+
"debate-finished": string;
|
|
1602
|
+
"debate-preamble": string;
|
|
1352
1603
|
"discussion-closed": string;
|
|
1353
1604
|
"discussion-global-closed": string;
|
|
1354
1605
|
"discussion-live-closed": string;
|
|
@@ -1364,6 +1615,7 @@ declare const resources: {
|
|
|
1364
1615
|
NEEDS_VERIFIED_EMAIL: string;
|
|
1365
1616
|
};
|
|
1366
1617
|
};
|
|
1618
|
+
"vote-to-debate": string;
|
|
1367
1619
|
};
|
|
1368
1620
|
readonly poll: {
|
|
1369
1621
|
"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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
|
|
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
|
package/dist/ui/core/_types.d.ts
CHANGED
|
@@ -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
|
+
}
|