@engagently/types 3.0.0 → 3.1.2

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.
@@ -42,6 +42,7 @@ export type CommunityConfig = {
42
42
  url: string | null;
43
43
  } | null;
44
44
  CommunityId: string | null;
45
+ EmbedBackend: string | null;
45
46
  ServiceId: string | null;
46
47
  Config?: {
47
48
  poll: {
@@ -49,15 +50,17 @@ export type CommunityConfig = {
49
50
  };
50
51
  discussion: {
51
52
  settings: {
53
+ BOOKMARK_MAX_COUNT: number;
52
54
  COMMENTARY_MAX_LENGTH: number;
53
55
  COMMENTARY_PREVIEW_LENGTH: number;
56
+ LIST_COMMENTARIES_SIZE: number;
57
+ LIST_MORE_COMMENTARIES_SIZE: number;
54
58
  PREAMBLE_ENABLED: boolean;
55
- THREAD_MORE_COMMENTS_SIZE: number;
56
- THREAD_REPLIES_SIZE: number;
57
59
  THREAD_COMMENTS_SIZE: number;
60
+ THREAD_INCLUDE_TOMBSTONES: boolean;
61
+ THREAD_MORE_COMMENTS_SIZE: number;
58
62
  THREAD_MORE_REPLIES_SIZE: number;
59
- LIST_COMMENTARIES_SIZE: number;
60
- LIST_MORE_COMMENTARIES_SIZE: number;
63
+ THREAD_REPLIES_SIZE: number;
61
64
  };
62
65
  };
63
66
  } | null;
@@ -47,23 +47,49 @@ export type DiscussionAttributesComponent = {
47
47
  imageUrl?: string;
48
48
  };
49
49
  export declare enum DiscussionSlots {
50
- USER_ICON = "userIcon",
51
- SETTINGS_ICON = "settingsIcon",
52
- LIVE_MODE_ICON = "liveModeIcon",
50
+ BOOKMARK_ICON = "bookmarkIcon",
51
+ BOOKMARK_ICON_ACTIVE = "bookmarkIconActive",
53
52
  CUSTOM_CALL_TO_ACTION = "customCallToAction",
54
- REPLY_ICON = "replyIcon",
53
+ DELETE_ICON = "deleteIcon",
54
+ EDIT_ICON = "editIcon",
55
+ LIVE_MODE_ICON = "liveModeIcon",
56
+ MODERATE_ICON = "moderateIcon",
55
57
  REACTION1 = "reaction1",
56
58
  REACTION1_active = "reaction1_active",
57
59
  REACTION2 = "reaction2",
58
60
  REACTION2_active = "reaction2_active",
59
61
  REACTION3 = "reaction3",
60
- REACTION3_active = "reaction3_active"
62
+ REACTION3_active = "reaction3_active",
63
+ REPLY_ICON = "replyIcon",
64
+ REPORT_ICON = "reportIcon",
65
+ REPORT_ICON_ACTIVE = "reportIconActive",
66
+ SETTINGS_ICON = "settingsIcon",
67
+ SHARE_ICON = "shareIcon",
68
+ USER_ICON = "userIcon"
61
69
  }
62
70
  export interface DiscussionWidget {
63
71
  name: EgyEntities.EGY_DISCUSSION;
64
72
  slots: Array<`${DiscussionSlots}`>;
65
73
  attributes: Array<`${DiscussionAttributes}`>;
66
74
  }
75
+ export declare enum DiscussionCommentaryActions {
76
+ BOOKMARK = "bookmark",
77
+ DELETE = "delete",
78
+ EDIT = "edit",
79
+ MODERATE = "moderate",
80
+ REACTION1 = "reaction1",
81
+ REACTION2 = "reaction2",
82
+ REACTION3 = "reaction3",
83
+ REPLY = "reply",
84
+ REPORT = "report",
85
+ SHARE = "share"
86
+ }
87
+ export type CommentaryActionPlacements = {
88
+ footer?: Array<`${DiscussionCommentaryActions}`>;
89
+ header?: Array<`${DiscussionCommentaryActions}`>;
90
+ menu?: Array<`${DiscussionCommentaryActions}`>;
91
+ };
92
+ export declare const DEFAULT_COMMENT_ACTIONS_PLACEMENTS: CommentaryActionPlacements;
67
93
  /**
68
94
  * MAKE SURE TO UPDATE THE TYPES IN THE FOLLOWING PLACES WHEN CHANGING ATTRS:
69
95
  * - PollAttributesHTMLElement
@@ -1,3 +1,4 @@
1
+ import type { InitOptions } from 'i18next';
1
2
  import i18n from 'i18next';
2
3
  export declare const defaultResources: {
3
4
  de: {
@@ -13,22 +14,13 @@ export declare const defaultResources: {
13
14
  settings: string;
14
15
  };
15
16
  actions: {
16
- bookmarked: string;
17
17
  cancel: string;
18
18
  close: string;
19
- "create-bookmark": string;
20
- delete: string;
21
- "delete-bookmark": string;
22
- edit: string;
23
19
  "open-discussion": string;
24
20
  "go-to-discussion": string;
25
- moderation: string;
26
21
  na: string;
27
- report: string;
28
- reported: string;
29
22
  save: string;
30
23
  send: string;
31
- share: string;
32
24
  "show-all-comments": string;
33
25
  view: string;
34
26
  };
@@ -50,7 +42,6 @@ export declare const defaultResources: {
50
42
  "load-older-replies": string;
51
43
  options: string;
52
44
  reply: string;
53
- "reply-do": string;
54
45
  reply_other: string;
55
46
  "reply-count": string;
56
47
  "reply-count_other": string;
@@ -84,6 +75,30 @@ export declare const defaultResources: {
84
75
  };
85
76
  };
86
77
  "comment-as": string;
78
+ "commentary-actions": {
79
+ bookmark: {
80
+ inactive: string;
81
+ active: string;
82
+ deletable: string;
83
+ };
84
+ edit: string;
85
+ delete: string;
86
+ moderate: string;
87
+ reply: string;
88
+ report: {
89
+ inactive: string;
90
+ active: string;
91
+ };
92
+ reaction: {
93
+ REACTION1: string;
94
+ REACTION1_zero: string;
95
+ REACTION2: string;
96
+ REACTION2_zero: string;
97
+ REACTION3: string;
98
+ REACTION3_zero: string;
99
+ };
100
+ share: string;
101
+ };
87
102
  "commentary-not-available": string;
88
103
  filters: {
89
104
  CREATED_AT_ASC: {
@@ -122,14 +137,6 @@ export declare const defaultResources: {
122
137
  "new-commentary": string;
123
138
  "new-reply": string;
124
139
  };
125
- reactions: {
126
- REACTION1: string;
127
- REACTION1_zero: string;
128
- REACTION2: string;
129
- REACTION2_zero: string;
130
- REACTION3: string;
131
- REACTION3_zero: string;
132
- };
133
140
  "reply-as": string;
134
141
  "reply-to": string;
135
142
  "show-less": string;
@@ -274,22 +281,13 @@ export declare const defaultResources: {
274
281
  settings: string;
275
282
  };
276
283
  actions: {
277
- bookmarked: string;
278
284
  cancel: string;
279
285
  close: string;
280
- "create-bookmark": string;
281
- delete: string;
282
- "delete-bookmark": string;
283
- edit: string;
284
286
  "open-discussion": string;
285
287
  "go-to-discussion": string;
286
- moderation: string;
287
288
  na: string;
288
- report: string;
289
- reported: string;
290
289
  save: string;
291
290
  send: string;
292
- share: string;
293
291
  "show-all-comments": string;
294
292
  view: string;
295
293
  };
@@ -311,7 +309,6 @@ export declare const defaultResources: {
311
309
  "load-older-replies": string;
312
310
  options: string;
313
311
  reply: string;
314
- "reply-do": string;
315
312
  reply_other: string;
316
313
  "reply-count": string;
317
314
  "reply-count_other": string;
@@ -345,6 +342,30 @@ export declare const defaultResources: {
345
342
  };
346
343
  };
347
344
  "comment-as": string;
345
+ "commentary-actions": {
346
+ bookmark: {
347
+ inactive: string;
348
+ active: string;
349
+ deletable: string;
350
+ };
351
+ edit: string;
352
+ delete: string;
353
+ moderate: string;
354
+ reply: string;
355
+ report: {
356
+ inactive: string;
357
+ active: string;
358
+ };
359
+ reaction: {
360
+ REACTION1: string;
361
+ REACTION1_zero: string;
362
+ REACTION2: string;
363
+ REACTION2_zero: string;
364
+ REACTION3: string;
365
+ REACTION3_zero: string;
366
+ };
367
+ share: string;
368
+ };
348
369
  "commentary-not-available": string;
349
370
  filters: {
350
371
  CREATED_AT_ASC: {
@@ -383,14 +404,6 @@ export declare const defaultResources: {
383
404
  "new-commentary": string;
384
405
  "new-reply": string;
385
406
  };
386
- reactions: {
387
- REACTION1: string;
388
- REACTION1_zero: string;
389
- REACTION2: string;
390
- REACTION2_zero: string;
391
- REACTION3: string;
392
- REACTION3_zero: string;
393
- };
394
407
  "reply-as": string;
395
408
  "reply-to": string;
396
409
  "show-less": string;
@@ -522,4 +535,6 @@ export declare const defaultResources: {
522
535
  };
523
536
  };
524
537
  };
538
+ declare const options: InitOptions;
539
+ export { options };
525
540
  export default i18n;
@@ -1,5 +1,6 @@
1
1
  import type { CommunityConfig, EngageConfig, Translations } from '../../common/_types/ConfigDefinition';
2
2
  import type { SignOutOptions } from '../../common/lib/api/session';
3
+ import type { Exchange } from '@urql/preact';
3
4
  type SignInOptions = Partial<{
4
5
  token: string | null;
5
6
  }>;
@@ -12,6 +13,10 @@ export type Engagently = {
12
13
  signIn: (options?: SignInOptions) => Promise<void>;
13
14
  reinit: (config: Partial<EngageConfig>) => Promise<void>;
14
15
  remoteTranslations?: Translations | null;
16
+ core: {
17
+ authExchange?: Exchange;
18
+ subscriptionExchange?: Exchange;
19
+ };
15
20
  } & {
16
21
  Configuration: (config: EngageConfig) => Promise<EngageConfig>;
17
22
  };
@@ -1,3 +1,4 @@
1
+ import type { CommentaryActionPlacements } from '../../../common';
1
2
  import type emptyTheme from '../../themes/unstyled';
2
3
  import type { ButtonSizes, ButtonVariants, ComponentColorScheme, ThemeAnimations, ThemeBreakpoints, ThemeLevels, ThemePalette, ThemeShadows, ThemeShape, ThemeSpacing, ThemeTypography } from '../../themes/config';
3
4
  import type { ColorSchemesConfig } from '../../themes/_types';
@@ -19,6 +20,7 @@ export type ThemeSettings = {
19
20
  buttonDiscussionFocusVariant: ButtonVariants;
20
21
  buttonRepliesColor?: ComponentColorScheme;
21
22
  buttonRepliesVariant: ButtonVariants;
23
+ commentaryActionPlacements?: CommentaryActionPlacements;
22
24
  lineThickness: number;
23
25
  userNavType?: 'icon' | 'text' | 'icon-text';
24
26
  viewControlTabSize?: ButtonSizes;
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export type { Engagently } from '../main/lib/engagently';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engagently/types",
3
- "version": "3.0.0",
3
+ "version": "3.1.2",
4
4
  "main": "./index.ts",
5
5
  "types": "dist/types/engagently.d.ts",
6
6
  "files": [
@@ -12,11 +12,11 @@
12
12
  "email": "support@ferret-go.com"
13
13
  },
14
14
  "license": "UNLICENSED",
15
+ "devDependencies": {
16
+ "vite-plugin-dts": "^3.4.0"
17
+ },
15
18
  "scripts": {
16
19
  "build": "vite build",
17
20
  "clean": "rimraf dist"
18
- },
19
- "devDependencies": {
20
- "vite-plugin-dts": "^3.4.0"
21
21
  }
22
- }
22
+ }