UNPKG

2.39 kBJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4var _core = _interopRequireDefault(require("./core"));
5var _rootInstance = require("./utils/rootInstance");
6var _dataMap = require("./dataMap");
7var _pluginHooks = _interopRequireDefault(require("./pluginHooks"));
8var _registry = require("./i18n/registry");
9var _registry2 = require("./cellTypes/registry");
10var _textType = require("./cellTypes/textType");
11var _baseEditor = require("./editors/baseEditor");
12var _src = require("./3rdparty/walkontable/src");
13exports.CellCoords = _src.CellCoords;
14exports.CellRange = _src.CellRange;
15function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16// FIXME: Bug in eslint-plugin-import: https://github.com/benmosher/eslint-plugin-import/issues/1883
17/* eslint-disable import/named */
18
19/* eslint-enable import/named */
20
21// register default mandatory cell type for the Base package
22(0, _registry2.registerCellType)(_textType.TextCellType);
23
24// export the `BaseEditor` class to the Handsontable global namespace
25Handsontable.editors = {
26 BaseEditor: _baseEditor.BaseEditor
27};
28
29/**
30 * @param {HTMLElement} rootElement The element to which the Handsontable instance is injected.
31 * @param {object} userSettings The user defined options.
32 * @returns {Core}
33 */
34function Handsontable(rootElement, userSettings) {
35 const instance = new _core.default(rootElement, userSettings || {}, _rootInstance.rootInstanceSymbol);
36 instance.init();
37 return instance;
38}
39Handsontable.Core = function (rootElement) {
40 let userSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
41 return new _core.default(rootElement, userSettings, _rootInstance.rootInstanceSymbol);
42};
43Handsontable.DefaultSettings = (0, _dataMap.metaSchemaFactory)();
44Handsontable.hooks = _pluginHooks.default.getSingleton();
45Handsontable.CellCoords = _src.CellCoords;
46Handsontable.CellRange = _src.CellRange;
47Handsontable.packageName = 'handsontable';
48Handsontable.buildDate = "17/10/2024 09:16:13";
49Handsontable.version = "14.6.1";
50Handsontable.languages = {
51 dictionaryKeys: _registry.dictionaryKeys,
52 getLanguageDictionary: _registry.getLanguageDictionary,
53 getLanguagesDictionaries: _registry.getLanguagesDictionaries,
54 registerLanguageDictionary: _registry.registerLanguageDictionary,
55 getTranslatedPhrase: _registry.getTranslatedPhrase
56};
57var _default = exports.default = Handsontable;
\No newline at end of file