@mythpe/quasar-ui-qui 0.3.92 → 0.3.94

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.92",
3
+ "version": "0.3.94",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -1562,10 +1562,6 @@ defineExpose({
1562
1562
  <!--Import Dialog-->
1563
1563
  <MDialog
1564
1564
  v-model="importDialogModel"
1565
- allow-focus-outside
1566
- no-backdrop-dismiss
1567
- no-esc-dismiss
1568
- no-shake
1569
1565
  position="top"
1570
1566
  transition-hide="slide-up"
1571
1567
  transition-show="slide-down"
@@ -1626,12 +1622,19 @@ defineExpose({
1626
1622
  v-bind="pluginOptions.dt?.formDialogProps"
1627
1623
  >
1628
1624
  <q-card class="q-dialog-plugin">
1629
- <div class="m-form__container full-height no-wrap">
1625
+ <MContainer
1626
+ dense
1627
+ fluid
1628
+ >
1630
1629
  <form
1631
1630
  class="m-form column full-height justify-between no-wrap"
1632
1631
  @submit="defaultSubmitItem"
1633
1632
  >
1634
- <q-card class="m-dialog-card">
1633
+ <q-card
1634
+ class="m-dialog-card"
1635
+ flat
1636
+ square
1637
+ >
1635
1638
  <q-card-section ref="formTitle">
1636
1639
  <q-toolbar :class="['m-container__fluid', {'q-pa-none': isSmall}]">
1637
1640
  <slot
@@ -1746,7 +1749,7 @@ defineExpose({
1746
1749
  </q-card-actions>
1747
1750
  </q-card>
1748
1751
  </form>
1749
- </div>
1752
+ </MContainer>
1750
1753
  </q-card>
1751
1754
  </MDialog>
1752
1755
 
@@ -1755,49 +1758,48 @@ defineExpose({
1755
1758
  v-model="showDialogModel"
1756
1759
  v-bind="pluginOptions.dt?.showDialogProps"
1757
1760
  >
1758
- <q-card class="m-dialog-card">
1759
- <q-card-section ref="showTitleRef">
1760
- <q-toolbar>
1761
- <q-toolbar-title>
1762
- <q-btn
1763
- :icon="`ion-ios-arrow-${$q.lang.rtl ? 'forward' : 'back'}`"
1764
- fab-mini
1765
- flat
1766
- @click="closeShowDialog()"
1767
- >
1768
- <q-tooltip class="m-dt-btn-tooltip">
1769
- {{ __('myth.titles.back') }}
1770
- </q-tooltip>
1771
- </q-btn>
1772
- {{ getShowTitle }}
1773
- </q-toolbar-title>
1774
- </q-toolbar>
1775
- </q-card-section>
1776
- <q-separator />
1777
- <q-card-section
1778
- :style="`height: ${($q.screen.height || 100) - 3 - (($refs.showActionsRef as any)?.$el?.offsetHeight || 60) - (($refs.showTitleRef as any)?.$el?.offsetHeight || 80)}px`"
1779
- class="scroll m-datatable__dialog-show-container"
1780
- >
1781
- <slot
1782
- :dt="datatableItemsScope"
1783
- :form="useFormContext"
1784
- :index="dialogItemIndex"
1785
- :item="dialogItem"
1786
- name="show"
1787
- />
1788
- </q-card-section>
1789
- <q-separator />
1790
- <q-card-actions
1791
- ref="showActionsRef"
1792
- align="left"
1793
- class="print-hide"
1761
+ <q-card
1762
+ class="m-dialog-card q-dialog-plugin"
1763
+ flat
1764
+ >
1765
+ <MContainer
1766
+ dense
1767
+ fluid
1794
1768
  >
1795
- <MBtn
1796
- label="myth.titles.close"
1797
- v-bind="pluginOptions.dt?.dialogButtonsProps"
1798
- @click="closeShowDialog"
1799
- />
1800
- </q-card-actions>
1769
+ <q-card flat>
1770
+ <q-card-section ref="showTitleRef">
1771
+ <q-toolbar>
1772
+ <q-toolbar-title>
1773
+ {{ getShowTitle }}
1774
+ </q-toolbar-title>
1775
+ <q-btn
1776
+ flat
1777
+ icon="close"
1778
+ padding="3px"
1779
+ text-color="body"
1780
+ @click="closeShowDialog"
1781
+ >
1782
+ <q-tooltip class="m-dt-btn-tooltip">
1783
+ {{ __('myth.titles.close') }}
1784
+ </q-tooltip>
1785
+ </q-btn>
1786
+ </q-toolbar>
1787
+ </q-card-section>
1788
+ <q-separator />
1789
+ <q-card-section
1790
+ :style="`height: ${($q.screen.height || 100) - 84 }px`"
1791
+ class="scroll m-datatable__dialog-show-container"
1792
+ >
1793
+ <slot
1794
+ :dt="datatableItemsScope"
1795
+ :form="useFormContext"
1796
+ :index="dialogItemIndex"
1797
+ :item="dialogItem"
1798
+ name="show"
1799
+ />
1800
+ </q-card-section>
1801
+ </q-card>
1802
+ </MContainer>
1801
1803
  </q-card>
1802
1804
  </MDialog>
1803
1805
 
@@ -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>