posthog-react-native 3.13.0 → 3.13.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.
- package/lib/posthog-core/src/index.d.ts +1 -2
- package/lib/posthog-core/src/index.js.map +1 -1
- package/lib/posthog-core/src/types.d.ts +201 -5
- package/lib/posthog-core/src/types.js +1 -1
- package/lib/posthog-core/src/types.js.map +1 -1
- package/lib/posthog-core/src/utils.d.ts +1 -0
- package/lib/posthog-core/src/utils.js +1 -1
- package/lib/posthog-core/src/utils.js.map +1 -1
- package/lib/posthog-react-native/src/PostHogProvider.js +1 -1
- package/lib/posthog-react-native/src/PostHogProvider.js.map +1 -1
- package/lib/posthog-react-native/src/hooks/useNavigationTracker.d.ts +2 -1
- package/lib/posthog-react-native/src/hooks/useNavigationTracker.js +1 -1
- package/lib/posthog-react-native/src/hooks/useNavigationTracker.js.map +1 -1
- package/lib/posthog-react-native/src/posthog-rn.d.ts +1 -2
- package/lib/posthog-react-native/src/posthog-rn.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/PostHogSurveyProvider.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/PostHogSurveyProvider.js +1 -1
- package/lib/posthog-react-native/src/surveys/PostHogSurveyProvider.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/components/ConfirmationMessage.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/components/ConfirmationMessage.js +1 -1
- package/lib/posthog-react-native/src/surveys/components/ConfirmationMessage.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/components/QuestionHeader.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/components/QuestionHeader.js +1 -1
- package/lib/posthog-react-native/src/surveys/components/QuestionHeader.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/components/QuestionTypes.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/components/QuestionTypes.js +1 -1
- package/lib/posthog-react-native/src/surveys/components/QuestionTypes.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/components/SurveyModal.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/components/SurveyModal.js +1 -1
- package/lib/posthog-react-native/src/surveys/components/SurveyModal.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/components/Surveys.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/getActiveMatchingSurveys.d.ts +1 -2
- package/lib/posthog-react-native/src/surveys/getActiveMatchingSurveys.js +1 -1
- package/lib/posthog-react-native/src/surveys/getActiveMatchingSurveys.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/index.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/surveys-utils.d.ts +1 -1
- package/lib/posthog-react-native/src/surveys/surveys-utils.js +1 -1
- package/lib/posthog-react-native/src/surveys/surveys-utils.js.map +1 -1
- package/lib/posthog-react-native/src/surveys/useActivatedSurveys.d.ts +1 -1
- package/lib/posthog-react-native/src/types.d.ts +5 -0
- package/lib/posthog-react-native/src/version.d.ts +1 -1
- package/lib/posthog-react-native/src/version.js +1 -1
- package/lib/posthog-react-native/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/posthog-core/src/surveys-types.d.ts +0 -197
- package/lib/posthog-core/src/surveys-types.js +0 -1
- package/lib/posthog-core/src/surveys-types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
export interface SurveyAppearance {
|
|
2
|
-
backgroundColor?: string;
|
|
3
|
-
submitButtonColor?: string;
|
|
4
|
-
submitButtonText?: string;
|
|
5
|
-
submitButtonTextColor?: string;
|
|
6
|
-
ratingButtonColor?: string;
|
|
7
|
-
ratingButtonActiveColor?: string;
|
|
8
|
-
autoDisappear?: boolean;
|
|
9
|
-
displayThankYouMessage?: boolean;
|
|
10
|
-
thankYouMessageHeader?: string;
|
|
11
|
-
thankYouMessageDescription?: string;
|
|
12
|
-
thankYouMessageDescriptionContentType?: SurveyQuestionDescriptionContentType;
|
|
13
|
-
thankYouMessageCloseButtonText?: string;
|
|
14
|
-
borderColor?: string;
|
|
15
|
-
position?: SurveyPosition;
|
|
16
|
-
placeholder?: string;
|
|
17
|
-
shuffleQuestions?: boolean;
|
|
18
|
-
surveyPopupDelaySeconds?: number;
|
|
19
|
-
widgetType?: SurveyWidgetType;
|
|
20
|
-
widgetSelector?: string;
|
|
21
|
-
widgetLabel?: string;
|
|
22
|
-
widgetColor?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare enum SurveyPosition {
|
|
25
|
-
Left = "left",
|
|
26
|
-
Right = "right",
|
|
27
|
-
Center = "center"
|
|
28
|
-
}
|
|
29
|
-
export declare enum SurveyWidgetType {
|
|
30
|
-
Button = "button",
|
|
31
|
-
Tab = "tab",
|
|
32
|
-
Selector = "selector"
|
|
33
|
-
}
|
|
34
|
-
export declare enum SurveyType {
|
|
35
|
-
Popover = "popover",
|
|
36
|
-
API = "api",
|
|
37
|
-
Widget = "widget"
|
|
38
|
-
}
|
|
39
|
-
export type SurveyQuestion = BasicSurveyQuestion | LinkSurveyQuestion | RatingSurveyQuestion | MultipleSurveyQuestion;
|
|
40
|
-
export declare enum SurveyQuestionDescriptionContentType {
|
|
41
|
-
Html = "html",
|
|
42
|
-
Text = "text"
|
|
43
|
-
}
|
|
44
|
-
interface SurveyQuestionBase {
|
|
45
|
-
question: string;
|
|
46
|
-
id?: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
descriptionContentType?: SurveyQuestionDescriptionContentType;
|
|
49
|
-
optional?: boolean;
|
|
50
|
-
buttonText?: string;
|
|
51
|
-
originalQuestionIndex: number;
|
|
52
|
-
branching?: NextQuestionBranching | EndBranching | ResponseBasedBranching | SpecificQuestionBranching;
|
|
53
|
-
}
|
|
54
|
-
export interface BasicSurveyQuestion extends SurveyQuestionBase {
|
|
55
|
-
type: SurveyQuestionType.Open;
|
|
56
|
-
}
|
|
57
|
-
export interface LinkSurveyQuestion extends SurveyQuestionBase {
|
|
58
|
-
type: SurveyQuestionType.Link;
|
|
59
|
-
link?: string;
|
|
60
|
-
}
|
|
61
|
-
export interface RatingSurveyQuestion extends SurveyQuestionBase {
|
|
62
|
-
type: SurveyQuestionType.Rating;
|
|
63
|
-
display: SurveyRatingDisplay;
|
|
64
|
-
scale: 3 | 5 | 7 | 10;
|
|
65
|
-
lowerBoundLabel: string;
|
|
66
|
-
upperBoundLabel: string;
|
|
67
|
-
}
|
|
68
|
-
export declare enum SurveyRatingDisplay {
|
|
69
|
-
Number = "number",
|
|
70
|
-
Emoji = "emoji"
|
|
71
|
-
}
|
|
72
|
-
export interface MultipleSurveyQuestion extends SurveyQuestionBase {
|
|
73
|
-
type: SurveyQuestionType.SingleChoice | SurveyQuestionType.MultipleChoice;
|
|
74
|
-
choices: string[];
|
|
75
|
-
hasOpenChoice?: boolean;
|
|
76
|
-
shuffleOptions?: boolean;
|
|
77
|
-
}
|
|
78
|
-
export declare enum SurveyQuestionType {
|
|
79
|
-
Open = "open",
|
|
80
|
-
MultipleChoice = "multiple_choice",
|
|
81
|
-
SingleChoice = "single_choice",
|
|
82
|
-
Rating = "rating",
|
|
83
|
-
Link = "link"
|
|
84
|
-
}
|
|
85
|
-
export declare enum SurveyQuestionBranchingType {
|
|
86
|
-
NextQuestion = "next_question",
|
|
87
|
-
End = "end",
|
|
88
|
-
ResponseBased = "response_based",
|
|
89
|
-
SpecificQuestion = "specific_question"
|
|
90
|
-
}
|
|
91
|
-
interface NextQuestionBranching {
|
|
92
|
-
type: SurveyQuestionBranchingType.NextQuestion;
|
|
93
|
-
}
|
|
94
|
-
interface EndBranching {
|
|
95
|
-
type: SurveyQuestionBranchingType.End;
|
|
96
|
-
}
|
|
97
|
-
interface ResponseBasedBranching {
|
|
98
|
-
type: SurveyQuestionBranchingType.ResponseBased;
|
|
99
|
-
responseValues: Record<string, any>;
|
|
100
|
-
}
|
|
101
|
-
interface SpecificQuestionBranching {
|
|
102
|
-
type: SurveyQuestionBranchingType.SpecificQuestion;
|
|
103
|
-
index: number;
|
|
104
|
-
}
|
|
105
|
-
export interface SurveyResponse {
|
|
106
|
-
surveys: Survey[];
|
|
107
|
-
}
|
|
108
|
-
export type SurveyCallback = (surveys: Survey[]) => void;
|
|
109
|
-
export declare enum SurveyMatchType {
|
|
110
|
-
Regex = "regex",
|
|
111
|
-
NotRegex = "not_regex",
|
|
112
|
-
Exact = "exact",
|
|
113
|
-
IsNot = "is_not",
|
|
114
|
-
Icontains = "icontains",
|
|
115
|
-
NotIcontains = "not_icontains"
|
|
116
|
-
}
|
|
117
|
-
export interface SurveyElement {
|
|
118
|
-
text?: string;
|
|
119
|
-
$el_text?: string;
|
|
120
|
-
tag_name?: string;
|
|
121
|
-
href?: string;
|
|
122
|
-
attr_id?: string;
|
|
123
|
-
attr_class?: string[];
|
|
124
|
-
nth_child?: number;
|
|
125
|
-
nth_of_type?: number;
|
|
126
|
-
attributes?: Record<string, any>;
|
|
127
|
-
event_id?: number;
|
|
128
|
-
order?: number;
|
|
129
|
-
group_id?: number;
|
|
130
|
-
}
|
|
131
|
-
export interface SurveyRenderReason {
|
|
132
|
-
visible: boolean;
|
|
133
|
-
disabledReason?: string;
|
|
134
|
-
}
|
|
135
|
-
export interface Survey {
|
|
136
|
-
id: string;
|
|
137
|
-
name: string;
|
|
138
|
-
description?: string;
|
|
139
|
-
type: SurveyType;
|
|
140
|
-
feature_flag_keys?: {
|
|
141
|
-
key: string;
|
|
142
|
-
value?: string;
|
|
143
|
-
}[];
|
|
144
|
-
linked_flag_key?: string;
|
|
145
|
-
targeting_flag_key?: string;
|
|
146
|
-
internal_targeting_flag_key?: string;
|
|
147
|
-
questions: SurveyQuestion[];
|
|
148
|
-
appearance?: SurveyAppearance;
|
|
149
|
-
conditions?: {
|
|
150
|
-
url?: string;
|
|
151
|
-
selector?: string;
|
|
152
|
-
seenSurveyWaitPeriodInDays?: number;
|
|
153
|
-
urlMatchType?: SurveyMatchType;
|
|
154
|
-
events?: {
|
|
155
|
-
repeatedActivation?: boolean;
|
|
156
|
-
values?: {
|
|
157
|
-
name: string;
|
|
158
|
-
}[];
|
|
159
|
-
};
|
|
160
|
-
actions?: {
|
|
161
|
-
values: SurveyActionType[];
|
|
162
|
-
};
|
|
163
|
-
deviceTypes?: string[];
|
|
164
|
-
deviceTypesMatchType?: SurveyMatchType;
|
|
165
|
-
};
|
|
166
|
-
start_date?: string;
|
|
167
|
-
end_date?: string;
|
|
168
|
-
current_iteration?: number;
|
|
169
|
-
current_iteration_start_date?: string;
|
|
170
|
-
}
|
|
171
|
-
export interface SurveyActionType {
|
|
172
|
-
id: number;
|
|
173
|
-
name?: string;
|
|
174
|
-
steps?: ActionStepType[];
|
|
175
|
-
}
|
|
176
|
-
/** Sync with plugin-server/src/types.ts */
|
|
177
|
-
export declare enum ActionStepStringMatching {
|
|
178
|
-
Contains = "contains",
|
|
179
|
-
Exact = "exact",
|
|
180
|
-
Regex = "regex"
|
|
181
|
-
}
|
|
182
|
-
export interface ActionStepType {
|
|
183
|
-
event?: string;
|
|
184
|
-
selector?: string;
|
|
185
|
-
/** @deprecated Only `selector` should be used now. */
|
|
186
|
-
tag_name?: string;
|
|
187
|
-
text?: string;
|
|
188
|
-
/** @default StringMatching.Exact */
|
|
189
|
-
text_matching?: ActionStepStringMatching;
|
|
190
|
-
href?: string;
|
|
191
|
-
/** @default ActionStepStringMatching.Exact */
|
|
192
|
-
href_matching?: ActionStepStringMatching;
|
|
193
|
-
url?: string;
|
|
194
|
-
/** @default StringMatching.Contains */
|
|
195
|
-
url_matching?: ActionStepStringMatching;
|
|
196
|
-
}
|
|
197
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.SurveyWidgetType=exports.SurveyType=exports.SurveyRatingDisplay=exports.SurveyQuestionType=exports.SurveyQuestionDescriptionContentType=exports.SurveyQuestionBranchingType=exports.SurveyPosition=exports.SurveyMatchType=exports.ActionStepStringMatching=void 0;var SurveyPosition;(function(SurveyPosition){SurveyPosition["Left"]="left";SurveyPosition["Right"]="right";SurveyPosition["Center"]="center";})(SurveyPosition||(exports.SurveyPosition=SurveyPosition={}));var SurveyWidgetType;(function(SurveyWidgetType){SurveyWidgetType["Button"]="button";SurveyWidgetType["Tab"]="tab";SurveyWidgetType["Selector"]="selector";})(SurveyWidgetType||(exports.SurveyWidgetType=SurveyWidgetType={}));var SurveyType;(function(SurveyType){SurveyType["Popover"]="popover";SurveyType["API"]="api";SurveyType["Widget"]="widget";})(SurveyType||(exports.SurveyType=SurveyType={}));var SurveyQuestionDescriptionContentType;(function(SurveyQuestionDescriptionContentType){SurveyQuestionDescriptionContentType["Html"]="html";SurveyQuestionDescriptionContentType["Text"]="text";})(SurveyQuestionDescriptionContentType||(exports.SurveyQuestionDescriptionContentType=SurveyQuestionDescriptionContentType={}));var SurveyRatingDisplay;(function(SurveyRatingDisplay){SurveyRatingDisplay["Number"]="number";SurveyRatingDisplay["Emoji"]="emoji";})(SurveyRatingDisplay||(exports.SurveyRatingDisplay=SurveyRatingDisplay={}));var SurveyQuestionType;(function(SurveyQuestionType){SurveyQuestionType["Open"]="open";SurveyQuestionType["MultipleChoice"]="multiple_choice";SurveyQuestionType["SingleChoice"]="single_choice";SurveyQuestionType["Rating"]="rating";SurveyQuestionType["Link"]="link";})(SurveyQuestionType||(exports.SurveyQuestionType=SurveyQuestionType={}));var SurveyQuestionBranchingType;(function(SurveyQuestionBranchingType){SurveyQuestionBranchingType["NextQuestion"]="next_question";SurveyQuestionBranchingType["End"]="end";SurveyQuestionBranchingType["ResponseBased"]="response_based";SurveyQuestionBranchingType["SpecificQuestion"]="specific_question";})(SurveyQuestionBranchingType||(exports.SurveyQuestionBranchingType=SurveyQuestionBranchingType={}));var SurveyMatchType;(function(SurveyMatchType){SurveyMatchType["Regex"]="regex";SurveyMatchType["NotRegex"]="not_regex";SurveyMatchType["Exact"]="exact";SurveyMatchType["IsNot"]="is_not";SurveyMatchType["Icontains"]="icontains";SurveyMatchType["NotIcontains"]="not_icontains";})(SurveyMatchType||(exports.SurveyMatchType=SurveyMatchType={}));var ActionStepStringMatching;(function(ActionStepStringMatching){ActionStepStringMatching["Contains"]="contains";ActionStepStringMatching["Exact"]="exact";ActionStepStringMatching["Regex"]="regex";})(ActionStepStringMatching||(exports.ActionStepStringMatching=ActionStepStringMatching={}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"surveys-types.js","sourceRoot":"","sources":["../../../../posthog-core/src/surveys-types.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACnB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAID,MAAM,CAAN,IAAY,oCAGX;AAHD,WAAY,oCAAoC;IAC9C,qDAAa,CAAA;IACb,qDAAa,CAAA;AACf,CAAC,EAHW,oCAAoC,KAApC,oCAAoC,QAG/C;AA8BD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AASD,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,wDAAkC,CAAA;IAClC,oDAA8B,CAAA;IAC9B,uCAAiB,CAAA;IACjB,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,MAAM,CAAN,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,6DAA8B,CAAA;IAC9B,0CAAW,CAAA;IACX,+DAAgC,CAAA;IAChC,qEAAsC,CAAA;AACxC,CAAC,EALW,2BAA2B,KAA3B,2BAA2B,QAKtC;AA0BD,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,yCAAsB,CAAA;IACtB,kCAAe,CAAA;IACf,mCAAgB,CAAA;IAChB,0CAAuB,CAAA;IACvB,iDAA8B,CAAA;AAChC,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAkED,2CAA2C;AAC3C,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,iDAAqB,CAAA;IACrB,2CAAe,CAAA;IACf,2CAAe,CAAA;AACjB,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC"}
|