Skip to content

Commit

Permalink
add mass chromatogram layout
Browse files Browse the repository at this point in the history
  • Loading branch information
f-idiris committed Oct 18, 2023
1 parent 3c54b03 commit 762a1d7
Show file tree
Hide file tree
Showing 14 changed files with 3,797 additions and 5 deletions.
6 changes: 5 additions & 1 deletion dist/components/cmd_bar/r01_layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ const layoutSelect = (classes, layoutSt, updateLayoutAct) => {
value: _list_layout.LIST_LAYOUT.DLS_INTENSITY
}, /*#__PURE__*/_react.default.createElement("span", {
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-layout')
}, "DLS INTENSITY"))));
}, "DLS INTENSITY")), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
value: _list_layout.LIST_LAYOUT.MASS_CHROMATOGRAM
}, /*#__PURE__*/_react.default.createElement("span", {
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-layout')
}, "MASS CHROMATOGRAM"))));
};
const Layout = _ref => {
let {
Expand Down
2 changes: 1 addition & 1 deletion dist/components/d3_line/line_focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ class LineFocus {
return null;
}
reverseXAxis(layoutSt) {
return [_list_layout.LIST_LAYOUT.UVVIS, _list_layout.LIST_LAYOUT.HPLC_UVVIS, _list_layout.LIST_LAYOUT.TGA, _list_layout.LIST_LAYOUT.XRD, _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY, _list_layout.LIST_LAYOUT.CDS, _list_layout.LIST_LAYOUT.DLS_ACF, _list_layout.LIST_LAYOUT.SEC, _list_layout.LIST_LAYOUT.EMISSIONS, _list_layout.LIST_LAYOUT.DLS_INTENSITY].indexOf(layoutSt) < 0;
return [_list_layout.LIST_LAYOUT.UVVIS, _list_layout.LIST_LAYOUT.HPLC_UVVIS, _list_layout.LIST_LAYOUT.TGA, _list_layout.LIST_LAYOUT.XRD, _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY, _list_layout.LIST_LAYOUT.CDS, _list_layout.LIST_LAYOUT.DLS_ACF, _list_layout.LIST_LAYOUT.SEC, _list_layout.LIST_LAYOUT.EMISSIONS, _list_layout.LIST_LAYOUT.DLS_INTENSITY, _list_layout.LIST_LAYOUT.MASS_CHROMATOGRAM].indexOf(layoutSt) < 0;
}
create(_ref) {
let {
Expand Down
3 changes: 2 additions & 1 deletion dist/constants/list_layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const LIST_LAYOUT = {
AIF: 'AIF',
EMISSIONS: 'Emissions',
DLS_ACF: 'DLS ACF',
DLS_INTENSITY: 'DLS intensity'
DLS_INTENSITY: 'DLS intensity',
MASS_CHROMATOGRAM: 'MASS CHROMATOGRAM'
};
exports.LIST_LAYOUT = LIST_LAYOUT;
3 changes: 3 additions & 0 deletions dist/helpers/chem.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ const readLayout = jcamp => {
if (dataType.includes('DLS intensity')) {
return _list_layout.LIST_LAYOUT.DLS_INTENSITY;
}
if (dataType.includes('MASS CHROMATOGRAM')) {
return _list_layout.LIST_LAYOUT.MASS_CHROMATOGRAM;
}
}
return false;
};
Expand Down
8 changes: 7 additions & 1 deletion dist/helpers/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ const spectraOps = {
[_list_layout.LIST_LAYOUT.DLS_INTENSITY]: {
head: 'DLS',
tail: '.'
},
[_list_layout.LIST_LAYOUT.MASS_CHROMATOGRAM]: {
head: 'MASS CHROMATOGRAM',
tail: '.'
}
};
const rmRef = function (peaks, shift) {
Expand Down Expand Up @@ -431,6 +435,7 @@ const isAIFLayout = layoutSt => _list_layout.LIST_LAYOUT.AIF === layoutSt;
const isEmissionsLayout = layoutSt => _list_layout.LIST_LAYOUT.EMISSIONS === layoutSt;
const isDLSACFLayout = layoutSt => _list_layout.LIST_LAYOUT.DLS_ACF === layoutSt;
const isDLSIntensityLayout = layoutSt => _list_layout.LIST_LAYOUT.DLS_INTENSITY === layoutSt;
const isMassChromatogramLayout = layoutSt => _list_layout.LIST_LAYOUT.MASS_CHROMATOGRAM === layoutSt;
const getNmrTyp = layout => {
switch (layout) {
case _list_layout.LIST_LAYOUT.H1:
Expand Down Expand Up @@ -526,7 +531,8 @@ const Format = {
hasMultiCurves,
isAIFLayout,
isDLSACFLayout,
strNumberFixedDecimal
strNumberFixedDecimal,
isMassChromatogramLayout
};
var _default = Format;
exports.default = _default;
11 changes: 11 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var _dls_acf_jcamp = _interopRequireDefault(require("./__tests__/fixtures/dls_ac
var _dls_intensity_jcamp = _interopRequireDefault(require("./__tests__/fixtures/dls_intensity_jcamp"));
var _qDescValue = require("./__tests__/fixtures/qDescValue");
require("./__tests__/style/svg.css");
var _mass_chromatogram_jcamp = _interopRequireDefault(require("./__tests__/fixtures/mass_chromatogram_jcamp"));
/* eslint-disable prefer-object-spread, default-param-last, no-nested-ternary */

const nmr1HEntity = _app.FN.ExtractJcamp(_nmr1h_jcamp.default);
Expand Down Expand Up @@ -81,6 +82,7 @@ const aifEntity2 = _app.FN.ExtractJcamp(_aif_jcamp_2.default);
const emissionsEntity = _app.FN.ExtractJcamp(_emissions_jcamp.default);
const dlsAcfEntity = _app.FN.ExtractJcamp(_dls_acf_jcamp.default);
const dlsIntensityEntity = _app.FN.ExtractJcamp(_dls_intensity_jcamp.default);
const massChromatogramEntity = _app.FN.ExtractJcamp(_mass_chromatogram_jcamp.default);
class DemoWriteIr extends _react.default.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -174,6 +176,8 @@ class DemoWriteIr extends _react.default.Component {
return dlsAcfEntity;
case 'dls intensity':
return dlsIntensityEntity;
case 'mass chromatogram':
return massChromatogramEntity;
case 'ms':
default:
return msEntity;
Expand Down Expand Up @@ -232,6 +236,7 @@ class DemoWriteIr extends _react.default.Component {
case 'emissions':
case 'dls acf':
case 'dls intensity':
case 'mass chromatogram':
default:
return false;
}
Expand Down Expand Up @@ -665,6 +670,12 @@ class DemoWriteIr extends _react.default.Component {
},
onClick: this.onClick('ms')
}, "MS"), /*#__PURE__*/_react.default.createElement(_Button.default, {
variant: "contained",
style: {
margin: '0 10px 0 10px'
},
onClick: this.onClick('mass chromatogram')
}, "Mass chromatogram"), /*#__PURE__*/_react.default.createElement(_Button.default, {
variant: "contained",
style: {
margin: '0 10px 0 10px'
Expand Down
Loading

0 comments on commit 762a1d7

Please sign in to comment.