@abi-software/simulationvuer 0.4.4 → 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 +1047 -227
- package/dist/simulationvuer.common.js.map +1 -1
- package/dist/simulationvuer.css +1 -1
- package/dist/simulationvuer.umd.js +1047 -227
- 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 +3 -2
- package/src/.DS_Store +0 -0
- package/src/App.vue +6 -4
- package/src/components/SimulationVuer.vue +138 -200
- 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,73 +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
|
-
/***/ "
|
|
102
|
-
/***/ (function(module, exports
|
|
103
|
-
|
|
104
|
-
// extracted by mini-css-extract-plugin
|
|
105
|
-
|
|
106
|
-
/***/ }),
|
|
107
|
-
|
|
108
|
-
/***/ "30f9":
|
|
109
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
101
|
+
/***/ "13e3":
|
|
102
|
+
/***/ (function(module, exports) {
|
|
110
103
|
|
|
111
|
-
|
|
104
|
+
module.exports = require("core-js/modules/web.dom-collections.for-each.js");
|
|
112
105
|
|
|
113
106
|
/***/ }),
|
|
114
107
|
|
|
115
|
-
/***/ "
|
|
108
|
+
/***/ "1e1f":
|
|
116
109
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
117
110
|
|
|
118
111
|
"use strict";
|
|
119
|
-
/* harmony import */ var
|
|
120
|
-
/* harmony import */ var
|
|
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__);
|
|
121
114
|
/* unused harmony reexport * */
|
|
122
115
|
|
|
123
116
|
|
|
124
117
|
/***/ }),
|
|
125
118
|
|
|
126
|
-
/***/ "
|
|
119
|
+
/***/ "30df":
|
|
127
120
|
/***/ (function(module, exports) {
|
|
128
121
|
|
|
129
|
-
module.exports = require("core-js/modules/es.
|
|
122
|
+
module.exports = require("core-js/modules/es.regexp.to-string.js");
|
|
130
123
|
|
|
131
124
|
/***/ }),
|
|
132
125
|
|
|
133
|
-
/***/ "
|
|
126
|
+
/***/ "379f":
|
|
127
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
128
|
+
|
|
129
|
+
// extracted by mini-css-extract-plugin
|
|
130
|
+
|
|
131
|
+
/***/ }),
|
|
132
|
+
|
|
133
|
+
/***/ "4391":
|
|
134
134
|
/***/ (function(module, exports) {
|
|
135
135
|
|
|
136
|
-
module.exports = require("core-js/modules/es.
|
|
136
|
+
module.exports = require("core-js/modules/es.array.map.js");
|
|
137
137
|
|
|
138
138
|
/***/ }),
|
|
139
139
|
|
|
140
|
-
/***/ "
|
|
140
|
+
/***/ "47b7":
|
|
141
141
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
142
142
|
|
|
143
143
|
"use strict";
|
|
144
|
-
/* harmony import */ var
|
|
145
|
-
/* 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__);
|
|
146
146
|
/* unused harmony reexport * */
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
/***/ }),
|
|
150
150
|
|
|
151
|
-
/***/ "
|
|
151
|
+
/***/ "4933":
|
|
152
|
+
/***/ (function(module, exports) {
|
|
153
|
+
|
|
154
|
+
module.exports = require("core-js/modules/es.symbol.description.js");
|
|
155
|
+
|
|
156
|
+
/***/ }),
|
|
157
|
+
|
|
158
|
+
/***/ "5b43":
|
|
152
159
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
153
160
|
|
|
154
161
|
"use strict";
|
|
155
|
-
/* harmony import */ var
|
|
156
|
-
/* 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__);
|
|
157
164
|
/* unused harmony reexport * */
|
|
158
165
|
|
|
159
166
|
|
|
@@ -166,29 +173,50 @@ module.exports = require("element-ui");
|
|
|
166
173
|
|
|
167
174
|
/***/ }),
|
|
168
175
|
|
|
169
|
-
/***/ "
|
|
170
|
-
/***/ (function(module, exports
|
|
176
|
+
/***/ "6378":
|
|
177
|
+
/***/ (function(module, exports) {
|
|
171
178
|
|
|
172
|
-
|
|
179
|
+
module.exports = require("core-js/modules/es.string.replace.js");
|
|
173
180
|
|
|
174
181
|
/***/ }),
|
|
175
182
|
|
|
176
|
-
/***/ "
|
|
183
|
+
/***/ "660d":
|
|
177
184
|
/***/ (function(module, exports, __webpack_require__) {
|
|
178
185
|
|
|
179
186
|
// extracted by mini-css-extract-plugin
|
|
180
187
|
|
|
181
188
|
/***/ }),
|
|
182
189
|
|
|
183
|
-
/***/ "
|
|
190
|
+
/***/ "7a96":
|
|
184
191
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
185
192
|
|
|
186
193
|
"use strict";
|
|
187
|
-
/* harmony import */ var
|
|
188
|
-
/* 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__);
|
|
189
196
|
/* unused harmony reexport * */
|
|
190
197
|
|
|
191
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
|
+
|
|
192
220
|
/***/ }),
|
|
193
221
|
|
|
194
222
|
/***/ "8bbf":
|
|
@@ -198,24 +226,28 @@ module.exports = require("vue");
|
|
|
198
226
|
|
|
199
227
|
/***/ }),
|
|
200
228
|
|
|
201
|
-
/***/ "
|
|
229
|
+
/***/ "8f10":
|
|
202
230
|
/***/ (function(module, exports, __webpack_require__) {
|
|
203
231
|
|
|
204
232
|
// extracted by mini-css-extract-plugin
|
|
205
233
|
|
|
206
234
|
/***/ }),
|
|
207
235
|
|
|
208
|
-
/***/ "
|
|
209
|
-
/***/ (function(module,
|
|
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 * */
|
|
210
243
|
|
|
211
|
-
// extracted by mini-css-extract-plugin
|
|
212
244
|
|
|
213
245
|
/***/ }),
|
|
214
246
|
|
|
215
|
-
/***/ "
|
|
216
|
-
/***/ (function(module, exports
|
|
247
|
+
/***/ "97d3":
|
|
248
|
+
/***/ (function(module, exports) {
|
|
217
249
|
|
|
218
|
-
|
|
250
|
+
module.exports = require("core-js/modules/es.object.to-string.js");
|
|
219
251
|
|
|
220
252
|
/***/ }),
|
|
221
253
|
|
|
@@ -233,34 +265,51 @@ module.exports = require("@soda/get-current-script");
|
|
|
233
265
|
|
|
234
266
|
/***/ }),
|
|
235
267
|
|
|
236
|
-
/***/ "
|
|
237
|
-
/***/ (function(module,
|
|
268
|
+
/***/ "9e9d":
|
|
269
|
+
/***/ (function(module, exports) {
|
|
238
270
|
|
|
239
|
-
|
|
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_slider_css_vue_type_style_index_7_id_0727c9cb_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eb37");
|
|
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_slider_css_vue_type_style_index_7_id_0727c9cb_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_0727c9cb_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
242
|
-
/* unused harmony reexport * */
|
|
271
|
+
module.exports = require("jsonschema");
|
|
243
272
|
|
|
273
|
+
/***/ }),
|
|
274
|
+
|
|
275
|
+
/***/ "aaaf":
|
|
276
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
277
|
+
|
|
278
|
+
// extracted by mini-css-extract-plugin
|
|
279
|
+
|
|
280
|
+
/***/ }),
|
|
281
|
+
|
|
282
|
+
/***/ "be94":
|
|
283
|
+
/***/ (function(module, exports) {
|
|
284
|
+
|
|
285
|
+
module.exports = require("core-js/modules/es.array.join.js");
|
|
244
286
|
|
|
245
287
|
/***/ }),
|
|
246
288
|
|
|
247
|
-
/***/ "
|
|
289
|
+
/***/ "c8a6":
|
|
290
|
+
/***/ (function(module, exports) {
|
|
291
|
+
|
|
292
|
+
module.exports = require("core-js/modules/es.regexp.exec.js");
|
|
293
|
+
|
|
294
|
+
/***/ }),
|
|
295
|
+
|
|
296
|
+
/***/ "c9af":
|
|
248
297
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
249
298
|
|
|
250
299
|
"use strict";
|
|
251
|
-
/* harmony import */ var
|
|
252
|
-
/* harmony import */ var
|
|
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__);
|
|
253
302
|
/* unused harmony reexport * */
|
|
254
303
|
|
|
255
304
|
|
|
256
305
|
/***/ }),
|
|
257
306
|
|
|
258
|
-
/***/ "
|
|
307
|
+
/***/ "d7fe":
|
|
259
308
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
260
309
|
|
|
261
310
|
"use strict";
|
|
262
|
-
/* harmony import */ var
|
|
263
|
-
/* harmony import */ var
|
|
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__);
|
|
264
313
|
/* unused harmony reexport * */
|
|
265
314
|
|
|
266
315
|
|
|
@@ -273,6 +322,13 @@ module.exports = require("@abi-software/plotvuer/dist/plotvuer.css");
|
|
|
273
322
|
|
|
274
323
|
/***/ }),
|
|
275
324
|
|
|
325
|
+
/***/ "da9e":
|
|
326
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
327
|
+
|
|
328
|
+
// extracted by mini-css-extract-plugin
|
|
329
|
+
|
|
330
|
+
/***/ }),
|
|
331
|
+
|
|
276
332
|
/***/ "db0a":
|
|
277
333
|
/***/ (function(module, exports) {
|
|
278
334
|
|
|
@@ -280,13 +336,27 @@ module.exports = require("core-js/modules/es.function.name.js");
|
|
|
280
336
|
|
|
281
337
|
/***/ }),
|
|
282
338
|
|
|
283
|
-
/***/ "
|
|
339
|
+
/***/ "dccf":
|
|
284
340
|
/***/ (function(module, exports, __webpack_require__) {
|
|
285
341
|
|
|
286
342
|
// extracted by mini-css-extract-plugin
|
|
287
343
|
|
|
288
344
|
/***/ }),
|
|
289
345
|
|
|
346
|
+
/***/ "df2b":
|
|
347
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
348
|
+
|
|
349
|
+
// extracted by mini-css-extract-plugin
|
|
350
|
+
|
|
351
|
+
/***/ }),
|
|
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,25 +405,28 @@ 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
|
|
|
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");
|
|
423
|
+
|
|
341
424
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.js"
|
|
342
425
|
var es_symbol_js_ = __webpack_require__("9b22");
|
|
343
426
|
|
|
344
427
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.description.js"
|
|
345
428
|
var es_symbol_description_js_ = __webpack_require__("4933");
|
|
346
429
|
|
|
347
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.map.js"
|
|
348
|
-
var es_array_map_js_ = __webpack_require__("4391");
|
|
349
|
-
|
|
350
430
|
// EXTERNAL MODULE: external "vue"
|
|
351
431
|
var external_vue_ = __webpack_require__("8bbf");
|
|
352
432
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
@@ -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,39 +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
|
-
//
|
|
426
1288
|
|
|
427
1289
|
|
|
428
1290
|
|
|
429
1291
|
|
|
430
|
-
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
431
1297
|
external_vue_default.a.use(external_element_ui_["Aside"]);
|
|
432
1298
|
external_vue_default.a.use(external_element_ui_["Button"]);
|
|
433
1299
|
external_vue_default.a.use(external_element_ui_["Container"]);
|
|
@@ -445,82 +1311,28 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
445
1311
|
},
|
|
446
1312
|
props: {
|
|
447
1313
|
apiLocation: {
|
|
448
|
-
|
|
449
|
-
|
|
1314
|
+
required: true,
|
|
1315
|
+
type: String
|
|
450
1316
|
},
|
|
451
1317
|
entry: {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
*/
|
|
455
|
-
entry: Object
|
|
1318
|
+
required: true,
|
|
1319
|
+
type: Object
|
|
456
1320
|
}
|
|
457
1321
|
},
|
|
458
1322
|
data: function data() {
|
|
459
|
-
var title = this.entry ? this.entry.name : "";
|
|
460
|
-
var subtitle = this.entry ? this.entry.description : "";
|
|
461
1323
|
return {
|
|
462
1324
|
mode: 0,
|
|
1325
|
+
//---GRY--- TO BE DELETED!
|
|
1326
|
+
json: {},
|
|
1327
|
+
hasValidJson: true,
|
|
463
1328
|
errorMessage: "",
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
simulationModes: [{
|
|
468
|
-
label: "Normal sinus rhythm",
|
|
469
|
-
value: 0
|
|
470
|
-
}, {
|
|
471
|
-
label: "Stellate stimulation",
|
|
472
|
-
value: 1
|
|
473
|
-
}, {
|
|
474
|
-
label: "Vagal stimulation",
|
|
475
|
-
value: 2
|
|
476
|
-
}],
|
|
477
|
-
simulationSpikeLayout: {
|
|
478
|
-
xaxis: {
|
|
479
|
-
title: {
|
|
480
|
-
text: "Time (s)",
|
|
481
|
-
font: {
|
|
482
|
-
size: 10
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
yaxis: {
|
|
487
|
-
title: {
|
|
488
|
-
text: "Spike amplitude",
|
|
489
|
-
font: {
|
|
490
|
-
size: 10
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
simulationSpikeFrequency: 300,
|
|
496
|
-
simulationSpikeNumber: 10,
|
|
497
|
-
simulationSpikeAmplitude: 10,
|
|
498
|
-
// The real value is 100 times smaller.
|
|
499
|
-
simulationSpikeData: NoSimulationData,
|
|
500
|
-
simulationPotentialLayout: {
|
|
501
|
-
xaxis: {
|
|
502
|
-
title: {
|
|
503
|
-
text: "Time (s)",
|
|
504
|
-
font: {
|
|
505
|
-
size: 10
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
},
|
|
509
|
-
yaxis: {
|
|
510
|
-
title: {
|
|
511
|
-
text: "Membrane potential (mV)",
|
|
512
|
-
font: {
|
|
513
|
-
size: 10
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
simulationPotentialData: NoSimulationData,
|
|
1329
|
+
layout: [],
|
|
1330
|
+
simulationData: [],
|
|
1331
|
+
simulationDataId: {},
|
|
519
1332
|
simulationBeingComputed: false,
|
|
520
|
-
simulationBeingComputedLabel: "Loading simulation results...",
|
|
521
1333
|
simulationValid: true,
|
|
522
|
-
|
|
523
|
-
|
|
1334
|
+
title: this.entry !== undefined ? this.entry.name : "",
|
|
1335
|
+
ui: null
|
|
524
1336
|
};
|
|
525
1337
|
},
|
|
526
1338
|
methods: {
|
|
@@ -530,56 +1342,38 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
530
1342
|
viewDataset: function viewDataset() {
|
|
531
1343
|
window.open(this.entry.dataset, "_blank");
|
|
532
1344
|
},
|
|
533
|
-
simulationModeChanged: function simulationModeChanged() {
|
|
534
|
-
this.simulationPotentialData = NoSimulationData;
|
|
535
|
-
this.simulationValid = true;
|
|
536
|
-
},
|
|
537
1345
|
runSimulation: function runSimulation() {
|
|
538
1346
|
var _this = this;
|
|
539
1347
|
|
|
540
1348
|
this.simulationBeingComputed = true;
|
|
541
1349
|
var request = {
|
|
542
1350
|
model_url: this.entry.resource,
|
|
543
|
-
json_config: {
|
|
544
|
-
output: ["Membrane/V"]
|
|
545
|
-
}
|
|
1351
|
+
json_config: {}
|
|
546
1352
|
}; // Specify the ending point and point interval for the normal mode (since
|
|
547
1353
|
// our resource is a CellML file).
|
|
548
1354
|
|
|
549
|
-
if (this.
|
|
550
|
-
request.json_config
|
|
551
|
-
"Ending point":
|
|
552
|
-
"Point interval":
|
|
553
|
-
};
|
|
554
|
-
} // Apply a stellate/vagal stimulation, if needed.
|
|
555
|
-
// Notes:
|
|
556
|
-
// - this.simulationMode:
|
|
557
|
-
// - 0: normal sinus rhythm;
|
|
558
|
-
// - 1: stellate stimulation; and
|
|
559
|
-
// - 2: vagal stimulation.
|
|
560
|
-
// - this.stimulationLevel has a value in [0; 10], but to compute ACh, we
|
|
561
|
-
// need a value in [0; 1].
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
if (this.simulationMode !== 0) {
|
|
565
|
-
request.json_config["parameters"] = {
|
|
566
|
-
"Rate_modulation_experiments/Iso_1_uM": 1.0,
|
|
567
|
-
"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
|
|
568
1359
|
};
|
|
569
|
-
} //
|
|
1360
|
+
} // Specify the simulation parameters.
|
|
570
1361
|
|
|
571
1362
|
|
|
572
|
-
if (this.
|
|
573
|
-
request.json_config
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
} // 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.
|
|
579
1369
|
|
|
580
1370
|
|
|
581
|
-
if (this.
|
|
582
|
-
|
|
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
|
+
});
|
|
583
1377
|
} // Run the simulation.
|
|
584
1378
|
|
|
585
1379
|
|
|
@@ -596,22 +1390,25 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
596
1390
|
_this.simulationValid = response.status === "ok";
|
|
597
1391
|
|
|
598
1392
|
if (_this.simulationValid) {
|
|
599
|
-
// Retrieve the
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}];
|
|
608
|
-
} // 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;
|
|
1397
|
+
|
|
1398
|
+
_this.json.output.plots.forEach(function (outputPlot) {
|
|
1399
|
+
var xValue = [];
|
|
1400
|
+
var yValue = [];
|
|
609
1401
|
|
|
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
|
+
}
|
|
610
1406
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
1407
|
+
_this.simulationData[++_index] = [{
|
|
1408
|
+
x: xValue,
|
|
1409
|
+
y: yValue
|
|
1410
|
+
}];
|
|
1411
|
+
});
|
|
615
1412
|
} else {
|
|
616
1413
|
_this.errorMessage = response.description;
|
|
617
1414
|
}
|
|
@@ -625,47 +1422,63 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
625
1422
|
xmlhttp.send(JSON.stringify(request));
|
|
626
1423
|
}
|
|
627
1424
|
},
|
|
628
|
-
|
|
629
|
-
//
|
|
630
|
-
//
|
|
631
|
-
// - 0: normal mode; and
|
|
632
|
-
// - 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.
|
|
633
1428
|
this.mode = -1;
|
|
634
1429
|
|
|
635
|
-
if (this.entry) {
|
|
1430
|
+
if (this.entry !== undefined) {
|
|
636
1431
|
if (this.entry.resource === "https://models.physiomeproject.org/workspace/486/rawfile/55879cbc485e2d4c41f3dc6d60424b849f94c4ee/HumanSAN_Fabbri_Fantini_Wilders_Severi_2017.cellml") {
|
|
637
1432
|
this.mode = 0;
|
|
1433
|
+
this.json = jsonForNormalModel();
|
|
638
1434
|
} else if (this.entry.resource === "https://models.physiomeproject.org/workspace/698/rawfile/f3fc911063ac72ed44e84c0c5af28df41c25d452/fabbri_et_al_based_composite_SAN_model.sedml") {
|
|
639
1435
|
this.mode = 1;
|
|
1436
|
+
this.json = jsonForCompositeModel();
|
|
640
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);
|
|
641
1454
|
}
|
|
642
1455
|
}
|
|
643
1456
|
});
|
|
644
1457
|
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
645
1458
|
/* harmony default export */ var components_SimulationVuervue_type_script_lang_js_ = (SimulationVuervue_type_script_lang_js_);
|
|
646
|
-
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=
|
|
647
|
-
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");
|
|
648
1461
|
|
|
649
|
-
// EXTERNAL MODULE: ./src/styles/purple/aside.css?vue&type=style&index=1&id=
|
|
650
|
-
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");
|
|
651
1464
|
|
|
652
|
-
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=2&id=
|
|
653
|
-
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");
|
|
654
1467
|
|
|
655
|
-
// EXTERNAL MODULE: ./src/styles/purple/container.css?vue&type=style&index=3&id=
|
|
656
|
-
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");
|
|
657
1470
|
|
|
658
|
-
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=4&id=
|
|
659
|
-
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");
|
|
660
1473
|
|
|
661
|
-
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=5&id=
|
|
662
|
-
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");
|
|
663
1476
|
|
|
664
|
-
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=6&id=
|
|
665
|
-
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");
|
|
666
1479
|
|
|
667
|
-
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=7&id=
|
|
668
|
-
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");
|
|
669
1482
|
|
|
670
1483
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
671
1484
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -789,7 +1602,7 @@ var component = normalizeComponent(
|
|
|
789
1602
|
staticRenderFns,
|
|
790
1603
|
false,
|
|
791
1604
|
null,
|
|
792
|
-
"
|
|
1605
|
+
"3e94221a",
|
|
793
1606
|
null
|
|
794
1607
|
|
|
795
1608
|
)
|
|
@@ -805,6 +1618,13 @@ var component = normalizeComponent(
|
|
|
805
1618
|
|
|
806
1619
|
|
|
807
1620
|
|
|
1621
|
+
/***/ }),
|
|
1622
|
+
|
|
1623
|
+
/***/ "fd22":
|
|
1624
|
+
/***/ (function(module, exports) {
|
|
1625
|
+
|
|
1626
|
+
module.exports = require("core-js/modules/es.string.includes.js");
|
|
1627
|
+
|
|
808
1628
|
/***/ })
|
|
809
1629
|
|
|
810
1630
|
/******/ });
|