@customerio/cdp-analytics-browser 0.3.2 → 0.3.4
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/README.md +5 -5
- package/dist/cjs/browser/index.js +8 -4
- package/dist/cjs/browser/index.js.map +1 -1
- package/dist/cjs/generated/version.js +1 -1
- package/dist/pkg/browser/index.js +8 -4
- package/dist/pkg/browser/index.js.map +1 -1
- package/dist/pkg/generated/version.js +1 -1
- package/dist/types/browser/index.d.ts.map +1 -1
- package/dist/types/core/buffer/index.d.ts +1 -1
- package/dist/types/generated/version.d.ts +1 -1
- package/dist/umd/646.js +1 -1
- package/dist/umd/646.js.gz +0 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/standalone.js +1 -1
- package/dist/umd/standalone.js.gz +0 -0
- package/package.json +3 -3
- package/src/browser/index.ts +17 -7
- package/src/generated/version.ts +1 -1
- package/src/plugins/in-app-plugin/events.ts +2 -2
package/src/browser/index.ts
CHANGED
|
@@ -195,9 +195,9 @@ async function registerPlugins(
|
|
|
195
195
|
const schemaFilter = opts.plan?.track
|
|
196
196
|
? await import(
|
|
197
197
|
/* webpackChunkName: "schemaFilter" */ '../plugins/schema-filter'
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
).then((mod) => {
|
|
199
|
+
return mod.schemaFilter(opts.plan?.track, legacySettings)
|
|
200
|
+
})
|
|
201
201
|
: undefined
|
|
202
202
|
|
|
203
203
|
const mergedSettings = mergedOptions(legacySettings, options)
|
|
@@ -209,12 +209,22 @@ async function registerPlugins(
|
|
|
209
209
|
tsubMiddleware
|
|
210
210
|
).catch(() => [])
|
|
211
211
|
|
|
212
|
-
const
|
|
212
|
+
const inAppPluginName = 'Customer.io In-App Plugin'
|
|
213
|
+
let inAppPluginSettings = mergedSettings[
|
|
214
|
+
inAppPluginName
|
|
215
|
+
] as InAppPluginSettings
|
|
216
|
+
if (!inAppPluginSettings) {
|
|
217
|
+
inAppPluginSettings = options.integrations?.[
|
|
218
|
+
inAppPluginName
|
|
219
|
+
] as InAppPluginSettings
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const inAppPlugin = inAppPluginSettings
|
|
213
223
|
? await import(
|
|
214
224
|
/* webpackChunkName: "inAppPlugin" */ '../plugins/in-app-plugin'
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
225
|
+
).then((mod) => {
|
|
226
|
+
return mod.InAppPlugin(inAppPluginSettings)
|
|
227
|
+
})
|
|
218
228
|
: undefined
|
|
219
229
|
|
|
220
230
|
const toRegister = [
|
package/src/generated/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is generated.
|
|
2
|
-
export const version = '0.3.
|
|
2
|
+
export const version = '0.3.4'
|
|
@@ -2,7 +2,7 @@ export enum InAppEvents {
|
|
|
2
2
|
MessageOpened = 'in-app:message-opened',
|
|
3
3
|
MessageDismissed = 'in-app:message-dismissed',
|
|
4
4
|
MessageError = 'in-app:message-error',
|
|
5
|
-
MessageAction = 'in-app:message-action'
|
|
5
|
+
MessageAction = 'in-app:message-action',
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const allEvents:string[] = Object.values(InAppEvents);
|
|
@@ -35,4 +35,4 @@ export function gistToCIO(gistEvent:string): string {
|
|
|
35
35
|
default:
|
|
36
36
|
return "";
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
}
|