@mjhls/mjh-framework 1.0.973-ptce-test → 1.0.973
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/ArticleProgramLandingPage.js +2 -2
- package/dist/cjs/Auth.js +1 -1
- package/dist/cjs/ExternalResources.js +2 -2
- package/dist/cjs/HorizontalArticleListing.js +2 -2
- package/dist/cjs/IssueLanding.js +2 -2
- package/dist/cjs/{MediaSeriesCard-4cf41c60.js → MediaSeriesCard-5bf9813e.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +3 -3
- package/dist/cjs/MediaSeriesLandingPaginated.js +3 -3
- package/dist/cjs/PartnerDetailListing.js +2 -2
- package/dist/cjs/PartnerDetailListingPaginated.js +2 -2
- package/dist/cjs/TaxonomyDescription.js +2 -2
- package/dist/cjs/VideoProgramLandingPage.js +2 -2
- package/dist/cjs/View.js +2 -2
- package/dist/cjs/getSerializers.js +2 -2
- package/dist/cjs/{index-3e9b8125.js → index-eb1c583d.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/{esm/util-d39bca09.js → cjs/util-93a37fd0.js} +3 -133
- package/dist/esm/ArticleProgramLandingPage.js +2 -2
- package/dist/esm/Auth.js +1 -1
- package/dist/esm/ExternalResources.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +2 -2
- package/dist/esm/IssueLanding.js +2 -2
- package/dist/esm/{MediaSeriesCard-e87632e9.js → MediaSeriesCard-305a9cb3.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +3 -3
- package/dist/esm/MediaSeriesLandingPaginated.js +3 -3
- package/dist/esm/PartnerDetailListing.js +2 -2
- package/dist/esm/PartnerDetailListingPaginated.js +2 -2
- package/dist/esm/TaxonomyDescription.js +2 -2
- package/dist/esm/VideoProgramLandingPage.js +2 -2
- package/dist/esm/View.js +2 -2
- package/dist/esm/getSerializers.js +2 -2
- package/dist/esm/{index-e9a70085.js → index-264bbd3c.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/{cjs/util-057669f9.js → esm/util-8ed16d48.js} +1 -143
- package/package.json +1 -1
- package/dist/cjs/PtceDeck.js +0 -226
- package/dist/cjs/getPtceActivities.js +0 -80
- package/dist/cjs/index-77bc63c7.js +0 -13562
- package/dist/esm/PtceDeck.js +0 -218
- package/dist/esm/getPtceActivities.js +0 -78
- package/dist/esm/index-99a4897c.js +0 -13560
|
@@ -5,7 +5,7 @@ import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
|
5
5
|
import Col from 'react-bootstrap/Col';
|
|
6
6
|
import Form from 'react-bootstrap/Form';
|
|
7
7
|
import Button from 'react-bootstrap/Button';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-264bbd3c.js';
|
|
9
9
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -22,7 +22,7 @@ import './index-f0fc23eb.js';
|
|
|
22
22
|
import './events-6c3a7a63.js';
|
|
23
23
|
import 'next/router';
|
|
24
24
|
import './index-c7e2ac95.js';
|
|
25
|
-
import './util-
|
|
25
|
+
import './util-8ed16d48.js';
|
|
26
26
|
import './Beam.js';
|
|
27
27
|
import './stringify-2b084bee.js';
|
|
28
28
|
import './Segment.js';
|
package/dist/esm/View.js
CHANGED
|
@@ -15,7 +15,7 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
16
|
import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
18
|
+
import { r as renderAuthor, g as getSerializers } from './index-264bbd3c.js';
|
|
19
19
|
import DFPAdSlot from './AdSlot.js';
|
|
20
20
|
import { S as SeriesSlider } from './SeriesSlider-f771e20d.js';
|
|
21
21
|
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-42f9b439.js';
|
|
@@ -48,7 +48,7 @@ import 'react-dom';
|
|
|
48
48
|
import 'react-share';
|
|
49
49
|
import 'react-bootstrap';
|
|
50
50
|
import './index-c7e2ac95.js';
|
|
51
|
-
import './util-
|
|
51
|
+
import './util-8ed16d48.js';
|
|
52
52
|
import './Beam.js';
|
|
53
53
|
import './Segment.js';
|
|
54
54
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './extends-6d8e3924.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { g as default } from './index-
|
|
3
|
+
export { g as default } from './index-264bbd3c.js';
|
|
4
4
|
import './BlockContent-1e73bd2c.js';
|
|
5
5
|
import './entities-6d9154b4.js';
|
|
6
6
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -16,7 +16,7 @@ import './events-6c3a7a63.js';
|
|
|
16
16
|
import 'prop-types';
|
|
17
17
|
import 'next/router';
|
|
18
18
|
import './index-c7e2ac95.js';
|
|
19
|
-
import './util-
|
|
19
|
+
import './util-8ed16d48.js';
|
|
20
20
|
import './Beam.js';
|
|
21
21
|
import './stringify-2b084bee.js';
|
|
22
22
|
import './asyncToGenerator-958ef5fc.js';
|
|
@@ -8,7 +8,7 @@ import Router, { useRouter } from 'next/router';
|
|
|
8
8
|
import { g as getYoutubeId } from './index-c7e2ac95.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
11
|
-
import { u as util } from './util-
|
|
11
|
+
import { u as util } from './util-8ed16d48.js';
|
|
12
12
|
import './Beam.js';
|
|
13
13
|
import Segment from './Segment.js';
|
|
14
14
|
import { e as main_18, b as main_42, m as main_43 } from './main-1894c974.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-264bbd3c.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';
|
|
@@ -181,7 +181,7 @@ import './index.esm-1bd8a0a8.js';
|
|
|
181
181
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
182
182
|
import './urlForFile-b69adffc.js';
|
|
183
183
|
import 'react-bootstrap/Modal';
|
|
184
|
-
import './util-
|
|
184
|
+
import './util-8ed16d48.js';
|
|
185
185
|
import 'react-bootstrap/Pagination';
|
|
186
186
|
import 'react-bootstrap/Figure';
|
|
187
187
|
import 'react-bootstrap/OverlayTrigger';
|
|
@@ -1,138 +1,4 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
// shim for using process in browser
|
|
4
|
-
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
5
|
-
|
|
6
|
-
function defaultSetTimout() {
|
|
7
|
-
throw new Error('setTimeout has not been defined');
|
|
8
|
-
}
|
|
9
|
-
function defaultClearTimeout () {
|
|
10
|
-
throw new Error('clearTimeout has not been defined');
|
|
11
|
-
}
|
|
12
|
-
var cachedSetTimeout = defaultSetTimout;
|
|
13
|
-
var cachedClearTimeout = defaultClearTimeout;
|
|
14
|
-
if (typeof global.setTimeout === 'function') {
|
|
15
|
-
cachedSetTimeout = setTimeout;
|
|
16
|
-
}
|
|
17
|
-
if (typeof global.clearTimeout === 'function') {
|
|
18
|
-
cachedClearTimeout = clearTimeout;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function runTimeout(fun) {
|
|
22
|
-
if (cachedSetTimeout === setTimeout) {
|
|
23
|
-
//normal enviroments in sane situations
|
|
24
|
-
return setTimeout(fun, 0);
|
|
25
|
-
}
|
|
26
|
-
// if setTimeout wasn't available but was latter defined
|
|
27
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
28
|
-
cachedSetTimeout = setTimeout;
|
|
29
|
-
return setTimeout(fun, 0);
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
33
|
-
return cachedSetTimeout(fun, 0);
|
|
34
|
-
} catch(e){
|
|
35
|
-
try {
|
|
36
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
37
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
38
|
-
} catch(e){
|
|
39
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
40
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
function runClearTimeout(marker) {
|
|
47
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
48
|
-
//normal enviroments in sane situations
|
|
49
|
-
return clearTimeout(marker);
|
|
50
|
-
}
|
|
51
|
-
// if clearTimeout wasn't available but was latter defined
|
|
52
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
53
|
-
cachedClearTimeout = clearTimeout;
|
|
54
|
-
return clearTimeout(marker);
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
58
|
-
return cachedClearTimeout(marker);
|
|
59
|
-
} catch (e){
|
|
60
|
-
try {
|
|
61
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
62
|
-
return cachedClearTimeout.call(null, marker);
|
|
63
|
-
} catch (e){
|
|
64
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
65
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
66
|
-
return cachedClearTimeout.call(this, marker);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
var queue = [];
|
|
74
|
-
var draining = false;
|
|
75
|
-
var currentQueue;
|
|
76
|
-
var queueIndex = -1;
|
|
77
|
-
|
|
78
|
-
function cleanUpNextTick() {
|
|
79
|
-
if (!draining || !currentQueue) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
draining = false;
|
|
83
|
-
if (currentQueue.length) {
|
|
84
|
-
queue = currentQueue.concat(queue);
|
|
85
|
-
} else {
|
|
86
|
-
queueIndex = -1;
|
|
87
|
-
}
|
|
88
|
-
if (queue.length) {
|
|
89
|
-
drainQueue();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function drainQueue() {
|
|
94
|
-
if (draining) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
98
|
-
draining = true;
|
|
99
|
-
|
|
100
|
-
var len = queue.length;
|
|
101
|
-
while(len) {
|
|
102
|
-
currentQueue = queue;
|
|
103
|
-
queue = [];
|
|
104
|
-
while (++queueIndex < len) {
|
|
105
|
-
if (currentQueue) {
|
|
106
|
-
currentQueue[queueIndex].run();
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
queueIndex = -1;
|
|
110
|
-
len = queue.length;
|
|
111
|
-
}
|
|
112
|
-
currentQueue = null;
|
|
113
|
-
draining = false;
|
|
114
|
-
runClearTimeout(timeout);
|
|
115
|
-
}
|
|
116
|
-
function nextTick(fun) {
|
|
117
|
-
var args = new Array(arguments.length - 1);
|
|
118
|
-
if (arguments.length > 1) {
|
|
119
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
120
|
-
args[i - 1] = arguments[i];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
queue.push(new Item(fun, args));
|
|
124
|
-
if (queue.length === 1 && !draining) {
|
|
125
|
-
runTimeout(drainQueue);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
// v8 likes predictible objects
|
|
129
|
-
function Item(fun, array) {
|
|
130
|
-
this.fun = fun;
|
|
131
|
-
this.array = array;
|
|
132
|
-
}
|
|
133
|
-
Item.prototype.run = function () {
|
|
134
|
-
this.fun.apply(null, this.array);
|
|
135
|
-
};
|
|
136
2
|
|
|
137
3
|
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
138
4
|
var performance = global.performance || {};
|
|
@@ -716,12 +582,4 @@ var util = {
|
|
|
716
582
|
debuglog: debuglog
|
|
717
583
|
};
|
|
718
584
|
|
|
719
|
-
|
|
720
|
-
exports.deprecate = deprecate;
|
|
721
|
-
exports.inherits = inherits$1;
|
|
722
|
-
exports.isNull = isNull;
|
|
723
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
|
724
|
-
exports.isObject = isObject;
|
|
725
|
-
exports.isString = isString;
|
|
726
|
-
exports.nextTick = nextTick;
|
|
727
|
-
exports.util = util;
|
|
585
|
+
export { util as u };
|
package/package.json
CHANGED
package/dist/cjs/PtceDeck.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
|
|
6
|
-
var toConsumableArray = require('./toConsumableArray-d7797c2b.js');
|
|
7
|
-
var stringify = require('./stringify-f7a37a8d.js');
|
|
8
|
-
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
9
|
-
var moment = require('./moment-aca40de1.js');
|
|
10
|
-
var React = require('react');
|
|
11
|
-
var index = require('./index-77bc63c7.js');
|
|
12
|
-
var reactBootstrap = require('react-bootstrap');
|
|
13
|
-
require('./_commonjsHelpers-06173234.js');
|
|
14
|
-
require('./core.get-iterator-method-5643aa10.js');
|
|
15
|
-
require('./web.dom.iterable-d98303e0.js');
|
|
16
|
-
require('./_library-dd23b178.js');
|
|
17
|
-
require('./_iter-detect-b1df62f0.js');
|
|
18
|
-
require('./events-1b438fe7.js');
|
|
19
|
-
require('./util-057669f9.js');
|
|
20
|
-
|
|
21
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
|
-
|
|
23
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
-
|
|
25
|
-
var _this2 = undefined;
|
|
26
|
-
|
|
27
|
-
function PtceDeck(props) {
|
|
28
|
-
var _this = this;
|
|
29
|
-
|
|
30
|
-
var initialData = props.initialData;
|
|
31
|
-
|
|
32
|
-
var _useState = React.useState(),
|
|
33
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
34
|
-
cmeData = _useState2[0],
|
|
35
|
-
setCmeData = _useState2[1];
|
|
36
|
-
|
|
37
|
-
var _useState3 = React.useState(),
|
|
38
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
39
|
-
hasMore = _useState4[0],
|
|
40
|
-
setHasMore = _useState4[1];
|
|
41
|
-
|
|
42
|
-
var _useState5 = React.useState(),
|
|
43
|
-
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
44
|
-
paginatedPoint = _useState6[0],
|
|
45
|
-
setPaginatedPoint = _useState6[1];
|
|
46
|
-
|
|
47
|
-
React.useEffect(function () {
|
|
48
|
-
//set inital data
|
|
49
|
-
|
|
50
|
-
if (initialData && initialData.pageInfo) {
|
|
51
|
-
setHasMore(initialData.pageInfo.hasMore);
|
|
52
|
-
setPaginatedPoint(initialData.pageInfo.cursor);
|
|
53
|
-
setCmeData(initialData.contentItems);
|
|
54
|
-
}
|
|
55
|
-
//set hasMore and breakpoint
|
|
56
|
-
}, []);
|
|
57
|
-
|
|
58
|
-
var loadMore = function () {
|
|
59
|
-
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
|
|
60
|
-
var response, data;
|
|
61
|
-
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
62
|
-
while (1) {
|
|
63
|
-
switch (_context.prev = _context.next) {
|
|
64
|
-
case 0:
|
|
65
|
-
_context.next = 2;
|
|
66
|
-
return index.fetch('/api/get_activities-CE', {
|
|
67
|
-
headers: {
|
|
68
|
-
'Content-Type': 'application/json',
|
|
69
|
-
Accept: 'application/json'
|
|
70
|
-
},
|
|
71
|
-
method: 'post',
|
|
72
|
-
credentials: 'same-origin',
|
|
73
|
-
body: stringify._JSON$stringify({ params: { paginatedPoint: paginatedPoint } })
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
case 2:
|
|
77
|
-
response = _context.sent;
|
|
78
|
-
_context.next = 5;
|
|
79
|
-
return response.json();
|
|
80
|
-
|
|
81
|
-
case 5:
|
|
82
|
-
data = _context.sent;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (data.pageInfo) {
|
|
86
|
-
setHasMore(data.pageInfo.hasMore);
|
|
87
|
-
setPaginatedPoint(data.pageInfo.cursor);
|
|
88
|
-
setCmeData(function (prevState) {
|
|
89
|
-
return [].concat(toConsumableArray._toConsumableArray(prevState), toConsumableArray._toConsumableArray(data.contentItems));
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
console.log('data', data);
|
|
93
|
-
|
|
94
|
-
case 8:
|
|
95
|
-
case 'end':
|
|
96
|
-
return _context.stop();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}, _callee, _this);
|
|
100
|
-
}));
|
|
101
|
-
|
|
102
|
-
return function loadMore() {
|
|
103
|
-
return _ref.apply(this, arguments);
|
|
104
|
-
};
|
|
105
|
-
}();
|
|
106
|
-
|
|
107
|
-
return React__default['default'].createElement(
|
|
108
|
-
'div',
|
|
109
|
-
null,
|
|
110
|
-
cmeData && cmeData.map(function (activity) {
|
|
111
|
-
|
|
112
|
-
var href = activity.url ? activity.url : 'https://www.pharmacytimes.org/courses/' + activity.slug;
|
|
113
|
-
|
|
114
|
-
return React__default['default'].createElement(
|
|
115
|
-
reactBootstrap.Col,
|
|
116
|
-
{ xl: 12, style: { marginBottom: '1rem' } },
|
|
117
|
-
React__default['default'].createElement(
|
|
118
|
-
reactBootstrap.Row,
|
|
119
|
-
null,
|
|
120
|
-
React__default['default'].createElement(
|
|
121
|
-
reactBootstrap.Col,
|
|
122
|
-
{ xs: 3, sm: 4, md: 4, lg: 4, xl: 4, style: { padding: '0' } },
|
|
123
|
-
React__default['default'].createElement(
|
|
124
|
-
'a',
|
|
125
|
-
{ href: href, rel: 'noopener', target: '_blank' },
|
|
126
|
-
React__default['default'].createElement('img', { style: { width: '100%', borderRadius: '0 0 0 10%', marginBottom: '20px', borderTop: '1px solid #EEE' }, src: activity.asset })
|
|
127
|
-
)
|
|
128
|
-
),
|
|
129
|
-
React__default['default'].createElement(
|
|
130
|
-
reactBootstrap.Col,
|
|
131
|
-
{ xs: 9, sm: 8, md: 8, lg: 8, xl: 8, style: { paddingTop: '10px', marginBottom: '20px', borderTop: '1px solid #EEE' } },
|
|
132
|
-
React__default['default'].createElement(
|
|
133
|
-
'a',
|
|
134
|
-
{ href: href, rel: 'noopener', target: '_blank' },
|
|
135
|
-
React__default['default'].createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: activity.title } }),
|
|
136
|
-
React__default['default'].createElement(
|
|
137
|
-
'p',
|
|
138
|
-
{ className: 'mb-2' },
|
|
139
|
-
'Expiration Date: ',
|
|
140
|
-
moment.moment(activity.courseEndDate).format('MMM Do YYYY')
|
|
141
|
-
),
|
|
142
|
-
React__default['default'].createElement('p', { dangerouslySetInnerHTML: { __html: activity.description } })
|
|
143
|
-
)
|
|
144
|
-
)
|
|
145
|
-
)
|
|
146
|
-
);
|
|
147
|
-
}),
|
|
148
|
-
hasMore && React__default['default'].createElement(
|
|
149
|
-
'div',
|
|
150
|
-
{ className: 'text-center my-5' },
|
|
151
|
-
React__default['default'].createElement(
|
|
152
|
-
'button',
|
|
153
|
-
{ onClick: loadMore, className: 'btn btn-lg btn-primary' },
|
|
154
|
-
'Load More'
|
|
155
|
-
)
|
|
156
|
-
)
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
var getPtceActivities = function () {
|
|
161
|
-
var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(params) {
|
|
162
|
-
var hasMore, response, data;
|
|
163
|
-
return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
|
|
164
|
-
while (1) {
|
|
165
|
-
switch (_context2.prev = _context2.next) {
|
|
166
|
-
case 0:
|
|
167
|
-
_context2.prev = 0;
|
|
168
|
-
hasMore = '';
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (params.paginatedPoint && params.paginatedPoint !== '') {
|
|
172
|
-
hasMore = '&cursor=' + params.paginatedPoint;
|
|
173
|
-
}
|
|
174
|
-
console.log(hasMore, 'has More', params);
|
|
175
|
-
_context2.next = 6;
|
|
176
|
-
return index.fetch('https://www.pharmacytimes.org/incoming/v2/content?types[]=courses&sort=publishDate:desc&query=status:published&limit=25' + hasMore, {
|
|
177
|
-
method: 'GET',
|
|
178
|
-
headers: { Authorization: 'Bearer drnc4y57arj3f190cpvqiwxt3cxpbken' }
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
case 6:
|
|
182
|
-
response = _context2.sent;
|
|
183
|
-
_context2.next = 9;
|
|
184
|
-
return response.json();
|
|
185
|
-
|
|
186
|
-
case 9:
|
|
187
|
-
data = _context2.sent;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
data.contentItems = data.contentItems.filter(function (course) {
|
|
191
|
-
if (course.tags && course.tags[0] && course.tags[0].label == 'Hidden') {
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
course.pType_id = '1';
|
|
195
|
-
// course.expirationDate = moment(course.courseEndDate).format('MMM Do YYYY')
|
|
196
|
-
|
|
197
|
-
var current_date = new Date();
|
|
198
|
-
var courseEndDate = new Date(course.courseEndDate);
|
|
199
|
-
|
|
200
|
-
return current_date.getTime() < courseEndDate.getTime();
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
return _context2.abrupt('return', data);
|
|
204
|
-
|
|
205
|
-
case 14:
|
|
206
|
-
_context2.prev = 14;
|
|
207
|
-
_context2.t0 = _context2['catch'](0);
|
|
208
|
-
|
|
209
|
-
console.log(_context2.t0);
|
|
210
|
-
return _context2.abrupt('return', []);
|
|
211
|
-
|
|
212
|
-
case 18:
|
|
213
|
-
case 'end':
|
|
214
|
-
return _context2.stop();
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}, _callee2, _this2, [[0, 14]]);
|
|
218
|
-
}));
|
|
219
|
-
|
|
220
|
-
return function getPtceActivities(_x) {
|
|
221
|
-
return _ref2.apply(this, arguments);
|
|
222
|
-
};
|
|
223
|
-
}();
|
|
224
|
-
|
|
225
|
-
exports.default = PtceDeck;
|
|
226
|
-
exports.getPtceActivities = getPtceActivities;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
|
|
4
|
-
var index = require('./index-77bc63c7.js');
|
|
5
|
-
require('./_commonjsHelpers-06173234.js');
|
|
6
|
-
require('./core.get-iterator-method-5643aa10.js');
|
|
7
|
-
require('./web.dom.iterable-d98303e0.js');
|
|
8
|
-
require('./_library-dd23b178.js');
|
|
9
|
-
require('./_iter-detect-b1df62f0.js');
|
|
10
|
-
require('./events-1b438fe7.js');
|
|
11
|
-
require('./util-057669f9.js');
|
|
12
|
-
|
|
13
|
-
var getPtceActivities = (function () {
|
|
14
|
-
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(params) {
|
|
15
|
-
var hasMore, response, data;
|
|
16
|
-
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
17
|
-
while (1) {
|
|
18
|
-
switch (_context.prev = _context.next) {
|
|
19
|
-
case 0:
|
|
20
|
-
_context.prev = 0;
|
|
21
|
-
hasMore = '';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (params.paginatedPoint && params.paginatedPoint !== '') {
|
|
25
|
-
hasMore = '&cursor=' + params.paginatedPoint;
|
|
26
|
-
}
|
|
27
|
-
console.log(hasMore, 'has More', params);
|
|
28
|
-
_context.next = 6;
|
|
29
|
-
return index.fetch('https://www.pharmacytimes.org/incoming/v2/content?types[]=courses&sort=publishDate:desc&query=status:published&limit=25' + hasMore, {
|
|
30
|
-
method: 'GET',
|
|
31
|
-
headers: { Authorization: 'Bearer drnc4y57arj3f190cpvqiwxt3cxpbken' }
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
case 6:
|
|
35
|
-
response = _context.sent;
|
|
36
|
-
_context.next = 9;
|
|
37
|
-
return response.json();
|
|
38
|
-
|
|
39
|
-
case 9:
|
|
40
|
-
data = _context.sent;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
data.contentItems = data.contentItems.filter(function (course) {
|
|
44
|
-
if (course.tags && course.tags[0] && course.tags[0].label == 'Hidden') {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
course.pType_id = '1';
|
|
48
|
-
// course.expirationDate = moment(course.courseEndDate).format('MMM Do YYYY')
|
|
49
|
-
|
|
50
|
-
var current_date = new Date();
|
|
51
|
-
var courseEndDate = new Date(course.courseEndDate);
|
|
52
|
-
|
|
53
|
-
return current_date.getTime() < courseEndDate.getTime();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
return _context.abrupt('return', data);
|
|
57
|
-
|
|
58
|
-
case 14:
|
|
59
|
-
_context.prev = 14;
|
|
60
|
-
_context.t0 = _context['catch'](0);
|
|
61
|
-
|
|
62
|
-
console.log(_context.t0);
|
|
63
|
-
return _context.abrupt('return', []);
|
|
64
|
-
|
|
65
|
-
case 18:
|
|
66
|
-
case 'end':
|
|
67
|
-
return _context.stop();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, _callee, this, [[0, 14]]);
|
|
71
|
-
}));
|
|
72
|
-
|
|
73
|
-
function getPtceActivities(_x) {
|
|
74
|
-
return _ref.apply(this, arguments);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return getPtceActivities;
|
|
78
|
-
})();
|
|
79
|
-
|
|
80
|
-
module.exports = getPtceActivities;
|