@gravity-ui/dashkit 8.22.1-beta.0 → 8.22.1
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/DashKit/DashKit.d.ts +12 -14
- package/build/cjs/components/DashKit/DashKit.js +2 -2
- package/build/cjs/components/DashKitDnDWrapper/DashKitDnDWrapper.js +2 -2
- package/build/cjs/components/DashKitView/DashKitView.js +2 -2
- package/build/cjs/components/GridItem/GridItem.js +2 -2
- package/build/cjs/components/GridLayout/GridLayout.d.ts +1 -1
- package/build/cjs/components/GridLayout/GridLayout.js +2 -3
- package/build/cjs/components/Item/Item.d.ts +1 -2
- package/build/cjs/components/MobileLayout/MobileLayout.d.ts +21 -28
- package/build/cjs/components/MobileLayout/MobileLayout.js +47 -60
- package/build/cjs/components/OverlayControls/OverlayControls.d.ts +16 -4
- package/build/cjs/components/OverlayControls/OverlayControls.js +9 -8
- package/build/cjs/context/DashKitContext.d.ts +3 -30
- package/build/cjs/context/DashKitContext.js +6 -2
- package/build/cjs/hocs/prepareItem.d.ts +1 -2
- package/build/cjs/hocs/prepareItem.js +2 -2
- package/build/cjs/hocs/withContext.js +20 -23
- package/build/cjs/hooks/useDnDItemProps.js +2 -2
- package/build/cjs/shared/modules/helpers.d.ts +1 -1
- package/build/cjs/shared/modules/helpers.js +1 -1
- package/build/cjs/shared/types/state-and-params.d.ts +1 -2
- package/build/cjs/typings/config.d.ts +0 -1
- package/build/esm/components/DashKit/DashKit.d.ts +12 -14
- package/build/esm/components/DashKit/DashKit.js +1 -1
- package/build/esm/components/DashKitDnDWrapper/DashKitDnDWrapper.js +1 -1
- package/build/esm/components/DashKitView/DashKitView.js +1 -1
- package/build/esm/components/GridItem/GridItem.js +1 -1
- package/build/esm/components/GridLayout/GridLayout.d.ts +1 -1
- package/build/esm/components/GridLayout/GridLayout.js +1 -2
- package/build/esm/components/Item/Item.d.ts +1 -2
- package/build/esm/components/MobileLayout/MobileLayout.d.ts +21 -29
- package/build/esm/components/MobileLayout/MobileLayout.js +46 -59
- package/build/esm/components/OverlayControls/OverlayControls.d.ts +16 -4
- package/build/esm/components/OverlayControls/OverlayControls.js +8 -7
- package/build/esm/context/DashKitContext.d.ts +3 -30
- package/build/esm/context/DashKitContext.js +4 -2
- package/build/esm/hocs/prepareItem.d.ts +1 -2
- package/build/esm/hocs/prepareItem.js +1 -1
- package/build/esm/hocs/withContext.js +17 -20
- package/build/esm/hooks/useDnDItemProps.js +1 -1
- package/build/esm/shared/modules/helpers.d.ts +1 -1
- package/build/esm/shared/modules/helpers.js +1 -1
- package/build/esm/shared/types/state-and-params.d.ts +1 -2
- package/build/esm/typings/config.d.ts +0 -1
- package/package.json +1 -1
- package/build/cjs/context/DashKitDnDContext.d.ts +0 -10
- package/build/cjs/context/DashKitDnDContext.js +0 -6
- package/build/cjs/context/DashkitOverlayControlsContext.d.ts +0 -13
- package/build/cjs/context/DashkitOverlayControlsContext.js +0 -6
- package/build/cjs/context/index.d.ts +0 -3
- package/build/cjs/context/index.js +0 -6
- package/build/esm/context/DashKitDnDContext.d.ts +0 -10
- package/build/esm/context/DashKitDnDContext.js +0 -2
- package/build/esm/context/DashkitOverlayControlsContext.d.ts +0 -13
- package/build/esm/context/DashkitOverlayControlsContext.js +0 -2
- package/build/esm/context/index.d.ts +0 -3
- package/build/esm/context/index.js +0 -3
|
@@ -108,7 +108,7 @@ export function formQueueData({ items, itemsStateAndParams, }) {
|
|
|
108
108
|
export function resolveItemInnerId({ item, itemsStateAndParams, }) {
|
|
109
109
|
var _a, _b;
|
|
110
110
|
const { id } = item;
|
|
111
|
-
const stateTabId = (_b = (_a = itemsStateAndParams
|
|
111
|
+
const stateTabId = (_b = (_a = itemsStateAndParams[id]) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.tabId;
|
|
112
112
|
const { tabs } = item.data;
|
|
113
113
|
if (stateTabId && tabs.some((tab) => tab.id === stateTabId)) {
|
|
114
114
|
return stateTabId;
|
|
@@ -3,7 +3,6 @@ import { StringParams } from './common';
|
|
|
3
3
|
export interface ItemState {
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}
|
|
6
|
-
export type ItemParams = StringParams | Record<string, StringParams>;
|
|
7
6
|
export interface QueueItem {
|
|
8
7
|
id: string;
|
|
9
8
|
tabId?: string;
|
|
@@ -17,7 +16,7 @@ export type StateAndParamsMeta = {
|
|
|
17
16
|
[META_KEY]: StateAndParamsMetaData;
|
|
18
17
|
};
|
|
19
18
|
export type ItemStateAndParams = {
|
|
20
|
-
params?:
|
|
19
|
+
params?: StringParams | Record<string, StringParams>;
|
|
21
20
|
state?: ItemState;
|
|
22
21
|
};
|
|
23
22
|
export type ItemStateAndParamsChangeOptions = {
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DraggedOverItem, ItemDragProps } from '../shared/types';
|
|
3
|
-
export type DashKitDnDCtxShape = {
|
|
4
|
-
dragProps: ItemDragProps | null;
|
|
5
|
-
dragImagePreview: HTMLImageElement;
|
|
6
|
-
onDragStart: (e: React.DragEvent<Element>, itemDragProps: ItemDragProps) => void;
|
|
7
|
-
onDragEnd: (e: React.DragEvent<Element>) => void;
|
|
8
|
-
onDropDragOver?: (draggedItem: DraggedOverItem, sharedItem: DraggedOverItem | null) => void | boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const DashKitDnDContext: React.Context<void | DashKitDnDCtxShape>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DashKitDnDContext = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
exports.DashKitDnDContext = react_1.default.createContext(undefined);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DashKitProps } from '../components';
|
|
3
|
-
import type { ConfigLayout, ItemParams, ItemState } from '../shared';
|
|
4
|
-
import type { MenuItem } from '../typings';
|
|
5
|
-
export type OverlayControlsCtxShape = Pick<DashKitProps, 'context' | 'overlayControls' | 'itemsStateAndParams' | 'getPreparedCopyItemOptions' | 'onCopyFulfill'> & {
|
|
6
|
-
menu: DashKitProps['overlayMenuItems'] | MenuItem[];
|
|
7
|
-
itemsState?: Record<string, ItemState>;
|
|
8
|
-
itemsParams: Record<string, ItemParams>;
|
|
9
|
-
editItem: DashKitProps['onItemEdit'];
|
|
10
|
-
removeItem: (id: string) => void;
|
|
11
|
-
getLayoutItem: (id: string) => ConfigLayout | void;
|
|
12
|
-
};
|
|
13
|
-
export declare const DashkitOvelayControlsContext: React.Context<void | OverlayControlsCtxShape>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DashkitOvelayControlsContext = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
exports.DashkitOvelayControlsContext = react_1.default.createContext(undefined);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./DashKitContext"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./DashkitOverlayControlsContext"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./DashKitDnDContext"), exports);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DraggedOverItem, ItemDragProps } from '../shared/types';
|
|
3
|
-
export type DashKitDnDCtxShape = {
|
|
4
|
-
dragProps: ItemDragProps | null;
|
|
5
|
-
dragImagePreview: HTMLImageElement;
|
|
6
|
-
onDragStart: (e: React.DragEvent<Element>, itemDragProps: ItemDragProps) => void;
|
|
7
|
-
onDragEnd: (e: React.DragEvent<Element>) => void;
|
|
8
|
-
onDropDragOver?: (draggedItem: DraggedOverItem, sharedItem: DraggedOverItem | null) => void | boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const DashKitDnDContext: React.Context<void | DashKitDnDCtxShape>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DashKitProps } from '../components';
|
|
3
|
-
import type { ConfigLayout, ItemParams, ItemState } from '../shared';
|
|
4
|
-
import type { MenuItem } from '../typings';
|
|
5
|
-
export type OverlayControlsCtxShape = Pick<DashKitProps, 'context' | 'overlayControls' | 'itemsStateAndParams' | 'getPreparedCopyItemOptions' | 'onCopyFulfill'> & {
|
|
6
|
-
menu: DashKitProps['overlayMenuItems'] | MenuItem[];
|
|
7
|
-
itemsState?: Record<string, ItemState>;
|
|
8
|
-
itemsParams: Record<string, ItemParams>;
|
|
9
|
-
editItem: DashKitProps['onItemEdit'];
|
|
10
|
-
removeItem: (id: string) => void;
|
|
11
|
-
getLayoutItem: (id: string) => ConfigLayout | void;
|
|
12
|
-
};
|
|
13
|
-
export declare const DashkitOvelayControlsContext: React.Context<void | OverlayControlsCtxShape>;
|