@mythpe/quasar-ui-qui 0.4.102 → 0.4.103

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.102",
3
+ "version": "0.4.103",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -36,6 +36,7 @@ type P = {
36
36
  searchLength?: Props['searchLength'];
37
37
  required?: Props['required'];
38
38
  multiple?: Props['multiple'];
39
+ copy?: boolean;
39
40
  }
40
41
 
41
42
  const props = withDefaults(defineProps<P>(), {
@@ -55,7 +56,8 @@ const props = withDefaults(defineProps<P>(), {
55
56
  byId: undefined,
56
57
  searchLength: undefined,
57
58
  required: undefined,
58
- multiple: undefined
59
+ multiple: undefined,
60
+ copy: undefined
59
61
  })
60
62
  const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
61
63
  type Emits = {
@@ -188,6 +190,7 @@ defineOptions({ name: 'MAxios', inheritAttrs: !1 })
188
190
  v-model="modelValue"
189
191
  v-model:loading="loading"
190
192
  v-model:search="search"
193
+ :copy="copy"
191
194
  :label="label"
192
195
  :multiple="multiple"
193
196
  :name="name"
@@ -48,7 +48,7 @@ interface P {
48
48
  prependIconProps?: Props['prependIconProps'];
49
49
  appendIcon?: Props['appendIcon'];
50
50
  appendIconProps?: Props['appendIconProps'];
51
- copy?: Props['copy'];
51
+ copy?: boolean;
52
52
  type?: Props['type'];
53
53
  ltr?: Props['ltr'];
54
54
  rtl?: Props['rtl'];
@@ -39,7 +39,7 @@ interface P {
39
39
  noCountry?: Props['noCountry'];
40
40
  prefix?: Props['prefix'];
41
41
  suffix?: Props['suffix'];
42
- copy?: Props['copy'];
42
+ copy?: boolean;
43
43
  }
44
44
 
45
45
  const props = defineProps<P>()
@@ -64,6 +64,7 @@ type P = {
64
64
  prependIconProps?: Props['prependIconProps'];
65
65
  appendIcon?: Props['appendIcon'];
66
66
  appendIconProps?: Props['appendIconProps'];
67
+ copy?: boolean;
67
68
  }
68
69
 
69
70
  const props = withDefaults(defineProps<P>(), {
@@ -112,7 +113,8 @@ const props = withDefaults(defineProps<P>(), {
112
113
  prependIcon: undefined,
113
114
  prependIconProps: undefined,
114
115
  appendIcon: undefined,
115
- appendIconProps: undefined
116
+ appendIconProps: undefined,
117
+ copy: undefined
116
118
  })
117
119
  defineModel<Props['modelValue']>({ required: !1, default: undefined })
118
120
 
@@ -122,7 +124,7 @@ type Emits = {
122
124
  const emit = defineEmits<Emits>()
123
125
  const $q = useQuasar()
124
126
 
125
- const { __, props: pluginOptions } = useMyth()
127
+ const { __, props: pluginOptions, copyText } = useMyth()
126
128
  const helper = useBindInput<P & Props>(() => props, 'select', () => ({ choose: !0 }))
127
129
  const { theme, hasTopLabel, getLabel, getAutocompleteAttribute, inputRules, getProp } = helper
128
130
  const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
@@ -326,6 +328,22 @@ defineOptions({
326
328
  v-bind="appendIconProps"
327
329
  />
328
330
  </template>
331
+ <template
332
+ v-else-if="copy && !!getViewModeValue && viewMode"
333
+ #append
334
+ >
335
+ <q-btn
336
+ flat
337
+ icon="ion-copy"
338
+ round
339
+ size="sm"
340
+ @click="copyText(getViewModeValue)"
341
+ >
342
+ <q-tooltip v-if="!!getViewModeValue">
343
+ {{ __('labels.copy') }}
344
+ </q-tooltip>
345
+ </q-btn>
346
+ </template>
329
347
  <template
330
348
  v-if="!hideEmptyList"
331
349
  #no-option
@@ -33,6 +33,11 @@ export interface MSelectProps extends Omit<QSelectProps, 'rules' | 'name' | 'mod
33
33
  * dont use default loading slot.
34
34
  */
35
35
  noLoading?: boolean;
36
+ /**
37
+ * Show copy button.
38
+ * Default: false.
39
+ */
40
+ copy?: boolean;
36
41
  }
37
42
 
38
43
  type ItemsScope = { items: any[], value: any };