Derick Montague | fded0d1 | 2019-12-11 06:16:40 -0600 | [diff] [blame] | 1 | import Vue from 'vue'; |
| 2 | import App from './App.vue'; |
| 3 | import router from './router'; |
| 4 | import store from './store'; |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 5 | import { |
Derick Montague | 676f2fc | 2019-12-23 20:53:49 -0600 | [diff] [blame] | 6 | AlertPlugin, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 7 | BadgePlugin, |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 8 | ButtonPlugin, |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 9 | BVConfigPlugin, |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 10 | CollapsePlugin, |
Yoshie Muranaka | 82cca54 | 2020-04-07 10:20:37 -0700 | [diff] [blame] | 11 | DropdownPlugin, |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 12 | FormPlugin, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 13 | FormCheckboxPlugin, |
Yoshie Muranaka | 68bbba2 | 2020-05-18 09:49:37 -0700 | [diff] [blame^] | 14 | FormDatepickerPlugin, |
Yoshie Muranaka | 3739381 | 2020-03-24 15:25:24 -0700 | [diff] [blame] | 15 | FormFilePlugin, |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 16 | FormGroupPlugin, |
| 17 | FormInputPlugin, |
Yoshie Muranaka | 463a570 | 2019-12-04 09:09:36 -0800 | [diff] [blame] | 18 | FormRadioPlugin, |
| 19 | FormSelectPlugin, |
Yoshie Muranaka | 532a4b0 | 2020-03-27 11:00:50 -0700 | [diff] [blame] | 20 | FormTagsPlugin, |
Yoshie Muranaka | c4e38ab | 2020-04-09 12:41:27 -0700 | [diff] [blame] | 21 | InputGroupPlugin, |
Yoshie Muranaka | 35080ac | 2020-01-17 15:38:57 -0600 | [diff] [blame] | 22 | LayoutPlugin, |
Derick Montague | 42c1989 | 2020-01-17 16:10:34 -0600 | [diff] [blame] | 23 | LinkPlugin, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 24 | ListGroupPlugin, |
Derick Montague | 42c1989 | 2020-01-17 16:10:34 -0600 | [diff] [blame] | 25 | ModalPlugin, |
| 26 | NavbarPlugin, |
| 27 | NavPlugin, |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 28 | PaginationPlugin, |
Yoshie Muranaka | 3be801a | 2020-04-21 11:34:56 -0700 | [diff] [blame] | 29 | ProgressPlugin, |
Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 30 | TablePlugin, |
Yoshie Muranaka | 1be6b41 | 2020-04-16 12:03:38 -0700 | [diff] [blame] | 31 | ToastPlugin, |
| 32 | TooltipPlugin |
Derick Montague | fded0d1 | 2019-12-11 06:16:40 -0600 | [diff] [blame] | 33 | } from 'bootstrap-vue'; |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 34 | import Vuelidate from 'vuelidate'; |
Dixsie Wolmers | cbcd213 | 2020-01-30 20:58:37 -0600 | [diff] [blame] | 35 | import i18n from './i18n'; |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 36 | |
Dixsie Wolmers | 97f4187 | 2020-02-23 15:56:16 -0600 | [diff] [blame] | 37 | // Filters |
| 38 | Vue.filter('formatDate', function(value) { |
Dixsie Wolmers | 97f4187 | 2020-02-23 15:56:16 -0600 | [diff] [blame] | 39 | if (value instanceof Date) { |
Dixsie Wolmers | 0e4760e | 2020-06-05 09:09:02 -0500 | [diff] [blame] | 40 | return value.toISOString().substring(0, 10); |
Dixsie Wolmers | 97f4187 | 2020-02-23 15:56:16 -0600 | [diff] [blame] | 41 | } |
| 42 | }); |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 43 | |
Dixsie Wolmers | 97f4187 | 2020-02-23 15:56:16 -0600 | [diff] [blame] | 44 | Vue.filter('formatTime', function(value) { |
| 45 | const timeOptions = { |
| 46 | hour: 'numeric', |
| 47 | minute: 'numeric', |
| 48 | second: 'numeric', |
| 49 | timeZoneName: 'short' |
| 50 | }; |
| 51 | if (value instanceof Date) { |
| 52 | return value.toLocaleTimeString('default', timeOptions); |
| 53 | } |
| 54 | }); |
| 55 | |
| 56 | // Plugins |
Derick Montague | 676f2fc | 2019-12-23 20:53:49 -0600 | [diff] [blame] | 57 | Vue.use(AlertPlugin); |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 58 | Vue.use(BadgePlugin); |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 59 | Vue.use(ButtonPlugin); |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 60 | Vue.use(BVConfigPlugin, { |
Derick Montague | 7f970a1 | 2020-03-02 17:56:09 -0600 | [diff] [blame] | 61 | BFormText: { textVariant: 'secondary' }, |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 62 | BTable: { |
| 63 | headVariant: 'light', |
| 64 | footVariant: 'light' |
Yoshie Muranaka | 532a4b0 | 2020-03-27 11:00:50 -0700 | [diff] [blame] | 65 | }, |
| 66 | BFormTags: { |
| 67 | tagVariant: 'primary', |
| 68 | addButtonVariant: 'link-primary' |
Yoshie Muranaka | 82cca54 | 2020-04-07 10:20:37 -0700 | [diff] [blame] | 69 | }, |
| 70 | BBadge: { |
| 71 | variant: 'primary' |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 72 | } |
| 73 | }); |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 74 | Vue.use(CollapsePlugin); |
Yoshie Muranaka | 82cca54 | 2020-04-07 10:20:37 -0700 | [diff] [blame] | 75 | Vue.use(DropdownPlugin); |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 76 | Vue.use(FormPlugin); |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 77 | Vue.use(FormCheckboxPlugin); |
Yoshie Muranaka | 68bbba2 | 2020-05-18 09:49:37 -0700 | [diff] [blame^] | 78 | Vue.use(FormDatepickerPlugin); |
Yoshie Muranaka | 3739381 | 2020-03-24 15:25:24 -0700 | [diff] [blame] | 79 | Vue.use(FormFilePlugin); |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 80 | Vue.use(FormGroupPlugin); |
| 81 | Vue.use(FormInputPlugin); |
Yoshie Muranaka | 463a570 | 2019-12-04 09:09:36 -0800 | [diff] [blame] | 82 | Vue.use(FormRadioPlugin); |
| 83 | Vue.use(FormSelectPlugin); |
Yoshie Muranaka | 532a4b0 | 2020-03-27 11:00:50 -0700 | [diff] [blame] | 84 | Vue.use(FormTagsPlugin); |
Yoshie Muranaka | c4e38ab | 2020-04-09 12:41:27 -0700 | [diff] [blame] | 85 | Vue.use(InputGroupPlugin); |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 86 | Vue.use(LayoutPlugin); |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 87 | Vue.use(LayoutPlugin); |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 88 | Vue.use(LinkPlugin); |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 89 | Vue.use(ListGroupPlugin); |
Yoshie Muranaka | 35080ac | 2020-01-17 15:38:57 -0600 | [diff] [blame] | 90 | Vue.use(ModalPlugin); |
Derick Montague | 42c1989 | 2020-01-17 16:10:34 -0600 | [diff] [blame] | 91 | Vue.use(NavbarPlugin); |
| 92 | Vue.use(NavPlugin); |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 93 | Vue.use(PaginationPlugin); |
Yoshie Muranaka | 3be801a | 2020-04-21 11:34:56 -0700 | [diff] [blame] | 94 | Vue.use(ProgressPlugin); |
Derick Montague | 42c1989 | 2020-01-17 16:10:34 -0600 | [diff] [blame] | 95 | Vue.use(TablePlugin); |
Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 96 | Vue.use(ToastPlugin); |
Yoshie Muranaka | 1be6b41 | 2020-04-16 12:03:38 -0700 | [diff] [blame] | 97 | Vue.use(TooltipPlugin); |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 98 | Vue.use(Vuelidate); |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 99 | |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 100 | new Vue({ |
| 101 | router, |
| 102 | store, |
Dixsie Wolmers | cbcd213 | 2020-01-30 20:58:37 -0600 | [diff] [blame] | 103 | i18n, |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 104 | render: h => h(App) |
Derick Montague | fded0d1 | 2019-12-11 06:16:40 -0600 | [diff] [blame] | 105 | }).$mount('#app'); |