@folklore/ads 0.0.103 → 0.0.105

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/cjs.js CHANGED
@@ -1203,7 +1203,8 @@ function Ad(_ref) {
1203
1203
  const {
1204
1204
  slots = null,
1205
1205
  slotsPath = null,
1206
- viewport: contextViewport = null
1206
+ viewport: contextViewport = null,
1207
+ ads
1207
1208
  } = useAdsContext();
1208
1209
  const {
1209
1210
  default: defaultSlotPath = null
@@ -1244,11 +1245,11 @@ function Ad(_ref) {
1244
1245
  } = allTargeting || {};
1245
1246
  return {
1246
1247
  refreshInterval: refreshAds !== null && refreshAds === 'inactive' ? null : providedRefreshInterval,
1247
- disabled: providedDisabled || targetingDisabled,
1248
+ disabled: providedDisabled || targetingDisabled || ads.isDisabled(),
1248
1249
  viewport: providedViewport || contextViewport || targetingViewport,
1249
1250
  targeting: otherProps || {}
1250
1251
  };
1251
- }, [contextTargeting, providedTargeting, slotName, providedRefreshInterval]);
1252
+ }, [slotName, contextTargeting, providedTargeting, ads, providedRefreshInterval, providedDisabled, providedViewport, contextViewport]);
1252
1253
  const lastRenderedSize = React.useRef(null);
1253
1254
  const wasDisabled = React.useRef(disabled);
1254
1255
  React.useEffect(() => {}, []);
@@ -1287,7 +1288,6 @@ function Ad(_ref) {
1287
1288
 
1288
1289
  // Create ad
1289
1290
  const {
1290
- disabled: adsDisabled,
1291
1291
  id,
1292
1292
  width,
1293
1293
  height,
@@ -1339,7 +1339,7 @@ function Ad(_ref) {
1339
1339
  adStyle = minimumSize;
1340
1340
  }
1341
1341
  let containerStyle = null;
1342
- if (adsDisabled) {
1342
+ if (disabled) {
1343
1343
  containerStyle = {
1344
1344
  display: 'none',
1345
1345
  visibility: 'hidden'
package/dist/es.js CHANGED
@@ -1201,7 +1201,8 @@ function Ad(_ref) {
1201
1201
  const {
1202
1202
  slots = null,
1203
1203
  slotsPath = null,
1204
- viewport: contextViewport = null
1204
+ viewport: contextViewport = null,
1205
+ ads
1205
1206
  } = useAdsContext();
1206
1207
  const {
1207
1208
  default: defaultSlotPath = null
@@ -1242,11 +1243,11 @@ function Ad(_ref) {
1242
1243
  } = allTargeting || {};
1243
1244
  return {
1244
1245
  refreshInterval: refreshAds !== null && refreshAds === 'inactive' ? null : providedRefreshInterval,
1245
- disabled: providedDisabled || targetingDisabled,
1246
+ disabled: providedDisabled || targetingDisabled || ads.isDisabled(),
1246
1247
  viewport: providedViewport || contextViewport || targetingViewport,
1247
1248
  targeting: otherProps || {}
1248
1249
  };
1249
- }, [contextTargeting, providedTargeting, slotName, providedRefreshInterval]);
1250
+ }, [slotName, contextTargeting, providedTargeting, ads, providedRefreshInterval, providedDisabled, providedViewport, contextViewport]);
1250
1251
  const lastRenderedSize = useRef(null);
1251
1252
  const wasDisabled = useRef(disabled);
1252
1253
  useEffect(() => {}, []);
@@ -1285,7 +1286,6 @@ function Ad(_ref) {
1285
1286
 
1286
1287
  // Create ad
1287
1288
  const {
1288
- disabled: adsDisabled,
1289
1289
  id,
1290
1290
  width,
1291
1291
  height,
@@ -1337,7 +1337,7 @@ function Ad(_ref) {
1337
1337
  adStyle = minimumSize;
1338
1338
  }
1339
1339
  let containerStyle = null;
1340
- if (adsDisabled) {
1340
+ if (disabled) {
1341
1341
  containerStyle = {
1342
1342
  display: 'none',
1343
1343
  visibility: 'hidden'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "description": "Ads library",
5
5
  "keywords": [
6
6
  "javascript",
@@ -50,7 +50,7 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "8c2880c461da5257a2b5589cf0bdbca632ebe78b",
53
+ "gitHead": "624fb41dbcc9743c83c706e474d9c5bb1dd43322",
54
54
  "dependencies": {
55
55
  "@folklore/hooks": "^0.0.72",
56
56
  "@folklore/tracking": "^0.0.29",