@simsustech/quasar-components 0.7.1 → 0.8.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/form.js +216 -37
  3. package/dist/general.js +14 -11
  4. package/dist/{nl-DF7uv7-9.js → nl-DvM_wB4u.js} +9 -0
  5. package/dist/types/ui/authentication/ConsentList.vue.d.ts +4 -3
  6. package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +8 -8
  7. package/dist/types/ui/authentication/EmailChangeStepper.vue.d.ts +3 -3
  8. package/dist/types/ui/authentication/LoginButton.vue.d.ts +7 -7
  9. package/dist/types/ui/authentication/LoginForm.vue.d.ts +8 -8
  10. package/dist/types/ui/authentication/OtpInput.vue.d.ts +3 -3
  11. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +12 -12
  12. package/dist/types/ui/authentication/PasswordChangeStepper.vue.d.ts +3 -3
  13. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +12 -12
  14. package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +8 -8
  15. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +8 -8
  16. package/dist/types/ui/authentication/VerificationSlider.vue.d.ts +3 -3
  17. package/dist/types/ui/form/BooleanItem.vue.d.ts +2 -2
  18. package/dist/types/ui/form/BooleanSelect.vue.d.ts +3 -3
  19. package/dist/types/ui/form/CurrencySelect.vue.d.ts +20 -0
  20. package/dist/types/ui/form/DateInput.vue.d.ts +12 -12
  21. package/dist/types/ui/form/DatePicker.vue.d.ts +7 -7
  22. package/dist/types/ui/form/EmailInput.vue.d.ts +3 -3
  23. package/dist/types/ui/form/FilteredModelSelect.vue.d.ts +27 -24
  24. package/dist/types/ui/form/FormInput.vue.d.ts +2 -2
  25. package/dist/types/ui/form/FormItem.vue.d.ts +7 -7
  26. package/dist/types/ui/form/GenderItem.vue.d.ts +2 -2
  27. package/dist/types/ui/form/GenderSelect.vue.d.ts +3 -3
  28. package/dist/types/ui/form/LocaleSelect.vue.d.ts +15 -0
  29. package/dist/types/ui/form/PostalCodeInput.vue.d.ts +3 -3
  30. package/dist/types/ui/form/TelephoneNumberInput.vue.d.ts +3 -3
  31. package/dist/types/ui/form/index.d.ts +2 -0
  32. package/dist/types/ui/form/lang/index.d.ts +18 -0
  33. package/dist/types/ui/general/QLanguageSelect.vue.d.ts +5 -3
  34. package/dist/types/ui/general/QStyledCard.vue.d.ts +8 -8
  35. package/dist/types/ui/general/QStyledLayout.vue.d.ts +8 -8
  36. package/dist/types/ui/general/ResourcePage.vue.d.ts +11 -26
  37. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +8 -8
  38. package/eslint.config.js +29 -0
  39. package/package.json +20 -17
  40. package/src/ui/flags/index.ts +2 -1
  41. package/src/ui/form/CurrencySelect.vue +49 -0
  42. package/src/ui/form/DateInput.vue +1 -1
  43. package/src/ui/form/FilteredModelSelect.vue +37 -11
  44. package/src/ui/form/LocaleSelect.vue +68 -0
  45. package/src/ui/form/index.ts +2 -0
  46. package/src/ui/form/lang/en-US.ts +9 -0
  47. package/src/ui/form/lang/index.ts +10 -1
  48. package/src/ui/form/lang/nl.ts +9 -0
  49. package/src/ui/general/QLanguageSelect.vue +1 -2
  50. package/src/ui/general/ResourcePage.vue +10 -11
  51. package/src/ui/icons/index.ts +1 -1
  52. package/.eslintignore +0 -2
  53. package/.eslintrc.cjs +0 -19
@@ -36,6 +36,7 @@ const lang: Language = {
36
36
  }
37
37
  },
38
38
  datePicker: {
39
+ date: 'Date',
39
40
  placeholder: 'YYYY/MM/DD',
40
41
  YYYY: 'YYYY',
41
42
  MM: 'MM',
@@ -43,6 +44,14 @@ const lang: Language = {
43
44
  validations: {
44
45
  unavailableRange: 'The selected period contains unavailable dates.'
45
46
  }
47
+ },
48
+ currency: {
49
+ currency: 'Currency',
50
+ EUR: 'Euro',
51
+ USD: 'USD'
52
+ },
53
+ locale: {
54
+ locale: 'Locale'
46
55
  }
47
56
  }
48
57
 
@@ -34,6 +34,7 @@ export interface Language {
34
34
  }
35
35
  }
36
36
  datePicker: {
37
+ date: string
37
38
  placeholder: string
38
39
  YYYY: string
39
40
  MM: string
@@ -42,11 +43,19 @@ export interface Language {
42
43
  unavailableRange: string
43
44
  }
44
45
  }
46
+ currency: {
47
+ currency: string
48
+ EUR: string
49
+ USD: string
50
+ }
51
+ locale: {
52
+ locale: string
53
+ }
45
54
  }
46
55
 
47
56
  import type { Ref } from 'vue'
48
57
  import { ref } from 'vue'
49
- import en from './en-US'
58
+ import en from './en-US.js'
50
59
  export const lang = ref(en)
51
60
 
52
61
  const locales = import.meta.glob<{ default: Language }>([
@@ -36,6 +36,7 @@ const lang: Language = {
36
36
  }
37
37
  },
38
38
  datePicker: {
39
+ date: 'Datum',
39
40
  placeholder: 'JJJJ/MM/DD',
40
41
  YYYY: 'JJJJ',
41
42
  MM: 'MM',
@@ -43,6 +44,14 @@ const lang: Language = {
43
44
  validations: {
44
45
  unavailableRange: 'De geselecteerde periode bevat ongeschikbare datums.'
45
46
  }
47
+ },
48
+ currency: {
49
+ currency: 'Valuta',
50
+ EUR: 'Euro',
51
+ USD: 'USD'
52
+ },
53
+ locale: {
54
+ locale: 'Land'
46
55
  }
47
56
  }
48
57
 
@@ -42,7 +42,7 @@ import { nl, enUs } from '../flags/index.js'
42
42
 
43
43
  export interface Props {
44
44
  modelValue: string
45
- languageImports: Record<string, () => Promise<QuasarLanguage>>
45
+ languageImports: Record<string, () => Promise<{ default: QuasarLanguage }>>
46
46
  }
47
47
  const props = defineProps<Props>()
48
48
  const $q = useQuasar()
@@ -75,7 +75,6 @@ watch(modelValue, (langIso: string) => {
75
75
  props.languageImports[langIso]().then(
76
76
  // langList[`../../../node_modules/quasar/lang/${langIso}.mjs`]().then(
77
77
  (lang) => {
78
- // @ts-ignore
79
78
  $q.lang.set(lang.default)
80
79
  }
81
80
  )
@@ -8,6 +8,7 @@
8
8
  class="shadow-2"
9
9
  :class="{ 'bg-dark': $q.dark.isActive, 'bg-white': !$q.dark.isActive }"
10
10
  >
11
+ <slot name="fab" />
11
12
  <q-btn
12
13
  v-if="type === 'create'"
13
14
  :disable="disabled"
@@ -21,7 +22,7 @@
21
22
  @click="create"
22
23
  />
23
24
  <q-btn
24
- v-else
25
+ v-else-if="type === 'update'"
25
26
  :disable="disabled"
26
27
  flat
27
28
  style="margin-bottom: -50px; z-index: 5"
@@ -32,10 +33,10 @@
32
33
  class="q-mr-sm bg-primary text-white"
33
34
  @click="update"
34
35
  />
35
- <q-toolbar-title shrink>
36
+ <q-toolbar-title>
36
37
  <slot name="header" />
37
38
  </q-toolbar-title>
38
- <q-space />
39
+ <slot name="header-side" />
39
40
  </q-toolbar>
40
41
  </q-page-sticky>
41
42
  </q-page>
@@ -48,7 +49,7 @@ export default {
48
49
  </script>
49
50
 
50
51
  <script setup lang="ts">
51
- import { ref, toRefs, watch } from 'vue'
52
+ import { ref, toRefs, watch, useSlots } from 'vue'
52
53
  import { useQuasar } from 'quasar'
53
54
  import { useLang, loadLang } from './lang'
54
55
 
@@ -56,13 +57,9 @@ export interface Props {
56
57
  type?: 'create' | 'update'
57
58
  disabled?: boolean
58
59
  }
59
- // const props = defineProps<Props>()
60
- const props = withDefaults(defineProps<Props>(), {
61
- type: 'create',
62
- disabled: false
63
- })
60
+ const slots = useSlots()
61
+ const props = defineProps<Props>()
64
62
 
65
- // const attrs = useAttrs();
66
63
  const emit = defineEmits<{
67
64
  (
68
65
  e: 'create',
@@ -92,7 +89,9 @@ watch($q.lang, (val) => {
92
89
  loadLang($q.lang.isoName)
93
90
  })
94
91
 
95
- const { disabled } = toRefs(props)
92
+ const { type, disabled } = toRefs(props)
93
+
94
+ if (!type.value && !slots.fab) type.value = 'create'
96
95
 
97
96
  const done = () => ''
98
97
  const create = (evt: unknown) =>
@@ -1,3 +1,3 @@
1
- // @ts-nocheck
1
+ // @ts-expect-error vite only
2
2
  import microsoft from 'microsoft.icon'
3
3
  export { microsoft }
package/.eslintignore DELETED
@@ -1,2 +0,0 @@
1
- .eslintrc.cjs
2
- node_modules/
package/.eslintrc.cjs DELETED
@@ -1,19 +0,0 @@
1
- module.exports = {
2
- ignorePatterns: ['.eslintrc.cjs'],
3
- extends: [
4
- 'eslint:recommended',
5
- 'plugin:@typescript-eslint/recommended',
6
- 'plugin:vue/vue3-recommended',
7
- 'plugin:prettier-vue/recommended'
8
- ],
9
- parser: 'vue-eslint-parser',
10
- parserOptions: {
11
- parser: '@typescript-eslint/parser',
12
- sourceType: 'module'
13
- },
14
- rules: {
15
- '@typescript-eslint/ban-ts-comment': 0
16
- },
17
- plugins: ['@typescript-eslint'],
18
- root: true
19
- }