@schibsted/advertory 2.71.1 → 2.71.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/aftenposten/es/index.css +1 -1
- package/core/aftenposten/es/index.d.ts +4 -0
- package/core/aftenposten/es/index.js +1 -1
- package/core/aftenposten/index.d.ts +4 -0
- package/core/aftenposten/index.js +1 -1
- package/core/aftenpostenv2/es/index.css +1 -1
- package/core/aftenpostenv2/es/index.d.ts +4 -0
- package/core/aftenpostenv2/es/index.js +1 -1
- package/core/aftonbladet/es/index.css +1 -1
- package/core/aftonbladet/es/index.d.ts +4 -0
- package/core/aftonbladet/index.d.ts +4 -0
- package/core/aftonbladetv2/es/index.css +1 -1
- package/core/aftonbladetv2/es/index.d.ts +4 -0
- package/core/aftonbladetv2/es/index.js +1 -1
- package/core/bt/es/index.css +1 -1
- package/core/bt/es/index.d.ts +4 -0
- package/core/bt/es/index.js +1 -1
- package/core/bt/index.d.ts +4 -0
- package/core/bt/index.js +1 -1
- package/core/btv2/es/index.css +1 -0
- package/core/btv2/es/index.d.ts +758 -0
- package/core/btv2/es/index.js +1 -0
- package/core/btv2/es/package.json +9 -0
- package/core/e24/es/index.css +1 -1
- package/core/e24/es/index.d.ts +4 -0
- package/core/e24/es/index.js +1 -1
- package/core/e24/index.d.ts +4 -0
- package/core/e24/index.js +1 -1
- package/core/fotbollskanalen/es/index.d.ts +4 -0
- package/core/fotbollskanalen/index.d.ts +4 -0
- package/core/godare/index.d.ts +4 -0
- package/core/godt/index.d.ts +4 -0
- package/core/klart/index.d.ts +4 -0
- package/core/koket/es/index.d.ts +4 -0
- package/core/koket/index.d.ts +4 -0
- package/core/kompakt/index.d.ts +4 -0
- package/core/minmote/index.d.ts +4 -0
- package/core/pent/index.d.ts +4 -0
- package/core/sa/es/index.css +1 -1
- package/core/sa/es/index.d.ts +4 -0
- package/core/sa/es/index.js +1 -1
- package/core/sa/index.d.ts +4 -0
- package/core/sa/index.js +1 -1
- package/core/sav2/es/index.css +1 -1
- package/core/sav2/es/index.d.ts +4 -0
- package/core/sav2/es/index.js +1 -1
- package/core/svd/es/index.css +1 -1
- package/core/svd/es/index.d.ts +4 -0
- package/core/svd/index.d.ts +4 -0
- package/core/svdv2/es/index.css +1 -1
- package/core/svdv2/es/index.d.ts +4 -0
- package/core/tek/index.d.ts +4 -0
- package/core/tek/index.js +1 -1
- package/core/tv4/es/index.css +1 -1
- package/core/tv4/es/index.d.ts +4 -0
- package/core/tv4/index.d.ts +4 -0
- package/core/tvnu/index.d.ts +4 -0
- package/core/vg/es/index.css +1 -1
- package/core/vg/es/index.d.ts +4 -0
- package/core/vg/es/index.js +1 -1
- package/core/vg/index.d.ts +4 -0
- package/core/vg/index.js +1 -1
- package/core/vgv2/es/index.css +1 -1
- package/core/vgv2/es/index.d.ts +4 -0
- package/core/vgv2/es/index.js +1 -1
- package/features/ad-native/index.d.ts +2 -0
- package/features/brandmetrics/es/index.js +1 -0
- package/features/brandmetrics/es/package.json +9 -0
- package/features/dr-edition/es/index.d.ts +2 -0
- package/features/dr-edition/index.d.ts +2 -0
- package/features/kilkaya/es/index.d.ts +2 -0
- package/features/kilkaya/index.d.ts +2 -0
- package/features/tracker/index.d.ts +2 -0
- package/package.json +1 -1
- package/sites/aftenposten/es/index.css +1 -1
- package/sites/aftenpostenv2/es/index.css +1 -1
- package/sites/aftonbladet/es/index.css +1 -1
- package/sites/aftonbladetv2/es/index.css +1 -1
- package/sites/bt/es/index.css +1 -1
- package/sites/btv2/es/index.css +1 -0
- package/sites/btv2/es/index.d.ts +25 -0
- package/sites/btv2/es/index.js +1 -0
- package/sites/btv2/es/package.json +9 -0
- package/sites/e24/es/index.css +1 -1
- package/sites/fotbollskanalen/es/index.css +1 -1
- package/sites/koket/es/index.css +1 -1
- package/sites/sa/es/index.css +1 -1
- package/sites/sav2/es/index.css +1 -1
- package/sites/svd/es/index.css +1 -1
- package/sites/svdv2/es/index.css +1 -1
- package/sites/tv4/es/index.css +1 -1
- package/sites/vg/es/index.css +1 -1
- package/sites/vgv2/es/index.css +1 -1
- package/styles/btv2/index.js +3 -0
- package/styles/btv2/styles.css +1 -0
- package/types/config/btv2.d.ts +3 -0
- package/types/core/config.d.ts +1 -1
- package/types/core/events/events.d.ts +1 -1
- package/types/core/interface/config.d.ts +2 -0
- package/types/core/prepare-tag/prepare-tag.d.ts +1 -1
- package/types/features/ad-native/sites/btv2/bt-init.d.ts +5 -0
- package/types/features/ad-native/sites/btv2/index.d.ts +6 -0
- package/types/features/ad-native/sites/btv2/templates/content/index.d.ts +4 -0
- package/types/features/ad-native/sites/btv2/templates/index.d.ts +3 -0
- package/types/features/interface/finn-blink.d.ts +3 -0
- package/types/sites/aftonbladetv2/prepare-page-options.d.ts +1 -1
- package/types/sites/btv2/config.d.ts +3 -0
- package/types/sites/btv2/events.d.ts +14 -0
- package/types/sites/btv2/formats/Netboard/index.d.ts +3 -0
- package/types/sites/btv2/formats/Topboard/helpers.d.ts +2 -0
- package/types/sites/btv2/formats/Topboard/index.d.ts +3 -0
- package/types/sites/btv2/formats/index.d.ts +2 -0
- package/types/sites/btv2/index.d.ts +4 -0
- package/types/sites/btv2/prepare-page-options.d.ts +3 -0
- package/types/sites/btv2/prepare-page-options.test.d.ts +1 -0
|
@@ -334,6 +334,7 @@ interface FinnBlinkConfig {
|
|
|
334
334
|
channel?: string;
|
|
335
335
|
userId?: string;
|
|
336
336
|
uuid?: string;
|
|
337
|
+
identifierUrl?: string;
|
|
337
338
|
theme?: Theme;
|
|
338
339
|
replacementConfig?: {
|
|
339
340
|
adsToReplace?: Array<Array<string>>;
|
|
@@ -356,6 +357,7 @@ interface FinnBlinkPlacementConfig {
|
|
|
356
357
|
theme?: Theme;
|
|
357
358
|
advertoryTheme?: string;
|
|
358
359
|
loadOnlyFinnBlink?: boolean;
|
|
360
|
+
useNewConstructor?: boolean;
|
|
359
361
|
}
|
|
360
362
|
interface PrebidConfig {
|
|
361
363
|
enabled: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";function t(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r,o;"function"==typeof SuppressedError&&SuppressedError;var i=n(function(){if(o)return r;o=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?d((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function c(e,t,r){var o={};return r.isMergeableObject(e)&&s(e).forEach(function(t){o[t]=n(e[t],r)}),s(t).forEach(function(i){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(a(e,i)&&r.isMergeableObject(t[i])?o[i]=function(e,t){if(!t.customMerge)return d;var n=t.customMerge(e);return"function"==typeof n?n:d}(i,r)(e[i],t[i],r):o[i]=n(t[i],r))}),o}function d(t,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(r);return s===Array.isArray(t)?s?o.arrayMerge(t,r,o):c(t,r,o):n(r,o)}return d.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return d(e,n,t)},{})},r=d}());const s=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}};class c{set(e){this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of s){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=i(c.DEFAULT_SITE_HANDLERS,e)}}c.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const d=new c;d.modifyConfigProperties.bind(d);const l=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},u=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return l("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const o=e=>{r||(l("Resolving advertising permission value obtained"),r=!0,t(e))},i=setTimeout(()=>{l("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{l("On Tcf Ready called, waiting for permission"),clearTimeout(i)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(i);const t=Number(e);l("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),f="no",v="se",b="cmp:loaded";let m="undefined"!=typeof window?window._tcf_:void 0,y=!1;const g=(e,n,r)=>{const o=!!(null==e?void 0:e.enabled),i=(null==e?void 0:e.timeout)||3e3,s=(a="bypass_tcf",new URLSearchParams(window.location.search).get(a));var a;const c=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(l("TCF bypass param detected, returning consent: true"),!0):(l("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(y)return null;if(!m)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=m.getConsentedToAllSync();return l(`TCF consented to all is: ${t}`),m.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(l("Getting TCF consent manager..."),window._tcf_)return l("TCF consent manager is already available"),m=window._tcf_,void e(m);l("TCF consent manager is not available");const n=()=>{l("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(m=window._tcf_,e(m)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(b,n),y=!0,t(new Error("Timeout waiting for CMP to load"))},i);l("Listening for CMP loaded event..."),document.addEventListener(b,n,{once:!0})}):Promise.resolve(null),getConsentSync:c,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return l(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.schibstedAdChoicesEnabled)&&r===v,n=(null==e?void 0:e.schibstedAdChoicesEnabled)&&r===f;if(t||n)return l("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield u(e);if(!(null==e?void 0:e.enabled))return!0;const o=c();return null!==o?o:yield new Promise((e,t)=>{try{if(!m)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{l("TCF isConsentedToAll timed out, resolving with false"),n(!1)},i);m.onTcfReady(()=>{l("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),m.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};!function(e){if("undefined"==typeof window)return;const t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}(".advertory-brandmetrics-survey{width:100%}");const w=()=>e("div",{id:"brandmetrics-survey",className:"advertory-brandmetrics-survey"}),p="advertory-brandmetrics-survey",h=()=>t(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:n}={},tcf:r,isMobileApp:o,country:i}=d.get(),{getConsentAsync:s}=g(r,0,i),a=yield s();if(!e||!n||!a)return;yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const o=document.createElement("script");o.async=!0,o.src=e;const i=()=>{a(),n()},s=()=>{a(),r(new Error(`Failed to load ${e}`))},a=()=>{o.removeEventListener("load",i),o.removeEventListener("error",s),clearTimeout(c)};o.addEventListener("load",i),o.addEventListener("error",s);const c=setTimeout(()=>{a(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(n);if(document.querySelector(`.${p}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(p)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})});export{w as BrandMetricsSurvey,h as loadBrandmetricsScript};
|
|
@@ -261,6 +261,7 @@ interface FinnBlinkConfig {
|
|
|
261
261
|
channel?: string;
|
|
262
262
|
userId?: string;
|
|
263
263
|
uuid?: string;
|
|
264
|
+
identifierUrl?: string;
|
|
264
265
|
theme?: Theme;
|
|
265
266
|
replacementConfig?: {
|
|
266
267
|
adsToReplace?: Array<Array<string>>;
|
|
@@ -283,6 +284,7 @@ interface FinnBlinkPlacementConfig {
|
|
|
283
284
|
theme?: Theme;
|
|
284
285
|
advertoryTheme?: string;
|
|
285
286
|
loadOnlyFinnBlink?: boolean;
|
|
287
|
+
useNewConstructor?: boolean;
|
|
286
288
|
}
|
|
287
289
|
interface PrebidConfig {
|
|
288
290
|
enabled: boolean;
|
|
@@ -261,6 +261,7 @@ interface FinnBlinkConfig {
|
|
|
261
261
|
channel?: string;
|
|
262
262
|
userId?: string;
|
|
263
263
|
uuid?: string;
|
|
264
|
+
identifierUrl?: string;
|
|
264
265
|
theme?: Theme;
|
|
265
266
|
replacementConfig?: {
|
|
266
267
|
adsToReplace?: Array<Array<string>>;
|
|
@@ -283,6 +284,7 @@ interface FinnBlinkPlacementConfig {
|
|
|
283
284
|
theme?: Theme;
|
|
284
285
|
advertoryTheme?: string;
|
|
285
286
|
loadOnlyFinnBlink?: boolean;
|
|
287
|
+
useNewConstructor?: boolean;
|
|
286
288
|
}
|
|
287
289
|
interface PrebidConfig {
|
|
288
290
|
enabled: boolean;
|
|
@@ -257,6 +257,7 @@ interface FinnBlinkConfig {
|
|
|
257
257
|
channel?: string;
|
|
258
258
|
userId?: string;
|
|
259
259
|
uuid?: string;
|
|
260
|
+
identifierUrl?: string;
|
|
260
261
|
theme?: Theme;
|
|
261
262
|
replacementConfig?: {
|
|
262
263
|
adsToReplace?: Array<Array<string>>;
|
|
@@ -279,6 +280,7 @@ interface FinnBlinkPlacementConfig {
|
|
|
279
280
|
theme?: Theme;
|
|
280
281
|
advertoryTheme?: string;
|
|
281
282
|
loadOnlyFinnBlink?: boolean;
|
|
283
|
+
useNewConstructor?: boolean;
|
|
282
284
|
}
|
|
283
285
|
interface PrebidConfig {
|
|
284
286
|
enabled: boolean;
|
|
@@ -257,6 +257,7 @@ interface FinnBlinkConfig {
|
|
|
257
257
|
channel?: string;
|
|
258
258
|
userId?: string;
|
|
259
259
|
uuid?: string;
|
|
260
|
+
identifierUrl?: string;
|
|
260
261
|
theme?: Theme;
|
|
261
262
|
replacementConfig?: {
|
|
262
263
|
adsToReplace?: Array<Array<string>>;
|
|
@@ -279,6 +280,7 @@ interface FinnBlinkPlacementConfig {
|
|
|
279
280
|
theme?: Theme;
|
|
280
281
|
advertoryTheme?: string;
|
|
281
282
|
loadOnlyFinnBlink?: boolean;
|
|
283
|
+
useNewConstructor?: boolean;
|
|
282
284
|
}
|
|
283
285
|
interface PrebidConfig {
|
|
284
286
|
enabled: boolean;
|
|
@@ -281,6 +281,7 @@ interface FinnBlinkConfig {
|
|
|
281
281
|
channel?: string;
|
|
282
282
|
userId?: string;
|
|
283
283
|
uuid?: string;
|
|
284
|
+
identifierUrl?: string;
|
|
284
285
|
theme?: Theme;
|
|
285
286
|
replacementConfig?: {
|
|
286
287
|
adsToReplace?: Array<Array<string>>;
|
|
@@ -303,6 +304,7 @@ interface FinnBlinkPlacementConfig {
|
|
|
303
304
|
theme?: Theme;
|
|
304
305
|
advertoryTheme?: string;
|
|
305
306
|
loadOnlyFinnBlink?: boolean;
|
|
307
|
+
useNewConstructor?: boolean;
|
|
306
308
|
}
|
|
307
309
|
interface PrebidConfig {
|
|
308
310
|
enabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schibsted/advertory",
|
|
3
|
-
"version": "2.71.
|
|
3
|
+
"version": "2.71.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "node node_modules/rollup/dist/bin/rollup -c rollup-config/default.mjs && npm run post:build",
|
|
6
6
|
"build:dev": "MODE=dev NODE_OPTIONS=--max-old-space-size=131072 npm run build",
|