digitalmarketplace-frontend
Version:
Digital Marketplace Frontend contains assets and components used in Digital Marketplace projects
1 lines • 1.42 kB
Source Map (JSON)
{"version":3,"file":"data-layer.bundle.mjs","sources":["../../../../src/digitalmarketplace/scripts/analytics/data-layer.types.ts","../../../../src/digitalmarketplace/scripts/analytics/data-layer.ts"],"sourcesContent":["\nenum GrantType {\n GRANTED = 'granted',\n NOT_GRANTED = 'not granted'\n}\n\nexport { GrantType }","import { CookiePreferences } from '../cookies/manage.types'\nimport { GrantType } from './data-layer.types'\n\nconst getGrantedText = (state: boolean) => state ? GrantType.GRANTED : GrantType.NOT_GRANTED\n\nconst updateDataLayer = (cookiePreferences: CookiePreferences) => {\n window.dataLayer.push({\n event: 'gtm_consent_update',\n usage_consent: getGrantedText(cookiePreferences.usage),\n glassbox_consent: getGrantedText(cookiePreferences.glassbox),\n marketing_consent: GrantType.NOT_GRANTED\n })\n}\n\nexport { updateDataLayer }"],"names":[],"mappings":"AACA,IAAK,SAGJ;AAHD,CAAA,UAAK,SAAS,EAAA;AACZ,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAHI,SAAS,KAAT,SAAS,GAGb,EAAA,CAAA,CAAA;;ACDD,MAAM,cAAc,GAAG,CAAC,KAAc,KAAK,KAAK,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,WAAW;AAE5F,MAAM,eAAe,GAAG,CAAC,iBAAoC,KAAI;AAC/D,IAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;AACpB,QAAA,KAAK,EAAE,oBAAoB;AAC3B,QAAA,aAAa,EAAE,cAAc,CAAC,iBAAiB,CAAC,KAAK,CAAC;AACtD,QAAA,gBAAgB,EAAE,cAAc,CAAC,iBAAiB,CAAC,QAAQ,CAAC;QAC5D,iBAAiB,EAAE,SAAS,CAAC;AAC9B,KAAA,CAAC;AACJ;;;;"}