chem-generic-ui 0.1.47 → 0.1.48

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.
Files changed (114) hide show
  1. package/dist/app.js +104 -0
  2. package/{src → dist}/asserts/main.css +7 -0
  3. package/{src → dist}/asserts/main.scss +7 -1
  4. package/dist/components/admin/ElementManager.js +54 -0
  5. package/dist/components/details/GenDSDetails.js +273 -0
  6. package/dist/components/details/GenSgDetails.js +566 -0
  7. package/{src → dist}/components/dnd/DragDropItemTypes.js +8 -1
  8. package/dist/components/dnd/GenericElDropTarget.js +274 -0
  9. package/dist/components/dnd/GridDnD.js +77 -0
  10. package/dist/components/dnd/PanelDnD.js +171 -0
  11. package/dist/components/fields/ButtonConfirm.js +76 -0
  12. package/dist/components/fields/ButtonTooltip.js +88 -0
  13. package/dist/components/fields/FieldLabel.js +38 -0
  14. package/dist/components/fields/GenDSMisType.js +44 -0
  15. package/dist/components/fields/GenFormGroupCb.js +31 -0
  16. package/dist/components/fields/GenProperties.js +83 -0
  17. package/dist/components/fields/GenPropertiesFields.js +616 -0
  18. package/dist/components/flow/FlowView.js +88 -0
  19. package/dist/components/flow/FlowViewerModal.js +83 -0
  20. package/dist/components/flow/LayerNode.js +59 -0
  21. package/dist/components/layers/GenPropertiesLayer.js +280 -0
  22. package/dist/components/layers/LayerModal.js +81 -0
  23. package/dist/components/layers/LayersLayout.js +88 -0
  24. package/dist/components/models/Attachment.js +73 -0
  25. package/dist/components/models/GenericSubField.js +37 -0
  26. package/dist/components/table/DropLinkRenderer.js +55 -0
  27. package/dist/components/table/DropRenderer.js +45 -0
  28. package/dist/components/table/DropTextRenderer.js +45 -0
  29. package/dist/components/table/GenericElTableDropTarget.js +252 -0
  30. package/dist/components/table/GridBtn.js +102 -0
  31. package/dist/components/table/GridEntry.js +163 -0
  32. package/dist/components/table/SamOption.js +87 -0
  33. package/dist/components/table/SelectRenderer.js +52 -0
  34. package/dist/components/table/TableRecord.js +454 -0
  35. package/dist/components/table/UConverterRenderer.js +41 -0
  36. package/dist/components/tools/collate.js +103 -0
  37. package/dist/components/tools/orten.js +294 -0
  38. package/dist/components/tools/utils.js +593 -0
  39. package/dist/data/SystemUnits.js +588 -0
  40. package/{src → dist}/data/systemUnits.json +0 -0
  41. package/{src → dist}/index.css +0 -0
  42. package/dist/index.js +38 -0
  43. package/{src → dist}/logo.svg +0 -0
  44. package/dist/simulations/SimWF.js +123 -0
  45. package/dist/simulations/SimuDS.js +118 -0
  46. package/dist/simulations/SimuSG.js +123 -0
  47. package/package.json +51 -43
  48. package/.babelrc +0 -11
  49. package/.eslintrc +0 -23
  50. package/.tool-versions +0 -3
  51. package/chem-generic-ui-v0.1.41.tgz +0 -0
  52. package/dist/bundle.js +0 -2
  53. package/dist/bundle.js.LICENSE.txt +0 -70
  54. package/dist/ds_details.json +0 -57
  55. package/dist/ds_klass.json +0 -102
  56. package/dist/ds_props.json +0 -54
  57. package/dist/index.html +0 -14
  58. package/dist/sg_details.json +0 -2036
  59. package/dist/sg_klass.json +0 -850
  60. package/dist/units_system.json +0 -430
  61. package/public/ds_details.json +0 -57
  62. package/public/ds_klass.json +0 -102
  63. package/public/ds_props.json +0 -54
  64. package/public/favicon.ico +0 -0
  65. package/public/images/not_available.svg +0 -1
  66. package/public/index.html +0 -47
  67. package/public/logo192.png +0 -0
  68. package/public/logo512.png +0 -0
  69. package/public/manifest.json +0 -25
  70. package/public/robots.txt +0 -3
  71. package/public/sg_details.json +0 -2036
  72. package/public/sg_klass.json +0 -850
  73. package/public/test/ds_props.json +0 -54
  74. package/public/units_system.json +0 -430
  75. package/src/app.js +0 -52
  76. package/src/asserts/bootstrap-theme.min.css +0 -6
  77. package/src/asserts/bootstrap.min.css +0 -6
  78. package/src/components/admin/ElementManager.js +0 -28
  79. package/src/components/details/GenDSDetails.js +0 -164
  80. package/src/components/details/GenSgDetails.js +0 -396
  81. package/src/components/dnd/GenericElDropTarget.js +0 -160
  82. package/src/components/dnd/GridDnD.js +0 -42
  83. package/src/components/dnd/PanelDnD.js +0 -85
  84. package/src/components/fields/ButtonConfirm.js +0 -45
  85. package/src/components/fields/ButtonTooltip.js +0 -46
  86. package/src/components/fields/FieldLabel.js +0 -18
  87. package/src/components/fields/GenDSMisType.js +0 -20
  88. package/src/components/fields/GenFormGroupCb.js +0 -17
  89. package/src/components/fields/GenProperties.js +0 -56
  90. package/src/components/fields/GenPropertiesFields.js +0 -440
  91. package/src/components/layers/GenPropertiesLayer.js +0 -178
  92. package/src/components/layers/LayerModal.js +0 -52
  93. package/src/components/layers/LayersLayout.js +0 -68
  94. package/src/components/models/Attachment.js +0 -37
  95. package/src/components/models/GenericSubField.js +0 -10
  96. package/src/components/table/DropLinkRenderer.js +0 -35
  97. package/src/components/table/DropRenderer.js +0 -31
  98. package/src/components/table/DropTextRenderer.js +0 -25
  99. package/src/components/table/GenericElTableDropTarget.js +0 -131
  100. package/src/components/table/GridBtn.js +0 -41
  101. package/src/components/table/GridEntry.js +0 -75
  102. package/src/components/table/SamOption.js +0 -53
  103. package/src/components/table/SelectRenderer.js +0 -34
  104. package/src/components/table/TableRecord.js +0 -254
  105. package/src/components/table/UConverterRenderer.js +0 -24
  106. package/src/components/tools/collate.js +0 -65
  107. package/src/components/tools/orten.js +0 -171
  108. package/src/components/tools/utils.js +0 -414
  109. package/src/data/SystemUnits.js +0 -434
  110. package/src/index.html +0 -1
  111. package/src/index.js +0 -45
  112. package/src/simulations/SimuDS.js +0 -52
  113. package/src/simulations/SimuSG.js +0 -54
  114. package/webpack.config.js +0 -46
@@ -1,434 +0,0 @@
1
- export default {
2
- SYSTEM_UNITS:
3
- {
4
- fields: [
5
- {
6
- type: 'numeric',
7
- field: 'acceleration',
8
- label: 'Acceleration',
9
- default: '',
10
- position: 10,
11
- placeholder: 'acceleration',
12
- units: [
13
- { key: 'mm_s2', label: 'mm/s<sup>2</sup>' }
14
- ]
15
- },
16
- {
17
- type: 'numeric',
18
- field: 'agitation',
19
- label: 'Agitation',
20
- default: '',
21
- position: 20,
22
- placeholder: 'agitation',
23
- units: [
24
- { key: 'rpm', label: 'rpm' }
25
- ]
26
- },
27
- {
28
- type: 'numeric',
29
- field: 'amount_enzyme',
30
- label: 'Amount enzyme as nmol/min',
31
- default: '',
32
- position: 30,
33
- placeholder: 'amount enzyme as nmol/min',
34
- units: [
35
- { key: 'u', label: 'U', nm: 1 },
36
- { key: 'mu', label: 'mU', nm: 1000 }
37
- ]
38
- },
39
- {
40
- type: 'numeric',
41
- field: 'molarity',
42
- label: 'Chem. concentration (Molarity)',
43
- default: '',
44
- position: 40,
45
- placeholder: 'molarity',
46
- units: [
47
- { key: 'mol_l', label: 'mol/L (M)', nm: 1 },
48
- { key: 'mmol_l', label: 'mmol/L (mM)', nm: 1000 },
49
- { key: 'nmol_l', label: 'nmol/L (nM)', nm: 1000000 },
50
- { key: 'pmol_l', label: 'pmol/L (pM)', nm: 1000000000 }
51
- ]
52
- },
53
- {
54
- type: 'numeric',
55
- field: 'chem_distances',
56
- label: 'Chem. distances',
57
- default: '',
58
- position: 50,
59
- placeholder: 'Chem. distances',
60
- units: [
61
- { key: 'angstrom', label: 'Å' }
62
- ]
63
- },
64
- {
65
- type: 'numeric',
66
- field: 'concentration',
67
- label: 'Concentration',
68
- default: '',
69
- position: 60,
70
- placeholder: 'concentration',
71
- units: [
72
- { key: 'ng_l', label: 'ng/L', nm: 1000000 },
73
- { key: 'mg_l', label: 'mg/L', nm: 1000 },
74
- { key: 'g_l', label: 'g/L', nm: 1 }
75
- ]
76
- },
77
- {
78
- type: 'numeric',
79
- field: 'conductivity',
80
- label: 'Conductivity',
81
- default: '',
82
- position: 66,
83
- placeholder: 'conductivity',
84
- units: [
85
- { key: 's_m', label: 'S/m', nm: 1 }
86
- ]
87
- },
88
- {
89
- type: 'numeric',
90
- field: 'current',
91
- label: 'Current',
92
- default: '',
93
- position: 60,
94
- placeholder: 'Current',
95
- units: [
96
- { key: 'A', label: 'A', nm: 1 },
97
- { key: 'mA', label: 'mA', nm: 1000 },
98
- { key: 'uA', label: 'µA', nm: 1000000 },
99
- { key: 'nA', label: 'nA', nm: 1000000000 }
100
- ]
101
- },
102
- {
103
- type: 'numeric',
104
- field: 'degree',
105
- label: 'Degree',
106
- default: '',
107
- position: 70,
108
- placeholder: 'degree',
109
- units: [
110
- { key: 'degree', label: '°' }
111
- ]
112
- },
113
- {
114
- type: 'numeric',
115
- field: 'density',
116
- label: 'Density',
117
- default: '',
118
- position: 75,
119
- placeholder: 'density',
120
- units: [
121
- { key: 'g_cm3', label: 'g/cm<sup>3</sup>', nm: 1 },
122
- { key: 'kg_l', label: 'kg/l', nm: 1 }
123
- ]
124
- },
125
- {
126
- type: 'numeric',
127
- field: 'duration',
128
- label: 'Duration',
129
- default: '',
130
- position: 80,
131
- placeholder: 'duration',
132
- units: [
133
- { key: 'd', label: 'd', nm: 1 },
134
- { key: 'h', label: 'h', nm: 24 },
135
- { key: 'min', label: 'm', nm: 1440 },
136
- { key: 's', label: 's', nm: 86400 }
137
- ]
138
- },
139
- {
140
- type: 'numeric',
141
- field: 'elastic_modulus',
142
- label: 'Elastic modulus',
143
- default: '',
144
- position: 86,
145
- placeholder: 'Elastic modulus',
146
- units: [
147
- { key: 'm_pa', label: 'MPa', nm: 1 },
148
- { key: 'k_pa', label: 'kPa', nm: 1000 },
149
- { key: 'pa', label: 'Pa', nm: 1000000 }
150
- ]
151
- },
152
- {
153
- type: 'numeric',
154
- field: 'electric_field',
155
- label: 'Electric field',
156
- default: '',
157
- position: 86,
158
- placeholder: 'Electric field',
159
- units: [
160
- { key: 'v_m', label: 'V/m', nm: 1 }
161
- ]
162
- },
163
- {
164
- type: 'numeric',
165
- field: 'energy',
166
- label: 'Energy',
167
- default: '',
168
- position: 88,
169
- placeholder: 'Joule',
170
- units: [
171
- { key: 'j', label: 'J', nm: 1000 },
172
- { key: 'k_j', label: 'kJ', nm: 1 }
173
- ]
174
- },
175
- {
176
- type: 'numeric',
177
- field: 'enzyme_activity',
178
- label: 'Enzyme activity',
179
- default: '',
180
- position: 90,
181
- placeholder: 'Enzyme activity',
182
- units: [
183
- { key: 'u_l', label: 'U/L', nm: 1 },
184
- { key: 'u_ml', label: 'U/mL', nm: 1000 }
185
- ]
186
- },
187
- {
188
- type: 'numeric',
189
- field: 'flow_rate',
190
- label: 'Flow rate',
191
- default: '',
192
- position: 100,
193
- placeholder: 'Flow rate',
194
- units: [
195
- { key: 'ul_min', label: 'µl/min', nm: 1000000 },
196
- { key: 'ml_min', label: 'ml/min', nm: 1000 },
197
- { key: 'l_m', label: 'l/m', nm: 1 }
198
- ]
199
- },
200
- {
201
- type: 'numeric',
202
- field: 'frequency',
203
- label: 'Frequency',
204
- default: '',
205
- position: 100,
206
- placeholder: 'frequency',
207
- units: [
208
- { key: 'hz', label: 'Hz', nm: 1000 },
209
- { key: 'khz', label: 'kHz', nm: 1 }
210
- ]
211
- },
212
- {
213
- type: 'numeric',
214
- field: 'heating_rate',
215
- label: 'Heating rate',
216
- default: '',
217
- position: 106,
218
- placeholder: 'heating rate',
219
- units: [
220
- { key: 'k_min', label: 'K/min', nm: 1 }
221
- ]
222
- },
223
- {
224
- type: 'numeric',
225
- field: 'length',
226
- label: 'Length',
227
- default: '',
228
- position: 110,
229
- placeholder: 'length',
230
- units: [
231
- { key: 'pm', label: 'pm', nm: 100000 },
232
- { key: 'nm', label: 'nm', nm: 10000 },
233
- { key: 'mm', label: 'mm', nm: 1000 },
234
- { key: 'cm', label: 'cm', nm: 100 },
235
- { key: 'm', label: 'm', nm: 1 }
236
- ]
237
- },
238
- {
239
- type: 'numeric',
240
- field: 'magnetic_flux_density',
241
- label: 'Magnetic flux density/inductivity',
242
- default: '',
243
- position: 120,
244
- placeholder: '',
245
- units: [
246
- { key: 'T', label: 'T', nm: 1 }
247
- ]
248
- },
249
- {
250
- type: 'numeric',
251
- field: 'mass',
252
- label: 'Mass',
253
- default: '',
254
- position: 120,
255
- placeholder: 'mass',
256
- units: [
257
- { key: 'g', label: 'g', nm: 1 },
258
- { key: 'mg', label: 'mg', nm: 1000 },
259
- { key: 'ug', label: 'µg', nm: 1000000 }
260
- ]
261
- },
262
- {
263
- type: 'numeric',
264
- field: 'mass_molecule',
265
- label: 'Mass of molecule',
266
- default: '',
267
- position: 126,
268
- placeholder: 'mass of molecule',
269
- units: [
270
- { key: 'dalton', label: 'D', nm: 1000 },
271
- { key: 'kilo_dalton', label: 'kD', nm: 1 }
272
- ]
273
- },
274
- {
275
- type: 'numeric',
276
- field: 'molecular_weight',
277
- label: 'Molecular weight',
278
- default: '',
279
- position: 130,
280
- placeholder: 'Molecular weight',
281
- units: [
282
- { key: 'g_mol', label: 'g/mol' }
283
- ]
284
- },
285
- {
286
- type: 'numeric',
287
- field: 'percentage',
288
- label: 'Percentage',
289
- default: '',
290
- position: 136,
291
- placeholder: 'percentage',
292
- units: [
293
- { key: 'p', label: '%', nm: 1 }
294
- ]
295
- },
296
- {
297
- type: 'numeric',
298
- field: 'pressure',
299
- label: 'Pressure',
300
- default: '',
301
- position: 140,
302
- placeholder: 'pressure',
303
- units: [
304
- { key: 'atm', label: 'atm', nm: 1 },
305
- { key: 'pa', label: 'Pa', nm: 101325 },
306
- { key: 'torr', label: 'Torr', nm: 760 }
307
- ]
308
- },
309
- {
310
- type: 'numeric',
311
- field: 'reaction_rate',
312
- label: 'Reaction rate',
313
- default: '',
314
- position: 150,
315
- placeholder: 'Reaction rate',
316
- units: [
317
- { key: 'mol_lmin', label: 'mol/Lmin', nm: 1 },
318
- { key: 'mol_lsec', label: 'mol/Ls', nm: 60 }
319
- ]
320
- },
321
- {
322
- type: 'numeric',
323
- field: 'specific_volume',
324
- label: 'Specific Volume',
325
- default: '',
326
- position: 160,
327
- placeholder: 'Specific Volume',
328
- units: [
329
- { key: 'cm3_g', label: 'cm<sup>3</sup>/g', nm: 1 }
330
- ]
331
- },
332
- {
333
- type: 'numeric',
334
- field: 'speed',
335
- label: 'Speed',
336
- default: '',
337
- position: 165,
338
- placeholder: 'speed',
339
- units: [
340
- { key: 'cm_s', label: 'cm/s', nm: 1 },
341
- { key: 'mm_s', label: 'mm/s', nm: 10 },
342
- { key: 'cm_h', label: 'cm/h', nm: 3600 },
343
- { key: 'mm_h', label: 'mm/h', nm: 36000 }
344
- ]
345
- },
346
- {
347
- type: 'numeric',
348
- field: 'surface',
349
- label: 'Surface',
350
- default: '',
351
- position: 170,
352
- placeholder: 'surface',
353
- units: [
354
- { key: 'a_2', label: 'A<sup>2</sup>' },
355
- { key: 'mm_2', label: 'mm<sup>2</sup>' },
356
- { key: 'cm_2', label: 'cm<sup>2</sup>' }
357
- ]
358
- },
359
- {
360
- type: 'numeric',
361
- field: 'temperature',
362
- label: 'Temperature',
363
- default: '',
364
- position: 180,
365
- placeholder: 'temperature',
366
- units: [
367
- { key: 'C', label: '°C' },
368
- { key: 'F', label: '°F' },
369
- { key: 'K', label: '°K' }
370
- ]
371
- },
372
- {
373
- type: 'numeric',
374
- field: 'turnover_number',
375
- label: 'Turnover number',
376
- default: '',
377
- position: 190,
378
- placeholder: 'Turnover number',
379
- units: [
380
- { key: '1_s', label: '1/s' }
381
- ]
382
- },
383
- {
384
- type: 'numeric',
385
- field: 'viscosity',
386
- label: 'Dynamic Viscosity',
387
- default: '',
388
- position: 200,
389
- placeholder: 'Dynamic Viscosity',
390
- units: [
391
- { key: 'pas', label: 'Pas', nm: 1 },
392
- { key: 'mpas', label: 'mPas', nm: 1000 }
393
- ]
394
- },
395
- {
396
- type: 'numeric',
397
- field: 'kinematic_viscosity',
398
- label: 'Kinematic Viscosity',
399
- default: '',
400
- position: 205,
401
- placeholder: 'Kinematic Viscosity',
402
- units: [
403
- { key: 'm2_s', label: 'm<sup>2</sup>/s', nm: 1 }
404
- ]
405
- },
406
- {
407
- type: 'numeric',
408
- field: 'voltage',
409
- label: 'Voltage',
410
- default: '',
411
- position: 200,
412
- placeholder: 'voltage',
413
- units: [
414
- { key: 'mv', label: 'mV', nm: 1000 },
415
- { key: 'v', label: 'V', nm: 1 }
416
- ]
417
- },
418
- {
419
- type: 'numeric',
420
- field: 'volumes',
421
- label: 'Volumes',
422
- default: '',
423
- position: 210,
424
- placeholder: 'volume',
425
- units: [
426
- { key: 'l', label: 'l', nm: 1 },
427
- { key: 'ml', label: 'ml', nm: 1000 },
428
- { key: 'ul', label: 'µl', nm: 1000000 },
429
- { key: 'nl', label: 'nl', nm: 1000000000 }
430
- ]
431
- }
432
- ]
433
- }
434
- };
package/src/index.html DELETED
@@ -1 +0,0 @@
1
- <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/> <meta name="theme-color" content="#000000"/> <title>React with Webpack and Babel</title> </head> <body> <noscript> You need to enable JavaScript to run this app. </noscript> <div id="generic"> </div> </body> </html>
package/src/index.js DELETED
@@ -1,45 +0,0 @@
1
- /* eslint-disable no-unused-vars */
2
- import React from 'react';
3
- import ReactDOM from 'react-dom';
4
- // import 'bootstrap/dist/css/bootstrap.min.css';
5
- import './index.css';
6
- //import 'bootstrap/dist/css/bootstrap.min.css';
7
- // import 'bootstrap/dist/css/bootstrap.css'; Paggy
8
-
9
-
10
- // import 'bootstrap/dist/css/bootstrap.css';
11
- // import 'bootstrap/dist/css/bootstrap-theme.css';
12
-
13
- // import 'bootstrap/dist/css/bootstrap.min.css';
14
- // import App from './App';
15
- // import reportWebVitals from './reportWebVitals';
16
-
17
- // import { ElementManager, GenPropertiesText } from './components/admin/ElementManager';
18
- import { ElementManager, GenDSMisType, GenericDSDetails, SegmentDetails } from './app';
19
- import SimuDS from './simulations/SimuDS';
20
- import SimuSG from './simulations/SimuSG';
21
-
22
- // export { ElementManager, GenPropertiesText };
23
-
24
- ReactDOM.render(
25
- <div>
26
- <ElementManager elements={[]} element={{}} />
27
- <GenDSMisType uiCtrl />
28
- <SimuDS />
29
- <SimuSG />
30
- </div>
31
- ,
32
- document.getElementById('generic')
33
- );
34
-
35
- module.hot.accept();
36
- // function App() {
37
- // return (
38
- // <div>
39
- // Project A
40
- // <ElementManager />
41
- // </div>
42
- // );
43
- // }
44
-
45
- // export default App;
@@ -1,52 +0,0 @@
1
- import React, { Component } from 'react';
2
- import GenericDSDetails from '../components/details/GenDSDetails';
3
-
4
- class SimuDS extends Component {
5
- constructor(props) {
6
- super(props);
7
- this.state = {
8
- genericDS: {}, klass: {}
9
- };
10
- this.handleChange = this.handleChange.bind(this);
11
- }
12
-
13
- componentDidMount() {
14
- fetch('ds_details.json', { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } })
15
- .then(response => response.json()).then((json) => {
16
- fetch('ds_klass.json', { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } })
17
- .then(response => response.json()).then((kjson) => {
18
- this.setState({ genericDS: json, klass: kjson });
19
- })
20
- .catch((errorMessage) => {
21
- console.log(errorMessage);
22
- });
23
- })
24
- .catch((errorMessage) => {
25
- console.log(errorMessage);
26
- });
27
- }
28
-
29
- handleChange(newObj) {
30
- this.setState({ genericDS: newObj });
31
- }
32
-
33
- render() {
34
- const { genericDS, klass } = this.state;
35
- return (
36
- <div>
37
- <h2>GenericDSDetails</h2>
38
- <div>
39
- <GenericDSDetails
40
- uiCtrl
41
- genericDS={genericDS}
42
- klass={klass}
43
- kind="1H NMR"
44
- onChange={this.handleChange}
45
- />
46
- </div>
47
- </div>
48
- );
49
- }
50
- }
51
-
52
- export default SimuDS;
@@ -1,54 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { DragDropContext } from 'react-dnd';
3
- import HTML5Backend from 'react-dnd-html5-backend';
4
- import SegmentDetails from '../components/details/GenSgDetails';
5
-
6
- class SimuSG extends Component {
7
- constructor(props) {
8
- super(props);
9
- this.state = {
10
- segment: {}, klass: {}
11
- };
12
- this.handleChange = this.handleChange.bind(this);
13
- }
14
-
15
- componentDidMount() {
16
- fetch('sg_details.json', { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } })
17
- .then(response => response.json()).then((json) => {
18
- console.log(json);
19
- fetch('sg_klass.json', { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } })
20
- .then(response => response.json()).then((kjson) => {
21
- this.setState({ segment: json, klass: kjson });
22
- })
23
- .catch((errorMessage) => {
24
- console.log(errorMessage);
25
- });
26
- })
27
- .catch((errorMessage) => {
28
- console.log(errorMessage);
29
- });
30
- }
31
-
32
- handleChange(newObj) {
33
- this.setState({ segment: newObj });
34
- }
35
-
36
- render() {
37
- const { segment, klass } = this.state;
38
- return (
39
- <div>
40
- <h2>SegmentDetails</h2>
41
- <div>
42
- <SegmentDetails
43
- uiCtrl
44
- segment={segment}
45
- klass={klass}
46
- onChange={this.handleChange}
47
- />
48
- </div>
49
- </div>
50
- );
51
- }
52
- }
53
-
54
- export default DragDropContext(HTML5Backend)(SimuSG);
package/webpack.config.js DELETED
@@ -1,46 +0,0 @@
1
- const path = require('path');
2
- const webpack = require('webpack');
3
-
4
- module.exports = {
5
- mode: 'production',
6
- entry: {
7
- index: [
8
- './src/index.js',
9
- // './asserts/bootstrap.min.css',
10
- // './asserts/bootstrap-theme.min.css'
11
- ]
12
- },
13
- module: {
14
- rules: [
15
- {
16
- test: /\.(js|jsx)$/,
17
- exclude: /node_modules/,
18
- use: {
19
- loader: "babel-loader",
20
- options: {
21
- presets: ['@babel/preset-env', '@babel/preset-react']
22
- }
23
- }
24
- },
25
- {
26
- test: /\.css$/,
27
- use: [
28
- 'style-loader',
29
- 'css-loader',
30
- 'sass-loader'
31
- ]
32
- }
33
- ],
34
- },
35
- resolve: {
36
- extensions: ['*', '.js', '.jsx'],
37
- },
38
- output: {
39
- path: path.resolve(__dirname, './dist'),
40
- filename: 'bundle.js',
41
- },
42
- devServer: {
43
- static: path.resolve(__dirname, './dist'),
44
- hot: true,
45
- },
46
- };