quasar-factory-lib 0.0.65 → 0.0.67
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 +25 -23
- package/dist/components/Table/components/{CustomizedButtonWithToolTip.vue.d.ts → IConWithToolTip.vue.d.ts} +6 -6
- package/dist/components/Table/components/TableSlotBody.vue.d.ts +10 -10
- package/dist/components/Table/components/TableSlotGrid.vue.d.ts +12 -10
- package/dist/layouts/PdaLayout.vue.d.ts +25 -23
- package/dist/pages/TablePage.vue.d.ts +86 -48
- package/dist/quasar-factory-lib.js +1662 -1663
- package/dist/quasar-factory-lib.umd.cjs +6 -6
- package/package.json +1 -1
- package/src/components/Table/Table.vue +5 -5
- package/src/components/Table/components/{CustomizedButtonWithToolTip.vue → IConWithToolTip.vue} +11 -13
- package/src/components/Table/components/TableSlotBody.vue +14 -14
- package/src/components/Table/components/TableSlotGrid.vue +17 -16
- package/src/pages/TablePage.vue +20 -13
package/package.json
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
67
67
|
@on-save-value-popup-edit="onSaveValuePopupEdit"
|
|
68
68
|
@on-click-button="onClickButton"
|
|
69
|
-
@on-click-
|
|
69
|
+
@on-click-icon-tool-tip="onClickIconToolTip"
|
|
70
70
|
@click="onRowClick(props.row)"
|
|
71
71
|
/>
|
|
72
72
|
</template>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
@on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
|
|
82
82
|
@on-save-value-popup-edit="onSaveValuePopupEdit"
|
|
83
83
|
@on-click-button="onClickButton"
|
|
84
|
-
@on-click-
|
|
84
|
+
@on-click-icon-tool-tip="onClickIconToolTip"
|
|
85
85
|
@click="onRowClick(props.row)"
|
|
86
86
|
/>
|
|
87
87
|
</template>
|
|
@@ -201,7 +201,7 @@ export default defineComponent({
|
|
|
201
201
|
'pauseMaintenanceTicket',
|
|
202
202
|
'finishMaintenanceTicket',
|
|
203
203
|
'onRowClick',
|
|
204
|
-
'
|
|
204
|
+
'onClickIconToolTip'
|
|
205
205
|
],
|
|
206
206
|
data () {
|
|
207
207
|
return {
|
|
@@ -274,8 +274,8 @@ export default defineComponent({
|
|
|
274
274
|
onClickButton (emit: 'onClickButton', row: object) {
|
|
275
275
|
this.$emit(emit, row)
|
|
276
276
|
},
|
|
277
|
-
|
|
278
|
-
this.$emit(
|
|
277
|
+
onClickIconToolTip (emit: 'onClickIconToolTip', row: object) {
|
|
278
|
+
this.$emit(emit, row)
|
|
279
279
|
},
|
|
280
280
|
onRowClick (row: object) {
|
|
281
281
|
this.$emit('onRowClick', row)
|
package/src/components/Table/components/{CustomizedButtonWithToolTip.vue → IConWithToolTip.vue}
RENAMED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-
|
|
2
|
+
<q-icon
|
|
3
3
|
:data-cy="dataCy"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
<q-icon :name="btnIcon" />
|
|
4
|
+
:name="iconName"
|
|
5
|
+
:color="iconColor"
|
|
6
|
+
size="sm"
|
|
7
|
+
@click="$emit('onClickIconToolTip')"
|
|
8
|
+
>
|
|
11
9
|
<q-tooltip
|
|
12
10
|
anchor="top middle"
|
|
13
11
|
self="bottom middle"
|
|
@@ -15,21 +13,21 @@
|
|
|
15
13
|
>
|
|
16
14
|
{{ $t(toolTipText) }}
|
|
17
15
|
</q-tooltip>
|
|
18
|
-
</q-
|
|
16
|
+
</q-icon>
|
|
19
17
|
</template>
|
|
20
18
|
<script lang="ts">
|
|
21
19
|
export default {
|
|
22
|
-
name: '
|
|
20
|
+
name: 'IConWithToolTip',
|
|
23
21
|
props: {
|
|
24
22
|
dataCy: {
|
|
25
23
|
type: String,
|
|
26
24
|
required: true
|
|
27
25
|
},
|
|
28
|
-
|
|
26
|
+
iconColor: {
|
|
29
27
|
type: String,
|
|
30
28
|
required: true
|
|
31
29
|
},
|
|
32
|
-
|
|
30
|
+
iconName: {
|
|
33
31
|
type: String,
|
|
34
32
|
required: true
|
|
35
33
|
},
|
|
@@ -38,6 +36,6 @@ export default {
|
|
|
38
36
|
required: true
|
|
39
37
|
}
|
|
40
38
|
},
|
|
41
|
-
emits: ['
|
|
39
|
+
emits: ['onClickIconToolTip']
|
|
42
40
|
}
|
|
43
41
|
</script>
|
|
@@ -93,19 +93,19 @@
|
|
|
93
93
|
:data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
|
|
94
94
|
:btn-color="col.btnColor || 'primary'"
|
|
95
95
|
:btn-icon="col.btnIcon|| ''"
|
|
96
|
-
:btn-disable="
|
|
96
|
+
:btn-disable="tablePropsData.row.btnDisable"
|
|
97
97
|
@on-click-button="() => {
|
|
98
98
|
$emit('onClickButton', col.btnEmit, tablePropsData.row)
|
|
99
99
|
}"
|
|
100
100
|
/>
|
|
101
|
-
<
|
|
102
|
-
v-if="col.
|
|
103
|
-
:data-cy="col.
|
|
104
|
-
:
|
|
105
|
-
:
|
|
106
|
-
:
|
|
107
|
-
@on-click-
|
|
108
|
-
$emit('
|
|
101
|
+
<IconWithToolTip
|
|
102
|
+
v-if="col.showIconWithToolTip"
|
|
103
|
+
:data-cy="col.IconWithToolTip + '-' + tablePropsData.row.id"
|
|
104
|
+
:icon-color="tablePropsData.row.iconWithToolTipColor"
|
|
105
|
+
:icon-name="tablePropsData.row.iconWithToolTipName"
|
|
106
|
+
:tool-tip-text="tablePropsData.row.toolTipText"
|
|
107
|
+
@on-click-icon-tool-tip="() => {
|
|
108
|
+
$emit('onClickIconToolTip', col.iconWithToolTipEmit, tablePropsData.row)
|
|
109
109
|
}"
|
|
110
110
|
/>
|
|
111
111
|
<CustomizedBadge
|
|
@@ -129,7 +129,7 @@ import CustomizedCheckBox from './CustomizedCheckBox.vue'
|
|
|
129
129
|
import CustomizedIcon from './CustomizedIcon.vue'
|
|
130
130
|
import CustomizedButton from './CustomizedButton.vue'
|
|
131
131
|
import CustomizedBadge from './CustomizedBadge.vue'
|
|
132
|
-
import
|
|
132
|
+
import IconWithToolTip from './IConWithToolTip.vue'
|
|
133
133
|
export default {
|
|
134
134
|
name: 'TableSlotBody',
|
|
135
135
|
components: {
|
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
CustomizedIcon,
|
|
141
141
|
CustomizedButton,
|
|
142
142
|
CustomizedBadge,
|
|
143
|
-
|
|
143
|
+
IconWithToolTip
|
|
144
144
|
},
|
|
145
145
|
props: {
|
|
146
146
|
tableProps: {
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
'onUpdateBasicCheckboxValue',
|
|
167
167
|
'onClickButton',
|
|
168
168
|
'onUpdateCustomizedCheckboxValue',
|
|
169
|
-
'
|
|
169
|
+
'onClickIconToolTip'
|
|
170
170
|
],
|
|
171
171
|
data () {
|
|
172
172
|
return {
|
|
@@ -174,8 +174,8 @@ export default {
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
methods: {
|
|
177
|
-
getColumnValue (col: { showBasicCheckbox: boolean; showCustomizedCheckBox: boolean; showCustomizedIcon: boolean; showColumButton: boolean, showBadge: boolean,
|
|
178
|
-
return !(col.showBasicCheckbox || col.showCustomizedCheckBox || col.showCustomizedIcon || col.showColumButton || col.showBadge || col.
|
|
177
|
+
getColumnValue (col: { showBasicCheckbox: boolean; showCustomizedCheckBox: boolean; showCustomizedIcon: boolean; showColumButton: boolean, showBadge: boolean, showIconWithToolTip: boolean }): boolean {
|
|
178
|
+
return !(col.showBasicCheckbox || col.showCustomizedCheckBox || col.showCustomizedIcon || col.showColumButton || col.showBadge || col.showIconWithToolTip)
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
@@ -122,23 +122,23 @@
|
|
|
122
122
|
:data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
|
|
123
123
|
:btn-color="col.btnColor || 'primary'"
|
|
124
124
|
:btn-icon="col.btnIcon|| ''"
|
|
125
|
-
:btn-disable="
|
|
125
|
+
:btn-disable="tablePropsData.row.btnDisable"
|
|
126
126
|
@on-click-button="() => {
|
|
127
127
|
$emit('onClickButton', col.btnEmit, tablePropsData.row)
|
|
128
128
|
}"
|
|
129
129
|
/>
|
|
130
130
|
</q-item-section>
|
|
131
131
|
<q-item-section>
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
132
|
+
<IconWithToolTip
|
|
133
|
+
v-if="col.showIconWithToolTip"
|
|
134
|
+
:data-cy="col.IconWithToolTip + '-' + tablePropsData.row.id"
|
|
135
|
+
:icon-color="tablePropsData.row.iconWithToolTipColor"
|
|
136
|
+
:icon-name="tablePropsData.row.iconWithToolTipName"
|
|
137
|
+
:tool-tip-text="tablePropsData.row.toolTipText"
|
|
138
|
+
@on-click-icon-tool-tip="() => {
|
|
139
|
+
$emit('onClickIconToolTip', col.iconWithToolTipEmit, tablePropsData.row)
|
|
140
|
+
}"
|
|
141
|
+
/>
|
|
142
142
|
</q-item-section>
|
|
143
143
|
<q-item-section>
|
|
144
144
|
<CustomizedBadge
|
|
@@ -166,7 +166,7 @@ import CustomizedCheckBox from './CustomizedCheckBox.vue'
|
|
|
166
166
|
import CustomizedIcon from './CustomizedIcon.vue'
|
|
167
167
|
import CustomizedButton from './CustomizedButton.vue'
|
|
168
168
|
import CustomizedBadge from './CustomizedBadge.vue'
|
|
169
|
-
import
|
|
169
|
+
import IconWithToolTip from './IConWithToolTip.vue'
|
|
170
170
|
|
|
171
171
|
export default {
|
|
172
172
|
name: 'TableSlotGrid',
|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
178
178
|
CustomizedIcon,
|
|
179
179
|
CustomizedButton,
|
|
180
180
|
CustomizedBadge,
|
|
181
|
-
|
|
181
|
+
IconWithToolTip
|
|
182
182
|
},
|
|
183
183
|
props: {
|
|
184
184
|
tableProps: {
|
|
@@ -202,7 +202,8 @@ export default {
|
|
|
202
202
|
'onUpdateBasicCheckboxValue',
|
|
203
203
|
'onClickButton',
|
|
204
204
|
'onUpdateCustomizedCheckboxValue',
|
|
205
|
-
'
|
|
205
|
+
'onClickIcon',
|
|
206
|
+
'onClickIconToolTip'
|
|
206
207
|
],
|
|
207
208
|
data () {
|
|
208
209
|
return {
|
|
@@ -217,8 +218,8 @@ export default {
|
|
|
217
218
|
},
|
|
218
219
|
mounted () {},
|
|
219
220
|
methods: {
|
|
220
|
-
getColumnValue (col: { showBasicCheckbox: boolean; showCustomizedCheckBox: boolean; showCustomizedIcon: boolean; showColumButton: boolean, showBadge: boolean,
|
|
221
|
-
return !(col.showBasicCheckbox || col.showCustomizedCheckBox || col.showCustomizedIcon || col.showColumButton || col.showBadge || col.
|
|
221
|
+
getColumnValue (col: { showBasicCheckbox: boolean; showCustomizedCheckBox: boolean; showCustomizedIcon: boolean; showColumButton: boolean, showBadge: boolean, showIconWithToolTip: boolean, showCustomizedButton: boolean }): boolean {
|
|
222
|
+
return !(col.showBasicCheckbox || col.showCustomizedCheckBox || col.showCustomizedIcon || col.showColumButton || col.showBadge || col.showIconWithToolTip || col.showCustomizedButton)
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
}
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:rows="rows"
|
|
14
14
|
:columns="columns"
|
|
15
15
|
:visible-columns="store.visiblecolumns"
|
|
16
|
-
:small-device="
|
|
16
|
+
:small-device="true"
|
|
17
17
|
:store="store"
|
|
18
18
|
:table-style="tableStyle"
|
|
19
19
|
:show-skeleton="showSkeleton"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
@on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
|
|
29
29
|
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
30
30
|
@on-click-button="setItemNotFound"
|
|
31
|
-
@
|
|
31
|
+
@onClickIconToolTip="onClickIconToolTip"
|
|
32
32
|
|
|
33
33
|
/>
|
|
34
34
|
</div>
|
|
@@ -119,7 +119,8 @@ export default {
|
|
|
119
119
|
btnIcon: 'save',
|
|
120
120
|
btnEmit: 'onClickButton',
|
|
121
121
|
dataCy: 'onClickButton',
|
|
122
|
-
btnColor: 'primary'
|
|
122
|
+
btnColor: 'primary',
|
|
123
|
+
btnDisable: (row: { btnDisable: string }) => row.btnDisable
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
126
|
name: 'carbs',
|
|
@@ -130,7 +131,6 @@ export default {
|
|
|
130
131
|
format: (val: number) => `${val}`,
|
|
131
132
|
showBadge: true,
|
|
132
133
|
badgeDataCy: 'badgeDataCy',
|
|
133
|
-
badgeEmit: 'onClickBadge',
|
|
134
134
|
badgeText: (row: { badgeText: string }) => row.badgeText,
|
|
135
135
|
badgeColor: (row: { badgeColor: string }) => row.badgeColor,
|
|
136
136
|
badgeTextColor: 'black',
|
|
@@ -171,11 +171,11 @@ export default {
|
|
|
171
171
|
field: 'sodium',
|
|
172
172
|
required: true,
|
|
173
173
|
sortable: true,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
showIconWithToolTip: true,
|
|
175
|
+
dataCy: 'iconWithToolTip',
|
|
176
|
+
iconWithToolTipEmit: 'onClickIconToolTip',
|
|
177
|
+
iconWithToolTipColor: (row: { iconWithToolTipColor: string }) => row.iconWithToolTipColor,
|
|
178
|
+
iconWithToolTipName: (row: { iconWithToolTipName: string }) => row.iconWithToolTipName,
|
|
179
179
|
toolTipText: (row: { toolTipText: string }) => row.toolTipText,
|
|
180
180
|
},
|
|
181
181
|
{
|
|
@@ -375,11 +375,12 @@ export default {
|
|
|
375
375
|
sodium: lista[i].sodium,
|
|
376
376
|
calcium: lista[i].calcium,
|
|
377
377
|
iron: lista[i].iron,
|
|
378
|
-
btnDisable:
|
|
378
|
+
btnDisable: this.getBtnDisable(lista[i].carbs),
|
|
379
379
|
badgeColor: this.getBadgeColor(lista[i].carbs),
|
|
380
380
|
badgeText: this.getBadgeText(lista[i].carbs),
|
|
381
381
|
toolTipText: this.getBadgeText(lista[i].carbs),
|
|
382
|
-
|
|
382
|
+
iconWithToolTipColor: this.getBadgeColor(lista[i].carbs),
|
|
383
|
+
iconWithToolTipName: this.getIconWithToolTipName(lista[i].carbs)
|
|
383
384
|
})
|
|
384
385
|
}
|
|
385
386
|
setTimeout(() => {
|
|
@@ -393,8 +394,11 @@ export default {
|
|
|
393
394
|
getBadgeText (carbs: number) {
|
|
394
395
|
return carbs > 50 ? 'header.hello': 'global.total'
|
|
395
396
|
},
|
|
396
|
-
|
|
397
|
-
|
|
397
|
+
getBtnDisable (carbs: number) {
|
|
398
|
+
return carbs > 50
|
|
399
|
+
},
|
|
400
|
+
getIconWithToolTipName (carbs: number) {
|
|
401
|
+
return carbs > 50 ? 'warning': 'home'
|
|
398
402
|
},
|
|
399
403
|
onUpdateBasicCheckboxValue (rows: object []) {
|
|
400
404
|
console.log(rows, 'onUpdateBasicCheckboxValue')
|
|
@@ -405,6 +409,9 @@ export default {
|
|
|
405
409
|
setItemNotFound (rows: object []) {
|
|
406
410
|
console.log(rows, 'onClickButton')
|
|
407
411
|
},
|
|
412
|
+
onClickIconToolTip (rows: object []) {
|
|
413
|
+
console.log(rows, 'onClickIconToolTip page')
|
|
414
|
+
},
|
|
408
415
|
getCellClass (row, col) {
|
|
409
416
|
if (col.name === 'dessert' && row.dessert === 'Frozen Yogurt') {
|
|
410
417
|
return 'text-color-negative-bold';
|