@vc-shell/framework 1.0.254 → 1.0.256
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.0.256](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.255...v1.0.256) (2024-07-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **core:** fix useDynamicModules error ([f85b5ec](https://github.com/VirtoCommerce/vc-shell/commit/f85b5ecf0d9b39c66b1389796ad453aaae3800da))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.0.255](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.254...v1.0.255) (2024-07-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **core:** useDynamicModules fix ([b38d966](https://github.com/VirtoCommerce/vc-shell/commit/b38d9668b410d7bbb0d798f2218f2b6051416cc9))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [1.0.254](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.253...v1.0.254) (2024-07-12)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -35,17 +35,17 @@ function loadCSS(url: string) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function useDynamicModules(app: App, { router, appName }: { router: Router; appName: string }) {
|
|
38
|
-
if (!appName) return;
|
|
39
|
-
|
|
40
38
|
async function load() {
|
|
41
39
|
try {
|
|
42
40
|
const appsUrl = "/Modules/$(VirtoCommerce.MarketplaceVendor)/Content/apps.json";
|
|
43
41
|
const modules: Apps[] = await fetch(appsUrl).then((res) => res.json());
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
const module = modules.find((module) => module[appName]);
|
|
44
|
+
|
|
45
|
+
if (typeof module !== "undefined") {
|
|
46
|
+
const appModules = module[appName]?.modules;
|
|
47
47
|
|
|
48
|
-
if (!appModules.length) {
|
|
48
|
+
if (!(appModules && appModules.length)) {
|
|
49
49
|
throw new Error("Modules not found");
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAmCpC,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAmCpC,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;;EA4DnG"}
|
package/dist/framework.js
CHANGED
|
@@ -52468,13 +52468,12 @@ function yge(t) {
|
|
|
52468
52468
|
});
|
|
52469
52469
|
}
|
|
52470
52470
|
function bge(t, { router: e, appName: n }) {
|
|
52471
|
-
if (!n) return;
|
|
52472
52471
|
async function r() {
|
|
52473
52472
|
try {
|
|
52474
|
-
const
|
|
52475
|
-
|
|
52476
|
-
const s = o[n]
|
|
52477
|
-
if (!s.length)
|
|
52473
|
+
const o = (await fetch("/Modules/$(VirtoCommerce.MarketplaceVendor)/Content/apps.json").then((s) => s.json())).find((s) => s[n]);
|
|
52474
|
+
if (typeof o < "u") {
|
|
52475
|
+
const s = o[n]?.modules;
|
|
52476
|
+
if (!(s && s.length))
|
|
52478
52477
|
throw new Error("Modules not found");
|
|
52479
52478
|
for (const l of s) {
|
|
52480
52479
|
const u = l.url.replace(/^([^/])/, "/$1").replace(/([^/])$/, "$1/"), c = await fetch(u + "manifest.json");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.256",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/dompurify": "^3.0.5",
|
|
63
63
|
"@types/quill": "^2.0.14",
|
|
64
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
65
|
-
"@vc-shell/config-generator": "^1.0.
|
|
66
|
-
"@vc-shell/ts-config": "^1.0.
|
|
64
|
+
"@vc-shell/api-client-generator": "^1.0.256",
|
|
65
|
+
"@vc-shell/config-generator": "^1.0.256",
|
|
66
|
+
"@vc-shell/ts-config": "^1.0.256",
|
|
67
67
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
68
68
|
"cypress-signalr-mock": "^1.5.0",
|
|
69
69
|
"sass": "^1.69.6",
|