@handsontable/react 0.0.0-next-eaa3153-20240410 → 0.0.0-next-16c41fc-20240410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,12 @@ var Handsontable = require('handsontable/base');
|
|
|
8
8
|
var registry$1 = require('handsontable/renderers/registry');
|
|
9
9
|
var registry = require('handsontable/editors/registry');
|
|
10
10
|
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultCompat(ReactDOM);
|
|
15
|
+
var Handsontable__default = /*#__PURE__*/_interopDefaultCompat(Handsontable);
|
|
16
|
+
|
|
11
17
|
function _callSuper(t, o, e) {
|
|
12
18
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
13
19
|
}
|
|
@@ -231,8 +237,8 @@ function warn() {
|
|
|
231
237
|
* @returns {Object|null} A child (React node) or `null`, if no child of that type was found.
|
|
232
238
|
*/
|
|
233
239
|
function getChildElementByType(children, type) {
|
|
234
|
-
var childrenArray =
|
|
235
|
-
var childrenCount =
|
|
240
|
+
var childrenArray = React__default["default"].Children.toArray(children);
|
|
241
|
+
var childrenCount = React__default["default"].Children.count(children);
|
|
236
242
|
var wantedChild = null;
|
|
237
243
|
if (childrenCount !== 0) {
|
|
238
244
|
if (childrenCount === 1 && childrenArray[0].props[type]) {
|
|
@@ -270,7 +276,7 @@ function createEditorPortal(doc, editorElement) {
|
|
|
270
276
|
}
|
|
271
277
|
var containerProps = getContainerAttributesProps(editorElement.props, false);
|
|
272
278
|
containerProps.className = "".concat(DEFAULT_CLASSNAME, " ").concat(containerProps.className);
|
|
273
|
-
return
|
|
279
|
+
return ReactDOM__default["default"].createPortal(React__default["default"].createElement("div", Object.assign({}, containerProps), editorElement), doc.body);
|
|
274
280
|
}
|
|
275
281
|
/**
|
|
276
282
|
* Get an editor element extended with an instance-emitting method.
|
|
@@ -288,7 +294,7 @@ function getExtendedEditorElement(children, editorCache) {
|
|
|
288
294
|
if (!editorElement) {
|
|
289
295
|
return null;
|
|
290
296
|
}
|
|
291
|
-
return
|
|
297
|
+
return React__default["default"].cloneElement(editorElement, {
|
|
292
298
|
emitEditorInstance: function emitEditorInstance(editorInstance, editorColumnScope) {
|
|
293
299
|
if (!editorCache.get(editorClass)) {
|
|
294
300
|
editorCache.set(editorClass, new Map());
|
|
@@ -322,11 +328,11 @@ function createPortal(rElement, props) {
|
|
|
322
328
|
}
|
|
323
329
|
var portalContainer = cachedContainer !== null && cachedContainer !== void 0 ? cachedContainer : ownerDocument.createElement('DIV');
|
|
324
330
|
bulkComponentContainer.appendChild(portalContainer);
|
|
325
|
-
var extendedRendererElement =
|
|
331
|
+
var extendedRendererElement = React__default["default"].cloneElement(rElement, _objectSpread2({
|
|
326
332
|
key: "".concat(props.row, "-").concat(props.col)
|
|
327
333
|
}, props));
|
|
328
334
|
return {
|
|
329
|
-
portal:
|
|
335
|
+
portal: ReactDOM__default["default"].createPortal(extendedRendererElement, portalContainer, portalKey),
|
|
330
336
|
portalContainer: portalContainer
|
|
331
337
|
};
|
|
332
338
|
}
|
|
@@ -481,10 +487,10 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
|
|
|
481
487
|
value: function render() {
|
|
482
488
|
var ownerDocument = this.props._getOwnerDocument();
|
|
483
489
|
var editorPortal = createEditorPortal(ownerDocument, this.getLocalEditorElement());
|
|
484
|
-
return
|
|
490
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, editorPortal);
|
|
485
491
|
}
|
|
486
492
|
}]);
|
|
487
|
-
}(
|
|
493
|
+
}(React__default["default"].Component);
|
|
488
494
|
|
|
489
495
|
/**
|
|
490
496
|
* Component class used to manage the renderer component portals.
|
|
@@ -503,12 +509,12 @@ var RenderersPortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
503
509
|
return _createClass(RenderersPortalManager, [{
|
|
504
510
|
key: "render",
|
|
505
511
|
value: function render() {
|
|
506
|
-
return
|
|
512
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, this.state.portals);
|
|
507
513
|
}
|
|
508
514
|
}]);
|
|
509
|
-
}(
|
|
515
|
+
}(React__default["default"].Component);
|
|
510
516
|
|
|
511
|
-
var version="0.0.0-next-
|
|
517
|
+
var version="0.0.0-next-16c41fc-20240410";
|
|
512
518
|
|
|
513
519
|
function createCommonjsModule(fn, module) {
|
|
514
520
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -1918,9 +1924,9 @@ var HotTableClass = /*#__PURE__*/function (_React$Component) {
|
|
|
1918
1924
|
key: "close",
|
|
1919
1925
|
value: function close() {}
|
|
1920
1926
|
}]);
|
|
1921
|
-
}(
|
|
1927
|
+
}(Handsontable__default["default"].editors.BaseEditor);
|
|
1922
1928
|
// Fill with the rest of the BaseEditor methods
|
|
1923
|
-
Object.getOwnPropertyNames(
|
|
1929
|
+
Object.getOwnPropertyNames(Handsontable__default["default"].editors.BaseEditor.prototype).forEach(function (propName) {
|
|
1924
1930
|
if (propName === 'constructor') {
|
|
1925
1931
|
return;
|
|
1926
1932
|
}
|
|
@@ -2070,7 +2076,7 @@ var HotTableClass = /*#__PURE__*/function (_React$Component) {
|
|
|
2070
2076
|
value: function componentDidMount() {
|
|
2071
2077
|
var _this3 = this;
|
|
2072
2078
|
var newGlobalSettings = this.createNewGlobalSettings();
|
|
2073
|
-
this.hotInstance = new
|
|
2079
|
+
this.hotInstance = new Handsontable__default["default"].Core(this.hotElementRef, newGlobalSettings);
|
|
2074
2080
|
this.hotInstance.addHook('beforeViewRender', function () {
|
|
2075
2081
|
return _this3.handsontableBeforeViewRender();
|
|
2076
2082
|
});
|
|
@@ -2113,12 +2119,12 @@ var HotTableClass = /*#__PURE__*/function (_React$Component) {
|
|
|
2113
2119
|
var isHotColumn = function isHotColumn(childNode) {
|
|
2114
2120
|
return childNode.type === HotColumn;
|
|
2115
2121
|
};
|
|
2116
|
-
var children =
|
|
2122
|
+
var children = React__default["default"].Children.toArray(this.props.children);
|
|
2117
2123
|
// clone the HotColumn nodes and extend them with the callbacks
|
|
2118
2124
|
var hotColumnClones = children.filter(function (childNode) {
|
|
2119
2125
|
return isHotColumn(childNode);
|
|
2120
2126
|
}).map(function (childNode, columnIndex) {
|
|
2121
|
-
return
|
|
2127
|
+
return React__default["default"].cloneElement(childNode, {
|
|
2122
2128
|
_componentRendererColumns: _this4.componentRendererColumns,
|
|
2123
2129
|
_emitColumnSettings: _this4.setHotColumnSettings.bind(_this4),
|
|
2124
2130
|
_columnIndex: columnIndex,
|
|
@@ -2132,9 +2138,9 @@ var HotTableClass = /*#__PURE__*/function (_React$Component) {
|
|
|
2132
2138
|
});
|
|
2133
2139
|
var containerProps = getContainerAttributesProps(this.props);
|
|
2134
2140
|
var editorPortal = createEditorPortal(this.getOwnerDocument(), this.getGlobalEditorElement());
|
|
2135
|
-
return
|
|
2141
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("div", Object.assign({
|
|
2136
2142
|
ref: this.setHotElementRef.bind(this)
|
|
2137
|
-
}, containerProps), hotColumnClones),
|
|
2143
|
+
}, containerProps), hotColumnClones), React__default["default"].createElement(RenderersPortalManager, {
|
|
2138
2144
|
ref: this.setRenderersPortalManagerRef.bind(this)
|
|
2139
2145
|
}), editorPortal);
|
|
2140
2146
|
}
|
|
@@ -2144,7 +2150,7 @@ var HotTableClass = /*#__PURE__*/function (_React$Component) {
|
|
|
2144
2150
|
return version;
|
|
2145
2151
|
}
|
|
2146
2152
|
}]);
|
|
2147
|
-
}(
|
|
2153
|
+
}(React__default["default"].Component);
|
|
2148
2154
|
/**
|
|
2149
2155
|
* Prop types to be checked at runtime.
|
|
2150
2156
|
*/
|
|
@@ -2156,13 +2162,13 @@ HotTableClass.propTypes = {
|
|
|
2156
2162
|
|
|
2157
2163
|
var _excluded = ["children"];
|
|
2158
2164
|
// Use global React variable for `forwardRef` access (React 16 support)
|
|
2159
|
-
var HotTable =
|
|
2165
|
+
var HotTable = React__default["default"].forwardRef(function (_ref, ref) {
|
|
2160
2166
|
var _props$id;
|
|
2161
2167
|
var children = _ref.children,
|
|
2162
2168
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
2163
|
-
var generatedId = typeof
|
|
2169
|
+
var generatedId = typeof React__default["default"].useId === 'function' ? React__default["default"].useId() : undefined;
|
|
2164
2170
|
var componentId = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generatedId;
|
|
2165
|
-
return
|
|
2171
|
+
return React__default["default"].createElement(HotTableClass, Object.assign({
|
|
2166
2172
|
id: componentId
|
|
2167
2173
|
}, props, {
|
|
2168
2174
|
ref: ref
|
|
@@ -2212,7 +2218,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2212
2218
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2213
2219
|
args[_key] = arguments[_key];
|
|
2214
2220
|
}
|
|
2215
|
-
(_Handsontable$editors =
|
|
2221
|
+
(_Handsontable$editors = Handsontable__default["default"].editors.BaseEditor.prototype._fireCallbacks).call.apply(_Handsontable$editors, [this.hotCustomEditorInstance].concat(args));
|
|
2216
2222
|
}
|
|
2217
2223
|
}, {
|
|
2218
2224
|
key: "beginEditing",
|
|
@@ -2221,7 +2227,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2221
2227
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2222
2228
|
args[_key2] = arguments[_key2];
|
|
2223
2229
|
}
|
|
2224
|
-
return (_Handsontable$editors2 =
|
|
2230
|
+
return (_Handsontable$editors2 = Handsontable__default["default"].editors.BaseEditor.prototype.beginEditing).call.apply(_Handsontable$editors2, [this.hotCustomEditorInstance].concat(args));
|
|
2225
2231
|
}
|
|
2226
2232
|
}, {
|
|
2227
2233
|
key: "cancelChanges",
|
|
@@ -2230,7 +2236,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2230
2236
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
2231
2237
|
args[_key3] = arguments[_key3];
|
|
2232
2238
|
}
|
|
2233
|
-
return (_Handsontable$editors3 =
|
|
2239
|
+
return (_Handsontable$editors3 = Handsontable__default["default"].editors.BaseEditor.prototype.cancelChanges).call.apply(_Handsontable$editors3, [this.hotCustomEditorInstance].concat(args));
|
|
2234
2240
|
}
|
|
2235
2241
|
}, {
|
|
2236
2242
|
key: "checkEditorSection",
|
|
@@ -2239,7 +2245,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2239
2245
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
2240
2246
|
args[_key4] = arguments[_key4];
|
|
2241
2247
|
}
|
|
2242
|
-
return (_Handsontable$editors4 =
|
|
2248
|
+
return (_Handsontable$editors4 = Handsontable__default["default"].editors.BaseEditor.prototype.checkEditorSection).call.apply(_Handsontable$editors4, [this.hotCustomEditorInstance].concat(args));
|
|
2243
2249
|
}
|
|
2244
2250
|
}, {
|
|
2245
2251
|
key: "close",
|
|
@@ -2248,7 +2254,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2248
2254
|
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
2249
2255
|
args[_key5] = arguments[_key5];
|
|
2250
2256
|
}
|
|
2251
|
-
return (_Handsontable$editors5 =
|
|
2257
|
+
return (_Handsontable$editors5 = Handsontable__default["default"].editors.BaseEditor.prototype.close).call.apply(_Handsontable$editors5, [this.hotCustomEditorInstance].concat(args));
|
|
2252
2258
|
}
|
|
2253
2259
|
}, {
|
|
2254
2260
|
key: "discardEditor",
|
|
@@ -2257,7 +2263,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2257
2263
|
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
2258
2264
|
args[_key6] = arguments[_key6];
|
|
2259
2265
|
}
|
|
2260
|
-
return (_Handsontable$editors6 =
|
|
2266
|
+
return (_Handsontable$editors6 = Handsontable__default["default"].editors.BaseEditor.prototype.discardEditor).call.apply(_Handsontable$editors6, [this.hotCustomEditorInstance].concat(args));
|
|
2261
2267
|
}
|
|
2262
2268
|
}, {
|
|
2263
2269
|
key: "enableFullEditMode",
|
|
@@ -2266,7 +2272,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2266
2272
|
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
2267
2273
|
args[_key7] = arguments[_key7];
|
|
2268
2274
|
}
|
|
2269
|
-
return (_Handsontable$editors7 =
|
|
2275
|
+
return (_Handsontable$editors7 = Handsontable__default["default"].editors.BaseEditor.prototype.enableFullEditMode).call.apply(_Handsontable$editors7, [this.hotCustomEditorInstance].concat(args));
|
|
2270
2276
|
}
|
|
2271
2277
|
}, {
|
|
2272
2278
|
key: "extend",
|
|
@@ -2275,7 +2281,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2275
2281
|
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
2276
2282
|
args[_key8] = arguments[_key8];
|
|
2277
2283
|
}
|
|
2278
|
-
return (_Handsontable$editors8 =
|
|
2284
|
+
return (_Handsontable$editors8 = Handsontable__default["default"].editors.BaseEditor.prototype.extend).call.apply(_Handsontable$editors8, [this.hotCustomEditorInstance].concat(args));
|
|
2279
2285
|
}
|
|
2280
2286
|
}, {
|
|
2281
2287
|
key: "finishEditing",
|
|
@@ -2284,7 +2290,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2284
2290
|
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
2285
2291
|
args[_key9] = arguments[_key9];
|
|
2286
2292
|
}
|
|
2287
|
-
return (_Handsontable$editors9 =
|
|
2293
|
+
return (_Handsontable$editors9 = Handsontable__default["default"].editors.BaseEditor.prototype.finishEditing).call.apply(_Handsontable$editors9, [this.hotCustomEditorInstance].concat(args));
|
|
2288
2294
|
}
|
|
2289
2295
|
}, {
|
|
2290
2296
|
key: "focus",
|
|
@@ -2293,7 +2299,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2293
2299
|
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|
2294
2300
|
args[_key10] = arguments[_key10];
|
|
2295
2301
|
}
|
|
2296
|
-
return (_Handsontable$editors10 =
|
|
2302
|
+
return (_Handsontable$editors10 = Handsontable__default["default"].editors.BaseEditor.prototype.focus).call.apply(_Handsontable$editors10, [this.hotCustomEditorInstance].concat(args));
|
|
2297
2303
|
}
|
|
2298
2304
|
}, {
|
|
2299
2305
|
key: "getValue",
|
|
@@ -2302,7 +2308,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2302
2308
|
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
|
2303
2309
|
args[_key11] = arguments[_key11];
|
|
2304
2310
|
}
|
|
2305
|
-
return (_Handsontable$editors11 =
|
|
2311
|
+
return (_Handsontable$editors11 = Handsontable__default["default"].editors.BaseEditor.prototype.getValue).call.apply(_Handsontable$editors11, [this.hotCustomEditorInstance].concat(args));
|
|
2306
2312
|
}
|
|
2307
2313
|
}, {
|
|
2308
2314
|
key: "init",
|
|
@@ -2311,7 +2317,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2311
2317
|
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
|
|
2312
2318
|
args[_key12] = arguments[_key12];
|
|
2313
2319
|
}
|
|
2314
|
-
return (_Handsontable$editors12 =
|
|
2320
|
+
return (_Handsontable$editors12 = Handsontable__default["default"].editors.BaseEditor.prototype.init).call.apply(_Handsontable$editors12, [this.hotCustomEditorInstance].concat(args));
|
|
2315
2321
|
}
|
|
2316
2322
|
}, {
|
|
2317
2323
|
key: "isInFullEditMode",
|
|
@@ -2320,7 +2326,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2320
2326
|
for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
|
|
2321
2327
|
args[_key13] = arguments[_key13];
|
|
2322
2328
|
}
|
|
2323
|
-
return (_Handsontable$editors13 =
|
|
2329
|
+
return (_Handsontable$editors13 = Handsontable__default["default"].editors.BaseEditor.prototype.isInFullEditMode).call.apply(_Handsontable$editors13, [this.hotCustomEditorInstance].concat(args));
|
|
2324
2330
|
}
|
|
2325
2331
|
}, {
|
|
2326
2332
|
key: "isOpened",
|
|
@@ -2329,7 +2335,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2329
2335
|
for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
|
|
2330
2336
|
args[_key14] = arguments[_key14];
|
|
2331
2337
|
}
|
|
2332
|
-
return (_Handsontable$editors14 =
|
|
2338
|
+
return (_Handsontable$editors14 = Handsontable__default["default"].editors.BaseEditor.prototype.isOpened).call.apply(_Handsontable$editors14, [this.hotCustomEditorInstance].concat(args));
|
|
2333
2339
|
}
|
|
2334
2340
|
}, {
|
|
2335
2341
|
key: "isWaiting",
|
|
@@ -2338,7 +2344,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2338
2344
|
for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
|
|
2339
2345
|
args[_key15] = arguments[_key15];
|
|
2340
2346
|
}
|
|
2341
|
-
return (_Handsontable$editors15 =
|
|
2347
|
+
return (_Handsontable$editors15 = Handsontable__default["default"].editors.BaseEditor.prototype.isWaiting).call.apply(_Handsontable$editors15, [this.hotCustomEditorInstance].concat(args));
|
|
2342
2348
|
}
|
|
2343
2349
|
}, {
|
|
2344
2350
|
key: "open",
|
|
@@ -2347,7 +2353,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2347
2353
|
for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
|
|
2348
2354
|
args[_key16] = arguments[_key16];
|
|
2349
2355
|
}
|
|
2350
|
-
return (_Handsontable$editors16 =
|
|
2356
|
+
return (_Handsontable$editors16 = Handsontable__default["default"].editors.BaseEditor.prototype.open).call.apply(_Handsontable$editors16, [this.hotCustomEditorInstance].concat(args));
|
|
2351
2357
|
}
|
|
2352
2358
|
}, {
|
|
2353
2359
|
key: "prepare",
|
|
@@ -2359,7 +2365,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2359
2365
|
this.TD = TD;
|
|
2360
2366
|
this.originalValue = originalValue;
|
|
2361
2367
|
this.cellProperties = cellProperties;
|
|
2362
|
-
return
|
|
2368
|
+
return Handsontable__default["default"].editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);
|
|
2363
2369
|
}
|
|
2364
2370
|
}, {
|
|
2365
2371
|
key: "saveValue",
|
|
@@ -2368,7 +2374,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2368
2374
|
for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
|
|
2369
2375
|
args[_key17] = arguments[_key17];
|
|
2370
2376
|
}
|
|
2371
|
-
return (_Handsontable$editors17 =
|
|
2377
|
+
return (_Handsontable$editors17 = Handsontable__default["default"].editors.BaseEditor.prototype.saveValue).call.apply(_Handsontable$editors17, [this.hotCustomEditorInstance].concat(args));
|
|
2372
2378
|
}
|
|
2373
2379
|
}, {
|
|
2374
2380
|
key: "setValue",
|
|
@@ -2377,7 +2383,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2377
2383
|
for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
|
|
2378
2384
|
args[_key18] = arguments[_key18];
|
|
2379
2385
|
}
|
|
2380
|
-
return (_Handsontable$editors18 =
|
|
2386
|
+
return (_Handsontable$editors18 = Handsontable__default["default"].editors.BaseEditor.prototype.setValue).call.apply(_Handsontable$editors18, [this.hotCustomEditorInstance].concat(args));
|
|
2381
2387
|
}
|
|
2382
2388
|
}, {
|
|
2383
2389
|
key: "addHook",
|
|
@@ -2386,7 +2392,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2386
2392
|
for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
|
|
2387
2393
|
args[_key19] = arguments[_key19];
|
|
2388
2394
|
}
|
|
2389
|
-
return (_Handsontable$editors19 =
|
|
2395
|
+
return (_Handsontable$editors19 = Handsontable__default["default"].editors.BaseEditor.prototype.addHook).call.apply(_Handsontable$editors19, [this.hotCustomEditorInstance].concat(args));
|
|
2390
2396
|
}
|
|
2391
2397
|
}, {
|
|
2392
2398
|
key: "removeHooksByKey",
|
|
@@ -2395,7 +2401,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2395
2401
|
for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
|
|
2396
2402
|
args[_key20] = arguments[_key20];
|
|
2397
2403
|
}
|
|
2398
|
-
return (_Handsontable$editors20 =
|
|
2404
|
+
return (_Handsontable$editors20 = Handsontable__default["default"].editors.BaseEditor.prototype.removeHooksByKey).call.apply(_Handsontable$editors20, [this.hotCustomEditorInstance].concat(args));
|
|
2399
2405
|
}
|
|
2400
2406
|
}, {
|
|
2401
2407
|
key: "clearHooks",
|
|
@@ -2404,7 +2410,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2404
2410
|
for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
|
|
2405
2411
|
args[_key21] = arguments[_key21];
|
|
2406
2412
|
}
|
|
2407
|
-
return (_Handsontable$editors21 =
|
|
2413
|
+
return (_Handsontable$editors21 = Handsontable__default["default"].editors.BaseEditor.prototype.clearHooks).call.apply(_Handsontable$editors21, [this.hotCustomEditorInstance].concat(args));
|
|
2408
2414
|
}
|
|
2409
2415
|
}, {
|
|
2410
2416
|
key: "getEditedCell",
|
|
@@ -2413,7 +2419,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2413
2419
|
for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
|
|
2414
2420
|
args[_key22] = arguments[_key22];
|
|
2415
2421
|
}
|
|
2416
|
-
return (_Handsontable$editors22 =
|
|
2422
|
+
return (_Handsontable$editors22 = Handsontable__default["default"].editors.BaseEditor.prototype.getEditedCell).call.apply(_Handsontable$editors22, [this.hotCustomEditorInstance].concat(args));
|
|
2417
2423
|
}
|
|
2418
2424
|
}, {
|
|
2419
2425
|
key: "getEditedCellRect",
|
|
@@ -2422,7 +2428,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2422
2428
|
for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
|
|
2423
2429
|
args[_key23] = arguments[_key23];
|
|
2424
2430
|
}
|
|
2425
|
-
return (_Handsontable$editors23 =
|
|
2431
|
+
return (_Handsontable$editors23 = Handsontable__default["default"].editors.BaseEditor.prototype.getEditedCellRect).call.apply(_Handsontable$editors23, [this.hotCustomEditorInstance].concat(args));
|
|
2426
2432
|
}
|
|
2427
2433
|
}, {
|
|
2428
2434
|
key: "getEditedCellsZIndex",
|
|
@@ -2431,13 +2437,13 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
2431
2437
|
for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
|
|
2432
2438
|
args[_key24] = arguments[_key24];
|
|
2433
2439
|
}
|
|
2434
|
-
return (_Handsontable$editors24 =
|
|
2440
|
+
return (_Handsontable$editors24 = Handsontable__default["default"].editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(_Handsontable$editors24, [this.hotCustomEditorInstance].concat(args));
|
|
2435
2441
|
}
|
|
2436
2442
|
}]);
|
|
2437
|
-
}(
|
|
2443
|
+
}(React__default["default"].Component);
|
|
2438
2444
|
|
|
2439
2445
|
exports.BaseEditorComponent = BaseEditorComponent;
|
|
2440
2446
|
exports.HotColumn = HotColumn;
|
|
2441
2447
|
exports.HotTable = HotTable;
|
|
2442
2448
|
exports.HotTableClass = HotTableClass;
|
|
2443
|
-
exports
|
|
2449
|
+
exports["default"] = HotTable;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 0.0.0-next-
|
|
28
|
+
* Version: 0.0.0-next-16c41fc-20240410 (built at Wed Apr 10 2024 11:55:37 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
30
|
(function (global, factory) {
|
|
31
31
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('handsontable/base'), require('handsontable/renderers/registry'), require('handsontable/editors/registry')) :
|
|
@@ -533,7 +533,7 @@ var RenderersPortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
533
533
|
}]);
|
|
534
534
|
}(React.Component);
|
|
535
535
|
|
|
536
|
-
var version="0.0.0-next-
|
|
536
|
+
var version="0.0.0-next-16c41fc-20240410";
|
|
537
537
|
|
|
538
538
|
function createCommonjsModule(fn, module) {
|
|
539
539
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 0.0.0-next-
|
|
28
|
+
* Version: 0.0.0-next-16c41fc-20240410 (built at Wed Apr 10 2024 11:55:42 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,(function(e,t,n,r,o,i){"use strict";function a(e,t,n){return t=m(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;i.length>r;r++)0>t.indexOf(n=i[r])&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;i.length>r;r++)0>t.indexOf(n=i[r])&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}var C=null,k="global";function S(e,n){var r=t.Children.toArray(e),o=t.Children.count(e),i=null;return 0!==o&&(i=1===o&&r[0].props[n]?r[0]:r.find((function(e){return void 0!==e.props[n]}))),i||null}function w(e){return e?e.type.WrappedComponent?e.type.WrappedComponent:e.type:null}function O(e,r){if(void 0===e||null===r)return null;var o=P(r.props,!1);return o.className="".concat("hot-wrapper-editor-container"," ").concat(o.className),n.createPortal(t.createElement("div",Object.assign({},o),r),e.body)}function I(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k,o=S(e,"hot-editor"),i=w(o);return o?t.cloneElement(o,{emitEditorInstance:function(e,t){n.get(i)||n.set(i,new Map),n.get(i).set(null!=t?t:k,e)},editorColumnScope:r,isEditor:!0}):null}function _(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;o||(o=document),C||(C=o.createDocumentFragment());var s=null!=a?a:o.createElement("DIV");C.appendChild(s);var c=t.cloneElement(e,function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({key:"".concat(r.row,"-").concat(r.col)},r));return{portal:n.createPortal(c,s,i),portalContainer:s}}function P(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}var R=function(){return f((function e(){p(this,e)}),null,[{key:"getSettings",value:function(e){var t={};if(e.settings){var n=e.settings;for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}for(var o in e)"settings"!==o&&"children"!==o&&e.hasOwnProperty(o)&&(t[o]=e[o]);return t}}])}(),j=function(e){function n(){return p(this,n),a(this,n,arguments)}return y(n,e),f(n,[{key:"getSettingsProps",value:function(){var e=this;return this.internalProps=["_componentRendererColumns","_emitColumnSettings","_columnIndex","_getChildElementByType","_getRendererWrapper","_getEditorClass","_getEditorCache","_getOwnerDocument","hot-renderer","hot-editor","children"],Object.keys(this.props).filter((function(t){return!e.internalProps.includes(t)})).reduce((function(t,n){return t[n]=e.props[n],t}),{})}},{key:"getLocalEditorElement",value:function(){return I(this.props.children,this.props._getEditorCache(),this.props._columnIndex)}},{key:"createColumnSettings",value:function(){var e=this.props._getChildElementByType(this.props.children,"hot-renderer"),t=this.getLocalEditorElement();this.columnSettings=R.getSettings(this.getSettingsProps()),null!==e&&(this.columnSettings.renderer=this.props._getRendererWrapper(e),this.props._componentRendererColumns.set(this.props._columnIndex,!0)),null!==t&&(this.columnSettings.editor=this.props._getEditorClass(t,this.props._columnIndex))}},{key:"emitColumnSettings",value:function(){this.props._emitColumnSettings(this.columnSettings,this.props._columnIndex)}},{key:"componentDidMount",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"componentDidUpdate",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"render",value:function(){var e=O(this.props._getOwnerDocument(),this.getLocalEditorElement());return t.createElement(t.Fragment,null,e)}}])}(t.Component),A=function(e){function n(){var e;return p(this,n),(e=a(this,n,arguments)).state={portals:[]},e}return y(n,e),f(n,[{key:"render",value:function(){return t.createElement(t.Fragment,null,this.state.portals)}}])}(t.Component);function B(e,t){return e(t={exports:{}},t.exports),t.exports}var M="function"==typeof Symbol&&Symbol.for,T=M?Symbol.for("react.element"):60103,x=M?Symbol.for("react.portal"):60106,D=M?Symbol.for("react.fragment"):60107,H=M?Symbol.for("react.strict_mode"):60108,$=M?Symbol.for("react.profiler"):60114,V=M?Symbol.for("react.provider"):60109,W=M?Symbol.for("react.context"):60110,F=M?Symbol.for("react.async_mode"):60111,z=M?Symbol.for("react.concurrent_mode"):60111,N=M?Symbol.for("react.forward_ref"):60112,L=M?Symbol.for("react.suspense"):60113,q=M?Symbol.for("react.suspense_list"):60120,G=M?Symbol.for("react.memo"):60115,U=M?Symbol.for("react.lazy"):60116,K=M?Symbol.for("react.block"):60121,Y=M?Symbol.for("react.fundamental"):60117,Z=M?Symbol.for("react.responder"):60118,J=M?Symbol.for("react.scope"):60119;function Q(e){if("object"===u(e)&&null!==e){var t=e.$$typeof;switch(t){case T:switch(e=e.type){case F:case z:case D:case $:case H:case L:return e;default:switch(e=e&&e.$$typeof){case W:case N:case U:case G:case V:return e;default:return t}}case x:return t}}}function X(e){return Q(e)===z}var ee={AsyncMode:F,ConcurrentMode:z,ContextConsumer:W,ContextProvider:V,Element:T,ForwardRef:N,Fragment:D,Lazy:U,Memo:G,Portal:x,Profiler:$,StrictMode:H,Suspense:L,isAsyncMode:function(e){return X(e)||Q(e)===F},isConcurrentMode:X,isContextConsumer:function(e){return Q(e)===W},isContextProvider:function(e){return Q(e)===V},isElement:function(e){return"object"===u(e)&&null!==e&&e.$$typeof===T},isForwardRef:function(e){return Q(e)===N},isFragment:function(e){return Q(e)===D},isLazy:function(e){return Q(e)===U},isMemo:function(e){return Q(e)===G},isPortal:function(e){return Q(e)===x},isProfiler:function(e){return Q(e)===$},isStrictMode:function(e){return Q(e)===H},isSuspense:function(e){return Q(e)===L},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===D||e===z||e===$||e===H||e===L||e===q||"object"===u(e)&&null!==e&&(e.$$typeof===U||e.$$typeof===G||e.$$typeof===V||e.$$typeof===W||e.$$typeof===N||e.$$typeof===Y||e.$$typeof===Z||e.$$typeof===J||e.$$typeof===K)},typeOf:Q};B((function(e,t){}));B((function(e){e.exports=ee}));!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;10>n;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}();function te(){}function ne(){}Function.call.bind(Object.prototype.hasOwnProperty),ne.resetWarningCache=te;var re=B((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ne,resetWarningCache:te};return n.PropTypes=n,n}()})),oe=function(e){function n(){var e;return p(this,n),(e=a(this,n,arguments)).id=null,e.__hotInstance=null,e.hotElementRef=null,e.columnSettings=[],e.renderersPortalManager=null,e.portalCache=new Map,e.portalContainerCache=new Map,e.renderedCellCache=new Map,e.editorCache=new Map,e.componentRendererColumns=new Map,e}return y(n,e),f(n,[{key:"hotInstance",get:function(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set:function(e){this.__hotInstance=e}},{key:"getPortalContainerCache",value:function(){return this.portalContainerCache}},{key:"getRenderedCellCache",value:function(){return this.renderedCellCache}},{key:"getEditorCache",value:function(){return this.editorCache}},{key:"clearCache",value:function(){this.getRenderedCellCache().clear(),this.componentRendererColumns.clear()}},{key:"getOwnerDocument",value:function(){return"undefined"!=typeof window?this.hotElementRef?this.hotElementRef.ownerDocument:document:null}},{key:"setHotElementRef",value:function(e){this.hotElementRef=e}},{key:"getRendererWrapper",value:function(e){var t=this;return function(n,r,o,i,a,s,l){var c=t.getRenderedCellCache(),u=t.getPortalContainerCache(),p="".concat(o,"-").concat(i),d=n.guid,f="".concat(d,"-").concat(p),h="".concat(p,"-").concat(d);if(c.has(p)&&(r.innerHTML=c.get(p).innerHTML),r&&!r.getAttribute("ghost-table")){for(var y=t.portalCache.get(h),m=u.get(f);r.firstChild;)r.removeChild(r.firstChild);if(y&&m)r.appendChild(m);else{var g=_(e,{TD:r,row:o,col:i,prop:a,value:s,cellProperties:l,isRenderer:!0},r.ownerDocument,h,m),v=g.portal,b=g.portalContainer;u.set(f,b),r.appendChild(b),t.portalCache.set(h,v)}}return c.set(p,r),r}}},{key:"getEditorClass",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k,r=w(e),o=null===(t=this.getEditorCache().get(r))||void 0===t?void 0:t.get(n);return this.makeEditorClass(o)}},{key:"makeEditorClass",value:function(e){var t=function(t){function n(t){var r;return p(this,n),r=a(this,n,[t]),e.hotCustomEditorInstance=r,r.editorComponent=e,r}return y(n,t),f(n,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(r.editors.BaseEditor);return Object.getOwnPropertyNames(r.editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(t.prototype[n]=function(){for(var t,r=arguments.length,o=Array(r),i=0;r>i;i++)o[i]=arguments[i];return(t=e[n]).call.apply(t,[e].concat(o))})})),t}},{key:"getGlobalRendererElement",value:function(){return S(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){return I(this.props.children,this.getEditorCache())}},{key:"createNewGlobalSettings",value:function(){var e,t,n=R.getSettings(this.props),r=this.getGlobalRendererElement(),a=this.getGlobalEditorElement();(n.columns=this.columnSettings.length?this.columnSettings:n.columns,a)?n.editor=this.getEditorClass(a,k):n.editor=this.props.editor||null!==(e=this.props.settings)&&void 0!==e&&e.editor?this.props.editor||this.props.settings.editor:i.getEditor("text");r?(n.renderer=this.getRendererWrapper(r),this.componentRendererColumns.set("global",!0)):n.renderer=this.props.renderer||null!==(t=this.props.settings)&&void 0!==t&&t.renderer?this.props.renderer||this.props.settings.renderer:o.getRenderer("text");return n}},{key:"displayAutoSizeWarning",value:function(e){var t,n;this.hotInstance&&(null!==(t=this.hotInstance.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=this.hotInstance.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&this.componentRendererColumns.size>0&&function(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")}},{key:"setHotColumnSettings",value:function(e,t){this.columnSettings[t]=e}},{key:"handsontableBeforeViewRender",value:function(){this.portalCache.clear(),this.getRenderedCellCache().clear()}},{key:"handsontableAfterViewRender",value:function(){this.renderersPortalManager.setState({portals:b(this.portalCache.values())})}},{key:"updateHot",value:function(e){this.hotInstance&&this.hotInstance.updateSettings(e,!1)}},{key:"setRenderersPortalManagerRef",value:function(e){this.renderersPortalManager=e}},{key:"componentDidMount",value:function(){var e=this,t=this.createNewGlobalSettings();this.hotInstance=new r.Core(this.hotElementRef,t),this.hotInstance.addHook("beforeViewRender",(function(){return e.handsontableBeforeViewRender()})),this.hotInstance.addHook("afterViewRender",(function(){return e.handsontableAfterViewRender()})),this.hotInstance.init(),this.displayAutoSizeWarning(t)}},{key:"componentDidUpdate",value:function(){this.clearCache();var e=this.createNewGlobalSettings();this.updateHot(e),this.displayAutoSizeWarning(e)}},{key:"componentWillUnmount",value:function(){this.clearCache(),this.hotInstance&&this.hotInstance.destroy()}},{key:"render",value:function(){var e=this,n=t.Children.toArray(this.props.children).filter((function(e){return function(e){return e.type===j}(e)})).map((function(n,r){return t.cloneElement(n,{_componentRendererColumns:e.componentRendererColumns,_emitColumnSettings:e.setHotColumnSettings.bind(e),_columnIndex:r,_getChildElementByType:S.bind(e),_getRendererWrapper:e.getRendererWrapper.bind(e),_getEditorClass:e.getEditorClass.bind(e),_getOwnerDocument:e.getOwnerDocument.bind(e),_getEditorCache:e.getEditorCache.bind(e),children:n.props.children})})),r=P(this.props),o=O(this.getOwnerDocument(),this.getGlobalEditorElement());return t.createElement(t.Fragment,null,t.createElement("div",Object.assign({ref:this.setHotElementRef.bind(this)},r),n),t.createElement(A,{ref:this.setRenderersPortalManagerRef.bind(this)}),o)}}],[{key:"version",get:function(){return"0.0.0-next-eaa3153-20240410"}}])}(t.Component);oe.propTypes={style:re.object,id:re.string,className:re.string};var ie=["children"],ae=t.forwardRef((function(e,n){var r,o=e.children,i=v(e,ie),a="function"==typeof t.useId?t.useId():void 0,s=null!==(r=i.id)&&void 0!==r?r:a;return t.createElement(oe,Object.assign({id:s},i,{ref:n}),o)}));ae.version=oe.version;var se=function(e){function t(){var e;return p(this,t),(e=a(this,t,arguments)).name="BaseEditorComponent",e.instance=null,e.row=null,e.col=null,e.prop=null,e.TD=null,e.originalValue=null,e.cellProperties=null,e.state=null,e.hotInstance=null,e.hotCustomEditorInstance=null,e.hot=null,e}return y(t,e),f(t,[{key:"componentDidMount",value:function(){this.props.emitEditorInstance&&this.props.emitEditorInstance(this,this.props.editorColumnScope)}},{key:"componentDidUpdate",value:function(){this.props.emitEditorInstance&&this.props.emitEditorInstance(this,this.props.editorColumnScope)}},{key:"_fireCallbacks",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];(e=r.editors.BaseEditor.prototype._fireCallbacks).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.beginEditing).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.cancelChanges).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.checkEditorSection).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.close).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.discardEditor).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.enableFullEditMode).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.extend).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.finishEditing).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.focus).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getValue).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.init).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.isInFullEditMode).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.isOpened).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.isWaiting).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.open).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(e,t,n,o,i,a){return this.hotInstance=a.instance,this.row=e,this.col=t,this.prop=n,this.TD=o,this.originalValue=i,this.cellProperties=a,r.editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance,e,t,n,o,i,a)}},{key:"saveValue",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.saveValue).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.setValue).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.addHook).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.removeHooksByKey).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.clearHooks).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getEditedCell).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getEditedCellRect).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(e,[this.hotCustomEditorInstance].concat(n))}}])}(t.Component);e.BaseEditorComponent=se,e.HotColumn=j,e.HotTable=ae,e.HotTableClass=oe,e.default=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
30
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,(function(e,t,n,r,o,i){"use strict";function a(e,t,n){return t=m(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;i.length>r;r++)0>t.indexOf(n=i[r])&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;i.length>r;r++)0>t.indexOf(n=i[r])&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}var C=null,k="global";function S(e,n){var r=t.Children.toArray(e),o=t.Children.count(e),i=null;return 0!==o&&(i=1===o&&r[0].props[n]?r[0]:r.find((function(e){return void 0!==e.props[n]}))),i||null}function w(e){return e?e.type.WrappedComponent?e.type.WrappedComponent:e.type:null}function O(e,r){if(void 0===e||null===r)return null;var o=P(r.props,!1);return o.className="".concat("hot-wrapper-editor-container"," ").concat(o.className),n.createPortal(t.createElement("div",Object.assign({},o),r),e.body)}function I(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k,o=S(e,"hot-editor"),i=w(o);return o?t.cloneElement(o,{emitEditorInstance:function(e,t){n.get(i)||n.set(i,new Map),n.get(i).set(null!=t?t:k,e)},editorColumnScope:r,isEditor:!0}):null}function _(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;o||(o=document),C||(C=o.createDocumentFragment());var s=null!=a?a:o.createElement("DIV");C.appendChild(s);var c=t.cloneElement(e,function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({key:"".concat(r.row,"-").concat(r.col)},r));return{portal:n.createPortal(c,s,i),portalContainer:s}}function P(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}var R=function(){return f((function e(){p(this,e)}),null,[{key:"getSettings",value:function(e){var t={};if(e.settings){var n=e.settings;for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}for(var o in e)"settings"!==o&&"children"!==o&&e.hasOwnProperty(o)&&(t[o]=e[o]);return t}}])}(),j=function(e){function n(){return p(this,n),a(this,n,arguments)}return y(n,e),f(n,[{key:"getSettingsProps",value:function(){var e=this;return this.internalProps=["_componentRendererColumns","_emitColumnSettings","_columnIndex","_getChildElementByType","_getRendererWrapper","_getEditorClass","_getEditorCache","_getOwnerDocument","hot-renderer","hot-editor","children"],Object.keys(this.props).filter((function(t){return!e.internalProps.includes(t)})).reduce((function(t,n){return t[n]=e.props[n],t}),{})}},{key:"getLocalEditorElement",value:function(){return I(this.props.children,this.props._getEditorCache(),this.props._columnIndex)}},{key:"createColumnSettings",value:function(){var e=this.props._getChildElementByType(this.props.children,"hot-renderer"),t=this.getLocalEditorElement();this.columnSettings=R.getSettings(this.getSettingsProps()),null!==e&&(this.columnSettings.renderer=this.props._getRendererWrapper(e),this.props._componentRendererColumns.set(this.props._columnIndex,!0)),null!==t&&(this.columnSettings.editor=this.props._getEditorClass(t,this.props._columnIndex))}},{key:"emitColumnSettings",value:function(){this.props._emitColumnSettings(this.columnSettings,this.props._columnIndex)}},{key:"componentDidMount",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"componentDidUpdate",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"render",value:function(){var e=O(this.props._getOwnerDocument(),this.getLocalEditorElement());return t.createElement(t.Fragment,null,e)}}])}(t.Component),A=function(e){function n(){var e;return p(this,n),(e=a(this,n,arguments)).state={portals:[]},e}return y(n,e),f(n,[{key:"render",value:function(){return t.createElement(t.Fragment,null,this.state.portals)}}])}(t.Component);function B(e,t){return e(t={exports:{}},t.exports),t.exports}var M="function"==typeof Symbol&&Symbol.for,T=M?Symbol.for("react.element"):60103,x=M?Symbol.for("react.portal"):60106,D=M?Symbol.for("react.fragment"):60107,H=M?Symbol.for("react.strict_mode"):60108,$=M?Symbol.for("react.profiler"):60114,V=M?Symbol.for("react.provider"):60109,W=M?Symbol.for("react.context"):60110,F=M?Symbol.for("react.async_mode"):60111,z=M?Symbol.for("react.concurrent_mode"):60111,N=M?Symbol.for("react.forward_ref"):60112,L=M?Symbol.for("react.suspense"):60113,q=M?Symbol.for("react.suspense_list"):60120,G=M?Symbol.for("react.memo"):60115,U=M?Symbol.for("react.lazy"):60116,K=M?Symbol.for("react.block"):60121,Y=M?Symbol.for("react.fundamental"):60117,Z=M?Symbol.for("react.responder"):60118,J=M?Symbol.for("react.scope"):60119;function Q(e){if("object"===u(e)&&null!==e){var t=e.$$typeof;switch(t){case T:switch(e=e.type){case F:case z:case D:case $:case H:case L:return e;default:switch(e=e&&e.$$typeof){case W:case N:case U:case G:case V:return e;default:return t}}case x:return t}}}function X(e){return Q(e)===z}var ee={AsyncMode:F,ConcurrentMode:z,ContextConsumer:W,ContextProvider:V,Element:T,ForwardRef:N,Fragment:D,Lazy:U,Memo:G,Portal:x,Profiler:$,StrictMode:H,Suspense:L,isAsyncMode:function(e){return X(e)||Q(e)===F},isConcurrentMode:X,isContextConsumer:function(e){return Q(e)===W},isContextProvider:function(e){return Q(e)===V},isElement:function(e){return"object"===u(e)&&null!==e&&e.$$typeof===T},isForwardRef:function(e){return Q(e)===N},isFragment:function(e){return Q(e)===D},isLazy:function(e){return Q(e)===U},isMemo:function(e){return Q(e)===G},isPortal:function(e){return Q(e)===x},isProfiler:function(e){return Q(e)===$},isStrictMode:function(e){return Q(e)===H},isSuspense:function(e){return Q(e)===L},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===D||e===z||e===$||e===H||e===L||e===q||"object"===u(e)&&null!==e&&(e.$$typeof===U||e.$$typeof===G||e.$$typeof===V||e.$$typeof===W||e.$$typeof===N||e.$$typeof===Y||e.$$typeof===Z||e.$$typeof===J||e.$$typeof===K)},typeOf:Q};B((function(e,t){}));B((function(e){e.exports=ee}));!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;10>n;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}();function te(){}function ne(){}Function.call.bind(Object.prototype.hasOwnProperty),ne.resetWarningCache=te;var re=B((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ne,resetWarningCache:te};return n.PropTypes=n,n}()})),oe=function(e){function n(){var e;return p(this,n),(e=a(this,n,arguments)).id=null,e.__hotInstance=null,e.hotElementRef=null,e.columnSettings=[],e.renderersPortalManager=null,e.portalCache=new Map,e.portalContainerCache=new Map,e.renderedCellCache=new Map,e.editorCache=new Map,e.componentRendererColumns=new Map,e}return y(n,e),f(n,[{key:"hotInstance",get:function(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set:function(e){this.__hotInstance=e}},{key:"getPortalContainerCache",value:function(){return this.portalContainerCache}},{key:"getRenderedCellCache",value:function(){return this.renderedCellCache}},{key:"getEditorCache",value:function(){return this.editorCache}},{key:"clearCache",value:function(){this.getRenderedCellCache().clear(),this.componentRendererColumns.clear()}},{key:"getOwnerDocument",value:function(){return"undefined"!=typeof window?this.hotElementRef?this.hotElementRef.ownerDocument:document:null}},{key:"setHotElementRef",value:function(e){this.hotElementRef=e}},{key:"getRendererWrapper",value:function(e){var t=this;return function(n,r,o,i,a,s,l){var c=t.getRenderedCellCache(),u=t.getPortalContainerCache(),p="".concat(o,"-").concat(i),d=n.guid,f="".concat(d,"-").concat(p),h="".concat(p,"-").concat(d);if(c.has(p)&&(r.innerHTML=c.get(p).innerHTML),r&&!r.getAttribute("ghost-table")){for(var y=t.portalCache.get(h),m=u.get(f);r.firstChild;)r.removeChild(r.firstChild);if(y&&m)r.appendChild(m);else{var g=_(e,{TD:r,row:o,col:i,prop:a,value:s,cellProperties:l,isRenderer:!0},r.ownerDocument,h,m),v=g.portal,b=g.portalContainer;u.set(f,b),r.appendChild(b),t.portalCache.set(h,v)}}return c.set(p,r),r}}},{key:"getEditorClass",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k,r=w(e),o=null===(t=this.getEditorCache().get(r))||void 0===t?void 0:t.get(n);return this.makeEditorClass(o)}},{key:"makeEditorClass",value:function(e){var t=function(t){function n(t){var r;return p(this,n),r=a(this,n,[t]),e.hotCustomEditorInstance=r,r.editorComponent=e,r}return y(n,t),f(n,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(r.editors.BaseEditor);return Object.getOwnPropertyNames(r.editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(t.prototype[n]=function(){for(var t,r=arguments.length,o=Array(r),i=0;r>i;i++)o[i]=arguments[i];return(t=e[n]).call.apply(t,[e].concat(o))})})),t}},{key:"getGlobalRendererElement",value:function(){return S(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){return I(this.props.children,this.getEditorCache())}},{key:"createNewGlobalSettings",value:function(){var e,t,n=R.getSettings(this.props),r=this.getGlobalRendererElement(),a=this.getGlobalEditorElement();(n.columns=this.columnSettings.length?this.columnSettings:n.columns,a)?n.editor=this.getEditorClass(a,k):n.editor=this.props.editor||null!==(e=this.props.settings)&&void 0!==e&&e.editor?this.props.editor||this.props.settings.editor:i.getEditor("text");r?(n.renderer=this.getRendererWrapper(r),this.componentRendererColumns.set("global",!0)):n.renderer=this.props.renderer||null!==(t=this.props.settings)&&void 0!==t&&t.renderer?this.props.renderer||this.props.settings.renderer:o.getRenderer("text");return n}},{key:"displayAutoSizeWarning",value:function(e){var t,n;this.hotInstance&&(null!==(t=this.hotInstance.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=this.hotInstance.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&this.componentRendererColumns.size>0&&function(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")}},{key:"setHotColumnSettings",value:function(e,t){this.columnSettings[t]=e}},{key:"handsontableBeforeViewRender",value:function(){this.portalCache.clear(),this.getRenderedCellCache().clear()}},{key:"handsontableAfterViewRender",value:function(){this.renderersPortalManager.setState({portals:b(this.portalCache.values())})}},{key:"updateHot",value:function(e){this.hotInstance&&this.hotInstance.updateSettings(e,!1)}},{key:"setRenderersPortalManagerRef",value:function(e){this.renderersPortalManager=e}},{key:"componentDidMount",value:function(){var e=this,t=this.createNewGlobalSettings();this.hotInstance=new r.Core(this.hotElementRef,t),this.hotInstance.addHook("beforeViewRender",(function(){return e.handsontableBeforeViewRender()})),this.hotInstance.addHook("afterViewRender",(function(){return e.handsontableAfterViewRender()})),this.hotInstance.init(),this.displayAutoSizeWarning(t)}},{key:"componentDidUpdate",value:function(){this.clearCache();var e=this.createNewGlobalSettings();this.updateHot(e),this.displayAutoSizeWarning(e)}},{key:"componentWillUnmount",value:function(){this.clearCache(),this.hotInstance&&this.hotInstance.destroy()}},{key:"render",value:function(){var e=this,n=t.Children.toArray(this.props.children).filter((function(e){return function(e){return e.type===j}(e)})).map((function(n,r){return t.cloneElement(n,{_componentRendererColumns:e.componentRendererColumns,_emitColumnSettings:e.setHotColumnSettings.bind(e),_columnIndex:r,_getChildElementByType:S.bind(e),_getRendererWrapper:e.getRendererWrapper.bind(e),_getEditorClass:e.getEditorClass.bind(e),_getOwnerDocument:e.getOwnerDocument.bind(e),_getEditorCache:e.getEditorCache.bind(e),children:n.props.children})})),r=P(this.props),o=O(this.getOwnerDocument(),this.getGlobalEditorElement());return t.createElement(t.Fragment,null,t.createElement("div",Object.assign({ref:this.setHotElementRef.bind(this)},r),n),t.createElement(A,{ref:this.setRenderersPortalManagerRef.bind(this)}),o)}}],[{key:"version",get:function(){return"0.0.0-next-16c41fc-20240410"}}])}(t.Component);oe.propTypes={style:re.object,id:re.string,className:re.string};var ie=["children"],ae=t.forwardRef((function(e,n){var r,o=e.children,i=v(e,ie),a="function"==typeof t.useId?t.useId():void 0,s=null!==(r=i.id)&&void 0!==r?r:a;return t.createElement(oe,Object.assign({id:s},i,{ref:n}),o)}));ae.version=oe.version;var se=function(e){function t(){var e;return p(this,t),(e=a(this,t,arguments)).name="BaseEditorComponent",e.instance=null,e.row=null,e.col=null,e.prop=null,e.TD=null,e.originalValue=null,e.cellProperties=null,e.state=null,e.hotInstance=null,e.hotCustomEditorInstance=null,e.hot=null,e}return y(t,e),f(t,[{key:"componentDidMount",value:function(){this.props.emitEditorInstance&&this.props.emitEditorInstance(this,this.props.editorColumnScope)}},{key:"componentDidUpdate",value:function(){this.props.emitEditorInstance&&this.props.emitEditorInstance(this,this.props.editorColumnScope)}},{key:"_fireCallbacks",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];(e=r.editors.BaseEditor.prototype._fireCallbacks).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.beginEditing).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.cancelChanges).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.checkEditorSection).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.close).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.discardEditor).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.enableFullEditMode).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.extend).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.finishEditing).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.focus).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getValue).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.init).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.isInFullEditMode).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.isOpened).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.isWaiting).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.open).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(e,t,n,o,i,a){return this.hotInstance=a.instance,this.row=e,this.col=t,this.prop=n,this.TD=o,this.originalValue=i,this.cellProperties=a,r.editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance,e,t,n,o,i,a)}},{key:"saveValue",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.saveValue).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.setValue).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.addHook).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.removeHooksByKey).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.clearHooks).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getEditedCell).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getEditedCellRect).call.apply(e,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(e,[this.hotCustomEditorInstance].concat(n))}}])}(t.Component);e.BaseEditorComponent=se,e.HotColumn=j,e.HotTable=ae,e.HotTableClass=oe,e.default=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
31
31
|
//# sourceMappingURL=react-handsontable.min.js.map
|
|
@@ -504,7 +504,7 @@ var RenderersPortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
504
504
|
}]);
|
|
505
505
|
}(React.Component);
|
|
506
506
|
|
|
507
|
-
var version="0.0.0-next-
|
|
507
|
+
var version="0.0.0-next-16c41fc-20240410";
|
|
508
508
|
|
|
509
509
|
function createCommonjsModule(fn, module) {
|
|
510
510
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsontable/react",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-16c41fc-20240410",
|
|
4
4
|
"description": "Best Data Grid for React with Spreadsheet Look and Feel.",
|
|
5
5
|
"author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
|
|
6
6
|
"homepage": "https://handsontable.com",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@types/react-redux": "^7.1.7",
|
|
68
68
|
"babel-core": "^7.0.0-bridge.0",
|
|
69
69
|
"cross-env": "^7.0.3",
|
|
70
|
-
"handsontable": "0.0.0-next-
|
|
70
|
+
"handsontable": "0.0.0-next-16c41fc-20240410",
|
|
71
71
|
"jest": "^29.7.0",
|
|
72
72
|
"prop-types": "^15.7.2",
|
|
73
73
|
"react": "^18.2.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"uglify-js": "^3.4.9"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"handsontable": "0.0.0-next-
|
|
91
|
+
"handsontable": "0.0.0-next-16c41fc-20240410"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min",
|