@mythpe/quasar-ui-qui 0.1.0 → 0.1.2

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.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -31,7 +31,10 @@ const props = withDefaults(defineProps<Props>(), {
31
31
  })
32
32
  const itemMode = computed(() => props.displayMode === 'item')
33
33
  const { __ } = useMyth()
34
- defineOptions({ name: 'MDtContextmenuItems', inheritAttrs: !1 })
34
+ defineOptions({
35
+ name: 'MDtContextmenuItems',
36
+ inheritAttrs: !1
37
+ })
35
38
  </script>
36
39
 
37
40
  <template>
@@ -43,12 +46,13 @@ defineOptions({ name: 'MDtContextmenuItems', inheritAttrs: !1 })
43
46
  <MDtBtn
44
47
  v-if="typeof m.showIf === 'function' ? m.showIf(item,index) : m.showIf"
45
48
  :[m.name]="!0"
46
- :label="itemMode && m.label === undefined ? __(m.tooltip || m.attr?.label || m.attr?.tooltip ||m.name) : (m.label !== undefined ? __(m.label || m.name) :
49
+ :label="itemMode && m.label === undefined ? __(m.tooltip || m.attr?.label || m.attr?.tooltip || m.name) : (m.label !== undefined ?
50
+ __(m.label || m.name) :
47
51
  undefined)"
48
52
  :list-item="itemMode"
49
- :tooltip="m.tooltip !== undefined ? m.tooltip : (m.label === undefined ? m.name : undefined)"
50
- flat
53
+ :tooltip="m.tooltip !== undefined ? m.tooltip : (m.label === undefined ? `labels.${m.name}` : undefined)"
51
54
  dense
55
+ flat
52
56
  v-bind="m.attr"
53
57
  @click="m.click ? m.click(item,index) : undefined"
54
58
  />
@@ -288,7 +288,7 @@ defineOptions({
288
288
  :color="!hasSrc ? 'positive' : 'secondary'"
289
289
  :disable="!isLoaded && !!url"
290
290
  :icon="hasSrc ? 'ion-ios-close' : 'ion-ios-attach'"
291
- :label="__( clearable && hasSrc ? 'remove' : ( !clearable && hasSrc ? 'change' : 'choose') )"
291
+ :label="__( 'labels.' . ( clearable && hasSrc ? 'remove' : ( !clearable && hasSrc ? 'change' : 'choose') ) )"
292
292
  :loading="loadingSrc"
293
293
  @click="onClick"
294
294
  />
@@ -140,12 +140,12 @@ const getConfig = computed<any>(() => {
140
140
  content: props.lang as string,
141
141
  textPartLanguage: [
142
142
  {
143
- title: __('ar'),
143
+ title: __('labels.ar'),
144
144
  languageCode: 'ar',
145
145
  textDirection: 'rtl'
146
146
  },
147
147
  {
148
- title: __('en'),
148
+ title: __('labels.en'),
149
149
  languageCode: 'en',
150
150
  textDirection: 'ltr'
151
151
  }
@@ -244,13 +244,13 @@ defineOptions({
244
244
  <div class="row items-center justify-end">
245
245
  <MBtn
246
246
  v-close-popup
247
- :label="__('close')"
247
+ :label="__('labels.close')"
248
248
  color="negative"
249
249
  flat
250
250
  />
251
251
  <MBtn
252
252
  v-close-popup
253
- :label="__('save')"
253
+ :label="__('labels.save')"
254
254
  flat
255
255
  @click="saveDialog()"
256
256
  />
@@ -272,13 +272,13 @@ defineOptions({
272
272
  <div class="row items-center justify-end">
273
273
  <MBtn
274
274
  v-close-popup
275
- :label="__('close')"
275
+ :label="__('labels.close')"
276
276
  color="negative"
277
277
  flat
278
278
  />
279
279
  <MBtn
280
280
  v-close-popup
281
- :label="__('save')"
281
+ :label="__('labels.save')"
282
282
  flat
283
283
  @click="saveDialog()"
284
284
  />
@@ -304,7 +304,7 @@ defineOptions({
304
304
  <MContainer>
305
305
  <MRow class="items-center">
306
306
  <MBtn
307
- :label="__('done')"
307
+ :label="__('labels.done')"
308
308
  flat
309
309
  @click="onDoneOptions()"
310
310
  />
@@ -319,8 +319,8 @@ defineOptions({
319
319
  >
320
320
  <slot
321
321
  :items="getOptions"
322
- :value="value"
323
322
  :name="slot"
323
+ :value="value"
324
324
  v-bind="inputSlot || {}"
325
325
  />
326
326
  </template>
@@ -101,12 +101,12 @@ const getLabel = computed<string | undefined>(() => {
101
101
  const def = undefined
102
102
  const v = value.value
103
103
  if (v === props.trueValue) {
104
- return __(props.status ? 'active' : props.activeLabel) as string || def
104
+ return __(`labels.${props.status ? 'active' : props.activeLabel}`) as string || def
105
105
  }
106
106
  if (v === props.falseValue) {
107
- return __(props.status ? 'inactive' : props.inactiveLabel) as string || def
107
+ return __(`labels.${props.status ? 'inactive' : props.inactiveLabel}`) as string || def
108
108
  }
109
- return __('none') as string || def
109
+ return __('labels.none') as string || def
110
110
  })
111
111
 
112
112
  const input = useTemplateRef<InstanceType<typeof QToggle>>('input')