@onecx/accelerator 4.15.7 → 4.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/utils/path.uitls.d.ts +11 -0
- package/src/lib/utils/path.uitls.js +17 -0
- package/src/lib/utils/path.uitls.js.map +1 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
@@ -4,4 +4,5 @@ const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./lib/topic/topic"), exports);
|
5
5
|
tslib_1.__exportStar(require("./lib/topic/syncable-topic"), exports);
|
6
6
|
tslib_1.__exportStar(require("./lib/topic/topic-publisher"), exports);
|
7
|
+
tslib_1.__exportStar(require("./lib/utils/path.uitls"), exports);
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/accelerator/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAiC;AACjC,qEAA0C;AAC1C,sEAA2C"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/accelerator/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAiC;AACjC,qEAA0C;AAC1C,sEAA2C;AAC3C,iEAAsC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
type ocxLocation = Location & {
|
2
|
+
deploymentPath: string;
|
3
|
+
applicationPath: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* returns the standard window.location enriched with deploymentPath and applicationPath.
|
7
|
+
* deploymentPath contains the part of the URL which identifies the sub folder to which the shell is deployed
|
8
|
+
* applicationPath contains the rest of the path which is identifying the workspace and the application to be opened
|
9
|
+
*/
|
10
|
+
export declare function getLocation(): ocxLocation;
|
11
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getLocation = void 0;
|
4
|
+
/**
|
5
|
+
* returns the standard window.location enriched with deploymentPath and applicationPath.
|
6
|
+
* deploymentPath contains the part of the URL which identifies the sub folder to which the shell is deployed
|
7
|
+
* applicationPath contains the rest of the path which is identifying the workspace and the application to be opened
|
8
|
+
*/
|
9
|
+
function getLocation() {
|
10
|
+
const baseHref = document.getElementsByTagName('base')[0]?.href ?? window.location.origin + '/';
|
11
|
+
const location = window.location;
|
12
|
+
location.deploymentPath = baseHref.substring(window.location.origin.length);
|
13
|
+
location.applicationPath = window.location.href.substring(baseHref.length - 1);
|
14
|
+
return location;
|
15
|
+
}
|
16
|
+
exports.getLocation = getLocation;
|
17
|
+
//# sourceMappingURL=path.uitls.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"path.uitls.js","sourceRoot":"","sources":["../../../../../../libs/accelerator/src/lib/utils/path.uitls.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,WAAW;IACzB,MAAM,QAAQ,GAAG,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAA;IAC/F,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAuB,CAAA;IAC/C,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC3E,QAAQ,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAE9E,OAAO,QAAQ,CAAA;AACjB,CAAC;AAPD,kCAOC"}
|