@mythpe/quasar-ui-qui 0.4.51 → 0.4.53

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.4.51",
3
+ "version": "0.4.53",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -244,6 +244,7 @@ const {
244
244
  resetDialogs,
245
245
  getHeaders,
246
246
  getSortedHeaders,
247
+ arrangementColumns,
247
248
  controlKey,
248
249
  controlJustify,
249
250
  visibleHeaders,
@@ -265,14 +266,14 @@ const {
265
266
  hasAction,
266
267
  fullscreen,
267
268
  hasAddBtn,
268
- hasUpdateBtn,
269
- hasCloneBtn,
270
- hasShowBtn,
271
- hasDestroyBtn,
269
+ // hasUpdateBtn,
270
+ // hasCloneBtn,
271
+ // hasShowBtn,
272
+ // hasDestroyBtn,
272
273
  hasFilterDialog,
273
274
  isUpdateMode,
274
275
  setIsUpdateMode,
275
- isSingleSelectedItem,
276
+ // isSingleSelectedItem,
276
277
  hasSelectedItem,
277
278
  getShowTitle,
278
279
  getFormTitle,
@@ -314,7 +315,7 @@ const {
314
315
  contextmenuItems,
315
316
  activeContextItems,
316
317
  datatableItemsScope,
317
- onCloneItem,
318
+ // onCloneItem,
318
319
  openAttachmentDialog,
319
320
  importDialogModel,
320
321
  onOpenImportDialog,
@@ -1003,7 +1004,7 @@ defineExpose({
1003
1004
  name="filter"
1004
1005
  />
1005
1006
  </MContainer>
1006
- <q-separator color="primary" />
1007
+ <q-separator />
1007
1008
  <MContainer size="sm">
1008
1009
  <MRow class="justify-between">
1009
1010
  <MBtn
@@ -1103,6 +1104,12 @@ defineExpose({
1103
1104
  <q-icon name="ion-ios-information-circle-outline" />
1104
1105
  {{ __('myth.datatable.columnsToShowCaption') }}
1105
1106
  </div>
1107
+ <q-checkbox
1108
+ v-model="arrangementColumns"
1109
+ :label="__('myth.datatable.arrangementColumns')"
1110
+ class="q-mt-sm"
1111
+ dense
1112
+ />
1106
1113
  </q-card-section>
1107
1114
  <q-separator />
1108
1115
  <q-card-section>
@@ -1123,25 +1130,23 @@ defineExpose({
1123
1130
  <q-separator />
1124
1131
  <q-card-section>
1125
1132
  <MBtn
1126
- v-if="$q.screen.gt.xs"
1127
- v-close-popup
1128
- :class="{'q-mr-sm': !$q.screen.xs}"
1133
+ :class="{'full-width': $q.screen.xs}"
1134
+ :label="__(`labels.${visibleHeaders.length === getHeaders.length ? 'unselect':'select'}_all`)"
1129
1135
  color="primary"
1130
- label="labels.close"
1131
1136
  no-caps
1132
1137
  style="min-width: 100px"
1133
1138
  text-color="on-primary"
1134
- unelevated
1139
+ @click="onManageColumnsClick()"
1135
1140
  />
1136
1141
  <MBtn
1137
- :class="{'full-width': $q.screen.xs}"
1138
- :label="__(`labels.${visibleHeaders.length === getHeaders.length ? 'unselect':'select'}_all`)"
1142
+ v-if="$q.screen.gt.xs"
1143
+ v-close-popup
1144
+ :class="['',{'q-ml-sm': !$q.screen.xs}]"
1139
1145
  color="primary"
1146
+ label="labels.close"
1140
1147
  no-caps
1141
1148
  style="min-width: 100px"
1142
1149
  text-color="on-primary"
1143
- unelevated
1144
- @click="onManageColumnsClick()"
1145
1150
  />
1146
1151
  </q-card-section>
1147
1152
  </q-card>
@@ -1244,6 +1249,7 @@ defineExpose({
1244
1249
  expand-separator
1245
1250
  icon="ion-ios-tv"
1246
1251
  >
1252
+ <q-separator />
1247
1253
  <q-card>
1248
1254
  <q-card-section>
1249
1255
  <template
@@ -1257,6 +1263,24 @@ defineExpose({
1257
1263
  :val="h.name"
1258
1264
  />
1259
1265
  </template>
1266
+ <MRow
1267
+ class="q-mt-sm row items-center"
1268
+ gutter
1269
+ >
1270
+ <MBtn
1271
+ :label="__(`labels.${visibleHeaders.length === getHeaders.length ? 'unselect':'select'}_all`)"
1272
+ color="primary"
1273
+ no-caps
1274
+ style="min-width: 100px"
1275
+ text-color="on-primary"
1276
+ @click="onManageColumnsClick()"
1277
+ />
1278
+ <q-checkbox
1279
+ v-model="arrangementColumns"
1280
+ :label="__('myth.datatable.arrangementColumns')"
1281
+ dense
1282
+ />
1283
+ </MRow>
1260
1284
  </q-card-section>
1261
1285
  </q-card>
1262
1286
  </q-expansion-item>
@@ -47,10 +47,10 @@ defineOptions({
47
47
  <template>
48
48
  <div
49
49
  class="m-sar-col"
50
+ style="direction: rtl !important;"
50
51
  v-bind="$attrs"
51
52
  >
52
- <span :class="['sar-icon',{hidden: $q.lang.rtl}]">{{ __('sr') }}&nbsp;</span>
53
53
  <span>{{ getText }}</span>
54
- <span :class="['sar-icon',{hidden: !$q.lang.rtl}]">&nbsp;{{ __('sr') }}</span>
54
+ <span :class="['sar-icon',{'q-pl-xs': $q.lang.rtl, 'q-pr-xs': !$q.lang.rtl}]">{{ __('sr') }}</span>
55
55
  </div>
56
56
  </template>
@@ -139,14 +139,20 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>, emit?:
139
139
  }
140
140
  return h
141
141
  })
142
- const getSortedHeaders = computed(() => getHeaders.value.slice().sort((a, b) => {
143
- if (a.name === controlKey.value || b.name === controlKey.value) {
144
- return 0
142
+ const arrangementColumns = ref(!1)
143
+ const getSortedHeaders = computed(() => {
144
+ if (!arrangementColumns.value) {
145
+ return getHeaders.value
145
146
  }
146
- const f = visibleHeaders.value.indexOf(a.name)
147
- const l = visibleHeaders.value.indexOf(b.name)
148
- return f - l
149
- }))
147
+ return getHeaders.value.slice().sort((a, b) => {
148
+ if (a.name === controlKey.value || b.name === controlKey.value) {
149
+ return 0
150
+ }
151
+ const f = visibleHeaders.value.indexOf(a.name)
152
+ const l = visibleHeaders.value.indexOf(b.name)
153
+ return f - l
154
+ })
155
+ })
150
156
  const visibleHeaders = ref<string[]>([])
151
157
  const onManageColumnsClick = () => {
152
158
  visibleHeaders.value = visibleHeaders.value.length === getHeaders.value.length ? [getHeaders.value[0].name] : getHeaders.value.map(e => e.name)
@@ -994,6 +1000,7 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>, emit?:
994
1000
  resetDialogs,
995
1001
  getHeaders,
996
1002
  getSortedHeaders,
1003
+ arrangementColumns,
997
1004
  controlProps,
998
1005
  controlKey,
999
1006
  controlJustify,