@vc-shell/framework 1.1.0-alpha.4 → 1.1.0-alpha.6
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/core/composables/useMenuService/index.ts +20 -110
- package/core/composables/useWidgets/index.ts +2 -1
- package/core/plugins/modularity/index.ts +3 -3
- package/core/services/menu-service.ts +195 -0
- package/core/services/widget-service.ts +20 -0
- package/core/types/index.ts +1 -1
- package/dist/core/composables/useMenuService/index.d.ts +4 -10
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
- package/dist/core/composables/useWidgets/index.d.ts +2 -1
- package/dist/core/composables/useWidgets/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/services/menu-service.d.ts +17 -0
- package/dist/core/services/menu-service.d.ts.map +1 -0
- package/dist/core/services/widget-service.d.ts +4 -0
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +220 -210
- package/dist/{index-CrxFDC2b.js → index-3ySdd-mG.js} +1 -1
- package/dist/{index-B1YR_MYV.js → index-B-nvqNbp.js} +1 -1
- package/dist/{index-xLYzNPa7.js → index-BQF2-UMe.js} +1 -1
- package/dist/{index-BBYyHeYA.js → index-BXlxP2d2.js} +1 -1
- package/dist/{index-Cf9Tz1ql.js → index-C7P-aBjd.js} +1 -1
- package/dist/{index-8LELHzw9.js → index-CO_2IshF.js} +1 -1
- package/dist/{index-BA98L1jI.js → index-CfyFpaKq.js} +1 -1
- package/dist/{index-DVljTjbf.js → index-Ci23AX3j.js} +1 -1
- package/dist/{index-D1JchciU.js → index-CyuFXG83.js} +1 -1
- package/dist/{index-CWKrD2Cd.js → index-D1rpRTKf.js} +1 -1
- package/dist/{index-BAeTsi-X.js → index-DLxTAT7x.js} +1 -1
- package/dist/{index-BuO5ByG9.js → index-DOVhosAY.js} +1 -1
- package/dist/{index-DLtsQ_PJ.js → index-DZAq0B3U.js} +23780 -23339
- package/dist/{index-BrUitdDo.js → index-DtkJ7xTB.js} +1 -1
- package/dist/{index-9lJxZE5w.js → index-DvGVm1rK.js} +1 -1
- package/dist/{index-RwX3kiZh.js → index-EDF1MDtU.js} +1 -1
- package/dist/{index-CJ5I7vTn.js → index-LjqdX6jw.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +2 -0
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/DraggableDashboard.vue.d.ts +2 -0
- package/dist/shared/components/draggable-dashboard/DraggableDashboard.vue.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useCellSizeCalculator.d.ts +25 -0
- package/dist/shared/components/draggable-dashboard/composables/useCellSizeCalculator.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useCollisionDetection.d.ts +27 -0
- package/dist/shared/components/draggable-dashboard/composables/useCollisionDetection.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.d.ts +22 -0
- package/dist/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useDashboardGrid.d.ts +12 -4
- package/dist/shared/components/draggable-dashboard/composables/useDashboardGrid.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useDragClone.d.ts +15 -0
- package/dist/shared/components/draggable-dashboard/composables/useDragClone.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useEventCoordinates.d.ts +33 -0
- package/dist/shared/components/draggable-dashboard/composables/useEventCoordinates.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useGridPosition.d.ts +57 -0
- package/dist/shared/components/draggable-dashboard/composables/useGridPosition.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useGridSystem.d.ts +22 -0
- package/dist/shared/components/draggable-dashboard/composables/useGridSystem.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts +19 -0
- package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useResizeObserver.d.ts +18 -0
- package/dist/shared/components/draggable-dashboard/composables/useResizeObserver.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useWidgetLayout.d.ts +14 -0
- package/dist/shared/components/draggable-dashboard/composables/useWidgetLayout.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/composables/useWidgetStyles.d.ts +21 -0
- package/dist/shared/components/draggable-dashboard/composables/useWidgetStyles.d.ts.map +1 -0
- package/dist/shared/components/draggable-dashboard/types.d.ts +5 -1
- package/dist/shared/components/draggable-dashboard/types.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts +6 -0
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +2 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/draggable-dashboard/DraggableDashboard.vue +114 -148
- package/shared/components/draggable-dashboard/composables/useCellSizeCalculator.ts +121 -0
- package/shared/components/draggable-dashboard/composables/useCollisionDetection.ts +219 -0
- package/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.ts +126 -331
- package/shared/components/draggable-dashboard/composables/useDashboardGrid.ts +74 -220
- package/shared/components/draggable-dashboard/composables/useDragClone.ts +97 -0
- package/shared/components/draggable-dashboard/composables/useEventCoordinates.ts +91 -0
- package/shared/components/draggable-dashboard/composables/useGridPosition.ts +150 -0
- package/shared/components/draggable-dashboard/composables/useGridSystem.ts +169 -0
- package/shared/components/draggable-dashboard/composables/useLayoutPersistence.ts +89 -0
- package/shared/components/draggable-dashboard/composables/useResizeObserver.ts +105 -0
- package/shared/components/draggable-dashboard/composables/useWidgetLayout.ts +264 -0
- package/shared/components/draggable-dashboard/composables/useWidgetStyles.ts +120 -0
- package/shared/components/draggable-dashboard/types.ts +6 -1
- package/shared/components/notification-dropdown/notification-dropdown.vue +1 -0
- package/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue +27 -0
- package/ui/components/atoms/vc-icon/icons/OffersIcon.vue +23 -0
- package/ui/components/atoms/vc-icon/icons/OrdersIcon.vue +19 -0
- package/ui/components/atoms/vc-icon/icons/PeopleIcon.vue +21 -0
- package/ui/components/atoms/vc-icon/icons/ProductsIcon.vue +23 -0
- package/ui/components/atoms/vc-icon/icons/ProfileIcon.vue +18 -0
- package/ui/components/atoms/vc-icon/icons/index.ts +6 -0
- package/ui/components/atoms/vc-icon/vc-icon.vue +101 -82
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue +10 -3
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +3 -4
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +2 -2
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +1 -0
- package/ui/components/organisms/vc-app/vc-app.vue +2 -3
- package/ui/components/organisms/vc-table/vc-table.vue +4 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
width?: string | number | undefined;
|
|
3
|
+
height?: string | number | undefined;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=FulfillmentCentersIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FulfillmentCentersIcon.vue.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.ts"],"names":[],"mappings":";;;;;;;AAmHA,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
width?: string | number | undefined;
|
|
3
|
+
height?: string | number | undefined;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=OffersIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OffersIcon.vue.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/OffersIcon.vue.ts"],"names":[],"mappings":";;;;;;;AA2GA,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
width?: string | number | undefined;
|
|
3
|
+
height?: string | number | undefined;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=OrdersIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrdersIcon.vue.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/OrdersIcon.vue.ts"],"names":[],"mappings":";;;;;;;AAgEA,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
width?: string | number | undefined;
|
|
3
|
+
height?: string | number | undefined;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=PeopleIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeopleIcon.vue.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/PeopleIcon.vue.ts"],"names":[],"mappings":";;;;;;;AAmGA,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
width?: string | number | undefined;
|
|
3
|
+
height?: string | number | undefined;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=ProductsIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductsIcon.vue.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/ProductsIcon.vue.ts"],"names":[],"mappings":";;;;;;;AA0GA,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
width?: string | number | undefined;
|
|
3
|
+
height?: string | number | undefined;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=ProfileIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileIcon.vue.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/ProfileIcon.vue.ts"],"names":[],"mappings":";;;;;;;AAmFA,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -10,11 +10,17 @@ export { default as CircleDotsIcon } from "./CircleDotsIcon.vue";
|
|
|
10
10
|
export { default as CrossSignIcon } from "./CrossSignIcon.vue";
|
|
11
11
|
export { default as DoubleArrowLeftIcon } from "./DoubleArrowLeftIcon.vue";
|
|
12
12
|
export { default as DoubleArrowRightIcon } from "./DoubleArrowRightIcon.vue";
|
|
13
|
+
export { default as FulfillmentCentersIcon } from "./FulfillmentCentersIcon.vue";
|
|
13
14
|
export { default as GridDotsIcon } from "./GridDotsIcon.vue";
|
|
14
15
|
export { default as LogoutIcon } from "./LogoutIcon.vue";
|
|
15
16
|
export { default as MenuBurgerIcon } from "./MenuBurgerIcon.vue";
|
|
16
17
|
export { default as MinusSignIcon } from "./MinusSignIcon.vue";
|
|
18
|
+
export { default as OffersIcon } from "./OffersIcon.vue";
|
|
19
|
+
export { default as OrdersIcon } from "./OrdersIcon.vue";
|
|
20
|
+
export { default as PeopleIcon } from "./PeopleIcon.vue";
|
|
17
21
|
export { default as PlusSignIcon } from "./PlusSignIcon.vue";
|
|
22
|
+
export { default as ProductsIcon } from "./ProductsIcon.vue";
|
|
23
|
+
export { default as ProfileIcon } from "./ProfileIcon.vue";
|
|
18
24
|
export { default as SearchIcon } from "./SearchIcon.vue";
|
|
19
25
|
export { default as SettingsBoltIcon } from "./SettingsBoltIcon.vue";
|
|
20
26
|
export { default as ShoppingCardIcon } from "./ShoppingCardIcon.vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../ui/components/atoms/vc-icon/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,E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,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-bar-button.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,cAAc,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"app-bar-button.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,cAAc,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,GAA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
|
4
5
|
isVisible?: boolean;
|
|
5
6
|
url?: string;
|
|
6
|
-
icon?: string;
|
|
7
|
+
icon?: string | Component;
|
|
7
8
|
title?: string;
|
|
8
9
|
children?: MenuItem[];
|
|
9
10
|
expand?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-app-menu-item.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"vc-app-menu-item.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzC;;;;;;;;;;;;;;;;;AA2HD,wBAOG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAA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C;CAEf;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CAEf;;;;;;;;;;;;AAsZD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,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AM,GAAG,SAAS,GAAG,IAAI;gBACjD,aAAa,QAAQ,aAAa,GAAG,IAAI;gBACzC,WAAW,YAAY,IAAI;gBAC3B,YAAY,GAAG,IAAI;gBACnB,aAAa;2BAAqB,MAAM;2BAAa,MAAM;;gBAAiB,IAAI;gBAChF,YAAY,UAAU,OAAO,GAAG,IAAI;gBACpC,gBAAgB,QAAQ;gBAAE,OAAO;oBAAE,KAAK,EAAE,MAAM,CAAC;oBAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;iBAAE,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI;gBAClG,aAAa,GAAG,IAAI;gBACpB,YAAY,QAAQ;gBAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI;;;;AA3E3E,wBAysB2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/dompurify": "^3.0.5",
|
|
68
|
-
"@vc-shell/api-client-generator": "^1.1.0-alpha.
|
|
69
|
-
"@vc-shell/config-generator": "^1.1.0-alpha.
|
|
70
|
-
"@vc-shell/ts-config": "^1.1.0-alpha.
|
|
68
|
+
"@vc-shell/api-client-generator": "^1.1.0-alpha.6",
|
|
69
|
+
"@vc-shell/config-generator": "^1.1.0-alpha.6",
|
|
70
|
+
"@vc-shell/ts-config": "^1.1.0-alpha.6",
|
|
71
71
|
"@vitejs/plugin-vue": "5.0.3",
|
|
72
72
|
"@vue/test-utils": "^2.4.5",
|
|
73
73
|
"cypress-signalr-mock": "^1.5.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:class="{
|
|
15
15
|
'is-animating': isDragging,
|
|
16
16
|
}"
|
|
17
|
-
:style="getPreviewStyles(draggedWidget, previewPosition)"
|
|
17
|
+
:style="widgetStyles.getPreviewStyles(draggedWidget, previewPosition)"
|
|
18
18
|
></div>
|
|
19
19
|
|
|
20
20
|
<!-- Widgets -->
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
v-for="widget in widgets"
|
|
23
23
|
:key="widget.id"
|
|
24
24
|
:widget="widget"
|
|
25
|
-
:style="
|
|
25
|
+
:style="getWidgetStylesWithState(widget)"
|
|
26
26
|
:is-dragging="draggedWidget?.id === widget.id"
|
|
27
27
|
:class="{
|
|
28
28
|
'is-dragging': draggedWidget?.id === widget.id,
|
|
@@ -37,12 +37,35 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<script setup lang="ts">
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* DraggableDashboard Component
|
|
42
|
+
*
|
|
43
|
+
* A flexible dashboard that allows widgets to be dragged and arranged in a grid layout.
|
|
44
|
+
* Features:
|
|
45
|
+
* - Drag and drop interface for arranging widgets
|
|
46
|
+
* - Automatic layout calculation
|
|
47
|
+
* - Collision detection and displacement
|
|
48
|
+
* - Responsive grid
|
|
49
|
+
* - Layout persistence in localStorage
|
|
50
|
+
* - Support for built-in widget positions
|
|
51
|
+
*
|
|
52
|
+
* Widget positions are automatically saved to localStorage whenever the layout changes
|
|
53
|
+
* and restored when the dashboard is initialized.
|
|
54
|
+
*
|
|
55
|
+
* Position initialization priority:
|
|
56
|
+
* 1. Positions from localStorage (if available)
|
|
57
|
+
* 2. Built-in widget positions (if defined)
|
|
58
|
+
* 3. Automatic arrangement in rows
|
|
59
|
+
*/
|
|
60
|
+
import { ref, onMounted, onUnmounted, defineExpose, computed, watch } from "vue";
|
|
61
|
+
import type { Ref } from "vue";
|
|
42
62
|
import type { IDashboardWidget } from "./types";
|
|
43
63
|
import { useDashboardGrid } from "./composables/useDashboardGrid";
|
|
44
64
|
import { useDashboardDragAndDrop } from "./composables/useDashboardDragAndDrop";
|
|
45
65
|
import { useDashboard } from "../../../core/composables/useDashboard";
|
|
66
|
+
import { useCellSizeCalculator } from "./composables/useCellSizeCalculator";
|
|
67
|
+
import { useWidgetStyles } from "./composables/useWidgetStyles";
|
|
68
|
+
import { useResizeObserver } from "./composables/useResizeObserver";
|
|
46
69
|
import VcContainer from "../../../ui/components/atoms/vc-container/vc-container.vue";
|
|
47
70
|
import DashboardWidget from "./_internal/DashboardWidget.vue";
|
|
48
71
|
|
|
@@ -54,15 +77,37 @@ const dashboard = useDashboard();
|
|
|
54
77
|
const {
|
|
55
78
|
widgets,
|
|
56
79
|
layout,
|
|
57
|
-
|
|
80
|
+
GRID_COLUMNS,
|
|
81
|
+
getGridRows,
|
|
58
82
|
arrangeWidgetsInRows,
|
|
59
83
|
initializeLayout,
|
|
60
|
-
|
|
84
|
+
saveLayoutToLocalStorage,
|
|
85
|
+
loadLayoutFromLocalStorage,
|
|
86
|
+
initializeWithBuiltInPositions,
|
|
61
87
|
} = useDashboardGrid();
|
|
62
88
|
|
|
89
|
+
// Initialize cellSize calculator
|
|
90
|
+
const cellSizeCalculator = useCellSizeCalculator(GRID_COLUMNS);
|
|
91
|
+
|
|
92
|
+
// Function for getting the cell sizes
|
|
93
|
+
const getCellSize = () => {
|
|
94
|
+
return cellSizeCalculator.calculateCellSize(gridContainerRef.value);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Initialize widget styles
|
|
98
|
+
const widgetStyles = useWidgetStyles(getCellSize);
|
|
99
|
+
|
|
63
100
|
// Initialize Drag & Drop
|
|
64
|
-
const {
|
|
65
|
-
|
|
101
|
+
const {
|
|
102
|
+
draggedWidget,
|
|
103
|
+
previewPosition,
|
|
104
|
+
displacedWidgets,
|
|
105
|
+
isDragging,
|
|
106
|
+
handleMouseDown,
|
|
107
|
+
setGridContainer,
|
|
108
|
+
isWidgetDisplaced,
|
|
109
|
+
getDisplacedPosition,
|
|
110
|
+
} = useDashboardDragAndDrop(dashboard.updateWidgetPosition, getGridRows);
|
|
66
111
|
|
|
67
112
|
// Pass grid container reference to the dragging composable
|
|
68
113
|
watch(gridContainerRef, (container) => {
|
|
@@ -71,141 +116,38 @@ watch(gridContainerRef, (container) => {
|
|
|
71
116
|
}
|
|
72
117
|
});
|
|
73
118
|
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// Function to get cell size with caching
|
|
84
|
-
const getCellSize = () => {
|
|
85
|
-
if (cellSizeCache.value) return cellSizeCache.value;
|
|
86
|
-
if (!gridContainerRef.value) return { width: 0, height: 0 };
|
|
87
|
-
|
|
88
|
-
const rect = gridContainerRef.value.getBoundingClientRect();
|
|
89
|
-
const availableWidth = rect.width - 2 * 18; // Subtract horizontal padding (18px on each side)
|
|
90
|
-
const cellWidthWithGap = availableWidth / 12; // Total width including gap
|
|
91
|
-
|
|
92
|
-
const size = {
|
|
93
|
-
width: Math.max(cellWidthWithGap, 0), // Protection from negative values
|
|
94
|
-
height: 80, // Cell height remains the same
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
cellSizeCache.value = size;
|
|
98
|
-
previousContainerWidth.value = rect.width;
|
|
99
|
-
return size;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// Clear cache when window is resized
|
|
103
|
-
const clearCellSizeCache = () => {
|
|
104
|
-
cellSizeCache.value = null;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
// Recalculate widget positions based on new container size
|
|
108
|
-
const recalculateWidgetPositions = () => {
|
|
109
|
-
// First recalculate cell size to get updated dimensions
|
|
110
|
-
getCellSize();
|
|
111
|
-
|
|
112
|
-
// Update previous width
|
|
113
|
-
if (gridContainerRef.value) {
|
|
114
|
-
previousContainerWidth.value = gridContainerRef.value.getBoundingClientRect().width;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
119
|
+
// Watch for layout changes and save to localStorage
|
|
120
|
+
watch(
|
|
121
|
+
layout,
|
|
122
|
+
() => {
|
|
123
|
+
saveLayoutToLocalStorage();
|
|
124
|
+
},
|
|
125
|
+
{ deep: true },
|
|
126
|
+
);
|
|
117
127
|
|
|
118
128
|
// Handle container resize with debounce
|
|
119
129
|
const handleContainerResize = (entries: ResizeObserverEntry[]) => {
|
|
120
130
|
if (!entries.length || isDragging.value) return;
|
|
121
131
|
|
|
122
132
|
const entry = entries[0];
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
// Clear cache to force recalculation of sizes
|
|
126
|
-
clearCellSizeCache();
|
|
133
|
+
const container = gridContainerRef.value;
|
|
127
134
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const widthChangePercent = previousContainerWidth.value ? (widthChange / previousContainerWidth.value) * 100 : 0;
|
|
131
|
-
|
|
132
|
-
if (widthChangePercent > 5 || widthChange > 50) {
|
|
133
|
-
recalculateWidgetPositions();
|
|
135
|
+
if (container) {
|
|
136
|
+
cellSizeCalculator.handleContainerResize(container);
|
|
134
137
|
}
|
|
135
|
-
}; // 300ms debounce
|
|
136
|
-
|
|
137
|
-
// Get styles for preview position indicator
|
|
138
|
-
const getPreviewStyles = (widget: IDashboardWidget, position: { x: number; y: number }) => {
|
|
139
|
-
const cellSize = getCellSize();
|
|
140
|
-
if (!position || !widget?.size) return {};
|
|
141
|
-
|
|
142
|
-
const widgetGap = 20; // Widget gap in pixels
|
|
143
|
-
|
|
144
|
-
return {
|
|
145
|
-
width: `${widget.size.width * cellSize.width - widgetGap}px`,
|
|
146
|
-
height: `${widget.size.height * cellSize.height - widgetGap}px`,
|
|
147
|
-
transform: `translate(${position.x * cellSize.width + widgetGap / 2}px, ${position.y * cellSize.height + widgetGap / 2}px)`,
|
|
148
|
-
};
|
|
149
138
|
};
|
|
150
139
|
|
|
151
|
-
//
|
|
152
|
-
const
|
|
153
|
-
return displacedWidgets.value.has(widgetId);
|
|
154
|
-
};
|
|
140
|
+
// Initialize resize observer
|
|
141
|
+
const resizeObserver = useResizeObserver(handleContainerResize, { debounceMs: 300 });
|
|
155
142
|
|
|
156
|
-
//
|
|
157
|
-
const
|
|
143
|
+
// Gets the styles for the widget depending on its state
|
|
144
|
+
const getWidgetStylesWithState = (widget: IDashboardWidget) => {
|
|
158
145
|
const position = layout.value.get(widget.id);
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const cellSize = getCellSize();
|
|
162
|
-
const widgetGap = 20; // Widget gap in pixels
|
|
163
|
-
|
|
164
|
-
// Calculate actual dimensions with gaps
|
|
165
|
-
const width = widget.size.width * cellSize.width - widgetGap;
|
|
166
|
-
const height = widget.size.height * cellSize.height - widgetGap;
|
|
167
|
-
|
|
168
|
-
// Calculate position with gaps
|
|
169
|
-
const left = position.x * cellSize.width + widgetGap / 2;
|
|
170
|
-
const top = position.y * cellSize.height + widgetGap / 2;
|
|
171
|
-
|
|
172
|
-
// Base styles for all widgets
|
|
173
|
-
const baseStyles = {
|
|
174
|
-
position: "absolute",
|
|
175
|
-
width: `${width}px`,
|
|
176
|
-
height: `${height}px`,
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// If widget is being displaced by another widget
|
|
180
|
-
if (isWidgetDisplaced(widget.id)) {
|
|
181
|
-
const newPos = displacedWidgets.value.get(widget.id)!;
|
|
182
|
-
return {
|
|
183
|
-
...baseStyles,
|
|
184
|
-
transform: `translate(${newPos.x * cellSize.width + widgetGap / 2}px, ${newPos.y * cellSize.height + widgetGap / 2}px)`,
|
|
185
|
-
transition: "transform var(--dashboard-transition-duration) var(--dashboard-transition-timing)",
|
|
186
|
-
zIndex: "10",
|
|
187
|
-
} as Record<string, string>;
|
|
188
|
-
}
|
|
146
|
+
const isDragged = draggedWidget.value?.id === widget.id;
|
|
147
|
+
const displacedPosition = isWidgetDisplaced(widget.id) ? getDisplacedPosition(widget.id) : undefined;
|
|
189
148
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return {
|
|
193
|
-
...baseStyles,
|
|
194
|
-
transform: `translate(${left}px, ${top}px)`,
|
|
195
|
-
opacity: "0", // Hide original since clone is displayed
|
|
196
|
-
pointerEvents: "none",
|
|
197
|
-
zIndex: "1",
|
|
198
|
-
transition: "none", // Disable animations for the source widget
|
|
199
|
-
} as Record<string, string>;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Regular widget
|
|
203
|
-
return {
|
|
204
|
-
...baseStyles,
|
|
205
|
-
transform: `translate(${left}px, ${top}px)`,
|
|
206
|
-
transition: "transform var(--dashboard-transition-duration) var(--dashboard-transition-timing)",
|
|
207
|
-
} as Record<string, string>;
|
|
208
|
-
});
|
|
149
|
+
return widgetStyles.getWidgetStyles(widget, position, isDragged, displacedPosition);
|
|
150
|
+
};
|
|
209
151
|
|
|
210
152
|
// Public method for rearranging widgets
|
|
211
153
|
const rearrangeWidgets = () => {
|
|
@@ -214,10 +156,44 @@ const rearrangeWidgets = () => {
|
|
|
214
156
|
|
|
215
157
|
// Public method to manually trigger a layout recalculation
|
|
216
158
|
const recalculateLayout = () => {
|
|
217
|
-
|
|
159
|
+
cellSizeCalculator.clearCache();
|
|
218
160
|
recalculateWidgetPositions();
|
|
219
161
|
};
|
|
220
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Manually saves the current dashboard layout to localStorage
|
|
165
|
+
*
|
|
166
|
+
* The layout is automatically saved when it changes, but this method
|
|
167
|
+
* can be used to trigger a save operation manually if needed.
|
|
168
|
+
*/
|
|
169
|
+
const saveLayout = () => {
|
|
170
|
+
saveLayoutToLocalStorage();
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Initializes dashboard widgets using their built-in positions
|
|
175
|
+
*
|
|
176
|
+
* This is used to reset the layout to the original widget positions
|
|
177
|
+
* defined when the widgets were registered.
|
|
178
|
+
*
|
|
179
|
+
* @returns {boolean} True if at least one widget had a built-in position
|
|
180
|
+
*/
|
|
181
|
+
const useBuiltInPositions = () => {
|
|
182
|
+
const result = initializeWithBuiltInPositions();
|
|
183
|
+
return result;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// Recalculate widget positions based on new container size
|
|
187
|
+
const recalculateWidgetPositions = () => {
|
|
188
|
+
// First recalculate cell size to get updated dimensions
|
|
189
|
+
getCellSize();
|
|
190
|
+
|
|
191
|
+
// Update previous width
|
|
192
|
+
if (gridContainerRef.value) {
|
|
193
|
+
cellSizeCalculator.previousContainerWidth.value = gridContainerRef.value.getBoundingClientRect().width;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
221
197
|
// Add cleanup on component unmount
|
|
222
198
|
onMounted(() => {
|
|
223
199
|
initializeLayout();
|
|
@@ -225,35 +201,25 @@ onMounted(() => {
|
|
|
225
201
|
getCellSize();
|
|
226
202
|
|
|
227
203
|
// Initialize resize observer for the container
|
|
228
|
-
if (gridContainerRef.value &&
|
|
229
|
-
resizeObserver.value
|
|
230
|
-
resizeObserver.value.observe(gridContainerRef.value);
|
|
204
|
+
if (gridContainerRef.value && resizeObserver.isSupported) {
|
|
205
|
+
resizeObserver.observe(gridContainerRef.value);
|
|
231
206
|
}
|
|
232
207
|
|
|
233
208
|
// Also keep the window resize listener for fallback compatibility
|
|
234
|
-
window.addEventListener("resize",
|
|
209
|
+
window.addEventListener("resize", cellSizeCalculator.clearCache);
|
|
235
210
|
});
|
|
236
211
|
|
|
237
212
|
onUnmounted(() => {
|
|
238
|
-
// Cleanup
|
|
239
|
-
|
|
240
|
-
resizeObserver.value.disconnect();
|
|
241
|
-
resizeObserver.value = null;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// Clear debounce timer if any
|
|
245
|
-
if (resizeDebounceTimer.value !== null) {
|
|
246
|
-
window.clearTimeout(resizeDebounceTimer.value);
|
|
247
|
-
resizeDebounceTimer.value = null;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
window.removeEventListener("resize", clearCellSizeCache);
|
|
213
|
+
// Cleanup window event listener
|
|
214
|
+
window.removeEventListener("resize", cellSizeCalculator.clearCache);
|
|
251
215
|
});
|
|
252
216
|
|
|
253
217
|
// Export public methods
|
|
254
218
|
defineExpose({
|
|
255
219
|
rearrangeWidgets,
|
|
256
220
|
recalculateLayout,
|
|
221
|
+
saveLayout,
|
|
222
|
+
useBuiltInPositions,
|
|
257
223
|
});
|
|
258
224
|
</script>
|
|
259
225
|
|