@guardian/support-dotcom-components 11.0.0 → 11.1.0

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.
Files changed (41) hide show
  1. package/dist/dotcom/index.d.ts +0 -1
  2. package/dist/dotcom/index.d.ts.map +1 -1
  3. package/dist/dotcom/requests.d.ts.map +1 -1
  4. package/dist/dotcom/types.d.ts +2 -1
  5. package/dist/dotcom/types.d.ts.map +1 -1
  6. package/dist/index.esm.js +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/shared/lib/geolocation.d.ts +26 -0
  9. package/dist/shared/lib/geolocation.d.ts.map +1 -1
  10. package/dist/shared/lib/history.d.ts.map +1 -1
  11. package/dist/shared/lib/placeholders.d.ts.map +1 -1
  12. package/dist/shared/lib/reminderFields.d.ts.map +1 -1
  13. package/dist/shared/lib/viewLog.d.ts.map +1 -1
  14. package/dist/shared/types/abTests/banner.d.ts +24 -8
  15. package/dist/shared/types/abTests/banner.d.ts.map +1 -1
  16. package/dist/shared/types/abTests/epic.d.ts +8 -44
  17. package/dist/shared/types/abTests/epic.d.ts.map +1 -1
  18. package/dist/shared/types/abTests/gutter.d.ts +5 -0
  19. package/dist/shared/types/abTests/gutter.d.ts.map +1 -1
  20. package/dist/shared/types/abTests/header.d.ts +5 -0
  21. package/dist/shared/types/abTests/header.d.ts.map +1 -1
  22. package/dist/shared/types/abTests/index.d.ts +1 -0
  23. package/dist/shared/types/abTests/index.d.ts.map +1 -1
  24. package/dist/shared/types/abTests/inline1.d.ts +123 -0
  25. package/dist/shared/types/abTests/inline1.d.ts.map +1 -0
  26. package/dist/shared/types/abTests/shared.d.ts +2 -1
  27. package/dist/shared/types/abTests/shared.d.ts.map +1 -1
  28. package/dist/shared/types/props/banner.d.ts +1 -0
  29. package/dist/shared/types/props/banner.d.ts.map +1 -1
  30. package/dist/shared/types/props/design.d.ts.map +1 -1
  31. package/dist/shared/types/props/epic.d.ts +1 -0
  32. package/dist/shared/types/props/epic.d.ts.map +1 -1
  33. package/dist/shared/types/props/index.d.ts +1 -0
  34. package/dist/shared/types/props/index.d.ts.map +1 -1
  35. package/dist/shared/types/props/inline1.d.ts +153 -0
  36. package/dist/shared/types/props/inline1.d.ts.map +1 -0
  37. package/dist/shared/types/targeting/index.d.ts +1 -0
  38. package/dist/shared/types/targeting/index.d.ts.map +1 -1
  39. package/dist/shared/types/targeting/inline1.d.ts +14 -0
  40. package/dist/shared/types/targeting/inline1.d.ts.map +1 -0
  41. package/package.json +2 -3
@@ -0,0 +1,153 @@
1
+ import type { ComponentEvent } from '@guardian/ophan-tracker-js';
2
+ import z from 'zod';
3
+ import type { Inline1Variant } from '../abTests';
4
+ import { type Tracking } from './shared';
5
+ export interface Inline1Props {
6
+ variant: Inline1Variant;
7
+ tracking: Tracking;
8
+ countryCode?: string;
9
+ submitComponentEvent?: (componentEvent: ComponentEvent) => Promise<void>;
10
+ }
11
+ export declare const inline1SupportMessageSchema: z.ZodObject<{
12
+ type: string;
13
+ heading: z.ZodString;
14
+ body: z.ZodString;
15
+ primaryCta: z.ZodObject<{
16
+ text: z.ZodString;
17
+ baseUrl: z.ZodString;
18
+ }, z.core.$strip>;
19
+ image: z.ZodOptional<z.ZodObject<{
20
+ mainUrl: z.ZodString;
21
+ mobileUrl: z.ZodOptional<z.ZodString>;
22
+ tabletUrl: z.ZodOptional<z.ZodString>;
23
+ desktopUrl: z.ZodOptional<z.ZodString>;
24
+ leftColUrl: z.ZodOptional<z.ZodString>;
25
+ wideUrl: z.ZodOptional<z.ZodString>;
26
+ altText: z.ZodString;
27
+ }, z.core.$strip>>;
28
+ }, z.core.$strip>;
29
+ export declare const inline1PuzzlesMessageSchema: z.ZodObject<{
30
+ type: string;
31
+ }, z.core.$strip>;
32
+ export declare const inline1NewsletterMessageSchema: z.ZodObject<{
33
+ type: string;
34
+ newsletterId: z.ZodString;
35
+ frequency: z.ZodString;
36
+ heading: z.ZodString;
37
+ body: z.ZodString;
38
+ imageUrl: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>;
40
+ export declare const inline1MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ type: string;
42
+ heading: z.ZodString;
43
+ body: z.ZodString;
44
+ primaryCta: z.ZodObject<{
45
+ text: z.ZodString;
46
+ baseUrl: z.ZodString;
47
+ }, z.core.$strip>;
48
+ image: z.ZodOptional<z.ZodObject<{
49
+ mainUrl: z.ZodString;
50
+ mobileUrl: z.ZodOptional<z.ZodString>;
51
+ tabletUrl: z.ZodOptional<z.ZodString>;
52
+ desktopUrl: z.ZodOptional<z.ZodString>;
53
+ leftColUrl: z.ZodOptional<z.ZodString>;
54
+ wideUrl: z.ZodOptional<z.ZodString>;
55
+ altText: z.ZodString;
56
+ }, z.core.$strip>>;
57
+ }, z.core.$strip>, z.ZodObject<{
58
+ type: string;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ type: string;
61
+ newsletterId: z.ZodString;
62
+ frequency: z.ZodString;
63
+ heading: z.ZodString;
64
+ body: z.ZodString;
65
+ imageUrl: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>], "type">;
67
+ export declare const inline1VariantSchema: z.ZodObject<{
68
+ name: z.ZodString;
69
+ message: z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ type: string;
71
+ heading: z.ZodString;
72
+ body: z.ZodString;
73
+ primaryCta: z.ZodObject<{
74
+ text: z.ZodString;
75
+ baseUrl: z.ZodString;
76
+ }, z.core.$strip>;
77
+ image: z.ZodOptional<z.ZodObject<{
78
+ mainUrl: z.ZodString;
79
+ mobileUrl: z.ZodOptional<z.ZodString>;
80
+ tabletUrl: z.ZodOptional<z.ZodString>;
81
+ desktopUrl: z.ZodOptional<z.ZodString>;
82
+ leftColUrl: z.ZodOptional<z.ZodString>;
83
+ wideUrl: z.ZodOptional<z.ZodString>;
84
+ altText: z.ZodString;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ type: string;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ type: string;
90
+ newsletterId: z.ZodString;
91
+ frequency: z.ZodString;
92
+ heading: z.ZodString;
93
+ body: z.ZodString;
94
+ imageUrl: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strip>], "type">;
96
+ }, z.core.$strip>;
97
+ export declare const inline1PropsSchema: z.ZodObject<{
98
+ variant: z.ZodObject<{
99
+ name: z.ZodString;
100
+ message: z.ZodDiscriminatedUnion<[z.ZodObject<{
101
+ type: string;
102
+ heading: z.ZodString;
103
+ body: z.ZodString;
104
+ primaryCta: z.ZodObject<{
105
+ text: z.ZodString;
106
+ baseUrl: z.ZodString;
107
+ }, z.core.$strip>;
108
+ image: z.ZodOptional<z.ZodObject<{
109
+ mainUrl: z.ZodString;
110
+ mobileUrl: z.ZodOptional<z.ZodString>;
111
+ tabletUrl: z.ZodOptional<z.ZodString>;
112
+ desktopUrl: z.ZodOptional<z.ZodString>;
113
+ leftColUrl: z.ZodOptional<z.ZodString>;
114
+ wideUrl: z.ZodOptional<z.ZodString>;
115
+ altText: z.ZodString;
116
+ }, z.core.$strip>>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ type: string;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ type: string;
121
+ newsletterId: z.ZodString;
122
+ frequency: z.ZodString;
123
+ heading: z.ZodString;
124
+ body: z.ZodString;
125
+ imageUrl: z.ZodOptional<z.ZodString>;
126
+ }, z.core.$strip>], "type">;
127
+ }, z.core.$strip>;
128
+ tracking: z.ZodObject<{
129
+ abTestName: z.ZodString;
130
+ abTestVariant: z.ZodString;
131
+ campaignCode: z.ZodString;
132
+ componentType: z.ZodEnum<{
133
+ ACQUISITIONS_EPIC: "ACQUISITIONS_EPIC";
134
+ ACQUISITIONS_ENGAGEMENT_BANNER: "ACQUISITIONS_ENGAGEMENT_BANNER";
135
+ ACQUISITIONS_HEADER: "ACQUISITIONS_HEADER";
136
+ ACQUISITIONS_OTHER: "ACQUISITIONS_OTHER";
137
+ ACQUISITIONS_SUBSCRIPTIONS_BANNER: "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
138
+ }>;
139
+ products: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
140
+ CONTRIBUTION: "CONTRIBUTION";
141
+ MEMBERSHIP_SUPPORTER: "MEMBERSHIP_SUPPORTER";
142
+ DIGITAL_SUBSCRIPTION: "DIGITAL_SUBSCRIPTION";
143
+ PRINT_SUBSCRIPTION: "PRINT_SUBSCRIPTION";
144
+ }>>>>;
145
+ labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
146
+ ophanPageId: z.ZodString;
147
+ platformId: z.ZodString;
148
+ referrerUrl: z.ZodString;
149
+ }, z.core.$strip>;
150
+ countryCode: z.ZodOptional<z.ZodString>;
151
+ submitComponentEvent: z.ZodAny;
152
+ }, z.core.$strip>;
153
+ //# sourceMappingURL=inline1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline1.d.ts","sourceRoot":"","sources":["../../../../../shared/types/props/inline1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAA0B,KAAK,QAAQ,EAAkB,MAAM,UAAU,CAAC;AAEjF,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;iBAMtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;iBAOzC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;2BAI/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK7B,CAAC"}
@@ -2,5 +2,6 @@ export * from './epic';
2
2
  export * from './header';
3
3
  export * from './banner';
4
4
  export * from './gutter';
5
+ export * from './inline1';
5
6
  export * from './shared';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../shared/types/targeting/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../shared/types/targeting/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ export interface Inline1Targeting {
2
+ mvtId: number;
3
+ countryCode: string;
4
+ sectionId?: string;
5
+ tagIds?: string[];
6
+ pageId?: string;
7
+ browserId?: string;
8
+ isSignedIn: boolean;
9
+ hasConsented: boolean;
10
+ }
11
+ export type Inline1Payload = {
12
+ targeting: Inline1Targeting;
13
+ };
14
+ //# sourceMappingURL=inline1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline1.d.ts","sourceRoot":"","sources":["../../../../../shared/types/targeting/inline1.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,SAAS,EAAE,gBAAgB,CAAC;CAC/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/support-dotcom-components",
3
- "version": "11.0.0",
3
+ "version": "11.1.0",
4
4
  "description": "Reader Revenue components for dotcom",
5
5
  "repository": {
6
6
  "url": "https://github.com/guardian/support-dotcom-components"
@@ -13,12 +13,11 @@
13
13
  "files": [
14
14
  "dist/**/*"
15
15
  ],
16
- "dependencies": {},
17
16
  "devDependencies": {
18
17
  "@babel/core": "7.29.6",
19
18
  "@babel/preset-typescript": "7.28.5",
20
19
  "@rollup/plugin-babel": "7.1.0",
21
- "@rollup/plugin-commonjs": "29.0.2",
20
+ "@rollup/plugin-commonjs": "29.0.3",
22
21
  "@rollup/plugin-node-resolve": "16.0.3",
23
22
  "@rollup/plugin-replace": "6.0.3",
24
23
  "rollup": "4.62.2",