@abi-software/simulationvuer 0.4.6 → 0.5.0
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/simulationvuer.common.js +1052 -229
- package/dist/simulationvuer.common.js.map +1 -1
- package/dist/simulationvuer.css +1 -1
- package/dist/simulationvuer.umd.js +1052 -229
- package/dist/simulationvuer.umd.js.map +1 -1
- package/dist/simulationvuer.umd.min.js +1 -1
- package/dist/simulationvuer.umd.min.js.map +1 -1
- package/package.json +2 -1
- package/src/.DS_Store +0 -0
- package/src/App.vue +6 -4
- package/src/components/SimulationVuer.vue +130 -184
- package/src/components/common.js +29 -0
- package/src/components/configuration.js +139 -0
- package/src/components/json.js +373 -0
- package/src/components/ui.js +273 -0
- package/vue.config.js +2 -1
|
@@ -96,70 +96,80 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
-
/***/ "
|
|
99
|
+
/***/ "020d":
|
|
100
100
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
101
101
|
|
|
102
102
|
"use strict";
|
|
103
|
-
/* harmony import */ var
|
|
104
|
-
/* harmony import */ var
|
|
103
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dccf");
|
|
104
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
105
105
|
/* unused harmony reexport * */
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
/***/ }),
|
|
109
109
|
|
|
110
|
-
/***/ "
|
|
110
|
+
/***/ "13e3":
|
|
111
111
|
/***/ (function(module, exports) {
|
|
112
112
|
|
|
113
|
-
module.exports = require("core-js/modules/
|
|
113
|
+
module.exports = require("core-js/modules/web.dom-collections.for-each.js");
|
|
114
114
|
|
|
115
115
|
/***/ }),
|
|
116
116
|
|
|
117
|
-
/***/ "
|
|
117
|
+
/***/ "1e1f":
|
|
118
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
119
|
+
|
|
120
|
+
"use strict";
|
|
121
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_container_css_vue_type_style_index_3_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("df2b");
|
|
122
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_container_css_vue_type_style_index_3_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_container_css_vue_type_style_index_3_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
123
|
+
/* unused harmony reexport * */
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
/***/ }),
|
|
127
|
+
|
|
128
|
+
/***/ "30df":
|
|
118
129
|
/***/ (function(module, exports) {
|
|
119
130
|
|
|
120
|
-
module.exports = require("core-js/modules/es.
|
|
131
|
+
module.exports = require("core-js/modules/es.regexp.to-string.js");
|
|
121
132
|
|
|
122
133
|
/***/ }),
|
|
123
134
|
|
|
124
|
-
/***/ "
|
|
125
|
-
/***/ (function(module,
|
|
135
|
+
/***/ "379f":
|
|
136
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
126
137
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
/* unused harmony reexport * */
|
|
138
|
+
// extracted by mini-css-extract-plugin
|
|
139
|
+
|
|
140
|
+
/***/ }),
|
|
131
141
|
|
|
142
|
+
/***/ "4391":
|
|
143
|
+
/***/ (function(module, exports) {
|
|
144
|
+
|
|
145
|
+
module.exports = require("core-js/modules/es.array.map.js");
|
|
132
146
|
|
|
133
147
|
/***/ }),
|
|
134
148
|
|
|
135
|
-
/***/ "
|
|
149
|
+
/***/ "47b7":
|
|
136
150
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
137
151
|
|
|
138
152
|
"use strict";
|
|
139
|
-
/* harmony import */ var
|
|
140
|
-
/* harmony import */ var
|
|
153
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aaaf");
|
|
154
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
141
155
|
/* unused harmony reexport * */
|
|
142
156
|
|
|
143
157
|
|
|
144
158
|
/***/ }),
|
|
145
159
|
|
|
146
|
-
/***/ "
|
|
147
|
-
/***/ (function(module,
|
|
148
|
-
|
|
149
|
-
"use strict";
|
|
150
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b2d3");
|
|
151
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
152
|
-
/* unused harmony reexport * */
|
|
160
|
+
/***/ "4933":
|
|
161
|
+
/***/ (function(module, exports) {
|
|
153
162
|
|
|
163
|
+
module.exports = require("core-js/modules/es.symbol.description.js");
|
|
154
164
|
|
|
155
165
|
/***/ }),
|
|
156
166
|
|
|
157
|
-
/***/ "
|
|
167
|
+
/***/ "5b43":
|
|
158
168
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
159
169
|
|
|
160
170
|
"use strict";
|
|
161
|
-
/* harmony import */ var
|
|
162
|
-
/* harmony import */ var
|
|
171
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_6_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("660d");
|
|
172
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_6_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_6_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
163
173
|
/* unused harmony reexport * */
|
|
164
174
|
|
|
165
175
|
|
|
@@ -172,22 +182,50 @@ module.exports = require("element-ui");
|
|
|
172
182
|
|
|
173
183
|
/***/ }),
|
|
174
184
|
|
|
175
|
-
/***/ "
|
|
185
|
+
/***/ "6378":
|
|
186
|
+
/***/ (function(module, exports) {
|
|
187
|
+
|
|
188
|
+
module.exports = require("core-js/modules/es.string.replace.js");
|
|
189
|
+
|
|
190
|
+
/***/ }),
|
|
191
|
+
|
|
192
|
+
/***/ "660d":
|
|
176
193
|
/***/ (function(module, exports, __webpack_require__) {
|
|
177
194
|
|
|
178
195
|
// extracted by mini-css-extract-plugin
|
|
179
196
|
|
|
180
197
|
/***/ }),
|
|
181
198
|
|
|
182
|
-
/***/ "
|
|
199
|
+
/***/ "7a96":
|
|
183
200
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
184
201
|
|
|
185
202
|
"use strict";
|
|
186
|
-
/* harmony import */ var
|
|
187
|
-
/* harmony import */ var
|
|
203
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("da9e");
|
|
204
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
188
205
|
/* unused harmony reexport * */
|
|
189
206
|
|
|
190
207
|
|
|
208
|
+
/***/ }),
|
|
209
|
+
|
|
210
|
+
/***/ "8518":
|
|
211
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
212
|
+
|
|
213
|
+
// extracted by mini-css-extract-plugin
|
|
214
|
+
|
|
215
|
+
/***/ }),
|
|
216
|
+
|
|
217
|
+
/***/ "85f7":
|
|
218
|
+
/***/ (function(module, exports) {
|
|
219
|
+
|
|
220
|
+
module.exports = require("core-js/modules/es.array.includes.js");
|
|
221
|
+
|
|
222
|
+
/***/ }),
|
|
223
|
+
|
|
224
|
+
/***/ "86d1":
|
|
225
|
+
/***/ (function(module, exports) {
|
|
226
|
+
|
|
227
|
+
module.exports = require("core-js/modules/es.regexp.constructor.js");
|
|
228
|
+
|
|
191
229
|
/***/ }),
|
|
192
230
|
|
|
193
231
|
/***/ "8bbf":
|
|
@@ -197,13 +235,31 @@ module.exports = require("vue");
|
|
|
197
235
|
|
|
198
236
|
/***/ }),
|
|
199
237
|
|
|
200
|
-
/***/ "
|
|
238
|
+
/***/ "8f10":
|
|
201
239
|
/***/ (function(module, exports, __webpack_require__) {
|
|
202
240
|
|
|
203
241
|
// extracted by mini-css-extract-plugin
|
|
204
242
|
|
|
205
243
|
/***/ }),
|
|
206
244
|
|
|
245
|
+
/***/ "9043":
|
|
246
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
247
|
+
|
|
248
|
+
"use strict";
|
|
249
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_4_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8518");
|
|
250
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_4_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_4_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
251
|
+
/* unused harmony reexport * */
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
/***/ }),
|
|
255
|
+
|
|
256
|
+
/***/ "97d3":
|
|
257
|
+
/***/ (function(module, exports) {
|
|
258
|
+
|
|
259
|
+
module.exports = require("core-js/modules/es.object.to-string.js");
|
|
260
|
+
|
|
261
|
+
/***/ }),
|
|
262
|
+
|
|
207
263
|
/***/ "9b22":
|
|
208
264
|
/***/ (function(module, exports) {
|
|
209
265
|
|
|
@@ -218,49 +274,53 @@ module.exports = require("@soda/get-current-script");
|
|
|
218
274
|
|
|
219
275
|
/***/ }),
|
|
220
276
|
|
|
221
|
-
/***/ "
|
|
222
|
-
/***/ (function(module,
|
|
223
|
-
|
|
224
|
-
"use strict";
|
|
225
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d7e9");
|
|
226
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
227
|
-
/* unused harmony reexport * */
|
|
277
|
+
/***/ "9e9d":
|
|
278
|
+
/***/ (function(module, exports) {
|
|
228
279
|
|
|
280
|
+
module.exports = require("jsonschema");
|
|
229
281
|
|
|
230
282
|
/***/ }),
|
|
231
283
|
|
|
232
|
-
/***/ "
|
|
284
|
+
/***/ "aaaf":
|
|
233
285
|
/***/ (function(module, exports, __webpack_require__) {
|
|
234
286
|
|
|
235
287
|
// extracted by mini-css-extract-plugin
|
|
236
288
|
|
|
237
289
|
/***/ }),
|
|
238
290
|
|
|
239
|
-
/***/ "
|
|
240
|
-
/***/ (function(module, exports
|
|
291
|
+
/***/ "be94":
|
|
292
|
+
/***/ (function(module, exports) {
|
|
241
293
|
|
|
242
|
-
|
|
294
|
+
module.exports = require("core-js/modules/es.array.join.js");
|
|
243
295
|
|
|
244
296
|
/***/ }),
|
|
245
297
|
|
|
246
|
-
/***/ "
|
|
247
|
-
/***/ (function(module, exports
|
|
298
|
+
/***/ "c8a6":
|
|
299
|
+
/***/ (function(module, exports) {
|
|
248
300
|
|
|
249
|
-
|
|
301
|
+
module.exports = require("core-js/modules/es.regexp.exec.js");
|
|
250
302
|
|
|
251
303
|
/***/ }),
|
|
252
304
|
|
|
253
|
-
/***/ "
|
|
254
|
-
/***/ (function(module,
|
|
305
|
+
/***/ "c9af":
|
|
306
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
307
|
+
|
|
308
|
+
"use strict";
|
|
309
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_5_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8f10");
|
|
310
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_5_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_5_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
311
|
+
/* unused harmony reexport * */
|
|
255
312
|
|
|
256
|
-
// extracted by mini-css-extract-plugin
|
|
257
313
|
|
|
258
314
|
/***/ }),
|
|
259
315
|
|
|
260
|
-
/***/ "
|
|
261
|
-
/***/ (function(module,
|
|
316
|
+
/***/ "d7fe":
|
|
317
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
318
|
+
|
|
319
|
+
"use strict";
|
|
320
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("379f");
|
|
321
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
322
|
+
/* unused harmony reexport * */
|
|
262
323
|
|
|
263
|
-
// extracted by mini-css-extract-plugin
|
|
264
324
|
|
|
265
325
|
/***/ }),
|
|
266
326
|
|
|
@@ -271,6 +331,13 @@ module.exports = require("@abi-software/plotvuer/dist/plotvuer.css");
|
|
|
271
331
|
|
|
272
332
|
/***/ }),
|
|
273
333
|
|
|
334
|
+
/***/ "da9e":
|
|
335
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
336
|
+
|
|
337
|
+
// extracted by mini-css-extract-plugin
|
|
338
|
+
|
|
339
|
+
/***/ }),
|
|
340
|
+
|
|
274
341
|
/***/ "db0a":
|
|
275
342
|
/***/ (function(module, exports) {
|
|
276
343
|
|
|
@@ -278,24 +345,27 @@ module.exports = require("core-js/modules/es.function.name.js");
|
|
|
278
345
|
|
|
279
346
|
/***/ }),
|
|
280
347
|
|
|
281
|
-
/***/ "
|
|
282
|
-
/***/ (function(module,
|
|
283
|
-
|
|
284
|
-
"use strict";
|
|
285
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d4a0");
|
|
286
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_6fb0452b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
287
|
-
/* unused harmony reexport * */
|
|
348
|
+
/***/ "dccf":
|
|
349
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
288
350
|
|
|
351
|
+
// extracted by mini-css-extract-plugin
|
|
289
352
|
|
|
290
353
|
/***/ }),
|
|
291
354
|
|
|
292
|
-
/***/ "
|
|
355
|
+
/***/ "df2b":
|
|
293
356
|
/***/ (function(module, exports, __webpack_require__) {
|
|
294
357
|
|
|
295
358
|
// extracted by mini-css-extract-plugin
|
|
296
359
|
|
|
297
360
|
/***/ }),
|
|
298
361
|
|
|
362
|
+
/***/ "ea64":
|
|
363
|
+
/***/ (function(module, exports) {
|
|
364
|
+
|
|
365
|
+
module.exports = require("core-js/modules/es.object.keys.js");
|
|
366
|
+
|
|
367
|
+
/***/ }),
|
|
368
|
+
|
|
299
369
|
/***/ "f164":
|
|
300
370
|
/***/ (function(module, exports) {
|
|
301
371
|
|
|
@@ -303,6 +373,13 @@ module.exports = require("@abi-software/plotvuer");
|
|
|
303
373
|
|
|
304
374
|
/***/ }),
|
|
305
375
|
|
|
376
|
+
/***/ "f989":
|
|
377
|
+
/***/ (function(module, exports) {
|
|
378
|
+
|
|
379
|
+
module.exports = require("core-js/modules/es.number.constructor.js");
|
|
380
|
+
|
|
381
|
+
/***/ }),
|
|
382
|
+
|
|
306
383
|
/***/ "fae3":
|
|
307
384
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
308
385
|
|
|
@@ -337,18 +414,21 @@ if (typeof window !== 'undefined') {
|
|
|
337
414
|
// Indicate to webpack that this file can be concatenated
|
|
338
415
|
/* harmony default export */ var setPublicPath = (null);
|
|
339
416
|
|
|
340
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
341
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.simulationBeingComputed),expression:"simulationBeingComputed"}],staticClass:"simulation-vuer",attrs:{"element-loading-text":
|
|
417
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"143c7da7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuer.vue?vue&type=template&id=3e94221a&scoped=true&
|
|
418
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.simulationBeingComputed),expression:"simulationBeingComputed"}],staticClass:"simulation-vuer",attrs:{"element-loading-text":"Loading simulation results..."}},[(!_vm.hasValidJson)?_c('p',{staticClass:"default error"},[_c('span',{staticClass:"error"},[_vm._v("Error:")]),_vm._v(" an unknown or invalid model was provided.")]):_vm._e(),(_vm.hasValidJson)?_c('div',{staticClass:"main"},[_c('div',{staticClass:"main-left"},[_c('p',{staticClass:"default title"},[_vm._v(_vm._s(_vm.title))]),_c('el-divider'),_c('p',{staticClass:"default input-parameters"},[_vm._v("Input parameters")]),_c('div',{ref:"input"}),_c('div',{staticClass:"primary-button"},[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.runSimulation()}}},[_vm._v("Run simulation")])],1),_c('div',{staticClass:"secondary-button"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.goToOsparc()}}},[_vm._v("Go to oSPARC")])],1),_c('div',{staticClass:"secondary-button"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.viewDataset()}}},[_vm._v("View dataset")])],1),_c('p',{staticClass:"default note"},[_vm._v("Additional parameters are available on oSPARC")])],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.simulationValid),expression:"simulationValid"}],ref:"output",staticClass:"main-right"},_vm._l((_vm.json.output.plots),function(outputPlot,index){return _c('PlotVuer',{key:("output-" + index),attrs:{"layout-input":_vm.layout[index],"dataInput":_vm.simulationData[index],"plotType":'plotly-only'}})}),1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.simulationValid),expression:"!simulationValid"}],staticClass:"main-right"},[_c('p',{staticClass:"default error"},[_c('span',{staticClass:"error"},[_vm._v("Error:")]),_vm._v(" "),_c('span',{domProps:{"innerHTML":_vm._s(_vm.errorMessage)}}),_vm._v(".")])])]):_vm._e()])}
|
|
342
419
|
var staticRenderFns = []
|
|
343
420
|
|
|
344
421
|
|
|
345
|
-
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=template&id=
|
|
422
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=template&id=3e94221a&scoped=true&
|
|
346
423
|
|
|
347
424
|
// EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
|
|
348
425
|
var es_function_name_js_ = __webpack_require__("db0a");
|
|
349
426
|
|
|
350
|
-
// EXTERNAL MODULE: external "core-js/modules/
|
|
351
|
-
var
|
|
427
|
+
// EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each.js"
|
|
428
|
+
var web_dom_collections_for_each_js_ = __webpack_require__("13e3");
|
|
429
|
+
|
|
430
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.keys.js"
|
|
431
|
+
var es_object_keys_js_ = __webpack_require__("ea64");
|
|
352
432
|
|
|
353
433
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.js"
|
|
354
434
|
var es_symbol_js_ = __webpack_require__("9b22");
|
|
@@ -369,11 +449,821 @@ var plotvuer_css_ = __webpack_require__("d856");
|
|
|
369
449
|
// EXTERNAL MODULE: external "element-ui"
|
|
370
450
|
var external_element_ui_ = __webpack_require__("5f72");
|
|
371
451
|
|
|
452
|
+
// CONCATENATED MODULE: ./src/components/configuration.js
|
|
453
|
+
function jsonForNormalModel() {
|
|
454
|
+
return {
|
|
455
|
+
input: [{
|
|
456
|
+
defaultValue: 0,
|
|
457
|
+
id: "sm",
|
|
458
|
+
name: "Simulation mode",
|
|
459
|
+
possibleValues: [{
|
|
460
|
+
name: "Normal sinus rhythm",
|
|
461
|
+
value: 0
|
|
462
|
+
}, {
|
|
463
|
+
name: "Stellate stimulation",
|
|
464
|
+
value: 1
|
|
465
|
+
}, {
|
|
466
|
+
name: "Vagal stimulation",
|
|
467
|
+
value: 2
|
|
468
|
+
}]
|
|
469
|
+
}, {
|
|
470
|
+
defaultValue: 0,
|
|
471
|
+
enabled: "(sm == 1) || (sm == 2)",
|
|
472
|
+
id: "sl",
|
|
473
|
+
maximumValue: 10,
|
|
474
|
+
minimumValue: 0,
|
|
475
|
+
name: "Stimulation level"
|
|
476
|
+
}],
|
|
477
|
+
output: {
|
|
478
|
+
data: [{
|
|
479
|
+
id: "time",
|
|
480
|
+
name: "environment/time"
|
|
481
|
+
}, {
|
|
482
|
+
id: "vm",
|
|
483
|
+
name: "Membrane/V"
|
|
484
|
+
}],
|
|
485
|
+
plots: [{
|
|
486
|
+
xAxisTitle: "Time (s)",
|
|
487
|
+
xValue: "time",
|
|
488
|
+
yAxisTitle: "Membrane potential (mV)",
|
|
489
|
+
yValue: "vm"
|
|
490
|
+
}]
|
|
491
|
+
},
|
|
492
|
+
parameters: [{
|
|
493
|
+
name: "Rate_modulation_experiments/Iso_1_uM",
|
|
494
|
+
value: "(sm == 0) ? 0.0 : 1.0"
|
|
495
|
+
}, {
|
|
496
|
+
name: "Rate_modulation_experiments/ACh",
|
|
497
|
+
value: "(sm == 0) ? 0.0 : (sm === 1) ? (1.0 - 0.1 * sl) * 22.0e-6 : 22.0e-6 + 0.1 * sl * (38.0e-6 - 22.0e-6)"
|
|
498
|
+
}],
|
|
499
|
+
simulation: {
|
|
500
|
+
endingPoint: 3.0,
|
|
501
|
+
pointInterval: 0.001
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
function jsonForCompositeModel() {
|
|
506
|
+
return {
|
|
507
|
+
input: [{
|
|
508
|
+
defaultValue: 300,
|
|
509
|
+
id: "sf",
|
|
510
|
+
maximumValue: 1000,
|
|
511
|
+
minimumValue: 0,
|
|
512
|
+
name: "Spike frequency"
|
|
513
|
+
}, {
|
|
514
|
+
defaultValue: 10,
|
|
515
|
+
id: "sn",
|
|
516
|
+
maximumValue: 30,
|
|
517
|
+
minimumValue: 0,
|
|
518
|
+
name: "Spike number"
|
|
519
|
+
}, {
|
|
520
|
+
defaultValue: 10,
|
|
521
|
+
id: "sa",
|
|
522
|
+
maximumValue: 30,
|
|
523
|
+
minimumValue: 0,
|
|
524
|
+
name: "Spike amplitude"
|
|
525
|
+
}],
|
|
526
|
+
output: {
|
|
527
|
+
data: [{
|
|
528
|
+
id: "sa",
|
|
529
|
+
name: "Brain_stem/w"
|
|
530
|
+
}, {
|
|
531
|
+
id: "time",
|
|
532
|
+
name: "environment/time"
|
|
533
|
+
}, {
|
|
534
|
+
id: "vm",
|
|
535
|
+
name: "Membrane/V"
|
|
536
|
+
}],
|
|
537
|
+
plots: [{
|
|
538
|
+
xAxisTitle: "Time (s)",
|
|
539
|
+
xValue: "time",
|
|
540
|
+
yAxisTitle: "Spike amplitude",
|
|
541
|
+
yValue: "100.0 * sa"
|
|
542
|
+
}, {
|
|
543
|
+
xAxisTitle: "Time (s)",
|
|
544
|
+
xValue: "time",
|
|
545
|
+
yAxisTitle: "Membrane potential (mV)",
|
|
546
|
+
yValue: "vm"
|
|
547
|
+
}]
|
|
548
|
+
},
|
|
549
|
+
parameters: [{
|
|
550
|
+
name: "Brain_stem/t_period",
|
|
551
|
+
value: "sf"
|
|
552
|
+
}, {
|
|
553
|
+
name: "Brain_stem/w_n",
|
|
554
|
+
value: "sn"
|
|
555
|
+
}, {
|
|
556
|
+
name: "Brain_stem/w_value",
|
|
557
|
+
value: "0.01 * sa"
|
|
558
|
+
}]
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.constructor.js"
|
|
562
|
+
var es_regexp_constructor_js_ = __webpack_require__("86d1");
|
|
563
|
+
|
|
564
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.exec.js"
|
|
565
|
+
var es_regexp_exec_js_ = __webpack_require__("c8a6");
|
|
566
|
+
|
|
567
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.to-string.js"
|
|
568
|
+
var es_regexp_to_string_js_ = __webpack_require__("30df");
|
|
569
|
+
|
|
570
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.replace.js"
|
|
571
|
+
var es_string_replace_js_ = __webpack_require__("6378");
|
|
572
|
+
|
|
573
|
+
// CONCATENATED MODULE: ./src/components/common.js
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
function doEvaluateValue(value, from, to) {
|
|
581
|
+
if (from !== undefined) {
|
|
582
|
+
var re = new RegExp("\\b".concat(from, "\\b"), 'g');
|
|
583
|
+
value = value.replace(re, to);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
return value;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function evaluateValue(ui, value) {
|
|
590
|
+
ui.discreteElements.forEach(function (discreteElement) {
|
|
591
|
+
value = doEvaluateValue(value, discreteElement.id, discreteElement.select.vModel);
|
|
592
|
+
});
|
|
593
|
+
ui.scalarElements.forEach(function (scalarElement) {
|
|
594
|
+
value = doEvaluateValue(value, scalarElement.id, scalarElement.input_number.vModel);
|
|
595
|
+
});
|
|
596
|
+
return Function("return " + value + ";")();
|
|
597
|
+
}
|
|
598
|
+
function evaluateSimulationValue(parent, results, value, i) {
|
|
599
|
+
parent.json.output.data.forEach(function (data) {
|
|
600
|
+
value = doEvaluateValue(value, data.id, results[parent.simulationDataId[data.id]][i]);
|
|
601
|
+
});
|
|
602
|
+
return Function("return " + value + ";")();
|
|
603
|
+
}
|
|
604
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.to-string.js"
|
|
605
|
+
var es_object_to_string_js_ = __webpack_require__("97d3");
|
|
606
|
+
|
|
607
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.map.js"
|
|
608
|
+
var es_array_map_js_ = __webpack_require__("4391");
|
|
609
|
+
|
|
610
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.includes.js"
|
|
611
|
+
var es_array_includes_js_ = __webpack_require__("85f7");
|
|
612
|
+
|
|
613
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.includes.js"
|
|
614
|
+
var es_string_includes_js_ = __webpack_require__("fd22");
|
|
615
|
+
|
|
616
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.join.js"
|
|
617
|
+
var es_array_join_js_ = __webpack_require__("be94");
|
|
618
|
+
|
|
619
|
+
// EXTERNAL MODULE: external "jsonschema"
|
|
620
|
+
var external_jsonschema_ = __webpack_require__("9e9d");
|
|
621
|
+
|
|
622
|
+
// CONCATENATED MODULE: ./src/components/json.js
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
function validJson(json) {
|
|
632
|
+
// Check the JSON against our schema.
|
|
633
|
+
var validator = new external_jsonschema_["Validator"]();
|
|
634
|
+
var schema = {
|
|
635
|
+
additionalProperties: false,
|
|
636
|
+
properties: {
|
|
637
|
+
input: {
|
|
638
|
+
items: {
|
|
639
|
+
oneOf: [{
|
|
640
|
+
additionalProperties: false,
|
|
641
|
+
properties: {
|
|
642
|
+
defaultValue: {
|
|
643
|
+
required: true,
|
|
644
|
+
type: "number"
|
|
645
|
+
},
|
|
646
|
+
id: {
|
|
647
|
+
type: "string"
|
|
648
|
+
},
|
|
649
|
+
name: {
|
|
650
|
+
required: true,
|
|
651
|
+
type: "string"
|
|
652
|
+
},
|
|
653
|
+
possibleValues: {
|
|
654
|
+
items: {
|
|
655
|
+
additionalProperties: false,
|
|
656
|
+
properties: {
|
|
657
|
+
name: {
|
|
658
|
+
required: true,
|
|
659
|
+
type: "string"
|
|
660
|
+
},
|
|
661
|
+
value: {
|
|
662
|
+
required: true,
|
|
663
|
+
type: "number"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
type: "object"
|
|
667
|
+
},
|
|
668
|
+
minItems: 1,
|
|
669
|
+
required: true,
|
|
670
|
+
type: "array"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}, {
|
|
674
|
+
additionalProperties: false,
|
|
675
|
+
properties: {
|
|
676
|
+
defaultValue: {
|
|
677
|
+
required: true,
|
|
678
|
+
type: "number"
|
|
679
|
+
},
|
|
680
|
+
enabled: {
|
|
681
|
+
type: "string"
|
|
682
|
+
},
|
|
683
|
+
id: {
|
|
684
|
+
type: "string"
|
|
685
|
+
},
|
|
686
|
+
maximumValue: {
|
|
687
|
+
required: true,
|
|
688
|
+
type: "number"
|
|
689
|
+
},
|
|
690
|
+
minimumValue: {
|
|
691
|
+
required: true,
|
|
692
|
+
type: "number"
|
|
693
|
+
},
|
|
694
|
+
name: {
|
|
695
|
+
required: true,
|
|
696
|
+
type: "string"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}],
|
|
700
|
+
type: "object"
|
|
701
|
+
},
|
|
702
|
+
minItems: 1,
|
|
703
|
+
type: "array"
|
|
704
|
+
},
|
|
705
|
+
output: {
|
|
706
|
+
additionalProperties: false,
|
|
707
|
+
properties: {
|
|
708
|
+
data: {
|
|
709
|
+
items: {
|
|
710
|
+
additionalProperties: false,
|
|
711
|
+
properties: {
|
|
712
|
+
id: {
|
|
713
|
+
type: "string"
|
|
714
|
+
},
|
|
715
|
+
name: {
|
|
716
|
+
required: true,
|
|
717
|
+
type: "string"
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
type: "object"
|
|
721
|
+
},
|
|
722
|
+
type: "array"
|
|
723
|
+
},
|
|
724
|
+
plots: {
|
|
725
|
+
items: {
|
|
726
|
+
additionalProperties: false,
|
|
727
|
+
properties: {
|
|
728
|
+
xAxisTitle: {
|
|
729
|
+
required: true,
|
|
730
|
+
type: "string"
|
|
731
|
+
},
|
|
732
|
+
xValue: {
|
|
733
|
+
required: true,
|
|
734
|
+
type: "string"
|
|
735
|
+
},
|
|
736
|
+
yAxisTitle: {
|
|
737
|
+
required: true,
|
|
738
|
+
type: "string"
|
|
739
|
+
},
|
|
740
|
+
yValue: {
|
|
741
|
+
required: true,
|
|
742
|
+
type: "string"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
type: "object"
|
|
746
|
+
},
|
|
747
|
+
maxItems: 9,
|
|
748
|
+
minItems: 1,
|
|
749
|
+
required: true,
|
|
750
|
+
type: "array"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
required: true,
|
|
754
|
+
type: "object"
|
|
755
|
+
},
|
|
756
|
+
parameters: {
|
|
757
|
+
items: {
|
|
758
|
+
additionalProperties: false,
|
|
759
|
+
properties: {
|
|
760
|
+
name: {
|
|
761
|
+
required: true,
|
|
762
|
+
type: "string"
|
|
763
|
+
},
|
|
764
|
+
value: {
|
|
765
|
+
required: true,
|
|
766
|
+
type: "string"
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
type: "object"
|
|
770
|
+
},
|
|
771
|
+
type: "array"
|
|
772
|
+
},
|
|
773
|
+
simulation: {
|
|
774
|
+
additionalProperties: false,
|
|
775
|
+
properties: {
|
|
776
|
+
endingPoint: {
|
|
777
|
+
required: true,
|
|
778
|
+
type: "number"
|
|
779
|
+
},
|
|
780
|
+
pointInterval: {
|
|
781
|
+
required: true,
|
|
782
|
+
type: "number"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
type: "object"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
type: "object"
|
|
789
|
+
};
|
|
790
|
+
var result = validator.validate(json, schema, {
|
|
791
|
+
nestedErrors: true
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
if (!result.valid) {
|
|
795
|
+
console.warn(result.toString());
|
|
796
|
+
return false;
|
|
797
|
+
} // Make sure that the input information makes sense.
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
var inputIdUsed = [];
|
|
801
|
+
var inputValid = json.input.every(function (input) {
|
|
802
|
+
if (input.id !== undefined) {
|
|
803
|
+
if (input.id === "") {
|
|
804
|
+
console.warn("JSON: an input id must not be empty.");
|
|
805
|
+
return false;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
if (inputIdUsed[input.id]) {
|
|
809
|
+
console.warn("JSON: an input id must be unique (" + input.id + " is used more than once).");
|
|
810
|
+
return false;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
inputIdUsed[input.id] = true;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if (input.name === "") {
|
|
817
|
+
console.warn("JSON: an input name must not be empty.");
|
|
818
|
+
return false;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
if (input.possibleValues !== undefined) {
|
|
822
|
+
if (!input.possibleValues.every(function (possibleValue) {
|
|
823
|
+
if (possibleValue.name === "") {
|
|
824
|
+
console.warn("JSON: an input possible value must not have an empty name.");
|
|
825
|
+
return false;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
return true;
|
|
829
|
+
})) {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
var values = input.possibleValues.map(function (value) {
|
|
834
|
+
return value.value;
|
|
835
|
+
});
|
|
836
|
+
var valueUsed = [];
|
|
837
|
+
|
|
838
|
+
if (!values.every(function (value) {
|
|
839
|
+
if (valueUsed[value]) {
|
|
840
|
+
console.warn("JSON: an input possible value must have a unique value (" + value + " is used more than once).");
|
|
841
|
+
return false;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
valueUsed[value] = true;
|
|
845
|
+
return true;
|
|
846
|
+
})) {
|
|
847
|
+
return false;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
if (!values.includes(input.defaultValue)) {
|
|
851
|
+
console.warn("JSON: the input default value (" + input.defaultValue + ") must be one of the possible values (" + values.join(", ") + ").");
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
if (input.enabled !== undefined) {
|
|
857
|
+
if (input.enabled === "") {
|
|
858
|
+
console.warn("JSON: an input enabled must not be empty.");
|
|
859
|
+
return false;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
if (input.minimumValue !== undefined && input.maximumValue !== undefined) {
|
|
864
|
+
if (input.minimumValue >= input.maximumValue) {
|
|
865
|
+
console.warn("JSON: the input minimum value (" + input.minimumValue + ") must be lower than the maximum value (" + input.maximumValue + ").");
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
if (input.defaultValue < input.minimumValue || input.defaultValue > input.maximumValue) {
|
|
870
|
+
console.warn("JSON: the input default value (" + input.defaultValue + ") must be greater or equal to the minimum value (" + input.minimumValue + ") and lower or equal to the maximum value (" + input.maximumValue + ").");
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
return true;
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
if (!inputValid) {
|
|
879
|
+
return false;
|
|
880
|
+
} // Make sure that the output information makes sense.
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
var outputIdUsed = [];
|
|
884
|
+
var outputDataValid = json.output.data.every(function (outputData) {
|
|
885
|
+
if (outputData.id !== undefined) {
|
|
886
|
+
if (outputData.id === "") {
|
|
887
|
+
console.warn("JSON: an output data id must not be empty.");
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
if (outputIdUsed[outputData.id]) {
|
|
892
|
+
console.warn("JSON: an output data id must be unique (" + outputData.id + " is used more than once).");
|
|
893
|
+
return false;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
outputIdUsed[outputData.id] = true;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
if (outputData.name === "") {
|
|
900
|
+
console.warn("JSON: an output data name must not be empty.");
|
|
901
|
+
return false;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
return true;
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
if (!outputDataValid) {
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
var outputPlotsValid = json.output.plots.every(function (outputPlot) {
|
|
912
|
+
if (outputPlot.xAxisTitle === "") {
|
|
913
|
+
console.warn("JSON: an output plot X axis title must not be empty.");
|
|
914
|
+
return false;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
if (outputPlot.xValue === "") {
|
|
918
|
+
console.warn("JSON: an output plot X value must not be empty.");
|
|
919
|
+
return false;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
if (outputPlot.yAxisTitle === "") {
|
|
923
|
+
console.warn("JSON: an output plot Y axis title must not be empty.");
|
|
924
|
+
return false;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
if (outputPlot.yValue === "") {
|
|
928
|
+
console.warn("JSON: an output plot Y value must not be empty.");
|
|
929
|
+
return false;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return true;
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
if (!outputPlotsValid) {
|
|
936
|
+
return false;
|
|
937
|
+
} // Make sure that the parameters information makes sense.
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
var parametersValid = json.parameters.every(function (parameter) {
|
|
941
|
+
if (parameter.name === "") {
|
|
942
|
+
console.warn("JSON: a parameter name must not be empty.");
|
|
943
|
+
return false;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
if (parameter.value === "") {
|
|
947
|
+
console.warn("JSON: a parameter value must not be empty.");
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
return true;
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
if (!parametersValid) {
|
|
955
|
+
return false;
|
|
956
|
+
} // Make sure that the simulation information makes sense.
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
if (json.simulation !== undefined) {
|
|
960
|
+
if (json.simulation.endingPoint <= 0.0) {
|
|
961
|
+
console.warn("JSON: a simulation ending point must be greater than zero.");
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
if (json.simulation.pointInterval <= 0.0) {
|
|
966
|
+
console.warn("JSON: a simulation point interval must be greater than zero.");
|
|
967
|
+
return false;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
return true;
|
|
972
|
+
}
|
|
973
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
974
|
+
function _classCallCheck(instance, Constructor) {
|
|
975
|
+
if (!(instance instanceof Constructor)) {
|
|
976
|
+
throw new TypeError("Cannot call a class as a function");
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
980
|
+
function _defineProperties(target, props) {
|
|
981
|
+
for (var i = 0; i < props.length; i++) {
|
|
982
|
+
var descriptor = props[i];
|
|
983
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
984
|
+
descriptor.configurable = true;
|
|
985
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
986
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
991
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
992
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
993
|
+
return Constructor;
|
|
994
|
+
}
|
|
995
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
996
|
+
function _defineProperty(obj, key, value) {
|
|
997
|
+
if (key in obj) {
|
|
998
|
+
Object.defineProperty(obj, key, {
|
|
999
|
+
value: value,
|
|
1000
|
+
enumerable: true,
|
|
1001
|
+
configurable: true,
|
|
1002
|
+
writable: true
|
|
1003
|
+
});
|
|
1004
|
+
} else {
|
|
1005
|
+
obj[key] = value;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
return obj;
|
|
1009
|
+
}
|
|
1010
|
+
// EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
|
|
1011
|
+
var es_number_constructor_js_ = __webpack_require__("f989");
|
|
1012
|
+
|
|
1013
|
+
// CONCATENATED MODULE: ./src/components/ui.js
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
function prepareForUi(parent) {
|
|
1023
|
+
var index = -1;
|
|
1024
|
+
parent.json.output.data.forEach(function (data) {
|
|
1025
|
+
parent.simulationDataId[data.id] = data.name;
|
|
1026
|
+
});
|
|
1027
|
+
parent.json.output.plots.forEach(function (outputPlot) {
|
|
1028
|
+
++index;
|
|
1029
|
+
parent.layout[index] = {
|
|
1030
|
+
xaxis: {
|
|
1031
|
+
title: {
|
|
1032
|
+
text: outputPlot.xAxisTitle,
|
|
1033
|
+
font: {
|
|
1034
|
+
size: 10
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
yaxis: {
|
|
1039
|
+
title: {
|
|
1040
|
+
text: outputPlot.yAxisTitle,
|
|
1041
|
+
font: {
|
|
1042
|
+
size: 10
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
parent.simulationData[index] = [{}];
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
var VueContainer = external_vue_default.a.extend({
|
|
1051
|
+
template: "\n <div class=\"sliders-and-fields\"/>\n "
|
|
1052
|
+
});
|
|
1053
|
+
var VueInputNumber = external_vue_default.a.extend({
|
|
1054
|
+
methods: {
|
|
1055
|
+
emitSynchroniseSliderAndInputNumber: function emitSynchroniseSliderAndInputNumber(value) {
|
|
1056
|
+
this.$emit("synchroniseSliderAndInputNumber", this.index, value);
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
props: {
|
|
1060
|
+
disabled: Boolean,
|
|
1061
|
+
index: Number,
|
|
1062
|
+
maximumValue: Number,
|
|
1063
|
+
minimumValue: Number,
|
|
1064
|
+
parent: Object,
|
|
1065
|
+
vModel: Number
|
|
1066
|
+
},
|
|
1067
|
+
template: "\n <el-input-number class=\"scalar\" size=\"mini\" v-model=\"vModel\" :controls=\"false\" :disabled=\"disabled\" :max=\"maximumValue\" :min=\"minimumValue\" @change=\"emitSynchroniseSliderAndInputNumber\" />\n "
|
|
1068
|
+
});
|
|
1069
|
+
var VueLabel = external_vue_default.a.extend({
|
|
1070
|
+
props: {
|
|
1071
|
+
classes: String,
|
|
1072
|
+
label: String
|
|
1073
|
+
},
|
|
1074
|
+
template: "\n <p :class=\"classes\">{{ label }}</p>\n "
|
|
1075
|
+
});
|
|
1076
|
+
var VueSelect = external_vue_default.a.extend({
|
|
1077
|
+
methods: {
|
|
1078
|
+
emitSelectionChanged: function emitSelectionChanged(value) {
|
|
1079
|
+
this.$emit("selectionChanged", this.index, value);
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
props: {
|
|
1083
|
+
index: Number,
|
|
1084
|
+
parent: Object,
|
|
1085
|
+
possibleValues: Array,
|
|
1086
|
+
vModel: Number
|
|
1087
|
+
},
|
|
1088
|
+
template: "\n <el-select class=\"discrete\" popper-class=\"discrete-popper\" size=\"mini\" v-model=\"vModel\" :popper-append-to-body=\"false\" @change=\"emitSelectionChanged\">\n <el-option v-for=\"possibleValue in possibleValues\" :key=\"possibleValue.value\" :label=\"possibleValue.name\" :value=\"possibleValue.value\" />\n </el-select>\n "
|
|
1089
|
+
});
|
|
1090
|
+
var VueSlider = external_vue_default.a.extend({
|
|
1091
|
+
methods: {
|
|
1092
|
+
emitSynchroniseSliderAndInputNumber: function emitSynchroniseSliderAndInputNumber(value) {
|
|
1093
|
+
this.$emit("synchroniseSliderAndInputNumber", this.index, value);
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
props: {
|
|
1097
|
+
disabled: Boolean,
|
|
1098
|
+
index: Number,
|
|
1099
|
+
maximumValue: Number,
|
|
1100
|
+
parent: Object,
|
|
1101
|
+
vModel: Number
|
|
1102
|
+
},
|
|
1103
|
+
template: "\n <el-slider v-model=\"vModel\" :disabled=\"disabled\" :max=\"maximumValue\" :show-input=\"false\" :show-tooltip=\"false\" @input=\"emitSynchroniseSliderAndInputNumber\" />\n "
|
|
1104
|
+
});
|
|
1105
|
+
|
|
1106
|
+
var ui_Ui = /*#__PURE__*/function () {
|
|
1107
|
+
function Ui(parent) {
|
|
1108
|
+
var _this = this;
|
|
1109
|
+
|
|
1110
|
+
_classCallCheck(this, Ui);
|
|
1111
|
+
|
|
1112
|
+
_defineProperty(this, "discreteElements", []);
|
|
1113
|
+
|
|
1114
|
+
_defineProperty(this, "scalarElements", []);
|
|
1115
|
+
|
|
1116
|
+
// Generate the UI for the input fields.
|
|
1117
|
+
var inputRoot = parent.$refs.input;
|
|
1118
|
+
var isPreviousDiscrete = true;
|
|
1119
|
+
var slidersAndFieldsContainer = undefined;
|
|
1120
|
+
var firstScalarInput = true;
|
|
1121
|
+
var discreteElementIndex = -1;
|
|
1122
|
+
var scalarElementIndex = -1;
|
|
1123
|
+
parent.json.input.forEach(function (input) {
|
|
1124
|
+
// Determine whether we are dealing with a discrete or a scalar input.
|
|
1125
|
+
var isDiscrete = input.possibleValues !== undefined; // Determine our element mode and create a container for our sliders and
|
|
1126
|
+
// input numbers, if needed.
|
|
1127
|
+
|
|
1128
|
+
if (!isDiscrete && isPreviousDiscrete) {
|
|
1129
|
+
slidersAndFieldsContainer = new VueContainer();
|
|
1130
|
+
|
|
1131
|
+
_this.addVueElement(inputRoot, inputRoot, slidersAndFieldsContainer);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
isPreviousDiscrete = isDiscrete; // Add the Label.
|
|
1135
|
+
|
|
1136
|
+
var label = new VueLabel({
|
|
1137
|
+
propsData: {
|
|
1138
|
+
classes: "default " + (isDiscrete ? "discrete" : firstScalarInput ? "first-scalar" : "scalar"),
|
|
1139
|
+
label: input.name
|
|
1140
|
+
}
|
|
1141
|
+
});
|
|
1142
|
+
|
|
1143
|
+
_this.addVueElement(inputRoot, isDiscrete ? inputRoot : slidersAndFieldsContainer.$el, label);
|
|
1144
|
+
|
|
1145
|
+
firstScalarInput = isDiscrete; // Add a drop-down list or a slider and a text box depending on whether
|
|
1146
|
+
// we are dealing with a discrete or a scalar input.
|
|
1147
|
+
|
|
1148
|
+
if (isDiscrete) {
|
|
1149
|
+
// Add the drop-down list.
|
|
1150
|
+
++discreteElementIndex;
|
|
1151
|
+
var select = new VueSelect({
|
|
1152
|
+
propsData: {
|
|
1153
|
+
index: discreteElementIndex,
|
|
1154
|
+
parent: _this,
|
|
1155
|
+
possibleValues: input.possibleValues,
|
|
1156
|
+
vModel: input.defaultValue
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1159
|
+
|
|
1160
|
+
_this.addVueElement(inputRoot, inputRoot, select);
|
|
1161
|
+
|
|
1162
|
+
select.$on("selectionChanged", _this.selectionChanged); // Keep track of the select and its id.
|
|
1163
|
+
|
|
1164
|
+
_this.discreteElements[discreteElementIndex] = {
|
|
1165
|
+
id: input.id,
|
|
1166
|
+
select: select
|
|
1167
|
+
};
|
|
1168
|
+
} else {
|
|
1169
|
+
// Add the slider and input number.
|
|
1170
|
+
++scalarElementIndex;
|
|
1171
|
+
var slider = new VueSlider({
|
|
1172
|
+
propsData: {
|
|
1173
|
+
index: scalarElementIndex,
|
|
1174
|
+
maximumValue: input.maximumValue,
|
|
1175
|
+
parent: _this,
|
|
1176
|
+
vModel: input.defaultValue
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
var inputNumber = new VueInputNumber({
|
|
1180
|
+
propsData: {
|
|
1181
|
+
index: scalarElementIndex,
|
|
1182
|
+
maximumValue: input.maximumValue,
|
|
1183
|
+
minimumValue: input.minimumValue,
|
|
1184
|
+
parent: _this,
|
|
1185
|
+
vModel: input.defaultValue
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1189
|
+
_this.addVueElement(inputRoot, slidersAndFieldsContainer.$el, slider);
|
|
1190
|
+
|
|
1191
|
+
_this.addVueElement(inputRoot, slidersAndFieldsContainer.$el, inputNumber);
|
|
1192
|
+
|
|
1193
|
+
slider.$on("synchroniseSliderAndInputNumber", _this.synchroniseSliderAndInputNumber);
|
|
1194
|
+
inputNumber.$on("synchroniseSliderAndInputNumber", _this.synchroniseSliderAndInputNumber); // Keep track of the slider and input number.
|
|
1195
|
+
|
|
1196
|
+
_this.scalarElements[scalarElementIndex] = {
|
|
1197
|
+
enabled: input.enabled,
|
|
1198
|
+
id: input.id,
|
|
1199
|
+
input_number: inputNumber,
|
|
1200
|
+
slider: slider
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
}); // Configure the PlotVuer's.
|
|
1204
|
+
// Note: the PlotVuer's are created in SimulationVuer.vue since we can't
|
|
1205
|
+
// create them dynamically. So, all we need to do here is to configure
|
|
1206
|
+
// them.
|
|
1207
|
+
|
|
1208
|
+
parent.$refs.output.classList.add("x" + parent.json.output.plots.length); // Enable/disable all the elements by pretending that a selection changed.
|
|
1209
|
+
|
|
1210
|
+
this.selectionChanged();
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
_createClass(Ui, [{
|
|
1214
|
+
key: "setVueAttributes",
|
|
1215
|
+
value: function setVueAttributes(root, element) {
|
|
1216
|
+
var _this2 = this;
|
|
1217
|
+
|
|
1218
|
+
root.attributes.forEach(function (attribute) {
|
|
1219
|
+
element.setAttribute(attribute.nodeName, attribute.nodeValue);
|
|
1220
|
+
});
|
|
1221
|
+
element.children.forEach(function (childElement) {
|
|
1222
|
+
_this2.setVueAttributes(root, childElement);
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
}, {
|
|
1226
|
+
key: "addVueElement",
|
|
1227
|
+
value: function addVueElement(root, parent, element) {
|
|
1228
|
+
element.$mount();
|
|
1229
|
+
this.setVueAttributes(root, element.$el);
|
|
1230
|
+
parent.appendChild(element.$el);
|
|
1231
|
+
}
|
|
1232
|
+
}, {
|
|
1233
|
+
key: "selectionChanged",
|
|
1234
|
+
value: function selectionChanged() {
|
|
1235
|
+
// Enable/disable all the scalar elements.
|
|
1236
|
+
var ui = this instanceof Ui ? this : this.parent;
|
|
1237
|
+
ui.scalarElements.forEach(function (scalarElement) {
|
|
1238
|
+
var enabled = scalarElement.enabled;
|
|
1239
|
+
|
|
1240
|
+
if (enabled !== undefined) {
|
|
1241
|
+
var disabled = !evaluateValue(ui, enabled);
|
|
1242
|
+
scalarElement.slider.disabled = disabled;
|
|
1243
|
+
scalarElement.input_number.disabled = disabled;
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
}, {
|
|
1248
|
+
key: "synchroniseSliderAndInputNumber",
|
|
1249
|
+
value: function synchroniseSliderAndInputNumber(index, value) {
|
|
1250
|
+
// Make sure that both a slider and its corresponding input number have
|
|
1251
|
+
// the same value.
|
|
1252
|
+
this.parent.scalarElements[index].slider.vModel = value;
|
|
1253
|
+
this.parent.scalarElements[index].input_number.vModel = value;
|
|
1254
|
+
}
|
|
1255
|
+
}]);
|
|
1256
|
+
|
|
1257
|
+
return Ui;
|
|
1258
|
+
}();
|
|
1259
|
+
|
|
1260
|
+
|
|
372
1261
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
373
1262
|
|
|
374
1263
|
|
|
375
1264
|
|
|
376
1265
|
|
|
1266
|
+
|
|
377
1267
|
//
|
|
378
1268
|
//
|
|
379
1269
|
//
|
|
@@ -404,38 +1294,15 @@ var external_element_ui_ = __webpack_require__("5f72");
|
|
|
404
1294
|
//
|
|
405
1295
|
//
|
|
406
1296
|
//
|
|
407
|
-
//
|
|
408
|
-
//
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
//
|
|
416
|
-
//
|
|
417
|
-
//
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
//
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
//
|
|
427
|
-
//
|
|
428
|
-
//
|
|
429
|
-
//
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
//
|
|
434
1297
|
|
|
435
1298
|
|
|
436
1299
|
|
|
437
1300
|
|
|
438
|
-
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
439
1306
|
external_vue_default.a.use(external_element_ui_["Aside"]);
|
|
440
1307
|
external_vue_default.a.use(external_element_ui_["Button"]);
|
|
441
1308
|
external_vue_default.a.use(external_element_ui_["Container"]);
|
|
@@ -453,80 +1320,28 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
453
1320
|
},
|
|
454
1321
|
props: {
|
|
455
1322
|
apiLocation: {
|
|
456
|
-
|
|
457
|
-
|
|
1323
|
+
required: true,
|
|
1324
|
+
type: String
|
|
458
1325
|
},
|
|
459
1326
|
entry: {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
*/
|
|
463
|
-
entry: Object
|
|
1327
|
+
required: true,
|
|
1328
|
+
type: Object
|
|
464
1329
|
}
|
|
465
1330
|
},
|
|
466
1331
|
data: function data() {
|
|
467
|
-
var title = this.entry ? this.entry.name : "";
|
|
468
1332
|
return {
|
|
469
1333
|
mode: 0,
|
|
1334
|
+
//---GRY--- TO BE DELETED!
|
|
1335
|
+
json: {},
|
|
1336
|
+
hasValidJson: true,
|
|
470
1337
|
errorMessage: "",
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
simulationModes: [{
|
|
475
|
-
label: "Normal sinus rhythm",
|
|
476
|
-
value: 0
|
|
477
|
-
}, {
|
|
478
|
-
label: "Stellate stimulation",
|
|
479
|
-
value: 1
|
|
480
|
-
}, {
|
|
481
|
-
label: "Vagal stimulation",
|
|
482
|
-
value: 2
|
|
483
|
-
}],
|
|
484
|
-
simulationSpikeLayout: {
|
|
485
|
-
xaxis: {
|
|
486
|
-
title: {
|
|
487
|
-
text: "Time (s)",
|
|
488
|
-
font: {
|
|
489
|
-
size: 10
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
},
|
|
493
|
-
yaxis: {
|
|
494
|
-
title: {
|
|
495
|
-
text: "Spike amplitude",
|
|
496
|
-
font: {
|
|
497
|
-
size: 10
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
simulationSpikeFrequency: 300,
|
|
503
|
-
simulationSpikeNumber: 10,
|
|
504
|
-
simulationSpikeAmplitude: 10,
|
|
505
|
-
// The real value is 100 times smaller.
|
|
506
|
-
simulationSpikeData: NoSimulationData,
|
|
507
|
-
simulationPotentialLayout: {
|
|
508
|
-
xaxis: {
|
|
509
|
-
title: {
|
|
510
|
-
text: "Time (s)",
|
|
511
|
-
font: {
|
|
512
|
-
size: 10
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
},
|
|
516
|
-
yaxis: {
|
|
517
|
-
title: {
|
|
518
|
-
text: "Membrane potential (mV)",
|
|
519
|
-
font: {
|
|
520
|
-
size: 10
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
simulationPotentialData: NoSimulationData,
|
|
1338
|
+
layout: [],
|
|
1339
|
+
simulationData: [],
|
|
1340
|
+
simulationDataId: {},
|
|
526
1341
|
simulationBeingComputed: false,
|
|
527
|
-
simulationBeingComputedLabel: "Loading simulation results...",
|
|
528
1342
|
simulationValid: true,
|
|
529
|
-
title:
|
|
1343
|
+
title: this.entry !== undefined ? this.entry.name : "",
|
|
1344
|
+
ui: null
|
|
530
1345
|
};
|
|
531
1346
|
},
|
|
532
1347
|
methods: {
|
|
@@ -536,56 +1351,38 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
536
1351
|
viewDataset: function viewDataset() {
|
|
537
1352
|
window.open(this.entry.dataset, "_blank");
|
|
538
1353
|
},
|
|
539
|
-
simulationModeChanged: function simulationModeChanged() {
|
|
540
|
-
this.simulationPotentialData = NoSimulationData;
|
|
541
|
-
this.simulationValid = true;
|
|
542
|
-
},
|
|
543
1354
|
runSimulation: function runSimulation() {
|
|
544
1355
|
var _this = this;
|
|
545
1356
|
|
|
546
1357
|
this.simulationBeingComputed = true;
|
|
547
1358
|
var request = {
|
|
548
1359
|
model_url: this.entry.resource,
|
|
549
|
-
json_config: {
|
|
550
|
-
output: ["Membrane/V"]
|
|
551
|
-
}
|
|
1360
|
+
json_config: {}
|
|
552
1361
|
}; // Specify the ending point and point interval for the normal mode (since
|
|
553
1362
|
// our resource is a CellML file).
|
|
554
1363
|
|
|
555
|
-
if (this.
|
|
556
|
-
request.json_config
|
|
557
|
-
"Ending point":
|
|
558
|
-
"Point interval":
|
|
559
|
-
};
|
|
560
|
-
} // Apply a stellate/vagal stimulation, if needed.
|
|
561
|
-
// Notes:
|
|
562
|
-
// - this.simulationMode:
|
|
563
|
-
// - 0: normal sinus rhythm;
|
|
564
|
-
// - 1: stellate stimulation; and
|
|
565
|
-
// - 2: vagal stimulation.
|
|
566
|
-
// - this.stimulationLevel has a value in [0; 10], but to compute ACh, we
|
|
567
|
-
// need a value in [0; 1].
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if (this.simulationMode !== 0) {
|
|
571
|
-
request.json_config["parameters"] = {
|
|
572
|
-
"Rate_modulation_experiments/Iso_1_uM": 1.0,
|
|
573
|
-
"Rate_modulation_experiments/ACh": this.simulationMode === 1 ? (1.0 - 0.1 * this.stimulationLevel) * 22.0e-6 : 22.0e-6 + 0.1 * this.stimulationLevel * (38.0e-6 - 22.0e-6)
|
|
1364
|
+
if (this.json.simulation !== undefined) {
|
|
1365
|
+
request.json_config.simulation = {
|
|
1366
|
+
"Ending point": this.json.simulation.endingPoint,
|
|
1367
|
+
"Point interval": this.json.simulation.pointInterval
|
|
574
1368
|
};
|
|
575
|
-
} //
|
|
1369
|
+
} // Specify the simulation parameters.
|
|
576
1370
|
|
|
577
1371
|
|
|
578
|
-
if (this.
|
|
579
|
-
request.json_config
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
} // Request the spikes if we are in composite mode.
|
|
1372
|
+
if (this.json.parameters != undefined) {
|
|
1373
|
+
request.json_config.parameters = {};
|
|
1374
|
+
this.json.parameters.forEach(function (parameter) {
|
|
1375
|
+
request.json_config.parameters[parameter.name] = evaluateValue(_this.ui, parameter.value);
|
|
1376
|
+
});
|
|
1377
|
+
} // Specify what we want to retrieve.
|
|
585
1378
|
|
|
586
1379
|
|
|
587
|
-
if (this.
|
|
588
|
-
|
|
1380
|
+
if (this.json.output.data !== undefined) {
|
|
1381
|
+
var index = -1;
|
|
1382
|
+
request.json_config.output = [];
|
|
1383
|
+
this.json.output.data.forEach(function (outputData) {
|
|
1384
|
+
request.json_config.output[++index] = outputData.name;
|
|
1385
|
+
});
|
|
589
1386
|
} // Run the simulation.
|
|
590
1387
|
|
|
591
1388
|
|
|
@@ -602,22 +1399,25 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
602
1399
|
_this.simulationValid = response.status === "ok";
|
|
603
1400
|
|
|
604
1401
|
if (_this.simulationValid) {
|
|
605
|
-
// Retrieve the
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
x: response.results["environment/time"],
|
|
610
|
-
y: response.results["Brain_stem/w"].map(function (element) {
|
|
611
|
-
return 100 * element;
|
|
612
|
-
})
|
|
613
|
-
}];
|
|
614
|
-
} // Retrieve the potential data.
|
|
1402
|
+
// Retrieve and post-process the simulation data.
|
|
1403
|
+
var _index = -1;
|
|
1404
|
+
|
|
1405
|
+
var iMax = response.results[_this.simulationDataId[Object.keys(_this.simulationDataId)[0]]].length;
|
|
615
1406
|
|
|
1407
|
+
_this.json.output.plots.forEach(function (outputPlot) {
|
|
1408
|
+
var xValue = [];
|
|
1409
|
+
var yValue = [];
|
|
616
1410
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1411
|
+
for (var i = 0; i < iMax; ++i) {
|
|
1412
|
+
xValue[i] = evaluateSimulationValue(_this, response.results, outputPlot.xValue, i);
|
|
1413
|
+
yValue[i] = evaluateSimulationValue(_this, response.results, outputPlot.yValue, i);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
_this.simulationData[++_index] = [{
|
|
1417
|
+
x: xValue,
|
|
1418
|
+
y: yValue
|
|
1419
|
+
}];
|
|
1420
|
+
});
|
|
621
1421
|
} else {
|
|
622
1422
|
_this.errorMessage = response.description;
|
|
623
1423
|
}
|
|
@@ -631,47 +1431,63 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
631
1431
|
xmlhttp.send(JSON.stringify(request));
|
|
632
1432
|
}
|
|
633
1433
|
},
|
|
634
|
-
|
|
635
|
-
//
|
|
636
|
-
//
|
|
637
|
-
// - 0: normal mode; and
|
|
638
|
-
// - 1: composite mode.
|
|
1434
|
+
created: function created() {
|
|
1435
|
+
// Manually (for now) specify the JSON configuration to be used by either
|
|
1436
|
+
// the normal model or the composite model.
|
|
639
1437
|
this.mode = -1;
|
|
640
1438
|
|
|
641
|
-
if (this.entry) {
|
|
1439
|
+
if (this.entry !== undefined) {
|
|
642
1440
|
if (this.entry.resource === "https://models.physiomeproject.org/workspace/486/rawfile/55879cbc485e2d4c41f3dc6d60424b849f94c4ee/HumanSAN_Fabbri_Fantini_Wilders_Severi_2017.cellml") {
|
|
643
1441
|
this.mode = 0;
|
|
1442
|
+
this.json = jsonForNormalModel();
|
|
644
1443
|
} else if (this.entry.resource === "https://models.physiomeproject.org/workspace/698/rawfile/f3fc911063ac72ed44e84c0c5af28df41c25d452/fabbri_et_al_based_composite_SAN_model.sedml") {
|
|
645
1444
|
this.mode = 1;
|
|
1445
|
+
this.json = jsonForCompositeModel();
|
|
646
1446
|
}
|
|
1447
|
+
} // Make sure that the JSON configuration is valid.
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
this.hasValidJson = validJson(this.json);
|
|
1451
|
+
|
|
1452
|
+
if (!this.hasValidJson) {
|
|
1453
|
+
return;
|
|
1454
|
+
} // Prepare ourselves for the UI by initialising some data.
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
prepareForUi(this);
|
|
1458
|
+
},
|
|
1459
|
+
mounted: function mounted() {
|
|
1460
|
+
// Finish mounting by creating the UI for the given simulation dataset.
|
|
1461
|
+
if (this.hasValidJson) {
|
|
1462
|
+
this.ui = new ui_Ui(this);
|
|
647
1463
|
}
|
|
648
1464
|
}
|
|
649
1465
|
});
|
|
650
1466
|
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
651
1467
|
/* harmony default export */ var components_SimulationVuervue_type_script_lang_js_ = (SimulationVuervue_type_script_lang_js_);
|
|
652
|
-
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=
|
|
653
|
-
var
|
|
1468
|
+
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=3e94221a&scoped=true&lang=css&
|
|
1469
|
+
var SimulationVuervue_type_style_index_0_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("47b7");
|
|
654
1470
|
|
|
655
|
-
// EXTERNAL MODULE: ./src/styles/purple/aside.css?vue&type=style&index=1&id=
|
|
656
|
-
var
|
|
1471
|
+
// EXTERNAL MODULE: ./src/styles/purple/aside.css?vue&type=style&index=1&id=3e94221a&scoped=true&lang=css&
|
|
1472
|
+
var asidevue_type_style_index_1_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("d7fe");
|
|
657
1473
|
|
|
658
|
-
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=2&id=
|
|
659
|
-
var
|
|
1474
|
+
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=2&id=3e94221a&scoped=true&lang=css&
|
|
1475
|
+
var buttonvue_type_style_index_2_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("020d");
|
|
660
1476
|
|
|
661
|
-
// EXTERNAL MODULE: ./src/styles/purple/container.css?vue&type=style&index=3&id=
|
|
662
|
-
var
|
|
1477
|
+
// EXTERNAL MODULE: ./src/styles/purple/container.css?vue&type=style&index=3&id=3e94221a&scoped=true&lang=css&
|
|
1478
|
+
var containervue_type_style_index_3_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("1e1f");
|
|
663
1479
|
|
|
664
|
-
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=4&id=
|
|
665
|
-
var
|
|
1480
|
+
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=4&id=3e94221a&scoped=true&lang=css&
|
|
1481
|
+
var input_numbervue_type_style_index_4_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("9043");
|
|
666
1482
|
|
|
667
|
-
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=5&id=
|
|
668
|
-
var
|
|
1483
|
+
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=5&id=3e94221a&scoped=true&lang=css&
|
|
1484
|
+
var optionvue_type_style_index_5_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("c9af");
|
|
669
1485
|
|
|
670
|
-
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=6&id=
|
|
671
|
-
var
|
|
1486
|
+
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=6&id=3e94221a&scoped=true&lang=css&
|
|
1487
|
+
var selectvue_type_style_index_6_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("5b43");
|
|
672
1488
|
|
|
673
|
-
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=7&id=
|
|
674
|
-
var
|
|
1489
|
+
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=7&id=3e94221a&scoped=true&lang=css&
|
|
1490
|
+
var slidervue_type_style_index_7_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("7a96");
|
|
675
1491
|
|
|
676
1492
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
677
1493
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -795,7 +1611,7 @@ var component = normalizeComponent(
|
|
|
795
1611
|
staticRenderFns,
|
|
796
1612
|
false,
|
|
797
1613
|
null,
|
|
798
|
-
"
|
|
1614
|
+
"3e94221a",
|
|
799
1615
|
null
|
|
800
1616
|
|
|
801
1617
|
)
|
|
@@ -811,6 +1627,13 @@ var component = normalizeComponent(
|
|
|
811
1627
|
|
|
812
1628
|
|
|
813
1629
|
|
|
1630
|
+
/***/ }),
|
|
1631
|
+
|
|
1632
|
+
/***/ "fd22":
|
|
1633
|
+
/***/ (function(module, exports) {
|
|
1634
|
+
|
|
1635
|
+
module.exports = require("core-js/modules/es.string.includes.js");
|
|
1636
|
+
|
|
814
1637
|
/***/ })
|
|
815
1638
|
|
|
816
1639
|
/******/ });
|