Skip to content

Commit 6ba302d

Browse files
committed
upgrade version
1 parent f41cb35 commit 6ba302d

File tree

7 files changed

+180
-211
lines changed

7 files changed

+180
-211
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.40
3+
Version: 0.4.41
44
Description: Dash components for the Materials Project
55
Depends: R (>= 3.0.2)
66
Imports:

dash_mp_components/dash_mp_components.min.js

Lines changed: 114 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -116539,86 +116539,69 @@
116539116539
!(function(e) {
116540116540
function t(e) {
116541116541
if (e) return n(e);
116542+
this._callbacks = new Map();
116542116543
}
116543116544
function n(e) {
116544-
for (var n in t.prototype) e[n] = t.prototype[n];
116545-
return e;
116545+
return (
116546+
Object.assign(e, t.prototype),
116547+
(e._callbacks = new Map()),
116548+
e
116549+
);
116546116550
}
116547-
(e.exports = t),
116548-
(t.prototype.on = t.prototype.addEventListener = function(
116549-
e,
116550-
t
116551-
) {
116552-
return (
116553-
(this._callbacks = this._callbacks || {}),
116554-
(this._callbacks['$' + e] =
116555-
this._callbacks['$' + e] || []).push(t),
116556-
this
116557-
);
116558-
}),
116551+
(t.prototype.on = function(e, t) {
116552+
const n = this._callbacks.get(e) ?? [];
116553+
return n.push(t), this._callbacks.set(e, n), this;
116554+
}),
116559116555
(t.prototype.once = function(e, t) {
116560-
function n() {
116561-
this.off(e, n), t.apply(this, arguments);
116562-
}
116556+
const n = (...r) => {
116557+
this.off(e, n), t.apply(this, r);
116558+
};
116563116559
return (n.fn = t), this.on(e, n), this;
116564116560
}),
116565-
(t.prototype.off = t.prototype.removeListener = t.prototype.removeAllListeners = t.prototype.removeEventListener = function(
116566-
e,
116567-
t
116568-
) {
116569-
if (
116570-
((this._callbacks = this._callbacks || {}),
116571-
0 == arguments.length)
116572-
)
116573-
return (this._callbacks = {}), this;
116574-
var n,
116575-
r = this._callbacks['$' + e];
116576-
if (!r) return this;
116577-
if (1 == arguments.length)
116578-
return (
116579-
delete this._callbacks['$' + e], this
116580-
);
116581-
for (var i = 0; i < r.length; i++)
116582-
if ((n = r[i]) === t || n.fn === t) {
116583-
r.splice(i, 1);
116584-
break;
116585-
}
116586-
return (
116587-
0 === r.length &&
116588-
delete this._callbacks['$' + e],
116589-
this
116590-
);
116561+
(t.prototype.off = function(e, t) {
116562+
if (void 0 === e && void 0 === t)
116563+
return this._callbacks.clear(), this;
116564+
if (void 0 === t)
116565+
return this._callbacks.delete(e), this;
116566+
const n = this._callbacks.get(e);
116567+
if (n) {
116568+
for (const [e, r] of n.entries())
116569+
if (r === t || r.fn === t) {
116570+
n.splice(e, 1);
116571+
break;
116572+
}
116573+
0 === n.length
116574+
? this._callbacks.delete(e)
116575+
: this._callbacks.set(e, n);
116576+
}
116577+
return this;
116591116578
}),
116592-
(t.prototype.emit = function(e) {
116593-
this._callbacks = this._callbacks || {};
116594-
for (
116595-
var t = new Array(arguments.length - 1),
116596-
n = this._callbacks['$' + e],
116597-
r = 1;
116598-
r < arguments.length;
116599-
r++
116600-
)
116601-
t[r - 1] = arguments[r];
116579+
(t.prototype.emit = function(e, ...t) {
116580+
const n = this._callbacks.get(e);
116602116581
if (n) {
116603-
r = 0;
116604-
for (
116605-
var i = (n = n.slice(0)).length;
116606-
r < i;
116607-
++r
116608-
)
116609-
n[r].apply(this, t);
116582+
const e = [...n];
116583+
for (const n of e) n.apply(this, t);
116610116584
}
116611116585
return this;
116612116586
}),
116613116587
(t.prototype.listeners = function(e) {
116614-
return (
116615-
(this._callbacks = this._callbacks || {}),
116616-
this._callbacks['$' + e] || []
116617-
);
116588+
return this._callbacks.get(e) ?? [];
116589+
}),
116590+
(t.prototype.listenerCount = function(e) {
116591+
if (e) return this.listeners(e).length;
116592+
let t = 0;
116593+
for (const e of this._callbacks.values())
116594+
t += e.length;
116595+
return t;
116618116596
}),
116619116597
(t.prototype.hasListeners = function(e) {
116620-
return !!this.listeners(e).length;
116621-
});
116598+
return this.listenerCount(e) > 0;
116599+
}),
116600+
(t.prototype.addEventListener = t.prototype.on),
116601+
(t.prototype.removeListener = t.prototype.off),
116602+
(t.prototype.removeEventListener = t.prototype.off),
116603+
(t.prototype.removeAllListeners = t.prototype.off),
116604+
(e.exports = t);
116622116605
})(UI);
116623116606
var OI,
116624116607
kI = i(UI.exports);
@@ -126933,86 +126916,68 @@
126933126916
function t(e) {
126934126917
if (e)
126935126918
return (function(e) {
126936-
for (var n in t.prototype)
126937-
e[n] = t.prototype[n];
126938-
return e;
126919+
return (
126920+
Object.assign(e, t.prototype),
126921+
(e._callbacks = new Map()),
126922+
e
126923+
);
126939126924
})(e);
126925+
this._callbacks = new Map();
126940126926
}
126941-
(e.exports = t),
126942-
(t.prototype.on = t.prototype.addEventListener = function(
126943-
e,
126944-
t
126945-
) {
126946-
return (
126947-
(this._callbacks = this._callbacks || {}),
126948-
(this._callbacks['$' + e] =
126949-
this._callbacks['$' + e] || []).push(t),
126950-
this
126951-
);
126952-
}),
126927+
(t.prototype.on = function(e, t) {
126928+
const n = this._callbacks.get(e) ?? [];
126929+
return n.push(t), this._callbacks.set(e, n), this;
126930+
}),
126953126931
(t.prototype.once = function(e, t) {
126954-
function n() {
126955-
this.off(e, n), t.apply(this, arguments);
126956-
}
126932+
const n = (...r) => {
126933+
this.off(e, n), t.apply(this, r);
126934+
};
126957126935
return (n.fn = t), this.on(e, n), this;
126958126936
}),
126959-
(t.prototype.off = t.prototype.removeListener = t.prototype.removeAllListeners = t.prototype.removeEventListener = function(
126960-
e,
126961-
t
126962-
) {
126963-
if (
126964-
((this._callbacks = this._callbacks || {}),
126965-
0 == arguments.length)
126966-
)
126967-
return (this._callbacks = {}), this;
126968-
var n,
126969-
r = this._callbacks['$' + e];
126970-
if (!r) return this;
126971-
if (1 == arguments.length)
126972-
return (
126973-
delete this._callbacks['$' + e], this
126974-
);
126975-
for (var i = 0; i < r.length; i++)
126976-
if ((n = r[i]) === t || n.fn === t) {
126977-
r.splice(i, 1);
126978-
break;
126979-
}
126980-
return (
126981-
0 === r.length &&
126982-
delete this._callbacks['$' + e],
126983-
this
126984-
);
126937+
(t.prototype.off = function(e, t) {
126938+
if (void 0 === e && void 0 === t)
126939+
return this._callbacks.clear(), this;
126940+
if (void 0 === t)
126941+
return this._callbacks.delete(e), this;
126942+
const n = this._callbacks.get(e);
126943+
if (n) {
126944+
for (const [e, r] of n.entries())
126945+
if (r === t || r.fn === t) {
126946+
n.splice(e, 1);
126947+
break;
126948+
}
126949+
0 === n.length
126950+
? this._callbacks.delete(e)
126951+
: this._callbacks.set(e, n);
126952+
}
126953+
return this;
126985126954
}),
126986-
(t.prototype.emit = function(e) {
126987-
this._callbacks = this._callbacks || {};
126988-
for (
126989-
var t = new Array(arguments.length - 1),
126990-
n = this._callbacks['$' + e],
126991-
r = 1;
126992-
r < arguments.length;
126993-
r++
126994-
)
126995-
t[r - 1] = arguments[r];
126955+
(t.prototype.emit = function(e, ...t) {
126956+
const n = this._callbacks.get(e);
126996126957
if (n) {
126997-
r = 0;
126998-
for (
126999-
var i = (n = n.slice(0)).length;
127000-
r < i;
127001-
++r
127002-
)
127003-
n[r].apply(this, t);
126958+
const e = [...n];
126959+
for (const n of e) n.apply(this, t);
127004126960
}
127005126961
return this;
127006126962
}),
127007126963
(t.prototype.listeners = function(e) {
127008-
return (
127009-
(this._callbacks = this._callbacks || {}),
127010-
this._callbacks['$' + e] || []
127011-
);
126964+
return this._callbacks.get(e) ?? [];
126965+
}),
126966+
(t.prototype.listenerCount = function(e) {
126967+
if (e) return this.listeners(e).length;
126968+
let t = 0;
126969+
for (const e of this._callbacks.values())
126970+
t += e.length;
126971+
return t;
127012126972
}),
127013126973
(t.prototype.hasListeners = function(e) {
127014-
return !!this.listeners(e).length;
127015-
});
126974+
return this.listenerCount(e) > 0;
126975+
}),
126976+
(t.prototype.addEventListener = t.prototype.on),
126977+
(t.prototype.removeListener = t.prototype.off),
126978+
(t.prototype.removeEventListener = t.prototype.off),
126979+
(t.prototype.removeAllListeners = t.prototype.off),
126980+
(e.exports = t);
127016126981
})(DC);
127017126982
var TC,
127018126983
YC = i(DC.exports);
@@ -241442,9 +241407,15 @@
241442241407
order: 1,
241443241408
dropdownValue: 'Material ID',
241444241409
},
241410+
formula: {
241411+
validate: tz,
241412+
order: 2,
241413+
selectionMode: VO.FORMULA,
241414+
dropdownValue: 'Formula',
241415+
},
241445241416
chemical_system: {
241446241417
validate: e => iz(e, new RegExp(/-/)),
241447-
order: 2,
241418+
order: 3,
241448241419
selectionMode: VO.CHEMICAL_SYSTEM,
241449241420
dropdownValue: 'Chemical System',
241450241421
elementsOnlyDropdownValue: 'Only',
@@ -241453,22 +241424,20 @@
241453241424
validate: e => {
241454241425
const t = rz(e),
241455241426
n = t.toString();
241456-
return n === new RegExp(/-/).toString() ||
241457-
n === new RegExp(/\s/).toString()
241458-
? void 0
241459-
: iz(e, t);
241427+
if (
241428+
n !== new RegExp(/-/).toString() &&
241429+
n !== new RegExp(/\s/).toString()
241430+
) {
241431+
const n = iz(e, t);
241432+
if (n && n.length > 5) return;
241433+
return iz(e, t);
241434+
}
241460241435
},
241461-
order: 3,
241436+
order: 4,
241462241437
selectionMode: VO.ELEMENTS,
241463241438
dropdownValue: 'Elements',
241464241439
elementsOnlyDropdownValue: 'At least',
241465241440
},
241466-
formula: {
241467-
validate: tz,
241468-
order: 4,
241469-
selectionMode: VO.FORMULA,
241470-
dropdownValue: 'Formula',
241471-
},
241472241441
molecule_formula: {
241473241442
validate: (
241474241443
e,

dash_mp_components/dash_mp_components.min.js.LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ PERFORMANCE OF THIS SOFTWARE.
8282
*
8383
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
8484
*
85-
* @version 7.1.8
86-
* @date 2023-11-08T02:09:51.691Z
85+
* @version 7.1.9
86+
* @date 2023-11-24T17:53:34.179Z
8787
*
8888
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
8989
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs

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/package-info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@materialsproject/dash-mp-components",
3-
"version": "0.4.40",
3+
"version": "0.4.41",
44
"description": "Dash components for the Materials Project",
55
"repository": {
66
"type": "git",
@@ -33,7 +33,7 @@
3333
"author": "Materials Project Team <[email protected]>",
3434
"license": "BSD",
3535
"dependencies": {
36-
"@materialsproject/mp-react-components": "0.3.8",
36+
"@materialsproject/mp-react-components": "0.3.9",
3737
"file-loader": "^5.1.0",
3838
"prettier": "^1.19.1",
3939
"process": "^0.11.10",

0 commit comments

Comments
 (0)