@mythpe/quasar-ui-qui 0.4.7 → 0.4.9

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.7",
3
+ "version": "0.4.9",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -154,24 +154,26 @@ defineOptions({
154
154
  }"
155
155
  v-on="listeners"
156
156
  >
157
- <template
158
- v-if="!!getLabel || !help"
159
- #default
160
- >
161
- <MRow class="items-center">
162
- <div
163
- v-if="!!getLabel"
164
- :class="errorMessage ? undefined : 'text-body'"
157
+ <template #default>
158
+ <slot name="default">
159
+ <MRow
160
+ v-if="!!getLabel || !help"
161
+ class="items-center"
165
162
  >
166
- {{ getLabel }}
167
- </div>
168
- <MHelpRow
169
- v-if="!!help"
170
- :right="!!getLabel"
171
- :text="help"
172
- tooltip
173
- />
174
- </MRow>
163
+ <div
164
+ v-if="!!getLabel"
165
+ :class="errorMessage ? undefined : 'text-body'"
166
+ >
167
+ {{ getLabel }}
168
+ </div>
169
+ <MHelpRow
170
+ v-if="!!help"
171
+ :right="!!getLabel"
172
+ :text="help"
173
+ tooltip
174
+ />
175
+ </MRow>
176
+ </slot>
175
177
  </template>
176
178
  </q-checkbox>
177
179
  </q-field>
@@ -297,15 +297,17 @@ export const Helpers = {
297
297
  }
298
298
  return `//${path}`
299
299
  },
300
- formatMoney (value: any = '', suffix: string = ''): string {
300
+ formatMoney (value: any = '', suffix: string = '', options?: Intl.NumberFormatOptions): string {
301
301
  let numValue = typeof value !== 'number' ? parseFloat(value) : value
302
302
  if (isNaN(numValue)) {
303
303
  numValue = 0.00
304
304
  }
305
- const formattedValue = numValue.toLocaleString('en-US', {
305
+ const opt = {
306
306
  minimumFractionDigits: 2,
307
- maximumFractionDigits: 2
308
- })
307
+ maximumFractionDigits: 2,
308
+ ...(options || {})
309
+ }
310
+ const formattedValue = numValue.toLocaleString('en-US', opt)
309
311
  return `${formattedValue} ${suffix}`.trim()
310
312
  },
311
313
  calculateAspectRatio: (width: number | string, height: number | string): [number, string] => {