@mythpe/quasar-ui-qui 0.3.12 → 0.3.14

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.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -900,7 +900,7 @@ defineExpose({
900
900
  flat
901
901
  @click="onLockSearch"
902
902
  >
903
- <q-tooltip>{{ __(`labels.${lockSearch ? 'unlock' : 'lock'}_search`, { name: __(lockValueProp) }) }}</q-tooltip>
903
+ <q-tooltip>{{ __(`replace.${lockSearch ? 'unlock' : 'lock'}_search`, { name: __(lockValueProp) }) }}</q-tooltip>
904
904
  </q-btn>
905
905
  </template>
906
906
  </MInput>
@@ -48,9 +48,11 @@ defineOptions({
48
48
  <MDtBtn
49
49
  v-if="typeof m.showIf === 'function' ? m.showIf(item,index) : m.showIf !== !1"
50
50
  :[m.name]="!0"
51
- :label="itemMode&&m.label===undefined?(te(`labels.${m.name}`)?__(`labels.${m.name}`):__(m.tooltip || m.attr?.label || m.attr?.tooltip || m.name)):(m.label!==undefined?__(m.label || m.name):undefined)"
51
+ :label="itemMode&&m.label===undefined?
52
+ (te(`labels.${m.name}`)?__(`labels.${m.name}`):__(m.tooltip || m.attr?.label || m.attr?.tooltip || m.name))
53
+ : ( m.label !== undefined ? (typeof m.label === 'function' ? m.label(m,i) : ( __(m.label || m.name)) ) : undefined ) "
52
54
  :list-item="itemMode"
53
- :tooltip="m.tooltip !== undefined ? m.tooltip : (m.label === undefined ? `labels.${m.name}` : undefined)"
55
+ :tooltip="m.tooltip !== undefined ? (typeof m.tooltip === 'function' ? m.tooltip(m,i) : m.tooltip) : (m.label === undefined ? ( te(`labels.${m.name}`) ? `labels.${m.name}` : undefined) : undefined)"
54
56
  dense
55
57
  flat
56
58
  v-bind="m.attr"
@@ -169,9 +169,9 @@ export type MDatatableScope = {
169
169
  type E = MDatatableDialogsOptions['item'];
170
170
  export type GenericMDtBtn = Record<string, any> & {
171
171
  name: string;
172
- label?: string;
172
+ label?: string | ((item: any, index: number) => string);
173
173
  contextLabel?: string | null;
174
- tooltip?: string;
174
+ tooltip?: string | ((item: any, index: number) => string);
175
175
  click?: <V extends E = E>(item: UnwrapRef<V> | Ref<V> | V, index: UnwrapRef<MDatatableDialogsOptions['index']>) => void;
176
176
  multiClick?: <V extends E = E>(items: V[]) => void;
177
177
  showIf?: boolean | ((item: UnwrapRef<MDatatableDialogsOptions['item']>, index: UnwrapRef<MDatatableDialogsOptions['index']>) => boolean);