@simsustech/quasar-components 0.11.10 → 0.11.12
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/CHANGELOG.md +16 -0
- package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-Du4fNbTV.js +573 -0
- package/dist/authentication.js +152 -66
- package/dist/form.js +155 -300
- package/dist/general.js +44 -195
- package/dist/md3.js +459 -0
- package/dist/{nl-BTgHOvpQ.js → nl-BJwNz421.js} +70 -0
- package/dist/{nl-jHKPHlmh.js → nl-CneFq5NZ.js} +4 -0
- package/dist/nl-NLgZUAKl.js +6 -0
- package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/LoginButton.vue.d.ts +1 -1
- package/dist/types/ui/authentication/LoginForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/LogoutButton.vue.d.ts +12 -0
- package/dist/types/ui/authentication/LogoutForm.vue.d.ts +18 -0
- package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/RegisterForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +1 -1
- package/dist/types/ui/authentication/index.d.ts +2 -0
- package/dist/types/ui/authentication/lang/index.d.ts +12 -0
- package/dist/types/ui/form/DateInput.vue.d.ts +11 -1
- package/dist/types/ui/form/FormInput.vue.d.ts +2 -15
- package/dist/types/ui/form/FormItem.vue.d.ts +2 -19
- package/dist/types/ui/form/LocaleSelect.vue.d.ts +6 -4
- package/dist/types/ui/form/lang/index.d.ts +1131 -0
- package/dist/types/ui/general/QDrawerList.vue.d.ts +2 -7
- package/dist/types/ui/general/QLanguageSelect.vue.d.ts +7 -4
- package/dist/types/ui/general/QStyledCard.vue.d.ts +9 -5
- package/dist/types/ui/general/QStyledLayout.vue.d.ts +1 -1
- package/dist/types/ui/general/QSubmitButton.vue.d.ts +1 -1
- package/dist/types/ui/general/ResourcePage.vue.d.ts +9 -5
- package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +3 -2
- package/dist/types/ui/general/index.d.ts +0 -1
- package/dist/types/ui/md3/Md3Layout.vue.d.ts +31 -0
- package/dist/types/ui/md3/NavigationRailFabs.vue.d.ts +15 -0
- package/dist/types/ui/md3/index.d.ts +3 -0
- package/dist/types/ui/md3/lang/en-US.d.ts +3 -0
- package/dist/types/ui/md3/lang/index.d.ts +12 -0
- package/dist/types/ui/md3/lang/nl.d.ts +3 -0
- package/package.json +21 -14
- package/src/ui/authentication/LogoutButton.vue +31 -0
- package/src/ui/authentication/LogoutForm.vue +49 -0
- package/src/ui/authentication/UserMenuButton.vue +1 -1
- package/src/ui/authentication/index.ts +2 -0
- package/src/ui/authentication/lang/en-US.ts +4 -0
- package/src/ui/authentication/lang/index.ts +4 -0
- package/src/ui/authentication/lang/nl.ts +4 -0
- package/src/ui/form/DateInput.vue +42 -23
- package/src/ui/form/LocaleSelect.vue +29 -43
- package/src/ui/form/lang/en-US.ts +377 -0
- package/src/ui/form/lang/index.ts +377 -0
- package/src/ui/form/lang/nl.ts +377 -0
- package/src/ui/general/QLanguageSelect.vue +30 -106
- package/src/ui/general/{QLanguageSelectBtn.vue → QLanguageSelectBtn.vue.bak} +1 -1
- package/src/ui/general/QStyledCard.vue +2 -2
- package/src/ui/general/ResponsiveDialog.vue +14 -4
- package/src/ui/general/index.ts +1 -1
- package/src/ui/md3/Md3Layout.vue +142 -0
- package/src/ui/md3/NavigationRailFabs.vue +89 -0
- package/src/ui/md3/index.ts +3 -0
- package/src/ui/md3/lang/en-US.ts +7 -0
- package/src/ui/md3/lang/index.ts +41 -0
- package/src/ui/md3/lang/nl.ts +7 -0
- package/vite.config.ts +4 -3
- package/dist/flags.js +0 -255
- package/dist/icons.js +0 -25
- package/dist/index-DnmJt2wP.js +0 -7921
- package/dist/nl-BL9hHEHL.js +0 -76
- package/dist/types/ui/general/QLanguageSelectBtn.vue.d.ts +0 -11
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { QList } from 'quasar';
|
|
2
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
3
1
|
declare var __VLS_6: {};
|
|
4
|
-
type __VLS_Slots =
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
5
3
|
default?: (props: typeof __VLS_6) => any;
|
|
6
|
-
}
|
|
7
|
-
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
8
|
-
QList: typeof QList;
|
|
9
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
};
|
|
10
5
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
6
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
7
|
export default _default;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { QuasarLanguage } from 'quasar';
|
|
2
|
-
import {
|
|
2
|
+
import type { Language as FormLanguage } from '../form/lang/index.js';
|
|
3
3
|
export interface Props {
|
|
4
|
-
modelValue:
|
|
5
|
-
languageImports: Record<
|
|
4
|
+
modelValue: keyof FormLanguage['countries'];
|
|
5
|
+
languageImports: Record<keyof FormLanguage['countries'], () => Promise<{
|
|
6
6
|
default: QuasarLanguage;
|
|
7
7
|
}>>;
|
|
8
|
-
|
|
8
|
+
locales: {
|
|
9
|
+
icon: string;
|
|
10
|
+
isoName: keyof FormLanguage['languages'];
|
|
11
|
+
}[];
|
|
9
12
|
}
|
|
10
13
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
export default _default;
|
|
@@ -6,11 +6,15 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
|
|
|
6
6
|
variables: import("vue").Ref<{}, {}>;
|
|
7
7
|
functions: import("vue").Ref<{}, {}>;
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
9
|
-
image?: (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
image?: (props: {}) => any;
|
|
10
|
+
} & {
|
|
11
|
+
title?: (props: {}) => any;
|
|
12
|
+
} & {
|
|
13
|
+
subtitle?: (props: {}) => any;
|
|
14
|
+
} & {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
actions?: (props: {}) => any;
|
|
14
18
|
}>;
|
|
15
19
|
export default _default;
|
|
16
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -5,7 +5,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
|
|
|
5
5
|
variables: import("vue").Ref<{}, {}>;
|
|
6
6
|
functions: import("vue").Ref<{}, {}>;
|
|
7
7
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
8
|
-
leftDrawerItems?: (
|
|
8
|
+
leftDrawerItems?: (props: {}) => any;
|
|
9
9
|
}>;
|
|
10
10
|
export default _default;
|
|
11
11
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -20,7 +20,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {},
|
|
|
20
20
|
color: string;
|
|
21
21
|
loading: boolean;
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
23
|
-
default?: (
|
|
23
|
+
default?: (props: {}) => any;
|
|
24
24
|
}>;
|
|
25
25
|
export default _default;
|
|
26
26
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -36,11 +36,15 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {},
|
|
|
36
36
|
topBarFab: boolean;
|
|
37
37
|
topBarShrink: boolean;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
39
|
-
default?: (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
default?: (props: {}) => any;
|
|
40
|
+
} & {
|
|
41
|
+
fab?: (props: {}) => any;
|
|
42
|
+
} & {
|
|
43
|
+
header?: (props: {}) => any;
|
|
44
|
+
} & {
|
|
45
|
+
'top-bar-buttons'?: (props: {}) => any;
|
|
46
|
+
} & {
|
|
47
|
+
'header-side'?: (props: {}) => any;
|
|
44
48
|
}>;
|
|
45
49
|
export default _default;
|
|
46
50
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -35,8 +35,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
|
|
|
35
35
|
};
|
|
36
36
|
buttonType: "submit" | "send";
|
|
37
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
38
|
-
title?: (
|
|
39
|
-
|
|
38
|
+
title?: (props: {}) => any;
|
|
39
|
+
} & {
|
|
40
|
+
default?: (props: {}) => any;
|
|
40
41
|
}>;
|
|
41
42
|
export default _default;
|
|
42
43
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -3,6 +3,5 @@ export { default as QStyledCard } from './QStyledCard.vue';
|
|
|
3
3
|
export { default as ResponsiveDialog } from './ResponsiveDialog.vue';
|
|
4
4
|
export { default as ResourcePage } from './ResourcePage.vue';
|
|
5
5
|
export { default as QLanguageSelect } from './QLanguageSelect.vue';
|
|
6
|
-
export { default as QLanguageSelectBtn } from './QLanguageSelectBtn.vue';
|
|
7
6
|
export { default as QDrawerList } from './QDrawerList.vue';
|
|
8
7
|
export { useLang, loadLang } from './lang/index.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
ready?: boolean;
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_22: {}, __VLS_44: {
|
|
5
|
+
showSticky: boolean;
|
|
6
|
+
}, __VLS_46: {}, __VLS_48: {}, __VLS_54: {}, __VLS_64: {
|
|
7
|
+
showSticky: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
'header-toolbar'?: (props: typeof __VLS_22) => any;
|
|
11
|
+
} & {
|
|
12
|
+
fabs?: (props: typeof __VLS_44) => any;
|
|
13
|
+
} & {
|
|
14
|
+
'drawer-mini-navigation'?: (props: typeof __VLS_46) => any;
|
|
15
|
+
} & {
|
|
16
|
+
drawer?: (props: typeof __VLS_48) => any;
|
|
17
|
+
} & {
|
|
18
|
+
footer?: (props: typeof __VLS_54) => any;
|
|
19
|
+
} & {
|
|
20
|
+
fabs?: (props: typeof __VLS_64) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
23
|
+
ready: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
type?: 'add' | 'edit';
|
|
3
|
+
showSticky?: boolean;
|
|
4
|
+
seekAttention?: boolean;
|
|
5
|
+
busEmits: {
|
|
6
|
+
add?: string;
|
|
7
|
+
edit?: string;
|
|
8
|
+
};
|
|
9
|
+
icons?: {
|
|
10
|
+
add: string;
|
|
11
|
+
edit: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Language {
|
|
2
|
+
isoName: string;
|
|
3
|
+
}
|
|
4
|
+
import type { Ref } from 'vue';
|
|
5
|
+
export declare const lang: Ref<{
|
|
6
|
+
isoName: string;
|
|
7
|
+
}, Language | {
|
|
8
|
+
isoName: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const defineLang: (lang: Language) => Language;
|
|
11
|
+
export declare const useLang: () => Ref<Language>;
|
|
12
|
+
export declare const loadLang: (isoName: string) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simsustech/quasar-components",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.12",
|
|
4
4
|
"author": "Stefan van Herwijnen",
|
|
5
5
|
"description": "High level components for Quasar Framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"import": "./dist/form.js",
|
|
33
33
|
"src": "./src/ui/form/index.ts"
|
|
34
34
|
},
|
|
35
|
+
"./md3": {
|
|
36
|
+
"types": "./dist/types/ui/md3/index.d.ts",
|
|
37
|
+
"import": "./dist/md3.js",
|
|
38
|
+
"src": "./src/ui/md3/index.ts"
|
|
39
|
+
},
|
|
35
40
|
"./css": {
|
|
36
41
|
"import": "./dist/quasar-components.css"
|
|
37
42
|
},
|
|
@@ -46,37 +51,39 @@
|
|
|
46
51
|
},
|
|
47
52
|
"bugs": "https://github.com/simsusech/quasar-components/issues",
|
|
48
53
|
"dependencies": {
|
|
54
|
+
"@vueuse/core": "^13.1.0",
|
|
49
55
|
"validator": "^13.15.0"
|
|
50
56
|
},
|
|
51
57
|
"peerDependencies": {
|
|
52
58
|
"quasar": "^2.18.1"
|
|
53
59
|
},
|
|
54
60
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"@types/
|
|
61
|
+
"@iconify-json/flagpack": "^1.2.2",
|
|
62
|
+
"@types/node": "^22.15.3",
|
|
63
|
+
"@types/validator": "^13.15.0",
|
|
57
64
|
"@types/ws": "^8.18.1",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
59
|
-
"@typescript-eslint/parser": "^8.
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^8.31.1",
|
|
66
|
+
"@typescript-eslint/parser": "^8.31.1",
|
|
60
67
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
61
68
|
"@vue/server-renderer": "^3.5.13",
|
|
62
|
-
"eslint": "^9.
|
|
63
|
-
"eslint-config-prettier": "^10.1.
|
|
69
|
+
"eslint": "^9.25.1",
|
|
70
|
+
"eslint-config-prettier": "^10.1.2",
|
|
64
71
|
"eslint-plugin-prettier": "^5.2.6",
|
|
65
72
|
"eslint-plugin-prettier-vue": "^5.0.0",
|
|
66
|
-
"eslint-plugin-vue": "^10.
|
|
67
|
-
"glob": "^11.0.
|
|
73
|
+
"eslint-plugin-vue": "^10.1.0",
|
|
74
|
+
"glob": "^11.0.2",
|
|
68
75
|
"local-pkg": "^1.1.1",
|
|
69
76
|
"prettier": "^3.5.3",
|
|
70
77
|
"quasar": "^2.18.1",
|
|
71
78
|
"rimraf": "^6.0.1",
|
|
72
79
|
"typescript": "5.8.3",
|
|
73
|
-
"typescript-eslint": "^8.
|
|
74
|
-
"unplugin-vue-components": "^28.
|
|
75
|
-
"vite": "^6.
|
|
80
|
+
"typescript-eslint": "^8.31.1",
|
|
81
|
+
"unplugin-vue-components": "^28.5.0",
|
|
82
|
+
"vite": "^6.3.4",
|
|
76
83
|
"vue": "^3.5.13",
|
|
77
84
|
"vue-eslint-parser": "^10.1.3",
|
|
78
|
-
"vue-router": "^4.5.
|
|
79
|
-
"vue-tsc": "^2.2.
|
|
85
|
+
"vue-router": "^4.5.1",
|
|
86
|
+
"vue-tsc": "^2.2.10"
|
|
80
87
|
},
|
|
81
88
|
"scripts": {
|
|
82
89
|
"build:plugin": "vite build",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-submit-button>
|
|
3
|
+
<slot name="icon" />
|
|
4
|
+
{{ lang.logout.logout }}
|
|
5
|
+
</q-submit-button>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default {
|
|
10
|
+
name: 'LogoutButton'
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { watch } from 'vue'
|
|
16
|
+
import { useQuasar } from 'quasar'
|
|
17
|
+
import { useLang, loadLang } from './lang/index.js'
|
|
18
|
+
import QSubmitButton from '../general/QSubmitButton.vue'
|
|
19
|
+
|
|
20
|
+
export interface Props {
|
|
21
|
+
withNetwork?: string
|
|
22
|
+
}
|
|
23
|
+
defineProps<Props>()
|
|
24
|
+
|
|
25
|
+
const $q = useQuasar()
|
|
26
|
+
const lang = useLang()
|
|
27
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
|
|
28
|
+
watch($q.lang, (val) => {
|
|
29
|
+
loadLang($q.lang.isoName)
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
{{ lang.logout.confirmation }}
|
|
3
|
+
<q-form
|
|
4
|
+
ref="formRef"
|
|
5
|
+
data-allow-mismatch="props"
|
|
6
|
+
class="q-gutter-md"
|
|
7
|
+
v-bind="form"
|
|
8
|
+
method="post"
|
|
9
|
+
:action="action"
|
|
10
|
+
>
|
|
11
|
+
<input type="hidden" name="xsrf" :value="xsrfSecret" />
|
|
12
|
+
<slot name="default" />
|
|
13
|
+
</q-form>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
export default {
|
|
18
|
+
name: 'LoginForm'
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { ref, watch } from 'vue'
|
|
24
|
+
import { useQuasar, QFormProps, QForm } from 'quasar'
|
|
25
|
+
import { useLang, loadLang } from './lang'
|
|
26
|
+
|
|
27
|
+
export interface Props {
|
|
28
|
+
form?: QFormProps & Partial<HTMLFormElement> & Partial<HTMLDivElement>
|
|
29
|
+
action: string
|
|
30
|
+
xsrfSecret: string
|
|
31
|
+
}
|
|
32
|
+
defineProps<Props>()
|
|
33
|
+
|
|
34
|
+
const $q = useQuasar()
|
|
35
|
+
const lang = useLang()
|
|
36
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
|
|
37
|
+
watch($q.lang, (val) => {
|
|
38
|
+
loadLang($q.lang.isoName)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const formRef = ref<QForm>()
|
|
42
|
+
|
|
43
|
+
const variables = ref({})
|
|
44
|
+
const functions = ref({})
|
|
45
|
+
defineExpose({
|
|
46
|
+
variables,
|
|
47
|
+
functions
|
|
48
|
+
})
|
|
49
|
+
</script>
|
|
@@ -11,4 +11,6 @@ export { default as ConsentList } from './ConsentList.vue'
|
|
|
11
11
|
export { default as UserMenuButton } from './UserMenuButton.vue'
|
|
12
12
|
export { default as LoginButton } from './LoginButton.vue'
|
|
13
13
|
export { default as AccountsTable } from './AccountsTable.vue'
|
|
14
|
+
export { default as LogoutForm } from './LogoutForm.vue'
|
|
15
|
+
export { default as LogoutButton } from './LogoutButton.vue'
|
|
14
16
|
export { useLang, loadLang } from './lang/index.js'
|
|
@@ -7,20 +7,26 @@
|
|
|
7
7
|
stack-label
|
|
8
8
|
>
|
|
9
9
|
<template #control>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
<div class="row">
|
|
11
|
+
<component
|
|
12
|
+
:is="QInput"
|
|
13
|
+
v-for="(part, index) in format.split('-')"
|
|
14
|
+
:key="part"
|
|
15
|
+
class="col-auto"
|
|
16
|
+
borderless
|
|
17
|
+
:filled="false"
|
|
18
|
+
:outlined="false"
|
|
19
|
+
:standout="false"
|
|
20
|
+
:rounded="false"
|
|
21
|
+
v-bind="dateProps[part]"
|
|
22
|
+
inputmode="numeric"
|
|
23
|
+
dense
|
|
24
|
+
>
|
|
25
|
+
<template #after>
|
|
26
|
+
<a v-if="index < 2" style="margin-top: 1em; width: 1ch">-</a>
|
|
27
|
+
</template>
|
|
28
|
+
</component>
|
|
29
|
+
</div>
|
|
24
30
|
</template>
|
|
25
31
|
|
|
26
32
|
<template #append>
|
|
@@ -52,6 +58,10 @@
|
|
|
52
58
|
</q-popup-proxy>
|
|
53
59
|
</q-icon>
|
|
54
60
|
</template>
|
|
61
|
+
|
|
62
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
63
|
+
<slot :name="slot" v-bind="scope || {}" />
|
|
64
|
+
</template>
|
|
55
65
|
</q-field>
|
|
56
66
|
</template>
|
|
57
67
|
|
|
@@ -195,12 +205,15 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
|
|
|
195
205
|
modelValue: year.value,
|
|
196
206
|
placeholder: lang.value.datePicker.YYYY,
|
|
197
207
|
style: {
|
|
198
|
-
width: format.value === 'YYYY-MM-DD' ? '8ch' : '
|
|
199
|
-
'margin-top': '-
|
|
200
|
-
'margin-bottom': '-0.5em'
|
|
208
|
+
'max-width': format.value === 'YYYY-MM-DD' ? '8ch' : '7ch',
|
|
209
|
+
'margin-top': '-1.75em',
|
|
210
|
+
'margin-bottom': '-0.5em',
|
|
211
|
+
background: 'transparent',
|
|
212
|
+
border: 0
|
|
201
213
|
},
|
|
202
214
|
// suffix: format.value === 'YYYY-MM-DD' ? '-' : undefined,
|
|
203
215
|
class: format.value !== 'YYYY-MM-DD' ? 'q-mb-none q-ml-none' : undefined,
|
|
216
|
+
inputClass: 'text-center',
|
|
204
217
|
'onUpdate:modelValue': setYear,
|
|
205
218
|
onKeydown: goToNextElement
|
|
206
219
|
},
|
|
@@ -208,12 +221,15 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
|
|
|
208
221
|
modelValue: month.value ? String(month.value).padStart(2, '0') : '',
|
|
209
222
|
placeholder: lang.value.datePicker.MM,
|
|
210
223
|
style: {
|
|
211
|
-
width: '
|
|
212
|
-
'margin-top': '-
|
|
213
|
-
'margin-bottom': '-0.5em'
|
|
224
|
+
'max-width': '7ch',
|
|
225
|
+
'margin-top': '-1.75em',
|
|
226
|
+
'margin-bottom': '-0.5em',
|
|
227
|
+
background: 'transparent',
|
|
228
|
+
border: 0
|
|
214
229
|
},
|
|
215
230
|
// suffix: '-',
|
|
216
231
|
class: 'q-ml-none',
|
|
232
|
+
inputClass: 'text-center',
|
|
217
233
|
'onUpdate:modelValue': setMonth,
|
|
218
234
|
onKeydown: goToNextElement
|
|
219
235
|
},
|
|
@@ -221,12 +237,15 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
|
|
|
221
237
|
modelValue: day.value ? String(day.value).padStart(2, '0') : '',
|
|
222
238
|
placeholder: lang.value.datePicker.DD,
|
|
223
239
|
style: {
|
|
224
|
-
width: format.value === 'DD-MM-YYYY' ? '
|
|
225
|
-
'margin-top': '-
|
|
226
|
-
'margin-bottom': '-0.5em'
|
|
240
|
+
'max-width': format.value === 'DD-MM-YYYY' ? '7ch' : '4ch',
|
|
241
|
+
'margin-top': '-1.75em',
|
|
242
|
+
'margin-bottom': '-0.5em',
|
|
243
|
+
background: 'transparent',
|
|
244
|
+
border: 0
|
|
227
245
|
},
|
|
228
246
|
// suffix: format.value === 'DD-MM-YYYY' ? '-' : undefined,
|
|
229
247
|
class: format.value === 'YYYY-MM-DD' ? 'q-ml-none' : undefined,
|
|
248
|
+
inputClass: 'text-center',
|
|
230
249
|
'onUpdate:modelValue': setDay,
|
|
231
250
|
onKeydown: goToNextElement
|
|
232
251
|
}
|
|
@@ -3,32 +3,27 @@
|
|
|
3
3
|
v-bind="attrs"
|
|
4
4
|
:options="languageOptions"
|
|
5
5
|
:model-value="modelValue"
|
|
6
|
-
:
|
|
6
|
+
:filled="false"
|
|
7
|
+
borderless
|
|
7
8
|
emit-value
|
|
8
9
|
map-options
|
|
9
10
|
>
|
|
10
|
-
<template #selected>
|
|
11
|
-
<div v-if="
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
<template #selected-item="scope">
|
|
12
|
+
<div v-if="scope.opt">
|
|
13
|
+
<q-item>
|
|
14
|
+
<q-item-section avatar>
|
|
15
|
+
<q-icon :name="scope.opt.icon" />
|
|
16
|
+
</q-item-section>
|
|
17
|
+
<q-item-section label>
|
|
18
|
+
{{ scope.opt.label }}
|
|
19
|
+
</q-item-section>
|
|
20
|
+
</q-item>
|
|
20
21
|
</div>
|
|
21
22
|
</template>
|
|
22
23
|
<template #option="scope">
|
|
23
24
|
<q-item v-bind="scope.itemProps">
|
|
24
25
|
<q-item-section avatar>
|
|
25
|
-
<
|
|
26
|
-
:is="
|
|
27
|
-
flags[
|
|
28
|
-
scope.opt.value.slice(-2).toLowerCase() as keyof typeof flags
|
|
29
|
-
]
|
|
30
|
-
"
|
|
31
|
-
/>
|
|
26
|
+
<q-icon :name="scope.opt.icon" />
|
|
32
27
|
</q-item-section>
|
|
33
28
|
<q-item-section>
|
|
34
29
|
<q-item-label>
|
|
@@ -41,39 +36,30 @@
|
|
|
41
36
|
</template>
|
|
42
37
|
|
|
43
38
|
<script setup lang="ts">
|
|
44
|
-
import { useAttrs, computed } from 'vue'
|
|
39
|
+
import { useAttrs, computed, toRefs } from 'vue'
|
|
45
40
|
import { QSelect } from 'quasar'
|
|
46
|
-
import
|
|
47
|
-
import { useLang as useFlagsLang } from '../flags/lang/index.js'
|
|
48
|
-
import { useLang } from './lang/index.js'
|
|
41
|
+
import { Language, useLang } from './lang/index.js'
|
|
49
42
|
|
|
50
43
|
export interface Props {
|
|
51
|
-
modelValue
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
modelValue: keyof Language['countries']
|
|
45
|
+
locales: {
|
|
46
|
+
icon: string
|
|
47
|
+
isoName: keyof Language['languages']
|
|
48
|
+
}[]
|
|
54
49
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
required,
|
|
58
|
-
allowedCodes = ['en-US', 'nl']
|
|
59
|
-
} = defineProps<Props>()
|
|
60
|
-
const attrs = useAttrs()
|
|
50
|
+
const props = defineProps<Props>()
|
|
51
|
+
const { modelValue, locales } = toRefs(props)
|
|
61
52
|
|
|
62
53
|
const lang = useLang()
|
|
63
|
-
const
|
|
54
|
+
const attrs = useAttrs()
|
|
64
55
|
|
|
65
56
|
const languageOptions = computed(() => {
|
|
66
|
-
const options =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
label: flagsLang.value.languages[lang],
|
|
73
|
-
value: lang
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
57
|
+
const options = locales.value.map((locale) => ({
|
|
58
|
+
label: lang.value.languages[locale.isoName],
|
|
59
|
+
value: locale.isoName,
|
|
60
|
+
icon: locale.icon
|
|
61
|
+
}))
|
|
62
|
+
|
|
77
63
|
return options
|
|
78
64
|
})
|
|
79
65
|
</script>
|