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