@eeplatform/nuxt-layer-common 1.0.0

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 (108) 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 +37 -0
  8. package/.playground/nuxt.config.ts +20 -0
  9. package/CHANGELOG.md +7 -0
  10. package/README.md +73 -0
  11. package/app.vue +3 -0
  12. package/components/AddPaymentMethod.vue +585 -0
  13. package/components/BtnUploadFile.vue +139 -0
  14. package/components/ConfirmDialog.vue +66 -0
  15. package/components/Container/Standard.vue +33 -0
  16. package/components/Input/Date.vue +177 -0
  17. package/components/Input/ListGroupSelection.vue +93 -0
  18. package/components/Input/NewDate.vue +123 -0
  19. package/components/Input/Number.vue +124 -0
  20. package/components/Input/Password.vue +35 -0
  21. package/components/InputLabel.vue +18 -0
  22. package/components/InvitationMain.vue +195 -0
  23. package/components/Layout/Header.vue +285 -0
  24. package/components/Layout/NavigationDrawer.vue +52 -0
  25. package/components/LinkHome.vue +9 -0
  26. package/components/ListItem.vue +35 -0
  27. package/components/LocalPagination.vue +41 -0
  28. package/components/MemberMain.vue +452 -0
  29. package/components/NavigationItem.vue +73 -0
  30. package/components/PlaceholderComponent.vue +34 -0
  31. package/components/RolePermissionFormCreate.vue +179 -0
  32. package/components/RolePermissionFormPreviewUpdate.vue +184 -0
  33. package/components/RolePermissionMain.vue +376 -0
  34. package/components/Snackbar.vue +23 -0
  35. package/components/SpecificAttr.vue +57 -0
  36. package/components/Std/Pagination.vue +52 -0
  37. package/components/SwitchContext.vue +109 -0
  38. package/components/SwitchOrg.vue +159 -0
  39. package/components/TableList.vue +130 -0
  40. package/composables/useAddress.ts +144 -0
  41. package/composables/useChartOfAccount.ts +62 -0
  42. package/composables/useCommonPermission.ts +130 -0
  43. package/composables/useFile.ts +29 -0
  44. package/composables/useInvoice.ts +42 -0
  45. package/composables/useLocal.ts +63 -0
  46. package/composables/useLocalAuth.ts +157 -0
  47. package/composables/useLocalSetup.ts +46 -0
  48. package/composables/useMember.ts +107 -0
  49. package/composables/useOrder.ts +22 -0
  50. package/composables/useOrg.ts +106 -0
  51. package/composables/useOrgPermission.ts +27 -0
  52. package/composables/usePayment.ts +22 -0
  53. package/composables/usePaymentMethod.ts +347 -0
  54. package/composables/usePermission.ts +54 -0
  55. package/composables/usePrice.ts +15 -0
  56. package/composables/usePromoCode.ts +43 -0
  57. package/composables/useRecapPermission.ts +26 -0
  58. package/composables/useRole.ts +89 -0
  59. package/composables/useSchoolPermission.ts +13 -0
  60. package/composables/useSubscription.ts +264 -0
  61. package/composables/useUser.ts +102 -0
  62. package/composables/useUtils.ts +294 -0
  63. package/composables/useVerification.ts +19 -0
  64. package/error.vue +41 -0
  65. package/eslint.config.js +3 -0
  66. package/layouts/plain.vue +7 -0
  67. package/middleware/01.auth.ts +14 -0
  68. package/middleware/org.ts +16 -0
  69. package/nuxt.config.ts +48 -0
  70. package/package.json +35 -0
  71. package/pages/index.vue +3 -0
  72. package/pages/payment-method-cancel-link.vue +31 -0
  73. package/pages/payment-method-failed-link.vue +31 -0
  74. package/pages/payment-method-linked.vue +31 -0
  75. package/pages/require-organization-membership.vue +47 -0
  76. package/pages/unauthorized.vue +29 -0
  77. package/plugins/API.ts +58 -0
  78. package/plugins/iconify.client.ts +5 -0
  79. package/plugins/vuetify.ts +55 -0
  80. package/public/bdo-logo.svg +4 -0
  81. package/public/bpi-logo.svg +74 -0
  82. package/public/chinabank-logo.svg +120 -0
  83. package/public/gcash-logo.png +0 -0
  84. package/public/gcash-logo.svg +65 -0
  85. package/public/grabpay-logo.svg +99 -0
  86. package/public/paymaya-logo.jpg +0 -0
  87. package/public/paymaya-logo.png +0 -0
  88. package/public/paymaya-logo.svg +25 -0
  89. package/public/qrph-c567ff0f-ab6d-4662-86bf-24c6c731d8a8-logo.svg +20 -0
  90. package/public/rcbc-logo.svg +15 -0
  91. package/public/shopeepay-logo.svg +89 -0
  92. package/public/ubp-logo.svg +88 -0
  93. package/tsconfig.json +3 -0
  94. package/types/address.d.ts +13 -0
  95. package/types/invoice.d.ts +28 -0
  96. package/types/local.d.ts +25 -0
  97. package/types/member.d.ts +12 -0
  98. package/types/org.d.ts +13 -0
  99. package/types/payment-method.d.ts +11 -0
  100. package/types/payment.d.ts +18 -0
  101. package/types/permission.d.ts +14 -0
  102. package/types/price.d.ts +17 -0
  103. package/types/promo-code.d.ts +19 -0
  104. package/types/role.d.ts +13 -0
  105. package/types/subscription.d.ts +29 -0
  106. package/types/user.d.ts +21 -0
  107. package/types/verification.d.ts +15 -0
  108. package/types/xendit.d.ts +3 -0
@@ -0,0 +1,88 @@
1
+ <svg
2
+ width='90'
3
+ height='60'
4
+ viewBox='0 0 113 27'
5
+ fill='none'
6
+ version='1.1'
7
+ xmlns='http://www.w3.org/2000/svg'
8
+ >
9
+ <path
10
+ fillRule='evenodd'
11
+ clipRule='evenodd'
12
+ d='M30.6196 16.9583V11.1504H33.4904V16.899C33.4904 18.3916 34.2377 19.1011 35.3802 19.1011C36.5375 19.1011 37.2845 18.4215 37.2845 16.9728V11.1504H40.1556V16.8841C40.1556 20.2094 38.2661 21.6872 35.3508 21.6872C32.4506 21.6872 30.6196 20.1949 30.6196 16.9583Z'
13
+ fill='#262626'
14
+ />
15
+ <path
16
+ fillRule='evenodd'
17
+ clipRule='evenodd'
18
+ d='M41.8965 13.5H44.6797V14.6231C45.1927 13.9579 45.9252 13.3225 47.0528 13.3225C48.7374 13.3225 49.7481 14.4457 49.7481 16.2635V21.4952H46.9798V17.1651C46.9798 16.2781 46.5255 15.8054 45.8515 15.8054C45.1779 15.8054 44.6797 16.2781 44.6797 17.1651V21.4952H41.8965V13.5Z'
19
+ fill='#262626'
20
+ />
21
+ <mask
22
+ id='mask0'
23
+ mask-type='alpha'
24
+ maskUnits='userSpaceOnUse'
25
+ x='0'
26
+ y='0'
27
+ width='113'
28
+ height='27'
29
+ >
30
+ <path d='M0 27H112.709V0H0V27Z' fill='white' />
31
+ </mask>
32
+ <g mask='url(#mask0)'>
33
+ <path
34
+ fillRule='evenodd'
35
+ clipRule='evenodd'
36
+ d='M51.4746 12.671H54.2432V10.7068H51.4746V12.671Z'
37
+ fill='#4C4C4E'
38
+ />
39
+ <path
40
+ fillRule='evenodd'
41
+ clipRule='evenodd'
42
+ d='M51.4746 21.4952H54.2432V13.5H51.4746V21.4952Z'
43
+ fill='#262626'
44
+ />
45
+ <path
46
+ fillRule='evenodd'
47
+ clipRule='evenodd'
48
+ d='M61.7716 17.5343V17.5049C61.7716 16.5146 61.054 15.687 60.0727 15.687C59.0618 15.687 58.4175 16.4995 58.4175 17.4755V17.5049C58.4175 18.48 59.1205 19.3076 60.1018 19.3076C61.1128 19.3076 61.7716 18.4948 61.7716 17.5343ZM55.7222 17.5343V17.5049C55.7222 15.2288 57.5677 13.3223 60.1018 13.3223C62.6362 13.3223 64.4672 15.1992 64.4672 17.4755V17.5049C64.4672 19.7809 62.6213 21.6872 60.0727 21.6872C57.5529 21.6872 55.7222 19.8103 55.7222 17.5343Z'
49
+ fill='#262626'
50
+ />
51
+ <path
52
+ fillRule='evenodd'
53
+ clipRule='evenodd'
54
+ d='M65.8564 13.5H68.6396V14.6231C69.1524 13.9579 69.8851 13.3225 71.0128 13.3225C72.6974 13.3225 73.7084 14.4457 73.7084 16.2635V21.4952H70.9397V17.1651C70.9397 16.2781 70.4855 15.8054 69.8118 15.8054C69.1378 15.8054 68.6396 16.2781 68.6396 17.1651V21.4952H65.8564V13.5Z'
55
+ fill='#262626'
56
+ />
57
+ <path
58
+ fillRule='evenodd'
59
+ clipRule='evenodd'
60
+ d='M80.0313 17.2832H78.291V19.1898H80.0604C80.9396 19.1898 81.4232 18.8498 81.4232 18.2438V18.2144C81.4232 17.6524 80.9835 17.2832 80.0313 17.2832ZM81.0129 14.3425C81.0129 13.7659 80.5587 13.4558 79.7235 13.4558H78.291V15.2734H79.6507C80.515 15.2734 81.0129 14.9778 81.0129 14.3719V14.3425ZM75.5229 11.1504H80.4036C81.4865 11.1504 82.351 11.4837 82.9704 12.0555C83.6791 12.7099 84.0278 14.0108 83.627 15.0475C83.4325 15.5505 83.0188 15.8712 82.5293 16.0865C83.7726 16.4654 84.5263 17.2094 84.5263 18.6135V18.6429C84.5263 20.4163 83.0908 21.4952 80.6443 21.4952H75.5229V11.1504Z'
61
+ fill='#262626'
62
+ />
63
+ <path
64
+ fillRule='evenodd'
65
+ clipRule='evenodd'
66
+ d='M90.7109 18.5983V18.2292C90.4179 18.1111 90.0224 18.0221 89.6124 18.0221C88.8066 18.0221 88.3378 18.4066 88.3378 19.0123V19.042C88.3378 19.5889 88.7478 19.9138 89.3191 19.9138C90.1397 19.9138 90.7109 19.3966 90.7109 18.5983ZM85.6719 19.2046V19.1749C85.6719 17.5048 86.9168 16.6624 88.7775 16.6624C89.5097 16.6624 90.2273 16.7956 90.6818 16.9728V16.8401C90.6818 15.9976 90.1688 15.5246 89.0993 15.5246C88.2647 15.5246 87.6202 15.7021 86.9025 15.968L86.3313 14.0026C87.2244 13.6329 88.1768 13.3818 89.5391 13.3818C90.96 13.3818 91.927 13.7216 92.5568 14.357C93.1571 14.9484 93.4062 15.776 93.4062 16.8989V21.4952H90.667V20.6527C90.1103 21.2587 89.3636 21.6726 88.3232 21.6726C86.8144 21.6726 85.6719 20.7856 85.6719 19.2046Z'
67
+ fill='#262626'
68
+ />
69
+ <path
70
+ fillRule='evenodd'
71
+ clipRule='evenodd'
72
+ d='M95.0449 13.5H97.8281V14.6231C98.3408 13.9579 99.0736 13.3225 100.201 13.3225C101.886 13.3225 102.897 14.4457 102.897 16.2635V21.4952H100.128V17.1651C100.128 16.2781 99.6739 15.8054 99.0003 15.8054C98.3263 15.8054 97.8281 16.2781 97.8281 17.1651V21.4952H95.0449V13.5Z'
73
+ fill='#262626'
74
+ />
75
+ <path
76
+ fillRule='evenodd'
77
+ clipRule='evenodd'
78
+ d='M104.55 10.7065H107.333V16.1747L109.486 13.4998H112.636L109.882 16.6919L112.709 21.495H109.633L108.051 18.7611L107.333 19.6035V21.495H104.55V10.7065Z'
79
+ fill='#262626'
80
+ />
81
+ <path
82
+ fillRule='evenodd'
83
+ clipRule='evenodd'
84
+ d='M17.4794 14.2127C16.3442 14.0655 15.8496 14.0061 15.8496 14.0061V9.96403C16.1301 10.0334 17.9765 10.4824 17.9765 10.4824C19.1075 10.706 19.6832 11.5286 19.6832 12.5144C19.6832 13.5004 18.8055 14.3848 17.4794 14.2127ZM22.0351 15.8839C22.0351 15.8839 23.3455 14.581 23.3455 12.1273C23.3455 10.0791 21.9651 7.80919 19.5332 6.9547L11.5388 4.11862L11.5131 17.9892C11.5131 17.9892 11.5156 19.9979 9.27485 20.4225C7.77466 20.7069 6.31254 19.3489 6.31254 17.6612C6.3145 17.6614 6.32066 6.72968 6.3145 2.24955L0 -0.000732422V18.2596C0 24.7823 5.91762 27.5414 9.55305 26.9122C13.8927 26.1613 15.8496 22.8085 15.8496 19.1798V17.8915L18.9113 17.9962C19.9239 17.9962 20.6768 18.8792 20.6768 19.8048C20.6768 20.6257 20.1036 21.5093 18.9239 21.6115L17.2415 21.7399C16.9717 22.8474 16.3873 24.3762 15.0749 25.9038L20.0045 25.032C21.9898 24.6729 24.2983 22.9493 24.2983 20.102C24.2983 18.889 23.8882 17.1134 22.0351 15.8839Z'
85
+ fill='#FF8000'
86
+ />
87
+ </g>
88
+ </svg>
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.playground/.nuxt/tsconfig.json"
3
+ }
@@ -0,0 +1,13 @@
1
+ declare type TAddress = {
2
+ _id?: string;
3
+ type: string;
4
+ user?: string;
5
+ org?: string;
6
+ country: string;
7
+ address: string;
8
+ continuedAddress?: string;
9
+ city: string;
10
+ province: string;
11
+ postalCode: string;
12
+ taxId: string;
13
+ };
@@ -0,0 +1,28 @@
1
+ declare type TInvoiceItem = {
2
+ itemId: string;
3
+ quantity: number;
4
+ seats?: number;
5
+ total: number;
6
+ };
7
+
8
+ declare type TInvoiceMetadata = {
9
+ userId?: string | ObjectId;
10
+ orgId?: string | ObjectId;
11
+ subscriptionId?: string | ObjectId;
12
+ currency?: string;
13
+ description?: string;
14
+ };
15
+
16
+ declare type TInvoice = {
17
+ _id?: string | ObjectId;
18
+ invoiceNumber: string;
19
+ billingCycle: string;
20
+ status: string;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ items: TInvoiceItem[];
24
+ metadata?: TInvoiceMetadata;
25
+ amount: number;
26
+ dueDate: string;
27
+ type: string;
28
+ };
@@ -0,0 +1,25 @@
1
+ declare type TToken = {
2
+ accessToken: string;
3
+ refreshToken: string;
4
+ id: string;
5
+ };
6
+
7
+ declare type TNavigationRoute = {
8
+ name: string;
9
+ params?: TKeyValuePair;
10
+ };
11
+
12
+ declare type TNavigationItem = {
13
+ title: string;
14
+ icon?: string;
15
+ route?: TNavigationRoute;
16
+ children?: TNavigationItem[];
17
+ disabled?: boolean;
18
+ };
19
+
20
+ declare type TKeyValuePair<
21
+ K extends string | number | symbol = string,
22
+ V = string | number | object | Array | TKeyValuePair
23
+ > = {
24
+ [key in K]: V;
25
+ };
@@ -0,0 +1,12 @@
1
+ declare type TMember = {
2
+ _id?: string;
3
+ org?: string;
4
+ orgName?: string;
5
+ name: string;
6
+ user: string;
7
+ role: string;
8
+ status?: string;
9
+ createdAt?: string;
10
+ updatedAt?: string;
11
+ deletedAt?: string;
12
+ };
package/types/org.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ declare type TOrg = {
2
+ _id?: string;
3
+ name: string;
4
+ email: string;
5
+ contact: string;
6
+ busInst: string;
7
+ type: string;
8
+ apps?: Array<string>;
9
+ createdAt?: string;
10
+ updatedAt?: string;
11
+ status?: string;
12
+ deletedAt?: string;
13
+ };
@@ -0,0 +1,11 @@
1
+ declare type TLinkParams = {
2
+ subscriptionId?: string;
3
+ paymentMethodType: string;
4
+ paymentMethodChannel: string;
5
+ customerId: string;
6
+ card_number?: string;
7
+ expiry_month?: string;
8
+ expiry_year?: string;
9
+ card_security_code?: string;
10
+ cardholder_name?: string;
11
+ };
@@ -0,0 +1,18 @@
1
+ declare interface TPaymentPaymentType {
2
+ type: "CARD" | "DIRECT_DEBIT" | "EWALLET";
3
+ reusability?: "MULTIPLE_USE";
4
+ metadata?: Record<string, string>;
5
+ description?: string;
6
+ currency?: string;
7
+ success_return_url?: string;
8
+ failure_return_url?: string;
9
+ cancel_return_url?: string;
10
+ skip_three_d_secure?: boolean;
11
+ card_number?: string;
12
+ expiry_month?: string;
13
+ expiry_year?: string;
14
+ cvv?: string;
15
+ cardholder_name?: string;
16
+ channel_code?: string;
17
+ customer_id?: string;
18
+ }
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,17 @@
1
+ declare type TPriceType =
2
+ | "monthly-subscription"
3
+ | "yearly-subscription"
4
+ | "one-time-payment"
5
+ | "other";
6
+
7
+ declare type TPrice = {
8
+ _id?: string;
9
+ value: number;
10
+ saleValue?: number;
11
+ saleExpiry?: Date;
12
+ name: string;
13
+ type?: TPriceType;
14
+ createdAt?: Date;
15
+ updatedAt?: Date;
16
+ deletedAt?: Date;
17
+ };
@@ -0,0 +1,19 @@
1
+ declare type TPromoTier = {
2
+ min: number;
3
+ max: number;
4
+ price: number;
5
+ };
6
+
7
+ declare type TPromoCode = {
8
+ _id?: ObjectId;
9
+ code: string;
10
+ description?: string;
11
+ type: "tiered" | "fixed";
12
+ tiers?: TPromoTier[];
13
+ fixed_rate?: number;
14
+ appliesTo?: string; // "subscription" | "order"
15
+ createdAt?: string; // Date of creation
16
+ expiresAt?: string; // Optional expiry
17
+ assignedTo?: string | ObjectId; // Store the only ape who used it
18
+ status?: "active" | "expired" | "disabled";
19
+ };
@@ -0,0 +1,13 @@
1
+ declare type TRole = {
2
+ _id?: string;
3
+ name?: string;
4
+ permissions?: Array<string>;
5
+ type?: string;
6
+ org?: string;
7
+ status?: string;
8
+ default?: boolean;
9
+ createdBy?: string;
10
+ createdAt?: string;
11
+ updatedAt?: string;
12
+ deletedAt?: string;
13
+ };
@@ -0,0 +1,29 @@
1
+ declare type TBillingRecipient = {
2
+ addedAt?: string;
3
+ email: string;
4
+ };
5
+
6
+ declare type TSubscription = {
7
+ _id?: string;
8
+ user?: string;
9
+ org?: string;
10
+ customerId: string;
11
+ paymentMethodId: string;
12
+ amount: number;
13
+ description?: string;
14
+ currency: string;
15
+ promoCode?: string;
16
+ type: string;
17
+ paidSeats?: number;
18
+ currentSeats?: number;
19
+ maxSeats?: number;
20
+ status?: string;
21
+ billingCycle: "monthly" | "yearly";
22
+ billingContacts?: TBillingRecipient[];
23
+ nextBillingDate?: string;
24
+ lastPaymentStatus?: string;
25
+ failedAttempts?: number;
26
+ createdAt?: string;
27
+ updatedAt?: string;
28
+ deletedAt?: string;
29
+ };
@@ -0,0 +1,21 @@
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
+ birthDay?: string;
11
+ birthYear?: string;
12
+ gender?: string;
13
+ contact?: string;
14
+ profile?: string;
15
+ defaultOrg?: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ status: string;
19
+ xenditCustomerId?: string;
20
+ deletedAt: string;
21
+ };
@@ -0,0 +1,15 @@
1
+ declare type TVerificationMetadata = {
2
+ app?: string;
3
+ role?: string;
4
+ };
5
+
6
+ declare type TVerification = {
7
+ _id?: string;
8
+ type: string;
9
+ email: string;
10
+ metadata?: TVerificationMetadata;
11
+ status?: string;
12
+ createdAt: string;
13
+ updatedAt?: string | null;
14
+ expireAt: string;
15
+ };
@@ -0,0 +1,3 @@
1
+ declare interface Window {
2
+ Xendit: Record<any, any>;
3
+ }