@quandis/qbo4.ui 4.0.1-CI-20241022-165449 → 4.0.1-CI-20241022-191545
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/package.json +1 -1
- package/src/qbo/RestApiService.d.ts +1 -1
- package/src/qbo/RestApiService.js +3 -0
- package/src/qbo/RestApiService.ts +4 -1
- package/wwwroot/js/esm/qbo4.ui.js +4 -1
- package/wwwroot/js/esm/qbo4.ui.min.js +1 -1
- package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +4 -1
- package/wwwroot/js/qbo4.ui.min.js +1 -1
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json
CHANGED
|
@@ -9,4 +9,4 @@ export declare class RestApiService implements IApiService {
|
|
|
9
9
|
clone(relativePath: string | null): IApiService;
|
|
10
10
|
}
|
|
11
11
|
export declare function registerRestApi(name: string, apiEndpoint: string, headers?: HeadersInit, method?: string | null): void;
|
|
12
|
-
export declare function getApiService(url: string): IApiService;
|
|
12
|
+
export declare function getApiService(url: string | URL): IApiService;
|
|
@@ -44,6 +44,9 @@ export function registerRestApi(name, apiEndpoint, headers = { 'Content-Type': '
|
|
|
44
44
|
services.container.registerInstance(name, new RestApiService(apiEndpoint, headers, method));
|
|
45
45
|
}
|
|
46
46
|
export function getApiService(url) {
|
|
47
|
+
if (typeof url !== 'string') {
|
|
48
|
+
url = url.href;
|
|
49
|
+
}
|
|
47
50
|
const parts = url.match(/api:\/\/([^/]+)/);
|
|
48
51
|
const name = parts ? parts[1] : url;
|
|
49
52
|
const relativePath = parts ? url.substring(`api://${name}`.length + 1) : '';
|
|
@@ -57,7 +57,10 @@ export function registerRestApi(name: string, apiEndpoint: string, headers: Head
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
export function getApiService(url: string) {
|
|
60
|
+
export function getApiService(url: string | URL) {
|
|
61
|
+
if (typeof url !== 'string') {
|
|
62
|
+
url = url.href;
|
|
63
|
+
}
|
|
61
64
|
const parts = url.match(/api:\/\/([^/]+)/);
|
|
62
65
|
const name = parts ? parts[1] : url;
|
|
63
66
|
const relativePath = parts ? url.substring(`api://${name}`.length + 1) : '';
|