@nathapp/na-cli 1.0.7 → 1.0.9
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/dist/templates/db-schema/.gitlab-ci.yml +139 -0
- package/dist/templates/db-schema/Makefile +885 -0
- package/dist/templates/k8s-deployment/.gitlab-ci.yml +158 -0
- package/dist/templates/k8s-deployment/Makefile +233 -0
- package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/script/Makefile +12 -0
- package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/script/Makefile +8 -0
- package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/script/Makefile +56 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/Makefile +9 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/script/Makefile +14 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/_t-0100-readiness-liveness.ts +84 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/hub.ts +372 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contact.ts +158 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contract.ts +328 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-kyc.ts +304 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-app.ts +823 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-web.ts +493 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-profile.ts +277 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-whitelist.ts +133 -0
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/t-0200-start.ts +172 -0
- package/dist/templates/nestjs-api/.dockerignore +9 -0
- package/dist/templates/nestjs-api/.env +31 -0
- package/dist/templates/nestjs-api/.gitignore-rename +1 -0
- package/dist/templates/nestjs-api/.gitlab-ci.yml +180 -0
- package/dist/templates/nestjs-api/.nvmrc +1 -0
- package/dist/templates/nestjs-api/.oxlintrc.json +18 -0
- package/dist/templates/nestjs-api/.prettierrc +4 -0
- package/dist/templates/nestjs-api/Dockerfile +15 -21
- package/dist/templates/nestjs-api/Makefile +95 -0
- package/dist/templates/nestjs-api/README.md +22 -30
- package/dist/templates/nestjs-api/nest-cli.json +10 -0
- package/dist/templates/nestjs-api/ormconfig.ts +18 -0
- package/dist/templates/nestjs-api/package.json +58 -72
- package/dist/templates/nestjs-api/src/app.controller.spec.ts +24 -0
- package/dist/templates/nestjs-api/src/app.controller.ts +27 -0
- package/dist/templates/nestjs-api/src/app.module.ts +31 -0
- package/dist/templates/nestjs-api/src/app.service.ts +27 -0
- package/dist/templates/nestjs-api/src/main.ts +31 -0
- package/dist/templates/nestjs-api/test/app.e2e-spec.ts +47 -0
- package/dist/templates/nestjs-api/tsconfig.build.json +5 -0
- package/dist/templates/nestjs-api/tsconfig.json +28 -0
- package/dist/templates/nestjs-api/tsconfig.spec.json +9 -0
- package/dist/templates/nestjs-api/vitest.config.mts +33 -0
- package/dist/templates/nestjs-library/.gitignore-rename +1 -0
- package/dist/templates/nestjs-library/.gitlab-ci.yml +134 -0
- package/dist/templates/nestjs-library/.npmignore-rename +5 -2
- package/dist/templates/nestjs-library/.nvmrc +1 -0
- package/dist/templates/nestjs-library/.oxlintrc.json +18 -0
- package/dist/templates/nestjs-library/.prettierrc +6 -0
- package/dist/templates/nestjs-library/Makefile +60 -0
- package/dist/templates/nestjs-library/README.md +24 -0
- package/dist/templates/nestjs-library/lib/index.ts +2 -0
- package/dist/templates/nestjs-library/package.json +43 -33
- package/dist/templates/nestjs-library/test/app/controller/hello.controller.spec.ts +20 -0
- package/dist/templates/nestjs-library/test/app/controller/hello.controller.ts +7 -0
- package/dist/templates/nestjs-library/tsconfig.build.json +8 -0
- package/dist/templates/nestjs-library/tsconfig.json +21 -0
- package/dist/templates/nestjs-library/tsconfig.spec.json +9 -0
- package/dist/templates/nestjs-library/vitest.config.mts +29 -0
- package/dist/templates/ts-library/.dockerignore +2 -0
- package/dist/templates/ts-library/.eslintrc.js +24 -0
- package/dist/templates/ts-library/.gitlab-ci.yml +136 -0
- package/dist/templates/ts-library/.prettierrc +6 -0
- package/dist/templates/ts-library/Makefile +58 -0
- package/dist/templates/ts-library/index.ts +1 -0
- package/dist/templates/ts-library/lib/index.ts +1 -0
- package/dist/templates/ts-library/lib/samples/index.ts +5 -0
- package/dist/templates/ts-library/lib/samples/samples-function.ts +3 -0
- package/dist/templates/ts-library/test/sample.e2e-spec.ts +10 -0
- package/dist/templates/ts-library/tsconfig.build.json +4 -0
- package/dist/templates/ts-library/tsconfig.json +18 -0
- package/dist/templates/turbo-nestjs-vuexy/.dockerignore +2 -0
- package/dist/templates/turbo-nestjs-vuexy/.gitignore-rename +40 -0
- package/dist/templates/turbo-nestjs-vuexy/.npmrc-rename +0 -0
- package/dist/templates/turbo-nestjs-vuexy/Makefile +48 -0
- package/dist/templates/vuexy-portal/.dockerignore +2 -0
- package/dist/templates/vuexy-portal/.env +1 -0
- package/dist/templates/vuexy-portal/.gitlab-ci.yml +233 -0
- package/dist/templates/vuexy-portal/.npmrc-rename +2 -0
- package/dist/templates/vuexy-portal/.nvmrc +1 -0
- package/dist/templates/vuexy-portal/Makefile +55 -0
- package/dist/templates/vuexy-portal/src/@core/composable/createUrl.ts +20 -0
- package/dist/templates/vuexy-portal/src/@core/composable/useCookie.ts +43 -0
- package/dist/templates/vuexy-portal/src/@core/composable/useGenerateImageVariant.ts +25 -0
- package/dist/templates/vuexy-portal/src/@core/composable/useResponsiveSidebar.ts +29 -0
- package/dist/templates/vuexy-portal/src/@core/composable/useSkins.ts +42 -0
- package/dist/templates/vuexy-portal/src/@core/enums.ts +21 -0
- package/dist/templates/vuexy-portal/src/@core/index.ts +43 -0
- package/dist/templates/vuexy-portal/src/@core/initCore.ts +93 -0
- package/dist/templates/vuexy-portal/src/@core/libs/apex-chart/apexCharConfig.ts +701 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/chartjsConfig.ts +372 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/BarChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/BubbleChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/DoughnutChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/LineChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/PolarAreaChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/RadarChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/ScatterChart.ts +58 -0
- package/dist/templates/vuexy-portal/src/@core/stores/config.ts +80 -0
- package/dist/templates/vuexy-portal/src/@core/types.ts +49 -0
- package/dist/templates/vuexy-portal/src/@core/utils/formatters.ts +48 -0
- package/dist/templates/vuexy-portal/src/@core/utils/helpers.ts +32 -0
- package/dist/templates/vuexy-portal/src/@core/utils/plugins.ts +53 -0
- package/dist/templates/vuexy-portal/src/@core/utils/validators.ts +105 -0
- package/dist/templates/vuexy-portal/src/@core/utils/vuetify.ts +13 -0
- package/dist/templates/vuexy-portal/src/@custom/composables/toasts.ts +45 -0
- package/dist/templates/vuexy-portal/src/@custom/composables/validator.ts +160 -0
- package/dist/templates/vuexy-portal/src/@custom/enums/index.ts +0 -0
- package/dist/templates/vuexy-portal/src/@custom/types/common.ts +17 -0
- package/dist/templates/vuexy-portal/src/@custom/types/index.ts +0 -0
- package/dist/templates/vuexy-portal/src/@custom/types/pagination.ts +19 -0
- package/dist/templates/vuexy-portal/src/@custom/types/user.ts +5 -0
- package/dist/templates/vuexy-portal/src/@custom/utils/formatters.ts +83 -0
- package/dist/templates/vuexy-portal/src/@custom/utils/index.ts +0 -0
- package/dist/templates/vuexy-portal/src/@custom/utils/validators.ts +51 -0
- package/dist/templates/vuexy-portal/src/@layouts/components.ts +11 -0
- package/dist/templates/vuexy-portal/src/@layouts/config.ts +43 -0
- package/dist/templates/vuexy-portal/src/@layouts/enums.ts +27 -0
- package/dist/templates/vuexy-portal/src/@layouts/index.ts +49 -0
- package/dist/templates/vuexy-portal/src/@layouts/plugins/casl.ts +48 -0
- package/dist/templates/vuexy-portal/src/@layouts/stores/config.ts +115 -0
- package/dist/templates/vuexy-portal/src/@layouts/symbols.ts +1 -0
- package/dist/templates/vuexy-portal/src/@layouts/types.ts +126 -0
- package/dist/templates/vuexy-portal/src/@layouts/utils.ts +180 -0
- package/dist/templates/vuexy-portal/src/api/api.ts +1 -0
- package/dist/templates/vuexy-portal/src/api/commonApi.ts +25 -0
- package/dist/templates/vuexy-portal/src/api/index.ts +58 -0
- package/dist/templates/vuexy-portal/src/api/requestInterceptor.ts +21 -0
- package/dist/templates/vuexy-portal/src/api/responseInterceptor.ts +52 -0
- package/dist/templates/vuexy-portal/src/api/types.ts +14 -0
- package/dist/templates/vuexy-portal/src/api/useApi.ts +68 -0
- package/dist/templates/vuexy-portal/src/api/useFetchApi.ts +41 -0
- package/dist/templates/vuexy-portal/src/api/userApi.ts +11 -0
- package/dist/templates/vuexy-portal/src/composables/useApiFetch.ts +48 -0
- package/dist/templates/vuexy-portal/src/composables/useJwt.ts +108 -0
- package/dist/templates/vuexy-portal/src/main.ts +17 -0
- package/dist/templates/vuexy-portal/src/navigation/horizontal/index.ts +5 -0
- package/dist/templates/vuexy-portal/src/navigation/index.ts +7 -0
- package/dist/templates/vuexy-portal/src/navigation/vertical/index.ts +5 -0
- package/dist/templates/vuexy-portal/src/plugins/1.router/additional-routes.ts +23 -0
- package/dist/templates/vuexy-portal/src/plugins/1.router/guards.ts +50 -0
- package/dist/templates/vuexy-portal/src/plugins/1.router/index.ts +45 -0
- package/dist/templates/vuexy-portal/src/plugins/2.pinia.ts +8 -0
- package/dist/templates/vuexy-portal/src/plugins/casl/ability.ts +10 -0
- package/dist/templates/vuexy-portal/src/plugins/casl/composables/useAbility.ts +4 -0
- package/dist/templates/vuexy-portal/src/plugins/casl/index.ts +14 -0
- package/dist/templates/vuexy-portal/src/plugins/i18n/index.ts +29 -0
- package/dist/templates/vuexy-portal/src/plugins/iconify/build-icons.ts +299 -0
- package/dist/templates/vuexy-portal/src/plugins/iconify/index.ts +5 -0
- package/dist/templates/vuexy-portal/src/plugins/layouts.ts +13 -0
- package/dist/templates/vuexy-portal/src/plugins/toast/index.ts +9 -0
- package/dist/templates/vuexy-portal/src/plugins/vuetify/defaults.ts +192 -0
- package/dist/templates/vuexy-portal/src/plugins/vuetify/icons.ts +84 -0
- package/dist/templates/vuexy-portal/src/plugins/vuetify/index.ts +47 -0
- package/dist/templates/vuexy-portal/src/plugins/vuetify/theme.ts +155 -0
- package/dist/templates/vuexy-portal/src/plugins/webfontloader.ts +19 -0
- package/dist/templates/vuexy-portal/src/stores/auth.ts +22 -0
- package/dist/templates/vuexy-portal/src/stores/common.ts +41 -0
- package/dist/templates/vuexy-portal/src/stores/index.ts +0 -0
- package/dist/templates/vuexy-portal/src/utils/constants.ts +3 -0
- package/dist/templates/vuexy-portal/src/utils/paginationMeta.ts +10 -0
- package/dist/templates/vuexy-portal/themeConfig.ts +66 -0
- package/dist/templates/vuexy-portal/tsconfig.json +86 -0
- package/dist/templates/vuexy-portal/vite.config.ts +111 -0
- package/dist/utils/template.js +2 -0
- package/dist/utils/template.js.map +1 -1
- package/package.json +4 -1
- package/alias-script.sh +0 -30
- package/bunfig.toml +0 -3
- package/dist/templates/nestjs-api/test/jest-e2e.json +0 -12
- package/dist/templates/nestjs-api/test/jest-test.json +0 -26
- package/dist/templates/nestjs-library/test/jest-test.json +0 -23
- package/nax/config.json +0 -23
- package/nax/features/enhancements/prd.json +0 -61
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
IconBtn: {
|
|
3
|
+
icon: true,
|
|
4
|
+
color: 'default',
|
|
5
|
+
variant: 'text',
|
|
6
|
+
},
|
|
7
|
+
VAlert: {
|
|
8
|
+
density: 'comfortable',
|
|
9
|
+
VBtn: {
|
|
10
|
+
color: undefined,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
VAvatar: {
|
|
14
|
+
// ℹ️ Remove after next release
|
|
15
|
+
variant: 'flat',
|
|
16
|
+
},
|
|
17
|
+
VBadge: {
|
|
18
|
+
// set v-badge default color to primary
|
|
19
|
+
color: 'primary',
|
|
20
|
+
},
|
|
21
|
+
VBtn: {
|
|
22
|
+
// set v-btn default color to primary
|
|
23
|
+
color: 'primary',
|
|
24
|
+
},
|
|
25
|
+
VChip: {
|
|
26
|
+
label: true,
|
|
27
|
+
},
|
|
28
|
+
VDataTable: {
|
|
29
|
+
VPagination: {
|
|
30
|
+
showFirstLastPage: true,
|
|
31
|
+
firstIcon: 'tabler-chevrons-left',
|
|
32
|
+
lastIcon: 'tabler-chevrons-right',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
VDataTableServer: {
|
|
36
|
+
VPagination: {
|
|
37
|
+
showFirstLastPage: true,
|
|
38
|
+
firstIcon: 'tabler-chevrons-left',
|
|
39
|
+
lastIcon: 'tabler-chevrons-right',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
VExpansionPanel: {
|
|
43
|
+
expandIcon: 'tabler-chevron-right',
|
|
44
|
+
collapseIcon: 'tabler-chevron-right',
|
|
45
|
+
},
|
|
46
|
+
VExpansionPanelTitle: {
|
|
47
|
+
expandIcon: 'tabler-chevron-right',
|
|
48
|
+
collapseIcon: 'tabler-chevron-right',
|
|
49
|
+
},
|
|
50
|
+
VList: {
|
|
51
|
+
color: 'primary',
|
|
52
|
+
density: 'compact',
|
|
53
|
+
VCheckboxBtn: {
|
|
54
|
+
density: 'compact',
|
|
55
|
+
},
|
|
56
|
+
VListItem: {
|
|
57
|
+
ripple: false,
|
|
58
|
+
VAvatar: {
|
|
59
|
+
size: 40,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
VMenu: {
|
|
64
|
+
offset: '2px',
|
|
65
|
+
scrollStrategy: 'block',
|
|
66
|
+
},
|
|
67
|
+
VPagination: {
|
|
68
|
+
density: 'comfortable',
|
|
69
|
+
variant: 'tonal',
|
|
70
|
+
},
|
|
71
|
+
VTabs: {
|
|
72
|
+
// set v-tabs default color to primary
|
|
73
|
+
color: 'primary',
|
|
74
|
+
density: 'comfortable',
|
|
75
|
+
VSlideGroup: {
|
|
76
|
+
showArrows: true,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
VTooltip: {
|
|
80
|
+
// set v-tooltip default location to top
|
|
81
|
+
location: 'top',
|
|
82
|
+
},
|
|
83
|
+
VCheckboxBtn: {
|
|
84
|
+
color: 'primary',
|
|
85
|
+
},
|
|
86
|
+
VCheckbox: {
|
|
87
|
+
// set v-checkbox default color to primary
|
|
88
|
+
color: 'primary',
|
|
89
|
+
density: 'comfortable',
|
|
90
|
+
hideDetails: 'auto',
|
|
91
|
+
},
|
|
92
|
+
VRadioGroup: {
|
|
93
|
+
color: 'primary',
|
|
94
|
+
density: 'comfortable',
|
|
95
|
+
hideDetails: 'auto',
|
|
96
|
+
},
|
|
97
|
+
VRadio: {
|
|
98
|
+
density: 'comfortable',
|
|
99
|
+
hideDetails: 'auto',
|
|
100
|
+
},
|
|
101
|
+
VSelect: {
|
|
102
|
+
variant: 'outlined',
|
|
103
|
+
color: 'primary',
|
|
104
|
+
density: 'comfortable',
|
|
105
|
+
hideDetails: 'auto',
|
|
106
|
+
VChip: {
|
|
107
|
+
label: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
VRangeSlider: {
|
|
111
|
+
// set v-range-slider default color to primary
|
|
112
|
+
color: 'primary',
|
|
113
|
+
trackSize: 6,
|
|
114
|
+
thumbSize: 22,
|
|
115
|
+
density: 'comfortable',
|
|
116
|
+
thumbLabel: true,
|
|
117
|
+
hideDetails: 'auto',
|
|
118
|
+
},
|
|
119
|
+
VRating: {
|
|
120
|
+
// set v-rating default color to primary
|
|
121
|
+
color: 'warning',
|
|
122
|
+
},
|
|
123
|
+
VProgressLinear: {
|
|
124
|
+
height: 6,
|
|
125
|
+
roundedBar: true,
|
|
126
|
+
rounded: true,
|
|
127
|
+
bgColor: 'rgba(var(--v-track-bg))',
|
|
128
|
+
},
|
|
129
|
+
VSlider: {
|
|
130
|
+
// set v-range-slider default color to primary
|
|
131
|
+
color: 'primary',
|
|
132
|
+
thumbLabel: true,
|
|
133
|
+
hideDetails: 'auto',
|
|
134
|
+
thumbSize: 22,
|
|
135
|
+
trackSize: 6,
|
|
136
|
+
elevation: 4,
|
|
137
|
+
},
|
|
138
|
+
VTextField: {
|
|
139
|
+
variant: 'outlined',
|
|
140
|
+
density: 'comfortable',
|
|
141
|
+
color: 'primary',
|
|
142
|
+
hideDetails: 'auto',
|
|
143
|
+
},
|
|
144
|
+
VAutocomplete: {
|
|
145
|
+
variant: 'outlined',
|
|
146
|
+
color: 'primary',
|
|
147
|
+
density: 'comfortable',
|
|
148
|
+
hideDetails: 'auto',
|
|
149
|
+
menuProps: {
|
|
150
|
+
contentClass: 'app-autocomplete__content v-autocomplete__content',
|
|
151
|
+
},
|
|
152
|
+
VChip: {
|
|
153
|
+
label: true,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
VCombobox: {
|
|
157
|
+
variant: 'outlined',
|
|
158
|
+
density: 'comfortable',
|
|
159
|
+
color: 'primary',
|
|
160
|
+
hideDetails: 'auto',
|
|
161
|
+
VChip: {
|
|
162
|
+
label: true,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
VFileInput: {
|
|
166
|
+
variant: 'outlined',
|
|
167
|
+
density: 'comfortable',
|
|
168
|
+
color: 'primary',
|
|
169
|
+
hideDetails: 'auto',
|
|
170
|
+
},
|
|
171
|
+
VTextarea: {
|
|
172
|
+
variant: 'outlined',
|
|
173
|
+
density: 'comfortable',
|
|
174
|
+
color: 'primary',
|
|
175
|
+
hideDetails: 'auto',
|
|
176
|
+
},
|
|
177
|
+
VSnackbar: {
|
|
178
|
+
VBtn: {
|
|
179
|
+
density: 'comfortable',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
VSwitch: {
|
|
183
|
+
// set v-switch default color to primary
|
|
184
|
+
inset: true,
|
|
185
|
+
color: 'primary',
|
|
186
|
+
hideDetails: 'auto',
|
|
187
|
+
ripple: false,
|
|
188
|
+
},
|
|
189
|
+
VNavigationDrawer: {
|
|
190
|
+
touchless: true,
|
|
191
|
+
},
|
|
192
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { IconAliases, IconProps } from 'vuetify'
|
|
2
|
+
|
|
3
|
+
import checkboxChecked from '@images/svg/checkbox-checked.svg'
|
|
4
|
+
import checkboxIndeterminate from '@images/svg/checkbox-indeterminate.svg'
|
|
5
|
+
import checkboxUnchecked from '@images/svg/checkbox-unchecked.svg'
|
|
6
|
+
import radioChecked from '@images/svg/radio-checked.svg'
|
|
7
|
+
import radioUnchecked from '@images/svg/radio-unchecked.svg'
|
|
8
|
+
|
|
9
|
+
const customIcons: Record<string, unknown> = {
|
|
10
|
+
'mdi-checkbox-blank-outline': checkboxUnchecked,
|
|
11
|
+
'mdi-checkbox-marked': checkboxChecked,
|
|
12
|
+
'mdi-minus-box': checkboxIndeterminate,
|
|
13
|
+
'mdi-radiobox-marked': radioChecked,
|
|
14
|
+
'mdi-radiobox-blank': radioUnchecked,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const aliases: Partial<IconAliases> = {
|
|
18
|
+
calendar: 'tabler-calendar',
|
|
19
|
+
collapse: 'tabler-chevron-up',
|
|
20
|
+
complete: 'tabler-check',
|
|
21
|
+
cancel: 'tabler-x',
|
|
22
|
+
close: 'tabler-x',
|
|
23
|
+
delete: 'tabler-circle-x-filled',
|
|
24
|
+
clear: 'tabler-circle-x',
|
|
25
|
+
success: 'tabler-circle-check',
|
|
26
|
+
info: 'tabler-info-circle',
|
|
27
|
+
warning: 'tabler-alert-triangle',
|
|
28
|
+
error: 'tabler-alert-circle',
|
|
29
|
+
prev: 'tabler-chevron-left',
|
|
30
|
+
ratingEmpty: 'tabler-star',
|
|
31
|
+
ratingFull: 'tabler-star-filled',
|
|
32
|
+
ratingHalf: 'tabler-star-half-filled',
|
|
33
|
+
next: 'tabler-chevron-right',
|
|
34
|
+
delimiter: 'tabler-circle',
|
|
35
|
+
sort: 'tabler-arrow-up',
|
|
36
|
+
expand: 'tabler-chevron-down',
|
|
37
|
+
menu: 'tabler-menu-2',
|
|
38
|
+
subgroup: 'tabler-caret-down',
|
|
39
|
+
dropdown: 'tabler-chevron-down',
|
|
40
|
+
edit: 'tabler-pencil',
|
|
41
|
+
loading: 'tabler-refresh',
|
|
42
|
+
first: 'tabler-player-skip-back',
|
|
43
|
+
last: 'tabler-player-skip-forward',
|
|
44
|
+
unfold: 'tabler-arrows-move-vertical',
|
|
45
|
+
file: 'tabler-paperclip',
|
|
46
|
+
plus: 'tabler-plus',
|
|
47
|
+
minus: 'tabler-minus',
|
|
48
|
+
sortAsc: 'tabler-arrow-up',
|
|
49
|
+
sortDesc: 'tabler-arrow-down',
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const iconify = {
|
|
53
|
+
component: (props: IconProps) => {
|
|
54
|
+
// Load custom SVG directly instead of going through icon component
|
|
55
|
+
if (typeof props.icon === 'string') {
|
|
56
|
+
const iconComponent = customIcons[props.icon]
|
|
57
|
+
|
|
58
|
+
if (iconComponent)
|
|
59
|
+
return h(iconComponent)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return h(
|
|
63
|
+
props.tag,
|
|
64
|
+
{
|
|
65
|
+
...props,
|
|
66
|
+
|
|
67
|
+
// As we are using class based icons
|
|
68
|
+
class: [props.icon],
|
|
69
|
+
|
|
70
|
+
// Remove used props from DOM rendering
|
|
71
|
+
tag: undefined,
|
|
72
|
+
icon: undefined,
|
|
73
|
+
},
|
|
74
|
+
)
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const icons = {
|
|
79
|
+
defaultSet: 'iconify',
|
|
80
|
+
aliases,
|
|
81
|
+
sets: {
|
|
82
|
+
iconify,
|
|
83
|
+
},
|
|
84
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { deepMerge } from '@antfu/utils'
|
|
2
|
+
import type { App } from 'vue'
|
|
3
|
+
import { createVuetify } from 'vuetify'
|
|
4
|
+
import { VBtn } from 'vuetify/components/VBtn'
|
|
5
|
+
import defaults from './defaults'
|
|
6
|
+
import { icons } from './icons'
|
|
7
|
+
import { staticPrimaryColor, staticPrimaryDarkenColor, themes } from './theme'
|
|
8
|
+
import { themeConfig } from '@themeConfig'
|
|
9
|
+
|
|
10
|
+
// Styles
|
|
11
|
+
import { cookieRef } from '@/@layouts/stores/config'
|
|
12
|
+
import '@core/scss/template/libs/vuetify/index.scss'
|
|
13
|
+
import 'vuetify/styles'
|
|
14
|
+
|
|
15
|
+
export default function (app: App) {
|
|
16
|
+
const cookieThemeValues = {
|
|
17
|
+
defaultTheme: resolveVuetifyTheme(themeConfig.app.theme),
|
|
18
|
+
themes: {
|
|
19
|
+
light: {
|
|
20
|
+
colors: {
|
|
21
|
+
'primary': cookieRef('lightThemePrimaryColor', staticPrimaryColor).value,
|
|
22
|
+
'primary-darken-1': cookieRef('lightThemePrimaryDarkenColor', staticPrimaryDarkenColor).value,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
dark: {
|
|
26
|
+
colors: {
|
|
27
|
+
'primary': cookieRef('darkThemePrimaryColor', staticPrimaryColor).value,
|
|
28
|
+
'primary-darken-1': cookieRef('darkThemePrimaryDarkenColor', staticPrimaryDarkenColor).value,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const optionTheme = deepMerge({ themes }, cookieThemeValues)
|
|
35
|
+
|
|
36
|
+
const vuetify = createVuetify({
|
|
37
|
+
aliases: {
|
|
38
|
+
IconBtn: VBtn,
|
|
39
|
+
},
|
|
40
|
+
defaults,
|
|
41
|
+
icons,
|
|
42
|
+
theme: optionTheme,
|
|
43
|
+
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
app.use(vuetify)
|
|
47
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { ThemeDefinition } from 'vuetify'
|
|
2
|
+
|
|
3
|
+
export const staticPrimaryColor = '#7367F0'
|
|
4
|
+
export const staticPrimaryDarkenColor = '#675DD8'
|
|
5
|
+
|
|
6
|
+
export const themes: Record<string, ThemeDefinition> = {
|
|
7
|
+
light: {
|
|
8
|
+
dark: false,
|
|
9
|
+
colors: {
|
|
10
|
+
'primary': staticPrimaryColor,
|
|
11
|
+
'on-primary': '#fff',
|
|
12
|
+
'primary-darken-1': '#675DD8',
|
|
13
|
+
'secondary': '#808390',
|
|
14
|
+
'on-secondary': '#fff',
|
|
15
|
+
'secondary-darken-1': '#737682',
|
|
16
|
+
'success': '#28C76F',
|
|
17
|
+
'on-success': '#fff',
|
|
18
|
+
'success-darken-1': '#24B364',
|
|
19
|
+
'info': '#00BAD1',
|
|
20
|
+
'on-info': '#fff',
|
|
21
|
+
'info-darken-1': '#00A7BC',
|
|
22
|
+
'warning': '#FF9F43',
|
|
23
|
+
'on-warning': '#fff',
|
|
24
|
+
'warning-darken-1': '#E68F3C',
|
|
25
|
+
'error': '#FF4C51',
|
|
26
|
+
'on-error': '#fff',
|
|
27
|
+
'error-darken-1': '#E64449',
|
|
28
|
+
'background': '#F8F7FA',
|
|
29
|
+
'on-background': '#2F2B3D',
|
|
30
|
+
'surface': '#fff',
|
|
31
|
+
'on-surface': '#2F2B3D',
|
|
32
|
+
'grey-50': '#FAFAFA',
|
|
33
|
+
'grey-100': '#F5F5F5',
|
|
34
|
+
'grey-200': '#EEEEEE',
|
|
35
|
+
'grey-300': '#E0E0E0',
|
|
36
|
+
'grey-400': '#BDBDBD',
|
|
37
|
+
'grey-500': '#9E9E9E',
|
|
38
|
+
'grey-600': '#757575',
|
|
39
|
+
'grey-700': '#616161',
|
|
40
|
+
'grey-800': '#424242',
|
|
41
|
+
'grey-900': '#212121',
|
|
42
|
+
'grey-light': '#FAFAFA',
|
|
43
|
+
'perfect-scrollbar-thumb': '#DBDADE',
|
|
44
|
+
'skin-bordered-background': '#fff',
|
|
45
|
+
'skin-bordered-surface': '#fff',
|
|
46
|
+
'expansion-panel-text-custom-bg': '#fafafa',
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
variables: {
|
|
50
|
+
'code-color': '#d400ff',
|
|
51
|
+
'overlay-scrim-background': '#2F2B3D',
|
|
52
|
+
'tooltip-background': '#2F2B3D',
|
|
53
|
+
'overlay-scrim-opacity': 0.5,
|
|
54
|
+
'hover-opacity': 0.06,
|
|
55
|
+
'focus-opacity': 0.1,
|
|
56
|
+
'selected-opacity': 0.08,
|
|
57
|
+
'activated-opacity': 0.16,
|
|
58
|
+
'pressed-opacity': 0.14,
|
|
59
|
+
'dragged-opacity': 0.1,
|
|
60
|
+
'disabled-opacity': 0.4,
|
|
61
|
+
'border-color': '#2F2B3D',
|
|
62
|
+
'border-opacity': 0.12,
|
|
63
|
+
'table-header-color': '#EAEAEC',
|
|
64
|
+
'high-emphasis-opacity': 0.9,
|
|
65
|
+
'medium-emphasis-opacity': 0.7,
|
|
66
|
+
'switch-opacity': 0.2,
|
|
67
|
+
'switch-disabled-track-opacity': 0.3,
|
|
68
|
+
'switch-disabled-thumb-opacity': 0.4,
|
|
69
|
+
'switch-checked-disabled-opacity': 0.3,
|
|
70
|
+
'track-bg': '#F1F0F2',
|
|
71
|
+
|
|
72
|
+
// Shadows
|
|
73
|
+
'shadow-key-umbra-color': '#2F2B3D',
|
|
74
|
+
'shadow-xs-opacity': 0.10,
|
|
75
|
+
'shadow-sm-opacity': 0.12,
|
|
76
|
+
'shadow-md-opacity': 0.14,
|
|
77
|
+
'shadow-lg-opacity': 0.16,
|
|
78
|
+
'shadow-xl-opacity': 0.18,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
dark: {
|
|
82
|
+
dark: true,
|
|
83
|
+
colors: {
|
|
84
|
+
'primary': staticPrimaryColor,
|
|
85
|
+
'on-primary': '#fff',
|
|
86
|
+
'primary-darken-1': '#675DD8',
|
|
87
|
+
'secondary': '#808390',
|
|
88
|
+
'on-secondary': '#fff',
|
|
89
|
+
'secondary-darken-1': '#737682',
|
|
90
|
+
'success': '#28C76F',
|
|
91
|
+
'on-success': '#fff',
|
|
92
|
+
'success-darken-1': '#24B364',
|
|
93
|
+
'info': '#00BAD1',
|
|
94
|
+
'on-info': '#fff',
|
|
95
|
+
'info-darken-1': '#00A7BC',
|
|
96
|
+
'warning': '#FF9F43',
|
|
97
|
+
'on-warning': '#fff',
|
|
98
|
+
'warning-darken-1': '#E68F3C',
|
|
99
|
+
'error': '#FF4C51',
|
|
100
|
+
'on-error': '#fff',
|
|
101
|
+
'error-darken-1': '#E64449',
|
|
102
|
+
'background': '#25293C',
|
|
103
|
+
'on-background': '#E1DEF5',
|
|
104
|
+
'surface': '#2F3349',
|
|
105
|
+
'on-surface': '#E1DEF5',
|
|
106
|
+
'grey-50': '#26293A',
|
|
107
|
+
'grey-100': '#2F3349',
|
|
108
|
+
'grey-200': '#26293A',
|
|
109
|
+
'grey-300': '#4A5072',
|
|
110
|
+
'grey-400': '#5E6692',
|
|
111
|
+
'grey-500': '#7983BB',
|
|
112
|
+
'grey-600': '#AAB3DE',
|
|
113
|
+
'grey-700': '#B6BEE3',
|
|
114
|
+
'grey-800': '#CFD3EC',
|
|
115
|
+
'grey-900': '#E7E9F6',
|
|
116
|
+
'grey-light': '#353A52',
|
|
117
|
+
'perfect-scrollbar-thumb': '#4A5072',
|
|
118
|
+
'skin-bordered-background': '#2F3349',
|
|
119
|
+
'skin-bordered-surface': '#2F3349',
|
|
120
|
+
},
|
|
121
|
+
variables: {
|
|
122
|
+
'code-color': '#d400ff',
|
|
123
|
+
'overlay-scrim-background': '#171925',
|
|
124
|
+
'tooltip-background': '#F7F4FF',
|
|
125
|
+
'overlay-scrim-opacity': 0.6,
|
|
126
|
+
'hover-opacity': 0.06,
|
|
127
|
+
'focus-opacity': 0.1,
|
|
128
|
+
'selected-opacity': 0.08,
|
|
129
|
+
'activated-opacity': 0.16,
|
|
130
|
+
'pressed-opacity': 0.14,
|
|
131
|
+
'dragged-opacity': 0.1,
|
|
132
|
+
'disabled-opacity': 0.4,
|
|
133
|
+
'border-color': '#E1DEF5',
|
|
134
|
+
'border-opacity': 0.12,
|
|
135
|
+
'table-header-color': '#535876',
|
|
136
|
+
'high-emphasis-opacity': 0.9,
|
|
137
|
+
'medium-emphasis-opacity': 0.7,
|
|
138
|
+
'switch-opacity': 0.4,
|
|
139
|
+
'switch-disabled-track-opacity': 0.4,
|
|
140
|
+
'switch-disabled-thumb-opacity': 0.8,
|
|
141
|
+
'switch-checked-disabled-opacity': 0.3,
|
|
142
|
+
'track-bg': '#3A3F57',
|
|
143
|
+
|
|
144
|
+
// Shadows
|
|
145
|
+
'shadow-key-umbra-color': '#131120',
|
|
146
|
+
'shadow-xs-opacity': 0.16,
|
|
147
|
+
'shadow-sm-opacity': 0.18,
|
|
148
|
+
'shadow-md-opacity': 0.2,
|
|
149
|
+
'shadow-lg-opacity': 0.22,
|
|
150
|
+
'shadow-xl-opacity': 0.24,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export default themes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plugins/webfontloader.js
|
|
3
|
+
*
|
|
4
|
+
* webfontloader documentation: https://github.com/typekit/webfontloader
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export async function loadFonts() {
|
|
8
|
+
const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
|
|
9
|
+
|
|
10
|
+
webFontLoader.load({
|
|
11
|
+
google: {
|
|
12
|
+
families: ['Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap'],
|
|
13
|
+
},
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function () {
|
|
18
|
+
loadFonts()
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const useAuthStore = defineStore('auth', () => {
|
|
2
|
+
const axios = useAxios()
|
|
3
|
+
const router = useRouter()
|
|
4
|
+
const jwt = useJwt(defaultJwtConfig, axios)
|
|
5
|
+
const config = ref(jwt.config)
|
|
6
|
+
|
|
7
|
+
const login = async (data: any) => {
|
|
8
|
+
return jwt.login(data)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const logout = async () => {
|
|
12
|
+
jwt.logout(() => {
|
|
13
|
+
router.push('/login')
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
config,
|
|
19
|
+
login,
|
|
20
|
+
logout,
|
|
21
|
+
}
|
|
22
|
+
})
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Country } from '@/@custom/types/common'
|
|
2
|
+
|
|
3
|
+
interface CommonState {
|
|
4
|
+
availableCountries: Country[]
|
|
5
|
+
isCountriesFetched: boolean
|
|
6
|
+
availableLanguages: any[]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const useCommonStore = defineStore('common', {
|
|
10
|
+
state: (): CommonState => ({
|
|
11
|
+
availableCountries: [],
|
|
12
|
+
isCountriesFetched: false,
|
|
13
|
+
availableLanguages: [],
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
actions: {
|
|
17
|
+
async fetchAvailableCountries() {
|
|
18
|
+
try {
|
|
19
|
+
this.availableCountries = await commonApi.fetchAvailableCountries()
|
|
20
|
+
this.isCountriesFetched = true
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
return error
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
async getAvailableCountries() {
|
|
27
|
+
if (!this.isCountriesFetched)
|
|
28
|
+
await this.fetchAvailableCountries()
|
|
29
|
+
|
|
30
|
+
return this.availableCountries
|
|
31
|
+
},
|
|
32
|
+
async fetchAvailableLanguages() {
|
|
33
|
+
try {
|
|
34
|
+
this.availableLanguages = await commonApi.fetchAvailableLanguages()
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
return error
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { themeConfig } from '@themeConfig';
|
|
2
|
+
import { useI18n } from 'vue-i18n';
|
|
3
|
+
|
|
4
|
+
export const paginationMeta = <T extends { page: number; itemsPerPage: number }>(options: T, total: number) => {
|
|
5
|
+
const { t } = useI18n({ useScope: 'global' });
|
|
6
|
+
const start = (options.page - 1) * options.itemsPerPage + 1
|
|
7
|
+
const end = Math.min(options.page * options.itemsPerPage, total)
|
|
8
|
+
const displayStart = total === 0 ? 0 : start;
|
|
9
|
+
return themeConfig.app.i18n.enable ? t('pagination.paginationMeta', { start: displayStart, end, total }) : `Showing ${displayStart} to ${end} of ${total} entries`
|
|
10
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineThemeConfig } from '@core'
|
|
2
|
+
import { Skins } from '@core/enums'
|
|
3
|
+
import { breakpointsVuetify } from '@vueuse/core'
|
|
4
|
+
import { VIcon } from 'vuetify/components/VIcon'
|
|
5
|
+
|
|
6
|
+
// ❗ Logo SVG must be imported with ?raw suffix
|
|
7
|
+
import logo from '@images/logo.svg?raw'
|
|
8
|
+
|
|
9
|
+
import { AppContentLayoutNav, ContentWidth, FooterType, NavbarType } from '@layouts/enums'
|
|
10
|
+
|
|
11
|
+
export const { themeConfig, layoutConfig } = defineThemeConfig({
|
|
12
|
+
app: {
|
|
13
|
+
title: 'vuexy',
|
|
14
|
+
logo: h('div', { innerHTML: logo, style: 'line-height:0; color: rgb(var(--v-global-theme-primary))' }),
|
|
15
|
+
contentWidth: ContentWidth.Boxed,
|
|
16
|
+
contentLayoutNav: AppContentLayoutNav.Vertical,
|
|
17
|
+
overlayNavFromBreakpoint: breakpointsVuetify.md + 16, // 16 for scrollbar. Docs: https://next.vuetifyjs.com/en/features/display-and-platform/
|
|
18
|
+
i18n: {
|
|
19
|
+
enable: true,
|
|
20
|
+
defaultLocale: 'en_US',
|
|
21
|
+
langConfig: [
|
|
22
|
+
{
|
|
23
|
+
label: 'English',
|
|
24
|
+
i18nLang: 'en_US',
|
|
25
|
+
isRTL: false,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: '简体中文',
|
|
29
|
+
i18nLang: 'zh_CN',
|
|
30
|
+
isRTL: false,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
theme: 'system',
|
|
35
|
+
skin: Skins.Default,
|
|
36
|
+
iconRenderer: VIcon,
|
|
37
|
+
},
|
|
38
|
+
navbar: {
|
|
39
|
+
type: NavbarType.Sticky,
|
|
40
|
+
navbarBlur: true,
|
|
41
|
+
},
|
|
42
|
+
footer: { type: FooterType.Static },
|
|
43
|
+
verticalNav: {
|
|
44
|
+
isVerticalNavCollapsed: false,
|
|
45
|
+
defaultNavItemIconProps: { icon: 'tabler-circle' },
|
|
46
|
+
isVerticalNavSemiDark: false,
|
|
47
|
+
},
|
|
48
|
+
horizontalNav: {
|
|
49
|
+
type: 'sticky',
|
|
50
|
+
transition: 'slide-y-reverse-transition',
|
|
51
|
+
popoverOffset: 6,
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
// ℹ️ In below Icons section, you can specify icon for each component. Also you can use other props of v-icon component like `color` and `size` for each icon.
|
|
56
|
+
// Such as: chevronDown: { icon: 'tabler-chevron-down', color:'primary', size: '24' },
|
|
57
|
+
*/
|
|
58
|
+
icons: {
|
|
59
|
+
chevronDown: { icon: 'tabler-chevron-down' },
|
|
60
|
+
chevronRight: { icon: 'tabler-chevron-right', size: 20 },
|
|
61
|
+
close: { icon: 'tabler-x' },
|
|
62
|
+
verticalNavPinned: { icon: 'tabler-circle-dot' },
|
|
63
|
+
verticalNavUnPinned: { icon: 'tabler-circle' },
|
|
64
|
+
sectionTitlePlaceholder: { icon: 'tabler-minus' },
|
|
65
|
+
},
|
|
66
|
+
})
|