New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gravity-ui/dashkit

Package Overview
Dependencies
Maintainers
9
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/dashkit - npm Package Compare versions

Comparing version 8.0.2-beta.2 to 8.0.2-beta.3

1

build/cjs/components/DashKit/DashKit.d.ts

@@ -24,2 +24,3 @@ import React from 'react';

noOverlay: boolean;
focusable?: boolean;
}

@@ -26,0 +27,0 @@ export interface DashKitProps extends DashKitGeneralProps, Partial<DashKitDefaultProps> {

@@ -71,2 +71,3 @@ "use strict";

noOverlay: false,
focusable: false,
};

@@ -75,3 +75,3 @@ "use strict";

// https://github.com/STRML/react-grid-layout/issues/721
const { style, onMouseDown, onMouseUp, onTouchEnd, onTouchStart, children, className, isDragging, noOverlay, withCustomHandle, } = this.props;
const { style, onMouseDown, onMouseUp, onTouchEnd, onTouchStart, children, className, isDragging, noOverlay, focusable, withCustomHandle, } = this.props;
const { editMode } = this.context;

@@ -93,3 +93,9 @@ const width = Number.parseInt(style.width, 10);

'with-custom-handle': withCustomHandle,
}, preparedClassName), "data-qa": "dashkit-grid-item", style: style, ref: this.props.forwardedRef }, reactGridLayoutProps, { onFocus: this.onFocusHandler, onBlur: this.onBlurHandler, tabIndex: -1 }),
}, preparedClassName), "data-qa": "dashkit-grid-item", style: style, ref: this.props.forwardedRef }, reactGridLayoutProps, (focusable
? {
onFocus: this.onFocusHandler,
onBlur: this.onBlurHandler,
tabIndex: -1,
}
: {})),
react_1.default.createElement("div", { className: b('item', { editMode: editMode && !_editActive && !noOverlay }) },

@@ -115,2 +121,3 @@ 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 })),

noOverlay: prop_types_1.default.bool,
focusable: prop_types_1.default.bool,
withCustomHandle: prop_types_1.default.bool,

@@ -117,0 +124,0 @@ onMouseDown: prop_types_1.default.func,

4

build/cjs/components/GridLayout/GridLayout.js

@@ -75,3 +75,3 @@ "use strict";

render() {
const { layout, config, registerManager, editMode, noOverlay, draggableHandleClassName } = this.context;
const { layout, config, registerManager, editMode, noOverlay, focusable, draggableHandleClassName, } = this.context;
this.pluginsRefs.length = config.items.length;

@@ -83,3 +83,3 @@ return (react_1.default.createElement(Layout, Object.assign({}, registerManager.gridLayout, { layout: layout, isDraggable: editMode, isResizable: editMode, onDragStart: this._onStart, onDragStop: this._onStop, onResizeStart: this._onStart, onResizeStop: this._onStop }, (draggableHandleClassName

this.pluginsRefs[i] = pluginRef;
}, key: item.id, id: item.id, item: item, layout: layout, adjustWidgetLayout: this.adjustWidgetLayout, isDragging: this.state.isDragging, noOverlay: noOverlay, withCustomHandle: Boolean(draggableHandleClassName), overlayControls: this.props.overlayControls }));
}, key: item.id, id: item.id, item: item, layout: layout, adjustWidgetLayout: this.adjustWidgetLayout, isDragging: this.state.isDragging, noOverlay: noOverlay, focusable: focusable, withCustomHandle: Boolean(draggableHandleClassName), overlayControls: this.props.overlayControls }));
})));

@@ -86,0 +86,0 @@ }

@@ -132,2 +132,3 @@ "use strict";

noOverlay: props.noOverlay,
focusable: props.focusable,
defaultGlobalParams: props.globalParams,

@@ -155,2 +156,3 @@ globalParams: props.globalParams,

props.noOverlay,
props.focusable,
props.globalParams,

@@ -157,0 +159,0 @@ props.editMode,

@@ -24,2 +24,3 @@ import React from 'react';

noOverlay: boolean;
focusable?: boolean;
}

@@ -26,0 +27,0 @@ export interface DashKitProps extends DashKitGeneralProps, Partial<DashKitDefaultProps> {

@@ -66,2 +66,3 @@ import React from 'react';

noOverlay: false,
focusable: false,
};

@@ -73,3 +73,3 @@ import React from 'react';

// https://github.com/STRML/react-grid-layout/issues/721
const { style, onMouseDown, onMouseUp, onTouchEnd, onTouchStart, children, className, isDragging, noOverlay, withCustomHandle, } = this.props;
const { style, onMouseDown, onMouseUp, onTouchEnd, onTouchStart, children, className, isDragging, noOverlay, focusable, withCustomHandle, } = this.props;
const { editMode } = this.context;

@@ -91,3 +91,9 @@ const width = Number.parseInt(style.width, 10);

'with-custom-handle': withCustomHandle,
}, preparedClassName), "data-qa": "dashkit-grid-item", style: style, ref: this.props.forwardedRef }, reactGridLayoutProps, { onFocus: this.onFocusHandler, onBlur: this.onBlurHandler, tabIndex: -1 }),
}, preparedClassName), "data-qa": "dashkit-grid-item", style: style, ref: this.props.forwardedRef }, reactGridLayoutProps, (focusable
? {
onFocus: this.onFocusHandler,
onBlur: this.onBlurHandler,
tabIndex: -1,
}
: {})),
React.createElement("div", { className: b('item', { editMode: editMode && !_editActive && !noOverlay }) },

@@ -113,2 +119,3 @@ 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 })),

noOverlay: PropTypes.bool,
focusable: PropTypes.bool,
withCustomHandle: PropTypes.bool,

@@ -115,0 +122,0 @@ onMouseDown: PropTypes.func,

@@ -72,3 +72,3 @@ import React from 'react';

render() {
const { layout, config, registerManager, editMode, noOverlay, draggableHandleClassName } = this.context;
const { layout, config, registerManager, editMode, noOverlay, focusable, draggableHandleClassName, } = this.context;
this.pluginsRefs.length = config.items.length;

@@ -80,3 +80,3 @@ return (React.createElement(Layout, Object.assign({}, registerManager.gridLayout, { layout: layout, isDraggable: editMode, isResizable: editMode, onDragStart: this._onStart, onDragStop: this._onStop, onResizeStart: this._onStart, onResizeStop: this._onStop }, (draggableHandleClassName

this.pluginsRefs[i] = pluginRef;
}, key: item.id, id: item.id, item: item, layout: layout, adjustWidgetLayout: this.adjustWidgetLayout, isDragging: this.state.isDragging, noOverlay: noOverlay, withCustomHandle: Boolean(draggableHandleClassName), overlayControls: this.props.overlayControls }));
}, key: item.id, id: item.id, item: item, layout: layout, adjustWidgetLayout: this.adjustWidgetLayout, isDragging: this.state.isDragging, noOverlay: noOverlay, focusable: focusable, withCustomHandle: Boolean(draggableHandleClassName), overlayControls: this.props.overlayControls }));
})));

@@ -83,0 +83,0 @@ }

@@ -128,2 +128,3 @@ import React from 'react';

noOverlay: props.noOverlay,
focusable: props.focusable,
defaultGlobalParams: props.globalParams,

@@ -151,2 +152,3 @@ globalParams: props.globalParams,

props.noOverlay,
props.focusable,
props.globalParams,

@@ -153,0 +155,0 @@ props.editMode,

{
"name": "@gravity-ui/dashkit",
"version": "8.0.2-beta.2",
"version": "8.0.2-beta.3",
"description": "Library for rendering dashboard grid layout",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -52,2 +52,3 @@ # @gravity-ui/dashkit &middot; [![npm package](https://img.shields.io/npm/v/@gravity-ui/dashkit)](https://www.npmjs.com/package/@gravity-ui/dashkit) [![CI](https://img.shields.io/github/actions/workflow/status/gravity-ui/dashkit/.github/workflows/ci.yaml?branch=main&label=CI&logo=github)](https://github.com/gravity-ui/dashkit/actions/workflows/ci.yaml?query=branch:main) [![storybook](https://img.shields.io/badge/Storybook-deployed-ff4685)](https://preview.gravity-ui.com/dashkit/)

- **noOverlay**: If `true`, overlay and controls are not displayed while editing.
- **focusable**: If `true`, grid items will be focusable.
- **draggableHandleClassName** : СSS class name of the element that makes the widget draggable.

@@ -54,0 +55,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc