MCPcopy Create free account
hub / github.com/handsontable/handsontable / Formulas

Class Formulas

handsontable/src/plugins/formulas/formulas.ts:108–1543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 * @class Formulas
107 */
108export class Formulas extends BasePlugin {
109 /**
110 * Returns the plugin key used to identify this plugin in Handsontable settings.
111 */
112 static get PLUGIN_KEY() {
113 return PLUGIN_KEY;
114 }
115
116 /**
117 * Returns the priority order used to determine the order in which plugins are initialized.
118 */
119 static get PLUGIN_PRIORITY() {
120 return PLUGIN_PRIORITY;
121 }
122
123 /**
124 * Returns the list of settings keys observed by the plugin for configuration changes.
125 */
126 static get SETTING_KEYS() {
127 return [
128 PLUGIN_KEY,
129 ...SETTING_KEYS
130 ];
131 }
132
133 /**
134 * Flag used to bypass hooks in internal operations.
135 *
136 * @private
137 * @type {boolean}
138 */
139 #internalOperationPending = false;
140
141 /**
142 * Flag needed to mark if Handsontable was initialized with no data.
143 * (Required to work around the fact, that Handsontable auto-generates sample data, when no data is provided).
144 *
145 * @type {boolean}
146 */
147 #hotWasInitializedWithEmptyData = false;
148
149 /**
150 * Maps a HyperFormula `ExportedCellChange` to the same change with `newValue` translated to a
151 * Handsontable-formatted string when the target cell is of type `date` or `time`. For other cells
152 * (or non-numeric values, or named expressions, or trimmed cells, or cells on other sheets), the
153 * original change is returned unchanged.
154 *
155 * @param {object} change The HyperFormula exported change.
156 * @returns {object}
157 */
158 #exportChangeValue(
159 change: { address?: { sheet: number; row: number; col: number }; newValue: unknown }
160 ): { address?: { sheet: number; row: number; col: number }; newValue: unknown } {
161 if (!change.address || change.address.sheet !== this.sheetId || typeof change.newValue !== 'number') {
162 return change;
163 }
164
165 const visualRow = this.rowAxisSyncer!.getVisualIndexFromHfIndex(change.address.row);

Callers

nothing calls this directly

Calls 15

#exportChangeValueMethod · 0.95
isFormulaCellTypeMethod · 0.95
switchSheetMethod · 0.95
renderDependentSheetsMethod · 0.95
getCellTypeMethod · 0.95
#getValueGetterValueMethod · 0.95
syncChangeWithEngineMethod · 0.95
staticRegisterFunction · 0.90
isNumericFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…