@vc-shell/framework 1.1.77 → 1.1.79

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 (29) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/core/composables/index.ts +1 -0
  3. package/core/composables/useBlade/index.ts +15 -0
  4. package/core/services/dashboard-service.ts +5 -11
  5. package/dist/core/composables/index.d.ts +1 -0
  6. package/dist/core/composables/index.d.ts.map +1 -1
  7. package/dist/core/composables/useBlade/index.d.ts +6 -0
  8. package/dist/core/composables/useBlade/index.d.ts.map +1 -0
  9. package/dist/core/services/dashboard-service.d.ts.map +1 -1
  10. package/dist/framework.js +4137 -4104
  11. package/dist/index.css +1 -1
  12. package/dist/shared/components/draggable-dashboard/DraggableDashboard.vue.d.ts.map +1 -1
  13. package/dist/shared/components/draggable-dashboard/composables/useDashboardGrid.d.ts +1 -0
  14. package/dist/shared/components/draggable-dashboard/composables/useDashboardGrid.d.ts.map +1 -1
  15. package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts +1 -0
  16. package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts.map +1 -1
  17. package/dist/shared/components/draggable-dashboard/composables/useWidgetLayout.d.ts +1 -0
  18. package/dist/shared/components/draggable-dashboard/composables/useWidgetLayout.d.ts.map +1 -1
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  21. package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.vue.d.ts.map +1 -1
  22. package/package.json +4 -4
  23. package/shared/components/draggable-dashboard/DraggableDashboard.vue +23 -0
  24. package/shared/components/draggable-dashboard/composables/useDashboardGrid.ts +25 -0
  25. package/shared/components/draggable-dashboard/composables/useLayoutPersistence.ts +10 -0
  26. package/shared/components/draggable-dashboard/composables/useWidgetLayout.ts +39 -0
  27. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +2 -2
  28. package/ui/components/molecules/vc-field/vc-field.vue +9 -7
  29. package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +1 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## [1.1.79](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.78...v1.1.79) (2025-09-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * **composables:** add useBlade composable for accessing the current blade instance ([e1d1c59](https://github.com/VirtoCommerce/vc-shell/commit/e1d1c591e3472c38eb459f878f7a69f5e6df8f4a))
7
+ * **vc-field:** update copy button icon dynamically on copy action ([fe47e62](https://github.com/VirtoCommerce/vc-shell/commit/fe47e62a591df136800f4e5e8872e5392f8fb7df))
8
+
9
+
10
+
11
+ ## [1.1.78](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.77...v1.1.78) (2025-09-12)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **vc-radio-button:** prevent radio button from shrinking by adding flex-shrink property ([276bd6a](https://github.com/VirtoCommerce/vc-shell/commit/276bd6ac81b74b3d93d8652d75e88b32fae10c38))
17
+
18
+
19
+ ### Features
20
+
21
+ * **dashboard:** enhance widget placement logic to handle new widgets without collisions ([1faf444](https://github.com/VirtoCommerce/vc-shell/commit/1faf444cb7c919c7a0ddb4447e7dab560c8f0e93))
22
+
23
+
24
+
1
25
  ## [1.1.77](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.76...v1.1.77) (2025-09-11)
2
26
 
3
27
 
@@ -20,3 +20,4 @@ export * from "./useAppBarWidget";
20
20
  export * from "./useSettingsMenu";
21
21
  export * from "./useToolbar";
22
22
  export * from "./useDynamicProperties";
23
+ export * from "./useBlade";
@@ -0,0 +1,15 @@
1
+ import { inject } from "vue";
2
+ import { BladeInstance } from "../../../injection-keys";
3
+
4
+ /**
5
+ * Composable for accessing the current blade instance
6
+ * @returns The current blade instance
7
+ */
8
+ export function useBlade() {
9
+ const blade = inject(BladeInstance);
10
+
11
+ if (!blade) {
12
+ throw new Error("Blade instance not found in the current context");
13
+ }
14
+ return blade;
15
+ }
@@ -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
  /**
@@ -20,4 +20,5 @@ export * from "./useAppBarWidget";
20
20
  export * from "./useSettingsMenu";
21
21
  export * from "./useToolbar";
22
22
  export * from "./useDynamicProperties";
23
+ export * from "./useBlade";
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/composables/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/composables/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Composable for accessing the current blade instance
3
+ * @returns The current blade instance
4
+ */
5
+ export declare function useBlade(): import("vue").ComputedRef<import("../../..").IBladeInstance>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useBlade/index.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,QAAQ,iEAOvB"}
@@ -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;IACrB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,eAAe,EAAE,CAAC;IACpC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpF,SAAS,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CACvD;AAKD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAKrE;AAOD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,iBAAiB,CAoE1D"}
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;IACrB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,eAAe,EAAE,CAAC;IACpC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpF,SAAS,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CACvD;AAKD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAKrE;AAOD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,iBAAiB,CA8D1D"}