@serhii.olishevskyi/docs 1.0.5 → 1.0.7
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-JBJBONYL.mjs → UserPopoverComponent-ZPPVLFBL.mjs} +1 -1
- package/dist/{chunk-R2QQMMHL.mjs → chunk-VCRXKPJ4.mjs} +370 -82
- package/dist/index.d.mts +83 -2
- package/dist/index.d.ts +83 -2
- package/dist/index.js +413 -112
- package/dist/index.mjs +10 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
3
|
import { TextFieldProps, IconButtonProps, TooltipProps, SxProps, Theme } from '@mui/material';
|
|
4
|
-
import { SupabaseClient } from '@supabase/supabase-js';
|
|
4
|
+
import { SupabaseClient, User, Session } from '@supabase/supabase-js';
|
|
5
5
|
|
|
6
6
|
interface UrlValue {
|
|
7
7
|
url: string;
|
|
@@ -112,7 +112,50 @@ interface UserPopoverComponentProps {
|
|
|
112
112
|
onClose: () => void;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
interface UserProfile {
|
|
116
|
+
id: string;
|
|
117
|
+
email: string;
|
|
118
|
+
system_role: 'superadmin' | 'admin' | 'support' | null;
|
|
119
|
+
updated_at: string;
|
|
120
|
+
avatar_url: string | null;
|
|
121
|
+
avatar_path?: string | null;
|
|
122
|
+
first_name: string | null;
|
|
123
|
+
middle_name: string | null;
|
|
124
|
+
last_name: string | null;
|
|
125
|
+
display_name: string | null;
|
|
126
|
+
locked: boolean;
|
|
127
|
+
archived: boolean;
|
|
128
|
+
birthday: string | null;
|
|
129
|
+
phone: string | null;
|
|
130
|
+
description: string | null;
|
|
131
|
+
created_at: string;
|
|
132
|
+
cover_image_url: string | null;
|
|
133
|
+
cover_image_path?: string | null;
|
|
134
|
+
active_company_id: string | null;
|
|
135
|
+
name_order: 'first_last' | 'last_first' | null;
|
|
136
|
+
include_middle_name: boolean | null;
|
|
137
|
+
name_genitive: string | null;
|
|
138
|
+
name_dative: string | null;
|
|
139
|
+
name_instrumental: string | null;
|
|
140
|
+
name_vocative: string | null;
|
|
141
|
+
}
|
|
142
|
+
|
|
115
143
|
type MembershipRole = 'superadmin' | 'admin' | 'user';
|
|
144
|
+
interface Membership {
|
|
145
|
+
id: string;
|
|
146
|
+
user_id: string;
|
|
147
|
+
company_id: string;
|
|
148
|
+
role: 'superadmin' | 'admin' | 'user';
|
|
149
|
+
created_at: string;
|
|
150
|
+
last_updated_at: string | null;
|
|
151
|
+
first_login_at?: string | null;
|
|
152
|
+
last_login_at?: string | null;
|
|
153
|
+
employee_post: string | null;
|
|
154
|
+
work_schedule_id: string | null;
|
|
155
|
+
locked: boolean;
|
|
156
|
+
locked_reason: string | null;
|
|
157
|
+
excluded: boolean;
|
|
158
|
+
}
|
|
116
159
|
|
|
117
160
|
interface UserRoleChipComponentProps {
|
|
118
161
|
overrideNamespace?: string;
|
|
@@ -217,6 +260,41 @@ declare const SupabaseProvider: React__default.FC<SupabaseProviderProps>;
|
|
|
217
260
|
/** Хук для доступа к Supabase из любого компонента */
|
|
218
261
|
declare const useSupabase: () => SupabaseClient;
|
|
219
262
|
|
|
263
|
+
interface AppSettingsMap {
|
|
264
|
+
max_group_members: number;
|
|
265
|
+
[key: string]: any;
|
|
266
|
+
}
|
|
267
|
+
interface AppSettingsContextType {
|
|
268
|
+
settings: AppSettingsMap;
|
|
269
|
+
loading: boolean;
|
|
270
|
+
error: string | null;
|
|
271
|
+
getSetting: <T = any>(key: string, defaultValue: T) => T;
|
|
272
|
+
refetchSettings: () => Promise<void>;
|
|
273
|
+
}
|
|
274
|
+
declare const AppSettingsProvider: React__default.FC<{
|
|
275
|
+
children: React__default.ReactNode;
|
|
276
|
+
}>;
|
|
277
|
+
declare const useAppSettings: () => AppSettingsContextType;
|
|
278
|
+
|
|
279
|
+
interface AuthContextType {
|
|
280
|
+
user: User | null;
|
|
281
|
+
profile: UserProfile | null;
|
|
282
|
+
membership: Membership | null;
|
|
283
|
+
userRole: MembershipRole | null;
|
|
284
|
+
activeCompanyId: string | null;
|
|
285
|
+
session: Session | null;
|
|
286
|
+
isAuthenticated: boolean;
|
|
287
|
+
loading: boolean;
|
|
288
|
+
signOut: () => Promise<void>;
|
|
289
|
+
updateProfile: (newProfileData: Partial<UserProfile>) => void;
|
|
290
|
+
refreshProfile: () => Promise<void>;
|
|
291
|
+
setActiveCompany: (companyId: string) => Promise<void>;
|
|
292
|
+
}
|
|
293
|
+
declare const AuthProvider: React__default.FC<{
|
|
294
|
+
children: React__default.ReactNode;
|
|
295
|
+
}>;
|
|
296
|
+
declare const useAuth: () => AuthContextType;
|
|
297
|
+
|
|
220
298
|
interface TranslateTextProps {
|
|
221
299
|
overrideNamespace?: string;
|
|
222
300
|
children: string;
|
|
@@ -337,6 +415,9 @@ declare const useToast: () => ToastContextType;
|
|
|
337
415
|
|
|
338
416
|
declare const Providers: {
|
|
339
417
|
readonly Supabase: React$1.FC<SupabaseProviderProps>;
|
|
418
|
+
readonly AppSettings: React$1.FC<{
|
|
419
|
+
children: React.ReactNode;
|
|
420
|
+
}>;
|
|
340
421
|
readonly Translate: React$1.FC<TranslateProviderProps>;
|
|
341
422
|
readonly TranslationEdit: React$1.FC<{
|
|
342
423
|
children: React.ReactNode;
|
|
@@ -357,4 +438,4 @@ declare const Providers: {
|
|
|
357
438
|
readonly AI: React$1.FC<AIProviderProps>;
|
|
358
439
|
};
|
|
359
440
|
|
|
360
|
-
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, BreadcrumbProvider, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps as CopyClipboardButtonProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps as EmailInputProps, type Language, LocalizationProvider, type NumberInputComponentProps as NumberInputProps, Providers, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps as TextFieldProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps as TranslatableTooltipProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps as UserAvatarProps, type UserPopoverComponentProps as UserPopoverProps, type UserRoleChipComponentProps as UserRoleChipProps, type UserStatusChipComponentProps as UserStatusChipProps, useAI, useAppTheme, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace };
|
|
441
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps as CopyClipboardButtonProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps as EmailInputProps, type Language, LocalizationProvider, type NumberInputComponentProps as NumberInputProps, Providers, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps as TextFieldProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps as TranslatableTooltipProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps as UserAvatarProps, type UserPopoverComponentProps as UserPopoverProps, type UserRoleChipComponentProps as UserRoleChipProps, type UserStatusChipComponentProps as UserStatusChipProps, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
3
|
import { TextFieldProps, IconButtonProps, TooltipProps, SxProps, Theme } from '@mui/material';
|
|
4
|
-
import { SupabaseClient } from '@supabase/supabase-js';
|
|
4
|
+
import { SupabaseClient, User, Session } from '@supabase/supabase-js';
|
|
5
5
|
|
|
6
6
|
interface UrlValue {
|
|
7
7
|
url: string;
|
|
@@ -112,7 +112,50 @@ interface UserPopoverComponentProps {
|
|
|
112
112
|
onClose: () => void;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
interface UserProfile {
|
|
116
|
+
id: string;
|
|
117
|
+
email: string;
|
|
118
|
+
system_role: 'superadmin' | 'admin' | 'support' | null;
|
|
119
|
+
updated_at: string;
|
|
120
|
+
avatar_url: string | null;
|
|
121
|
+
avatar_path?: string | null;
|
|
122
|
+
first_name: string | null;
|
|
123
|
+
middle_name: string | null;
|
|
124
|
+
last_name: string | null;
|
|
125
|
+
display_name: string | null;
|
|
126
|
+
locked: boolean;
|
|
127
|
+
archived: boolean;
|
|
128
|
+
birthday: string | null;
|
|
129
|
+
phone: string | null;
|
|
130
|
+
description: string | null;
|
|
131
|
+
created_at: string;
|
|
132
|
+
cover_image_url: string | null;
|
|
133
|
+
cover_image_path?: string | null;
|
|
134
|
+
active_company_id: string | null;
|
|
135
|
+
name_order: 'first_last' | 'last_first' | null;
|
|
136
|
+
include_middle_name: boolean | null;
|
|
137
|
+
name_genitive: string | null;
|
|
138
|
+
name_dative: string | null;
|
|
139
|
+
name_instrumental: string | null;
|
|
140
|
+
name_vocative: string | null;
|
|
141
|
+
}
|
|
142
|
+
|
|
115
143
|
type MembershipRole = 'superadmin' | 'admin' | 'user';
|
|
144
|
+
interface Membership {
|
|
145
|
+
id: string;
|
|
146
|
+
user_id: string;
|
|
147
|
+
company_id: string;
|
|
148
|
+
role: 'superadmin' | 'admin' | 'user';
|
|
149
|
+
created_at: string;
|
|
150
|
+
last_updated_at: string | null;
|
|
151
|
+
first_login_at?: string | null;
|
|
152
|
+
last_login_at?: string | null;
|
|
153
|
+
employee_post: string | null;
|
|
154
|
+
work_schedule_id: string | null;
|
|
155
|
+
locked: boolean;
|
|
156
|
+
locked_reason: string | null;
|
|
157
|
+
excluded: boolean;
|
|
158
|
+
}
|
|
116
159
|
|
|
117
160
|
interface UserRoleChipComponentProps {
|
|
118
161
|
overrideNamespace?: string;
|
|
@@ -217,6 +260,41 @@ declare const SupabaseProvider: React__default.FC<SupabaseProviderProps>;
|
|
|
217
260
|
/** Хук для доступа к Supabase из любого компонента */
|
|
218
261
|
declare const useSupabase: () => SupabaseClient;
|
|
219
262
|
|
|
263
|
+
interface AppSettingsMap {
|
|
264
|
+
max_group_members: number;
|
|
265
|
+
[key: string]: any;
|
|
266
|
+
}
|
|
267
|
+
interface AppSettingsContextType {
|
|
268
|
+
settings: AppSettingsMap;
|
|
269
|
+
loading: boolean;
|
|
270
|
+
error: string | null;
|
|
271
|
+
getSetting: <T = any>(key: string, defaultValue: T) => T;
|
|
272
|
+
refetchSettings: () => Promise<void>;
|
|
273
|
+
}
|
|
274
|
+
declare const AppSettingsProvider: React__default.FC<{
|
|
275
|
+
children: React__default.ReactNode;
|
|
276
|
+
}>;
|
|
277
|
+
declare const useAppSettings: () => AppSettingsContextType;
|
|
278
|
+
|
|
279
|
+
interface AuthContextType {
|
|
280
|
+
user: User | null;
|
|
281
|
+
profile: UserProfile | null;
|
|
282
|
+
membership: Membership | null;
|
|
283
|
+
userRole: MembershipRole | null;
|
|
284
|
+
activeCompanyId: string | null;
|
|
285
|
+
session: Session | null;
|
|
286
|
+
isAuthenticated: boolean;
|
|
287
|
+
loading: boolean;
|
|
288
|
+
signOut: () => Promise<void>;
|
|
289
|
+
updateProfile: (newProfileData: Partial<UserProfile>) => void;
|
|
290
|
+
refreshProfile: () => Promise<void>;
|
|
291
|
+
setActiveCompany: (companyId: string) => Promise<void>;
|
|
292
|
+
}
|
|
293
|
+
declare const AuthProvider: React__default.FC<{
|
|
294
|
+
children: React__default.ReactNode;
|
|
295
|
+
}>;
|
|
296
|
+
declare const useAuth: () => AuthContextType;
|
|
297
|
+
|
|
220
298
|
interface TranslateTextProps {
|
|
221
299
|
overrideNamespace?: string;
|
|
222
300
|
children: string;
|
|
@@ -337,6 +415,9 @@ declare const useToast: () => ToastContextType;
|
|
|
337
415
|
|
|
338
416
|
declare const Providers: {
|
|
339
417
|
readonly Supabase: React$1.FC<SupabaseProviderProps>;
|
|
418
|
+
readonly AppSettings: React$1.FC<{
|
|
419
|
+
children: React.ReactNode;
|
|
420
|
+
}>;
|
|
340
421
|
readonly Translate: React$1.FC<TranslateProviderProps>;
|
|
341
422
|
readonly TranslationEdit: React$1.FC<{
|
|
342
423
|
children: React.ReactNode;
|
|
@@ -357,4 +438,4 @@ declare const Providers: {
|
|
|
357
438
|
readonly AI: React$1.FC<AIProviderProps>;
|
|
358
439
|
};
|
|
359
440
|
|
|
360
|
-
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, BreadcrumbProvider, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps as CopyClipboardButtonProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps as EmailInputProps, type Language, LocalizationProvider, type NumberInputComponentProps as NumberInputProps, Providers, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps as TextFieldProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps as TranslatableTooltipProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps as UserAvatarProps, type UserPopoverComponentProps as UserPopoverProps, type UserRoleChipComponentProps as UserRoleChipProps, type UserStatusChipComponentProps as UserStatusChipProps, useAI, useAppTheme, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace };
|
|
441
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps as CopyClipboardButtonProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps as EmailInputProps, type Language, LocalizationProvider, type NumberInputComponentProps as NumberInputProps, Providers, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type TextFieldComponentProps as TextFieldProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps as TranslatableTooltipProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps as UserAvatarProps, type UserPopoverComponentProps as UserPopoverProps, type UserRoleChipComponentProps as UserRoleChipProps, type UserStatusChipComponentProps as UserStatusChipProps, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace };
|