@mythpe/quasar-ui-qui 0.0.48 → 0.0.50

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.0.48",
3
+ "version": "0.0.50",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -47,7 +47,7 @@ type Events = {
47
47
  const emit = defineEmits<Events>()
48
48
 
49
49
  const hasTooltip = computed(() => !!props.tooltip || !!props.show || !!props.update || !!props.destroy)
50
- const { __, mOptions } = useMyth()
50
+ const { __, props: pluginOptions } = useMyth()
51
51
  const getTooltip = computed(() => {
52
52
  if (props.tooltip !== undefined) {
53
53
  return props.tooltip ? __(props.tooltip) : props.tooltip
@@ -75,11 +75,11 @@ const getColor = computed<string | undefined>(() => {
75
75
  return props.color
76
76
  }
77
77
  if (props.show) {
78
- return mOptions.value?.dt?.contextmenu?.btnStyle?.showColor
78
+ return pluginOptions.value?.dt?.contextmenu?.btnStyle?.showColor
79
79
  } else if (props.update) {
80
- return mOptions.value?.dt?.contextmenu?.btnStyle?.updateColor
80
+ return pluginOptions.value?.dt?.contextmenu?.btnStyle?.updateColor
81
81
  } else if (props.destroy) {
82
- return mOptions.value?.dt?.contextmenu?.btnStyle?.destroyColor
82
+ return pluginOptions.value?.dt?.contextmenu?.btnStyle?.destroyColor
83
83
  }
84
84
  return props.color
85
85
  })
@@ -107,21 +107,21 @@ defineOptions({
107
107
  v-if="listItem"
108
108
  v-close-popup
109
109
  clickable
110
- v-bind="{...mOptions.dt?.MDtBtn?.item?.props,...$attrs}"
110
+ v-bind="{...pluginOptions.dt?.MDtBtn?.item?.props,...$attrs}"
111
111
  @click="emit('click',$event)"
112
112
  >
113
113
  <q-item-section
114
114
  side
115
- v-bind="mOptions.dt?.MDtBtn?.item?.avatarProps"
115
+ v-bind="pluginOptions.dt?.MDtBtn?.item?.avatarProps"
116
116
  >
117
117
  <q-icon
118
118
  :color="getColor"
119
119
  :name="getIcon"
120
- v-bind="mOptions.dt?.MDtBtn?.item?.iconProps"
120
+ v-bind="pluginOptions.dt?.MDtBtn?.item?.iconProps"
121
121
  />
122
122
  </q-item-section>
123
- <q-item-section v-bind="mOptions.dt?.MDtBtn?.item?.labelSectionProps">
124
- <q-item-label v-bind="mOptions.dt?.MDtBtn?.item?.itemLabelProps">
123
+ <q-item-section v-bind="pluginOptions.dt?.MDtBtn?.item?.labelSectionProps">
124
+ <q-item-label v-bind="pluginOptions.dt?.MDtBtn?.item?.itemLabelProps">
125
125
  <slot>
126
126
  {{ label ? __(label) : label }}
127
127
  </slot>
@@ -131,11 +131,11 @@ defineOptions({
131
131
  <q-btn
132
132
  v-else
133
133
  v-bind="{
134
- ...mOptions.dt?.MDtBtn?.btn?.props,
134
+ ...pluginOptions.dt?.MDtBtn?.btn?.props,
135
135
  ...$attrs,
136
- fabMini: fabMini !== undefined ? fabMini : ( mOptions.dt?.btn?.fabMini !== undefined ? mOptions.dt.btn.fabMini : label === undefined),
137
- round: round !== undefined ? round : ( mOptions.dt?.btn?.round !== undefined ? mOptions.dt.btn.round : label === undefined),
138
- dense: dense !== undefined ? dense : ( mOptions.dt?.btn?.dense !== undefined ? mOptions.dt.btn.dense : label === undefined),
136
+ fabMini: fabMini !== undefined ? fabMini : ( pluginOptions.dt?.btn?.fabMini !== undefined ? pluginOptions.dt.btn.fabMini : label === undefined),
137
+ round: round !== undefined ? round : ( pluginOptions.dt?.btn?.round !== undefined ? pluginOptions.dt.btn.round : label === undefined),
138
+ dense: dense !== undefined ? dense : ( pluginOptions.dt?.btn?.dense !== undefined ? pluginOptions.dt.btn.dense : label === undefined),
139
139
  label: label !== undefined ? __(label) : label,
140
140
  icon: getIcon,
141
141
  color: getColor
@@ -120,7 +120,7 @@ const props = withDefaults(defineProps<P>(), {
120
120
  fieldOptions: undefined
121
121
  })
122
122
  defineModel<Props['modelValue']>({ required: !1, default: undefined })
123
- const { __, mOptions } = useMyth()
123
+ const { __, props: pluginOptions } = useMyth()
124
124
  const helper = useBindInput<any>(() => props, 'ckeditor')
125
125
  const { getLabel, inputRules } = helper
126
126
  const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
@@ -389,7 +389,7 @@ defineOptions({
389
389
  :editor="ClassicEditor"
390
390
  :model-value="value || ''"
391
391
  :tag-name="tagName"
392
- v-bind="{...$attrs,...mOptions.ckeditor}"
392
+ v-bind="{...$attrs,...pluginOptions.ckeditor}"
393
393
  v-on="listeners"
394
394
  />
395
395
  <slot v-bind="scopes" />
@@ -164,7 +164,7 @@ defineOptions({
164
164
  :model-value="value"
165
165
  v-bind="{
166
166
  ...$attrs,
167
- ...attrs,
167
+ ...attrs as any,
168
168
  ...( viewMode ? { stackLabel: !0 } : {} )
169
169
  }"
170
170
  v-on="listeners"
@@ -169,11 +169,5 @@ defineOptions({
169
169
  name="bottom-input"
170
170
  v-bind="scopes"
171
171
  />
172
- <div>
173
- <div>theme</div>
174
- <pre>{{ theme }}</pre>
175
- <div>attrs</div>
176
- <pre>{{ attrs }}</pre>
177
- </div>
178
172
  </MCol>
179
173
  </template>
@@ -194,7 +194,7 @@ defineOptions({
194
194
  <template v-else>
195
195
  <div>
196
196
  <template v-if="value && Array.isArray(value)">
197
- {{ value.join(rangeSeparator || options.picker?.rangeSeparator || defSeparator) }}
197
+ {{ value.join(rangeSeparator || pluginOptions.picker?.rangeSeparator || defSeparator) }}
198
198
  </template>
199
199
  <template v-else>
200
200
  {{ value?.toString() }}
@@ -209,7 +209,7 @@ defineOptions({
209
209
  :icon="isDate ? 'ion-ios-calendar' : 'ion-ios-clock'"
210
210
  flat
211
211
  round
212
- v-bind="{...options?.pickerBtn, ...btnProps}"
212
+ v-bind="{...pluginOptions?.pickerBtn, ...btnProps}"
213
213
  >
214
214
  <q-popup-proxy
215
215
  cover
@@ -225,7 +225,7 @@ defineOptions({
225
225
  v-if="isDate"
226
226
  ref="dateElm"
227
227
  v-bind="{
228
- ...options.date as any,
228
+ ...pluginOptions.date as any,
229
229
  ...props,
230
230
  ...$attrs,
231
231
  todayBtn: getProp('todayBtn') === undefined ? !0 : getProp('todayBtn'),
@@ -258,7 +258,7 @@ defineOptions({
258
258
  ref="timeElm"
259
259
  v-bind="{
260
260
  ...$props,
261
- ...options.time,
261
+ ...pluginOptions.time,
262
262
  ...$attrs,
263
263
  mask:format,
264
264
  nowBtn: getProp('nowBtn') === undefined? !0 : getProp('nowBtn'),
@@ -34,7 +34,7 @@ const map = {
34
34
 
35
35
  const slideHide = computed<string>(() => 'slide-' + props.from)
36
36
  const slideShow = computed<string>(() => 'slide-' + map[props.from])
37
- const { mOptions } = reactive(useMyth())
37
+ const { props: pluginOptions } = useMyth()
38
38
  defineOptions({
39
39
  name: 'MDialog',
40
40
  inheritAttrs: !1
@@ -51,7 +51,7 @@ defineOptions({
51
51
  no-esc-dismiss
52
52
  no-shake
53
53
  persistent
54
- v-bind="{...mOptions.dialog,...$attrs}"
54
+ v-bind="{...pluginOptions.dialog,...$attrs}"
55
55
  >
56
56
  <slot />
57
57
  </q-dialog>
@@ -12,14 +12,13 @@
12
12
 
13
13
  import type { MModalMenuProps } from '../../types'
14
14
  import { useMyth } from '../../composable'
15
- import { reactive } from 'vue'
16
15
 
17
16
  interface Props {
18
17
  noCloseBtn?: MModalMenuProps['noCloseBtn'];
19
18
  position?: MModalMenuProps['position'];
20
19
  }
21
20
 
22
- const { mOptions, __ } = reactive(useMyth())
21
+ const { props: pluginOptions, __ } = useMyth()
23
22
  withDefaults(defineProps<Props>(), {
24
23
  noCloseBtn: () => !1,
25
24
  position: () => 'bottom'
@@ -38,9 +37,9 @@ defineOptions({
38
37
  maximized
39
38
  no-backdrop-dismiss
40
39
  no-shake
41
- v-bind="{...mOptions.modalMenu,...$attrs}"
40
+ v-bind="{...pluginOptions.modalMenu,...$attrs}"
42
41
  >
43
- <q-card v-bind="mOptions.modalMenuOptions?.card">
42
+ <q-card v-bind="pluginOptions.modalMenuOptions?.card">
44
43
  <slot />
45
44
  <template v-if="!noCloseBtn">
46
45
  <q-separator class="lt-md" />
@@ -48,7 +47,7 @@ defineOptions({
48
47
  v-close-popup
49
48
  class="lt-md"
50
49
  clickable
51
- v-bind="mOptions.modalMenuOptions?.closeBtn"
50
+ v-bind="pluginOptions.modalMenuOptions?.closeBtn"
52
51
  >
53
52
  <q-item-section>
54
53
  <q-item-label header>
@@ -24,7 +24,7 @@ defineOptions({
24
24
  name: 'MTooltip',
25
25
  inheritAttrs: !1
26
26
  })
27
- const { mOptions } = useMyth()
27
+ const { props: pluginOptions } = useMyth()
28
28
  </script>
29
29
 
30
30
  <template>
@@ -32,7 +32,7 @@ const { mOptions } = useMyth()
32
32
  class="m--dt-btn-tooltip"
33
33
  transition-hide="scale"
34
34
  transition-show="scale"
35
- v-bind="{...mOptions.tooltip,...$attrs}"
35
+ v-bind="{...pluginOptions.tooltip,...$attrs}"
36
36
  >
37
37
  <slot />
38
38
  </q-tooltip>
@@ -283,20 +283,8 @@ export const useMyth = () => {
283
283
  ...opts as any
284
284
  })
285
285
  }
286
- // const api = computed(() => myth.api.value)
287
- // const url = computed(() => myth.url.value)
288
- // const mAxios = computed(() => myth.mAxios.value)
289
- // const mOptions = computed(() => myth.props.value)
290
286
  const isSmall = computed(() => q.screen.lt.md)
291
- // const themeInput = computed(() => myth.themeInput.value)
292
- // const themeBtn = computed(() => myth.themeBtn.value)
293
287
  return {
294
- // api,
295
- // url,
296
- // mAxios,
297
- // mOptions,
298
- // themeInput,
299
- // themeBtn,
300
288
  __,
301
289
  getPageTitle,
302
290
  parseHeaders,