quasar-factory-lib 0.0.19 → 0.0.20
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/components/Confirm/ConfirmDialog.vue.d.ts +4 -112
- package/dist/i18n/en/index.d.ts +4 -1
- package/dist/i18n/es/index.d.ts +4 -1
- package/dist/i18n/index.d.ts +8 -2
- package/dist/pages/ConfirmPage.vue.d.ts +5 -113
- package/dist/quasar-factory-lib.js +1743 -1813
- package/dist/quasar-factory-lib.umd.cjs +11 -11
- package/dist/store/index.d.ts +1 -2
- package/dist/store/plugin.d.ts +2 -0
- package/dist/store/table.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/Confirm/ConfirmDialog.vue +13 -63
- package/src/i18n/en/index.ts +5 -2
- package/src/i18n/es/index.ts +16 -13
- package/src/pages/ConfirmPage.vue +7 -13
- package/src/pages/TablePage.vue +1 -1
- package/src/store/index.ts +1 -0
- package/src/store/plugin.ts +3 -0
- package/src/store/table.js +3 -1
package/dist/store/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export default
|
|
2
|
-
declare const pinia: import("pinia").Pinia;
|
|
1
|
+
export { default as tableStore } from './table.js';
|
package/dist/store/table.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export default tableStore;
|
|
2
|
+
declare const tableStore: import("pinia").StoreDefinition<"tableStore", {
|
|
2
3
|
disableScannerButtons: import("@vueuse/shared").RemovableRef<boolean>;
|
|
3
4
|
filterValue: import("@vueuse/shared").RemovableRef<string>;
|
|
4
5
|
lastFilterValue: import("@vueuse/shared").RemovableRef<string>;
|
package/package.json
CHANGED
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-dialog v-model="alert"
|
|
2
|
+
<q-dialog v-model="alert" persistent>
|
|
3
3
|
<q-card class="alert-card" :data-cy="dataCy">
|
|
4
4
|
<q-card-section class="row items-center">
|
|
5
|
-
<q-avatar
|
|
6
|
-
:icon="avatarIcon"
|
|
7
|
-
:color="avatarColor"
|
|
8
|
-
:text-color="avatarTextColor"
|
|
9
|
-
:size="avatarSize"
|
|
10
|
-
:font-size="avatarFontSize"
|
|
11
|
-
/>
|
|
12
5
|
<span class="q-ml-sm text-body1">{{ message }}</span>
|
|
13
6
|
</q-card-section>
|
|
14
7
|
<q-card-actions align="right">
|
|
15
8
|
<q-btn
|
|
16
|
-
|
|
9
|
+
color="negative"
|
|
17
10
|
flat
|
|
18
|
-
:label="
|
|
11
|
+
:label="$t('confirmDialog.cancel')"
|
|
19
12
|
@click="onClickBtnCancel()"
|
|
20
13
|
data-cy="cancel"
|
|
21
14
|
/>
|
|
22
15
|
<q-btn
|
|
23
|
-
|
|
16
|
+
color="positive"
|
|
24
17
|
flat
|
|
25
|
-
:label="
|
|
18
|
+
:label="$t('confirmDialog.confirm')"
|
|
26
19
|
@click="onClickBtnConfirm()"
|
|
27
20
|
data-cy="confirm"
|
|
28
21
|
/>
|
|
@@ -55,56 +48,19 @@ export default defineComponent({
|
|
|
55
48
|
}
|
|
56
49
|
},
|
|
57
50
|
props: {
|
|
58
|
-
persistent: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: true,
|
|
61
|
-
},
|
|
62
51
|
dataCy: {
|
|
63
52
|
type: String,
|
|
64
53
|
default: '',
|
|
65
54
|
},
|
|
66
|
-
|
|
67
|
-
type:
|
|
68
|
-
default:
|
|
69
|
-
required: true,
|
|
70
|
-
},
|
|
71
|
-
labelBtnCancel: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: '',
|
|
74
|
-
required: true,
|
|
75
|
-
},
|
|
76
|
-
confirmBtnColor: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: '',
|
|
79
|
-
required: true,
|
|
80
|
-
},
|
|
81
|
-
labelBtnConfirm: {
|
|
82
|
-
type: String,
|
|
83
|
-
default: '',
|
|
84
|
-
required: true,
|
|
85
|
-
},
|
|
86
|
-
avatarIcon: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: 'warning',
|
|
89
|
-
},
|
|
90
|
-
avatarSize: {
|
|
91
|
-
type: String,
|
|
92
|
-
default: 'md',
|
|
93
|
-
},
|
|
94
|
-
avatarColor: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: '',
|
|
97
|
-
},
|
|
98
|
-
avatarTextColor: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: 'primary',
|
|
101
|
-
},
|
|
102
|
-
avatarFontSize: {
|
|
103
|
-
type: String,
|
|
104
|
-
default: '18px',
|
|
55
|
+
onClickBtnConfirm: {
|
|
56
|
+
type: Function,
|
|
57
|
+
default: function () { },
|
|
105
58
|
},
|
|
59
|
+
onClickBtnCancel: {
|
|
60
|
+
type: Function,
|
|
61
|
+
default: function () { },
|
|
62
|
+
}
|
|
106
63
|
},
|
|
107
|
-
emit: ['onClickBtnCancel', 'onClickBtnConfirm'],
|
|
108
64
|
methods: {
|
|
109
65
|
openDialogAndSetMessage(msg: string): void {
|
|
110
66
|
this.alert = true
|
|
@@ -112,13 +68,7 @@ export default defineComponent({
|
|
|
112
68
|
},
|
|
113
69
|
closeAlert() {
|
|
114
70
|
this.alert = false
|
|
115
|
-
}
|
|
116
|
-
onClickBtnCancel() {
|
|
117
|
-
this.closeAlert()
|
|
118
|
-
},
|
|
119
|
-
onClickBtnConfirm() {
|
|
120
|
-
this.closeAlert()
|
|
121
|
-
},
|
|
71
|
+
}
|
|
122
72
|
}
|
|
123
73
|
})
|
|
124
74
|
</script>
|
package/src/i18n/en/index.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
// import translateKeys from '../translateKeys'
|
|
2
2
|
|
|
3
3
|
// const en: translateKeys = {
|
|
4
|
-
|
|
5
|
-
test: 'Test',
|
|
4
|
+
const en = {
|
|
6
5
|
table: {
|
|
7
6
|
search: 'Search',
|
|
8
7
|
cancel: 'Cancel',
|
|
9
8
|
confirm: 'Save'
|
|
10
9
|
},
|
|
10
|
+
confirmDialog: {
|
|
11
|
+
cancel: 'Cancel',
|
|
12
|
+
confirm: 'Confirm'
|
|
13
|
+
},
|
|
11
14
|
form: {
|
|
12
15
|
rules: {
|
|
13
16
|
emptyField: 'The field cannot be empty',
|
package/src/i18n/es/index.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
// import translateKeys from "../translateKeys"
|
|
2
2
|
|
|
3
3
|
// const es: translateKeys = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
const es = {
|
|
5
|
+
table: {
|
|
6
|
+
search: 'Buscar',
|
|
7
|
+
cancel: 'Cancelar',
|
|
8
|
+
confirm: 'Guardar'
|
|
9
|
+
},
|
|
10
|
+
confirmDialog: {
|
|
11
|
+
cancel: 'Cancelar',
|
|
12
|
+
confirm: 'Confirmar'
|
|
13
|
+
},
|
|
14
|
+
form: {
|
|
15
|
+
rules: {
|
|
16
|
+
emptyField: 'El campo no puede estar vacío',
|
|
17
|
+
exceedCharactersTypeList: 'El campo no debe exceder más de {0} caracteres'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
export default es
|
|
@@ -9,16 +9,8 @@
|
|
|
9
9
|
>
|
|
10
10
|
<ConfirmDialog
|
|
11
11
|
ref="ConfirmRef"
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
@onClickBtnCancel="onClickBtnCancel"
|
|
15
|
-
:confirmBtnColor="'positive'"
|
|
16
|
-
:labelBtnConfirm="'Confirmar'"
|
|
17
|
-
@onClickBtnConfirm="onClickBtnConfirm"
|
|
18
|
-
:avatarIcon="'warning'"
|
|
19
|
-
:avatarSize="'xl'"
|
|
20
|
-
:avatarFontSize="'40px'"
|
|
21
|
-
:avatarTextColor="'primary'"
|
|
12
|
+
:onClickBtnConfirm="onClickBtnConfirm"
|
|
13
|
+
:onClickBtnCancel="onClickBtnCancel"
|
|
22
14
|
/>
|
|
23
15
|
</div>
|
|
24
16
|
</q-page>
|
|
@@ -41,11 +33,13 @@ export default {
|
|
|
41
33
|
this.$refs.ConfirmRef.openDialogAndSetMessage("Confirm")
|
|
42
34
|
},
|
|
43
35
|
methods: {
|
|
44
|
-
onClickBtnCancel() {
|
|
45
|
-
console.log('cancel')
|
|
46
|
-
},
|
|
47
36
|
onClickBtnConfirm() {
|
|
48
37
|
console.log('confirm')
|
|
38
|
+
this.$refs.ConfirmRef.closeAlert()
|
|
39
|
+
},
|
|
40
|
+
onClickBtnCancel() {
|
|
41
|
+
this.$refs.ConfirmRef.closeAlert()
|
|
42
|
+
console.log('cancel')
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
45
|
}
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -50,7 +50,7 @@ import Table from '../components/Table/Table.vue'
|
|
|
50
50
|
import setTableHeight from '../components/Table/utils/setTableHeight'
|
|
51
51
|
import infiniteScroll from '../components/Table/utils/infiniteScroll'
|
|
52
52
|
import FilterMethod from '../components/Table/utils/filterMethod'
|
|
53
|
-
import
|
|
53
|
+
import tableStore from '../store/table.js'
|
|
54
54
|
export default {
|
|
55
55
|
components: {
|
|
56
56
|
Table
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as tableStore } from './table.js';
|
package/src/store/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore } from 'pinia'
|
|
2
2
|
import { useStorage } from '@vueuse/core'
|
|
3
|
-
|
|
3
|
+
const tableStore = defineStore('tableStore', {
|
|
4
4
|
state: () => ({
|
|
5
5
|
disableScannerButtons: useStorage('counter', false),
|
|
6
6
|
filterValue: useStorage('filterValue', ''),
|
|
@@ -21,3 +21,5 @@ export const tableStore = defineStore('tableStore', {
|
|
|
21
21
|
|
|
22
22
|
}
|
|
23
23
|
})
|
|
24
|
+
|
|
25
|
+
export default tableStore
|