@vc-shell/framework 1.1.45 → 1.1.46
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 +9 -0
- package/core/plugins/modularity/loader.ts +33 -3
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/framework.js +30 -22
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/ui/components/atoms/vc-icon/vc-icon.vue +10 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [1.1.46](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.45...v1.1.46) (2025-07-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **dynamic-module:** enhance UMD name generation and improve logging for dynamic module loading ([8d43f21](https://github.com/VirtoCommerce/vc-shell/commit/8d43f216e6ec3f9f61ab93953f297d80832f9ed7))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [1.1.45](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.44...v1.1.45) (2025-07-01)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -308,18 +308,40 @@ export function useDynamicModules(
|
|
|
308
308
|
moduleLoadResults.filter((result) => result.success).map((result) => [result.moduleId, result]),
|
|
309
309
|
);
|
|
310
310
|
|
|
311
|
+
// Debug: log what we have in window.VcShellDynamicModules
|
|
312
|
+
console.log(
|
|
313
|
+
"🔍 Available modules in window.VcShellDynamicModules:",
|
|
314
|
+
typeof window !== "undefined" && window.VcShellDynamicModules
|
|
315
|
+
? Object.keys(window.VcShellDynamicModules)
|
|
316
|
+
: "No modules found",
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
console.log("🔍 LoadedModules set:", Array.from(loadedModules));
|
|
320
|
+
console.log("🔍 LoadResultsMap keys:", Array.from(loadResultsMap.keys()));
|
|
321
|
+
|
|
311
322
|
// Install all modules after loading
|
|
312
323
|
if (typeof window !== "undefined" && window.VcShellDynamicModules) {
|
|
313
|
-
Object.entries(window.VcShellDynamicModules)
|
|
324
|
+
const modulesToInstall = Object.entries(window.VcShellDynamicModules);
|
|
325
|
+
console.log(
|
|
326
|
+
`🚀 Found ${modulesToInstall.length} modules to process:`,
|
|
327
|
+
modulesToInstall.map(([key]) => key),
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
modulesToInstall.forEach(([moduleKey, mod]) => {
|
|
331
|
+
console.log(`📦 Processing module: ${moduleKey}`);
|
|
332
|
+
|
|
314
333
|
// Skip if module is already loaded
|
|
315
334
|
if (loadedModules.has(moduleKey)) {
|
|
316
|
-
console.log(
|
|
335
|
+
console.log(`⏭️ Module ${moduleKey} already loaded, skipping`);
|
|
317
336
|
return;
|
|
318
337
|
}
|
|
319
338
|
|
|
320
339
|
try {
|
|
321
340
|
const moduleExports = mod as ModuleExports;
|
|
341
|
+
console.log(`🔍 Module ${moduleKey} exports:`, Object.keys(moduleExports));
|
|
342
|
+
|
|
322
343
|
const moduleToInstall = "default" in moduleExports ? moduleExports.default : moduleExports;
|
|
344
|
+
console.log(`🔍 Module ${moduleKey} has install function:`, "install" in moduleToInstall);
|
|
323
345
|
|
|
324
346
|
if ("install" in moduleToInstall) {
|
|
325
347
|
// Use moduleKey as the primary identifier
|
|
@@ -330,7 +352,11 @@ export function useDynamicModules(
|
|
|
330
352
|
const versionInfoFromFile = loadResult?.versionInfoFromFile;
|
|
331
353
|
const moduleVersion = loadResult?.moduleVersion;
|
|
332
354
|
|
|
333
|
-
console.log(
|
|
355
|
+
console.log(`🔧 Installing module: ${currentModuleId}`, {
|
|
356
|
+
hasLoadResult: !!loadResult,
|
|
357
|
+
versionFromFile: versionInfoFromFile?.version,
|
|
358
|
+
moduleVersion,
|
|
359
|
+
});
|
|
334
360
|
|
|
335
361
|
if (!finalConfig.skipVersionCheck) {
|
|
336
362
|
const versionInfo =
|
|
@@ -391,6 +417,10 @@ export function useDynamicModules(
|
|
|
391
417
|
console.error(`❌ Failed to register plugin for module ${moduleKey}:`, error);
|
|
392
418
|
}
|
|
393
419
|
});
|
|
420
|
+
|
|
421
|
+
console.log("🏁 Final loadedModules set:", Array.from(loadedModules));
|
|
422
|
+
} else {
|
|
423
|
+
console.warn("⚠️ No window.VcShellDynamicModules found or window is undefined");
|
|
394
424
|
}
|
|
395
425
|
}
|
|
396
426
|
} catch (error) {
|
|
@@ -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;AA4HpC,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA6DD,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,GAAG,EACR,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACxD,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM;;;;
|
|
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;AA4HpC,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA6DD,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,GAAG,EACR,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACxD,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM;;;;EAsPnC"}
|
package/dist/framework.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as VueRouter from 'vue-router';
|
|
2
2
|
import { useRoute, RouterView, useRouter } from 'vue-router';
|
|
3
3
|
import * as e from 'vue';
|
|
4
|
-
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, toDisplayString, unref, ref, watch, createBlock, mergeProps,
|
|
4
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, toDisplayString, unref, ref, watch, createBlock, mergeProps, markRaw, resolveDynamicComponent, createVNode, Transition, withCtx, withDirectives, vShow, shallowRef, inject, onMounted, Fragment, renderList, createSlots, createTextVNode, onUnmounted, readonly, getCurrentInstance, onErrorCaptured, nextTick, provide, onBeforeMount, onBeforeUnmount, reactive, toValue, watchEffect, useAttrs, resolveComponent, Teleport, withModifiers, toRef, resolveDirective, vModelDynamic, withKeys, normalizeProps, guardReactiveProps, toRefs, vModelCheckbox, isRef, h, createApp, toRaw, isVNode, warn, shallowReactive, watchPostEffect, useSlots, onUpdated, toHandlers } from 'vue';
|
|
5
5
|
import { l as loadIcon, I as Icon } from './vendor-iconify-vue-DfRGgyNu.js';
|
|
6
6
|
import { u as useFloating } from './vendor-floating-ui-vue-D-tCDAMm.js';
|
|
7
7
|
import { o as offset, s as shift, f as flip, a as autoUpdate } from './vendor-floating-ui-dom-DDnRPs17.js';
|
|
@@ -535,20 +535,9 @@ const _sfc_main$1Y = /* @__PURE__ */ defineComponent({
|
|
|
535
535
|
return false;
|
|
536
536
|
}
|
|
537
537
|
if (isLucideIcon.value) {
|
|
538
|
-
|
|
539
|
-
const iconName = typeof normalizedIconName.value === "string" ? normalizedIconName.value : String(normalizedIconName.value);
|
|
540
|
-
const resolved = resolveComponent(iconName);
|
|
541
|
-
return resolved !== iconName;
|
|
542
|
-
} catch (e) {
|
|
543
|
-
return false;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
try {
|
|
547
|
-
const resolved = resolveComponent(props.icon);
|
|
548
|
-
return resolved !== props.icon;
|
|
549
|
-
} catch (e) {
|
|
550
|
-
return false;
|
|
538
|
+
return true;
|
|
551
539
|
}
|
|
540
|
+
return false;
|
|
552
541
|
});
|
|
553
542
|
const safeIcon = computed(() => {
|
|
554
543
|
if (typeof props.icon !== "string") {
|
|
@@ -557,13 +546,11 @@ const _sfc_main$1Y = /* @__PURE__ */ defineComponent({
|
|
|
557
546
|
if (["fontawesome", "bootstrap", "material"].includes(detectIconType.value)) {
|
|
558
547
|
return "i";
|
|
559
548
|
}
|
|
560
|
-
|
|
549
|
+
if (isLucideIcon.value) {
|
|
561
550
|
const iconName = typeof normalizedIconName.value === "string" ? normalizedIconName.value : String(normalizedIconName.value);
|
|
562
|
-
|
|
563
|
-
return resolved !== iconName ? resolved : "i";
|
|
564
|
-
} catch (e) {
|
|
565
|
-
return "i";
|
|
551
|
+
return iconName;
|
|
566
552
|
}
|
|
553
|
+
return "i";
|
|
567
554
|
});
|
|
568
555
|
const renderComponent = computed(() => {
|
|
569
556
|
if (isMaterialIcon.value) {
|
|
@@ -16778,21 +16765,39 @@ function useDynamicModules(app, { router, appName }, config = {}) {
|
|
|
16778
16765
|
const loadResultsMap = new Map(
|
|
16779
16766
|
moduleLoadResults.filter((result) => result.success).map((result) => [result.moduleId, result])
|
|
16780
16767
|
);
|
|
16768
|
+
console.log(
|
|
16769
|
+
"🔍 Available modules in window.VcShellDynamicModules:",
|
|
16770
|
+
typeof window !== "undefined" && window.VcShellDynamicModules ? Object.keys(window.VcShellDynamicModules) : "No modules found"
|
|
16771
|
+
);
|
|
16772
|
+
console.log("🔍 LoadedModules set:", Array.from(loadedModules));
|
|
16773
|
+
console.log("🔍 LoadResultsMap keys:", Array.from(loadResultsMap.keys()));
|
|
16781
16774
|
if (typeof window !== "undefined" && window.VcShellDynamicModules) {
|
|
16782
|
-
Object.entries(window.VcShellDynamicModules)
|
|
16775
|
+
const modulesToInstall = Object.entries(window.VcShellDynamicModules);
|
|
16776
|
+
console.log(
|
|
16777
|
+
`🚀 Found ${modulesToInstall.length} modules to process:`,
|
|
16778
|
+
modulesToInstall.map(([key]) => key)
|
|
16779
|
+
);
|
|
16780
|
+
modulesToInstall.forEach(([moduleKey, mod]) => {
|
|
16781
|
+
console.log(`📦 Processing module: ${moduleKey}`);
|
|
16783
16782
|
if (loadedModules.has(moduleKey)) {
|
|
16784
|
-
console.log(
|
|
16783
|
+
console.log(`⏭️ Module ${moduleKey} already loaded, skipping`);
|
|
16785
16784
|
return;
|
|
16786
16785
|
}
|
|
16787
16786
|
try {
|
|
16788
16787
|
const moduleExports = mod;
|
|
16788
|
+
console.log(`🔍 Module ${moduleKey} exports:`, Object.keys(moduleExports));
|
|
16789
16789
|
const moduleToInstall = "default" in moduleExports ? moduleExports.default : moduleExports;
|
|
16790
|
+
console.log(`🔍 Module ${moduleKey} has install function:`, "install" in moduleToInstall);
|
|
16790
16791
|
if ("install" in moduleToInstall) {
|
|
16791
16792
|
const currentModuleId = moduleKey;
|
|
16792
16793
|
const loadResult = loadResultsMap.get(currentModuleId);
|
|
16793
16794
|
const versionInfoFromFile = loadResult?.versionInfoFromFile;
|
|
16794
16795
|
const moduleVersion = loadResult?.moduleVersion;
|
|
16795
|
-
console.log(
|
|
16796
|
+
console.log(`🔧 Installing module: ${currentModuleId}`, {
|
|
16797
|
+
hasLoadResult: !!loadResult,
|
|
16798
|
+
versionFromFile: versionInfoFromFile?.version,
|
|
16799
|
+
moduleVersion
|
|
16800
|
+
});
|
|
16796
16801
|
if (!finalConfig.skipVersionCheck) {
|
|
16797
16802
|
const versionInfo = moduleToInstall.version || versionInfoFromFile || (moduleVersion ? {
|
|
16798
16803
|
version: moduleVersion,
|
|
@@ -16841,6 +16846,9 @@ function useDynamicModules(app, { router, appName }, config = {}) {
|
|
|
16841
16846
|
console.error(`❌ Failed to register plugin for module ${moduleKey}:`, error);
|
|
16842
16847
|
}
|
|
16843
16848
|
});
|
|
16849
|
+
console.log("🏁 Final loadedModules set:", Array.from(loadedModules));
|
|
16850
|
+
} else {
|
|
16851
|
+
console.warn("⚠️ No window.VcShellDynamicModules found or window is undefined");
|
|
16844
16852
|
}
|
|
16845
16853
|
}
|
|
16846
16854
|
} catch (error) {
|