@quandis/qbo4.ui 4.0.1-CI-20241022-200944 → 4.0.1-CI-20241023-170316
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/Program.d.ts +1 -0
- package/src/qbo/Program.js +1 -0
- package/src/qbo/Program.ts +1 -0
- package/src/qbo/RestApiService.js +2 -2
- package/src/qbo/RestApiService.ts +2 -2
- package/src/qbo/qbo-fetch.d.ts +4 -0
- package/src/qbo/qbo-fetch.ts +2 -0
- package/wwwroot/js/esm/qbo4.ui.js +12 -4
- package/wwwroot/js/esm/qbo4.ui.min.js +24 -24
- package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +8 -3
- package/wwwroot/js/qbo4.ui.min.js +24 -24
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json
CHANGED
package/src/qbo/Program.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './qbo-selectable.js';
|
|
|
36
36
|
export * from './qbo-table.js';
|
|
37
37
|
export * from './qbo-user-preferences.js';
|
|
38
38
|
export * from './qbo-validate.js';
|
|
39
|
+
export * from './styles.js';
|
|
39
40
|
export declare function matches(source: any, match: any, wildCard?: string, ignoreCase?: boolean): boolean;
|
|
40
41
|
export declare function elementData(element: HTMLElement): Record<string, string>;
|
|
41
42
|
export declare function elementDate(date: string): string;
|
package/src/qbo/Program.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './qbo-selectable.js';
|
|
|
25
25
|
export * from './qbo-table.js';
|
|
26
26
|
export * from './qbo-user-preferences.js';
|
|
27
27
|
export * from './qbo-validate.js';
|
|
28
|
+
export * from './styles.js';
|
|
28
29
|
export function matches(source, match, wildCard = "*", ignoreCase = true) {
|
|
29
30
|
match = match.replace(/([.+^${}()|[\]\\])/g, '\\$1');
|
|
30
31
|
match = match.replace(new RegExp('\\' + wildCard, 'g'), ".*");
|
package/src/qbo/Program.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from './qbo-selectable.js';
|
|
|
42
42
|
export * from './qbo-table.js';
|
|
43
43
|
export * from './qbo-user-preferences.js';
|
|
44
44
|
export * from './qbo-validate.js';
|
|
45
|
+
export * from './styles.js';
|
|
45
46
|
|
|
46
47
|
export function matches(source, match, wildCard = "*", ignoreCase = true) {
|
|
47
48
|
match = match.replace(/([.+^${}()|[\]\\])/g, '\\$1');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { services } from "./Services.js";
|
|
2
2
|
import { substitute } from "./qbo-json.js";
|
|
3
3
|
export class RestApiService {
|
|
4
|
-
constructor(apiEndpoint, headers = {
|
|
4
|
+
constructor(apiEndpoint, headers = {}, method = null) {
|
|
5
5
|
this.relativePath = '';
|
|
6
6
|
this.apiEndpoint = apiEndpoint;
|
|
7
7
|
this.headers = headers;
|
|
8
8
|
this.method = method;
|
|
9
9
|
}
|
|
10
10
|
async fetch(relativePath, payload) {
|
|
11
|
-
if (this.apiEndpoint.indexOf("//") <
|
|
11
|
+
if (this.apiEndpoint.indexOf("//") < 0)
|
|
12
12
|
this.apiEndpoint = new URL(this.apiEndpoint, document.location.origin).href;
|
|
13
13
|
const endpoint = substitute(new URL(relativePath ?? this.relativePath, this.apiEndpoint).href, payload);
|
|
14
14
|
const method = this.method ?? (payload ? 'POST' : 'GET');
|
|
@@ -9,7 +9,7 @@ export class RestApiService implements IApiService {
|
|
|
9
9
|
private method: string | null;
|
|
10
10
|
public relativePath: string = '';
|
|
11
11
|
|
|
12
|
-
constructor(apiEndpoint: string, headers: HeadersInit = {
|
|
12
|
+
constructor(apiEndpoint: string, headers: HeadersInit = { }, method: string | null = null) {
|
|
13
13
|
this.apiEndpoint = apiEndpoint;
|
|
14
14
|
this.headers = headers;
|
|
15
15
|
this.method = method;
|
|
@@ -17,7 +17,7 @@ export class RestApiService implements IApiService {
|
|
|
17
17
|
|
|
18
18
|
async fetch(relativePath: string | null, payload?: Record<string, string> | null | undefined): Promise<any> {
|
|
19
19
|
|
|
20
|
-
if (this.apiEndpoint.indexOf("//") <
|
|
20
|
+
if (this.apiEndpoint.indexOf("//") < 0)
|
|
21
21
|
this.apiEndpoint = new URL(this.apiEndpoint, document.location.origin).href;
|
|
22
22
|
const endpoint = substitute(new URL(relativePath ?? this.relativePath, this.apiEndpoint).href, payload);
|
|
23
23
|
const method = this.method ?? (payload ? 'POST' : 'GET');
|
package/src/qbo/qbo-fetch.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export declare class IFetch {
|
|
|
5
5
|
error: boolean;
|
|
6
6
|
jsonData: any | null;
|
|
7
7
|
html: string | null;
|
|
8
|
+
headers: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
} | null;
|
|
11
|
+
payload: Record<string, string> | null;
|
|
8
12
|
protected fetchData(headers: {
|
|
9
13
|
[key: string]: string;
|
|
10
14
|
}, payload: Object | null): Promise<void>;
|
package/src/qbo/qbo-fetch.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare class IFetch {
|
|
|
9
9
|
error: boolean;
|
|
10
10
|
jsonData: any | null;
|
|
11
11
|
html: string | null;
|
|
12
|
+
headers: { [key: string]: string } | null;
|
|
13
|
+
payload: Record<string, string> | null;
|
|
12
14
|
protected fetchData(headers: { [key: string]: string; }, payload: Object | null): Promise<void>;
|
|
13
15
|
protected getPayload(headers: { [key: string]: string; });
|
|
14
16
|
protected getHeaders(): { [key: string]: string };
|