@posthog/browser-common 0.10.6 → 0.10.7
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/autocapture.js +1 -1
- package/dist/autocapture.mjs +1 -1
- package/dist/config.js +1 -1
- package/dist/config.mjs +1 -1
- package/dist/feature-flags.js +2 -2
- package/dist/feature-flags.mjs +2 -2
- package/dist/utils/autocapture-utils.js +8 -8
- package/dist/utils/autocapture-utils.mjs +8 -8
- package/dist/utils/event-utils.js +10 -10
- package/dist/utils/event-utils.mjs +10 -10
- package/dist/utils/logger.js +2 -2
- package/dist/utils/logger.mjs +2 -2
- package/dist/utils/survey-utils.js +1 -1
- package/dist/utils/survey-utils.mjs +1 -1
- package/package.json +3 -3
package/dist/autocapture.js
CHANGED
|
@@ -90,7 +90,7 @@ function isInputValueEligible(target, config) {
|
|
|
90
90
|
}
|
|
91
91
|
return true;
|
|
92
92
|
}
|
|
93
|
-
const logger = (0, logger_js_namespaceObject.createLogger)('[AutoCapture]');
|
|
93
|
+
const logger = /* @__PURE__ */ (0, logger_js_namespaceObject.createLogger)('[AutoCapture]');
|
|
94
94
|
function limitText(length, text) {
|
|
95
95
|
if (text.length > length) return text.slice(0, length) + '...';
|
|
96
96
|
return text;
|
package/dist/autocapture.mjs
CHANGED
|
@@ -42,7 +42,7 @@ function isInputValueEligible(target, config) {
|
|
|
42
42
|
}
|
|
43
43
|
return true;
|
|
44
44
|
}
|
|
45
|
-
const logger = createLogger('[AutoCapture]');
|
|
45
|
+
const logger = /* @__PURE__ */ createLogger('[AutoCapture]');
|
|
46
46
|
function limitText(length, text) {
|
|
47
47
|
if (text.length > length) return text.slice(0, length) + '...';
|
|
48
48
|
return text;
|
package/dist/config.js
CHANGED
package/dist/config.mjs
CHANGED
package/dist/feature-flags.js
CHANGED
|
@@ -41,8 +41,8 @@ const logger_js_namespaceObject = require("./utils/logger.js");
|
|
|
41
41
|
const timezone_js_namespaceObject = require("./utils/timezone.js");
|
|
42
42
|
const promise_utils_js_namespaceObject = require("./utils/promise-utils.js");
|
|
43
43
|
const request_reachability_js_namespaceObject = require("./utils/request-reachability.js");
|
|
44
|
-
const logger = (0, logger_js_namespaceObject.createLogger)('[FeatureFlags]');
|
|
45
|
-
const forceDebugLogger = (0, logger_js_namespaceObject.createLogger)('[FeatureFlags]', {
|
|
44
|
+
const logger = /* @__PURE__ */ (0, logger_js_namespaceObject.createLogger)('[FeatureFlags]');
|
|
45
|
+
const forceDebugLogger = /* @__PURE__ */ (0, logger_js_namespaceObject.createLogger)('[FeatureFlags]', {
|
|
46
46
|
debugEnabled: true
|
|
47
47
|
});
|
|
48
48
|
const FLAG_TIMEOUT_MSG = '" failed. Feature flags didn\'t load in time.';
|
package/dist/feature-flags.mjs
CHANGED
|
@@ -5,8 +5,8 @@ import { createLogger } from "./utils/logger.mjs";
|
|
|
5
5
|
import { getTimezone } from "./utils/timezone.mjs";
|
|
6
6
|
import { continueWith } from "./utils/promise-utils.mjs";
|
|
7
7
|
import { isStatusZeroFailureCircuitBreakerTripped, updateStatusZeroFailureCount } from "./utils/request-reachability.mjs";
|
|
8
|
-
const logger = createLogger('[FeatureFlags]');
|
|
9
|
-
const forceDebugLogger = createLogger('[FeatureFlags]', {
|
|
8
|
+
const logger = /* @__PURE__ */ createLogger('[FeatureFlags]');
|
|
9
|
+
const forceDebugLogger = /* @__PURE__ */ createLogger('[FeatureFlags]', {
|
|
10
10
|
debugEnabled: true
|
|
11
11
|
});
|
|
12
12
|
const FLAG_TIMEOUT_MSG = '" failed. Feature flags didn\'t load in time.';
|
|
@@ -149,14 +149,14 @@ const DEFAULT_CONTENT_IGNORELIST = [
|
|
|
149
149
|
'❯',
|
|
150
150
|
'❮'
|
|
151
151
|
];
|
|
152
|
-
const DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS = [
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
];
|
|
159
|
-
const MAX_CONTENT_IGNORELIST_ENTRIES = DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS.length + 10;
|
|
152
|
+
const DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS = /* @__PURE__ */ (()=>[
|
|
153
|
+
...DEFAULT_CONTENT_IGNORELIST,
|
|
154
|
+
'+',
|
|
155
|
+
'-',
|
|
156
|
+
'−',
|
|
157
|
+
'–'
|
|
158
|
+
])();
|
|
159
|
+
const MAX_CONTENT_IGNORELIST_ENTRIES = /* @__PURE__ */ (()=>DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS.length + 10)();
|
|
160
160
|
const INTERACTIVE_TAGS = [
|
|
161
161
|
'button',
|
|
162
162
|
'a',
|
|
@@ -95,14 +95,14 @@ const DEFAULT_CONTENT_IGNORELIST = [
|
|
|
95
95
|
'❯',
|
|
96
96
|
'❮'
|
|
97
97
|
];
|
|
98
|
-
const DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS = [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
];
|
|
105
|
-
const MAX_CONTENT_IGNORELIST_ENTRIES = DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS.length + 10;
|
|
98
|
+
const DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS = /* @__PURE__ */ (()=>[
|
|
99
|
+
...DEFAULT_CONTENT_IGNORELIST,
|
|
100
|
+
'+',
|
|
101
|
+
'-',
|
|
102
|
+
'−',
|
|
103
|
+
'–'
|
|
104
|
+
])();
|
|
105
|
+
const MAX_CONTENT_IGNORELIST_ENTRIES = /* @__PURE__ */ (()=>DEFAULT_CONTENT_IGNORELIST_WITH_STEPPERS.length + 10)();
|
|
106
106
|
const INTERACTIVE_TAGS = [
|
|
107
107
|
'button',
|
|
108
108
|
'a',
|
|
@@ -88,16 +88,16 @@ const PERSONAL_DATA_CAMPAIGN_PARAMS = [
|
|
|
88
88
|
'irclid',
|
|
89
89
|
'_kx'
|
|
90
90
|
];
|
|
91
|
-
const CAMPAIGN_PARAMS = [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
];
|
|
91
|
+
const CAMPAIGN_PARAMS = /* @__PURE__ */ (()=>[
|
|
92
|
+
'utm_source',
|
|
93
|
+
'utm_medium',
|
|
94
|
+
'utm_campaign',
|
|
95
|
+
'utm_content',
|
|
96
|
+
'utm_term',
|
|
97
|
+
'gad_source',
|
|
98
|
+
'mc_cid',
|
|
99
|
+
...PERSONAL_DATA_CAMPAIGN_PARAMS
|
|
100
|
+
])();
|
|
101
101
|
const EVENT_TO_PERSON_PROPERTIES = [
|
|
102
102
|
'$app_build',
|
|
103
103
|
'$app_name',
|
|
@@ -28,16 +28,16 @@ const PERSONAL_DATA_CAMPAIGN_PARAMS = [
|
|
|
28
28
|
'irclid',
|
|
29
29
|
'_kx'
|
|
30
30
|
];
|
|
31
|
-
const CAMPAIGN_PARAMS = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
];
|
|
31
|
+
const CAMPAIGN_PARAMS = /* @__PURE__ */ (()=>[
|
|
32
|
+
'utm_source',
|
|
33
|
+
'utm_medium',
|
|
34
|
+
'utm_campaign',
|
|
35
|
+
'utm_content',
|
|
36
|
+
'utm_term',
|
|
37
|
+
'gad_source',
|
|
38
|
+
'mc_cid',
|
|
39
|
+
...PERSONAL_DATA_CAMPAIGN_PARAMS
|
|
40
|
+
])();
|
|
41
41
|
const EVENT_TO_PERSON_PROPERTIES = [
|
|
42
42
|
'$app_build',
|
|
43
43
|
'$app_name',
|
package/dist/utils/logger.js
CHANGED
|
@@ -79,8 +79,8 @@ const _createLogger = (prefix, { debugEnabled } = {})=>{
|
|
|
79
79
|
};
|
|
80
80
|
return logger;
|
|
81
81
|
};
|
|
82
|
-
const logger_logger = _createLogger('[PostHog.js]');
|
|
83
|
-
const createLogger = logger_logger.createLogger;
|
|
82
|
+
const logger_logger = /* @__PURE__ */ _createLogger('[PostHog.js]');
|
|
83
|
+
const createLogger = (prefix, options)=>logger_logger.createLogger(prefix, options);
|
|
84
84
|
exports.createLogger = __webpack_exports__.createLogger;
|
|
85
85
|
exports.logger = __webpack_exports__.logger;
|
|
86
86
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/dist/utils/logger.mjs
CHANGED
|
@@ -36,6 +36,6 @@ const _createLogger = (prefix, { debugEnabled } = {})=>{
|
|
|
36
36
|
};
|
|
37
37
|
return logger;
|
|
38
38
|
};
|
|
39
|
-
const logger_logger = _createLogger('[PostHog.js]');
|
|
40
|
-
const createLogger = logger_logger.createLogger;
|
|
39
|
+
const logger_logger = /* @__PURE__ */ _createLogger('[PostHog.js]');
|
|
40
|
+
const createLogger = (prefix, options)=>logger_logger.createLogger(prefix, options);
|
|
41
41
|
export { createLogger, logger_logger as logger };
|
|
@@ -48,7 +48,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
48
48
|
const surveys_namespaceObject = require("@posthog/core/surveys");
|
|
49
49
|
const external_survey_constants_js_namespaceObject = require("../survey-constants.js");
|
|
50
50
|
const external_logger_js_namespaceObject = require("./logger.js");
|
|
51
|
-
const SURVEY_LOGGER = (0, external_logger_js_namespaceObject.createLogger)('[Surveys]');
|
|
51
|
+
const SURVEY_LOGGER = /* @__PURE__ */ (0, external_logger_js_namespaceObject.createLogger)('[Surveys]');
|
|
52
52
|
const SURVEY_CAPTURING_DISABLED = 'PostHog is not capturing, so a survey response cannot be recorded';
|
|
53
53
|
function isSurveyRunning(survey) {
|
|
54
54
|
return !!(survey.start_date && !survey.end_date);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { doesSurveyActivateByEvent, getSurveyInteractionProperty, getSurveyIterationKey, isSurveyIterationBased } from "@posthog/core/surveys";
|
|
2
2
|
import { DisplaySurveyType, SurveyType } from "../survey-constants.mjs";
|
|
3
3
|
import { createLogger } from "./logger.mjs";
|
|
4
|
-
const SURVEY_LOGGER = createLogger('[Surveys]');
|
|
4
|
+
const SURVEY_LOGGER = /* @__PURE__ */ createLogger('[Surveys]');
|
|
5
5
|
const SURVEY_CAPTURING_DISABLED = 'PostHog is not capturing, so a survey response cannot be recorded';
|
|
6
6
|
function isSurveyRunning(survey) {
|
|
7
7
|
return !!(survey.start_date && !survey.end_date);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/browser-common",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"description": "Internal shared browser utilities and extension primitives for PostHog Browser SDKs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -241,8 +241,8 @@
|
|
|
241
241
|
"dependencies": {
|
|
242
242
|
"dompurify": "^3.4.13",
|
|
243
243
|
"preact": "^10.29.3",
|
|
244
|
-
"@posthog/core": "^1.63.
|
|
245
|
-
"@posthog/types": "^1.
|
|
244
|
+
"@posthog/core": "^1.63.2",
|
|
245
|
+
"@posthog/types": "^1.420.0"
|
|
246
246
|
},
|
|
247
247
|
"devDependencies": {
|
|
248
248
|
"@rsbuild/plugin-react": "^2.1.0",
|