@complat/react-spectra-editor 1.5.0 → 1.5.1

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.
@@ -97,19 +97,6 @@ class MultiFocus {
97
97
  this.isFirefox = typeof InstallTrigger !== 'undefined';
98
98
  this.cyclicvoltaSt = null;
99
99
  }
100
- getGlobalXExtent() {
101
- let allData = [...this.data];
102
- if (this.otherLineData) {
103
- this.otherLineData.forEach(lineData => {
104
- allData = [...allData, ...lineData.data];
105
- });
106
- }
107
- const xes = d3.extent(allData, d => d.x).sort((a, b) => a - b);
108
- return {
109
- xL: xes[0],
110
- xU: xes[1]
111
- };
112
- }
113
100
  getShouldUpdate(nextEpSt) {
114
101
  const {
115
102
  prevXt,
@@ -296,14 +283,6 @@ class MultiFocus {
296
283
  drawOtherLines(layout) {
297
284
  d3.selectAll('.line-clip-compare').remove();
298
285
  if (!this.otherLineData) return null;
299
- const {
300
- yt
301
- } = (0, _compass.TfRescale)(this);
302
- const globalXExtent = this.getGlobalXExtent();
303
- const reverse = this.reverseXAxis(this.layout);
304
- const xRange = reverse ? [this.w, 0] : [0, this.w];
305
- const xtGlobal = d3.scaleLinear().domain([globalXExtent.xL, globalXExtent.xU]).range(xRange);
306
- const globalPathCall = d3.line().x(d => xtGlobal(d.x)).y(d => yt(d.y));
307
286
  this.otherLineData.forEach((entry, idx) => {
308
287
  const {
309
288
  data,
@@ -311,7 +290,7 @@ class MultiFocus {
311
290
  } = entry;
312
291
  const pathColor = color ? color : _format.default.mutiEntitiesColors(idx);
313
292
  const path = (0, _mount.MountComparePath)(this, pathColor, idx, 0.4);
314
- path.attr('d', globalPathCall(data));
293
+ path.attr('d', this.pathCall(data));
315
294
  if (this.layout === _list_layout.LIST_LAYOUT.AIF && this.isShowAllCurves === true) {
316
295
  path.attr('marker-mid', 'url(#arrow-left)');
317
296
  }
@@ -224,7 +224,15 @@ const ComparePanel = ({
224
224
  }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
225
225
  expanded: expand,
226
226
  onChange: onExapnd,
227
- className: (0, _classnames.default)(classes.panel),
227
+ disableGutters: true,
228
+ sx: {
229
+ '&.MuiAccordion-root.Mui-expanded': {
230
+ margin: 0
231
+ },
232
+ '&:before': {
233
+ display: 'none'
234
+ }
235
+ },
228
236
  TransitionProps: {
229
237
  unmountOnExit: true
230
238
  } // increase Accordion performance
@@ -173,6 +173,15 @@ const CyclicVoltammetryPanel = ({
173
173
  }));
174
174
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
175
175
  "data-testid": "PanelVoltammetry",
176
+ disableGutters: true,
177
+ sx: {
178
+ '&.MuiAccordion-root.Mui-expanded': {
179
+ margin: 0
180
+ },
181
+ '&:before': {
182
+ display: 'none'
183
+ }
184
+ },
176
185
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AccordionSummary, {
177
186
  expandIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {}),
178
187
  className: (0, _classnames.default)(classes.panelSummary),
@@ -128,6 +128,15 @@ const GraphSelectionPanel = ({
128
128
  });
129
129
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
130
130
  "data-testid": "GraphSelectionPanel",
131
+ disableGutters: true,
132
+ sx: {
133
+ '&.MuiAccordion-root.Mui-expanded': {
134
+ margin: 0
135
+ },
136
+ '&:before': {
137
+ display: 'none'
138
+ }
139
+ },
131
140
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AccordionSummary, {
132
141
  expandIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {}),
133
142
  className: (0, _classnames.default)(classes.panelSummary),
@@ -31,11 +31,7 @@ const styles = () => ({
31
31
  },
32
32
  panelSummary: {
33
33
  backgroundColor: '#eee',
34
- height: 32,
35
- minHeight: 32,
36
- '& .MuiAccordionSummary-content': {
37
- margin: 0
38
- }
34
+ height: 32
39
35
  },
40
36
  subSectionHeader: {
41
37
  backgroundColor: '#eee',
@@ -341,7 +337,15 @@ const InfoPanel = ({
341
337
  "data-testid": "PanelInfo",
342
338
  expanded: expand,
343
339
  onChange: onExapnd,
344
- className: (0, _classnames.default)(classes.panel),
340
+ disableGutters: true,
341
+ sx: {
342
+ '&.MuiAccordion-root.Mui-expanded': {
343
+ margin: 0
344
+ },
345
+ '&:before': {
346
+ display: 'none'
347
+ }
348
+ },
345
349
  TransitionProps: {
346
350
  unmountOnExit: true
347
351
  } // increase Accordion performance
@@ -435,8 +439,9 @@ const InfoPanel = ({
435
439
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
436
440
  className: classes.quillContainer,
437
441
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactQuill.default, {
442
+ className: (0, _classnames.default)(classes.quill, 'card-sv-quill'),
438
443
  value: normalizeQuillValue(descriptions),
439
- placeholder: canChangeDescription ? 'Add text here...' : undefined,
444
+ placeholder: canChangeDescription ? 'Peaks will be written here...' : undefined,
440
445
  readOnly: !canChangeDescription,
441
446
  modules: {
442
447
  toolbar: false
@@ -257,7 +257,15 @@ const MultiplicityPanel = ({
257
257
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
258
258
  expanded: expand,
259
259
  onChange: onExapnd,
260
- className: (0, _classnames.default)(classes.panel),
260
+ disableGutters: true,
261
+ sx: {
262
+ '&.MuiAccordion-root.Mui-expanded': {
263
+ margin: 0
264
+ },
265
+ '&:before': {
266
+ display: 'none'
267
+ }
268
+ },
261
269
  TransitionProps: {
262
270
  unmountOnExit: true
263
271
  } // increase Accordion performance
@@ -185,7 +185,15 @@ const PeakPanel = ({
185
185
  "data-testid": "PeaksPanelInfo",
186
186
  expanded: expand,
187
187
  onChange: onExapnd,
188
- className: (0, _classnames.default)(classes.panel),
188
+ disableGutters: true,
189
+ sx: {
190
+ '&.MuiAccordion-root.Mui-expanded': {
191
+ margin: 0
192
+ },
193
+ '&:before': {
194
+ display: 'none'
195
+ }
196
+ },
189
197
  TransitionProps: {
190
198
  unmountOnExit: true
191
199
  } // increase Accordion performance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complat/react-spectra-editor",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "An editor to View and Edit Chemical Spectra data (NMR, IR, MS, CV, UIVIS, XRD, GC, and DSC).",
5
5
  "repository": {
6
6
  "type": "git",