@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.
- package/README.md +4 -0
- package/dist/CommonRoutes.d.ts +7 -0
- package/dist/UcsdPlugin.d.ts +9 -0
- package/dist/assets/dark_bg.webp +0 -0
- package/dist/assets/light_dock_bg.jpg +0 -0
- package/dist/assets/settings.icns +0 -0
- package/dist/assets/settings.png +0 -0
- package/dist/assets/ucsd-its-frontend.css +1 -0
- package/dist/assets/ucsd_logo.png +0 -0
- package/dist/assets/ucsd_logo_white.png +0 -0
- package/dist/cli.cjs +73 -0
- package/dist/components/TileButton.vue.d.ts +113 -0
- package/dist/components/authorization/Login.vue.d.ts +2 -0
- package/dist/components/authorization/LoginSuccess.vue.d.ts +2 -0
- package/dist/components/authorization/Logout.vue.d.ts +2 -0
- package/dist/components/authorization/Unauthorized.vue.d.ts +2 -0
- package/dist/components/commons/ChangeHistory.vue.d.ts +54 -0
- package/dist/components/commons/ProgressDialog.vue.d.ts +2 -0
- package/dist/composables/auditLog.d.ts +25 -0
- package/dist/composables/layout.d.ts +19 -0
- package/dist/composables/utils/ucsdAppUtils.d.ts +15 -0
- package/dist/index.d.ts +31 -0
- package/dist/layouts/AppLayout.vue.d.ts +2 -0
- package/dist/layouts/DefaultLayout.vue.d.ts +20 -0
- package/dist/layouts/FixedLayout.vue.d.ts +20 -0
- package/dist/layouts/FloatingLayout.vue.d.ts +2 -0
- package/dist/layouts/UcsdFooter.vue.d.ts +2 -0
- package/dist/layouts/UcsdHeader.vue.d.ts +23 -0
- package/dist/layouts/UserPanel.vue.d.ts +2 -0
- package/dist/layouts/menu/FloatMenu.vue.d.ts +2 -0
- package/dist/layouts/menu/RailMenu.vue.d.ts +24 -0
- package/dist/layouts/menu/TopMenu.vue.d.ts +12 -0
- package/dist/main.css +63 -0
- package/dist/stores/its-app.d.ts +336 -0
- package/dist/stores/its-audit.d.ts +184 -0
- package/dist/stores/its-auth.d.ts +169 -0
- package/dist/templates/.env +9 -0
- package/dist/templates/App.vue +17 -0
- package/dist/templates/config/ucsd.config.ts +105 -0
- package/dist/templates/index.html +17 -0
- package/dist/templates/main.ts +6 -0
- package/dist/templates/pages/DashBoard.vue +29 -0
- package/dist/templates/pages/Home.vue +20 -0
- package/dist/templates/pages/admin/AdminPage.vue +19 -0
- package/dist/templates/pages/customer/CustomerHome.vue +19 -0
- package/dist/templates/pages/customer/CustomerSearch.vue +21 -0
- package/dist/templates/pages/customer/SimpleForm.vue +299 -0
- package/dist/templates/pages/invoices/InvoiceHome.vue +19 -0
- package/dist/templates/plugins/index.ts +43 -0
- package/dist/templates/plugins/vuetify.ts +9 -0
- package/dist/templates/router/index.ts +17 -0
- package/dist/templates/router/routes.ts +49 -0
- package/dist/templates/stores/app.ts +74 -0
- package/dist/templates/stores/index.ts +9 -0
- package/dist/templates/styles/README.md +3 -0
- package/dist/templates/styles/settings.scss +10 -0
- package/dist/templates/vite.config.ts +75 -0
- package/dist/types/ApiError.d.ts +6 -0
- package/dist/types/LoginUser.d.ts +12 -0
- package/dist/types/TileRecord.d.ts +41 -0
- package/dist/types/UcsdConfig.d.ts +29 -0
- package/dist/types/audit.d.ts +57 -0
- package/dist/ucsd-its-frontend.js +13251 -0
- package/dist/ucsd-its-frontend.umd.cjs +345 -0
- package/dist/vite.svg +1 -0
- package/package.json +109 -0
- package/src/lib/templates/.env +9 -0
- package/src/lib/templates/App.vue +17 -0
- package/src/lib/templates/config/ucsd.config.ts +105 -0
- package/src/lib/templates/index.html +17 -0
- package/src/lib/templates/main.ts +6 -0
- package/src/lib/templates/pages/DashBoard.vue +29 -0
- package/src/lib/templates/pages/Home.vue +20 -0
- package/src/lib/templates/pages/admin/AdminPage.vue +19 -0
- package/src/lib/templates/pages/customer/CustomerHome.vue +19 -0
- package/src/lib/templates/pages/customer/CustomerSearch.vue +21 -0
- package/src/lib/templates/pages/customer/SimpleForm.vue +299 -0
- package/src/lib/templates/pages/invoices/InvoiceHome.vue +19 -0
- package/src/lib/templates/plugins/index.ts +43 -0
- package/src/lib/templates/plugins/vuetify.ts +9 -0
- package/src/lib/templates/router/index.ts +17 -0
- package/src/lib/templates/router/routes.ts +49 -0
- package/src/lib/templates/stores/app.ts +74 -0
- package/src/lib/templates/stores/index.ts +9 -0
- package/src/lib/templates/styles/README.md +3 -0
- package/src/lib/templates/styles/settings.scss +10 -0
- package/src/lib/templates/vite.config.ts +75 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { TileRecord } from "../types/TileRecord";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the store for managing application state, particularly related to user interface elements,
|
|
4
|
+
* menus, themes, layouts, navigation, and progress tracking.
|
|
5
|
+
*
|
|
6
|
+
* This store encapsulates logic to handle the following:
|
|
7
|
+
* - Managing application themes (e.g., light or dark).
|
|
8
|
+
* - Managing layout configurations and related settings such as floating menus, rails, and dock visibility.
|
|
9
|
+
* - Managing active and navigable menus.
|
|
10
|
+
* - Tracking application progress for specific operations or tasks, including progress timers.
|
|
11
|
+
* - Securing routes and menus based on user roles and authentication requirements.
|
|
12
|
+
* - Handling navigation drawers and docking properties.
|
|
13
|
+
* - Managing headers for pages and their subheaders.
|
|
14
|
+
* - Providing utilities such as starting or stopping timers, toggling themes, and cleaning up hidden menus.
|
|
15
|
+
*
|
|
16
|
+
* It incorporates various states and functions to effectively manage these features, such as:
|
|
17
|
+
* - Reactive state variables like `activeMenu`, `currentTheme`, `currentLayout`, etc.
|
|
18
|
+
* - Role-based route and menu filtering secured through user roles and authentication.
|
|
19
|
+
* - Utility methods for menu initialization, state switches, and route management.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useItsAppStore: import("pinia").StoreDefinition<"its-app", Pick<{
|
|
22
|
+
currentTheme: import("vue").Ref<string | undefined, string | undefined>;
|
|
23
|
+
currentLayout: import("vue").Ref<string | undefined, string | undefined>;
|
|
24
|
+
layoutRail: import("vue").Ref<boolean, boolean>;
|
|
25
|
+
activeMenu: import("vue").Ref<{
|
|
26
|
+
label: string;
|
|
27
|
+
key: string;
|
|
28
|
+
icon?: string | undefined;
|
|
29
|
+
getIcon?: (() => string) | undefined;
|
|
30
|
+
buttonColor?: string | undefined;
|
|
31
|
+
badgeColor?: string | undefined;
|
|
32
|
+
badgeContent?: (() => string) | undefined;
|
|
33
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
34
|
+
eventFunc?: string | undefined;
|
|
35
|
+
link?: string | undefined;
|
|
36
|
+
linkProp?: (() => string) | undefined;
|
|
37
|
+
disabled?: boolean | undefined;
|
|
38
|
+
active?: boolean | undefined;
|
|
39
|
+
childDropdown?: boolean | undefined;
|
|
40
|
+
hide?: boolean | undefined;
|
|
41
|
+
children?: any[] | undefined;
|
|
42
|
+
}[], TileRecord[] | {
|
|
43
|
+
label: string;
|
|
44
|
+
key: string;
|
|
45
|
+
icon?: string | undefined;
|
|
46
|
+
getIcon?: (() => string) | undefined;
|
|
47
|
+
buttonColor?: string | undefined;
|
|
48
|
+
badgeColor?: string | undefined;
|
|
49
|
+
badgeContent?: (() => string) | undefined;
|
|
50
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
51
|
+
eventFunc?: string | undefined;
|
|
52
|
+
link?: string | undefined;
|
|
53
|
+
linkProp?: (() => string) | undefined;
|
|
54
|
+
disabled?: boolean | undefined;
|
|
55
|
+
active?: boolean | undefined;
|
|
56
|
+
childDropdown?: boolean | undefined;
|
|
57
|
+
hide?: boolean | undefined;
|
|
58
|
+
children?: any[] | undefined;
|
|
59
|
+
}[]>;
|
|
60
|
+
activeMenuVal: import("vue").Ref<string, string>;
|
|
61
|
+
rootMenu: import("vue").Ref<{
|
|
62
|
+
label: string;
|
|
63
|
+
key: string;
|
|
64
|
+
icon?: string | undefined;
|
|
65
|
+
getIcon?: (() => string) | undefined;
|
|
66
|
+
buttonColor?: string | undefined;
|
|
67
|
+
badgeColor?: string | undefined;
|
|
68
|
+
badgeContent?: (() => string) | undefined;
|
|
69
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
70
|
+
eventFunc?: string | undefined;
|
|
71
|
+
link?: string | undefined;
|
|
72
|
+
linkProp?: (() => string) | undefined;
|
|
73
|
+
disabled?: boolean | undefined;
|
|
74
|
+
active?: boolean | undefined;
|
|
75
|
+
childDropdown?: boolean | undefined;
|
|
76
|
+
hide?: boolean | undefined;
|
|
77
|
+
children?: any[] | undefined;
|
|
78
|
+
}, TileRecord | {
|
|
79
|
+
label: string;
|
|
80
|
+
key: string;
|
|
81
|
+
icon?: string | undefined;
|
|
82
|
+
getIcon?: (() => string) | undefined;
|
|
83
|
+
buttonColor?: string | undefined;
|
|
84
|
+
badgeColor?: string | undefined;
|
|
85
|
+
badgeContent?: (() => string) | undefined;
|
|
86
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
87
|
+
eventFunc?: string | undefined;
|
|
88
|
+
link?: string | undefined;
|
|
89
|
+
linkProp?: (() => string) | undefined;
|
|
90
|
+
disabled?: boolean | undefined;
|
|
91
|
+
active?: boolean | undefined;
|
|
92
|
+
childDropdown?: boolean | undefined;
|
|
93
|
+
hide?: boolean | undefined;
|
|
94
|
+
children?: any[] | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
currentPageHeader: import("vue").Ref<string | undefined, string | undefined>;
|
|
97
|
+
currentSubHdr: import("vue").Ref<string | undefined, string | undefined>;
|
|
98
|
+
floatMenu: import("vue").Ref<boolean, boolean>;
|
|
99
|
+
dockPosition: import("vue").Ref<string, string>;
|
|
100
|
+
dockVisible: import("vue").Ref<boolean, boolean>;
|
|
101
|
+
navDrawer: import("vue").Ref<boolean, boolean>;
|
|
102
|
+
progressMessage: import("vue").Ref<string, string>;
|
|
103
|
+
progressStep: import("vue").Ref<number, number>;
|
|
104
|
+
toggleTheme: () => void;
|
|
105
|
+
setDockVisible: (flag: boolean) => void;
|
|
106
|
+
setNavDrawer: (flag: boolean) => void;
|
|
107
|
+
setDockPosition: (position: string) => void;
|
|
108
|
+
setCurrentTheme: (theme: string) => void;
|
|
109
|
+
setFloatMenu: (val: boolean) => void;
|
|
110
|
+
setCurrentPageHdr: (hdr: string) => void;
|
|
111
|
+
setCurrentSubHdr: (hdr: string) => void;
|
|
112
|
+
init: () => void;
|
|
113
|
+
setLayoutRail: (rail: boolean) => void;
|
|
114
|
+
setCurrentLayout: (layout: string) => void;
|
|
115
|
+
setActiveMenuVal: (val: string) => void;
|
|
116
|
+
setActiveMenu: (menuItem: TileRecord) => void;
|
|
117
|
+
getBadgeContent: (item: TileRecord) => string | undefined;
|
|
118
|
+
execAction: (menuItem: TileRecord, eventMap: any) => void;
|
|
119
|
+
renderIcon: (menuItem: any) => any;
|
|
120
|
+
invokeLoginCallback: (prevPath: string) => void;
|
|
121
|
+
getCustomAuth: () => (() => Promise<any>) | undefined;
|
|
122
|
+
secureRoutes: () => void;
|
|
123
|
+
startProgTimer: () => void;
|
|
124
|
+
isInProgress: import("vue").Ref<boolean, boolean>;
|
|
125
|
+
setInProgress: (flag: boolean, message: string, step: number) => void;
|
|
126
|
+
}, "rootMenu" | "currentTheme" | "currentLayout" | "dockPosition" | "layoutRail" | "activeMenu" | "activeMenuVal" | "currentPageHeader" | "currentSubHdr" | "floatMenu" | "dockVisible" | "navDrawer" | "progressMessage" | "progressStep" | "isInProgress">, Pick<{
|
|
127
|
+
currentTheme: import("vue").Ref<string | undefined, string | undefined>;
|
|
128
|
+
currentLayout: import("vue").Ref<string | undefined, string | undefined>;
|
|
129
|
+
layoutRail: import("vue").Ref<boolean, boolean>;
|
|
130
|
+
activeMenu: import("vue").Ref<{
|
|
131
|
+
label: string;
|
|
132
|
+
key: string;
|
|
133
|
+
icon?: string | undefined;
|
|
134
|
+
getIcon?: (() => string) | undefined;
|
|
135
|
+
buttonColor?: string | undefined;
|
|
136
|
+
badgeColor?: string | undefined;
|
|
137
|
+
badgeContent?: (() => string) | undefined;
|
|
138
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
139
|
+
eventFunc?: string | undefined;
|
|
140
|
+
link?: string | undefined;
|
|
141
|
+
linkProp?: (() => string) | undefined;
|
|
142
|
+
disabled?: boolean | undefined;
|
|
143
|
+
active?: boolean | undefined;
|
|
144
|
+
childDropdown?: boolean | undefined;
|
|
145
|
+
hide?: boolean | undefined;
|
|
146
|
+
children?: any[] | undefined;
|
|
147
|
+
}[], TileRecord[] | {
|
|
148
|
+
label: string;
|
|
149
|
+
key: string;
|
|
150
|
+
icon?: string | undefined;
|
|
151
|
+
getIcon?: (() => string) | undefined;
|
|
152
|
+
buttonColor?: string | undefined;
|
|
153
|
+
badgeColor?: string | undefined;
|
|
154
|
+
badgeContent?: (() => string) | undefined;
|
|
155
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
156
|
+
eventFunc?: string | undefined;
|
|
157
|
+
link?: string | undefined;
|
|
158
|
+
linkProp?: (() => string) | undefined;
|
|
159
|
+
disabled?: boolean | undefined;
|
|
160
|
+
active?: boolean | undefined;
|
|
161
|
+
childDropdown?: boolean | undefined;
|
|
162
|
+
hide?: boolean | undefined;
|
|
163
|
+
children?: any[] | undefined;
|
|
164
|
+
}[]>;
|
|
165
|
+
activeMenuVal: import("vue").Ref<string, string>;
|
|
166
|
+
rootMenu: import("vue").Ref<{
|
|
167
|
+
label: string;
|
|
168
|
+
key: string;
|
|
169
|
+
icon?: string | undefined;
|
|
170
|
+
getIcon?: (() => string) | undefined;
|
|
171
|
+
buttonColor?: string | undefined;
|
|
172
|
+
badgeColor?: string | undefined;
|
|
173
|
+
badgeContent?: (() => string) | undefined;
|
|
174
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
175
|
+
eventFunc?: string | undefined;
|
|
176
|
+
link?: string | undefined;
|
|
177
|
+
linkProp?: (() => string) | undefined;
|
|
178
|
+
disabled?: boolean | undefined;
|
|
179
|
+
active?: boolean | undefined;
|
|
180
|
+
childDropdown?: boolean | undefined;
|
|
181
|
+
hide?: boolean | undefined;
|
|
182
|
+
children?: any[] | undefined;
|
|
183
|
+
}, TileRecord | {
|
|
184
|
+
label: string;
|
|
185
|
+
key: string;
|
|
186
|
+
icon?: string | undefined;
|
|
187
|
+
getIcon?: (() => string) | undefined;
|
|
188
|
+
buttonColor?: string | undefined;
|
|
189
|
+
badgeColor?: string | undefined;
|
|
190
|
+
badgeContent?: (() => string) | undefined;
|
|
191
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
192
|
+
eventFunc?: string | undefined;
|
|
193
|
+
link?: string | undefined;
|
|
194
|
+
linkProp?: (() => string) | undefined;
|
|
195
|
+
disabled?: boolean | undefined;
|
|
196
|
+
active?: boolean | undefined;
|
|
197
|
+
childDropdown?: boolean | undefined;
|
|
198
|
+
hide?: boolean | undefined;
|
|
199
|
+
children?: any[] | undefined;
|
|
200
|
+
}>;
|
|
201
|
+
currentPageHeader: import("vue").Ref<string | undefined, string | undefined>;
|
|
202
|
+
currentSubHdr: import("vue").Ref<string | undefined, string | undefined>;
|
|
203
|
+
floatMenu: import("vue").Ref<boolean, boolean>;
|
|
204
|
+
dockPosition: import("vue").Ref<string, string>;
|
|
205
|
+
dockVisible: import("vue").Ref<boolean, boolean>;
|
|
206
|
+
navDrawer: import("vue").Ref<boolean, boolean>;
|
|
207
|
+
progressMessage: import("vue").Ref<string, string>;
|
|
208
|
+
progressStep: import("vue").Ref<number, number>;
|
|
209
|
+
toggleTheme: () => void;
|
|
210
|
+
setDockVisible: (flag: boolean) => void;
|
|
211
|
+
setNavDrawer: (flag: boolean) => void;
|
|
212
|
+
setDockPosition: (position: string) => void;
|
|
213
|
+
setCurrentTheme: (theme: string) => void;
|
|
214
|
+
setFloatMenu: (val: boolean) => void;
|
|
215
|
+
setCurrentPageHdr: (hdr: string) => void;
|
|
216
|
+
setCurrentSubHdr: (hdr: string) => void;
|
|
217
|
+
init: () => void;
|
|
218
|
+
setLayoutRail: (rail: boolean) => void;
|
|
219
|
+
setCurrentLayout: (layout: string) => void;
|
|
220
|
+
setActiveMenuVal: (val: string) => void;
|
|
221
|
+
setActiveMenu: (menuItem: TileRecord) => void;
|
|
222
|
+
getBadgeContent: (item: TileRecord) => string | undefined;
|
|
223
|
+
execAction: (menuItem: TileRecord, eventMap: any) => void;
|
|
224
|
+
renderIcon: (menuItem: any) => any;
|
|
225
|
+
invokeLoginCallback: (prevPath: string) => void;
|
|
226
|
+
getCustomAuth: () => (() => Promise<any>) | undefined;
|
|
227
|
+
secureRoutes: () => void;
|
|
228
|
+
startProgTimer: () => void;
|
|
229
|
+
isInProgress: import("vue").Ref<boolean, boolean>;
|
|
230
|
+
setInProgress: (flag: boolean, message: string, step: number) => void;
|
|
231
|
+
}, never>, Pick<{
|
|
232
|
+
currentTheme: import("vue").Ref<string | undefined, string | undefined>;
|
|
233
|
+
currentLayout: import("vue").Ref<string | undefined, string | undefined>;
|
|
234
|
+
layoutRail: import("vue").Ref<boolean, boolean>;
|
|
235
|
+
activeMenu: import("vue").Ref<{
|
|
236
|
+
label: string;
|
|
237
|
+
key: string;
|
|
238
|
+
icon?: string | undefined;
|
|
239
|
+
getIcon?: (() => string) | undefined;
|
|
240
|
+
buttonColor?: string | undefined;
|
|
241
|
+
badgeColor?: string | undefined;
|
|
242
|
+
badgeContent?: (() => string) | undefined;
|
|
243
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
244
|
+
eventFunc?: string | undefined;
|
|
245
|
+
link?: string | undefined;
|
|
246
|
+
linkProp?: (() => string) | undefined;
|
|
247
|
+
disabled?: boolean | undefined;
|
|
248
|
+
active?: boolean | undefined;
|
|
249
|
+
childDropdown?: boolean | undefined;
|
|
250
|
+
hide?: boolean | undefined;
|
|
251
|
+
children?: any[] | undefined;
|
|
252
|
+
}[], TileRecord[] | {
|
|
253
|
+
label: string;
|
|
254
|
+
key: string;
|
|
255
|
+
icon?: string | undefined;
|
|
256
|
+
getIcon?: (() => string) | undefined;
|
|
257
|
+
buttonColor?: string | undefined;
|
|
258
|
+
badgeColor?: string | undefined;
|
|
259
|
+
badgeContent?: (() => string) | undefined;
|
|
260
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
261
|
+
eventFunc?: string | undefined;
|
|
262
|
+
link?: string | undefined;
|
|
263
|
+
linkProp?: (() => string) | undefined;
|
|
264
|
+
disabled?: boolean | undefined;
|
|
265
|
+
active?: boolean | undefined;
|
|
266
|
+
childDropdown?: boolean | undefined;
|
|
267
|
+
hide?: boolean | undefined;
|
|
268
|
+
children?: any[] | undefined;
|
|
269
|
+
}[]>;
|
|
270
|
+
activeMenuVal: import("vue").Ref<string, string>;
|
|
271
|
+
rootMenu: import("vue").Ref<{
|
|
272
|
+
label: string;
|
|
273
|
+
key: string;
|
|
274
|
+
icon?: string | undefined;
|
|
275
|
+
getIcon?: (() => string) | undefined;
|
|
276
|
+
buttonColor?: string | undefined;
|
|
277
|
+
badgeColor?: string | undefined;
|
|
278
|
+
badgeContent?: (() => string) | undefined;
|
|
279
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
280
|
+
eventFunc?: string | undefined;
|
|
281
|
+
link?: string | undefined;
|
|
282
|
+
linkProp?: (() => string) | undefined;
|
|
283
|
+
disabled?: boolean | undefined;
|
|
284
|
+
active?: boolean | undefined;
|
|
285
|
+
childDropdown?: boolean | undefined;
|
|
286
|
+
hide?: boolean | undefined;
|
|
287
|
+
children?: any[] | undefined;
|
|
288
|
+
}, TileRecord | {
|
|
289
|
+
label: string;
|
|
290
|
+
key: string;
|
|
291
|
+
icon?: string | undefined;
|
|
292
|
+
getIcon?: (() => string) | undefined;
|
|
293
|
+
buttonColor?: string | undefined;
|
|
294
|
+
badgeColor?: string | undefined;
|
|
295
|
+
badgeContent?: (() => string) | undefined;
|
|
296
|
+
action?: ((args: TileRecord) => void) | undefined;
|
|
297
|
+
eventFunc?: string | undefined;
|
|
298
|
+
link?: string | undefined;
|
|
299
|
+
linkProp?: (() => string) | undefined;
|
|
300
|
+
disabled?: boolean | undefined;
|
|
301
|
+
active?: boolean | undefined;
|
|
302
|
+
childDropdown?: boolean | undefined;
|
|
303
|
+
hide?: boolean | undefined;
|
|
304
|
+
children?: any[] | undefined;
|
|
305
|
+
}>;
|
|
306
|
+
currentPageHeader: import("vue").Ref<string | undefined, string | undefined>;
|
|
307
|
+
currentSubHdr: import("vue").Ref<string | undefined, string | undefined>;
|
|
308
|
+
floatMenu: import("vue").Ref<boolean, boolean>;
|
|
309
|
+
dockPosition: import("vue").Ref<string, string>;
|
|
310
|
+
dockVisible: import("vue").Ref<boolean, boolean>;
|
|
311
|
+
navDrawer: import("vue").Ref<boolean, boolean>;
|
|
312
|
+
progressMessage: import("vue").Ref<string, string>;
|
|
313
|
+
progressStep: import("vue").Ref<number, number>;
|
|
314
|
+
toggleTheme: () => void;
|
|
315
|
+
setDockVisible: (flag: boolean) => void;
|
|
316
|
+
setNavDrawer: (flag: boolean) => void;
|
|
317
|
+
setDockPosition: (position: string) => void;
|
|
318
|
+
setCurrentTheme: (theme: string) => void;
|
|
319
|
+
setFloatMenu: (val: boolean) => void;
|
|
320
|
+
setCurrentPageHdr: (hdr: string) => void;
|
|
321
|
+
setCurrentSubHdr: (hdr: string) => void;
|
|
322
|
+
init: () => void;
|
|
323
|
+
setLayoutRail: (rail: boolean) => void;
|
|
324
|
+
setCurrentLayout: (layout: string) => void;
|
|
325
|
+
setActiveMenuVal: (val: string) => void;
|
|
326
|
+
setActiveMenu: (menuItem: TileRecord) => void;
|
|
327
|
+
getBadgeContent: (item: TileRecord) => string | undefined;
|
|
328
|
+
execAction: (menuItem: TileRecord, eventMap: any) => void;
|
|
329
|
+
renderIcon: (menuItem: any) => any;
|
|
330
|
+
invokeLoginCallback: (prevPath: string) => void;
|
|
331
|
+
getCustomAuth: () => (() => Promise<any>) | undefined;
|
|
332
|
+
secureRoutes: () => void;
|
|
333
|
+
startProgTimer: () => void;
|
|
334
|
+
isInProgress: import("vue").Ref<boolean, boolean>;
|
|
335
|
+
setInProgress: (flag: boolean, message: string, step: number) => void;
|
|
336
|
+
}, "toggleTheme" | "setDockVisible" | "setNavDrawer" | "setDockPosition" | "setCurrentTheme" | "setFloatMenu" | "setCurrentPageHdr" | "setCurrentSubHdr" | "init" | "setLayoutRail" | "setCurrentLayout" | "setActiveMenuVal" | "setActiveMenu" | "getBadgeContent" | "execAction" | "renderIcon" | "invokeLoginCallback" | "getCustomAuth" | "secureRoutes" | "startProgTimer" | "setInProgress">>;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Audit } from "../types/audit";
|
|
2
|
+
import { ChangeData } from "../types/audit";
|
|
3
|
+
import { AuditDetail } from "../types/audit";
|
|
4
|
+
export declare const useItsAuditStore: import("pinia").StoreDefinition<"its-audit", Pick<{
|
|
5
|
+
auditQueue: import("vue").Ref<{
|
|
6
|
+
audits: {
|
|
7
|
+
auditId?: number | undefined;
|
|
8
|
+
event: string;
|
|
9
|
+
eventIcon?: string | undefined;
|
|
10
|
+
eventColor?: string | undefined;
|
|
11
|
+
nameSpace: string;
|
|
12
|
+
dateCreated?: string | undefined;
|
|
13
|
+
auditConstituent: {
|
|
14
|
+
constituentId?: number | undefined;
|
|
15
|
+
constituentCode: string;
|
|
16
|
+
};
|
|
17
|
+
documents?: {
|
|
18
|
+
documentId: number;
|
|
19
|
+
fileName: string;
|
|
20
|
+
fileDownloadUri: string;
|
|
21
|
+
fileType: string;
|
|
22
|
+
fileSize: number;
|
|
23
|
+
dateCreated: string;
|
|
24
|
+
auditId: number;
|
|
25
|
+
}[] | undefined;
|
|
26
|
+
details?: {
|
|
27
|
+
detailKey: string;
|
|
28
|
+
detailValue: string;
|
|
29
|
+
}[] | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
}, {
|
|
32
|
+
audits: Audit[];
|
|
33
|
+
} | {
|
|
34
|
+
audits: {
|
|
35
|
+
auditId?: number | undefined;
|
|
36
|
+
event: string;
|
|
37
|
+
eventIcon?: string | undefined;
|
|
38
|
+
eventColor?: string | undefined;
|
|
39
|
+
nameSpace: string;
|
|
40
|
+
dateCreated?: string | undefined;
|
|
41
|
+
auditConstituent: {
|
|
42
|
+
constituentId?: number | undefined;
|
|
43
|
+
constituentCode: string;
|
|
44
|
+
};
|
|
45
|
+
documents?: {
|
|
46
|
+
documentId: number;
|
|
47
|
+
fileName: string;
|
|
48
|
+
fileDownloadUri: string;
|
|
49
|
+
fileType: string;
|
|
50
|
+
fileSize: number;
|
|
51
|
+
dateCreated: string;
|
|
52
|
+
auditId: number;
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
details?: {
|
|
55
|
+
detailKey: string;
|
|
56
|
+
detailValue: string;
|
|
57
|
+
}[] | undefined;
|
|
58
|
+
}[];
|
|
59
|
+
}>;
|
|
60
|
+
addToAuditQueue: (audit: Audit, detailsIdentifier: AuditDetail[], changeData: Array<ChangeData>) => void;
|
|
61
|
+
postAudit: () => Promise<void>;
|
|
62
|
+
getAuditQueue: (detailKey?: string, userEmail?: string) => Array<Audit>;
|
|
63
|
+
resetAuditQueue: () => void;
|
|
64
|
+
}, "auditQueue">, Pick<{
|
|
65
|
+
auditQueue: import("vue").Ref<{
|
|
66
|
+
audits: {
|
|
67
|
+
auditId?: number | undefined;
|
|
68
|
+
event: string;
|
|
69
|
+
eventIcon?: string | undefined;
|
|
70
|
+
eventColor?: string | undefined;
|
|
71
|
+
nameSpace: string;
|
|
72
|
+
dateCreated?: string | undefined;
|
|
73
|
+
auditConstituent: {
|
|
74
|
+
constituentId?: number | undefined;
|
|
75
|
+
constituentCode: string;
|
|
76
|
+
};
|
|
77
|
+
documents?: {
|
|
78
|
+
documentId: number;
|
|
79
|
+
fileName: string;
|
|
80
|
+
fileDownloadUri: string;
|
|
81
|
+
fileType: string;
|
|
82
|
+
fileSize: number;
|
|
83
|
+
dateCreated: string;
|
|
84
|
+
auditId: number;
|
|
85
|
+
}[] | undefined;
|
|
86
|
+
details?: {
|
|
87
|
+
detailKey: string;
|
|
88
|
+
detailValue: string;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
}[];
|
|
91
|
+
}, {
|
|
92
|
+
audits: Audit[];
|
|
93
|
+
} | {
|
|
94
|
+
audits: {
|
|
95
|
+
auditId?: number | undefined;
|
|
96
|
+
event: string;
|
|
97
|
+
eventIcon?: string | undefined;
|
|
98
|
+
eventColor?: string | undefined;
|
|
99
|
+
nameSpace: string;
|
|
100
|
+
dateCreated?: string | undefined;
|
|
101
|
+
auditConstituent: {
|
|
102
|
+
constituentId?: number | undefined;
|
|
103
|
+
constituentCode: string;
|
|
104
|
+
};
|
|
105
|
+
documents?: {
|
|
106
|
+
documentId: number;
|
|
107
|
+
fileName: string;
|
|
108
|
+
fileDownloadUri: string;
|
|
109
|
+
fileType: string;
|
|
110
|
+
fileSize: number;
|
|
111
|
+
dateCreated: string;
|
|
112
|
+
auditId: number;
|
|
113
|
+
}[] | undefined;
|
|
114
|
+
details?: {
|
|
115
|
+
detailKey: string;
|
|
116
|
+
detailValue: string;
|
|
117
|
+
}[] | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
}>;
|
|
120
|
+
addToAuditQueue: (audit: Audit, detailsIdentifier: AuditDetail[], changeData: Array<ChangeData>) => void;
|
|
121
|
+
postAudit: () => Promise<void>;
|
|
122
|
+
getAuditQueue: (detailKey?: string, userEmail?: string) => Array<Audit>;
|
|
123
|
+
resetAuditQueue: () => void;
|
|
124
|
+
}, never>, Pick<{
|
|
125
|
+
auditQueue: import("vue").Ref<{
|
|
126
|
+
audits: {
|
|
127
|
+
auditId?: number | undefined;
|
|
128
|
+
event: string;
|
|
129
|
+
eventIcon?: string | undefined;
|
|
130
|
+
eventColor?: string | undefined;
|
|
131
|
+
nameSpace: string;
|
|
132
|
+
dateCreated?: string | undefined;
|
|
133
|
+
auditConstituent: {
|
|
134
|
+
constituentId?: number | undefined;
|
|
135
|
+
constituentCode: string;
|
|
136
|
+
};
|
|
137
|
+
documents?: {
|
|
138
|
+
documentId: number;
|
|
139
|
+
fileName: string;
|
|
140
|
+
fileDownloadUri: string;
|
|
141
|
+
fileType: string;
|
|
142
|
+
fileSize: number;
|
|
143
|
+
dateCreated: string;
|
|
144
|
+
auditId: number;
|
|
145
|
+
}[] | undefined;
|
|
146
|
+
details?: {
|
|
147
|
+
detailKey: string;
|
|
148
|
+
detailValue: string;
|
|
149
|
+
}[] | undefined;
|
|
150
|
+
}[];
|
|
151
|
+
}, {
|
|
152
|
+
audits: Audit[];
|
|
153
|
+
} | {
|
|
154
|
+
audits: {
|
|
155
|
+
auditId?: number | undefined;
|
|
156
|
+
event: string;
|
|
157
|
+
eventIcon?: string | undefined;
|
|
158
|
+
eventColor?: string | undefined;
|
|
159
|
+
nameSpace: string;
|
|
160
|
+
dateCreated?: string | undefined;
|
|
161
|
+
auditConstituent: {
|
|
162
|
+
constituentId?: number | undefined;
|
|
163
|
+
constituentCode: string;
|
|
164
|
+
};
|
|
165
|
+
documents?: {
|
|
166
|
+
documentId: number;
|
|
167
|
+
fileName: string;
|
|
168
|
+
fileDownloadUri: string;
|
|
169
|
+
fileType: string;
|
|
170
|
+
fileSize: number;
|
|
171
|
+
dateCreated: string;
|
|
172
|
+
auditId: number;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
details?: {
|
|
175
|
+
detailKey: string;
|
|
176
|
+
detailValue: string;
|
|
177
|
+
}[] | undefined;
|
|
178
|
+
}[];
|
|
179
|
+
}>;
|
|
180
|
+
addToAuditQueue: (audit: Audit, detailsIdentifier: AuditDetail[], changeData: Array<ChangeData>) => void;
|
|
181
|
+
postAudit: () => Promise<void>;
|
|
182
|
+
getAuditQueue: (detailKey?: string, userEmail?: string) => Array<Audit>;
|
|
183
|
+
resetAuditQueue: () => void;
|
|
184
|
+
}, "addToAuditQueue" | "postAudit" | "getAuditQueue" | "resetAuditQueue">>;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { LoginUser } from "../types/LoginUser";
|
|
2
|
+
/**
|
|
3
|
+
* The `useItsAuthStore` variable represents a centralized Vue store module defined using `defineStore`.
|
|
4
|
+
* It is used for managing authentication-related state and provides methods for handling various
|
|
5
|
+
* authentication functionalities such as token management, user role retrieval, user login and logout.
|
|
6
|
+
*
|
|
7
|
+
* The store includes the following state properties:
|
|
8
|
+
* - `accessToken` (encrypted): Holds the user's access token.
|
|
9
|
+
* - `pkceCodeVerifier`: Stores the PKCE code verifier for OAuth2.
|
|
10
|
+
* - `expiresInTime`: Records the expiration timestamp for the access token.
|
|
11
|
+
* - `userDetails`: Stores current user information, including roles.
|
|
12
|
+
*
|
|
13
|
+
* Core functionalities offered by the store:
|
|
14
|
+
* - Generating secure secrets for handling encrypted tokens.
|
|
15
|
+
* - Encrypting and decrypting tokens securely.
|
|
16
|
+
* - Checking authentication status and token validity.
|
|
17
|
+
* - Managing user details and roles.
|
|
18
|
+
* - Handling PKCE OAuth2 flows for secure authorization.
|
|
19
|
+
* - Fetching user roles and department information from a remote API.
|
|
20
|
+
* - Managing session state, including login, logout, and session cleanup.
|
|
21
|
+
*
|
|
22
|
+
* Methods:
|
|
23
|
+
* - `isAuthenticated()`: Checks if a user is authenticated based on the presence of an access token.
|
|
24
|
+
* - `decryptedToken()`: Returns the decrypted access token.
|
|
25
|
+
* - `isTokenExpired()`: Checks whether the access token is expired.
|
|
26
|
+
* - `loginUser()`: Retrieves the current logged-in user's details.
|
|
27
|
+
* - `isUserRolesLoaded()`: Verifies if user roles are loaded in the store.
|
|
28
|
+
* - `getRoleAssignedToUser()`: Retrieves the roles assigned to the user.
|
|
29
|
+
* - `clearAccessTokenAndUserData()`: Clears token and user data from the store.
|
|
30
|
+
* - `authenticateUser()`: Authenticates the user via OAuth2 authorization code flow.
|
|
31
|
+
* - `authenticate(authorizationCode?)`: Initiates the authentication process and redirects to the authorization URL if necessary.
|
|
32
|
+
* - `logout()`: Logs out the user by clearing their session and user data.
|
|
33
|
+
*
|
|
34
|
+
* Persistence:
|
|
35
|
+
* - The store uses `persist` to store specific state properties (`accessToken`, `pkceCodeVerifier`, and `userDetails`) in `sessionStorage`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useItsAuthStore: import("pinia").StoreDefinition<"its-auth", Pick<{
|
|
38
|
+
accessToken: import("vue").Ref<string, string>;
|
|
39
|
+
pkceCodeVerifier: import("vue").Ref<string, string>;
|
|
40
|
+
userDetails: import("vue").Ref<{
|
|
41
|
+
id: number;
|
|
42
|
+
firstName?: string | undefined;
|
|
43
|
+
lastName?: string | undefined;
|
|
44
|
+
email: string;
|
|
45
|
+
roles?: string[] | undefined;
|
|
46
|
+
departmentName?: string | undefined;
|
|
47
|
+
businessUnitName?: string | undefined;
|
|
48
|
+
system18Id?: string | undefined;
|
|
49
|
+
targetEnv?: string | undefined;
|
|
50
|
+
appVersion?: string | undefined;
|
|
51
|
+
}, LoginUser | {
|
|
52
|
+
id: number;
|
|
53
|
+
firstName?: string | undefined;
|
|
54
|
+
lastName?: string | undefined;
|
|
55
|
+
email: string;
|
|
56
|
+
roles?: string[] | undefined;
|
|
57
|
+
departmentName?: string | undefined;
|
|
58
|
+
businessUnitName?: string | undefined;
|
|
59
|
+
system18Id?: string | undefined;
|
|
60
|
+
targetEnv?: string | undefined;
|
|
61
|
+
appVersion?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
preAuthRoute: import("vue").Ref<string, string>;
|
|
64
|
+
isAuthenticated: () => boolean;
|
|
65
|
+
decryptedToken: () => string;
|
|
66
|
+
isTokenExpired: () => boolean;
|
|
67
|
+
loginUser: () => LoginUser;
|
|
68
|
+
setUserDetails: (user: LoginUser) => void;
|
|
69
|
+
isUserRolesLoaded: () => boolean;
|
|
70
|
+
getRoleAssignedToUser: () => string[];
|
|
71
|
+
clearAccessTokenAndUserData: () => void;
|
|
72
|
+
authenticateUser: (authCode: string) => Promise<boolean>;
|
|
73
|
+
authenticate: (authorizationCode?: string) => Promise<boolean>;
|
|
74
|
+
logout: () => void;
|
|
75
|
+
getAvatar: () => string;
|
|
76
|
+
userInfo: () => {
|
|
77
|
+
email: string;
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
|
+
getUserEmail: () => string;
|
|
81
|
+
}, "accessToken" | "pkceCodeVerifier" | "userDetails" | "preAuthRoute">, Pick<{
|
|
82
|
+
accessToken: import("vue").Ref<string, string>;
|
|
83
|
+
pkceCodeVerifier: import("vue").Ref<string, string>;
|
|
84
|
+
userDetails: import("vue").Ref<{
|
|
85
|
+
id: number;
|
|
86
|
+
firstName?: string | undefined;
|
|
87
|
+
lastName?: string | undefined;
|
|
88
|
+
email: string;
|
|
89
|
+
roles?: string[] | undefined;
|
|
90
|
+
departmentName?: string | undefined;
|
|
91
|
+
businessUnitName?: string | undefined;
|
|
92
|
+
system18Id?: string | undefined;
|
|
93
|
+
targetEnv?: string | undefined;
|
|
94
|
+
appVersion?: string | undefined;
|
|
95
|
+
}, LoginUser | {
|
|
96
|
+
id: number;
|
|
97
|
+
firstName?: string | undefined;
|
|
98
|
+
lastName?: string | undefined;
|
|
99
|
+
email: string;
|
|
100
|
+
roles?: string[] | undefined;
|
|
101
|
+
departmentName?: string | undefined;
|
|
102
|
+
businessUnitName?: string | undefined;
|
|
103
|
+
system18Id?: string | undefined;
|
|
104
|
+
targetEnv?: string | undefined;
|
|
105
|
+
appVersion?: string | undefined;
|
|
106
|
+
}>;
|
|
107
|
+
preAuthRoute: import("vue").Ref<string, string>;
|
|
108
|
+
isAuthenticated: () => boolean;
|
|
109
|
+
decryptedToken: () => string;
|
|
110
|
+
isTokenExpired: () => boolean;
|
|
111
|
+
loginUser: () => LoginUser;
|
|
112
|
+
setUserDetails: (user: LoginUser) => void;
|
|
113
|
+
isUserRolesLoaded: () => boolean;
|
|
114
|
+
getRoleAssignedToUser: () => string[];
|
|
115
|
+
clearAccessTokenAndUserData: () => void;
|
|
116
|
+
authenticateUser: (authCode: string) => Promise<boolean>;
|
|
117
|
+
authenticate: (authorizationCode?: string) => Promise<boolean>;
|
|
118
|
+
logout: () => void;
|
|
119
|
+
getAvatar: () => string;
|
|
120
|
+
userInfo: () => {
|
|
121
|
+
email: string;
|
|
122
|
+
name: string;
|
|
123
|
+
};
|
|
124
|
+
getUserEmail: () => string;
|
|
125
|
+
}, never>, Pick<{
|
|
126
|
+
accessToken: import("vue").Ref<string, string>;
|
|
127
|
+
pkceCodeVerifier: import("vue").Ref<string, string>;
|
|
128
|
+
userDetails: import("vue").Ref<{
|
|
129
|
+
id: number;
|
|
130
|
+
firstName?: string | undefined;
|
|
131
|
+
lastName?: string | undefined;
|
|
132
|
+
email: string;
|
|
133
|
+
roles?: string[] | undefined;
|
|
134
|
+
departmentName?: string | undefined;
|
|
135
|
+
businessUnitName?: string | undefined;
|
|
136
|
+
system18Id?: string | undefined;
|
|
137
|
+
targetEnv?: string | undefined;
|
|
138
|
+
appVersion?: string | undefined;
|
|
139
|
+
}, LoginUser | {
|
|
140
|
+
id: number;
|
|
141
|
+
firstName?: string | undefined;
|
|
142
|
+
lastName?: string | undefined;
|
|
143
|
+
email: string;
|
|
144
|
+
roles?: string[] | undefined;
|
|
145
|
+
departmentName?: string | undefined;
|
|
146
|
+
businessUnitName?: string | undefined;
|
|
147
|
+
system18Id?: string | undefined;
|
|
148
|
+
targetEnv?: string | undefined;
|
|
149
|
+
appVersion?: string | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
preAuthRoute: import("vue").Ref<string, string>;
|
|
152
|
+
isAuthenticated: () => boolean;
|
|
153
|
+
decryptedToken: () => string;
|
|
154
|
+
isTokenExpired: () => boolean;
|
|
155
|
+
loginUser: () => LoginUser;
|
|
156
|
+
setUserDetails: (user: LoginUser) => void;
|
|
157
|
+
isUserRolesLoaded: () => boolean;
|
|
158
|
+
getRoleAssignedToUser: () => string[];
|
|
159
|
+
clearAccessTokenAndUserData: () => void;
|
|
160
|
+
authenticateUser: (authCode: string) => Promise<boolean>;
|
|
161
|
+
authenticate: (authorizationCode?: string) => Promise<boolean>;
|
|
162
|
+
logout: () => void;
|
|
163
|
+
getAvatar: () => string;
|
|
164
|
+
userInfo: () => {
|
|
165
|
+
email: string;
|
|
166
|
+
name: string;
|
|
167
|
+
};
|
|
168
|
+
getUserEmail: () => string;
|
|
169
|
+
}, "isAuthenticated" | "decryptedToken" | "isTokenExpired" | "loginUser" | "setUserDetails" | "isUserRolesLoaded" | "getRoleAssignedToUser" | "clearAccessTokenAndUserData" | "authenticateUser" | "authenticate" | "logout" | "getAvatar" | "userInfo" | "getUserEmail">>;
|