@vc-shell/framework 1.0.190 → 1.0.192

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 (30) 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 +11960 -11881
  5. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +5 -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/composables/useFilterBuilder/index.d.ts.map +1 -1
  10. package/dist/shared/modules/dynamic/index.d.ts.map +1 -1
  11. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +8 -9
  12. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  13. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +1 -0
  16. 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
  17. 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
  18. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  19. package/package.json +4 -4
  20. package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +235 -191
  21. package/shared/components/blade-navigation/plugin.ts +1 -1
  22. package/shared/components/blade-navigation/types/index.ts +0 -1
  23. package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +6 -3
  24. package/shared/modules/dynamic/index.ts +5 -0
  25. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +4 -1
  26. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +5 -1
  27. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +4 -15
  28. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +2 -0
  29. package/ui/components/organisms/vc-app/vc-app.vue +8 -1
  30. package/ui/components/organisms/vc-table/vc-table.vue +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [1.0.192](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.191...v1.0.192) (2024-04-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * router param lost ([9931a84](https://github.com/VirtoCommerce/vc-shell/commit/9931a848c18389f80fad6f22e5e864952aa0e277))
7
+
8
+
9
+ ### Features
10
+
11
+ * **navigation:** better work with custom app param, preserve blades where it's possible ([49d3ae8](https://github.com/VirtoCommerce/vc-shell/commit/49d3ae8b40178fb6d29d6b8f54880a2f5e0e21c4))
12
+
13
+
14
+
15
+ ## [1.0.191](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.190...v1.0.191) (2024-04-09)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **dynamic:** support fetched data in filters ([c6c133d](https://github.com/VirtoCommerce/vc-shell/commit/c6c133d8224d6905a3a4a3d45ef474c3dabd56f3))
21
+
22
+
23
+
1
24
  ## [1.0.190](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.189...v1.0.190) (2024-04-03)
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"}