@mythpe/quasar-ui-qui 0.2.53 → 0.2.55
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/package.json +1 -1
- package/src/components/datatable/MDatatable.vue +84 -175
- package/src/components/datatable/MDtBtn.vue +1 -1
- package/src/components/datatable/MDtColorColumn.vue +46 -0
- package/src/components/datatable/MDtCopyColumn.vue +55 -0
- package/src/components/datatable/MDtImageColumn.vue +79 -0
- package/src/components/datatable/MDtSarColumn.vue +32 -0
- package/src/components/datatable/MDtUrlColumn.vue +43 -0
- package/src/components/datatable/index.ts +14 -1
- package/src/components/form/MAvatarViewer.vue +2 -2
- package/src/components/form/MCheckbox.vue +2 -2
- package/src/components/form/MCkeditor.vue +2 -2
- package/src/components/form/MColor.vue +1 -1
- package/src/components/form/MEditor.vue +2 -2
- package/src/components/form/MField.vue +2 -2
- package/src/components/form/MFile.vue +2 -2
- package/src/components/form/MForm.vue +2 -2
- package/src/components/form/MHidden.vue +1 -1
- package/src/components/form/MInput.vue +7 -7
- package/src/components/form/MInputLabel.vue +3 -3
- package/src/components/form/MOptions.vue +4 -4
- package/src/components/form/MPicker.vue +4 -4
- package/src/components/form/MRadio.vue +2 -2
- package/src/components/form/MSelect.vue +3 -3
- package/src/components/form/MSignaturePad.vue +1 -1
- package/src/components/form/MToggle.vue +2 -2
- package/src/components/form/MUploader.vue +1 -1
- package/src/components/form/__MCkeditor.vue +2 -2
- package/src/components/form/__MOptions.vue +4 -4
- package/src/components/grid/MBlock.vue +1 -1
- package/src/components/grid/MCol.vue +1 -1
- package/src/components/grid/MColumn.vue +1 -1
- package/src/components/grid/MContainer.vue +3 -3
- package/src/components/grid/MHelpRow.vue +1 -1
- package/src/components/grid/MRow.vue +1 -1
- package/src/components/modal/MModalMenu.vue +1 -1
- package/src/components/modal/MTooltip.vue +1 -1
- package/src/components/parials/MUploaderItem.vue +2 -2
- package/src/components/sar/MSarString.vue +1 -1
- package/src/composable/useMyth.ts +4 -4
- package/src/plugin/defineAsyncComponents.ts +5 -0
- package/src/style/m-container.sass +4 -4
- package/src/style/m-dt.sass +23 -16
- package/src/style/m-help-row.sass +1 -1
- package/src/style/m-input.sass +8 -8
- package/src/style/m-picker.sass +2 -2
- package/src/style/m-select.sass +3 -3
- package/src/style/main.sass +6 -6
- package/src/types/components.d.ts +25 -1
- package/src/types/m-datatable.d.ts +77 -16
package/package.json
CHANGED
|
@@ -17,6 +17,11 @@ import { computed, onMounted, ref, toValue, watch } from 'vue'
|
|
|
17
17
|
import { is as quasarHelpers, QCardSection, QTable, useQuasar } from 'quasar'
|
|
18
18
|
import { useDtHelpers, useMyth } from '../../composable'
|
|
19
19
|
import { useI18n } from 'vue-i18n'
|
|
20
|
+
import MDtImageColumn from './MDtImageColumn.vue'
|
|
21
|
+
import MDtUrlColumn from './MDtUrlColumn.vue'
|
|
22
|
+
import MDtColorColumn from './MDtColorColumn.vue'
|
|
23
|
+
import MDtSarColumn from './MDtSarColumn.vue'
|
|
24
|
+
import MDtCopyColumn from './MDtCopyColumn.vue'
|
|
20
25
|
|
|
21
26
|
type Props = {
|
|
22
27
|
controlKey?: MDatatableProps['controlKey'];
|
|
@@ -80,6 +85,7 @@ type Props = {
|
|
|
80
85
|
urlColumns?: MDatatableProps['urlColumns'];
|
|
81
86
|
colorColumns?: MDatatableProps['colorColumns'];
|
|
82
87
|
sarColumns?: MDatatableProps['sarColumns'];
|
|
88
|
+
copyColumns?: MDatatableProps['copyColumns'];
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -136,14 +142,15 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
136
142
|
bordered: undefined,
|
|
137
143
|
flat: undefined,
|
|
138
144
|
fixed: undefined,
|
|
139
|
-
imageColumns:
|
|
140
|
-
imageMode:
|
|
141
|
-
imageSize:
|
|
145
|
+
imageColumns: undefined,
|
|
146
|
+
imageMode: 'image',
|
|
147
|
+
imageSize: '35px',
|
|
142
148
|
noBackBtn: !1,
|
|
143
149
|
backIcon: undefined,
|
|
144
|
-
urlColumns:
|
|
145
|
-
colorColumns:
|
|
146
|
-
sarColumns:
|
|
150
|
+
urlColumns: undefined,
|
|
151
|
+
colorColumns: undefined,
|
|
152
|
+
sarColumns: undefined,
|
|
153
|
+
copyColumns: undefined
|
|
147
154
|
})
|
|
148
155
|
|
|
149
156
|
interface Emits {
|
|
@@ -161,8 +168,7 @@ const {
|
|
|
161
168
|
props: pluginOptions,
|
|
162
169
|
theme,
|
|
163
170
|
isSmall,
|
|
164
|
-
openWindow
|
|
165
|
-
copyText
|
|
171
|
+
openWindow
|
|
166
172
|
} = useMyth()
|
|
167
173
|
|
|
168
174
|
const $q = useQuasar()
|
|
@@ -355,7 +361,7 @@ const onSuccess: SubmissionHandler = async (form) => {
|
|
|
355
361
|
} catch (e: any) {
|
|
356
362
|
const { _message, _errors } = e || {}
|
|
357
363
|
dialogErrors.value = _errors || {}
|
|
358
|
-
await scrollToElementFromErrors(_errors, undefined, '.m
|
|
364
|
+
await scrollToElementFromErrors(_errors, undefined, '.m-datatable__dialog-form-container')
|
|
359
365
|
_message && alertError(_message)
|
|
360
366
|
if (_errors) {
|
|
361
367
|
useFormContext.setErrors(_errors)
|
|
@@ -368,13 +374,15 @@ const onInvalidSubmit: InvalidSubmissionHandler = ({ errors }) => {
|
|
|
368
374
|
const keys: (keyof typeof errors)[] = Object.keys(errors)
|
|
369
375
|
if (keys[0]) {
|
|
370
376
|
const message = errors[keys[0]] as string || __('messages.the_given_data_was_invalid')
|
|
371
|
-
scrollToElementFromErrors({ [keys[0]]: [message] }, undefined, '.m
|
|
377
|
+
scrollToElementFromErrors({ [keys[0]]: [message] }, undefined, '.m-datatable__dialog-form-container')
|
|
372
378
|
}
|
|
373
379
|
}
|
|
374
380
|
const defaultSubmitItem = handleSubmit.withControlled(onSuccess, onInvalidSubmit)
|
|
375
|
-
const
|
|
376
|
-
const
|
|
377
|
-
const
|
|
381
|
+
const imageColumnsProp = computed<string[]>(() => toValue(props.imageColumns || []))
|
|
382
|
+
const urlColumnsProp = computed<string[]>(() => toValue(props.urlColumns || []))
|
|
383
|
+
const colorColumnsProp = computed<string[]>(() => toValue(props.colorColumns || []))
|
|
384
|
+
const sarColumnsProp = computed<string[]>(() => toValue(props.sarColumns || []))
|
|
385
|
+
const copyColumnsProp = computed<string[]>(() => toValue(props.copyColumns || []))
|
|
378
386
|
onMounted(() => refresh())
|
|
379
387
|
watch(loading, v => {
|
|
380
388
|
if (pluginOptions.value?.dt?.useQuasarLoading) {
|
|
@@ -435,10 +443,10 @@ defineExpose({
|
|
|
435
443
|
<template>
|
|
436
444
|
<div
|
|
437
445
|
:class="{
|
|
438
|
-
'm
|
|
439
|
-
'm
|
|
440
|
-
'm
|
|
441
|
-
'm
|
|
446
|
+
'm-datatable-component': !0,
|
|
447
|
+
'm-datatable-component__fixed': fixed === undefined ? ( pluginOptions.datatable?.fixed === undefined ? undefined : pluginOptions.datatable?.fixed) : fixed,
|
|
448
|
+
'm-datatable-component__too_small': $q.screen.height < 900,
|
|
449
|
+
'm-datatable-component__fab': hasAddBtn && (addFabBtn === undefined ? !!pluginOptions.datatable?.addFabBtn : addFabBtn)
|
|
442
450
|
}"
|
|
443
451
|
>
|
|
444
452
|
<!-- Context Menu -->
|
|
@@ -484,7 +492,7 @@ defineExpose({
|
|
|
484
492
|
v-model:fullscreen="fullscreen"
|
|
485
493
|
v-model:pagination="pagination"
|
|
486
494
|
v-model:selected="selected"
|
|
487
|
-
:class="`m
|
|
495
|
+
:class="`m-datatable ` + ($q.screen.lt.md ? 'm-datatable-grid' : '')"
|
|
488
496
|
:columns="getHeaders"
|
|
489
497
|
:filter="search"
|
|
490
498
|
:grid="isGrid"
|
|
@@ -494,8 +502,8 @@ defineExpose({
|
|
|
494
502
|
:rows-per-page-options="getRowsPerPageOptions"
|
|
495
503
|
:selection="getShowSelection ? (multiSelection ? 'multiple' : 'single') : 'none'"
|
|
496
504
|
:visible-columns="visibleHeaders"
|
|
497
|
-
card-container-class="m
|
|
498
|
-
table-class="m
|
|
505
|
+
card-container-class="m-datatable-container"
|
|
506
|
+
table-class="m-datatable-container"
|
|
499
507
|
v-bind="{
|
|
500
508
|
virtualScroll: !0,
|
|
501
509
|
wrapCells:!0,
|
|
@@ -525,7 +533,7 @@ defineExpose({
|
|
|
525
533
|
:class="iTempProps.selected ? ($q.dark.isActive ? 'bg-grey-9' : 'bg-grey-2') : ''"
|
|
526
534
|
>
|
|
527
535
|
<template v-if="getShowSelection || iTempProps.colsMap[controlKey ?? 'control'] !== undefined">
|
|
528
|
-
<div class="m
|
|
536
|
+
<div class="m-datatable-card-control-header">
|
|
529
537
|
<MRow class="items-center justify-between">
|
|
530
538
|
<div class="q-px-md">
|
|
531
539
|
<q-checkbox
|
|
@@ -564,86 +572,32 @@ defineExpose({
|
|
|
564
572
|
:auto="col.name !== controlKey"
|
|
565
573
|
:class="`overflow-hidden ${col.name === controlKey ? 'text-right col-12 q-pb-xs' : ''}`"
|
|
566
574
|
>
|
|
567
|
-
<template v-if="
|
|
568
|
-
<
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
icon="ion-ios-eye"
|
|
575
|
-
@click="openImageDialog(col.value)"
|
|
576
|
-
>
|
|
577
|
-
<q-tooltip class="m--dt-btn-tooltip">
|
|
578
|
-
{{ __('myth.titles.show') }}
|
|
579
|
-
</q-tooltip>
|
|
580
|
-
</q-btn>
|
|
581
|
-
</template>
|
|
582
|
-
<template v-else-if="getProp('imageMode') === 'image'">
|
|
583
|
-
<q-avatar :size="getProp('imageSize')">
|
|
584
|
-
<q-img
|
|
585
|
-
v-if="col.value"
|
|
586
|
-
:src="col.value"
|
|
587
|
-
:style="`width: ${getProp('imageSize')}; height: ${getProp('imageSize')}`"
|
|
588
|
-
class="cursor-pointer"
|
|
589
|
-
fit="contain"
|
|
590
|
-
no-spinner
|
|
591
|
-
@click="openImageDialog(col.value)"
|
|
592
|
-
>
|
|
593
|
-
<q-tooltip class="m--dt-btn-tooltip">
|
|
594
|
-
{{ __('myth.titles.show') }}
|
|
595
|
-
</q-tooltip>
|
|
596
|
-
</q-img>
|
|
597
|
-
<q-icon
|
|
598
|
-
v-else
|
|
599
|
-
:size="getProp('imageSize')"
|
|
600
|
-
name="ion-ios-aperture"
|
|
601
|
-
/>
|
|
602
|
-
</q-avatar>
|
|
603
|
-
</template>
|
|
575
|
+
<template v-if="imageColumnsProp.indexOf(col.name) !== -1">
|
|
576
|
+
<MDtImageColumn
|
|
577
|
+
:image-mode="getProp('imageMode')"
|
|
578
|
+
:image-size="getProp('imageSize')"
|
|
579
|
+
:value="col.value"
|
|
580
|
+
@click="openImageDialog(col.value)"
|
|
581
|
+
/>
|
|
604
582
|
</template>
|
|
605
583
|
<template v-else-if="urlColumnsProp.indexOf(col.name) !== -1">
|
|
606
|
-
<
|
|
607
|
-
|
|
608
|
-
dense
|
|
609
|
-
fab-mini
|
|
610
|
-
flat
|
|
611
|
-
icon="ion-ios-open"
|
|
584
|
+
<MDtUrlColumn
|
|
585
|
+
:value="col.value"
|
|
612
586
|
@click="openWindow(col.value)"
|
|
613
|
-
|
|
614
|
-
<q-tooltip>
|
|
615
|
-
{{ col.value }}
|
|
616
|
-
</q-tooltip>
|
|
617
|
-
</MBtn>
|
|
587
|
+
/>
|
|
618
588
|
</template>
|
|
619
589
|
<template v-else-if="colorColumnsProp.indexOf(col.name) !== -1">
|
|
620
|
-
<
|
|
621
|
-
v-if="!!col.value"
|
|
622
|
-
class="row q-gutter-lg justify-center items-center"
|
|
623
|
-
>
|
|
624
|
-
<div>
|
|
625
|
-
{{ col.value }}
|
|
626
|
-
</div>
|
|
627
|
-
<div
|
|
628
|
-
:style="`width: 20px; height: 20px; background-color: ${col.value};`"
|
|
629
|
-
class="m--input__color-preview cursor-pointer"
|
|
630
|
-
@click="copyText(col.value)"
|
|
631
|
-
>
|
|
632
|
-
<q-tooltip>{{ __('labels.copy') }}</q-tooltip>
|
|
633
|
-
</div>
|
|
634
|
-
</div>
|
|
590
|
+
<MDtColorColumn :color="col.value" />
|
|
635
591
|
</template>
|
|
636
592
|
<template v-else-if="sarColumnsProp.indexOf(col.name) !== -1">
|
|
637
|
-
<
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
<MSarString :text="col.value||'0.00'" />
|
|
642
|
-
</div>
|
|
593
|
+
<MDtSarColumn :value="col.value" />
|
|
594
|
+
</template>
|
|
595
|
+
<template v-else-if="copyColumnsProp.indexOf(col.name) !== -1">
|
|
596
|
+
<MDtCopyColumn :value="col.value" />
|
|
643
597
|
</template>
|
|
644
598
|
<template v-else-if="col.name === controlKey">
|
|
645
599
|
<MRow
|
|
646
|
-
class="m
|
|
600
|
+
class="m-dt-context_menu_items"
|
|
647
601
|
gutter
|
|
648
602
|
space="xs"
|
|
649
603
|
>
|
|
@@ -656,7 +610,7 @@ defineExpose({
|
|
|
656
610
|
</MRow>
|
|
657
611
|
</template>
|
|
658
612
|
<template v-else>
|
|
659
|
-
<div class="m
|
|
613
|
+
<div class="m-datatable-card-value">
|
|
660
614
|
<slot
|
|
661
615
|
:name="`card-cell-${col.name}`"
|
|
662
616
|
v-bind="iTempProps"
|
|
@@ -751,7 +705,7 @@ defineExpose({
|
|
|
751
705
|
v-if="!search"
|
|
752
706
|
name="ion-ios-search"
|
|
753
707
|
>
|
|
754
|
-
<q-tooltip class="m
|
|
708
|
+
<q-tooltip class="m-dt-btn-tooltip">
|
|
755
709
|
{{ __('myth.datatable.searchInput') }}
|
|
756
710
|
</q-tooltip>
|
|
757
711
|
</q-icon>
|
|
@@ -761,7 +715,7 @@ defineExpose({
|
|
|
761
715
|
name="ion-ios-close"
|
|
762
716
|
@click="search = ''"
|
|
763
717
|
>
|
|
764
|
-
<q-tooltip class="m
|
|
718
|
+
<q-tooltip class="m-dt-btn-tooltip">
|
|
765
719
|
{{ __('myth.datatable.searchInputClear') }}
|
|
766
720
|
</q-tooltip>
|
|
767
721
|
</q-icon>
|
|
@@ -845,7 +799,7 @@ defineExpose({
|
|
|
845
799
|
v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.buttons?.filter as any}"
|
|
846
800
|
@click="exportData('pdf')"
|
|
847
801
|
>
|
|
848
|
-
<q-tooltip class="m
|
|
802
|
+
<q-tooltip class="m-dt-btn-tooltip">
|
|
849
803
|
{{ __('myth.titles.exportPdf') }}
|
|
850
804
|
</q-tooltip>
|
|
851
805
|
</MDtBtn>
|
|
@@ -858,7 +812,7 @@ defineExpose({
|
|
|
858
812
|
v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.buttons?.filter as any}"
|
|
859
813
|
@click="exportData('excel')"
|
|
860
814
|
>
|
|
861
|
-
<q-tooltip class="m
|
|
815
|
+
<q-tooltip class="m-dt-btn-tooltip">
|
|
862
816
|
{{ __('myth.titles.exportExcel') }}
|
|
863
817
|
</q-tooltip>
|
|
864
818
|
</MDtBtn>
|
|
@@ -1065,7 +1019,7 @@ defineExpose({
|
|
|
1065
1019
|
>
|
|
1066
1020
|
<q-chip
|
|
1067
1021
|
clickable
|
|
1068
|
-
color="
|
|
1022
|
+
color="body"
|
|
1069
1023
|
icon-remove="clear"
|
|
1070
1024
|
outline
|
|
1071
1025
|
removable
|
|
@@ -1155,7 +1109,7 @@ defineExpose({
|
|
|
1155
1109
|
</q-btn-dropdown>
|
|
1156
1110
|
<MRow
|
|
1157
1111
|
v-else
|
|
1158
|
-
class="m
|
|
1112
|
+
class="m-dt-context_menu_items justify-end"
|
|
1159
1113
|
gutter
|
|
1160
1114
|
space="xs"
|
|
1161
1115
|
>
|
|
@@ -1170,48 +1124,17 @@ defineExpose({
|
|
|
1170
1124
|
</slot>
|
|
1171
1125
|
</template>
|
|
1172
1126
|
<template
|
|
1173
|
-
v-for="c in
|
|
1127
|
+
v-for="c in imageColumnsProp"
|
|
1174
1128
|
:key="`a-c-${c}`"
|
|
1175
1129
|
#[`body-cell-${c}`]="colProps"
|
|
1176
1130
|
>
|
|
1177
1131
|
<q-td :props="colProps">
|
|
1178
|
-
<
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
flat
|
|
1185
|
-
icon="ion-ios-eye"
|
|
1186
|
-
@click="openImageDialog(colProps.row[c])"
|
|
1187
|
-
>
|
|
1188
|
-
<q-tooltip class="m--dt-btn-tooltip">
|
|
1189
|
-
{{ __('myth.titles.show') }}
|
|
1190
|
-
</q-tooltip>
|
|
1191
|
-
</q-btn>
|
|
1192
|
-
</template>
|
|
1193
|
-
<template v-else-if="getProp('imageMode') === 'image'">
|
|
1194
|
-
<q-avatar :size="getProp('imageSize')">
|
|
1195
|
-
<q-img
|
|
1196
|
-
v-if="colProps.row[c]"
|
|
1197
|
-
:src="colProps.row[c]"
|
|
1198
|
-
:style="`width: ${getProp('imageSize')}; height: ${getProp('imageSize')}`"
|
|
1199
|
-
class="cursor-pointer"
|
|
1200
|
-
fit="contain"
|
|
1201
|
-
no-spinner
|
|
1202
|
-
@click="openImageDialog(colProps.row[c])"
|
|
1203
|
-
>
|
|
1204
|
-
<q-tooltip class="m--dt-btn-tooltip">
|
|
1205
|
-
{{ __('myth.titles.show') }}
|
|
1206
|
-
</q-tooltip>
|
|
1207
|
-
</q-img>
|
|
1208
|
-
<q-icon
|
|
1209
|
-
v-else
|
|
1210
|
-
:size="getProp('imageSize')"
|
|
1211
|
-
name="ion-ios-aperture"
|
|
1212
|
-
/>
|
|
1213
|
-
</q-avatar>
|
|
1214
|
-
</template>
|
|
1132
|
+
<MDtImageColumn
|
|
1133
|
+
:image-mode="getProp('imageMode')"
|
|
1134
|
+
:image-size="getProp('imageSize')"
|
|
1135
|
+
:value="colProps.row[c]"
|
|
1136
|
+
@click="openImageDialog(colProps.row[c])"
|
|
1137
|
+
/>
|
|
1215
1138
|
</q-td>
|
|
1216
1139
|
</template>
|
|
1217
1140
|
<template
|
|
@@ -1220,19 +1143,10 @@ defineExpose({
|
|
|
1220
1143
|
#[`body-cell-${u}`]="urlProps"
|
|
1221
1144
|
>
|
|
1222
1145
|
<q-td :props="urlProps">
|
|
1223
|
-
<
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
flat
|
|
1228
|
-
icon="ion-ios-open"
|
|
1229
|
-
@click="openWindow(urlProps.row[u])"
|
|
1230
|
-
>
|
|
1231
|
-
<q-tooltip>
|
|
1232
|
-
{{ urlProps.row[u] }}
|
|
1233
|
-
</q-tooltip>
|
|
1234
|
-
</MBtn>
|
|
1235
|
-
</template>
|
|
1146
|
+
<MDtUrlColumn
|
|
1147
|
+
:value="urlProps.row[u]"
|
|
1148
|
+
@click="openWindow(urlProps.row[u])"
|
|
1149
|
+
/>
|
|
1236
1150
|
</q-td>
|
|
1237
1151
|
</template>
|
|
1238
1152
|
<template
|
|
@@ -1241,21 +1155,7 @@ defineExpose({
|
|
|
1241
1155
|
#[`body-cell-${cc}`]="ccProps"
|
|
1242
1156
|
>
|
|
1243
1157
|
<q-td :props="ccProps">
|
|
1244
|
-
<
|
|
1245
|
-
v-if="!!ccProps.row[cc]"
|
|
1246
|
-
class="row q-gutter-lg justify-center items-center"
|
|
1247
|
-
>
|
|
1248
|
-
<div>
|
|
1249
|
-
{{ ccProps.row[cc] }}
|
|
1250
|
-
</div>
|
|
1251
|
-
<div
|
|
1252
|
-
:style="`width: 20px; height: 20px; background-color: ${ccProps.row[cc]};`"
|
|
1253
|
-
class="m--input__color-preview cursor-pointer"
|
|
1254
|
-
@click="copyText(ccProps.row[cc])"
|
|
1255
|
-
>
|
|
1256
|
-
<q-tooltip>{{ __('labels.copy') }}</q-tooltip>
|
|
1257
|
-
</div>
|
|
1258
|
-
</div>
|
|
1158
|
+
<MDtColorColumn :color="ccProps.row[cc]" />
|
|
1259
1159
|
</q-td>
|
|
1260
1160
|
</template>
|
|
1261
1161
|
<template
|
|
@@ -1264,7 +1164,16 @@ defineExpose({
|
|
|
1264
1164
|
#[`body-cell-${sr}`]="srProps"
|
|
1265
1165
|
>
|
|
1266
1166
|
<q-td :props="srProps">
|
|
1267
|
-
<
|
|
1167
|
+
<MDtSarColumn :value="srProps.row[sr]" />
|
|
1168
|
+
</q-td>
|
|
1169
|
+
</template>
|
|
1170
|
+
<template
|
|
1171
|
+
v-for="cp in copyColumnsProp"
|
|
1172
|
+
:key="`a-cp-${cp}`"
|
|
1173
|
+
#[`body-cell-${cp}`]="copyColumnProps"
|
|
1174
|
+
>
|
|
1175
|
+
<q-td :props="copyColumnProps">
|
|
1176
|
+
<MDtCopyColumn :value="copyColumnProps.row[cp]" />
|
|
1268
1177
|
</q-td>
|
|
1269
1178
|
</template>
|
|
1270
1179
|
|
|
@@ -1304,7 +1213,7 @@ defineExpose({
|
|
|
1304
1213
|
v-model="showDialogModel"
|
|
1305
1214
|
v-bind="pluginOptions.dt?.showDialogProps"
|
|
1306
1215
|
>
|
|
1307
|
-
<q-card class="m
|
|
1216
|
+
<q-card class="m-dialog-card">
|
|
1308
1217
|
<q-card-section ref="showTitleRef">
|
|
1309
1218
|
<q-toolbar>
|
|
1310
1219
|
<q-toolbar-title>
|
|
@@ -1314,7 +1223,7 @@ defineExpose({
|
|
|
1314
1223
|
flat
|
|
1315
1224
|
@click="closeShowDialog()"
|
|
1316
1225
|
>
|
|
1317
|
-
<q-tooltip class="m
|
|
1226
|
+
<q-tooltip class="m-dt-btn-tooltip">
|
|
1318
1227
|
{{ __('myth.titles.back') }}
|
|
1319
1228
|
</q-tooltip>
|
|
1320
1229
|
</q-btn>
|
|
@@ -1325,7 +1234,7 @@ defineExpose({
|
|
|
1325
1234
|
<q-separator />
|
|
1326
1235
|
<q-card-section
|
|
1327
1236
|
:style="`height: ${($q.screen.height || 100) - 3 - (($refs.showActionsRef as any)?.$el?.offsetHeight || 60) - (($refs.showTitleRef as any)?.$el?.offsetHeight || 80)}px`"
|
|
1328
|
-
class="scroll m
|
|
1237
|
+
class="scroll m-datatable__dialog-show-container"
|
|
1329
1238
|
>
|
|
1330
1239
|
<slot
|
|
1331
1240
|
:dt="datatableItemsScope"
|
|
@@ -1355,12 +1264,12 @@ defineExpose({
|
|
|
1355
1264
|
v-model="formDialogModel"
|
|
1356
1265
|
v-bind="pluginOptions.dt?.formDialogProps"
|
|
1357
1266
|
>
|
|
1358
|
-
<div class="m
|
|
1267
|
+
<div class="m-form__container full-height no-wrap">
|
|
1359
1268
|
<form
|
|
1360
|
-
class="m
|
|
1269
|
+
class="m-form column full-height justify-between no-wrap"
|
|
1361
1270
|
@submit="defaultSubmitItem"
|
|
1362
1271
|
>
|
|
1363
|
-
<q-card class="m
|
|
1272
|
+
<q-card class="m-dialog-card">
|
|
1364
1273
|
<q-card-section ref="formTitle">
|
|
1365
1274
|
<q-toolbar :class="{'q-pa-none': $q.screen.lt.md}">
|
|
1366
1275
|
<slot
|
|
@@ -1388,7 +1297,7 @@ defineExpose({
|
|
|
1388
1297
|
text-color="none"
|
|
1389
1298
|
@click="closeFormDialog"
|
|
1390
1299
|
>
|
|
1391
|
-
<q-tooltip class="m
|
|
1300
|
+
<q-tooltip class="m-dt-btn-tooltip">
|
|
1392
1301
|
{{ __('myth.titles.close') }}
|
|
1393
1302
|
</q-tooltip>
|
|
1394
1303
|
</MBtn>
|
|
@@ -1409,7 +1318,7 @@ defineExpose({
|
|
|
1409
1318
|
<q-card-section
|
|
1410
1319
|
ref="formDialogCartSection"
|
|
1411
1320
|
:style="`height: ${($q.screen.height || 100) - 3 - (($refs.formActions as any)?.$el?.offsetHeight || 60) - (($refs.formTitle as any)?.$el?.offsetHeight || 80)}px`"
|
|
1412
|
-
class="scroll m
|
|
1321
|
+
class="scroll m-datatable__dialog-form-container"
|
|
1413
1322
|
>
|
|
1414
1323
|
<MContainer
|
|
1415
1324
|
v-if="loading && !dialogItem"
|
|
@@ -1445,7 +1354,7 @@ defineExpose({
|
|
|
1445
1354
|
<q-card-actions
|
|
1446
1355
|
ref="formActions"
|
|
1447
1356
|
align="between"
|
|
1448
|
-
class="m
|
|
1357
|
+
class="m-datatable-form-actions print-hide"
|
|
1449
1358
|
>
|
|
1450
1359
|
<slot
|
|
1451
1360
|
:dt="datatableItemsScope"
|
|
@@ -1541,7 +1450,7 @@ defineExpose({
|
|
|
1541
1450
|
>
|
|
1542
1451
|
<MTooltip
|
|
1543
1452
|
anchor="top middle"
|
|
1544
|
-
class="m
|
|
1453
|
+
class="m-datatable-fab-tooltip"
|
|
1545
1454
|
self="bottom start"
|
|
1546
1455
|
>
|
|
1547
1456
|
<span class="text-caption">{{ getFormTitle }}</span>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
- MyTh Ahmed Faiz Copyright © 2016-2025 All rights reserved.
|
|
3
|
+
- Email: mythpe@gmail.com
|
|
4
|
+
- Mobile: +966590470092
|
|
5
|
+
- Website: https://www.4myth.com
|
|
6
|
+
- Github: https://github.com/mythpe
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
|
|
11
|
+
import { useMyth } from '../../composable'
|
|
12
|
+
import type { MDtColorColumnProps } from '../../types'
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
value?: MDtColorColumnProps['value'];
|
|
16
|
+
size?: MDtColorColumnProps['size'];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
defineProps<Props>()
|
|
20
|
+
const { __, copyText } = useMyth()
|
|
21
|
+
defineOptions({
|
|
22
|
+
name: 'MDtColorColumn',
|
|
23
|
+
inheritAttrs: !1
|
|
24
|
+
})
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div
|
|
29
|
+
class="row q-gutter-lg justify-center items-center"
|
|
30
|
+
v-bind="$attrs"
|
|
31
|
+
>
|
|
32
|
+
<div>
|
|
33
|
+
{{ value || '' }}
|
|
34
|
+
</div>
|
|
35
|
+
<div
|
|
36
|
+
:class="`m-input__color-preview ${value ? 'cursor-pointer' : ''}`"
|
|
37
|
+
:style="`width: ${size||20}px; height: ${size||20}px; ${value ? `background-color: ${value};` : ''}`"
|
|
38
|
+
@click="() => !!value ? copyText(value) : null"
|
|
39
|
+
>
|
|
40
|
+
<q-tooltip v-if="!!value">
|
|
41
|
+
{{ __('labels.copy') }}
|
|
42
|
+
</q-tooltip>
|
|
43
|
+
</div>
|
|
44
|
+
<slot />
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
- MyTh Ahmed Faiz Copyright © 2016-2025 All rights reserved.
|
|
3
|
+
- Email: mythpe@gmail.com
|
|
4
|
+
- Mobile: +966590470092
|
|
5
|
+
- Website: https://www.4myth.com
|
|
6
|
+
- Github: https://github.com/mythpe
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
|
|
11
|
+
import { useMyth } from '../../composable'
|
|
12
|
+
import type { MDtCopyColumnProps } from '../../types'
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
value?: MDtCopyColumnProps['value'];
|
|
16
|
+
width?: MDtCopyColumnProps['width'];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
defineProps<Props>()
|
|
20
|
+
const { __, copyText } = useMyth()
|
|
21
|
+
defineOptions({
|
|
22
|
+
name: 'MDtCopyColumn',
|
|
23
|
+
inheritAttrs: !1
|
|
24
|
+
})
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div
|
|
29
|
+
class="row q-gutter-md items-center"
|
|
30
|
+
v-bind="$attrs"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
:style="`max-width: ${width || 150}px;`"
|
|
34
|
+
class="ellipsis"
|
|
35
|
+
>
|
|
36
|
+
{{ value || '' }}
|
|
37
|
+
<q-tooltip>
|
|
38
|
+
{{ __('labels.copy') }}
|
|
39
|
+
</q-tooltip>
|
|
40
|
+
</div>
|
|
41
|
+
<q-btn
|
|
42
|
+
dense
|
|
43
|
+
flat
|
|
44
|
+
icon="ion-copy"
|
|
45
|
+
round
|
|
46
|
+
size="sm"
|
|
47
|
+
@click="() => !!value ? copyText(value) : null"
|
|
48
|
+
>
|
|
49
|
+
<q-tooltip>
|
|
50
|
+
{{ __('labels.copy') }}
|
|
51
|
+
</q-tooltip>
|
|
52
|
+
</q-btn>
|
|
53
|
+
<slot />
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|