@mjhls/mjh-framework 1.0.127 → 1.0.129
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 +2 -1
- package/dist/index.es.js +90 -55
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +90 -54
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -24,6 +24,8 @@ import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
|
24
24
|
import Pagination from 'react-bootstrap/Pagination';
|
|
25
25
|
import Carousel$1 from 'react-bootstrap/Carousel';
|
|
26
26
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
27
|
+
import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
28
|
+
import Dropdown$1 from 'react-bootstrap/Dropdown';
|
|
27
29
|
|
|
28
30
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
29
31
|
|
|
@@ -9158,35 +9160,6 @@ var main_47 = main.osName;
|
|
|
9158
9160
|
var main_48 = main.osVersion;
|
|
9159
9161
|
var main_49 = main.withOrientationChange;
|
|
9160
9162
|
|
|
9161
|
-
var asyncToGenerator = function (fn) {
|
|
9162
|
-
return function () {
|
|
9163
|
-
var gen = fn.apply(this, arguments);
|
|
9164
|
-
return new Promise(function (resolve, reject) {
|
|
9165
|
-
function step(key, arg) {
|
|
9166
|
-
try {
|
|
9167
|
-
var info = gen[key](arg);
|
|
9168
|
-
var value = info.value;
|
|
9169
|
-
} catch (error) {
|
|
9170
|
-
reject(error);
|
|
9171
|
-
return;
|
|
9172
|
-
}
|
|
9173
|
-
|
|
9174
|
-
if (info.done) {
|
|
9175
|
-
resolve(value);
|
|
9176
|
-
} else {
|
|
9177
|
-
return Promise.resolve(value).then(function (value) {
|
|
9178
|
-
step("next", value);
|
|
9179
|
-
}, function (err) {
|
|
9180
|
-
step("throw", err);
|
|
9181
|
-
});
|
|
9182
|
-
}
|
|
9183
|
-
}
|
|
9184
|
-
|
|
9185
|
-
return step("next");
|
|
9186
|
-
});
|
|
9187
|
-
};
|
|
9188
|
-
};
|
|
9189
|
-
|
|
9190
9163
|
var classCallCheck = function (instance, Constructor) {
|
|
9191
9164
|
if (!(instance instanceof Constructor)) {
|
|
9192
9165
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -12714,35 +12687,38 @@ var MasterDeck = function (_React$Component) {
|
|
|
12714
12687
|
to: to + per
|
|
12715
12688
|
};
|
|
12716
12689
|
}, _this.loadData);
|
|
12717
|
-
}, 0), _this.loadData =
|
|
12718
|
-
var _this$state
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12690
|
+
}, 0), _this.loadData = function () {
|
|
12691
|
+
var _this$state = _this.state,
|
|
12692
|
+
from = _this$state.from,
|
|
12693
|
+
to = _this$state.to,
|
|
12694
|
+
data = _this$state.data,
|
|
12695
|
+
query = _this$state.query,
|
|
12696
|
+
page = _this$state.page;
|
|
12697
|
+
var _this$props = _this.props,
|
|
12698
|
+
client = _this$props.client,
|
|
12699
|
+
dataHandler = _this$props.dataHandler;
|
|
12727
12700
|
|
|
12728
12701
|
|
|
12729
|
-
|
|
12730
|
-
dataHandler.then(function (dataArr) {
|
|
12731
|
-
loadDataFinished(data, dataArr, page);
|
|
12732
|
-
});
|
|
12733
|
-
} else {
|
|
12734
|
-
client.fetch(query, params).then(function (dataArr) {
|
|
12735
|
-
loadDataFinished(data, dataArr, page);
|
|
12736
|
-
});
|
|
12737
|
-
}
|
|
12702
|
+
var params = _extends({}, _this.params, { from: from, to: to });
|
|
12738
12703
|
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12704
|
+
if (dataHandler) {
|
|
12705
|
+
var dataHandlerPromise = new Promise(function (resolve, reject) {
|
|
12706
|
+
try {
|
|
12707
|
+
var result = dataHandler(params);
|
|
12708
|
+
resolve(result);
|
|
12709
|
+
} catch (e) {
|
|
12710
|
+
reject(e);
|
|
12742
12711
|
}
|
|
12743
|
-
}
|
|
12744
|
-
|
|
12745
|
-
|
|
12712
|
+
});
|
|
12713
|
+
dataHandlerPromise.then(function (dataArr) {
|
|
12714
|
+
_this.loadDataFinished(data, dataArr, page);
|
|
12715
|
+
});
|
|
12716
|
+
} else {
|
|
12717
|
+
client.fetch(query, params).then(function (dataArr) {
|
|
12718
|
+
_this.loadDataFinished(data, dataArr, page);
|
|
12719
|
+
});
|
|
12720
|
+
}
|
|
12721
|
+
}, _this.loadDataFinished = function (data, dataArr, page) {
|
|
12746
12722
|
if (_this.pointer && _this.pointerArray) {
|
|
12747
12723
|
var pointer = _this.pointer;
|
|
12748
12724
|
dataArr = dataArr[_this.pointerArray][pointer];
|
|
@@ -26586,5 +26562,64 @@ var PdfDownload = function PdfDownload(props) {
|
|
|
26586
26562
|
);
|
|
26587
26563
|
};
|
|
26588
26564
|
|
|
26589
|
-
|
|
26565
|
+
var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
26566
|
+
var parentTaxonomy = _ref.parentTaxonomy,
|
|
26567
|
+
subTaxonomies = _ref.subTaxonomies,
|
|
26568
|
+
_ref$page = _ref.page,
|
|
26569
|
+
page = _ref$page === undefined ? '/' : _ref$page,
|
|
26570
|
+
_ref$exclude = _ref.exclude,
|
|
26571
|
+
exclude = _ref$exclude === undefined ? 'clinical' : _ref$exclude,
|
|
26572
|
+
_ref$variant = _ref.variant,
|
|
26573
|
+
variant = _ref$variant === undefined ? 'primary' : _ref$variant,
|
|
26574
|
+
_ref$className = _ref.className,
|
|
26575
|
+
className = _ref$className === undefined ? '' : _ref$className;
|
|
26576
|
+
|
|
26577
|
+
/*
|
|
26578
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
26579
|
+
example:
|
|
26580
|
+
<RelatedTopicDropdown
|
|
26581
|
+
page='/clinical'
|
|
26582
|
+
exclude="clinical"
|
|
26583
|
+
className='mb-3'
|
|
26584
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
26585
|
+
subTaxonomies={props.subTaxonomies}
|
|
26586
|
+
/>
|
|
26587
|
+
*/
|
|
26588
|
+
if (subTaxonomies.length === 0) {
|
|
26589
|
+
if (parentTaxonomy.identifier == exclude) {
|
|
26590
|
+
return '';
|
|
26591
|
+
}
|
|
26592
|
+
return React__default.createElement(
|
|
26593
|
+
'div',
|
|
26594
|
+
{ id: 'related_dropdown', className: className },
|
|
26595
|
+
React__default.createElement(
|
|
26596
|
+
DropdownButton,
|
|
26597
|
+
{ id: 'related_button', variant: variant, title: 'Related Topics' },
|
|
26598
|
+
React__default.createElement(
|
|
26599
|
+
Dropdown$1.Item,
|
|
26600
|
+
{ href: parentTaxonomy.identifier },
|
|
26601
|
+
parentTaxonomy.name
|
|
26602
|
+
)
|
|
26603
|
+
)
|
|
26604
|
+
);
|
|
26605
|
+
} else {
|
|
26606
|
+
return React__default.createElement(
|
|
26607
|
+
'div',
|
|
26608
|
+
{ id: 'related_dropdown', className: className },
|
|
26609
|
+
React__default.createElement(
|
|
26610
|
+
DropdownButton,
|
|
26611
|
+
{ id: 'related_button', variant: variant, title: 'Related Topics' },
|
|
26612
|
+
subTaxonomies.length > 0 && subTaxonomies.map(function (taxonomy, index) {
|
|
26613
|
+
return React__default.createElement(
|
|
26614
|
+
Dropdown$1.Item,
|
|
26615
|
+
{ key: index, href: page + '/' + taxonomy.identifier },
|
|
26616
|
+
taxonomy.name
|
|
26617
|
+
);
|
|
26618
|
+
})
|
|
26619
|
+
)
|
|
26620
|
+
);
|
|
26621
|
+
}
|
|
26622
|
+
};
|
|
26623
|
+
|
|
26624
|
+
export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, MasterDeck$1 as MasterDeck, PublicationDeck, IssueDeck, IssueContentDeck, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD, AD300x250, AD300x250x600, AD728x90, ADFooter, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, SetCookie, Hero, AlphabeticList, PdfDownload, RelatedTopicsDropdown };
|
|
26590
26625
|
//# sourceMappingURL=index.es.js.map
|