Skip to content

Commit 790a467

Browse files
committed
add shortName prop to bibcard
1 parent 11b6678 commit 790a467

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dashMpComponents
22
Title: Dash components for the Materials Project
3-
Version: 0.4.45
3+
Version: 0.4.46
44
Description: Dash components for the Materials Project
55
Depends: R (>= 3.0.2)
66
Imports:

dash_mp_components/BibCard.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class BibCard(Component):
4040
entry in the \"openAccessUrl\" property. If set, the URL will not
4141
be fetched. @default False.
4242
43+
- shortName (string; optional):
44+
Shortened title of the article.
45+
4346
- title (string; optional):
4447
Title of the reference Will render as a link if doi is supplied.
4548
@@ -50,10 +53,10 @@ class BibCard(Component):
5053
_namespace = 'dash_mp_components'
5154
_type = 'BibCard'
5255
@_explicitize_args
53-
def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, title=Component.UNDEFINED, author=Component.UNDEFINED, year=Component.UNDEFINED, journal=Component.UNDEFINED, doi=Component.UNDEFINED, preventOpenAccessFetch=Component.UNDEFINED, openAccessUrl=Component.UNDEFINED, **kwargs):
54-
self._prop_names = ['id', 'author', 'className', 'doi', 'journal', 'openAccessUrl', 'preventOpenAccessFetch', 'title', 'year']
56+
def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, title=Component.UNDEFINED, author=Component.UNDEFINED, year=Component.UNDEFINED, journal=Component.UNDEFINED, doi=Component.UNDEFINED, shortName=Component.UNDEFINED, preventOpenAccessFetch=Component.UNDEFINED, openAccessUrl=Component.UNDEFINED, **kwargs):
57+
self._prop_names = ['id', 'author', 'className', 'doi', 'journal', 'openAccessUrl', 'preventOpenAccessFetch', 'shortName', 'title', 'year']
5558
self._valid_wildcard_attributes = []
56-
self.available_properties = ['id', 'author', 'className', 'doi', 'journal', 'openAccessUrl', 'preventOpenAccessFetch', 'title', 'year']
59+
self.available_properties = ['id', 'author', 'className', 'doi', 'journal', 'openAccessUrl', 'preventOpenAccessFetch', 'shortName', 'title', 'year']
5760
self.available_wildcard_properties = []
5861
_explicit_args = kwargs.pop('_explicit_args')
5962
_locals = locals()

dash_mp_components/dash_mp_components.min.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256386,6 +256386,7 @@
256386256386
year: s().oneOfType[(s().string, s().number)],
256387256387
journal: s().string,
256388256388
doi: s().string,
256389+
shortName: s().string,
256389256390
preventOpenAccessFetch: s().bool,
256390256391
openAccessUrl: s().string,
256391256392
};

dash_mp_components/dash_mp_components.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_mp_components/metadata.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,6 +3232,13 @@
32323232
"required": false,
32333233
"description": "The DOI (Digital Object Identifier) of the reference\nThis identifier is used to generate links to the reference's\nonline publication, open access PDF, and bibtex"
32343234
},
3235+
"shortName": {
3236+
"type": {
3237+
"name": "string"
3238+
},
3239+
"required": false,
3240+
"description": "Shortened title of the article"
3241+
},
32353242
"preventOpenAccessFetch": {
32363243
"type": {
32373244
"name": "bool"

dash_mp_components/package-info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@materialsproject/dash-mp-components",
3-
"version": "0.4.45",
3+
"version": "0.4.46",
44
"description": "Dash components for the Materials Project",
55
"repository": {
66
"type": "git",

src/lib/components/publications/BibCard.react.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ BibCard.propTypes = {
5858
* online publication, open access PDF, and bibtex
5959
*/
6060
doi: PropTypes.string,
61+
/**
62+
* Shortened title of the article
63+
*/
64+
shortName: PropTypes.string,
6165

6266
/**
6367
* Set to true to prevent dynamically fetching a link to a free PDF of

0 commit comments

Comments
 (0)