@walkeros/web-source-datalayer 0.3.1 → 0.4.1
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/dev.d.mts +36 -0
- package/dist/dev.d.ts +36 -0
- package/dist/dev.js +1 -0
- package/dist/dev.js.map +1 -0
- package/dist/dev.mjs +1 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.d.mts +9 -27
- package/dist/index.d.ts +9 -27
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { z
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* JavaScript variable name
|
|
6
|
-
* Used for dataLayer variable naming
|
|
7
|
-
*/
|
|
8
|
-
declare const JavaScriptVarName: z.ZodString;
|
|
9
|
-
/**
|
|
10
|
-
* Event prefix
|
|
11
|
-
* Used for filtering dataLayer events
|
|
12
|
-
*/
|
|
13
|
-
declare const EventPrefix: z.ZodString;
|
|
1
|
+
import { Source, WalkerOS, Elb, Mapping as Mapping$1 } from '@walkeros/core';
|
|
2
|
+
import { z } from '@walkeros/core/dev';
|
|
14
3
|
|
|
15
4
|
/**
|
|
16
5
|
* DataLayer source settings schema
|
|
@@ -20,17 +9,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
20
9
|
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
21
10
|
filter: z.ZodOptional<z.ZodAny>;
|
|
22
11
|
}, z.core.$strip>;
|
|
23
|
-
type Settings$1 = z.infer<typeof SettingsSchema>;
|
|
24
|
-
|
|
25
|
-
declare const settings: _walkeros_core.JSONSchema;
|
|
26
|
-
|
|
27
|
-
declare const index$1_EventPrefix: typeof EventPrefix;
|
|
28
|
-
declare const index$1_JavaScriptVarName: typeof JavaScriptVarName;
|
|
29
|
-
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
30
|
-
declare const index$1_settings: typeof settings;
|
|
31
|
-
declare namespace index$1 {
|
|
32
|
-
export { index$1_EventPrefix as EventPrefix, index$1_JavaScriptVarName as JavaScriptVarName, type Settings$1 as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
|
|
33
|
-
}
|
|
34
12
|
|
|
35
13
|
declare global {
|
|
36
14
|
interface Window {
|
|
@@ -45,13 +23,15 @@ interface Settings extends Omit<BaseSettings, 'filter'> {
|
|
|
45
23
|
prefix?: string;
|
|
46
24
|
filter?: (event: unknown) => WalkerOS.PromiseOrValue<boolean>;
|
|
47
25
|
}
|
|
26
|
+
type InitSettings = Partial<Settings>;
|
|
48
27
|
interface Mapping {
|
|
49
28
|
}
|
|
50
29
|
type Push = Elb.Fn;
|
|
51
30
|
interface Env extends Source.BaseEnv {
|
|
52
31
|
window?: Window & typeof globalThis;
|
|
53
32
|
}
|
|
54
|
-
type Types = Source.Types<Settings, Mapping, Push, Env>;
|
|
33
|
+
type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;
|
|
34
|
+
type Config = Source.Config<Types>;
|
|
55
35
|
type DataLayerEvent = {
|
|
56
36
|
event: string;
|
|
57
37
|
[key: string]: unknown;
|
|
@@ -66,16 +46,18 @@ type MappedEvent = {
|
|
|
66
46
|
};
|
|
67
47
|
};
|
|
68
48
|
|
|
49
|
+
type index_Config = Config;
|
|
69
50
|
type index_DataLayer = DataLayer;
|
|
70
51
|
type index_DataLayerEvent = DataLayerEvent;
|
|
71
52
|
type index_Env = Env;
|
|
53
|
+
type index_InitSettings = InitSettings;
|
|
72
54
|
type index_MappedEvent = MappedEvent;
|
|
73
55
|
type index_Mapping = Mapping;
|
|
74
56
|
type index_Push = Push;
|
|
75
57
|
type index_Settings = Settings;
|
|
76
58
|
type index_Types = Types;
|
|
77
59
|
declare namespace index {
|
|
78
|
-
export type { index_DataLayer as DataLayer, index_DataLayerEvent as DataLayerEvent, index_Env as Env, index_MappedEvent as MappedEvent, index_Mapping as Mapping, index_Push as Push, index_Settings as Settings, index_Types as Types };
|
|
60
|
+
export type { index_Config as Config, index_DataLayer as DataLayer, index_DataLayerEvent as DataLayerEvent, index_Env as Env, index_InitSettings as InitSettings, index_MappedEvent as MappedEvent, index_Mapping as Mapping, index_Push as Push, index_Settings as Settings, index_Types as Types };
|
|
79
61
|
}
|
|
80
62
|
|
|
81
63
|
/**
|
|
@@ -184,4 +166,4 @@ declare namespace mapping {
|
|
|
184
166
|
*/
|
|
185
167
|
declare const sourceDataLayer: Source.Init<Types>;
|
|
186
168
|
|
|
187
|
-
export { events as Events, mapping as Mapping, index as SourceDataLayer, consentOnlyMapping, consentUpdate$1 as consentUpdateEvent, config as dataLayerExamples, sourceDataLayer as default, env,
|
|
169
|
+
export { events as Events, mapping as Mapping, index as SourceDataLayer, consentOnlyMapping, consentUpdate$1 as consentUpdateEvent, config as dataLayerExamples, sourceDataLayer as default, env, sourceDataLayer };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { z
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* JavaScript variable name
|
|
6
|
-
* Used for dataLayer variable naming
|
|
7
|
-
*/
|
|
8
|
-
declare const JavaScriptVarName: z.ZodString;
|
|
9
|
-
/**
|
|
10
|
-
* Event prefix
|
|
11
|
-
* Used for filtering dataLayer events
|
|
12
|
-
*/
|
|
13
|
-
declare const EventPrefix: z.ZodString;
|
|
1
|
+
import { Source, WalkerOS, Elb, Mapping as Mapping$1 } from '@walkeros/core';
|
|
2
|
+
import { z } from '@walkeros/core/dev';
|
|
14
3
|
|
|
15
4
|
/**
|
|
16
5
|
* DataLayer source settings schema
|
|
@@ -20,17 +9,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
20
9
|
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
21
10
|
filter: z.ZodOptional<z.ZodAny>;
|
|
22
11
|
}, z.core.$strip>;
|
|
23
|
-
type Settings$1 = z.infer<typeof SettingsSchema>;
|
|
24
|
-
|
|
25
|
-
declare const settings: _walkeros_core.JSONSchema;
|
|
26
|
-
|
|
27
|
-
declare const index$1_EventPrefix: typeof EventPrefix;
|
|
28
|
-
declare const index$1_JavaScriptVarName: typeof JavaScriptVarName;
|
|
29
|
-
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
30
|
-
declare const index$1_settings: typeof settings;
|
|
31
|
-
declare namespace index$1 {
|
|
32
|
-
export { index$1_EventPrefix as EventPrefix, index$1_JavaScriptVarName as JavaScriptVarName, type Settings$1 as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
|
|
33
|
-
}
|
|
34
12
|
|
|
35
13
|
declare global {
|
|
36
14
|
interface Window {
|
|
@@ -45,13 +23,15 @@ interface Settings extends Omit<BaseSettings, 'filter'> {
|
|
|
45
23
|
prefix?: string;
|
|
46
24
|
filter?: (event: unknown) => WalkerOS.PromiseOrValue<boolean>;
|
|
47
25
|
}
|
|
26
|
+
type InitSettings = Partial<Settings>;
|
|
48
27
|
interface Mapping {
|
|
49
28
|
}
|
|
50
29
|
type Push = Elb.Fn;
|
|
51
30
|
interface Env extends Source.BaseEnv {
|
|
52
31
|
window?: Window & typeof globalThis;
|
|
53
32
|
}
|
|
54
|
-
type Types = Source.Types<Settings, Mapping, Push, Env>;
|
|
33
|
+
type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;
|
|
34
|
+
type Config = Source.Config<Types>;
|
|
55
35
|
type DataLayerEvent = {
|
|
56
36
|
event: string;
|
|
57
37
|
[key: string]: unknown;
|
|
@@ -66,16 +46,18 @@ type MappedEvent = {
|
|
|
66
46
|
};
|
|
67
47
|
};
|
|
68
48
|
|
|
49
|
+
type index_Config = Config;
|
|
69
50
|
type index_DataLayer = DataLayer;
|
|
70
51
|
type index_DataLayerEvent = DataLayerEvent;
|
|
71
52
|
type index_Env = Env;
|
|
53
|
+
type index_InitSettings = InitSettings;
|
|
72
54
|
type index_MappedEvent = MappedEvent;
|
|
73
55
|
type index_Mapping = Mapping;
|
|
74
56
|
type index_Push = Push;
|
|
75
57
|
type index_Settings = Settings;
|
|
76
58
|
type index_Types = Types;
|
|
77
59
|
declare namespace index {
|
|
78
|
-
export type { index_DataLayer as DataLayer, index_DataLayerEvent as DataLayerEvent, index_Env as Env, index_MappedEvent as MappedEvent, index_Mapping as Mapping, index_Push as Push, index_Settings as Settings, index_Types as Types };
|
|
60
|
+
export type { index_Config as Config, index_DataLayer as DataLayer, index_DataLayerEvent as DataLayerEvent, index_Env as Env, index_InitSettings as InitSettings, index_MappedEvent as MappedEvent, index_Mapping as Mapping, index_Push as Push, index_Settings as Settings, index_Types as Types };
|
|
79
61
|
}
|
|
80
62
|
|
|
81
63
|
/**
|
|
@@ -184,4 +166,4 @@ declare namespace mapping {
|
|
|
184
166
|
*/
|
|
185
167
|
declare const sourceDataLayer: Source.Init<Types>;
|
|
186
168
|
|
|
187
|
-
export { events as Events, mapping as Mapping, index as SourceDataLayer, consentOnlyMapping, consentUpdate$1 as consentUpdateEvent, config as dataLayerExamples, sourceDataLayer as default, env,
|
|
169
|
+
export { events as Events, mapping as Mapping, index as SourceDataLayer, consentOnlyMapping, consentUpdate$1 as consentUpdateEvent, config as dataLayerExamples, sourceDataLayer as default, env, sourceDataLayer };
|