@mjhls/mjh-framework 1.0.238 → 1.0.240
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/AdSlot-c472fff6.js +1192 -0
- package/dist/cjs/DeckContent.js +6 -5
- package/dist/cjs/DeckQueue.js +5 -5
- package/dist/cjs/{Dfp-045b016b.js → Dfp-7a5533f9.js} +1 -1
- package/dist/cjs/{GridContent-53e78cbf.js → GridContent-f9e3fff5.js} +7 -7
- package/dist/cjs/GridContent.js +8 -7
- package/dist/cjs/MasterDeck.js +331 -13
- package/dist/cjs/{Normal-a94a1ec8.js → Normal-0497eb61.js} +5 -5
- package/dist/cjs/QueueDeckExpanded.js +2 -2
- package/dist/cjs/TemplateNormal.js +6 -5
- package/dist/cjs/VideoSeriesListing.js +2 -2
- package/dist/cjs/{debounce-bbca43c4.js → debounce-783eb233.js} +3 -0
- package/dist/cjs/{get-af2516a4.js → get-1f91592f.js} +1 -1
- package/dist/cjs/index.js +118 -842
- package/dist/cjs/{inherits-5b5ca8db.js → inherits-9898af5a.js} +2 -4
- package/dist/cjs/{main-d9a1b014.js → main-0ea1b808.js} +51 -0
- package/dist/cjs/{MasterDeck-91c6ad85.js → promise-b96c61f8.js} +7 -340
- package/dist/cjs/{toConsumableArray-7e4caf3c.js → toConsumableArray-f05a306f.js} +5 -52
- package/dist/esm/AdSlot-bdd7a629.js +1183 -0
- package/dist/esm/DeckContent.js +11 -10
- package/dist/esm/DeckQueue.js +9 -9
- package/dist/esm/{Dfp-01f14ae3.js → Dfp-71879c9d.js} +5 -5
- package/dist/esm/{GridContent-f5bc4d75.js → GridContent-d4f5457e.js} +8 -8
- package/dist/esm/GridContent.js +13 -12
- package/dist/esm/MasterDeck.js +333 -15
- package/dist/esm/{Normal-357f00d1.js → Normal-e1855047.js} +6 -6
- package/dist/esm/QueueDeckExpanded.js +7 -7
- package/dist/esm/{TaxonomyCard-f74512cb.js → TaxonomyCard-ee1a22ae.js} +1 -1
- package/dist/esm/TaxonomyCard.js +3 -3
- package/dist/esm/TemplateNormal.js +10 -9
- package/dist/esm/{Ustream-62a07a32.js → Ustream-d51b9b11.js} +1 -1
- package/dist/esm/Ustream.js +5 -5
- package/dist/esm/VideoSeriesListing.js +5 -5
- package/dist/esm/{_to-object-86553f76.js → _to-object-b9b796ec.js} +1 -1
- package/dist/esm/{core.get-iterator-method-709061dc.js → core.get-iterator-method-31c1fb1a.js} +2 -2
- package/dist/esm/{debounce-fa7fbf11.js → debounce-806f886b.js} +3 -1
- package/dist/esm/{extends-7f88fa22.js → extends-dbbe308d.js} +1 -1
- package/dist/esm/{get-8d382479.js → get-b2201dc8.js} +1 -1
- package/dist/esm/index.js +124 -850
- package/dist/esm/{inherits-a82a4471.js → inherits-a75c8a1c.js} +5 -6
- package/dist/esm/{main-eecf7b27.js → main-155ec04f.js} +48 -1
- package/dist/esm/{MasterDeck-5dd97a66.js → promise-683a9c54.js} +6 -335
- package/dist/esm/{slicedToArray-eb7eca9e.js → slicedToArray-d0a9593a.js} +3 -3
- package/dist/esm/{toConsumableArray-08d50169.js → toConsumableArray-eb308ede.js} +5 -49
- package/dist/esm/{web.dom.iterable-f05d2f57.js → web.dom.iterable-3be50d6c.js} +2 -2
- package/package.json +3 -2
- package/dist/cjs/AdSlot-1fe1c231.js +0 -69
- package/dist/esm/AdSlot-017b8051.js +0 -64
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var _library = true;
|
|
2
|
+
import { b as _core, c as _export, d as _fails, a as _toObject, e as _objectDp, f as _descriptors, g as _uid, h as _isObject, i as _has, _ as _objectKeys, j as _cof, k as _objectKeysInternal, l as _enumBugKeys, m as _toIobject, n as _toPrimitive, o as _ie8DomDefine, p as _propertyDesc, q as _global, r as _shared, s as _hide, t as _anObject, u as _ctx } from './_to-object-b9b796ec.js';
|
|
3
|
+
import { _ as _objectGpo, a as _wks, b as _redefine, c as _setToStringTag, d as _objectCreate } from './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import { _ as _library } from './debounce-806f886b.js';
|
|
5
|
+
import { a as _objectGops, b as _objectPie } from './extends-dbbe308d.js';
|
|
7
6
|
|
|
8
7
|
// most Object methods by ES6 should accept primitives
|
|
9
8
|
|
|
@@ -639,4 +638,4 @@ exports.default = function (subClass, superClass) {
|
|
|
639
638
|
|
|
640
639
|
var _inherits = unwrapExports(inherits);
|
|
641
640
|
|
|
642
|
-
export { _objectSap as _, _inherits as a, _classCallCheck as b, _possibleConstructorReturn as c, _Object$getPrototypeOf as d, _createClass as e
|
|
641
|
+
export { _objectSap as _, _inherits as a, _classCallCheck as b, _possibleConstructorReturn as c, _Object$getPrototypeOf as d, _createClass as e };
|
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
import { c as createCommonjsModule, a as commonjsGlobal, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import { t as _anObject } from './_to-object-b9b796ec.js';
|
|
3
|
+
import { a as _wks, e as _iterators } from './web.dom.iterable-3be50d6c.js';
|
|
2
4
|
import React__default from 'react';
|
|
3
5
|
|
|
6
|
+
// call something on iterator step with safe closing on error
|
|
7
|
+
|
|
8
|
+
var _iterCall = function (iterator, fn, value, entries) {
|
|
9
|
+
try {
|
|
10
|
+
return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
|
|
11
|
+
// 7.4.6 IteratorClose(iterator, completion)
|
|
12
|
+
} catch (e) {
|
|
13
|
+
var ret = iterator['return'];
|
|
14
|
+
if (ret !== undefined) _anObject(ret.call(iterator));
|
|
15
|
+
throw e;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// check on default Array iterator
|
|
20
|
+
|
|
21
|
+
var ITERATOR = _wks('iterator');
|
|
22
|
+
var ArrayProto = Array.prototype;
|
|
23
|
+
|
|
24
|
+
var _isArrayIter = function (it) {
|
|
25
|
+
return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var ITERATOR$1 = _wks('iterator');
|
|
29
|
+
var SAFE_CLOSING = false;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
var riter = [7][ITERATOR$1]();
|
|
33
|
+
riter['return'] = function () { SAFE_CLOSING = true; };
|
|
34
|
+
// eslint-disable-next-line no-throw-literal
|
|
35
|
+
Array.from(riter, function () { throw 2; });
|
|
36
|
+
} catch (e) { /* empty */ }
|
|
37
|
+
|
|
38
|
+
var _iterDetect = function (exec, skipClosing) {
|
|
39
|
+
if (!skipClosing && !SAFE_CLOSING) return false;
|
|
40
|
+
var safe = false;
|
|
41
|
+
try {
|
|
42
|
+
var arr = [7];
|
|
43
|
+
var iter = arr[ITERATOR$1]();
|
|
44
|
+
iter.next = function () { return { done: safe = true }; };
|
|
45
|
+
arr[ITERATOR$1] = function () { return iter; };
|
|
46
|
+
exec(arr);
|
|
47
|
+
} catch (e) { /* empty */ }
|
|
48
|
+
return safe;
|
|
49
|
+
};
|
|
50
|
+
|
|
4
51
|
var uaParser_min = createCommonjsModule(function (module, exports) {
|
|
5
52
|
/*!
|
|
6
53
|
* UAParser.js v0.7.21
|
|
@@ -848,4 +895,4 @@ var main_47 = main.osName;
|
|
|
848
895
|
var main_48 = main.osVersion;
|
|
849
896
|
var main_49 = main.withOrientationChange;
|
|
850
897
|
|
|
851
|
-
export {
|
|
898
|
+
export { _iterDetect as _, main_16 as a, main_35 as b, main_37 as c, _isArrayIter as d, _iterCall as e, main_36 as m };
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as core_getIteratorMethod, _ as _classof } from './core.get-iterator-method-
|
|
7
|
-
import { _ as _extends } from './extends-7f88fa22.js';
|
|
8
|
-
import React__default from 'react';
|
|
9
|
-
import { l as lib_3 } from './index-fa84ea96.js';
|
|
10
|
-
import Container from 'react-bootstrap/Container';
|
|
11
|
-
import Row from 'react-bootstrap/Row';
|
|
12
|
-
import 'react-bootstrap/Col';
|
|
13
|
-
import 'react-bootstrap/Card';
|
|
14
|
-
import { V as VisibilitySensor, I as InfiniteScroll } from './visibility-sensor-336093e1.js';
|
|
15
|
-
import 'next/link';
|
|
16
|
-
import { withRouter } from 'next/router';
|
|
17
|
-
import { d as debounce_1 } from './debounce-fa7fbf11.js';
|
|
18
|
-
import './index-3849e3fe.js';
|
|
19
|
-
import { m as main_36 } from './main-eecf7b27.js';
|
|
2
|
+
import { u as _ctx, w as _toLength, t as _anObject, x as _aFunction, q as _global, j as _cof, y as _domCreate, h as _isObject, s as _hide, b as _core, f as _descriptors, e as _objectDp, c as _export } from './_to-object-b9b796ec.js';
|
|
3
|
+
import { a as _wks, f as _html, c as _setToStringTag } from './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import { _ as _library } from './debounce-806f886b.js';
|
|
5
|
+
import { d as _isArrayIter, e as _iterCall, _ as _iterDetect } from './main-155ec04f.js';
|
|
6
|
+
import { c as core_getIteratorMethod, _ as _classof } from './core.get-iterator-method-31c1fb1a.js';
|
|
20
7
|
|
|
21
8
|
var _anInstance = function (it, Constructor, name, forbiddenField) {
|
|
22
9
|
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
|
|
@@ -591,320 +578,4 @@ module.exports = { "default": promise, __esModule: true };
|
|
|
591
578
|
|
|
592
579
|
var _Promise = unwrapExports(promise$1);
|
|
593
580
|
|
|
594
|
-
|
|
595
|
-
_inherits(MasterDeck, _React$Component);
|
|
596
|
-
|
|
597
|
-
function MasterDeck() {
|
|
598
|
-
var _ref,
|
|
599
|
-
_this2 = this;
|
|
600
|
-
|
|
601
|
-
var _temp, _this, _ret;
|
|
602
|
-
|
|
603
|
-
_classCallCheck(this, MasterDeck);
|
|
604
|
-
|
|
605
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
606
|
-
args[_key] = arguments[_key];
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = MasterDeck.__proto__ || _Object$getPrototypeOf(MasterDeck)).call.apply(_ref, [this].concat(args))), _this), _this.Deck = _this.props.deck, _this.variant = _this.props.variant, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord || [], _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.rightItems = _this.props.rightItems ? _this.props.rightItems : false, _this.state = {
|
|
610
|
-
data: _this.data,
|
|
611
|
-
dataKeptToCompareNewDatarecord: _this.data,
|
|
612
|
-
per: _this.params ? _this.params.to : 2,
|
|
613
|
-
page: _this.props.currentPage || 1,
|
|
614
|
-
from: _this.params ? _this.params.from : 0,
|
|
615
|
-
to: _this.params ? _this.params.to : 2,
|
|
616
|
-
total_pages: null,
|
|
617
|
-
scrolling: true,
|
|
618
|
-
query: _this.query,
|
|
619
|
-
currentPage: _this.props.currentPage || 1
|
|
620
|
-
}, _this.loadMore = debounce_1(function () {
|
|
621
|
-
_this.setState(function (state) {
|
|
622
|
-
var page = state.page,
|
|
623
|
-
from = state.from,
|
|
624
|
-
per = state.per,
|
|
625
|
-
to = state.to;
|
|
626
|
-
|
|
627
|
-
return {
|
|
628
|
-
page: page + 1,
|
|
629
|
-
from: from + per,
|
|
630
|
-
to: to + per
|
|
631
|
-
};
|
|
632
|
-
}, _this.loadData);
|
|
633
|
-
}, 0), _this.loadData = function () {
|
|
634
|
-
var _this$state = _this.state,
|
|
635
|
-
from = _this$state.from,
|
|
636
|
-
to = _this$state.to,
|
|
637
|
-
data = _this$state.data,
|
|
638
|
-
query = _this$state.query,
|
|
639
|
-
page = _this$state.page;
|
|
640
|
-
var _this$props = _this.props,
|
|
641
|
-
client = _this$props.client,
|
|
642
|
-
dataHandler = _this$props.dataHandler;
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
var params = _extends({}, _this.params, { from: from, to: to });
|
|
646
|
-
|
|
647
|
-
if (dataHandler) {
|
|
648
|
-
var dataHandlerPromise = new _Promise(function (resolve, reject) {
|
|
649
|
-
try {
|
|
650
|
-
var result = dataHandler(params);
|
|
651
|
-
resolve(result);
|
|
652
|
-
} catch (e) {
|
|
653
|
-
reject(e);
|
|
654
|
-
}
|
|
655
|
-
});
|
|
656
|
-
dataHandlerPromise.then(function (dataArr) {
|
|
657
|
-
_this.loadDataFinished(data, dataArr, page);
|
|
658
|
-
});
|
|
659
|
-
} else {
|
|
660
|
-
client.fetch(query, params).then(function (dataArr) {
|
|
661
|
-
_this.loadDataFinished(data, dataArr, page);
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
}, _this.loadDataFinished = function (data, dataArr, page) {
|
|
665
|
-
if (_this.pointer && _this.pointerArray) {
|
|
666
|
-
var pointer = _this.pointer;
|
|
667
|
-
dataArr = dataArr[_this.pointerArray][pointer];
|
|
668
|
-
}
|
|
669
|
-
dataArr = dataArr.map(function (item) {
|
|
670
|
-
return _extends({}, item, {
|
|
671
|
-
pageNumber: page
|
|
672
|
-
});
|
|
673
|
-
});
|
|
674
|
-
|
|
675
|
-
_this.setState(function () {
|
|
676
|
-
if (dataArr.length > 0) {
|
|
677
|
-
return {
|
|
678
|
-
data: [].concat(_toConsumableArray(data), _toConsumableArray(dataArr)),
|
|
679
|
-
scrolling: true
|
|
680
|
-
};
|
|
681
|
-
} else {
|
|
682
|
-
return {
|
|
683
|
-
scrolling: false
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
});
|
|
687
|
-
}, _this.changePageNumber = function (pageNumber) {
|
|
688
|
-
var _this$props2 = _this.props,
|
|
689
|
-
seoPaginate = _this$props2.seoPaginate,
|
|
690
|
-
pageview = _this$props2.pageview,
|
|
691
|
-
router = _this$props2.router;
|
|
692
|
-
var currentPage = _this.state.currentPage;
|
|
693
|
-
|
|
694
|
-
if (seoPaginate) {
|
|
695
|
-
var path = router.asPath;
|
|
696
|
-
var qrIndex = path.indexOf('?');
|
|
697
|
-
var pathname = router.pathname;
|
|
698
|
-
var queryString = '';
|
|
699
|
-
|
|
700
|
-
if (qrIndex > 0) {
|
|
701
|
-
path = path.substring(1, qrIndex);
|
|
702
|
-
|
|
703
|
-
var partialQS = router.asPath.substring(qrIndex + 1);
|
|
704
|
-
var partialQSArr = partialQS.split('&');
|
|
705
|
-
|
|
706
|
-
// exclude page=xxx from query string
|
|
707
|
-
partialQSArr.map(function (item) {
|
|
708
|
-
var itemArr = item.split('=');
|
|
709
|
-
var key = itemArr[0];
|
|
710
|
-
var val = itemArr[1];
|
|
711
|
-
|
|
712
|
-
if (key !== 'page') {
|
|
713
|
-
queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
|
|
714
|
-
}
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
if (queryString.length > 0) {
|
|
719
|
-
path += '?' + queryString;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
pageNumber = parseInt(pageNumber);
|
|
723
|
-
|
|
724
|
-
if (currentPage !== pageNumber) {
|
|
725
|
-
lib_3.refresh();
|
|
726
|
-
|
|
727
|
-
_this.setState({
|
|
728
|
-
currentPage: pageNumber
|
|
729
|
-
}, function () {
|
|
730
|
-
if (path[0] !== '/') {
|
|
731
|
-
path = '/' + path;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
735
|
-
|
|
736
|
-
// please leave this for later debug purpose : Yong Jun.
|
|
737
|
-
/* console.log('page change reported', {
|
|
738
|
-
currentPage: currentPage,
|
|
739
|
-
pageNumber: pageNumber,
|
|
740
|
-
pathname: pathname,
|
|
741
|
-
path: path,
|
|
742
|
-
newPath: newPath,
|
|
743
|
-
firstPage: pageNumber === 1,
|
|
744
|
-
queryString: queryString
|
|
745
|
-
}) */
|
|
746
|
-
|
|
747
|
-
if (pageview) {
|
|
748
|
-
pageview(newPath);
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
router.push(pathname, newPath, {
|
|
752
|
-
shallow: true
|
|
753
|
-
});
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}, _this.cardLoader = function (page, columns, variant) {
|
|
758
|
-
var numberOfItemsBeforeAd = 6;
|
|
759
|
-
return React__default.createElement(
|
|
760
|
-
Row,
|
|
761
|
-
null,
|
|
762
|
-
_this.state.data && _this.state.data.map(function (row, index) {
|
|
763
|
-
var pageNumber = row.pageNumber || _this.state.page;
|
|
764
|
-
|
|
765
|
-
return React__default.createElement(
|
|
766
|
-
React__default.Fragment,
|
|
767
|
-
{ key: index },
|
|
768
|
-
React__default.createElement(
|
|
769
|
-
VisibilitySensor,
|
|
770
|
-
{
|
|
771
|
-
onChange: function onChange(isVisible) {
|
|
772
|
-
isVisible && _this.changePageNumber(pageNumber);
|
|
773
|
-
} },
|
|
774
|
-
React__default.createElement(_this2.Deck, { data: row, variant: variant, index: index, client: _this.props.client, defaultImage: _this.defaultImage })
|
|
775
|
-
),
|
|
776
|
-
main_36 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
|
|
777
|
-
'div',
|
|
778
|
-
{ style: { margin: '0 auto' } },
|
|
779
|
-
_this.renderMobileAd(index, numberOfItemsBeforeAd, _this.rightItems)
|
|
780
|
-
)
|
|
781
|
-
);
|
|
782
|
-
})
|
|
783
|
-
);
|
|
784
|
-
}, _this.renderMobileAd = function (index, numberOfItemsBeforeAd, rightItems) {
|
|
785
|
-
var i = ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
786
|
-
return React__default.createElement(
|
|
787
|
-
'div',
|
|
788
|
-
{ style: { display: 'flex', flex: '1 0 auto', width: '100%', textAlign: 'center', marginBottom: '2rem' } },
|
|
789
|
-
rightItems[i].component
|
|
790
|
-
);
|
|
791
|
-
}, _this.renderManualPagination = function () {
|
|
792
|
-
var currentPage = _this.state.currentPage;
|
|
793
|
-
|
|
794
|
-
return React__default.createElement(
|
|
795
|
-
'div',
|
|
796
|
-
{ className: 'd-flex justify-content-between' },
|
|
797
|
-
currentPage && currentPage > 1 && React__default.createElement(
|
|
798
|
-
'a',
|
|
799
|
-
{ href: '?page=' + (currentPage - 1) },
|
|
800
|
-
'<< Previous'
|
|
801
|
-
),
|
|
802
|
-
React__default.createElement(
|
|
803
|
-
'a',
|
|
804
|
-
{ href: '?page=' + (currentPage + 1) },
|
|
805
|
-
'Next >>'
|
|
806
|
-
)
|
|
807
|
-
);
|
|
808
|
-
}, _temp), _possibleConstructorReturn(_this, _ret);
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
_createClass(MasterDeck, [{
|
|
812
|
-
key: 'componentDidUpdate',
|
|
813
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
814
|
-
if (this.state.dataKeptToCompareNewDatarecord !== this.props.dataRecord) {
|
|
815
|
-
// eslint-disable-next-line react/no-did-update-set-state
|
|
816
|
-
this.setState({
|
|
817
|
-
data: this.props.dataRecord,
|
|
818
|
-
dataKeptToCompareNewDatarecord: this.props.dataRecord,
|
|
819
|
-
per: this.props.params ? this.props.params.to : 2,
|
|
820
|
-
page: 1,
|
|
821
|
-
from: this.props.params ? this.props.params.from : 0,
|
|
822
|
-
to: this.props.params ? this.props.params.to : 2,
|
|
823
|
-
total_pages: null,
|
|
824
|
-
scrolling: true,
|
|
825
|
-
query: this.props.query
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
}, {
|
|
830
|
-
key: 'componentDidMount',
|
|
831
|
-
value: function componentDidMount() {
|
|
832
|
-
// this.loadData();
|
|
833
|
-
}
|
|
834
|
-
}, {
|
|
835
|
-
key: 'render',
|
|
836
|
-
value: function render() {
|
|
837
|
-
var _this3 = this;
|
|
838
|
-
|
|
839
|
-
var _props = this.props,
|
|
840
|
-
columns = _props.columns,
|
|
841
|
-
variant = _props.variant,
|
|
842
|
-
autoScroll = _props.autoScroll,
|
|
843
|
-
page = _props.page;
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
return React__default.createElement(
|
|
847
|
-
'div',
|
|
848
|
-
{ className: 'contentDeck' },
|
|
849
|
-
autoScroll ? React__default.createElement(
|
|
850
|
-
React__default.Fragment,
|
|
851
|
-
null,
|
|
852
|
-
React__default.createElement(
|
|
853
|
-
InfiniteScroll,
|
|
854
|
-
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
|
|
855
|
-
React__default.createElement(
|
|
856
|
-
Container,
|
|
857
|
-
null,
|
|
858
|
-
this.cardLoader(page, columns, variant)
|
|
859
|
-
)
|
|
860
|
-
),
|
|
861
|
-
React__default.createElement(
|
|
862
|
-
'noscript',
|
|
863
|
-
null,
|
|
864
|
-
this.renderManualPagination()
|
|
865
|
-
)
|
|
866
|
-
) : React__default.createElement(
|
|
867
|
-
React__default.Fragment,
|
|
868
|
-
null,
|
|
869
|
-
React__default.createElement(
|
|
870
|
-
Container,
|
|
871
|
-
null,
|
|
872
|
-
this.cardLoader(page, columns, variant)
|
|
873
|
-
),
|
|
874
|
-
React__default.createElement(
|
|
875
|
-
'div',
|
|
876
|
-
{ style: { padding: '0px 10px' } },
|
|
877
|
-
this.state.scrolling ? React__default.createElement(
|
|
878
|
-
'button',
|
|
879
|
-
{
|
|
880
|
-
style: { margin: 'auto', width: '100%' },
|
|
881
|
-
onClick: function onClick(e) {
|
|
882
|
-
_this3.loadMore();
|
|
883
|
-
} },
|
|
884
|
-
'Load More'
|
|
885
|
-
) : React__default.createElement(
|
|
886
|
-
'p',
|
|
887
|
-
{ style: { textAlign: 'center' } },
|
|
888
|
-
React__default.createElement(
|
|
889
|
-
'b',
|
|
890
|
-
null,
|
|
891
|
-
'End of data'
|
|
892
|
-
)
|
|
893
|
-
)
|
|
894
|
-
),
|
|
895
|
-
React__default.createElement(
|
|
896
|
-
'noscript',
|
|
897
|
-
null,
|
|
898
|
-
this.renderManualPagination()
|
|
899
|
-
)
|
|
900
|
-
)
|
|
901
|
-
);
|
|
902
|
-
}
|
|
903
|
-
}]);
|
|
904
|
-
|
|
905
|
-
return MasterDeck;
|
|
906
|
-
}(React__default.Component);
|
|
907
|
-
|
|
908
|
-
var MasterDeck$1 = withRouter(MasterDeck);
|
|
909
|
-
|
|
910
|
-
export { MasterDeck$1 as M, promise$1 as p };
|
|
581
|
+
export { _Promise as _, promise$1 as p };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as _classof, c as core_getIteratorMethod } from './core.get-iterator-method-
|
|
2
|
+
import { b as _core, t as _anObject } from './_to-object-b9b796ec.js';
|
|
3
|
+
import { a as _wks, e as _iterators } from './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import { _ as _classof, c as core_getIteratorMethod } from './core.get-iterator-method-31c1fb1a.js';
|
|
5
5
|
|
|
6
6
|
var ITERATOR = _wks('iterator');
|
|
7
7
|
|
|
@@ -1,58 +1,14 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { e as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
// call something on iterator step with safe closing on error
|
|
7
|
-
|
|
8
|
-
var _iterCall = function (iterator, fn, value, entries) {
|
|
9
|
-
try {
|
|
10
|
-
return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
|
|
11
|
-
// 7.4.6 IteratorClose(iterator, completion)
|
|
12
|
-
} catch (e) {
|
|
13
|
-
var ret = iterator['return'];
|
|
14
|
-
if (ret !== undefined) _anObject(ret.call(iterator));
|
|
15
|
-
throw e;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// check on default Array iterator
|
|
20
|
-
|
|
21
|
-
var ITERATOR = _wks('iterator');
|
|
22
|
-
var ArrayProto = Array.prototype;
|
|
23
|
-
|
|
24
|
-
var _isArrayIter = function (it) {
|
|
25
|
-
return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
26
|
-
};
|
|
2
|
+
import { e as _objectDp, p as _propertyDesc, c as _export, a as _toObject, u as _ctx, w as _toLength, b as _core } from './_to-object-b9b796ec.js';
|
|
3
|
+
import './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import { _ as _iterDetect, d as _isArrayIter, e as _iterCall } from './main-155ec04f.js';
|
|
5
|
+
import { c as core_getIteratorMethod } from './core.get-iterator-method-31c1fb1a.js';
|
|
27
6
|
|
|
28
7
|
var _createProperty = function (object, index, value) {
|
|
29
8
|
if (index in object) _objectDp.f(object, index, _propertyDesc(0, value));
|
|
30
9
|
else object[index] = value;
|
|
31
10
|
};
|
|
32
11
|
|
|
33
|
-
var ITERATOR$1 = _wks('iterator');
|
|
34
|
-
var SAFE_CLOSING = false;
|
|
35
|
-
|
|
36
|
-
try {
|
|
37
|
-
var riter = [7][ITERATOR$1]();
|
|
38
|
-
riter['return'] = function () { SAFE_CLOSING = true; };
|
|
39
|
-
// eslint-disable-next-line no-throw-literal
|
|
40
|
-
Array.from(riter, function () { throw 2; });
|
|
41
|
-
} catch (e) { /* empty */ }
|
|
42
|
-
|
|
43
|
-
var _iterDetect = function (exec, skipClosing) {
|
|
44
|
-
if (!skipClosing && !SAFE_CLOSING) return false;
|
|
45
|
-
var safe = false;
|
|
46
|
-
try {
|
|
47
|
-
var arr = [7];
|
|
48
|
-
var iter = arr[ITERATOR$1]();
|
|
49
|
-
iter.next = function () { return { done: safe = true }; };
|
|
50
|
-
arr[ITERATOR$1] = function () { return iter; };
|
|
51
|
-
exec(arr);
|
|
52
|
-
} catch (e) { /* empty */ }
|
|
53
|
-
return safe;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
12
|
_export(_export.S + _export.F * !_iterDetect(function (iter) { Array.from(iter); }), 'Array', {
|
|
57
13
|
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
|
|
58
14
|
from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
@@ -114,4 +70,4 @@ exports.default = function (arr) {
|
|
|
114
70
|
|
|
115
71
|
var _toConsumableArray = unwrapExports(toConsumableArray);
|
|
116
72
|
|
|
117
|
-
export { _toConsumableArray as _, _Array$from as a
|
|
73
|
+
export { _toConsumableArray as _, _Array$from as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { z as _defined, A as _toInteger,
|
|
2
|
+
import { z as _defined, A as _toInteger, s as _hide, f as _descriptors, t as _anObject, _ as _objectKeys, e as _objectDp, q as _global, B as _sharedKey, y as _domCreate, l as _enumBugKeys, r as _shared, g as _uid, i as _has, p as _propertyDesc, a as _toObject, c as _export, m as _toIobject } from './_to-object-b9b796ec.js';
|
|
3
3
|
|
|
4
4
|
// true -> String#at
|
|
5
5
|
// false -> String#codePointAt
|
|
@@ -243,4 +243,4 @@ for (var i = 0; i < DOMIterables.length; i++) {
|
|
|
243
243
|
_iterators[NAME] = _iterators.Array;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
export {
|
|
246
|
+
export { _objectGpo as _, _wks as a, _redefine as b, _setToStringTag as c, _objectCreate as d, _iterators as e, _html as f };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjhls/mjh-framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.240",
|
|
4
4
|
"description": "Foundation Framework",
|
|
5
5
|
"author": "mjh-framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
"next-cookies": "^2.0.3",
|
|
97
97
|
"react-cookies": "^0.1.1",
|
|
98
98
|
"shortid": "^2.2.15",
|
|
99
|
-
"striptags": "^3.1.1"
|
|
99
|
+
"striptags": "^3.1.1",
|
|
100
|
+
"superagent": "^5.2.2"
|
|
100
101
|
}
|
|
101
102
|
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var React__default = _interopDefault(React);
|
|
7
|
-
var index = require('./index-fa3cec70.js');
|
|
8
|
-
var PropTypes = _interopDefault(require('prop-types'));
|
|
9
|
-
var debounce = require('./debounce-bbca43c4.js');
|
|
10
|
-
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
11
|
-
|
|
12
|
-
var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
13
|
-
var adUnit = _ref.adUnit,
|
|
14
|
-
sizeMapping = _ref.sizeMapping,
|
|
15
|
-
className = _ref.className,
|
|
16
|
-
slotId = _ref.slotId,
|
|
17
|
-
sizes = _ref.sizes,
|
|
18
|
-
_ref$targeting = _ref.targeting,
|
|
19
|
-
targeting = _ref$targeting === undefined ? {} : _ref$targeting;
|
|
20
|
-
|
|
21
|
-
var _useState = React.useState(false),
|
|
22
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
23
|
-
adRendered = _useState2[0],
|
|
24
|
-
setAdRendered = _useState2[1];
|
|
25
|
-
|
|
26
|
-
var _useState3 = React.useState(false),
|
|
27
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
28
|
-
adRefreshable = _useState4[0],
|
|
29
|
-
setAdRefreshable = _useState4[1];
|
|
30
|
-
|
|
31
|
-
var handleVisibilityChange = debounce.debounce_1(function (_ref2) {
|
|
32
|
-
var event = _ref2.event;
|
|
33
|
-
|
|
34
|
-
if (event.inViewPercentage <= 0) {
|
|
35
|
-
setAdRefreshable(false);
|
|
36
|
-
} else {
|
|
37
|
-
setAdRefreshable(true);
|
|
38
|
-
}
|
|
39
|
-
}, 500);
|
|
40
|
-
|
|
41
|
-
return React__default.createElement(
|
|
42
|
-
'div',
|
|
43
|
-
{ className: className },
|
|
44
|
-
React__default.createElement(index.lib_2, {
|
|
45
|
-
slotId: slotId,
|
|
46
|
-
sizes: sizes,
|
|
47
|
-
adUnit: adUnit,
|
|
48
|
-
sizeMapping: sizeMapping,
|
|
49
|
-
targetingArguments: targeting,
|
|
50
|
-
onSlotRender: function onSlotRender(eventData) {
|
|
51
|
-
setAdRendered(true);
|
|
52
|
-
},
|
|
53
|
-
onSlotVisibilityChanged: handleVisibilityChange,
|
|
54
|
-
shouldRefresh: function shouldRefresh() {
|
|
55
|
-
if (adRendered && adRefreshable) return true;else return false;
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
DFPAdSlot.propTypes = {
|
|
62
|
-
adUnit: PropTypes.string.isRequired,
|
|
63
|
-
slotId: PropTypes.string,
|
|
64
|
-
className: PropTypes.string,
|
|
65
|
-
sizeMapping: PropTypes.array,
|
|
66
|
-
sizes: PropTypes.array
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
exports.DFPAdSlot = DFPAdSlot;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React__default, { useState } from 'react';
|
|
2
|
-
import { b as lib_2 } from './index-fa84ea96.js';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { d as debounce_1 } from './debounce-fa7fbf11.js';
|
|
5
|
-
import { _ as _slicedToArray } from './slicedToArray-eb7eca9e.js';
|
|
6
|
-
|
|
7
|
-
var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
8
|
-
var adUnit = _ref.adUnit,
|
|
9
|
-
sizeMapping = _ref.sizeMapping,
|
|
10
|
-
className = _ref.className,
|
|
11
|
-
slotId = _ref.slotId,
|
|
12
|
-
sizes = _ref.sizes,
|
|
13
|
-
_ref$targeting = _ref.targeting,
|
|
14
|
-
targeting = _ref$targeting === undefined ? {} : _ref$targeting;
|
|
15
|
-
|
|
16
|
-
var _useState = useState(false),
|
|
17
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
-
adRendered = _useState2[0],
|
|
19
|
-
setAdRendered = _useState2[1];
|
|
20
|
-
|
|
21
|
-
var _useState3 = useState(false),
|
|
22
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
23
|
-
adRefreshable = _useState4[0],
|
|
24
|
-
setAdRefreshable = _useState4[1];
|
|
25
|
-
|
|
26
|
-
var handleVisibilityChange = debounce_1(function (_ref2) {
|
|
27
|
-
var event = _ref2.event;
|
|
28
|
-
|
|
29
|
-
if (event.inViewPercentage <= 0) {
|
|
30
|
-
setAdRefreshable(false);
|
|
31
|
-
} else {
|
|
32
|
-
setAdRefreshable(true);
|
|
33
|
-
}
|
|
34
|
-
}, 500);
|
|
35
|
-
|
|
36
|
-
return React__default.createElement(
|
|
37
|
-
'div',
|
|
38
|
-
{ className: className },
|
|
39
|
-
React__default.createElement(lib_2, {
|
|
40
|
-
slotId: slotId,
|
|
41
|
-
sizes: sizes,
|
|
42
|
-
adUnit: adUnit,
|
|
43
|
-
sizeMapping: sizeMapping,
|
|
44
|
-
targetingArguments: targeting,
|
|
45
|
-
onSlotRender: function onSlotRender(eventData) {
|
|
46
|
-
setAdRendered(true);
|
|
47
|
-
},
|
|
48
|
-
onSlotVisibilityChanged: handleVisibilityChange,
|
|
49
|
-
shouldRefresh: function shouldRefresh() {
|
|
50
|
-
if (adRendered && adRefreshable) return true;else return false;
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
DFPAdSlot.propTypes = {
|
|
57
|
-
adUnit: PropTypes.string.isRequired,
|
|
58
|
-
slotId: PropTypes.string,
|
|
59
|
-
className: PropTypes.string,
|
|
60
|
-
sizeMapping: PropTypes.array,
|
|
61
|
-
sizes: PropTypes.array
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { DFPAdSlot as D };
|