@finema/finework-layer 0.2.75 → 0.2.76

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.
Files changed (51) hide show
  1. package/.husky/pre-commit +1 -1
  2. package/.playground/.env.example +5 -0
  3. package/.playground/app/assets/css/main.css +6 -6
  4. package/.playground/app/pages/layout-admin/[id]/index.vue +145 -145
  5. package/.playground/app/pages/layout-admin/test/[id]/index.vue +286 -286
  6. package/.playground/app/pages/layout-admin.vue +285 -285
  7. package/.playground/app/pages/layout-user.vue +284 -0
  8. package/.playground/app/pages/submenu/layout-admin.vue +210 -210
  9. package/.playground/public/admin/clock-in-admin-logo.png +0 -0
  10. package/.playground/public/admin/clock-in-logo.png +0 -0
  11. package/.playground/public/admin/clock-in.png +0 -0
  12. package/.playground/public/admin/pmo-logo.png +0 -0
  13. package/.playground/public/admin/spider-web.png +0 -0
  14. package/.playground/public/admin/super-admin-logo.png +0 -0
  15. package/.playground/public/admin/super-admin.png +0 -0
  16. package/.playground/public/admin/timesheet-admin-logo.png +0 -0
  17. package/.playground/public/admin/timesheet-logo.png +0 -0
  18. package/.playground/public/admin/timesheet.png +0 -0
  19. package/CHANGELOG.md +374 -367
  20. package/app/app.config.ts +144 -144
  21. package/app/app.vue +10 -10
  22. package/app/assets/css/main.css +77 -77
  23. package/app/components/Button/ActionIcon.vue +29 -29
  24. package/app/components/Button/Back.vue +22 -22
  25. package/app/components/Format/Currency.vue +17 -17
  26. package/app/components/Format/Date.vue +24 -24
  27. package/app/components/Format/DateTime.vue +24 -24
  28. package/app/components/Format/Number.vue +17 -17
  29. package/app/components/Format/Percent.vue +38 -38
  30. package/app/components/Format/TimeFromNow.vue +38 -38
  31. package/app/components/InfoItemList.vue +196 -196
  32. package/app/components/Layout/Admin/Sidebar.vue +329 -329
  33. package/app/components/Layout/Admin/index.vue +224 -270
  34. package/app/components/Layout/Apps.vue +45 -45
  35. package/app/components/Layout/User/index.vue +102 -145
  36. package/app/components/Notifications/index.vue +147 -0
  37. package/app/components/StatusBox.vue +56 -56
  38. package/app/composables/useAuth.ts +207 -207
  39. package/app/composables/useNotification.ts +64 -0
  40. package/app/composables/useRequestOptions.ts +86 -86
  41. package/app/constants/routes.ts +86 -86
  42. package/app/error.vue +218 -218
  43. package/app/middleware/auth.ts +45 -45
  44. package/app/middleware/common.ts +12 -12
  45. package/app/middleware/guest.ts +7 -7
  46. package/app/middleware/permissions.ts +29 -29
  47. package/bun.lock +2758 -2758
  48. package/index.d.ts +16 -16
  49. package/nuxt.config.ts +41 -41
  50. package/package.json +38 -38
  51. package/app/components/NotificationList.vue +0 -65
package/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import type { IStatus } from '#core/types/lib'
2
- import { ArrayHelper } from '#core/utils/ArrayHelper'
3
- import { NumberHelper } from '#core/utils/NumberHelper'
4
- import { StringHelper } from '#core/utils/StringHelper'
5
-
6
- export {}
7
-
8
- declare global {
9
- export type { IStatus }
10
-
11
- export { NumberHelper }
12
-
13
- export { StringHelper }
14
-
15
- export { ArrayHelper }
16
- }
1
+ import type { IStatus } from '#core/types/lib'
2
+ import { ArrayHelper } from '#core/utils/ArrayHelper'
3
+ import { NumberHelper } from '#core/utils/NumberHelper'
4
+ import { StringHelper } from '#core/utils/StringHelper'
5
+
6
+ export {}
7
+
8
+ declare global {
9
+ export type { IStatus }
10
+
11
+ export { NumberHelper }
12
+
13
+ export { StringHelper }
14
+
15
+ export { ArrayHelper }
16
+ }
package/nuxt.config.ts CHANGED
@@ -1,41 +1,41 @@
1
- import { createResolver } from '@nuxt/kit'
2
- import { fileURLToPath } from 'node:url'
3
- import { dirname, join } from 'node:path'
4
-
5
- const currentDir = dirname(fileURLToPath(import.meta.url))
6
-
7
- const {
8
- resolve,
9
- } = createResolver(import.meta.url)
10
-
11
- export default defineNuxtConfig({
12
- modules: ['@nuxt/eslint', '@nuxt/test-utils', '@finema/core'],
13
- imports: {
14
- dirs: ['./constants', './loaders', './loaders/pmo', './helpers', './types'],
15
- },
16
- devtools: {
17
- enabled: true,
18
- },
19
- css: [join(currentDir, './app/assets/css/main.css'), '@vuepic/vue-datepicker/dist/main.css'],
20
- alias: {
21
- '#layer': resolve('./'),
22
- },
23
- build: {
24
- transpile: ['@vuepic/vue-datepicker'],
25
- },
26
- compatibilityDate: '2025-07-15',
27
- vite: {
28
- optimizeDeps: {
29
- include: [
30
- '@vue/devtools-kit',
31
- '@vue/devtools-core',
32
- ],
33
- },
34
- },
35
- eslint: {
36
- config: {
37
- stylistic: true,
38
- tooling: true,
39
- },
40
- },
41
- })
1
+ import { createResolver } from '@nuxt/kit'
2
+ import { fileURLToPath } from 'node:url'
3
+ import { dirname, join } from 'node:path'
4
+
5
+ const currentDir = dirname(fileURLToPath(import.meta.url))
6
+
7
+ const {
8
+ resolve,
9
+ } = createResolver(import.meta.url)
10
+
11
+ export default defineNuxtConfig({
12
+ modules: ['@nuxt/eslint', '@nuxt/test-utils', '@finema/core'],
13
+ imports: {
14
+ dirs: ['./constants', './loaders', './loaders/pmo', './helpers', './types'],
15
+ },
16
+ devtools: {
17
+ enabled: true,
18
+ },
19
+ css: [join(currentDir, './app/assets/css/main.css'), '@vuepic/vue-datepicker/dist/main.css'],
20
+ alias: {
21
+ '#layer': resolve('./'),
22
+ },
23
+ build: {
24
+ transpile: ['@vuepic/vue-datepicker'],
25
+ },
26
+ compatibilityDate: '2025-07-15',
27
+ vite: {
28
+ optimizeDeps: {
29
+ include: [
30
+ '@vue/devtools-kit',
31
+ '@vue/devtools-core',
32
+ ],
33
+ },
34
+ },
35
+ eslint: {
36
+ config: {
37
+ stylistic: true,
38
+ tooling: true,
39
+ },
40
+ },
41
+ })
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "@finema/finework-layer",
3
- "type": "module",
4
- "version": "0.2.75",
5
- "main": "./nuxt.config.ts",
6
- "scripts": {
7
- "dev": "nuxi dev .playground -o",
8
- "dev:prepare": "nuxt prepare .playground",
9
- "build": "nuxt build .playground",
10
- "generate": "nuxt generate .playground",
11
- "preview": "nuxt preview .playground",
12
- "lint": "eslint . --cache",
13
- "lint:fix": "eslint --fix . --cache",
14
- "release": "release-it --ci",
15
- "prepare": "husky",
16
- "postinstall": "nuxt prepare .playground"
17
- },
18
- "devDependencies": {
19
- "@finema/eslint-config": "^2.0.3",
20
- "@iconify-json/ph": "^1.2.2",
21
- "@nuxt/eslint": "latest",
22
- "@nuxt/test-utils": "^3.19.2",
23
- "@release-it/conventional-changelog": "^10.0.1",
24
- "@types/node": "^24.7.0",
25
- "husky": "^9.1.7",
26
- "lint-staged": "^16.1.2",
27
- "nuxt": "^4.1.3",
28
- "release-it": "^19.0.5",
29
- "typescript": "^5.9.3",
30
- "vue": "latest"
31
- },
32
- "dependencies": {
33
- "@finema/core": "^3.1.0"
34
- },
35
- "lint-staged": {
36
- "*": "eslint"
37
- }
38
- }
1
+ {
2
+ "name": "@finema/finework-layer",
3
+ "type": "module",
4
+ "version": "0.2.76",
5
+ "main": "./nuxt.config.ts",
6
+ "scripts": {
7
+ "dev": "nuxi dev .playground -o",
8
+ "dev:prepare": "nuxt prepare .playground",
9
+ "build": "nuxt build .playground",
10
+ "generate": "nuxt generate .playground",
11
+ "preview": "nuxt preview .playground",
12
+ "lint": "eslint . --cache",
13
+ "lint:fix": "eslint --fix . --cache",
14
+ "release": "release-it --ci",
15
+ "prepare": "husky",
16
+ "postinstall": "nuxt prepare .playground"
17
+ },
18
+ "devDependencies": {
19
+ "@finema/eslint-config": "^2.0.3",
20
+ "@iconify-json/ph": "^1.2.2",
21
+ "@nuxt/eslint": "latest",
22
+ "@nuxt/test-utils": "^3.19.2",
23
+ "@release-it/conventional-changelog": "^10.0.1",
24
+ "@types/node": "^24.7.0",
25
+ "husky": "^9.1.7",
26
+ "lint-staged": "^16.1.2",
27
+ "nuxt": "^4.1.3",
28
+ "release-it": "^19.0.5",
29
+ "typescript": "^5.9.3",
30
+ "vue": "latest"
31
+ },
32
+ "dependencies": {
33
+ "@finema/core": "^3.1.0"
34
+ },
35
+ "lint-staged": {
36
+ "*": "eslint"
37
+ }
38
+ }
@@ -1,65 +0,0 @@
1
- <template>
2
- <div class="space-y-6">
3
- <div
4
- v-for="(item, index) in items"
5
- :key="item.id"
6
- >
7
- <div class="flex gap-3">
8
- <Avatar
9
- :src="item.avatarSrc || item.userName"
10
- :alt="item.userName"
11
- class="size-12 rounded-full object-cover"
12
- />
13
-
14
- <div class="flex-1">
15
- <div class="flex items-center gap-2">
16
- <p class="font-medium">
17
- {{ item.userName }}
18
- </p>
19
- <FormatTimeFromNow
20
- class="text-muted text-xs"
21
- :value="new Date(new Date().getTime() - 5 * 60 * 1000)"
22
- />
23
- </div>
24
-
25
- <p class="text-sm text-neutral-700">
26
- {{ item.description }}
27
- </p>
28
- </div>
29
-
30
- <span
31
- v-if="item.isRead"
32
- class="bg-success mt-1 size-3 self-start rounded-full"
33
- />
34
- </div>
35
- <Separator
36
- v-if="index < items.length - 1"
37
- class="my-4"
38
- />
39
- </div>
40
- </div>
41
- </template>
42
-
43
- <script setup lang="ts">
44
- export type NotificationType = 'file' | 'invite'
45
-
46
- export interface NotificationItem {
47
- id: number
48
- userName: string
49
- avatarSrc: string
50
- date: string
51
- type: NotificationType
52
- description: string
53
-
54
- // file type
55
- fileName?: string
56
- fileSize?: string
57
- fileIcon?: string
58
-
59
- isRead: boolean
60
- }
61
-
62
- const props = defineProps<{
63
- items: NotificationItem[]
64
- }>()
65
- </script>