@mythpe/quasar-ui-qui 0.4.73 → 0.4.74

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.73",
3
+ "version": "0.4.74",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -524,7 +524,6 @@ const showIfContext = (contextBtn: GenericMDtBtn): boolean => {
524
524
  if (!contextBtn.multiClick) {
525
525
  return !1
526
526
  }
527
- // console.log(typeof contextBtn.showIf, contextBtn.name)
528
527
  for (let idx = 0; idx < selected.value.length; idx++) {
529
528
  const item = toValue(selected.value[idx])
530
529
  const per = typeof contextBtn.showIf === 'function' ? contextBtn.showIf(item, idx) : contextBtn.showIf === !0
@@ -1208,59 +1207,26 @@ defineExpose({
1208
1207
  <MRow
1209
1208
  gutter="sm"
1210
1209
  >
1211
- <!--<MDtBtn-->
1212
- <!-- v-if="hasUpdateBtn && isSingleSelectedItem"-->
1213
- <!-- key="update-dt-selection-btn"-->
1214
- <!-- :disable="loading"-->
1215
- <!-- icon="ion-ios-create"-->
1216
- <!-- update-->
1217
- <!-- v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn as any}"-->
1218
- <!-- @click="openUpdateDialogNoIndex(selected[0] as any)"-->
1219
- <!--/>-->
1220
- <!--<MDtBtn-->
1221
- <!-- v-if="hasCloneBtn && isSingleSelectedItem"-->
1222
- <!-- key="clone-dt-selection-btn"-->
1223
- <!-- :disable="loading"-->
1224
- <!-- clone-->
1225
- <!-- tooltip="labels.clone"-->
1226
- <!-- v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn as any}"-->
1227
- <!-- @click="onCloneItem(selected[0] as any)"-->
1228
- <!--/>-->
1229
- <!--<MDtBtn-->
1230
- <!-- v-if="hasShowBtn && isSingleSelectedItem"-->
1231
- <!-- key="show-dt-selection-btn"-->
1232
- <!-- :disable="loading"-->
1233
- <!-- icon="ion-ios-eye"-->
1234
- <!-- show-->
1235
- <!-- v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn as any}"-->
1236
- <!-- @click="openShowDialogNoIndex(selected[0] as any)"-->
1237
- <!--/>-->
1238
- <!--<MDtBtn-->
1239
- <!-- v-if="selected.length > 1 ? (hasDestroyBtn && multiDestroy) : hasDestroyBtn"-->
1240
- <!-- key="destroy-dt-selection-btn"-->
1241
- <!-- :disable="!hasSelectedItem || loading"-->
1242
- <!-- color="negative"-->
1243
- <!-- destroy-->
1244
- <!-- icon="ion-ios-trash"-->
1245
- <!-- v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn as any}"-->
1246
- <!-- @click="deleteSelectionItem()"-->
1247
- <!--/>-->
1248
1210
  <template
1249
1211
  v-for="(contextBtn,i) in contextmenuItems as GenericMDtBtn[]"
1250
1212
  :key="`top-s-${i}`"
1251
1213
  >
1252
1214
  <MDtBtn
1253
1215
  v-if="showIfContext(contextBtn)"
1254
- :tooltip="contextBtn.tooltip ? __(contextBtn.tooltip) : (
1255
- contextBtn.label ? ( te(`labels.${contextBtn.label}`) ? __(`labels.${contextBtn.label}`) : __(contextBtn.label) ) : undefined
1256
- )"
1257
1216
  v-bind="{
1258
1217
  ...defaultTopBtnProps,
1259
1218
  ...pluginOptions.dt?.topSelection?.btn as any,
1260
1219
  ...contextBtn as any,
1261
1220
  ...contextBtn.attr as any,
1262
- to: typeof contextBtn.attr?.to === 'function' ? contextBtn.attr.to(selected[0],0) : contextBtn.attr?.to,
1221
+ to: typeof contextBtn.attr?.to === 'function' ? ( selected.length === 1 ? contextBtn.attr.to(selected[0],0) : undefined ) : contextBtn.attr?.to,
1263
1222
  [contextBtn.name]: true,
1223
+ tooltip: contextBtn.tooltip ? (typeof contextBtn.tooltip === 'function' ? ( selected.length === 1 ? contextBtn.tooltip(selected[0],0) : undefined ) : (
1224
+ ( te(`labels.${contextBtn.tooltip}`) ? __(`labels.${contextBtn.tooltip}`) : (
1225
+ te(contextBtn.tooltip) ? __(contextBtn.tooltip) : undefined
1226
+ ) )
1227
+ ) ) : (
1228
+ contextBtn.label ? ( te(`labels.${contextBtn.label}`) ? __(`labels.${contextBtn.label}`) : __(contextBtn.label) ) : undefined
1229
+ )
1264
1230
  }"
1265
1231
  @click="contextBtn.attr?.to ? undefined : onClickTopMenu(contextBtn)"
1266
1232
  />
@@ -1404,7 +1370,7 @@ defineExpose({
1404
1370
  <q-td :props="noBodyProps">
1405
1371
  <!--Control-->
1406
1372
  <q-btn-dropdown
1407
- v-if="activeContextItems.length > contextItemsLength && !1"
1373
+ v-if="contextItemsLength && activeContextItems.length > contextItemsLength && !1"
1408
1374
  v-close-popup
1409
1375
  :menu-offset="[0,10]"
1410
1376
  color="primary"