@vc-shell/framework 1.1.27 → 1.1.28

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 (26) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/core/plugins/modularity/index.ts +58 -123
  3. package/dist/core/plugins/modularity/index.d.ts.map +1 -1
  4. package/dist/framework.js +1 -1
  5. package/dist/{index-copXmHaa.js → index-7oS3eFh-.js} +1 -1
  6. package/dist/{index-DH6g1vn6.js → index-8QpC1wvA.js} +1 -1
  7. package/dist/{index-BTSkZXT8.js → index-BHDraKdx.js} +1 -1
  8. package/dist/{index-DgTmfnFD.js → index-BZeGCags.js} +1 -1
  9. package/dist/{index-BY-R-HdZ.js → index-BflAYhLw.js} +1 -1
  10. package/dist/{index-DjFrEbcz.js → index-Bl3GMBPU.js} +1 -1
  11. package/dist/{index-C3-32wVM.js → index-BqbTCfTP.js} +1 -1
  12. package/dist/{index-BzqwPR6i.js → index-BreOR-mg.js} +1 -1
  13. package/dist/{index-C0M62ScY.js → index-C0eMfF4B.js} +1 -1
  14. package/dist/{index-Ytl5MiZA.js → index-CHjYI8C4.js} +1 -1
  15. package/dist/{index-BZxRjAGk.js → index-CPNtJp2i.js} +1 -1
  16. package/dist/{index-DOWE0lAY.js → index-CaSFBVuP.js} +14699 -14740
  17. package/dist/{index-7QxPGzyc.js → index-D39t0F9o.js} +1 -1
  18. package/dist/{index-bTh-yQ1Q.js → index-DRBfl1Gs.js} +1 -1
  19. package/dist/{index-BqYr-8f0.js → index-DeapITF7.js} +1 -1
  20. package/dist/{index-CDDikrWT.js → index-FDkLzFA_.js} +1 -1
  21. package/dist/{index-D0ULQYO-.js → index-_KCehRXk.js} +1 -1
  22. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeWatchers.d.ts.map +1 -1
  23. package/dist/tsconfig.tsbuildinfo +1 -1
  24. package/package.json +4 -4
  25. package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.ts +1 -1
  26. package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeWatchers.ts +22 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -70,9 +70,9 @@
70
70
  "devDependencies": {
71
71
  "@fullhuman/postcss-purgecss": "^7.0.2",
72
72
  "@types/dompurify": "^3.0.5",
73
- "@vc-shell/api-client-generator": "^1.1.27",
74
- "@vc-shell/config-generator": "^1.1.27",
75
- "@vc-shell/ts-config": "^1.1.27",
73
+ "@vc-shell/api-client-generator": "^1.1.28",
74
+ "@vc-shell/config-generator": "^1.1.28",
75
+ "@vc-shell/ts-config": "^1.1.28",
76
76
  "@vitejs/plugin-vue": "^5.2.3",
77
77
  "@vue/test-utils": "^2.4.5",
78
78
  "cypress-signalr-mock": "^1.5.0",
@@ -215,7 +215,7 @@ export function _createBladeRouteResolver(
215
215
  effectiveBladeSegment = undefined;
216
216
  }
217
217
 
218
- if (effectiveBladeSegment && bladeComponent && bladeComponent.isBlade) {
218
+ if (effectiveBladeSegment && bladeComponent && bladeComponent.isBlade && !bladeComponent.isWorkspace) {
219
219
  if (!hasAccess(bladeComponent.permissions)) {
220
220
  // No access to blade, workspace remains open
221
221
  } else {
@@ -57,30 +57,36 @@ export function _createBladeWatchers(
57
57
  bladeState.blades,
58
58
  (newBlades) => {
59
59
  const workspace = newBlades[0];
60
- const lastBladeWithUrl = _.findLast(
61
- newBlades,
62
- (b: BladeVNode) => b && b.type.url && b.props?.navigation?.isVisible !== false,
60
+
61
+ const visibleBladesWithUrls = newBlades.filter(
62
+ (b): b is BladeVNode => !!(b && b.type && b.type.url && b.props?.navigation?.isVisible !== false),
63
63
  );
64
+ const lastBladeWithUrl: BladeVNode | undefined =
65
+ visibleBladesWithUrls.length > 0 ? visibleBladesWithUrls[visibleBladesWithUrls.length - 1] : undefined;
64
66
 
65
67
  if (workspace?.type?.url) {
66
- const constructedPath = routerUtils.constructBladePath(workspace, lastBladeWithUrl as BladeVNode | undefined);
68
+ const constructedPath = routerUtils.constructBladePath(workspace, lastBladeWithUrl);
69
+
67
70
  if (constructedPath) {
68
71
  const query = routerUtils.getURLQuery();
69
- const fullPath =
70
- (routerUtils.mainRouteBaseParamURL.value &&
72
+ const pathPrefix =
73
+ routerUtils.mainRouteBaseParamURL.value &&
71
74
  !constructedPath.startsWith(routerUtils.mainRouteBaseParamURL.value)
72
75
  ? routerUtils.mainRouteBaseParamURL.value
73
- : "") +
74
- constructedPath +
75
- (query.params ? "?" + query.params : "");
76
+ : "";
77
+ const querySuffix = query.params ? "?" + query.params : "";
78
+
79
+ const finalFullPathToSet = pathPrefix + constructedPath + querySuffix;
80
+
81
+ router.options.history.replace(finalFullPathToSet);
76
82
 
77
- if (route.fullPath !== fullPath) {
78
- router.options.history.replace(fullPath);
79
- if (lastBladeWithUrl && (lastBladeWithUrl as BladeVNode).type.name) {
80
- setupPageTracking.afterEach({ name: (lastBladeWithUrl as BladeVNode).type.name!, fullPath });
81
- } else if (workspace.type.name) {
82
- setupPageTracking.afterEach({ name: workspace.type.name, fullPath });
83
- }
83
+ if (lastBladeWithUrl && lastBladeWithUrl.type.name) {
84
+ setupPageTracking.afterEach({
85
+ name: lastBladeWithUrl.type.name!,
86
+ fullPath: finalFullPathToSet,
87
+ });
88
+ } else if (workspace.type.name) {
89
+ setupPageTracking.afterEach({ name: workspace.type.name, fullPath: finalFullPathToSet });
84
90
  }
85
91
  }
86
92
  }