@vc-shell/framework 1.0.191 → 1.0.193

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 (25) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/core/plugins/modularity/index.ts +9 -2
  3. package/dist/core/plugins/modularity/index.d.ts.map +1 -1
  4. package/dist/framework.js +14460 -14304
  5. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +7 -2
  6. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  7. package/dist/shared/components/blade-navigation/types/index.d.ts +0 -1
  8. package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
  9. package/dist/shared/modules/dynamic/index.d.ts.map +1 -1
  10. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +8 -9
  11. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  12. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
  15. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  16. package/package.json +4 -4
  17. package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +303 -192
  18. package/shared/components/blade-navigation/plugin.ts +1 -1
  19. package/shared/components/blade-navigation/types/index.ts +0 -1
  20. package/shared/modules/dynamic/index.ts +5 -0
  21. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +4 -1
  22. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +12 -5
  23. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +14 -11
  24. package/ui/components/organisms/vc-app/vc-app.vue +8 -1
  25. package/ui/components/organisms/vc-table/vc-table.vue +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [1.0.193](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.192...v1.0.193) (2024-04-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **navigation:** query params ([f7b13ce](https://github.com/VirtoCommerce/vc-shell/commit/f7b13ce28eb4dbd8c6d81b3b3c2bd57faad59abf))
7
+
8
+
9
+
10
+ ## [1.0.192](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.191...v1.0.192) (2024-04-11)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * router param lost ([9931a84](https://github.com/VirtoCommerce/vc-shell/commit/9931a848c18389f80fad6f22e5e864952aa0e277))
16
+
17
+
18
+ ### Features
19
+
20
+ * **navigation:** better work with custom app param, preserve blades where it's possible ([49d3ae8](https://github.com/VirtoCommerce/vc-shell/commit/49d3ae8b40178fb6d29d6b8f54880a2f5e0e21c4))
21
+
22
+
23
+
1
24
  ## [1.0.191](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.190...v1.0.191) (2024-04-09)
2
25
 
3
26
 
@@ -1,9 +1,10 @@
1
1
  import { App, Component, h } from "vue";
2
2
  import { i18n } from "./../i18n";
3
3
  import { Router } from "vue-router";
4
- import { BladeInstanceConstructor } from "./../../../shared/components/blade-navigation/types";
4
+ import { BladeInstanceConstructor, BladeVNode } from "./../../../shared/components/blade-navigation/types";
5
5
  import { kebabToPascal } from "./../../utilities";
6
6
  import { useMenuService } from "../../composables";
7
+ import * as _ from "lodash-es";
7
8
 
8
9
  export const createModule = (components: { [key: string]: BladeInstanceConstructor }, locales?: unknown) => ({
9
10
  install(app: App): void {
@@ -36,6 +37,8 @@ export const createAppModule = (
36
37
  routerInstance = router;
37
38
  }
38
39
 
40
+ const uid = _.uniqueId("module_");
41
+
39
42
  // Register pages
40
43
  Object.values(pages).forEach((page) => {
41
44
  if (!("routable" in page)) {
@@ -57,6 +60,10 @@ export const createAppModule = (
57
60
  app.component(page.name, page);
58
61
  }
59
62
 
63
+ if (!page.moduleUid) {
64
+ page.moduleUid = uid;
65
+ }
66
+
60
67
  // Dynamically add pages to vue router
61
68
  if (page.url) {
62
69
  const mainRouteName = routerInstance.getRoutes().find((r) => r.meta?.root)?.name;
@@ -71,7 +78,7 @@ export const createAppModule = (
71
78
 
72
79
  const bladeVNode = h(BladeInstanceConstructor, {
73
80
  navigation: {},
74
- });
81
+ }) as BladeVNode;
75
82
 
76
83
  if (routerInstance && mainRouteName) {
77
84
  routerInstance.addRoute(mainRouteName, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAK,MAAM,KAAK,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAI/F,eAAO,MAAM,YAAY;;aAAuE,OAAO;iBACxF,GAAG,GAAG,IAAI;CAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;iBAOX,GAAG,YAAY;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CAqGxD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAK,MAAM,KAAK,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAc,MAAM,qDAAqD,CAAC;AAK3G,eAAO,MAAM,YAAY;;aAAuE,OAAO;iBACxF,GAAG,GAAG,IAAI;CAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;iBAOX,GAAG,YAAY;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CA2GxD,CAAC"}