@guardian/support-dotcom-components 2.6.2 → 2.7.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.
- package/dist/dotcom/src/index.d.ts +2 -0
- package/dist/dotcom/src/index.d.ts.map +1 -1
- package/dist/dotcom/src/types.d.ts +1 -0
- package/dist/dotcom/src/types.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/src/types/abTests/banner.d.ts +108 -2
- package/dist/shared/src/types/abTests/banner.d.ts.map +1 -1
- package/dist/shared/src/types/abTests/epic.d.ts +61 -0
- package/dist/shared/src/types/abTests/epic.d.ts.map +1 -1
- package/dist/shared/src/types/props/banner.d.ts +47 -0
- package/dist/shared/src/types/props/banner.d.ts.map +1 -1
- package/dist/shared/src/types/props/epic.d.ts +108 -0
- package/dist/shared/src/types/props/epic.d.ts.map +1 -1
- package/dist/shared/src/types/props/shared.d.ts +60 -0
- package/dist/shared/src/types/props/shared.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,11 @@ export * from '../../shared/src/lib/geolocation';
|
|
|
5
5
|
export * from '../../shared/src/lib/viewLog';
|
|
6
6
|
export * from '../../shared/src/lib/reminderFields';
|
|
7
7
|
export { SecondaryCtaType, TickerCountType, TickerEndType, } from '../../shared/src/types/props/shared';
|
|
8
|
+
export { hexColourToString } from '../../shared/src/types/props/design';
|
|
8
9
|
export { contributionTabFrequencies } from '../../shared/src/types/abTests/epic';
|
|
9
10
|
export { headerPropsSchema } from '../../shared/src/types/props/header';
|
|
10
11
|
export { epicPropsSchema } from '../../shared/src/types/props/epic';
|
|
12
|
+
export { bannerSchema } from '../../shared/src/types/props/banner';
|
|
11
13
|
export { abandonedBasketSchema } from '../../shared/src/types/targeting/shared';
|
|
12
14
|
export * from './requests';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EACH,kCAAkC,EAClC,kCAAkC,GACrC,MAAM,mCAAmC,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,aAAa,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EACH,kCAAkC,EAClC,kCAAkC,GACrC,MAAM,mCAAmC,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,aAAa,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,cAAc,YAAY,CAAC"}
|
|
@@ -3,4 +3,5 @@ export * from '../../shared/src/types/prices';
|
|
|
3
3
|
export { EpicProps } from '../../shared/src/types/props/epic';
|
|
4
4
|
export * from '../../shared/src/types/reminders';
|
|
5
5
|
export { ModuleDataResponse, ModuleData } from './requests';
|
|
6
|
+
export { Image } from '../../shared/src/types/props/shared';
|
|
6
7
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,WAAW,EACX,aAAa,EACb,oBAAoB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,WAAW,EACX,aAAa,EACb,oBAAoB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";const n="gu.contributions.views",t=e=>e.get(n)||void 0,a=e=>{const t=localStorage.getItem(n),a=t?JSON.parse(t).value:[];a.push({date:(new Date).getTime(),testId:e});const i={value:a.slice(-50)};localStorage.setItem(n,JSON.stringify(i))},i="gu.history.weeklyArticleCount",o="gu.history.articleCountsThisWeek",r=e=>{const n=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(n-1))/864e5},s=e=>e.get(i)||void 0,l=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),u=(e,n={})=>(e.forEach((e=>{l.has(e)&&(n[e]=(n[e]??0)+1)})),n),c=(e,n,t)=>{const a=((e,n)=>{const t=r(new Date),a=e.get(o);if(a&&a.week===t){const i=a.articles[n]||0;return e.set(o,{week:t,articles:{...a.articles,[n]:i+1}}),i>0}return e.set(o,{week:t,articles:{[n]:1}}),!1})(e,n);if(!a){const n=r(new Date),a=e.get(i)||[],o=a[0];if(o&&o.week&&o.week===n)o.count+=1,o.tags=u(t,o.tags),e.set(i,a);else{a.unshift({week:n,count:1,tags:u(t,{})});const o=n-365,r=a.filter((e=>e.week>=o));e.set(i,r)}}},d=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],g=e.enum(d),m={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},p={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},C={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},b=e=>Object.keys(m).find((n=>m[n].countries.includes(e??"")))||"International",S=(e,n=[])=>0===n.length||!!e&&n.includes(b(e.toUpperCase())),h=e=>{if(e){const n=b(e);return C[n]}return"£"},y=e=>{if(e)return p[e]},A=e=>/subscribe\/weekly\/checkout/.test(e),T=(e,n)=>{if(n){const t=(e=>m[b(e)]?.supportRegionId)(n);if(t&&!A(e))return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,n,a)=>`${n}/${t.toLowerCase()}/${a}`))}return e},I=(e,n,t,a)=>{if(a){const i=a[b(t)];if(i){return`${h(t)}${i[e][n].price}`}}},N={CURRENCY_SYMBOL:({countryCode:e})=>h(e),COUNTRY_NAME:({countryCode:e})=>y(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:n})=>I("Digisub","Monthly",e,n),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:n})=>I("Digisub","Annual",e,n),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:n})=>I("GuardianWeekly","Monthly",e,n),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:n})=>I("GuardianWeekly","Annual",e,n),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},M=(e,n,t)=>e?e.replace(E,(e=>{const a=e.substring(2,e.length-2),i=N[a];if(i){const e=i({countryCode:n,prices:t});if(e)return e}return e})):"",E=/%%.*?%%/g,G=e=>{const n=e.match(E)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!n&&n.length>0},U=e=>{const n=(e=>{const n=new Date(e,10,1).getDay();return new Date(e,10,22+(11-n)%7)})(e);return n.setDate(n.getDate()+5),n},R=(e=new Date)=>{const n=(e=>{const n=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+n),e})(e),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.toLocaleString("default",{month:"long"}),i=n.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${i}-${t}-01`,reminderLabel:`${a} ${i}`}},B=new Date("2023-12-31"),P=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<U(e.getFullYear()),D=(e,n=new Date)=>{return"US"===e&&P(n)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${t=n.getFullYear()}-${(U(t).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${t}`}:"US"===e&&(e=>e>=U(e.getFullYear())&&e<B)(n)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(n.getFullYear()):R(n);var t},L=e.object({text:e.string(),baseUrl:e.string()});let w=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.nativeEnum(w);const O=e.object({type:e.literal(w.Custom),cta:L}),k=e.object({type:e.literal(w.ContributionsReminder)}),f=e.discriminatedUnion("type",[O,k]);let K=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const F=e.nativeEnum(K);let v=function(e){return e.money="money",e}({});const H=e.nativeEnum(v),Y=e.object({countLabel:e.string(),goalReachedPrimary:e.string(),goalReachedSecondary:e.string()}),j=e.object({total:e.number(),goal:e.number()}),V=e.enum(["US","AU"]),W=e.object({endType:F,countType:H,currencySymbol:e.string(),copy:Y,name:V,tickerData:j.optional()}),Z=e.object({for52Weeks:e.number(),forTargetedWeeks:e.number()}),x=e.enum(["for52Weeks","forTargetedWeeks"]),$=e.object({type:e.literal("above"),copy:e.string().optional(),countType:x.optional()}),_=e.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),J=e.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),Q=e.object({abTestName:e.string(),abTestVariant:e.string(),campaignCode:e.string(),componentType:J,products:e.array(_).nullish(),labels:e.array(e.string()).nullish(),ophanPageId:e.string(),platformId:e.string(),referrerUrl:e.string(),clientName:e.string()}),z=e.object({mainUrl:e.string(),mobileUrl:e.string().optional(),tabletUrl:e.string().optional(),desktopUrl:e.string().optional(),leftColUrl:e.string().optional(),wideUrl:e.string().optional(),altText:e.string()}),q=e.object({name:e.string(),description:e.string().optional(),headshot:z.optional()}),X=e.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),ee=e.enum(["new","guest","current"]),ne=e.enum(["Live","Draft","Archived"]),te=e.enum(["Mobile","Desktop","All","iOS","Android"]),ae=e.enum(["SignedIn","SignedOut","All"]),ie=e.enum(["HasConsented","HasNotConsented","All"]),oe=e.object({name:e.string(),status:ne,priority:e.number(),controlProportionSettings:e.object({proportion:e.number(),offset:e.number()}).optional(),deviceType:te.optional(),signedInStatus:ae.optional(),consentStatus:ie.optional()}),re=e.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),se=e.object({minViews:e.number(),maxViews:e.number().optional(),periodInWeeks:e.number(),tagIds:e.array(e.string()).optional()});e.object({userType:e.array(ee),product:e.array(X)}),e.object({tagIds:e.array(e.string()),sectionIds:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSectionIds:e.array(e.string())});const le=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),ue=e.object({reminderCta:e.string(),reminderLabel:e.string(),reminderPeriod:e.string()}),ce=e.enum(["ONE_OFF","MONTHLY","ANNUAL"]),de=e.object({testName:e.string(),variantName:e.string(),defaultContributionType:ce,displayContributionType:ce.array(),amountsCardData:e.object({ONE_OFF:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),MONTHLY:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),ANNUAL:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()})})}),ge=e.object({newsletterId:e.string(),successDescription:e.string()}),me=e.object({name:e.string(),heading:e.string().optional(),paragraphs:e.array(e.string()),highlightedText:e.string().optional(),tickerSettings:W.optional(),cta:L.optional(),secondaryCta:f.optional(),newsletterSignup:ge.optional(),image:z.optional(),showReminderFields:ue.optional(),separateArticleCount:$.optional(),maxViews:le.optional(),showSignInLink:e.boolean().optional(),bylineWithImage:q.optional(),showChoiceCards:e.boolean().optional(),choiceCardAmounts:de.optional(),defaultChoiceCardFrequency:ce.optional()}),pe=e.object({variant:me,tracking:Q,countryCode:e.string().nullish(),articleCounts:Z,onReminderOpen:e.any().nullish(),fetchEmail:e.any().nullish(),submitComponentEvent:e.any().nullish(),openCmp:e.any().nullish(),hasConsentForArticleCount:e.boolean().nullish(),stage:e.string().nullish()}),Ce=/^[0-9A-F]{2}$/,be=e.string().refine((e=>Ce.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),Se=e.object({r:be,g:be,b:be,kind:e.literal("hex")}),he=e.object({mobileUrl:e.string(),tabletUrl:e.string(),desktopUrl:e.string(),altText:e.string(),kind:e.literal("Image")}),ye=e.object({buttonColour:Se.nullish(),buttonTextColour:Se.nullish(),buttonBorderColour:Se.nullish(),buttonSelectColour:Se.nullish(),buttonSelectTextColour:Se.nullish(),buttonSelectBorderColour:Se.nullish(),kind:e.literal("ChoiceCards")}),Ae=e.discriminatedUnion("kind",[he,ye]),Te=e.object({visual:Ae.nullish(),colours:e.object({basic:e.object({background:Se,bodyText:Se})})}),Ie=e.enum(["contributions","subscriptions","signIn","abandonedBasket"]),Ne=e.object({heading:e.string().optional(),messageText:e.string().optional(),paragraphs:e.array(e.string()).optional(),mobileMessageText:e.string().optional(),highlightedText:e.string().optional(),cta:L.optional(),secondaryCta:f.optional()});e.object({tracking:Q,bannerChannel:Ie,content:Ne.nullish(),mobileContent:Ne.nullish(),countryCode:e.string().nullish(),isSupporter:e.boolean().nullish(),tickerSettings:W.nullish(),submitComponentEvent:e.any(),articleCounts:Z,hasOptedOutOfArticleCount:e.boolean().nullish(),fetchEmail:e.any().nullish(),separateArticleCount:e.boolean().nullish(),design:Te.nullish()});const Me=e.object({heading:e.string(),subheading:e.string(),primaryCta:L.optional(),secondaryCta:L.optional(),benefits:e.array(e.string()).optional()}),Ee=e.object({content:Me,tracking:Q,mobileContent:Me.optional(),countryCode:e.string().optional(),submitComponentEvent:e.any(),numArticles:e.number().optional()}),Ge=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),Ue=["ONE_OFF","MONTHLY","ANNUAL"];oe.extend({name:e.string(),status:ne,locations:e.array(g),tagIds:e.array(e.string()),sections:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSections:e.array(e.string()),alwaysAsk:e.boolean(),maxViews:Ge.optional(),userCohort:re,hasCountryName:e.boolean(),highPriority:e.boolean(),useLocalViewLog:e.boolean(),articlesViewedSettings:se.optional(),priority:e.number(),variants:me.array(),isBanditTest:e.boolean().optional()});const Re=e.object({amount:e.union([e.number(),e.literal("other")]),billingPeriod:e.union([e.literal("ONE_OFF"),e.literal("MONTHLY"),e.literal("ANNUAL")]),product:e.union([e.literal("Contribution"),e.literal("SupporterPlus"),e.literal("PremiumTier"),e.literal("DailyEdition"),e.literal("GuardianWeekly"),e.literal("Paper"),e.literal("PaperAndDigital")]),region:e.union([e.literal("uk"),e.literal("us"),e.literal("au"),e.literal("eu"),e.literal("int"),e.literal("nz"),e.literal("ca")])}),Be=(e,n,t)=>{const a=(e=>{if(URLSearchParams){const n=new URLSearchParams(window.location.search).get(`force-${e}`);if(n)return n}return null})(e);return fetch(`${n}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((n=>{if(!n.ok)throw Error(n.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${n.status}`);return n})).then((e=>e.json()))},Pe=(e,n)=>Be("epic",e,n),De=(e,n)=>Be("liveblog-epic",e,n),Le=(e,n)=>Be("banner",e,n),we=(e,n)=>Be("header",e,n);export{d as CountryGroupId,w as SecondaryCtaType,v as TickerCountType,K as TickerEndType,Re as abandonedBasketSchema,T as addRegionIdToSupportUrl,R as buildReminderFields,G as containsNonArticleCountPlaceholder,Ue as contributionTabFrequencies,b as countryCodeToCountryGroupId,g as countryGroupIdSchema,pe as epicPropsSchema,Le as getBanner,y as getCountryName,Pe as getEpic,t as getEpicViewLog,we as getHeader,De as getLiveblogEpic,h as getLocalCurrencySymbol,D as getReminderFields,s as getWeeklyArticleHistory,Ee as headerPropsSchema,S as inCountryGroups,c as incrementWeeklyArticleCount,A as isGWCheckoutUrl,a as logEpicView,M as replaceNonArticleCountPlaceholders};
|
|
1
|
+
import{z as e}from"zod";const n="gu.contributions.views",t=e=>e.get(n)||void 0,a=e=>{const t=localStorage.getItem(n),a=t?JSON.parse(t).value:[];a.push({date:(new Date).getTime(),testId:e});const i={value:a.slice(-50)};localStorage.setItem(n,JSON.stringify(i))},i="gu.history.weeklyArticleCount",o="gu.history.articleCountsThisWeek",r=e=>{const n=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(n-1))/864e5},s=e=>e.get(i)||void 0,l=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),u=(e,n={})=>(e.forEach((e=>{l.has(e)&&(n[e]=(n[e]??0)+1)})),n),c=(e,n,t)=>{const a=((e,n)=>{const t=r(new Date),a=e.get(o);if(a&&a.week===t){const i=a.articles[n]||0;return e.set(o,{week:t,articles:{...a.articles,[n]:i+1}}),i>0}return e.set(o,{week:t,articles:{[n]:1}}),!1})(e,n);if(!a){const n=r(new Date),a=e.get(i)||[],o=a[0];if(o&&o.week&&o.week===n)o.count+=1,o.tags=u(t,o.tags),e.set(i,a);else{a.unshift({week:n,count:1,tags:u(t,{})});const o=n-365,r=a.filter((e=>e.week>=o));e.set(i,r)}}},d=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],g=e.enum(d),m={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},p={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},C={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},b=e=>Object.keys(m).find((n=>m[n].countries.includes(e??"")))||"International",S=(e,n=[])=>0===n.length||!!e&&n.includes(b(e.toUpperCase())),h=e=>{if(e){const n=b(e);return C[n]}return"£"},y=e=>{if(e)return p[e]},A=e=>/subscribe\/weekly\/checkout/.test(e),T=(e,n)=>{if(n){const t=(e=>m[b(e)]?.supportRegionId)(n);if(t&&!A(e))return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,n,a)=>`${n}/${t.toLowerCase()}/${a}`))}return e},I=(e,n,t,a)=>{if(a){const i=a[b(t)];if(i){return`${h(t)}${i[e][n].price}`}}},N={CURRENCY_SYMBOL:({countryCode:e})=>h(e),COUNTRY_NAME:({countryCode:e})=>y(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:n})=>I("Digisub","Monthly",e,n),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:n})=>I("Digisub","Annual",e,n),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:n})=>I("GuardianWeekly","Monthly",e,n),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:n})=>I("GuardianWeekly","Annual",e,n),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},M=(e,n,t)=>e?e.replace(E,(e=>{const a=e.substring(2,e.length-2),i=N[a];if(i){const e=i({countryCode:n,prices:t});if(e)return e}return e})):"",E=/%%.*?%%/g,G=e=>{const n=e.match(E)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!n&&n.length>0},U=e=>{const n=(e=>{const n=new Date(e,10,1).getDay();return new Date(e,10,22+(11-n)%7)})(e);return n.setDate(n.getDate()+5),n},R=(e=new Date)=>{const n=(e=>{const n=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+n),e})(e),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.toLocaleString("default",{month:"long"}),i=n.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${i}-${t}-01`,reminderLabel:`${a} ${i}`}},B=new Date("2023-12-31"),P=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<U(e.getFullYear()),D=(e,n=new Date)=>{return"US"===e&&P(n)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${t=n.getFullYear()}-${(U(t).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${t}`}:"US"===e&&(e=>e>=U(e.getFullYear())&&e<B)(n)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(n.getFullYear()):R(n);var t},L=e.object({text:e.string(),baseUrl:e.string()});let w=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.nativeEnum(w);const O=e.object({type:e.literal(w.Custom),cta:L}),k=e.object({type:e.literal(w.ContributionsReminder)}),f=e.discriminatedUnion("type",[O,k]);let K=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const F=e.nativeEnum(K);let v=function(e){return e.money="money",e}({});const H=e.nativeEnum(v),Y=e.object({countLabel:e.string(),goalReachedPrimary:e.string(),goalReachedSecondary:e.string()}),j=e.object({total:e.number(),goal:e.number()}),V=e.enum(["US","AU"]),W=e.object({headlineColour:e.string(),totalColour:e.string(),goalColour:e.string(),filledProgressColour:e.string(),progressBarBackgroundColour:e.string()}),Z=e.object({endType:F,countType:H,currencySymbol:e.string(),copy:Y,name:V,tickerData:j.optional(),tickerStylingSettings:W.optional()}),$=e.object({for52Weeks:e.number(),forTargetedWeeks:e.number()}),x=e.enum(["for52Weeks","forTargetedWeeks"]),_=e.object({type:e.literal("above"),copy:e.string().optional(),countType:x.optional()}),J=e.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),Q=e.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),z=e.object({abTestName:e.string(),abTestVariant:e.string(),campaignCode:e.string(),componentType:Q,products:e.array(J).nullish(),labels:e.array(e.string()).nullish(),ophanPageId:e.string(),platformId:e.string(),referrerUrl:e.string(),clientName:e.string()}),q=e.object({mainUrl:e.string(),mobileUrl:e.string().optional(),tabletUrl:e.string().optional(),desktopUrl:e.string().optional(),leftColUrl:e.string().optional(),wideUrl:e.string().optional(),altText:e.string()}),X=e.object({name:e.string(),description:e.string().optional(),headshot:q.optional()}),ee=/^[0-9A-F]{2}$/,ne=e.string().refine((e=>ee.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),te=e.object({r:ne,g:ne,b:ne,kind:e.literal("hex")}),ae=e.object({mobileUrl:e.string(),tabletUrl:e.string(),desktopUrl:e.string(),altText:e.string(),kind:e.literal("Image")}),ie=e.object({buttonColour:te.nullish(),buttonTextColour:te.nullish(),buttonBorderColour:te.nullish(),buttonSelectColour:te.nullish(),buttonSelectTextColour:te.nullish(),buttonSelectBorderColour:te.nullish(),kind:e.literal("ChoiceCards")}),oe=e.discriminatedUnion("kind",[ae,ie]),re=e.object({visual:oe.nullish(),colours:e.object({basic:e.object({background:te,bodyText:te})})}),se=e=>`#${e.r}${e.g}${e.b}`,le=e.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),ue=e.enum(["new","guest","current"]),ce=e.enum(["Live","Draft","Archived"]),de=e.enum(["Mobile","Desktop","All","iOS","Android"]),ge=e.enum(["SignedIn","SignedOut","All"]),me=e.enum(["HasConsented","HasNotConsented","All"]),pe=e.object({name:e.string(),status:ce,priority:e.number(),controlProportionSettings:e.object({proportion:e.number(),offset:e.number()}).optional(),deviceType:de.optional(),signedInStatus:ge.optional(),consentStatus:me.optional()}),Ce=e.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),be=e.object({minViews:e.number(),maxViews:e.number().optional(),periodInWeeks:e.number(),tagIds:e.array(e.string()).optional()});e.object({userType:e.array(ue),product:e.array(le)}),e.object({tagIds:e.array(e.string()),sectionIds:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSectionIds:e.array(e.string())});const Se=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),he=e.object({reminderCta:e.string(),reminderLabel:e.string(),reminderPeriod:e.string()}),ye=e.enum(["ONE_OFF","MONTHLY","ANNUAL"]),Ae=e.object({testName:e.string(),variantName:e.string(),defaultContributionType:ye,displayContributionType:ye.array(),amountsCardData:e.object({ONE_OFF:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),MONTHLY:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),ANNUAL:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()})})}),Te=e.object({newsletterId:e.string(),successDescription:e.string()}),Ie=e.object({name:e.string(),heading:e.string().optional(),paragraphs:e.array(e.string()),highlightedText:e.string().optional(),tickerSettings:Z.optional(),cta:L.optional(),secondaryCta:f.optional(),newsletterSignup:Te.optional(),image:q.optional(),showReminderFields:he.optional(),separateArticleCount:_.optional(),maxViews:Se.optional(),showSignInLink:e.boolean().optional(),bylineWithImage:X.optional(),showChoiceCards:e.boolean().optional(),choiceCardAmounts:Ae.optional(),defaultChoiceCardFrequency:ye.optional()}),Ne=e.object({variant:Ie,tracking:z,countryCode:e.string().nullish(),articleCounts:$,onReminderOpen:e.any().nullish(),fetchEmail:e.any().nullish(),submitComponentEvent:e.any().nullish(),openCmp:e.any().nullish(),hasConsentForArticleCount:e.boolean().nullish(),stage:e.string().nullish()}),Me=e.enum(["contributions","subscriptions","signIn","abandonedBasket"]),Ee=e.object({heading:e.string().optional(),messageText:e.string().optional(),paragraphs:e.array(e.string()).optional(),mobileMessageText:e.string().optional(),highlightedText:e.string().optional(),cta:L.optional(),secondaryCta:f.optional()}),Ge=e.object({tracking:z,bannerChannel:Me,content:Ee.nullish(),mobileContent:Ee.nullish(),countryCode:e.string().nullish(),isSupporter:e.boolean().nullish(),tickerSettings:Z.nullish(),submitComponentEvent:e.any(),articleCounts:$,hasOptedOutOfArticleCount:e.boolean().nullish(),fetchEmail:e.any().nullish(),separateArticleCount:e.boolean().nullish(),design:re.nullish()}),Ue=e.object({heading:e.string(),subheading:e.string(),primaryCta:L.optional(),secondaryCta:L.optional(),benefits:e.array(e.string()).optional()}),Re=e.object({content:Ue,tracking:z,mobileContent:Ue.optional(),countryCode:e.string().optional(),submitComponentEvent:e.any(),numArticles:e.number().optional()}),Be=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),Pe=["ONE_OFF","MONTHLY","ANNUAL"];pe.extend({name:e.string(),status:ce,locations:e.array(g),tagIds:e.array(e.string()),sections:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSections:e.array(e.string()),alwaysAsk:e.boolean(),maxViews:Be.optional(),userCohort:Ce,hasCountryName:e.boolean(),highPriority:e.boolean(),useLocalViewLog:e.boolean(),articlesViewedSettings:be.optional(),priority:e.number(),variants:Ie.array(),isBanditTest:e.boolean().optional()});const De=e.object({amount:e.union([e.number(),e.literal("other")]),billingPeriod:e.union([e.literal("ONE_OFF"),e.literal("MONTHLY"),e.literal("ANNUAL")]),product:e.union([e.literal("Contribution"),e.literal("SupporterPlus"),e.literal("PremiumTier"),e.literal("DailyEdition"),e.literal("GuardianWeekly"),e.literal("Paper"),e.literal("PaperAndDigital")]),region:e.union([e.literal("uk"),e.literal("us"),e.literal("au"),e.literal("eu"),e.literal("int"),e.literal("nz"),e.literal("ca")])}),Le=(e,n,t)=>{const a=(e=>{if(URLSearchParams){const n=new URLSearchParams(window.location.search).get(`force-${e}`);if(n)return n}return null})(e);return fetch(`${n}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((n=>{if(!n.ok)throw Error(n.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${n.status}`);return n})).then((e=>e.json()))},we=(e,n)=>Le("epic",e,n),Oe=(e,n)=>Le("liveblog-epic",e,n),ke=(e,n)=>Le("banner",e,n),fe=(e,n)=>Le("header",e,n);export{d as CountryGroupId,w as SecondaryCtaType,v as TickerCountType,K as TickerEndType,De as abandonedBasketSchema,T as addRegionIdToSupportUrl,Ge as bannerSchema,R as buildReminderFields,G as containsNonArticleCountPlaceholder,Pe as contributionTabFrequencies,b as countryCodeToCountryGroupId,g as countryGroupIdSchema,Ne as epicPropsSchema,ke as getBanner,y as getCountryName,we as getEpic,t as getEpicViewLog,fe as getHeader,Oe as getLiveblogEpic,h as getLocalCurrencySymbol,D as getReminderFields,s as getWeeklyArticleHistory,Re as headerPropsSchema,se as hexColourToString,S as inCountryGroups,c as incrementWeeklyArticleCount,A as isGWCheckoutUrl,a as logEpicView,M as replaceNonArticleCountPlaceholders};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("zod");const n="gu.contributions.views",t="gu.history.weeklyArticleCount",a="gu.history.articleCountsThisWeek",o=e=>{const n=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(n-1))/864e5},r=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),i=(e,n={})=>(e.forEach((e=>{r.has(e)&&(n[e]=(n[e]??0)+1)})),n),s=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],l=e.z.enum(s),u={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},c={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},g=e=>Object.keys(u).find((n=>u[n].countries.includes(e??"")))||"International",p=e=>{if(e){const n=g(e);return d[n]}return"£"},z=e=>{if(e)return c[e]},m=e=>/subscribe\/weekly\/checkout/.test(e),C=(e,n,t,a)=>{if(a){const o=a[g(t)];if(o){return`${p(t)}${o[e][n].price}`}}},b={CURRENCY_SYMBOL:({countryCode:e})=>p(e),COUNTRY_NAME:({countryCode:e})=>z(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:n})=>C("Digisub","Monthly",e,n),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:n})=>C("Digisub","Annual",e,n),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:n})=>C("GuardianWeekly","Monthly",e,n),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:n})=>C("GuardianWeekly","Annual",e,n),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},S=/%%.*?%%/g,h=e=>{const n=(e=>{const n=new Date(e,10,1).getDay();return new Date(e,10,22+(11-n)%7)})(e);return n.setDate(n.getDate()+5),n},y=(e=new Date)=>{const n=(e=>{const n=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+n),e})(e),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.toLocaleString("default",{month:"long"}),o=n.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${o}-${t}-01`,reminderLabel:`${a} ${o}`}},A=new Date("2023-12-31"),T=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<h(e.getFullYear()),I=e.z.object({text:e.z.string(),baseUrl:e.z.string()});let N=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.z.nativeEnum(N);const M=e.z.object({type:e.z.literal(N.Custom),cta:I}),E=e.z.object({type:e.z.literal(N.ContributionsReminder)}),G=e.z.discriminatedUnion("type",[M,E]);let U=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const R=e.z.nativeEnum(U);let B=function(e){return e.money="money",e}({});const P=e.z.nativeEnum(B),L=e.z.object({countLabel:e.z.string(),goalReachedPrimary:e.z.string(),goalReachedSecondary:e.z.string()}),D=e.z.object({total:e.z.number(),goal:e.z.number()}),w=e.z.enum(["US","AU"]),O=e.z.object({endType:R,countType:P,currencySymbol:e.z.string(),copy:L,name:w,tickerData:D.optional()}),k=e.z.object({for52Weeks:e.z.number(),forTargetedWeeks:e.z.number()}),f=e.z.enum(["for52Weeks","forTargetedWeeks"]),F=e.z.object({type:e.z.literal("above"),copy:e.z.string().optional(),countType:f.optional()}),x=e.z.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),K=e.z.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),v=e.z.object({abTestName:e.z.string(),abTestVariant:e.z.string(),campaignCode:e.z.string(),componentType:K,products:e.z.array(x).nullish(),labels:e.z.array(e.z.string()).nullish(),ophanPageId:e.z.string(),platformId:e.z.string(),referrerUrl:e.z.string(),clientName:e.z.string()}),H=e.z.object({mainUrl:e.z.string(),mobileUrl:e.z.string().optional(),tabletUrl:e.z.string().optional(),desktopUrl:e.z.string().optional(),leftColUrl:e.z.string().optional(),wideUrl:e.z.string().optional(),altText:e.z.string()}),V=e.z.object({name:e.z.string(),description:e.z.string().optional(),headshot:H.optional()}),Y=e.z.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),j=e.z.enum(["new","guest","current"]),W=e.z.enum(["Live","Draft","Archived"]),Z=e.z.enum(["Mobile","Desktop","All","iOS","Android"]),_=e.z.enum(["SignedIn","SignedOut","All"]),$=e.z.enum(["HasConsented","HasNotConsented","All"]),J=e.z.object({name:e.z.string(),status:W,priority:e.z.number(),controlProportionSettings:e.z.object({proportion:e.z.number(),offset:e.z.number()}).optional(),deviceType:Z.optional(),signedInStatus:_.optional(),consentStatus:$.optional()}),Q=e.z.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),q=e.z.object({minViews:e.z.number(),maxViews:e.z.number().optional(),periodInWeeks:e.z.number(),tagIds:e.z.array(e.z.string()).optional()});e.z.object({userType:e.z.array(j),product:e.z.array(Y)}),e.z.object({tagIds:e.z.array(e.z.string()),sectionIds:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSectionIds:e.z.array(e.z.string())});const X=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()}),ee=e.z.object({reminderCta:e.z.string(),reminderLabel:e.z.string(),reminderPeriod:e.z.string()}),ne=e.z.enum(["ONE_OFF","MONTHLY","ANNUAL"]),te=e.z.object({testName:e.z.string(),variantName:e.z.string(),defaultContributionType:ne,displayContributionType:ne.array(),amountsCardData:e.z.object({ONE_OFF:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),MONTHLY:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),ANNUAL:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()})})}),ae=e.z.object({newsletterId:e.z.string(),successDescription:e.z.string()}),oe=e.z.object({name:e.z.string(),heading:e.z.string().optional(),paragraphs:e.z.array(e.z.string()),highlightedText:e.z.string().optional(),tickerSettings:O.optional(),cta:I.optional(),secondaryCta:G.optional(),newsletterSignup:ae.optional(),image:H.optional(),showReminderFields:ee.optional(),separateArticleCount:F.optional(),maxViews:X.optional(),showSignInLink:e.z.boolean().optional(),bylineWithImage:V.optional(),showChoiceCards:e.z.boolean().optional(),choiceCardAmounts:te.optional(),defaultChoiceCardFrequency:ne.optional()}),re=e.z.object({variant:oe,tracking:v,countryCode:e.z.string().nullish(),articleCounts:k,onReminderOpen:e.z.any().nullish(),fetchEmail:e.z.any().nullish(),submitComponentEvent:e.z.any().nullish(),openCmp:e.z.any().nullish(),hasConsentForArticleCount:e.z.boolean().nullish(),stage:e.z.string().nullish()}),ie=/^[0-9A-F]{2}$/,se=e.z.string().refine((e=>ie.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),le=e.z.object({r:se,g:se,b:se,kind:e.z.literal("hex")}),ue=e.z.object({mobileUrl:e.z.string(),tabletUrl:e.z.string(),desktopUrl:e.z.string(),altText:e.z.string(),kind:e.z.literal("Image")}),ce=e.z.object({buttonColour:le.nullish(),buttonTextColour:le.nullish(),buttonBorderColour:le.nullish(),buttonSelectColour:le.nullish(),buttonSelectTextColour:le.nullish(),buttonSelectBorderColour:le.nullish(),kind:e.z.literal("ChoiceCards")}),de=e.z.discriminatedUnion("kind",[ue,ce]),ge=e.z.object({visual:de.nullish(),colours:e.z.object({basic:e.z.object({background:le,bodyText:le})})}),pe=e.z.enum(["contributions","subscriptions","signIn","abandonedBasket"]),ze=e.z.object({heading:e.z.string().optional(),messageText:e.z.string().optional(),paragraphs:e.z.array(e.z.string()).optional(),mobileMessageText:e.z.string().optional(),highlightedText:e.z.string().optional(),cta:I.optional(),secondaryCta:G.optional()});e.z.object({tracking:v,bannerChannel:pe,content:ze.nullish(),mobileContent:ze.nullish(),countryCode:e.z.string().nullish(),isSupporter:e.z.boolean().nullish(),tickerSettings:O.nullish(),submitComponentEvent:e.z.any(),articleCounts:k,hasOptedOutOfArticleCount:e.z.boolean().nullish(),fetchEmail:e.z.any().nullish(),separateArticleCount:e.z.boolean().nullish(),design:ge.nullish()});const me=e.z.object({heading:e.z.string(),subheading:e.z.string(),primaryCta:I.optional(),secondaryCta:I.optional(),benefits:e.z.array(e.z.string()).optional()}),Ce=e.z.object({content:me,tracking:v,mobileContent:me.optional(),countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),numArticles:e.z.number().optional()}),be=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()});J.extend({name:e.z.string(),status:W,locations:e.z.array(l),tagIds:e.z.array(e.z.string()),sections:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSections:e.z.array(e.z.string()),alwaysAsk:e.z.boolean(),maxViews:be.optional(),userCohort:Q,hasCountryName:e.z.boolean(),highPriority:e.z.boolean(),useLocalViewLog:e.z.boolean(),articlesViewedSettings:q.optional(),priority:e.z.number(),variants:oe.array(),isBanditTest:e.z.boolean().optional()});const Se=e.z.object({amount:e.z.union([e.z.number(),e.z.literal("other")]),billingPeriod:e.z.union([e.z.literal("ONE_OFF"),e.z.literal("MONTHLY"),e.z.literal("ANNUAL")]),product:e.z.union([e.z.literal("Contribution"),e.z.literal("SupporterPlus"),e.z.literal("PremiumTier"),e.z.literal("DailyEdition"),e.z.literal("GuardianWeekly"),e.z.literal("Paper"),e.z.literal("PaperAndDigital")]),region:e.z.union([e.z.literal("uk"),e.z.literal("us"),e.z.literal("au"),e.z.literal("eu"),e.z.literal("int"),e.z.literal("nz"),e.z.literal("ca")])}),he=(e,n,t)=>{const a=(e=>{if(URLSearchParams){const n=new URLSearchParams(window.location.search).get(`force-${e}`);if(n)return n}return null})(e);return fetch(`${n}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((n=>{if(!n.ok)throw Error(n.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${n.status}`);return n})).then((e=>e.json()))};exports.CountryGroupId=s,exports.SecondaryCtaType=N,exports.TickerCountType=B,exports.TickerEndType=U,exports.abandonedBasketSchema=Se,exports.addRegionIdToSupportUrl=(e,n)=>{if(n){const t=(e=>u[g(e)]?.supportRegionId)(n);if(t&&!m(e))return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,n,a)=>`${n}/${t.toLowerCase()}/${a}`))}return e},exports.buildReminderFields=y,exports.containsNonArticleCountPlaceholder=e=>{const n=e.match(S)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!n&&n.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=g,exports.countryGroupIdSchema=l,exports.epicPropsSchema=re,exports.getBanner=(e,n)=>he("banner",e,n),exports.getCountryName=z,exports.getEpic=(e,n)=>he("epic",e,n),exports.getEpicViewLog=e=>e.get(n)||void 0,exports.getHeader=(e,n)=>he("header",e,n),exports.getLiveblogEpic=(e,n)=>he("liveblog-epic",e,n),exports.getLocalCurrencySymbol=p,exports.getReminderFields=(e,n=new Date)=>{return"US"===e&&T(n)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${t=n.getFullYear()}-${(h(t).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${t}`}:"US"===e&&(e=>e>=h(e.getFullYear())&&e<A)(n)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(n.getFullYear()):y(n);var t},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.headerPropsSchema=Ce,exports.inCountryGroups=(e,n=[])=>0===n.length||!!e&&n.includes(g(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,n,r)=>{const s=((e,n)=>{const t=o(new Date),r=e.get(a);if(r&&r.week===t){const o=r.articles[n]||0;return e.set(a,{week:t,articles:{...r.articles,[n]:o+1}}),o>0}return e.set(a,{week:t,articles:{[n]:1}}),!1})(e,n);if(!s){const n=o(new Date),a=e.get(t)||[],s=a[0];if(s&&s.week&&s.week===n)s.count+=1,s.tags=i(r,s.tags),e.set(t,a);else{a.unshift({week:n,count:1,tags:i(r,{})});const o=n-365,s=a.filter((e=>e.week>=o));e.set(t,s)}}},exports.isGWCheckoutUrl=m,exports.logEpicView=e=>{const t=localStorage.getItem(n),a=t?JSON.parse(t).value:[];a.push({date:(new Date).getTime(),testId:e});const o={value:a.slice(-50)};localStorage.setItem(n,JSON.stringify(o))},exports.replaceNonArticleCountPlaceholders=(e,n,t)=>e?e.replace(S,(e=>{const a=e.substring(2,e.length-2),o=b[a];if(o){const e=o({countryCode:n,prices:t});if(e)return e}return e})):"";
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("zod");const n="gu.contributions.views",t="gu.history.weeklyArticleCount",a="gu.history.articleCountsThisWeek",o=e=>{const n=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(n-1))/864e5},r=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),i=(e,n={})=>(e.forEach((e=>{r.has(e)&&(n[e]=(n[e]??0)+1)})),n),s=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],l=e.z.enum(s),u={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},c={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},g=e=>Object.keys(u).find((n=>u[n].countries.includes(e??"")))||"International",p=e=>{if(e){const n=g(e);return d[n]}return"£"},z=e=>{if(e)return c[e]},m=e=>/subscribe\/weekly\/checkout/.test(e),C=(e,n,t,a)=>{if(a){const o=a[g(t)];if(o){return`${p(t)}${o[e][n].price}`}}},b={CURRENCY_SYMBOL:({countryCode:e})=>p(e),COUNTRY_NAME:({countryCode:e})=>z(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:n})=>C("Digisub","Monthly",e,n),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:n})=>C("Digisub","Annual",e,n),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:n})=>C("GuardianWeekly","Monthly",e,n),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:n})=>C("GuardianWeekly","Annual",e,n),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},S=/%%.*?%%/g,h=e=>{const n=(e=>{const n=new Date(e,10,1).getDay();return new Date(e,10,22+(11-n)%7)})(e);return n.setDate(n.getDate()+5),n},y=(e=new Date)=>{const n=(e=>{const n=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+n),e})(e),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.toLocaleString("default",{month:"long"}),o=n.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${o}-${t}-01`,reminderLabel:`${a} ${o}`}},A=new Date("2023-12-31"),T=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<h(e.getFullYear()),I=e.z.object({text:e.z.string(),baseUrl:e.z.string()});let N=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.z.nativeEnum(N);const M=e.z.object({type:e.z.literal(N.Custom),cta:I}),E=e.z.object({type:e.z.literal(N.ContributionsReminder)}),G=e.z.discriminatedUnion("type",[M,E]);let U=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const R=e.z.nativeEnum(U);let B=function(e){return e.money="money",e}({});const P=e.z.nativeEnum(B),L=e.z.object({countLabel:e.z.string(),goalReachedPrimary:e.z.string(),goalReachedSecondary:e.z.string()}),D=e.z.object({total:e.z.number(),goal:e.z.number()}),w=e.z.enum(["US","AU"]),k=e.z.object({headlineColour:e.z.string(),totalColour:e.z.string(),goalColour:e.z.string(),filledProgressColour:e.z.string(),progressBarBackgroundColour:e.z.string()}),O=e.z.object({endType:R,countType:P,currencySymbol:e.z.string(),copy:L,name:w,tickerData:D.optional(),tickerStylingSettings:k.optional()}),f=e.z.object({for52Weeks:e.z.number(),forTargetedWeeks:e.z.number()}),x=e.z.enum(["for52Weeks","forTargetedWeeks"]),F=e.z.object({type:e.z.literal("above"),copy:e.z.string().optional(),countType:x.optional()}),K=e.z.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),v=e.z.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),H=e.z.object({abTestName:e.z.string(),abTestVariant:e.z.string(),campaignCode:e.z.string(),componentType:v,products:e.z.array(K).nullish(),labels:e.z.array(e.z.string()).nullish(),ophanPageId:e.z.string(),platformId:e.z.string(),referrerUrl:e.z.string(),clientName:e.z.string()}),j=e.z.object({mainUrl:e.z.string(),mobileUrl:e.z.string().optional(),tabletUrl:e.z.string().optional(),desktopUrl:e.z.string().optional(),leftColUrl:e.z.string().optional(),wideUrl:e.z.string().optional(),altText:e.z.string()}),V=e.z.object({name:e.z.string(),description:e.z.string().optional(),headshot:j.optional()}),Y=/^[0-9A-F]{2}$/,W=e.z.string().refine((e=>Y.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),Z=e.z.object({r:W,g:W,b:W,kind:e.z.literal("hex")}),$=e.z.object({mobileUrl:e.z.string(),tabletUrl:e.z.string(),desktopUrl:e.z.string(),altText:e.z.string(),kind:e.z.literal("Image")}),_=e.z.object({buttonColour:Z.nullish(),buttonTextColour:Z.nullish(),buttonBorderColour:Z.nullish(),buttonSelectColour:Z.nullish(),buttonSelectTextColour:Z.nullish(),buttonSelectBorderColour:Z.nullish(),kind:e.z.literal("ChoiceCards")}),J=e.z.discriminatedUnion("kind",[$,_]),Q=e.z.object({visual:J.nullish(),colours:e.z.object({basic:e.z.object({background:Z,bodyText:Z})})}),q=e.z.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),X=e.z.enum(["new","guest","current"]),ee=e.z.enum(["Live","Draft","Archived"]),ne=e.z.enum(["Mobile","Desktop","All","iOS","Android"]),te=e.z.enum(["SignedIn","SignedOut","All"]),ae=e.z.enum(["HasConsented","HasNotConsented","All"]),oe=e.z.object({name:e.z.string(),status:ee,priority:e.z.number(),controlProportionSettings:e.z.object({proportion:e.z.number(),offset:e.z.number()}).optional(),deviceType:ne.optional(),signedInStatus:te.optional(),consentStatus:ae.optional()}),re=e.z.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),ie=e.z.object({minViews:e.z.number(),maxViews:e.z.number().optional(),periodInWeeks:e.z.number(),tagIds:e.z.array(e.z.string()).optional()});e.z.object({userType:e.z.array(X),product:e.z.array(q)}),e.z.object({tagIds:e.z.array(e.z.string()),sectionIds:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSectionIds:e.z.array(e.z.string())});const se=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()}),le=e.z.object({reminderCta:e.z.string(),reminderLabel:e.z.string(),reminderPeriod:e.z.string()}),ue=e.z.enum(["ONE_OFF","MONTHLY","ANNUAL"]),ce=e.z.object({testName:e.z.string(),variantName:e.z.string(),defaultContributionType:ue,displayContributionType:ue.array(),amountsCardData:e.z.object({ONE_OFF:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),MONTHLY:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),ANNUAL:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()})})}),de=e.z.object({newsletterId:e.z.string(),successDescription:e.z.string()}),ge=e.z.object({name:e.z.string(),heading:e.z.string().optional(),paragraphs:e.z.array(e.z.string()),highlightedText:e.z.string().optional(),tickerSettings:O.optional(),cta:I.optional(),secondaryCta:G.optional(),newsletterSignup:de.optional(),image:j.optional(),showReminderFields:le.optional(),separateArticleCount:F.optional(),maxViews:se.optional(),showSignInLink:e.z.boolean().optional(),bylineWithImage:V.optional(),showChoiceCards:e.z.boolean().optional(),choiceCardAmounts:ce.optional(),defaultChoiceCardFrequency:ue.optional()}),pe=e.z.object({variant:ge,tracking:H,countryCode:e.z.string().nullish(),articleCounts:f,onReminderOpen:e.z.any().nullish(),fetchEmail:e.z.any().nullish(),submitComponentEvent:e.z.any().nullish(),openCmp:e.z.any().nullish(),hasConsentForArticleCount:e.z.boolean().nullish(),stage:e.z.string().nullish()}),ze=e.z.enum(["contributions","subscriptions","signIn","abandonedBasket"]),me=e.z.object({heading:e.z.string().optional(),messageText:e.z.string().optional(),paragraphs:e.z.array(e.z.string()).optional(),mobileMessageText:e.z.string().optional(),highlightedText:e.z.string().optional(),cta:I.optional(),secondaryCta:G.optional()}),Ce=e.z.object({tracking:H,bannerChannel:ze,content:me.nullish(),mobileContent:me.nullish(),countryCode:e.z.string().nullish(),isSupporter:e.z.boolean().nullish(),tickerSettings:O.nullish(),submitComponentEvent:e.z.any(),articleCounts:f,hasOptedOutOfArticleCount:e.z.boolean().nullish(),fetchEmail:e.z.any().nullish(),separateArticleCount:e.z.boolean().nullish(),design:Q.nullish()}),be=e.z.object({heading:e.z.string(),subheading:e.z.string(),primaryCta:I.optional(),secondaryCta:I.optional(),benefits:e.z.array(e.z.string()).optional()}),Se=e.z.object({content:be,tracking:H,mobileContent:be.optional(),countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),numArticles:e.z.number().optional()}),he=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()});oe.extend({name:e.z.string(),status:ee,locations:e.z.array(l),tagIds:e.z.array(e.z.string()),sections:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSections:e.z.array(e.z.string()),alwaysAsk:e.z.boolean(),maxViews:he.optional(),userCohort:re,hasCountryName:e.z.boolean(),highPriority:e.z.boolean(),useLocalViewLog:e.z.boolean(),articlesViewedSettings:ie.optional(),priority:e.z.number(),variants:ge.array(),isBanditTest:e.z.boolean().optional()});const ye=e.z.object({amount:e.z.union([e.z.number(),e.z.literal("other")]),billingPeriod:e.z.union([e.z.literal("ONE_OFF"),e.z.literal("MONTHLY"),e.z.literal("ANNUAL")]),product:e.z.union([e.z.literal("Contribution"),e.z.literal("SupporterPlus"),e.z.literal("PremiumTier"),e.z.literal("DailyEdition"),e.z.literal("GuardianWeekly"),e.z.literal("Paper"),e.z.literal("PaperAndDigital")]),region:e.z.union([e.z.literal("uk"),e.z.literal("us"),e.z.literal("au"),e.z.literal("eu"),e.z.literal("int"),e.z.literal("nz"),e.z.literal("ca")])}),Ae=(e,n,t)=>{const a=(e=>{if(URLSearchParams){const n=new URLSearchParams(window.location.search).get(`force-${e}`);if(n)return n}return null})(e);return fetch(`${n}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((n=>{if(!n.ok)throw Error(n.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${n.status}`);return n})).then((e=>e.json()))};exports.CountryGroupId=s,exports.SecondaryCtaType=N,exports.TickerCountType=B,exports.TickerEndType=U,exports.abandonedBasketSchema=ye,exports.addRegionIdToSupportUrl=(e,n)=>{if(n){const t=(e=>u[g(e)]?.supportRegionId)(n);if(t&&!m(e))return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,n,a)=>`${n}/${t.toLowerCase()}/${a}`))}return e},exports.bannerSchema=Ce,exports.buildReminderFields=y,exports.containsNonArticleCountPlaceholder=e=>{const n=e.match(S)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!n&&n.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=g,exports.countryGroupIdSchema=l,exports.epicPropsSchema=pe,exports.getBanner=(e,n)=>Ae("banner",e,n),exports.getCountryName=z,exports.getEpic=(e,n)=>Ae("epic",e,n),exports.getEpicViewLog=e=>e.get(n)||void 0,exports.getHeader=(e,n)=>Ae("header",e,n),exports.getLiveblogEpic=(e,n)=>Ae("liveblog-epic",e,n),exports.getLocalCurrencySymbol=p,exports.getReminderFields=(e,n=new Date)=>{return"US"===e&&T(n)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${t=n.getFullYear()}-${(h(t).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${t}`}:"US"===e&&(e=>e>=h(e.getFullYear())&&e<A)(n)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(n.getFullYear()):y(n);var t},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.headerPropsSchema=Se,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inCountryGroups=(e,n=[])=>0===n.length||!!e&&n.includes(g(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,n,r)=>{const s=((e,n)=>{const t=o(new Date),r=e.get(a);if(r&&r.week===t){const o=r.articles[n]||0;return e.set(a,{week:t,articles:{...r.articles,[n]:o+1}}),o>0}return e.set(a,{week:t,articles:{[n]:1}}),!1})(e,n);if(!s){const n=o(new Date),a=e.get(t)||[],s=a[0];if(s&&s.week&&s.week===n)s.count+=1,s.tags=i(r,s.tags),e.set(t,a);else{a.unshift({week:n,count:1,tags:i(r,{})});const o=n-365,s=a.filter((e=>e.week>=o));e.set(t,s)}}},exports.isGWCheckoutUrl=m,exports.logEpicView=e=>{const t=localStorage.getItem(n),a=t?JSON.parse(t).value:[];a.push({date:(new Date).getTime(),testId:e});const o={value:a.slice(-50)};localStorage.setItem(n,JSON.stringify(o))},exports.replaceNonArticleCountPlaceholders=(e,n,t)=>e?e.replace(S,(e=>{const a=e.substring(2,e.length-2),o=b[a];if(o){const e=o({countryCode:n,prices:t});if(e)return e}return e})):"";
|
|
@@ -52,6 +52,25 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
52
52
|
total: number;
|
|
53
53
|
goal: number;
|
|
54
54
|
}>>;
|
|
55
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
headlineColour: z.ZodString;
|
|
57
|
+
totalColour: z.ZodString;
|
|
58
|
+
goalColour: z.ZodString;
|
|
59
|
+
filledProgressColour: z.ZodString;
|
|
60
|
+
progressBarBackgroundColour: z.ZodString;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
headlineColour: string;
|
|
63
|
+
totalColour: string;
|
|
64
|
+
goalColour: string;
|
|
65
|
+
filledProgressColour: string;
|
|
66
|
+
progressBarBackgroundColour: string;
|
|
67
|
+
}, {
|
|
68
|
+
headlineColour: string;
|
|
69
|
+
totalColour: string;
|
|
70
|
+
goalColour: string;
|
|
71
|
+
filledProgressColour: string;
|
|
72
|
+
progressBarBackgroundColour: string;
|
|
73
|
+
}>>;
|
|
55
74
|
}, "strip", z.ZodTypeAny, {
|
|
56
75
|
name: "US" | "AU";
|
|
57
76
|
copy: {
|
|
@@ -66,6 +85,13 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
66
85
|
total: number;
|
|
67
86
|
goal: number;
|
|
68
87
|
} | undefined;
|
|
88
|
+
tickerStylingSettings?: {
|
|
89
|
+
headlineColour: string;
|
|
90
|
+
totalColour: string;
|
|
91
|
+
goalColour: string;
|
|
92
|
+
filledProgressColour: string;
|
|
93
|
+
progressBarBackgroundColour: string;
|
|
94
|
+
} | undefined;
|
|
69
95
|
}, {
|
|
70
96
|
name: "US" | "AU";
|
|
71
97
|
copy: {
|
|
@@ -80,6 +106,13 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
80
106
|
total: number;
|
|
81
107
|
goal: number;
|
|
82
108
|
} | undefined;
|
|
109
|
+
tickerStylingSettings?: {
|
|
110
|
+
headlineColour: string;
|
|
111
|
+
totalColour: string;
|
|
112
|
+
goalColour: string;
|
|
113
|
+
filledProgressColour: string;
|
|
114
|
+
progressBarBackgroundColour: string;
|
|
115
|
+
} | undefined;
|
|
83
116
|
}>>;
|
|
84
117
|
template: z.ZodUnion<[z.ZodNativeEnum<typeof BannerTemplate>, z.ZodObject<{
|
|
85
118
|
designName: z.ZodString;
|
|
@@ -295,6 +328,13 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
295
328
|
total: number;
|
|
296
329
|
goal: number;
|
|
297
330
|
} | undefined;
|
|
331
|
+
tickerStylingSettings?: {
|
|
332
|
+
headlineColour: string;
|
|
333
|
+
totalColour: string;
|
|
334
|
+
goalColour: string;
|
|
335
|
+
filledProgressColour: string;
|
|
336
|
+
progressBarBackgroundColour: string;
|
|
337
|
+
} | undefined;
|
|
298
338
|
} | undefined;
|
|
299
339
|
bannerContent?: {
|
|
300
340
|
heading?: string | undefined;
|
|
@@ -363,6 +403,13 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
363
403
|
total: number;
|
|
364
404
|
goal: number;
|
|
365
405
|
} | undefined;
|
|
406
|
+
tickerStylingSettings?: {
|
|
407
|
+
headlineColour: string;
|
|
408
|
+
totalColour: string;
|
|
409
|
+
goalColour: string;
|
|
410
|
+
filledProgressColour: string;
|
|
411
|
+
progressBarBackgroundColour: string;
|
|
412
|
+
} | undefined;
|
|
366
413
|
} | undefined;
|
|
367
414
|
bannerContent?: {
|
|
368
415
|
heading?: string | undefined;
|
|
@@ -413,7 +460,6 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
413
460
|
}>;
|
|
414
461
|
export type BannerVariantFromTool = z.infer<typeof bannerVariantFromToolSchema>;
|
|
415
462
|
export interface BannerVariant extends BannerVariantFromTool {
|
|
416
|
-
modulePathBuilder: (version?: string) => string;
|
|
417
463
|
componentType: OphanComponentType;
|
|
418
464
|
products?: OphanProduct[];
|
|
419
465
|
}
|
|
@@ -422,7 +468,6 @@ export type BannerTestGenerator = () => Promise<BannerTest[]>;
|
|
|
422
468
|
export interface BannerTestSelection {
|
|
423
469
|
test: BannerTest;
|
|
424
470
|
variant: BannerVariant;
|
|
425
|
-
moduleUrl: string;
|
|
426
471
|
moduleName: string;
|
|
427
472
|
targetingAbTest?: TargetingAbTest;
|
|
428
473
|
}
|
|
@@ -498,6 +543,25 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
498
543
|
total: number;
|
|
499
544
|
goal: number;
|
|
500
545
|
}>>;
|
|
546
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
547
|
+
headlineColour: z.ZodString;
|
|
548
|
+
totalColour: z.ZodString;
|
|
549
|
+
goalColour: z.ZodString;
|
|
550
|
+
filledProgressColour: z.ZodString;
|
|
551
|
+
progressBarBackgroundColour: z.ZodString;
|
|
552
|
+
}, "strip", z.ZodTypeAny, {
|
|
553
|
+
headlineColour: string;
|
|
554
|
+
totalColour: string;
|
|
555
|
+
goalColour: string;
|
|
556
|
+
filledProgressColour: string;
|
|
557
|
+
progressBarBackgroundColour: string;
|
|
558
|
+
}, {
|
|
559
|
+
headlineColour: string;
|
|
560
|
+
totalColour: string;
|
|
561
|
+
goalColour: string;
|
|
562
|
+
filledProgressColour: string;
|
|
563
|
+
progressBarBackgroundColour: string;
|
|
564
|
+
}>>;
|
|
501
565
|
}, "strip", z.ZodTypeAny, {
|
|
502
566
|
name: "US" | "AU";
|
|
503
567
|
copy: {
|
|
@@ -512,6 +576,13 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
512
576
|
total: number;
|
|
513
577
|
goal: number;
|
|
514
578
|
} | undefined;
|
|
579
|
+
tickerStylingSettings?: {
|
|
580
|
+
headlineColour: string;
|
|
581
|
+
totalColour: string;
|
|
582
|
+
goalColour: string;
|
|
583
|
+
filledProgressColour: string;
|
|
584
|
+
progressBarBackgroundColour: string;
|
|
585
|
+
} | undefined;
|
|
515
586
|
}, {
|
|
516
587
|
name: "US" | "AU";
|
|
517
588
|
copy: {
|
|
@@ -526,6 +597,13 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
526
597
|
total: number;
|
|
527
598
|
goal: number;
|
|
528
599
|
} | undefined;
|
|
600
|
+
tickerStylingSettings?: {
|
|
601
|
+
headlineColour: string;
|
|
602
|
+
totalColour: string;
|
|
603
|
+
goalColour: string;
|
|
604
|
+
filledProgressColour: string;
|
|
605
|
+
progressBarBackgroundColour: string;
|
|
606
|
+
} | undefined;
|
|
529
607
|
}>>;
|
|
530
608
|
template: z.ZodUnion<[z.ZodNativeEnum<typeof BannerTemplate>, z.ZodObject<{
|
|
531
609
|
designName: z.ZodString;
|
|
@@ -741,6 +819,13 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
741
819
|
total: number;
|
|
742
820
|
goal: number;
|
|
743
821
|
} | undefined;
|
|
822
|
+
tickerStylingSettings?: {
|
|
823
|
+
headlineColour: string;
|
|
824
|
+
totalColour: string;
|
|
825
|
+
goalColour: string;
|
|
826
|
+
filledProgressColour: string;
|
|
827
|
+
progressBarBackgroundColour: string;
|
|
828
|
+
} | undefined;
|
|
744
829
|
} | undefined;
|
|
745
830
|
bannerContent?: {
|
|
746
831
|
heading?: string | undefined;
|
|
@@ -809,6 +894,13 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
809
894
|
total: number;
|
|
810
895
|
goal: number;
|
|
811
896
|
} | undefined;
|
|
897
|
+
tickerStylingSettings?: {
|
|
898
|
+
headlineColour: string;
|
|
899
|
+
totalColour: string;
|
|
900
|
+
goalColour: string;
|
|
901
|
+
filledProgressColour: string;
|
|
902
|
+
progressBarBackgroundColour: string;
|
|
903
|
+
} | undefined;
|
|
812
904
|
} | undefined;
|
|
813
905
|
bannerContent?: {
|
|
814
906
|
heading?: string | undefined;
|
|
@@ -900,6 +992,13 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
900
992
|
total: number;
|
|
901
993
|
goal: number;
|
|
902
994
|
} | undefined;
|
|
995
|
+
tickerStylingSettings?: {
|
|
996
|
+
headlineColour: string;
|
|
997
|
+
totalColour: string;
|
|
998
|
+
goalColour: string;
|
|
999
|
+
filledProgressColour: string;
|
|
1000
|
+
progressBarBackgroundColour: string;
|
|
1001
|
+
} | undefined;
|
|
903
1002
|
} | undefined;
|
|
904
1003
|
bannerContent?: {
|
|
905
1004
|
heading?: string | undefined;
|
|
@@ -994,6 +1093,13 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
994
1093
|
total: number;
|
|
995
1094
|
goal: number;
|
|
996
1095
|
} | undefined;
|
|
1096
|
+
tickerStylingSettings?: {
|
|
1097
|
+
headlineColour: string;
|
|
1098
|
+
totalColour: string;
|
|
1099
|
+
goalColour: string;
|
|
1100
|
+
filledProgressColour: string;
|
|
1101
|
+
progressBarBackgroundColour: string;
|
|
1102
|
+
} | undefined;
|
|
997
1103
|
} | undefined;
|
|
998
1104
|
bannerContent?: {
|
|
999
1105
|
heading?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAEb,kBAAkB,EAGrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAGH,eAAe,EAGlB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;GASG;AAEH,oBAAY,cAAc;IACtB,kBAAkB,uBAAuB;CAC5C;AAED,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAElD,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,IAAI,gBAAgB,CAE/D;AAED,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAEb,kBAAkB,EAGrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAGH,eAAe,EAGlB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAElE;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B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC"}
|
|
@@ -158,6 +158,25 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
158
158
|
total: number;
|
|
159
159
|
goal: number;
|
|
160
160
|
}>>;
|
|
161
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
headlineColour: z.ZodString;
|
|
163
|
+
totalColour: z.ZodString;
|
|
164
|
+
goalColour: z.ZodString;
|
|
165
|
+
filledProgressColour: z.ZodString;
|
|
166
|
+
progressBarBackgroundColour: z.ZodString;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
headlineColour: string;
|
|
169
|
+
totalColour: string;
|
|
170
|
+
goalColour: string;
|
|
171
|
+
filledProgressColour: string;
|
|
172
|
+
progressBarBackgroundColour: string;
|
|
173
|
+
}, {
|
|
174
|
+
headlineColour: string;
|
|
175
|
+
totalColour: string;
|
|
176
|
+
goalColour: string;
|
|
177
|
+
filledProgressColour: string;
|
|
178
|
+
progressBarBackgroundColour: string;
|
|
179
|
+
}>>;
|
|
161
180
|
}, "strip", z.ZodTypeAny, {
|
|
162
181
|
name: "US" | "AU";
|
|
163
182
|
copy: {
|
|
@@ -172,6 +191,13 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
172
191
|
total: number;
|
|
173
192
|
goal: number;
|
|
174
193
|
} | undefined;
|
|
194
|
+
tickerStylingSettings?: {
|
|
195
|
+
headlineColour: string;
|
|
196
|
+
totalColour: string;
|
|
197
|
+
goalColour: string;
|
|
198
|
+
filledProgressColour: string;
|
|
199
|
+
progressBarBackgroundColour: string;
|
|
200
|
+
} | undefined;
|
|
175
201
|
}, {
|
|
176
202
|
name: "US" | "AU";
|
|
177
203
|
copy: {
|
|
@@ -186,6 +212,13 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
186
212
|
total: number;
|
|
187
213
|
goal: number;
|
|
188
214
|
} | undefined;
|
|
215
|
+
tickerStylingSettings?: {
|
|
216
|
+
headlineColour: string;
|
|
217
|
+
totalColour: string;
|
|
218
|
+
goalColour: string;
|
|
219
|
+
filledProgressColour: string;
|
|
220
|
+
progressBarBackgroundColour: string;
|
|
221
|
+
} | undefined;
|
|
189
222
|
}>>;
|
|
190
223
|
cta: z.ZodOptional<z.ZodObject<{
|
|
191
224
|
text: z.ZodString;
|
|
@@ -500,6 +533,13 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
500
533
|
total: number;
|
|
501
534
|
goal: number;
|
|
502
535
|
} | undefined;
|
|
536
|
+
tickerStylingSettings?: {
|
|
537
|
+
headlineColour: string;
|
|
538
|
+
totalColour: string;
|
|
539
|
+
goalColour: string;
|
|
540
|
+
filledProgressColour: string;
|
|
541
|
+
progressBarBackgroundColour: string;
|
|
542
|
+
} | undefined;
|
|
503
543
|
} | undefined;
|
|
504
544
|
cta?: {
|
|
505
545
|
text: string;
|
|
@@ -600,6 +640,13 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
600
640
|
total: number;
|
|
601
641
|
goal: number;
|
|
602
642
|
} | undefined;
|
|
643
|
+
tickerStylingSettings?: {
|
|
644
|
+
headlineColour: string;
|
|
645
|
+
totalColour: string;
|
|
646
|
+
goalColour: string;
|
|
647
|
+
filledProgressColour: string;
|
|
648
|
+
progressBarBackgroundColour: string;
|
|
649
|
+
} | undefined;
|
|
603
650
|
} | undefined;
|
|
604
651
|
cta?: {
|
|
605
652
|
text: string;
|
|
@@ -716,6 +763,13 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
716
763
|
total: number;
|
|
717
764
|
goal: number;
|
|
718
765
|
} | undefined;
|
|
766
|
+
tickerStylingSettings?: {
|
|
767
|
+
headlineColour: string;
|
|
768
|
+
totalColour: string;
|
|
769
|
+
goalColour: string;
|
|
770
|
+
filledProgressColour: string;
|
|
771
|
+
progressBarBackgroundColour: string;
|
|
772
|
+
} | undefined;
|
|
719
773
|
} | undefined;
|
|
720
774
|
cta?: {
|
|
721
775
|
text: string;
|
|
@@ -850,6 +904,13 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
850
904
|
total: number;
|
|
851
905
|
goal: number;
|
|
852
906
|
} | undefined;
|
|
907
|
+
tickerStylingSettings?: {
|
|
908
|
+
headlineColour: string;
|
|
909
|
+
totalColour: string;
|
|
910
|
+
goalColour: string;
|
|
911
|
+
filledProgressColour: string;
|
|
912
|
+
progressBarBackgroundColour: string;
|
|
913
|
+
} | undefined;
|
|
853
914
|
} | undefined;
|
|
854
915
|
cta?: {
|
|
855
916
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/abTests/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwB,MAAM,WAAW,CAAC;AAOjE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9C,eAAO,MAAM,cAAc;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE,eAAO,MAAM,0BAA0B,EAAE,qBAAqB,EAAqC,CAAC;AAEpG,UAAU,oBAAoB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,gBAAgB,GAAG;KAC1B,GAAG,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBjC,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -360,6 +360,25 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
360
360
|
total: number;
|
|
361
361
|
goal: number;
|
|
362
362
|
}>>;
|
|
363
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
364
|
+
headlineColour: z.ZodString;
|
|
365
|
+
totalColour: z.ZodString;
|
|
366
|
+
goalColour: z.ZodString;
|
|
367
|
+
filledProgressColour: z.ZodString;
|
|
368
|
+
progressBarBackgroundColour: z.ZodString;
|
|
369
|
+
}, "strip", z.ZodTypeAny, {
|
|
370
|
+
headlineColour: string;
|
|
371
|
+
totalColour: string;
|
|
372
|
+
goalColour: string;
|
|
373
|
+
filledProgressColour: string;
|
|
374
|
+
progressBarBackgroundColour: string;
|
|
375
|
+
}, {
|
|
376
|
+
headlineColour: string;
|
|
377
|
+
totalColour: string;
|
|
378
|
+
goalColour: string;
|
|
379
|
+
filledProgressColour: string;
|
|
380
|
+
progressBarBackgroundColour: string;
|
|
381
|
+
}>>;
|
|
363
382
|
}, "strip", z.ZodTypeAny, {
|
|
364
383
|
name: "US" | "AU";
|
|
365
384
|
copy: {
|
|
@@ -374,6 +393,13 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
374
393
|
total: number;
|
|
375
394
|
goal: number;
|
|
376
395
|
} | undefined;
|
|
396
|
+
tickerStylingSettings?: {
|
|
397
|
+
headlineColour: string;
|
|
398
|
+
totalColour: string;
|
|
399
|
+
goalColour: string;
|
|
400
|
+
filledProgressColour: string;
|
|
401
|
+
progressBarBackgroundColour: string;
|
|
402
|
+
} | undefined;
|
|
377
403
|
}, {
|
|
378
404
|
name: "US" | "AU";
|
|
379
405
|
copy: {
|
|
@@ -388,6 +414,13 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
388
414
|
total: number;
|
|
389
415
|
goal: number;
|
|
390
416
|
} | undefined;
|
|
417
|
+
tickerStylingSettings?: {
|
|
418
|
+
headlineColour: string;
|
|
419
|
+
totalColour: string;
|
|
420
|
+
goalColour: string;
|
|
421
|
+
filledProgressColour: string;
|
|
422
|
+
progressBarBackgroundColour: string;
|
|
423
|
+
} | undefined;
|
|
391
424
|
}>>>;
|
|
392
425
|
submitComponentEvent: z.ZodAny;
|
|
393
426
|
articleCounts: z.ZodObject<{
|
|
@@ -888,6 +921,13 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
888
921
|
total: number;
|
|
889
922
|
goal: number;
|
|
890
923
|
} | undefined;
|
|
924
|
+
tickerStylingSettings?: {
|
|
925
|
+
headlineColour: string;
|
|
926
|
+
totalColour: string;
|
|
927
|
+
goalColour: string;
|
|
928
|
+
filledProgressColour: string;
|
|
929
|
+
progressBarBackgroundColour: string;
|
|
930
|
+
} | undefined;
|
|
891
931
|
} | null | undefined;
|
|
892
932
|
submitComponentEvent?: any;
|
|
893
933
|
hasOptedOutOfArticleCount?: boolean | null | undefined;
|
|
@@ -1030,6 +1070,13 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1030
1070
|
total: number;
|
|
1031
1071
|
goal: number;
|
|
1032
1072
|
} | undefined;
|
|
1073
|
+
tickerStylingSettings?: {
|
|
1074
|
+
headlineColour: string;
|
|
1075
|
+
totalColour: string;
|
|
1076
|
+
goalColour: string;
|
|
1077
|
+
filledProgressColour: string;
|
|
1078
|
+
progressBarBackgroundColour: string;
|
|
1079
|
+
} | undefined;
|
|
1033
1080
|
} | null | undefined;
|
|
1034
1081
|
submitComponentEvent?: any;
|
|
1035
1082
|
hasOptedOutOfArticleCount?: boolean | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACjD,OAAO,EACH,aAAa,EAEb,GAAG,EAEH,YAAY,EAEZ,oBAAoB,EACpB,cAAc,EAEd,QAAQ,EAEX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAA4B,MAAM,UAAU,CAAC;AACxE,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC"}
|
|
@@ -49,6 +49,25 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
49
49
|
total: number;
|
|
50
50
|
goal: number;
|
|
51
51
|
}>>;
|
|
52
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
headlineColour: z.ZodString;
|
|
54
|
+
totalColour: z.ZodString;
|
|
55
|
+
goalColour: z.ZodString;
|
|
56
|
+
filledProgressColour: z.ZodString;
|
|
57
|
+
progressBarBackgroundColour: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
headlineColour: string;
|
|
60
|
+
totalColour: string;
|
|
61
|
+
goalColour: string;
|
|
62
|
+
filledProgressColour: string;
|
|
63
|
+
progressBarBackgroundColour: string;
|
|
64
|
+
}, {
|
|
65
|
+
headlineColour: string;
|
|
66
|
+
totalColour: string;
|
|
67
|
+
goalColour: string;
|
|
68
|
+
filledProgressColour: string;
|
|
69
|
+
progressBarBackgroundColour: string;
|
|
70
|
+
}>>;
|
|
52
71
|
}, "strip", z.ZodTypeAny, {
|
|
53
72
|
name: "US" | "AU";
|
|
54
73
|
copy: {
|
|
@@ -63,6 +82,13 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
63
82
|
total: number;
|
|
64
83
|
goal: number;
|
|
65
84
|
} | undefined;
|
|
85
|
+
tickerStylingSettings?: {
|
|
86
|
+
headlineColour: string;
|
|
87
|
+
totalColour: string;
|
|
88
|
+
goalColour: string;
|
|
89
|
+
filledProgressColour: string;
|
|
90
|
+
progressBarBackgroundColour: string;
|
|
91
|
+
} | undefined;
|
|
66
92
|
}, {
|
|
67
93
|
name: "US" | "AU";
|
|
68
94
|
copy: {
|
|
@@ -77,6 +103,13 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
77
103
|
total: number;
|
|
78
104
|
goal: number;
|
|
79
105
|
} | undefined;
|
|
106
|
+
tickerStylingSettings?: {
|
|
107
|
+
headlineColour: string;
|
|
108
|
+
totalColour: string;
|
|
109
|
+
goalColour: string;
|
|
110
|
+
filledProgressColour: string;
|
|
111
|
+
progressBarBackgroundColour: string;
|
|
112
|
+
} | undefined;
|
|
80
113
|
}>>;
|
|
81
114
|
cta: z.ZodOptional<z.ZodObject<{
|
|
82
115
|
text: z.ZodString;
|
|
@@ -391,6 +424,13 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
391
424
|
total: number;
|
|
392
425
|
goal: number;
|
|
393
426
|
} | undefined;
|
|
427
|
+
tickerStylingSettings?: {
|
|
428
|
+
headlineColour: string;
|
|
429
|
+
totalColour: string;
|
|
430
|
+
goalColour: string;
|
|
431
|
+
filledProgressColour: string;
|
|
432
|
+
progressBarBackgroundColour: string;
|
|
433
|
+
} | undefined;
|
|
394
434
|
} | undefined;
|
|
395
435
|
cta?: {
|
|
396
436
|
text: string;
|
|
@@ -491,6 +531,13 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
491
531
|
total: number;
|
|
492
532
|
goal: number;
|
|
493
533
|
} | undefined;
|
|
534
|
+
tickerStylingSettings?: {
|
|
535
|
+
headlineColour: string;
|
|
536
|
+
totalColour: string;
|
|
537
|
+
goalColour: string;
|
|
538
|
+
filledProgressColour: string;
|
|
539
|
+
progressBarBackgroundColour: string;
|
|
540
|
+
} | undefined;
|
|
494
541
|
} | undefined;
|
|
495
542
|
cta?: {
|
|
496
543
|
text: string;
|
|
@@ -607,6 +654,25 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
607
654
|
total: number;
|
|
608
655
|
goal: number;
|
|
609
656
|
}>>;
|
|
657
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
658
|
+
headlineColour: z.ZodString;
|
|
659
|
+
totalColour: z.ZodString;
|
|
660
|
+
goalColour: z.ZodString;
|
|
661
|
+
filledProgressColour: z.ZodString;
|
|
662
|
+
progressBarBackgroundColour: z.ZodString;
|
|
663
|
+
}, "strip", z.ZodTypeAny, {
|
|
664
|
+
headlineColour: string;
|
|
665
|
+
totalColour: string;
|
|
666
|
+
goalColour: string;
|
|
667
|
+
filledProgressColour: string;
|
|
668
|
+
progressBarBackgroundColour: string;
|
|
669
|
+
}, {
|
|
670
|
+
headlineColour: string;
|
|
671
|
+
totalColour: string;
|
|
672
|
+
goalColour: string;
|
|
673
|
+
filledProgressColour: string;
|
|
674
|
+
progressBarBackgroundColour: string;
|
|
675
|
+
}>>;
|
|
610
676
|
}, "strip", z.ZodTypeAny, {
|
|
611
677
|
name: "US" | "AU";
|
|
612
678
|
copy: {
|
|
@@ -621,6 +687,13 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
621
687
|
total: number;
|
|
622
688
|
goal: number;
|
|
623
689
|
} | undefined;
|
|
690
|
+
tickerStylingSettings?: {
|
|
691
|
+
headlineColour: string;
|
|
692
|
+
totalColour: string;
|
|
693
|
+
goalColour: string;
|
|
694
|
+
filledProgressColour: string;
|
|
695
|
+
progressBarBackgroundColour: string;
|
|
696
|
+
} | undefined;
|
|
624
697
|
}, {
|
|
625
698
|
name: "US" | "AU";
|
|
626
699
|
copy: {
|
|
@@ -635,6 +708,13 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
635
708
|
total: number;
|
|
636
709
|
goal: number;
|
|
637
710
|
} | undefined;
|
|
711
|
+
tickerStylingSettings?: {
|
|
712
|
+
headlineColour: string;
|
|
713
|
+
totalColour: string;
|
|
714
|
+
goalColour: string;
|
|
715
|
+
filledProgressColour: string;
|
|
716
|
+
progressBarBackgroundColour: string;
|
|
717
|
+
} | undefined;
|
|
638
718
|
}>>;
|
|
639
719
|
cta: z.ZodOptional<z.ZodObject<{
|
|
640
720
|
text: z.ZodString;
|
|
@@ -949,6 +1029,13 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
949
1029
|
total: number;
|
|
950
1030
|
goal: number;
|
|
951
1031
|
} | undefined;
|
|
1032
|
+
tickerStylingSettings?: {
|
|
1033
|
+
headlineColour: string;
|
|
1034
|
+
totalColour: string;
|
|
1035
|
+
goalColour: string;
|
|
1036
|
+
filledProgressColour: string;
|
|
1037
|
+
progressBarBackgroundColour: string;
|
|
1038
|
+
} | undefined;
|
|
952
1039
|
} | undefined;
|
|
953
1040
|
cta?: {
|
|
954
1041
|
text: string;
|
|
@@ -1049,6 +1136,13 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1049
1136
|
total: number;
|
|
1050
1137
|
goal: number;
|
|
1051
1138
|
} | undefined;
|
|
1139
|
+
tickerStylingSettings?: {
|
|
1140
|
+
headlineColour: string;
|
|
1141
|
+
totalColour: string;
|
|
1142
|
+
goalColour: string;
|
|
1143
|
+
filledProgressColour: string;
|
|
1144
|
+
progressBarBackgroundColour: string;
|
|
1145
|
+
} | undefined;
|
|
1052
1146
|
} | undefined;
|
|
1053
1147
|
cta?: {
|
|
1054
1148
|
text: string;
|
|
@@ -1202,6 +1296,13 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1202
1296
|
total: number;
|
|
1203
1297
|
goal: number;
|
|
1204
1298
|
} | undefined;
|
|
1299
|
+
tickerStylingSettings?: {
|
|
1300
|
+
headlineColour: string;
|
|
1301
|
+
totalColour: string;
|
|
1302
|
+
goalColour: string;
|
|
1303
|
+
filledProgressColour: string;
|
|
1304
|
+
progressBarBackgroundColour: string;
|
|
1305
|
+
} | undefined;
|
|
1205
1306
|
} | undefined;
|
|
1206
1307
|
cta?: {
|
|
1207
1308
|
text: string;
|
|
@@ -1327,6 +1428,13 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1327
1428
|
total: number;
|
|
1328
1429
|
goal: number;
|
|
1329
1430
|
} | undefined;
|
|
1431
|
+
tickerStylingSettings?: {
|
|
1432
|
+
headlineColour: string;
|
|
1433
|
+
totalColour: string;
|
|
1434
|
+
goalColour: string;
|
|
1435
|
+
filledProgressColour: string;
|
|
1436
|
+
progressBarBackgroundColour: string;
|
|
1437
|
+
} | undefined;
|
|
1330
1438
|
} | undefined;
|
|
1331
1439
|
cta?: {
|
|
1332
1440
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAMH,KAAK,EAEL,QAAQ,EAGR,aAAa,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC"}
|
|
@@ -134,6 +134,32 @@ export declare const tickerDataSchema: z.ZodObject<{
|
|
|
134
134
|
goal: number;
|
|
135
135
|
}>;
|
|
136
136
|
export type TickerName = 'US' | 'AU';
|
|
137
|
+
export interface TickerStylingSettings {
|
|
138
|
+
headlineColour: string;
|
|
139
|
+
totalColour: string;
|
|
140
|
+
goalColour: string;
|
|
141
|
+
filledProgressColour: string;
|
|
142
|
+
progressBarBackgroundColour: string;
|
|
143
|
+
}
|
|
144
|
+
export declare const tickerStylingSettingsSchema: z.ZodObject<{
|
|
145
|
+
headlineColour: z.ZodString;
|
|
146
|
+
totalColour: z.ZodString;
|
|
147
|
+
goalColour: z.ZodString;
|
|
148
|
+
filledProgressColour: z.ZodString;
|
|
149
|
+
progressBarBackgroundColour: z.ZodString;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
headlineColour: string;
|
|
152
|
+
totalColour: string;
|
|
153
|
+
goalColour: string;
|
|
154
|
+
filledProgressColour: string;
|
|
155
|
+
progressBarBackgroundColour: string;
|
|
156
|
+
}, {
|
|
157
|
+
headlineColour: string;
|
|
158
|
+
totalColour: string;
|
|
159
|
+
goalColour: string;
|
|
160
|
+
filledProgressColour: string;
|
|
161
|
+
progressBarBackgroundColour: string;
|
|
162
|
+
}>;
|
|
137
163
|
export interface TickerSettings {
|
|
138
164
|
endType: TickerEndType;
|
|
139
165
|
countType: TickerCountType;
|
|
@@ -141,6 +167,7 @@ export interface TickerSettings {
|
|
|
141
167
|
copy: TickerCopy;
|
|
142
168
|
name: TickerName;
|
|
143
169
|
tickerData?: TickerData;
|
|
170
|
+
tickerStylingSettings?: TickerStylingSettings;
|
|
144
171
|
}
|
|
145
172
|
export declare const tickerSettingsSchema: z.ZodObject<{
|
|
146
173
|
endType: z.ZodNativeEnum<typeof TickerEndType>;
|
|
@@ -170,6 +197,25 @@ export declare const tickerSettingsSchema: z.ZodObject<{
|
|
|
170
197
|
total: number;
|
|
171
198
|
goal: number;
|
|
172
199
|
}>>;
|
|
200
|
+
tickerStylingSettings: z.ZodOptional<z.ZodObject<{
|
|
201
|
+
headlineColour: z.ZodString;
|
|
202
|
+
totalColour: z.ZodString;
|
|
203
|
+
goalColour: z.ZodString;
|
|
204
|
+
filledProgressColour: z.ZodString;
|
|
205
|
+
progressBarBackgroundColour: z.ZodString;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
headlineColour: string;
|
|
208
|
+
totalColour: string;
|
|
209
|
+
goalColour: string;
|
|
210
|
+
filledProgressColour: string;
|
|
211
|
+
progressBarBackgroundColour: string;
|
|
212
|
+
}, {
|
|
213
|
+
headlineColour: string;
|
|
214
|
+
totalColour: string;
|
|
215
|
+
goalColour: string;
|
|
216
|
+
filledProgressColour: string;
|
|
217
|
+
progressBarBackgroundColour: string;
|
|
218
|
+
}>>;
|
|
173
219
|
}, "strip", z.ZodTypeAny, {
|
|
174
220
|
name: "US" | "AU";
|
|
175
221
|
copy: {
|
|
@@ -184,6 +230,13 @@ export declare const tickerSettingsSchema: z.ZodObject<{
|
|
|
184
230
|
total: number;
|
|
185
231
|
goal: number;
|
|
186
232
|
} | undefined;
|
|
233
|
+
tickerStylingSettings?: {
|
|
234
|
+
headlineColour: string;
|
|
235
|
+
totalColour: string;
|
|
236
|
+
goalColour: string;
|
|
237
|
+
filledProgressColour: string;
|
|
238
|
+
progressBarBackgroundColour: string;
|
|
239
|
+
} | undefined;
|
|
187
240
|
}, {
|
|
188
241
|
name: "US" | "AU";
|
|
189
242
|
copy: {
|
|
@@ -198,6 +251,13 @@ export declare const tickerSettingsSchema: z.ZodObject<{
|
|
|
198
251
|
total: number;
|
|
199
252
|
goal: number;
|
|
200
253
|
} | undefined;
|
|
254
|
+
tickerStylingSettings?: {
|
|
255
|
+
headlineColour: string;
|
|
256
|
+
totalColour: string;
|
|
257
|
+
goalColour: string;
|
|
258
|
+
filledProgressColour: string;
|
|
259
|
+
progressBarBackgroundColour: string;
|
|
260
|
+
} | undefined;
|
|
201
261
|
}>;
|
|
202
262
|
export declare const articleCountsSchema: z.ZodObject<{
|
|
203
263
|
for52Weeks: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C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