diff --git a/.eslintrc.js b/.eslintrc.js
index 20034fd2..1c6179f3 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -14,4 +14,4 @@ module.exports = {
parserOptions: {
parser: 'babel-eslint'
}
-}
\ No newline at end of file
+}
diff --git a/babel.config.js b/babel.config.js
index b89d655b..9fb4a004 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,5 +1,12 @@
module.exports = {
presets: [
- '@vue/app'
+ ['@vue/app', {
+ polyfills: [
+ 'es6.promise', // already default included now
+ 'es6.array.iterator', // already default included now
+ 'es6.symbol',
+ 'es6.object.assign'
+ ]
+ }]
]
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index 3070256a..5aa6474e 100644
--- a/package.json
+++ b/package.json
@@ -14,13 +14,13 @@
"test:e2e": "vue-cli-service test:e2e"
},
"dependencies": {
- "@coreui/coreui": "^2.0.14",
+ "@coreui/coreui": "^2.0.20",
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
"@coreui/icons": "0.3.0",
- "@coreui/vue": "^2.0.2",
+ "@coreui/vue": "github:coreui/coreui-vue#vue_cli3",
"bootstrap": "^4.1.3",
"bootstrap-vue": "^2.0.0-rc.11",
- "chart.js": "^2.7.2",
+ "chart.js": "^2.7.3",
"core-js": "^2.5.7",
"css-vars-ponyfill": "^1.11.1",
"flag-icon-css": "^3.2.0",
@@ -33,17 +33,17 @@
"vue-router": "^3.0.1"
},
"devDependencies": {
- "@vue/cli-plugin-babel": "^3.0.4",
- "@vue/cli-plugin-e2e-nightwatch": "^3.0.4",
- "@vue/cli-plugin-eslint": "^3.0.4",
- "@vue/cli-plugin-unit-jest": "^3.0.4",
- "@vue/cli-service": "^3.0.4",
+ "@vue/cli-plugin-babel": "^3.0.5",
+ "@vue/cli-plugin-e2e-nightwatch": "^3.0.5",
+ "@vue/cli-plugin-eslint": "^3.0.5",
+ "@vue/cli-plugin-unit-jest": "^3.0.5",
+ "@vue/cli-service": "^3.0.5",
"@vue/test-utils": "^1.0.0-beta.25",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"growl": "^1.10.5",
"https-proxy-agent": "^2.2.1",
- "node-sass": "^4.9.3",
+ "node-sass": "^4.9.4",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.5.17"
},
diff --git a/src/containers/DefaultAside.vue b/src/containers/DefaultAside.vue
index b8b781f9..b60ead63 100644
--- a/src/containers/DefaultAside.vue
+++ b/src/containers/DefaultAside.vue
@@ -102,7 +102,7 @@

-
+
@@ -117,7 +117,7 @@

-
+
@@ -132,7 +132,7 @@

-
+
@@ -147,7 +147,7 @@

-
+
@@ -162,7 +162,7 @@

-
+
diff --git a/src/containers/DefaultContainer.vue b/src/containers/DefaultContainer.vue
index 3579dfb0..4eac3b06 100644
--- a/src/containers/DefaultContainer.vue
+++ b/src/containers/DefaultContainer.vue
@@ -37,7 +37,7 @@
-
+
@@ -63,7 +63,7 @@
diff --git a/src/containers/DefaultHeaderDropdownAccnt.vue b/src/containers/DefaultHeaderDropdownAccnt.vue
index ecd5e3cc..a56b3d17 100644
--- a/src/containers/DefaultHeaderDropdownAccnt.vue
+++ b/src/containers/DefaultHeaderDropdownAccnt.vue
@@ -1,54 +1,50 @@
-
-
+
+
- \
-
- Account
- Updates
- {{ itemsCount }}
-
- Messages
- {{ itemsCount }}
-
- Tasks
- {{ itemsCount }}
-
- Comments
- {{ itemsCount }}
-
-
- Settings
-
- Profile
- Settings
- Payments
- {{ itemsCount }}
-
- Projects
- {{ itemsCount }}
-
-
- Lock Account
- Logout
-
+
+ Account
+ Updates
+ {{ itemsCount }}
+
+ Messages
+ {{ itemsCount }}
+
+ Tasks
+ {{ itemsCount }}
+
+ Comments
+ {{ itemsCount }}
+
+
+ Settings
+
+ Profile
+ Settings
+ Payments
+ {{ itemsCount }}
+
+ Projects
+ {{ itemsCount }}
+
+
+ Lock Account
+ Logout
+
diff --git a/src/main.js b/src/main.js
index 136252c4..04eeec82 100644
--- a/src/main.js
+++ b/src/main.js
@@ -3,23 +3,28 @@
import 'core-js/es6/promise'
import 'core-js/es6/string'
import 'core-js/es7/array'
+
// import cssVars from 'css-vars-ponyfill'
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
import App from './App'
import router from './router'
+import CoreuiVue from '@coreui/vue'
+
+Vue.config.performance = true
// todo
// cssVars()
-
Vue.use(BootstrapVue)
+Vue.use(CoreuiVue)
+
/* eslint-disable no-new */
-new Vue({
+var vm = new Vue({
el: '#app',
router,
template: '',
components: {
App
- }
+ },
})
diff --git a/src/mixins/charts/chartMixins.js b/src/mixins/charts/chartMixins.js
deleted file mode 100644
index 468c0918..00000000
--- a/src/mixins/charts/chartMixins.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import { deepObjectsMerge, getColor } from '@coreui/coreui/dist/js/coreui-utilities'
-
-const generatedLabels = {
- computed:{
- generatedLabels() {
- if(this.labels !== undefined)
- return this.labels
- let labels = [];
- for(let i=1; i<=this.data.length; i++)
- labels.push('')
- return labels
- },
- },
-}
-const generatedBackgroundColor = {
- computed:{
- generatedBackgroundColor(){
- return getColor(this.backgroundColor)
- },
- },
-}
-const generatedBorderColor = {
- computed:{
- generatedBorderColor(){
- return getColor(this.borderColor)
- },
- },
-}
-const generatedPointHoverBackgroundColor = {
- computed:{
- generatedPointHoverBackgroundColor () {
- if(this.$options.propsData.pointHoverBackgroundColor === undefined)
- return this.generatedBorderColor
- return getColor(this.pointHoverBackgroundColor)
- },
- },
-}
-const generatedOptions = {
- computed:{
- generatedOptions () {
- if(this.$options.propsData.options !== undefined)
- deepObjectsMerge(this.finalOptions, this.options)
- return this.finalOptions
- },
- },
-}
-export{
- generatedLabels,
- generatedBackgroundColor,
- generatedBorderColor,
- generatedPointHoverBackgroundColor,
- generatedOptions
-}
diff --git a/src/views/Charts.vue b/src/views/Charts.vue
index bcea281d..fa4800e6 100644
--- a/src/views/Charts.vue
+++ b/src/views/Charts.vue
@@ -2,34 +2,35 @@
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -43,7 +44,7 @@ import PieExample from './charts/PieExample'
import PolarAreaExample from './charts/PolarAreaExample'
export default {
- name: 'charts',
+ name: 'Charts',
components: {
BarExample,
LineExample,
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index aafac39f..a9d361fb 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -2,9 +2,8 @@
-
-
-
+
+
@@ -13,16 +12,14 @@
Something else here...
Disabled action
-
-
-
-
-
+
+
+
-
+
@@ -34,16 +31,14 @@
Disabled action
-
-
-
-
+ pointHoverColor='info'/>
+
-
+
@@ -55,17 +50,15 @@
Disabled action
-
-
-
-
+ style='height:70px' color ='rgba(255,255,255,.2)' label='Members'
+ :options="{elements: {line: {borderWidth: 2.5}}}" pointHoverColor='warning'/>
+
-
-
+
+
@@ -76,11 +69,9 @@
Disabled action
-
-
-
-
+
+
@@ -100,7 +91,7 @@
-
+
@@ -133,32 +124,32 @@
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
@@ -171,9 +162,9 @@
New Clients
9,123
-
+
-
+
@@ -181,8 +172,8 @@
Recurring Clients
22,643
-
-
+
+
@@ -281,8 +272,8 @@
Pageviews
78,623
-
-
+
+
@@ -290,8 +281,8 @@
Organic
49,123
-
-
+
+
@@ -408,27 +399,13 @@
import MainChartExample from './dashboard/MainChartExample'
import SocialBoxChartExample from './dashboard/SocialBoxChartExample'
import CalloutChartExample from './dashboard/CalloutChartExample'
-import { Callout } from '@coreui/vue'
-import Widget04 from './widgets/Widget04'
-import Widget06 from './widgets/Widget06'
-import LineChart1 from './dashboard/LineChart1'
-import LineChart2 from './dashboard/LineChart2'
-
-import BarChart1 from './dashboard/BarChart1'
-
export default {
- name: 'dashboard',
+ name: 'Dashboard',
components: {
- Callout,
MainChartExample,
SocialBoxChartExample,
CalloutChartExample,
- Widget04,
- Widget06,
- LineChart1,
- LineChart2,
- BarChart1
},
data: function () {
return {
diff --git a/src/views/Widgets.vue b/src/views/Widgets.vue
index 5649582f..f858701e 100644
--- a/src/views/Widgets.vue
+++ b/src/views/Widgets.vue
@@ -1,189 +1,207 @@
-
+
-
+
+
+
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
+
+
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
-
-
+
-
+ style='height:100px' color='rgba(255,255,255,.1)'/>
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -195,36 +213,34 @@
Disabled action
-
-
-
-
+ style='height:70px' label='Members' pointHoverColor='primary'/>
+
-
-
-
-
-
-
- Action
- Another action
- Something else here...
- Disabled action
-
-
-
-
-
-
+
+
+
+ Action
+ Another action
+ Something else here...
+ Disabled action
+
+
+
-
+
@@ -236,17 +252,15 @@
Disabled action
-
-
-
-
+ style='height:70px' color ='rgba(255,255,255,.2)' label='Members'
+ :options="{elements: {line: {borderWidth: 2.5}}}" pointHoverColor='warning'/>
+
-
-
+
+
@@ -257,122 +271,86 @@
Disabled action
-
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
-
+
-
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/src/views/base/Breadcrumbs.vue b/src/views/base/Breadcrumbs.vue
index 1747e542..aea7acea 100644
--- a/src/views/base/Breadcrumbs.vue
+++ b/src/views/base/Breadcrumbs.vue
@@ -14,7 +14,11 @@
-
+
+
+
+
+
@@ -23,8 +27,12 @@
diff --git a/src/views/base/CSwitch.vue b/src/views/base/CSwitch.vue
new file mode 100644
index 00000000..357378dd
--- /dev/null
+++ b/src/views/base/CSwitch.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
diff --git a/src/views/base/Navbars.vue b/src/views/base/Navbars.vue
index 83e629c2..6b67791c 100644
--- a/src/views/base/Navbars.vue
+++ b/src/views/base/Navbars.vue
@@ -33,12 +33,20 @@
Search
-
- EN
- ES
- RU
- FA
-
+
+
+
+ EN
+ ES
+ RU
+ FA
+
+
@@ -157,8 +165,12 @@
-
diff --git a/src/views/base/ProgressBars.vue b/src/views/base/ProgressBars.vue
index a3858341..f5ad395c 100644
--- a/src/views/base/ProgressBars.vue
+++ b/src/views/base/ProgressBars.vue
@@ -13,12 +13,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
Click me
@@ -200,4 +200,3 @@ export default {
}
}
-
diff --git a/src/views/base/Switches.vue b/src/views/base/Switches.vue
index 32888775..7f273a33 100644
--- a/src/views/base/Switches.vue
+++ b/src/views/base/Switches.vue
@@ -1,5 +1,36 @@
+
+
+
+
+
+
+ Radio switches
+ {{radio}}
+ NEW
+
+
+
+
+
+
+
@@ -7,15 +38,22 @@
Switch default
{{checker}}
-
-
-
-
-
-
-
-
-
+
+
+
@@ -23,15 +61,15 @@
Switch pills
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -39,15 +77,15 @@
3d Switch
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -55,15 +93,15 @@
3d Switch disabled
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -71,15 +109,15 @@
3d Switch outline="alt"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -87,47 +125,47 @@
3d Switch label
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- 3d Switch outline="alt" label
+ 3d Switch outline="alt"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- 3d Switch outline="alt" label
+ 3d Switch outline="alt"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -135,31 +173,31 @@
Switch outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- Switch outline variant="pill"
+ Switch outline shape="pill"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -167,31 +205,31 @@
Switch outline="alt"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- Switch outline="alt" variant="pill"
+ Switch outline="alt" shape="pill"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -199,31 +237,31 @@
Switch label
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- Switch label variant="pill"
+ Switch label shape="pill"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -231,15 +269,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -247,15 +285,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -263,15 +301,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -279,15 +317,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -296,31 +334,31 @@
Switch label
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ shape
- Switch label variant="pill"
+ Switch label shape="pill"
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -328,15 +366,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -344,15 +382,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -360,15 +398,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -376,15 +414,15 @@
Switch label outline
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -410,18 +448,18 @@
diff --git a/src/views/base/Tables.vue b/src/views/base/Tables.vue
index 96cdea52..06884cf9 100644
--- a/src/views/base/Tables.vue
+++ b/src/views/base/Tables.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/src/views/buttons/Dropdowns.vue b/src/views/buttons/Dropdowns.vue
index b00ee89b..598d0086 100644
--- a/src/views/buttons/Dropdowns.vue
+++ b/src/views/buttons/Dropdowns.vue
@@ -233,6 +233,6 @@
diff --git a/src/views/charts/BarExample.vue b/src/views/charts/BarExample.vue
index 5845d175..6d471115 100644
--- a/src/views/charts/BarExample.vue
+++ b/src/views/charts/BarExample.vue
@@ -1,5 +1,5 @@
diff --git a/src/views/dashboard/CalloutChartExample.vue b/src/views/dashboard/CalloutChartExample.vue
index b813ecf1..c8212bde 100644
--- a/src/views/dashboard/CalloutChartExample.vue
+++ b/src/views/dashboard/CalloutChartExample.vue
@@ -1,5 +1,5 @@
diff --git a/src/views/dashboard/LineChart2.vue b/src/views/dashboard/LineChart2.vue
deleted file mode 100644
index 0e783a2d..00000000
--- a/src/views/dashboard/LineChart2.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-
diff --git a/src/views/dashboard/MainChartExample.vue b/src/views/dashboard/MainChartExample.vue
index 6cc712a2..b801d4e9 100644
--- a/src/views/dashboard/MainChartExample.vue
+++ b/src/views/dashboard/MainChartExample.vue
@@ -1,5 +1,5 @@
diff --git a/src/views/widgets/Widget02.md b/src/views/widgets/Widget02.md
deleted file mode 100644
index 0e900249..00000000
--- a/src/views/widgets/Widget02.md
+++ /dev/null
@@ -1,14 +0,0 @@
-### Widget02
-This widget can be display with or without link. If you want to display link set showLink property to true.
-
-prop | default
---- | ---
-iconClasses | `'fa fa-cogs bg-primary'`
-showLink | `true`
-header| `'header:string'`
-text | `'text:string'`
-link | `'#'`
-
-#### Example:
->
diff --git a/src/views/widgets/Widget02.vue b/src/views/widgets/Widget02.vue
deleted file mode 100644
index d9625548..00000000
--- a/src/views/widgets/Widget02.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- {{header}}
- {{text}}
-
-
- View More
-
-
-
-
-
diff --git a/src/views/widgets/Widget03.md b/src/views/widgets/Widget03.md
deleted file mode 100644
index 395f98f0..00000000
--- a/src/views/widgets/Widget03.md
+++ /dev/null
@@ -1,11 +0,0 @@
-### Widget03
-This widget style depends classes attached to iconClasses property. If you want to get diffrent size of icon block just add padding utility classes (i.e. 'px-5').
-
-prop | default
---- | ---
-iconClasses | `'fa fa-cogs bg-primary'`
-header| `'header:string'`
-text | `'text:string'`
-
-#### Example:
->
diff --git a/src/views/widgets/Widget03.vue b/src/views/widgets/Widget03.vue
deleted file mode 100644
index 41c57b4b..00000000
--- a/src/views/widgets/Widget03.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- {{header}}
- {{text}}
-
-
-
-
-
diff --git a/src/views/widgets/Widget04.md b/src/views/widgets/Widget04.md
deleted file mode 100644
index eb592c40..00000000
--- a/src/views/widgets/Widget04.md
+++ /dev/null
@@ -1,15 +0,0 @@
-### Widget04
-This widget style depends on type property which defines which social widget background color and icon will be used (i.e facebook, twitter, linkedin, google-plus). Inside component there is default slot for placing data chart.
-
-prop | default
---- | ---
-type | `facebook`
-rightHeader | `'rightHeader:string'`
-rightFooter | `'rightFooter:string'`
-leftHeader | `'leftHeader:string'`
-leftFooter | `'leftFooter:string'`
-
-
-#### Example:
-> leftHeader="292" leftFooter="feeds"/>
diff --git a/src/views/widgets/Widget04.vue b/src/views/widgets/Widget04.vue
deleted file mode 100644
index 716612b3..00000000
--- a/src/views/widgets/Widget04.vue
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
{{rightHeader}}
-
{{rightFooter}}
-
-
-
{{leftHeader}}
-
{{leftFooter}}
-
-
-
-
-
-
diff --git a/src/views/widgets/Widget05.md b/src/views/widgets/Widget05.md
deleted file mode 100644
index 3da0dba2..00000000
--- a/src/views/widgets/Widget05.md
+++ /dev/null
@@ -1,15 +0,0 @@
-### Widget05
-
-This widget style can be configured by changing variant property, which name is one of standard bootstrap classes (i.e. success, info, warning, danger). If you want to change background color of widget instead of changing progress bar style add background- prefix to class (i.e. 'background-success').
-
-Value is the procentage value of displayed progress-bar.
-
-prop | default
---- | ---
-variant | `success`
-value | `30`
-iconClasses | `icon-people`
-header| `header:string`
-text | `text:string`
-
->
diff --git a/src/views/widgets/Widget05.vue b/src/views/widgets/Widget05.vue
deleted file mode 100644
index 6fa2652b..00000000
--- a/src/views/widgets/Widget05.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
- {{header}}
- {{text}}
-
-
-
-
-
diff --git a/src/views/widgets/Widget06.md b/src/views/widgets/Widget06.md
deleted file mode 100644
index 1f6415d4..00000000
--- a/src/views/widgets/Widget06.md
+++ /dev/null
@@ -1,21 +0,0 @@
-### Widget06
-
-This widget can style is defined by cardClasses. Inside component there is additional slot for chart (name="chart").
-
-prop | default
---- | ---
-cardClasses | `''`
-header| `header:string`
-text | `text:string`
-
->
-
-
-
-
- Action
- Another action
- Something else here...
- Disabled action
-
-
diff --git a/src/views/widgets/Widget06.vue b/src/views/widgets/Widget06.vue
deleted file mode 100644
index 5ec8ef4d..00000000
--- a/src/views/widgets/Widget06.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
- {{header}}
- {{text}}
-
-
-
-
-
-
-
-
diff --git a/src/views/widgets/Widget07.md b/src/views/widgets/Widget07.md
deleted file mode 100644
index 836b7d17..00000000
--- a/src/views/widgets/Widget07.md
+++ /dev/null
@@ -1,19 +0,0 @@
-### Widget07
-
-This widget can style is defined by cardClasses. Inside component there is default slot for additional data (i.e. chart).
-
-prop | default
---- | ---
-cardClasses | `'bg-primary'`
-rightHeader | `'rightHeader:string'`
-rightFooter | `'rightFooter:string'`
-leftHeader | `'leftHeader:string'`
-leftFooter | `'leftFooter:string'`
-
->
-
-
-
diff --git a/src/views/widgets/Widget07.vue b/src/views/widgets/Widget07.vue
deleted file mode 100644
index 52864d04..00000000
--- a/src/views/widgets/Widget07.vue
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/widgets/Widget08.md b/src/views/widgets/Widget08.md
deleted file mode 100644
index 85c222c3..00000000
--- a/src/views/widgets/Widget08.md
+++ /dev/null
@@ -1,19 +0,0 @@
-### Widget08
-
-This widget can style is defined by cardClasses. Inside component there is default slot for additional data (i.e. chart).
-
-prop | default
---- | ---
-cardClasses | `'bg-primary'`
-rightHeader | `'rightHeader:string'`
-rightFooter | `'rightFooter:string'`
-leftHeader | `'leftHeader:string'`
-leftFooter | `'leftFooter:string'`
-
->
-
-
-
diff --git a/src/views/widgets/Widget08.vue b/src/views/widgets/Widget08.vue
deleted file mode 100644
index 16f965de..00000000
--- a/src/views/widgets/Widget08.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
{{header}}
-
{{text}}
-
-
-
-
-
-
-
-
diff --git a/tests/unit/Plugin.spec.js b/tests/unit/Plugin.spec.js
new file mode 100644
index 00000000..6af2a120
--- /dev/null
+++ b/tests/unit/Plugin.spec.js
@@ -0,0 +1,38 @@
+// import Vue from 'vue'
+import CoreuiVueModule from '@coreui/vue'
+// Vue.use(CoreuiVueModule)
+
+test("Should register all components when installed", () => {
+
+ const component = jest.fn();
+ const Vue = { component };
+
+ CoreuiVueModule.install(Vue);
+
+ // Test if a particular component was registered
+ expect(component).toBeCalledWith("Aside", expect.any(Object));
+ expect(component).toBeCalledWith("AsideToggler", expect.any(Object));
+ expect(component).toBeCalledWith("Breadcrumb", expect.any(Object));
+ expect(component).toBeCalledWith("Callout", expect.any(Object));
+ expect(component).toBeCalledWith("Footer", expect.any(Object));
+ expect(component).toBeCalledWith("Header", expect.any(Object));
+ expect(component).toBeCalledWith("HeaderDropdown", expect.any(Object));
+ expect(component).toBeCalledWith("Sidebar", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarFooter", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarForm", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarHeader", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarMinimizer", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNav", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNavDivider", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNavItem", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNavDropdown", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNavLabel", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNavLink", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarNavTitle", expect.any(Object));
+ expect(component).toBeCalledWith("SidebarToggler", expect.any(Object));
+ expect(component).toBeCalledWith("Switch", expect.any(Object));
+
+ // Test how many times component got registered
+ // const totalOfComponents = 21;
+ // expect(component).toHaveBeenCalledTimes(totalOfComponents);
+});
diff --git a/tests/unit/widgets/Widget01.spec.js b/tests/unit/widgets/Widget01.spec.js
deleted file mode 100644
index a7033491..00000000
--- a/tests/unit/widgets/Widget01.spec.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget01'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget01'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('has a created hook', () => {
- expect(typeof Component.data).toMatch('function')
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
- it('correctly sets default props and data when created', () => {
- const vm = new Vue(Component).$mount()
- expect(vm.backgroundColor).toBe('')
- expect(vm.styleClasses).toBe('')
- expect(vm.header).toBe('header:string')
- expect(vm.text).toBe('text:string')
- expect(vm.variant).toBe('')
- expect(vm.footer).toBe('footer:string')
- expect(vm.value == 25).toBe(true)
- })
- it('correctly sets variant when background is not white', () => {
- const Constructor = Vue.extend(Component)
- const vm = new Constructor({ propsData: {variant : 'background-success'}}).$mount()
- expect(vm.backgroundColor).toBe('success')
- expect(vm.styleClasses).toBe('text-white bg-success')
- })
-})
diff --git a/tests/unit/widgets/Widget02.spec.js b/tests/unit/widgets/Widget02.spec.js
deleted file mode 100644
index 39874048..00000000
--- a/tests/unit/widgets/Widget02.spec.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget02'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget02'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
- it('correctly sets default props when created', () => {
- const vm = new Vue(Component).$mount()
- expect(vm.header).toBe('header:string')
- expect(vm.text).toBe('text:string')
- expect(vm.link).toBe('#')
- expect(vm.iconClasses).toBe('fa fa-cogs bg-primary')
- expect(vm.showLink).toBe(false)
- })
-})
diff --git a/tests/unit/widgets/Widget03.spec.js b/tests/unit/widgets/Widget03.spec.js
deleted file mode 100644
index 6f79ca39..00000000
--- a/tests/unit/widgets/Widget03.spec.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget03'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget03'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
- it('correctly sets default props when created', () => {
- const vm = new Vue(Component).$mount()
- expect(vm.header).toBe('header:string')
- expect(vm.text).toBe('text:string')
- expect(vm.iconClasses).toBe('fa fa-cogs bg-primary')
- })
-})
diff --git a/tests/unit/widgets/Widget04.spec.js b/tests/unit/widgets/Widget04.spec.js
deleted file mode 100644
index 03abe542..00000000
--- a/tests/unit/widgets/Widget04.spec.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget04'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget04'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
- it('correctly sets default props and data when created', () => {
- expect(wrapper.props().rightHeader).toBe('rightHeader:string')
- expect(wrapper.props().rightFooter).toBe('rightFooter:string')
- expect(wrapper.props().leftHeader).toBe('leftHeader:string')
- expect(wrapper.props().leftFooter).toBe('leftFooter:string')
- })
-})
diff --git a/tests/unit/widgets/Widget05.spec.js b/tests/unit/widgets/Widget05.spec.js
deleted file mode 100644
index 3d163d9b..00000000
--- a/tests/unit/widgets/Widget05.spec.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget05'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget05'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
- it('has a created hook', () => {
- expect(typeof Component.data).toMatch('function')
- })
- it('correctly sets default props and data when created', () => {
- const vm = new Vue(Component).$mount()
- expect(vm.backgroundColor).toBe('')
- expect(vm.styleClasses).toBe('')
- expect(vm.header).toBe('header:string')
- expect(vm.text).toBe('text:string')
- expect(vm.variant).toBe('')
- expect(vm.value == 25).toBe(true)
- })
- it('correctly sets variant when background is not white', () => {
- const Constructor = Vue.extend(Component)
- const vm = new Constructor({ propsData: {variant : 'background-success'}}).$mount()
- expect(vm.backgroundColor).toBe('success')
- expect(vm.styleClasses).toBe('text-white bg-success')
- })
-})
diff --git a/tests/unit/widgets/Widget06.spec.js b/tests/unit/widgets/Widget06.spec.js
deleted file mode 100644
index 52d6b03a..00000000
--- a/tests/unit/widgets/Widget06.spec.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget06'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget06'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
- it('correctly sets default props and data when created', () => {
- expect(wrapper.props().cardClasses).toBe('')
- expect(wrapper.props().header).toBe('header:string')
- expect(wrapper.props().text).toBe('text:string')
- })
-})
diff --git a/tests/unit/widgets/Widget07.spec.js b/tests/unit/widgets/Widget07.spec.js
deleted file mode 100644
index d430d0c6..00000000
--- a/tests/unit/widgets/Widget07.spec.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget07'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget07'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
-})
diff --git a/tests/unit/widgets/Widget08.spec.js b/tests/unit/widgets/Widget08.spec.js
deleted file mode 100644
index 4796706a..00000000
--- a/tests/unit/widgets/Widget08.spec.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import Vue from 'vue'
-import { shallowMount } from '@vue/test-utils'
-import BootstrapVue from 'bootstrap-vue'
-import Component from '@/views/widgets/Widget08'
-
-Vue.use(BootstrapVue)
-
-const ComponentName = 'Widget08'
-const wrapper = shallowMount(Component)
-
-describe(ComponentName + '.vue', () => {
- it('has a name', () => {
- expect(Component.name).toMatch(ComponentName)
- })
- it('is Vue instance', () => {
- expect(wrapper.isVueInstance()).toBe(true)
- })
-})