@engagently/types 7.0.1 → 7.1.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.
@@ -16,8 +16,9 @@ export declare enum EgyEntities {
16
16
  EGY_DISCUSSION = "egy-discussion",
17
17
  EGY_DEBATE = "egy-debate",
18
18
  EGY_DEBATES = "egy-debates",
19
- EGY_DEBATE_PREVIEW = "egy-debate-preview",
19
+ EGY_DEBATE_TEASER = "egy-debate-teaser",
20
20
  EGY_DEBATE_POLL = "egy-debate-poll",
21
+ EGY_USER = "egy-user",
21
22
  EGY_QUIZ = "egy-quiz",
22
23
  EGY_QUIZ_BAR = "egy-quiz-bar",
23
24
  EGY_POLL = "egy-poll",
@@ -29,6 +30,25 @@ export type EgyEntitiesValues = `${EgyEntities}`;
29
30
  export declare enum SharedSlots {
30
31
  CTA_HEADER = "ctaHeader"
31
32
  }
33
+ export declare enum CommentaryActionsSlots {
34
+ BOOKMARK_ICON = "bookmarkIcon",
35
+ BOOKMARK_ICON_ACTIVE = "bookmarkIconActive",
36
+ DELETE_ICON = "deleteIcon",
37
+ EDIT_ICON = "editIcon",
38
+ IGNORE_ICON = "ignoreIcon",
39
+ IGNORE_ICON_ACTIVE = "ignoreIconActive",
40
+ MODERATE_ICON = "moderateIcon",
41
+ REACTION1 = "reaction1",
42
+ REACTION1_active = "reaction1_active",
43
+ REACTION2 = "reaction2",
44
+ REACTION2_active = "reaction2_active",
45
+ REACTION3 = "reaction3",
46
+ REACTION3_active = "reaction3_active",
47
+ REPLY_ICON = "replyIcon",
48
+ REPORT_ICON = "reportIcon",
49
+ REPORT_ICON_ACTIVE = "reportIconActive",
50
+ SHARE_ICON = "shareIcon"
51
+ }
32
52
  /**
33
53
  * MAKE SURE TO UPDATE THE TYPES IN THE FOLLOWING PLACES WHEN CHANGING ATTRS:
34
54
  * - DiscussionAttributesHTMLElement
@@ -77,25 +97,8 @@ export declare enum DiscussionMessagesSlots {
77
97
  USERNAME_CHANGE_PRESCRIBED = "messages_usernameChangePrescribed"
78
98
  }
79
99
  export declare enum DiscussionIconSlots {
80
- BOOKMARK_ICON = "bookmarkIcon",
81
- BOOKMARK_ICON_ACTIVE = "bookmarkIconActive",
82
- DELETE_ICON = "deleteIcon",
83
- EDIT_ICON = "editIcon",
84
- IGNORE_ICON = "ignoreIcon",
85
- IGNORE_ICON_ACTIVE = "ignoreIconActive",
86
100
  LIVE_MODE_ICON = "liveModeIcon",
87
- MODERATE_ICON = "moderateIcon",
88
- REACTION1 = "reaction1",
89
- REACTION1_active = "reaction1_active",
90
- REACTION2 = "reaction2",
91
- REACTION2_active = "reaction2_active",
92
- REACTION3 = "reaction3",
93
- REACTION3_active = "reaction3_active",
94
- REPLY_ICON = "replyIcon",
95
- REPORT_ICON = "reportIcon",
96
- REPORT_ICON_ACTIVE = "reportIconActive",
97
101
  SETTINGS_ICON = "settingsIcon",
98
- SHARE_ICON = "shareIcon",
99
102
  USER_ICON = "userIcon",
100
103
  REPLIES_TOGGLE_ICON_open = "repliesToggleIcon_open",
101
104
  REPLIES_TOGGLE_ICON_closed = "repliesToggleIcon_closed"
@@ -103,7 +106,7 @@ export declare enum DiscussionIconSlots {
103
106
  export declare enum DiscussionSlots {
104
107
  CUSTOM_CALL_TO_ACTION = "customCallToAction"
105
108
  }
106
- export type DiscussionSlotValues = `${SharedSlots}` | `${DiscussionSlots}` | `${DiscussionIconSlots}` | `${DiscussionMessagesSlots}`;
109
+ export type DiscussionSlotValues = `${SharedSlots}` | `${CommentaryActionsSlots}` | `${DiscussionSlots}` | `${DiscussionIconSlots}` | `${DiscussionMessagesSlots}`;
107
110
  export interface DiscussionWidget {
108
111
  name: EgyEntities.EGY_DISCUSSION;
109
112
  slots: Array<DiscussionSlotValues>;
@@ -128,6 +131,35 @@ export type CommentaryActionPlacements = {
128
131
  menu?: Array<`${DiscussionCommentaryActions}`>;
129
132
  };
130
133
  export declare const DEFAULT_COMMENT_ACTIONS_PLACEMENTS: CommentaryActionPlacements;
134
+ export declare enum UserAttributes {
135
+ INITIAL_VIEW = "initialView"
136
+ }
137
+ export type UserAttributesHTMLElement = {
138
+ 'initial-view': string;
139
+ };
140
+ export type UserAttributesComponent = {
141
+ initialView: string;
142
+ };
143
+ export declare enum UserSlots {
144
+ SETTINGS_ICON = "settingsIcon",
145
+ USER_ICON = "userIcon",
146
+ IGNORE_ICON_ACTIVE = "ignoreIconActive",
147
+ ACTION_ELEMENT = "actionElement"
148
+ }
149
+ export declare enum UserMessagesSlots {
150
+ LOG_IN_TO_VIEW_USER = "messages_logInToViewUser",
151
+ USER_SANCTION_BLOCK = "messages_userSanctionBlock",
152
+ USER_SANCTION_BLOCK_UNTIL = "messages_userSanctionBlockUntil",
153
+ USER_SANCTION_WARN = "messages_userSanctionWarn",
154
+ USERNAME_CHANGE = "messages_usernameChange",
155
+ USERNAME_CHANGE_PRESCRIBED = "messages_usernameChangePrescribed"
156
+ }
157
+ export type UserSlotValues = `${SharedSlots}` | `${CommentaryActionsSlots}` | `${UserSlots}` | `${UserMessagesSlots}`;
158
+ export interface UserWidget {
159
+ name: EgyEntities.EGY_USER;
160
+ attributes: Array<`${UserAttributes}`>;
161
+ slots: Array<`${UserSlotValues}`>;
162
+ }
131
163
  export declare enum DebateAttributes {
132
164
  DEBATE_ID = "debateId"
133
165
  }
@@ -142,11 +174,6 @@ export declare enum DebateIconSlots {
142
174
  PARTICIPATIONS_ICON = "participationsIcon",
143
175
  USER_ICON = "userIcon",
144
176
  SETTINGS_ICON = "settingsIcon",
145
- REPLY_ICON = "replyIcon",
146
- REACTION1 = "reaction1",
147
- REACTION1_active = "reaction1_active",
148
- REACTION2 = "reaction2",
149
- REACTION2_active = "reaction2_active",
150
177
  REPLIES_TOGGLE_ICON_open = "repliesToggleIcon_open",
151
178
  REPLIES_TOGGLE_ICON_closed = "repliesToggleIcon_closed"
152
179
  }
@@ -166,23 +193,27 @@ export declare enum DebateMessagesSlots {
166
193
  USERNAME_CHANGE_PRESCRIBED = "messages_usernameChangePrescribed",
167
194
  VOTE_TO_DEBATE = "messages_voteToDebate"
168
195
  }
169
- export type DebateSlotValues = `${SharedSlots}` | `${DebateIconSlots}` | `${DebateSlots}` | `${DebateMessagesSlots}`;
196
+ export type DebateSlotValues = `${SharedSlots}` | `${CommentaryActionsSlots}` | `${DebateIconSlots}` | `${DebateSlots}` | `${DebateMessagesSlots}`;
170
197
  export interface DebateWidget {
171
198
  name: EgyEntities.EGY_DEBATE;
172
199
  attributes: Array<`${DebateAttributes}`>;
173
200
  slots: Array<DebateSlotValues>;
174
201
  }
202
+ export declare enum DebatesTarget {
203
+ BLANK = "_blank",
204
+ SELF = "_self"
205
+ }
175
206
  export declare enum DebatesAttributes {
176
207
  COUNT = "count",
177
208
  TARGET = "target"
178
209
  }
179
210
  export type DebatesAttributesHTMLElement = {
180
211
  count?: string;
181
- target?: '_blank' | '_self';
212
+ target?: string;
182
213
  };
183
214
  export type DebatesAttributesComponent = {
184
215
  count?: string;
185
- target?: '_blank' | '_self';
216
+ target?: DebatesTarget;
186
217
  };
187
218
  export interface DebatesWidget {
188
219
  name: EgyEntities.EGY_DEBATES;
@@ -190,26 +221,52 @@ export interface DebatesWidget {
190
221
  slots: Array<DebateSlotValues>;
191
222
  }
192
223
  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 = {
224
+ export declare enum DebateTeaserTarget {
225
+ BLANK = "_blank",
226
+ SELF = "_self"
227
+ }
228
+ export declare enum DebateTeaserSort {
229
+ MOST_COMMENTED = "most_commented",
230
+ NEWEST = "newest",
231
+ MOST_PARTICIPATED = "most_participated",
232
+ MOST_VISITED = "most_visited",
233
+ RANDOM = "random"
234
+ }
235
+ export declare enum DebateTeaserAttributes {
236
+ BASIS = "basis",
237
+ COUNT = "count",
238
+ DEBATE_ID = "debateId",
239
+ HOST = "host",
240
+ SORT = "sort",
241
+ TARGET = "target",
242
+ SECTIONS = "sections",
243
+ LABELS = "labels"
244
+ }
245
+ export type DebateTeaserAttributesHTMLElement = {
246
+ basis?: string;
247
+ count?: string;
199
248
  'debate-id'?: string;
200
- 'json-url'?: string;
201
- target?: '_blank' | '_self';
249
+ host?: string;
250
+ sort?: string;
251
+ target?: string;
252
+ sections?: string;
253
+ labels?: string;
202
254
  };
203
- export type DebatePreviewAttributesComponent = {
204
- debateId?: string;
205
- jsonUrl?: string;
206
- target?: '_blank' | '_self';
255
+ export type DebateTeaserAttributesComponent = {
256
+ basis: string;
257
+ count?: number;
258
+ debateId?: string[];
259
+ host?: string;
260
+ sort?: DebateTeaserSort;
261
+ target?: DebateTeaserTarget;
262
+ sections?: string[];
263
+ labels?: string[];
207
264
  };
208
- export interface DebatePreviewWidget {
209
- name: EgyEntities.EGY_DEBATE_PREVIEW;
210
- attributes: Array<`${DebatePreviewAttributes}`>;
265
+ export interface DebateTeaserWidget {
266
+ name: EgyEntities.EGY_DEBATE_TEASER;
267
+ attributes: Array<`${DebateTeaserAttributes}`>;
211
268
  }
212
- export type DebatePreviewSlotValues = `${SharedSlots}`;
269
+ export type DebateTeaserSlotValues = `${SharedSlots}`;
213
270
  export declare enum DebatePollEvents {
214
271
  INIT = "egy-debate-poll:init",
215
272
  VOTE = "egy-debate-poll:vote"
@@ -57,6 +57,8 @@ export declare const defaultResources: {
57
57
  session: string;
58
58
  share: string;
59
59
  "shared-comment": string;
60
+ "shared-argument": string;
61
+ "shared-reply": string;
60
62
  user: {
61
63
  bio: string;
62
64
  name: string;
@@ -153,9 +155,13 @@ export declare const defaultResources: {
153
155
  active: string;
154
156
  deletable: string;
155
157
  };
156
- ignore: string;
158
+ ignore: {
159
+ action: string;
160
+ title: string;
161
+ hint: string;
162
+ submitted: string;
163
+ };
157
164
  unignore: string;
158
- "ignore-hint": string;
159
165
  edit: string;
160
166
  delete: string;
161
167
  moderate: string;
@@ -378,6 +384,7 @@ export declare const defaultResources: {
378
384
  "discussion-live-closed": string;
379
385
  "discussion-preamble": string;
380
386
  "log-in-to-comment": string;
387
+ "log-in-to-view-user": string;
381
388
  "user-sanction-block-until": string;
382
389
  "user-sanction-block": string;
383
390
  "user-sanction-warn": string;
@@ -411,6 +418,45 @@ export declare const defaultResources: {
411
418
  participation_other: string;
412
419
  reparticipate: string;
413
420
  };
421
+ readonly user: {
422
+ alerts: {
423
+ "bookmark-limit": {
424
+ message: string;
425
+ };
426
+ "no-bookmarks": {
427
+ message: string;
428
+ title: string;
429
+ };
430
+ "ignore-user-limit": {
431
+ message: string;
432
+ };
433
+ "no-ignored-users": {
434
+ message: string;
435
+ title: string;
436
+ };
437
+ };
438
+ "onboarding-username-change": string;
439
+ "username-change-blocked": string;
440
+ "username-change-confirm": string;
441
+ views: {
442
+ me: {
443
+ nav: string;
444
+ title: string;
445
+ tabs: {
446
+ comments: string;
447
+ bookmarks: string;
448
+ "ignored-users": string;
449
+ settings: {
450
+ nav: string;
451
+ sections: {
452
+ account: string;
453
+ "ignored-users": string;
454
+ };
455
+ };
456
+ };
457
+ };
458
+ };
459
+ };
414
460
  };
415
461
  en: {
416
462
  readonly common: {
@@ -466,6 +512,8 @@ export declare const defaultResources: {
466
512
  session: string;
467
513
  share: string;
468
514
  "shared-comment": string;
515
+ "shared-argument": string;
516
+ "shared-reply": string;
469
517
  user: {
470
518
  bio: string;
471
519
  name: string;
@@ -562,9 +610,13 @@ export declare const defaultResources: {
562
610
  active: string;
563
611
  deletable: string;
564
612
  };
565
- ignore: string;
613
+ ignore: {
614
+ action: string;
615
+ title: string;
616
+ hint: string;
617
+ submitted: string;
618
+ };
566
619
  unignore: string;
567
- "ignore-hint": string;
568
620
  edit: string;
569
621
  delete: string;
570
622
  moderate: string;
@@ -786,6 +838,7 @@ export declare const defaultResources: {
786
838
  "discussion-live-closed": string;
787
839
  "discussion-preamble": string;
788
840
  "log-in-to-comment": string;
841
+ "log-in-to-view-user": string;
789
842
  "user-sanction-block-until": string;
790
843
  "user-sanction-block": string;
791
844
  "user-sanction-warn": string;
@@ -819,6 +872,45 @@ export declare const defaultResources: {
819
872
  participation_other: string;
820
873
  reparticipate: string;
821
874
  };
875
+ readonly user: {
876
+ alerts: {
877
+ "bookmark-limit": {
878
+ message: string;
879
+ };
880
+ "no-bookmarks": {
881
+ message: string;
882
+ title: string;
883
+ };
884
+ "ignore-user-limit": {
885
+ message: string;
886
+ };
887
+ "no-ignored-users": {
888
+ message: string;
889
+ title: string;
890
+ };
891
+ };
892
+ "onboarding-username-change": string;
893
+ "username-change-blocked": string;
894
+ "username-change-confirm": string;
895
+ views: {
896
+ me: {
897
+ nav: string;
898
+ title: string;
899
+ tabs: {
900
+ comments: string;
901
+ bookmarks: string;
902
+ "ignored-users": string;
903
+ settings: {
904
+ nav: string;
905
+ sections: {
906
+ account: string;
907
+ "ignored-users": string;
908
+ };
909
+ };
910
+ };
911
+ };
912
+ };
913
+ };
822
914
  };
823
915
  };
824
916
  declare const resources: {
@@ -876,6 +968,8 @@ declare const resources: {
876
968
  session: string;
877
969
  share: string;
878
970
  "shared-comment": string;
971
+ "shared-argument": string;
972
+ "shared-reply": string;
879
973
  user: {
880
974
  bio: string;
881
975
  name: string;
@@ -972,9 +1066,13 @@ declare const resources: {
972
1066
  active: string;
973
1067
  deletable: string;
974
1068
  };
975
- ignore: string;
1069
+ ignore: {
1070
+ action: string;
1071
+ title: string;
1072
+ hint: string;
1073
+ submitted: string;
1074
+ };
976
1075
  unignore: string;
977
- "ignore-hint": string;
978
1076
  edit: string;
979
1077
  delete: string;
980
1078
  moderate: string;
@@ -1197,6 +1295,7 @@ declare const resources: {
1197
1295
  "discussion-live-closed": string;
1198
1296
  "discussion-preamble": string;
1199
1297
  "log-in-to-comment": string;
1298
+ "log-in-to-view-user": string;
1200
1299
  "user-sanction-block-until": string;
1201
1300
  "user-sanction-block": string;
1202
1301
  "user-sanction-warn": string;
@@ -1230,6 +1329,45 @@ declare const resources: {
1230
1329
  participation_other: string;
1231
1330
  reparticipate: string;
1232
1331
  };
1332
+ readonly user: {
1333
+ alerts: {
1334
+ "bookmark-limit": {
1335
+ message: string;
1336
+ };
1337
+ "no-bookmarks": {
1338
+ message: string;
1339
+ title: string;
1340
+ };
1341
+ "ignore-user-limit": {
1342
+ message: string;
1343
+ };
1344
+ "no-ignored-users": {
1345
+ message: string;
1346
+ title: string;
1347
+ };
1348
+ };
1349
+ "onboarding-username-change": string;
1350
+ "username-change-blocked": string;
1351
+ "username-change-confirm": string;
1352
+ views: {
1353
+ me: {
1354
+ nav: string;
1355
+ title: string;
1356
+ tabs: {
1357
+ comments: string;
1358
+ bookmarks: string;
1359
+ "ignored-users": string;
1360
+ settings: {
1361
+ nav: string;
1362
+ sections: {
1363
+ account: string;
1364
+ "ignored-users": string;
1365
+ };
1366
+ };
1367
+ };
1368
+ };
1369
+ };
1370
+ };
1233
1371
  };
1234
1372
  en: {
1235
1373
  readonly common: {
@@ -1285,6 +1423,8 @@ declare const resources: {
1285
1423
  session: string;
1286
1424
  share: string;
1287
1425
  "shared-comment": string;
1426
+ "shared-argument": string;
1427
+ "shared-reply": string;
1288
1428
  user: {
1289
1429
  bio: string;
1290
1430
  name: string;
@@ -1381,9 +1521,13 @@ declare const resources: {
1381
1521
  active: string;
1382
1522
  deletable: string;
1383
1523
  };
1384
- ignore: string;
1524
+ ignore: {
1525
+ action: string;
1526
+ title: string;
1527
+ hint: string;
1528
+ submitted: string;
1529
+ };
1385
1530
  unignore: string;
1386
- "ignore-hint": string;
1387
1531
  edit: string;
1388
1532
  delete: string;
1389
1533
  moderate: string;
@@ -1605,6 +1749,7 @@ declare const resources: {
1605
1749
  "discussion-live-closed": string;
1606
1750
  "discussion-preamble": string;
1607
1751
  "log-in-to-comment": string;
1752
+ "log-in-to-view-user": string;
1608
1753
  "user-sanction-block-until": string;
1609
1754
  "user-sanction-block": string;
1610
1755
  "user-sanction-warn": string;
@@ -1638,6 +1783,45 @@ declare const resources: {
1638
1783
  participation_other: string;
1639
1784
  reparticipate: string;
1640
1785
  };
1786
+ readonly user: {
1787
+ alerts: {
1788
+ "bookmark-limit": {
1789
+ message: string;
1790
+ };
1791
+ "no-bookmarks": {
1792
+ message: string;
1793
+ title: string;
1794
+ };
1795
+ "ignore-user-limit": {
1796
+ message: string;
1797
+ };
1798
+ "no-ignored-users": {
1799
+ message: string;
1800
+ title: string;
1801
+ };
1802
+ };
1803
+ "onboarding-username-change": string;
1804
+ "username-change-blocked": string;
1805
+ "username-change-confirm": string;
1806
+ views: {
1807
+ me: {
1808
+ nav: string;
1809
+ title: string;
1810
+ tabs: {
1811
+ comments: string;
1812
+ bookmarks: string;
1813
+ "ignored-users": string;
1814
+ settings: {
1815
+ nav: string;
1816
+ sections: {
1817
+ account: string;
1818
+ "ignored-users": string;
1819
+ };
1820
+ };
1821
+ };
1822
+ };
1823
+ };
1824
+ };
1641
1825
  };
1642
1826
  };
1643
1827
  declare const options: InitOptions;
@@ -8,8 +8,8 @@ import type {
8
8
  DebatePollAttributesComponent,
9
9
  DebatePollAttributesHTMLElement,
10
10
  DebatePollWidgetEvents,
11
- DebatePreviewAttributesComponent,
12
- DebatePreviewAttributesHTMLElement,
11
+ DebateTeaserAttributesComponent,
12
+ DebateTeaserAttributesHTMLElement,
13
13
  DebatesAttributesComponent,
14
14
  DebatesAttributesHTMLElement,
15
15
  DiscussionAttributesComponent,
@@ -42,8 +42,8 @@ export {
42
42
  DebateAttributesHTMLElement,
43
43
  DebatePollAttributesComponent,
44
44
  DebatePollAttributesHTMLElement,
45
- DebatePreviewAttributesComponent,
46
- DebatePreviewAttributesHTMLElement,
45
+ DebateTeaserAttributesComponent,
46
+ DebateTeaserAttributesHTMLElement,
47
47
  DebatesAttributesComponent,
48
48
  DebatesAttributesHTMLElement,
49
49
  DiscussionAttributesComponent,
@@ -62,7 +62,7 @@ declare module 'vue' {
62
62
  export interface GlobalComponents {
63
63
  EgyDebate: HTMLAttributes & DebateAttributesComponent;
64
64
  EgyDebatePoll: HTMLAttributes & DebatePollAttributesComponent;
65
- EgyDebatePreview: HTMLAttributes & DebatePreviewAttributesComponent;
65
+ EgyDebateTeaser: HTMLAttributes & DebateTeaserAttributesComponent;
66
66
  EgyDebates: HTMLAttributes & DebatesAttributesComponent;
67
67
  EgyDiscussion: HTMLAttributes & DiscussionAttributesComponent;
68
68
  EgyPoll: HTMLAttributes & PollAttributesComponent;
@@ -87,8 +87,8 @@ declare global {
87
87
  React.HTMLAttributes<HTMLElement> & DebatePollAttributesHTMLElement,
88
88
  HTMLElement
89
89
  >;
90
- 'egy-debate-preview': React.DetailedHTMLProps<
91
- React.HTMLAttributes<HTMLElement> & DebatePreviewAttributesHTMLElement,
90
+ 'egy-debate-teaser': React.DetailedHTMLProps<
91
+ React.HTMLAttributes<HTMLElement> & DebateTeaserAttributesHTMLElement,
92
92
  HTMLElement
93
93
  >;
94
94
  'egy-debates': React.DetailedHTMLProps<
@@ -127,6 +127,8 @@ export type DebatePollData = {
127
127
  participations?: number;
128
128
  showVisits?: boolean;
129
129
  visits?: number;
130
+ showCommentaries?: boolean;
131
+ commentaries?: number;
130
132
  };
131
133
  };
132
134
  export type DebatePollChoice = {
@@ -144,4 +146,6 @@ export interface DebateStats {
144
146
  participations?: number;
145
147
  showVisits?: boolean;
146
148
  visits?: number;
149
+ showCommentaries?: boolean;
150
+ commentaries?: number;
147
151
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engagently/types",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "main": "./index.ts",
5
5
  "types": "dist/types/engagently.d.ts",
6
6
  "files": [