@kep-platform/basic-component 0.0.47 → 0.0.49

Sign up to get free protection for your applications and to get access to all the features.
@@ -119,7 +119,7 @@ var ViewPortComponent = observer(function (props) {
119
119
  ref: containerRef
120
120
  }, rest), /*#__PURE__*/React.createElement(Overlay, {
121
121
  style: viewPortStore.overlayStyle
122
- }), /*#__PURE__*/React.createElement(Content, _extends({
122
+ }), rippleManagerStore.rippleInfo, /*#__PURE__*/React.createElement(Content, _extends({
123
123
  ref: function ref(dom) {
124
124
  contentRef.current = dom;
125
125
  setNodeRef(contentRef.current);
@@ -66,14 +66,12 @@ export var ViewPortStore = /*#__PURE__*/function () {
66
66
  value: function increaseScale() {
67
67
  this.setScale(this.scale + this.scaleStep);
68
68
  this.setTransform(this.transform.left, this.transform.top);
69
- this.isTransition = true;
70
69
  }
71
70
  }, {
72
71
  key: "decreaseScale",
73
72
  value: function decreaseScale() {
74
73
  this.setScale(this.scale - this.scaleStep);
75
74
  this.setTransform(this.transform.left, this.transform.top);
76
- this.isTransition = true;
77
75
  }
78
76
  }, {
79
77
  key: "validScale",
@@ -70,12 +70,15 @@ export default observer(function Test() {
70
70
  }, "\u65B0\u589E"), /*#__PURE__*/React.createElement(DndContext, null, /*#__PURE__*/React.createElement(StyledViewPort, {
71
71
  viewPortStore: viewPortStore
72
72
  }, windowManager.windows.map(function (windowStore) {
73
- return /*#__PURE__*/React.createElement(DndContext, {
74
- key: windowStore.id
75
- }, /*#__PURE__*/React.createElement(ViewPort.Window, {
73
+ return /*#__PURE__*/React.createElement(ViewPort.Window, {
76
74
  window: windowStore,
77
75
  key: windowStore.id,
78
76
  title: 'xixi'
79
- }, /*#__PURE__*/React.createElement("br", null)));
77
+ }, /*#__PURE__*/React.createElement("div", {
78
+ style: {
79
+ height: '2000px',
80
+ backgroundColor: 'pink'
81
+ }
82
+ }));
80
83
  }))));
81
84
  });
@@ -47,7 +47,9 @@ var Window = observer(function (props) {
47
47
  function stopWheel(e) {
48
48
  e.stopPropagation();
49
49
  }
50
- (_windowContainerRef$c = windowContainerRef.current) === null || _windowContainerRef$c === void 0 || _windowContainerRef$c.addEventListener('wheel', stopWheel);
50
+ (_windowContainerRef$c = windowContainerRef.current) === null || _windowContainerRef$c === void 0 || _windowContainerRef$c.addEventListener('wheel', stopWheel, {
51
+ passive: false
52
+ });
51
53
  return function () {
52
54
  var _windowContainerRef$c2;
53
55
  (_windowContainerRef$c2 = windowContainerRef.current) === null || _windowContainerRef$c2 === void 0 || _windowContainerRef$c2.removeEventListener('wheel', stopWheel);
@@ -56,12 +58,12 @@ var Window = observer(function (props) {
56
58
 
57
59
  /* style 的原因是因为性能问题 */
58
60
  return /*#__PURE__*/React.createElement(WindowContainer, {
61
+ ref: windowContainerRef,
59
62
  style: window.style,
60
63
  isMinimize: !!window.isMinimize,
61
64
  onTransitionEnd: function onTransitionEnd(e) {
62
65
  e.stopPropagation();
63
- e.preventDefault();
64
- if (e.target === e.currentTarget && e.propertyName === 'transform') {
66
+ if (e.target === e.currentTarget) {
65
67
  runInAction(function () {
66
68
  window.isTransition = false;
67
69
  });
@@ -4,7 +4,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
4
4
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
5
  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; }
6
6
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
7
- import { DndContext, useDraggable } from '@dnd-kit/core';
7
+ import { useDraggable } from '@dnd-kit/core';
8
8
  import { observer } from 'mobx-react-lite';
9
9
  import React, { useEffect } from 'react';
10
10
  import styled from 'styled-components';
@@ -29,8 +29,8 @@ export default observer(function WindowController(props) {
29
29
  window.endControll();
30
30
  }
31
31
  }, [transform, isDragging, type]);
32
- return /*#__PURE__*/React.createElement(DndContext, null, /*#__PURE__*/React.createElement(WindowControllerContainer, _extends({}, rest, attributes, listeners, {
32
+ return /*#__PURE__*/React.createElement(WindowControllerContainer, _extends({}, rest, attributes, listeners, {
33
33
  ref: setNodeRef,
34
34
  role: "div"
35
- }), children));
35
+ }), children);
36
36
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kep-platform/basic-component",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@ant-design/icons": "^5.3.7",
50
- "@kep-platform/hooks": "^0.0.47",
50
+ "@kep-platform/hooks": "^0.0.49",
51
51
  "color": "^4.2.3",
52
52
  "rc-pagination": "^4.1.0"
53
53
  },
@@ -87,5 +87,5 @@
87
87
  "authors": [
88
88
  "less-step-jss 1599925910@qq.com"
89
89
  ],
90
- "gitHead": "4d341942ad974a956b2eee087f28518e33425173"
90
+ "gitHead": "96bc6255ffe9cdfde9788e0790c92e7c09e48f57"
91
91
  }