easycomponentstools 1.0.0-dev.4 → 1.0.0-dev.6
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/package.json +1 -1
- package/src/main.ts +5 -36
- package/src/scss/app.scss +0 -1
- package/src/types/plugins.ts +0 -11
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -1,48 +1,14 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
|
-
import { en, el } from 'vuetify/locale'
|
|
3
2
|
import { pluginsPropertiesDTO } from './types/plugins'
|
|
4
|
-
import { createVuetify } from 'vuetify/framework'
|
|
5
|
-
import * as components from 'vuetify/components'
|
|
6
|
-
import * as directives from 'vuetify/directives'
|
|
7
|
-
import { VFileUpload } from 'vuetify/labs/components'
|
|
8
3
|
import { createI18n } from 'vue-i18n'
|
|
9
4
|
import langEn from '../src/lang/en'
|
|
10
5
|
import langEl from '../src/lang/el'
|
|
11
|
-
import { createPinia } from 'pinia'
|
|
12
6
|
import { useInfo } from './stores/useInfo'
|
|
13
7
|
import EasyForm from './components/Form/EasyForm.vue'
|
|
14
8
|
import './scss/app.scss'
|
|
15
9
|
|
|
16
10
|
export default {
|
|
17
11
|
install(app: App, props: pluginsPropertiesDTO) {
|
|
18
|
-
useInfo().timeZone = props.timeZone
|
|
19
|
-
const vuetify = createVuetify({
|
|
20
|
-
components: {
|
|
21
|
-
...components,
|
|
22
|
-
VFileUpload,
|
|
23
|
-
},
|
|
24
|
-
directives,
|
|
25
|
-
defaults: {},
|
|
26
|
-
theme: {
|
|
27
|
-
defaultTheme: 'customTheme',
|
|
28
|
-
themes: {
|
|
29
|
-
customTheme: {
|
|
30
|
-
colors: props.colors,
|
|
31
|
-
variables: {
|
|
32
|
-
'font-family': props.fontFamily,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
locale: {
|
|
38
|
-
locale: props.locale,
|
|
39
|
-
fallback: props.locale,
|
|
40
|
-
messages: {
|
|
41
|
-
en: { ...en },
|
|
42
|
-
el: { ...el },
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
})
|
|
46
12
|
const i18n = createI18n({
|
|
47
13
|
legacy: false,
|
|
48
14
|
locale: props.locale ?? 'en',
|
|
@@ -51,9 +17,12 @@ export default {
|
|
|
51
17
|
el: langEl,
|
|
52
18
|
},
|
|
53
19
|
})
|
|
54
|
-
app.use(createPinia())
|
|
55
|
-
app.use(vuetify)
|
|
56
20
|
app.use(i18n)
|
|
57
21
|
app.component('EasyForm', EasyForm)
|
|
22
|
+
|
|
23
|
+
app.runWithContext(() => {
|
|
24
|
+
const info = useInfo()
|
|
25
|
+
info.timeZone = props.timeZone
|
|
26
|
+
})
|
|
58
27
|
},
|
|
59
28
|
}
|
package/src/scss/app.scss
CHANGED
package/src/types/plugins.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
export type colorsDTO = {
|
|
2
|
-
background: string
|
|
3
|
-
surface: string
|
|
4
|
-
primary: string
|
|
5
|
-
secondary: string
|
|
6
|
-
error: string
|
|
7
|
-
grey: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
1
|
export type pluginsPropertiesDTO = {
|
|
11
|
-
colors: colorsDTO
|
|
12
|
-
fontFamily: string
|
|
13
2
|
locale: string
|
|
14
3
|
timeZone: string
|
|
15
4
|
}
|