@quasar/quasar-app-extension-qactivity 1.0.0-beta.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- MIT License
1
+ The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Quasar Framework
3
+ Copyright (c) Jeff Galbraith <jeff@quasar.dev>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,128 +1,23 @@
1
- QActivity (@quasar/qactivity)
2
- ===
1
+ # Quasar App Extension QActivity
3
2
 
4
- ![official icon](https://img.shields.io/badge/Quasar%201.0-Official%20UI%20App%20Extension-blue.svg)
5
- ![npm (scoped)](https://img.shields.io/npm/v/@quasar/quasar-app-extension-qactivity.svg?style=plastic)
6
- [![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/quasarframework/app-extension-qactivity.svg)]()
7
- [![GitHub repo size in bytes](https://img.shields.io/github/repo-size/quasarframework/app-extension-qactivity.svg)]()
8
- [![npm](https://img.shields.io/npm/dt/@quasar/quasar-app-extension-qactivity.svg)](https://www.npmjs.com/package/@quasar/quasar-app-extension-qactivity)
9
-
10
- QActivity is an `UI App Extension` for [Quasar Framework v1](https://v1.quasar-framework.org/). It will not work with legacy versions of Quasar Framework.
11
-
12
- This work is currently in `beta` and there are expected changes while things get worked out. Your help with testing is greatly appreciated.
13
-
14
- # Info
15
- QActivity is the smaller sister to [QTimeline](https://v1.quasar-framework.org/vue-components/timeline) and can be used to create an activity list.
3
+ The QActivity app extension (@quasar/quasar-app-extension-qactivity) installs and manages the [QActivity UI](https://github.com/quasarframework/quasar-ui-qactivity/tree/main/ui) component.
16
4
 
17
- One of the most important actions is the ability to adjust the `QActivity` bar distance and the `QActivityItem` icon distance. This is needed when you adjust margins, padding or icon size to make everything line up properly. Therefore, when making an activity list, it is recommended to keep everything the same. If you do use different icon sizes, you will need to adjust the `icon-distance` property appropriately for each `QActivityItem`.
5
+ ![@quasar/quasar-app-extension-qactivity](https://img.shields.io/npm/v/@quasar/quasar-app-extension-qactivity?label=@quasar/quasar-app-extension-qactivity)
6
+ [![npm](https://img.shields.io/npm/dt/@quasar/quasar-app-extension-qactivity.svg)](https://www.npmjs.com/package/@quasar/quasar-app-extension-qactivity)
18
7
 
19
8
  # Install
20
- To add this App Extension to your Quasar application, run the following (in your Quasar app folder):
21
- ```
9
+ ```bash
22
10
  quasar ext add @quasar/qactivity
23
11
  ```
12
+ Quasar CLI will retrieve it from NPM and install the extension.
24
13
 
25
- # Describe
26
- You can use `quasar describe QActivity` or `quasar describe QActivityItem`
27
-
28
- # Test Project
29
- In **demo** folder of **app-extension-qactivity**.
30
-
31
- # Demo
32
- Can be found [here](https://quasarframework.github.io/app-extension-qactivity).
33
-
34
- # Example Code
35
- Be sure to check out the Test Project for more examples.
36
- ```
37
- <q-activity
38
- dense
39
- bar-color="red"
40
- bar-width="1px"
41
- bar-distance="15px"
42
- class="bg-blue-grey-1"
43
- >
44
- <q-activity-item
45
- icon="photo"
46
- icon-color="blue"
47
- icon-text-color="white"
48
- icon-size="1rem"
49
- icon-font-size="0.75rem"
50
- :icon-square="true"
51
- style="padding-bottom:5px;padding-top:5px;"
52
- >
53
- <q-parallax
54
- :height="100"
55
- src="https://cdn.quasar.dev/img/parallax2.jpg"
56
- />
57
- </q-activity-item>
58
- <q-activity-item
59
- icon="list"
60
- icon-color="orange-8"
61
- icon-text-color="white"
62
- icon-size="1rem"
63
- icon-font-size="0.75rem"
64
- :icon-square="true"
65
- class="bg-blue-grey-11"
66
- style="padding-bottom:5px;padding-top:5px;"
67
- >
68
- <q-item>
69
- <q-item-section>
70
- <q-item-label>QItem</q-item-label>
71
- <q-item-label caption lines="2">Secondary line text. Lorem ipsum dolor sit amet, consectetur adipiscit elit.</q-item-label>
72
- </q-item-section>
73
-
74
- <q-item-section side top>
75
- <q-item-label caption>5 min ago</q-item-label>
76
- <q-icon name="star" color="yellow" />
77
- </q-item-section>
78
- </q-item>
79
- </q-activity-item>
80
- <q-activity-item
81
- v-for="(item, index) in data1"
82
- :key="index"
83
- :icon="item.icon"
84
- :icon-color="item.iconColor"
85
- :icon-text-color="item.iconTextColor"
86
- :icon-size="item.iconSize"
87
- :icon-font-size="item.iconFontSize"
88
- :icon-square="item.iconSquare"
89
- :icon-image="item.iconImage"
90
- :class="{'bg-blue-grey-11': index % 2 }"
91
- >
92
- <div class="inline-block vertical-middle middle-text">
93
- {{ item.text }}
94
- </div>
95
- <div class="inline-block vertical-middle side-text">
96
- {{ item.time }}
97
- </div>
98
- </q-activity-item>
99
- </q-activity>
14
+ # Uninstall
15
+ ```bash
16
+ quasar ext remove @quasar/qactivity
100
17
  ```
101
18
 
102
- # QActivity Vue Properties
103
- | Vue&nbsp;Property | Type | Description |
104
- |---|---|---|
105
- | dense | Boolean | Dense mode; occupies less space |
106
- | bar-color | String | CSS color (no Quasar colors allowed here) |
107
- | bar-width | String | Size in CSS units, including unit name |
108
- | bar-distance | String | Size in CSS units, including unit name |
109
-
110
- QActivity has no events or methods. It has a single "default" slot. You can put anything into this slot, but QActivityItem is expected.
111
-
112
- # QActivityItem Vue Properties
113
- | Vue&nbsp;Property | Type | Description |
114
- |---|---|---|
115
- | icon | Boolean | Icon name following Quasar convention; make sure you have the icon library installed |
116
- | icon-color | String | Color name for icon from the Quasar Color Palette |
117
- | icon-text-color | String | Color name for icon text from the Quasar Color Palette |
118
- | icon-size | String | Size in CSS units, including unit name |
119
- | icon-font-size | String | Size in CSS units, including unit name |
120
- | icon-square | Boolean | Removes border-radius so borders are squared |
121
- | icon-rounded | Boolean | Applies a small standard border-radius for a squared shape of the component |
122
- | icon-image | String | Path to image to use. If used, do not also use `icon`, `icon-color`, `icon-text-color` or `icon-font-size` |
123
- | icon-distance | String | Size in CSS units, including unit name. Used to help center icons on the bar |
124
-
125
- QActivityItem has no events or methods. It has a single "default" slot. You can put anything into this slot.
126
-
127
19
  # Donate
128
- If you appreciate the work that went into this App Extension, please consider [donating to Quasar](https://donate.quasar.dev).
20
+ 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).
21
+
22
+ # License
23
+ MIT (c) Jeff Galbraith <jeff@quasar.dev>
package/jsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+
2
+ {
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "target": "es6"
6
+ },
7
+ "exclude": ["node_modules"],
8
+ "include": ["src/**/*"]
9
+ }
package/package.json CHANGED
@@ -1,45 +1,42 @@
1
1
  {
2
2
  "name": "@quasar/quasar-app-extension-qactivity",
3
- "version": "1.0.0-beta.5",
3
+ "version": "2.0.0",
4
4
  "description": "QActivity is an app extension for Quasar for making an activity list",
5
- "author": "Hawkeye64 <jeff@quasar-framework.org>",
5
+ "author": "Jeff Galbraith <jeff@quasar.dev>",
6
+ "license": "MIT",
6
7
  "main": "src/index.js",
7
8
  "scripts": {
8
9
  "lint": "eslint --ext .js,.vue src",
9
- "lint-fix": "eslint --ext .js,.vue src --fix",
10
- "build-demo": "cd ./demo && yarn build && cd .. && cp ./_redirects ./demo/dist/spa && rm -rf ./docs && cp -r ./demo/dist/spa/. ./docs",
11
- "test": "echo \"No test specified\" && exit 0"
10
+ "lint-fix": "eslint --ext .js,.vue src --fix"
12
11
  },
13
- "engines": {
14
- "node": ">= 8.9.0",
15
- "npm": ">= 5.6.0",
16
- "yarn": ">= 1.6.0"
12
+ "funding": {
13
+ "type": "github",
14
+ "url": "https://github.com/sponsors/hawkeye64"
17
15
  },
18
16
  "publishConfig": {
19
17
  "access": "public"
20
18
  },
21
- "bugs": "https://github.com/hawkeye64/app-extension-qactivity/issues",
19
+ "bugs": "https://github.com/quasarframework/quasar-ui-qactivity/issues",
22
20
  "repository": {
23
21
  "type": "git",
24
- "url": "git+https://github.com/hawkeye64/app-extension-qactivity.git"
22
+ "url": "git+https://github.com/quasarframework/quasar-ui-qactivity.git"
25
23
  },
26
- "homepage": "https://github.com/hawkeye64/app-extension-qactivity",
27
- "license": "MIT",
24
+ "homepage": "https://github.com/quasarframework/quasar-ui-qactivity",
28
25
  "keywords": [
29
26
  "quasar",
27
+ "quasarframework",
30
28
  "app",
31
29
  "app extension",
32
30
  "extension",
33
31
  "activity",
34
32
  "list"
35
33
  ],
36
- "devDependencies": {
37
- "@vue/eslint-config-standard": "^5.1.2",
38
- "babel-eslint": "^10.1.0",
39
- "eslint": "^7.2.0",
40
- "eslint-loader": "^4.0.2",
41
- "eslint-plugin-vue": "^6.2.2",
42
- "fs": "^0.0.2",
43
- "path": "^0.12.7"
34
+ "dependencies": {
35
+ "@quasar/quasar-ui-qactivity": "^2.0.0"
36
+ },
37
+ "engines": {
38
+ "node": ">= 10.0.0",
39
+ "npm": ">= 5.6.0",
40
+ "yarn": ">= 1.6.0"
44
41
  }
45
42
  }
@@ -0,0 +1,7 @@
1
+ import { boot } from 'quasar/wrappers'
2
+ import VuePlugin from '@quasar/quasar-ui-qactivity'
3
+
4
+ export default boot(({ app }) => {
5
+ app.use(VuePlugin)
6
+ })
7
+
package/src/index.js CHANGED
@@ -2,30 +2,33 @@
2
2
  * Quasar App Extension index/runner script
3
3
  * (runs on each dev/build)
4
4
  *
5
+ * Docs: https://quasar.dev/app-extensions/development-guide/index-api
5
6
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
6
7
  */
7
8
 
8
- const extendQuasarConf = function (conf) {
9
- // make sure qactivity boot file is registered
10
- conf.boot.push('~@quasar/quasar-app-extension-qactivity/src/boot/qactivity.js')
11
- console.log(` App Extension (qactivity) Info: 'Adding qactivity boot reference to your quasar.conf.js'`)
9
+ function extendConf (conf) {
10
+ // register our boot file
11
+ conf.boot.push('~@quasar/quasar-app-extension-qactivity/src/boot/register.js')
12
12
 
13
- // make sure boot file & component transpiles
13
+ // make sure app extension files & ui package gets transpiled
14
14
  conf.build.transpileDependencies.push(/quasar-app-extension-qactivity[\\/]src/)
15
+ conf.build.transpileDependencies.push(/quasar-ui-qactivity[\\/]src/)
15
16
 
16
- // make sure qactivity css goes through webpack to avoid ssr issues
17
- conf.css.push('~@quasar/quasar-app-extension-qactivity/src/component/activity.styl')
18
- console.log(` App Extension (qactivity) Info: 'Adding activity.styl css reference to your quasar.conf.js'`)
17
+ // make sure the stylesheet goes through webpack to avoid SSR issues
18
+ conf.css.push('~@quasar/quasar-ui-qactivity/src/index.sass')
19
19
  }
20
20
 
21
21
  module.exports = function (api) {
22
- // quasar compatibility check
23
- api.compatibleWith('@quasar/app', '^1.0.0 || ^2.0.0')
22
+ // Quasar compatibility check; you may need
23
+ // hard dependencies, as in a minimum version of the "quasar"
24
+ // package or a minimum version of "@quasar/app" CLI
25
+ api.compatibleWith('quasar', '^2.0.0')
26
+ api.compatibleWith('@quasar/app', '^3.0.0')
24
27
 
25
- // register JSON api
26
- api.registerDescribeApi('QActivity', './component/QActivity.json')
27
- api.registerDescribeApi('QActivityItem', './component/QActivityItem.json')
28
+ // Uncomment the line below if you provide a JSON API for your component
29
+ api.registerDescribeApi('QActivity', '~@quasar/quasar-ui-qactivity/dist/api/QActivity.json')
30
+ api.registerDescribeApi('QActivityItem', '~@quasar/quasar-ui-qactivity/dist/api/QActivityItem.json')
28
31
 
29
- // extend quasar.conf
30
- api.extendQuasarConf(extendQuasarConf)
32
+ // We extend /quasar.conf.js
33
+ api.extendQuasarConf(extendConf)
31
34
  }
@@ -1,7 +0,0 @@
1
- import QActivity from '@quasar/quasar-app-extension-qactivity/src/component/QActivity'
2
- import QActivityItem from '@quasar/quasar-app-extension-qactivity/src/component/QActivityItem'
3
-
4
- export default ({ Vue }) => {
5
- Vue.component('q-activity', QActivity)
6
- Vue.component('q-activity-item', QActivityItem)
7
- }
@@ -1,41 +0,0 @@
1
- import { slot } from 'quasar/src/utils/slot.js'
2
-
3
- export default {
4
- name: 'QActivity',
5
-
6
- props: {
7
- dense: Boolean,
8
- barColor: String,
9
- barWidth: String,
10
- barDistance: String
11
- },
12
-
13
- computed: {
14
-
15
- styles () {
16
- let style = {}
17
- if (this.barColor !== void 0) {
18
- style['--qactivity-bar-color'] = this.barColor
19
- }
20
- if (this.barWidth !== void 0) {
21
- style['--qactivity-bar-width'] = this.barWidth
22
- }
23
- if (this.barDistance !== void 0) {
24
- style['--qactivity-bar-distance'] = this.barDistance
25
- }
26
- return style
27
- },
28
-
29
- classes () {
30
- return `q-activity--${this.dense === true ? 'dense' : 'normal'}`
31
- }
32
- },
33
-
34
- render (h) {
35
- return h('ul', {
36
- staticClass: 'q-activity',
37
- class: this.classes,
38
- style: this.styles
39
- }, slot(this, 'default'))
40
- }
41
- }
@@ -1,29 +0,0 @@
1
- {
2
- "type": "component",
3
- "props": {
4
- "dense": {
5
- "type": "Boolean",
6
- "desc": "Dense mode; occupies less space"
7
- },
8
- "bar-color": {
9
- "type": "String",
10
- "desc": "CSS color (no Quasar colors allowed here)",
11
- "examples": [ "blue", "#0000FF" ]
12
- },
13
- "bar-width": {
14
- "type": "String",
15
- "desc": "Size in CSS units, including unit name",
16
- "examples": [ "2px" ]
17
- },
18
- "bar-distance": {
19
- "type": "String",
20
- "desc": "Size in CSS units, including unit name",
21
- "examples": [ "16px", "1rem" ]
22
- }
23
- },
24
- "slots": {
25
- "default": {
26
- "desc": "Anything can go into this slot, but a QActivityItem component is expected"
27
- }
28
- }
29
- }
@@ -1,75 +0,0 @@
1
- import { slot } from 'quasar/src/utils/slot.js'
2
-
3
- import { QAvatar } from 'quasar'
4
-
5
- export default {
6
- name: 'QActivityItem',
7
-
8
- props: {
9
- icon: String,
10
- iconColor: String,
11
- iconTextColor: String,
12
- iconSize: String,
13
- iconFontSize: String,
14
- iconSquare: Boolean,
15
- iconRounded: Boolean,
16
- iconImage: String,
17
- iconDistance: {
18
- type: String,
19
- default: '0'
20
- }
21
- },
22
-
23
- computed: {
24
- iconStyle () {
25
- if (this.iconDistance !== void 0) {
26
- return { left: this.iconDistance }
27
- }
28
- return ''
29
- }
30
- },
31
-
32
- methods: {
33
- __getImageContent (h) {
34
- if (this.iconImage !== void 0) {
35
- return [
36
- h('img', {
37
- domProps: {
38
- src: this.iconImage
39
- }
40
- })
41
- ]
42
- }
43
- },
44
-
45
- __getIconContent (h) {
46
- const iconSlot = slot(this, 'icon')
47
-
48
- return h('div', {
49
- staticClass: 'q-activity-item--icon vertical-middle',
50
- style: this.iconStyle
51
- }, iconSlot !== void 0 ? iconSlot : [].concat(
52
- h(QAvatar, {
53
- props: {
54
- color: this.iconColor,
55
- textColor: this.iconTextColor,
56
- icon: this.icon,
57
- size: this.iconSize,
58
- fontSize: this.iconFontSize,
59
- square: this.iconSquare,
60
- rounded: this.iconRounded
61
- }
62
- }, this.__getImageContent(h))
63
- ))
64
- }
65
- },
66
-
67
- render (h) {
68
- return h('li', {
69
- staticClass: 'q-activity-item row'
70
- }, [
71
- this.__getIconContent(h),
72
- h('div', { staticClass: 'col q-activity-item--content' }, slot(this, 'default'))
73
- ])
74
- }
75
- }
@@ -1,53 +0,0 @@
1
- {
2
- "type": "component",
3
- "props": {
4
- "icon": {
5
- "type": "String",
6
- "desc": "Icon name following Quasar convention; make sure you have the icon library installed",
7
- "examples": [ "list", "fas fa-list" ]
8
- },
9
- "icon-color": {
10
- "type": "String",
11
- "desc": "Color name for icon from the Quasar Color Palette",
12
- "examples": [ "blue-grey-8", "white" ]
13
- },
14
- "icon-text-color": {
15
- "type": "String",
16
- "desc": "Color name for icon text from the Quasar Color Palette",
17
- "examples": [ "white", "orange-6" ]
18
- },
19
- "icon-size": {
20
- "type": "String",
21
- "desc": "Size in CSS units, including unit name",
22
- "examples": [ "16px", "1rem" ]
23
- },
24
- "icon-font-size": {
25
- "type": "String",
26
- "desc": "Size in CSS units, including unit name",
27
- "examples": [ "16px", "1rem" ]
28
- },
29
- "icon-square": {
30
- "type": "Boolean",
31
- "desc": "Removes border-radius so borders are squared"
32
- },
33
- "icon-rounded": {
34
- "type": "Boolean",
35
- "desc": "Applies a small standard border-radius for a squared shape of the component"
36
- },
37
- "icon-image": {
38
- "type": "String",
39
- "desc": "Path to image to use. If used, do not also use `icon`, `icon-color`, `icon-text-color` or `icon-font-size`",
40
- "examples": [ "https://cdn.quasar.dev/img/boy-avatar.png" ]
41
- },
42
- "icon-distance": {
43
- "type": "String",
44
- "desc": "Size in CSS units, including unit name. Used to help center icons on the bar",
45
- "examples": [ "-13px", "-0.5rem" ]
46
- }
47
- },
48
- "slots": {
49
- "default": {
50
- "desc": "Anything can go into this slot"
51
- }
52
- }
53
- }
@@ -1,33 +0,0 @@
1
- .q-activity
2
- position relative
3
- list-style none
4
- padding-inline-start 0px
5
- &:before
6
- position absolute
7
- display block
8
- content ''
9
- height 100%
10
- top 0
11
- bottom 0
12
- z-index 1
13
- left var(--qactivity-bar-distance, 15px)
14
- width var(--qactivity-bar-width, 2px)
15
- background-color var(--qactivity-bar-color, black)
16
- &--normal
17
- margin 10px 10px 10px 10px
18
- $--dense
19
- margin 0 0 0 0
20
- .q-activity-item
21
- position relative
22
- &--icon
23
- position relative
24
- padding 10px 15px 5px 8px
25
- display flex
26
- justify-content space-between
27
- align-items center
28
- z-index 2
29
- &--content
30
- position relative
31
- display flex
32
- justify-content space-between
33
- align-items center
@@ -1,7 +0,0 @@
1
- import QActivity from './QActivity'
2
- import QActivityItem from './QActivityItem'
3
-
4
- export {
5
- QActivity,
6
- QActivityItem
7
- }