@engagently/types 4.0.0 → 4.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.
|
@@ -1,7 +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 } from '../../ui/core/
|
|
4
|
-
import type { ChartData } from '../../ui/core/Charts/Chart';
|
|
3
|
+
import type { PollBarData, ChartData } from '../../ui/core/_types';
|
|
5
4
|
/**
|
|
6
5
|
* Type Definitions for all available entities
|
|
7
6
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'vue';
|
|
2
2
|
|
|
3
3
|
import type { Engagently } from '../main/lib/engagently';
|
|
4
|
+
import { PollEvents } from '../common/_types/WidgetDefinitions';
|
|
4
5
|
import type {
|
|
5
|
-
PollEvents,
|
|
6
6
|
PollWidgetEvents,
|
|
7
7
|
DiscussionAttributesHTMLElement,
|
|
8
8
|
PollAttributesHTMLElement,
|
|
@@ -63,9 +63,7 @@ declare global {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
interface HTMLElementEventMap extends PollWidgetEvents {}
|
|
68
|
-
}
|
|
66
|
+
interface HTMLElementEventMap extends PollWidgetEvents {}
|
|
69
67
|
|
|
70
68
|
interface Window {
|
|
71
69
|
engagently?: Engagently;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These types will be shared with the ts package
|
|
3
|
+
*/
|
|
4
|
+
/** Poll Data for the PollBar widget */
|
|
5
|
+
export type PollBarData = {
|
|
6
|
+
question?: {
|
|
7
|
+
id?: string | null;
|
|
8
|
+
text?: string | null;
|
|
9
|
+
};
|
|
10
|
+
choices?: Array<PollBarChoice> | null;
|
|
11
|
+
stats: {
|
|
12
|
+
clicks: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type PollBarChoice = {
|
|
16
|
+
id?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
imageUrl?: string | null;
|
|
19
|
+
stats: {
|
|
20
|
+
clicks: number;
|
|
21
|
+
};
|
|
22
|
+
} | null;
|
|
23
|
+
/** Poll Data for the PollSlider widget */
|
|
24
|
+
export type ChartData = {
|
|
25
|
+
question?: {
|
|
26
|
+
id?: string | null;
|
|
27
|
+
text?: string | null;
|
|
28
|
+
};
|
|
29
|
+
choices?: Array<{
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
stats: {
|
|
33
|
+
clicks: number;
|
|
34
|
+
buckets?: Array<{
|
|
35
|
+
bucket: string;
|
|
36
|
+
clicks: number;
|
|
37
|
+
}> | null;
|
|
38
|
+
};
|
|
39
|
+
} | null> | null;
|
|
40
|
+
};
|