@mjhls/mjh-framework 1.0.450 → 1.0.451
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/README.md +1 -1
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/{getTargeting-37612527.js → getTargeting-ec7dd217.js} +22 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/View.js +1 -1
- package/dist/esm/{getTargeting-8f4bd5db.js → getTargeting-02118961.js} +22 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/View.js
CHANGED
|
@@ -57,7 +57,7 @@ var getSerializers = require('./getSerializers.js');
|
|
|
57
57
|
require('./util-f2c1b65b.js');
|
|
58
58
|
require('react-bootstrap/Pagination');
|
|
59
59
|
require('next/dynamic');
|
|
60
|
-
var getTargeting = require('./getTargeting-
|
|
60
|
+
var getTargeting = require('./getTargeting-ec7dd217.js');
|
|
61
61
|
var urlFor = require('./urlFor.js');
|
|
62
62
|
|
|
63
63
|
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
@@ -52,6 +52,8 @@ var getTargeting = function getTargeting(props) {
|
|
|
52
52
|
context = context && context.split('?')[0];
|
|
53
53
|
context = context && context.split('&')[0];
|
|
54
54
|
var content_placement_urls = [];
|
|
55
|
+
// New variable to store document group
|
|
56
|
+
var document_group_urls = [];
|
|
55
57
|
if (content_placement && prevUrl && prevUrl.length) {
|
|
56
58
|
content_placement.forEach(function (item) {
|
|
57
59
|
var path = item.path;
|
|
@@ -70,21 +72,32 @@ var getTargeting = function getTargeting(props) {
|
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
// Comparing document group with previous url to store in 'document_group_urls'.
|
|
76
|
+
if (document_group && prevUrl && prevUrl.length) {
|
|
77
|
+
var previous_url_to_check = prevUrl;
|
|
78
|
+
if (prevUrl.includes('?')) {
|
|
79
|
+
previous_url_to_check = prevUrl.split('?')[0];
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
|
|
82
|
+
if (previous_url_to_check.endsWith(document_group)) {
|
|
83
|
+
document_group_urls.push(document_group);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Updating condition to set content_placement only when 'document_group_urls' and 'content_placement_urls' is empty.
|
|
88
|
+
if (content_placement && content_placement_urls.length === 0 && document_group_urls.length === 0) {
|
|
89
|
+
content_placement_urls = content_placement.map(function (item) {
|
|
90
|
+
return cpModificationRequired ? getContentPlacementUrl(item) : item.path;
|
|
91
|
+
});
|
|
81
92
|
}
|
|
93
|
+
|
|
82
94
|
var articleKeywords = [].concat(toConsumableArray._toConsumableArray(internalTag), toConsumableArray._toConsumableArray(userDefinedTag), toConsumableArray._toConsumableArray(SponsorshipTag), toConsumableArray._toConsumableArray(seoTag));
|
|
83
95
|
var targeting = {
|
|
84
96
|
tags: articleKeywords,
|
|
85
|
-
document_group
|
|
97
|
+
// making sure either 'document_group' or 'content_placement' is returned in targeting.
|
|
98
|
+
document_group: content_placement_urls && content_placement_urls.length ? '' : document_group_urls,
|
|
86
99
|
document_url: [url],
|
|
87
|
-
content_placement: content_placement_urls
|
|
100
|
+
content_placement: document_group_urls && document_group_urls.length ? '' : content_placement_urls
|
|
88
101
|
};
|
|
89
102
|
|
|
90
103
|
if (article.issue && article.issue.path) {
|
package/dist/cjs/getTargeting.js
CHANGED
|
@@ -8,7 +8,7 @@ require('./from-ea347372.js');
|
|
|
8
8
|
require('./toConsumableArray-ca04303b.js');
|
|
9
9
|
require('./_object-pie-68c5bcbc.js');
|
|
10
10
|
require('./extends-60837c34.js');
|
|
11
|
-
var getTargeting = require('./getTargeting-
|
|
11
|
+
var getTargeting = require('./getTargeting-ec7dd217.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -157,7 +157,7 @@ require('swr');
|
|
|
157
157
|
require('passport-local');
|
|
158
158
|
require('mysql');
|
|
159
159
|
var View = require('./View.js');
|
|
160
|
-
var getTargeting = require('./getTargeting-
|
|
160
|
+
var getTargeting = require('./getTargeting-ec7dd217.js');
|
|
161
161
|
var urlFor = require('./urlFor.js');
|
|
162
162
|
var getKeywords = require('./getKeywords.js');
|
|
163
163
|
var getQuery = require('./getQuery.js');
|
package/dist/esm/View.js
CHANGED
|
@@ -52,7 +52,7 @@ import getSerializers from './getSerializers.js';
|
|
|
52
52
|
import './util-7700fc59.js';
|
|
53
53
|
import 'react-bootstrap/Pagination';
|
|
54
54
|
import 'next/dynamic';
|
|
55
|
-
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-
|
|
55
|
+
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-02118961.js';
|
|
56
56
|
import urlFor from './urlFor.js';
|
|
57
57
|
|
|
58
58
|
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
@@ -50,6 +50,8 @@ var getTargeting = function getTargeting(props) {
|
|
|
50
50
|
context = context && context.split('?')[0];
|
|
51
51
|
context = context && context.split('&')[0];
|
|
52
52
|
var content_placement_urls = [];
|
|
53
|
+
// New variable to store document group
|
|
54
|
+
var document_group_urls = [];
|
|
53
55
|
if (content_placement && prevUrl && prevUrl.length) {
|
|
54
56
|
content_placement.forEach(function (item) {
|
|
55
57
|
var path = item.path;
|
|
@@ -68,21 +70,32 @@ var getTargeting = function getTargeting(props) {
|
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
// Comparing document group with previous url to store in 'document_group_urls'.
|
|
74
|
+
if (document_group && prevUrl && prevUrl.length) {
|
|
75
|
+
var previous_url_to_check = prevUrl;
|
|
76
|
+
if (prevUrl.includes('?')) {
|
|
77
|
+
previous_url_to_check = prevUrl.split('?')[0];
|
|
76
78
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
|
|
80
|
+
if (previous_url_to_check.endsWith(document_group)) {
|
|
81
|
+
document_group_urls.push(document_group);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Updating condition to set content_placement only when 'document_group_urls' and 'content_placement_urls' is empty.
|
|
86
|
+
if (content_placement && content_placement_urls.length === 0 && document_group_urls.length === 0) {
|
|
87
|
+
content_placement_urls = content_placement.map(function (item) {
|
|
88
|
+
return cpModificationRequired ? getContentPlacementUrl(item) : item.path;
|
|
89
|
+
});
|
|
79
90
|
}
|
|
91
|
+
|
|
80
92
|
var articleKeywords = [].concat(_toConsumableArray(internalTag), _toConsumableArray(userDefinedTag), _toConsumableArray(SponsorshipTag), _toConsumableArray(seoTag));
|
|
81
93
|
var targeting = {
|
|
82
94
|
tags: articleKeywords,
|
|
83
|
-
document_group
|
|
95
|
+
// making sure either 'document_group' or 'content_placement' is returned in targeting.
|
|
96
|
+
document_group: content_placement_urls && content_placement_urls.length ? '' : document_group_urls,
|
|
84
97
|
document_url: [url],
|
|
85
|
-
content_placement: content_placement_urls
|
|
98
|
+
content_placement: document_group_urls && document_group_urls.length ? '' : content_placement_urls
|
|
86
99
|
};
|
|
87
100
|
|
|
88
101
|
if (article.issue && article.issue.path) {
|
package/dist/esm/getTargeting.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -153,7 +153,7 @@ import 'swr';
|
|
|
153
153
|
import 'passport-local';
|
|
154
154
|
import 'mysql';
|
|
155
155
|
export { default as View } from './View.js';
|
|
156
|
-
export { g as getTargeting } from './getTargeting-
|
|
156
|
+
export { g as getTargeting } from './getTargeting-02118961.js';
|
|
157
157
|
export { default as urlFor } from './urlFor.js';
|
|
158
158
|
export { default as getKeywords } from './getKeywords.js';
|
|
159
159
|
export { default as getQuery } from './getQuery.js';
|