@gravity-ui/dashkit 6.1.0-beta.1 → 6.1.0-beta.3
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/build/cjs/components/ActionPanel/ActionPanel.d.ts +1 -0
- package/build/cjs/components/ActionPanel/ActionPanel.js +1 -1
- package/build/cjs/components/ActionPanel/index.d.ts +1 -0
- package/build/cjs/components/ActionPanel/index.js +4 -0
- package/build/cjs/components/DashKit/DashKit.d.ts +1 -1
- package/build/cjs/components/DashKit/index.d.ts +0 -1
- package/build/cjs/components/DashKit/index.js +0 -3
- package/build/cjs/components/DashKitView/DashKitView.js +2 -2
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +1 -0
- package/build/cjs/typings/common.d.ts +1 -1
- package/build/esm/components/ActionPanel/ActionPanel.d.ts +1 -0
- package/build/esm/components/ActionPanel/ActionPanel.js +1 -1
- package/build/esm/components/ActionPanel/index.d.ts +1 -0
- package/build/esm/components/ActionPanel/index.js +1 -0
- package/build/esm/components/DashKit/DashKit.d.ts +1 -1
- package/build/esm/components/DashKit/index.d.ts +0 -1
- package/build/esm/components/DashKit/index.js +0 -1
- package/build/esm/components/DashKitView/DashKitView.js +1 -1
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/typings/common.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const cn_1 = require("../../utils/cn");
|
|
7
7
|
const b = (0, cn_1.cn)('dashkit-action-panel');
|
|
8
8
|
const ActionPanel = (props) => {
|
|
9
|
-
return (react_1.default.createElement("div", { className: b() }, props.items.map((item) => {
|
|
9
|
+
return (react_1.default.createElement("div", { className: b(null, props.className) }, props.items.map((item) => {
|
|
10
10
|
return (react_1.default.createElement("div", { role: "button", className: b('item', item.className), key: `dk-action-panel-${item.id}`, onClick: item.onClick },
|
|
11
11
|
react_1.default.createElement("div", { className: b('icon') }, item.icon),
|
|
12
12
|
react_1.default.createElement("div", { className: b('title'), title: item.title }, item.title)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionPanel';
|
|
@@ -3,7 +3,7 @@ import GridLayout from '../GridLayout/GridLayout';
|
|
|
3
3
|
import { SetConfigItem, Settings, SettingsProps, ContextProps, Plugin, SetItemOptions } from '../../typings';
|
|
4
4
|
import { GlobalParams, Config, ConfigItem, ItemsStateAndParams } from '../../shared';
|
|
5
5
|
import { OverlayControlItem } from '../OverlayControls/OverlayControls';
|
|
6
|
-
import { ActionPanelItem } from '../ActionPanel/ActionPanel';
|
|
6
|
+
import type { ActionPanelItem } from '../ActionPanel/ActionPanel';
|
|
7
7
|
interface DashKitGeneralProps {
|
|
8
8
|
config: Config;
|
|
9
9
|
editMode: boolean;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DashkitActionPanel = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
tslib_1.__exportStar(require("./DashKit"), exports);
|
|
6
|
-
var ActionPanel_1 = require("../ActionPanel/ActionPanel");
|
|
7
|
-
Object.defineProperty(exports, "DashkitActionPanel", { enumerable: true, get: function () { return ActionPanel_1.ActionPanel; } });
|
|
@@ -8,7 +8,7 @@ const MobileLayout_1 = tslib_1.__importDefault(require("../MobileLayout/MobileLa
|
|
|
8
8
|
const withContext_1 = require("../../hocs/withContext");
|
|
9
9
|
const useCalcLayout_1 = require("../../hooks/useCalcLayout");
|
|
10
10
|
const cn_1 = require("../../utils/cn");
|
|
11
|
-
const ActionPanel_1 = require("../ActionPanel/ActionPanel");
|
|
11
|
+
const ActionPanel_1 = tslib_1.__importDefault(require("../ActionPanel/ActionPanel"));
|
|
12
12
|
const b = (0, cn_1.cn)('dashkit');
|
|
13
13
|
function DashKitView(props) {
|
|
14
14
|
var _a;
|
|
@@ -16,7 +16,7 @@ function DashKitView(props) {
|
|
|
16
16
|
const { registerManager, forwardedMetaRef, editMode } = context;
|
|
17
17
|
return (react_1.default.createElement("div", { className: b({ theme: registerManager.settings.theme }) },
|
|
18
18
|
registerManager.settings.isMobile ? (react_1.default.createElement(MobileLayout_1.default, null)) : (react_1.default.createElement(GridLayout_1.default, { ref: forwardedMetaRef, overlayControls: props.overlayControls })),
|
|
19
|
-
Boolean(((_a = props.actionPanel) === null || _a === void 0 ? void 0 : _a.length) && editMode) && (react_1.default.createElement(ActionPanel_1.
|
|
19
|
+
Boolean(((_a = props.actionPanel) === null || _a === void 0 ? void 0 : _a.length) && editMode) && (react_1.default.createElement(ActionPanel_1.default, { items: props.actionPanel }))));
|
|
20
20
|
}
|
|
21
21
|
const DashKitViewWithContext = (0, withContext_1.withContext)(DashKitView);
|
|
22
22
|
const DashKitViewForwardedMeta = react_1.default.forwardRef((props, ref) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OverlayCustomControlItem } from '../components/OverlayControls/OverlayControls';
|
|
2
2
|
import { MenuItems } from '../constants';
|
|
3
3
|
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
4
|
-
import { ActionPanelItem } from '../components/ActionPanel/ActionPanel';
|
|
4
|
+
import type { ActionPanelItem } from '../components/ActionPanel/ActionPanel';
|
|
5
5
|
export interface Settings {
|
|
6
6
|
gridLayout?: ReactGridLayoutProps;
|
|
7
7
|
theme?: string;
|
|
@@ -3,7 +3,7 @@ import { cn } from '../../utils/cn';
|
|
|
3
3
|
import './ActionPanel.css';
|
|
4
4
|
const b = cn('dashkit-action-panel');
|
|
5
5
|
export const ActionPanel = (props) => {
|
|
6
|
-
return (React.createElement("div", { className: b() }, props.items.map((item) => {
|
|
6
|
+
return (React.createElement("div", { className: b(null, props.className) }, props.items.map((item) => {
|
|
7
7
|
return (React.createElement("div", { role: "button", className: b('item', item.className), key: `dk-action-panel-${item.id}`, onClick: item.onClick },
|
|
8
8
|
React.createElement("div", { className: b('icon') }, item.icon),
|
|
9
9
|
React.createElement("div", { className: b('title'), title: item.title }, item.title)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionPanel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionPanel';
|
|
@@ -3,7 +3,7 @@ import GridLayout from '../GridLayout/GridLayout';
|
|
|
3
3
|
import { SetConfigItem, Settings, SettingsProps, ContextProps, Plugin, SetItemOptions } from '../../typings';
|
|
4
4
|
import { GlobalParams, Config, ConfigItem, ItemsStateAndParams } from '../../shared';
|
|
5
5
|
import { OverlayControlItem } from '../OverlayControls/OverlayControls';
|
|
6
|
-
import { ActionPanelItem } from '../ActionPanel/ActionPanel';
|
|
6
|
+
import type { ActionPanelItem } from '../ActionPanel/ActionPanel';
|
|
7
7
|
interface DashKitGeneralProps {
|
|
8
8
|
config: Config;
|
|
9
9
|
editMode: boolean;
|
|
@@ -5,7 +5,7 @@ import MobileLayout from '../MobileLayout/MobileLayout';
|
|
|
5
5
|
import { withContext } from '../../hocs/withContext';
|
|
6
6
|
import { useCalcPropsLayout } from '../../hooks/useCalcLayout';
|
|
7
7
|
import { cn } from '../../utils/cn';
|
|
8
|
-
import
|
|
8
|
+
import ActionPanel from '../ActionPanel/ActionPanel';
|
|
9
9
|
import './DashKitView.css';
|
|
10
10
|
const b = cn('dashkit');
|
|
11
11
|
function DashKitView(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OverlayCustomControlItem } from '../components/OverlayControls/OverlayControls';
|
|
2
2
|
import { MenuItems } from '../constants';
|
|
3
3
|
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
4
|
-
import { ActionPanelItem } from '../components/ActionPanel/ActionPanel';
|
|
4
|
+
import type { ActionPanelItem } from '../components/ActionPanel/ActionPanel';
|
|
5
5
|
export interface Settings {
|
|
6
6
|
gridLayout?: ReactGridLayoutProps;
|
|
7
7
|
theme?: string;
|