quasar-factory-lib 0.0.58 → 0.0.59
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/NavBarSkeleton/NavBarSkeleton.vue.d.ts +12 -0
- package/dist/components/NavBarSkeleton/index.d.ts +8 -0
- package/dist/components/TableRowsCounter/TableRowsCounter.vue.d.ts +12 -0
- package/dist/components/TableRowsCounter/index.d.ts +8 -0
- package/dist/components/TaskNavBar/TaskNavBar.vue.d.ts +9 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/plugins.d.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/layouts/PdaLayout.vue.d.ts +20 -0
- package/dist/pages/NavBarPage.vue.d.ts +10 -0
- package/dist/quasar-factory-lib.js +3360 -3217
- package/dist/quasar-factory-lib.umd.cjs +11 -11
- package/package.json +1 -1
- package/src/components/NavBarSkeleton/NavBarSkeleton.vue +57 -0
- package/src/components/NavBarSkeleton/index.ts +19 -0
- package/src/components/TableRowsCounter/TableRowsCounter.vue +33 -0
- package/src/components/TableRowsCounter/index.ts +19 -0
- package/src/components/TaskNavBar/TaskNavBar.vue +6 -0
- package/src/components/index.ts +3 -1
- package/src/components/plugins.ts +3 -1
- package/src/index.ts +4 -2
- package/src/layouts/PdaLayout.vue +8 -1
- package/src/pages/NavBarPage.vue +7 -3
package/package.json
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<q-card style="width: 100%" class="q-mb-sm">
|
|
4
|
+
<q-item>
|
|
5
|
+
<q-item-section>
|
|
6
|
+
<q-item-label>
|
|
7
|
+
<q-skeleton size="20px" class="float-right"/>
|
|
8
|
+
<q-skeleton type="text" width="100px" height="50px" />
|
|
9
|
+
<q-skeleton type="text" width="250px" />
|
|
10
|
+
</q-item-label>
|
|
11
|
+
</q-item-section>
|
|
12
|
+
</q-item>
|
|
13
|
+
<q-item v-if="!smallDevice">
|
|
14
|
+
<q-item-section>
|
|
15
|
+
<q-item-label>
|
|
16
|
+
<q-skeleton
|
|
17
|
+
type="QInput"
|
|
18
|
+
width="200px"
|
|
19
|
+
height="40px"
|
|
20
|
+
class="float-left q-mr-md"
|
|
21
|
+
/>
|
|
22
|
+
<q-skeleton
|
|
23
|
+
type="QInput"
|
|
24
|
+
width="200px"
|
|
25
|
+
height="40px"
|
|
26
|
+
class="float-left"
|
|
27
|
+
/>
|
|
28
|
+
</q-item-label>
|
|
29
|
+
</q-item-section>
|
|
30
|
+
</q-item>
|
|
31
|
+
<q-item v-if="!smallDevice">
|
|
32
|
+
<q-item-section>
|
|
33
|
+
<q-item-label>
|
|
34
|
+
<q-skeleton
|
|
35
|
+
type="text"
|
|
36
|
+
width="30px"
|
|
37
|
+
/>
|
|
38
|
+
</q-item-label>
|
|
39
|
+
</q-item-section>
|
|
40
|
+
</q-item>
|
|
41
|
+
</q-card>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
<style>
|
|
45
|
+
|
|
46
|
+
</style>
|
|
47
|
+
<script>
|
|
48
|
+
export default {
|
|
49
|
+
name: 'ToolbarSkeleton',
|
|
50
|
+
props: {
|
|
51
|
+
smallDevice: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
required: true
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { App, Plugin } from 'vue'
|
|
2
|
+
|
|
3
|
+
import NavBarSkeleton from './NavBarSkeleton.vue'
|
|
4
|
+
|
|
5
|
+
import { registerComponent } from '@/utils/plugins'
|
|
6
|
+
|
|
7
|
+
/** export button specific types */
|
|
8
|
+
// export type * from './types'
|
|
9
|
+
|
|
10
|
+
/** export button plugin */
|
|
11
|
+
export default {
|
|
12
|
+
install (app: App) {
|
|
13
|
+
registerComponent(app, 'NavBarSkeleton', NavBarSkeleton)
|
|
14
|
+
}
|
|
15
|
+
} as Plugin
|
|
16
|
+
|
|
17
|
+
/** export button components */
|
|
18
|
+
export { NavBarSkeleton as NavBarSkeleton }
|
|
19
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<q-toolbar class="q-px-none q-py-none">
|
|
4
|
+
<div v-for="(item, index) in counterJson" :key="index" class="inline q-mr-md">
|
|
5
|
+
<span :data-cy="item.dataCy"
|
|
6
|
+
style="font-size: 20px; padding-right: 5px;"
|
|
7
|
+
:class="item.extraClasses">{{ item.qty }}</span>
|
|
8
|
+
<span style="font-size: 12px;">{{ $t(item.title) }}</span>
|
|
9
|
+
</div>
|
|
10
|
+
</q-toolbar>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
import { defineComponent } from 'vue'
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
name: 'TableRowsCounter',
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
counterJson: {
|
|
24
|
+
type: Array,
|
|
25
|
+
required: true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
<style>
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { App, Plugin } from 'vue'
|
|
2
|
+
|
|
3
|
+
import TableRowsCounter from './TableRowsCounter.vue'
|
|
4
|
+
|
|
5
|
+
import { registerComponent } from '@/utils/plugins'
|
|
6
|
+
|
|
7
|
+
/** export button specific types */
|
|
8
|
+
// export type * from './types'
|
|
9
|
+
|
|
10
|
+
/** export button plugin */
|
|
11
|
+
export default {
|
|
12
|
+
install (app: App) {
|
|
13
|
+
registerComponent(app, 'TableRowsCounter', TableRowsCounter)
|
|
14
|
+
}
|
|
15
|
+
} as Plugin
|
|
16
|
+
|
|
17
|
+
/** export button components */
|
|
18
|
+
export { TableRowsCounter as TableRowsCounter }
|
|
19
|
+
|
|
@@ -56,6 +56,8 @@ import { defineComponent } from 'vue'
|
|
|
56
56
|
import { date } from 'quasar'
|
|
57
57
|
export default defineComponent({
|
|
58
58
|
name: 'TaskNavBar',
|
|
59
|
+
components: {
|
|
60
|
+
},
|
|
59
61
|
data() {
|
|
60
62
|
return {
|
|
61
63
|
date,
|
|
@@ -79,6 +81,10 @@ export default defineComponent({
|
|
|
79
81
|
showBtnSearch: {
|
|
80
82
|
type: Boolean,
|
|
81
83
|
default: true
|
|
84
|
+
},
|
|
85
|
+
showSkeleton: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: true
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
90
|
emits: ['onClickBtnMenu', 'onClickBtnSearch', 'onClickBtnBack'],
|
package/src/components/index.ts
CHANGED
|
@@ -3,5 +3,7 @@ import AlertDialog from './Alert'
|
|
|
3
3
|
import ConfirmDialog from './Confirm'
|
|
4
4
|
import TaskNavBar from './TaskNavBar'
|
|
5
5
|
import ConfirmedTask from './ConfirmedTask'
|
|
6
|
-
|
|
6
|
+
import TableRowsCounter from './TableRowsCounter'
|
|
7
|
+
import NavBarSkeleton from './NavBarSkeleton'
|
|
8
|
+
export { MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask, TableRowsCounter, NavBarSkeleton }
|
|
7
9
|
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '@quasar/extras/material-icons/material-icons.css'
|
|
2
2
|
import { Quasar } from 'quasar'
|
|
3
3
|
import { App, Plugin } from 'vue'
|
|
4
|
-
import { MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask } from './components/plugins.ts'
|
|
4
|
+
import { MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask, TableRowsCounter, NavBarSkeleton} from './components/plugins.ts'
|
|
5
5
|
import { registerPlugin, setVueInstance } from './utils/plugins.ts'
|
|
6
6
|
import TranslateKeys from './i18n/translateKeys.ts'
|
|
7
7
|
import { createPinia } from 'pinia'
|
|
8
|
-
export { MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask } from './components/index.ts'
|
|
8
|
+
export { MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask, TableRowsCounter, NavBarSkeleton } from './components/index.ts'
|
|
9
9
|
|
|
10
10
|
export type { TranslateKeys }
|
|
11
11
|
// import plugins from "./components/plugins";
|
|
@@ -26,6 +26,8 @@ const plugin: Plugin = {
|
|
|
26
26
|
registerPlugin(app, ConfirmDialog)
|
|
27
27
|
registerPlugin(app, TaskNavBar)
|
|
28
28
|
registerPlugin(app, ConfirmedTask)
|
|
29
|
+
registerPlugin(app, TableRowsCounter)
|
|
30
|
+
registerPlugin(app, NavBarSkeleton)
|
|
29
31
|
app.use(i18n)
|
|
30
32
|
app.use(pinia)
|
|
31
33
|
i18n.global.locale = 'en'
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
@on-click-btn-search="toggleSearchVisibility"
|
|
17
17
|
@on-click-btn-menu="toogleColumnsSelectorVisibility">
|
|
18
18
|
</TaskNavBar>
|
|
19
|
+
<TableRowsCounter :counterJson="[
|
|
20
|
+
{ qty: 1, title: 'Total', dataCy: 'datacy', extraClasses: 'class'},
|
|
21
|
+
{ qty: 10, title: 'Total2', dataCy: 'datacy', extraClasses: 'text-color-positive'},
|
|
22
|
+
{ qty: 30, title: 'Total3', dataCy: 'datacy', extraClasses: 'text-color-negative-bold'}
|
|
23
|
+
]"/>
|
|
19
24
|
</div>
|
|
20
25
|
</q-header>
|
|
21
26
|
<q-page-container>
|
|
@@ -60,6 +65,7 @@
|
|
|
60
65
|
import TaskNavBar from '../components/TaskNavBar/TaskNavBar.vue'
|
|
61
66
|
import Table from '../components/Table/Table.vue'
|
|
62
67
|
import SideBar from '../components/TaskNavBar/SideBar.vue'
|
|
68
|
+
import TableRowsCounter from'../components/TableRowsCounter/TableRowsCounter.vue'
|
|
63
69
|
import setTableHeight from '../components/Table/utils/setTableHeight'
|
|
64
70
|
import infiniteScroll from '../components/Table/utils/infiniteScroll'
|
|
65
71
|
import { tableStore } from '../store/table.js'
|
|
@@ -67,7 +73,8 @@ export default {
|
|
|
67
73
|
components: {
|
|
68
74
|
TaskNavBar,
|
|
69
75
|
SideBar,
|
|
70
|
-
Table
|
|
76
|
+
Table,
|
|
77
|
+
TableRowsCounter
|
|
71
78
|
},
|
|
72
79
|
data () {
|
|
73
80
|
return {
|
package/src/pages/NavBarPage.vue
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
<q-header class="bg-main-color text-black">
|
|
11
11
|
<TaskNavBar
|
|
12
12
|
:logo="'src/assets/vue.svg'"
|
|
13
|
-
:title="'Testing new navbar'"
|
|
13
|
+
:title="'Testing new navbar'"
|
|
14
|
+
:showSkeleton="showSkeleton">
|
|
14
15
|
</TaskNavBar>
|
|
15
16
|
</q-header>
|
|
16
17
|
</div>
|
|
@@ -27,13 +28,16 @@ export default {
|
|
|
27
28
|
},
|
|
28
29
|
data () {
|
|
29
30
|
return {
|
|
30
|
-
rightDrawerOpen: false
|
|
31
|
+
rightDrawerOpen: false,
|
|
32
|
+
showSkeleton: true
|
|
31
33
|
}
|
|
32
34
|
},
|
|
33
35
|
computed: {
|
|
34
36
|
},
|
|
35
37
|
mounted () {
|
|
36
|
-
|
|
38
|
+
// setTimeout(() => {
|
|
39
|
+
// this.showSkeleton = false
|
|
40
|
+
// }, 1000)
|
|
37
41
|
},
|
|
38
42
|
methods: {
|
|
39
43
|
}
|