@diasro/ucsd-its-frontend 0.0.2

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 (87) hide show
  1. package/README.md +4 -0
  2. package/dist/CommonRoutes.d.ts +7 -0
  3. package/dist/UcsdPlugin.d.ts +9 -0
  4. package/dist/assets/dark_bg.webp +0 -0
  5. package/dist/assets/light_dock_bg.jpg +0 -0
  6. package/dist/assets/settings.icns +0 -0
  7. package/dist/assets/settings.png +0 -0
  8. package/dist/assets/ucsd-its-frontend.css +1 -0
  9. package/dist/assets/ucsd_logo.png +0 -0
  10. package/dist/assets/ucsd_logo_white.png +0 -0
  11. package/dist/cli.cjs +73 -0
  12. package/dist/components/TileButton.vue.d.ts +113 -0
  13. package/dist/components/authorization/Login.vue.d.ts +2 -0
  14. package/dist/components/authorization/LoginSuccess.vue.d.ts +2 -0
  15. package/dist/components/authorization/Logout.vue.d.ts +2 -0
  16. package/dist/components/authorization/Unauthorized.vue.d.ts +2 -0
  17. package/dist/components/commons/ChangeHistory.vue.d.ts +54 -0
  18. package/dist/components/commons/ProgressDialog.vue.d.ts +2 -0
  19. package/dist/composables/auditLog.d.ts +25 -0
  20. package/dist/composables/layout.d.ts +19 -0
  21. package/dist/composables/utils/ucsdAppUtils.d.ts +15 -0
  22. package/dist/index.d.ts +31 -0
  23. package/dist/layouts/AppLayout.vue.d.ts +2 -0
  24. package/dist/layouts/DefaultLayout.vue.d.ts +20 -0
  25. package/dist/layouts/FixedLayout.vue.d.ts +20 -0
  26. package/dist/layouts/FloatingLayout.vue.d.ts +2 -0
  27. package/dist/layouts/UcsdFooter.vue.d.ts +2 -0
  28. package/dist/layouts/UcsdHeader.vue.d.ts +23 -0
  29. package/dist/layouts/UserPanel.vue.d.ts +2 -0
  30. package/dist/layouts/menu/FloatMenu.vue.d.ts +2 -0
  31. package/dist/layouts/menu/RailMenu.vue.d.ts +24 -0
  32. package/dist/layouts/menu/TopMenu.vue.d.ts +12 -0
  33. package/dist/main.css +63 -0
  34. package/dist/stores/its-app.d.ts +336 -0
  35. package/dist/stores/its-audit.d.ts +184 -0
  36. package/dist/stores/its-auth.d.ts +169 -0
  37. package/dist/templates/.env +9 -0
  38. package/dist/templates/App.vue +17 -0
  39. package/dist/templates/config/ucsd.config.ts +105 -0
  40. package/dist/templates/index.html +17 -0
  41. package/dist/templates/main.ts +6 -0
  42. package/dist/templates/pages/DashBoard.vue +29 -0
  43. package/dist/templates/pages/Home.vue +20 -0
  44. package/dist/templates/pages/admin/AdminPage.vue +19 -0
  45. package/dist/templates/pages/customer/CustomerHome.vue +19 -0
  46. package/dist/templates/pages/customer/CustomerSearch.vue +21 -0
  47. package/dist/templates/pages/customer/SimpleForm.vue +299 -0
  48. package/dist/templates/pages/invoices/InvoiceHome.vue +19 -0
  49. package/dist/templates/plugins/index.ts +43 -0
  50. package/dist/templates/plugins/vuetify.ts +9 -0
  51. package/dist/templates/router/index.ts +17 -0
  52. package/dist/templates/router/routes.ts +49 -0
  53. package/dist/templates/stores/app.ts +74 -0
  54. package/dist/templates/stores/index.ts +9 -0
  55. package/dist/templates/styles/README.md +3 -0
  56. package/dist/templates/styles/settings.scss +10 -0
  57. package/dist/templates/vite.config.ts +75 -0
  58. package/dist/types/ApiError.d.ts +6 -0
  59. package/dist/types/LoginUser.d.ts +12 -0
  60. package/dist/types/TileRecord.d.ts +41 -0
  61. package/dist/types/UcsdConfig.d.ts +29 -0
  62. package/dist/types/audit.d.ts +57 -0
  63. package/dist/ucsd-its-frontend.js +13251 -0
  64. package/dist/ucsd-its-frontend.umd.cjs +345 -0
  65. package/dist/vite.svg +1 -0
  66. package/package.json +109 -0
  67. package/src/lib/templates/.env +9 -0
  68. package/src/lib/templates/App.vue +17 -0
  69. package/src/lib/templates/config/ucsd.config.ts +105 -0
  70. package/src/lib/templates/index.html +17 -0
  71. package/src/lib/templates/main.ts +6 -0
  72. package/src/lib/templates/pages/DashBoard.vue +29 -0
  73. package/src/lib/templates/pages/Home.vue +20 -0
  74. package/src/lib/templates/pages/admin/AdminPage.vue +19 -0
  75. package/src/lib/templates/pages/customer/CustomerHome.vue +19 -0
  76. package/src/lib/templates/pages/customer/CustomerSearch.vue +21 -0
  77. package/src/lib/templates/pages/customer/SimpleForm.vue +299 -0
  78. package/src/lib/templates/pages/invoices/InvoiceHome.vue +19 -0
  79. package/src/lib/templates/plugins/index.ts +43 -0
  80. package/src/lib/templates/plugins/vuetify.ts +9 -0
  81. package/src/lib/templates/router/index.ts +17 -0
  82. package/src/lib/templates/router/routes.ts +49 -0
  83. package/src/lib/templates/stores/app.ts +74 -0
  84. package/src/lib/templates/stores/index.ts +9 -0
  85. package/src/lib/templates/styles/README.md +3 -0
  86. package/src/lib/templates/styles/settings.scss +10 -0
  87. package/src/lib/templates/vite.config.ts +75 -0
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,109 @@
1
+ {
2
+ "name": "@diasro/ucsd-its-frontend",
3
+ "private": false,
4
+ "version": "0.0.2",
5
+ "type": "module",
6
+ "author": "Robert Dias <rdias@ucsd.edu>",
7
+ "description": "A UCSD shared component library for Vue 3. For UCSD use only",
8
+ "main": "./dist/ucsd-its-frontend.umd.cjs",
9
+ "module": "./dist/ucsd-its-frontend.js",
10
+ "types": "dist/index.d.ts",
11
+ "style": "./dist/main.css",
12
+ "license": "MIT",
13
+ "files": [
14
+ "dist",
15
+ "src/lib/public/assets/",
16
+ "src/lib/templates/"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/ucsd-its-frontend.js",
22
+ "require": "./dist/ucsd-its-frontend.umd.cjs"
23
+ },
24
+ "./style.css": "./dist/main.css"
25
+ },
26
+ "scripts": {
27
+ "prebuild": "sh ./cleanJS.sh",
28
+ "dev": "vite",
29
+ "build": "vue-tsc -b && vite build --mode nolib",
30
+ "build-lib": "vue-tsc -p tsconfig.lib.json && vite build --mode lib",
31
+ "preview": "vite preview",
32
+ "storybook": "storybook dev -p 6006",
33
+ "build-storybook": "storybook build --output-dir ./dist/vue"
34
+ },
35
+ "peerDependencies": {
36
+ "@primevue/themes": "^4.2.3",
37
+ "axios": "^1.7.9",
38
+ "core-js": "^3.37.1",
39
+ "pinia": "^2.1.7",
40
+ "primeicons": "^7.0.0",
41
+ "primevue": "^4.2.3",
42
+ "sjcl": "^1.0.8",
43
+ "vue": "^3.5.13",
44
+ "vue-router": "^4.4.0",
45
+ "vue-toast-notification": "^3.1.3",
46
+ "vuetify": "^3.7.4"
47
+ },
48
+ "dependencies": {
49
+ "@primevue/themes": "^4.2.3",
50
+ "axios": "^1.7.9",
51
+ "core-js": "^3.37.1",
52
+ "pinia": "^2.1.7",
53
+ "pinia-plugin-persistedstate": "^4.1.3",
54
+ "primeicons": "^7.0.0",
55
+ "primevue": "^4.2.3",
56
+ "sjcl": "^1.0.8",
57
+ "vite-plugin-static-copy": "^2.2.0",
58
+ "vue": "^3.5.13",
59
+ "vue-router": "^4.4.0",
60
+ "vue-toast-notification": "^3.1.3"
61
+ },
62
+ "devDependencies": {
63
+ "@types/node": "^20.14.10",
64
+ "@babel/types": "^7.24.7",
65
+ "@chromatic-com/storybook": "^3.2.2",
66
+ "@eslint/js": "^9.15.0",
67
+ "@fortawesome/fontawesome-free": "^6.2.1",
68
+ "@fortawesome/fontawesome-svg-core": "^6.7.2",
69
+ "@fortawesome/free-regular-svg-icons": "^6.7.2",
70
+ "@fortawesome/free-solid-svg-icons": "^6.7.2",
71
+ "@fortawesome/vue-fontawesome": "^3.0.8",
72
+ "@mdi/font": "^7.1.96",
73
+ "@storybook/addon-docs": "^8.4.7",
74
+ "@storybook/addon-essentials": "^8.4.7",
75
+ "@storybook/addon-interactions": "^8.4.7",
76
+ "@storybook/addon-onboarding": "^8.4.7",
77
+ "@storybook/blocks": "^8.4.7",
78
+ "@storybook/manager-api": "^8.5.1",
79
+ "@storybook/test": "^8.4.7",
80
+ "@storybook/theming": "^8.5.1",
81
+ "@storybook/vue3": "^8.4.7",
82
+ "@storybook/vue3-vite": "^8.4.7",
83
+ "@types/sjcl": "^1.0.34",
84
+ "@typescript-eslint/eslint-plugin": "^7.1.1",
85
+ "@typescript-eslint/parser": "^7.1.1",
86
+ "@vitejs/plugin-vue": "^5.2.1",
87
+ "@vue/eslint-config-typescript": "^13.0.0",
88
+ "@vue/tsconfig": "^0.7.0",
89
+ "eslint": "^8.57.1",
90
+ "eslint-plugin-vue": "^9.32.0",
91
+ "globals": "^15.12.0",
92
+ "roboto-fontface": "*",
93
+ "sass": "1.77.6",
94
+ "storybook": "^8.4.7",
95
+ "storybook-vue3-router": "^5.0.0",
96
+ "typescript": "~5.7.2",
97
+ "typescript-eslint": "^8.16.0",
98
+ "vite": "^6.0.0",
99
+ "vite-plugin-dts": "^2.3.0",
100
+ "vite-plugin-vuetify": "^2.0.4",
101
+ "vue-tsc": "^2.2.0",
102
+ "vuetify": "^3.7.4"
103
+ },
104
+ "eslintConfig": {
105
+ "extends": [
106
+ "plugin:storybook/recommended"
107
+ ]
108
+ }
109
+ }
@@ -0,0 +1,9 @@
1
+ VITE_APP_VERSION=1.0.0
2
+ VITE_APP_TITLE='UCSD Vue App'
3
+ VITE_DEFAULT_HEADER='My Application Header'
4
+ VITE_DEFAULT_SUB_HEADER='My Sub Header'
5
+ VITE_CLIENT_ID='From API manager'
6
+ VITE_CLIENT_SECRET='From API manager'
7
+ VITE_AUTH_URL='https://api-qa.ucsd.edu/oauth2/authorize'
8
+ VITE_ACCESS_TOKEN_URL='https://api-qa.ucsd.edu/oauth2/token'
9
+ VITE_USER_ROLES_API_URL='https://api-qa.ucsd.edu:8243/OFC-PPM-Data-DEV5/v1/login-user'
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import {AppLayout} from "ucsd-its-frontend";
3
+ import {useItsAppStore} from "ucsd-its-frontend";
4
+ import {ProgressDialog} from "ucsd-its-frontend";
5
+ const itsAppStore = useItsAppStore();
6
+ </script>
7
+
8
+ <template>
9
+ <v-app id="app" :theme="itsAppStore.currentTheme">
10
+ <ProgressDialog />
11
+ <AppLayout />
12
+ </v-app>
13
+ </template>
14
+
15
+ <style scoped>
16
+
17
+ </style>
@@ -0,0 +1,105 @@
1
+ import type {TileRecord} from "ucsd-its-frontend";
2
+ import {useAppStore} from "../stores/app";
3
+ import type {UcsdConfig} from "ucsd-its-frontend";
4
+ /**
5
+ * Configuration object for the UCSD Application.
6
+ *
7
+ * Provides details related to the application layout, menus, themes, and default settings.
8
+ * Supports nested menu structures and dynamic behaviors.
9
+ *
10
+ * @type {object}
11
+ * @property {string} defaultLayout - The default layout type for the application. Possible values include 'Floating' or other layout types defined in the application.
12
+ * @property {string} defaultPageHdr - The default page header text for the application.
13
+ * @property {string} defaultSubHdr - The default sub-header text for the application.
14
+ * @property {string} defaultTheme - The default theme for the application, e.g., 'dark'.
15
+ * @property {TileRecord} rootMenu - The root-level menu configuration, containing metadata such as label, value, icon, etc.
16
+ * @property {Array.<TileRecord>} menus - A list of menu items and their hierarchies. Each menu item can have nested children, actions, links, icons, and dynamic behaviors.
17
+ */
18
+ export const ucsdAppConfig : UcsdConfig = {
19
+ defaultLayout: 'Fixed',
20
+ defaultPageHdr: 'Main Title',
21
+ defaultSubHdr: 'Sub Title',
22
+ initCallback : () => useAppStore().initializeStore(),
23
+ loginCallback: () => useAppStore().fetchRoles(),
24
+ defaultTheme: 'dark',
25
+ rootMenu : {
26
+ label: 'Home',
27
+ key : '0-0',
28
+ icon : 'mdi-home',
29
+ disabled: false,
30
+ buttonColor: 'purple',
31
+ link: '/',
32
+ active: true,
33
+ children: []
34
+ } as TileRecord,
35
+ menus: [
36
+ {
37
+ label: 'Customer',
38
+ key : '0-1',
39
+ icon : 'mdi-account',
40
+ disabled: false,
41
+ buttonColor: 'purple',
42
+ link: '/customer/home',
43
+ active: false,
44
+ children: [
45
+ {
46
+ label: 'Search Customer',
47
+ key : '0-1-0',
48
+ icon : 'mdi-magnify',
49
+ disabled: false,
50
+ buttonColor: 'purple',
51
+ link: '/customer/search',
52
+ active: false,
53
+ },
54
+ {
55
+ label: 'Manage Customer',
56
+ key : '0-1-1',
57
+ icon : 'mdi-folder-account-outline',
58
+ disabled: false,
59
+ buttonColor: 'purple',
60
+ active: false,
61
+ children : [
62
+ {
63
+ label: 'Create Customer',
64
+ key : '0-1-1-0',
65
+ icon : 'mdi-account-plus',
66
+ disabled: false,
67
+ buttonColor: 'purple',
68
+ link: '/customer/create',
69
+ active: false,
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ label: 'Invoices',
77
+ key : '0-2',
78
+ icon : 'mdi-text-box',
79
+ disabled: false,
80
+ buttonColor: 'purple',
81
+ link: '/invoices/home',
82
+ badgeContent: () => {return useAppStore().invoiceCount},
83
+ active: false,
84
+ },
85
+ {
86
+ label: 'Admin',
87
+ key : '0-3',
88
+ icon : 'mdi-shield-account',
89
+ disabled: false,
90
+ buttonColor: 'purple',
91
+ link: '/admin',
92
+ active: false,
93
+ },
94
+ {
95
+ label: 'Help',
96
+ key : '0-4',
97
+ icon: 'mdi-help',
98
+ buttonColor: 'purple',
99
+ disabled: false,
100
+ link: 'https://blink.ucsd.edu/finance/billing/get-started/training/ciperb/index.html',
101
+ active: false,
102
+ }
103
+ ] as Array<TileRecord>
104
+ }
105
+
@@ -0,0 +1,17 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vue-toast-notification@3.1.3/dist/theme-bootstrap.min.css">
8
+ <link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" rel="stylesheet">
9
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vuetify@3.7.6/dist/vuetify.min.css">
10
+ <style data-primevue-style-id="dock-variables">:root{--p-dock-background:rgba(255,255,255,0.1);--p-dock-border-color:rgba(255,255,255,0.2);--p-dock-padding:0.5rem;--p-dock-border-radius:var(--p-border-radius-xl);--p-dock-item-border-radius:var(--p-content-border-radius);--p-dock-item-padding:0.5rem;--p-dock-item-size:3rem;--p-dock-item-focus-ring-width:var(--p-focus-ring-width);--p-dock-item-focus-ring-style:var(--p-focus-ring-style);--p-dock-item-focus-ring-color:var(--p-focus-ring-color);--p-dock-item-focus-ring-offset:var(--p-focus-ring-offset);--p-dock-item-focus-ring-shadow:var(--p-focus-ring-shadow);}</style>
11
+ <title>I am client</title>
12
+ </head>
13
+ <body>
14
+ <div id="app"></div>
15
+ <script type="module" src="/src/main.ts"></script>
16
+ </body>
17
+ </html>
@@ -0,0 +1,6 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import {registerPlugins} from "./plugins";
4
+ const app = createApp(App)
5
+ registerPlugins(app)
6
+ app.mount('#app')
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <v-row justify="center" class="ma-2">
3
+ <v-col cols="auto">
4
+ <v-card class="pa-2"
5
+ variant="outlined"
6
+ flat
7
+ >
8
+ <v-card-title class="text-center">Home Page</v-card-title>
9
+ <v-card-text> Remove this welcome card and add your own content.</v-card-text>
10
+ </v-card>
11
+ </v-col>
12
+ <v-col cols="auto">
13
+ <v-card class="pa-2"
14
+ variant="elevated"
15
+ flat
16
+ >
17
+ <v-card-title class="text-center">Dashboard</v-card-title>
18
+ <v-card-text> Remove this welcome card and add your own content.</v-card-text>
19
+ <v-card-actions><v-btn variant="elevated" color="info">Submit</v-btn></v-card-actions>
20
+ </v-card>
21
+ </v-col>
22
+ </v-row>
23
+ </template>
24
+
25
+ <style scoped>
26
+
27
+ </style>
28
+ <script setup lang="ts">
29
+ </script>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <v-row justify="center" class="ma-2">
3
+ <v-col cols="auto">
4
+ <v-card class="pa-2"
5
+ variant="elevated"
6
+ flat
7
+ >
8
+ <v-card-title class="text-center">Home Page</v-card-title>
9
+ <v-card-text> Remove this welcome card and add your own content.</v-card-text>
10
+ <v-card-actions><v-btn variant="elevated" color="info">Submit</v-btn></v-card-actions>
11
+ </v-card>
12
+ </v-col>
13
+ </v-row>
14
+ </template>
15
+
16
+ <style scoped>
17
+
18
+ </style>
19
+ <script setup lang="ts">
20
+ </script>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <v-row justify="center" class="ma-2">
3
+ <v-col cols="auto">
4
+ <v-card class="pa-2"
5
+ variant="outlined"
6
+ flat
7
+ >
8
+ <v-card-title class="text-center">Admin page</v-card-title>
9
+ <v-card-text>Protected by role</v-card-text>
10
+ </v-card>
11
+ </v-col>
12
+ </v-row>
13
+ </template>
14
+
15
+ <style scoped>
16
+
17
+ </style>
18
+ <script setup lang="ts">
19
+ </script>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <v-row justify="center" class="ma-2">
3
+ <v-col cols="auto">
4
+ <v-card class="pa-2"
5
+ variant="outlined"
6
+ flat
7
+ >
8
+ <v-card-title class="text-center">Customer Home Page</v-card-title>
9
+ <v-card-text> Remove this welcome card and add your own content.</v-card-text>
10
+ </v-card>
11
+ </v-col>
12
+ </v-row>
13
+ </template>
14
+
15
+ <style scoped>
16
+
17
+ </style>
18
+ <script setup lang="ts">
19
+ </script>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <v-container fluid>
3
+ <v-row justify="center" class="ma-2">
4
+ <v-col cols="auto">
5
+ <v-card class="pa-2"
6
+ variant="outlined"
7
+ flat
8
+ >
9
+ <v-card-title class="text-center">Customer Search Page</v-card-title>
10
+ <v-card-text> Remove this welcome card and add your own content.</v-card-text>
11
+ </v-card>
12
+ </v-col>
13
+ </v-row>
14
+ </v-container>
15
+ </template>
16
+
17
+ <style scoped>
18
+
19
+ </style>
20
+ <script setup lang="ts">
21
+ </script>