@bildvitta/quasar-ui-asteroid 2.17.0 → 3.0.0-alpha.3
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/QasActions.json +40 -0
- package/dist/api/QasActionsMenu.json +64 -0
- package/dist/api/QasAlert.json +40 -0
- package/dist/api/QasAppBar.json +52 -0
- package/dist/api/QasAppMenu.json +38 -0
- package/dist/api/QasAvatar.json +44 -0
- package/dist/api/QasBox.json +16 -0
- package/dist/api/QasBreakline.json +32 -0
- package/dist/api/QasBtn.json +16 -0
- package/dist/api/QasCard.json +52 -0
- package/dist/api/QasCheckboxGroup.json +38 -0
- package/dist/api/QasCopy.json +29 -0
- package/dist/api/QasDateTimeInput.json +60 -0
- package/dist/api/QasDebugger.json +13 -0
- package/dist/api/QasDelete.json +64 -0
- package/dist/api/QasDialog.json +109 -0
- package/dist/api/QasDialogRouter.json +31 -0
- package/dist/api/QasField.json +56 -0
- package/dist/api/QasFilters.json +111 -0
- package/dist/api/QasFormGenerator.json +92 -0
- package/dist/api/QasFormView.json +228 -0
- package/dist/api/QasGallery.json +54 -0
- package/dist/api/QasGridGenerator.json +108 -0
- package/dist/api/QasInput.json +40 -0
- package/dist/api/QasLabel.json +40 -0
- package/dist/api/QasLayout.json +47 -0
- package/dist/api/QasListItems.json +72 -0
- package/dist/api/QasListView.json +161 -0
- package/dist/api/QasMap.json +41 -0
- package/dist/api/QasNestedFields.json +223 -0
- package/dist/api/QasNumericInput.json +68 -0
- package/dist/api/QasPageHeader.json +36 -0
- package/dist/api/QasPasswordInput.json +121 -0
- package/dist/api/QasPasswordStrengthChecker.json +126 -0
- package/dist/api/QasProfile.json +74 -0
- package/dist/api/QasResizer.json +34 -0
- package/dist/api/QasSearchBox.json +91 -0
- package/dist/api/QasSelect.json +88 -0
- package/dist/api/QasSelectList.json +134 -0
- package/dist/api/QasSignaturePad.json +63 -0
- package/dist/api/QasSignatureUploader.json +41 -0
- package/dist/api/QasSingleView.json +147 -0
- package/dist/api/QasSortable.json +80 -0
- package/dist/api/QasTableGenerator.json +56 -0
- package/dist/api/QasTabsGenerator.json +90 -0
- package/dist/api/QasTextTruncate.json +38 -0
- package/dist/api/QasTransfer.json +70 -0
- package/dist/api/QasUploader.json +143 -0
- package/dist/asteroid.cjs.css +1 -0
- package/dist/asteroid.cjs.js +9307 -0
- package/dist/asteroid.cjs.min.js +6 -0
- package/dist/asteroid.esm.css +1 -0
- package/dist/asteroid.esm.js +9298 -0
- package/dist/asteroid.esm.min.js +6 -0
- package/dist/asteroid.umd.css +1 -0
- package/dist/asteroid.umd.js +9301 -0
- package/dist/asteroid.umd.min.js +6 -0
- package/dist/vetur/asteroid-attributes.json +1178 -0
- package/dist/vetur/asteroid-tags.json +535 -0
- package/package.json +41 -56
- package/src/assets/logo-modular.svg +1 -1
- package/src/asteroid.js +1 -0
- package/src/components/actions/QasActions.vue +45 -0
- package/src/components/actions/QasActions.yml +24 -0
- package/src/components/actions-menu/QasActionsMenu.vue +41 -14
- package/src/components/actions-menu/QasActionsMenu.yml +63 -0
- package/src/components/alert/QasAlert.vue +90 -0
- package/src/components/alert/QasAlert.yml +33 -0
- package/src/components/app-bar/QasAppBar.vue +16 -13
- package/src/components/app-bar/QasAppBar.yml +51 -0
- package/src/components/app-menu/QasAppMenu.vue +10 -12
- package/src/components/app-menu/QasAppMenu.yml +32 -0
- package/src/components/avatar/QasAvatar.vue +17 -9
- package/src/components/avatar/QasAvatar.yml +38 -0
- 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 +13 -0
- package/src/components/card/QasCard.vue +32 -33
- package/src/components/card/QasCard.yml +42 -0
- package/src/components/checkbox-group/QasCheckboxGroup.vue +50 -17
- package/src/components/checkbox-group/QasCheckboxGroup.yml +30 -0
- package/src/components/copy/QasCopy.vue +22 -11
- package/src/components/copy/QasCopy.yml +20 -0
- package/src/components/date-time-input/QasDateTimeInput.vue +18 -26
- package/src/components/date-time-input/QasDateTimeInput.yml +54 -0
- package/src/components/debugger/QasDebugger.vue +2 -0
- package/src/components/debugger/QasDebugger.yml +10 -0
- package/src/components/delete/QasDelete.vue +43 -16
- package/src/components/delete/QasDelete.yml +52 -0
- package/src/components/dialog/QasDialog.vue +63 -67
- package/src/components/dialog/QasDialog.yml +86 -0
- package/src/components/dialog-router/QasDialogRouter.vue +14 -4
- package/src/components/dialog-router/QasDialogRouter.yml +23 -0
- package/src/components/field/QasField.vue +21 -24
- package/src/components/field/QasField.yml +31 -0
- package/src/components/filters/QasFilters.vue +33 -26
- package/src/components/filters/QasFilters.yml +91 -0
- package/src/components/form-generator/QasFormGenerator.vue +13 -15
- package/src/components/form-generator/QasFormGenerator.yml +64 -0
- package/src/components/form-view/QasFormView.vue +129 -69
- package/src/components/form-view/QasFormView.yml +179 -0
- package/src/components/gallery/QasGallery.vue +47 -30
- package/src/components/gallery/QasGallery.yml +51 -0
- package/src/components/grid-generator/QasGridGenerator.vue +15 -7
- package/src/components/grid-generator/QasGridGenerator.yml +73 -0
- package/src/components/index.js +0 -0
- package/src/components/input/QasInput.vue +43 -36
- package/src/components/input/QasInput.yml +32 -0
- package/src/components/label/QasLabel.vue +14 -15
- package/src/components/label/QasLabel.yml +28 -0
- package/src/components/layout/QasLayout.vue +13 -21
- package/src/components/layout/QasLayout.yml +38 -0
- package/src/components/list-items/QasListItems.vue +15 -12
- package/src/components/list-items/QasListItems.yml +57 -0
- package/src/components/list-view/QasListView.vue +57 -31
- package/src/components/list-view/QasListView.yml +132 -0
- package/src/components/map/QasMap.vue +15 -31
- package/src/components/map/QasMap.yml +33 -0
- package/src/components/nested-fields/QasNestedFields.vue +57 -47
- package/src/components/nested-fields/QasNestedFields.yml +180 -0
- package/src/components/numeric-input/QasNumericInput.vue +31 -22
- package/src/components/numeric-input/QasNumericInput.yml +51 -0
- package/src/components/page-header/QasPageHeader.vue +20 -11
- package/src/components/page-header/QasPageHeader.yml +24 -0
- package/src/components/password-input/QasPasswordInput.vue +24 -21
- package/src/components/password-input/QasPasswordInput.yml +103 -0
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.vue +51 -34
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.yml +103 -0
- package/src/components/profile/QasProfile.vue +15 -13
- package/src/components/profile/QasProfile.yml +60 -0
- package/src/components/resizer/QasResizer.vue +3 -3
- package/src/components/resizer/QasResizer.yml +23 -0
- package/src/components/search-box/QasSearchBox.vue +50 -21
- package/src/components/search-box/QasSearchBox.yml +76 -0
- package/src/components/select/QasSelect.vue +51 -50
- package/src/components/select/QasSelect.yml +62 -0
- package/src/components/select-list/QasSelectList.vue +72 -53
- package/src/components/select-list/QasSelectList.yml +116 -0
- package/src/components/signature-pad/QasSignaturePad.vue +60 -40
- package/src/components/signature-pad/QasSignaturePad.yml +53 -0
- package/src/components/signature-uploader/QasSignatureUploader.vue +19 -17
- package/src/components/signature-uploader/QasSignatureUploader.yml +36 -0
- package/src/components/single-view/QasSingleView.vue +41 -22
- package/src/components/single-view/QasSingleView.yml +116 -0
- package/src/components/sortable/QasSortable.vue +51 -30
- package/src/components/sortable/QasSortable.yml +65 -0
- package/src/components/table-generator/QasTableGenerator.vue +112 -21
- package/src/components/table-generator/QasTableGenerator.yml +46 -0
- package/src/components/tabs-generator/QasTabsGenerator.vue +37 -25
- package/src/components/tabs-generator/QasTabsGenerator.yml +67 -0
- package/src/components/text-truncate/QasTextTruncate.vue +25 -17
- package/src/components/text-truncate/QasTextTruncate.yml +32 -0
- package/src/components/transfer/QasTransfer.vue +48 -49
- package/src/components/transfer/QasTransfer.yml +59 -0
- package/src/components/uploader/QasUploader.vue +169 -48
- package/src/components/uploader/QasUploader.yml +117 -0
- 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 +7 -9
- package/src/helpers/{greatestCommonDivisor.js → get-greatest-common-divisor.js} +0 -0
- package/src/helpers/get-slot-children-text.js +15 -0
- package/src/helpers/images.js +28 -0
- package/src/helpers/index.js +11 -61
- package/src/helpers/{isLocalDevelopment.js → is-local-development.js} +0 -0
- package/src/helpers/set-scroll-on-grab.js +61 -0
- package/src/index.cjs.js +1 -0
- package/src/index.esm.js +4 -0
- package/src/index.scss +19 -21
- 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 +62 -22
- package/src/plugins/dialog/Dialog.js +14 -0
- package/src/plugins/dialog/Dialog.yml +10 -0
- package/src/plugins/index.js +4 -2
- package/src/plugins/{NotifyError.js → notify-error/NotifyError.js} +0 -0
- package/src/plugins/notify-error/NotifyError.yml +11 -0
- package/src/plugins/{NotifySuccess.js → notify-success/NotifySuccess.js} +3 -3
- package/src/plugins/notify-success/NotifySuccess.yml +11 -0
- 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 -84
- package/src/components/app-menu/QasAppMenu.stories.js +0 -66
- 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/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 -142
- package/src/components/input/QasInput.stories.js +0 -78
- package/src/components/label/QasLabel.stories.js +0 -60
- package/src/components/layout/QasLayout.stories.js +0 -104
- package/src/components/list-items/QasListItems.stories.js +0 -135
- 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/numeric-input/QasNumericInput.stories.js +0 -92
- 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 -120
- 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 -120
- 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 -249
- 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,5 @@
|
|
|
1
1
|
import { camelize } from 'humps'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { NotifyError } from '../plugins'
|
|
2
|
+
import { markRaw } from 'vue'
|
|
5
3
|
|
|
6
4
|
export default {
|
|
7
5
|
props: {
|
|
@@ -17,41 +15,77 @@ export default {
|
|
|
17
15
|
url: {
|
|
18
16
|
default: '',
|
|
19
17
|
type: String
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
fields: {
|
|
21
|
+
default: () => ({}),
|
|
22
|
+
type: Object
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
errors: {
|
|
26
|
+
default: () => ({}),
|
|
27
|
+
type: Object
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
metadata: {
|
|
31
|
+
default: () => ({}),
|
|
32
|
+
type: Object
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
fetching: {
|
|
36
|
+
type: Boolean
|
|
20
37
|
}
|
|
21
38
|
},
|
|
22
39
|
|
|
40
|
+
emits: [
|
|
41
|
+
'update:fields',
|
|
42
|
+
'update:errors',
|
|
43
|
+
'update:metadata',
|
|
44
|
+
'update:fetching'
|
|
45
|
+
],
|
|
46
|
+
|
|
23
47
|
data () {
|
|
24
48
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
49
|
+
mx_errors: {},
|
|
50
|
+
mx_fields: {},
|
|
51
|
+
mx_metadata: {},
|
|
28
52
|
|
|
29
|
-
|
|
53
|
+
mx_isFetching: false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
watch: {
|
|
58
|
+
mx_isFetching (value) {
|
|
59
|
+
this.$emit('update:fetching', value)
|
|
30
60
|
}
|
|
31
61
|
},
|
|
32
62
|
|
|
33
63
|
computed: {
|
|
34
|
-
|
|
64
|
+
mx_componentTag () {
|
|
35
65
|
return this.dialog ? 'div' : 'q-page'
|
|
36
66
|
},
|
|
37
67
|
|
|
38
|
-
|
|
39
|
-
return
|
|
68
|
+
mx_componentClass () {
|
|
69
|
+
return !this.dialog && 'container spaced'
|
|
40
70
|
},
|
|
41
71
|
|
|
42
|
-
|
|
43
|
-
return !!(this.$slots.
|
|
72
|
+
mx_hasFooterSlot () {
|
|
73
|
+
return !!(this.$slots.footer)
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
mx_hasHeaderSlot () {
|
|
77
|
+
return !!(this.$slots.header)
|
|
44
78
|
}
|
|
45
79
|
},
|
|
46
80
|
|
|
47
81
|
methods: {
|
|
48
|
-
|
|
82
|
+
mx_fetchError (error) {
|
|
49
83
|
const { response } = error
|
|
50
|
-
const exception =
|
|
84
|
+
const exception = response?.data?.exception || error.message
|
|
51
85
|
|
|
52
|
-
|
|
86
|
+
this.$qas.error('Ops! Erro ao obter os dados.', exception)
|
|
53
87
|
|
|
54
|
-
const status =
|
|
88
|
+
const status = response?.status
|
|
55
89
|
const redirect = ({ 403: 'Forbidden', 404: 'NotFound' })[status]
|
|
56
90
|
|
|
57
91
|
if (redirect) {
|
|
@@ -59,20 +93,26 @@ export default {
|
|
|
59
93
|
}
|
|
60
94
|
},
|
|
61
95
|
|
|
62
|
-
|
|
63
|
-
this.
|
|
96
|
+
mx_setErrors (errors = {}) {
|
|
97
|
+
this.mx_errors = markRaw(errors)
|
|
64
98
|
},
|
|
65
99
|
|
|
66
|
-
|
|
100
|
+
mx_setFields (fields = {}) {
|
|
67
101
|
for (const field in fields) {
|
|
68
102
|
fields[field].name = camelize(fields[field].name)
|
|
69
103
|
}
|
|
70
104
|
|
|
71
|
-
this.
|
|
105
|
+
this.mx_fields = markRaw(fields)
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
mx_setMetadata (metadata = {}) {
|
|
109
|
+
this.mx_metadata = markRaw(metadata)
|
|
72
110
|
},
|
|
73
111
|
|
|
74
|
-
|
|
75
|
-
|
|
112
|
+
mx_updateModels (models) {
|
|
113
|
+
for (const key in models) {
|
|
114
|
+
this.$emit(`update:${key}`, models[key])
|
|
115
|
+
}
|
|
76
116
|
}
|
|
77
117
|
}
|
|
78
118
|
}
|
|
@@ -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
|
+
}
|
package/src/plugins/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Dialog from './dialog/Dialog.js'
|
|
2
|
+
import NotifyError from './notify-error/NotifyError.js'
|
|
3
|
+
import NotifySuccess from './notify-success/NotifySuccess.js'
|
|
3
4
|
|
|
4
5
|
export {
|
|
6
|
+
Dialog,
|
|
5
7
|
NotifyError,
|
|
6
8
|
NotifySuccess
|
|
7
9
|
}
|
|
File without changes
|
|
@@ -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
|
}
|
|
@@ -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
|
-
}
|