@mjhls/mjh-framework 1.0.712 → 1.0.713
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/CMEDeck.js +103 -111
- package/dist/esm/CMEDeck.js +103 -111
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.713
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
package/dist/cjs/CMEDeck.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var asyncToGenerator = require('./asyncToGenerator-2edcb6ad.js');
|
|
4
4
|
var toConsumableArray = require('./toConsumableArray-cf0865fc.js');
|
|
5
|
-
var
|
|
5
|
+
var stringify = require('./stringify-01cf47f7.js');
|
|
6
6
|
var slicedToArray = require('./slicedToArray-db24842a.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactBootstrap = require('react-bootstrap');
|
|
@@ -12,7 +12,6 @@ var main = require('./main-dc082238.js');
|
|
|
12
12
|
var debounce = require('./debounce-eb287781.js');
|
|
13
13
|
var Router = require('next/router');
|
|
14
14
|
var index = require('./index-5ad2b070.js');
|
|
15
|
-
require('./moment-aca40de1.js');
|
|
16
15
|
require('./_commonjsHelpers-06173234.js');
|
|
17
16
|
require('./es6.string.iterator-20d42c53.js');
|
|
18
17
|
require('./_to-object-821a2927.js');
|
|
@@ -21,7 +20,6 @@ require('./_library-dd23b178.js');
|
|
|
21
20
|
require('./core.get-iterator-method-b4615fd3.js');
|
|
22
21
|
require('./_set-species-a8cfdb84.js');
|
|
23
22
|
require('./_iter-detect-2613ffa1.js');
|
|
24
|
-
require('./_object-pie-68c5bcbc.js');
|
|
25
23
|
require('react-dom');
|
|
26
24
|
require('./isSymbol-04666465.js');
|
|
27
25
|
require('prop-types');
|
|
@@ -30,58 +28,38 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
30
28
|
|
|
31
29
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
32
30
|
|
|
33
|
-
var
|
|
34
|
-
var itemsPerPage = 10;
|
|
31
|
+
var itemsPerPage = 12;
|
|
35
32
|
|
|
36
33
|
var CMEDeck = function CMEDeck(_ref) {
|
|
37
34
|
var getData = function () {
|
|
38
35
|
var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(params) {
|
|
39
|
-
var
|
|
36
|
+
var response, newData;
|
|
40
37
|
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
41
38
|
while (1) {
|
|
42
39
|
switch (_context.prev = _context.next) {
|
|
43
40
|
case 0:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
body: form
|
|
41
|
+
_context.prev = 0;
|
|
42
|
+
_context.next = 3;
|
|
43
|
+
return fetch('/api/get_activities', {
|
|
44
|
+
headers: {
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
Accept: 'application/json'
|
|
47
|
+
},
|
|
48
|
+
method: 'post',
|
|
49
|
+
credentials: 'same-origin',
|
|
50
|
+
body: stringify._JSON$stringify({ params: params })
|
|
55
51
|
});
|
|
56
52
|
|
|
57
|
-
case
|
|
53
|
+
case 3:
|
|
58
54
|
response = _context.sent;
|
|
59
|
-
_context.next =
|
|
55
|
+
_context.next = 6;
|
|
60
56
|
return response.json();
|
|
61
57
|
|
|
62
|
-
case
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (result && result.length > 0) {
|
|
68
|
-
newData = result.map(function (activity) {
|
|
69
|
-
var entities = {
|
|
70
|
-
'™': '\u2122',
|
|
71
|
-
'®': '\xAE',
|
|
72
|
-
'–': '\u2013',
|
|
73
|
-
'&': '&'
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
return _extends._extends({}, activity, {
|
|
77
|
-
title: activity.title.replace(regex, function (match) {
|
|
78
|
-
return entities[match];
|
|
79
|
-
}),
|
|
80
|
-
href: 'https://www.gotoper.com/' + activity.get1 + '/' + activity.get2 + '/' + activity.doc,
|
|
81
|
-
pageNumber: currentPage
|
|
82
|
-
});
|
|
83
|
-
});
|
|
58
|
+
case 6:
|
|
59
|
+
newData = _context.sent;
|
|
60
|
+
|
|
84
61
|
|
|
62
|
+
if (newData && newData.length > 0) {
|
|
85
63
|
setIsLoading(false);
|
|
86
64
|
newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
|
|
87
65
|
setData(function (prevData) {
|
|
@@ -90,21 +68,21 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
90
68
|
} else {
|
|
91
69
|
setScrolling(false);
|
|
92
70
|
}
|
|
93
|
-
_context.next =
|
|
71
|
+
_context.next = 13;
|
|
94
72
|
break;
|
|
95
73
|
|
|
96
|
-
case
|
|
97
|
-
_context.prev =
|
|
98
|
-
_context.t0 = _context['catch'](
|
|
74
|
+
case 10:
|
|
75
|
+
_context.prev = 10;
|
|
76
|
+
_context.t0 = _context['catch'](0);
|
|
99
77
|
|
|
100
78
|
console.log(_context.t0);
|
|
101
79
|
|
|
102
|
-
case
|
|
80
|
+
case 13:
|
|
103
81
|
case 'end':
|
|
104
82
|
return _context.stop();
|
|
105
83
|
}
|
|
106
84
|
}
|
|
107
|
-
}, _callee, this, [[
|
|
85
|
+
}, _callee, this, [[0, 10]]);
|
|
108
86
|
}));
|
|
109
87
|
|
|
110
88
|
return function getData(_x) {
|
|
@@ -119,9 +97,8 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
119
97
|
rightItems = _ref.rightItems,
|
|
120
98
|
_ref$seoPaginate = _ref.seoPaginate,
|
|
121
99
|
seoPaginate = _ref$seoPaginate === undefined ? true : _ref$seoPaginate,
|
|
122
|
-
pageview = _ref.pageview
|
|
123
|
-
_ref
|
|
124
|
-
keywords = _ref$keywords === undefined ? '' : _ref$keywords;
|
|
100
|
+
pageview = _ref.pageview;
|
|
101
|
+
_ref.keywords;
|
|
125
102
|
|
|
126
103
|
var router = Router.useRouter();
|
|
127
104
|
|
|
@@ -153,9 +130,10 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
153
130
|
var currentPageRef = React.useRef(currentPage);
|
|
154
131
|
var fromeRef = React.useRef(from);
|
|
155
132
|
|
|
133
|
+
|
|
156
134
|
React.useEffect(function () {
|
|
157
135
|
// load initial data
|
|
158
|
-
getData({ from: from,
|
|
136
|
+
getData({ from: from, to: itemsPerPage, itemsPerPage: itemsPerPage, currentPage: currentPage });
|
|
159
137
|
}, []);
|
|
160
138
|
|
|
161
139
|
var changePageNumber = function changePageNumber(pageNumber) {
|
|
@@ -227,86 +205,100 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
227
205
|
var cardLoader = function cardLoader() {
|
|
228
206
|
var numberOfItemsBeforeAd = 6;
|
|
229
207
|
return React__default['default'].createElement(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
208
|
+
'div',
|
|
209
|
+
{ id: 'ceToggles' },
|
|
210
|
+
React__default['default'].createElement(
|
|
211
|
+
'div',
|
|
212
|
+
{ style: { maxWidth: '50%', padding: '0.5rem' } },
|
|
213
|
+
React__default['default'].createElement('img', { src: 'https://gotoper-com.s3.amazonaws.com/_media/_image/PER_Logo.svg', alt: 'per logo' }),
|
|
214
|
+
React__default['default'].createElement(
|
|
215
|
+
'p',
|
|
216
|
+
{ style: { margin: '0', fontWeight: '700', width: '100%', textAlign: 'center', fontSize: '1rem' } },
|
|
217
|
+
'Physician Education'
|
|
218
|
+
)
|
|
219
|
+
),
|
|
220
|
+
React__default['default'].createElement(
|
|
221
|
+
reactBootstrap.Row,
|
|
222
|
+
null,
|
|
223
|
+
data && data.map(function (row, index) {
|
|
224
|
+
var pageNumber = row.pageNumber || 1;
|
|
225
|
+
return React__default['default'].createElement(
|
|
226
|
+
React__default['default'].Fragment,
|
|
227
|
+
{ key: index },
|
|
228
|
+
React__default['default'].createElement(
|
|
229
|
+
visibilitySensor.VisibilitySensor,
|
|
230
|
+
{
|
|
231
|
+
onChange: function onChange(isVisible) {
|
|
232
|
+
isVisible && changePageNumber(pageNumber);
|
|
233
|
+
} },
|
|
234
|
+
variant === 'left' ? React__default['default'].createElement(
|
|
235
|
+
reactBootstrap.Col,
|
|
236
|
+
{ xl: 12, style: { marginBottom: '1rem' } },
|
|
249
237
|
React__default['default'].createElement(
|
|
250
|
-
reactBootstrap.
|
|
251
|
-
|
|
238
|
+
reactBootstrap.Row,
|
|
239
|
+
null,
|
|
252
240
|
React__default['default'].createElement(
|
|
253
|
-
|
|
254
|
-
{
|
|
255
|
-
React__default['default'].createElement(
|
|
241
|
+
reactBootstrap.Col,
|
|
242
|
+
{ xs: 3, sm: 4, md: 4, lg: 4, xl: 4, style: { padding: '0' } },
|
|
243
|
+
React__default['default'].createElement(
|
|
244
|
+
'a',
|
|
245
|
+
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
246
|
+
React__default['default'].createElement('img', { style: { width: '100%', borderRadius: '0 0 0 10%', marginBottom: '20px', borderTop: '1px solid #EEE' }, src: row.thumbnail })
|
|
247
|
+
)
|
|
248
|
+
),
|
|
249
|
+
React__default['default'].createElement(
|
|
250
|
+
reactBootstrap.Col,
|
|
251
|
+
{ xs: 9, sm: 8, md: 8, lg: 8, xl: 8, style: { paddingTop: '10px', marginBottom: '20px', borderTop: '1px solid #EEE' } },
|
|
252
|
+
React__default['default'].createElement(
|
|
253
|
+
'a',
|
|
254
|
+
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
255
|
+
React__default['default'].createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
256
|
+
React__default['default'].createElement(
|
|
257
|
+
'p',
|
|
258
|
+
{ className: 'mb-2' },
|
|
259
|
+
row.date
|
|
260
|
+
),
|
|
261
|
+
React__default['default'].createElement('p', { dangerouslySetInnerHTML: { __html: row.intro } })
|
|
262
|
+
)
|
|
256
263
|
)
|
|
257
|
-
)
|
|
264
|
+
)
|
|
265
|
+
) : React__default['default'].createElement(
|
|
266
|
+
reactBootstrap.Row,
|
|
267
|
+
{ style: { margin: '0', padding: '0' } },
|
|
258
268
|
React__default['default'].createElement(
|
|
259
269
|
reactBootstrap.Col,
|
|
260
|
-
{ xs: 9, sm: 8,
|
|
270
|
+
{ xs: 9, sm: 8, lg: 8, xl: 8 },
|
|
261
271
|
React__default['default'].createElement(
|
|
262
272
|
'a',
|
|
263
273
|
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
264
274
|
React__default['default'].createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
265
275
|
React__default['default'].createElement(
|
|
266
276
|
'p',
|
|
267
|
-
|
|
277
|
+
null,
|
|
268
278
|
row.date
|
|
269
279
|
),
|
|
270
280
|
React__default['default'].createElement('p', { dangerouslySetInnerHTML: { __html: row.intro } })
|
|
271
281
|
)
|
|
272
|
-
)
|
|
273
|
-
)
|
|
274
|
-
) : React__default['default'].createElement(
|
|
275
|
-
reactBootstrap.Row,
|
|
276
|
-
{ style: { margin: '0', padding: '0' } },
|
|
277
|
-
React__default['default'].createElement(
|
|
278
|
-
reactBootstrap.Col,
|
|
279
|
-
{ xs: 9, sm: 8, lg: 8, xl: 8 },
|
|
282
|
+
),
|
|
280
283
|
React__default['default'].createElement(
|
|
281
|
-
|
|
282
|
-
{
|
|
283
|
-
React__default['default'].createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
284
|
+
reactBootstrap.Col,
|
|
285
|
+
{ xs: 3, sm: 4, lg: 4, xl: 4 },
|
|
284
286
|
React__default['default'].createElement(
|
|
285
|
-
'
|
|
286
|
-
|
|
287
|
-
row.
|
|
288
|
-
)
|
|
289
|
-
React__default['default'].createElement('p', { dangerouslySetInnerHTML: { __html: row.intro } })
|
|
290
|
-
)
|
|
291
|
-
),
|
|
292
|
-
React__default['default'].createElement(
|
|
293
|
-
reactBootstrap.Col,
|
|
294
|
-
{ xs: 3, sm: 4, lg: 4, xl: 4 },
|
|
295
|
-
React__default['default'].createElement(
|
|
296
|
-
'a',
|
|
297
|
-
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
298
|
-
React__default['default'].createElement('img', { style: { width: '100%', borderRadius: '0 0 10% 0' }, src: row.thumbnail && urlFor(row.thumbnail.asset).url() })
|
|
287
|
+
'a',
|
|
288
|
+
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
289
|
+
React__default['default'].createElement('img', { style: { width: '100%', borderRadius: '0 0 10% 0' }, src: row.thumbnail && urlFor(row.thumbnail.asset).url() })
|
|
290
|
+
)
|
|
299
291
|
)
|
|
300
292
|
)
|
|
293
|
+
),
|
|
294
|
+
main.main_40 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default['default'].createElement(
|
|
295
|
+
'div',
|
|
296
|
+
{ style: { margin: '0 auto' } },
|
|
297
|
+
renderMobileAd(index, numberOfItemsBeforeAd)
|
|
301
298
|
)
|
|
302
|
-
)
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
{ style: { margin: '0 auto' } },
|
|
306
|
-
renderMobileAd(index, numberOfItemsBeforeAd)
|
|
307
|
-
)
|
|
308
|
-
);
|
|
309
|
-
})
|
|
299
|
+
);
|
|
300
|
+
})
|
|
301
|
+
)
|
|
310
302
|
);
|
|
311
303
|
};
|
|
312
304
|
|
package/dist/esm/CMEDeck.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-acd1cc47.js';
|
|
2
2
|
import { _ as _toConsumableArray } from './toConsumableArray-5212fee7.js';
|
|
3
|
-
import { _ as
|
|
3
|
+
import { _ as _JSON$stringify } from './stringify-8a4f19f7.js';
|
|
4
4
|
import { _ as _slicedToArray } from './slicedToArray-34468155.js';
|
|
5
5
|
import React, { useState, useRef, useEffect } from 'react';
|
|
6
6
|
import { Spinner, Container, Row, Col } from 'react-bootstrap';
|
|
@@ -10,7 +10,6 @@ import { m as main_40 } from './main-1450d277.js';
|
|
|
10
10
|
import { d as debounce_1 } from './debounce-1a993acf.js';
|
|
11
11
|
import { useRouter } from 'next/router';
|
|
12
12
|
import { l as lib_3 } from './index-669ff425.js';
|
|
13
|
-
import './moment-bc12cb97.js';
|
|
14
13
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
14
|
import './es6.string.iterator-b24a54f2.js';
|
|
16
15
|
import './_to-object-9bef3b62.js';
|
|
@@ -19,63 +18,42 @@ import './_library-528f1934.js';
|
|
|
19
18
|
import './core.get-iterator-method-1b116089.js';
|
|
20
19
|
import './_set-species-0b056cff.js';
|
|
21
20
|
import './_iter-detect-d4d262ee.js';
|
|
22
|
-
import './_object-pie-71ac75a4.js';
|
|
23
21
|
import 'react-dom';
|
|
24
22
|
import './isSymbol-807e927e.js';
|
|
25
23
|
import 'prop-types';
|
|
26
24
|
|
|
27
|
-
var
|
|
28
|
-
var itemsPerPage = 10;
|
|
25
|
+
var itemsPerPage = 12;
|
|
29
26
|
|
|
30
27
|
var CMEDeck = function CMEDeck(_ref) {
|
|
31
28
|
var getData = function () {
|
|
32
29
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(params) {
|
|
33
|
-
var
|
|
30
|
+
var response, newData;
|
|
34
31
|
return regenerator.wrap(function _callee$(_context) {
|
|
35
32
|
while (1) {
|
|
36
33
|
switch (_context.prev = _context.next) {
|
|
37
34
|
case 0:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
body: form
|
|
35
|
+
_context.prev = 0;
|
|
36
|
+
_context.next = 3;
|
|
37
|
+
return fetch('/api/get_activities', {
|
|
38
|
+
headers: {
|
|
39
|
+
'Content-Type': 'application/json',
|
|
40
|
+
Accept: 'application/json'
|
|
41
|
+
},
|
|
42
|
+
method: 'post',
|
|
43
|
+
credentials: 'same-origin',
|
|
44
|
+
body: _JSON$stringify({ params: params })
|
|
49
45
|
});
|
|
50
46
|
|
|
51
|
-
case
|
|
47
|
+
case 3:
|
|
52
48
|
response = _context.sent;
|
|
53
|
-
_context.next =
|
|
49
|
+
_context.next = 6;
|
|
54
50
|
return response.json();
|
|
55
51
|
|
|
56
|
-
case
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (result && result.length > 0) {
|
|
62
|
-
newData = result.map(function (activity) {
|
|
63
|
-
var entities = {
|
|
64
|
-
'™': '\u2122',
|
|
65
|
-
'®': '\xAE',
|
|
66
|
-
'–': '\u2013',
|
|
67
|
-
'&': '&'
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
return _extends({}, activity, {
|
|
71
|
-
title: activity.title.replace(regex, function (match) {
|
|
72
|
-
return entities[match];
|
|
73
|
-
}),
|
|
74
|
-
href: 'https://www.gotoper.com/' + activity.get1 + '/' + activity.get2 + '/' + activity.doc,
|
|
75
|
-
pageNumber: currentPage
|
|
76
|
-
});
|
|
77
|
-
});
|
|
52
|
+
case 6:
|
|
53
|
+
newData = _context.sent;
|
|
54
|
+
|
|
78
55
|
|
|
56
|
+
if (newData && newData.length > 0) {
|
|
79
57
|
setIsLoading(false);
|
|
80
58
|
newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
|
|
81
59
|
setData(function (prevData) {
|
|
@@ -84,21 +62,21 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
84
62
|
} else {
|
|
85
63
|
setScrolling(false);
|
|
86
64
|
}
|
|
87
|
-
_context.next =
|
|
65
|
+
_context.next = 13;
|
|
88
66
|
break;
|
|
89
67
|
|
|
90
|
-
case
|
|
91
|
-
_context.prev =
|
|
92
|
-
_context.t0 = _context['catch'](
|
|
68
|
+
case 10:
|
|
69
|
+
_context.prev = 10;
|
|
70
|
+
_context.t0 = _context['catch'](0);
|
|
93
71
|
|
|
94
72
|
console.log(_context.t0);
|
|
95
73
|
|
|
96
|
-
case
|
|
74
|
+
case 13:
|
|
97
75
|
case 'end':
|
|
98
76
|
return _context.stop();
|
|
99
77
|
}
|
|
100
78
|
}
|
|
101
|
-
}, _callee, this, [[
|
|
79
|
+
}, _callee, this, [[0, 10]]);
|
|
102
80
|
}));
|
|
103
81
|
|
|
104
82
|
return function getData(_x) {
|
|
@@ -113,9 +91,8 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
113
91
|
rightItems = _ref.rightItems,
|
|
114
92
|
_ref$seoPaginate = _ref.seoPaginate,
|
|
115
93
|
seoPaginate = _ref$seoPaginate === undefined ? true : _ref$seoPaginate,
|
|
116
|
-
pageview = _ref.pageview
|
|
117
|
-
_ref
|
|
118
|
-
keywords = _ref$keywords === undefined ? '' : _ref$keywords;
|
|
94
|
+
pageview = _ref.pageview;
|
|
95
|
+
_ref.keywords;
|
|
119
96
|
|
|
120
97
|
var router = useRouter();
|
|
121
98
|
|
|
@@ -147,9 +124,10 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
147
124
|
var currentPageRef = useRef(currentPage);
|
|
148
125
|
var fromeRef = useRef(from);
|
|
149
126
|
|
|
127
|
+
|
|
150
128
|
useEffect(function () {
|
|
151
129
|
// load initial data
|
|
152
|
-
getData({ from: from,
|
|
130
|
+
getData({ from: from, to: itemsPerPage, itemsPerPage: itemsPerPage, currentPage: currentPage });
|
|
153
131
|
}, []);
|
|
154
132
|
|
|
155
133
|
var changePageNumber = function changePageNumber(pageNumber) {
|
|
@@ -221,86 +199,100 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
221
199
|
var cardLoader = function cardLoader() {
|
|
222
200
|
var numberOfItemsBeforeAd = 6;
|
|
223
201
|
return React.createElement(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
202
|
+
'div',
|
|
203
|
+
{ id: 'ceToggles' },
|
|
204
|
+
React.createElement(
|
|
205
|
+
'div',
|
|
206
|
+
{ style: { maxWidth: '50%', padding: '0.5rem' } },
|
|
207
|
+
React.createElement('img', { src: 'https://gotoper-com.s3.amazonaws.com/_media/_image/PER_Logo.svg', alt: 'per logo' }),
|
|
208
|
+
React.createElement(
|
|
209
|
+
'p',
|
|
210
|
+
{ style: { margin: '0', fontWeight: '700', width: '100%', textAlign: 'center', fontSize: '1rem' } },
|
|
211
|
+
'Physician Education'
|
|
212
|
+
)
|
|
213
|
+
),
|
|
214
|
+
React.createElement(
|
|
215
|
+
Row,
|
|
216
|
+
null,
|
|
217
|
+
data && data.map(function (row, index) {
|
|
218
|
+
var pageNumber = row.pageNumber || 1;
|
|
219
|
+
return React.createElement(
|
|
220
|
+
React.Fragment,
|
|
221
|
+
{ key: index },
|
|
222
|
+
React.createElement(
|
|
223
|
+
VisibilitySensor,
|
|
224
|
+
{
|
|
225
|
+
onChange: function onChange(isVisible) {
|
|
226
|
+
isVisible && changePageNumber(pageNumber);
|
|
227
|
+
} },
|
|
228
|
+
variant === 'left' ? React.createElement(
|
|
229
|
+
Col,
|
|
230
|
+
{ xl: 12, style: { marginBottom: '1rem' } },
|
|
243
231
|
React.createElement(
|
|
244
|
-
|
|
245
|
-
|
|
232
|
+
Row,
|
|
233
|
+
null,
|
|
246
234
|
React.createElement(
|
|
247
|
-
|
|
248
|
-
{
|
|
249
|
-
React.createElement(
|
|
235
|
+
Col,
|
|
236
|
+
{ xs: 3, sm: 4, md: 4, lg: 4, xl: 4, style: { padding: '0' } },
|
|
237
|
+
React.createElement(
|
|
238
|
+
'a',
|
|
239
|
+
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
240
|
+
React.createElement('img', { style: { width: '100%', borderRadius: '0 0 0 10%', marginBottom: '20px', borderTop: '1px solid #EEE' }, src: row.thumbnail })
|
|
241
|
+
)
|
|
242
|
+
),
|
|
243
|
+
React.createElement(
|
|
244
|
+
Col,
|
|
245
|
+
{ xs: 9, sm: 8, md: 8, lg: 8, xl: 8, style: { paddingTop: '10px', marginBottom: '20px', borderTop: '1px solid #EEE' } },
|
|
246
|
+
React.createElement(
|
|
247
|
+
'a',
|
|
248
|
+
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
249
|
+
React.createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
250
|
+
React.createElement(
|
|
251
|
+
'p',
|
|
252
|
+
{ className: 'mb-2' },
|
|
253
|
+
row.date
|
|
254
|
+
),
|
|
255
|
+
React.createElement('p', { dangerouslySetInnerHTML: { __html: row.intro } })
|
|
256
|
+
)
|
|
250
257
|
)
|
|
251
|
-
)
|
|
258
|
+
)
|
|
259
|
+
) : React.createElement(
|
|
260
|
+
Row,
|
|
261
|
+
{ style: { margin: '0', padding: '0' } },
|
|
252
262
|
React.createElement(
|
|
253
263
|
Col,
|
|
254
|
-
{ xs: 9, sm: 8,
|
|
264
|
+
{ xs: 9, sm: 8, lg: 8, xl: 8 },
|
|
255
265
|
React.createElement(
|
|
256
266
|
'a',
|
|
257
267
|
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
258
268
|
React.createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
259
269
|
React.createElement(
|
|
260
270
|
'p',
|
|
261
|
-
|
|
271
|
+
null,
|
|
262
272
|
row.date
|
|
263
273
|
),
|
|
264
274
|
React.createElement('p', { dangerouslySetInnerHTML: { __html: row.intro } })
|
|
265
275
|
)
|
|
266
|
-
)
|
|
267
|
-
)
|
|
268
|
-
) : React.createElement(
|
|
269
|
-
Row,
|
|
270
|
-
{ style: { margin: '0', padding: '0' } },
|
|
271
|
-
React.createElement(
|
|
272
|
-
Col,
|
|
273
|
-
{ xs: 9, sm: 8, lg: 8, xl: 8 },
|
|
276
|
+
),
|
|
274
277
|
React.createElement(
|
|
275
|
-
|
|
276
|
-
{
|
|
277
|
-
React.createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
278
|
+
Col,
|
|
279
|
+
{ xs: 3, sm: 4, lg: 4, xl: 4 },
|
|
278
280
|
React.createElement(
|
|
279
|
-
'
|
|
280
|
-
|
|
281
|
-
row.
|
|
282
|
-
)
|
|
283
|
-
React.createElement('p', { dangerouslySetInnerHTML: { __html: row.intro } })
|
|
284
|
-
)
|
|
285
|
-
),
|
|
286
|
-
React.createElement(
|
|
287
|
-
Col,
|
|
288
|
-
{ xs: 3, sm: 4, lg: 4, xl: 4 },
|
|
289
|
-
React.createElement(
|
|
290
|
-
'a',
|
|
291
|
-
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
292
|
-
React.createElement('img', { style: { width: '100%', borderRadius: '0 0 10% 0' }, src: row.thumbnail && urlFor(row.thumbnail.asset).url() })
|
|
281
|
+
'a',
|
|
282
|
+
{ rel: 'noopener', href: row.href, target: '_blank' },
|
|
283
|
+
React.createElement('img', { style: { width: '100%', borderRadius: '0 0 10% 0' }, src: row.thumbnail && urlFor(row.thumbnail.asset).url() })
|
|
284
|
+
)
|
|
293
285
|
)
|
|
294
286
|
)
|
|
287
|
+
),
|
|
288
|
+
main_40 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React.createElement(
|
|
289
|
+
'div',
|
|
290
|
+
{ style: { margin: '0 auto' } },
|
|
291
|
+
renderMobileAd(index, numberOfItemsBeforeAd)
|
|
295
292
|
)
|
|
296
|
-
)
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
{ style: { margin: '0 auto' } },
|
|
300
|
-
renderMobileAd(index, numberOfItemsBeforeAd)
|
|
301
|
-
)
|
|
302
|
-
);
|
|
303
|
-
})
|
|
293
|
+
);
|
|
294
|
+
})
|
|
295
|
+
)
|
|
304
296
|
);
|
|
305
297
|
};
|
|
306
298
|
|