@gravity-ui/dashkit 6.6.0 → 6.6.1-beta-v.marginy.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.
- package/build/cjs/components/OverlayControls/OverlayControls.d.ts +8 -0
- package/build/cjs/components/index.d.ts +1 -1
- package/build/cjs/utils/update-manager.js +6 -1
- package/build/esm/components/OverlayControls/OverlayControls.d.ts +8 -0
- package/build/esm/components/index.d.ts +1 -1
- package/build/esm/utils/update-manager.js +6 -1
- package/package.json +1 -1
|
@@ -38,6 +38,14 @@ interface OverlayControlsProps extends OverlayControlsDefaultProps {
|
|
|
38
38
|
items?: OverlayControlItem[];
|
|
39
39
|
overlayControls?: Record<string, OverlayControlItem[]>;
|
|
40
40
|
}
|
|
41
|
+
type PreparedCopyItemOptionsArg = Pick<ConfigItem, 'data' | 'type' | 'defaults' | 'namespace'> & {
|
|
42
|
+
timestamp: number;
|
|
43
|
+
layout: {
|
|
44
|
+
w: number;
|
|
45
|
+
h: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type PreparedCopyItemOptions = PreparedCopyItemOptionsArg;
|
|
41
49
|
type DashKitCtx = React.Context<{
|
|
42
50
|
context: Record<string, any>;
|
|
43
51
|
registerManager: RegisterManager;
|
|
@@ -262,7 +262,12 @@ class UpdateManager {
|
|
|
262
262
|
let commandUpdateParams = ((_b = itemsStateAndParams[initiatorId]) === null || _b === void 0 ? void 0 : _b.params)
|
|
263
263
|
? '$merge'
|
|
264
264
|
: '$set';
|
|
265
|
-
|
|
265
|
+
const initialedStateAndParams = initiatorId in itemsStateAndParams &&
|
|
266
|
+
itemsStateAndParams[initiatorId];
|
|
267
|
+
const needResetCurrentAP = initialedStateAndParams &&
|
|
268
|
+
Object.keys((0, shared_1.pickActionParamsFromParams)(initialedStateAndParams.params)).length &&
|
|
269
|
+
!Object.keys(allowableActionParams).length;
|
|
270
|
+
if (isTabSwitched || needResetCurrentAP) {
|
|
266
271
|
commandUpdateParams = '$set';
|
|
267
272
|
}
|
|
268
273
|
const obj = {
|
|
@@ -39,6 +39,14 @@ interface OverlayControlsProps extends OverlayControlsDefaultProps {
|
|
|
39
39
|
items?: OverlayControlItem[];
|
|
40
40
|
overlayControls?: Record<string, OverlayControlItem[]>;
|
|
41
41
|
}
|
|
42
|
+
type PreparedCopyItemOptionsArg = Pick<ConfigItem, 'data' | 'type' | 'defaults' | 'namespace'> & {
|
|
43
|
+
timestamp: number;
|
|
44
|
+
layout: {
|
|
45
|
+
w: number;
|
|
46
|
+
h: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type PreparedCopyItemOptions = PreparedCopyItemOptionsArg;
|
|
42
50
|
type DashKitCtx = React.Context<{
|
|
43
51
|
context: Record<string, any>;
|
|
44
52
|
registerManager: RegisterManager;
|
|
@@ -258,7 +258,12 @@ export class UpdateManager {
|
|
|
258
258
|
let commandUpdateParams = ((_b = itemsStateAndParams[initiatorId]) === null || _b === void 0 ? void 0 : _b.params)
|
|
259
259
|
? '$merge'
|
|
260
260
|
: '$set';
|
|
261
|
-
|
|
261
|
+
const initialedStateAndParams = initiatorId in itemsStateAndParams &&
|
|
262
|
+
itemsStateAndParams[initiatorId];
|
|
263
|
+
const needResetCurrentAP = initialedStateAndParams &&
|
|
264
|
+
Object.keys(pickActionParamsFromParams(initialedStateAndParams.params)).length &&
|
|
265
|
+
!Object.keys(allowableActionParams).length;
|
|
266
|
+
if (isTabSwitched || needResetCurrentAP) {
|
|
262
267
|
commandUpdateParams = '$set';
|
|
263
268
|
}
|
|
264
269
|
const obj = {
|