@vcmap/ui 6.0.13 → 6.0.14

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/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui-1785b87a.js";
1
+ export * from "./ui-b6bff1d9.js";
@@ -1 +1 @@
1
- export * from "./vue-13dade86.js";
1
+ export * from "./vue-74e8343e.js";
@@ -10,7 +10,7 @@ function loadCss(href) {
10
10
  elem.onerror = reject;
11
11
  document.head.appendChild(elem);
12
12
  });
13
- } await loadCss('./assets/vuetify-73c966ed.css');import { watch as X, onScopeDispose as tt, effectScope as Ul, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Ne, toRefs as Wt, capitalize as On, isVNode as Oc, Comment as Rc, unref as ot, warn as Ha, getCurrentInstance as Nc, ref as W, provide as Ae, inject as ye, defineComponent as Hc, camelize as Ir, h as jt, toRaw as Ee, createVNode as r, mergeProps as N, onBeforeUnmount as nt, readonly as Kl, onDeactivated as _r, onActivated as zc, onMounted as Ke, nextTick as Se, TransitionGroup as ql, Transition as Ht, isRef as _n, toRef as F, onBeforeMount as Xl, withDirectives as $e, resolveDirective as dt, vShow as xt, onUpdated as Wc, Text as jc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Uc, cloneVNode as Kc, createTextVNode as Pt, onUnmounted as qc, onBeforeUpdate as Xc, withModifiers as Pl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Tr } from "./vue-13dade86.js";
13
+ } await loadCss('./assets/vuetify-2d64c180.css');import { watch as X, onScopeDispose as tt, effectScope as Ul, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Ne, toRefs as Wt, capitalize as On, isVNode as Oc, Comment as Rc, unref as ot, warn as Ha, getCurrentInstance as Nc, ref as W, provide as Ae, inject as ye, defineComponent as Hc, camelize as Ir, h as jt, toRaw as Ee, createVNode as r, mergeProps as N, onBeforeUnmount as nt, readonly as Kl, onDeactivated as _r, onActivated as zc, onMounted as Ke, nextTick as Se, TransitionGroup as ql, Transition as Ht, isRef as _n, toRef as F, onBeforeMount as Xl, withDirectives as $e, resolveDirective as dt, vShow as xt, onUpdated as Wc, Text as jc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Uc, cloneVNode as Kc, createTextVNode as Pt, onUnmounted as qc, onBeforeUpdate as Xc, withModifiers as Pl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Tr } from "./vue-74e8343e.js";
14
14
  function rt(e, n) {
15
15
  let t;
16
16
  function a() {
@@ -1 +1 @@
1
- export * from "./vuetify-73c966ed.js";
1
+ export * from "./vuetify-2d64c180.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "6.0.13",
3
+ "version": "6.0.14",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -15,6 +15,13 @@ export function getPluginAssetUrl(app: import("@src/vcsUiApp.js").default, plugi
15
15
  * @returns {boolean}
16
16
  */
17
17
  export function isValidPackageName(name: string): boolean;
18
+ /**
19
+ * joins pathname and moduleUrl.
20
+ * @param {string} pathname will remove filenames with extension or add a trailing slash if missing
21
+ * @param {string} module relative url to the module
22
+ * @returns {string}
23
+ */
24
+ export function getModuleUrl(pathname: string, module: string): string;
18
25
  /**
19
26
  * @param {string} name
20
27
  * @param {T} config
@@ -82,6 +82,23 @@ export function isValidPackageName(name) {
82
82
  );
83
83
  }
84
84
 
85
+ /**
86
+ * joins pathname and moduleUrl.
87
+ * @param {string} pathname will remove filenames with extension or add a trailing slash if missing
88
+ * @param {string} module relative url to the module
89
+ * @returns {string}
90
+ */
91
+ export function getModuleUrl(pathname, module) {
92
+ const pathNameParts = pathname.split('/');
93
+ if (pathNameParts.at(-1).includes('.')) {
94
+ pathNameParts.pop();
95
+ } else if (pathNameParts.at(-1) === '') {
96
+ pathNameParts.pop();
97
+ }
98
+ const pathName = pathNameParts.join('/');
99
+ return `${pathName}/${module}`;
100
+ }
101
+
85
102
  /**
86
103
  * @param {string} name
87
104
  * @param {T} config
@@ -93,10 +110,7 @@ export async function loadPlugin(name, config) {
93
110
  let module = config.entry;
94
111
 
95
112
  if (!/^(https?:\/\/|\/)/.test(module)) {
96
- module = `${window.location.origin}${window.location.pathname.replace(
97
- /\/?$/,
98
- '/',
99
- )}${module}`;
113
+ module = `${window.location.origin}${getModuleUrl(window.location.pathname, module)}`;
100
114
  } else if (module === '_dev') {
101
115
  module = `/${name}.js`;
102
116
  } else if (module === 'http://localhost/_test') {
File without changes