@guardian/commercial-core 5.1.0 → 5.1.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.
|
@@ -10,8 +10,9 @@ const findBreakpoint = (width) => {
|
|
|
10
10
|
return 'mobile';
|
|
11
11
|
};
|
|
12
12
|
const getViewportTargeting = ({ viewPortWidth, cmpBannerWillShow, }) => {
|
|
13
|
-
// Don’t show inskin if if a privacy message will be shown
|
|
14
|
-
const
|
|
13
|
+
// Don’t show inskin if if a privacy message will be shown or on preview
|
|
14
|
+
const isPreview = window.guardian.config.page.isPreview;
|
|
15
|
+
const inskin = cmpBannerWillShow || isPreview ? 'f' : 't';
|
|
15
16
|
return {
|
|
16
17
|
bp: findBreakpoint(viewPortWidth),
|
|
17
18
|
skinsize: viewPortWidth >= 1560 ? 'l' : 's',
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -32,16 +32,17 @@ export type GuardianWindowConfig = {
|
|
|
32
32
|
googleAnalytics?: GuardianAnalyticsConfig;
|
|
33
33
|
isDotcomRendering: boolean;
|
|
34
34
|
ophan: {
|
|
35
|
-
pageViewId: string;
|
|
36
35
|
browserId?: string;
|
|
36
|
+
pageViewId: string;
|
|
37
37
|
};
|
|
38
38
|
page: {
|
|
39
|
-
|
|
39
|
+
edition: Edition;
|
|
40
|
+
isPreview: boolean;
|
|
40
41
|
isSensitive: boolean;
|
|
41
42
|
pageId: string;
|
|
42
43
|
section: string;
|
|
44
|
+
sharedAdTargeting?: Record<string, string | string[]>;
|
|
43
45
|
videoDuration: number;
|
|
44
|
-
edition: Edition;
|
|
45
46
|
};
|
|
46
47
|
tests?: {
|
|
47
48
|
[key: `${string}Control`]: 'control';
|
|
@@ -7,8 +7,9 @@ const findBreakpoint = (width) => {
|
|
|
7
7
|
return 'mobile';
|
|
8
8
|
};
|
|
9
9
|
const getViewportTargeting = ({ viewPortWidth, cmpBannerWillShow, }) => {
|
|
10
|
-
// Don’t show inskin if if a privacy message will be shown
|
|
11
|
-
const
|
|
10
|
+
// Don’t show inskin if if a privacy message will be shown or on preview
|
|
11
|
+
const isPreview = window.guardian.config.page.isPreview;
|
|
12
|
+
const inskin = cmpBannerWillShow || isPreview ? 'f' : 't';
|
|
12
13
|
return {
|
|
13
14
|
bp: findBreakpoint(viewPortWidth),
|
|
14
15
|
skinsize: viewPortWidth >= 1560 ? 'l' : 's',
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -32,16 +32,17 @@ export type GuardianWindowConfig = {
|
|
|
32
32
|
googleAnalytics?: GuardianAnalyticsConfig;
|
|
33
33
|
isDotcomRendering: boolean;
|
|
34
34
|
ophan: {
|
|
35
|
-
pageViewId: string;
|
|
36
35
|
browserId?: string;
|
|
36
|
+
pageViewId: string;
|
|
37
37
|
};
|
|
38
38
|
page: {
|
|
39
|
-
|
|
39
|
+
edition: Edition;
|
|
40
|
+
isPreview: boolean;
|
|
40
41
|
isSensitive: boolean;
|
|
41
42
|
pageId: string;
|
|
42
43
|
section: string;
|
|
44
|
+
sharedAdTargeting?: Record<string, string | string[]>;
|
|
43
45
|
videoDuration: number;
|
|
44
|
-
edition: Edition;
|
|
45
46
|
};
|
|
46
47
|
tests?: {
|
|
47
48
|
[key: `${string}Control`]: 'control';
|