@mythpe/quasar-ui-qui 0.3.93 → 0.3.95

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.93",
3
+ "version": "0.3.95",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -39,6 +39,7 @@ type Props = {
39
39
  excel?: boolean;
40
40
  exportUrl?: MDatatableProps['exportUrl'];
41
41
  hideSearch?: boolean;
42
+ hideSearchColumns?: boolean;
42
43
  hideTitle?: boolean;
43
44
  searchDebounce?: MDatatableProps['searchDebounce'];
44
45
  withIndex?: MDatatableProps['withIndex'];
@@ -119,6 +120,7 @@ const props = withDefaults(defineProps<Props>(), {
119
120
  excel: undefined,
120
121
  exportUrl: undefined,
121
122
  hideSearch: !1,
123
+ hideSearchColumns: !1,
122
124
  hideTitle: undefined,
123
125
  searchDebounce: 600,
124
126
  withIndex: undefined,
@@ -926,7 +928,10 @@ defineExpose({
926
928
  </q-tooltip>
927
929
  </q-icon>
928
930
  </template>
929
- <template #after>
931
+ <template
932
+ v-if="!hideSearchColumns"
933
+ #after
934
+ >
930
935
  <q-btn
931
936
  :aria-label="__('menu')"
932
937
  :icon="pluginOptions.dt?.searchInput?.optionsIcon || 'ion-ios-options'"
@@ -19,6 +19,7 @@ interface P {
19
19
  name: Props['name'];
20
20
  countryPhone?: Props['countryPhone'];
21
21
  readonly?: Props['readonly'];
22
+ viewMode?: Props['viewMode'];
22
23
  required?: Props['required'];
23
24
  placeholder?: Props['placeholder'];
24
25
  viewModeValue?: Props['viewModeValue'];
@@ -41,6 +42,10 @@ const countryName = computed(() => props.countryPhone || `${props.name}_country`
41
42
  const countryValue = useFieldValue(countryName)
42
43
  const $q = useQuasar()
43
44
  const { __ } = useMyth()
45
+ const getPlaceholder = computed(() => {
46
+ return !countryValue.value ? __('replace.choose', { name: __(`attributes.${countryName.value}`) }) : props.placeholder
47
+ })
48
+ const isSmall = computed(() => $q.screen.lt.md)
44
49
  const focus = () => {
45
50
  phoneRef?.value?.input?.focus?.()
46
51
  }
@@ -85,6 +90,30 @@ defineOptions({
85
90
  }"
86
91
  >
87
92
  <MRow col>
93
+ <MAxios
94
+ :autocomplete="false"
95
+ :class="['self-start overflow-hidden',{hidden: readonly,'order-last': $q.lang.rtl}]"
96
+ :dense="dense"
97
+ :name="countryName"
98
+ :prepend-icon="noIcon ? undefined : (!isSmall ? 'ion-keypad' : undefined)"
99
+ :required="readonly ? undefined : required"
100
+ :search-length="searchLength??0"
101
+ :style="`width: ${isSmall ? 150 : 200}px;max-height: 60px;`"
102
+ :use-input="!0"
103
+ :view-mode="readonly"
104
+ auto
105
+ hide-bottom-space
106
+ hide-dropdown-icon
107
+ hide-hint
108
+ no-filter
109
+ no-loading
110
+ option-label="code_label"
111
+ popup-content-class="m-select__popup-phone"
112
+ popup-no-route-dismiss
113
+ service="country.codes"
114
+ v-bind="selectProps"
115
+ @model="onSelectCountry"
116
+ />
88
117
  <MInput
89
118
  ref="phoneRef"
90
119
  :input-class="!countryValue ? undefined : `ltr`"
@@ -98,11 +127,11 @@ defineOptions({
98
127
  ...$attrs,
99
128
  required,
100
129
  dense,
101
- viewModeValue,
102
- placeholder: !countryValue ? __('replace.choose',{name: __(`attributes.${countryName}`) }) : placeholder,
103
- col: readonly ? 12 : 7,
104
- readonly: readonly ? !1 : !countryValue,
105
- viewMode: readonly,
130
+ viewModeValue: viewModeValue !== undefined ? viewModeValue : getPlaceholder,
131
+ placeholder:getPlaceholder,
132
+ col: !0,
133
+ viewMode: (readonly || viewMode) ? !0 : !countryValue,
134
+ readonly: undefined,
106
135
  }"
107
136
  >
108
137
  <template
@@ -113,26 +142,6 @@ defineOptions({
113
142
  <slot :name="slot" />
114
143
  </template>
115
144
  </MInput>
116
- <MAxios
117
- :autocomplete="false"
118
- :class="{hidden: readonly}"
119
- :dense="dense"
120
- :name="countryName"
121
- :prepend-icon="noIcon ? undefined : ($q.screen.gt.xs ? 'ion-keypad' : undefined)"
122
- :required="readonly ? undefined : required"
123
- :search-length="searchLength??0"
124
- :view-mode="readonly"
125
- col
126
- hide-bottom-space
127
- hide-dropdown-icon
128
- hide-hint
129
- option-label="code_label"
130
- popup-content-class="m-select__popup-phone"
131
- popup-no-route-dismiss
132
- service="country.codes"
133
- v-bind="selectProps"
134
- @model="onSelectCountry"
135
- />
136
145
  </MRow>
137
146
  </MCol>
138
147
  </template>
@@ -246,6 +246,7 @@ export type MDatatableProps<I extends GenericFormValues = GenericFormValues> = O
246
246
  importBtn?: boolean;
247
247
  noExampleBtn?: boolean;
248
248
  hideSearch?: boolean;
249
+ hideSearchColumns?: boolean;
249
250
  hideTitle?: boolean;
250
251
  searchDebounce?: string | number;
251
252
  withIndex?: string | string[];