shineout 3.9.0-beta.12 → 3.9.0-beta.13
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/cjs/index.js +1 -1
- package/dist/shineout.js +19 -27
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.9.0-beta.
|
|
525
|
+
version: '3.9.0-beta.13'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12386
12386
|
};
|
|
12387
12387
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12388
12388
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12389
|
-
/* harmony default export */ var version = ('3.9.0-beta.
|
|
12389
|
+
/* harmony default export */ var version = ('3.9.0-beta.13');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -49532,20 +49532,10 @@ var addModalInstance = function addModalInstance(instanceId) {
|
|
|
49532
49532
|
modal_content_state.mutate.instanceIds.push(instanceId);
|
|
49533
49533
|
};
|
|
49534
49534
|
var addModalCascadeConfig = function addModalCascadeConfig(props) {
|
|
49535
|
-
var width = props.width;
|
|
49536
|
-
var widthNumber = 0;
|
|
49537
|
-
// width 是30% 这种格式的,转为number
|
|
49538
|
-
if (typeof width === 'string' && width.indexOf('%') > -1) {
|
|
49539
|
-
var parentWidth = document.body.clientWidth;
|
|
49540
|
-
var percent = parseInt(width, 10);
|
|
49541
|
-
widthNumber = parentWidth * percent / 100;
|
|
49542
|
-
} else {
|
|
49543
|
-
widthNumber = typeof width === 'number' ? width : parseInt(width, 10) || 0;
|
|
49544
|
-
}
|
|
49545
49535
|
modal_content_state.mutate.cascadeConfigs.push({
|
|
49546
49536
|
cascade: props.cascade,
|
|
49547
|
-
|
|
49548
|
-
|
|
49537
|
+
cascadeWidth: props.cascadeWidth,
|
|
49538
|
+
instanceId: props.instanceId
|
|
49549
49539
|
});
|
|
49550
49540
|
};
|
|
49551
49541
|
var removeModalInstance = function removeModalInstance(instanceId) {
|
|
@@ -49648,8 +49638,8 @@ var Modal = function Modal(props) {
|
|
|
49648
49638
|
addModalInstance(context.instanceId);
|
|
49649
49639
|
addModalCascadeConfig({
|
|
49650
49640
|
instanceId: context.instanceId,
|
|
49651
|
-
|
|
49652
|
-
|
|
49641
|
+
cascade: !!props.cascade && !!isPositionX,
|
|
49642
|
+
cascadeWidth: typeof_default()(props.cascade) === 'object' ? props.cascade.width || 180 : 180
|
|
49653
49643
|
});
|
|
49654
49644
|
}
|
|
49655
49645
|
if (!visible && index > -1 && !animation) {
|
|
@@ -49871,20 +49861,22 @@ var Modal = function Modal(props) {
|
|
|
49871
49861
|
};
|
|
49872
49862
|
if (!context.renderEd && !visible) return null;
|
|
49873
49863
|
context.renderEd = true;
|
|
49874
|
-
var
|
|
49864
|
+
var cascadeStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
49875
49865
|
if (!props.cascade) return;
|
|
49876
49866
|
var idx = config.instanceIds.findIndex(function (id) {
|
|
49877
49867
|
return id === context.instanceId;
|
|
49878
49868
|
});
|
|
49879
|
-
var
|
|
49880
|
-
|
|
49881
|
-
|
|
49882
|
-
|
|
49883
|
-
|
|
49884
|
-
|
|
49885
|
-
|
|
49886
|
-
|
|
49887
|
-
|
|
49869
|
+
var instance = 0;
|
|
49870
|
+
var curCascadeConfig = config.cascadeConfigs.find(function (c) {
|
|
49871
|
+
return c.instanceId === context.instanceId;
|
|
49872
|
+
});
|
|
49873
|
+
if (curCascadeConfig && idx < config.cascadeConfigs.length - 1) {
|
|
49874
|
+
instance = curCascadeConfig.cascadeWidth;
|
|
49875
|
+
}
|
|
49876
|
+
return {
|
|
49877
|
+
transform: props.position === 'left' ? "translateX(".concat(instance, "px)") : "translateX(-".concat(instance, "px)"),
|
|
49878
|
+
transition: instance ? 'transform 0.3s ease 0.05s' : 'transform 0.2s ease'
|
|
49879
|
+
};
|
|
49888
49880
|
}, [config.cascadeConfigs, config.instanceIds]);
|
|
49889
49881
|
var panelStyle = objectSpread2_default()(objectSpread2_default()({
|
|
49890
49882
|
transformOrigin: origin,
|
|
@@ -49892,7 +49884,7 @@ var Modal = function Modal(props) {
|
|
|
49892
49884
|
}, props.style), {}, {
|
|
49893
49885
|
width: props.fullScreen ? undefined : width,
|
|
49894
49886
|
height: props.fullScreen ? undefined : height
|
|
49895
|
-
},
|
|
49887
|
+
}, cascadeStyle);
|
|
49896
49888
|
if (props.resizable) {
|
|
49897
49889
|
panelStyle.width = resizeInfo.width;
|
|
49898
49890
|
panelStyle.height = resizeInfo.height;
|
|
@@ -73611,7 +73603,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
73611
73603
|
|
|
73612
73604
|
|
|
73613
73605
|
/* harmony default export */ var src_0 = ({
|
|
73614
|
-
version: '3.9.0-beta.
|
|
73606
|
+
version: '3.9.0-beta.13'
|
|
73615
73607
|
});
|
|
73616
73608
|
}();
|
|
73617
73609
|
/******/ return __webpack_exports__;
|