@douyinfe/semi-ui 2.38.3-alpha.2 → 2.38.3-alpha.4
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.
- package/dist/umd/semi-ui.js +658 -206
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/modal/confirm.d.ts +4 -4
- package/lib/cjs/overflowList/index.js +3 -3
- package/lib/cjs/table/TableCell.js +7 -1
- package/lib/cjs/table/interface.d.ts +5 -0
- package/lib/es/modal/confirm.d.ts +4 -4
- package/lib/es/overflowList/index.js +3 -3
- package/lib/es/table/TableCell.js +7 -1
- package/lib/es/table/interface.d.ts +5 -0
- package/package.json +9 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -15058,125 +15058,149 @@ function dontSetMe(props
|
|
|
15058
15058
|
|
|
15059
15059
|
exports.__esModule = true;
|
|
15060
15060
|
exports["default"] = void 0;
|
|
15061
|
-
|
|
15061
|
+
|
|
15062
|
+
var _react = _interopRequireDefault(__webpack_require__("neV8"));
|
|
15063
|
+
|
|
15062
15064
|
var _reactDraggable = __webpack_require__("j6Rw");
|
|
15065
|
+
|
|
15063
15066
|
var _utils = __webpack_require__("+cYm");
|
|
15067
|
+
|
|
15064
15068
|
var _propTypes = __webpack_require__("6rtJ");
|
|
15065
|
-
|
|
15066
|
-
function
|
|
15067
|
-
|
|
15068
|
-
function _extends() { _extends = Object.assign
|
|
15069
|
+
|
|
15070
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15071
|
+
|
|
15072
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15073
|
+
|
|
15074
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
15075
|
+
|
|
15076
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15077
|
+
|
|
15069
15078
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15070
|
-
|
|
15071
|
-
function
|
|
15072
|
-
|
|
15073
|
-
function
|
|
15074
|
-
|
|
15075
|
-
function
|
|
15076
|
-
|
|
15077
|
-
// The base <Resizable> component.
|
|
15078
|
-
// This component does not have state and relies on the parent to set its props based on callback data.
|
|
15079
|
+
|
|
15080
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
15081
|
+
|
|
15082
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
15083
|
+
|
|
15084
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15085
|
+
|
|
15079
15086
|
var Resizable = /*#__PURE__*/function (_React$Component) {
|
|
15080
15087
|
_inheritsLoose(Resizable, _React$Component);
|
|
15088
|
+
|
|
15081
15089
|
function Resizable() {
|
|
15082
15090
|
var _this;
|
|
15091
|
+
|
|
15083
15092
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15084
15093
|
args[_key] = arguments[_key];
|
|
15085
15094
|
}
|
|
15095
|
+
|
|
15086
15096
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
15087
|
-
|
|
15088
|
-
_this
|
|
15089
|
-
|
|
15097
|
+
|
|
15098
|
+
_defineProperty(_assertThisInitialized(_this), "state", undefined);
|
|
15099
|
+
|
|
15100
|
+
_defineProperty(_assertThisInitialized(_this), "lastHandleRect", null);
|
|
15101
|
+
|
|
15102
|
+
_defineProperty(_assertThisInitialized(_this), "slack", null);
|
|
15103
|
+
|
|
15090
15104
|
return _this;
|
|
15091
15105
|
}
|
|
15106
|
+
|
|
15092
15107
|
var _proto = Resizable.prototype;
|
|
15108
|
+
|
|
15093
15109
|
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
15094
15110
|
this.resetData();
|
|
15095
15111
|
};
|
|
15112
|
+
|
|
15113
|
+
_proto.lockAspectRatio = function lockAspectRatio(width, height, aspectRatio) {
|
|
15114
|
+
height = width / aspectRatio;
|
|
15115
|
+
width = height * aspectRatio;
|
|
15116
|
+
return [width, height];
|
|
15117
|
+
};
|
|
15118
|
+
|
|
15096
15119
|
_proto.resetData = function resetData() {
|
|
15097
15120
|
this.lastHandleRect = this.slack = null;
|
|
15098
|
-
}
|
|
15099
|
-
|
|
15100
|
-
// Clamp width and height within provided constraints
|
|
15121
|
+
} // Clamp width and height within provided constraints
|
|
15101
15122
|
;
|
|
15123
|
+
|
|
15102
15124
|
_proto.runConstraints = function runConstraints(width, height) {
|
|
15103
|
-
var
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
if (
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
var deltaW = width - this.props.width;
|
|
15114
|
-
var deltaH = height - this.props.height;
|
|
15115
|
-
|
|
15116
|
-
// Find which coordinate was greater and should push the other toward it.
|
|
15117
|
-
// E.g.:
|
|
15118
|
-
// ratio = 1, deltaW = 10, deltaH = 5, deltaH should become 10.
|
|
15119
|
-
// ratio = 2, deltaW = 10, deltaH = 6, deltaW should become 12.
|
|
15120
|
-
if (Math.abs(deltaW) > Math.abs(deltaH * ratio)) {
|
|
15125
|
+
var _ref = [this.props.minConstraints, this.props.maxConstraints],
|
|
15126
|
+
min = _ref[0],
|
|
15127
|
+
max = _ref[1];
|
|
15128
|
+
if (!min && !max) return [width, height]; // If constraining to min and max, we need to also fit width and height to aspect ratio.
|
|
15129
|
+
|
|
15130
|
+
if (this.props.lockAspectRatio) {
|
|
15131
|
+
var resizingHorizontally = height === this.props.height;
|
|
15132
|
+
|
|
15133
|
+
if (resizingHorizontally) {
|
|
15134
|
+
var ratio = this.props.width / this.props.height;
|
|
15121
15135
|
height = width / ratio;
|
|
15122
|
-
} else {
|
|
15123
15136
|
width = height * ratio;
|
|
15137
|
+
} else {
|
|
15138
|
+
// Take into account vertical resize with N/S handles on locked aspect
|
|
15139
|
+
// ratio. Calculate the change height-first, instead of width-first
|
|
15140
|
+
var _ratio = this.props.height / this.props.width;
|
|
15141
|
+
|
|
15142
|
+
width = height / _ratio;
|
|
15143
|
+
height = width * _ratio;
|
|
15124
15144
|
}
|
|
15125
15145
|
}
|
|
15126
|
-
var oldW = width,
|
|
15127
|
-
oldH = height;
|
|
15128
15146
|
|
|
15129
|
-
|
|
15147
|
+
var oldW = width,
|
|
15148
|
+
oldH = height; // Add slack to the values used to calculate bound position. This will ensure that if
|
|
15130
15149
|
// we start removing slack, the element won't react to it right away until it's been
|
|
15131
15150
|
// completely removed.
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15151
|
+
|
|
15152
|
+
var _ref2 = this.slack || [0, 0],
|
|
15153
|
+
slackW = _ref2[0],
|
|
15154
|
+
slackH = _ref2[1];
|
|
15155
|
+
|
|
15135
15156
|
width += slackW;
|
|
15136
15157
|
height += slackH;
|
|
15137
|
-
|
|
15138
|
-
|
|
15139
|
-
|
|
15140
|
-
|
|
15141
|
-
if (maxConstraints) {
|
|
15142
|
-
width = Math.min(maxConstraints[0], width);
|
|
15143
|
-
height = Math.min(maxConstraints[1], height);
|
|
15158
|
+
|
|
15159
|
+
if (min) {
|
|
15160
|
+
width = Math.max(min[0], width);
|
|
15161
|
+
height = Math.max(min[1], height);
|
|
15144
15162
|
}
|
|
15145
15163
|
|
|
15146
|
-
|
|
15164
|
+
if (max) {
|
|
15165
|
+
width = Math.min(max[0], width);
|
|
15166
|
+
height = Math.min(max[1], height);
|
|
15167
|
+
} // If the width or height changed, we must have introduced some slack. Record it for the next iteration.
|
|
15168
|
+
|
|
15169
|
+
|
|
15147
15170
|
this.slack = [slackW + (oldW - width), slackH + (oldH - height)];
|
|
15148
15171
|
return [width, height];
|
|
15149
15172
|
}
|
|
15150
|
-
|
|
15151
15173
|
/**
|
|
15152
15174
|
* Wrapper around drag events to provide more useful data.
|
|
15153
15175
|
*
|
|
15154
15176
|
* @param {String} handlerName Handler name to wrap.
|
|
15155
15177
|
* @return {Function} Handler function.
|
|
15156
|
-
|
|
15178
|
+
*/
|
|
15179
|
+
;
|
|
15180
|
+
|
|
15157
15181
|
_proto.resizeHandler = function resizeHandler(handlerName, axis) {
|
|
15158
15182
|
var _this2 = this;
|
|
15159
|
-
|
|
15160
|
-
|
|
15161
|
-
|
|
15162
|
-
|
|
15183
|
+
|
|
15184
|
+
return function (e, _ref3) {
|
|
15185
|
+
var node = _ref3.node,
|
|
15186
|
+
deltaX = _ref3.deltaX,
|
|
15187
|
+
deltaY = _ref3.deltaY;
|
|
15163
15188
|
// Reset data in case it was left over somehow (should not be possible)
|
|
15164
|
-
if (handlerName === 'onResizeStart') _this2.resetData();
|
|
15189
|
+
if (handlerName === 'onResizeStart') _this2.resetData(); // Axis restrictions
|
|
15165
15190
|
|
|
15166
|
-
// Axis restrictions
|
|
15167
15191
|
var canDragX = (_this2.props.axis === 'both' || _this2.props.axis === 'x') && axis !== 'n' && axis !== 's';
|
|
15168
|
-
var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && axis !== 'e' && axis !== 'w';
|
|
15169
|
-
|
|
15170
|
-
if (!canDragX && !canDragY) return;
|
|
15192
|
+
var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && axis !== 'e' && axis !== 'w'; // No dragging possible.
|
|
15193
|
+
|
|
15194
|
+
if (!canDragX && !canDragY) return; // Decompose axis for later use
|
|
15171
15195
|
|
|
15172
|
-
// Decompose axis for later use
|
|
15173
15196
|
var axisV = axis[0];
|
|
15174
15197
|
var axisH = axis[axis.length - 1]; // intentionally not axis[1], so that this catches axis === 'w' for example
|
|
15175
|
-
|
|
15176
15198
|
// Track the element being dragged to account for changes in position.
|
|
15177
15199
|
// If a handle's position is changed between callbacks, we need to factor this in to the next callback.
|
|
15178
15200
|
// Failure to do so will cause the element to "skip" when resized upwards or leftwards.
|
|
15201
|
+
|
|
15179
15202
|
var handleRect = node.getBoundingClientRect();
|
|
15203
|
+
|
|
15180
15204
|
if (_this2.lastHandleRect != null) {
|
|
15181
15205
|
// If the handle has repositioned on either axis since last render,
|
|
15182
15206
|
// we need to increase our callback values by this much.
|
|
@@ -15185,34 +15209,34 @@ var Resizable = /*#__PURE__*/function (_React$Component) {
|
|
|
15185
15209
|
var deltaLeftSinceLast = handleRect.left - _this2.lastHandleRect.left;
|
|
15186
15210
|
deltaX += deltaLeftSinceLast;
|
|
15187
15211
|
}
|
|
15212
|
+
|
|
15188
15213
|
if (axisV === 'n') {
|
|
15189
15214
|
var deltaTopSinceLast = handleRect.top - _this2.lastHandleRect.top;
|
|
15190
15215
|
deltaY += deltaTopSinceLast;
|
|
15191
15216
|
}
|
|
15192
|
-
}
|
|
15193
|
-
|
|
15194
|
-
|
|
15217
|
+
} // Storage of last rect so we know how much it has really moved.
|
|
15218
|
+
|
|
15219
|
+
|
|
15220
|
+
_this2.lastHandleRect = handleRect; // Reverse delta if using top or left drag handles.
|
|
15195
15221
|
|
|
15196
|
-
// Reverse delta if using top or left drag handles.
|
|
15197
15222
|
if (axisH === 'w') deltaX = -deltaX;
|
|
15198
|
-
if (axisV === 'n') deltaY = -deltaY;
|
|
15223
|
+
if (axisV === 'n') deltaY = -deltaY; // Update w/h by the deltas. Also factor in transformScale.
|
|
15199
15224
|
|
|
15200
|
-
// Update w/h by the deltas. Also factor in transformScale.
|
|
15201
15225
|
var width = _this2.props.width + (canDragX ? deltaX / _this2.props.transformScale : 0);
|
|
15202
|
-
var height = _this2.props.height + (canDragY ? deltaY / _this2.props.transformScale : 0);
|
|
15226
|
+
var height = _this2.props.height + (canDragY ? deltaY / _this2.props.transformScale : 0); // Run user-provided constraints.
|
|
15203
15227
|
|
|
15204
|
-
// Run user-provided constraints.
|
|
15205
15228
|
var _this2$runConstraints = _this2.runConstraints(width, height);
|
|
15229
|
+
|
|
15206
15230
|
width = _this2$runConstraints[0];
|
|
15207
15231
|
height = _this2$runConstraints[1];
|
|
15208
|
-
var dimensionsChanged = width !== _this2.props.width || height !== _this2.props.height;
|
|
15232
|
+
var dimensionsChanged = width !== _this2.props.width || height !== _this2.props.height; // Call user-supplied callback if present.
|
|
15233
|
+
|
|
15234
|
+
var cb = typeof _this2.props[handlerName] === 'function' ? _this2.props[handlerName] : null; // Don't call 'onResize' if dimensions haven't changed.
|
|
15209
15235
|
|
|
15210
|
-
// Call user-supplied callback if present.
|
|
15211
|
-
var cb = typeof _this2.props[handlerName] === 'function' ? _this2.props[handlerName] : null;
|
|
15212
|
-
// Don't call 'onResize' if dimensions haven't changed.
|
|
15213
15236
|
var shouldSkipCb = handlerName === 'onResize' && !dimensionsChanged;
|
|
15237
|
+
|
|
15214
15238
|
if (cb && !shouldSkipCb) {
|
|
15215
|
-
e.persist
|
|
15239
|
+
if (typeof e.persist === 'function') e.persist();
|
|
15216
15240
|
cb(e, {
|
|
15217
15241
|
node: node,
|
|
15218
15242
|
size: {
|
|
@@ -15221,95 +15245,86 @@ var Resizable = /*#__PURE__*/function (_React$Component) {
|
|
|
15221
15245
|
},
|
|
15222
15246
|
handle: axis
|
|
15223
15247
|
});
|
|
15224
|
-
}
|
|
15248
|
+
} // Reset internal data
|
|
15249
|
+
|
|
15225
15250
|
|
|
15226
|
-
// Reset internal data
|
|
15227
15251
|
if (handlerName === 'onResizeStop') _this2.resetData();
|
|
15228
15252
|
};
|
|
15229
|
-
}
|
|
15253
|
+
};
|
|
15230
15254
|
|
|
15231
|
-
|
|
15232
|
-
// the underlying draggable library to work properly.
|
|
15233
|
-
;
|
|
15234
|
-
_proto.renderResizeHandle = function renderResizeHandle(handleAxis, ref) {
|
|
15255
|
+
_proto.renderResizeHandle = function renderResizeHandle(resizeHandleAxis) {
|
|
15235
15256
|
var handle = this.props.handle;
|
|
15236
|
-
|
|
15237
|
-
if (
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
// Handle is a function, such as:
|
|
15244
|
-
// `handle={(handleAxis) => <span className={...} />}`
|
|
15245
|
-
if (typeof handle === 'function') {
|
|
15246
|
-
return handle(handleAxis, ref);
|
|
15257
|
+
|
|
15258
|
+
if (handle) {
|
|
15259
|
+
if (typeof handle === 'function') {
|
|
15260
|
+
return handle(resizeHandleAxis);
|
|
15261
|
+
}
|
|
15262
|
+
|
|
15263
|
+
return handle;
|
|
15247
15264
|
}
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15251
|
-
ref: ref
|
|
15252
|
-
}, isDOMElement ? {} : {
|
|
15253
|
-
handleAxis: handleAxis
|
|
15265
|
+
|
|
15266
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
15267
|
+
className: "react-resizable-handle react-resizable-handle-" + resizeHandleAxis
|
|
15254
15268
|
});
|
|
15255
|
-
return /*#__PURE__*/React.cloneElement(handle, props);
|
|
15256
15269
|
};
|
|
15270
|
+
|
|
15257
15271
|
_proto.render = function render() {
|
|
15258
15272
|
var _this3 = this;
|
|
15273
|
+
|
|
15259
15274
|
// Pass along only props not meant for the `<Resizable>`.`
|
|
15260
15275
|
// eslint-disable-next-line no-unused-vars
|
|
15261
|
-
var _this$
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
|
|
15280
|
-
// What we're doing here is getting the child of this element, and cloning it with this element's props.
|
|
15276
|
+
var _this$props = this.props,
|
|
15277
|
+
children = _this$props.children,
|
|
15278
|
+
className = _this$props.className,
|
|
15279
|
+
draggableOpts = _this$props.draggableOpts,
|
|
15280
|
+
width = _this$props.width,
|
|
15281
|
+
height = _this$props.height,
|
|
15282
|
+
handle = _this$props.handle,
|
|
15283
|
+
handleSize = _this$props.handleSize,
|
|
15284
|
+
lockAspectRatio = _this$props.lockAspectRatio,
|
|
15285
|
+
axis = _this$props.axis,
|
|
15286
|
+
minConstraints = _this$props.minConstraints,
|
|
15287
|
+
maxConstraints = _this$props.maxConstraints,
|
|
15288
|
+
onResize = _this$props.onResize,
|
|
15289
|
+
onResizeStop = _this$props.onResizeStop,
|
|
15290
|
+
onResizeStart = _this$props.onResizeStart,
|
|
15291
|
+
resizeHandles = _this$props.resizeHandles,
|
|
15292
|
+
transformScale = _this$props.transformScale,
|
|
15293
|
+
p = _objectWithoutPropertiesLoose(_this$props, ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"]); // What we're doing here is getting the child of this element, and cloning it with this element's props.
|
|
15281
15294
|
// We are then defining its children as:
|
|
15282
|
-
//
|
|
15283
|
-
//
|
|
15295
|
+
// Its original children (resizable's child's children), and
|
|
15296
|
+
// One or more draggable handles.
|
|
15297
|
+
|
|
15298
|
+
|
|
15284
15299
|
return (0, _utils.cloneElement)(children, _objectSpread(_objectSpread({}, p), {}, {
|
|
15285
15300
|
className: (className ? className + " " : '') + "react-resizable",
|
|
15286
15301
|
children: [].concat(children.props.children, resizeHandles.map(function (handleAxis) {
|
|
15287
|
-
|
|
15288
|
-
// Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().
|
|
15289
|
-
var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React.createRef();
|
|
15290
|
-
return /*#__PURE__*/React.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {
|
|
15291
|
-
nodeRef: ref,
|
|
15302
|
+
return /*#__PURE__*/_react.default.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {
|
|
15292
15303
|
key: "resizableHandle-" + handleAxis,
|
|
15293
15304
|
onStop: _this3.resizeHandler('onResizeStop', handleAxis),
|
|
15294
15305
|
onStart: _this3.resizeHandler('onResizeStart', handleAxis),
|
|
15295
15306
|
onDrag: _this3.resizeHandler('onResize', handleAxis)
|
|
15296
|
-
}), _this3.renderResizeHandle(handleAxis
|
|
15307
|
+
}), _this3.renderResizeHandle(handleAxis));
|
|
15297
15308
|
}))
|
|
15298
15309
|
}));
|
|
15299
15310
|
};
|
|
15311
|
+
|
|
15300
15312
|
return Resizable;
|
|
15301
|
-
}(
|
|
15313
|
+
}(_react.default.Component);
|
|
15314
|
+
|
|
15302
15315
|
exports["default"] = Resizable;
|
|
15303
|
-
|
|
15304
|
-
Resizable
|
|
15305
|
-
|
|
15316
|
+
|
|
15317
|
+
_defineProperty(Resizable, "propTypes", _propTypes.resizableProps);
|
|
15318
|
+
|
|
15319
|
+
_defineProperty(Resizable, "defaultProps", {
|
|
15306
15320
|
handleSize: [20, 20],
|
|
15307
15321
|
lockAspectRatio: false,
|
|
15322
|
+
axis: 'both',
|
|
15308
15323
|
minConstraints: [20, 20],
|
|
15309
15324
|
maxConstraints: [Infinity, Infinity],
|
|
15310
15325
|
resizeHandles: ['se'],
|
|
15311
15326
|
transformScale: 1
|
|
15312
|
-
};
|
|
15327
|
+
});
|
|
15313
15328
|
|
|
15314
15329
|
/***/ }),
|
|
15315
15330
|
|
|
@@ -15322,50 +15337,71 @@ var __webpack_unused_export__;
|
|
|
15322
15337
|
|
|
15323
15338
|
__webpack_unused_export__ = true;
|
|
15324
15339
|
exports["default"] = void 0;
|
|
15340
|
+
|
|
15325
15341
|
var React = _interopRequireWildcard(__webpack_require__("neV8"));
|
|
15342
|
+
|
|
15326
15343
|
var _propTypes = _interopRequireDefault(__webpack_require__("aWzz"));
|
|
15344
|
+
|
|
15327
15345
|
var _Resizable = _interopRequireDefault(__webpack_require__("DIYL"));
|
|
15346
|
+
|
|
15328
15347
|
var _propTypes2 = __webpack_require__("6rtJ");
|
|
15329
|
-
|
|
15348
|
+
|
|
15330
15349
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15331
|
-
|
|
15332
|
-
function
|
|
15333
|
-
|
|
15334
|
-
function
|
|
15335
|
-
|
|
15336
|
-
function
|
|
15337
|
-
|
|
15338
|
-
function
|
|
15350
|
+
|
|
15351
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
15352
|
+
|
|
15353
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15354
|
+
|
|
15355
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15356
|
+
|
|
15357
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
15358
|
+
|
|
15359
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15360
|
+
|
|
15339
15361
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15340
|
-
|
|
15341
|
-
function
|
|
15362
|
+
|
|
15363
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
15364
|
+
|
|
15365
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
15366
|
+
|
|
15367
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15368
|
+
|
|
15342
15369
|
var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
15343
15370
|
_inheritsLoose(ResizableBox, _React$Component);
|
|
15371
|
+
|
|
15344
15372
|
function ResizableBox() {
|
|
15345
15373
|
var _this;
|
|
15374
|
+
|
|
15346
15375
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15347
15376
|
args[_key] = arguments[_key];
|
|
15348
15377
|
}
|
|
15378
|
+
|
|
15349
15379
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
15350
|
-
|
|
15380
|
+
|
|
15381
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
15351
15382
|
width: _this.props.width,
|
|
15352
15383
|
height: _this.props.height,
|
|
15353
15384
|
propsWidth: _this.props.width,
|
|
15354
15385
|
propsHeight: _this.props.height
|
|
15355
|
-
};
|
|
15356
|
-
|
|
15386
|
+
});
|
|
15387
|
+
|
|
15388
|
+
_defineProperty(_assertThisInitialized(_this), "onResize", function (e, data) {
|
|
15357
15389
|
var size = data.size;
|
|
15390
|
+
|
|
15358
15391
|
if (_this.props.onResize) {
|
|
15359
|
-
e.persist
|
|
15392
|
+
e.persist && e.persist();
|
|
15393
|
+
|
|
15360
15394
|
_this.setState(size, function () {
|
|
15361
15395
|
return _this.props.onResize && _this.props.onResize(e, data);
|
|
15362
15396
|
});
|
|
15363
15397
|
} else {
|
|
15364
15398
|
_this.setState(size);
|
|
15365
15399
|
}
|
|
15366
|
-
};
|
|
15400
|
+
});
|
|
15401
|
+
|
|
15367
15402
|
return _this;
|
|
15368
15403
|
}
|
|
15404
|
+
|
|
15369
15405
|
ResizableBox.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
|
|
15370
15406
|
// If parent changes height/width, set that in our state.
|
|
15371
15407
|
if (state.propsWidth !== props.width || state.propsHeight !== props.height) {
|
|
@@ -15376,30 +15412,34 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
15376
15412
|
propsHeight: props.height
|
|
15377
15413
|
};
|
|
15378
15414
|
}
|
|
15415
|
+
|
|
15379
15416
|
return null;
|
|
15380
15417
|
};
|
|
15418
|
+
|
|
15381
15419
|
var _proto = ResizableBox.prototype;
|
|
15420
|
+
|
|
15382
15421
|
_proto.render = function render() {
|
|
15383
15422
|
// Basic wrapper around a Resizable instance.
|
|
15384
15423
|
// If you use Resizable directly, you are responsible for updating the child component
|
|
15385
15424
|
// with a new width and height.
|
|
15386
15425
|
var _this$props = this.props,
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15426
|
+
handle = _this$props.handle,
|
|
15427
|
+
handleSize = _this$props.handleSize,
|
|
15428
|
+
onResize = _this$props.onResize,
|
|
15429
|
+
onResizeStart = _this$props.onResizeStart,
|
|
15430
|
+
onResizeStop = _this$props.onResizeStop,
|
|
15431
|
+
draggableOpts = _this$props.draggableOpts,
|
|
15432
|
+
minConstraints = _this$props.minConstraints,
|
|
15433
|
+
maxConstraints = _this$props.maxConstraints,
|
|
15434
|
+
lockAspectRatio = _this$props.lockAspectRatio,
|
|
15435
|
+
axis = _this$props.axis,
|
|
15436
|
+
width = _this$props.width,
|
|
15437
|
+
height = _this$props.height,
|
|
15438
|
+
resizeHandles = _this$props.resizeHandles,
|
|
15439
|
+
style = _this$props.style,
|
|
15440
|
+
transformScale = _this$props.transformScale,
|
|
15441
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"]);
|
|
15442
|
+
|
|
15403
15443
|
return /*#__PURE__*/React.createElement(_Resizable.default, {
|
|
15404
15444
|
axis: axis,
|
|
15405
15445
|
draggableOpts: draggableOpts,
|
|
@@ -15422,13 +15462,15 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
15422
15462
|
})
|
|
15423
15463
|
})));
|
|
15424
15464
|
};
|
|
15465
|
+
|
|
15425
15466
|
return ResizableBox;
|
|
15426
15467
|
}(React.Component);
|
|
15468
|
+
|
|
15427
15469
|
exports["default"] = ResizableBox;
|
|
15428
|
-
|
|
15429
|
-
ResizableBox
|
|
15470
|
+
|
|
15471
|
+
_defineProperty(ResizableBox, "propTypes", _objectSpread(_objectSpread({}, _propTypes2.resizableProps), {}, {
|
|
15430
15472
|
children: _propTypes.default.element
|
|
15431
|
-
});
|
|
15473
|
+
}));
|
|
15432
15474
|
|
|
15433
15475
|
/***/ }),
|
|
15434
15476
|
|
|
@@ -15440,9 +15482,13 @@ ResizableBox.propTypes = _objectSpread(_objectSpread({}, _propTypes2.resizablePr
|
|
|
15440
15482
|
|
|
15441
15483
|
exports.__esModule = true;
|
|
15442
15484
|
exports.resizableProps = void 0;
|
|
15485
|
+
|
|
15443
15486
|
var _propTypes = _interopRequireDefault(__webpack_require__("aWzz"));
|
|
15487
|
+
|
|
15444
15488
|
var _reactDraggable = __webpack_require__("j6Rw");
|
|
15489
|
+
|
|
15445
15490
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15491
|
+
|
|
15446
15492
|
var resizableProps = {
|
|
15447
15493
|
/*
|
|
15448
15494
|
* Restricts resizing to a particular axis (default: 'both')
|
|
@@ -15453,10 +15499,12 @@ var resizableProps = {
|
|
|
15453
15499
|
* */
|
|
15454
15500
|
axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),
|
|
15455
15501
|
className: _propTypes.default.string,
|
|
15502
|
+
|
|
15456
15503
|
/*
|
|
15457
15504
|
* Require that one and only one child be present.
|
|
15458
15505
|
* */
|
|
15459
15506
|
children: _propTypes.default.element.isRequired,
|
|
15507
|
+
|
|
15460
15508
|
/*
|
|
15461
15509
|
* These will be passed wholesale to react-draggable's DraggableCore
|
|
15462
15510
|
* */
|
|
@@ -15476,50 +15524,48 @@ var resizableProps = {
|
|
|
15476
15524
|
onMouseDown: _propTypes.default.func,
|
|
15477
15525
|
scale: _propTypes.default.number
|
|
15478
15526
|
}),
|
|
15527
|
+
|
|
15479
15528
|
/*
|
|
15480
15529
|
* Initial height
|
|
15481
15530
|
* */
|
|
15482
|
-
height:
|
|
15483
|
-
|
|
15484
|
-
args[_key] = arguments[_key];
|
|
15485
|
-
}
|
|
15486
|
-
var props = args[0];
|
|
15487
|
-
// Required if resizing height or both
|
|
15488
|
-
if (props.axis === 'both' || props.axis === 'y') {
|
|
15489
|
-
var _PropTypes$number;
|
|
15490
|
-
return (_PropTypes$number = _propTypes.default.number).isRequired.apply(_PropTypes$number, args);
|
|
15491
|
-
}
|
|
15492
|
-
return _propTypes.default.number.apply(_propTypes.default, args);
|
|
15493
|
-
},
|
|
15531
|
+
height: _propTypes.default.number.isRequired,
|
|
15532
|
+
|
|
15494
15533
|
/*
|
|
15495
15534
|
* Customize cursor resize handle
|
|
15496
15535
|
* */
|
|
15497
15536
|
handle: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
15537
|
+
|
|
15498
15538
|
/*
|
|
15499
15539
|
* If you change this, be sure to update your css
|
|
15500
15540
|
* */
|
|
15501
15541
|
handleSize: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
15502
15542
|
lockAspectRatio: _propTypes.default.bool,
|
|
15543
|
+
|
|
15503
15544
|
/*
|
|
15504
15545
|
* Max X & Y measure
|
|
15505
15546
|
* */
|
|
15506
15547
|
maxConstraints: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
15548
|
+
|
|
15507
15549
|
/*
|
|
15508
15550
|
* Min X & Y measure
|
|
15509
15551
|
* */
|
|
15510
15552
|
minConstraints: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
15553
|
+
|
|
15511
15554
|
/*
|
|
15512
15555
|
* Called on stop resize event
|
|
15513
15556
|
* */
|
|
15514
15557
|
onResizeStop: _propTypes.default.func,
|
|
15558
|
+
|
|
15515
15559
|
/*
|
|
15516
15560
|
* Called on start resize event
|
|
15517
15561
|
* */
|
|
15518
15562
|
onResizeStart: _propTypes.default.func,
|
|
15563
|
+
|
|
15519
15564
|
/*
|
|
15520
15565
|
* Called on resize event
|
|
15521
15566
|
* */
|
|
15522
15567
|
onResize: _propTypes.default.func,
|
|
15568
|
+
|
|
15523
15569
|
/*
|
|
15524
15570
|
* Defines which resize handles should be rendered (default: 'se')
|
|
15525
15571
|
* 's' - South handle (bottom-center)
|
|
@@ -15532,25 +15578,16 @@ var resizableProps = {
|
|
|
15532
15578
|
* 'ne' - Northeast handle (top-center)
|
|
15533
15579
|
* */
|
|
15534
15580
|
resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),
|
|
15581
|
+
|
|
15535
15582
|
/*
|
|
15536
15583
|
* If `transform: scale(n)` is set on the parent, this should be set to `n`.
|
|
15537
15584
|
* */
|
|
15538
15585
|
transformScale: _propTypes.default.number,
|
|
15586
|
+
|
|
15539
15587
|
/*
|
|
15540
15588
|
* Initial width
|
|
15541
15589
|
*/
|
|
15542
|
-
width:
|
|
15543
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
15544
|
-
args[_key2] = arguments[_key2];
|
|
15545
|
-
}
|
|
15546
|
-
var props = args[0];
|
|
15547
|
-
// Required if resizing width or both
|
|
15548
|
-
if (props.axis === 'both' || props.axis === 'x') {
|
|
15549
|
-
var _PropTypes$number2;
|
|
15550
|
-
return (_PropTypes$number2 = _propTypes.default.number).isRequired.apply(_PropTypes$number2, args);
|
|
15551
|
-
}
|
|
15552
|
-
return _propTypes.default.number.apply(_propTypes.default, args);
|
|
15553
|
-
}
|
|
15590
|
+
width: _propTypes.default.number.isRequired
|
|
15554
15591
|
};
|
|
15555
15592
|
exports.resizableProps = resizableProps;
|
|
15556
15593
|
|
|
@@ -15564,21 +15601,27 @@ exports.resizableProps = resizableProps;
|
|
|
15564
15601
|
|
|
15565
15602
|
exports.__esModule = true;
|
|
15566
15603
|
exports.cloneElement = cloneElement;
|
|
15604
|
+
|
|
15567
15605
|
var _react = _interopRequireDefault(__webpack_require__("neV8"));
|
|
15606
|
+
|
|
15568
15607
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15569
|
-
|
|
15570
|
-
function
|
|
15571
|
-
|
|
15572
|
-
function
|
|
15573
|
-
|
|
15608
|
+
|
|
15609
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
15610
|
+
|
|
15611
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15612
|
+
|
|
15613
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15614
|
+
|
|
15574
15615
|
// React.addons.cloneWithProps look-alike that merges style & className.
|
|
15575
15616
|
function cloneElement(element, props) {
|
|
15576
15617
|
if (props.style && element.props.style) {
|
|
15577
15618
|
props.style = _objectSpread(_objectSpread({}, element.props.style), props.style);
|
|
15578
15619
|
}
|
|
15620
|
+
|
|
15579
15621
|
if (props.className && element.props.className) {
|
|
15580
15622
|
props.className = element.props.className + " " + props.className;
|
|
15581
15623
|
}
|
|
15624
|
+
|
|
15582
15625
|
return /*#__PURE__*/_react.default.cloneElement(element, props);
|
|
15583
15626
|
}
|
|
15584
15627
|
|
|
@@ -63613,11 +63656,413 @@ ReactIntersectionObserver.defaultProps = {
|
|
|
63613
63656
|
option: {},
|
|
63614
63657
|
items: {}
|
|
63615
63658
|
};
|
|
63659
|
+
;// CONCATENATED MODULE: ../../node_modules/fast-copy/dist/esm/index.mjs
|
|
63660
|
+
var toStringFunction = Function.prototype.toString;
|
|
63661
|
+
var create = Object.create;
|
|
63662
|
+
var toStringObject = Object.prototype.toString;
|
|
63663
|
+
/**
|
|
63664
|
+
* @classdesc Fallback cache for when WeakMap is not natively supported
|
|
63665
|
+
*/
|
|
63666
|
+
var LegacyCache = /** @class */ (function () {
|
|
63667
|
+
function LegacyCache() {
|
|
63668
|
+
this._keys = [];
|
|
63669
|
+
this._values = [];
|
|
63670
|
+
}
|
|
63671
|
+
LegacyCache.prototype.has = function (key) {
|
|
63672
|
+
return !!~this._keys.indexOf(key);
|
|
63673
|
+
};
|
|
63674
|
+
LegacyCache.prototype.get = function (key) {
|
|
63675
|
+
return this._values[this._keys.indexOf(key)];
|
|
63676
|
+
};
|
|
63677
|
+
LegacyCache.prototype.set = function (key, value) {
|
|
63678
|
+
this._keys.push(key);
|
|
63679
|
+
this._values.push(value);
|
|
63680
|
+
};
|
|
63681
|
+
return LegacyCache;
|
|
63682
|
+
}());
|
|
63683
|
+
function createCacheLegacy() {
|
|
63684
|
+
return new LegacyCache();
|
|
63685
|
+
}
|
|
63686
|
+
function createCacheModern() {
|
|
63687
|
+
return new WeakMap();
|
|
63688
|
+
}
|
|
63689
|
+
/**
|
|
63690
|
+
* Get a new cache object to prevent circular references.
|
|
63691
|
+
*/
|
|
63692
|
+
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
|
63693
|
+
/**
|
|
63694
|
+
* Get an empty version of the object with the same prototype it has.
|
|
63695
|
+
*/
|
|
63696
|
+
function getCleanClone(prototype) {
|
|
63697
|
+
if (!prototype) {
|
|
63698
|
+
return create(null);
|
|
63699
|
+
}
|
|
63700
|
+
var Constructor = prototype.constructor;
|
|
63701
|
+
if (Constructor === Object) {
|
|
63702
|
+
return prototype === Object.prototype ? {} : create(prototype);
|
|
63703
|
+
}
|
|
63704
|
+
if (Constructor &&
|
|
63705
|
+
~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
|
63706
|
+
try {
|
|
63707
|
+
return new Constructor();
|
|
63708
|
+
}
|
|
63709
|
+
catch (_a) { }
|
|
63710
|
+
}
|
|
63711
|
+
return create(prototype);
|
|
63712
|
+
}
|
|
63713
|
+
function getRegExpFlagsLegacy(regExp) {
|
|
63714
|
+
var flags = '';
|
|
63715
|
+
if (regExp.global) {
|
|
63716
|
+
flags += 'g';
|
|
63717
|
+
}
|
|
63718
|
+
if (regExp.ignoreCase) {
|
|
63719
|
+
flags += 'i';
|
|
63720
|
+
}
|
|
63721
|
+
if (regExp.multiline) {
|
|
63722
|
+
flags += 'm';
|
|
63723
|
+
}
|
|
63724
|
+
if (regExp.unicode) {
|
|
63725
|
+
flags += 'u';
|
|
63726
|
+
}
|
|
63727
|
+
if (regExp.sticky) {
|
|
63728
|
+
flags += 'y';
|
|
63729
|
+
}
|
|
63730
|
+
return flags;
|
|
63731
|
+
}
|
|
63732
|
+
function getRegExpFlagsModern(regExp) {
|
|
63733
|
+
return regExp.flags;
|
|
63734
|
+
}
|
|
63735
|
+
/**
|
|
63736
|
+
* Get the flags to apply to the copied regexp.
|
|
63737
|
+
*/
|
|
63738
|
+
var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
|
|
63739
|
+
function getTagLegacy(value) {
|
|
63740
|
+
var type = toStringObject.call(value);
|
|
63741
|
+
return type.substring(8, type.length - 1);
|
|
63742
|
+
}
|
|
63743
|
+
function getTagModern(value) {
|
|
63744
|
+
return value[Symbol.toStringTag] || getTagLegacy(value);
|
|
63745
|
+
}
|
|
63746
|
+
/**
|
|
63747
|
+
* Get the tag of the value passed, so that the correct copier can be used.
|
|
63748
|
+
*/
|
|
63749
|
+
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
|
63750
|
+
|
|
63751
|
+
var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
63752
|
+
var _a = Object.prototype, esm_hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
|
63753
|
+
var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
|
|
63754
|
+
function getStrictPropertiesModern(object) {
|
|
63755
|
+
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
|
63756
|
+
}
|
|
63757
|
+
/**
|
|
63758
|
+
* Get the properites used when copying objects strictly. This includes both keys and symbols.
|
|
63759
|
+
*/
|
|
63760
|
+
var getStrictProperties = SUPPORTS_SYMBOL
|
|
63761
|
+
? getStrictPropertiesModern
|
|
63762
|
+
: getOwnPropertyNames;
|
|
63763
|
+
/**
|
|
63764
|
+
* Striclty copy all properties contained on the object.
|
|
63765
|
+
*/
|
|
63766
|
+
function copyOwnPropertiesStrict(value, clone, state) {
|
|
63767
|
+
var properties = getStrictProperties(value);
|
|
63768
|
+
for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
|
|
63769
|
+
property = properties[index];
|
|
63770
|
+
if (property === 'callee' || property === 'caller') {
|
|
63771
|
+
continue;
|
|
63772
|
+
}
|
|
63773
|
+
descriptor = getOwnPropertyDescriptor(value, property);
|
|
63774
|
+
if (!descriptor) {
|
|
63775
|
+
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
|
63776
|
+
// the loose assignment.
|
|
63777
|
+
clone[property] = state.copier(value[property], state);
|
|
63778
|
+
continue;
|
|
63779
|
+
}
|
|
63780
|
+
// Only clone the value if actually a value, not a getter / setter.
|
|
63781
|
+
if (!descriptor.get && !descriptor.set) {
|
|
63782
|
+
descriptor.value = state.copier(descriptor.value, state);
|
|
63783
|
+
}
|
|
63784
|
+
try {
|
|
63785
|
+
defineProperty(clone, property, descriptor);
|
|
63786
|
+
}
|
|
63787
|
+
catch (error) {
|
|
63788
|
+
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
|
63789
|
+
clone[property] = descriptor.value;
|
|
63790
|
+
}
|
|
63791
|
+
}
|
|
63792
|
+
return clone;
|
|
63793
|
+
}
|
|
63794
|
+
/**
|
|
63795
|
+
* Deeply copy the indexed values in the array.
|
|
63796
|
+
*/
|
|
63797
|
+
function copyArrayLoose(array, state) {
|
|
63798
|
+
var clone = new state.Constructor();
|
|
63799
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63800
|
+
state.cache.set(array, clone);
|
|
63801
|
+
for (var index = 0, length_2 = array.length; index < length_2; ++index) {
|
|
63802
|
+
clone[index] = state.copier(array[index], state);
|
|
63803
|
+
}
|
|
63804
|
+
return clone;
|
|
63805
|
+
}
|
|
63806
|
+
/**
|
|
63807
|
+
* Deeply copy the indexed values in the array, as well as any custom properties.
|
|
63808
|
+
*/
|
|
63809
|
+
function copyArrayStrict(array, state) {
|
|
63810
|
+
var clone = new state.Constructor();
|
|
63811
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63812
|
+
state.cache.set(array, clone);
|
|
63813
|
+
return copyOwnPropertiesStrict(array, clone, state);
|
|
63814
|
+
}
|
|
63815
|
+
/**
|
|
63816
|
+
* Copy the contents of the ArrayBuffer.
|
|
63817
|
+
*/
|
|
63818
|
+
function copyArrayBuffer(arrayBuffer, _state) {
|
|
63819
|
+
return arrayBuffer.slice(0);
|
|
63820
|
+
}
|
|
63821
|
+
/**
|
|
63822
|
+
* Create a new Blob with the contents of the original.
|
|
63823
|
+
*/
|
|
63824
|
+
function copyBlob(blob, _state) {
|
|
63825
|
+
return blob.slice(0, blob.size, blob.type);
|
|
63826
|
+
}
|
|
63827
|
+
/**
|
|
63828
|
+
* Create a new DataView with the contents of the original.
|
|
63829
|
+
*/
|
|
63830
|
+
function copyDataView(dataView, state) {
|
|
63831
|
+
return new state.Constructor(copyArrayBuffer(dataView.buffer));
|
|
63832
|
+
}
|
|
63833
|
+
/**
|
|
63834
|
+
* Create a new Date based on the time of the original.
|
|
63835
|
+
*/
|
|
63836
|
+
function copyDate(date, state) {
|
|
63837
|
+
return new state.Constructor(date.getTime());
|
|
63838
|
+
}
|
|
63839
|
+
/**
|
|
63840
|
+
* Deeply copy the keys and values of the original.
|
|
63841
|
+
*/
|
|
63842
|
+
function copyMapLoose(map, state) {
|
|
63843
|
+
var clone = new state.Constructor();
|
|
63844
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63845
|
+
state.cache.set(map, clone);
|
|
63846
|
+
map.forEach(function (value, key) {
|
|
63847
|
+
clone.set(key, state.copier(value, state));
|
|
63848
|
+
});
|
|
63849
|
+
return clone;
|
|
63850
|
+
}
|
|
63851
|
+
/**
|
|
63852
|
+
* Deeply copy the keys and values of the original, as well as any custom properties.
|
|
63853
|
+
*/
|
|
63854
|
+
function copyMapStrict(map, state) {
|
|
63855
|
+
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
|
63856
|
+
}
|
|
63857
|
+
function copyObjectLooseLegacy(object, state) {
|
|
63858
|
+
var clone = getCleanClone(state.prototype);
|
|
63859
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63860
|
+
state.cache.set(object, clone);
|
|
63861
|
+
for (var key in object) {
|
|
63862
|
+
if (esm_hasOwnProperty.call(object, key)) {
|
|
63863
|
+
clone[key] = state.copier(object[key], state);
|
|
63864
|
+
}
|
|
63865
|
+
}
|
|
63866
|
+
return clone;
|
|
63867
|
+
}
|
|
63868
|
+
function copyObjectLooseModern(object, state) {
|
|
63869
|
+
var clone = getCleanClone(state.prototype);
|
|
63870
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63871
|
+
state.cache.set(object, clone);
|
|
63872
|
+
for (var key in object) {
|
|
63873
|
+
if (esm_hasOwnProperty.call(object, key)) {
|
|
63874
|
+
clone[key] = state.copier(object[key], state);
|
|
63875
|
+
}
|
|
63876
|
+
}
|
|
63877
|
+
var symbols = getOwnPropertySymbols(object);
|
|
63878
|
+
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
|
63879
|
+
symbol = symbols[index];
|
|
63880
|
+
if (propertyIsEnumerable.call(object, symbol)) {
|
|
63881
|
+
clone[symbol] = state.copier(object[symbol], state);
|
|
63882
|
+
}
|
|
63883
|
+
}
|
|
63884
|
+
return clone;
|
|
63885
|
+
}
|
|
63886
|
+
/**
|
|
63887
|
+
* Deeply copy the properties (keys and symbols) and values of the original.
|
|
63888
|
+
*/
|
|
63889
|
+
var copyObjectLoose = SUPPORTS_SYMBOL
|
|
63890
|
+
? copyObjectLooseModern
|
|
63891
|
+
: copyObjectLooseLegacy;
|
|
63892
|
+
/**
|
|
63893
|
+
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
|
63894
|
+
* as any hidden or non-enumerable properties.
|
|
63895
|
+
*/
|
|
63896
|
+
function copyObjectStrict(object, state) {
|
|
63897
|
+
var clone = getCleanClone(state.prototype);
|
|
63898
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63899
|
+
state.cache.set(object, clone);
|
|
63900
|
+
return copyOwnPropertiesStrict(object, clone, state);
|
|
63901
|
+
}
|
|
63902
|
+
/**
|
|
63903
|
+
* Create a new primitive wrapper from the value of the original.
|
|
63904
|
+
*/
|
|
63905
|
+
function copyPrimitiveWrapper(primitiveObject, state) {
|
|
63906
|
+
return new state.Constructor(primitiveObject.valueOf());
|
|
63907
|
+
}
|
|
63908
|
+
/**
|
|
63909
|
+
* Create a new RegExp based on the value and flags of the original.
|
|
63910
|
+
*/
|
|
63911
|
+
function copyRegExp(regExp, state) {
|
|
63912
|
+
var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
|
|
63913
|
+
clone.lastIndex = regExp.lastIndex;
|
|
63914
|
+
return clone;
|
|
63915
|
+
}
|
|
63916
|
+
/**
|
|
63917
|
+
* Return the original value (an identity function).
|
|
63918
|
+
*
|
|
63919
|
+
* @note
|
|
63920
|
+
* THis is used for objects that cannot be copied, such as WeakMap.
|
|
63921
|
+
*/
|
|
63922
|
+
function copySelf(value, _state) {
|
|
63923
|
+
return value;
|
|
63924
|
+
}
|
|
63925
|
+
/**
|
|
63926
|
+
* Deeply copy the values of the original.
|
|
63927
|
+
*/
|
|
63928
|
+
function copySetLoose(set, state) {
|
|
63929
|
+
var clone = new state.Constructor();
|
|
63930
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
63931
|
+
state.cache.set(set, clone);
|
|
63932
|
+
set.forEach(function (value) {
|
|
63933
|
+
clone.add(state.copier(value, state));
|
|
63934
|
+
});
|
|
63935
|
+
return clone;
|
|
63936
|
+
}
|
|
63937
|
+
/**
|
|
63938
|
+
* Deeply copy the values of the original, as well as any custom properties.
|
|
63939
|
+
*/
|
|
63940
|
+
function copySetStrict(set, state) {
|
|
63941
|
+
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
|
63942
|
+
}
|
|
63943
|
+
|
|
63944
|
+
var esm_isArray = Array.isArray;
|
|
63945
|
+
var esm_assign = Object.assign;
|
|
63946
|
+
var getPrototypeOf = Object.getPrototypeOf || (function (obj) { return obj.__proto__; });
|
|
63947
|
+
var DEFAULT_LOOSE_OPTIONS = {
|
|
63948
|
+
array: copyArrayLoose,
|
|
63949
|
+
arrayBuffer: copyArrayBuffer,
|
|
63950
|
+
blob: copyBlob,
|
|
63951
|
+
dataView: copyDataView,
|
|
63952
|
+
date: copyDate,
|
|
63953
|
+
error: copySelf,
|
|
63954
|
+
map: copyMapLoose,
|
|
63955
|
+
object: copyObjectLoose,
|
|
63956
|
+
regExp: copyRegExp,
|
|
63957
|
+
set: copySetLoose,
|
|
63958
|
+
};
|
|
63959
|
+
var DEFAULT_STRICT_OPTIONS = esm_assign({}, DEFAULT_LOOSE_OPTIONS, {
|
|
63960
|
+
array: copyArrayStrict,
|
|
63961
|
+
map: copyMapStrict,
|
|
63962
|
+
object: copyObjectStrict,
|
|
63963
|
+
set: copySetStrict,
|
|
63964
|
+
});
|
|
63965
|
+
/**
|
|
63966
|
+
* Get the copiers used for each specific object tag.
|
|
63967
|
+
*/
|
|
63968
|
+
function getTagSpecificCopiers(options) {
|
|
63969
|
+
return {
|
|
63970
|
+
Arguments: options.object,
|
|
63971
|
+
Array: options.array,
|
|
63972
|
+
ArrayBuffer: options.arrayBuffer,
|
|
63973
|
+
Blob: options.blob,
|
|
63974
|
+
Boolean: copyPrimitiveWrapper,
|
|
63975
|
+
DataView: options.dataView,
|
|
63976
|
+
Date: options.date,
|
|
63977
|
+
Error: options.error,
|
|
63978
|
+
Float32Array: options.arrayBuffer,
|
|
63979
|
+
Float64Array: options.arrayBuffer,
|
|
63980
|
+
Int8Array: options.arrayBuffer,
|
|
63981
|
+
Int16Array: options.arrayBuffer,
|
|
63982
|
+
Int32Array: options.arrayBuffer,
|
|
63983
|
+
Map: options.map,
|
|
63984
|
+
Number: copyPrimitiveWrapper,
|
|
63985
|
+
Object: options.object,
|
|
63986
|
+
Promise: copySelf,
|
|
63987
|
+
RegExp: options.regExp,
|
|
63988
|
+
Set: options.set,
|
|
63989
|
+
String: copyPrimitiveWrapper,
|
|
63990
|
+
WeakMap: copySelf,
|
|
63991
|
+
WeakSet: copySelf,
|
|
63992
|
+
Uint8Array: options.arrayBuffer,
|
|
63993
|
+
Uint8ClampedArray: options.arrayBuffer,
|
|
63994
|
+
Uint16Array: options.arrayBuffer,
|
|
63995
|
+
Uint32Array: options.arrayBuffer,
|
|
63996
|
+
Uint64Array: options.arrayBuffer,
|
|
63997
|
+
};
|
|
63998
|
+
}
|
|
63999
|
+
/**
|
|
64000
|
+
* Create a custom copier based on the object-specific copy methods passed.
|
|
64001
|
+
*/
|
|
64002
|
+
function createCopier(options) {
|
|
64003
|
+
var normalizedOptions = esm_assign({}, DEFAULT_LOOSE_OPTIONS, options);
|
|
64004
|
+
var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
|
|
64005
|
+
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
|
64006
|
+
function copier(value, state) {
|
|
64007
|
+
state.prototype = state.Constructor = undefined;
|
|
64008
|
+
if (!value || typeof value !== 'object') {
|
|
64009
|
+
return value;
|
|
64010
|
+
}
|
|
64011
|
+
if (state.cache.has(value)) {
|
|
64012
|
+
return state.cache.get(value);
|
|
64013
|
+
}
|
|
64014
|
+
state.prototype = getPrototypeOf(value);
|
|
64015
|
+
state.Constructor = state.prototype && state.prototype.constructor;
|
|
64016
|
+
// plain objects
|
|
64017
|
+
if (!state.Constructor || state.Constructor === Object) {
|
|
64018
|
+
return object(value, state);
|
|
64019
|
+
}
|
|
64020
|
+
// arrays
|
|
64021
|
+
if (esm_isArray(value)) {
|
|
64022
|
+
return array(value, state);
|
|
64023
|
+
}
|
|
64024
|
+
var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
|
|
64025
|
+
if (tagSpecificCopier) {
|
|
64026
|
+
return tagSpecificCopier(value, state);
|
|
64027
|
+
}
|
|
64028
|
+
return typeof value.then === 'function' ? value : object(value, state);
|
|
64029
|
+
}
|
|
64030
|
+
return function copy(value) {
|
|
64031
|
+
return copier(value, {
|
|
64032
|
+
Constructor: undefined,
|
|
64033
|
+
cache: createCache(),
|
|
64034
|
+
copier: copier,
|
|
64035
|
+
prototype: undefined,
|
|
64036
|
+
});
|
|
64037
|
+
};
|
|
64038
|
+
}
|
|
64039
|
+
/**
|
|
64040
|
+
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
|
64041
|
+
* same internals as `copyStrict`.
|
|
64042
|
+
*/
|
|
64043
|
+
function createStrictCopier(options) {
|
|
64044
|
+
return createCopier(esm_assign({}, DEFAULT_STRICT_OPTIONS, options));
|
|
64045
|
+
}
|
|
64046
|
+
/**
|
|
64047
|
+
* Copy an value deeply as much as possible, where strict recreation of object properties
|
|
64048
|
+
* are maintained. All properties (including non-enumerable ones) are copied with their
|
|
64049
|
+
* original property descriptors on both objects and arrays.
|
|
64050
|
+
*/
|
|
64051
|
+
var copyStrict = createStrictCopier({});
|
|
64052
|
+
/**
|
|
64053
|
+
* Copy an value deeply as much as possible.
|
|
64054
|
+
*/
|
|
64055
|
+
var esm_index = createCopier({});
|
|
64056
|
+
|
|
64057
|
+
|
|
64058
|
+
//# sourceMappingURL=index.mjs.map
|
|
64059
|
+
|
|
63616
64060
|
;// CONCATENATED MODULE: ../semi-foundation/overflowList/foundation.ts
|
|
63617
64061
|
|
|
63618
64062
|
|
|
63619
64063
|
|
|
63620
64064
|
|
|
64065
|
+
|
|
63621
64066
|
const Boundary = overflowList_constants_strings.BOUNDARY_MAP;
|
|
63622
64067
|
const OverflowDirection = overflowList_constants_strings.OVERFLOW_DIR;
|
|
63623
64068
|
class OverflowListFoundation extends foundation {
|
|
@@ -63648,7 +64093,8 @@ class OverflowListFoundation extends foundation {
|
|
|
63648
64093
|
if (!this.isScrollMode()) {
|
|
63649
64094
|
return overflow;
|
|
63650
64095
|
}
|
|
63651
|
-
const
|
|
64096
|
+
const cloneItems = esm_index(items);
|
|
64097
|
+
const visibleStateArr = cloneItems.map(_ref => {
|
|
63652
64098
|
let {
|
|
63653
64099
|
key
|
|
63654
64100
|
} = _ref;
|
|
@@ -63657,8 +64103,8 @@ class OverflowListFoundation extends foundation {
|
|
|
63657
64103
|
const visibleStart = visibleStateArr.indexOf(true);
|
|
63658
64104
|
const visibleEnd = visibleStateArr.lastIndexOf(true);
|
|
63659
64105
|
const overflowList = [];
|
|
63660
|
-
overflowList[0] = visibleStart >= 0 ?
|
|
63661
|
-
overflowList[1] = visibleEnd >= 0 ?
|
|
64106
|
+
overflowList[0] = visibleStart >= 0 ? cloneItems.slice(0, visibleStart) : [];
|
|
64107
|
+
overflowList[1] = visibleEnd >= 0 ? cloneItems.slice(visibleEnd + 1, cloneItems.length) : cloneItems;
|
|
63662
64108
|
return overflowList;
|
|
63663
64109
|
}
|
|
63664
64110
|
handleIntersect(entries) {
|
|
@@ -63957,8 +64403,8 @@ class OverflowList extends BaseComponent {
|
|
|
63957
64403
|
maxCount = Math.min(maxCount, Math.floor(prevState.containerWidth / overflowList_constants_numbers.MINIMUM_HTML_ELEMENT_WIDTH));
|
|
63958
64404
|
}
|
|
63959
64405
|
const isCollapseFromStart = props.collapseFrom === overflowList_Boundary.START;
|
|
63960
|
-
const visible = isCollapseFromStart ?
|
|
63961
|
-
const overflow = isCollapseFromStart ?
|
|
64406
|
+
const visible = isCollapseFromStart ? esm_index(props.items).reverse().slice(0, maxCount) : props.items.slice(0, maxCount);
|
|
64407
|
+
const overflow = isCollapseFromStart ? esm_index(props.items).reverse().slice(maxCount) : props.items.slice(maxCount);
|
|
63962
64408
|
newState.visible = visible;
|
|
63963
64409
|
newState.overflow = overflow;
|
|
63964
64410
|
newState.maxCount = maxCount;
|
|
@@ -78171,6 +78617,12 @@ class TableCell extends BaseComponent {
|
|
|
78171
78617
|
expandIcon
|
|
78172
78618
|
} = props;
|
|
78173
78619
|
const cellInSelectionColumn = isSelectionColumn(column);
|
|
78620
|
+
const {
|
|
78621
|
+
shouldCellUpdate
|
|
78622
|
+
} = column;
|
|
78623
|
+
if (typeof shouldCellUpdate === 'function') {
|
|
78624
|
+
return shouldCellUpdate(nextProps, props);
|
|
78625
|
+
}
|
|
78174
78626
|
// The expand button may be in a separate column or in the first data column
|
|
78175
78627
|
const columnHasExpandIcon = isExpandedColumn(column) || expandIcon;
|
|
78176
78628
|
if ((cellInSelectionColumn || columnHasExpandIcon) && !isEqual_default()(nextProps, this.props)) {
|