Skip to content

Commit 781c6e8

Browse files
authored
Merge pull request #181 from quasarframework/feat/vitev2-webpackv4
2 parents 23ffeaa + c74e8c4 commit 781c6e8

File tree

15 files changed

+9149
-8386
lines changed

15 files changed

+9149
-8386
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
> If you are looking for QIconPicker that works with Quasar v1/Vue v2, then look into the [qv1 branch](https://github.com/quasarframework/quasar-ui-qiconpicker/tree/qv1). Documentation can be found [here](https://quasarframework.github.io/quasar-ui-qiconpicker).
22
3-
QIconPicker (Vue v3 Plugin, UMD and Quasar v2 App Extension)
4-
===
3+
# QIconPicker (Vue v3 Plugin, UMD and Quasar v2 App Extension)
54

65
![](https://img.shields.io/npm/v/@quasar/quasar-ui-qiconpicker/next?label=@quasar/quasar-ui-qiconpicker)
76
![](https://img.shields.io/npm/v/@quasar/quasar-app-extension-qiconpicker/next?label=@quasar/quasar-app-extension-qiconpicker)
@@ -11,12 +10,14 @@ QIconPicker (Vue v3 Plugin, UMD and Quasar v2 App Extension)
1110
![QIconPicker](https://raw.githubusercontent.com/quasarframework/quasar-ui-qiconpicker/dev/demo/public/q-icon-picker.png)
1211

1312
# Structure
14-
* [/ui](ui) - standalone npm package (go here for more details)
15-
* [/app-extension](app-extension) - Quasar app extension
16-
* [/demo](https://github.com/quasarframework/quasar-ui-qiconpicker/tree/master/demo) - demo and examples
17-
* [Live Demo](https://qiconpicker.netlify.app/)
13+
14+
- [/ui](ui) - standalone npm package (go here for more details)
15+
- [/app-extension](app-extension) - Quasar app extension
16+
- [/docs](https://github.com/quasarframework/quasar-ui-qiconpicker/tree/main/docs) - demo and examples
17+
- [Live Demo](https://qiconpicker.netlify.app/)
1818

1919
# Demo Workflow
20+
2021
If you fork or download this project, make sure you have the Quasar CLI globally installed:
2122

2223
```
@@ -26,6 +27,7 @@ yarn global add @quasar/cli
2627
```
2728

2829
The workflow to build the demo, on a fresh project, is as follows:
30+
2931
```
3032
$ cd ui
3133
$ yarn
@@ -36,7 +38,9 @@ $ quasar dev
3638
```
3739

3840
# Donate
41+
3942
If you appreciate the work that went into this, please consider donating to [Quasar](https://donate.quasar.dev) or [Jeff](https://github.com/sponsors/hawkeye64).
4043

4144
# License
45+
4246
MIT (c) Jeff Galbraith <[email protected]>

app-extension/src/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
77
*/
88

9-
function extendConf (conf, api) {
9+
function extendConf(conf, api) {
1010
// register our boot file
1111
conf.boot.push('~@quasar/quasar-app-extension-qiconpicker/src/boot/register.js')
1212

@@ -27,11 +27,10 @@ module.exports = function (api) {
2727
api.compatibleWith('quasar', '^2.0.0')
2828

2929
if (api.hasVite === true) {
30-
api.compatibleWith('@quasar/app-vite', '^1.0.0-alpha.0')
31-
}
32-
else {
30+
api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0 || ^2.0.0-alpha.1')
31+
} else {
3332
// should be "@quasar/app-webpack" but that is not backward compatible
34-
api.compatibleWith('@quasar/app', '^3.0.0')
33+
api.compatibleWith('@quasar/app', '^3.0.0 || ^4.0.0 || ^4.0.0-alpha.1')
3534
}
3635

3736
api.compatibleWith('@quasar/extras', '^1.10.0') // needed for latest font and svg support

docs/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,43 @@
2323
"dev:electron": "quasar dev -m electron"
2424
},
2525
"dependencies": {
26-
"@quasar/extras": "^1.13.4",
26+
"@quasar/extras": "^1.16.4",
2727
"@quasar/quasar-ui-qiconpicker": "./ui",
28-
"core-js": "^3.21.1",
29-
"quasar": "^2.6.2",
28+
"core-js": "^3.30.2",
29+
"quasar": "^2.12.0",
3030
"quasar-ui-example-viewer": "^2.0.0-alpha.9",
3131
"quasar-ui-json-api-viewer": "^2.0.0-alpha.6",
32-
"vue": "^3.2.31",
33-
"vue-router": "^4.0.14"
32+
"vue": "^3.3.4",
33+
"vue-router": "^4.2.2"
3434
},
3535
"devDependencies": {
36-
"@babel/core": "^7.17.8",
37-
"@babel/eslint-parser": "^7.17.0",
36+
"@babel/core": "^7.22.1",
37+
"@babel/eslint-parser": "^7.21.8",
3838
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
39-
"@babel/preset-env": "^7.16.11",
39+
"@babel/preset-env": "^7.22.4",
4040
"@quasar/app": "^3.3.3",
41-
"babel-loader": "8.2.4",
42-
"eslint": "^8.12.0",
43-
"eslint-config-standard": "^16.0.3",
44-
"eslint-plugin-import": "^2.25.4",
41+
"babel-loader": "9.1.2",
42+
"eslint": "^8.41.0",
43+
"eslint-config-standard": "^17.1.0",
44+
"eslint-plugin-import": "^2.27.5",
4545
"eslint-plugin-node": "^11.1.0",
46-
"eslint-plugin-promise": "^6.0.0",
47-
"eslint-plugin-vue": "^8.5.0",
48-
"eslint-webpack-plugin": "^3.1.1",
46+
"eslint-plugin-promise": "^6.1.1",
47+
"eslint-plugin-vue": "^9.14.1",
48+
"eslint-webpack-plugin": "^4.0.1",
4949
"gray-matter": "^4.0.3",
50-
"markdown-it": "^12.3.2",
50+
"markdown-it": "^13.0.1",
5151
"markdown-it-abbr": "^1.0.4",
5252
"markdown-it-container": "^3.0.0",
5353
"markdown-it-deflist": "^2.1.0",
54-
"markdown-it-emoji": "^2.0.0",
54+
"markdown-it-emoji": "^2.0.2",
5555
"markdown-it-footnote": "^3.0.3",
5656
"markdown-it-imsize": "^2.0.1",
5757
"markdown-it-ins": "^3.0.1",
5858
"markdown-it-mark": "^3.0.1",
5959
"markdown-it-sub": "^1.0.0",
6060
"markdown-it-sup": "^1.0.0",
6161
"markdown-it-task-lists": "^2.1.1",
62-
"prismjs": "^1.27.0",
62+
"prismjs": "^1.29.0",
6363
"raw-loader": "^4.0.2",
6464
"toml": "^3.0.0",
6565
"ware-loader": "^0.2.4"

docs/src/examples/UsingQInput.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
v-model:model-pagination="data.pagination"
1818
icon-set="material-icons"
1919
tooltips
20-
style="height: 300px; width: 300px; background-color: white;"
20+
class="pop-up"
2121
/>
2222
</q-popup-proxy>
2323
</q-icon>
@@ -33,9 +33,11 @@ import { QIconPicker } from '@quasar/quasar-ui-qiconpicker/src/index'
3333
import '@quasar/quasar-ui-qiconpicker/src/index.sass'
3434
3535
export default defineComponent({
36+
3637
components: {
3738
QIconPicker
3839
},
40+
3941
setup() {
4042
const data = ref({
4143
value: '',
@@ -46,15 +48,20 @@ export default defineComponent({
4648
}
4749
})
4850
49-
watch(()=> data.value.value, () => {
51+
watch(() => data.value.value, () => {
5052
data.value.showIconPicker = false
5153
})
5254
5355
return {
5456
data
5557
}
56-
57-
5858
}
5959
})
6060
</script>
61+
62+
<style scoped>
63+
.pop-up {
64+
height: 300px;
65+
width: 300px;
66+
}
67+
</style>

docs/src/examples/UsingQInputWithFilter.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
:filter="data.filter"
3131
icon-set="material-icons"
3232
tooltips
33-
style="height: 300px; width: 300px; background-color: white;"
33+
style="height: 300px; width: 300px;"
3434
/>
3535
</q-popup-proxy>
3636
</q-icon>
@@ -46,9 +46,11 @@ import { QIconPicker } from '@quasar/quasar-ui-qiconpicker/src/index'
4646
import '@quasar/quasar-ui-qiconpicker/src/index.sass'
4747
4848
export default defineComponent({
49+
4950
components: {
5051
QIconPicker
5152
},
53+
5254
setup() {
5355
const data = ref({
5456
value: '',
@@ -67,8 +69,6 @@ export default defineComponent({
6769
return {
6870
data
6971
}
70-
71-
7272
}
7373
})
7474
</script>

ui/build/icons/build.material-icons-base.js

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const path = require('path')
2-
const { green, blue, red } = require('kolorist')
3-
const { readFile, writeFile } = require('../utils')
2+
const {green, blue, red} = require('kolorist')
3+
const {readFile, writeFile} = require('../utils')
44

55
const themeMap = {
66
baseline: '',
@@ -9,14 +9,26 @@ const themeMap = {
99
sharp: 's_'
1010
}
1111

12-
function run (googleIcons, theme) {
12+
function run(googleIcons, theme) {
1313
const name = 'material-icons' + (theme === 'baseline' ? '' : '-' + theme)
1414
// console.log(`${blue('[building]')} ${name}...`)
1515
const inputLocation = `../../src/components/icon-set/${name}.js`
1616
const outputLocation = `../../src/components/icon-set/${name}.js`
1717
const oldIcons = {}
1818
const icons = []
1919
const blacklisted = [
20+
'grade',
21+
'grading',
22+
'dynamic_feed',
23+
'o_dynamic_feed',
24+
'r_dynamic_feed',
25+
's_dynamic_feed',
26+
's_grade',
27+
's_grading',
28+
'r_grade',
29+
'r_grading',
30+
'o_grade',
31+
'o_grading'
2032
]
2133
const whiteListed = {
2234
baseline: [
@@ -74,15 +86,15 @@ function run (googleIcons, theme) {
7486
fa.forEach(f => {
7587
const name = f.name
7688
const tags = f.tags
77-
oldIcons[name] = { tags: Array(tags).join(',') }
89+
oldIcons[name] = {tags: Array(tags).join(',')}
7890
})
7991

8092
googleIcons.forEach(gi => {
8193
gi.name = themeMap[theme] + gi.name
8294
})
8395

8496
whiteListed[theme].forEach(name => {
85-
googleIcons.push({ name: themeMap[theme] + name })
97+
googleIcons.push({name: themeMap[theme] + name})
8698
})
8799

88100
googleIcons.sort((a, b) => {
@@ -94,14 +106,22 @@ function run (googleIcons, theme) {
94106
const name = gi.name
95107
if (blacklisted.includes(name) === false) {
96108
if (oldIcons[name]) {
97-
const tags = oldIcons[name].tags.split(',').map(tag => {
98-
if (tag === '') return tag
99-
return "'" + tag + "'"
100-
}).join(', ')
101-
icons.push(`{ name: '${name}', tags: [${tags}] }`)
102-
}
103-
else {
104-
icons.push(`{ name: '${name}', tags: [] }`)
109+
110+
const oldTags = oldIcons[name].tags
111+
.split(',')
112+
113+
// Merge old and new tags
114+
const tagsWithoutDuplicates = [...new Set(oldTags.concat(gi.tags))];
115+
const newTags = tagsWithoutDuplicates
116+
.filter(tag => tag !== "")
117+
.map(tag => "'" + tag + "'")
118+
.join(', ')
119+
120+
// Add merged tags old/new
121+
icons.push(`{ name: '${name}', tags: [${newTags}] }`)
122+
} else {
123+
// Add new tags
124+
icons.push(`{ name: '${name}', tags: [${gi.tags}] }`)
105125
}
106126
}
107127
})
@@ -127,6 +147,7 @@ function run (googleIcons, theme) {
127147
output += '}\n'
128148

129149
writeFile(path.resolve(__dirname, outputLocation), output)
150+
.catch(exception => console.error(exception))
130151
console.log(`${blue('[icon]')} ${green(name + ':')} ${icons.length} generated`)
131152
}
132153

ui/package.json

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"icons:themify": "node build/icons/build.themify.js",
3636
"icons:bootstrap-icons": "node build/icons/build.bootstrap-icons.js",
3737
"icons:fontawesome": "node build/icons/build.fontawesome.js",
38+
"icons:material": "node build/icons/build.google.material-icons.js",
3839
"icons:all": "node build/icons/build.all.js"
3940
},
4041
"funding": {
@@ -62,41 +63,41 @@
6263
"attributes": "dist/vetur/attributes.json"
6364
},
6465
"devDependencies": {
65-
"@babel/core": "^7.17.8",
66-
"@babel/eslint-parser": "^7.17.0",
66+
"@babel/core": "^7.22.1",
67+
"@babel/eslint-parser": "^7.21.8",
6768
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
68-
"@babel/preset-env": "^7.16.11",
69-
"@quasar/extras": "^1.13.4",
70-
"@rollup/plugin-buble": "^0.21.3",
71-
"@rollup/plugin-json": "^4.1.0",
72-
"@rollup/plugin-node-resolve": "^13.1.3",
73-
"@rollup/plugin-replace": "^4.0.0",
74-
"@types/node": "^17.0.23",
75-
"@typescript-eslint/eslint-plugin": "^5.17.0",
76-
"@typescript-eslint/parser": "^5.17.0",
77-
"autoprefixer": "^10.4.4",
78-
"cross-fetch": "^3.1.5",
79-
"cssnano": "^5.1.5",
80-
"eslint": "^8.12.0",
81-
"eslint-config-standard": "^16.0.3",
82-
"eslint-plugin-import": "^2.25.4",
83-
"eslint-plugin-jsdoc": "^38.1.3",
69+
"@babel/preset-env": "^7.22.4",
70+
"@quasar/extras": "^1.16.4",
71+
"@rollup/plugin-buble": "^1.0.2",
72+
"@rollup/plugin-json": "^6.0.0",
73+
"@rollup/plugin-node-resolve": "^15.0.2",
74+
"@rollup/plugin-replace": "^5.0.2",
75+
"@types/node": "^20.2.5",
76+
"@typescript-eslint/eslint-plugin": "^5.59.8",
77+
"@typescript-eslint/parser": "^5.59.8",
78+
"autoprefixer": "^10.4.14",
79+
"cross-fetch": "^3.1.6",
80+
"cssnano": "^6.0.1",
81+
"eslint": "^8.41.0",
82+
"eslint-config-standard": "^17.1.0",
83+
"eslint-plugin-import": "^2.27.5",
84+
"eslint-plugin-jsdoc": "^45.0.0",
8485
"eslint-plugin-node": "^11.1.0",
85-
"eslint-plugin-promise": "^6.0.0",
86+
"eslint-plugin-promise": "^6.1.1",
8687
"eslint-plugin-quasar": "^1.1.0",
87-
"eslint-plugin-vue": "^8.5.0",
88-
"eslint-webpack-plugin": "^3.1.1",
89-
"fs-extra": "^10.0.1",
90-
"kolorist": "^1.5.1",
91-
"open": "^8.4.0",
92-
"postcss": "^8.4.12",
93-
"quasar": "^2.6.2",
88+
"eslint-plugin-vue": "^9.14.1",
89+
"eslint-webpack-plugin": "^4.0.1",
90+
"fs-extra": "^11.1.1",
91+
"kolorist": "^1.8.0",
92+
"open": "^9.1.0",
93+
"postcss": "^8.4.24",
94+
"quasar": "^2.12.0",
9495
"quasar-json-api": "^2.0.0-alpha.3",
95-
"rimraf": "^3.0.2",
96-
"rollup": "^2.70.1",
97-
"rtlcss": "^3.5.0",
98-
"sass": "^1.49.9",
99-
"uglify-js": "^3.15.3",
96+
"rimraf": "^5.0.1",
97+
"rollup": "^3.23.0",
98+
"rtlcss": "^4.1.0",
99+
"sass": "^1.62.1",
100+
"uglify-js": "^3.17.4",
100101
"zlib": "^1.0.5"
101102
},
102103
"browserslist": [

0 commit comments

Comments
 (0)