File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ import {
9595import type { Dayjs } from ' dayjs' ;
9696import type { ValidationRule } from ' quasar' ;
9797import { computed , ref , watch } from ' vue' ;
98+ import type { ComposerTranslation } from ' vue-i18n' ;
9899import type {
99100 AttributeFieldProps ,
100101 EntityAttributeFieldOutputs ,
@@ -125,7 +126,7 @@ const {
125126 upToDate,
126127 validateFromApi,
127128} = useQuasarFieldValidation (localI18nScope );
128- const globalT = getI18nInstance ().global .t ;
129+ const globalT = getI18nInstance ().global .t as ComposerTranslation ;
129130
130131const localValue = ref (props .entity [props .definition .name ] ?? null );
131132
@@ -156,8 +157,9 @@ watch(
156157);
157158
158159const mask = computed (() => {
159- const maskI18NKey = props .definition .inputSettings ?.maskI18NKey ;
160+ const maskI18NKey = props .definition .inputSettings ?.maskI18NKey as string ;
160161 if (getI18nInstance ().global .te (maskI18NKey )) {
162+ // @ts-expect-error - dynamic key, ComposerTranslation blows up type instantiation depth
161163 return globalT (maskI18NKey );
162164 }
163165 return props .definition .inputSettings ?.mask || QDATE_DEFAULT_MASK ;
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ import {
120120} from ' @linagora/linid-im-front-corelib' ;
121121import type { ValidationRule } from ' quasar' ;
122122import { computed , ref } from ' vue' ;
123+ import type { ComposerTranslation } from ' vue-i18n' ;
123124import type {
124125 DateFilterOperatorKey ,
125126 DateSearchFilterPanelProps ,
@@ -164,9 +165,10 @@ const isNegation = ref(false);
164165const selectedOperatorKey = ref <DateFilterOperatorKey >(' equals' );
165166
166167const computedMask = computed (() => {
167- const { te, t } = getI18nInstance ().global ;
168- if (props .maskI18NKey && te (props .maskI18NKey )) {
169- return t (props .maskI18NKey );
168+ const globalT = getI18nInstance ().global .t as ComposerTranslation ;
169+ const globalTe = getI18nInstance ().global .te ;
170+ if (props .maskI18NKey && globalTe (props .maskI18NKey )) {
171+ return globalT (props .maskI18NKey );
170172 }
171173 return props .mask ?? QDATE_DEFAULT_MASK ;
172174});
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import {
3535 useLinidZoneStore ,
3636} from '@linagora/linid-im-front-corelib' ;
3737import type { ModulePageOptions } from '../types/ModulePageOptions' ;
38+ import type { ComposerTranslation } from 'vue-i18n' ;
3839
3940/**
4041 * Remote module responsible for page integration.
@@ -75,7 +76,7 @@ class ModulePage extends BasicRemoteModule<ModulePageOptions> {
7576 ) : Promise < ModuleLifecycleResult > {
7677 const uiStore = useLinidUiStore ( ) ;
7778 const linidZoneStore = useLinidZoneStore ( ) ;
78- const { t } = getI18nInstance ( ) . global ;
79+ const t = getI18nInstance ( ) . global . t as ComposerTranslation ;
7980
8081 uiStore . addMainNavigationMenuItems ( {
8182 id : config . instanceId ,
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import {
3434 useLinidUiStore ,
3535} from '@linagora/linid-im-front-corelib' ;
3636import type { ModuleUsersOptions } from './types/moduleUsers' ;
37+ import type { ComposerTranslation } from 'vue-i18n' ;
3738
3839/**
3940 * Remote module responsible for user-related features.
@@ -71,7 +72,8 @@ class ModuleUsers extends BasicRemoteModule<ModuleUsersOptions> {
7172 config : ModuleHostConfig < ModuleUsersOptions >
7273 ) : Promise < ModuleLifecycleResult > {
7374 const uiStore = useLinidUiStore ( ) ;
74- const { t } = getI18nInstance ( ) . global ;
75+
76+ const t = getI18nInstance ( ) . global . t as ComposerTranslation ;
7577
7678 uiStore . addMainNavigationMenuItems ( {
7779 id : config . instanceId ,
You can’t perform that action at this time.
0 commit comments