hyperformula-dc
Version:
HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas
62 lines (51 loc) • 1.9 kB
JavaScript
;
exports.__esModule = true;
exports.ValueCellVertex = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
/**
* Represents vertex which keeps static cell value
*/
var ValueCellVertex = /*#__PURE__*/function () {
/** Static cell value. */
function ValueCellVertex(parsedValue, rawValue) {
_classCallCheck(this, ValueCellVertex);
this.parsedValue = parsedValue;
this.rawValue = rawValue;
}
_createClass(ValueCellVertex, [{
key: "getValues",
value: function getValues() {
return {
parsedValue: this.parsedValue,
rawValue: this.rawValue
};
}
}, {
key: "setValues",
value: function setValues(values) {
this.parsedValue = values.parsedValue;
this.rawValue = values.rawValue;
}
/**
* Returns cell value stored in vertex
*/
}, {
key: "getCellValue",
value: function getCellValue() {
return this.parsedValue;
}
}, {
key: "setCellValue",
value: function setCellValue(_cellValue) {
throw 'SetCellValue is deprecated for ValueCellVertex';
}
}]);
return ValueCellVertex;
}();
exports.ValueCellVertex = ValueCellVertex;