1 | var _Handsontable$cellTyp, _Handsontable$editors, _Handsontable$rendere, _Handsontable$validat, _Handsontable$plugins;
|
2 | import Handsontable, { CellCoords, CellRange } from "./base.mjs";
|
3 | import { registerAllModules } from "./registry.mjs";
|
4 | import EventManager, { getListenersCounter } from "./eventManager.mjs";
|
5 | import { getRegisteredMapsCounter } from "./translations/index.mjs";
|
6 | import jQueryWrapper from "./helpers/wrappers/jquery.mjs";
|
7 | import GhostTable from "./utils/ghostTable.mjs";
|
8 | import * as parseTableHelpers from "./utils/parseTable.mjs";
|
9 | import * as arrayHelpers from "./helpers/array.mjs";
|
10 | import * as browserHelpers from "./helpers/browser.mjs";
|
11 | import * as dataHelpers from "./helpers/data.mjs";
|
12 | import * as dateHelpers from "./helpers/date.mjs";
|
13 | import * as featureHelpers from "./helpers/feature.mjs";
|
14 | import * as functionHelpers from "./helpers/function.mjs";
|
15 | import * as mixedHelpers from "./helpers/mixed.mjs";
|
16 | import * as numberHelpers from "./helpers/number.mjs";
|
17 | import * as objectHelpers from "./helpers/object.mjs";
|
18 | import * as stringHelpers from "./helpers/string.mjs";
|
19 | import * as unicodeHelpers from "./helpers/unicode.mjs";
|
20 | import * as domHelpers from "./helpers/dom/element.mjs";
|
21 | import * as domEventHelpers from "./helpers/dom/event.mjs";
|
22 | import { getRegisteredEditorNames, getEditor, registerEditor } from "./editors/registry.mjs";
|
23 | import { getRegisteredRendererNames, getRenderer, registerRenderer } from "./renderers/registry.mjs";
|
24 | import { getRegisteredValidatorNames, getValidator, registerValidator } from "./validators/registry.mjs";
|
25 | import { getRegisteredCellTypeNames, getCellType, registerCellType } from "./cellTypes/registry.mjs";
|
26 | import { getPluginsNames, getPlugin, registerPlugin } from "./plugins/registry.mjs";
|
27 | import { BasePlugin } from "./plugins/base/index.mjs";
|
28 | registerAllModules();
|
29 | jQueryWrapper(Handsontable);
|
30 |
|
31 |
|
32 | Handsontable.__GhostTable = GhostTable;
|
33 | Handsontable._getListenersCounter = getListenersCounter;
|
34 | Handsontable._getRegisteredMapsCounter = getRegisteredMapsCounter;
|
35 | Handsontable.EventManager = EventManager;
|
36 |
|
37 |
|
38 | const HELPERS = [arrayHelpers, browserHelpers, dataHelpers, dateHelpers, featureHelpers, functionHelpers, mixedHelpers, numberHelpers, objectHelpers, stringHelpers, unicodeHelpers, parseTableHelpers];
|
39 | const DOM = [domHelpers, domEventHelpers];
|
40 | Handsontable.helper = {};
|
41 | Handsontable.dom = {};
|
42 |
|
43 |
|
44 | arrayHelpers.arrayEach(HELPERS, helper => {
|
45 | arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), key => {
|
46 | if (key.charAt(0) !== '_') {
|
47 | Handsontable.helper[key] = helper[key];
|
48 | }
|
49 | });
|
50 | });
|
51 |
|
52 |
|
53 | arrayHelpers.arrayEach(DOM, helper => {
|
54 | arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), key => {
|
55 | if (key.charAt(0) !== '_') {
|
56 | Handsontable.dom[key] = helper[key];
|
57 | }
|
58 | });
|
59 | });
|
60 |
|
61 |
|
62 | Handsontable.cellTypes = (_Handsontable$cellTyp = Handsontable.cellTypes) !== null && _Handsontable$cellTyp !== void 0 ? _Handsontable$cellTyp : {};
|
63 | arrayHelpers.arrayEach(getRegisteredCellTypeNames(), cellTypeName => {
|
64 | Handsontable.cellTypes[cellTypeName] = getCellType(cellTypeName);
|
65 | });
|
66 | Handsontable.cellTypes.registerCellType = registerCellType;
|
67 | Handsontable.cellTypes.getCellType = getCellType;
|
68 |
|
69 |
|
70 | Handsontable.editors = (_Handsontable$editors = Handsontable.editors) !== null && _Handsontable$editors !== void 0 ? _Handsontable$editors : {};
|
71 | arrayHelpers.arrayEach(getRegisteredEditorNames(), editorName => {
|
72 | Handsontable.editors[`${stringHelpers.toUpperCaseFirst(editorName)}Editor`] = getEditor(editorName);
|
73 | });
|
74 | Handsontable.editors.registerEditor = registerEditor;
|
75 | Handsontable.editors.getEditor = getEditor;
|
76 |
|
77 |
|
78 | Handsontable.renderers = (_Handsontable$rendere = Handsontable.renderers) !== null && _Handsontable$rendere !== void 0 ? _Handsontable$rendere : {};
|
79 | arrayHelpers.arrayEach(getRegisteredRendererNames(), rendererName => {
|
80 | const renderer = getRenderer(rendererName);
|
81 | if (rendererName === 'base') {
|
82 | Handsontable.renderers.cellDecorator = renderer;
|
83 | }
|
84 | Handsontable.renderers[`${stringHelpers.toUpperCaseFirst(rendererName)}Renderer`] = renderer;
|
85 | });
|
86 | Handsontable.renderers.registerRenderer = registerRenderer;
|
87 | Handsontable.renderers.getRenderer = getRenderer;
|
88 |
|
89 |
|
90 | Handsontable.validators = (_Handsontable$validat = Handsontable.validators) !== null && _Handsontable$validat !== void 0 ? _Handsontable$validat : {};
|
91 | arrayHelpers.arrayEach(getRegisteredValidatorNames(), validatorName => {
|
92 | Handsontable.validators[`${stringHelpers.toUpperCaseFirst(validatorName)}Validator`] = getValidator(validatorName);
|
93 | });
|
94 | Handsontable.validators.registerValidator = registerValidator;
|
95 | Handsontable.validators.getValidator = getValidator;
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | Handsontable.plugins = (_Handsontable$plugins = Handsontable.plugins) !== null && _Handsontable$plugins !== void 0 ? _Handsontable$plugins : {};
|
105 | arrayHelpers.arrayEach(getPluginsNames(), pluginName => {
|
106 | Handsontable.plugins[pluginName] = getPlugin(pluginName);
|
107 | });
|
108 | Handsontable.plugins[`${stringHelpers.toUpperCaseFirst(BasePlugin.PLUGIN_KEY)}Plugin`] = BasePlugin;
|
109 | Handsontable.plugins.registerPlugin = registerPlugin;
|
110 | Handsontable.plugins.getPlugin = getPlugin;
|
111 | export { CellCoords, CellRange };
|
112 | export default Handsontable; |
\ | No newline at end of file |