@serhii.olishevskyi/docs 1.2.1 → 1.2.2
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/dist/{UserPopoverComponent-FZF757NQ.mjs → UserPopoverComponent-K7CJNYYL.mjs} +1 -1
- package/dist/{chunk-FYNGJLO7.mjs → chunk-FRDK4RQX.mjs} +21 -0
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +25 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
|
@@ -182,8 +182,28 @@ _SupabaseCacheBackend.type = "backend";
|
|
|
182
182
|
_SupabaseCacheBackend.manifest = {};
|
|
183
183
|
_SupabaseCacheBackend.isManifestLoaded = false;
|
|
184
184
|
var SupabaseCacheBackend = _SupabaseCacheBackend;
|
|
185
|
+
var customCacheBackend_default = SupabaseCacheBackend;
|
|
185
186
|
|
|
186
187
|
// src/i18n/config.ts
|
|
188
|
+
var initI18n = ({
|
|
189
|
+
supabase,
|
|
190
|
+
defaultLang = "uk",
|
|
191
|
+
fallbackLang = "en",
|
|
192
|
+
namespaces = ["common", "landing", "auth-widget", "form_components"]
|
|
193
|
+
}) => {
|
|
194
|
+
if (!i18n.isInitialized) {
|
|
195
|
+
i18n.use(new customCacheBackend_default(supabase)).use(initReactI18next).init({
|
|
196
|
+
lng: defaultLang,
|
|
197
|
+
fallbackLng: fallbackLang,
|
|
198
|
+
ns: namespaces,
|
|
199
|
+
defaultNS: "common",
|
|
200
|
+
keySeparator: false,
|
|
201
|
+
nsSeparator: ":",
|
|
202
|
+
interpolation: { escapeValue: false }
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return i18n;
|
|
206
|
+
};
|
|
187
207
|
var config_default = i18n;
|
|
188
208
|
|
|
189
209
|
// src/context/AuthProvider.tsx
|
|
@@ -2546,6 +2566,7 @@ var UserPopoverComponent = ({
|
|
|
2546
2566
|
var UserPopoverComponent_default = UserPopoverComponent;
|
|
2547
2567
|
|
|
2548
2568
|
export {
|
|
2569
|
+
initI18n,
|
|
2549
2570
|
getDeviceId,
|
|
2550
2571
|
fetchCompanySessions,
|
|
2551
2572
|
trackUserSession,
|
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import React__default, { ReactNode } from 'react';
|
|
|
3
3
|
import { TextFieldProps, SelectProps, SelectChangeEvent, IconButtonProps, TooltipProps, SxProps, Theme, TypographyProps } from '@mui/material';
|
|
4
4
|
import * as _supabase_supabase_js from '@supabase/supabase-js';
|
|
5
5
|
import { SupabaseClient, User, Session } from '@supabase/supabase-js';
|
|
6
|
+
import * as i18next from 'i18next';
|
|
6
7
|
|
|
7
8
|
interface UrlValue {
|
|
8
9
|
url: string;
|
|
@@ -496,6 +497,17 @@ declare const LocalizationProvider: React__default.FC<{
|
|
|
496
497
|
}>;
|
|
497
498
|
declare const useLocalization: () => LocalizationContextType;
|
|
498
499
|
|
|
500
|
+
interface I18nInitOptions {
|
|
501
|
+
supabase: SupabaseClient;
|
|
502
|
+
defaultLang?: string;
|
|
503
|
+
fallbackLang?: string;
|
|
504
|
+
namespaces?: string[];
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Инициализирует и возвращает экземпляр i18n с динамически переданным клиентом Supabase
|
|
508
|
+
*/
|
|
509
|
+
declare const initI18n: ({ supabase, defaultLang, fallbackLang, namespaces, }: I18nInitOptions) => i18next.i18n;
|
|
510
|
+
|
|
499
511
|
interface DisplayState {
|
|
500
512
|
isMobile: boolean;
|
|
501
513
|
isTablet: boolean;
|
|
@@ -655,4 +667,4 @@ declare const Hooks: {
|
|
|
655
667
|
};
|
|
656
668
|
};
|
|
657
669
|
|
|
658
|
-
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps, type ExpandableNoteComponentProps, type FullCompanyMemberItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, type MyAvatarComponentProps, type NumberInputComponentProps, Providers, type SaveCompanyUserPayload, type SearchComponentProps, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps, type UserGroupedSessions, type UserPopoverComponentProps, type UserProfile, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, type UserStatusChipComponentProps, type UserStatusType, defaultUserSettings, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
|
670
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps, type ExpandableNoteComponentProps, type FullCompanyMemberItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, type MyAvatarComponentProps, type NumberInputComponentProps, Providers, type SaveCompanyUserPayload, type SearchComponentProps, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps, type UserGroupedSessions, type UserPopoverComponentProps, type UserProfile, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, type UserStatusChipComponentProps, type UserStatusType, defaultUserSettings, initI18n, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import React__default, { ReactNode } from 'react';
|
|
|
3
3
|
import { TextFieldProps, SelectProps, SelectChangeEvent, IconButtonProps, TooltipProps, SxProps, Theme, TypographyProps } from '@mui/material';
|
|
4
4
|
import * as _supabase_supabase_js from '@supabase/supabase-js';
|
|
5
5
|
import { SupabaseClient, User, Session } from '@supabase/supabase-js';
|
|
6
|
+
import * as i18next from 'i18next';
|
|
6
7
|
|
|
7
8
|
interface UrlValue {
|
|
8
9
|
url: string;
|
|
@@ -496,6 +497,17 @@ declare const LocalizationProvider: React__default.FC<{
|
|
|
496
497
|
}>;
|
|
497
498
|
declare const useLocalization: () => LocalizationContextType;
|
|
498
499
|
|
|
500
|
+
interface I18nInitOptions {
|
|
501
|
+
supabase: SupabaseClient;
|
|
502
|
+
defaultLang?: string;
|
|
503
|
+
fallbackLang?: string;
|
|
504
|
+
namespaces?: string[];
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Инициализирует и возвращает экземпляр i18n с динамически переданным клиентом Supabase
|
|
508
|
+
*/
|
|
509
|
+
declare const initI18n: ({ supabase, defaultLang, fallbackLang, namespaces, }: I18nInitOptions) => i18next.i18n;
|
|
510
|
+
|
|
499
511
|
interface DisplayState {
|
|
500
512
|
isMobile: boolean;
|
|
501
513
|
isTablet: boolean;
|
|
@@ -655,4 +667,4 @@ declare const Hooks: {
|
|
|
655
667
|
};
|
|
656
668
|
};
|
|
657
669
|
|
|
658
|
-
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps, type ExpandableNoteComponentProps, type FullCompanyMemberItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, type MyAvatarComponentProps, type NumberInputComponentProps, Providers, type SaveCompanyUserPayload, type SearchComponentProps, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps, type UserGroupedSessions, type UserPopoverComponentProps, type UserProfile, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, type UserStatusChipComponentProps, type UserStatusType, defaultUserSettings, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
|
670
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps, type ExpandableNoteComponentProps, type FullCompanyMemberItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, type MyAvatarComponentProps, type NumberInputComponentProps, Providers, type SaveCompanyUserPayload, type SearchComponentProps, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps, type UserGroupedSessions, type UserPopoverComponentProps, type UserProfile, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, type UserStatusChipComponentProps, type UserStatusType, defaultUserSettings, initI18n, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
33
|
// src/i18n/customCacheBackend.ts
|
|
34
|
-
var _SupabaseCacheBackend, SupabaseCacheBackend;
|
|
34
|
+
var _SupabaseCacheBackend, SupabaseCacheBackend, customCacheBackend_default;
|
|
35
35
|
var init_customCacheBackend = __esm({
|
|
36
36
|
"src/i18n/customCacheBackend.ts"() {
|
|
37
37
|
"use strict";
|
|
@@ -137,17 +137,37 @@ var init_customCacheBackend = __esm({
|
|
|
137
137
|
_SupabaseCacheBackend.manifest = {};
|
|
138
138
|
_SupabaseCacheBackend.isManifestLoaded = false;
|
|
139
139
|
SupabaseCacheBackend = _SupabaseCacheBackend;
|
|
140
|
+
customCacheBackend_default = SupabaseCacheBackend;
|
|
140
141
|
}
|
|
141
142
|
});
|
|
142
143
|
|
|
143
144
|
// src/i18n/config.ts
|
|
144
|
-
var import_i18next, import_react_i18next, config_default;
|
|
145
|
+
var import_i18next, import_react_i18next, initI18n, config_default;
|
|
145
146
|
var init_config = __esm({
|
|
146
147
|
"src/i18n/config.ts"() {
|
|
147
148
|
"use strict";
|
|
148
149
|
import_i18next = __toESM(require("i18next"));
|
|
149
150
|
import_react_i18next = require("react-i18next");
|
|
150
151
|
init_customCacheBackend();
|
|
152
|
+
initI18n = ({
|
|
153
|
+
supabase,
|
|
154
|
+
defaultLang = "uk",
|
|
155
|
+
fallbackLang = "en",
|
|
156
|
+
namespaces = ["common", "landing", "auth-widget", "form_components"]
|
|
157
|
+
}) => {
|
|
158
|
+
if (!import_i18next.default.isInitialized) {
|
|
159
|
+
import_i18next.default.use(new customCacheBackend_default(supabase)).use(import_react_i18next.initReactI18next).init({
|
|
160
|
+
lng: defaultLang,
|
|
161
|
+
fallbackLng: fallbackLang,
|
|
162
|
+
ns: namespaces,
|
|
163
|
+
defaultNS: "common",
|
|
164
|
+
keySeparator: false,
|
|
165
|
+
nsSeparator: ":",
|
|
166
|
+
interpolation: { escapeValue: false }
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return import_i18next.default;
|
|
170
|
+
};
|
|
151
171
|
config_default = import_i18next.default;
|
|
152
172
|
}
|
|
153
173
|
});
|
|
@@ -2173,6 +2193,7 @@ var init_context = __esm({
|
|
|
2173
2193
|
init_TranslateText();
|
|
2174
2194
|
init_TranslationEditProvider();
|
|
2175
2195
|
init_LocalizationProvider();
|
|
2196
|
+
init_config();
|
|
2176
2197
|
init_ThemeProvider();
|
|
2177
2198
|
init_BreadcrumbProvider();
|
|
2178
2199
|
init_ToastProvider();
|
|
@@ -2761,6 +2782,7 @@ __export(index_exports, {
|
|
|
2761
2782
|
UI: () => UI,
|
|
2762
2783
|
UserSettingsProvider: () => UserSettingsProvider,
|
|
2763
2784
|
defaultUserSettings: () => defaultUserSettings,
|
|
2785
|
+
initI18n: () => initI18n,
|
|
2764
2786
|
useAI: () => useAI,
|
|
2765
2787
|
useAppSettings: () => useAppSettings,
|
|
2766
2788
|
useAppTheme: () => useAppTheme,
|
|
@@ -4547,6 +4569,7 @@ var Hooks = {
|
|
|
4547
4569
|
UI,
|
|
4548
4570
|
UserSettingsProvider,
|
|
4549
4571
|
defaultUserSettings,
|
|
4572
|
+
initI18n,
|
|
4550
4573
|
useAI,
|
|
4551
4574
|
useAppSettings,
|
|
4552
4575
|
useAppTheme,
|
package/dist/index.mjs
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
getUserLastSeenAt,
|
|
27
27
|
getUsersLastSeenMap,
|
|
28
28
|
groupSessionsByUser,
|
|
29
|
+
initI18n,
|
|
29
30
|
isCurrentSessionValid,
|
|
30
31
|
trackUserSession,
|
|
31
32
|
trackUserSessionByRoute,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
useTranslationEdit,
|
|
43
44
|
useTranslationNamespace,
|
|
44
45
|
useUserSettings
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-FRDK4RQX.mjs";
|
|
46
47
|
|
|
47
48
|
// src/UI/components/inputs/TextFieldComponent.tsx
|
|
48
49
|
import { useState } from "react";
|
|
@@ -740,7 +741,7 @@ var EmailInputComponent = ({
|
|
|
740
741
|
import { useState as useState5, useEffect as useEffect2, lazy, Suspense } from "react";
|
|
741
742
|
import { Avatar, Tooltip as Tooltip3, Typography as Typography2 } from "@mui/material";
|
|
742
743
|
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
743
|
-
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-
|
|
744
|
+
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-K7CJNYYL.mjs"));
|
|
744
745
|
var getInitials = (name) => {
|
|
745
746
|
if (!name) return "?";
|
|
746
747
|
const parts = name.trim().split(" ");
|
|
@@ -1810,6 +1811,7 @@ export {
|
|
|
1810
1811
|
UI,
|
|
1811
1812
|
UserSettingsProvider,
|
|
1812
1813
|
defaultUserSettings,
|
|
1814
|
+
initI18n,
|
|
1813
1815
|
useAI,
|
|
1814
1816
|
useAppSettings,
|
|
1815
1817
|
useAppTheme,
|