@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 CHANGED
@@ -1,38 +1,39 @@
1
- {
2
- "name": "@imaginario27/air-ui-utils",
3
- "version": "1.0.7",
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": "3.0.3",
25
- "jspdf-autotable": "5.0.2",
26
- "nuxt": "4.1.2",
27
- "vue": "3.5.22",
28
- "vue-router": "4.5.1"
29
- },
30
- "devDependencies": {
31
- "@vitest/coverage-v8": "3.2.4",
32
- "happy-dom": "18.0.1",
33
- "prettier": "3.6.2",
34
- "ts-node": "10.9.2",
35
- "typescript": "5.9.3",
36
- "vitest": "3.2.4"
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
@@ -17,5 +17,5 @@ export const getEnvErrorMessage = (
17
17
  ? devErrorMessage
18
18
  : devErrorMessage.message
19
19
 
20
- return process.dev ? devMessage : prodErrorMessage
20
+ return import.meta.dev ? devMessage : prodErrorMessage
21
21
  }
@@ -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 = 'mdiStarOutline',
11
- halfIndicator: string = 'mdiStarHalfFull',
12
- fullIndicator: string = 'mdiStar'
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 capitalizeFirstLetter = (str: string): string => {
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 of a user by combining first and last names.
118
+ * Returns the full name by combining first and last names.
119
119
  *
120
- * @param firstName - The user's first name.
121
- * @param lastName - The user's last name.
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 getUserFullName = (firstName: string, lastName: string): string => {
124
+ export const getFullName = (firstName: string, lastName: string): string => {
125
125
  return `${firstName} ${lastName}`
126
126
  }
127
127