@widget-js/core 0.9.28 → 0.10.6
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/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -896,7 +896,7 @@ var WidgetUrlUtils = class {
|
|
|
896
896
|
arr.push(widgetParams.toUrlParams().toString());
|
|
897
897
|
return normalizeUrl(arr.join("")).replaceAll("//", "/");
|
|
898
898
|
}
|
|
899
|
-
static getWidgetPackageUrl(url, entry, hash) {
|
|
899
|
+
static getWidgetPackageUrl(url, entry, hash, path = "") {
|
|
900
900
|
const arr = [url];
|
|
901
901
|
if (url.startsWith("http")) {
|
|
902
902
|
if (hash) {
|
|
@@ -905,11 +905,11 @@ var WidgetUrlUtils = class {
|
|
|
905
905
|
} else {
|
|
906
906
|
arr.push(`/${entry}`);
|
|
907
907
|
if (hash) {
|
|
908
|
-
arr.push("
|
|
908
|
+
arr.push("#");
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
|
-
|
|
912
|
-
;
|
|
911
|
+
arr.push(path);
|
|
912
|
+
return arr.join("");
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
|
|
@@ -1057,6 +1057,9 @@ var WidgetPackage = class {
|
|
|
1057
1057
|
getIndexUrl(hash) {
|
|
1058
1058
|
return WidgetUrlUtils.getWidgetPackageUrl(this.url, this.entry, hash == null ? this.hash : hash);
|
|
1059
1059
|
}
|
|
1060
|
+
getUrl(path, hash) {
|
|
1061
|
+
return WidgetUrlUtils.getWidgetPackageUrl(this.url, this.entry, hash == null ? this.hash : hash, path);
|
|
1062
|
+
}
|
|
1060
1063
|
};
|
|
1061
1064
|
|
|
1062
1065
|
// src/utils/ElectronUtils.ts
|