@vc-shell/framework 1.1.77 → 1.1.78

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/core/services/dashboard-service.ts +5 -11
  3. package/dist/core/services/dashboard-service.d.ts.map +1 -1
  4. package/dist/framework.js +2541 -2520
  5. package/dist/index.css +1 -1
  6. package/dist/shared/components/draggable-dashboard/DraggableDashboard.vue.d.ts.map +1 -1
  7. package/dist/shared/components/draggable-dashboard/composables/useDashboardGrid.d.ts +1 -0
  8. package/dist/shared/components/draggable-dashboard/composables/useDashboardGrid.d.ts.map +1 -1
  9. package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts +1 -0
  10. package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts.map +1 -1
  11. package/dist/shared/components/draggable-dashboard/composables/useWidgetLayout.d.ts +1 -0
  12. package/dist/shared/components/draggable-dashboard/composables/useWidgetLayout.d.ts.map +1 -1
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  15. package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.vue.d.ts.map +1 -1
  16. package/package.json +4 -4
  17. package/shared/components/draggable-dashboard/DraggableDashboard.vue +23 -0
  18. package/shared/components/draggable-dashboard/composables/useDashboardGrid.ts +25 -0
  19. package/shared/components/draggable-dashboard/composables/useLayoutPersistence.ts +10 -0
  20. package/shared/components/draggable-dashboard/composables/useWidgetLayout.ts +39 -0
  21. package/ui/components/molecules/vc-field/vc-field.vue +1 -6
  22. package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +1 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.1.78](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.77...v1.1.78) (2025-09-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **vc-radio-button:** prevent radio button from shrinking by adding flex-shrink property ([276bd6a](https://github.com/VirtoCommerce/vc-shell/commit/276bd6ac81b74b3d93d8652d75e88b32fae10c38))
7
+
8
+
9
+ ### Features
10
+
11
+ * **dashboard:** enhance widget placement logic to handle new widgets without collisions ([1faf444](https://github.com/VirtoCommerce/vc-shell/commit/1faf444cb7c919c7a0ddb4447e7dab560c8f0e93))
12
+
13
+
14
+
1
15
  ## [1.1.77](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.76...v1.1.77) (2025-09-11)
2
16
 
3
17
 
@@ -61,19 +61,13 @@ export function createDashboardService(): IDashboardService {
61
61
 
62
62
  state.widgets.set(widget.id, widget);
63
63
 
64
- // If the position is not specified, add the widget to the end
65
- if (!widget.position) {
66
- const lastWidget = Array.from(state.layout.values()).reduce((max, pos) => {
67
- return pos.y > max ? pos.y : max;
68
- }, 0);
69
-
70
- state.layout.set(widget.id, {
71
- x: 0,
72
- y: lastWidget + 1,
73
- });
74
- } else {
64
+ // If the position is not specified, we don't set it here
65
+ // The DraggableDashboard component will handle finding a free position
66
+ if (widget.position) {
75
67
  state.layout.set(widget.id, widget.position);
76
68
  }
69
+ // If no position is specified, the widget will be placed by the dashboard component
70
+ // to avoid collisions with existing widgets
77
71
  };
78
72
 
79
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-service.d.ts","sourceRoot":"","sources":["../../../core/services/dashboard-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,KAAK,CAAC;AAI1C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACr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