@mythpe/quasar-ui-qui 0.0.65 → 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/package.json
CHANGED
|
@@ -453,7 +453,10 @@ const getRequestWith = (type: 'withIndex' | 'withShow' | 'withUpdate' | 'withSto
|
|
|
453
453
|
}
|
|
454
454
|
return v.join(',') ?? null
|
|
455
455
|
}
|
|
456
|
-
const getDatatableParams = ({
|
|
456
|
+
const getDatatableParams = ({
|
|
457
|
+
pagination,
|
|
458
|
+
filter
|
|
459
|
+
}: FetchRowsArgs = {}, merge: Partial<ApiServiceParams> = {}): ApiServiceParams => {
|
|
457
460
|
let params: ApiServiceParams = {
|
|
458
461
|
// filter: tableOptions.filter,
|
|
459
462
|
// search: filter || undefined,
|
|
@@ -853,7 +856,12 @@ const onSuccess: SubmissionHandler = async (form) => {
|
|
|
853
856
|
}
|
|
854
857
|
}
|
|
855
858
|
}
|
|
856
|
-
const _conf: any = {
|
|
859
|
+
const _conf: any = {
|
|
860
|
+
params: {
|
|
861
|
+
fdt,
|
|
862
|
+
requestWith: getRequestWith(isUpdateMode.value ? 'withUpdate' : 'withStore') || undefined
|
|
863
|
+
}
|
|
864
|
+
}
|
|
857
865
|
const method = async () => isUpdateMode.value ? await apiServices.update(dialogs.item?.id || '', form, _conf) : await apiServices.store(form, _conf)
|
|
858
866
|
try {
|
|
859
867
|
const { _data, _message, _success }: any = await method()
|
|
@@ -935,7 +943,10 @@ const deleteSelectionItem = () => {
|
|
|
935
943
|
confirmMessage(__('messages.confirm_delete')).onOk(async () => {
|
|
936
944
|
loading.value = !0
|
|
937
945
|
try {
|
|
938
|
-
const {
|
|
946
|
+
const {
|
|
947
|
+
_message,
|
|
948
|
+
_success
|
|
949
|
+
} = await getMythApiServicesSchema().destroyAll(tableOptions.selected.map((e: MDtItem) => e.id))
|
|
939
950
|
if (!hideAutoMessage.value && _success && _message) {
|
|
940
951
|
_message && alertSuccess(_message)
|
|
941
952
|
}
|
|
@@ -1282,7 +1293,7 @@ defineOptions({
|
|
|
1282
1293
|
</div>
|
|
1283
1294
|
<q-separator />
|
|
1284
1295
|
</template>
|
|
1285
|
-
<MContainer>
|
|
1296
|
+
<MContainer :fluid="!1">
|
|
1286
1297
|
<template
|
|
1287
1298
|
v-for="col in iTempProps.cols"
|
|
1288
1299
|
:key="col.name"
|
|
@@ -1367,7 +1378,10 @@ defineOptions({
|
|
|
1367
1378
|
|
|
1368
1379
|
<template #top="topSlotProps">
|
|
1369
1380
|
<MCol col="12">
|
|
1370
|
-
<MContainer
|
|
1381
|
+
<MContainer
|
|
1382
|
+
:fluid="!1"
|
|
1383
|
+
class="no-padding"
|
|
1384
|
+
>
|
|
1371
1385
|
<slot
|
|
1372
1386
|
:dt="datatableItemsScope"
|
|
1373
1387
|
:form="formScope"
|
|
@@ -1453,7 +1467,10 @@ defineOptions({
|
|
|
1453
1467
|
</q-toolbar-title>
|
|
1454
1468
|
</q-toolbar>
|
|
1455
1469
|
<q-separator />
|
|
1456
|
-
<MContainer
|
|
1470
|
+
<MContainer
|
|
1471
|
+
:fluid="!1"
|
|
1472
|
+
style="min-width: 250px; max-width: 450px"
|
|
1473
|
+
>
|
|
1457
1474
|
<MRow class="items-center">
|
|
1458
1475
|
<MCol col="12">
|
|
1459
1476
|
<template
|
|
@@ -1606,7 +1623,9 @@ defineOptions({
|
|
|
1606
1623
|
/>
|
|
1607
1624
|
</q-item-section>
|
|
1608
1625
|
<q-item-section>
|
|
1609
|
-
<q-item-label>
|
|
1626
|
+
<q-item-label>
|
|
1627
|
+
{{ __('myth.datatable.' + (tableOptions.fullscreen ? 'exitFullscreen' : 'fullscreen')) }}
|
|
1628
|
+
</q-item-label>
|
|
1610
1629
|
</q-item-section>
|
|
1611
1630
|
</q-item>
|
|
1612
1631
|
</q-list>
|
|
@@ -1631,7 +1650,10 @@ defineOptions({
|
|
|
1631
1650
|
flat
|
|
1632
1651
|
square
|
|
1633
1652
|
>
|
|
1634
|
-
<MContainer
|
|
1653
|
+
<MContainer
|
|
1654
|
+
:fluid="!1"
|
|
1655
|
+
class="q-pa-md"
|
|
1656
|
+
>
|
|
1635
1657
|
<q-toolbar :class="{'q-pa-none': $q.screen.lt.md}">
|
|
1636
1658
|
<q-toolbar-title>
|
|
1637
1659
|
{{ __('myth.datatable.filter.title') }}
|
|
@@ -1640,7 +1662,10 @@ defineOptions({
|
|
|
1640
1662
|
<q-separator />
|
|
1641
1663
|
<MRow class="items-center">
|
|
1642
1664
|
<MCol col="12">
|
|
1643
|
-
<MContainer
|
|
1665
|
+
<MContainer
|
|
1666
|
+
:fluid="!1"
|
|
1667
|
+
class="q-pa-md"
|
|
1668
|
+
>
|
|
1644
1669
|
<slot
|
|
1645
1670
|
:dt="datatableItemsScope"
|
|
1646
1671
|
:filter="tableOptions.tempFilter"
|
|
@@ -1806,7 +1831,6 @@ defineOptions({
|
|
|
1806
1831
|
col="auto"
|
|
1807
1832
|
>
|
|
1808
1833
|
<q-chip
|
|
1809
|
-
class="q-pr-md"
|
|
1810
1834
|
clickable
|
|
1811
1835
|
color="primary"
|
|
1812
1836
|
icon-remove="clear"
|
|
@@ -1815,14 +1839,20 @@ defineOptions({
|
|
|
1815
1839
|
@click="openFilterDialog()"
|
|
1816
1840
|
@remove="onRemoveFilter(filterKey)"
|
|
1817
1841
|
>
|
|
1818
|
-
<span>
|
|
1842
|
+
<span>
|
|
1843
|
+
{{ getHeaders.find(e => e.name === filterKey)?.label || __(`attributes.${filterKey}`) }}
|
|
1844
|
+
</span>
|
|
1819
1845
|
<span v-if="typeof filterValue === 'boolean'">: {{ __(filterValue ? 'yes' : 'no') }}</span>
|
|
1820
1846
|
<span v-else-if="typeof filterValue === 'string'">: {{ filterValue }}</span>
|
|
1821
|
-
<span
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1847
|
+
<span
|
|
1848
|
+
v-else-if="lodash.isArray(filterValue) && !quasarHelpers.object(filterValue[0])"
|
|
1849
|
+
>: {{ filterValue.join(', ') }}</span>
|
|
1850
|
+
<span
|
|
1851
|
+
v-else-if="lodash.isArray(filterValue) && quasarHelpers.object(filterValue[0])"
|
|
1852
|
+
>: {{ filterValue.map(e => e.label).join(', ') }}</span>
|
|
1853
|
+
<span
|
|
1854
|
+
v-else-if="quasarHelpers.object(filterValue) && filterValue.label"
|
|
1855
|
+
>: {{ filterValue.label }}</span>
|
|
1826
1856
|
</q-chip>
|
|
1827
1857
|
</MCol>
|
|
1828
1858
|
</template>
|
|
@@ -2084,7 +2114,10 @@ defineOptions({
|
|
|
2084
2114
|
:style="`height: ${($q.screen.height || 100) - 3 - (($refs.formActions as any)?.$el?.offsetHeight || 60) - (($refs.formTitle as any)?.$el?.offsetHeight || 80)}px`"
|
|
2085
2115
|
class="scroll m--datatable__dialog-form-container"
|
|
2086
2116
|
>
|
|
2087
|
-
<MContainer
|
|
2117
|
+
<MContainer
|
|
2118
|
+
v-if="tableOptions.loading && !dialogs.item"
|
|
2119
|
+
:fluid="!1"
|
|
2120
|
+
>
|
|
2088
2121
|
<MRow
|
|
2089
2122
|
v-if="tableOptions.loading"
|
|
2090
2123
|
col
|
|
@@ -39,8 +39,8 @@ type P = {
|
|
|
39
39
|
colProps?: Props['colProps'];
|
|
40
40
|
viewMode?: Props['viewMode'];
|
|
41
41
|
fieldOptions?: Props['fieldOptions'];
|
|
42
|
-
autocomplete
|
|
43
|
-
disable
|
|
42
|
+
autocomplete?: Props['autocomplete'];
|
|
43
|
+
disable?: Props['disable'];
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const props = withDefaults(defineProps<P>(), {
|
|
@@ -125,11 +125,10 @@ defineOptions({
|
|
|
125
125
|
<MCol v-bind="colProps">
|
|
126
126
|
<q-field
|
|
127
127
|
v-bind="{
|
|
128
|
-
...theme,
|
|
129
|
-
...pluginOptions.field,
|
|
130
128
|
error: !!errorMessage,
|
|
131
129
|
errorMessage,
|
|
132
130
|
hint: hint ? __(hint) : hint,
|
|
131
|
+
dense: !0,
|
|
133
132
|
borderless: !0,
|
|
134
133
|
outlined: !1,
|
|
135
134
|
stackLabel: !0
|
package/src/style/main.sass
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
@use 'sass:map'
|
|
2
2
|
@use "quasar/src/css/variables" as q
|
|
3
3
|
|
|
4
|
+
$m--row-margin-top: 1rem !default
|
|
5
|
+
$m--input-helpers-margin: 5px !default
|
|
6
|
+
|
|
4
7
|
// Flex.
|
|
5
8
|
.flex-break
|
|
6
9
|
flex: 1 0 100% !important
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
.flex-break
|
|
16
19
|
width: 0 !important
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
|
|
19
22
|
|
|
20
23
|
.m--row + .m--row
|
|
21
24
|
margin-top: $m--row-margin-top
|
|
@@ -126,6 +129,7 @@ pre
|
|
|
126
129
|
.m--input__top-label__content
|
|
127
130
|
color: q.$negative
|
|
128
131
|
|
|
132
|
+
|
|
129
133
|
[data-input-name].m--input__required
|
|
130
134
|
&:not(.m--input__is-top-label)
|
|
131
135
|
> .q-field
|
|
@@ -136,6 +140,7 @@ pre
|
|
|
136
140
|
.m--input__top-label__content::after
|
|
137
141
|
content: ' *'
|
|
138
142
|
|
|
143
|
+
|
|
139
144
|
.m--input__color-preview
|
|
140
145
|
border: 1px solid q.$primary
|
|
141
146
|
border-radius: $radius-value
|
|
@@ -144,3 +149,20 @@ pre
|
|
|
144
149
|
.m--confirm.actions-between
|
|
145
150
|
.q-card__actions
|
|
146
151
|
justify-content: space-between !important
|
|
152
|
+
|
|
153
|
+
.m--input__top-label,
|
|
154
|
+
.m--input__hint
|
|
155
|
+
margin-bottom: $m--input-helpers-margin
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
.m--input__caption
|
|
159
|
+
margin-bottom: $m--input-helpers-margin
|
|
160
|
+
font-size: 0.75rem
|
|
161
|
+
font-weight: 400
|
|
162
|
+
line-height: 1.25rem
|
|
163
|
+
letter-spacing: 0.03333em
|
|
164
|
+
|
|
165
|
+
$control-max-width: 250px !default
|
|
166
|
+
.m--control-cell,
|
|
167
|
+
.m--control-header
|
|
168
|
+
max-width: $control-max-width
|