@mythpe/quasar-ui-qui 0.3.86 → 0.3.88

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.86",
3
+ "version": "0.3.88",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -33,6 +33,7 @@ interface P {
33
33
  xl?: Props['xl'];
34
34
  searchLength?: Props['searchLength'];
35
35
  noIcon?: Props['noIcon'];
36
+ selectProps?: Props['selectProps'];
36
37
  }
37
38
 
38
39
  const props = defineProps<P>()
@@ -129,7 +130,7 @@ defineOptions({
129
130
  popup-content-class="m-select__popup-phone"
130
131
  popup-no-route-dismiss
131
132
  service="country.codes"
132
- v-bind="$attrs"
133
+ v-bind="selectProps"
133
134
  @model="onSelectCountry"
134
135
  />
135
136
  </MRow>
@@ -0,0 +1,94 @@
1
+ <!--
2
+ - MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
3
+ - Email: mythpe@gmail.com
4
+ - Mobile: +966590470092
5
+ - Website: https://www.4myth.com
6
+ - Github: https://github.com/mythpe
7
+ -->
8
+
9
+ <script lang="ts" setup>
10
+ import { useDialogPluginComponent, useQuasar } from 'quasar'
11
+ import { computed, ref } from 'vue'
12
+ import { useMyth } from '../../composable'
13
+ import type { MFrameDialogProps as Props } from '../../types'
14
+
15
+ interface P {
16
+ url: Props['url'];
17
+ height: Props['height'];
18
+ noDownload?: boolean;
19
+ iframeProps?: Record<string, any>;
20
+ }
21
+
22
+ const props = defineProps<P>()
23
+ const $q = useQuasar()
24
+ defineEmits([
25
+ ...useDialogPluginComponent.emits
26
+ ])
27
+ const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent()
28
+ const { openWindow } = useMyth()
29
+
30
+ const loading = ref(!0)
31
+ const src = computed<string | null>(() => props.url || null)
32
+ const onCloseClick = () => {
33
+ onDialogOK()
34
+ }
35
+
36
+ const onDownloadClick = () => {
37
+ if (src.value) {
38
+ openWindow(src.value)
39
+ }
40
+ }
41
+
42
+ defineOptions({
43
+ name: 'FrameDialog'
44
+ })
45
+ </script>
46
+
47
+ <template>
48
+ <q-dialog
49
+ ref="dialogRef"
50
+ maximized
51
+ no-shake
52
+ transition-hide="slide-up"
53
+ transition-show="slide-down"
54
+ @hide="onDialogHide"
55
+ >
56
+ <q-card class="q-dialog-plugin">
57
+ <q-card-section style="max-height: 80px">
58
+ <MContainer
59
+ dense
60
+ fluid
61
+ >
62
+ <MRow class="items-center">
63
+ <MBtn
64
+ v-if="!noDownload"
65
+ icon="ion-ios-open"
66
+ label="labels.download"
67
+ @click="onDownloadClick()"
68
+ />
69
+ <q-space />
70
+ <MBtn
71
+ flat
72
+ icon="close"
73
+ padding="3px"
74
+ text-color="body"
75
+ @click="onCloseClick()"
76
+ />
77
+ </MRow>
78
+ </MContainer>
79
+ </q-card-section>
80
+ <template v-if="!!src">
81
+ <iframe
82
+ :height="height ?? ($q.screen.height - 80) + 'px'"
83
+ :src="src"
84
+ frameborder="0"
85
+ v-bind="iframeProps"
86
+ width="100%"
87
+ @load="loading = !1"
88
+ />
89
+ <slot />
90
+ <MInnerLoading :showing="loading" />
91
+ </template>
92
+ </q-card>
93
+ </q-dialog>
94
+ </template>
@@ -1,7 +1,9 @@
1
1
  import MDialog from './MDialog.vue'
2
+ import MDialogFile from './MDialogFile.vue'
3
+ import MFrameDialog from './MFrameDialog.vue'
2
4
  import MModalMenu from './MModalMenu.vue'
3
5
  import MTooltip from './MTooltip.vue'
4
6
 
5
- export { MDialog, MModalMenu, MTooltip }
7
+ export { MDialog, MDialogFile, MFrameDialog, MModalMenu, MTooltip }
6
8
 
7
9
  export default {}
@@ -51,6 +51,7 @@ export const defineAsyncComponents = function (app: App) {
51
51
  // Modals.
52
52
  app.component('MDialog', defineAsyncComponent(() => import('../components/modal/MDialog.vue')))
53
53
  app.component('MDialogFile', defineAsyncComponent(() => import('../components/modal/MDialogFile.vue')))
54
+ app.component('MFrameDialog', defineAsyncComponent(() => import('../components/modal/MFrameDialog.vue')))
54
55
  app.component('MModalMenu', defineAsyncComponent(() => import('../components/modal/MModalMenu.vue')))
55
56
  app.component('MTooltip', defineAsyncComponent(() => import('../components/modal/MTooltip.vue')))
56
57
 
@@ -0,0 +1,20 @@
1
+ /*
2
+ * MyTh Ahmed Faiz Copyright © 2016-2025 All rights reserved.
3
+ * Email: mythpe@gmail.com
4
+ * Mobile: +966590470092
5
+ * Website: https://www.4myth.com
6
+ * Github: https://github.com/mythpe
7
+ */
8
+
9
+ import type { VNode } from 'vue'
10
+
11
+ export type MFrameDialogProps = {
12
+ url: string | undefined | null;
13
+ height?: string;
14
+ noDownload?: boolean;
15
+ iframeProps?: Record<string, any>;
16
+ }
17
+
18
+ export type MFrameDialogSlots = {
19
+ default: () => VNode[];
20
+ }
@@ -16,4 +16,5 @@ export type MPhoneProps = MInputProps & {
16
16
  countryPhone?: string;
17
17
  searchLength?: MAxiosProps['searchLength'];
18
18
  noIcon?: boolean;
19
+ selectProps?: MAxiosProps;
19
20
  }
@@ -71,6 +71,7 @@ import type { MSarIconProps, MSarIconSlots, MSarStringProps, MSarStringSlots } f
71
71
  import type { MMapProps, MMapSlots } from './api/MMap'
72
72
  import type { MInnerLoadingProps, MInnerLoadingSlots } from './api/MInnerLoading'
73
73
  import type { MDialogFileProps, MDialogFileSlots } from './api/MDialogFile'
74
+ import type { MFrameDialogProps, MFrameDialogSlots } from './api/MFrameDialog'
74
75
 
75
76
  declare module '@vue/runtime-core' {
76
77
  interface GlobalComponents {
@@ -124,6 +125,7 @@ declare module '@vue/runtime-core' {
124
125
  // Modals.
125
126
  MDialog: GlobalComponentConstructor<MDialogProps, MDialogSlots>;
126
127
  MDialogFile: GlobalComponentConstructor<MDialogFileProps, MDialogFileSlots>;
128
+ MFrameDialog: GlobalComponentConstructor<MFrameDialogProps, MFrameDialogSlots>;
127
129
  MModalMenu: GlobalComponentConstructor<MModalMenuProps, MModalMenuSlots>;
128
130
  MTooltip: GlobalComponentConstructor<MTooltipProps, MTooltipSlots>;
129
131
  // Datatable
@@ -30,6 +30,7 @@ export { MCkeditorSlots } from './api/MCkeditor'
30
30
  export { MCkeditorProps } from './api/MCkeditor'
31
31
  export { MDialogSlots, MDialogProps } from './api/MDialog'
32
32
  export { MDialogFileSlots, MDialogFileProps } from './api/MDialogFile'
33
+ export { MFrameDialogSlots, MFrameDialogProps } from './api/MFrameDialog'
33
34
  export { MTooltipSlots } from './api/MTooltip'
34
35
  export { MTooltipProps } from './api/MTooltip'
35
36
  export { MModalMenuSlots } from './api/MModalMenu'