@folklore/ads 0.0.29 → 0.0.31
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 +16 -10
- package/dist/es.js +16 -10
- package/package.json +3 -3
package/dist/cjs.js
CHANGED
|
@@ -1001,18 +1001,24 @@ function Ad(_ref) {
|
|
|
1001
1001
|
const minimumSize = React.useMemo(() => getMinimumAdSize(finalSizeMapping !== null ? finalSizeMapping.reduce((allSizes, sizeMap) => [...allSizes, sizeMap[1]], [finalSize]) : finalSize), [finalSizeMapping, finalSize]);
|
|
1002
1002
|
|
|
1003
1003
|
// Targeting
|
|
1004
|
+
const contextTargeting = useAdsTargeting();
|
|
1004
1005
|
const {
|
|
1005
|
-
disabled: targetingDisabled = false
|
|
1006
|
-
|
|
1007
|
-
} = useAdsTargeting();
|
|
1006
|
+
disabled: targetingDisabled = false
|
|
1007
|
+
} = contextTargeting || {};
|
|
1008
1008
|
const finalDisabled = disabled || targetingDisabled;
|
|
1009
|
-
const allTargeting = React.useMemo(() =>
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1009
|
+
const allTargeting = React.useMemo(() => {
|
|
1010
|
+
const {
|
|
1011
|
+
disabled: removedDisabled,
|
|
1012
|
+
...otherTargeting
|
|
1013
|
+
} = contextTargeting || {};
|
|
1014
|
+
return {
|
|
1015
|
+
...(slotName !== null ? {
|
|
1016
|
+
slot: slotName
|
|
1017
|
+
} : null),
|
|
1018
|
+
...otherTargeting,
|
|
1019
|
+
...targeting
|
|
1020
|
+
};
|
|
1021
|
+
}, [contextTargeting, targeting, slotName]);
|
|
1016
1022
|
const finalAdTargeting = React.useMemo(() => {
|
|
1017
1023
|
const {
|
|
1018
1024
|
refreshAds = null,
|
package/dist/es.js
CHANGED
|
@@ -983,18 +983,24 @@ function Ad(_ref) {
|
|
|
983
983
|
const minimumSize = useMemo(() => getMinimumAdSize(finalSizeMapping !== null ? finalSizeMapping.reduce((allSizes, sizeMap) => [...allSizes, sizeMap[1]], [finalSize]) : finalSize), [finalSizeMapping, finalSize]);
|
|
984
984
|
|
|
985
985
|
// Targeting
|
|
986
|
+
const contextTargeting = useAdsTargeting();
|
|
986
987
|
const {
|
|
987
|
-
disabled: targetingDisabled = false
|
|
988
|
-
|
|
989
|
-
} = useAdsTargeting();
|
|
988
|
+
disabled: targetingDisabled = false
|
|
989
|
+
} = contextTargeting || {};
|
|
990
990
|
const finalDisabled = disabled || targetingDisabled;
|
|
991
|
-
const allTargeting = useMemo(() =>
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
991
|
+
const allTargeting = useMemo(() => {
|
|
992
|
+
const {
|
|
993
|
+
disabled: removedDisabled,
|
|
994
|
+
...otherTargeting
|
|
995
|
+
} = contextTargeting || {};
|
|
996
|
+
return {
|
|
997
|
+
...(slotName !== null ? {
|
|
998
|
+
slot: slotName
|
|
999
|
+
} : null),
|
|
1000
|
+
...otherTargeting,
|
|
1001
|
+
...targeting
|
|
1002
|
+
};
|
|
1003
|
+
}, [contextTargeting, targeting, slotName]);
|
|
998
1004
|
const finalAdTargeting = useMemo(() => {
|
|
999
1005
|
const {
|
|
1000
1006
|
refreshAds = null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@folklore/ads",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"description": "Ads library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "49b1651db11afc262e3ea3326d9f0f3bc2f0a5c5",
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@folklore/hooks": "^0.0.43",
|
|
56
|
-
"@folklore/tracking": "^0.0.
|
|
56
|
+
"@folklore/tracking": "^0.0.22",
|
|
57
57
|
"classnames": "^2.5.1",
|
|
58
58
|
"debug": "^4.3.4",
|
|
59
59
|
"lodash": "^4.17.21",
|