@bildvitta/quasar-ui-asteroid 2.12.4 → 3.0.0-alpha.1
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/dist/api/QasBox.json +16 -0
- package/dist/api/QasBreakline.json +32 -0
- package/dist/api/QasBtn.json +15 -0
- package/dist/api/QasDebugger.json +13 -0
- package/dist/asteroid.cjs.css +1 -0
- package/dist/asteroid.cjs.js +9154 -0
- package/dist/asteroid.cjs.min.js +6 -0
- package/dist/asteroid.esm.css +1 -0
- package/dist/asteroid.esm.js +9145 -0
- package/dist/asteroid.esm.min.js +6 -0
- package/dist/asteroid.umd.css +1 -0
- package/dist/asteroid.umd.js +9148 -0
- package/dist/asteroid.umd.min.js +6 -0
- package/dist/vetur/asteroid-attributes.json +30 -0
- package/dist/vetur/asteroid-tags.json +29 -0
- package/package.json +42 -56
- package/src/assets/logo-modular.svg +1 -0
- package/src/asteroid.js +1 -0
- package/src/components/actions/QasActions.vue +45 -0
- package/src/components/actions-menu/QasActionsMenu.vue +8 -19
- package/src/components/alert/QasAlert.vue +90 -0
- package/src/components/app-bar/QasAppBar.vue +59 -61
- package/src/components/app-menu/QasAppMenu.vue +128 -41
- package/src/components/avatar/QasAvatar.vue +7 -3
- package/src/components/box/QasBox.vue +12 -4
- package/src/components/box/QasBox.yml +13 -0
- package/src/components/breakline/QasBreakline.vue +37 -0
- package/src/components/breakline/QasBreakline.yml +25 -0
- package/src/components/btn/QasBtn.vue +27 -24
- package/src/components/btn/QasBtn.yml +12 -0
- package/src/components/card/QasCard.vue +29 -21
- package/src/components/checkbox-group/QasCheckboxGroup.vue +31 -17
- package/src/components/copy/QasCopy.vue +22 -11
- package/src/components/date-time-input/QasDateTimeInput.vue +16 -26
- package/src/components/debugger/QasDebugger.vue +2 -0
- package/src/components/debugger/QasDebugger.yml +10 -0
- package/src/components/delete/QasDelete.vue +28 -15
- package/src/components/dialog/QasDialog.vue +71 -67
- package/src/components/dialog-router/QasDialogRouter.vue +12 -4
- package/src/components/field/QasField.vue +22 -25
- package/src/components/filters/QasFilters.vue +31 -24
- package/src/components/form-generator/QasFormGenerator.vue +13 -15
- package/src/components/form-view/QasFormView.vue +117 -66
- package/src/components/gallery/QasGallery.vue +39 -26
- package/src/components/grid-generator/QasGridGenerator.vue +12 -6
- package/src/components/index.js +0 -0
- package/src/components/input/QasInput.vue +38 -36
- package/src/components/label/QasLabel.vue +14 -15
- package/src/components/layout/QasLayout.vue +81 -0
- package/src/components/list-items/QasListItems.vue +16 -8
- package/src/components/list-view/QasListView.vue +31 -28
- package/src/components/map/QasMap.vue +15 -25
- package/src/components/nested-fields/QasNestedFields.vue +39 -36
- package/src/components/numeric-input/QasNumericInput.vue +125 -0
- package/src/components/page-header/QasPageHeader.vue +19 -10
- package/src/components/password-input/QasPasswordInput.vue +20 -18
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.vue +52 -31
- package/src/components/profile/QasProfile.vue +14 -12
- package/src/components/resizer/QasResizer.vue +1 -1
- package/src/components/search-box/QasSearchBox.vue +36 -20
- package/src/components/select/QasSelect.vue +43 -44
- package/src/components/select-list/QasSelectList.vue +64 -51
- package/src/components/signature-pad/QasSignaturePad.vue +57 -41
- package/src/components/signature-uploader/QasSignatureUploader.vue +15 -13
- package/src/components/single-view/QasSingleView.vue +31 -17
- package/src/components/sortable/QasSortable.vue +45 -27
- package/src/components/table-generator/QasTableGenerator.vue +95 -22
- package/src/components/tabs-generator/QasTabsGenerator.vue +36 -24
- package/src/components/text-truncate/QasTextTruncate.vue +25 -17
- package/src/components/transfer/QasTransfer.vue +57 -53
- package/src/components/uploader/QasUploader.vue +169 -48
- package/src/css/background.scss +1 -1
- package/src/css/border.scss +7 -6
- package/src/css/design-system.scss +0 -43
- package/src/css/fonts.scss +2 -28
- package/src/css/opacity.scss +0 -4
- package/src/css/set-brand.scss +15 -0
- package/src/css/transitions.scss +1 -1
- package/src/helpers/add-counter-suffix.js +3 -0
- package/src/helpers/{base64ToBlob.js → base-64-to-blob.js} +0 -0
- package/src/helpers/{constructObject.js → construct-object.js} +0 -0
- package/src/helpers/filter-object.js +8 -6
- package/src/helpers/filters.js +3 -4
- package/src/helpers/get-slot-children-text.js +15 -0
- package/src/helpers/{greatestCommonDivisor.js → greatest-common-divisor.js} +0 -0
- package/src/helpers/images.js +28 -0
- package/src/helpers/index.js +11 -57
- package/src/helpers/is-local-development.js +3 -0
- package/src/helpers/scroll-on-grap.js +61 -0
- package/src/index.cjs.js +1 -0
- package/src/index.esm.js +4 -0
- package/src/index.scss +18 -20
- package/src/index.umd.js +2 -0
- package/src/mixins/context.js +1 -1
- package/src/mixins/dialog-router.js +17 -0
- package/src/mixins/form.js +4 -12
- package/src/mixins/generator.js +14 -14
- package/src/mixins/index.js +2 -8
- package/src/mixins/password.js +73 -11
- package/src/mixins/screen.js +8 -6
- package/src/mixins/view.js +57 -20
- package/src/plugins/Dialog.js +14 -0
- package/src/plugins/NotifySuccess.js +3 -3
- package/src/plugins/index.js +4 -2
- package/src/store/history.js +43 -0
- package/src/store/index.js +1 -0
- package/src/vue-plugin.js +185 -0
- package/.babelrc +0 -12
- package/.storybook/main.js +0 -35
- package/.storybook/preview.js +0 -26
- package/debug.log +0 -1
- package/index.js +0 -4
- package/jest-setup.js +0 -1
- package/jest.config.json +0 -22
- package/postcss.config.js +0 -5
- package/src/components/Introduction.stories.mdx +0 -12
- package/src/components/actions-menu/QasActionsMenu.stories.js +0 -73
- package/src/components/app-bar/QasAppBar.stories.js +0 -88
- package/src/components/app-menu/QasAppMenu.stories.js +0 -62
- package/src/components/apps-menu/QasAppsMenu.spec.js +0 -58
- package/src/components/apps-menu/QasAppsMenu.stories.js +0 -54
- package/src/components/apps-menu/QasAppsMenu.vue +0 -48
- package/src/components/avatar/QasAvatar.spec.js +0 -14
- package/src/components/avatar/QasAvatar.stories.js +0 -52
- package/src/components/box/QasBox.spec.js +0 -18
- package/src/components/box/QasBox.stories.js +0 -35
- package/src/components/break-line/QasBreakLine.stories.js +0 -57
- package/src/components/break-line/QasBreakLine.vue +0 -52
- package/src/components/btn/QasBtn.stories.js +0 -45
- package/src/components/btn-actions/QasBtnActions.stories.js +0 -77
- package/src/components/btn-actions/QasBtnActions.vue +0 -54
- package/src/components/card/QasCard.stories.js +0 -126
- package/src/components/checkbox-group/QasCheckboxGroup.stories.js +0 -59
- package/src/components/copy/QasCopy.stories.js +0 -41
- package/src/components/date-time-input/QasDateTimeInput.stories.js +0 -67
- package/src/components/debugger/QasDebugger.stories.js +0 -33
- package/src/components/decimal-input/QasDecimalInput.stories.js +0 -82
- package/src/components/decimal-input/QasDecimalInput.vue +0 -92
- package/src/components/delete/QasDelete.stories.js +0 -80
- package/src/components/dialog/QasDialog.stories.js +0 -139
- package/src/components/dialog-router/QasDialogRouter.stories.js +0 -38
- package/src/components/field/QasField.stories.js +0 -181
- package/src/components/filters/QasFilters.stories.js +0 -121
- package/src/components/form-generator/QasFormGenerator.stories.js +0 -115
- package/src/components/form-view/QasFormView.stories.js +0 -236
- package/src/components/gallery/QasGallery.stories.js +0 -91
- package/src/components/grid-generator/QasGridGenerator.stories.js +0 -138
- package/src/components/input/QasInput.stories.js +0 -78
- package/src/components/label/QasLabel.stories.js +0 -60
- package/src/components/list-items/QasListItems.stories.js +0 -130
- package/src/components/list-view/QasListView.stories.js +0 -168
- package/src/components/map/QasMap.stories.js +0 -75
- package/src/components/nested-fields/QasNestedFields.stories.js +0 -255
- package/src/components/page-header/QasPageHeader.stories.js +0 -61
- package/src/components/password-input/QasPasswordInput.stories.js +0 -76
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.stories.js +0 -54
- package/src/components/profile/QasProfile.stories.js +0 -131
- package/src/components/resizer/QasResizer.stories.js +0 -43
- package/src/components/search-box/QasSearchBox.stories.js +0 -111
- package/src/components/select/QasSelect.stories.js +0 -113
- package/src/components/select-list/QasSelectList.stories.js +0 -153
- package/src/components/signature-pad/QasSignaturePad.stories.js +0 -51
- package/src/components/signature-uploader/QasSignatureUploader.stories.js +0 -69
- package/src/components/single-view/QasSingleView.stories.js +0 -130
- package/src/components/sortable/QasSortable.stories.js +0 -80
- package/src/components/table-generator/QasTableGenerator.stories.js +0 -116
- package/src/components/tabs-generator/QasTabsGenerator.stories.js +0 -145
- package/src/components/text-truncate/QasTextTruncate.stories.js +0 -55
- package/src/components/tip/QasTip.stories.js +0 -57
- package/src/components/tip/QasTip.vue +0 -68
- package/src/components/tooltip/QasTooltip.stories.js +0 -63
- package/src/components/tooltip/QasTooltip.vue +0 -81
- package/src/components/transfer/QasTransfer.stories.js +0 -118
- package/src/components/uploader/QasCustomUploader.vue +0 -121
- package/src/components/uploader/QasUploader.stories.js +0 -139
- package/src/directives/Test.js +0 -13
- package/src/helpers/historyHandler.js +0 -52
- package/src/helpers/label.js +0 -3
- package/src/index.js +0 -245
- package/src/mixins/map-markers.js +0 -26
- package/src/mixins/unsaved-changes.js +0 -24
- package/src/mixins/uploader.js +0 -30
- package/src/mocks/json/user.json +0 -27
- package/src/mocks/json/users-new.json +0 -23
- package/src/mocks/json/users.json +0 -97
- package/src/mocks/storeModule.js +0 -71
- package/src/pages/Forbidden.vue +0 -6
- package/src/pages/NotFound.vue +0 -6
package/src/mixins/view.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { camelize } from 'humps'
|
|
2
|
-
import { get } from 'lodash'
|
|
3
|
-
|
|
4
|
-
import { NotifyError } from '../plugins'
|
|
2
|
+
import { get } from 'lodash-es'
|
|
3
|
+
import { markRaw } from 'vue'
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
props: {
|
|
@@ -17,39 +16,71 @@ export default {
|
|
|
17
16
|
url: {
|
|
18
17
|
default: '',
|
|
19
18
|
type: String
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
fields: {
|
|
22
|
+
default: () => ({}),
|
|
23
|
+
type: Object
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
errors: {
|
|
27
|
+
default: () => ({}),
|
|
28
|
+
type: Object
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
metadata: {
|
|
32
|
+
default: () => ({}),
|
|
33
|
+
type: Object
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
fetching: {
|
|
37
|
+
type: Boolean
|
|
20
38
|
}
|
|
21
39
|
},
|
|
22
40
|
|
|
41
|
+
emits: [
|
|
42
|
+
'update:fields',
|
|
43
|
+
'update:errors',
|
|
44
|
+
'update:metadata',
|
|
45
|
+
'update:fetching'
|
|
46
|
+
],
|
|
47
|
+
|
|
23
48
|
data () {
|
|
24
49
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
50
|
+
mx_errors: {},
|
|
51
|
+
mx_fields: {},
|
|
52
|
+
mx_metadata: {},
|
|
53
|
+
|
|
54
|
+
mx_isFetching: false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
28
57
|
|
|
29
|
-
|
|
58
|
+
watch: {
|
|
59
|
+
mx_isFetching (value) {
|
|
60
|
+
this.$emit('update:fetching', value)
|
|
30
61
|
}
|
|
31
62
|
},
|
|
32
63
|
|
|
33
64
|
computed: {
|
|
34
|
-
|
|
65
|
+
mx_componentTag () {
|
|
35
66
|
return this.dialog ? 'div' : 'q-page'
|
|
36
67
|
},
|
|
37
68
|
|
|
38
|
-
|
|
39
|
-
return !!(this.$slots.footer
|
|
69
|
+
mx_hasFooterSlot () {
|
|
70
|
+
return !!(this.$slots.footer)
|
|
40
71
|
},
|
|
41
72
|
|
|
42
|
-
|
|
43
|
-
return !!(this.$slots.header
|
|
73
|
+
mx_hasHeaderSlot () {
|
|
74
|
+
return !!(this.$slots.header)
|
|
44
75
|
}
|
|
45
76
|
},
|
|
46
77
|
|
|
47
78
|
methods: {
|
|
48
|
-
|
|
79
|
+
mx_fetchError (error) {
|
|
49
80
|
const { response } = error
|
|
50
81
|
const exception = get(response, 'data.exception') || error.message
|
|
51
82
|
|
|
52
|
-
|
|
83
|
+
this.$qas.error('Ops! Erro ao obter os dados.', exception)
|
|
53
84
|
|
|
54
85
|
const status = get(response, 'status')
|
|
55
86
|
const redirect = ({ 403: 'Forbidden', 404: 'NotFound' })[status]
|
|
@@ -59,20 +90,26 @@ export default {
|
|
|
59
90
|
}
|
|
60
91
|
},
|
|
61
92
|
|
|
62
|
-
|
|
63
|
-
this.
|
|
93
|
+
mx_setErrors (errors = {}) {
|
|
94
|
+
this.mx_errors = markRaw(errors)
|
|
64
95
|
},
|
|
65
96
|
|
|
66
|
-
|
|
97
|
+
mx_setFields (fields = {}) {
|
|
67
98
|
for (const field in fields) {
|
|
68
99
|
fields[field].name = camelize(fields[field].name)
|
|
69
100
|
}
|
|
70
101
|
|
|
71
|
-
this.
|
|
102
|
+
this.mx_fields = markRaw(fields)
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
mx_setMetadata (metadata = {}) {
|
|
106
|
+
this.mx_metadata = markRaw(metadata)
|
|
72
107
|
},
|
|
73
108
|
|
|
74
|
-
|
|
75
|
-
|
|
109
|
+
mx_updateModels (models) {
|
|
110
|
+
for (const key in models) {
|
|
111
|
+
this.$emit(`update:${key}`, models[key])
|
|
112
|
+
}
|
|
76
113
|
}
|
|
77
114
|
}
|
|
78
115
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dialog } from 'quasar'
|
|
2
|
+
import QasDialog from '../components/dialog/QasDialog.vue'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @param {object} componentProps={}
|
|
6
|
+
*
|
|
7
|
+
* @example Dialog({ card: { title: 'Esse é o meu titulo!' } })
|
|
8
|
+
*/
|
|
9
|
+
export default (componentProps = {}) => {
|
|
10
|
+
Dialog.create({
|
|
11
|
+
component: QasDialog,
|
|
12
|
+
componentProps: { ...componentProps, usePlugin: true }
|
|
13
|
+
})
|
|
14
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Notify } from 'quasar'
|
|
2
2
|
|
|
3
3
|
Notify.registerType('success', {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
icon: 'o_check',
|
|
5
|
+
progress: true
|
|
6
6
|
})
|
|
7
7
|
|
|
8
8
|
export default (message, caption) => {
|
|
9
|
-
Notify
|
|
9
|
+
Notify?.create({ caption, message, type: 'success' })
|
|
10
10
|
}
|
package/src/plugins/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Dialog from './Dialog.js'
|
|
2
|
+
import NotifyError from './NotifyError.js'
|
|
3
|
+
import NotifySuccess from './NotifySuccess.js'
|
|
3
4
|
|
|
4
5
|
export {
|
|
6
|
+
Dialog,
|
|
5
7
|
NotifyError,
|
|
6
8
|
NotifySuccess
|
|
7
9
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { reactive } from 'vue'
|
|
2
|
+
import { findLastIndex } from 'lodash-es'
|
|
3
|
+
|
|
4
|
+
const history = reactive({ hasPreviousRoute: false, list: [] })
|
|
5
|
+
|
|
6
|
+
function getPreviousRoute (currentRoute) {
|
|
7
|
+
const index = findLastIndex(history.list, item => item.name === currentRoute.name)
|
|
8
|
+
|
|
9
|
+
if (~index) {
|
|
10
|
+
history.list.splice(index, 1)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
history.hasPreviousRoute = history.list.length > 1
|
|
14
|
+
return history.list[history.list.length - 1]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function addRoute (route) {
|
|
18
|
+
const routeExistsInList = history.list?.[history.list?.length - 1]?.name === route.name
|
|
19
|
+
|
|
20
|
+
if (routeExistsInList) return
|
|
21
|
+
|
|
22
|
+
history.list.push(route)
|
|
23
|
+
history.hasPreviousRoute = history.list.length > 1
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function destroyRoutes (routes) {
|
|
27
|
+
if (!history.list.length) return null
|
|
28
|
+
|
|
29
|
+
routes.forEach(route => {
|
|
30
|
+
const index = history.list.findIndex(item => item.name === route)
|
|
31
|
+
|
|
32
|
+
if (~index) {
|
|
33
|
+
history.list.splice(index, 1)
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
history,
|
|
40
|
+
getPreviousRoute,
|
|
41
|
+
addRoute,
|
|
42
|
+
destroyRoutes
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './history.js'
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import QasActions from './components/actions/QasActions.vue'
|
|
2
|
+
import QasActionsMenu from './components/actions-menu/QasActionsMenu.vue'
|
|
3
|
+
import QasAlert from './components/alert/QasAlert.vue'
|
|
4
|
+
import QasAppBar from './components/app-bar/QasAppBar.vue'
|
|
5
|
+
import QasAppMenu from './components/app-menu/QasAppMenu.vue'
|
|
6
|
+
import QasAvatar from './components/avatar/QasAvatar.vue'
|
|
7
|
+
import QasBox from './components/box/QasBox.vue'
|
|
8
|
+
import QasBreakline from './components/breakline/QasBreakline.vue'
|
|
9
|
+
import QasBtn from './components/btn/QasBtn.vue'
|
|
10
|
+
import QasCard from './components/card/QasCard.vue'
|
|
11
|
+
import QasCheckboxGroup from './components/checkbox-group/QasCheckboxGroup.vue'
|
|
12
|
+
import QasCopy from './components/copy/QasCopy.vue'
|
|
13
|
+
import QasDateTimeInput from './components/date-time-input/QasDateTimeInput.vue'
|
|
14
|
+
import QasDebugger from './components/debugger/QasDebugger.vue'
|
|
15
|
+
import QasDelete from './components/delete/QasDelete.vue'
|
|
16
|
+
import QasDialog from './components/dialog/QasDialog.vue'
|
|
17
|
+
import QasDialogRouter from './components/dialog-router/QasDialogRouter.vue'
|
|
18
|
+
import QasField from './components/field/QasField.vue'
|
|
19
|
+
import QasFilters from './components/filters/QasFilters.vue'
|
|
20
|
+
import QasFormGenerator from './components/form-generator/QasFormGenerator.vue'
|
|
21
|
+
import QasFormView from './components/form-view/QasFormView.vue'
|
|
22
|
+
import QasGallery from './components/gallery/QasGallery.vue'
|
|
23
|
+
import QasGridGenerator from './components/grid-generator/QasGridGenerator.vue'
|
|
24
|
+
import QasInput from './components/input/QasInput.vue'
|
|
25
|
+
import QasLabel from './components/label/QasLabel.vue'
|
|
26
|
+
import QasLayout from './components/layout/QasLayout.vue'
|
|
27
|
+
import QasListItems from './components/list-items/QasListItems.vue'
|
|
28
|
+
import QasListView from './components/list-view/QasListView.vue'
|
|
29
|
+
import QasMap from './components/map/QasMap.vue'
|
|
30
|
+
import QasNestedFields from './components/nested-fields/QasNestedFields.vue'
|
|
31
|
+
import QasNumericInput from './components/numeric-input/QasNumericInput.vue'
|
|
32
|
+
import QasPageHeader from './components/page-header/QasPageHeader.vue'
|
|
33
|
+
import QasPasswordInput from './components/password-input/QasPasswordInput.vue'
|
|
34
|
+
import QasPasswordStrengthChecker from './components/password-strength-checker/QasPasswordStrengthChecker.vue'
|
|
35
|
+
import QasProfile from './components/profile/QasProfile.vue'
|
|
36
|
+
import QasResizer from './components/resizer/QasResizer.vue'
|
|
37
|
+
import QasSearchBox from './components/search-box/QasSearchBox.vue'
|
|
38
|
+
import QasSelect from './components/select/QasSelect.vue'
|
|
39
|
+
import QasSelectList from './components/select-list/QasSelectList.vue'
|
|
40
|
+
import QasSignaturePad from './components/signature-pad/QasSignaturePad.vue'
|
|
41
|
+
import QasSignatureUploader from './components/signature-uploader/QasSignatureUploader.vue'
|
|
42
|
+
import QasSingleView from './components/single-view/QasSingleView.vue'
|
|
43
|
+
import QasSortable from './components/sortable/QasSortable.vue'
|
|
44
|
+
import QasTableGenerator from './components/table-generator/QasTableGenerator.vue'
|
|
45
|
+
import QasTabsGenerator from './components/tabs-generator/QasTabsGenerator.vue'
|
|
46
|
+
import QasTextTruncate from './components/text-truncate/QasTextTruncate.vue'
|
|
47
|
+
import QasTransfer from './components/transfer/QasTransfer.vue'
|
|
48
|
+
import QasUploader from './components/uploader/QasUploader.vue'
|
|
49
|
+
|
|
50
|
+
import VueGoogleMaps from '@fawmi/vue-google-maps'
|
|
51
|
+
import { Notify, Quasar, Dialog as QuasarDialog } from 'quasar'
|
|
52
|
+
|
|
53
|
+
import {
|
|
54
|
+
Dialog,
|
|
55
|
+
NotifyError,
|
|
56
|
+
NotifySuccess
|
|
57
|
+
} from './plugins'
|
|
58
|
+
|
|
59
|
+
import packageInfo from '../package.json'
|
|
60
|
+
|
|
61
|
+
const version = packageInfo.version
|
|
62
|
+
|
|
63
|
+
function install (app) {
|
|
64
|
+
app.component('QasActions', QasActions)
|
|
65
|
+
app.component('QasActionsMenu', QasActionsMenu)
|
|
66
|
+
app.component('QasAlert', QasAlert)
|
|
67
|
+
app.component('QasAppBar', QasAppBar)
|
|
68
|
+
app.component('QasAppMenu', QasAppMenu)
|
|
69
|
+
app.component('QasAvatar', QasAvatar)
|
|
70
|
+
app.component('QasBox', QasBox)
|
|
71
|
+
app.component('QasBreakline', QasBreakline)
|
|
72
|
+
app.component('QasBtn', QasBtn)
|
|
73
|
+
app.component('QasCard', QasCard)
|
|
74
|
+
app.component('QasCheckboxGroup', QasCheckboxGroup)
|
|
75
|
+
app.component('QasCopy', QasCopy)
|
|
76
|
+
app.component('QasDateTimeInput', QasDateTimeInput)
|
|
77
|
+
app.component('QasDebugger', QasDebugger)
|
|
78
|
+
app.component('QasDelete', QasDelete)
|
|
79
|
+
app.component('QasDialog', QasDialog)
|
|
80
|
+
app.component('QasDialogRouter', QasDialogRouter)
|
|
81
|
+
app.component('QasField', QasField)
|
|
82
|
+
app.component('QasFilters', QasFilters)
|
|
83
|
+
app.component('QasFormGenerator', QasFormGenerator)
|
|
84
|
+
app.component('QasFormView', QasFormView)
|
|
85
|
+
app.component('QasGallery', QasGallery)
|
|
86
|
+
app.component('QasGridGenerator', QasGridGenerator)
|
|
87
|
+
app.component('QasInput', QasInput)
|
|
88
|
+
app.component('QasLabel', QasLabel)
|
|
89
|
+
app.component('QasLayout', QasLayout)
|
|
90
|
+
app.component('QasListItems', QasListItems)
|
|
91
|
+
app.component('QasListView', QasListView)
|
|
92
|
+
app.component('QasMap', QasMap)
|
|
93
|
+
app.component('QasNestedFields', QasNestedFields)
|
|
94
|
+
app.component('QasNumericInput', QasNumericInput)
|
|
95
|
+
app.component('QasPageHeader', QasPageHeader)
|
|
96
|
+
app.component('QasPasswordInput', QasPasswordInput)
|
|
97
|
+
app.component('QasPasswordStrengthChecker', QasPasswordStrengthChecker)
|
|
98
|
+
app.component('QasProfile', QasProfile)
|
|
99
|
+
app.component('QasResizer', QasResizer)
|
|
100
|
+
app.component('QasSearchBox', QasSearchBox)
|
|
101
|
+
app.component('QasSelect', QasSelect)
|
|
102
|
+
app.component('QasSelectList', QasSelectList)
|
|
103
|
+
app.component('QasSignaturePad', QasSignaturePad)
|
|
104
|
+
app.component('QasSignatureUploader', QasSignatureUploader)
|
|
105
|
+
app.component('QasSingleView', QasSingleView)
|
|
106
|
+
app.component('QasSortable', QasSortable)
|
|
107
|
+
app.component('QasTableGenerator', QasTableGenerator)
|
|
108
|
+
app.component('QasTabsGenerator', QasTabsGenerator)
|
|
109
|
+
app.component('QasTextTruncate', QasTextTruncate)
|
|
110
|
+
app.component('QasTransfer', QasTransfer)
|
|
111
|
+
app.component('QasUploader', QasUploader)
|
|
112
|
+
|
|
113
|
+
app.use(Quasar, { plugins: { Notify, QuasarDialog, Dialog } })
|
|
114
|
+
|
|
115
|
+
if (process.env.MAPS_API_KEY) {
|
|
116
|
+
app.use(VueGoogleMaps, { load: { key: process.env.MAPS_API_KEY, libraries: 'places' } })
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
app.config.globalProperties.$qas = {
|
|
120
|
+
dialog: Dialog,
|
|
121
|
+
error: NotifyError,
|
|
122
|
+
success: NotifySuccess
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export {
|
|
127
|
+
version,
|
|
128
|
+
|
|
129
|
+
// components
|
|
130
|
+
QasActions,
|
|
131
|
+
QasActionsMenu,
|
|
132
|
+
QasAlert,
|
|
133
|
+
QasAppBar,
|
|
134
|
+
QasAppMenu,
|
|
135
|
+
QasAvatar,
|
|
136
|
+
QasBox,
|
|
137
|
+
QasBreakline,
|
|
138
|
+
QasBtn,
|
|
139
|
+
QasCard,
|
|
140
|
+
QasCheckboxGroup,
|
|
141
|
+
QasCopy,
|
|
142
|
+
QasDateTimeInput,
|
|
143
|
+
QasDebugger,
|
|
144
|
+
QasDelete,
|
|
145
|
+
QasDialog,
|
|
146
|
+
QasDialogRouter,
|
|
147
|
+
QasField,
|
|
148
|
+
QasFilters,
|
|
149
|
+
QasFormGenerator,
|
|
150
|
+
QasFormView,
|
|
151
|
+
QasGallery,
|
|
152
|
+
QasGridGenerator,
|
|
153
|
+
QasInput,
|
|
154
|
+
QasLabel,
|
|
155
|
+
QasLayout,
|
|
156
|
+
QasListItems,
|
|
157
|
+
QasListView,
|
|
158
|
+
QasMap,
|
|
159
|
+
QasNestedFields,
|
|
160
|
+
QasNumericInput,
|
|
161
|
+
QasPageHeader,
|
|
162
|
+
QasPasswordInput,
|
|
163
|
+
QasPasswordStrengthChecker,
|
|
164
|
+
QasProfile,
|
|
165
|
+
QasResizer,
|
|
166
|
+
QasSearchBox,
|
|
167
|
+
QasSelect,
|
|
168
|
+
QasSelectList,
|
|
169
|
+
QasSignaturePad,
|
|
170
|
+
QasSignatureUploader,
|
|
171
|
+
QasSingleView,
|
|
172
|
+
QasSortable,
|
|
173
|
+
QasTableGenerator,
|
|
174
|
+
QasTabsGenerator,
|
|
175
|
+
QasTextTruncate,
|
|
176
|
+
QasTransfer,
|
|
177
|
+
QasUploader,
|
|
178
|
+
|
|
179
|
+
// plugin
|
|
180
|
+
Dialog,
|
|
181
|
+
NotifyError,
|
|
182
|
+
NotifySuccess,
|
|
183
|
+
|
|
184
|
+
install
|
|
185
|
+
}
|
package/.babelrc
DELETED
package/.storybook/main.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const ESLintPlugin = require('eslint-webpack-plugin')
|
|
2
|
-
const path = require('path')
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
addons: [
|
|
6
|
-
'@storybook/addon-essentials',
|
|
7
|
-
'@storybook/addon-links',
|
|
8
|
-
'@storybook/addon-postcss'
|
|
9
|
-
],
|
|
10
|
-
|
|
11
|
-
stories: [
|
|
12
|
-
'../**/*.stories.mdx',
|
|
13
|
-
'../**/*.stories.js'
|
|
14
|
-
],
|
|
15
|
-
|
|
16
|
-
webpackFinal: webpack => {
|
|
17
|
-
webpack.module.rules.push({
|
|
18
|
-
include: path.resolve(__dirname, '../'),
|
|
19
|
-
test: /\.scss$/,
|
|
20
|
-
use: ['style-loader', 'css-loader', {
|
|
21
|
-
loader: 'sass-loader',
|
|
22
|
-
options: {
|
|
23
|
-
additionalData: '@import \'quasar/src/css/variables.sass\';',
|
|
24
|
-
sourceMap: true
|
|
25
|
-
}
|
|
26
|
-
}],
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
webpack.plugins.push(
|
|
30
|
-
new ESLintPlugin({ extensions: ['vue'] })
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
return webpack
|
|
34
|
-
}
|
|
35
|
-
}
|
package/.storybook/preview.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Storybook
|
|
2
|
-
import '@storybook/addon-console'
|
|
3
|
-
|
|
4
|
-
// Quasar
|
|
5
|
-
import '@quasar/extras/roboto-font/roboto-font.css'
|
|
6
|
-
import '@quasar/extras/material-icons/material-icons.css'
|
|
7
|
-
import '@quasar/extras/material-icons-outlined/material-icons-outlined.css'
|
|
8
|
-
|
|
9
|
-
import 'quasar/dist/quasar.min.css'
|
|
10
|
-
|
|
11
|
-
import '../src/index.scss'
|
|
12
|
-
import '../index.js'
|
|
13
|
-
|
|
14
|
-
export const parameters = {
|
|
15
|
-
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
16
|
-
viewMode: 'docs'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
import Vue from 'vue'
|
|
20
|
-
import storeModule from '../src/mocks/storeModule'
|
|
21
|
-
|
|
22
|
-
import VueRouter from 'vue-router'
|
|
23
|
-
Vue.use(VueRouter)
|
|
24
|
-
|
|
25
|
-
import Vuex from 'vuex'
|
|
26
|
-
Vue.use(Vuex)
|
package/debug.log
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[0112/132448.838:ERROR:directory_reader_win.cc(43)] FindFirstFile: O sistema n�o pode encontrar o caminho especificado. (0x3)
|
package/index.js
DELETED
package/jest-setup.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom'
|
package/jest.config.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"moduleFileExtensions": [
|
|
3
|
-
"js",
|
|
4
|
-
"json",
|
|
5
|
-
"vue"
|
|
6
|
-
],
|
|
7
|
-
|
|
8
|
-
"moduleNameMapper": {
|
|
9
|
-
"^@/(.*)$": "<rootDir>/$1"
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
"setupFilesAfterEnv": ["<rootDir>/jest-setup.js"],
|
|
13
|
-
|
|
14
|
-
"transform": {
|
|
15
|
-
".*\\.(js)$": "babel-jest",
|
|
16
|
-
".*\\.(vue)$": "vue-jest"
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
"transformIgnorePatterns": [
|
|
20
|
-
"node_modules"
|
|
21
|
-
]
|
|
22
|
-
}
|
package/postcss.config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs/blocks'
|
|
2
|
-
|
|
3
|
-
<Meta title="Introduction" />
|
|
4
|
-
|
|
5
|
-
# Welcome to Storybook
|
|
6
|
-
|
|
7
|
-
Storybook helps you build UI components in isolation from your app's business logic, data, and context.
|
|
8
|
-
That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
|
|
9
|
-
|
|
10
|
-
Browse example stories now by navigating to them in the sidebar.
|
|
11
|
-
View their code in the `src/storybook-examples` directory to learn how they work.
|
|
12
|
-
We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import QasActionsMenu from './QasActionsMenu.vue'
|
|
2
|
-
import { Notify } from 'quasar'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: QasActionsMenu,
|
|
6
|
-
title: 'Components/ActionsMenu',
|
|
7
|
-
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
description: {
|
|
11
|
-
component: 'Actions menu.'
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
argTypes: {
|
|
17
|
-
label: {
|
|
18
|
-
description: 'Button label.'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
list: {
|
|
22
|
-
description: 'Actions list as an object containing `label`, `icon`, `props` and `handler` click event.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
hideLabel: {
|
|
26
|
-
description: 'Controls label visibility.'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
icon: {
|
|
30
|
-
description: 'Icon button.'
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
// slots
|
|
34
|
-
'[dynamic-name]': {
|
|
35
|
-
description: 'Each key inside `list` have your own slot to be customized.',
|
|
36
|
-
table: {
|
|
37
|
-
category: 'slots',
|
|
38
|
-
defaultValue: {
|
|
39
|
-
detail: JSON.stringify({ item: 'string' }),
|
|
40
|
-
summary: '{}'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
default: {
|
|
46
|
-
table: { disable: true }
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const Template = (args, { argTypes }) => ({
|
|
52
|
-
components: { QasActionsMenu },
|
|
53
|
-
props: Object.keys(argTypes),
|
|
54
|
-
template:
|
|
55
|
-
'<qas-actions-menu v-bind="$props" />'
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
export const Default = Template.bind({})
|
|
59
|
-
Default.args = {
|
|
60
|
-
block: {
|
|
61
|
-
handler: () => Notify.create('Block clicked!'),
|
|
62
|
-
icon: 'o_locked',
|
|
63
|
-
label: 'Block'
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
list: {
|
|
67
|
-
delete: {
|
|
68
|
-
handler: () => Notify.create('Delete clicked!'),
|
|
69
|
-
icon: 'o_delete',
|
|
70
|
-
label: 'Delete'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|