@data-fair/lib-vuetify 1.6.6 → 1.7.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.
- package/index.js +3 -3
- package/package.json +1 -1
- package/personal-menu.vue +2 -31
- package/personal-menu.vue.d.ts +1 -13
- package/personal-menu.vue.js +23 -86
- package/theme-switcher.vue +64 -0
- package/theme-switcher.vue.d.ts +2 -0
- package/theme-switcher.vue.js +125 -0
package/index.js
CHANGED
|
@@ -23,10 +23,10 @@ export function vuetifySessionOptions (session) {
|
|
|
23
23
|
messages: { fr, en }
|
|
24
24
|
},
|
|
25
25
|
theme: {
|
|
26
|
-
defaultTheme: '
|
|
26
|
+
defaultTheme: 'site',
|
|
27
27
|
themes: {
|
|
28
|
-
|
|
29
|
-
dark:
|
|
28
|
+
site: {
|
|
29
|
+
dark: session.site.value?.dark,
|
|
30
30
|
colors,
|
|
31
31
|
variables: {
|
|
32
32
|
// deactivate automatic partial transparencies
|
package/package.json
CHANGED
package/personal-menu.vue
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<v-list
|
|
33
33
|
outlined
|
|
34
|
-
class="py-0"
|
|
34
|
+
class="py-0 border-sm"
|
|
35
35
|
>
|
|
36
36
|
<!-- current account, not actionable -->
|
|
37
37
|
<v-list-item
|
|
@@ -156,28 +156,6 @@
|
|
|
156
156
|
<v-list-item-title>{{ t('backToAdmin') }}</v-list-item-title>
|
|
157
157
|
</v-list-item>
|
|
158
158
|
|
|
159
|
-
<!-- switch dark mode -->
|
|
160
|
-
<v-list-item
|
|
161
|
-
v-if="darkModeSwitch"
|
|
162
|
-
density="compact"
|
|
163
|
-
class="personal-menu-switch-list-item"
|
|
164
|
-
>
|
|
165
|
-
<template #prepend>
|
|
166
|
-
<v-icon :icon="mdiWeatherNight" />
|
|
167
|
-
</template>
|
|
168
|
-
<v-list-item-title>
|
|
169
|
-
<v-switch
|
|
170
|
-
:input-value="session.state.dark"
|
|
171
|
-
hide-details
|
|
172
|
-
class="mt-0"
|
|
173
|
-
density="compact"
|
|
174
|
-
:label="t('darkMode')"
|
|
175
|
-
color="white"
|
|
176
|
-
@change="() => session.switchDark(!session.state.dark)"
|
|
177
|
-
/>
|
|
178
|
-
</v-list-item-title>
|
|
179
|
-
</v-list-item>
|
|
180
|
-
|
|
181
159
|
<!-- logout button -->
|
|
182
160
|
<v-divider />
|
|
183
161
|
<v-list-item
|
|
@@ -224,18 +202,11 @@ import { useI18n } from 'vue-i18n'
|
|
|
224
202
|
import { useSession } from '@data-fair/lib-vue/session.js'
|
|
225
203
|
import { useTheme } from 'vuetify'
|
|
226
204
|
import UserAvatar from './user-avatar.vue'
|
|
227
|
-
import { mdiAlert, mdiShieldAlert, mdiLogout, mdiAccountSwitchOutline
|
|
205
|
+
import { mdiAlert, mdiShieldAlert, mdiLogout, mdiAccountSwitchOutline } from '@mdi/js'
|
|
228
206
|
|
|
229
207
|
const theme = useTheme()
|
|
230
208
|
const session = useSession()
|
|
231
209
|
|
|
232
|
-
defineProps({
|
|
233
|
-
darkModeSwitch: {
|
|
234
|
-
type: Boolean,
|
|
235
|
-
default: false
|
|
236
|
-
}
|
|
237
|
-
})
|
|
238
|
-
|
|
239
210
|
const { t } = useI18n({ useScope: 'local' })
|
|
240
211
|
const { user, account } = toRefs(session.state)
|
|
241
212
|
const switchableOrganizations = computed(() => {
|
package/personal-menu.vue.d.ts
CHANGED
|
@@ -6,19 +6,7 @@ declare function __VLS_template(): {
|
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").
|
|
10
|
-
darkModeSwitch: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
darkModeSwitch: {
|
|
16
|
-
type: BooleanConstructor;
|
|
17
|
-
default: boolean;
|
|
18
|
-
};
|
|
19
|
-
}>> & Readonly<{}>, {
|
|
20
|
-
darkModeSwitch: boolean;
|
|
21
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
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>;
|
|
22
10
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
11
|
export default _default;
|
|
24
12
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/personal-menu.vue.js
CHANGED
|
@@ -4,16 +4,10 @@ import { useI18n } from 'vue-i18n';
|
|
|
4
4
|
import { useSession } from '@data-fair/lib-vue/session.js';
|
|
5
5
|
import { useTheme } from 'vuetify';
|
|
6
6
|
import UserAvatar from './user-avatar.vue';
|
|
7
|
-
import { mdiAlert, mdiShieldAlert, mdiLogout, mdiAccountSwitchOutline
|
|
7
|
+
import { mdiAlert, mdiShieldAlert, mdiLogout, mdiAccountSwitchOutline } from '@mdi/js';
|
|
8
8
|
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
const session = useSession();
|
|
11
|
-
const __VLS_props = defineProps({
|
|
12
|
-
darkModeSwitch: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
11
|
const { t } = useI18n({ useScope: 'local' });
|
|
18
12
|
const { user, account } = toRefs(session.state);
|
|
19
13
|
const switchableOrganizations = computed(() => {
|
|
@@ -22,14 +16,7 @@ const switchableOrganizations = computed(() => {
|
|
|
22
16
|
return;
|
|
23
17
|
return user.organizations.filter(o => account.type === 'user' || account.id !== o.id || (account.department || null) !== (o.department || null));
|
|
24
18
|
});
|
|
25
|
-
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
26
|
-
props: {
|
|
27
|
-
darkModeSwitch: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
});
|
|
19
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({});
|
|
33
20
|
;
|
|
34
21
|
let __VLS_functionalComponentProps;
|
|
35
22
|
function __VLS_template() {
|
|
@@ -95,8 +82,8 @@ function __VLS_template() {
|
|
|
95
82
|
const __VLS_35 = __VLS_resolvedLocalAndGlobalComponents.VList;
|
|
96
83
|
/** @type { [typeof __VLS_components.VList, typeof __VLS_components.vList, typeof __VLS_components.VList, typeof __VLS_components.vList, ] } */
|
|
97
84
|
// @ts-ignore
|
|
98
|
-
const __VLS_36 = __VLS_asFunctionalComponent(__VLS_35, new __VLS_35({ outlined: (true), ...{ class: ("py-0") }, }));
|
|
99
|
-
const __VLS_37 = __VLS_36({ outlined: (true), ...{ class: ("py-0") }, }, ...__VLS_functionalComponentArgsRest(__VLS_36));
|
|
85
|
+
const __VLS_36 = __VLS_asFunctionalComponent(__VLS_35, new __VLS_35({ outlined: (true), ...{ class: ("py-0 border-sm") }, }));
|
|
86
|
+
const __VLS_37 = __VLS_36({ outlined: (true), ...{ class: ("py-0 border-sm") }, }, ...__VLS_functionalComponentArgsRest(__VLS_36));
|
|
100
87
|
const __VLS_41 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
|
|
101
88
|
/** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
|
|
102
89
|
// @ts-ignore
|
|
@@ -346,74 +333,38 @@ function __VLS_template() {
|
|
|
346
333
|
const __VLS_194 = __VLS_pickFunctionalComponentCtx(__VLS_189, __VLS_191);
|
|
347
334
|
const __VLS_180 = __VLS_pickFunctionalComponentCtx(__VLS_175, __VLS_177);
|
|
348
335
|
}
|
|
349
|
-
|
|
350
|
-
const __VLS_195 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
|
|
351
|
-
/** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
|
|
352
|
-
// @ts-ignore
|
|
353
|
-
const __VLS_196 = __VLS_asFunctionalComponent(__VLS_195, new __VLS_195({ density: ("compact"), ...{ class: ("personal-menu-switch-list-item") }, }));
|
|
354
|
-
const __VLS_197 = __VLS_196({ density: ("compact"), ...{ class: ("personal-menu-switch-list-item") }, }, ...__VLS_functionalComponentArgsRest(__VLS_196));
|
|
355
|
-
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
356
|
-
{
|
|
357
|
-
const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_200.slots);
|
|
358
|
-
const __VLS_201 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
|
|
359
|
-
/** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
|
|
360
|
-
// @ts-ignore
|
|
361
|
-
const __VLS_202 = __VLS_asFunctionalComponent(__VLS_201, new __VLS_201({ icon: ((__VLS_ctx.mdiWeatherNight)), }));
|
|
362
|
-
const __VLS_203 = __VLS_202({ icon: ((__VLS_ctx.mdiWeatherNight)), }, ...__VLS_functionalComponentArgsRest(__VLS_202));
|
|
363
|
-
}
|
|
364
|
-
const __VLS_207 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
|
|
365
|
-
/** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
|
|
366
|
-
// @ts-ignore
|
|
367
|
-
const __VLS_208 = __VLS_asFunctionalComponent(__VLS_207, new __VLS_207({}));
|
|
368
|
-
const __VLS_209 = __VLS_208({}, ...__VLS_functionalComponentArgsRest(__VLS_208));
|
|
369
|
-
const __VLS_213 = __VLS_resolvedLocalAndGlobalComponents.VSwitch;
|
|
370
|
-
/** @type { [typeof __VLS_components.VSwitch, typeof __VLS_components.vSwitch, ] } */
|
|
371
|
-
// @ts-ignore
|
|
372
|
-
const __VLS_214 = __VLS_asFunctionalComponent(__VLS_213, new __VLS_213({ ...{ 'onChange': {} }, inputValue: ((__VLS_ctx.session.state.dark)), hideDetails: (true), ...{ class: ("mt-0") }, density: ("compact"), label: ((__VLS_ctx.t('darkMode'))), color: ("white"), }));
|
|
373
|
-
const __VLS_215 = __VLS_214({ ...{ 'onChange': {} }, inputValue: ((__VLS_ctx.session.state.dark)), hideDetails: (true), ...{ class: ("mt-0") }, density: ("compact"), label: ((__VLS_ctx.t('darkMode'))), color: ("white"), }, ...__VLS_functionalComponentArgsRest(__VLS_214));
|
|
374
|
-
let __VLS_219;
|
|
375
|
-
const __VLS_220 = {
|
|
376
|
-
onChange: (() => __VLS_ctx.session.switchDark(!__VLS_ctx.session.state.dark))
|
|
377
|
-
};
|
|
378
|
-
let __VLS_216;
|
|
379
|
-
let __VLS_217;
|
|
380
|
-
const __VLS_218 = __VLS_pickFunctionalComponentCtx(__VLS_213, __VLS_215);
|
|
381
|
-
__VLS_nonNullable(__VLS_212.slots).default;
|
|
382
|
-
const __VLS_212 = __VLS_pickFunctionalComponentCtx(__VLS_207, __VLS_209);
|
|
383
|
-
const __VLS_200 = __VLS_pickFunctionalComponentCtx(__VLS_195, __VLS_197);
|
|
384
|
-
}
|
|
385
|
-
const __VLS_221 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
|
|
336
|
+
const __VLS_195 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
|
|
386
337
|
/** @type { [typeof __VLS_components.VDivider, typeof __VLS_components.vDivider, ] } */
|
|
387
338
|
// @ts-ignore
|
|
388
|
-
const
|
|
389
|
-
const
|
|
390
|
-
const
|
|
339
|
+
const __VLS_196 = __VLS_asFunctionalComponent(__VLS_195, new __VLS_195({}));
|
|
340
|
+
const __VLS_197 = __VLS_196({}, ...__VLS_functionalComponentArgsRest(__VLS_196));
|
|
341
|
+
const __VLS_201 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
|
|
391
342
|
/** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
|
|
392
343
|
// @ts-ignore
|
|
393
|
-
const
|
|
394
|
-
const
|
|
395
|
-
let
|
|
396
|
-
const
|
|
344
|
+
const __VLS_202 = __VLS_asFunctionalComponent(__VLS_201, new __VLS_201({ ...{ 'onClick': {} }, }));
|
|
345
|
+
const __VLS_203 = __VLS_202({ ...{ 'onClick': {} }, }, ...__VLS_functionalComponentArgsRest(__VLS_202));
|
|
346
|
+
let __VLS_207;
|
|
347
|
+
const __VLS_208 = {
|
|
397
348
|
onClick: (() => __VLS_ctx.session.logout())
|
|
398
349
|
};
|
|
399
|
-
let
|
|
400
|
-
let
|
|
350
|
+
let __VLS_204;
|
|
351
|
+
let __VLS_205;
|
|
401
352
|
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
402
353
|
{
|
|
403
|
-
const { prepend: __VLS_thisSlot } = __VLS_nonNullable(
|
|
404
|
-
const
|
|
354
|
+
const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_206.slots);
|
|
355
|
+
const __VLS_209 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
|
|
405
356
|
/** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
|
|
406
357
|
// @ts-ignore
|
|
407
|
-
const
|
|
408
|
-
const
|
|
358
|
+
const __VLS_210 = __VLS_asFunctionalComponent(__VLS_209, new __VLS_209({ icon: ((__VLS_ctx.mdiLogout)), }));
|
|
359
|
+
const __VLS_211 = __VLS_210({ icon: ((__VLS_ctx.mdiLogout)), }, ...__VLS_functionalComponentArgsRest(__VLS_210));
|
|
409
360
|
}
|
|
410
|
-
const
|
|
361
|
+
const __VLS_215 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
|
|
411
362
|
/** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
|
|
412
363
|
// @ts-ignore
|
|
413
|
-
const
|
|
414
|
-
const
|
|
364
|
+
const __VLS_216 = __VLS_asFunctionalComponent(__VLS_215, new __VLS_215({}));
|
|
365
|
+
const __VLS_217 = __VLS_216({}, ...__VLS_functionalComponentArgsRest(__VLS_216));
|
|
415
366
|
__VLS_directiveAsFunction(__VLS_directives.vT)(null, { ...__VLS_directiveBindingRestFields, value: ('logout') }, null, null);
|
|
416
|
-
const
|
|
367
|
+
const __VLS_206 = __VLS_pickFunctionalComponentCtx(__VLS_201, __VLS_203);
|
|
417
368
|
__VLS_nonNullable(__VLS_40.slots).default;
|
|
418
369
|
const __VLS_40 = __VLS_pickFunctionalComponentCtx(__VLS_35, __VLS_37);
|
|
419
370
|
const __VLS_17 = __VLS_pickFunctionalComponentCtx(__VLS_12, __VLS_14);
|
|
@@ -423,14 +374,13 @@ function __VLS_template() {
|
|
|
423
374
|
__VLS_styleScopedClasses['personal-menu'];
|
|
424
375
|
__VLS_styleScopedClasses['px-0'];
|
|
425
376
|
__VLS_styleScopedClasses['py-0'];
|
|
377
|
+
__VLS_styleScopedClasses['border-sm'];
|
|
426
378
|
__VLS_styleScopedClasses['text--secondary'];
|
|
427
379
|
__VLS_styleScopedClasses['justify-center'];
|
|
428
380
|
__VLS_styleScopedClasses['ma-0'];
|
|
429
381
|
__VLS_styleScopedClasses['mb-2'];
|
|
430
382
|
__VLS_styleScopedClasses['personal-menu-switch-list-item'];
|
|
431
383
|
__VLS_styleScopedClasses['mt-0'];
|
|
432
|
-
__VLS_styleScopedClasses['personal-menu-switch-list-item'];
|
|
433
|
-
__VLS_styleScopedClasses['mt-0'];
|
|
434
384
|
var __VLS_slots;
|
|
435
385
|
var __VLS_inheritedAttrs;
|
|
436
386
|
const __VLS_refs = {};
|
|
@@ -450,7 +400,6 @@ const __VLS_self = (await import('vue')).defineComponent({
|
|
|
450
400
|
mdiShieldAlert: mdiShieldAlert,
|
|
451
401
|
mdiLogout: mdiLogout,
|
|
452
402
|
mdiAccountSwitchOutline: mdiAccountSwitchOutline,
|
|
453
|
-
mdiWeatherNight: mdiWeatherNight,
|
|
454
403
|
theme: theme,
|
|
455
404
|
session: session,
|
|
456
405
|
t: t,
|
|
@@ -459,23 +408,11 @@ const __VLS_self = (await import('vue')).defineComponent({
|
|
|
459
408
|
switchableOrganizations: switchableOrganizations,
|
|
460
409
|
};
|
|
461
410
|
},
|
|
462
|
-
props: {
|
|
463
|
-
darkModeSwitch: {
|
|
464
|
-
type: Boolean,
|
|
465
|
-
default: false
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
411
|
});
|
|
469
412
|
const __VLS_component = (await import('vue')).defineComponent({
|
|
470
413
|
setup() {
|
|
471
414
|
return {};
|
|
472
415
|
},
|
|
473
|
-
props: {
|
|
474
|
-
darkModeSwitch: {
|
|
475
|
-
type: Boolean,
|
|
476
|
-
default: false
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
416
|
});
|
|
480
417
|
export default {};
|
|
481
418
|
;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-toolbar-items class="theme-switcher" v-if="session.fullSite.value?.theme.dark || session.fullSite.value?.theme.hc">
|
|
3
|
+
<v-menu
|
|
4
|
+
offset-y
|
|
5
|
+
nudge-left
|
|
6
|
+
>
|
|
7
|
+
<template #activator="{props: activatorProps}">
|
|
8
|
+
<v-btn
|
|
9
|
+
class="px-0"
|
|
10
|
+
:icon="mdiThemeLightDark"
|
|
11
|
+
:title="t('themeSwitch')"
|
|
12
|
+
v-bind="activatorProps"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<v-list class="border-sm">
|
|
17
|
+
<v-list-item density="compact" class="pl-0">
|
|
18
|
+
<v-radio-group
|
|
19
|
+
:model-value="session.theme.value"
|
|
20
|
+
density="comfortable"
|
|
21
|
+
color="primary"
|
|
22
|
+
hide-details
|
|
23
|
+
:label="t('themeSwitch')"
|
|
24
|
+
@update:modelValue="value => session.switchTheme(value as 'default' | 'dark' | 'hc')"
|
|
25
|
+
>
|
|
26
|
+
<v-radio :label="t('theme.default')" value="default"></v-radio>
|
|
27
|
+
<v-radio :label="t('theme.dark')" value="dark"></v-radio>
|
|
28
|
+
<v-radio :label="t('theme.hc')" value="hc"></v-radio>
|
|
29
|
+
</v-radio-group>
|
|
30
|
+
</v-list-item>
|
|
31
|
+
</v-list>
|
|
32
|
+
</v-menu>
|
|
33
|
+
</v-toolbar-items>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<i18n lang="yaml">
|
|
37
|
+
fr:
|
|
38
|
+
themeSwitch: Changer de thème
|
|
39
|
+
theme:
|
|
40
|
+
default: par défaut
|
|
41
|
+
dark: sombre
|
|
42
|
+
hc: contraste élevé
|
|
43
|
+
en:
|
|
44
|
+
themeSwitch: Change theme
|
|
45
|
+
theme:
|
|
46
|
+
default: default
|
|
47
|
+
dark: dark
|
|
48
|
+
hc: high contrast
|
|
49
|
+
</i18n>
|
|
50
|
+
|
|
51
|
+
<script setup lang="ts">
|
|
52
|
+
import { useSession } from '@data-fair/lib-vue/session.js'
|
|
53
|
+
import { useI18n } from 'vue-i18n'
|
|
54
|
+
import { mdiThemeLightDark } from '@mdi/js'
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const session = useSession()
|
|
58
|
+
|
|
59
|
+
const { t } = useI18n({ useScope: 'local' })
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
|
|
2
|
+
import { useSession } from '@data-fair/lib-vue/session.js';
|
|
3
|
+
import { useI18n } from 'vue-i18n';
|
|
4
|
+
import { mdiThemeLightDark } from '@mdi/js';
|
|
5
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
|
6
|
+
const session = useSession();
|
|
7
|
+
const { t } = useI18n({ useScope: 'local' });
|
|
8
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({});
|
|
9
|
+
;
|
|
10
|
+
let __VLS_functionalComponentProps;
|
|
11
|
+
function __VLS_template() {
|
|
12
|
+
const __VLS_ctx = {};
|
|
13
|
+
const __VLS_localComponents = {
|
|
14
|
+
...{},
|
|
15
|
+
...{},
|
|
16
|
+
...__VLS_ctx,
|
|
17
|
+
};
|
|
18
|
+
let __VLS_components;
|
|
19
|
+
const __VLS_localDirectives = {
|
|
20
|
+
...{},
|
|
21
|
+
...__VLS_ctx,
|
|
22
|
+
};
|
|
23
|
+
let __VLS_directives;
|
|
24
|
+
let __VLS_styleScopedClasses;
|
|
25
|
+
// CSS variable injection
|
|
26
|
+
// CSS variable injection end
|
|
27
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
|
28
|
+
if (__VLS_ctx.session.fullSite.value?.theme.dark || __VLS_ctx.session.fullSite.value?.theme.hc) {
|
|
29
|
+
const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VToolbarItems;
|
|
30
|
+
/** @type { [typeof __VLS_components.VToolbarItems, typeof __VLS_components.vToolbarItems, typeof __VLS_components.VToolbarItems, typeof __VLS_components.vToolbarItems, ] } */
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ...{ class: ("theme-switcher") }, }));
|
|
33
|
+
const __VLS_2 = __VLS_1({ ...{ class: ("theme-switcher") }, }, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
34
|
+
const __VLS_6 = __VLS_resolvedLocalAndGlobalComponents.VMenu;
|
|
35
|
+
/** @type { [typeof __VLS_components.VMenu, typeof __VLS_components.vMenu, typeof __VLS_components.VMenu, typeof __VLS_components.vMenu, ] } */
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({ offsetY: (true), nudgeLeft: (true), }));
|
|
38
|
+
const __VLS_8 = __VLS_7({ offsetY: (true), nudgeLeft: (true), }, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
39
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
40
|
+
{
|
|
41
|
+
const { activator: __VLS_thisSlot } = __VLS_nonNullable(__VLS_11.slots);
|
|
42
|
+
const { props: activatorProps } = __VLS_getSlotParam(__VLS_thisSlot);
|
|
43
|
+
const __VLS_12 = __VLS_resolvedLocalAndGlobalComponents.VBtn;
|
|
44
|
+
/** @type { [typeof __VLS_components.VBtn, typeof __VLS_components.vBtn, ] } */
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
const __VLS_13 = __VLS_asFunctionalComponent(__VLS_12, new __VLS_12({ ...{ class: ("px-0") }, icon: ((__VLS_ctx.mdiThemeLightDark)), title: ((__VLS_ctx.t('themeSwitch'))), ...(activatorProps), }));
|
|
47
|
+
const __VLS_14 = __VLS_13({ ...{ class: ("px-0") }, icon: ((__VLS_ctx.mdiThemeLightDark)), title: ((__VLS_ctx.t('themeSwitch'))), ...(activatorProps), }, ...__VLS_functionalComponentArgsRest(__VLS_13));
|
|
48
|
+
}
|
|
49
|
+
const __VLS_18 = __VLS_resolvedLocalAndGlobalComponents.VList;
|
|
50
|
+
/** @type { [typeof __VLS_components.VList, typeof __VLS_components.vList, typeof __VLS_components.VList, typeof __VLS_components.vList, ] } */
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
const __VLS_19 = __VLS_asFunctionalComponent(__VLS_18, new __VLS_18({ ...{ class: ("border-sm") }, }));
|
|
53
|
+
const __VLS_20 = __VLS_19({ ...{ class: ("border-sm") }, }, ...__VLS_functionalComponentArgsRest(__VLS_19));
|
|
54
|
+
const __VLS_24 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
|
|
55
|
+
/** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
const __VLS_25 = __VLS_asFunctionalComponent(__VLS_24, new __VLS_24({ density: ("compact"), ...{ class: ("pl-0") }, }));
|
|
58
|
+
const __VLS_26 = __VLS_25({ density: ("compact"), ...{ class: ("pl-0") }, }, ...__VLS_functionalComponentArgsRest(__VLS_25));
|
|
59
|
+
const __VLS_30 = __VLS_resolvedLocalAndGlobalComponents.VRadioGroup;
|
|
60
|
+
/** @type { [typeof __VLS_components.VRadioGroup, typeof __VLS_components.vRadioGroup, typeof __VLS_components.VRadioGroup, typeof __VLS_components.vRadioGroup, ] } */
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
const __VLS_31 = __VLS_asFunctionalComponent(__VLS_30, new __VLS_30({ ...{ 'onUpdate:modelValue': {} }, modelValue: ((__VLS_ctx.session.theme.value)), density: ("comfortable"), color: ("primary"), hideDetails: (true), label: ((__VLS_ctx.t('themeSwitch'))), }));
|
|
63
|
+
const __VLS_32 = __VLS_31({ ...{ 'onUpdate:modelValue': {} }, modelValue: ((__VLS_ctx.session.theme.value)), density: ("comfortable"), color: ("primary"), hideDetails: (true), label: ((__VLS_ctx.t('themeSwitch'))), }, ...__VLS_functionalComponentArgsRest(__VLS_31));
|
|
64
|
+
let __VLS_36;
|
|
65
|
+
const __VLS_37 = {
|
|
66
|
+
'onUpdate:modelValue': (value => __VLS_ctx.session.switchTheme(value))
|
|
67
|
+
};
|
|
68
|
+
let __VLS_33;
|
|
69
|
+
let __VLS_34;
|
|
70
|
+
const __VLS_38 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
|
|
71
|
+
/** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
|
|
72
|
+
// @ts-ignore
|
|
73
|
+
const __VLS_39 = __VLS_asFunctionalComponent(__VLS_38, new __VLS_38({ label: ((__VLS_ctx.t('theme.default'))), value: ("default"), }));
|
|
74
|
+
const __VLS_40 = __VLS_39({ label: ((__VLS_ctx.t('theme.default'))), value: ("default"), }, ...__VLS_functionalComponentArgsRest(__VLS_39));
|
|
75
|
+
const __VLS_44 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
|
|
76
|
+
/** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
const __VLS_45 = __VLS_asFunctionalComponent(__VLS_44, new __VLS_44({ label: ((__VLS_ctx.t('theme.dark'))), value: ("dark"), }));
|
|
79
|
+
const __VLS_46 = __VLS_45({ label: ((__VLS_ctx.t('theme.dark'))), value: ("dark"), }, ...__VLS_functionalComponentArgsRest(__VLS_45));
|
|
80
|
+
const __VLS_50 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
|
|
81
|
+
/** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
const __VLS_51 = __VLS_asFunctionalComponent(__VLS_50, new __VLS_50({ label: ((__VLS_ctx.t('theme.hc'))), value: ("hc"), }));
|
|
84
|
+
const __VLS_52 = __VLS_51({ label: ((__VLS_ctx.t('theme.hc'))), value: ("hc"), }, ...__VLS_functionalComponentArgsRest(__VLS_51));
|
|
85
|
+
__VLS_nonNullable(__VLS_35.slots).default;
|
|
86
|
+
const __VLS_35 = __VLS_pickFunctionalComponentCtx(__VLS_30, __VLS_32);
|
|
87
|
+
__VLS_nonNullable(__VLS_29.slots).default;
|
|
88
|
+
const __VLS_29 = __VLS_pickFunctionalComponentCtx(__VLS_24, __VLS_26);
|
|
89
|
+
__VLS_nonNullable(__VLS_23.slots).default;
|
|
90
|
+
const __VLS_23 = __VLS_pickFunctionalComponentCtx(__VLS_18, __VLS_20);
|
|
91
|
+
const __VLS_11 = __VLS_pickFunctionalComponentCtx(__VLS_6, __VLS_8);
|
|
92
|
+
__VLS_nonNullable(__VLS_5.slots).default;
|
|
93
|
+
const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
|
|
94
|
+
}
|
|
95
|
+
__VLS_styleScopedClasses['theme-switcher'];
|
|
96
|
+
__VLS_styleScopedClasses['px-0'];
|
|
97
|
+
__VLS_styleScopedClasses['border-sm'];
|
|
98
|
+
__VLS_styleScopedClasses['pl-0'];
|
|
99
|
+
var __VLS_slots;
|
|
100
|
+
var __VLS_inheritedAttrs;
|
|
101
|
+
const __VLS_refs = {};
|
|
102
|
+
var $refs;
|
|
103
|
+
return {
|
|
104
|
+
slots: __VLS_slots,
|
|
105
|
+
refs: $refs,
|
|
106
|
+
attrs: {},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
;
|
|
110
|
+
const __VLS_self = (await import('vue')).defineComponent({
|
|
111
|
+
setup() {
|
|
112
|
+
return {
|
|
113
|
+
mdiThemeLightDark: mdiThemeLightDark,
|
|
114
|
+
session: session,
|
|
115
|
+
t: t,
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
export default (await import('vue')).defineComponent({
|
|
120
|
+
setup() {
|
|
121
|
+
return {};
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
;
|
|
125
|
+
//# sourceMappingURL=theme-switcher.vue.js.map
|