posthog-js 1.87.1 → 1.87.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/dist/array.full.js +1 -1
- package/dist/array.js +1 -1
- package/dist/es.js +1 -1
- package/dist/es.js.map +1 -1
- package/dist/module.d.ts +4 -4
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/src/loader-module.d.ts +1 -0
- package/lib/src/loader-module.js +1 -0
- package/lib/src/loader-module.js.map +1 -1
- package/lib/src/posthog-surveys-types.d.ts +0 -3
- package/lib/src/posthog-surveys-types.js +0 -3
- package/lib/src/posthog-surveys-types.js.map +1 -1
- package/package.json +1 -1
package/lib/package.json
CHANGED
package/lib/src/loader-module.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { init_as_module } from './posthog-core';
|
|
2
2
|
export { PostHog } from './posthog-core';
|
|
3
3
|
export * from './types';
|
|
4
|
+
export * from './posthog-surveys-types';
|
|
4
5
|
export var posthog = init_as_module();
|
|
5
6
|
export default posthog;
|
|
6
7
|
//# sourceMappingURL=loader-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-module.js","sourceRoot":"","sources":["../../src/loader-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,cAAc,SAAS,CAAA;AACvB,MAAM,CAAC,IAAM,OAAO,GAAG,cAAc,EAAE,CAAA;AACvC,eAAe,OAAO,CAAA","sourcesContent":["import { init_as_module } from './posthog-core'\nexport { PostHog } from './posthog-core'\nexport * from './types'\nexport const posthog = init_as_module()\nexport default posthog\n"]}
|
|
1
|
+
{"version":3,"file":"loader-module.js","sourceRoot":"","sources":["../../src/loader-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,cAAc,SAAS,CAAA;AACvB,cAAc,yBAAyB,CAAA;AACvC,MAAM,CAAC,IAAM,OAAO,GAAG,cAAc,EAAE,CAAA;AACvC,eAAe,OAAO,CAAA","sourcesContent":["import { init_as_module } from './posthog-core'\nexport { PostHog } from './posthog-core'\nexport * from './types'\nexport * from './posthog-surveys-types'\nexport const posthog = init_as_module()\nexport default posthog\n"]}
|
|
@@ -24,9 +24,6 @@ export interface SurveyAppearance {
|
|
|
24
24
|
}
|
|
25
25
|
export declare enum SurveyType {
|
|
26
26
|
Popover = "popover",
|
|
27
|
-
Button = "button",
|
|
28
|
-
FullScreen = "full_screen",
|
|
29
|
-
Email = "email",
|
|
30
27
|
API = "api"
|
|
31
28
|
}
|
|
32
29
|
export declare type SurveyQuestion = BasicSurveyQuestion | LinkSurveyQuestion | RatingSurveyQuestion | MultipleSurveyQuestion;
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
export var SurveyType;
|
|
7
7
|
(function (SurveyType) {
|
|
8
8
|
SurveyType["Popover"] = "popover";
|
|
9
|
-
SurveyType["Button"] = "button";
|
|
10
|
-
SurveyType["FullScreen"] = "full_screen";
|
|
11
|
-
SurveyType["Email"] = "email";
|
|
12
9
|
SurveyType["API"] = "api";
|
|
13
10
|
})(SurveyType || (SurveyType = {}));
|
|
14
11
|
export var SurveyQuestionType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog-surveys-types.js","sourceRoot":"","sources":["../../src/posthog-surveys-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwBH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"posthog-surveys-types.js","sourceRoot":"","sources":["../../src/posthog-surveys-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwBH,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,yBAAW,CAAA;AACf,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAgCD,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,mCAAa,CAAA;IACb,wDAAkC,CAAA;IAClC,oDAA8B,CAAA;IAC9B,uCAAiB,CAAA;IACjB,mCAAa,CAAA;AACjB,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["/**\n * Having Survey types in types.ts was confusing tsc\n * and generating an invalid module.d.ts\n * See https://github.com/PostHog/posthog-js/issues/698\n */\n\nexport interface SurveyAppearance {\n // keep in sync with frontend/src/types.ts -> SurveyAppearance\n backgroundColor?: string\n submitButtonColor?: string\n textColor?: string\n submitButtonText?: string\n descriptionTextColor?: string\n ratingButtonColor?: string\n ratingButtonActiveColor?: string\n ratingButtonHoverColor?: string\n whiteLabel?: boolean\n displayThankYouMessage?: boolean\n thankYouMessageHeader?: string\n thankYouMessageDescription?: string\n borderColor?: string\n position?: 'left' | 'right' | 'center'\n placeholder?: string\n // questionable: Not in frontend/src/types.ts -> SurveyAppearance, but used in site app\n maxWidth?: string\n zIndex?: string\n}\n\nexport enum SurveyType {\n Popover = 'popover',\n API = 'api',\n}\n\nexport type SurveyQuestion = BasicSurveyQuestion | LinkSurveyQuestion | RatingSurveyQuestion | MultipleSurveyQuestion\n\ninterface SurveyQuestionBase {\n question: string\n description?: string | null\n optional?: boolean\n}\n\nexport interface BasicSurveyQuestion extends SurveyQuestionBase {\n type: SurveyQuestionType.Open\n}\n\nexport interface LinkSurveyQuestion extends SurveyQuestionBase {\n type: SurveyQuestionType.Link\n link: string | null\n}\n\nexport interface RatingSurveyQuestion extends SurveyQuestionBase {\n type: SurveyQuestionType.Rating\n display: 'number' | 'emoji'\n scale: number\n lowerBoundLabel: string\n upperBoundLabel: string\n}\n\nexport interface MultipleSurveyQuestion extends SurveyQuestionBase {\n type: SurveyQuestionType.SingleChoice | SurveyQuestionType.MultipleChoice\n choices: string[]\n}\n\nexport enum SurveyQuestionType {\n Open = 'open',\n MultipleChoice = 'multiple_choice',\n SingleChoice = 'single_choice',\n Rating = 'rating',\n Link = 'link',\n}\n\nexport interface SurveyResponse {\n surveys: Survey[]\n}\n\nexport type SurveyCallback = (surveys: Survey[]) => void\n\nexport type SurveyUrlMatchType = 'regex' | 'exact' | 'icontains'\n\nexport interface Survey {\n // Sync this with the backend's SurveyAPISerializer!\n id: string\n name: string\n description: string\n type: SurveyType\n linked_flag_key: string | null\n targeting_flag_key: string | null\n questions: SurveyQuestion[]\n appearance: SurveyAppearance | null\n conditions: {\n url?: string\n selector?: string\n seenSurveyWaitPeriodInDays?: number\n urlMatchType?: SurveyUrlMatchType\n } | null\n start_date: string | null\n end_date: string | null\n}\n"]}
|
package/package.json
CHANGED