@guardian/support-dotcom-components 1.1.2 → 1.1.3

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.
@@ -9,6 +9,55 @@ export interface HeaderContent {
9
9
  secondaryCta?: Cta;
10
10
  benefits?: string[];
11
11
  }
12
+ export declare const headerContentSchema: z.ZodObject<{
13
+ heading: z.ZodString;
14
+ subheading: z.ZodString;
15
+ primaryCta: z.ZodOptional<z.ZodObject<{
16
+ text: z.ZodString;
17
+ baseUrl: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ text: string;
20
+ baseUrl: string;
21
+ }, {
22
+ text: string;
23
+ baseUrl: string;
24
+ }>>;
25
+ secondaryCta: z.ZodOptional<z.ZodObject<{
26
+ text: z.ZodString;
27
+ baseUrl: z.ZodString;
28
+ }, "strip", z.ZodTypeAny, {
29
+ text: string;
30
+ baseUrl: string;
31
+ }, {
32
+ text: string;
33
+ baseUrl: string;
34
+ }>>;
35
+ benefits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ heading: string;
38
+ subheading: string;
39
+ primaryCta?: {
40
+ text: string;
41
+ baseUrl: string;
42
+ } | undefined;
43
+ secondaryCta?: {
44
+ text: string;
45
+ baseUrl: string;
46
+ } | undefined;
47
+ benefits?: string[] | undefined;
48
+ }, {
49
+ heading: string;
50
+ subheading: string;
51
+ primaryCta?: {
52
+ text: string;
53
+ baseUrl: string;
54
+ } | undefined;
55
+ secondaryCta?: {
56
+ text: string;
57
+ baseUrl: string;
58
+ } | undefined;
59
+ benefits?: string[] | undefined;
60
+ }>;
12
61
  export interface HeaderProps extends EmotionJSX.IntrinsicAttributes {
13
62
  content: HeaderContent;
14
63
  tracking: Tracking;
@@ -17,11 +66,11 @@ export interface HeaderProps extends EmotionJSX.IntrinsicAttributes {
17
66
  submitComponentEvent?: (componentEvent: OphanComponentEvent) => void;
18
67
  numArticles?: number;
19
68
  }
20
- export declare const headerSchema: z.ZodObject<{
69
+ export declare const headerPropsSchema: z.ZodObject<{
21
70
  content: z.ZodObject<{
22
71
  heading: z.ZodString;
23
72
  subheading: z.ZodString;
24
- primaryCta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
73
+ primaryCta: z.ZodOptional<z.ZodObject<{
25
74
  text: z.ZodString;
26
75
  baseUrl: z.ZodString;
27
76
  }, "strip", z.ZodTypeAny, {
@@ -30,8 +79,8 @@ export declare const headerSchema: z.ZodObject<{
30
79
  }, {
31
80
  text: string;
32
81
  baseUrl: string;
33
- }>>>;
34
- secondaryCta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
82
+ }>>;
83
+ secondaryCta: z.ZodOptional<z.ZodObject<{
35
84
  text: z.ZodString;
36
85
  baseUrl: z.ZodString;
37
86
  }, "strip", z.ZodTypeAny, {
@@ -40,29 +89,32 @@ export declare const headerSchema: z.ZodObject<{
40
89
  }, {
41
90
  text: string;
42
91
  baseUrl: string;
43
- }>>>;
92
+ }>>;
93
+ benefits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44
94
  }, "strip", z.ZodTypeAny, {
45
95
  heading: string;
46
96
  subheading: string;
47
97
  primaryCta?: {
48
98
  text: string;
49
99
  baseUrl: string;
50
- } | null | undefined;
100
+ } | undefined;
51
101
  secondaryCta?: {
52
102
  text: string;
53
103
  baseUrl: string;
54
- } | null | undefined;
104
+ } | undefined;
105
+ benefits?: string[] | undefined;
55
106
  }, {
56
107
  heading: string;
57
108
  subheading: string;
58
109
  primaryCta?: {
59
110
  text: string;
60
111
  baseUrl: string;
61
- } | null | undefined;
112
+ } | undefined;
62
113
  secondaryCta?: {
63
114
  text: string;
64
115
  baseUrl: string;
65
- } | null | undefined;
116
+ } | undefined;
117
+ benefits?: string[] | undefined;
66
118
  }>;
67
119
  tracking: z.ZodObject<{
68
120
  abTestName: z.ZodString;
@@ -98,10 +150,10 @@ export declare const headerSchema: z.ZodObject<{
98
150
  products?: ("CONTRIBUTION" | "MEMBERSHIP_SUPPORTER" | "DIGITAL_SUBSCRIPTION" | "PRINT_SUBSCRIPTION")[] | null | undefined;
99
151
  labels?: string[] | null | undefined;
100
152
  }>;
101
- mobileContent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
153
+ mobileContent: z.ZodOptional<z.ZodObject<{
102
154
  heading: z.ZodString;
103
155
  subheading: z.ZodString;
104
- primaryCta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
156
+ primaryCta: z.ZodOptional<z.ZodObject<{
105
157
  text: z.ZodString;
106
158
  baseUrl: z.ZodString;
107
159
  }, "strip", z.ZodTypeAny, {
@@ -110,8 +162,8 @@ export declare const headerSchema: z.ZodObject<{
110
162
  }, {
111
163
  text: string;
112
164
  baseUrl: string;
113
- }>>>;
114
- secondaryCta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
165
+ }>>;
166
+ secondaryCta: z.ZodOptional<z.ZodObject<{
115
167
  text: z.ZodString;
116
168
  baseUrl: z.ZodString;
117
169
  }, "strip", z.ZodTypeAny, {
@@ -120,33 +172,36 @@ export declare const headerSchema: z.ZodObject<{
120
172
  }, {
121
173
  text: string;
122
174
  baseUrl: string;
123
- }>>>;
175
+ }>>;
176
+ benefits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
124
177
  }, "strip", z.ZodTypeAny, {
125
178
  heading: string;
126
179
  subheading: string;
127
180
  primaryCta?: {
128
181
  text: string;
129
182
  baseUrl: string;
130
- } | null | undefined;
183
+ } | undefined;
131
184
  secondaryCta?: {
132
185
  text: string;
133
186
  baseUrl: string;
134
- } | null | undefined;
187
+ } | undefined;
188
+ benefits?: string[] | undefined;
135
189
  }, {
136
190
  heading: string;
137
191
  subheading: string;
138
192
  primaryCta?: {
139
193
  text: string;
140
194
  baseUrl: string;
141
- } | null | undefined;
195
+ } | undefined;
142
196
  secondaryCta?: {
143
197
  text: string;
144
198
  baseUrl: string;
145
- } | null | undefined;
146
- }>>>;
147
- countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
+ } | undefined;
200
+ benefits?: string[] | undefined;
201
+ }>>;
202
+ countryCode: z.ZodOptional<z.ZodString>;
148
203
  submitComponentEvent: z.ZodAny;
149
- numArticles: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
204
+ numArticles: z.ZodOptional<z.ZodNumber>;
150
205
  }, "strip", z.ZodTypeAny, {
151
206
  content: {
152
207
  heading: string;
@@ -154,11 +209,12 @@ export declare const headerSchema: z.ZodObject<{
154
209
  primaryCta?: {
155
210
  text: string;
156
211
  baseUrl: string;
157
- } | null | undefined;
212
+ } | undefined;
158
213
  secondaryCta?: {
159
214
  text: string;
160
215
  baseUrl: string;
161
- } | null | undefined;
216
+ } | undefined;
217
+ benefits?: string[] | undefined;
162
218
  };
163
219
  tracking: {
164
220
  componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
@@ -178,15 +234,16 @@ export declare const headerSchema: z.ZodObject<{
178
234
  primaryCta?: {
179
235
  text: string;
180
236
  baseUrl: string;
181
- } | null | undefined;
237
+ } | undefined;
182
238
  secondaryCta?: {
183
239
  text: string;
184
240
  baseUrl: string;
185
- } | null | undefined;
186
- } | null | undefined;
187
- countryCode?: string | null | undefined;
241
+ } | undefined;
242
+ benefits?: string[] | undefined;
243
+ } | undefined;
244
+ countryCode?: string | undefined;
188
245
  submitComponentEvent?: any;
189
- numArticles?: number | null | undefined;
246
+ numArticles?: number | undefined;
190
247
  }, {
191
248
  content: {
192
249
  heading: string;
@@ -194,11 +251,12 @@ export declare const headerSchema: z.ZodObject<{
194
251
  primaryCta?: {
195
252
  text: string;
196
253
  baseUrl: string;
197
- } | null | undefined;
254
+ } | undefined;
198
255
  secondaryCta?: {
199
256
  text: string;
200
257
  baseUrl: string;
201
- } | null | undefined;
258
+ } | undefined;
259
+ benefits?: string[] | undefined;
202
260
  };
203
261
  tracking: {
204
262
  componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
@@ -218,14 +276,15 @@ export declare const headerSchema: z.ZodObject<{
218
276
  primaryCta?: {
219
277
  text: string;
220
278
  baseUrl: string;
221
- } | null | undefined;
279
+ } | undefined;
222
280
  secondaryCta?: {
223
281
  text: string;
224
282
  baseUrl: string;
225
- } | null | undefined;
226
- } | null | undefined;
227
- countryCode?: string | null | undefined;
283
+ } | undefined;
284
+ benefits?: string[] | undefined;
285
+ } | undefined;
286
+ countryCode?: string | undefined;
228
287
  submitComponentEvent?: any;
229
- numArticles?: number | null | undefined;
288
+ numArticles?: number | undefined;
230
289
  }>;
231
290
  //# sourceMappingURL=header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAkB,GAAG,EAAa,MAAM,UAAU,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AASD,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,mBAAmB;IAC/D,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAA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AmB,KAAK,IAAI,CAAC;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC"}
@@ -1,3 +1,9 @@
1
- export type purchaseInfoProduct = 'Contribution' | 'SupporterPlus' | 'GuardianWeekly' | 'Paper';
2
- export type purchaseInfoUser = 'new' | 'guest' | 'current';
1
+ import * as z from 'zod';
2
+ declare const purchaseInfoProduct: readonly ["Contribution", "SupporterPlus", "GuardianWeekly", "Paper"];
3
+ export type purchaseInfoProduct = (typeof purchaseInfoProduct)[number];
4
+ export declare const purchaseInfoProductSchema: z.ZodEnum<["Contribution", "SupporterPlus", "GuardianWeekly", "Paper"]>;
5
+ declare const purchaseInfoUser: readonly ["new", "guest", "current"];
6
+ export type purchaseInfoUser = (typeof purchaseInfoUser)[number];
7
+ export declare const purchaseInfoUserSchema: z.ZodEnum<["new", "guest", "current"]>;
8
+ export {};
3
9
  //# sourceMappingURL=purchaseInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"purchaseInfo.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/purchaseInfo.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,eAAe,GAAG,gBAAgB,GAAG,OAAO,CAAC;AAChG,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"purchaseInfo.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/purchaseInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,QAAA,MAAM,mBAAmB,uEAAwE,CAAC;AAClG,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,eAAO,MAAM,yBAAyB,yEAA8B,CAAC;AAErE,QAAA,MAAM,gBAAgB,sCAAuC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjE,eAAO,MAAM,sBAAsB,wCAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/support-dotcom-components",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",