posthog-js 1.151.2 → 1.152.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.
- package/dist/array.full.js +2 -2
- package/dist/array.full.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/lib/src/extensions/surveys/components/PostHogLogo.d.ts +1 -3
- package/dist/lib/src/extensions/surveys/surveys-utils.d.ts +2 -1
- package/dist/lib/src/extensions/surveys.d.ts +11 -3
- package/dist/lib/src/posthog-core.d.ts +4 -0
- package/dist/lib/src/posthog-surveys-types.d.ts +4 -0
- package/dist/lib/src/posthog-surveys.d.ts +3 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.d.ts +12 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js +1 -1
- package/dist/surveys.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/src/extensions/surveys/components/BottomSection.jsx +4 -4
- package/lib/src/extensions/surveys/components/BottomSection.jsx.map +1 -1
- package/lib/src/extensions/surveys/components/ConfirmationMessage.jsx +5 -2
- package/lib/src/extensions/surveys/components/ConfirmationMessage.jsx.map +1 -1
- package/lib/src/extensions/surveys/components/PostHogLogo.d.ts +1 -3
- package/lib/src/extensions/surveys/components/PostHogLogo.jsx +2 -5
- package/lib/src/extensions/surveys/components/PostHogLogo.jsx.map +1 -1
- package/lib/src/extensions/surveys/components/QuestionHeader.jsx +2 -1
- package/lib/src/extensions/surveys/components/QuestionHeader.jsx.map +1 -1
- package/lib/src/extensions/surveys/components/QuestionTypes.jsx +9 -17
- package/lib/src/extensions/surveys/components/QuestionTypes.jsx.map +1 -1
- package/lib/src/extensions/surveys/surveys-utils.d.ts +2 -1
- package/lib/src/extensions/surveys/surveys-utils.jsx +4 -2
- package/lib/src/extensions/surveys/surveys-utils.jsx.map +1 -1
- package/lib/src/extensions/surveys.d.ts +11 -3
- package/lib/src/extensions/surveys.jsx +62 -7
- package/lib/src/extensions/surveys.jsx.map +1 -1
- package/lib/src/posthog-core.d.ts +4 -0
- package/lib/src/posthog-core.js +8 -0
- package/lib/src/posthog-core.js.map +1 -1
- package/lib/src/posthog-surveys-types.d.ts +4 -0
- package/lib/src/posthog-surveys-types.js.map +1 -1
- package/lib/src/posthog-surveys.d.ts +3 -0
- package/lib/src/posthog-surveys.js +23 -1
- package/lib/src/posthog-surveys.js.map +1 -1
- package/package.json +1 -1
package/dist/module.d.ts
CHANGED
|
@@ -1368,6 +1368,10 @@ interface SurveyElement {
|
|
|
1368
1368
|
order?: number;
|
|
1369
1369
|
group_id?: number;
|
|
1370
1370
|
}
|
|
1371
|
+
interface SurveyRenderReason {
|
|
1372
|
+
visible: boolean;
|
|
1373
|
+
disabledReason?: string;
|
|
1374
|
+
}
|
|
1371
1375
|
interface Survey {
|
|
1372
1376
|
id: string;
|
|
1373
1377
|
name: string;
|
|
@@ -1470,6 +1474,7 @@ declare class PostHogSurveys {
|
|
|
1470
1474
|
private readonly instance;
|
|
1471
1475
|
private _decideServerResponse?;
|
|
1472
1476
|
_surveyEventReceiver: SurveyEventReceiver | null;
|
|
1477
|
+
private _surveyManager;
|
|
1473
1478
|
constructor(instance: PostHog);
|
|
1474
1479
|
afterDecideResponse(response: DecideResponse): void;
|
|
1475
1480
|
loadIfEnabled(): void;
|
|
@@ -1477,6 +1482,8 @@ declare class PostHogSurveys {
|
|
|
1477
1482
|
getActiveMatchingSurveys(callback: SurveyCallback, forceReload?: boolean): void;
|
|
1478
1483
|
getNextSurveyStep(survey: Survey, currentQuestionIndex: number, response: string | string[] | number | null): any;
|
|
1479
1484
|
private _canActivateRepeatedly;
|
|
1485
|
+
canRenderSurvey(surveyId: string): void;
|
|
1486
|
+
renderSurvey(surveyId: string, selector: string): void;
|
|
1480
1487
|
}
|
|
1481
1488
|
|
|
1482
1489
|
declare class RateLimiter {
|
|
@@ -1911,6 +1918,10 @@ declare class PostHog {
|
|
|
1911
1918
|
getSurveys(callback: SurveyCallback, forceReload?: boolean): void;
|
|
1912
1919
|
/** Get surveys that should be enabled for the current user. */
|
|
1913
1920
|
getActiveMatchingSurveys(callback: SurveyCallback, forceReload?: boolean): void;
|
|
1921
|
+
/** Render a survey on a specific element. */
|
|
1922
|
+
renderSurvey(surveyId: string, selector: string): void;
|
|
1923
|
+
/** Checks the feature flags associated with this Survey to see if the survey can be rendered. */
|
|
1924
|
+
canRenderSurvey(surveyId: string): void;
|
|
1914
1925
|
/** Get the next step of the survey: a question index or `end` */
|
|
1915
1926
|
getNextSurveyStep(survey: Survey, currentQuestionIndex: number, response: string | string[] | number | null): number | SurveyQuestionBranchingType.End;
|
|
1916
1927
|
/**
|
|
@@ -2359,4 +2370,4 @@ declare class PostHog {
|
|
|
2359
2370
|
|
|
2360
2371
|
declare const posthog: PostHog;
|
|
2361
2372
|
|
|
2362
|
-
export { type ActionStepStringMatching, type ActionStepType, type ActionType, type AutocaptureCompatibleElement, type AutocaptureConfig, type BasicSurveyQuestion, type BootstrapConfig, type Breaker, type CaptureOptions, type CaptureResult, type CapturedNetworkRequest, Compression, type DecideResponse, type DomAutocaptureEvents, type EarlyAccessFeature, type EarlyAccessFeatureCallback, type EarlyAccessFeatureResponse, type ErrorConversions, type ErrorEventArgs, type ErrorProperties, type EventHandler, type FeatureFlagsCallback, type FlagVariant, type Headers, type HeatmapConfig, type InitiatorType, type IsFeatureEnabledOptions, type JsonType, type LinkSurveyQuestion, type MultipleSurveyQuestion, type NetworkRecordOptions, type NetworkRequest, type OptInOutCapturingOptions, type PerformanceCaptureConfig, type PersistentStore, PostHog, type PostHogConfig, type Properties, type Property, type QueuedRequestOptions, type RatingSurveyQuestion, type RequestCallback, type RequestOptions, type RequestResponse, type RetriableRequestOptions, type SessionIdChangedCallback, type SessionRecordingOptions, type SeverityLevel, type SnippetArrayItem, type Survey, type SurveyAppearance, type SurveyCallback, type SurveyElement, type SurveyQuestion, SurveyQuestionBranchingType, type SurveyQuestionDescriptionContentType, SurveyQuestionType, type SurveyResponse, SurveyType, type SurveyUrlMatchType, type ToolbarParams, type ToolbarSource, type ToolbarUserIntent, type ToolbarVersion, posthog as default, posthog, severityLevels };
|
|
2373
|
+
export { type ActionStepStringMatching, type ActionStepType, type ActionType, type AutocaptureCompatibleElement, type AutocaptureConfig, type BasicSurveyQuestion, type BootstrapConfig, type Breaker, type CaptureOptions, type CaptureResult, type CapturedNetworkRequest, Compression, type DecideResponse, type DomAutocaptureEvents, type EarlyAccessFeature, type EarlyAccessFeatureCallback, type EarlyAccessFeatureResponse, type ErrorConversions, type ErrorEventArgs, type ErrorProperties, type EventHandler, type FeatureFlagsCallback, type FlagVariant, type Headers, type HeatmapConfig, type InitiatorType, type IsFeatureEnabledOptions, type JsonType, type LinkSurveyQuestion, type MultipleSurveyQuestion, type NetworkRecordOptions, type NetworkRequest, type OptInOutCapturingOptions, type PerformanceCaptureConfig, type PersistentStore, PostHog, type PostHogConfig, type Properties, type Property, type QueuedRequestOptions, type RatingSurveyQuestion, type RequestCallback, type RequestOptions, type RequestResponse, type RetriableRequestOptions, type SessionIdChangedCallback, type SessionRecordingOptions, type SeverityLevel, type SnippetArrayItem, type Survey, type SurveyAppearance, type SurveyCallback, type SurveyElement, type SurveyQuestion, SurveyQuestionBranchingType, type SurveyQuestionDescriptionContentType, SurveyQuestionType, type SurveyRenderReason, type SurveyResponse, SurveyType, type SurveyUrlMatchType, type ToolbarParams, type ToolbarSource, type ToolbarUserIntent, type ToolbarVersion, posthog as default, posthog, severityLevels };
|