@gooddata/sdk-ui-dashboard 10.16.0-alpha.26 → 10.16.0-alpha.27

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.
@@ -1,2 +1,2 @@
1
- export declare const LIB_VERSION = "10.16.0-alpha.26";
1
+ export declare const LIB_VERSION = "10.16.0-alpha.27";
2
2
  //# sourceMappingURL=__version.d.ts.map
package/esm/__version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // (C) 2021 GoodData Corporation
2
2
  // DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
3
- export const LIB_VERSION = "10.16.0-alpha.26";
3
+ export const LIB_VERSION = "10.16.0-alpha.27";
4
4
  //# sourceMappingURL=__version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMoveWidgetHandler.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/flexibleLayout/dragAndDrop/draggableWidget/useMoveWidgetHandler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EACH,kCAAkC,EAClC,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC/B,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,eAAe,UAMlD,gBAAgB,GAChB,oBAAoB,GACpB,qBAAqB,GACrB,kCAAkC,GAClC,4BAA4B,UAwB7C"}
1
+ {"version":3,"file":"useMoveWidgetHandler.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/flexibleLayout/dragAndDrop/draggableWidget/useMoveWidgetHandler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAMvD,OAAO,EACH,kCAAkC,EAClC,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC/B,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,eAAe,UAMlD,gBAAgB,GAChB,oBAAoB,GACpB,qBAAqB,GACrB,kCAAkC,GAClC,4BAA4B,UA2B7C"}
@@ -1,12 +1,12 @@
1
1
  // (C) 2022-2024 GoodData Corporation
2
2
  import { useCallback } from "react";
3
3
  import { useDashboardDispatch, moveNestedLayoutSectionItemAndRemoveOriginalSectionIfEmpty, } from "../../../../model/index.js";
4
- import { areLayoutPathsEqual, getItemIndex } from "../../../../_staging/layout/coordinates.js";
4
+ import { areItemsInSameSection, getItemIndex, updateItemIndex, } from "../../../../_staging/layout/coordinates.js";
5
5
  export function useMoveWidgetDropHandler(layoutPath) {
6
6
  const dispatch = useDashboardDispatch();
7
7
  return useCallback((item) => {
8
8
  let targetIndex = getItemIndex(layoutPath);
9
- if (areLayoutPathsEqual(item.layoutPath, layoutPath)) {
9
+ if (areItemsInSameSection(item.layoutPath, layoutPath)) {
10
10
  const currentItemIndex = getItemIndex(item.layoutPath);
11
11
  // if the item is moved within the same section to bigger index, indexes are shifted by 1
12
12
  if (currentItemIndex < targetIndex) {
@@ -17,7 +17,7 @@ export function useMoveWidgetDropHandler(layoutPath) {
17
17
  return;
18
18
  }
19
19
  }
20
- dispatch(moveNestedLayoutSectionItemAndRemoveOriginalSectionIfEmpty(item.layoutPath, layoutPath));
20
+ dispatch(moveNestedLayoutSectionItemAndRemoveOriginalSectionIfEmpty(item.layoutPath, updateItemIndex(layoutPath, targetIndex)));
21
21
  }, [dispatch, layoutPath]);
22
22
  }
23
23
  //# sourceMappingURL=useMoveWidgetHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMoveWidgetHandler.js","sourceRoot":"","sources":["../../../../../src/presentation/flexibleLayout/dragAndDrop/draggableWidget/useMoveWidgetHandler.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EACH,oBAAoB,EACpB,0DAA0D,GAC7D,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAS/F,MAAM,UAAU,wBAAwB,CAAC,UAA2B;IAChE,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;IAExC,OAAO,WAAW,CACd,CACI,IAKkC,EACpC,EAAE;QACA,IAAI,WAAW,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;QAE3C,IAAI,mBAAmB,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC;YACnD,MAAM,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,UAAW,CAAC,CAAC;YAExD,yFAAyF;YACzF,IAAI,gBAAgB,GAAG,WAAW,EAAE,CAAC;gBACjC,WAAW,GAAG,WAAW,GAAG,CAAC,CAAC;YAClC,CAAC;YAED,IAAI,gBAAgB,KAAK,WAAW,EAAE,CAAC;gBACnC,+CAA+C;gBAC/C,OAAO;YACX,CAAC;QACL,CAAC;QAED,QAAQ,CACJ,0DAA0D,CAAC,IAAI,CAAC,UAAW,EAAE,UAAU,CAAC,CAC3F,CAAC;IACN,CAAC,EACD,CAAC,QAAQ,EAAE,UAAU,CAAC,CACzB,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"useMoveWidgetHandler.js","sourceRoot":"","sources":["../../../../../src/presentation/flexibleLayout/dragAndDrop/draggableWidget/useMoveWidgetHandler.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EACH,oBAAoB,EACpB,0DAA0D,GAC7D,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACH,qBAAqB,EACrB,YAAY,EACZ,eAAe,GAClB,MAAM,4CAA4C,CAAC;AASpD,MAAM,UAAU,wBAAwB,CAAC,UAA2B;IAChE,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;IAExC,OAAO,WAAW,CACd,CACI,IAKkC,EACpC,EAAE;QACA,IAAI,WAAW,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;QAE3C,IAAI,qBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC;YACrD,MAAM,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,UAAW,CAAC,CAAC;YAExD,yFAAyF;YACzF,IAAI,gBAAgB,GAAG,WAAW,EAAE,CAAC;gBACjC,WAAW,GAAG,WAAW,GAAG,CAAC,CAAC;YAClC,CAAC;YAED,IAAI,gBAAgB,KAAK,WAAW,EAAE,CAAC;gBACnC,+CAA+C;gBAC/C,OAAO;YACX,CAAC;QACL,CAAC;QAED,QAAQ,CACJ,0DAA0D,CACtD,IAAI,CAAC,UAAW,EAChB,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,CAC3C,CACJ,CAAC;IACN,CAAC,EACD,CAAC,QAAQ,EAAE,UAAU,CAAC,CACzB,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-dashboard",
3
- "version": "10.16.0-alpha.26",
3
+ "version": "10.16.0-alpha.27",
4
4
  "description": "GoodData SDK - Dashboard Component",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,17 +57,17 @@
57
57
  "ts-invariant": "^0.7.5",
58
58
  "tslib": "^2.5.0",
59
59
  "uuid": "^8.3.2",
60
- "@gooddata/sdk-backend-spi": "10.16.0-alpha.26",
61
- "@gooddata/sdk-backend-base": "10.16.0-alpha.26",
62
- "@gooddata/sdk-model": "10.16.0-alpha.26",
63
- "@gooddata/sdk-ui": "10.16.0-alpha.26",
64
- "@gooddata/sdk-ui-ext": "10.16.0-alpha.26",
65
- "@gooddata/sdk-ui-geo": "10.16.0-alpha.26",
66
- "@gooddata/sdk-ui-filters": "10.16.0-alpha.26",
67
- "@gooddata/sdk-ui-theme-provider": "10.16.0-alpha.26",
68
- "@gooddata/sdk-ui-kit": "10.16.0-alpha.26",
69
- "@gooddata/util": "10.16.0-alpha.26",
70
- "@gooddata/sdk-ui-vis-commons": "10.16.0-alpha.26"
60
+ "@gooddata/sdk-backend-base": "10.16.0-alpha.27",
61
+ "@gooddata/sdk-backend-spi": "10.16.0-alpha.27",
62
+ "@gooddata/sdk-model": "10.16.0-alpha.27",
63
+ "@gooddata/sdk-ui": "10.16.0-alpha.27",
64
+ "@gooddata/sdk-ui-ext": "10.16.0-alpha.27",
65
+ "@gooddata/sdk-ui-geo": "10.16.0-alpha.27",
66
+ "@gooddata/sdk-ui-filters": "10.16.0-alpha.27",
67
+ "@gooddata/sdk-ui-kit": "10.16.0-alpha.27",
68
+ "@gooddata/sdk-ui-theme-provider": "10.16.0-alpha.27",
69
+ "@gooddata/sdk-ui-vis-commons": "10.16.0-alpha.27",
70
+ "@gooddata/util": "10.16.0-alpha.27"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "react": "^16.10.0 || ^17.0.0 || ^18.0.0",
@@ -120,9 +120,9 @@
120
120
  "typescript": "5.3.3",
121
121
  "vitest": "1.0.4",
122
122
  "vitest-dom": "0.1.1",
123
- "@gooddata/i18n-toolkit": "10.16.0-alpha.26",
124
- "@gooddata/sdk-backend-mockingbird": "10.16.0-alpha.26",
125
- "@gooddata/reference-workspace": "10.16.0-alpha.26"
123
+ "@gooddata/i18n-toolkit": "10.16.0-alpha.27",
124
+ "@gooddata/reference-workspace": "10.16.0-alpha.27",
125
+ "@gooddata/sdk-backend-mockingbird": "10.16.0-alpha.27"
126
126
  },
127
127
  "scripts": {
128
128
  "clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",