@douyinfe/semi-ui 2.38.2-alpha.2 → 2.38.2-alpha.2-patch-modal
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/css/semi.css +45 -2
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +318 -299
- 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/collapsible/index.d.ts +2 -0
- package/lib/cjs/collapsible/index.js +19 -11
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/dropdown/dropdownItem.js +11 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/modal/Modal.js +9 -6
- package/lib/cjs/modal/ModalContent.js +5 -4
- package/lib/cjs/modal/confirm.d.ts +16 -16
- package/lib/cjs/scrollList/scrollItem.js +1 -1
- package/lib/cjs/select/option.js +2 -1
- package/lib/cjs/spin/icon.js +14 -51
- package/lib/cjs/table/TableCell.js +7 -1
- package/lib/cjs/table/interface.d.ts +9 -0
- package/lib/cjs/tooltip/index.js +0 -7
- package/lib/cjs/treeSelect/index.d.ts +1 -1
- package/lib/cjs/treeSelect/index.js +2 -2
- package/lib/es/collapsible/index.d.ts +2 -0
- package/lib/es/collapsible/index.js +19 -11
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/dropdown/dropdownItem.js +11 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/modal/Modal.js +9 -6
- package/lib/es/modal/ModalContent.js +5 -4
- package/lib/es/modal/confirm.d.ts +16 -16
- package/lib/es/scrollList/scrollItem.js +1 -1
- package/lib/es/select/option.js +2 -1
- package/lib/es/spin/icon.js +14 -51
- package/lib/es/table/TableCell.js +7 -1
- package/lib/es/table/interface.d.ts +9 -0
- package/lib/es/tooltip/index.js +0 -7
- package/lib/es/treeSelect/index.d.ts +1 -1
- package/lib/es/treeSelect/index.js +2 -2
- package/package.json +8 -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
|
|
|
@@ -18105,9 +18148,7 @@ class Event {
|
|
|
18105
18148
|
if (!this._eventMap.has(event)) {
|
|
18106
18149
|
return false;
|
|
18107
18150
|
}
|
|
18108
|
-
|
|
18109
|
-
// clone to avoid someone writing the logic of deleting callback in callbacks into his or her callback code, for example the once func above
|
|
18110
|
-
callbacks.forEach(callback => callback(...args));
|
|
18151
|
+
this._eventMap.get(event).forEach(callback => callback(...args));
|
|
18111
18152
|
return true;
|
|
18112
18153
|
}
|
|
18113
18154
|
}
|
|
@@ -18315,16 +18356,6 @@ class foundation_Tooltip extends foundation {
|
|
|
18315
18356
|
this.show = () => {
|
|
18316
18357
|
const content = this.getProp('content');
|
|
18317
18358
|
const trigger = this.getProp('trigger');
|
|
18318
|
-
if (trigger === "hover") {
|
|
18319
|
-
const checkTriggerIsHover = () => {
|
|
18320
|
-
const triggerDOM = this._adapter.getTriggerDOM();
|
|
18321
|
-
if (trigger && !triggerDOM.matches(":hover")) {
|
|
18322
|
-
this.hide();
|
|
18323
|
-
}
|
|
18324
|
-
this._adapter.off("portalInserted", checkTriggerIsHover);
|
|
18325
|
-
};
|
|
18326
|
-
this._adapter.on('portalInserted', checkTriggerIsHover);
|
|
18327
|
-
}
|
|
18328
18359
|
const clickTriggerToHide = this.getProp('clickTriggerToHide');
|
|
18329
18360
|
const {
|
|
18330
18361
|
visible,
|
|
@@ -18502,6 +18533,7 @@ class foundation_Tooltip extends foundation {
|
|
|
18502
18533
|
this._adapter.unregisterClickOutsideHandler();
|
|
18503
18534
|
this.unBindResizeEvent();
|
|
18504
18535
|
this.unBindScrollEvent();
|
|
18536
|
+
clearTimeout(this._timer);
|
|
18505
18537
|
}
|
|
18506
18538
|
_bindTriggerEvent(triggerEventSet) {
|
|
18507
18539
|
this._adapter.registerTriggerEvent(triggerEventSet);
|
|
@@ -20611,13 +20643,6 @@ class Tooltip extends BaseComponent {
|
|
|
20611
20643
|
this.setState({
|
|
20612
20644
|
id: getUuidShort()
|
|
20613
20645
|
});
|
|
20614
|
-
},
|
|
20615
|
-
getTriggerDOM: () => {
|
|
20616
|
-
if (this.triggerEl.current) {
|
|
20617
|
-
return external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this.triggerEl.current);
|
|
20618
|
-
} else {
|
|
20619
|
-
return null;
|
|
20620
|
-
}
|
|
20621
20646
|
}
|
|
20622
20647
|
});
|
|
20623
20648
|
}
|
|
@@ -27070,65 +27095,28 @@ var icon_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
27070
27095
|
};
|
|
27071
27096
|
/* eslint-disable no-unused-vars */
|
|
27072
27097
|
|
|
27073
|
-
|
|
27074
|
-
let _id = -1;
|
|
27075
27098
|
function icon_Icon() {
|
|
27076
27099
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27077
27100
|
const {
|
|
27078
|
-
id
|
|
27101
|
+
id,
|
|
27079
27102
|
className
|
|
27080
27103
|
} = props,
|
|
27081
27104
|
rest = icon_rest(props, ["id", "className"]);
|
|
27082
|
-
let _propsId = propsId;
|
|
27083
|
-
if (isNullOrUndefined(_propsId)) {
|
|
27084
|
-
_id++;
|
|
27085
|
-
_propsId = _id;
|
|
27086
|
-
}
|
|
27087
|
-
const id = `linearGradient-${_propsId}`;
|
|
27088
27105
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", Object.assign({}, rest, {
|
|
27089
27106
|
className: className,
|
|
27090
|
-
width: "
|
|
27091
|
-
height: "
|
|
27092
|
-
viewBox: "0 0
|
|
27093
|
-
|
|
27094
|
-
|
|
27095
|
-
"
|
|
27096
|
-
|
|
27097
|
-
|
|
27098
|
-
|
|
27099
|
-
|
|
27100
|
-
|
|
27101
|
-
|
|
27102
|
-
|
|
27103
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("stop", {
|
|
27104
|
-
stopColor: "currentColor",
|
|
27105
|
-
stopOpacity: "0",
|
|
27106
|
-
offset: "0%"
|
|
27107
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("stop", {
|
|
27108
|
-
stopColor: "currentColor",
|
|
27109
|
-
stopOpacity: "0.50",
|
|
27110
|
-
offset: "39.9430698%"
|
|
27111
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("stop", {
|
|
27112
|
-
stopColor: "currentColor",
|
|
27113
|
-
offset: "100%"
|
|
27114
|
-
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("g", {
|
|
27115
|
-
stroke: "none",
|
|
27116
|
-
strokeWidth: "1",
|
|
27117
|
-
fill: "none",
|
|
27118
|
-
fillRule: "evenodd"
|
|
27119
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", {
|
|
27120
|
-
fillOpacity: "0.01",
|
|
27121
|
-
fill: "none",
|
|
27122
|
-
x: "0",
|
|
27123
|
-
y: "0",
|
|
27124
|
-
width: "36",
|
|
27125
|
-
height: "36"
|
|
27126
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
27127
|
-
d: "M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",
|
|
27128
|
-
stroke: `url(#${id})`,
|
|
27129
|
-
strokeWidth: "4",
|
|
27130
|
-
strokeLinecap: "round"
|
|
27131
|
-
})));
|
|
27107
|
+
width: "100%",
|
|
27108
|
+
height: "100%",
|
|
27109
|
+
viewBox: "0 0 100 100"
|
|
27110
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("circle", {
|
|
27111
|
+
cx: "50",
|
|
27112
|
+
cy: "50",
|
|
27113
|
+
r: "35",
|
|
27114
|
+
stroke: "currentColor",
|
|
27115
|
+
strokeWidth: "11",
|
|
27116
|
+
strokeLinecap: "round",
|
|
27117
|
+
strokeMiterlimit: "10",
|
|
27118
|
+
fill: "none"
|
|
27119
|
+
}));
|
|
27132
27120
|
}
|
|
27133
27121
|
/* harmony default export */ const spin_icon = (icon_Icon);
|
|
27134
27122
|
// EXTERNAL MODULE: ../semi-foundation/spin/spin.scss
|
|
@@ -44234,6 +44222,7 @@ var collapsible = __webpack_require__("v967");
|
|
|
44234
44222
|
|
|
44235
44223
|
|
|
44236
44224
|
|
|
44225
|
+
|
|
44237
44226
|
class Collapsible extends BaseComponent {
|
|
44238
44227
|
constructor(props) {
|
|
44239
44228
|
super(props);
|
|
@@ -44257,7 +44246,8 @@ class Collapsible extends BaseComponent {
|
|
|
44257
44246
|
domInRenderTree: false,
|
|
44258
44247
|
domHeight: 0,
|
|
44259
44248
|
visible: this.props.isOpen,
|
|
44260
|
-
isTransitioning: false
|
|
44249
|
+
isTransitioning: false,
|
|
44250
|
+
cacheIsOpen: this.props.isOpen
|
|
44261
44251
|
};
|
|
44262
44252
|
this.foundation = new collapsible_foundation(this.adapter);
|
|
44263
44253
|
}
|
|
@@ -44293,6 +44283,20 @@ class Collapsible extends BaseComponent {
|
|
|
44293
44283
|
}
|
|
44294
44284
|
});
|
|
44295
44285
|
}
|
|
44286
|
+
static getDerivedStateFromProps(props, prevState) {
|
|
44287
|
+
const newState = {};
|
|
44288
|
+
const isOpenChanged = props.isOpen !== prevState.cacheIsOpen;
|
|
44289
|
+
if (isOpenChanged) {
|
|
44290
|
+
if (props.isOpen || !props.motion) {
|
|
44291
|
+
newState.visible = props.isOpen;
|
|
44292
|
+
}
|
|
44293
|
+
}
|
|
44294
|
+
if (props.motion && isOpenChanged) {
|
|
44295
|
+
newState.isTransitioning = true;
|
|
44296
|
+
}
|
|
44297
|
+
newState.cacheIsOpen = props.isOpen;
|
|
44298
|
+
return newState;
|
|
44299
|
+
}
|
|
44296
44300
|
componentDidMount() {
|
|
44297
44301
|
super.componentDidMount();
|
|
44298
44302
|
this.resizeObserver = new ResizeObserver(this.handleResize);
|
|
@@ -44304,22 +44308,14 @@ class Collapsible extends BaseComponent {
|
|
|
44304
44308
|
}
|
|
44305
44309
|
}
|
|
44306
44310
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
44307
|
-
const changedPropKeys = Object.keys(this.props).filter(key => !isEqual_default()(this.props[key], prevProps[key]));
|
|
44308
|
-
const changedStateKeys = Object.keys(this.state).filter(key => !isEqual_default()(this.state[key], prevState[key]));
|
|
44311
|
+
const changedPropKeys = Object.keys(pick_default()(this.props, ['reCalcKey'])).filter(key => !isEqual_default()(this.props[key], prevProps[key]));
|
|
44312
|
+
const changedStateKeys = Object.keys(pick_default()(this.state, ['domInRenderTree'])).filter(key => !isEqual_default()(this.state[key], prevState[key]));
|
|
44309
44313
|
if (changedPropKeys.includes("reCalcKey")) {
|
|
44310
44314
|
this.foundation.updateDOMHeight(this.domRef.current.scrollHeight);
|
|
44311
44315
|
}
|
|
44312
44316
|
if (changedStateKeys.includes("domInRenderTree") && this.state.domInRenderTree) {
|
|
44313
44317
|
this.foundation.updateDOMHeight(this.domRef.current.scrollHeight);
|
|
44314
44318
|
}
|
|
44315
|
-
if (changedPropKeys.includes("isOpen")) {
|
|
44316
|
-
if (this.props.isOpen || !this.props.motion) {
|
|
44317
|
-
this.foundation.updateVisible(this.props.isOpen);
|
|
44318
|
-
}
|
|
44319
|
-
}
|
|
44320
|
-
if (this.props.motion && prevProps.isOpen !== this.props.isOpen) {
|
|
44321
|
-
this.foundation.updateIsTransitioning(true);
|
|
44322
|
-
}
|
|
44323
44319
|
}
|
|
44324
44320
|
componentWillUnmount() {
|
|
44325
44321
|
super.componentWillUnmount();
|
|
@@ -53419,8 +53415,8 @@ class ScrollItem extends BaseComponent {
|
|
|
53419
53415
|
key: prefixKey + index
|
|
53420
53416
|
}, events, {
|
|
53421
53417
|
className: cls,
|
|
53418
|
+
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
53422
53419
|
role: "option",
|
|
53423
|
-
"aria-selected": selected,
|
|
53424
53420
|
"aria-disabled": item.disabled
|
|
53425
53421
|
}), text)
|
|
53426
53422
|
);
|
|
@@ -57153,20 +57149,21 @@ class ModalContent extends BaseComponent {
|
|
|
57153
57149
|
this.foundation.destroy();
|
|
57154
57150
|
}
|
|
57155
57151
|
render() {
|
|
57156
|
-
|
|
57152
|
+
var _a;
|
|
57153
|
+
const _b = this.props,
|
|
57157
57154
|
{
|
|
57158
57155
|
maskClosable,
|
|
57159
57156
|
className,
|
|
57160
57157
|
getPopupContainer,
|
|
57161
57158
|
maskFixed,
|
|
57162
57159
|
getContainerContext
|
|
57163
|
-
} =
|
|
57164
|
-
rest = ModalContent_rest(
|
|
57160
|
+
} = _b,
|
|
57161
|
+
rest = ModalContent_rest(_b, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
|
|
57165
57162
|
const {
|
|
57166
57163
|
direction
|
|
57167
57164
|
} = this.context;
|
|
57168
57165
|
const classList = classnames_default()(className, {
|
|
57169
|
-
[`${modal_constants_cssClasses.DIALOG}-popup`]: getPopupContainer && !maskFixed,
|
|
57166
|
+
[`${modal_constants_cssClasses.DIALOG}-popup`]: getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body) && !maskFixed,
|
|
57170
57167
|
[`${modal_constants_cssClasses.DIALOG}-fixed`]: maskFixed,
|
|
57171
57168
|
[`${modal_constants_cssClasses.DIALOG}-rtl`]: direction === 'rtl'
|
|
57172
57169
|
});
|
|
@@ -57567,7 +57564,8 @@ class Modal extends BaseComponent {
|
|
|
57567
57564
|
// return <ModalContent {...restProps} footer={renderFooter} onClose={this.handleCancel}/>;
|
|
57568
57565
|
// };
|
|
57569
57566
|
this.renderDialog = () => {
|
|
57570
|
-
|
|
57567
|
+
var _a;
|
|
57568
|
+
let _b = this.props,
|
|
57571
57569
|
{
|
|
57572
57570
|
footer,
|
|
57573
57571
|
className,
|
|
@@ -57578,15 +57576,15 @@ class Modal extends BaseComponent {
|
|
|
57578
57576
|
zIndex,
|
|
57579
57577
|
getPopupContainer,
|
|
57580
57578
|
visible
|
|
57581
|
-
} =
|
|
57582
|
-
restProps = Modal_rest(
|
|
57579
|
+
} = _b,
|
|
57580
|
+
restProps = Modal_rest(_b, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
|
|
57583
57581
|
let style = styleFromProps;
|
|
57584
57582
|
const maskStyle = maskStyleFromProps;
|
|
57585
57583
|
const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
|
|
57586
57584
|
let wrapperStyle = {
|
|
57587
57585
|
zIndex
|
|
57588
57586
|
};
|
|
57589
|
-
if (getPopupContainer) {
|
|
57587
|
+
if (getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) {
|
|
57590
57588
|
wrapperStyle = {
|
|
57591
57589
|
zIndex,
|
|
57592
57590
|
position: 'static'
|
|
@@ -57657,20 +57655,22 @@ class Modal extends BaseComponent {
|
|
|
57657
57655
|
return Object.assign(Object.assign({}, super.adapter), {
|
|
57658
57656
|
getProps: () => this.props,
|
|
57659
57657
|
disabledBodyScroll: () => {
|
|
57658
|
+
var _a;
|
|
57660
57659
|
const {
|
|
57661
57660
|
getPopupContainer
|
|
57662
57661
|
} = this.props;
|
|
57663
57662
|
this.bodyOverflow = document.body.style.overflow || '';
|
|
57664
|
-
if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
|
|
57663
|
+
if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== 'hidden') {
|
|
57665
57664
|
document.body.style.overflow = 'hidden';
|
|
57666
57665
|
document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
|
|
57667
57666
|
}
|
|
57668
57667
|
},
|
|
57669
57668
|
enabledBodyScroll: () => {
|
|
57669
|
+
var _a;
|
|
57670
57670
|
const {
|
|
57671
57671
|
getPopupContainer
|
|
57672
57672
|
} = this.props;
|
|
57673
|
-
if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
|
|
57673
|
+
if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== null && this.bodyOverflow !== 'hidden') {
|
|
57674
57674
|
document.body.style.overflow = this.bodyOverflow;
|
|
57675
57675
|
document.body.style.width = this.originBodyWidth;
|
|
57676
57676
|
}
|
|
@@ -58074,7 +58074,17 @@ class DropdownItem extends BaseComponent {
|
|
|
58074
58074
|
const events = {};
|
|
58075
58075
|
if (!disabled) {
|
|
58076
58076
|
['onClick', 'onMouseEnter', 'onMouseLeave', 'onContextMenu'].forEach(eventName => {
|
|
58077
|
-
|
|
58077
|
+
const isInAnotherDropdown = this.context.level !== 1;
|
|
58078
|
+
if (isInAnotherDropdown && eventName === "onClick") {
|
|
58079
|
+
events["onMouseDown"] = e => {
|
|
58080
|
+
var _a, _b;
|
|
58081
|
+
if (e.button === 0) {
|
|
58082
|
+
(_b = (_a = this.props)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
58083
|
+
}
|
|
58084
|
+
};
|
|
58085
|
+
} else {
|
|
58086
|
+
events[eventName] = this.props[eventName];
|
|
58087
|
+
}
|
|
58078
58088
|
});
|
|
58079
58089
|
}
|
|
58080
58090
|
let tick = null;
|
|
@@ -61466,7 +61476,9 @@ class SubNavFoundation extends foundation {
|
|
|
61466
61476
|
// this.log('invoke SubNavFoundation init()');
|
|
61467
61477
|
this._timer = null;
|
|
61468
61478
|
}
|
|
61469
|
-
destroy() {
|
|
61479
|
+
destroy() {
|
|
61480
|
+
this.clearDelayTimer();
|
|
61481
|
+
}
|
|
61470
61482
|
clearDelayTimer() {
|
|
61471
61483
|
if (this._timer) {
|
|
61472
61484
|
clearTimeout(this._timer);
|
|
@@ -67884,7 +67896,8 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
67884
67896
|
value,
|
|
67885
67897
|
label,
|
|
67886
67898
|
children
|
|
67887
|
-
}, rest), e)
|
|
67899
|
+
}, rest), e),
|
|
67900
|
+
className
|
|
67888
67901
|
}, rest));
|
|
67889
67902
|
}
|
|
67890
67903
|
const config = {
|
|
@@ -78179,6 +78192,12 @@ class TableCell extends BaseComponent {
|
|
|
78179
78192
|
expandIcon
|
|
78180
78193
|
} = props;
|
|
78181
78194
|
const cellInSelectionColumn = isSelectionColumn(column);
|
|
78195
|
+
const {
|
|
78196
|
+
shouldCellUpdate
|
|
78197
|
+
} = column;
|
|
78198
|
+
if (typeof shouldCellUpdate === 'function') {
|
|
78199
|
+
return shouldCellUpdate(nextProps, props);
|
|
78200
|
+
}
|
|
78182
78201
|
// The expand button may be in a separate column or in the first data column
|
|
78183
78202
|
const columnHasExpandIcon = isExpandedColumn(column) || expandIcon;
|
|
78184
78203
|
if ((cellInSelectionColumn || columnHasExpandIcon) && !isEqual_default()(nextProps, this.props)) {
|
|
@@ -87585,7 +87604,7 @@ class TreeSelect extends BaseComponent {
|
|
|
87585
87604
|
} = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
|
|
87586
87605
|
index,
|
|
87587
87606
|
onClose
|
|
87588
|
-
}) :
|
|
87607
|
+
}) : {};
|
|
87589
87608
|
if (isNull_default()(content) || isUndefined_default()(content)) {
|
|
87590
87609
|
return;
|
|
87591
87610
|
}
|
|
@@ -87883,7 +87902,7 @@ class TreeSelect extends BaseComponent {
|
|
|
87883
87902
|
} = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
|
|
87884
87903
|
index: idx,
|
|
87885
87904
|
onClose
|
|
87886
|
-
}) :
|
|
87905
|
+
}) : {};
|
|
87887
87906
|
if (isRenderInTag) {
|
|
87888
87907
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, Object.assign({}, tagProps), content);
|
|
87889
87908
|
} else {
|