@imaginario27/air-ui-utils 1.0.7 → 1.0.9
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 +39 -38
- package/utils/errors.ts +1 -1
- package/utils/pdfExport.ts +1 -1
- package/utils/rating.ts +3 -3
- package/utils/strings.ts +5 -5
package/package.json
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@imaginario27/air-ui-utils",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"author": "imaginario27",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"homepage": "https://air-ui.netlify.app/",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/imaginario27/air-ui.git"
|
|
10
|
-
},
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "nuxt build",
|
|
16
|
-
"dev": "nuxt dev",
|
|
17
|
-
"generate": "nuxt generate",
|
|
18
|
-
"preview": "nuxt preview",
|
|
19
|
-
"postinstall": "nuxt prepare",
|
|
20
|
-
"test": "vitest",
|
|
21
|
-
"typecheck": "vue-tsc --noEmit -p tsconfig.typecheck.json"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"jspdf": "
|
|
25
|
-
"jspdf-autotable": "5.0.
|
|
26
|
-
"nuxt": "4.
|
|
27
|
-
"vue": "3.5.
|
|
28
|
-
"vue-router": "
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@imaginario27/air-ui-utils",
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"author": "imaginario27",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"homepage": "https://air-ui.netlify.app/",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/imaginario27/air-ui.git"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "nuxt build",
|
|
16
|
+
"dev": "nuxt dev",
|
|
17
|
+
"generate": "nuxt generate",
|
|
18
|
+
"preview": "nuxt preview",
|
|
19
|
+
"postinstall": "nuxt prepare",
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.typecheck.json"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"jspdf": "4.0.0",
|
|
25
|
+
"jspdf-autotable": "5.0.7",
|
|
26
|
+
"nuxt": "4.3.0",
|
|
27
|
+
"vue": "3.5.27",
|
|
28
|
+
"vue-router": "5.0.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@nuxt/test-utils": "3.23.0",
|
|
32
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
33
|
+
"happy-dom": "20.4.0",
|
|
34
|
+
"prettier": "3.8.1",
|
|
35
|
+
"ts-node": "10.9.2",
|
|
36
|
+
"typescript": "5.9.3",
|
|
37
|
+
"vitest": "4.0.18"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/utils/errors.ts
CHANGED
package/utils/pdfExport.ts
CHANGED
|
@@ -3,7 +3,7 @@ import autoTable from "jspdf-autotable"
|
|
|
3
3
|
import type { Headers } from "../models/types/pdfExportTable"
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Exports data to a PDF file.
|
|
6
|
+
* Exports data to a PDF file using jsPDF and jsPDF-AutoTable.
|
|
7
7
|
* @param {Array<Record<string, any>>} data - The data to export.
|
|
8
8
|
* @param {string} title - The title of the PDF.
|
|
9
9
|
* @param {string} fileName - The name of the exported file.
|
package/utils/rating.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export const getRatingIndicator = (
|
|
9
9
|
value: number,
|
|
10
|
-
emptyIndicator: string = '
|
|
11
|
-
halfIndicator: string = '
|
|
12
|
-
fullIndicator: string = '
|
|
10
|
+
emptyIndicator: string = 'mdi:star-outline',
|
|
11
|
+
halfIndicator: string = 'mdi:star-half-full',
|
|
12
|
+
fullIndicator: string = 'mdi:star'
|
|
13
13
|
): string[] => {
|
|
14
14
|
const clamped = Math.min(5, Math.max(0, Math.round(value * 2) / 2))
|
|
15
15
|
const icons: string[] = []
|
package/utils/strings.ts
CHANGED
|
@@ -98,7 +98,7 @@ export const lowercaseFirstLetter = (str: string): string => {
|
|
|
98
98
|
* @param {string} str - The input string.
|
|
99
99
|
* @returns {string} The transformed string with the first letter in uppercase.
|
|
100
100
|
*/
|
|
101
|
-
export const
|
|
101
|
+
export const uppercaseFirstLetter = (str: string): string => {
|
|
102
102
|
if (!str) return str
|
|
103
103
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
104
104
|
}
|
|
@@ -115,13 +115,13 @@ export const getCreditCardLastFourNumbers = (pan: string): string => {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* Returns the full name
|
|
118
|
+
* Returns the full name by combining first and last names.
|
|
119
119
|
*
|
|
120
|
-
* @param firstName - The
|
|
121
|
-
* @param lastName - The
|
|
120
|
+
* @param firstName - The first name.
|
|
121
|
+
* @param lastName - The last name.
|
|
122
122
|
* @returns The concatenated full name in the format "FirstName LastName".
|
|
123
123
|
*/
|
|
124
|
-
export const
|
|
124
|
+
export const getFullName = (firstName: string, lastName: string): string => {
|
|
125
125
|
return `${firstName} ${lastName}`
|
|
126
126
|
}
|
|
127
127
|
|