quasar-factory-lib 0.0.66 → 0.0.68
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 +74 -48
- package/dist/quasar-factory-lib.js +1952 -1953
- 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 +19 -12
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>
|
|
@@ -91,21 +91,21 @@
|
|
|
91
91
|
<CustomizedButton
|
|
92
92
|
v-if="col.showCustomizedButton"
|
|
93
93
|
:data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
|
|
94
|
-
:btn-color="col.btnColor || 'primary'"
|
|
94
|
+
:btn-color="col.btnColor || tablePropsData.row.btnColor || 'primary'"
|
|
95
95
|
:btn-icon="col.btnIcon|| ''"
|
|
96
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
|
}
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<CustomizedButton
|
|
121
121
|
v-if="col.showCustomizedButton"
|
|
122
122
|
:data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
|
|
123
|
-
:btn-color="col.btnColor || 'primary'"
|
|
123
|
+
:btn-color="col.btnColor || tablePropsData.row.btnColor || 'primary'"
|
|
124
124
|
:btn-icon="col.btnIcon|| ''"
|
|
125
125
|
:btn-disable="tablePropsData.row.btnDisable"
|
|
126
126
|
@on-click-button="() => {
|
|
@@ -129,16 +129,16 @@
|
|
|
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
|
@@ -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,7 @@ export default {
|
|
|
119
119
|
btnIcon: 'save',
|
|
120
120
|
btnEmit: 'onClickButton',
|
|
121
121
|
dataCy: 'onClickButton',
|
|
122
|
-
btnColor: '
|
|
122
|
+
btnColor: 'black',
|
|
123
123
|
btnDisable: (row: { btnDisable: string }) => row.btnDisable
|
|
124
124
|
},
|
|
125
125
|
{
|
|
@@ -131,7 +131,6 @@ export default {
|
|
|
131
131
|
format: (val: number) => `${val}`,
|
|
132
132
|
showBadge: true,
|
|
133
133
|
badgeDataCy: 'badgeDataCy',
|
|
134
|
-
badgeEmit: 'onClickBadge',
|
|
135
134
|
badgeText: (row: { badgeText: string }) => row.badgeText,
|
|
136
135
|
badgeColor: (row: { badgeColor: string }) => row.badgeColor,
|
|
137
136
|
badgeTextColor: 'black',
|
|
@@ -172,11 +171,11 @@ export default {
|
|
|
172
171
|
field: 'sodium',
|
|
173
172
|
required: true,
|
|
174
173
|
sortable: true,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
showIconWithToolTip: true,
|
|
175
|
+
dataCy: 'iconWithToolTip',
|
|
176
|
+
iconWithToolTipEmit: 'onClickIconToolTip',
|
|
177
|
+
iconWithToolTipColor: (row: { iconWithToolTipColor: string }) => row.iconWithToolTipColor,
|
|
178
|
+
iconWithToolTipName: (row: { iconWithToolTipName: string }) => row.iconWithToolTipName,
|
|
180
179
|
toolTipText: (row: { toolTipText: string }) => row.toolTipText,
|
|
181
180
|
},
|
|
182
181
|
{
|
|
@@ -376,11 +375,13 @@ export default {
|
|
|
376
375
|
sodium: lista[i].sodium,
|
|
377
376
|
calcium: lista[i].calcium,
|
|
378
377
|
iron: lista[i].iron,
|
|
379
|
-
|
|
378
|
+
// btnColor: this.getBadgeColor(lista[i].carbs),
|
|
379
|
+
btnDisable: this.getBtnDisable(lista[i].carbs),
|
|
380
380
|
badgeColor: this.getBadgeColor(lista[i].carbs),
|
|
381
381
|
badgeText: this.getBadgeText(lista[i].carbs),
|
|
382
382
|
toolTipText: this.getBadgeText(lista[i].carbs),
|
|
383
|
-
|
|
383
|
+
iconWithToolTipColor: this.getBadgeColor(lista[i].carbs),
|
|
384
|
+
iconWithToolTipName: this.getIconWithToolTipName(lista[i].carbs)
|
|
384
385
|
})
|
|
385
386
|
}
|
|
386
387
|
setTimeout(() => {
|
|
@@ -394,8 +395,11 @@ export default {
|
|
|
394
395
|
getBadgeText (carbs: number) {
|
|
395
396
|
return carbs > 50 ? 'header.hello': 'global.total'
|
|
396
397
|
},
|
|
397
|
-
|
|
398
|
-
|
|
398
|
+
getBtnDisable (carbs: number) {
|
|
399
|
+
return carbs > 50
|
|
400
|
+
},
|
|
401
|
+
getIconWithToolTipName (carbs: number) {
|
|
402
|
+
return carbs > 50 ? 'warning': 'home'
|
|
399
403
|
},
|
|
400
404
|
onUpdateBasicCheckboxValue (rows: object []) {
|
|
401
405
|
console.log(rows, 'onUpdateBasicCheckboxValue')
|
|
@@ -406,6 +410,9 @@ export default {
|
|
|
406
410
|
setItemNotFound (rows: object []) {
|
|
407
411
|
console.log(rows, 'onClickButton')
|
|
408
412
|
},
|
|
413
|
+
onClickIconToolTip (rows: object []) {
|
|
414
|
+
console.log(rows, 'onClickIconToolTip page')
|
|
415
|
+
},
|
|
409
416
|
getCellClass (row, col) {
|
|
410
417
|
if (col.name === 'dessert' && row.dessert === 'Frozen Yogurt') {
|
|
411
418
|
return 'text-color-negative-bold';
|