@simsustech/quasar-components 0.3.3 → 0.3.5

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 (54) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/StandardComponent.vue +19 -24
  3. package/dist/authentication.js +87 -87
  4. package/dist/flags.js +224 -5
  5. package/dist/form.js +59 -57
  6. package/dist/general.js +15 -24
  7. package/dist/types/ui/authentication/ConsentList.vue.d.ts +35 -10
  8. package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +29 -12
  9. package/dist/types/ui/authentication/EmailChangeStepper.vue.d.ts +15 -12
  10. package/dist/types/ui/authentication/LoginButton.vue.d.ts +10 -11
  11. package/dist/types/ui/authentication/LoginForm.vue.d.ts +33 -12
  12. package/dist/types/ui/authentication/OtpInput.vue.d.ts +12 -15
  13. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +42 -29
  14. package/dist/types/ui/authentication/PasswordChangeStepper.vue.d.ts +15 -12
  15. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +56 -31
  16. package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +21 -12
  17. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +13 -12
  18. package/dist/types/ui/authentication/VerificationSlider.vue.d.ts +11 -12
  19. package/dist/types/ui/form/BooleanItem.vue.d.ts +18 -9
  20. package/dist/types/ui/form/BooleanSelect.vue.d.ts +24 -11
  21. package/dist/types/ui/form/DateInput.vue.d.ts +33 -10
  22. package/dist/types/ui/form/EmailInput.vue.d.ts +21 -12
  23. package/dist/types/ui/form/FormInput.vue.d.ts +27 -10
  24. package/dist/types/ui/form/FormItem.vue.d.ts +21 -10
  25. package/dist/types/ui/form/GenderItem.vue.d.ts +10 -9
  26. package/dist/types/ui/form/GenderSelect.vue.d.ts +18 -11
  27. package/dist/types/ui/form/PostalCodeInput.vue.d.ts +26 -11
  28. package/dist/types/ui/form/TelephoneNumberInput.vue.d.ts +18 -11
  29. package/dist/types/ui/general/QLanguageSelect.vue.d.ts +18 -9
  30. package/dist/types/ui/general/QStyledCard.vue.d.ts +10 -11
  31. package/dist/types/ui/general/QStyledLayout.vue.d.ts +12 -11
  32. package/dist/types/ui/general/QSubmitButton.vue.d.ts +1 -1
  33. package/dist/types/ui/general/ResourcePage.vue.d.ts +25 -30
  34. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +11 -12
  35. package/dist/types/virtualModules.d.ts +0 -1
  36. package/dist/virtualModules.d.ts +0 -1
  37. package/dist/virtualModules.js +34 -1
  38. package/dist/vite-plugin.js +1 -1
  39. package/package.json +21 -21
  40. package/src/ui/form/BooleanItem.vue +1 -1
  41. package/src/ui/form/BooleanSelect.vue +1 -1
  42. package/src/ui/form/DateInput.vue +5 -2
  43. package/src/ui/form/EmailInput.vue +3 -6
  44. package/src/ui/form/FormInput.vue +1 -1
  45. package/src/ui/form/FormItem.vue +1 -1
  46. package/src/ui/form/GenderItem.vue +1 -1
  47. package/src/ui/form/GenderSelect.vue +2 -2
  48. package/src/ui/form/TelephoneNumberInput.vue +1 -1
  49. package/src/ui/general/QLanguageSelect.vue +2 -2
  50. package/src/ui/general/ResourcePage.vue +2 -2
  51. package/src/ui/general/ResponsiveDialog.vue +1 -2
  52. package/src/virtualModules.ts +34 -34
  53. package/src/vite-plugin.ts +1 -1
  54. package/dist/en-US-6cc72154.js +0 -226
@@ -3,14 +3,23 @@ export interface Props {
3
3
  modelValue: string;
4
4
  languageImports: Record<string, () => Promise<QuasarLanguage>>;
5
5
  }
6
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}>;
7
- export default _default;
8
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
- type __VLS_TypePropsToRuntimeProps<T> = {
10
- [K in keyof T]-?: {} extends Pick<T, K> ? {
11
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
- } : {
13
- type: import('vue').PropType<T[K]>;
6
+ declare const _default: import("vue").DefineComponent<{
7
+ modelValue: {
8
+ type: import("vue").PropType<string>;
9
+ required: true;
10
+ };
11
+ languageImports: {
12
+ type: import("vue").PropType<Record<string, () => Promise<QuasarLanguage>>>;
13
+ required: true;
14
+ };
15
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ modelValue: {
17
+ type: import("vue").PropType<string>;
18
+ required: true;
19
+ };
20
+ languageImports: {
21
+ type: import("vue").PropType<Record<string, () => Promise<QuasarLanguage>>>;
14
22
  required: true;
15
23
  };
16
- };
24
+ }>>, {}, {}>;
25
+ export default _default;
@@ -2,10 +2,18 @@ import { QCardActionsProps } from 'quasar';
2
2
  export interface Props {
3
3
  actions?: QCardActionsProps;
4
4
  }
5
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {
5
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
6
+ actions: {
7
+ type: import("vue").PropType<QCardActionsProps>;
8
+ };
9
+ }, {
6
10
  variables: import("vue").Ref<{}>;
7
11
  functions: import("vue").Ref<{}>;
8
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}>, {
12
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ actions: {
14
+ type: import("vue").PropType<QCardActionsProps>;
15
+ };
16
+ }>>, {}, {}>, {
9
17
  image?(_: {}): any;
10
18
  title?(_: {}): any;
11
19
  subtitle?(_: {}): any;
@@ -13,15 +21,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
13
21
  actions?(_: {}): any;
14
22
  }>;
15
23
  export default _default;
16
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
- type __VLS_TypePropsToRuntimeProps<T> = {
18
- [K in keyof T]-?: {} extends Pick<T, K> ? {
19
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
- } : {
21
- type: import('vue').PropType<T[K]>;
22
- required: true;
23
- };
24
- };
25
24
  type __VLS_WithTemplateSlots<T, S> = T & {
26
25
  new (): {
27
26
  $slots: S;
@@ -1,22 +1,23 @@
1
1
  export interface Props {
2
2
  title: string;
3
3
  }
4
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {
4
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
+ title: {
6
+ type: import("vue").PropType<string>;
7
+ required: true;
8
+ };
9
+ }, {
5
10
  variables: import("vue").Ref<{}>;
6
11
  functions: import("vue").Ref<{}>;
7
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}>, {
12
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ title: {
14
+ type: import("vue").PropType<string>;
15
+ required: true;
16
+ };
17
+ }>>, {}, {}>, {
8
18
  leftDrawerItems?(_: {}): any;
9
19
  }>;
10
20
  export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToRuntimeProps<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
20
21
  type __VLS_WithTemplateSlots<T, S> = T & {
21
22
  new (): {
22
23
  $slots: S;
@@ -49,5 +49,5 @@ declare const _default: import("vue").DefineComponent<{
49
49
  loading: boolean;
50
50
  useForm: boolean;
51
51
  isNextButton: boolean;
52
- }>;
52
+ }, {}>;
53
53
  export default _default;
@@ -2,60 +2,55 @@ export interface Props {
2
2
  type?: 'create' | 'update';
3
3
  disabled?: boolean;
4
4
  }
5
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
6
- type: string;
7
- disabled: boolean;
8
- }>, {
5
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
6
+ type: {
7
+ type: import("vue").PropType<"create" | "update">;
8
+ default: string;
9
+ };
10
+ disabled: {
11
+ type: import("vue").PropType<boolean>;
12
+ default: boolean;
13
+ };
14
+ }, {
9
15
  variables: import("vue").Ref<{}>;
10
16
  functions: import("vue").Ref<{}>;
11
17
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
18
  create: (payload_0: {
13
- data?: any;
19
+ data?: unknown;
14
20
  done: (success?: boolean) => void;
15
21
  }) => void;
16
22
  update: (payload_0: {
17
- data?: any;
23
+ data?: unknown;
18
24
  done: (success?: boolean) => void;
19
25
  }) => void;
20
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
21
- type: string;
22
- disabled: boolean;
23
- }>>> & {
26
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
+ type: {
28
+ type: import("vue").PropType<"create" | "update">;
29
+ default: string;
30
+ };
31
+ disabled: {
32
+ type: import("vue").PropType<boolean>;
33
+ default: boolean;
34
+ };
35
+ }>> & {
24
36
  onCreate?: ((args_0: {
25
- data?: any;
37
+ data?: unknown;
26
38
  done: (success?: boolean) => void;
27
39
  }) => any) | undefined;
28
40
  onUpdate?: ((args_0: {
29
- data?: any;
41
+ data?: unknown;
30
42
  done: (success?: boolean) => void;
31
43
  }) => any) | undefined;
32
44
  }, {
33
45
  type: "create" | "update";
34
46
  disabled: boolean;
35
- }>, {
47
+ }, {}>, {
36
48
  default?(_: {}): any;
37
49
  header?(_: {}): any;
38
50
  }>;
39
51
  export default _default;
40
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
41
- type __VLS_TypePropsToRuntimeProps<T> = {
42
- [K in keyof T]-?: {} extends Pick<T, K> ? {
43
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
44
- } : {
45
- type: import('vue').PropType<T[K]>;
46
- required: true;
47
- };
48
- };
49
- type __VLS_WithDefaults<P, D> = {
50
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
51
- default: D[K];
52
- }> : P[K];
53
- };
54
52
  type __VLS_WithTemplateSlots<T, S> = T & {
55
53
  new (): {
56
54
  $slots: S;
57
55
  };
58
56
  };
59
- type __VLS_Prettify<T> = {
60
- [K in keyof T]: T[K];
61
- } & {};
@@ -1,7 +1,11 @@
1
1
  export interface Props {
2
2
  display?: boolean;
3
3
  }
4
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {
4
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
+ display: {
6
+ type: import("vue").PropType<boolean>;
7
+ };
8
+ }, {
5
9
  variables: import("vue").Ref<{}>;
6
10
  functions: import("vue").Ref<{
7
11
  open: () => void | undefined;
@@ -12,24 +16,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
12
16
  submit: (payload_0: {
13
17
  done: (success?: boolean) => void;
14
18
  }) => void;
15
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
19
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ display: {
21
+ type: import("vue").PropType<boolean>;
22
+ };
23
+ }>> & {
16
24
  onSubmit?: ((args_0: {
17
25
  done: (success?: boolean) => void;
18
26
  }) => any) | undefined;
19
- }, {}>, {
27
+ }, {}, {}>, {
20
28
  title?(_: {}): any;
21
29
  default?(_: {}): any;
22
30
  }>;
23
31
  export default _default;
24
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
- type __VLS_TypePropsToRuntimeProps<T> = {
26
- [K in keyof T]-?: {} extends Pick<T, K> ? {
27
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
- } : {
29
- type: import('vue').PropType<T[K]>;
30
- required: true;
31
- };
32
- };
33
32
  type __VLS_WithTemplateSlots<T, S> = T & {
34
33
  new (): {
35
34
  $slots: S;
@@ -1,3 +1,2 @@
1
1
  export declare const FlagIcon: (locale: string) => string;
2
2
  export declare const Icon: (icon: string) => string;
3
- export declare const FormItem: (field: string) => string;
@@ -1,3 +1,2 @@
1
1
  export declare const FlagIcon: (locale: string) => string;
2
2
  export declare const Icon: (icon: string) => string;
3
- export declare const FormItem: (field: string) => string;
@@ -1,3 +1,36 @@
1
1
  export var FlagIcon = function (locale) { return "\n import { computed, ref, watch, h } from 'vue'\n import { useQuasar, QIcon } from 'quasar'\n import { useLang, loadLang } from '".concat(new URL("../src/ui/flags/lang", import.meta.url).pathname, "'\n import icon from '").concat(new URL("../src/ui/flags/assets/".concat(locale, ".svg"), import.meta.url).pathname, "'\n export default {\n setup(props, context) {\n const $q = useQuasar()\n const lang = useLang()\n if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)\n watch($q.lang, (val) => {\n loadLang($q.lang.isoName)\n })\n \n const country = computed(\n () => lang.value.countries['").concat(locale, "']\n )\n // @ts-ignore\n // const language = computed(() => lang.value.languages['").concat(locale, "'])\n const language = computed(() => lang.value.languages['").concat(locale, "'])\n const variables = ref({\n country,\n language\n // header: lang.value.some.nested.prop\n })\n const functions = ref({\n // submit\n })\n\n context.expose({\n variables,\n functions\n })\n\n // return the render function\n return () => h(QIcon, { name: `img:${icon}` })\n }}\n"); };
2
2
  export var Icon = function (icon) { return "\n import { computed, ref, watch, h } from 'vue'\n import { useQuasar, QIcon } from 'quasar'\n import icon from '".concat(new URL("../src/ui/icons/assets/".concat(icon, ".svg"), import.meta.url).pathname, "'\n import labels from '").concat(new URL("../src/ui/icons/labels.ts", import.meta.url).pathname, "'\n export default {\n setup(props, context) {\n const $q = useQuasar()\n\n const variables = ref(labels['").concat(icon, "'])\n\n const functions = ref({\n // submit\n })\n\n context.expose({\n variables,\n functions\n })\n\n // return the render function\n return () => h(QIcon, { name: `img:${icon}` })\n }}\n"); };
3
- export var FormItem = function (field) { return "\nimport { ref, watch, useAttrs, h } from 'vue'\nimport { QItem, QItemLabel, QItemSection, useQuasar } from 'quasar'\nimport { useLang, loadLang } from '".concat(new URL("../src/ui/form/lang/index.ts", import.meta.url).pathname, "'\n\nexport default {\n setup(props, context) {\n const $q = useQuasar()\n const attrs = useAttrs()\n\n const lang = useLang()\n\n if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)\n watch($q.lang, (val) => {\n loadLang($q.lang.isoName)\n })\n\n const variables = ref({})\n\n const functions = ref({\n // submit\n })\n\n context.expose({\n variables,\n functions\n })\n\n // return the render function\n return () =>\n h(QItem, { attrs }, [\n h(QItemSection, {}, [\n h(QItemLabel, { overline: true }, 'field'),\n h(QItemLabel, {}, 'field')\n ])\n ])\n }\n}\n"); };
3
+ // export const FormItem = (field: string) => `
4
+ // import { ref, watch, useAttrs, h } from 'vue'
5
+ // import { QItem, QItemLabel, QItemSection, useQuasar } from 'quasar'
6
+ // import { useLang, loadLang } from '${
7
+ // new URL(`../src/ui/form/lang/index.ts`, import.meta.url).pathname
8
+ // }'
9
+ // export default {
10
+ // setup(props, context) {
11
+ // const $q = useQuasar()
12
+ // const attrs = useAttrs()
13
+ // const lang = useLang()
14
+ // if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
15
+ // watch($q.lang, (val) => {
16
+ // loadLang($q.lang.isoName)
17
+ // })
18
+ // const variables = ref({})
19
+ // const functions = ref({
20
+ // // submit
21
+ // })
22
+ // context.expose({
23
+ // variables,
24
+ // functions
25
+ // })
26
+ // // return the render function
27
+ // return () =>
28
+ // h(QItem, { attrs }, [
29
+ // h(QItemSection, {}, [
30
+ // h(QItemLabel, { overline: true }, 'field'),
31
+ // h(QItemLabel, {}, 'field')
32
+ // ])
33
+ // ])
34
+ // }
35
+ // }
36
+ // `
@@ -76,7 +76,7 @@ export default function (_a) {
76
76
  if (mode === 'development' || buildFromSrc) {
77
77
  var alias = Object.entries(exports)
78
78
  .filter(function (_a) {
79
- var key = _a[0], val = _a[1];
79
+ var val = _a[1];
80
80
  return val.src;
81
81
  })
82
82
  .map(function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simsustech/quasar-components",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "author": "Stefan van Herwijnen",
5
5
  "description": "High level components for Quasar Framework",
6
6
  "license": "MIT",
@@ -52,28 +52,28 @@
52
52
  "quasar": "^2.9.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@types/node": "^18.16.3",
56
- "@types/validator": "^13.7.15",
57
- "@types/ws": "^8.5.4",
58
- "@typescript-eslint/eslint-plugin": "^5.59.2",
59
- "@typescript-eslint/parser": "^5.59.2",
60
- "@vitejs/plugin-vue": "^4.2.1",
61
- "@vue/server-renderer": "^3.2.47",
62
- "eslint": "^8.39.0",
63
- "eslint-config-prettier": "^8.8.0",
55
+ "@types/node": "^20.4.5",
56
+ "@types/validator": "^13.9.0",
57
+ "@types/ws": "^8.5.5",
58
+ "@typescript-eslint/eslint-plugin": "^6.2.1",
59
+ "@typescript-eslint/parser": "^6.2.1",
60
+ "@vitejs/plugin-vue": "^4.2.3",
61
+ "@vue/server-renderer": "^3.3.4",
62
+ "eslint": "^8.46.0",
63
+ "eslint-config-prettier": "^8.9.0",
64
64
  "eslint-plugin-prettier-vue": "^4.2.0",
65
- "eslint-plugin-vue": "^9.11.0",
66
- "glob": "^10.2.2",
65
+ "eslint-plugin-vue": "^9.16.1",
66
+ "glob": "^10.3.3",
67
67
  "local-pkg": "^0.4.3",
68
- "prettier": "^2.8.8",
69
- "quasar": "^2.11.10",
70
- "rimraf": "^5.0.0",
71
- "typescript": "^5.0.4",
72
- "unplugin-vue-components": "^0.24.1",
73
- "vite": "^4.3.4",
74
- "vue": "^3.2.47",
75
- "vue-router": "^4.1.6",
76
- "vue-tsc": "^1.6.4"
68
+ "prettier": "^3.0.0",
69
+ "quasar": "^2.12.3",
70
+ "rimraf": "^5.0.1",
71
+ "typescript": "^5.1.6",
72
+ "unplugin-vue-components": "^0.25.1",
73
+ "vite": "^4.4.8",
74
+ "vue": "^3.3.4",
75
+ "vue-router": "^4.2.4",
76
+ "vue-tsc": "^1.8.8"
77
77
  },
78
78
  "scripts": {
79
79
  "build:plugin": "vite build",
@@ -28,7 +28,7 @@ const lang = useLang()
28
28
 
29
29
  const $q = useQuasar()
30
30
  if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
31
- watch($q.lang, (val) => {
31
+ watch($q.lang, () => {
32
32
  loadLang($q.lang.isoName)
33
33
  })
34
34
  </script>
@@ -29,7 +29,7 @@ const lang = useLang()
29
29
 
30
30
  const $q = useQuasar()
31
31
  if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
32
- watch($q.lang, (val) => {
32
+ watch($q.lang, () => {
33
33
  loadLang($q.lang.isoName)
34
34
  })
35
35
 
@@ -4,6 +4,7 @@
4
4
  :rules="validations"
5
5
  :model-value="modelValue"
6
6
  :label="`${label}${required ? '*' : ''}`"
7
+ placeholder="YYYY/MM/DD"
7
8
  mask="date"
8
9
  class="q-pr-md"
9
10
  @update:model-value="$emit('update:modelValue', $event)"
@@ -57,11 +58,13 @@ const lang = useLang()
57
58
 
58
59
  const $q = useQuasar()
59
60
  if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
60
- watch($q.lang, (val) => {
61
+ watch($q.lang, () => {
61
62
  loadLang($q.lang.isoName)
62
63
  })
63
64
 
64
- const validations = ref<((val: string) => boolean | string)[]>([])
65
+ const validations = ref<((val: string) => boolean | string)[]>([
66
+ (v) => /^\d{4}\/(0?[1-9]|1[012])\/(0?[1-9]|[12][0-9]|3[01])$/.test(v)
67
+ ])
65
68
 
66
69
  if (props.required)
67
70
  validations.value.push(
@@ -19,22 +19,19 @@ export default {
19
19
  </script>
20
20
 
21
21
  <script setup lang="ts">
22
- import { ref, useAttrs, watch } from 'vue'
23
- import { useQuasar } from 'quasar'
24
- import { useLang, loadLang } from './lang'
22
+ import { ref } from 'vue'
23
+ import { useLang } from './lang'
25
24
 
26
25
  export interface Props {
27
26
  subject: string
28
27
  body: string
29
28
  }
30
- const props = defineProps<Props>()
31
- const attrs = useAttrs()
29
+ defineProps<Props>()
32
30
  const emit = defineEmits<{
33
31
  (e: 'update:subject', value: string | number | null): void
34
32
  (e: 'update:body', value: string | null): void
35
33
  }>()
36
34
 
37
- const $q = useQuasar()
38
35
  const lang = useLang()
39
36
 
40
37
  const variables = ref({
@@ -31,7 +31,7 @@ const lang = useLang()
31
31
 
32
32
  const $q = useQuasar()
33
33
  if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
34
- watch($q.lang, (val) => {
34
+ watch($q.lang, () => {
35
35
  loadLang($q.lang.isoName)
36
36
  })
37
37
 
@@ -44,7 +44,7 @@ const lang = useLang()
44
44
 
45
45
  const $q = useQuasar()
46
46
  if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
47
- watch($q.lang, (val) => {
47
+ watch($q.lang, () => {
48
48
  loadLang($q.lang.isoName)
49
49
  })
50
50
  </script>
@@ -29,7 +29,7 @@ const lang = useLang()
29
29
 
30
30
  const $q = useQuasar()
31
31
  if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
32
- watch($q.lang, (val) => {
32
+ watch($q.lang, () => {
33
33
  loadLang($q.lang.isoName)
34
34
  })
35
35
  </script>
@@ -28,8 +28,8 @@ const attrs = useAttrs()
28
28
  const lang = useLang()
29
29
 
30
30
  const $q = useQuasar()
31
- if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
32
- watch($q.lang, (val) => {
31
+ if (lang.value.isoName !== $q.lang.isoName) await loadLang($q.lang.isoName)
32
+ watch($q.lang, () => {
33
33
  loadLang($q.lang.isoName)
34
34
  })
35
35
 
@@ -12,7 +12,7 @@
12
12
  /**
13
13
  * To do: add mask and country prefix
14
14
  */
15
- import { computed, ref, useAttrs } from 'vue'
15
+ import { ref, useAttrs } from 'vue'
16
16
  import { QInput } from 'quasar'
17
17
  import { useLang } from './lang'
18
18
 
@@ -52,11 +52,11 @@ const attrs = useAttrs()
52
52
  // const langList = import.meta.glob('../../../node_modules/quasar/lang/*.mjs')
53
53
 
54
54
  const nlRef = ref<typeof nl>()
55
- const nlCountry = computed(() => nlRef.value?.variables.country)
55
+ // const nlCountry = computed(() => nlRef.value?.variables.country)
56
56
  const nlLanguage = computed(() => nlRef.value?.variables.language)
57
57
 
58
58
  const enUsRef = ref<typeof enUs>()
59
- const enUsCountry = computed(() => enUsRef.value?.variables.country)
59
+ // const enUsCountry = computed(() => enUsRef.value?.variables.country)
60
60
  const enUsLanguage = computed(() => enUsRef.value?.variables.language)
61
61
 
62
62
  const languageOptions = [
@@ -70,7 +70,7 @@ const emit = defineEmits<{
70
70
  data,
71
71
  done
72
72
  }: {
73
- data?: any
73
+ data?: unknown
74
74
  done: (success?: boolean) => void
75
75
  }
76
76
  ): void
@@ -80,7 +80,7 @@ const emit = defineEmits<{
80
80
  data,
81
81
  done
82
82
  }: {
83
- data?: any
83
+ data?: unknown
84
84
  done: (success?: boolean) => void
85
85
  }
86
86
  ): void
@@ -44,9 +44,8 @@ import QSubmitButton from './QSubmitButton.vue'
44
44
  export interface Props {
45
45
  display?: boolean
46
46
  }
47
- const props = defineProps<Props>()
47
+ defineProps<Props>()
48
48
  // const attrs = useAttrs();
49
- const modelValue = ref(false)
50
49
  const emit = defineEmits<{
51
50
  (
52
51
  e: 'submit',
@@ -70,44 +70,44 @@ export const Icon = (icon: string) => `
70
70
  }}
71
71
  `
72
72
 
73
- export const FormItem = (field: string) => `
74
- import { ref, watch, useAttrs, h } from 'vue'
75
- import { QItem, QItemLabel, QItemSection, useQuasar } from 'quasar'
76
- import { useLang, loadLang } from '${
77
- new URL(`../src/ui/form/lang/index.ts`, import.meta.url).pathname
78
- }'
73
+ // export const FormItem = (field: string) => `
74
+ // import { ref, watch, useAttrs, h } from 'vue'
75
+ // import { QItem, QItemLabel, QItemSection, useQuasar } from 'quasar'
76
+ // import { useLang, loadLang } from '${
77
+ // new URL(`../src/ui/form/lang/index.ts`, import.meta.url).pathname
78
+ // }'
79
79
 
80
- export default {
81
- setup(props, context) {
82
- const $q = useQuasar()
83
- const attrs = useAttrs()
80
+ // export default {
81
+ // setup(props, context) {
82
+ // const $q = useQuasar()
83
+ // const attrs = useAttrs()
84
84
 
85
- const lang = useLang()
85
+ // const lang = useLang()
86
86
 
87
- if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
88
- watch($q.lang, (val) => {
89
- loadLang($q.lang.isoName)
90
- })
87
+ // if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
88
+ // watch($q.lang, (val) => {
89
+ // loadLang($q.lang.isoName)
90
+ // })
91
91
 
92
- const variables = ref({})
92
+ // const variables = ref({})
93
93
 
94
- const functions = ref({
95
- // submit
96
- })
94
+ // const functions = ref({
95
+ // // submit
96
+ // })
97
97
 
98
- context.expose({
99
- variables,
100
- functions
101
- })
98
+ // context.expose({
99
+ // variables,
100
+ // functions
101
+ // })
102
102
 
103
- // return the render function
104
- return () =>
105
- h(QItem, { attrs }, [
106
- h(QItemSection, {}, [
107
- h(QItemLabel, { overline: true }, 'field'),
108
- h(QItemLabel, {}, 'field')
109
- ])
110
- ])
111
- }
112
- }
113
- `
103
+ // // return the render function
104
+ // return () =>
105
+ // h(QItem, { attrs }, [
106
+ // h(QItemSection, {}, [
107
+ // h(QItemLabel, { overline: true }, 'field'),
108
+ // h(QItemLabel, {}, 'field')
109
+ // ])
110
+ // ])
111
+ // }
112
+ // }
113
+ // `
@@ -45,7 +45,7 @@ export default async function ({
45
45
  config(config, { mode }) {
46
46
  if (mode === 'development' || buildFromSrc) {
47
47
  const alias = Object.entries(exports)
48
- .filter(([key, val]) => {
48
+ .filter(([, val]) => {
49
49
  return val.src
50
50
  })
51
51
  .map(([key, val]) => {