blob: d9f1e78761055f0428e1d5e6a2dce5bf392d6935 [file] [log] [blame]
Derick Montaguefded0d12019-12-11 06:16:40 -06001import Vue from 'vue';
2import App from './App.vue';
3import router from './router';
4import store from './store';
Derick Montaguea2988f42020-01-17 13:46:30 -06005import {
Derick Montague676f2fc2019-12-23 20:53:49 -06006 AlertPlugin,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06007 BadgePlugin,
Derick Montaguea2988f42020-01-17 13:46:30 -06008 ButtonPlugin,
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -08009 BVConfigPlugin,
Derick Montaguea2988f42020-01-17 13:46:30 -060010 CollapsePlugin,
Yoshie Muranaka82cca542020-04-07 10:20:37 -070011 DropdownPlugin,
Derick Montaguee080a1a2019-12-04 16:30:08 -060012 FormPlugin,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060013 FormCheckboxPlugin,
Yoshie Muranaka37393812020-03-24 15:25:24 -070014 FormFilePlugin,
Derick Montaguee080a1a2019-12-04 16:30:08 -060015 FormGroupPlugin,
16 FormInputPlugin,
Yoshie Muranaka463a5702019-12-04 09:09:36 -080017 FormRadioPlugin,
18 FormSelectPlugin,
Yoshie Muranaka532a4b02020-03-27 11:00:50 -070019 FormTagsPlugin,
Yoshie Muranakac4e38ab2020-04-09 12:41:27 -070020 InputGroupPlugin,
Yoshie Muranaka35080ac2020-01-17 15:38:57 -060021 LayoutPlugin,
Derick Montague42c19892020-01-17 16:10:34 -060022 LinkPlugin,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060023 ListGroupPlugin,
Derick Montague42c19892020-01-17 16:10:34 -060024 ModalPlugin,
25 NavbarPlugin,
26 NavPlugin,
Yoshie Muranaka3be801a2020-04-21 11:34:56 -070027 ProgressPlugin,
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080028 TablePlugin,
Yoshie Muranaka1be6b412020-04-16 12:03:38 -070029 ToastPlugin,
30 TooltipPlugin
Derick Montaguefded0d12019-12-11 06:16:40 -060031} from 'bootstrap-vue';
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080032import Vuelidate from 'vuelidate';
Dixsie Wolmerscbcd2132020-01-30 20:58:37 -060033import i18n from './i18n';
Derick Montaguea2988f42020-01-17 13:46:30 -060034
Dixsie Wolmers97f41872020-02-23 15:56:16 -060035// Filters
36Vue.filter('formatDate', function(value) {
37 const dateOptions = {
38 year: 'numeric',
39 month: 'short',
40 day: 'numeric'
41 };
42 if (value instanceof Date) {
43 return value.toLocaleDateString(i18n.locale, dateOptions);
44 }
45});
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060046
Dixsie Wolmers97f41872020-02-23 15:56:16 -060047Vue.filter('formatTime', function(value) {
48 const timeOptions = {
49 hour: 'numeric',
50 minute: 'numeric',
51 second: 'numeric',
52 timeZoneName: 'short'
53 };
54 if (value instanceof Date) {
55 return value.toLocaleTimeString('default', timeOptions);
56 }
57});
58
59// Plugins
Derick Montague676f2fc2019-12-23 20:53:49 -060060Vue.use(AlertPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060061Vue.use(BadgePlugin);
Derick Montaguea2988f42020-01-17 13:46:30 -060062Vue.use(ButtonPlugin);
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080063Vue.use(BVConfigPlugin, {
Derick Montague7f970a12020-03-02 17:56:09 -060064 BFormText: { textVariant: 'secondary' },
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080065 BTable: {
66 headVariant: 'light',
67 footVariant: 'light'
Yoshie Muranaka532a4b02020-03-27 11:00:50 -070068 },
69 BFormTags: {
70 tagVariant: 'primary',
71 addButtonVariant: 'link-primary'
Yoshie Muranaka82cca542020-04-07 10:20:37 -070072 },
73 BBadge: {
74 variant: 'primary'
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080075 }
76});
Derick Montaguea2988f42020-01-17 13:46:30 -060077Vue.use(CollapsePlugin);
Yoshie Muranaka82cca542020-04-07 10:20:37 -070078Vue.use(DropdownPlugin);
Derick Montaguee080a1a2019-12-04 16:30:08 -060079Vue.use(FormPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060080Vue.use(FormCheckboxPlugin);
Yoshie Muranaka37393812020-03-24 15:25:24 -070081Vue.use(FormFilePlugin);
Derick Montaguee080a1a2019-12-04 16:30:08 -060082Vue.use(FormGroupPlugin);
83Vue.use(FormInputPlugin);
Yoshie Muranaka463a5702019-12-04 09:09:36 -080084Vue.use(FormRadioPlugin);
85Vue.use(FormSelectPlugin);
Yoshie Muranaka532a4b02020-03-27 11:00:50 -070086Vue.use(FormTagsPlugin);
Yoshie Muranakac4e38ab2020-04-09 12:41:27 -070087Vue.use(InputGroupPlugin);
Derick Montaguee080a1a2019-12-04 16:30:08 -060088Vue.use(LayoutPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060089Vue.use(LayoutPlugin);
Derick Montaguea2988f42020-01-17 13:46:30 -060090Vue.use(LinkPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060091Vue.use(ListGroupPlugin);
Yoshie Muranaka35080ac2020-01-17 15:38:57 -060092Vue.use(ModalPlugin);
Derick Montague42c19892020-01-17 16:10:34 -060093Vue.use(NavbarPlugin);
94Vue.use(NavPlugin);
Yoshie Muranaka3be801a2020-04-21 11:34:56 -070095Vue.use(ProgressPlugin);
Derick Montague42c19892020-01-17 16:10:34 -060096Vue.use(TablePlugin);
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080097Vue.use(ToastPlugin);
Yoshie Muranaka1be6b412020-04-16 12:03:38 -070098Vue.use(TooltipPlugin);
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080099Vue.use(Vuelidate);
Derick Montaguea2988f42020-01-17 13:46:30 -0600100
Derick Montaguea2988f42020-01-17 13:46:30 -0600101new Vue({
102 router,
103 store,
Dixsie Wolmerscbcd2132020-01-30 20:58:37 -0600104 i18n,
Derick Montaguea2988f42020-01-17 13:46:30 -0600105 render: h => h(App)
Derick Montaguefded0d12019-12-11 06:16:40 -0600106}).$mount('#app');