@quandis/qbo4.ui 4.0.1-CI-20241115-180638 → 4.0.1-CI-20241118-185949
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 +2 -2
- package/scss/qbo.scss +9 -0
- package/src/qbo/Program.d.ts +2 -0
- package/src/qbo/Program.js +17 -0
- package/src/qbo/Program.ts +17 -0
- package/src/qbo/RestApiService.js +1 -0
- package/src/qbo/RestApiService.ts +1 -0
- package/src/qbo/styles.js +2 -2
- package/src/qbo/styles.ts +2 -2
- package/wwwroot/css/qbo.css +9 -0
- package/wwwroot/css/qbo.css.map +1 -1
- package/wwwroot/css/qbo.min.css +1 -1
- package/wwwroot/css/qboui.css +9 -0
- package/wwwroot/css/qboui.css.map +1 -1
- package/wwwroot/css/qboui.min.css +1 -1
- package/wwwroot/images/qbo-icons.svg +101 -0
- package/wwwroot/js/esm/qbo4.ui.js +26 -4
- package/wwwroot/js/esm/qbo4.ui.min.js +3 -3
- package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +23 -3
- package/wwwroot/js/qbo4.ui.min.js +3 -3
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "Quandis, Inc.",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "4.0.1-CI-
|
|
6
|
+
"version": "4.0.1-CI-20241118-185949",
|
|
7
7
|
"workspaces": [
|
|
8
8
|
"code"
|
|
9
9
|
],
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"autoprefixer": "^10.4.20",
|
|
48
48
|
"clean-css": "^5.3.3",
|
|
49
49
|
"copy-webpack-plugin": "^12.0.2",
|
|
50
|
-
"eslint": "^9.
|
|
50
|
+
"eslint": "^9.15.0",
|
|
51
51
|
"glob": "^11.0.0",
|
|
52
52
|
"html-webpack-plugin": "^5.6.3",
|
|
53
53
|
"mini-css-extract-plugin": "^2.9.2",
|
package/scss/qbo.scss
CHANGED
|
@@ -170,6 +170,10 @@
|
|
|
170
170
|
overflow: auto;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
.qbo-card-bottom {
|
|
174
|
+
margin-bottom: .5em;
|
|
175
|
+
}
|
|
176
|
+
|
|
173
177
|
.qbo-card-left {
|
|
174
178
|
margin-left: .5em;
|
|
175
179
|
}
|
|
@@ -178,6 +182,10 @@
|
|
|
178
182
|
margin-right: .5em;
|
|
179
183
|
}
|
|
180
184
|
|
|
185
|
+
.qbo-card-top {
|
|
186
|
+
margin-top: .5em;
|
|
187
|
+
}
|
|
188
|
+
|
|
181
189
|
svg {
|
|
182
190
|
height: 1rem;
|
|
183
191
|
width: 1rem;
|
|
@@ -640,6 +648,7 @@ div.qbo-row-subsequent {
|
|
|
640
648
|
h3.title {
|
|
641
649
|
margin-block-end: 0;
|
|
642
650
|
margin-block-start: .5em;
|
|
651
|
+
margin-bottom: .5em;
|
|
643
652
|
margin-left: .5em;
|
|
644
653
|
}
|
|
645
654
|
|
package/src/qbo/Program.d.ts
CHANGED
|
@@ -43,3 +43,5 @@ export declare function matches(source: any, match: any, wildCard?: string, igno
|
|
|
43
43
|
export declare function elementData(element: HTMLElement): Record<string, string>;
|
|
44
44
|
export declare function elementDate(date: string): string;
|
|
45
45
|
export declare function elementDateTime(date: string): string;
|
|
46
|
+
export declare function elementMoney(amount: string, currency?: string, locale?: string): string;
|
|
47
|
+
export declare function elementPercentage(value: string, decimals?: number, locale?: string): string;
|
package/src/qbo/Program.js
CHANGED
|
@@ -54,3 +54,20 @@ export function elementDateTime(date) {
|
|
|
54
54
|
return '';
|
|
55
55
|
return new Date(date).toLocaleString().replace(',', '');
|
|
56
56
|
}
|
|
57
|
+
export function elementMoney(amount, currency = 'USD', locale = 'en-US') {
|
|
58
|
+
if (!amount)
|
|
59
|
+
return '';
|
|
60
|
+
return new Intl.NumberFormat(locale, {
|
|
61
|
+
style: 'currency',
|
|
62
|
+
currency,
|
|
63
|
+
}).format(Number(amount));
|
|
64
|
+
}
|
|
65
|
+
export function elementPercentage(value, decimals = 2, locale = 'en-US') {
|
|
66
|
+
if (!value)
|
|
67
|
+
return '';
|
|
68
|
+
return new Intl.NumberFormat(locale, {
|
|
69
|
+
style: 'percent',
|
|
70
|
+
minimumFractionDigits: decimals,
|
|
71
|
+
maximumFractionDigits: decimals,
|
|
72
|
+
}).format(Number(value));
|
|
73
|
+
}
|
package/src/qbo/Program.ts
CHANGED
|
@@ -72,4 +72,21 @@ export function elementDate(date: string) {
|
|
|
72
72
|
export function elementDateTime(date: string) {
|
|
73
73
|
if (!date || date.trim() == '') return '';
|
|
74
74
|
return new Date(date).toLocaleString().replace(',', '');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function elementMoney(amount: string, currency: string = 'USD', locale: string = 'en-US'): string {
|
|
78
|
+
if (!amount) return '';
|
|
79
|
+
return new Intl.NumberFormat(locale, {
|
|
80
|
+
style: 'currency',
|
|
81
|
+
currency,
|
|
82
|
+
}).format(Number(amount));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function elementPercentage(value: string, decimals: number = 2, locale: string = 'en-US'): string {
|
|
86
|
+
if (!value) return '';
|
|
87
|
+
return new Intl.NumberFormat(locale, {
|
|
88
|
+
style: 'percent',
|
|
89
|
+
minimumFractionDigits: decimals,
|
|
90
|
+
maximumFractionDigits: decimals,
|
|
91
|
+
}).format(Number(value));
|
|
75
92
|
}
|
|
@@ -19,6 +19,7 @@ export class RestApiService {
|
|
|
19
19
|
const response = await fetch(endpoint, {
|
|
20
20
|
method: method,
|
|
21
21
|
headers: headers,
|
|
22
|
+
credentials: 'include',
|
|
22
23
|
body: (method === 'POST' && payload) ? JSON.stringify(payload) : null
|
|
23
24
|
});
|
|
24
25
|
const accept = headers.get("Accept") ?? '';
|
|
@@ -29,6 +29,7 @@ export class RestApiService implements IApiService {
|
|
|
29
29
|
const response = await fetch(endpoint, {
|
|
30
30
|
method: method,
|
|
31
31
|
headers: headers,
|
|
32
|
+
credentials: 'include',
|
|
32
33
|
body: (method === 'POST' && payload) ? JSON.stringify(payload) : null
|
|
33
34
|
});
|
|
34
35
|
const accept = headers.get("Accept") ?? '';
|