@iservice365/layer-common 0.0.1

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 (39) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.editorconfig +12 -0
  4. package/.github/workflows/main.yml +17 -0
  5. package/.github/workflows/publish.yml +39 -0
  6. package/.nuxtrc +1 -0
  7. package/.playground/app.vue +36 -0
  8. package/.playground/eslint.config.mjs +6 -0
  9. package/.playground/nuxt.config.ts +22 -0
  10. package/CHANGELOG.md +8 -0
  11. package/README.md +73 -0
  12. package/app.vue +3 -0
  13. package/components/BtnUploadFile.vue +139 -0
  14. package/components/Input/Date.vue +177 -0
  15. package/components/Input/Password.vue +22 -0
  16. package/components/InputLabel.vue +18 -0
  17. package/components/Layout/Header.vue +248 -0
  18. package/components/Layout/NavigationDrawer.vue +24 -0
  19. package/components/ListItem.vue +35 -0
  20. package/components/LocalPagination.vue +31 -0
  21. package/components/NavigationItem.vue +59 -0
  22. package/components/PlaceholderComponent.vue +34 -0
  23. package/components/Snackbar.vue +23 -0
  24. package/composables/useLocal.ts +41 -0
  25. package/composables/useLocalAuth.ts +109 -0
  26. package/composables/useOrg.ts +127 -0
  27. package/composables/usePermission.ts +54 -0
  28. package/composables/useRecapPermission.ts +26 -0
  29. package/composables/useRole.ts +73 -0
  30. package/composables/useUser.ts +93 -0
  31. package/composables/useUtils.ts +109 -0
  32. package/nuxt.config.ts +60 -0
  33. package/package.json +33 -0
  34. package/plugins/API.ts +44 -0
  35. package/plugins/vuetify.ts +41 -0
  36. package/tsconfig.json +3 -0
  37. package/types/local.d.ts +63 -0
  38. package/types/permission.d.ts +24 -0
  39. package/types/role.d.ts +11 -0
@@ -0,0 +1,63 @@
1
+ declare type TUser = {
2
+ _id: string;
3
+ email: string;
4
+ password: string;
5
+ firstName: string;
6
+ middleName?: string;
7
+ lastName: string;
8
+ suffix?: string;
9
+ birthMonth?: string;
10
+ birthDate?: string;
11
+ birthYear?: string;
12
+ profile?: string;
13
+ defaultOrg?: string;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ status: string;
17
+ deletedAt: string;
18
+ };
19
+
20
+ declare type TToken = {
21
+ accessToken: string;
22
+ refreshToken: string;
23
+ id: string;
24
+ };
25
+
26
+ declare type TNavigationRoute = {
27
+ name: string;
28
+ params?: TKeyValuePair;
29
+ };
30
+
31
+ declare type TNavigationItem = {
32
+ title: string;
33
+ icon?: string;
34
+ route?: TNavigationRoute;
35
+ children?: TNavigationItem[];
36
+ };
37
+
38
+ declare type TOrg = {
39
+ _id?: string;
40
+ name: string;
41
+ email: string;
42
+ busInst: string;
43
+ owner: string;
44
+ type: string;
45
+ createdAt?: string;
46
+ updatedAt?: string;
47
+ status?: string;
48
+ deletedAt?: string;
49
+ };
50
+
51
+ declare type TKeyValuePair<
52
+ K extends string | number | symbol = string,
53
+ V = string | number | object | Array | TKeyValuePair
54
+ > = {
55
+ [key in K]: V;
56
+ };
57
+
58
+ declare type TOrgsAsOption = {
59
+ value: string;
60
+ title: string;
61
+ subtitle?: string;
62
+ email?: string;
63
+ };
@@ -0,0 +1,24 @@
1
+ declare type TPermissionCheck =
2
+ | boolean
3
+ | ((user: TRole, data?: any) => boolean);
4
+
5
+ declare type TPermission = {
6
+ check: TPermissionCheck;
7
+ description: string;
8
+ };
9
+
10
+ declare type TPermissions = {
11
+ [resource: string]: {
12
+ [action: string]: TPermission;
13
+ };
14
+ };
15
+
16
+ declare type TRole = {
17
+ _id?: string;
18
+ name: string;
19
+ description: string;
20
+ permissions: string[];
21
+ createdAt?: string;
22
+ updatedAt?: string;
23
+ deletedAt?: string;
24
+ };
@@ -0,0 +1,11 @@
1
+ declare type TRole = {
2
+ _id?: string;
3
+ name?: string;
4
+ permissions?: Array<string>;
5
+ type?: string;
6
+ status?: string;
7
+ createdBy?: string;
8
+ createdAt?: string;
9
+ updatedAt?: string;
10
+ deletedAt?: string;
11
+ };