@usssa/component-library 1.0.0-beta.8 → 1.0.0-rc.1
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/README.md +1 -1
- package/package.json +4 -3
- package/src/components/core/UBracket.vue +697 -167
- package/src/components/core/UBtnIcon.vue +7 -3
- package/src/components/core/UChip.vue +2 -2
- package/src/components/core/UDate.vue +43 -9
- package/src/components/core/UDrawer/UDrawer.vue +6 -0
- package/src/components/core/UDrawer/UDrawerMenuItem.vue +18 -12
- package/src/components/core/UEventCard.vue +47 -14
- package/src/components/core/UExpansionStd.vue +141 -35
- package/src/components/core/UExpansionTableStd.vue +6 -2
- package/src/components/core/UInputAddressLookup.vue +41 -11
- package/src/components/core/UInputPhoneStd.vue +8 -1
- package/src/components/core/UInputTextStd.vue +5 -0
- package/src/components/core/UMatchup.vue +404 -0
- package/src/components/core/UMenuItem.vue +3 -6
- package/src/components/core/UMultiSelectStd.vue +15 -4
- package/src/components/core/USelectStd.vue +21 -2
- package/src/components/core/UTable/UTable.vue +911 -744
- package/src/components/core/UTableStd.vue +175 -74
- package/src/components/core/UTabsStd.vue +2 -1
- package/src/components/core/UTooltip.vue +1 -0
- package/src/components/core/UVenueCard.vue +221 -0
- package/src/components/index.js +4 -0
- package/src/composables/useNotify.js +2 -2
- package/src/css/app.sass +13 -12
- package/src/utils/bracket.json +1498 -312
|
@@ -89,6 +89,10 @@ const props = defineProps({
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
|
+
minOverflowLength: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: 12,
|
|
95
|
+
},
|
|
92
96
|
rowCardHeight: {
|
|
93
97
|
type: Number,
|
|
94
98
|
default: 25,
|
|
@@ -131,11 +135,16 @@ const $q = useQuasar()
|
|
|
131
135
|
const $screen = useScreenType()
|
|
132
136
|
|
|
133
137
|
const activeMenuId = ref(null)
|
|
138
|
+
const captionMaxWidth = ref('100%')
|
|
139
|
+
const cellOverflowStates = ref({})
|
|
140
|
+
const headerMaxWidth = ref('100%')
|
|
141
|
+
const infiniteNoMoreShow = ref(false)
|
|
134
142
|
const infiniteScrollProp = ref(props.infiniteScrollProperty)
|
|
135
143
|
const isScrollActionActive = ref(false)
|
|
144
|
+
const minOverflowLength = ref(props.minOverflowLength)
|
|
136
145
|
const mobileActionsDialog = ref({})
|
|
137
146
|
const moreActionsDialogs = ref({})
|
|
138
|
-
const
|
|
147
|
+
const tableCardWrapperRef = ref(null)
|
|
139
148
|
const tableContainer = ref(null)
|
|
140
149
|
const tableDataChip = ref(true) // this is required to show chip
|
|
141
150
|
const tailClass = ref(null)
|
|
@@ -158,6 +167,21 @@ const attachScroll = () => {
|
|
|
158
167
|
}
|
|
159
168
|
}
|
|
160
169
|
|
|
170
|
+
const checkCellOverflow = (selector, key) => {
|
|
171
|
+
nextTick(() => {
|
|
172
|
+
requestAnimationFrame(() => {
|
|
173
|
+
const element = document.querySelector(selector)
|
|
174
|
+
|
|
175
|
+
if (element) {
|
|
176
|
+
cellOverflowStates.value[key] =
|
|
177
|
+
element.scrollWidth > element.clientWidth
|
|
178
|
+
} else {
|
|
179
|
+
cellOverflowStates.value[key] = false
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
})
|
|
183
|
+
}
|
|
184
|
+
|
|
161
185
|
// checking the menu position after show
|
|
162
186
|
const checkMenuPosition = (id) => {
|
|
163
187
|
const menuElement = document.getElementById(`actionPopupRef-${id}`) // Access the menu by ID
|
|
@@ -255,6 +279,13 @@ const getMenuInlineActions = (col, option) => {
|
|
|
255
279
|
})
|
|
256
280
|
}
|
|
257
281
|
|
|
282
|
+
const handleCellOverflowResize = () => {
|
|
283
|
+
Object.keys(cellOverflowStates.value).forEach((key) => {
|
|
284
|
+
const selector = `#long-content-${key}`
|
|
285
|
+
checkCellOverflow(selector, key)
|
|
286
|
+
})
|
|
287
|
+
}
|
|
288
|
+
|
|
258
289
|
const handleItemClick = (action, row) => {
|
|
259
290
|
moreActionsDialogs.value[row.id][0].open = false
|
|
260
291
|
setTimeout(() => {
|
|
@@ -272,7 +303,6 @@ const handleMenuShow = (id) => {
|
|
|
272
303
|
activeMenuId.value = id
|
|
273
304
|
checkMenuPosition(id)
|
|
274
305
|
window.addEventListener('scroll', onScroll, true)
|
|
275
|
-
|
|
276
306
|
}
|
|
277
307
|
|
|
278
308
|
const handleOpenMobileMoreActions = (id) => {
|
|
@@ -323,11 +353,6 @@ const handleScroll = async () => {
|
|
|
323
353
|
}
|
|
324
354
|
}
|
|
325
355
|
|
|
326
|
-
// checking for tooltip is content is visible
|
|
327
|
-
const isContentVisible = (field, id, type) => {
|
|
328
|
-
return document.getElementById(`long-${type}-${field}-${id}`)
|
|
329
|
-
}
|
|
330
|
-
|
|
331
356
|
const isGridLastRow = (row) => {
|
|
332
357
|
const lastIndex = parseInt(pagination.value.rowsPerPage) - 1
|
|
333
358
|
return row.rowIndex === lastIndex
|
|
@@ -339,6 +364,15 @@ const onScroll = () => {
|
|
|
339
364
|
}
|
|
340
365
|
}
|
|
341
366
|
|
|
367
|
+
const updateHeaderMaxWidth = () => {
|
|
368
|
+
nextTick(() => {
|
|
369
|
+
if (tableCardWrapperRef.value) {
|
|
370
|
+
headerMaxWidth.value = tableCardWrapperRef.value.offsetWidth - 64 + 'px'
|
|
371
|
+
captionMaxWidth.value = headerMaxWidth.value
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
|
|
342
376
|
onMounted(() => {
|
|
343
377
|
infiniteNoMoreShow.value = false
|
|
344
378
|
nextTick(() => {
|
|
@@ -346,10 +380,14 @@ onMounted(() => {
|
|
|
346
380
|
attachScroll()
|
|
347
381
|
}
|
|
348
382
|
})
|
|
383
|
+
updateHeaderMaxWidth()
|
|
384
|
+
window.addEventListener('resize', updateHeaderMaxWidth)
|
|
349
385
|
})
|
|
350
386
|
|
|
351
387
|
onBeforeUnmount(() => {
|
|
352
388
|
detachScroll()
|
|
389
|
+
window.removeEventListener('resize', updateHeaderMaxWidth)
|
|
390
|
+
window.removeEventListener('resize', handleCellOverflowResize)
|
|
353
391
|
})
|
|
354
392
|
|
|
355
393
|
// Watch for changes in infiniteScroll or tableContainer
|
|
@@ -421,6 +459,9 @@ watch(
|
|
|
421
459
|
},
|
|
422
460
|
{ immediate: true }
|
|
423
461
|
)
|
|
462
|
+
|
|
463
|
+
// Re-check on window resize
|
|
464
|
+
window.addEventListener('resize', handleCellOverflowResize)
|
|
424
465
|
</script>
|
|
425
466
|
|
|
426
467
|
<template>
|
|
@@ -482,561 +523,628 @@ watch(
|
|
|
482
523
|
:style="props.selected ? 'transform: scale(0.95);' : ''"
|
|
483
524
|
>
|
|
484
525
|
<q-card bordered flat>
|
|
485
|
-
<
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
<
|
|
494
|
-
|
|
495
|
-
col.field === 'action' ||
|
|
496
|
-
(typeof col.show === 'function'
|
|
497
|
-
? col.show()
|
|
498
|
-
: typeof col.show === 'undefined' || col.show)
|
|
499
|
-
"
|
|
500
|
-
:class="col.doubleSpan ? 'mobile-centered-col' : ''"
|
|
501
|
-
>
|
|
502
|
-
<q-item-section
|
|
503
|
-
v-if="
|
|
504
|
-
col.field === 'action' ||
|
|
505
|
-
(typeof col.show === 'function'
|
|
506
|
-
? col.show()
|
|
507
|
-
: typeof col.show === 'undefined' || col.show)
|
|
508
|
-
"
|
|
509
|
-
>
|
|
510
|
-
<q-item-label> {{ col.label }}</q-item-label>
|
|
511
|
-
</q-item-section>
|
|
512
|
-
<q-item-section
|
|
526
|
+
<div class="table-card-wrapper" ref="tableCardWrapperRef">
|
|
527
|
+
<q-list
|
|
528
|
+
dense
|
|
529
|
+
:style="{
|
|
530
|
+
'min-height': `${rowCardHeight}rem`,
|
|
531
|
+
overflowX: 'hidden',
|
|
532
|
+
}"
|
|
533
|
+
>
|
|
534
|
+
<template v-for="(col, __k) in props.cols" :key="__k">
|
|
535
|
+
<q-item
|
|
513
536
|
v-if="
|
|
514
537
|
col.field === 'action' ||
|
|
515
538
|
(typeof col.show === 'function'
|
|
516
539
|
? col.show()
|
|
517
540
|
: typeof col.show === 'undefined' || col.show)
|
|
518
541
|
"
|
|
519
|
-
|
|
542
|
+
:class="col.doubleSpan ? 'mobile-centered-col' : ''"
|
|
520
543
|
>
|
|
521
|
-
<
|
|
522
|
-
v-if="
|
|
544
|
+
<q-item-section
|
|
545
|
+
v-if="
|
|
546
|
+
col.field === 'action' ||
|
|
547
|
+
(typeof col.show === 'function'
|
|
548
|
+
? col.show()
|
|
549
|
+
: typeof col.show === 'undefined' || col.show)
|
|
550
|
+
"
|
|
523
551
|
>
|
|
524
|
-
<q-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
552
|
+
<q-item-label> {{ col.label }}</q-item-label>
|
|
553
|
+
</q-item-section>
|
|
554
|
+
<q-item-section
|
|
555
|
+
v-if="
|
|
556
|
+
col.field === 'action' ||
|
|
557
|
+
(typeof col.show === 'function'
|
|
558
|
+
? col.show()
|
|
559
|
+
: typeof col.show === 'undefined' || col.show)
|
|
560
|
+
"
|
|
561
|
+
side
|
|
534
562
|
>
|
|
535
|
-
<
|
|
536
|
-
v-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
"
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
563
|
+
<template
|
|
564
|
+
v-if="col.type === 'icon' && props.row[col.field]"
|
|
565
|
+
>
|
|
566
|
+
<q-icon
|
|
567
|
+
:class="props.row[col.field]"
|
|
568
|
+
:alt="props.row.ariaLabel"
|
|
569
|
+
:aria-label="props.row.ariaLabel"
|
|
570
|
+
:color="props?.row?.iconColor ?? 'primary'"
|
|
571
|
+
size="1.5rem"
|
|
572
|
+
/>
|
|
573
|
+
</template>
|
|
574
|
+
<template
|
|
575
|
+
v-if="col.chipValues && col.chipValues.length > 0"
|
|
576
|
+
>
|
|
577
|
+
<UChip
|
|
578
|
+
v-model="tableDataChip"
|
|
579
|
+
class="u-table-chip"
|
|
580
|
+
:anchor="col.anchor"
|
|
581
|
+
avatarLabel=""
|
|
582
|
+
:chipLabel="props.row[col.field].toString()"
|
|
583
|
+
:dense="isMobile || isTablet ? true : col.denseChip"
|
|
584
|
+
:is-show-tooltip="col.showChipTooltip"
|
|
585
|
+
:offset="col.offset"
|
|
586
|
+
:removable="false"
|
|
587
|
+
:type="
|
|
588
|
+
getChipColor(col.chipValues, props.row[col.field])
|
|
559
589
|
"
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
typeof col.showAlignedChip === 'function' &&
|
|
566
|
-
col.showAlignedChip(props.row)
|
|
567
|
-
"
|
|
568
|
-
v-model="tableDataChip"
|
|
569
|
-
:class="[
|
|
570
|
-
expansion ? 'q-ma-none' : 'q-mr-xs',
|
|
571
|
-
col.showAlignedChip(props.row).class,
|
|
572
|
-
]"
|
|
573
|
-
:avatarLabel="
|
|
574
|
-
col.showAlignedChip(props.row).avatarLabel
|
|
575
|
-
"
|
|
576
|
-
:backgroundColor="
|
|
577
|
-
col.showAlignedChip(props.row).backgroundColor
|
|
578
|
-
"
|
|
579
|
-
:chipLabel="
|
|
580
|
-
col.showAlignedChip(props.row).chipLabel
|
|
581
|
-
"
|
|
582
|
-
:dense="col.showAlignedChip(props.row).dense"
|
|
583
|
-
:removable="
|
|
584
|
-
col.showAlignedChip(props.row).removable
|
|
585
|
-
"
|
|
586
|
-
:textColor="
|
|
587
|
-
col.showAlignedChip(props.row).textColor
|
|
588
|
-
"
|
|
589
|
-
:type="col.showAlignedChip(props.row).type"
|
|
590
|
-
/>
|
|
590
|
+
/>
|
|
591
|
+
</template>
|
|
592
|
+
|
|
593
|
+
<template v-else>
|
|
594
|
+
<div class="flex justify-center items-center no-wrap">
|
|
591
595
|
<div
|
|
596
|
+
class="flex justify-center items-center no-wrap"
|
|
592
597
|
v-if="
|
|
593
|
-
|
|
594
|
-
|
|
598
|
+
typeof col.showAvatar === 'undefined'
|
|
599
|
+
? col.avatarKey
|
|
600
|
+
: col.showAvatar($screen, props.row)
|
|
595
601
|
"
|
|
596
|
-
class="table-data-avatar"
|
|
597
602
|
>
|
|
598
|
-
<
|
|
603
|
+
<UChip
|
|
599
604
|
v-if="
|
|
600
|
-
|
|
605
|
+
!isDesktop &&
|
|
606
|
+
col.showAlignedChip &&
|
|
607
|
+
typeof col.showAlignedChip === 'function' &&
|
|
608
|
+
col.showAlignedChip(props.row)
|
|
601
609
|
"
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
610
|
+
v-model="tableDataChip"
|
|
611
|
+
:class="[
|
|
612
|
+
expansion ? 'q-ma-none' : 'q-mr-xs',
|
|
613
|
+
col.showAlignedChip(props.row).class,
|
|
614
|
+
]"
|
|
615
|
+
:avatarLabel="
|
|
616
|
+
col.showAlignedChip(props.row).avatarLabel
|
|
607
617
|
"
|
|
608
|
-
:
|
|
609
|
-
|
|
610
|
-
col.indicatorIcon(props.row)
|
|
611
|
-
? col.indicatorIcon(props.row)
|
|
612
|
-
: ''
|
|
618
|
+
:backgroundColor="
|
|
619
|
+
col.showAlignedChip(props.row).backgroundColor
|
|
613
620
|
"
|
|
614
|
-
:
|
|
615
|
-
|
|
616
|
-
size="lg"
|
|
617
|
-
/>
|
|
618
|
-
<UAvatar
|
|
619
|
-
v-else-if="
|
|
620
|
-
props.row[col.avatarKey]?.type === 'image'
|
|
621
|
-
"
|
|
622
|
-
:image="`${props.row[col.avatarKey]?.value}`"
|
|
623
|
-
:indicatorColor="
|
|
624
|
-
typeof col.indicatorColor === 'function' &&
|
|
625
|
-
col.indicatorColor(props.row)
|
|
626
|
-
? col.indicatorColor(props.row)
|
|
627
|
-
: ''
|
|
621
|
+
:chipLabel="
|
|
622
|
+
col.showAlignedChip(props.row).chipLabel
|
|
628
623
|
"
|
|
629
|
-
:
|
|
630
|
-
|
|
631
|
-
col.
|
|
632
|
-
? col.indicatorIcon(props.row)
|
|
633
|
-
: ''
|
|
624
|
+
:dense="col.showAlignedChip(props.row).dense"
|
|
625
|
+
:removable="
|
|
626
|
+
col.showAlignedChip(props.row).removable
|
|
634
627
|
"
|
|
635
|
-
:
|
|
636
|
-
props.row
|
|
637
|
-
props.row[col.avatarKey]?.value
|
|
628
|
+
:textColor="
|
|
629
|
+
col.showAlignedChip(props.row).textColor
|
|
638
630
|
"
|
|
639
|
-
:
|
|
640
|
-
size="lg"
|
|
631
|
+
:type="col.showAlignedChip(props.row).type"
|
|
641
632
|
/>
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
:indicatorColor="
|
|
647
|
-
typeof col.indicatorColor === 'function' &&
|
|
648
|
-
col.indicatorColor(props.row)
|
|
649
|
-
? col.indicatorColor(props.row)
|
|
650
|
-
: ''
|
|
651
|
-
"
|
|
652
|
-
:indicatorIcon="
|
|
653
|
-
typeof col.indicatorIcon === 'function' &&
|
|
654
|
-
col.indicatorIcon(props.row)
|
|
655
|
-
? col.indicatorIcon(props.row)
|
|
656
|
-
: ''
|
|
633
|
+
<div
|
|
634
|
+
v-if="
|
|
635
|
+
props.row[col.avatarKey] &&
|
|
636
|
+
typeof props.row[col.avatarKey] === 'object'
|
|
657
637
|
"
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
638
|
+
class="table-data-avatar"
|
|
639
|
+
>
|
|
640
|
+
<UAvatar
|
|
641
|
+
v-if="
|
|
642
|
+
props.row[col.avatarKey]?.type === 'initials'
|
|
643
|
+
"
|
|
644
|
+
:indicatorColor="
|
|
645
|
+
typeof col.indicatorColor === 'function' &&
|
|
646
|
+
col.indicatorColor(props.row)
|
|
647
|
+
? col.indicatorColor(props.row)
|
|
648
|
+
: ''
|
|
649
|
+
"
|
|
650
|
+
:indicatorIcon="
|
|
651
|
+
typeof col.indicatorIcon === 'function' &&
|
|
652
|
+
col.indicatorIcon(props.row)
|
|
653
|
+
? col.indicatorIcon(props.row)
|
|
654
|
+
: ''
|
|
655
|
+
"
|
|
656
|
+
:name="`${props.row[col.avatarKey]?.value}`"
|
|
657
|
+
:showIndicator="col.showIndicator"
|
|
658
|
+
size="lg"
|
|
659
|
+
/>
|
|
660
|
+
<UAvatar
|
|
661
|
+
v-else-if="
|
|
662
|
+
props.row[col.avatarKey]?.type === 'image'
|
|
663
|
+
"
|
|
664
|
+
:image="`${props.row[col.avatarKey]?.value}`"
|
|
665
|
+
:indicatorColor="
|
|
666
|
+
typeof col.indicatorColor === 'function' &&
|
|
667
|
+
col.indicatorColor(props.row)
|
|
668
|
+
? col.indicatorColor(props.row)
|
|
669
|
+
: ''
|
|
670
|
+
"
|
|
671
|
+
:indicatorIcon="
|
|
672
|
+
typeof col.indicatorIcon === 'function' &&
|
|
673
|
+
col.indicatorIcon(props.row)
|
|
674
|
+
? col.indicatorIcon(props.row)
|
|
675
|
+
: ''
|
|
676
|
+
"
|
|
677
|
+
:name="
|
|
678
|
+
props.row[col.avatarKey]?.name ??
|
|
679
|
+
props.row[col.avatarKey]?.value
|
|
680
|
+
"
|
|
681
|
+
:showIndicator="col.showIndicator"
|
|
682
|
+
size="lg"
|
|
683
|
+
/>
|
|
684
|
+
</div>
|
|
685
|
+
<div v-else class="table-data-avatar">
|
|
686
|
+
<UAvatar
|
|
687
|
+
:image="`${props.row[col.avatarKey]}`"
|
|
688
|
+
:indicatorColor="
|
|
689
|
+
typeof col.indicatorColor === 'function' &&
|
|
690
|
+
col.indicatorColor(props.row)
|
|
691
|
+
? col.indicatorColor(props.row)
|
|
692
|
+
: ''
|
|
693
|
+
"
|
|
694
|
+
:indicatorIcon="
|
|
695
|
+
typeof col.indicatorIcon === 'function' &&
|
|
696
|
+
col.indicatorIcon(props.row)
|
|
697
|
+
? col.indicatorIcon(props.row)
|
|
698
|
+
: ''
|
|
699
|
+
"
|
|
700
|
+
:name="`${props.row[col.avatarKey]}`"
|
|
701
|
+
:showIndicator="col.showIndicator"
|
|
702
|
+
size="lg"
|
|
703
|
+
/>
|
|
704
|
+
</div>
|
|
662
705
|
</div>
|
|
663
|
-
</div>
|
|
664
706
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
col.noEllipsis ? 'no-ellipsis-content' : '',
|
|
670
|
-
col.doubleSpan && col.noEllipsis
|
|
671
|
-
? 'full-width-text-content'
|
|
672
|
-
: '',
|
|
673
|
-
!isResponsiveTablet &&
|
|
674
|
-
isTablet &&
|
|
675
|
-
col.classes &&
|
|
676
|
-
col.classes.length > 0 &&
|
|
677
|
-
col.classes[0] === 'no-wrap-text'
|
|
678
|
-
? 'tablet-event-text'
|
|
679
|
-
: '',
|
|
680
|
-
typeof col.combineColoumn === 'function' &&
|
|
681
|
-
col.combineColoumn(props.row)
|
|
682
|
-
? 'combine-col-small-device-wrapper'
|
|
683
|
-
: '',
|
|
684
|
-
]"
|
|
685
|
-
:id="`long-content-${col.field}-${props.row.id}`"
|
|
686
|
-
>
|
|
687
|
-
{{ col.value }}
|
|
688
|
-
</span>
|
|
689
|
-
<template
|
|
690
|
-
v-if="
|
|
691
|
-
typeof col.combineColoumn === 'function' &&
|
|
692
|
-
col.combineColoumn(props.row)
|
|
693
|
-
"
|
|
707
|
+
<q-item-label
|
|
708
|
+
v-if="col.type !== 'icon'"
|
|
709
|
+
caption
|
|
710
|
+
class="row items-center"
|
|
694
711
|
>
|
|
695
|
-
<
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
712
|
+
<span
|
|
713
|
+
:class="[
|
|
714
|
+
col.value &&
|
|
715
|
+
col.value.length > minOverflowLength &&
|
|
716
|
+
!col.header
|
|
717
|
+
? 'long-text-content'
|
|
718
|
+
: 'card-header-table',
|
|
719
|
+
|
|
720
|
+
col.noEllipsis ? 'no-ellipsis-content' : '',
|
|
721
|
+
isTablet && col.header
|
|
722
|
+
? 'tablet-header-table'
|
|
723
|
+
: '',
|
|
724
|
+
isMobile && col.header
|
|
725
|
+
? 'mobile-header-table'
|
|
726
|
+
: '',
|
|
727
|
+
col.doubleSpan && col.noEllipsis
|
|
728
|
+
? 'full-width-text-content'
|
|
729
|
+
: '',
|
|
730
|
+
col.classes,
|
|
731
|
+
!isResponsiveTablet &&
|
|
732
|
+
isTablet &&
|
|
733
|
+
col.classes &&
|
|
734
|
+
col.classes.length > 0 &&
|
|
735
|
+
col.classes[0] === 'no-wrap-text'
|
|
736
|
+
? 'tablet-event-text'
|
|
737
|
+
: '',
|
|
738
|
+
typeof col.combineColoumn === 'function' &&
|
|
739
|
+
col.combineColoumn(props.row)
|
|
740
|
+
? 'combine-col-small-device-wrapper'
|
|
741
|
+
: '',
|
|
742
|
+
]"
|
|
743
|
+
:id="`long-content-${col.field}-${props.row.id}`"
|
|
744
|
+
:ref="
|
|
745
|
+
(el) =>
|
|
746
|
+
checkCellOverflow(
|
|
747
|
+
`#long-content-${col.field}-${props.row.id}`,
|
|
748
|
+
`${col.field}-${props.row.id}`
|
|
749
|
+
)
|
|
750
|
+
"
|
|
751
|
+
:style="{ maxWidth: headerMaxWidth }"
|
|
752
|
+
>
|
|
753
|
+
{{ col.value }}
|
|
754
|
+
<span
|
|
755
|
+
v-if="col.captionKey && col.type !== 'icon'"
|
|
756
|
+
class="td-caption text-body-xs"
|
|
757
|
+
>
|
|
758
|
+
<span class="text-strike">
|
|
759
|
+
{{ props.row[col.strikeCaptionKey] }}
|
|
760
|
+
</span>
|
|
761
|
+
{{ props.row[col.captionKey] }}
|
|
762
|
+
</span>
|
|
763
|
+
</span>
|
|
764
|
+
<div
|
|
765
|
+
v-if="col.colIcon"
|
|
766
|
+
class="q-ml-xs icon-secondary-opacity"
|
|
700
767
|
>
|
|
701
768
|
<q-icon
|
|
702
|
-
|
|
703
|
-
:
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
769
|
+
:class="col.colIcon.icon"
|
|
770
|
+
:ariaLabel="
|
|
771
|
+
typeof col.colIcon.ariaLabel === 'function'
|
|
772
|
+
? col.colIcon.ariaLabel(props.row)
|
|
773
|
+
: col.colIcon.ariaLabel
|
|
774
|
+
"
|
|
775
|
+
color="primary"
|
|
776
|
+
size="16px"
|
|
777
|
+
ref="btn-icon"
|
|
778
|
+
@click.stop="col.colIcon.colIconClick()"
|
|
779
|
+
@on-click="col.colIcon.colIconClick()"
|
|
780
|
+
>
|
|
781
|
+
</q-icon>
|
|
782
|
+
</div>
|
|
783
|
+
<template
|
|
784
|
+
v-if="
|
|
785
|
+
typeof col.combineColoumn === 'function' &&
|
|
786
|
+
col.combineColoumn(props.row)
|
|
787
|
+
"
|
|
788
|
+
>
|
|
789
|
+
<template
|
|
790
|
+
v-for="(
|
|
791
|
+
combineCol, colKey
|
|
792
|
+
) in col.combineColoumn(props.row)"
|
|
707
793
|
:key="colKey"
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
794
|
+
>
|
|
795
|
+
<q-icon
|
|
796
|
+
v-if="combineCol.icon"
|
|
797
|
+
:class="combineCol.icon"
|
|
798
|
+
:alt="combineCol.ariaLabel"
|
|
799
|
+
:aria-label="combineCol.ariaLabel"
|
|
800
|
+
:color="combineCol?.iconColor ?? 'primary'"
|
|
801
|
+
:key="colKey"
|
|
802
|
+
size="1rem"
|
|
803
|
+
/>
|
|
804
|
+
<div v-else>
|
|
805
|
+
{{ props.row[combineCol.key] }}
|
|
806
|
+
</div>
|
|
807
|
+
</template>
|
|
713
808
|
</template>
|
|
714
|
-
|
|
715
|
-
|
|
809
|
+
|
|
810
|
+
<UTooltip
|
|
811
|
+
v-if="
|
|
812
|
+
col.value &&
|
|
813
|
+
col.value.length > minOverflowLength &&
|
|
814
|
+
cellOverflowStates[
|
|
815
|
+
`${col.field}-${props.row.id}`
|
|
816
|
+
]
|
|
817
|
+
"
|
|
818
|
+
anchor="bottom middle"
|
|
819
|
+
:description="col.value"
|
|
820
|
+
:offset="[10, 40]"
|
|
821
|
+
self="bottom middle"
|
|
822
|
+
:target="`#long-content-${col.field}-${props.row.id}`"
|
|
823
|
+
/>
|
|
824
|
+
<div
|
|
825
|
+
v-if="
|
|
826
|
+
col.captionKey &&
|
|
827
|
+
typeof col.showCaption === 'function' &&
|
|
828
|
+
col.showCaption(props.row)
|
|
829
|
+
"
|
|
830
|
+
class="td-caption mobile-primary-caption text-body-sm"
|
|
831
|
+
:id="`long-caption-${col.field}-${props.row.id}`"
|
|
832
|
+
:ref="
|
|
833
|
+
(el) =>
|
|
834
|
+
checkCellOverflow(
|
|
835
|
+
`#long-caption-${col.field}-${props.row.id}`,
|
|
836
|
+
`caption-${col.field}-${props.row.id}`
|
|
837
|
+
)
|
|
838
|
+
"
|
|
839
|
+
:style="{
|
|
840
|
+
maxWidth: captionMaxWidth,
|
|
841
|
+
width: '100%',
|
|
842
|
+
}"
|
|
843
|
+
>
|
|
844
|
+
<template v-if="col.captionKeyTitle">
|
|
845
|
+
{{ col.captionKeyTitle }}:
|
|
846
|
+
</template>
|
|
847
|
+
{{ props.row[col.captionKey] }}
|
|
848
|
+
</div>
|
|
849
|
+
<UTooltip
|
|
850
|
+
v-if="
|
|
851
|
+
props.row[col.captionKey] &&
|
|
852
|
+
props.row[col.captionKey].length >
|
|
853
|
+
minOverflowLength &&
|
|
854
|
+
cellOverflowStates[
|
|
855
|
+
`caption-${col.field}-${props.row.id}`
|
|
856
|
+
]
|
|
857
|
+
"
|
|
858
|
+
anchor="bottom middle"
|
|
859
|
+
:description="props.row[col.captionKey]"
|
|
860
|
+
:offset="[10, 40]"
|
|
861
|
+
self="bottom middle"
|
|
862
|
+
:target="`#long-caption-${col.field}-${props.row.id}`"
|
|
863
|
+
/>
|
|
864
|
+
</q-item-label>
|
|
865
|
+
</div>
|
|
866
|
+
</template>
|
|
867
|
+
|
|
868
|
+
<template v-if="col.actions && col.actions.length === 1">
|
|
869
|
+
<template
|
|
870
|
+
v-for="(action, key) in col.actions"
|
|
871
|
+
:key="key"
|
|
872
|
+
>
|
|
873
|
+
<UBtnStd
|
|
716
874
|
v-if="
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
col.field,
|
|
721
|
-
props.row.id,
|
|
722
|
-
'content'
|
|
723
|
-
)
|
|
875
|
+
typeof action.hide === 'function'
|
|
876
|
+
? !action.hide(props.row)
|
|
877
|
+
: true
|
|
724
878
|
"
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
879
|
+
:color="
|
|
880
|
+
typeof action.color === 'function'
|
|
881
|
+
? action.color(props.row)
|
|
882
|
+
: action.color
|
|
883
|
+
"
|
|
884
|
+
:disable="
|
|
885
|
+
typeof action.disable === 'function' &&
|
|
886
|
+
action.disable(props.row)
|
|
887
|
+
"
|
|
888
|
+
:flat="
|
|
889
|
+
typeof action.flat === 'function'
|
|
890
|
+
? action.flat(props.row)
|
|
891
|
+
: action.flat
|
|
892
|
+
"
|
|
893
|
+
full-width
|
|
894
|
+
:key="key"
|
|
895
|
+
:label="
|
|
896
|
+
typeof action.label === 'function'
|
|
897
|
+
? action.label(props.row)
|
|
898
|
+
: action.label
|
|
899
|
+
"
|
|
900
|
+
:leftIcon="
|
|
901
|
+
typeof action.icon === 'function'
|
|
902
|
+
? action.icon(props.row)
|
|
903
|
+
: action.icon
|
|
904
|
+
"
|
|
905
|
+
:loading="
|
|
906
|
+
typeof action.loading === 'function'
|
|
907
|
+
? action.loading(props.row)
|
|
908
|
+
: action.loading
|
|
736
909
|
"
|
|
737
|
-
|
|
738
|
-
|
|
910
|
+
:outline="
|
|
911
|
+
typeof action.outline === 'function'
|
|
912
|
+
? action.outline(props.row)
|
|
913
|
+
: action.outline
|
|
914
|
+
"
|
|
915
|
+
:size="action.size"
|
|
916
|
+
@on-click="action.handler(props.row)"
|
|
739
917
|
>
|
|
740
|
-
<template
|
|
741
|
-
|
|
918
|
+
<template #tooltip>
|
|
919
|
+
<UTooltip
|
|
920
|
+
v-if="
|
|
921
|
+
typeof action.tooltip === 'function'
|
|
922
|
+
? action.tooltip(props.row)
|
|
923
|
+
: action.tooltip
|
|
924
|
+
"
|
|
925
|
+
:anchor="action.anchor"
|
|
926
|
+
:description="
|
|
927
|
+
typeof action.tooltip === 'function'
|
|
928
|
+
? action.tooltip(props.row)
|
|
929
|
+
: action.tooltip
|
|
930
|
+
"
|
|
931
|
+
:offset="
|
|
932
|
+
action.offset ? action.offset : [10, 40]
|
|
933
|
+
"
|
|
934
|
+
:self="action.anchor"
|
|
935
|
+
/>
|
|
742
936
|
</template>
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
props.row[col.captionKey].length > 12 &&
|
|
749
|
-
isContentVisible(
|
|
750
|
-
col.field,
|
|
751
|
-
props.row.id,
|
|
752
|
-
'caption'
|
|
753
|
-
)
|
|
754
|
-
"
|
|
755
|
-
anchor="bottom middle"
|
|
756
|
-
:description="props.row[col.captionKey]"
|
|
757
|
-
:offset="[10, 40]"
|
|
758
|
-
self="bottom middle"
|
|
759
|
-
:target="`#long-caption-${col.field}-${props.row.id}`"
|
|
760
|
-
/>
|
|
761
|
-
</q-item-label>
|
|
762
|
-
</div>
|
|
763
|
-
</template>
|
|
764
|
-
<template v-if="col.actions && col.actions.length === 1">
|
|
765
|
-
<template v-for="(action, key) in col.actions" :key="key">
|
|
766
|
-
<UBtnStd
|
|
937
|
+
</UBtnStd>
|
|
938
|
+
</template>
|
|
939
|
+
</template>
|
|
940
|
+
<template v-if="col.actions && col.actions.length > 1">
|
|
941
|
+
<q-dialog
|
|
767
942
|
v-if="
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
"
|
|
772
|
-
:color="
|
|
773
|
-
typeof action.color === 'function'
|
|
774
|
-
? action.color(props.row)
|
|
775
|
-
: action.color
|
|
776
|
-
"
|
|
777
|
-
:disable="
|
|
778
|
-
typeof action.disable === 'function' &&
|
|
779
|
-
action.disable(props.row)
|
|
780
|
-
"
|
|
781
|
-
:flat="
|
|
782
|
-
typeof action.flat === 'function'
|
|
783
|
-
? action.flat(props.row)
|
|
784
|
-
: action.flat
|
|
785
|
-
"
|
|
786
|
-
full-width
|
|
787
|
-
:key="key"
|
|
788
|
-
:label="
|
|
789
|
-
typeof action.label === 'function'
|
|
790
|
-
? action.label(props.row)
|
|
791
|
-
: action.label
|
|
792
|
-
"
|
|
793
|
-
:leftIcon="
|
|
794
|
-
typeof action.icon === 'function'
|
|
795
|
-
? action.icon(props.row)
|
|
796
|
-
: action.icon
|
|
797
|
-
"
|
|
798
|
-
:loading="
|
|
799
|
-
typeof action.loading === 'function'
|
|
800
|
-
? action.loading(props.row)
|
|
801
|
-
: action.loading
|
|
943
|
+
isTablet &&
|
|
944
|
+
moreActionDialogData &&
|
|
945
|
+
moreActionDialogData.showDialog[props.row.id]
|
|
802
946
|
"
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
? action.outline(props.row)
|
|
806
|
-
: action.outline
|
|
947
|
+
v-model="
|
|
948
|
+
moreActionDialogData.showDialog[props.row.id]
|
|
807
949
|
"
|
|
808
|
-
|
|
809
|
-
|
|
950
|
+
class="more-action-popup"
|
|
951
|
+
persistent
|
|
810
952
|
>
|
|
811
|
-
<
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
: action.tooltip
|
|
817
|
-
"
|
|
818
|
-
:anchor="action.anchor"
|
|
819
|
-
:description="
|
|
820
|
-
typeof action.tooltip === 'function'
|
|
821
|
-
? action.tooltip(props.row)
|
|
822
|
-
: action.tooltip
|
|
823
|
-
"
|
|
824
|
-
:offset="action.offset ? action.offset : [10, 40]"
|
|
825
|
-
:self="action.anchor"
|
|
826
|
-
/>
|
|
827
|
-
</template>
|
|
828
|
-
</UBtnStd>
|
|
829
|
-
</template>
|
|
830
|
-
</template>
|
|
831
|
-
<template v-if="col.actions && col.actions.length > 1">
|
|
832
|
-
<q-dialog
|
|
833
|
-
v-if="
|
|
834
|
-
isTablet &&
|
|
835
|
-
moreActionDialogData &&
|
|
836
|
-
moreActionDialogData.showDialog[props.row.id]
|
|
837
|
-
"
|
|
838
|
-
v-model="moreActionDialogData.showDialog[props.row.id]"
|
|
839
|
-
class="more-action-popup"
|
|
840
|
-
persistent
|
|
841
|
-
>
|
|
842
|
-
<q-card
|
|
843
|
-
class="more-action-popup-wrapper confirmation-dialog-wrapper q-px-ba q-py-ba"
|
|
844
|
-
>
|
|
845
|
-
<q-card-section>
|
|
846
|
-
<div class="content-wrapper text-center">
|
|
847
|
-
<div
|
|
848
|
-
class="q-pb-ba flex justify-center items-center"
|
|
849
|
-
>
|
|
953
|
+
<q-card
|
|
954
|
+
class="more-action-popup-wrapper confirmation-dialog-wrapper q-px-ba q-py-ba"
|
|
955
|
+
>
|
|
956
|
+
<q-card-section>
|
|
957
|
+
<div class="content-wrapper text-center">
|
|
850
958
|
<div
|
|
851
|
-
|
|
852
|
-
moreActionDialogData.row.iconColor ===
|
|
853
|
-
'accent'
|
|
854
|
-
? 'icon-bg-accent'
|
|
855
|
-
: 'icon-bg-primary'
|
|
856
|
-
}`"
|
|
959
|
+
class="q-pb-ba flex justify-center items-center"
|
|
857
960
|
>
|
|
858
|
-
<
|
|
859
|
-
:class="
|
|
961
|
+
<div
|
|
962
|
+
:class="`remove-icon-wrapper ${
|
|
860
963
|
moreActionDialogData.row.iconColor ===
|
|
861
964
|
'accent'
|
|
862
|
-
? 'icon-
|
|
863
|
-
: 'icon-
|
|
965
|
+
? 'icon-bg-accent'
|
|
966
|
+
: 'icon-bg-primary'
|
|
864
967
|
}`"
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
968
|
+
>
|
|
969
|
+
<q-icon
|
|
970
|
+
:class="`${
|
|
971
|
+
moreActionDialogData.row.icon
|
|
972
|
+
} ${
|
|
973
|
+
moreActionDialogData.row.iconColor ===
|
|
974
|
+
'accent'
|
|
975
|
+
? 'icon-text-accent'
|
|
976
|
+
: 'icon-text-primary'
|
|
977
|
+
}`"
|
|
978
|
+
alt="confirmation icon"
|
|
979
|
+
aria-label="confirmation icon"
|
|
980
|
+
size="1.5rem"
|
|
981
|
+
/>
|
|
982
|
+
</div>
|
|
869
983
|
</div>
|
|
870
|
-
</div>
|
|
871
984
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
985
|
+
<div
|
|
986
|
+
class="text-heading-xxs primary-content-text q-pb-xxs"
|
|
987
|
+
>
|
|
988
|
+
{{ moreActionDialogData.row.title }}
|
|
989
|
+
</div>
|
|
990
|
+
<div
|
|
991
|
+
v-if="moreActionDialogData.row.description"
|
|
992
|
+
class="text-body-sm secondary-content-text q-pb-xs"
|
|
993
|
+
>
|
|
994
|
+
{{ moreActionDialogData.row.description }}
|
|
995
|
+
</div>
|
|
882
996
|
</div>
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
</q-card-section>
|
|
997
|
+
<!-- <p class="hidden-scope-value">{{ scope.value }}</p> -->
|
|
998
|
+
</q-card-section>
|
|
886
999
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
moreActionDialogData.primaryAction
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
moreActionDialogData.primaryAction.
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
1000
|
+
<q-card-actions align="right">
|
|
1001
|
+
<UBtnStd
|
|
1002
|
+
v-if="moreActionDialogData.secondaryAction"
|
|
1003
|
+
:color="
|
|
1004
|
+
moreActionDialogData.secondaryAction.color
|
|
1005
|
+
"
|
|
1006
|
+
:disable="
|
|
1007
|
+
moreActionDialogData.secondaryAction.disable
|
|
1008
|
+
"
|
|
1009
|
+
:flat="
|
|
1010
|
+
moreActionDialogData.secondaryAction.flat
|
|
1011
|
+
"
|
|
1012
|
+
:label="
|
|
1013
|
+
moreActionDialogData.secondaryAction.label
|
|
1014
|
+
"
|
|
1015
|
+
:loading="
|
|
1016
|
+
moreActionDialogData.secondaryAction.loading
|
|
1017
|
+
"
|
|
1018
|
+
:outline="
|
|
1019
|
+
moreActionDialogData.secondaryAction.outline
|
|
1020
|
+
"
|
|
1021
|
+
:size="
|
|
1022
|
+
moreActionDialogData.secondaryAction.size
|
|
1023
|
+
"
|
|
1024
|
+
@on-click="
|
|
1025
|
+
moreActionDialogData.secondaryAction.handler(
|
|
1026
|
+
props.row
|
|
1027
|
+
)
|
|
1028
|
+
"
|
|
1029
|
+
/>
|
|
1030
|
+
<UBtnStd
|
|
1031
|
+
v-if="moreActionDialogData.primaryAction"
|
|
1032
|
+
class="confirm-primary-action"
|
|
1033
|
+
:color="
|
|
1034
|
+
moreActionDialogData.primaryAction.color
|
|
1035
|
+
"
|
|
1036
|
+
:disable="
|
|
1037
|
+
moreActionDialogData.primaryAction.disable
|
|
1038
|
+
"
|
|
1039
|
+
:flat="moreActionDialogData.primaryAction.flat"
|
|
1040
|
+
:label="
|
|
1041
|
+
moreActionDialogData.primaryAction.label
|
|
1042
|
+
"
|
|
1043
|
+
:loading="
|
|
1044
|
+
moreActionDialogData.primaryAction.loading
|
|
1045
|
+
"
|
|
1046
|
+
:outline="
|
|
1047
|
+
moreActionDialogData.primaryAction.outline
|
|
1048
|
+
"
|
|
1049
|
+
:size="moreActionDialogData.primaryAction.size"
|
|
1050
|
+
@on-click="
|
|
1051
|
+
moreActionDialogData.primaryAction.handler(
|
|
1052
|
+
props.row
|
|
1053
|
+
)
|
|
1054
|
+
"
|
|
1055
|
+
/>
|
|
1056
|
+
</q-card-actions>
|
|
1057
|
+
</q-card>
|
|
1058
|
+
</q-dialog>
|
|
938
1059
|
|
|
939
|
-
<UBtnStd
|
|
940
|
-
v-if="!isMobile"
|
|
941
|
-
color="primary"
|
|
942
|
-
full-width
|
|
943
|
-
:id="`actionPopupRefBtn-${props.row.id}`"
|
|
944
|
-
:label="viewMoreLabel"
|
|
945
|
-
outline
|
|
946
|
-
>
|
|
947
|
-
<template #menu>
|
|
948
|
-
<q-menu
|
|
949
|
-
class="more-action-popup"
|
|
950
|
-
auto-close
|
|
951
|
-
fit
|
|
952
|
-
:id="`actionPopupRef-${props.row.id}`"
|
|
953
|
-
:offset="[10, 20]"
|
|
954
|
-
:target="`#actionPopupRefBtn-${props.row.id}`"
|
|
955
|
-
transition-hide="jump-up"
|
|
956
|
-
transition-show="jump-down"
|
|
957
|
-
@show="handleMenuShow(props.row.id)"
|
|
958
|
-
@hide="handleMenuHide"
|
|
959
|
-
>
|
|
960
|
-
<div :class="tailClass" />
|
|
961
|
-
<div
|
|
962
|
-
class="q-pt-ba q-px-ba q-pb-none text-heading-xxs text-dark"
|
|
963
|
-
>
|
|
964
|
-
Select More Options
|
|
965
|
-
</div>
|
|
966
|
-
<q-list class="grid-more-action">
|
|
967
|
-
<template v-for="(action, __i) in col.actions">
|
|
968
|
-
<q-item
|
|
969
|
-
v-if="
|
|
970
|
-
typeof action.hide === 'function'
|
|
971
|
-
? !action.hide(props.row)
|
|
972
|
-
: true
|
|
973
|
-
"
|
|
974
|
-
class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
|
|
975
|
-
:aria-label="
|
|
976
|
-
typeof action.label === 'function'
|
|
977
|
-
? action.label(props.row)
|
|
978
|
-
: action.label
|
|
979
|
-
"
|
|
980
|
-
clickable
|
|
981
|
-
:key="__i"
|
|
982
|
-
tabindex="-1"
|
|
983
|
-
@click="action.handler(props.row)"
|
|
984
|
-
>
|
|
985
|
-
<q-item-section class="q-pr-xs" avatar>
|
|
986
|
-
<q-icon
|
|
987
|
-
v-if="
|
|
988
|
-
typeof action.icon === 'function'
|
|
989
|
-
? action.icon(props.row)
|
|
990
|
-
: action.icon
|
|
991
|
-
"
|
|
992
|
-
:class="`${
|
|
993
|
-
typeof action.icon === 'function'
|
|
994
|
-
? action.icon(props.row)
|
|
995
|
-
: action.icon
|
|
996
|
-
} text-${getActionItemColor(
|
|
997
|
-
action,
|
|
998
|
-
props.row
|
|
999
|
-
)}`"
|
|
1000
|
-
size="1.5rem"
|
|
1001
|
-
tabindex="-1"
|
|
1002
|
-
/>
|
|
1003
|
-
</q-item-section>
|
|
1004
|
-
<q-item-section
|
|
1005
|
-
:class="`text-caption-lg text-${getActionItemColor(
|
|
1006
|
-
action,
|
|
1007
|
-
props.row
|
|
1008
|
-
)}`"
|
|
1009
|
-
tabindex="0"
|
|
1010
|
-
>
|
|
1011
|
-
{{
|
|
1012
|
-
typeof action.label === 'function'
|
|
1013
|
-
? action.label(props.row)
|
|
1014
|
-
: action.label
|
|
1015
|
-
}}
|
|
1016
|
-
</q-item-section>
|
|
1017
|
-
</q-item>
|
|
1018
|
-
</template>
|
|
1019
|
-
</q-list>
|
|
1020
|
-
</q-menu>
|
|
1021
|
-
</template>
|
|
1022
|
-
</UBtnStd>
|
|
1023
|
-
<template v-if="isMobile">
|
|
1024
|
-
<!-- To show a single button in bottom of card -->
|
|
1025
1060
|
<UBtnStd
|
|
1026
|
-
v-if="!
|
|
1061
|
+
v-if="!isMobile"
|
|
1027
1062
|
color="primary"
|
|
1028
1063
|
full-width
|
|
1029
|
-
:id="`
|
|
1064
|
+
:id="`actionPopupRefBtn-${props.row.id}`"
|
|
1030
1065
|
:label="viewMoreLabel"
|
|
1031
1066
|
outline
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1067
|
+
>
|
|
1068
|
+
<template #menu>
|
|
1069
|
+
<q-menu
|
|
1070
|
+
class="more-action-popup"
|
|
1071
|
+
auto-close
|
|
1072
|
+
fit
|
|
1073
|
+
:id="`actionPopupRef-${props.row.id}`"
|
|
1074
|
+
:offset="[10, 20]"
|
|
1075
|
+
:target="`#actionPopupRefBtn-${props.row.id}`"
|
|
1076
|
+
transition-hide="jump-up"
|
|
1077
|
+
transition-show="jump-down"
|
|
1078
|
+
@show="handleMenuShow(props.row.id)"
|
|
1079
|
+
@hide="handleMenuHide"
|
|
1080
|
+
>
|
|
1081
|
+
<div :class="tailClass" />
|
|
1082
|
+
<div
|
|
1083
|
+
class="q-pt-ba q-px-ba q-pb-none text-heading-xxs text-dark"
|
|
1084
|
+
>
|
|
1085
|
+
Select More Options
|
|
1086
|
+
</div>
|
|
1087
|
+
<q-list class="grid-more-action">
|
|
1088
|
+
<template v-for="(action, __i) in col.actions">
|
|
1089
|
+
<q-item
|
|
1090
|
+
v-if="
|
|
1091
|
+
typeof action.hide === 'function'
|
|
1092
|
+
? !action.hide(props.row)
|
|
1093
|
+
: true
|
|
1094
|
+
"
|
|
1095
|
+
class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
|
|
1096
|
+
:aria-label="
|
|
1097
|
+
typeof action.label === 'function'
|
|
1098
|
+
? action.label(props.row)
|
|
1099
|
+
: action.label
|
|
1100
|
+
"
|
|
1101
|
+
clickable
|
|
1102
|
+
:key="__i"
|
|
1103
|
+
tabindex="-1"
|
|
1104
|
+
@click="action.handler(props.row)"
|
|
1105
|
+
>
|
|
1106
|
+
<q-item-section class="q-pr-xs" avatar>
|
|
1107
|
+
<q-icon
|
|
1108
|
+
v-if="
|
|
1109
|
+
typeof action.icon === 'function'
|
|
1110
|
+
? action.icon(props.row)
|
|
1111
|
+
: action.icon
|
|
1112
|
+
"
|
|
1113
|
+
:class="`${
|
|
1114
|
+
typeof action.icon === 'function'
|
|
1115
|
+
? action.icon(props.row)
|
|
1116
|
+
: action.icon
|
|
1117
|
+
} text-${getActionItemColor(
|
|
1118
|
+
action,
|
|
1119
|
+
props.row
|
|
1120
|
+
)}`"
|
|
1121
|
+
size="1.5rem"
|
|
1122
|
+
tabindex="-1"
|
|
1123
|
+
/>
|
|
1124
|
+
</q-item-section>
|
|
1125
|
+
<q-item-section
|
|
1126
|
+
:class="`text-caption-lg text-${getActionItemColor(
|
|
1127
|
+
action,
|
|
1128
|
+
props.row
|
|
1129
|
+
)}`"
|
|
1130
|
+
tabindex="0"
|
|
1131
|
+
>
|
|
1132
|
+
{{
|
|
1133
|
+
typeof action.label === 'function'
|
|
1134
|
+
? action.label(props.row)
|
|
1135
|
+
: action.label
|
|
1136
|
+
}}
|
|
1137
|
+
</q-item-section>
|
|
1138
|
+
</q-item>
|
|
1139
|
+
</template>
|
|
1140
|
+
</q-list>
|
|
1141
|
+
</q-menu>
|
|
1142
|
+
</template>
|
|
1143
|
+
</UBtnStd>
|
|
1144
|
+
<template v-if="isMobile">
|
|
1145
|
+
<!-- To show a single button in bottom of card -->
|
|
1039
1146
|
<UBtnStd
|
|
1147
|
+
v-if="!col.useResponsiveActions"
|
|
1040
1148
|
color="primary"
|
|
1041
1149
|
full-width
|
|
1042
1150
|
:id="`view-more-actions-${props.row['id']}`"
|
|
@@ -1046,254 +1154,282 @@ watch(
|
|
|
1046
1154
|
handleOpenMobileMoreActions(props.row['id'])
|
|
1047
1155
|
"
|
|
1048
1156
|
/>
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
'inline'
|
|
1053
|
-
).slice(0, 1)"
|
|
1054
|
-
:key="key"
|
|
1055
|
-
>
|
|
1157
|
+
|
|
1158
|
+
<!-- To show two button in bottom of card -->
|
|
1159
|
+
<div v-else class="expansion-table-card-action">
|
|
1056
1160
|
<UBtnStd
|
|
1057
|
-
|
|
1058
|
-
typeof action.hide === 'function'
|
|
1059
|
-
? !action.hide(props.row)
|
|
1060
|
-
: true
|
|
1061
|
-
"
|
|
1062
|
-
:color="
|
|
1063
|
-
typeof action.color === 'function'
|
|
1064
|
-
? action.color(props.row)
|
|
1065
|
-
: action.color
|
|
1066
|
-
"
|
|
1067
|
-
:disable="
|
|
1068
|
-
typeof action.disable === 'function'
|
|
1069
|
-
? action.disable(props.row)
|
|
1070
|
-
: false
|
|
1071
|
-
"
|
|
1072
|
-
:flat="
|
|
1073
|
-
typeof action.flat === 'function'
|
|
1074
|
-
? action.flat(props.row)
|
|
1075
|
-
: action.flat
|
|
1076
|
-
"
|
|
1161
|
+
color="primary"
|
|
1077
1162
|
full-width
|
|
1078
|
-
:
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
:loading="
|
|
1084
|
-
typeof action.loading === 'function'
|
|
1085
|
-
? action.loading(props.row)
|
|
1086
|
-
: action.loading
|
|
1087
|
-
"
|
|
1088
|
-
:outline="
|
|
1089
|
-
typeof action.outline === 'function'
|
|
1090
|
-
? action.outline(props.row)
|
|
1091
|
-
: action.outline
|
|
1163
|
+
:id="`view-more-actions-${props.row['id']}`"
|
|
1164
|
+
:label="viewMoreLabel"
|
|
1165
|
+
outline
|
|
1166
|
+
@on-click="
|
|
1167
|
+
handleOpenMobileMoreActions(props.row['id'])
|
|
1092
1168
|
"
|
|
1093
|
-
|
|
1169
|
+
/>
|
|
1170
|
+
<template
|
|
1171
|
+
v-for="(action, key) in getMenuInlineActions(
|
|
1172
|
+
col,
|
|
1173
|
+
'inline'
|
|
1174
|
+
).slice(0, 1)"
|
|
1175
|
+
:key="key"
|
|
1094
1176
|
>
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1177
|
+
<UBtnStd
|
|
1178
|
+
v-if="
|
|
1179
|
+
typeof action.hide === 'function'
|
|
1180
|
+
? !action.hide(props.row)
|
|
1181
|
+
: true
|
|
1182
|
+
"
|
|
1183
|
+
:color="
|
|
1184
|
+
typeof action.color === 'function'
|
|
1185
|
+
? action.color(props.row)
|
|
1186
|
+
: action.color
|
|
1187
|
+
"
|
|
1188
|
+
:disable="
|
|
1189
|
+
typeof action.disable === 'function'
|
|
1190
|
+
? action.disable(props.row)
|
|
1191
|
+
: false
|
|
1192
|
+
"
|
|
1193
|
+
:flat="
|
|
1194
|
+
typeof action.flat === 'function'
|
|
1195
|
+
? action.flat(props.row)
|
|
1196
|
+
: action.flat
|
|
1197
|
+
"
|
|
1198
|
+
full-width
|
|
1199
|
+
:label="
|
|
1200
|
+
typeof action.label === 'function'
|
|
1201
|
+
? action.label(props.row)
|
|
1202
|
+
: action.label
|
|
1203
|
+
"
|
|
1204
|
+
:loading="
|
|
1205
|
+
typeof action.loading === 'function'
|
|
1206
|
+
? action.loading(props.row)
|
|
1207
|
+
: action.loading
|
|
1208
|
+
"
|
|
1209
|
+
:outline="
|
|
1210
|
+
typeof action.outline === 'function'
|
|
1211
|
+
? action.outline(props.row)
|
|
1212
|
+
: action.outline
|
|
1213
|
+
"
|
|
1214
|
+
@on-click="action.handler(props.row)"
|
|
1215
|
+
>
|
|
1216
|
+
</UBtnStd>
|
|
1217
|
+
</template>
|
|
1218
|
+
</div>
|
|
1098
1219
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
>
|
|
1220
|
+
<USheet
|
|
1221
|
+
v-if="
|
|
1222
|
+
moreActionDialogData &&
|
|
1223
|
+
moreActionDialogData.showDialog[props.row.id]
|
|
1224
|
+
"
|
|
1225
|
+
v-model:dialogs="
|
|
1226
|
+
mobileActionsDialog[props.row['id']]
|
|
1227
|
+
"
|
|
1228
|
+
:close-icon-label="closeIconLabel"
|
|
1229
|
+
:heading="moreActionDialogData.row.title"
|
|
1230
|
+
:is-left-icon="false"
|
|
1231
|
+
:show-action-buttons="true"
|
|
1232
|
+
>
|
|
1233
|
+
<template #content>
|
|
1234
|
+
<q-card
|
|
1235
|
+
class="more-action-popup-wrapper confirmation-dialog-wrapper mobile-confirmation-dialog q-px-ba q-py-ba"
|
|
1236
|
+
>
|
|
1237
|
+
<q-card-section>
|
|
1238
|
+
<div class="content-wrapper text-center">
|
|
1119
1239
|
<div
|
|
1120
|
-
|
|
1121
|
-
moreActionDialogData.row.iconColor ===
|
|
1122
|
-
'accent'
|
|
1123
|
-
? 'icon-bg-accent'
|
|
1124
|
-
: 'icon-bg-primary'
|
|
1125
|
-
}`"
|
|
1240
|
+
class="q-pb-ba flex justify-center items-center"
|
|
1126
1241
|
>
|
|
1127
|
-
<
|
|
1128
|
-
:class="
|
|
1129
|
-
moreActionDialogData.row.icon
|
|
1130
|
-
} ${
|
|
1242
|
+
<div
|
|
1243
|
+
:class="`remove-icon-wrapper ${
|
|
1131
1244
|
moreActionDialogData.row.iconColor ===
|
|
1132
1245
|
'accent'
|
|
1133
|
-
? 'icon-
|
|
1134
|
-
: 'icon-
|
|
1246
|
+
? 'icon-bg-accent'
|
|
1247
|
+
: 'icon-bg-primary'
|
|
1135
1248
|
}`"
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1249
|
+
>
|
|
1250
|
+
<q-icon
|
|
1251
|
+
:class="`${
|
|
1252
|
+
moreActionDialogData.row.icon
|
|
1253
|
+
} ${
|
|
1254
|
+
moreActionDialogData.row
|
|
1255
|
+
.iconColor === 'accent'
|
|
1256
|
+
? 'icon-text-accent'
|
|
1257
|
+
: 'icon-text-primary'
|
|
1258
|
+
}`"
|
|
1259
|
+
alt="confirmation icon"
|
|
1260
|
+
aria-label="confirmation icon"
|
|
1261
|
+
size="1.5rem"
|
|
1262
|
+
/>
|
|
1263
|
+
</div>
|
|
1140
1264
|
</div>
|
|
1141
|
-
</div>
|
|
1142
1265
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1266
|
+
<div
|
|
1267
|
+
class="text-heading-xxs primary-content-text q-pb-xxs"
|
|
1268
|
+
>
|
|
1269
|
+
{{ moreActionDialogData.row.title }}
|
|
1270
|
+
</div>
|
|
1271
|
+
<div
|
|
1272
|
+
v-if="
|
|
1273
|
+
moreActionDialogData.row.description
|
|
1274
|
+
"
|
|
1275
|
+
class="text-body-sm secondary-content-text q-pb-xs"
|
|
1276
|
+
>
|
|
1277
|
+
{{ moreActionDialogData.row.description }}
|
|
1278
|
+
</div>
|
|
1153
1279
|
</div>
|
|
1154
|
-
</
|
|
1155
|
-
</q-card
|
|
1156
|
-
</
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
moreActionDialogData.secondaryAction
|
|
1163
|
-
"
|
|
1164
|
-
#action_primary_one
|
|
1165
|
-
>
|
|
1166
|
-
<UBtnStd
|
|
1167
|
-
:color="
|
|
1168
|
-
moreActionDialogData.secondaryAction.color
|
|
1169
|
-
"
|
|
1170
|
-
:disable="
|
|
1171
|
-
moreActionDialogData.secondaryAction.disable
|
|
1172
|
-
"
|
|
1173
|
-
:flat="moreActionDialogData.secondaryAction.flat"
|
|
1174
|
-
:label="
|
|
1175
|
-
moreActionDialogData.secondaryAction.label
|
|
1176
|
-
"
|
|
1177
|
-
:loading="
|
|
1178
|
-
moreActionDialogData.secondaryAction.loading
|
|
1179
|
-
"
|
|
1180
|
-
:outline="
|
|
1181
|
-
moreActionDialogData.secondaryAction.outline
|
|
1280
|
+
</q-card-section>
|
|
1281
|
+
</q-card>
|
|
1282
|
+
</template>
|
|
1283
|
+
<template
|
|
1284
|
+
v-if="
|
|
1285
|
+
moreActionDialogData &&
|
|
1286
|
+
moreActionDialogData.showDialog[props.row.id] &&
|
|
1287
|
+
moreActionDialogData.secondaryAction
|
|
1182
1288
|
"
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1289
|
+
#action_primary_one
|
|
1290
|
+
>
|
|
1291
|
+
<UBtnStd
|
|
1292
|
+
:color="
|
|
1293
|
+
moreActionDialogData.secondaryAction.color
|
|
1294
|
+
"
|
|
1295
|
+
:disable="
|
|
1296
|
+
moreActionDialogData.secondaryAction.disable
|
|
1297
|
+
"
|
|
1298
|
+
:flat="
|
|
1299
|
+
moreActionDialogData.secondaryAction.flat
|
|
1300
|
+
"
|
|
1301
|
+
:label="
|
|
1302
|
+
moreActionDialogData.secondaryAction.label
|
|
1303
|
+
"
|
|
1304
|
+
:loading="
|
|
1305
|
+
moreActionDialogData.secondaryAction.loading
|
|
1306
|
+
"
|
|
1307
|
+
:outline="
|
|
1308
|
+
moreActionDialogData.secondaryAction.outline
|
|
1309
|
+
"
|
|
1310
|
+
:size="
|
|
1311
|
+
moreActionDialogData.secondaryAction.size
|
|
1312
|
+
"
|
|
1313
|
+
@on-click="
|
|
1314
|
+
moreActionDialogData.secondaryAction.handler(
|
|
1315
|
+
props.row
|
|
1316
|
+
)
|
|
1317
|
+
"
|
|
1318
|
+
/>
|
|
1319
|
+
</template>
|
|
1320
|
+
<template
|
|
1321
|
+
v-if="
|
|
1322
|
+
moreActionDialogData &&
|
|
1323
|
+
moreActionDialogData.showDialog[props.row.id] &&
|
|
1324
|
+
moreActionDialogData.primaryAction
|
|
1188
1325
|
"
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1326
|
+
#action_primary_two
|
|
1327
|
+
>
|
|
1328
|
+
<UBtnStd
|
|
1329
|
+
class="confirm-primary-action"
|
|
1330
|
+
:color="
|
|
1331
|
+
moreActionDialogData.primaryAction.color
|
|
1332
|
+
"
|
|
1333
|
+
:disable="
|
|
1334
|
+
moreActionDialogData.primaryAction.disable
|
|
1335
|
+
"
|
|
1336
|
+
:flat="moreActionDialogData.primaryAction.flat"
|
|
1337
|
+
:label="
|
|
1338
|
+
moreActionDialogData.primaryAction.label
|
|
1339
|
+
"
|
|
1340
|
+
:loading="
|
|
1341
|
+
moreActionDialogData.primaryAction.loading
|
|
1342
|
+
"
|
|
1343
|
+
:outline="
|
|
1344
|
+
moreActionDialogData.primaryAction.outline
|
|
1345
|
+
"
|
|
1346
|
+
:size="moreActionDialogData.primaryAction.size"
|
|
1347
|
+
@on-click="
|
|
1348
|
+
moreActionDialogData.primaryAction.handler(
|
|
1349
|
+
props.row
|
|
1350
|
+
)
|
|
1351
|
+
"
|
|
1352
|
+
/>
|
|
1353
|
+
</template>
|
|
1354
|
+
</USheet>
|
|
1355
|
+
<USheet
|
|
1356
|
+
v-model:dialogs="
|
|
1357
|
+
moreActionsDialogs[props.row['id']]
|
|
1196
1358
|
"
|
|
1197
|
-
|
|
1359
|
+
:close-icon-label="closeIconLabel"
|
|
1360
|
+
:heading="selectMoreOptions"
|
|
1361
|
+
:is-left-icon="false"
|
|
1362
|
+
:show-action-buttons="false"
|
|
1198
1363
|
>
|
|
1199
|
-
<
|
|
1200
|
-
class="
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
:label="moreActionDialogData.primaryAction.label"
|
|
1207
|
-
:loading="
|
|
1208
|
-
moreActionDialogData.primaryAction.loading
|
|
1209
|
-
"
|
|
1210
|
-
:outline="
|
|
1211
|
-
moreActionDialogData.primaryAction.outline
|
|
1212
|
-
"
|
|
1213
|
-
:size="moreActionDialogData.primaryAction.size"
|
|
1214
|
-
@on-click="
|
|
1215
|
-
moreActionDialogData.primaryAction.handler(
|
|
1216
|
-
props.row
|
|
1217
|
-
)
|
|
1218
|
-
"
|
|
1219
|
-
/>
|
|
1220
|
-
</template>
|
|
1221
|
-
</USheet>
|
|
1222
|
-
<USheet
|
|
1223
|
-
v-model:dialogs="moreActionsDialogs[props.row['id']]"
|
|
1224
|
-
:close-icon-label="closeIconLabel"
|
|
1225
|
-
:heading="selectMoreOptions"
|
|
1226
|
-
:is-left-icon="false"
|
|
1227
|
-
:show-action-buttons="false"
|
|
1228
|
-
>
|
|
1229
|
-
<template #content>
|
|
1230
|
-
<q-list class="mobile-grid-more-action">
|
|
1231
|
-
<template
|
|
1232
|
-
v-for="(action, __i) in getMenuInlineActions(
|
|
1233
|
-
col,
|
|
1234
|
-
'menu'
|
|
1235
|
-
)"
|
|
1236
|
-
>
|
|
1237
|
-
<q-item
|
|
1238
|
-
v-if="
|
|
1239
|
-
typeof action.hide === 'function'
|
|
1240
|
-
? !action.hide(props.row)
|
|
1241
|
-
: true
|
|
1242
|
-
"
|
|
1243
|
-
class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
|
|
1244
|
-
:aria-label="
|
|
1245
|
-
typeof action.label === 'function'
|
|
1246
|
-
? action.label(props.row)
|
|
1247
|
-
: action.label
|
|
1248
|
-
"
|
|
1249
|
-
clickable
|
|
1250
|
-
:key="__i"
|
|
1251
|
-
tabindex="-1"
|
|
1252
|
-
@click="handleItemClick(action, props.row)"
|
|
1364
|
+
<template #content>
|
|
1365
|
+
<q-list class="mobile-grid-more-action">
|
|
1366
|
+
<template
|
|
1367
|
+
v-for="(action, __i) in getMenuInlineActions(
|
|
1368
|
+
col,
|
|
1369
|
+
'menu'
|
|
1370
|
+
)"
|
|
1253
1371
|
>
|
|
1254
|
-
<q-item
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
typeof action.icon === 'function'
|
|
1263
|
-
? action.icon(props.row)
|
|
1264
|
-
: action.icon
|
|
1265
|
-
} text-${getActionItemColor(
|
|
1266
|
-
action,
|
|
1267
|
-
props.row
|
|
1268
|
-
)}`"
|
|
1269
|
-
size="1.5rem"
|
|
1270
|
-
tabindex="-1"
|
|
1271
|
-
/>
|
|
1272
|
-
</q-item-section>
|
|
1273
|
-
<q-item-section
|
|
1274
|
-
:class="`text-caption-lg text-${getActionItemColor(
|
|
1275
|
-
action,
|
|
1276
|
-
props.row
|
|
1277
|
-
)}`"
|
|
1278
|
-
tabindex="0"
|
|
1279
|
-
>
|
|
1280
|
-
{{
|
|
1372
|
+
<q-item
|
|
1373
|
+
v-if="
|
|
1374
|
+
typeof action.hide === 'function'
|
|
1375
|
+
? !action.hide(props.row)
|
|
1376
|
+
: true
|
|
1377
|
+
"
|
|
1378
|
+
class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
|
|
1379
|
+
:aria-label="
|
|
1281
1380
|
typeof action.label === 'function'
|
|
1282
1381
|
? action.label(props.row)
|
|
1283
1382
|
: action.label
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1383
|
+
"
|
|
1384
|
+
clickable
|
|
1385
|
+
:key="__i"
|
|
1386
|
+
tabindex="-1"
|
|
1387
|
+
@click="handleItemClick(action, props.row)"
|
|
1388
|
+
>
|
|
1389
|
+
<q-item-section class="q-pr-xs" avatar>
|
|
1390
|
+
<q-icon
|
|
1391
|
+
v-if="
|
|
1392
|
+
typeof action.icon === 'function'
|
|
1393
|
+
? action.icon(props.row)
|
|
1394
|
+
: action.icon
|
|
1395
|
+
"
|
|
1396
|
+
:class="`${
|
|
1397
|
+
typeof action.icon === 'function'
|
|
1398
|
+
? action.icon(props.row)
|
|
1399
|
+
: action.icon
|
|
1400
|
+
} text-${getActionItemColor(
|
|
1401
|
+
action,
|
|
1402
|
+
props.row
|
|
1403
|
+
)}`"
|
|
1404
|
+
size="1.5rem"
|
|
1405
|
+
tabindex="-1"
|
|
1406
|
+
/>
|
|
1407
|
+
</q-item-section>
|
|
1408
|
+
<q-item-section
|
|
1409
|
+
:class="`text-caption-lg text-${getActionItemColor(
|
|
1410
|
+
action,
|
|
1411
|
+
props.row
|
|
1412
|
+
)}`"
|
|
1413
|
+
tabindex="0"
|
|
1414
|
+
>
|
|
1415
|
+
{{
|
|
1416
|
+
typeof action.label === 'function'
|
|
1417
|
+
? action.label(props.row)
|
|
1418
|
+
: action.label
|
|
1419
|
+
}}
|
|
1420
|
+
</q-item-section>
|
|
1421
|
+
</q-item>
|
|
1422
|
+
</template>
|
|
1423
|
+
</q-list>
|
|
1424
|
+
</template>
|
|
1425
|
+
</USheet>
|
|
1426
|
+
</template>
|
|
1291
1427
|
</template>
|
|
1292
|
-
</
|
|
1293
|
-
</q-item
|
|
1294
|
-
</
|
|
1295
|
-
</
|
|
1296
|
-
</
|
|
1428
|
+
</q-item-section>
|
|
1429
|
+
</q-item>
|
|
1430
|
+
</template>
|
|
1431
|
+
</q-list>
|
|
1432
|
+
</div>
|
|
1297
1433
|
</q-card>
|
|
1298
1434
|
</div>
|
|
1299
1435
|
<UExpansionStd
|
|
@@ -1425,7 +1561,7 @@ watch(
|
|
|
1425
1561
|
]"
|
|
1426
1562
|
>
|
|
1427
1563
|
<!-- Label -->
|
|
1428
|
-
<div class="text-caption text-description">
|
|
1564
|
+
<div class="text-caption text-description q-mb-xxs">
|
|
1429
1565
|
{{ col.label }}
|
|
1430
1566
|
</div>
|
|
1431
1567
|
<!-- Content -->
|
|
@@ -1503,11 +1639,21 @@ watch(
|
|
|
1503
1639
|
/>
|
|
1504
1640
|
<span
|
|
1505
1641
|
:class="[
|
|
1506
|
-
col.value
|
|
1642
|
+
col.value &&
|
|
1643
|
+
col.value.length > minOverflowLength &&
|
|
1644
|
+
!col.header
|
|
1645
|
+
? 'long-text-content'
|
|
1646
|
+
: 'card-header-table',
|
|
1507
1647
|
col.noEllipsis ? 'no-ellipsis-content' : '',
|
|
1508
1648
|
col.doubleSpan && col.noEllipsis
|
|
1509
1649
|
? 'full-width-text-content'
|
|
1510
1650
|
: '',
|
|
1651
|
+
isTablet && col.header
|
|
1652
|
+
? 'tablet-header-table'
|
|
1653
|
+
: '',
|
|
1654
|
+
isMobile && col.header
|
|
1655
|
+
? 'mobile-header-table'
|
|
1656
|
+
: '',
|
|
1511
1657
|
!isResponsiveTablet &&
|
|
1512
1658
|
isTablet &&
|
|
1513
1659
|
col.classes &&
|
|
@@ -1521,6 +1667,14 @@ watch(
|
|
|
1521
1667
|
: '',
|
|
1522
1668
|
]"
|
|
1523
1669
|
:id="`long-content-${col.field}-${props.row.id}`"
|
|
1670
|
+
:ref="
|
|
1671
|
+
(el) =>
|
|
1672
|
+
checkCellOverflow(
|
|
1673
|
+
`#long-content-${col.field}-${props.row.id}`,
|
|
1674
|
+
`${col.field}-${props.row.id}`
|
|
1675
|
+
)
|
|
1676
|
+
"
|
|
1677
|
+
:style="{ maxWidth: headerMaxWidth }"
|
|
1524
1678
|
>
|
|
1525
1679
|
{{ col.value }}
|
|
1526
1680
|
<template
|
|
@@ -1553,12 +1707,8 @@ watch(
|
|
|
1553
1707
|
<UTooltip
|
|
1554
1708
|
v-if="
|
|
1555
1709
|
col.value &&
|
|
1556
|
-
col.value.length >
|
|
1557
|
-
|
|
1558
|
-
col.field,
|
|
1559
|
-
props.row.id,
|
|
1560
|
-
'content'
|
|
1561
|
-
)
|
|
1710
|
+
col.value.length > minOverflowLength &&
|
|
1711
|
+
cellOverflowStates[`${col.field}-${props.row.id}`]
|
|
1562
1712
|
"
|
|
1563
1713
|
anchor="bottom middle"
|
|
1564
1714
|
:description="col.value"
|
|
@@ -1613,10 +1763,27 @@ watch(
|
|
|
1613
1763
|
:color="props?.row?.iconColor ?? 'primary'"
|
|
1614
1764
|
size="1.5rem"
|
|
1615
1765
|
/>
|
|
1766
|
+
<div
|
|
1767
|
+
v-if="typeof col?.colorMap === 'function'"
|
|
1768
|
+
class="flex items-baseline"
|
|
1769
|
+
:style="{ gap: '0.25rem' }"
|
|
1770
|
+
>
|
|
1771
|
+
<span
|
|
1772
|
+
:class="`table-text-colormap-${
|
|
1773
|
+
col?.colorMap(props.row)?.color
|
|
1774
|
+
} text-caption-md`"
|
|
1775
|
+
>
|
|
1776
|
+
{{ col?.colorMap(props.row)?.value }}</span
|
|
1777
|
+
>
|
|
1778
|
+
<span class="text-body-sm">{{
|
|
1779
|
+
props.row[col.field]
|
|
1780
|
+
}}</span>
|
|
1781
|
+
</div>
|
|
1782
|
+
|
|
1616
1783
|
<!-- Text -->
|
|
1617
|
-
<span v-else class="text-body-sm">
|
|
1618
|
-
|
|
1619
|
-
</span>
|
|
1784
|
+
<span v-else class="text-body-sm">{{
|
|
1785
|
+
props.row[col.field]
|
|
1786
|
+
}}</span>
|
|
1620
1787
|
</div>
|
|
1621
1788
|
<!-- Caption (if any) -->
|
|
1622
1789
|
<div
|