quasar-factory-lib 0.0.36 → 0.0.37
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/Table/Table.vue.d.ts +1 -1
- package/dist/components/TaskNavBar/TaskNavBar.vue.d.ts +0 -1
- package/dist/pages/NavBarPage.vue.d.ts +0 -1
- package/dist/pages/TablePage.vue.d.ts +5 -18
- package/dist/quasar-factory-lib.js +1801 -1783
- package/dist/quasar-factory-lib.umd.cjs +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Table/Table.vue +6 -3
- package/src/components/Table/components/TableSlotBody.vue +4 -4
- package/src/components/Table/components/TableSlotGrid.vue +3 -5
- package/src/components/Table/components/TableSlotHeader.vue +0 -1
- package/src/components/TaskNavBar/TaskNavBar.vue +9 -16
- package/src/components/TaskNavBar/css/taskNavBar.css +8 -14
- package/src/css/app.css +0 -18
- package/src/pages/TablePage.vue +31 -51
package/package.json
CHANGED
|
@@ -258,13 +258,15 @@ export default defineComponent({
|
|
|
258
258
|
this.$emit('onUpdateCustomizedCheckboxValue', row)
|
|
259
259
|
},
|
|
260
260
|
clearTableSelection () {
|
|
261
|
+
// const table = this.$refs.myTable as QTable
|
|
262
|
+
// table.clearSelection()
|
|
261
263
|
this.selected = []
|
|
262
264
|
},
|
|
263
|
-
toggleSearchVisibility (store: {disableScannerButtons: boolean, lastFilterValue: string,
|
|
265
|
+
toggleSearchVisibility (store: {disableScannerButtons: boolean, lastFilterValue: string, valueInputFilterTable: string}) {
|
|
264
266
|
this.showSearch = !this.showSearch
|
|
265
267
|
store.disableScannerButtons = false
|
|
266
268
|
store.lastFilterValue = ''
|
|
267
|
-
store.
|
|
269
|
+
store.valueInputFilterTable = ''
|
|
268
270
|
},
|
|
269
271
|
toogleColumnsSelectorVisibility () {
|
|
270
272
|
this.showColumnsSelector = !this.showColumnsSelector
|
|
@@ -282,7 +284,7 @@ export default defineComponent({
|
|
|
282
284
|
sortMethod (rows: object[], sortBy: string, descending: boolean): object[] | [] {
|
|
283
285
|
const allrowsSorted = TableSort.sortMethod(rows, sortBy, descending, this.sortDataValues)
|
|
284
286
|
const rowsSliced = allrowsSorted.slice(0, rows.length)
|
|
285
|
-
if (this.store.
|
|
287
|
+
if (this.store.valueInputFilterTable === '') {
|
|
286
288
|
return rowsSliced
|
|
287
289
|
} else {
|
|
288
290
|
return TableSort.sortMethod(rows, sortBy, descending, this.sortDataValues)
|
|
@@ -292,4 +294,5 @@ export default defineComponent({
|
|
|
292
294
|
})
|
|
293
295
|
</script>
|
|
294
296
|
<style>
|
|
297
|
+
/* @import url('./style.css'); */
|
|
295
298
|
</style>
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
:key="col.name"
|
|
18
18
|
:class="tableProps.row.rowBgColor || 'bg-main-color'"
|
|
19
19
|
:props="tableProps"
|
|
20
|
+
:style="tablePropsData.row.tdStyle"
|
|
20
21
|
>
|
|
21
22
|
<span
|
|
22
23
|
v-if="getColumnValue(col)"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
></span>
|
|
24
|
+
v-html="tableProps.row[col.name]"
|
|
25
|
+
/>
|
|
26
26
|
<!-- fa-solid fa-pen-to-square -->
|
|
27
27
|
<q-icon
|
|
28
28
|
v-if="col.editable"
|
|
29
29
|
name="edit"
|
|
30
30
|
color="primary"
|
|
31
|
-
size="
|
|
31
|
+
size="sm"
|
|
32
32
|
class="cursor-pointer"
|
|
33
33
|
/>
|
|
34
34
|
<TablePopupEdit
|
|
@@ -38,15 +38,13 @@
|
|
|
38
38
|
<q-item-section side>
|
|
39
39
|
<q-item-label
|
|
40
40
|
v-if="getColumnValue(col)"
|
|
41
|
-
|
|
42
|
-
tableProps.row.customizedTextClass ? tableProps.row.customizedTextClass : 'itemsFontSize text-almost-black',
|
|
43
|
-
]"
|
|
41
|
+
class="itemsFontSize text-almost-black"
|
|
44
42
|
>
|
|
45
43
|
<q-icon
|
|
46
44
|
v-if="col.editable"
|
|
47
|
-
name="
|
|
45
|
+
name="fa-solid fa-pen-to-square"
|
|
48
46
|
color="primary"
|
|
49
|
-
size="
|
|
47
|
+
size="sm"
|
|
50
48
|
class="cursor-pointer"
|
|
51
49
|
/>
|
|
52
50
|
<span v-html="tableProps.row[col.name]" />
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div id="taskNavBar">
|
|
3
3
|
<q-toolbar class="q-toolbar-unset-height">
|
|
4
4
|
<div class="row full-width">
|
|
5
|
-
<div class="col-
|
|
5
|
+
<div class="col-6">
|
|
6
6
|
<img :src="logo" class="logo">
|
|
7
|
-
<span id="mobile-title">{{ title }}</span>
|
|
8
7
|
</div>
|
|
9
|
-
<div class="col-
|
|
10
|
-
|
|
8
|
+
<div class="col-6 text-right" id="buttons">
|
|
9
|
+
<q-btn v-if="showBtnBack" flat round size="lg" @click="onClickBtnBack">
|
|
10
|
+
<q-icon>
|
|
11
11
|
<svg class="text-h4" xmlns="http://www.w3.org/2000/svg" width="30" height="30"
|
|
12
12
|
viewBox="0 0 23.648 22.836">
|
|
13
13
|
<g id="Arrow_brand" data-name="Arrow brand" transform="translate(0 22.836) rotate(-90)">
|
|
@@ -17,15 +17,10 @@
|
|
|
17
17
|
</g>
|
|
18
18
|
</svg>
|
|
19
19
|
</q-icon>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
size="md"
|
|
25
|
-
class="q-ml-md cursor-pointer"
|
|
26
|
-
@click="onClickBtnSearch">
|
|
27
|
-
</q-icon>
|
|
28
|
-
<q-icon id="iconMenu" size="md" @click="onClickBtnMenu" class="q-ml-md cursor-pointer">
|
|
20
|
+
</q-btn>
|
|
21
|
+
<q-btn v-if="showBtnSearch" color="primary" flat round icon="search" size="lg" @click="onClickBtnSearch" />
|
|
22
|
+
<q-btn flat round size="lg" @click="onClickBtnMenu">
|
|
23
|
+
<q-icon id="menu">
|
|
29
24
|
<svg xmlns="http://www.w3.org/2000/svg" width="30.448" height="28.247" viewBox="0 0 30.448 28.247">
|
|
30
25
|
<g id="Componente_11_3" data-name="Componente 11 – 3" transform="translate(0 1)">
|
|
31
26
|
<path id="Caminho_702" data-name="Caminho 702" d="M38.053,40.174H24"
|
|
@@ -40,7 +35,7 @@
|
|
|
40
35
|
</g>
|
|
41
36
|
</svg>
|
|
42
37
|
</q-icon>
|
|
43
|
-
|
|
38
|
+
</q-btn>
|
|
44
39
|
</div>
|
|
45
40
|
</div>
|
|
46
41
|
</q-toolbar>
|
|
@@ -58,7 +53,6 @@ export default defineComponent({
|
|
|
58
53
|
data() {
|
|
59
54
|
return {
|
|
60
55
|
date,
|
|
61
|
-
showIconSearch: true,
|
|
62
56
|
rightDrawerOpen: false
|
|
63
57
|
}
|
|
64
58
|
},
|
|
@@ -87,7 +81,6 @@ export default defineComponent({
|
|
|
87
81
|
console.log('menu')
|
|
88
82
|
},
|
|
89
83
|
onClickBtnSearch() {
|
|
90
|
-
this.showIconSearch = !this.showIconSearch
|
|
91
84
|
this.$emit('onClickBtnSearch')
|
|
92
85
|
console.log('search')
|
|
93
86
|
},
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
#taskNavBar .logo {
|
|
2
2
|
display: block;
|
|
3
3
|
width: 125px;
|
|
4
|
-
height:
|
|
4
|
+
height: 50px;
|
|
5
5
|
background-position: center;
|
|
6
6
|
background-repeat: no-repeat;
|
|
7
7
|
background-size: contain;
|
|
8
8
|
margin-bottom: 10px;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
font-family: "SangBleuKingdom-Light, sans-serif";
|
|
13
|
-
font-size: 25px;
|
|
14
|
-
margin: 0;
|
|
10
|
+
#taskNavBar #buttons .q-img {
|
|
11
|
+
margin-left: 20px;
|
|
15
12
|
}
|
|
16
13
|
|
|
17
|
-
#
|
|
18
|
-
|
|
14
|
+
#taskNavBar .q-toolbar__title {
|
|
15
|
+
font-family: "SangBleuKingdom-Light, sans-serif";
|
|
16
|
+
font-size: 25px;
|
|
17
|
+
margin: 0;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
@media only screen and (max-width: 1100px) {
|
|
@@ -25,14 +24,9 @@
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
@media only screen and (max-width: 375px) {
|
|
28
|
-
#taskNavBar .logo
|
|
27
|
+
#taskNavBar .logo {
|
|
29
28
|
display: none;
|
|
30
29
|
}
|
|
31
|
-
#mobile-title {
|
|
32
|
-
display: block;
|
|
33
|
-
font-family: "SangBleuKingdom-Light, sans-serif";
|
|
34
|
-
font-size: 20px;
|
|
35
|
-
}
|
|
36
30
|
#taskNavBar .q-toolbar__title {
|
|
37
31
|
font-size: 18px;
|
|
38
32
|
}
|
package/src/css/app.css
CHANGED
|
@@ -37,22 +37,4 @@
|
|
|
37
37
|
.q-toolbar-unset-height .q-toolbar {
|
|
38
38
|
min-height: unset;
|
|
39
39
|
padding: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.text-color-positive {
|
|
43
|
-
color: var(--positive);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.bg-negative {
|
|
47
|
-
background-color: var(--negative);
|
|
48
|
-
}
|
|
49
|
-
.bg-positive {
|
|
50
|
-
background-color: var(--positive);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.text-negative {
|
|
54
|
-
color: var(--negative);
|
|
55
|
-
}
|
|
56
|
-
.text-positive {
|
|
57
|
-
color: var(--positive);
|
|
58
40
|
}
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -4,21 +4,17 @@
|
|
|
4
4
|
class="full-width column justify-center align-center items-center"
|
|
5
5
|
style="height: 70vh;"
|
|
6
6
|
>
|
|
7
|
-
<q-btn @click="()=> {
|
|
8
|
-
smallDevice = ! smallDevice
|
|
9
|
-
}">Change Device</q-btn>
|
|
10
7
|
<div
|
|
11
8
|
class="full-width"
|
|
12
9
|
>
|
|
13
10
|
<Table
|
|
14
|
-
ref="table"
|
|
15
11
|
:rows="rows"
|
|
16
12
|
:columns="columns"
|
|
17
13
|
:visible-columns="visibleColumns"
|
|
18
|
-
:small-device="
|
|
14
|
+
:small-device="false"
|
|
19
15
|
:store="store"
|
|
20
16
|
:table-style="tableStyle"
|
|
21
|
-
:show-skeleton="
|
|
17
|
+
:show-skeleton="false"
|
|
22
18
|
:selection-type="'multiple'"
|
|
23
19
|
:filter-method="filterMethod"
|
|
24
20
|
:filter-computed="filter"
|
|
@@ -27,12 +23,30 @@
|
|
|
27
23
|
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
28
24
|
@on-click-button="setItemNotFound"
|
|
29
25
|
/>
|
|
26
|
+
<q-dialog v-model="showDialog" >
|
|
27
|
+
<div>
|
|
28
|
+
<q-btn @click="close">Close</q-btn>
|
|
29
|
+
<Table
|
|
30
|
+
:rows="rows"
|
|
31
|
+
:columns="columns"
|
|
32
|
+
:visible-columns="visibleColumns"
|
|
33
|
+
:small-device="false"
|
|
34
|
+
:store="store"
|
|
35
|
+
:table-style="tableStyle"
|
|
36
|
+
:show-skeleton="false"
|
|
37
|
+
:selection-type="'multiple'"
|
|
38
|
+
:filter-method="filterMethod"
|
|
39
|
+
:filter-computed="filter"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</q-dialog>
|
|
30
43
|
</div>
|
|
31
44
|
</q-page>
|
|
32
45
|
</q-page-container>
|
|
33
46
|
</template>
|
|
34
47
|
<script lang="ts">
|
|
35
48
|
import Table from '../components/Table/Table.vue'
|
|
49
|
+
// import rows from '../testData.js'
|
|
36
50
|
import setTableHeight from '../components/Table/utils/setTableHeight'
|
|
37
51
|
import infiniteScroll from '../components/Table/utils/infiniteScroll'
|
|
38
52
|
import FilterMethod from '../components/Table/utils/filterMethod'
|
|
@@ -43,8 +57,6 @@ export default {
|
|
|
43
57
|
},
|
|
44
58
|
data () {
|
|
45
59
|
return {
|
|
46
|
-
smallDevice: false,
|
|
47
|
-
showSkeleton: true,
|
|
48
60
|
showDialog: false,
|
|
49
61
|
forceRender: false,
|
|
50
62
|
store: tableStore(),
|
|
@@ -56,11 +68,11 @@ export default {
|
|
|
56
68
|
required: true,
|
|
57
69
|
label: 'Dessert (100g serving)',
|
|
58
70
|
align: 'left',
|
|
59
|
-
sortable: true
|
|
60
|
-
customizedTextClass: (row: { customizedTextClass: string }) => row.customizedTextClass
|
|
71
|
+
sortable: true
|
|
61
72
|
},
|
|
62
73
|
{
|
|
63
74
|
name: 'available',
|
|
75
|
+
required: true,
|
|
64
76
|
label: 'Available',
|
|
65
77
|
align: 'left',
|
|
66
78
|
sortable: true,
|
|
@@ -108,6 +120,7 @@ export default {
|
|
|
108
120
|
label: 'Checked',
|
|
109
121
|
field: 'carbs',
|
|
110
122
|
sortable: true,
|
|
123
|
+
required: true,
|
|
111
124
|
showCustomizedCheckBox: true,
|
|
112
125
|
checkedIcon: 'check_circle',
|
|
113
126
|
uncheckedIcon: 'cancel',
|
|
@@ -120,6 +133,7 @@ export default {
|
|
|
120
133
|
label: 'Protein (g)',
|
|
121
134
|
field: 'protein',
|
|
122
135
|
sortable: true,
|
|
136
|
+
required: true,
|
|
123
137
|
editable: true,
|
|
124
138
|
showEditIcon: true,
|
|
125
139
|
popupEditEmit: 'onSaveValuePopupEdit',
|
|
@@ -296,50 +310,10 @@ export default {
|
|
|
296
310
|
this.store.cleanTableFilter()
|
|
297
311
|
this.tableStyle = setTableHeight.setTableHeight()
|
|
298
312
|
infiniteScroll.handleInfiniteScrollNewTable(this)
|
|
299
|
-
|
|
313
|
+
this.rows = this.rowsData
|
|
300
314
|
this.visibleColumns = this.store.visiblecolumns
|
|
301
|
-
console.log(this.$refs.table)
|
|
302
|
-
|
|
303
|
-
const lista = this.rowsData
|
|
304
|
-
const lista2 = []
|
|
305
|
-
for (let i = 0; i < lista.length; i++) {
|
|
306
|
-
let myNewClass = ''
|
|
307
|
-
if (lista[i]['calories'] === 159) {
|
|
308
|
-
myNewClass = 'text-negative'
|
|
309
|
-
} else {
|
|
310
|
-
myNewClass = 'text-positive'
|
|
311
|
-
}
|
|
312
|
-
lista2.push({
|
|
313
|
-
name: lista[i].name,
|
|
314
|
-
booleanIcon: lista[i].booleanIcon,
|
|
315
|
-
available: lista[i].available,
|
|
316
|
-
calories: lista[i].calories,
|
|
317
|
-
fat: lista[i]. fat,
|
|
318
|
-
carbs: lista[i].carbs,
|
|
319
|
-
checked: lista[i].checked,
|
|
320
|
-
protein: lista[i].protein,
|
|
321
|
-
sodium: lista[i].sodium,
|
|
322
|
-
calcium: lista[i].calcium,
|
|
323
|
-
iron: lista[i].iron,
|
|
324
|
-
customizedTextClass: myNewClass
|
|
325
|
-
})
|
|
326
|
-
}
|
|
327
|
-
this.rows = lista2
|
|
328
|
-
this.showSkeleton = false
|
|
329
|
-
|
|
330
315
|
},
|
|
331
316
|
methods: {
|
|
332
|
-
getClass (slotType: string, props: string, rowName: string) {
|
|
333
|
-
console.log(slotType, props, rowName)
|
|
334
|
-
// if (cols.name === 'name' && rowName === 'Frozen Yogurt') {
|
|
335
|
-
// return 'text-negative'
|
|
336
|
-
// } else {
|
|
337
|
-
// return 'text-positive'
|
|
338
|
-
// }
|
|
339
|
-
if (props.columns.Name.name === '') {
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
317
|
saveSelectedColumns (columns: string []): void {
|
|
344
318
|
this.store.visiblecolumns = columns
|
|
345
319
|
this.visibleColumns = columns
|
|
@@ -355,6 +329,12 @@ export default {
|
|
|
355
329
|
},
|
|
356
330
|
setItemNotFound (rows: object []) {
|
|
357
331
|
console.log(rows, 'onClickButton')
|
|
332
|
+
this.showDialog = true
|
|
333
|
+
this.store.lastFilterValue = this.store.filterValue
|
|
334
|
+
},
|
|
335
|
+
close () {
|
|
336
|
+
this.showDialog= false
|
|
337
|
+
this.store.filterValue = this.store.lastFilterValue
|
|
358
338
|
}
|
|
359
339
|
}
|
|
360
340
|
}
|