Skip to content

Commit 55b6abc

Browse files
committed
Updated dependencies and replaced vue-strap with uiv
1 parent 594a2ae commit 55b6abc

19 files changed

+2608
-3585
lines changed

.babelrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"presets": [
3-
["env", {
3+
["@babel/preset-env", {
44
"modules": false,
55
"targets": {
66
"browsers": ["last 2 major versions", "not ie <= 10"]
77
}
88
}]
99
],
1010
"plugins": [
11-
"transform-regenerator",
12-
"transform-runtime",
13-
"syntax-async-functions",
14-
"transform-es2015-destructuring",
15-
"transform-object-rest-spread"
11+
"@babel/plugin-transform-regenerator",
12+
"@babel/plugin-transform-runtime",
13+
"@babel/plugin-transform-async-to-generator",
14+
"@babel/plugin-transform-destructuring",
15+
"@babel/plugin-proposal-object-rest-spread"
1616
]
1717
}

CHANGELOG.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [0.0.16]
4+
## [0.0.17] - 2018-10-19
5+
### Added
6+
- Added `pf-dropdown` component with is a very small functional wrapper around uiv's dropdown, to provide DRYer dropdown for the most common usage pattern.
7+
8+
### Changed
9+
- **BACKWARD INCOMPATIBLE CHANGE**: Removed vue-strap, which is unmantained and deprecated and replace it with uiv.
10+
- **BACKWARD INCOMPATIBLE CHANGE**: Bootstrap components are now registered without the `bs-` prefix to stay consistent with uiv's own documentation.
11+
12+
## [0.0.16] - 2018-04-13
513
### Fixed
614
- Fixed flex layout.
715

8-
## [0.0.15]
16+
## [0.0.15] - 2018-04-13
917
### Fixed
1018
- Prevent custom layout distruption when not `pf-layout` is disabled.
1119
- Removed bottom padding on `pf-table`.
1220

13-
## [0.0.14]
21+
## [0.0.14] - 2018-04-13
1422
### Added
1523
- Implemented `pf-menu-item` as a functional component with vue-router integration.
1624
- Implemented secondary and tertiary vertical navigation.
@@ -33,7 +41,7 @@ All notable changes to this project will be documented in this file.
3341
- Fixed href property of `pf-launcher-item`s.
3442
- Fixed various linting errors/warnings.
3543

36-
## [0.0.13]
44+
## [0.0.13] - 2017-09-11
3745
### Added
3846
- Implemented `v-model` on the page property `pf-paginate-control` components.
3947
- Implemented two-way syncing of `sort-by` and `sort-direction` properties in `pf-table` and `pf-toolbar`.
@@ -166,7 +174,8 @@ disabled, as per PatternFly design guidelines.
166174
- `pf-toolbar` component
167175
- `pf-utilization-bar-chart` component
168176

169-
[Unreleased]: https://github.com/mtorromeo/vue-patternfly/compare/v0.0.16...HEAD
177+
[Unreleased]: https://github.com/mtorromeo/vue-patternfly/compare/v0.0.17...HEAD
178+
[0.0.17]: https://github.com/mtorromeo/vue-patternfly/compare/v0.0.16...v0.0.17
170179
[0.0.16]: https://github.com/mtorromeo/vue-patternfly/compare/v0.0.15...v0.0.16
171180
[0.0.15]: https://github.com/mtorromeo/vue-patternfly/compare/v0.0.14...v0.0.15
172181
[0.0.14]: https://github.com/mtorromeo/vue-patternfly/compare/v0.0.13...v0.0.14

package.json

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-patternfly",
3-
"version": "0.0.16",
3+
"version": "0.0.17",
44
"description": "PatternFly components for Vue.js 2",
55
"main": "dist/vue-patternfly.min.js",
66
"directories": {
@@ -11,7 +11,7 @@
1111
"compile": "webpack --mode production --progress && mv dist/vue-patternfly.js dist/vue-patternfly.min.js && webpack --mode development --progress",
1212
"dev": "webpack --mode development -w --progress",
1313
"build": "npm run purge && npm run compile",
14-
"lint": "eslint src/*.js test/*",
14+
"lint": "eslint src/*.js",
1515
"prepublish": "npm run lint && npm run build"
1616
},
1717
"files": [
@@ -37,24 +37,26 @@
3737
},
3838
"dependencies": {
3939
"c3": "^0.4.11",
40+
"es6-promise": "^4.2.5",
4041
"patternfly": "^3.14.0",
4142
"tether-tooltip": "^1.2.0",
42-
"vue": "^2.5.13",
43-
"vue-strap": "yuche/vue-strap#v2"
43+
"uiv": "^0.27.0",
44+
"vue": "^2.5.13"
4445
},
4546
"devDependencies": {
46-
"babel-core": "^6.22.0",
47-
"babel-eslint": "^8.0.1",
48-
"babel-loader": "^7.1.2",
49-
"babel-plugin-external-helpers": "^6.22.0",
50-
"babel-plugin-syntax-async-functions": "^6.13.0",
51-
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
52-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
53-
"babel-plugin-transform-regenerator": "^6.26.0",
54-
"babel-plugin-transform-runtime": "^6.22.0",
55-
"babel-preset-env": "^1.6.1",
56-
"css-loader": "^0.28.0",
57-
"eslint": "^4.6.1",
47+
"@babel/core": "^7.1.2",
48+
"@babel/plugin-external-helpers": "^7.0.0",
49+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
50+
"@babel/plugin-transform-async-to-generator": "^7.1.0",
51+
"@babel/plugin-transform-destructuring": "^7.1.3",
52+
"@babel/plugin-transform-regenerator": "^7.0.0",
53+
"@babel/plugin-transform-runtime": "^7.1.0",
54+
"@babel/preset-env": "^7.1.0",
55+
"@babel/runtime": "^7.1.2",
56+
"babel-eslint": "^10.0.1",
57+
"babel-loader": "^8.0.4",
58+
"css-loader": "^1.0.0",
59+
"eslint": "^5.7.0",
5860
"eslint-friendly-formatter": "^4.0.0",
5961
"eslint-loader": "^2.0.0",
6062
"eslint-plugin-import": "^2.2.0",
@@ -66,12 +68,12 @@
6668
"mini-css-extract-plugin": "^0.4.0",
6769
"portal-vue": "^1.3.0",
6870
"resize-observer-polyfill": "^1.5.0",
69-
"style-loader": "^0.20.3",
71+
"style-loader": "^0.23.1",
7072
"vue-functional-data-merge": "^2.0.6",
71-
"vue-loader": "^14.2.2",
73+
"vue-loader": "^15.4.2",
7274
"vue-portal": "^1.0.0",
7375
"vue-template-compiler": "^2.5.13",
7476
"webpack": "^4.5.0",
75-
"webpack-cli": "^2.0.14"
77+
"webpack-cli": "^3.1.2"
7678
}
7779
}

postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

src/components/C3Chart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<script>
1313
import c3 from 'c3';
14-
const patternfly = require('imports-loader?patternfly=>{}!exports-loader?patternfly!patternfly/dist/js/patternfly-settings-colors.js');
14+
const patternfly = require('imports-loader?window=>{patternfly:{}}!exports-loader?window.patternfly!patternfly/dist/js/patternfly-settings-colors.js');
1515
const palette = [
1616
patternfly.pfPaletteColors.red,
1717
patternfly.pfPaletteColors.blue,

src/components/Card.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="card-pf" :class="{'card-pf-accented': accented}">
33
<div v-if="showHeader" :class="{'card-pf-heading': showTitlesSeparator, 'card-pf-heading-no-bottom': !showTitlesSeparator}">
4-
<dropdown v-if="showFilterInHeader" class="card-pf-time-frame-filter pull-right" :text="currentFilter.label">
4+
<pf-dropdown v-if="showFilterInHeader" class="card-pf-time-frame-filter pull-right" :text="currentFilter.label">
55
<li
66
v-for="(item, i) in filter.filters"
77
:key="i"
@@ -11,7 +11,7 @@
1111
{{item.label}}
1212
</a>
1313
</li>
14-
</dropdown>
14+
</pf-dropdown>
1515
<h2 class="card-pf-title">{{title}}</h2>
1616
</div>
1717

@@ -22,7 +22,7 @@
2222
</div>
2323

2424
<div v-if="showFooter || showFilterInFooter" class="card-pf-footer">
25-
<dropdown v-if="showFilterInFooter" class="card-pf-time-frame-filter pull-right" :text="currentFilter.label">
25+
<pf-dropdown v-if="showFilterInFooter" class="card-pf-time-frame-filter pull-right" :text="currentFilter.label">
2626
<li
2727
v-for="(item, i) in filter.filters"
2828
:key="i"
@@ -32,7 +32,7 @@
3232
{{item.label}}
3333
</a>
3434
</li>
35-
</dropdown>
35+
</pf-dropdown>
3636
<p v-if="showFooter">
3737
<a v-if="footHref" :href="footHref" :class="{'card-pf-link-with-icon': footIcon, 'card-pf-link': !footIcon}">
3838
<pf-icon v-if="footIcon" :name="footIcon" class="cart-pf-footer-text"/>
@@ -48,13 +48,13 @@
4848
</template>
4949

5050
<script>
51-
import VueStrap from '../vue-strap';
51+
import PfDropdown from './Dropdown.vue';
5252
5353
export default {
5454
name: 'pf-card',
5555
5656
components: {
57-
dropdown: VueStrap.dropdown,
57+
PfDropdown,
5858
},
5959
6060
props: {

src/components/ColumnPicker.vue

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
<template>
2-
<bs-popover class="column-picker" effect="fade" placement="bottom">
3-
<button type="button" class="btn btn-link">
2+
<popover class="column-picker" placement="bottom">
3+
<button ref="popover-trigger" type="button" class="btn btn-link">
44
<pf-icon name="fa-columns"/>
55
</button>
66

7-
<div
8-
slot="content"
9-
v-for="(column, i) in columns"
10-
:key="i"
11-
class="checkbox"
12-
@click.stop
13-
>
14-
<label>
15-
<input type="checkbox" :value="columnValue(column, i)" v-model="iValue" @change="setValue">
16-
{{column}}
17-
</label>
18-
</div>
19-
</bs-popover>
7+
<template slot="popover">
8+
<div class="column-picker checkbox" v-for="(column, i) in columns" :key="i">
9+
<label>
10+
<input type="checkbox" :value="columnValue(column, i)" v-model="iValue" @change="setValue">
11+
{{column}}
12+
</label>
13+
</div>
14+
</template>
15+
</popover>
2016
</template>
2117

2218
<script>
23-
import VueStrap from '../vue-strap';
19+
import {Popover} from 'uiv';
2420
2521
export default {
2622
name: 'pf-column-picker',
2723
2824
components: {
29-
BsPopover: VueStrap.popover,
25+
Popover,
3026
},
3127
3228
props: {
@@ -81,7 +77,7 @@ export default {
8177
</script>
8278

8379
<style>
84-
.column-picker .popover-content .checkbox {
80+
.column-picker.checkbox {
8581
margin: 0;
8682
}
8783
</style>

src/components/DrawerNotification.vue

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,25 @@
33
class="drawer-pf-notification"
44
:class="{unread, 'expanded-notification': $parent.$parent.expanded}"
55
>
6-
<bs-dropdown v-if="showDropdown" class="pull-right dropdown-kebab-pf" type="link">
7-
<slot name="dropdown" :actions="actions">
8-
<li
9-
v-for="action in actions"
10-
:key="action.name"
11-
:role="isSeparator(action) ? 'separator' : 'menuitem'"
12-
:class="{
13-
divider: isSeparator(action),
14-
disabled: action.disabled === true,
15-
}"
6+
<pf-dropdown v-if="showDropdown" class="pull-right dropdown-kebab-pf" type="link">
7+
<li
8+
v-for="action in actions"
9+
:key="action.name"
10+
:role="isSeparator(action) ? 'separator' : 'menuitem'"
11+
:class="{
12+
divider: isSeparator(action),
13+
disabled: action.disabled === true,
14+
}"
15+
>
16+
<a v-if="!isSeparator(action)"
17+
class="secondary-action"
18+
:title="action.title"
19+
@click="triggered(action)"
1620
>
17-
<a v-if="!isSeparator(action)"
18-
class="secondary-action"
19-
:title="action.title"
20-
@click="triggered(action)"
21-
>
22-
{{action.name}}
23-
</a>
24-
</li>
25-
</slot>
26-
</bs-dropdown>
21+
{{action.name}}
22+
</a>
23+
</li>
24+
</pf-dropdown>
2725

2826
<button
2927
type="button"
@@ -50,13 +48,13 @@
5048
</template>
5149

5250
<script>
53-
import VueStrap from '../vue-strap';
51+
import PfDropdown from './Dropdown.vue';
5452
5553
export default {
5654
name: 'pf-drawer-notification',
5755
5856
components: {
59-
BsDropdown: VueStrap.dropdown,
57+
PfDropdown,
6058
},
6159
6260
props: {

src/components/Dropdown.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<template functional>
2+
<dropdown v-bind="data.attrs" v-on="listeners" :class="[data.staticClass]">
3+
<button role="button" aria-haspopup="true" type="button" class="btn dropdown-toggle" :class="[props.type ? `btn-${props.type}` : '', props.btnClass]">
4+
<slot name="text">
5+
<span class="dropdown-title">{{props.text}}</span>
6+
</slot> <span class="caret"></span>
7+
</button>
8+
<template slot="dropdown">
9+
<slot/>
10+
</template>
11+
</dropdown>
12+
</template>
13+
14+
<script>
15+
import {Dropdown} from 'uiv';
16+
17+
export default {
18+
name: 'pf-dropdown',
19+
20+
components: {
21+
Dropdown,
22+
},
23+
24+
props: {
25+
text: String,
26+
type: {
27+
type: String,
28+
default: 'default',
29+
},
30+
btnClass: String,
31+
},
32+
};
33+
</script>

src/components/FilterFields.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
22
<div class="filter-pf filter-fields form-group toolbar-pf-filter">
33
<div class="input-group">
4-
<bs-dropdown :text="current.label" class="input-group-btn">
4+
<pf-dropdown :text="current.label" class="input-group-btn">
55
<li v-for="(item, name) in normFields" :key="name">
66
<a class="filter-field" role="menuitem" tabindex="-1" @click="selected = name">
77
{{item.label}}
88
</a>
99
</li>
10-
</bs-dropdown>
10+
</pf-dropdown>
1111
<pf-select close-on-select class="filter-select" v-if="isSelect" :placeholder="current.placeholder">
1212
<pf-option :checked-value="item" v-for="(item, i) in current.values" :key="i" @input="set">{{item}}</pf-option>
1313
</pf-select>
@@ -28,13 +28,13 @@
2828
<script>
2929
import PfSelect from './Select.vue';
3030
import PfOption from './Option.vue';
31-
import VueStrap from '../vue-strap';
31+
import PfDropdown from './Dropdown.vue';
3232
3333
export default {
3434
name: 'pf-filter-fields',
3535
3636
components: {
37-
BsDropdown: VueStrap.dropdown,
37+
PfDropdown,
3838
PfSelect,
3939
PfOption,
4040
},

0 commit comments

Comments
 (0)