@gravity-ui/dashkit 6.4.0 → 6.5.0-beta.0

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.
@@ -21,7 +21,6 @@ interface DashKitDefaultProps {
21
21
  settings: SettingsProps;
22
22
  context: ContextProps;
23
23
  noOverlay: boolean;
24
- _experimentDisableItemAnimation: boolean;
25
24
  }
26
25
  export interface DashKitProps extends DashKitGeneralProps, Partial<DashKitDefaultProps> {
27
26
  }
@@ -68,5 +68,4 @@ DashKit.defaultProps = {
68
68
  },
69
69
  context: {},
70
70
  noOverlay: false,
71
- _experimentDisableItemAnimation: false,
72
71
  };
@@ -30,14 +30,6 @@
30
30
  transition: height 200ms ease;
31
31
  }
32
32
 
33
- .react-grid-item {
34
- transition: all 200ms ease;
35
- transition-property: left, top;
36
- }
37
- .react-grid-item.dashkit-grid-item_disable-animation {
38
- transition: none;
39
- }
40
-
41
33
  .react-grid-item.cssTransforms {
42
34
  transition-property: transform;
43
35
  }
@@ -25,7 +25,7 @@ class GridItem extends react_1.default.PureComponent {
25
25
  // из-за бага, что Grid Items unmounts при изменении static, isDraggable, isResaizable
26
26
  // https://github.com/STRML/react-grid-layout/issues/721
27
27
  const { style, onMouseDown, onMouseUp, onTouchEnd, onTouchStart, children, className, isDragging, noOverlay, withCustomHandle, } = this.props;
28
- const { editMode, _experimentDisableItemAnimation } = this.context;
28
+ const { editMode } = this.context;
29
29
  const width = Number.parseInt(style.width, 10);
30
30
  const height = Number.parseInt(style.height, 10);
31
31
  const transform = style.transform;
@@ -40,7 +40,6 @@ class GridItem extends react_1.default.PureComponent {
40
40
  return (react_1.default.createElement("div", Object.assign({ className: b({
41
41
  'is-dragging': isDragging,
42
42
  'with-custom-handle': withCustomHandle,
43
- 'disable-animation': _experimentDisableItemAnimation,
44
43
  }, preparedClassName), "data-qa": "dashkit-grid-item", style: style, ref: this.props.forwardedRef }, reactGridLayoutProps),
45
44
  react_1.default.createElement("div", { className: b('item', { editMode: editMode && !_editActive && !noOverlay }) },
46
45
  react_1.default.createElement(Item_1.default, { id: this.props.id, item: this.props.item, shouldItemUpdate: !isDragging, width: width, height: height, transform: transform, adjustWidgetLayout: this.props.adjustWidgetLayout, layout: this.props.layout, forwardedPluginRef: this.props.forwardedPluginRef })),
@@ -145,7 +145,6 @@ function useMemoStateContext(props) {
145
145
  revertToOriginalLayout,
146
146
  forwardedMetaRef: props.forwardedMetaRef,
147
147
  draggableHandleClassName: props.draggableHandleClassName,
148
- _experimentDisableItemAnimation: props._experimentDisableItemAnimation,
149
148
  }), [
150
149
  resultLayout,
151
150
  props.config,
@@ -167,7 +166,6 @@ function useMemoStateContext(props) {
167
166
  revertToOriginalLayout,
168
167
  props.forwardedMetaRef,
169
168
  props.draggableHandleClassName,
170
- props._experimentDisableItemAnimation,
171
169
  ]);
172
170
  }
173
171
  function withContext(Component) {
@@ -21,7 +21,6 @@ interface DashKitDefaultProps {
21
21
  settings: SettingsProps;
22
22
  context: ContextProps;
23
23
  noOverlay: boolean;
24
- _experimentDisableItemAnimation: boolean;
25
24
  }
26
25
  export interface DashKitProps extends DashKitGeneralProps, Partial<DashKitDefaultProps> {
27
26
  }
@@ -63,5 +63,4 @@ DashKit.defaultProps = {
63
63
  },
64
64
  context: {},
65
65
  noOverlay: false,
66
- _experimentDisableItemAnimation: false,
67
66
  };
@@ -30,14 +30,6 @@
30
30
  transition: height 200ms ease;
31
31
  }
32
32
 
33
- .react-grid-item {
34
- transition: all 200ms ease;
35
- transition-property: left, top;
36
- }
37
- .react-grid-item.dashkit-grid-item_disable-animation {
38
- transition: none;
39
- }
40
-
41
33
  .react-grid-item.cssTransforms {
42
34
  transition-property: transform;
43
35
  }
@@ -23,7 +23,7 @@ class GridItem extends React.PureComponent {
23
23
  // из-за бага, что Grid Items unmounts при изменении static, isDraggable, isResaizable
24
24
  // https://github.com/STRML/react-grid-layout/issues/721
25
25
  const { style, onMouseDown, onMouseUp, onTouchEnd, onTouchStart, children, className, isDragging, noOverlay, withCustomHandle, } = this.props;
26
- const { editMode, _experimentDisableItemAnimation } = this.context;
26
+ const { editMode } = this.context;
27
27
  const width = Number.parseInt(style.width, 10);
28
28
  const height = Number.parseInt(style.height, 10);
29
29
  const transform = style.transform;
@@ -38,7 +38,6 @@ class GridItem extends React.PureComponent {
38
38
  return (React.createElement("div", Object.assign({ className: b({
39
39
  'is-dragging': isDragging,
40
40
  'with-custom-handle': withCustomHandle,
41
- 'disable-animation': _experimentDisableItemAnimation,
42
41
  }, preparedClassName), "data-qa": "dashkit-grid-item", style: style, ref: this.props.forwardedRef }, reactGridLayoutProps),
43
42
  React.createElement("div", { className: b('item', { editMode: editMode && !_editActive && !noOverlay }) },
44
43
  React.createElement(Item, { id: this.props.id, item: this.props.item, shouldItemUpdate: !isDragging, width: width, height: height, transform: transform, adjustWidgetLayout: this.props.adjustWidgetLayout, layout: this.props.layout, forwardedPluginRef: this.props.forwardedPluginRef })),
@@ -141,7 +141,6 @@ function useMemoStateContext(props) {
141
141
  revertToOriginalLayout,
142
142
  forwardedMetaRef: props.forwardedMetaRef,
143
143
  draggableHandleClassName: props.draggableHandleClassName,
144
- _experimentDisableItemAnimation: props._experimentDisableItemAnimation,
145
144
  }), [
146
145
  resultLayout,
147
146
  props.config,
@@ -163,7 +162,6 @@ function useMemoStateContext(props) {
163
162
  revertToOriginalLayout,
164
163
  props.forwardedMetaRef,
165
164
  props.draggableHandleClassName,
166
- props._experimentDisableItemAnimation,
167
165
  ]);
168
166
  }
169
167
  export function withContext(Component) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dashkit",
3
- "version": "6.4.0",
3
+ "version": "6.5.0-beta.0",
4
4
  "description": "Library for rendering dashboard grid layout",
5
5
  "license": "MIT",
6
6
  "repository": {