@mjhls/mjh-framework 1.0.893-publication-landing-no-image-v1 → 1.0.893-ris-v1
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/AlgoliaSearch.js +131 -15
- package/dist/cjs/CMEDeck.js +5 -1
- package/dist/cjs/PublicationLanding.js +7 -5
- package/dist/cjs/View.js +29 -1
- package/dist/esm/AlgoliaSearch.js +132 -16
- package/dist/esm/CMEDeck.js +5 -1
- package/dist/esm/PublicationLanding.js +7 -5
- package/dist/esm/View.js +29 -1
- package/dist/esm/stringify-2b084bee.js +1 -1
- package/package.json +1 -1
|
@@ -829,7 +829,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
var version$1 = '6.
|
|
832
|
+
var version$1 = '6.12.0';
|
|
833
833
|
|
|
834
834
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
835
835
|
return function (props, propName, componentName) {
|
|
@@ -911,6 +911,10 @@ function translatable(defaultTranslations) {
|
|
|
911
911
|
function getIndexId(context) {
|
|
912
912
|
return hasMultipleIndices(context) ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex;
|
|
913
913
|
}
|
|
914
|
+
/**
|
|
915
|
+
* @returns {import('algoliasearch-helper').SearchResults} results
|
|
916
|
+
*/
|
|
917
|
+
|
|
914
918
|
function getResults(searchResults, context) {
|
|
915
919
|
if (searchResults.results) {
|
|
916
920
|
if (searchResults.results.hits) {
|
|
@@ -4775,7 +4779,7 @@ var requestBuilder = {
|
|
|
4775
4779
|
|
|
4776
4780
|
var requestBuilder_1 = requestBuilder;
|
|
4777
4781
|
|
|
4778
|
-
var version = '3.5.
|
|
4782
|
+
var version = '3.5.4';
|
|
4779
4783
|
|
|
4780
4784
|
/**
|
|
4781
4785
|
* Event triggered when a parameter is set or updated
|
|
@@ -6423,6 +6427,87 @@ ConfigureRelatedItems.propTypes = {
|
|
|
6423
6427
|
};
|
|
6424
6428
|
connectConfigureRelatedItems(ConfigureRelatedItems);
|
|
6425
6429
|
|
|
6430
|
+
var connectDynamicWidgets = createConnectorWithContext({
|
|
6431
|
+
displayName: 'AlgoliaDynamicWidgets',
|
|
6432
|
+
defaultProps: {
|
|
6433
|
+
transformItems: function transformItems(items) {
|
|
6434
|
+
return items;
|
|
6435
|
+
}
|
|
6436
|
+
},
|
|
6437
|
+
propTypes: {
|
|
6438
|
+
transformItems: PropTypes__default['default'].func
|
|
6439
|
+
},
|
|
6440
|
+
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
6441
|
+
var results = getResults(searchResults, {
|
|
6442
|
+
ais: props.contextValue,
|
|
6443
|
+
multiIndexContext: props.indexContextValue
|
|
6444
|
+
});
|
|
6445
|
+
|
|
6446
|
+
if (!results) {
|
|
6447
|
+
return {
|
|
6448
|
+
attributesToRender: []
|
|
6449
|
+
};
|
|
6450
|
+
}
|
|
6451
|
+
|
|
6452
|
+
var facetOrder = results.renderingContent && results.renderingContent.facetOrdering && results.renderingContent.facetOrdering.facets && results.renderingContent.facetOrdering.facets.order || [];
|
|
6453
|
+
return {
|
|
6454
|
+
attributesToRender: props.transformItems(facetOrder, {
|
|
6455
|
+
results: results
|
|
6456
|
+
})
|
|
6457
|
+
};
|
|
6458
|
+
}
|
|
6459
|
+
});
|
|
6460
|
+
|
|
6461
|
+
function getAttribute(component) {
|
|
6462
|
+
if (_typeof(component) !== 'object') {
|
|
6463
|
+
return undefined;
|
|
6464
|
+
}
|
|
6465
|
+
|
|
6466
|
+
if (component.props.attribute) {
|
|
6467
|
+
return component.props.attribute;
|
|
6468
|
+
}
|
|
6469
|
+
|
|
6470
|
+
if (Array.isArray(component.props.attributes)) {
|
|
6471
|
+
return component.props.attributes[0];
|
|
6472
|
+
}
|
|
6473
|
+
|
|
6474
|
+
if (component.props.children) {
|
|
6475
|
+
return getAttribute(React__default['default'].Children.only(component.props.children));
|
|
6476
|
+
}
|
|
6477
|
+
|
|
6478
|
+
return undefined;
|
|
6479
|
+
}
|
|
6480
|
+
|
|
6481
|
+
function DynamicWidgets(_ref) {
|
|
6482
|
+
var children = _ref.children,
|
|
6483
|
+
attributesToRender = _ref.attributesToRender,
|
|
6484
|
+
_ref$fallbackComponen = _ref.fallbackComponent,
|
|
6485
|
+
Fallback = _ref$fallbackComponen === void 0 ? function () {
|
|
6486
|
+
return null;
|
|
6487
|
+
} : _ref$fallbackComponen;
|
|
6488
|
+
var widgets = new Map();
|
|
6489
|
+
React__default['default'].Children.forEach(children, function (child) {
|
|
6490
|
+
var attribute = getAttribute(child);
|
|
6491
|
+
|
|
6492
|
+
if (!attribute) {
|
|
6493
|
+
throw new Error("Could not find \"attribute\" prop for ".concat(getDisplayName(child), "."));
|
|
6494
|
+
}
|
|
6495
|
+
|
|
6496
|
+
widgets.set(attribute, child);
|
|
6497
|
+
}); // on initial render this will be empty, but React InstantSearch keeps
|
|
6498
|
+
// search state for unmounted components in place, so routing works.
|
|
6499
|
+
|
|
6500
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null, attributesToRender.map(function (attribute) {
|
|
6501
|
+
return React__default['default'].createElement(React.Fragment, {
|
|
6502
|
+
key: attribute
|
|
6503
|
+
}, widgets.get(attribute) || React__default['default'].createElement(Fallback, {
|
|
6504
|
+
attribute: attribute
|
|
6505
|
+
}));
|
|
6506
|
+
}));
|
|
6507
|
+
}
|
|
6508
|
+
|
|
6509
|
+
connectDynamicWidgets(DynamicWidgets);
|
|
6510
|
+
|
|
6426
6511
|
// A context rule must consist only of alphanumeric characters, hyphens, and underscores.
|
|
6427
6512
|
// See https://www.algolia.com/doc/guides/managing-results/refine-results/merchandising-and-promoting/in-depth/implementing-query-rules/#context
|
|
6428
6513
|
function escapeRuleContext(ruleName) {
|
|
@@ -7832,7 +7917,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7832
7917
|
showMore: PropTypes__default['default'].bool,
|
|
7833
7918
|
limit: PropTypes__default['default'].number,
|
|
7834
7919
|
showMoreLimit: PropTypes__default['default'].number,
|
|
7835
|
-
transformItems: PropTypes__default['default'].func
|
|
7920
|
+
transformItems: PropTypes__default['default'].func,
|
|
7921
|
+
facetOrdering: PropTypes__default['default'].bool
|
|
7836
7922
|
},
|
|
7837
7923
|
defaultProps: {
|
|
7838
7924
|
showMore: false,
|
|
@@ -7840,12 +7926,14 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7840
7926
|
showMoreLimit: 20,
|
|
7841
7927
|
separator: ' > ',
|
|
7842
7928
|
rootPath: null,
|
|
7843
|
-
showParentLevel: true
|
|
7929
|
+
showParentLevel: true,
|
|
7930
|
+
facetOrdering: true
|
|
7844
7931
|
},
|
|
7845
7932
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7846
7933
|
var showMore = props.showMore,
|
|
7847
7934
|
limit = props.limit,
|
|
7848
|
-
showMoreLimit = props.showMoreLimit
|
|
7935
|
+
showMoreLimit = props.showMoreLimit,
|
|
7936
|
+
facetOrdering = props.facetOrdering;
|
|
7849
7937
|
var id = getId$c(props);
|
|
7850
7938
|
var results = getResults(searchResults, {
|
|
7851
7939
|
ais: props.contextValue,
|
|
@@ -7866,7 +7954,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7866
7954
|
|
|
7867
7955
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7868
7956
|
var value = results.getFacetValues(id, {
|
|
7869
|
-
sortBy: sortBy$1
|
|
7957
|
+
sortBy: sortBy$1,
|
|
7958
|
+
facetOrdering: facetOrdering
|
|
7870
7959
|
});
|
|
7871
7960
|
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7872
7961
|
ais: props.contextValue,
|
|
@@ -8418,17 +8507,20 @@ var connectMenu = createConnectorWithContext({
|
|
|
8418
8507
|
showMoreLimit: PropTypes__default['default'].number,
|
|
8419
8508
|
defaultRefinement: PropTypes__default['default'].string,
|
|
8420
8509
|
transformItems: PropTypes__default['default'].func,
|
|
8421
|
-
searchable: PropTypes__default['default'].bool
|
|
8510
|
+
searchable: PropTypes__default['default'].bool,
|
|
8511
|
+
facetOrdering: PropTypes__default['default'].bool
|
|
8422
8512
|
},
|
|
8423
8513
|
defaultProps: {
|
|
8424
8514
|
showMore: false,
|
|
8425
8515
|
limit: 10,
|
|
8426
|
-
showMoreLimit: 20
|
|
8516
|
+
showMoreLimit: 20,
|
|
8517
|
+
facetOrdering: true
|
|
8427
8518
|
},
|
|
8428
8519
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) {
|
|
8429
8520
|
var attribute = props.attribute,
|
|
8430
8521
|
searchable = props.searchable,
|
|
8431
|
-
indexContextValue = props.indexContextValue
|
|
8522
|
+
indexContextValue = props.indexContextValue,
|
|
8523
|
+
facetOrdering = props.facetOrdering;
|
|
8432
8524
|
var results = getResults(searchResults, {
|
|
8433
8525
|
ais: props.contextValue,
|
|
8434
8526
|
multiIndexContext: props.indexContextValue
|
|
@@ -8474,7 +8566,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8474
8566
|
});
|
|
8475
8567
|
} else {
|
|
8476
8568
|
items = results.getFacetValues(attribute, {
|
|
8477
|
-
sortBy: searchable ? undefined : defaultSortBy
|
|
8569
|
+
sortBy: searchable ? undefined : defaultSortBy,
|
|
8570
|
+
facetOrdering: facetOrdering
|
|
8478
8571
|
}).map(function (v) {
|
|
8479
8572
|
return {
|
|
8480
8573
|
label: v.name,
|
|
@@ -9331,18 +9424,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9331
9424
|
showMoreLimit: PropTypes__default['default'].number,
|
|
9332
9425
|
defaultRefinement: PropTypes__default['default'].arrayOf(PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number])),
|
|
9333
9426
|
searchable: PropTypes__default['default'].bool,
|
|
9334
|
-
transformItems: PropTypes__default['default'].func
|
|
9427
|
+
transformItems: PropTypes__default['default'].func,
|
|
9428
|
+
facetOrdering: PropTypes__default['default'].bool
|
|
9335
9429
|
},
|
|
9336
9430
|
defaultProps: {
|
|
9337
9431
|
operator: 'or',
|
|
9338
9432
|
showMore: false,
|
|
9339
9433
|
limit: 10,
|
|
9340
|
-
showMoreLimit: 20
|
|
9434
|
+
showMoreLimit: 20,
|
|
9435
|
+
facetOrdering: true
|
|
9341
9436
|
},
|
|
9342
9437
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) {
|
|
9343
9438
|
var attribute = props.attribute,
|
|
9344
9439
|
searchable = props.searchable,
|
|
9345
|
-
indexContextValue = props.indexContextValue
|
|
9440
|
+
indexContextValue = props.indexContextValue,
|
|
9441
|
+
facetOrdering = props.facetOrdering;
|
|
9346
9442
|
var results = getResults(searchResults, {
|
|
9347
9443
|
ais: props.contextValue,
|
|
9348
9444
|
multiIndexContext: props.indexContextValue
|
|
@@ -9383,7 +9479,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9383
9479
|
isRefined: v.isRefined
|
|
9384
9480
|
};
|
|
9385
9481
|
}) : results.getFacetValues(attribute, {
|
|
9386
|
-
sortBy: sortBy
|
|
9482
|
+
sortBy: sortBy,
|
|
9483
|
+
facetOrdering: facetOrdering
|
|
9387
9484
|
}).map(function (v) {
|
|
9388
9485
|
return {
|
|
9389
9486
|
label: v.name,
|
|
@@ -10883,6 +10980,7 @@ function (_Component) {
|
|
|
10883
10980
|
|
|
10884
10981
|
var _this$props4 = this.props,
|
|
10885
10982
|
className = _this$props4.className,
|
|
10983
|
+
inputId = _this$props4.inputId,
|
|
10886
10984
|
translate = _this$props4.translate,
|
|
10887
10985
|
autoFocus = _this$props4.autoFocus,
|
|
10888
10986
|
loadingIndicator = _this$props4.loadingIndicator,
|
|
@@ -10910,6 +11008,7 @@ function (_Component) {
|
|
|
10910
11008
|
role: "search"
|
|
10911
11009
|
}, React__default['default'].createElement("input", index._extends({
|
|
10912
11010
|
ref: this.onInputMount,
|
|
11011
|
+
id: inputId,
|
|
10913
11012
|
type: "search",
|
|
10914
11013
|
placeholder: translate('placeholder'),
|
|
10915
11014
|
autoFocus: autoFocus,
|
|
@@ -10961,7 +11060,8 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10961
11060
|
showLoadingIndicator: PropTypes__default['default'].bool,
|
|
10962
11061
|
inputRef: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].exact({
|
|
10963
11062
|
current: PropTypes__default['default'].object
|
|
10964
|
-
})])
|
|
11063
|
+
})]),
|
|
11064
|
+
inputId: PropTypes__default['default'].string
|
|
10965
11065
|
});
|
|
10966
11066
|
|
|
10967
11067
|
_defineProperty(SearchBox$1, "defaultProps", {
|
|
@@ -11600,9 +11700,11 @@ function (_Component) {
|
|
|
11600
11700
|
value: function render() {
|
|
11601
11701
|
var _this$props = this.props,
|
|
11602
11702
|
cx = _this$props.cx,
|
|
11703
|
+
id = _this$props.id,
|
|
11603
11704
|
items = _this$props.items,
|
|
11604
11705
|
selectedItem = _this$props.selectedItem;
|
|
11605
11706
|
return React__default['default'].createElement("select", {
|
|
11707
|
+
id: id,
|
|
11606
11708
|
className: cx('select'),
|
|
11607
11709
|
value: selectedItem,
|
|
11608
11710
|
onChange: this.onChange
|
|
@@ -11622,6 +11724,7 @@ function (_Component) {
|
|
|
11622
11724
|
|
|
11623
11725
|
_defineProperty(Select, "propTypes", {
|
|
11624
11726
|
cx: PropTypes__default['default'].func.isRequired,
|
|
11727
|
+
id: PropTypes__default['default'].string,
|
|
11625
11728
|
onSelect: PropTypes__default['default'].func.isRequired,
|
|
11626
11729
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
11627
11730
|
value: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number]).isRequired,
|
|
@@ -11649,6 +11752,7 @@ function (_Component) {
|
|
|
11649
11752
|
key: "render",
|
|
11650
11753
|
value: function render() {
|
|
11651
11754
|
var _this$props = this.props,
|
|
11755
|
+
id = _this$props.id,
|
|
11652
11756
|
items = _this$props.items,
|
|
11653
11757
|
currentRefinement = _this$props.currentRefinement,
|
|
11654
11758
|
refine = _this$props.refine,
|
|
@@ -11656,6 +11760,7 @@ function (_Component) {
|
|
|
11656
11760
|
return React__default['default'].createElement("div", {
|
|
11657
11761
|
className: index.classnames(cx$h(''), className)
|
|
11658
11762
|
}, React__default['default'].createElement(Select, {
|
|
11763
|
+
id: id,
|
|
11659
11764
|
onSelect: refine,
|
|
11660
11765
|
selectedItem: currentRefinement,
|
|
11661
11766
|
items: items,
|
|
@@ -11668,6 +11773,7 @@ function (_Component) {
|
|
|
11668
11773
|
}(React.Component);
|
|
11669
11774
|
|
|
11670
11775
|
_defineProperty(HitsPerPage, "propTypes", {
|
|
11776
|
+
id: PropTypes__default['default'].string,
|
|
11671
11777
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
11672
11778
|
value: PropTypes__default['default'].number.isRequired,
|
|
11673
11779
|
label: PropTypes__default['default'].string
|
|
@@ -11690,6 +11796,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11690
11796
|
*
|
|
11691
11797
|
* @name HitsPerPage
|
|
11692
11798
|
* @kind widget
|
|
11799
|
+
* @propType {string} id - The id of the select input
|
|
11693
11800
|
* @propType {{value: number, label: string}[]} items - List of available options.
|
|
11694
11801
|
* @propType {number} defaultRefinement - The number of items selected by default
|
|
11695
11802
|
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
|
|
@@ -12058,6 +12165,7 @@ function (_Component) {
|
|
|
12058
12165
|
key: "render",
|
|
12059
12166
|
value: function render() {
|
|
12060
12167
|
var _this$props = this.props,
|
|
12168
|
+
id = _this$props.id,
|
|
12061
12169
|
items = _this$props.items,
|
|
12062
12170
|
canRefine = _this$props.canRefine,
|
|
12063
12171
|
translate = _this$props.translate,
|
|
@@ -12065,6 +12173,7 @@ function (_Component) {
|
|
|
12065
12173
|
return React__default['default'].createElement("div", {
|
|
12066
12174
|
className: index.classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
12067
12175
|
}, React__default['default'].createElement("select", {
|
|
12176
|
+
id: id,
|
|
12068
12177
|
value: this.selectedValue,
|
|
12069
12178
|
onChange: this.handleSelectChange,
|
|
12070
12179
|
className: cx$e('select')
|
|
@@ -12097,6 +12206,7 @@ function (_Component) {
|
|
|
12097
12206
|
}(React.Component);
|
|
12098
12207
|
|
|
12099
12208
|
_defineProperty(MenuSelect, "propTypes", {
|
|
12209
|
+
id: PropTypes__default['default'].string,
|
|
12100
12210
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
12101
12211
|
label: PropTypes__default['default'].string.isRequired,
|
|
12102
12212
|
value: PropTypes__default['default'].string.isRequired,
|
|
@@ -12123,6 +12233,7 @@ var MenuSelect$1 = translatable({
|
|
|
12123
12233
|
* @kind widget
|
|
12124
12234
|
* @requirements The attribute passed to the `attribute` prop must be present in "attributes for faceting"
|
|
12125
12235
|
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
|
|
12236
|
+
* @propType {string} id - the id of the select input
|
|
12126
12237
|
* @propType {string} attribute - the name of the attribute in the record
|
|
12127
12238
|
* @propType {string} [defaultRefinement] - the value of the item selected by default
|
|
12128
12239
|
* @propType {number} [limit=10] - the minimum number of diplayed items
|
|
@@ -13454,6 +13565,7 @@ connectScrollTo(ScrollTo);
|
|
|
13454
13565
|
* @propType {node} [reset] - Change the apparence of the default reset button (cross).
|
|
13455
13566
|
* @propType {node} [loadingIndicator] - Change the apparence of the default loading indicator (spinning circle).
|
|
13456
13567
|
* @propType {string} [defaultRefinement] - Provide default refinement value when component is mounted.
|
|
13568
|
+
* @propType {string} [inputId] - The id of the search input
|
|
13457
13569
|
* @propType {boolean} [showLoadingIndicator=false] - Display that the search is loading. This only happens after a certain amount of time to avoid a blinking effect. This timer can be configured with `stalledSearchDelay` props on <InstantSearch>. By default, the value is 200ms.
|
|
13458
13570
|
* @themeKey ais-SearchBox - the root div of the widget
|
|
13459
13571
|
* @themeKey ais-SearchBox-form - the wrapping form
|
|
@@ -13604,6 +13716,7 @@ function (_Component) {
|
|
|
13604
13716
|
key: "render",
|
|
13605
13717
|
value: function render() {
|
|
13606
13718
|
var _this$props = this.props,
|
|
13719
|
+
id = _this$props.id,
|
|
13607
13720
|
items = _this$props.items,
|
|
13608
13721
|
currentRefinement = _this$props.currentRefinement,
|
|
13609
13722
|
refine = _this$props.refine,
|
|
@@ -13611,6 +13724,7 @@ function (_Component) {
|
|
|
13611
13724
|
return React__default['default'].createElement("div", {
|
|
13612
13725
|
className: index.classnames(cx$4(''), className)
|
|
13613
13726
|
}, React__default['default'].createElement(Select, {
|
|
13727
|
+
id: id,
|
|
13614
13728
|
cx: cx$4,
|
|
13615
13729
|
items: items,
|
|
13616
13730
|
selectedItem: currentRefinement,
|
|
@@ -13623,6 +13737,7 @@ function (_Component) {
|
|
|
13623
13737
|
}(React.Component);
|
|
13624
13738
|
|
|
13625
13739
|
_defineProperty(SortBy, "propTypes", {
|
|
13740
|
+
id: PropTypes__default['default'].string,
|
|
13626
13741
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
13627
13742
|
label: PropTypes__default['default'].string,
|
|
13628
13743
|
value: PropTypes__default['default'].string.isRequired
|
|
@@ -13642,6 +13757,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13642
13757
|
* @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on
|
|
13643
13758
|
* the Algolia website.
|
|
13644
13759
|
* @kind widget
|
|
13760
|
+
* @propType {string} id - The id of the select input
|
|
13645
13761
|
* @propType {{value: string, label: string}[]} items - The list of indexes to search in.
|
|
13646
13762
|
* @propType {string} defaultRefinement - The default selected index.
|
|
13647
13763
|
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
|
package/dist/cjs/CMEDeck.js
CHANGED
|
@@ -315,7 +315,11 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
315
315
|
return React__default['default'].createElement(
|
|
316
316
|
'div',
|
|
317
317
|
{ className: 'd-flex justify-content-between' },
|
|
318
|
-
currentPage > 1
|
|
318
|
+
currentPage && currentPage > 1 && React__default['default'].createElement(
|
|
319
|
+
'a',
|
|
320
|
+
{ href: '?page=' + (currentPage - 1) },
|
|
321
|
+
'<< Previous'
|
|
322
|
+
),
|
|
319
323
|
React__default['default'].createElement(
|
|
320
324
|
'a',
|
|
321
325
|
{ href: '?page=' + (currentPage + 1) },
|
|
@@ -467,7 +467,8 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
467
467
|
setSortedIssues = _useState8[1];
|
|
468
468
|
|
|
469
469
|
React.useEffect(function () {
|
|
470
|
-
|
|
470
|
+
|
|
471
|
+
asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2() {
|
|
471
472
|
var _this = this;
|
|
472
473
|
|
|
473
474
|
var promises, articles;
|
|
@@ -521,6 +522,7 @@ asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.ma
|
|
|
521
522
|
articles = _context2.sent;
|
|
522
523
|
|
|
523
524
|
setIssueData(articles);
|
|
525
|
+
|
|
524
526
|
_context2.next = 12;
|
|
525
527
|
break;
|
|
526
528
|
|
|
@@ -721,7 +723,7 @@ asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.ma
|
|
|
721
723
|
React__default['default'].createElement(
|
|
722
724
|
Row__default['default'],
|
|
723
725
|
null,
|
|
724
|
-
|
|
726
|
+
React__default['default'].createElement(
|
|
725
727
|
Col__default['default'],
|
|
726
728
|
{ md: 3, id: 'issueThumbnail' },
|
|
727
729
|
React__default['default'].createElement(
|
|
@@ -732,7 +734,7 @@ asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.ma
|
|
|
732
734
|
),
|
|
733
735
|
React__default['default'].createElement(
|
|
734
736
|
Col__default['default'],
|
|
735
|
-
{ md:
|
|
737
|
+
{ md: 9, id: 'issueDetail' },
|
|
736
738
|
React__default['default'].createElement(
|
|
737
739
|
Card__default['default'].Body,
|
|
738
740
|
null,
|
|
@@ -784,7 +786,7 @@ asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.ma
|
|
|
784
786
|
React__default['default'].createElement(
|
|
785
787
|
Row__default['default'],
|
|
786
788
|
null,
|
|
787
|
-
|
|
789
|
+
React__default['default'].createElement(
|
|
788
790
|
Col__default['default'],
|
|
789
791
|
{ md: 3, id: 'issueThumbnail' },
|
|
790
792
|
React__default['default'].createElement(
|
|
@@ -795,7 +797,7 @@ asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.ma
|
|
|
795
797
|
),
|
|
796
798
|
React__default['default'].createElement(
|
|
797
799
|
Col__default['default'],
|
|
798
|
-
{ md:
|
|
800
|
+
{ md: 9, id: 'issueDetail' },
|
|
799
801
|
React__default['default'].createElement(
|
|
800
802
|
Card__default['default'].Body,
|
|
801
803
|
null,
|
package/dist/cjs/View.js
CHANGED
|
@@ -652,6 +652,27 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
652
652
|
}
|
|
653
653
|
return null;
|
|
654
654
|
};
|
|
655
|
+
var downloadRIS = function downloadRIS(filename) {
|
|
656
|
+
var fileContent = 'TY - JOUR\n';
|
|
657
|
+
if (issue) {
|
|
658
|
+
if (issue.year) fileContent += 'PY - ' + issue.year + '\n';
|
|
659
|
+
if (issue.month) {
|
|
660
|
+
fileContent += 'DA - ' + moment.moment().month(issue.month).format('MMMM') + '\n';
|
|
661
|
+
}
|
|
662
|
+
if (issue.publication && issue.publication.name) fileContent += 'TI - ' + issue.publication.name + '\n';
|
|
663
|
+
if (issue.name) fileContent += 'T2 - ' + issue.name + '\n';
|
|
664
|
+
if (issue.volume) fileContent += 'IS - ' + issue.volume + '\n';
|
|
665
|
+
if (issue.number) fileContent += 'IS - ' + issue.number + '\n';
|
|
666
|
+
}
|
|
667
|
+
fileContent += 'ER -';
|
|
668
|
+
var element = document.createElement('a');
|
|
669
|
+
element.setAttribute('href', 'data:application/x-research-info-systems;charset=utf-8,' + encodeURIComponent(fileContent));
|
|
670
|
+
element.setAttribute('download', filename);
|
|
671
|
+
element.style.display = 'none';
|
|
672
|
+
document.body.appendChild(element);
|
|
673
|
+
element.click();
|
|
674
|
+
document.body.removeChild(element);
|
|
675
|
+
};
|
|
655
676
|
|
|
656
677
|
var RelevantTopics = function RelevantTopics() {
|
|
657
678
|
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
@@ -698,7 +719,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
698
719
|
React__default['default'].createElement(
|
|
699
720
|
'style',
|
|
700
721
|
{ jsx: 'true' },
|
|
701
|
-
'\n
|
|
722
|
+
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
702
723
|
)
|
|
703
724
|
);
|
|
704
725
|
}
|
|
@@ -1248,6 +1269,13 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1248
1269
|
React__default['default'].createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1249
1270
|
'Download Issue : ',
|
|
1250
1271
|
issue.name
|
|
1272
|
+
),
|
|
1273
|
+
React__default['default'].createElement(
|
|
1274
|
+
Button__default['default'],
|
|
1275
|
+
{ onClick: function onClick(req) {
|
|
1276
|
+
return downloadRIS('citation-' + url + '.ris');
|
|
1277
|
+
} },
|
|
1278
|
+
'Download RIS'
|
|
1251
1279
|
)
|
|
1252
1280
|
),
|
|
1253
1281
|
React__default['default'].createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _extends$1 } from './extends-6d8e3924.js';
|
|
2
2
|
import { _ as _typeof$2 } from './typeof-e9fc0c5d.js';
|
|
3
3
|
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-a6ba2ec4.js';
|
|
4
|
-
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
4
|
+
import React__default, { createContext, Component, Fragment, Children, version as version$2 } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { _ as _typeof$1 } from './typeof-2f07d0e8.js';
|
|
7
7
|
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-98ca9cec.js';
|
|
@@ -822,7 +822,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
824
|
|
|
825
|
-
var version$1 = '6.
|
|
825
|
+
var version$1 = '6.12.0';
|
|
826
826
|
|
|
827
827
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
828
828
|
return function (props, propName, componentName) {
|
|
@@ -904,6 +904,10 @@ function translatable(defaultTranslations) {
|
|
|
904
904
|
function getIndexId(context) {
|
|
905
905
|
return hasMultipleIndices(context) ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex;
|
|
906
906
|
}
|
|
907
|
+
/**
|
|
908
|
+
* @returns {import('algoliasearch-helper').SearchResults} results
|
|
909
|
+
*/
|
|
910
|
+
|
|
907
911
|
function getResults(searchResults, context) {
|
|
908
912
|
if (searchResults.results) {
|
|
909
913
|
if (searchResults.results.hits) {
|
|
@@ -4768,7 +4772,7 @@ var requestBuilder = {
|
|
|
4768
4772
|
|
|
4769
4773
|
var requestBuilder_1 = requestBuilder;
|
|
4770
4774
|
|
|
4771
|
-
var version = '3.5.
|
|
4775
|
+
var version = '3.5.4';
|
|
4772
4776
|
|
|
4773
4777
|
/**
|
|
4774
4778
|
* Event triggered when a parameter is set or updated
|
|
@@ -6416,6 +6420,87 @@ ConfigureRelatedItems.propTypes = {
|
|
|
6416
6420
|
};
|
|
6417
6421
|
connectConfigureRelatedItems(ConfigureRelatedItems);
|
|
6418
6422
|
|
|
6423
|
+
var connectDynamicWidgets = createConnectorWithContext({
|
|
6424
|
+
displayName: 'AlgoliaDynamicWidgets',
|
|
6425
|
+
defaultProps: {
|
|
6426
|
+
transformItems: function transformItems(items) {
|
|
6427
|
+
return items;
|
|
6428
|
+
}
|
|
6429
|
+
},
|
|
6430
|
+
propTypes: {
|
|
6431
|
+
transformItems: PropTypes.func
|
|
6432
|
+
},
|
|
6433
|
+
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
6434
|
+
var results = getResults(searchResults, {
|
|
6435
|
+
ais: props.contextValue,
|
|
6436
|
+
multiIndexContext: props.indexContextValue
|
|
6437
|
+
});
|
|
6438
|
+
|
|
6439
|
+
if (!results) {
|
|
6440
|
+
return {
|
|
6441
|
+
attributesToRender: []
|
|
6442
|
+
};
|
|
6443
|
+
}
|
|
6444
|
+
|
|
6445
|
+
var facetOrder = results.renderingContent && results.renderingContent.facetOrdering && results.renderingContent.facetOrdering.facets && results.renderingContent.facetOrdering.facets.order || [];
|
|
6446
|
+
return {
|
|
6447
|
+
attributesToRender: props.transformItems(facetOrder, {
|
|
6448
|
+
results: results
|
|
6449
|
+
})
|
|
6450
|
+
};
|
|
6451
|
+
}
|
|
6452
|
+
});
|
|
6453
|
+
|
|
6454
|
+
function getAttribute(component) {
|
|
6455
|
+
if (_typeof(component) !== 'object') {
|
|
6456
|
+
return undefined;
|
|
6457
|
+
}
|
|
6458
|
+
|
|
6459
|
+
if (component.props.attribute) {
|
|
6460
|
+
return component.props.attribute;
|
|
6461
|
+
}
|
|
6462
|
+
|
|
6463
|
+
if (Array.isArray(component.props.attributes)) {
|
|
6464
|
+
return component.props.attributes[0];
|
|
6465
|
+
}
|
|
6466
|
+
|
|
6467
|
+
if (component.props.children) {
|
|
6468
|
+
return getAttribute(React__default.Children.only(component.props.children));
|
|
6469
|
+
}
|
|
6470
|
+
|
|
6471
|
+
return undefined;
|
|
6472
|
+
}
|
|
6473
|
+
|
|
6474
|
+
function DynamicWidgets(_ref) {
|
|
6475
|
+
var children = _ref.children,
|
|
6476
|
+
attributesToRender = _ref.attributesToRender,
|
|
6477
|
+
_ref$fallbackComponen = _ref.fallbackComponent,
|
|
6478
|
+
Fallback = _ref$fallbackComponen === void 0 ? function () {
|
|
6479
|
+
return null;
|
|
6480
|
+
} : _ref$fallbackComponen;
|
|
6481
|
+
var widgets = new Map();
|
|
6482
|
+
React__default.Children.forEach(children, function (child) {
|
|
6483
|
+
var attribute = getAttribute(child);
|
|
6484
|
+
|
|
6485
|
+
if (!attribute) {
|
|
6486
|
+
throw new Error("Could not find \"attribute\" prop for ".concat(getDisplayName(child), "."));
|
|
6487
|
+
}
|
|
6488
|
+
|
|
6489
|
+
widgets.set(attribute, child);
|
|
6490
|
+
}); // on initial render this will be empty, but React InstantSearch keeps
|
|
6491
|
+
// search state for unmounted components in place, so routing works.
|
|
6492
|
+
|
|
6493
|
+
return React__default.createElement(React__default.Fragment, null, attributesToRender.map(function (attribute) {
|
|
6494
|
+
return React__default.createElement(Fragment, {
|
|
6495
|
+
key: attribute
|
|
6496
|
+
}, widgets.get(attribute) || React__default.createElement(Fallback, {
|
|
6497
|
+
attribute: attribute
|
|
6498
|
+
}));
|
|
6499
|
+
}));
|
|
6500
|
+
}
|
|
6501
|
+
|
|
6502
|
+
connectDynamicWidgets(DynamicWidgets);
|
|
6503
|
+
|
|
6419
6504
|
// A context rule must consist only of alphanumeric characters, hyphens, and underscores.
|
|
6420
6505
|
// See https://www.algolia.com/doc/guides/managing-results/refine-results/merchandising-and-promoting/in-depth/implementing-query-rules/#context
|
|
6421
6506
|
function escapeRuleContext(ruleName) {
|
|
@@ -7825,7 +7910,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7825
7910
|
showMore: PropTypes.bool,
|
|
7826
7911
|
limit: PropTypes.number,
|
|
7827
7912
|
showMoreLimit: PropTypes.number,
|
|
7828
|
-
transformItems: PropTypes.func
|
|
7913
|
+
transformItems: PropTypes.func,
|
|
7914
|
+
facetOrdering: PropTypes.bool
|
|
7829
7915
|
},
|
|
7830
7916
|
defaultProps: {
|
|
7831
7917
|
showMore: false,
|
|
@@ -7833,12 +7919,14 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7833
7919
|
showMoreLimit: 20,
|
|
7834
7920
|
separator: ' > ',
|
|
7835
7921
|
rootPath: null,
|
|
7836
|
-
showParentLevel: true
|
|
7922
|
+
showParentLevel: true,
|
|
7923
|
+
facetOrdering: true
|
|
7837
7924
|
},
|
|
7838
7925
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7839
7926
|
var showMore = props.showMore,
|
|
7840
7927
|
limit = props.limit,
|
|
7841
|
-
showMoreLimit = props.showMoreLimit
|
|
7928
|
+
showMoreLimit = props.showMoreLimit,
|
|
7929
|
+
facetOrdering = props.facetOrdering;
|
|
7842
7930
|
var id = getId$c(props);
|
|
7843
7931
|
var results = getResults(searchResults, {
|
|
7844
7932
|
ais: props.contextValue,
|
|
@@ -7859,7 +7947,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7859
7947
|
|
|
7860
7948
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7861
7949
|
var value = results.getFacetValues(id, {
|
|
7862
|
-
sortBy: sortBy$1
|
|
7950
|
+
sortBy: sortBy$1,
|
|
7951
|
+
facetOrdering: facetOrdering
|
|
7863
7952
|
});
|
|
7864
7953
|
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7865
7954
|
ais: props.contextValue,
|
|
@@ -8411,17 +8500,20 @@ var connectMenu = createConnectorWithContext({
|
|
|
8411
8500
|
showMoreLimit: PropTypes.number,
|
|
8412
8501
|
defaultRefinement: PropTypes.string,
|
|
8413
8502
|
transformItems: PropTypes.func,
|
|
8414
|
-
searchable: PropTypes.bool
|
|
8503
|
+
searchable: PropTypes.bool,
|
|
8504
|
+
facetOrdering: PropTypes.bool
|
|
8415
8505
|
},
|
|
8416
8506
|
defaultProps: {
|
|
8417
8507
|
showMore: false,
|
|
8418
8508
|
limit: 10,
|
|
8419
|
-
showMoreLimit: 20
|
|
8509
|
+
showMoreLimit: 20,
|
|
8510
|
+
facetOrdering: true
|
|
8420
8511
|
},
|
|
8421
8512
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) {
|
|
8422
8513
|
var attribute = props.attribute,
|
|
8423
8514
|
searchable = props.searchable,
|
|
8424
|
-
indexContextValue = props.indexContextValue
|
|
8515
|
+
indexContextValue = props.indexContextValue,
|
|
8516
|
+
facetOrdering = props.facetOrdering;
|
|
8425
8517
|
var results = getResults(searchResults, {
|
|
8426
8518
|
ais: props.contextValue,
|
|
8427
8519
|
multiIndexContext: props.indexContextValue
|
|
@@ -8467,7 +8559,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8467
8559
|
});
|
|
8468
8560
|
} else {
|
|
8469
8561
|
items = results.getFacetValues(attribute, {
|
|
8470
|
-
sortBy: searchable ? undefined : defaultSortBy
|
|
8562
|
+
sortBy: searchable ? undefined : defaultSortBy,
|
|
8563
|
+
facetOrdering: facetOrdering
|
|
8471
8564
|
}).map(function (v) {
|
|
8472
8565
|
return {
|
|
8473
8566
|
label: v.name,
|
|
@@ -9324,18 +9417,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9324
9417
|
showMoreLimit: PropTypes.number,
|
|
9325
9418
|
defaultRefinement: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
9326
9419
|
searchable: PropTypes.bool,
|
|
9327
|
-
transformItems: PropTypes.func
|
|
9420
|
+
transformItems: PropTypes.func,
|
|
9421
|
+
facetOrdering: PropTypes.bool
|
|
9328
9422
|
},
|
|
9329
9423
|
defaultProps: {
|
|
9330
9424
|
operator: 'or',
|
|
9331
9425
|
showMore: false,
|
|
9332
9426
|
limit: 10,
|
|
9333
|
-
showMoreLimit: 20
|
|
9427
|
+
showMoreLimit: 20,
|
|
9428
|
+
facetOrdering: true
|
|
9334
9429
|
},
|
|
9335
9430
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) {
|
|
9336
9431
|
var attribute = props.attribute,
|
|
9337
9432
|
searchable = props.searchable,
|
|
9338
|
-
indexContextValue = props.indexContextValue
|
|
9433
|
+
indexContextValue = props.indexContextValue,
|
|
9434
|
+
facetOrdering = props.facetOrdering;
|
|
9339
9435
|
var results = getResults(searchResults, {
|
|
9340
9436
|
ais: props.contextValue,
|
|
9341
9437
|
multiIndexContext: props.indexContextValue
|
|
@@ -9376,7 +9472,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9376
9472
|
isRefined: v.isRefined
|
|
9377
9473
|
};
|
|
9378
9474
|
}) : results.getFacetValues(attribute, {
|
|
9379
|
-
sortBy: sortBy
|
|
9475
|
+
sortBy: sortBy,
|
|
9476
|
+
facetOrdering: facetOrdering
|
|
9380
9477
|
}).map(function (v) {
|
|
9381
9478
|
return {
|
|
9382
9479
|
label: v.name,
|
|
@@ -10876,6 +10973,7 @@ function (_Component) {
|
|
|
10876
10973
|
|
|
10877
10974
|
var _this$props4 = this.props,
|
|
10878
10975
|
className = _this$props4.className,
|
|
10976
|
+
inputId = _this$props4.inputId,
|
|
10879
10977
|
translate = _this$props4.translate,
|
|
10880
10978
|
autoFocus = _this$props4.autoFocus,
|
|
10881
10979
|
loadingIndicator = _this$props4.loadingIndicator,
|
|
@@ -10903,6 +11001,7 @@ function (_Component) {
|
|
|
10903
11001
|
role: "search"
|
|
10904
11002
|
}, React__default.createElement("input", _extends({
|
|
10905
11003
|
ref: this.onInputMount,
|
|
11004
|
+
id: inputId,
|
|
10906
11005
|
type: "search",
|
|
10907
11006
|
placeholder: translate('placeholder'),
|
|
10908
11007
|
autoFocus: autoFocus,
|
|
@@ -10954,7 +11053,8 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10954
11053
|
showLoadingIndicator: PropTypes.bool,
|
|
10955
11054
|
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.exact({
|
|
10956
11055
|
current: PropTypes.object
|
|
10957
|
-
})])
|
|
11056
|
+
})]),
|
|
11057
|
+
inputId: PropTypes.string
|
|
10958
11058
|
});
|
|
10959
11059
|
|
|
10960
11060
|
_defineProperty(SearchBox$1, "defaultProps", {
|
|
@@ -11593,9 +11693,11 @@ function (_Component) {
|
|
|
11593
11693
|
value: function render() {
|
|
11594
11694
|
var _this$props = this.props,
|
|
11595
11695
|
cx = _this$props.cx,
|
|
11696
|
+
id = _this$props.id,
|
|
11596
11697
|
items = _this$props.items,
|
|
11597
11698
|
selectedItem = _this$props.selectedItem;
|
|
11598
11699
|
return React__default.createElement("select", {
|
|
11700
|
+
id: id,
|
|
11599
11701
|
className: cx('select'),
|
|
11600
11702
|
value: selectedItem,
|
|
11601
11703
|
onChange: this.onChange
|
|
@@ -11615,6 +11717,7 @@ function (_Component) {
|
|
|
11615
11717
|
|
|
11616
11718
|
_defineProperty(Select, "propTypes", {
|
|
11617
11719
|
cx: PropTypes.func.isRequired,
|
|
11720
|
+
id: PropTypes.string,
|
|
11618
11721
|
onSelect: PropTypes.func.isRequired,
|
|
11619
11722
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
11620
11723
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
@@ -11642,6 +11745,7 @@ function (_Component) {
|
|
|
11642
11745
|
key: "render",
|
|
11643
11746
|
value: function render() {
|
|
11644
11747
|
var _this$props = this.props,
|
|
11748
|
+
id = _this$props.id,
|
|
11645
11749
|
items = _this$props.items,
|
|
11646
11750
|
currentRefinement = _this$props.currentRefinement,
|
|
11647
11751
|
refine = _this$props.refine,
|
|
@@ -11649,6 +11753,7 @@ function (_Component) {
|
|
|
11649
11753
|
return React__default.createElement("div", {
|
|
11650
11754
|
className: classnames(cx$h(''), className)
|
|
11651
11755
|
}, React__default.createElement(Select, {
|
|
11756
|
+
id: id,
|
|
11652
11757
|
onSelect: refine,
|
|
11653
11758
|
selectedItem: currentRefinement,
|
|
11654
11759
|
items: items,
|
|
@@ -11661,6 +11766,7 @@ function (_Component) {
|
|
|
11661
11766
|
}(Component);
|
|
11662
11767
|
|
|
11663
11768
|
_defineProperty(HitsPerPage, "propTypes", {
|
|
11769
|
+
id: PropTypes.string,
|
|
11664
11770
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
11665
11771
|
value: PropTypes.number.isRequired,
|
|
11666
11772
|
label: PropTypes.string
|
|
@@ -11683,6 +11789,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11683
11789
|
*
|
|
11684
11790
|
* @name HitsPerPage
|
|
11685
11791
|
* @kind widget
|
|
11792
|
+
* @propType {string} id - The id of the select input
|
|
11686
11793
|
* @propType {{value: number, label: string}[]} items - List of available options.
|
|
11687
11794
|
* @propType {number} defaultRefinement - The number of items selected by default
|
|
11688
11795
|
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
|
|
@@ -12051,6 +12158,7 @@ function (_Component) {
|
|
|
12051
12158
|
key: "render",
|
|
12052
12159
|
value: function render() {
|
|
12053
12160
|
var _this$props = this.props,
|
|
12161
|
+
id = _this$props.id,
|
|
12054
12162
|
items = _this$props.items,
|
|
12055
12163
|
canRefine = _this$props.canRefine,
|
|
12056
12164
|
translate = _this$props.translate,
|
|
@@ -12058,6 +12166,7 @@ function (_Component) {
|
|
|
12058
12166
|
return React__default.createElement("div", {
|
|
12059
12167
|
className: classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
12060
12168
|
}, React__default.createElement("select", {
|
|
12169
|
+
id: id,
|
|
12061
12170
|
value: this.selectedValue,
|
|
12062
12171
|
onChange: this.handleSelectChange,
|
|
12063
12172
|
className: cx$e('select')
|
|
@@ -12090,6 +12199,7 @@ function (_Component) {
|
|
|
12090
12199
|
}(Component);
|
|
12091
12200
|
|
|
12092
12201
|
_defineProperty(MenuSelect, "propTypes", {
|
|
12202
|
+
id: PropTypes.string,
|
|
12093
12203
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
12094
12204
|
label: PropTypes.string.isRequired,
|
|
12095
12205
|
value: PropTypes.string.isRequired,
|
|
@@ -12116,6 +12226,7 @@ var MenuSelect$1 = translatable({
|
|
|
12116
12226
|
* @kind widget
|
|
12117
12227
|
* @requirements The attribute passed to the `attribute` prop must be present in "attributes for faceting"
|
|
12118
12228
|
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
|
|
12229
|
+
* @propType {string} id - the id of the select input
|
|
12119
12230
|
* @propType {string} attribute - the name of the attribute in the record
|
|
12120
12231
|
* @propType {string} [defaultRefinement] - the value of the item selected by default
|
|
12121
12232
|
* @propType {number} [limit=10] - the minimum number of diplayed items
|
|
@@ -13447,6 +13558,7 @@ connectScrollTo(ScrollTo);
|
|
|
13447
13558
|
* @propType {node} [reset] - Change the apparence of the default reset button (cross).
|
|
13448
13559
|
* @propType {node} [loadingIndicator] - Change the apparence of the default loading indicator (spinning circle).
|
|
13449
13560
|
* @propType {string} [defaultRefinement] - Provide default refinement value when component is mounted.
|
|
13561
|
+
* @propType {string} [inputId] - The id of the search input
|
|
13450
13562
|
* @propType {boolean} [showLoadingIndicator=false] - Display that the search is loading. This only happens after a certain amount of time to avoid a blinking effect. This timer can be configured with `stalledSearchDelay` props on <InstantSearch>. By default, the value is 200ms.
|
|
13451
13563
|
* @themeKey ais-SearchBox - the root div of the widget
|
|
13452
13564
|
* @themeKey ais-SearchBox-form - the wrapping form
|
|
@@ -13597,6 +13709,7 @@ function (_Component) {
|
|
|
13597
13709
|
key: "render",
|
|
13598
13710
|
value: function render() {
|
|
13599
13711
|
var _this$props = this.props,
|
|
13712
|
+
id = _this$props.id,
|
|
13600
13713
|
items = _this$props.items,
|
|
13601
13714
|
currentRefinement = _this$props.currentRefinement,
|
|
13602
13715
|
refine = _this$props.refine,
|
|
@@ -13604,6 +13717,7 @@ function (_Component) {
|
|
|
13604
13717
|
return React__default.createElement("div", {
|
|
13605
13718
|
className: classnames(cx$4(''), className)
|
|
13606
13719
|
}, React__default.createElement(Select, {
|
|
13720
|
+
id: id,
|
|
13607
13721
|
cx: cx$4,
|
|
13608
13722
|
items: items,
|
|
13609
13723
|
selectedItem: currentRefinement,
|
|
@@ -13616,6 +13730,7 @@ function (_Component) {
|
|
|
13616
13730
|
}(Component);
|
|
13617
13731
|
|
|
13618
13732
|
_defineProperty(SortBy, "propTypes", {
|
|
13733
|
+
id: PropTypes.string,
|
|
13619
13734
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
13620
13735
|
label: PropTypes.string,
|
|
13621
13736
|
value: PropTypes.string.isRequired
|
|
@@ -13635,6 +13750,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13635
13750
|
* @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on
|
|
13636
13751
|
* the Algolia website.
|
|
13637
13752
|
* @kind widget
|
|
13753
|
+
* @propType {string} id - The id of the select input
|
|
13638
13754
|
* @propType {{value: string, label: string}[]} items - The list of indexes to search in.
|
|
13639
13755
|
* @propType {string} defaultRefinement - The default selected index.
|
|
13640
13756
|
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
|
package/dist/esm/CMEDeck.js
CHANGED
|
@@ -309,7 +309,11 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
309
309
|
return React__default.createElement(
|
|
310
310
|
'div',
|
|
311
311
|
{ className: 'd-flex justify-content-between' },
|
|
312
|
-
currentPage > 1
|
|
312
|
+
currentPage && currentPage > 1 && React__default.createElement(
|
|
313
|
+
'a',
|
|
314
|
+
{ href: '?page=' + (currentPage - 1) },
|
|
315
|
+
'<< Previous'
|
|
316
|
+
),
|
|
313
317
|
React__default.createElement(
|
|
314
318
|
'a',
|
|
315
319
|
{ href: '?page=' + (currentPage + 1) },
|
|
@@ -457,7 +457,8 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
457
457
|
setSortedIssues = _useState8[1];
|
|
458
458
|
|
|
459
459
|
useEffect(function () {
|
|
460
|
-
|
|
460
|
+
|
|
461
|
+
_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
461
462
|
var _this = this;
|
|
462
463
|
|
|
463
464
|
var promises, articles;
|
|
@@ -511,6 +512,7 @@ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
|
511
512
|
articles = _context2.sent;
|
|
512
513
|
|
|
513
514
|
setIssueData(articles);
|
|
515
|
+
|
|
514
516
|
_context2.next = 12;
|
|
515
517
|
break;
|
|
516
518
|
|
|
@@ -711,7 +713,7 @@ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
|
711
713
|
React__default.createElement(
|
|
712
714
|
Row,
|
|
713
715
|
null,
|
|
714
|
-
|
|
716
|
+
React__default.createElement(
|
|
715
717
|
Col,
|
|
716
718
|
{ md: 3, id: 'issueThumbnail' },
|
|
717
719
|
React__default.createElement(
|
|
@@ -722,7 +724,7 @@ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
|
722
724
|
),
|
|
723
725
|
React__default.createElement(
|
|
724
726
|
Col,
|
|
725
|
-
{ md:
|
|
727
|
+
{ md: 9, id: 'issueDetail' },
|
|
726
728
|
React__default.createElement(
|
|
727
729
|
Card.Body,
|
|
728
730
|
null,
|
|
@@ -774,7 +776,7 @@ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
|
774
776
|
React__default.createElement(
|
|
775
777
|
Row,
|
|
776
778
|
null,
|
|
777
|
-
|
|
779
|
+
React__default.createElement(
|
|
778
780
|
Col,
|
|
779
781
|
{ md: 3, id: 'issueThumbnail' },
|
|
780
782
|
React__default.createElement(
|
|
@@ -785,7 +787,7 @@ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
|
785
787
|
),
|
|
786
788
|
React__default.createElement(
|
|
787
789
|
Col,
|
|
788
|
-
{ md:
|
|
790
|
+
{ md: 9, id: 'issueDetail' },
|
|
789
791
|
React__default.createElement(
|
|
790
792
|
Card.Body,
|
|
791
793
|
null,
|
package/dist/esm/View.js
CHANGED
|
@@ -642,6 +642,27 @@ var Article = forwardRef(function (props, ref) {
|
|
|
642
642
|
}
|
|
643
643
|
return null;
|
|
644
644
|
};
|
|
645
|
+
var downloadRIS = function downloadRIS(filename) {
|
|
646
|
+
var fileContent = 'TY - JOUR\n';
|
|
647
|
+
if (issue) {
|
|
648
|
+
if (issue.year) fileContent += 'PY - ' + issue.year + '\n';
|
|
649
|
+
if (issue.month) {
|
|
650
|
+
fileContent += 'DA - ' + moment().month(issue.month).format('MMMM') + '\n';
|
|
651
|
+
}
|
|
652
|
+
if (issue.publication && issue.publication.name) fileContent += 'TI - ' + issue.publication.name + '\n';
|
|
653
|
+
if (issue.name) fileContent += 'T2 - ' + issue.name + '\n';
|
|
654
|
+
if (issue.volume) fileContent += 'IS - ' + issue.volume + '\n';
|
|
655
|
+
if (issue.number) fileContent += 'IS - ' + issue.number + '\n';
|
|
656
|
+
}
|
|
657
|
+
fileContent += 'ER -';
|
|
658
|
+
var element = document.createElement('a');
|
|
659
|
+
element.setAttribute('href', 'data:application/x-research-info-systems;charset=utf-8,' + encodeURIComponent(fileContent));
|
|
660
|
+
element.setAttribute('download', filename);
|
|
661
|
+
element.style.display = 'none';
|
|
662
|
+
document.body.appendChild(element);
|
|
663
|
+
element.click();
|
|
664
|
+
document.body.removeChild(element);
|
|
665
|
+
};
|
|
645
666
|
|
|
646
667
|
var RelevantTopics = function RelevantTopics() {
|
|
647
668
|
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
@@ -688,7 +709,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
688
709
|
React__default.createElement(
|
|
689
710
|
'style',
|
|
690
711
|
{ jsx: 'true' },
|
|
691
|
-
'\n
|
|
712
|
+
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
692
713
|
)
|
|
693
714
|
);
|
|
694
715
|
}
|
|
@@ -1238,6 +1259,13 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1238
1259
|
React__default.createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1239
1260
|
'Download Issue : ',
|
|
1240
1261
|
issue.name
|
|
1262
|
+
),
|
|
1263
|
+
React__default.createElement(
|
|
1264
|
+
Button,
|
|
1265
|
+
{ onClick: function onClick(req) {
|
|
1266
|
+
return downloadRIS('citation-' + url + '.ris');
|
|
1267
|
+
} },
|
|
1268
|
+
'Download RIS'
|
|
1241
1269
|
)
|
|
1242
1270
|
),
|
|
1243
1271
|
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import { a as _core } from './core.get-iterator-method-ea258bb1.js';
|
|
3
3
|
|
|
4
4
|
var $JSON = _core.JSON || (_core.JSON = { stringify: JSON.stringify });
|