@mjhls/mjh-framework 1.0.986-article-rec-test → 1.0.986-article-rec-v2
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/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +1 -1
- package/dist/cjs/{MediaSeriesCard-1b1bd850.js → MediaSeriesCard-a9755b4a.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +2 -2
- package/dist/cjs/MediaSeriesLandingPaginated.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +4 -4
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -1
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +120 -152
- package/dist/cjs/getPtceActivities.js +23 -10
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{getTargeting-3c5754ac.js → getTargeting-ba942d9a.js} +4 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-c5778fcd.js → index-5e63adb9.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/IssueLanding.js +1 -1
- package/dist/esm/{MediaSeriesCard-029542ab.js → MediaSeriesCard-f68f8e63.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +2 -2
- package/dist/esm/MediaSeriesLandingPaginated.js +2 -2
- package/dist/esm/PartnerDetailListing.js +4 -4
- package/dist/esm/PartnerDetailListingPaginated.js +1 -1
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +120 -152
- package/dist/esm/getPtceActivities.js +23 -10
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{getTargeting-42f9b439.js → getTargeting-9bd28724.js} +4 -2
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/{index-98646d5c.js → index-e0aeabc5.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/package.json +1 -1
|
@@ -7,7 +7,9 @@ import './_iter-detect-98db3b07.js';
|
|
|
7
7
|
|
|
8
8
|
var getPtceActivities = function () {
|
|
9
9
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(params) {
|
|
10
|
-
var
|
|
10
|
+
var filterByProfession = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
11
|
+
var filterQuery = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
12
|
+
var hasMore, filter, response, data;
|
|
11
13
|
return regenerator.wrap(function _callee$(_context) {
|
|
12
14
|
while (1) {
|
|
13
15
|
switch (_context.prev = _context.next) {
|
|
@@ -19,19 +21,26 @@ var getPtceActivities = function () {
|
|
|
19
21
|
if (params.paginatedPoint && params.paginatedPoint !== '') {
|
|
20
22
|
hasMore = '&cursor=' + params.paginatedPoint;
|
|
21
23
|
}
|
|
24
|
+
filter = '';
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
if (filterByProfession && filterQuery.length) {
|
|
27
|
+
filter = '&query=status:published%20AND%20customFields.profession:"' + filterQuery + '"';
|
|
28
|
+
} else {
|
|
29
|
+
filter = '&query=status:published';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
_context.next = 7;
|
|
33
|
+
return fetch('https://www.pharmacytimes.org/incoming/v2/content?types[]=courses&sort=publishDate:desc' + filter + '&limit=25' + hasMore, {
|
|
25
34
|
method: 'GET',
|
|
26
35
|
headers: { Authorization: 'Bearer drnc4y57arj3f190cpvqiwxt3cxpbken' }
|
|
27
36
|
});
|
|
28
37
|
|
|
29
|
-
case
|
|
38
|
+
case 7:
|
|
30
39
|
response = _context.sent;
|
|
31
|
-
_context.next =
|
|
40
|
+
_context.next = 10;
|
|
32
41
|
return response.json();
|
|
33
42
|
|
|
34
|
-
case
|
|
43
|
+
case 10:
|
|
35
44
|
data = _context.sent;
|
|
36
45
|
|
|
37
46
|
|
|
@@ -39,6 +48,10 @@ var getPtceActivities = function () {
|
|
|
39
48
|
if (course.tags && course.tags[0] && course.tags[0].label == 'Hidden') {
|
|
40
49
|
return false;
|
|
41
50
|
}
|
|
51
|
+
var customField = data.contentItems.map(function (each) {
|
|
52
|
+
return each.customFields;
|
|
53
|
+
});
|
|
54
|
+
console.log(customField);
|
|
42
55
|
|
|
43
56
|
var current_date = new Date();
|
|
44
57
|
var courseEndDate = new Date(course.courseEndDate);
|
|
@@ -48,19 +61,19 @@ var getPtceActivities = function () {
|
|
|
48
61
|
|
|
49
62
|
return _context.abrupt('return', data);
|
|
50
63
|
|
|
51
|
-
case
|
|
52
|
-
_context.prev =
|
|
64
|
+
case 15:
|
|
65
|
+
_context.prev = 15;
|
|
53
66
|
_context.t0 = _context['catch'](0);
|
|
54
67
|
|
|
55
68
|
console.log(_context.t0);
|
|
56
69
|
return _context.abrupt('return', []);
|
|
57
70
|
|
|
58
|
-
case
|
|
71
|
+
case 19:
|
|
59
72
|
case 'end':
|
|
60
73
|
return _context.stop();
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
|
-
}, _callee, this, [[0,
|
|
76
|
+
}, _callee, this, [[0, 15]]);
|
|
64
77
|
}));
|
|
65
78
|
|
|
66
79
|
return function getPtceActivities(_x) {
|
|
@@ -22,7 +22,9 @@ var getTargeting = function getTargeting(props) {
|
|
|
22
22
|
position = props.position,
|
|
23
23
|
prevUrl = props.prevUrl,
|
|
24
24
|
_props$cpModification = props.cpModificationRequired,
|
|
25
|
-
cpModificationRequired = _props$cpModification === undefined ? true : _props$cpModification
|
|
25
|
+
cpModificationRequired = _props$cpModification === undefined ? true : _props$cpModification,
|
|
26
|
+
_props$disablePrevUrl = props.disablePrevUrlCheckContentPlacement,
|
|
27
|
+
disablePrevUrlCheckContentPlacement = _props$disablePrevUrl === undefined ? false : _props$disablePrevUrl;
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
if (positionOverride) {
|
|
@@ -58,7 +60,7 @@ var getTargeting = function getTargeting(props) {
|
|
|
58
60
|
context = context && context.split('?')[0];
|
|
59
61
|
context = context && context.split('&')[0];
|
|
60
62
|
var content_placement_urls = [];
|
|
61
|
-
if (content_placement && prevUrl && prevUrl.length) {
|
|
63
|
+
if (content_placement && prevUrl && prevUrl.length && !disablePrevUrlCheckContentPlacement) {
|
|
62
64
|
content_placement.forEach(function (item) {
|
|
63
65
|
var path = item.path;
|
|
64
66
|
if (cpModificationRequired) {
|
package/dist/esm/getTargeting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './extends-6d8e3924.js';
|
|
2
2
|
import './toConsumableArray-f7074d7c.js';
|
|
3
|
-
export { g as default } from './getTargeting-
|
|
3
|
+
export { g as default } from './getTargeting-9bd28724.js';
|
|
4
4
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
5
5
|
import './core.get-iterator-method-ea258bb1.js';
|
|
6
6
|
import './_object-pie-133f504a.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -87,7 +87,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
87
87
|
export { default as YahooHero } from './YahooHero.js';
|
|
88
88
|
export { default as GridHero } from './GridHero.js';
|
|
89
89
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
90
|
-
export { g as getSerializers } from './index-
|
|
90
|
+
export { g as getSerializers } from './index-e0aeabc5.js';
|
|
91
91
|
export { default as Beam } from './Beam.js';
|
|
92
92
|
export { default as Segment } from './Segment.js';
|
|
93
93
|
export { default as KMTracker } from './KMTracker.js';
|
|
@@ -102,7 +102,7 @@ export { default as VideoSeriesLandingPage } from './VideoSeriesLandingPage.js';
|
|
|
102
102
|
export { default as ArticleProgramLandingPage } from './ArticleProgramLandingPage.js';
|
|
103
103
|
export { default as ArticleSeriesLandingPage } from './ArticleSeriesLandingPage.js';
|
|
104
104
|
export { default as Schema } from './Schema.js';
|
|
105
|
-
export { g as getTargeting } from './getTargeting-
|
|
105
|
+
export { g as getTargeting } from './getTargeting-9bd28724.js';
|
|
106
106
|
export { default as getKeywords } from './getKeywords.js';
|
|
107
107
|
export { default as getQuery } from './getQuery.js';
|
|
108
108
|
import './toConsumableArray-f7074d7c.js';
|