@guardian/support-dotcom-components 1.1.2 → 2.0.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.
@@ -19,6 +19,7 @@ export interface EpicProps extends EmotionJSX.IntrinsicAttributes {
19
19
  hasConsentForArticleCount?: boolean;
20
20
  stage?: Stage;
21
21
  }
22
+ export declare const contributionFrequencySchema: z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>;
22
23
  export declare const variantSchema: z.ZodObject<{
23
24
  name: z.ZodString;
24
25
  heading: z.ZodOptional<z.ZodString>;
@@ -122,7 +123,13 @@ export declare const variantSchema: z.ZodObject<{
122
123
  }, {
123
124
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
124
125
  }>]>>;
125
- footer: z.ZodOptional<z.ZodString>;
126
+ newsletterSignup: z.ZodOptional<z.ZodObject<{
127
+ url: z.ZodString;
128
+ }, "strip", z.ZodTypeAny, {
129
+ url: string;
130
+ }, {
131
+ url: string;
132
+ }>>;
126
133
  image: z.ZodOptional<z.ZodObject<{
127
134
  mainUrl: z.ZodString;
128
135
  mobileUrl: z.ZodOptional<z.ZodString>;
@@ -164,12 +171,15 @@ export declare const variantSchema: z.ZodObject<{
164
171
  separateArticleCount: z.ZodOptional<z.ZodObject<{
165
172
  type: z.ZodLiteral<"above">;
166
173
  copy: z.ZodOptional<z.ZodString>;
174
+ countType: z.ZodOptional<z.ZodEnum<["for52Weeks", "forTargetedWeeks"]>>;
167
175
  }, "strip", z.ZodTypeAny, {
168
176
  type: "above";
169
177
  copy?: string | undefined;
178
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
170
179
  }, {
171
180
  type: "above";
172
181
  copy?: string | undefined;
182
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
173
183
  }>>;
174
184
  maxViews: z.ZodOptional<z.ZodObject<{
175
185
  maxViewsCount: z.ZodNumber;
@@ -396,7 +406,9 @@ export declare const variantSchema: z.ZodObject<{
396
406
  } | {
397
407
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
398
408
  } | undefined;
399
- footer?: string | undefined;
409
+ newsletterSignup?: {
410
+ url: string;
411
+ } | undefined;
400
412
  image?: {
401
413
  mainUrl: string;
402
414
  altText: string;
@@ -414,6 +426,7 @@ export declare const variantSchema: z.ZodObject<{
414
426
  separateArticleCount?: {
415
427
  type: "above";
416
428
  copy?: string | undefined;
429
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
417
430
  } | undefined;
418
431
  maxViews?: {
419
432
  maxViewsCount: number;
@@ -492,7 +505,9 @@ export declare const variantSchema: z.ZodObject<{
492
505
  } | {
493
506
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
494
507
  } | undefined;
495
- footer?: string | undefined;
508
+ newsletterSignup?: {
509
+ url: string;
510
+ } | undefined;
496
511
  image?: {
497
512
  mainUrl: string;
498
513
  altText: string;
@@ -510,6 +525,7 @@ export declare const variantSchema: z.ZodObject<{
510
525
  separateArticleCount?: {
511
526
  type: "above";
512
527
  copy?: string | undefined;
528
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
513
529
  } | undefined;
514
530
  maxViews?: {
515
531
  maxViewsCount: number;
@@ -660,7 +676,13 @@ export declare const epicPropsSchema: z.ZodObject<{
660
676
  }, {
661
677
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
662
678
  }>]>>;
663
- footer: z.ZodOptional<z.ZodString>;
679
+ newsletterSignup: z.ZodOptional<z.ZodObject<{
680
+ url: z.ZodString;
681
+ }, "strip", z.ZodTypeAny, {
682
+ url: string;
683
+ }, {
684
+ url: string;
685
+ }>>;
664
686
  image: z.ZodOptional<z.ZodObject<{
665
687
  mainUrl: z.ZodString;
666
688
  mobileUrl: z.ZodOptional<z.ZodString>;
@@ -702,12 +724,15 @@ export declare const epicPropsSchema: z.ZodObject<{
702
724
  separateArticleCount: z.ZodOptional<z.ZodObject<{
703
725
  type: z.ZodLiteral<"above">;
704
726
  copy: z.ZodOptional<z.ZodString>;
727
+ countType: z.ZodOptional<z.ZodEnum<["for52Weeks", "forTargetedWeeks"]>>;
705
728
  }, "strip", z.ZodTypeAny, {
706
729
  type: "above";
707
730
  copy?: string | undefined;
731
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
708
732
  }, {
709
733
  type: "above";
710
734
  copy?: string | undefined;
735
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
711
736
  }>>;
712
737
  maxViews: z.ZodOptional<z.ZodObject<{
713
738
  maxViewsCount: z.ZodNumber;
@@ -934,7 +959,9 @@ export declare const epicPropsSchema: z.ZodObject<{
934
959
  } | {
935
960
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
936
961
  } | undefined;
937
- footer?: string | undefined;
962
+ newsletterSignup?: {
963
+ url: string;
964
+ } | undefined;
938
965
  image?: {
939
966
  mainUrl: string;
940
967
  altText: string;
@@ -952,6 +979,7 @@ export declare const epicPropsSchema: z.ZodObject<{
952
979
  separateArticleCount?: {
953
980
  type: "above";
954
981
  copy?: string | undefined;
982
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
955
983
  } | undefined;
956
984
  maxViews?: {
957
985
  maxViewsCount: number;
@@ -1030,7 +1058,9 @@ export declare const epicPropsSchema: z.ZodObject<{
1030
1058
  } | {
1031
1059
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
1032
1060
  } | undefined;
1033
- footer?: string | undefined;
1061
+ newsletterSignup?: {
1062
+ url: string;
1063
+ } | undefined;
1034
1064
  image?: {
1035
1065
  mainUrl: string;
1036
1066
  altText: string;
@@ -1048,6 +1078,7 @@ export declare const epicPropsSchema: z.ZodObject<{
1048
1078
  separateArticleCount?: {
1049
1079
  type: "above";
1050
1080
  copy?: string | undefined;
1081
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
1051
1082
  } | undefined;
1052
1083
  maxViews?: {
1053
1084
  maxViewsCount: number;
@@ -1106,10 +1137,10 @@ export declare const epicPropsSchema: z.ZodObject<{
1106
1137
  referrerUrl: z.ZodString;
1107
1138
  clientName: z.ZodString;
1108
1139
  }, "strip", z.ZodTypeAny, {
1109
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1110
1140
  abTestName: string;
1111
1141
  abTestVariant: string;
1112
1142
  campaignCode: string;
1143
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1113
1144
  ophanPageId: string;
1114
1145
  platformId: string;
1115
1146
  referrerUrl: string;
@@ -1117,10 +1148,10 @@ export declare const epicPropsSchema: z.ZodObject<{
1117
1148
  products?: ("CONTRIBUTION" | "MEMBERSHIP_SUPPORTER" | "DIGITAL_SUBSCRIPTION" | "PRINT_SUBSCRIPTION")[] | null | undefined;
1118
1149
  labels?: string[] | null | undefined;
1119
1150
  }, {
1120
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1121
1151
  abTestName: string;
1122
1152
  abTestVariant: string;
1123
1153
  campaignCode: string;
1154
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1124
1155
  ophanPageId: string;
1125
1156
  platformId: string;
1126
1157
  referrerUrl: string;
@@ -1179,7 +1210,9 @@ export declare const epicPropsSchema: z.ZodObject<{
1179
1210
  } | {
1180
1211
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
1181
1212
  } | undefined;
1182
- footer?: string | undefined;
1213
+ newsletterSignup?: {
1214
+ url: string;
1215
+ } | undefined;
1183
1216
  image?: {
1184
1217
  mainUrl: string;
1185
1218
  altText: string;
@@ -1197,6 +1230,7 @@ export declare const epicPropsSchema: z.ZodObject<{
1197
1230
  separateArticleCount?: {
1198
1231
  type: "above";
1199
1232
  copy?: string | undefined;
1233
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
1200
1234
  } | undefined;
1201
1235
  maxViews?: {
1202
1236
  maxViewsCount: number;
@@ -1244,10 +1278,10 @@ export declare const epicPropsSchema: z.ZodObject<{
1244
1278
  defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
1245
1279
  };
1246
1280
  tracking: {
1247
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1248
1281
  abTestName: string;
1249
1282
  abTestVariant: string;
1250
1283
  campaignCode: string;
1284
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1251
1285
  ophanPageId: string;
1252
1286
  platformId: string;
1253
1287
  referrerUrl: string;
@@ -1300,7 +1334,9 @@ export declare const epicPropsSchema: z.ZodObject<{
1300
1334
  } | {
1301
1335
  type: import("./shared").SecondaryCtaType.ContributionsReminder;
1302
1336
  } | undefined;
1303
- footer?: string | undefined;
1337
+ newsletterSignup?: {
1338
+ url: string;
1339
+ } | undefined;
1304
1340
  image?: {
1305
1341
  mainUrl: string;
1306
1342
  altText: string;
@@ -1318,6 +1354,7 @@ export declare const epicPropsSchema: z.ZodObject<{
1318
1354
  separateArticleCount?: {
1319
1355
  type: "above";
1320
1356
  copy?: string | undefined;
1357
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
1321
1358
  } | undefined;
1322
1359
  maxViews?: {
1323
1360
  maxViewsCount: number;
@@ -1365,10 +1402,10 @@ export declare const epicPropsSchema: z.ZodObject<{
1365
1402
  defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
1366
1403
  };
1367
1404
  tracking: {
1368
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1369
1405
  abTestName: string;
1370
1406
  abTestVariant: string;
1371
1407
  campaignCode: string;
1408
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
1372
1409
  ophanPageId: string;
1373
1410
  platformId: string;
1374
1411
  referrerUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAKH,KAAK,EAEL,QAAQ,EAEX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GACtB,YAAY,GACZ,kBAAkB,CAAC;AAEzB,MAAM,MAAM,aAAa,GAAG;KACvB,IAAI,IAAI,gBAAgB,GAAG,MAAM;CACrC,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,UAAU,CAAC,mBAAmB;IAC7D,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAE7B,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 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;
@@ -76,10 +128,10 @@ export declare const headerSchema: z.ZodObject<{
76
128
  referrerUrl: z.ZodString;
77
129
  clientName: z.ZodString;
78
130
  }, "strip", z.ZodTypeAny, {
79
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
80
131
  abTestName: string;
81
132
  abTestVariant: string;
82
133
  campaignCode: string;
134
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
83
135
  ophanPageId: string;
84
136
  platformId: string;
85
137
  referrerUrl: string;
@@ -87,10 +139,10 @@ export declare const headerSchema: z.ZodObject<{
87
139
  products?: ("CONTRIBUTION" | "MEMBERSHIP_SUPPORTER" | "DIGITAL_SUBSCRIPTION" | "PRINT_SUBSCRIPTION")[] | null | undefined;
88
140
  labels?: string[] | null | undefined;
89
141
  }, {
90
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
91
142
  abTestName: string;
92
143
  abTestVariant: string;
93
144
  campaignCode: string;
145
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
94
146
  ophanPageId: string;
95
147
  platformId: string;
96
148
  referrerUrl: string;
@@ -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,17 +209,18 @@ 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
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
165
220
  abTestName: string;
166
221
  abTestVariant: string;
167
222
  campaignCode: string;
223
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
168
224
  ophanPageId: string;
169
225
  platformId: string;
170
226
  referrerUrl: string;
@@ -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,17 +251,18 @@ 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
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
205
262
  abTestName: string;
206
263
  abTestVariant: string;
207
264
  campaignCode: string;
265
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
208
266
  ophanPageId: string;
209
267
  platformId: string;
210
268
  referrerUrl: string;
@@ -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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CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC"}
@@ -214,10 +214,10 @@ export declare const trackingSchema: z.ZodObject<{
214
214
  referrerUrl: z.ZodString;
215
215
  clientName: z.ZodString;
216
216
  }, "strip", z.ZodTypeAny, {
217
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
218
217
  abTestName: string;
219
218
  abTestVariant: string;
220
219
  campaignCode: string;
220
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
221
221
  ophanPageId: string;
222
222
  platformId: string;
223
223
  referrerUrl: string;
@@ -225,10 +225,10 @@ export declare const trackingSchema: z.ZodObject<{
225
225
  products?: ("CONTRIBUTION" | "MEMBERSHIP_SUPPORTER" | "DIGITAL_SUBSCRIPTION" | "PRINT_SUBSCRIPTION")[] | null | undefined;
226
226
  labels?: string[] | null | undefined;
227
227
  }, {
228
- componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
229
228
  abTestName: string;
230
229
  abTestVariant: string;
231
230
  campaignCode: string;
231
+ componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
232
232
  ophanPageId: string;
233
233
  platformId: string;
234
234
  referrerUrl: string;
@@ -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": "2.0.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",