@imaginario27/air-ui-utils 1.0.2 → 1.0.4
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/models/enums/counters.ts +4 -0
- package/models/enums/pages.ts +4 -0
- package/models/types/selects.ts +14 -0
- package/nuxt.config.ts +4 -2
- package/package.json +14 -14
- package/tsconfig.typecheck.json +13 -0
- package/utils/events.ts +7 -16
- package/eslint.config.mjs +0 -14
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface SelectOption {
|
|
2
|
+
id?: string | number
|
|
3
|
+
value: string | number
|
|
4
|
+
text?: string
|
|
5
|
+
icon?: any
|
|
6
|
+
customIcon?: string
|
|
7
|
+
userDisplayName?: string
|
|
8
|
+
userProfileImg?: string
|
|
9
|
+
imgUrl?: string
|
|
10
|
+
alt?: string
|
|
11
|
+
helpText?: string
|
|
12
|
+
to?: string
|
|
13
|
+
isExternal?: boolean
|
|
14
|
+
}
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imaginario27/air-ui-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"author": "imaginario27",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://air-ui.netlify.app/",
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
"generate": "nuxt generate",
|
|
18
18
|
"preview": "nuxt preview",
|
|
19
19
|
"postinstall": "nuxt prepare",
|
|
20
|
-
"test": "vitest"
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.typecheck.json"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"
|
|
24
|
-
"jspdf": "
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"vue": "
|
|
28
|
-
"vue-router": "^4.5.1"
|
|
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
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@vitest/coverage-v8": "
|
|
32
|
-
"happy-dom": "
|
|
33
|
-
"prettier": "
|
|
34
|
-
"ts-node": "
|
|
35
|
-
"typescript": "
|
|
36
|
-
"vitest": "
|
|
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.2",
|
|
36
|
+
"vitest": "3.2.4"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/utils/events.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AppNotification } from "../models/constants/notifications"
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* A composable to handle clicks outside a specified element.
|
|
5
3
|
*
|
|
@@ -31,25 +29,18 @@ export const useClickOutside = (
|
|
|
31
29
|
|
|
32
30
|
|
|
33
31
|
/**
|
|
34
|
-
* Copies text to the clipboard
|
|
35
|
-
* @param text - The text to copy
|
|
36
|
-
* @
|
|
37
|
-
* @param errorMessage - The error message to display.
|
|
32
|
+
* Copies text to the clipboard.
|
|
33
|
+
* @param text - The text to copy.
|
|
34
|
+
* @returns A promise that resolves to true if successful, false otherwise.
|
|
38
35
|
*/
|
|
39
|
-
export const copyToClipboard = async (
|
|
40
|
-
text
|
|
41
|
-
successMessage: string = 'Copied to clipboard',
|
|
42
|
-
errorMessage: string = 'Failed to copy to clipboard'
|
|
43
|
-
): Promise<void> => {
|
|
44
|
-
if (!text) return
|
|
45
|
-
|
|
46
|
-
const { $toast } = useNuxtApp()
|
|
36
|
+
export const copyToClipboard = async (text: string): Promise<boolean> => {
|
|
37
|
+
if (!text) return false
|
|
47
38
|
|
|
48
39
|
try {
|
|
49
40
|
await navigator.clipboard.writeText(text)
|
|
50
|
-
|
|
41
|
+
return true
|
|
51
42
|
} catch {
|
|
52
|
-
|
|
43
|
+
return false
|
|
53
44
|
}
|
|
54
45
|
}
|
|
55
46
|
|
package/eslint.config.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// https://eslint.nuxt.com/packages/module
|
|
2
|
-
|
|
3
|
-
// @ts-check
|
|
4
|
-
import withNuxt from './.nuxt/eslint.config.mjs'
|
|
5
|
-
|
|
6
|
-
export default withNuxt({
|
|
7
|
-
rules: {
|
|
8
|
-
'vue/attribute-hyphenation': 'off',
|
|
9
|
-
'vue/no-multiple-template-root': 'off',
|
|
10
|
-
'vue/require-default-prop': 'off',
|
|
11
|
-
'vue/multi-word-component-names': 'off',
|
|
12
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
13
|
-
}
|
|
14
|
-
})
|