@mirantes-micro/foundation-design-system 1.2.362 → 1.2.363
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/index.d.ts +89 -29
- package/dist/index.js +212 -212
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { AxiosInstance, GenericAbortSignal } from 'axios';
|
|
|
6
6
|
import { Socket } from 'socket.io-client';
|
|
7
7
|
import * as zustand from 'zustand';
|
|
8
8
|
import * as zustand_middleware from 'zustand/middleware';
|
|
9
|
+
export { ErrorResponse, ErrorType } from '@mirantes-micro/errors';
|
|
9
10
|
|
|
10
11
|
interface ModalProps {
|
|
11
12
|
isOpen: boolean;
|
|
@@ -98,7 +99,7 @@ declare const useApiGetPage: (slug?: string) => {
|
|
|
98
99
|
isGettingPage: boolean;
|
|
99
100
|
};
|
|
100
101
|
|
|
101
|
-
type TLocale = "pt" | "en" | "fr";
|
|
102
|
+
type TLocale$1 = "pt" | "en" | "fr";
|
|
102
103
|
interface IMirantesFoundationProviderProps {
|
|
103
104
|
children: ReactNode;
|
|
104
105
|
Notification?: ReactNode;
|
|
@@ -145,7 +146,7 @@ interface IMirantesFoundationProviderProps {
|
|
|
145
146
|
mirantesDomain?: string;
|
|
146
147
|
openCageApiKey?: string;
|
|
147
148
|
ocpSubscriptionKey?: string;
|
|
148
|
-
locale?: TLocale;
|
|
149
|
+
locale?: TLocale$1;
|
|
149
150
|
Link?: LinkComponent;
|
|
150
151
|
usePathname?: UsePathname;
|
|
151
152
|
user?: User$4;
|
|
@@ -176,7 +177,7 @@ interface IMirantesFoundationContext {
|
|
|
176
177
|
socketRef?: RefObject<Socket | null>;
|
|
177
178
|
mirantesDomain?: string;
|
|
178
179
|
hostUrl?: string;
|
|
179
|
-
locale?: TLocale;
|
|
180
|
+
locale?: TLocale$1;
|
|
180
181
|
Link?: LinkComponent;
|
|
181
182
|
usePathname?: UsePathname;
|
|
182
183
|
user?: User$4;
|
|
@@ -534,31 +535,6 @@ declare function useSetChatVisibility(): {
|
|
|
534
535
|
isPageContext: boolean;
|
|
535
536
|
};
|
|
536
537
|
|
|
537
|
-
type Language = 'pt' | 'en' | 'fr';
|
|
538
|
-
interface DateOutput {
|
|
539
|
-
day: string;
|
|
540
|
-
month: string;
|
|
541
|
-
year: string;
|
|
542
|
-
formattedYMD: string | null;
|
|
543
|
-
formattedDMY: string | null;
|
|
544
|
-
isoString: string | null;
|
|
545
|
-
}
|
|
546
|
-
interface TripleInputDateProps {
|
|
547
|
-
label?: string;
|
|
548
|
-
required?: boolean;
|
|
549
|
-
disabled?: boolean;
|
|
550
|
-
error?: string;
|
|
551
|
-
showDay?: boolean;
|
|
552
|
-
showMonth?: boolean;
|
|
553
|
-
showYear?: boolean;
|
|
554
|
-
lang?: Language;
|
|
555
|
-
value?: Date | string | null;
|
|
556
|
-
minYear?: number;
|
|
557
|
-
maxYear?: number;
|
|
558
|
-
onChange?: (dateData: DateOutput) => void;
|
|
559
|
-
}
|
|
560
|
-
declare const TripleInputDate: ({ label, required, disabled, error, showDay, showMonth, showYear, lang, value, minYear, maxYear, onChange }: TripleInputDateProps) => React__default.JSX.Element;
|
|
561
|
-
|
|
562
538
|
type ModalVariant = "expanded" | "minimized" | "center";
|
|
563
539
|
interface ModalPosition {
|
|
564
540
|
top?: string;
|
|
@@ -745,6 +721,31 @@ interface ExtendedDrawerProps extends IResponsiveDrawerProps {
|
|
|
745
721
|
}
|
|
746
722
|
declare function ResponsiveDrawer$1({ isOpen, onClose, title, header, footer, children, className, swipeable, }: ExtendedDrawerProps): React$1.JSX.Element;
|
|
747
723
|
|
|
724
|
+
type Language = "pt" | "en" | "fr";
|
|
725
|
+
interface DateOutput {
|
|
726
|
+
day: string;
|
|
727
|
+
month: string;
|
|
728
|
+
year: string;
|
|
729
|
+
formattedYMD: string | null;
|
|
730
|
+
formattedDMY: string | null;
|
|
731
|
+
isoString: string | null;
|
|
732
|
+
}
|
|
733
|
+
interface TripleInputDateProps {
|
|
734
|
+
label?: string;
|
|
735
|
+
required?: boolean;
|
|
736
|
+
disabled?: boolean;
|
|
737
|
+
error?: string;
|
|
738
|
+
showDay?: boolean;
|
|
739
|
+
showMonth?: boolean;
|
|
740
|
+
showYear?: boolean;
|
|
741
|
+
lang?: Language;
|
|
742
|
+
value?: Date | string | null;
|
|
743
|
+
minYear?: number;
|
|
744
|
+
maxYear?: number;
|
|
745
|
+
onChange?: (dateData: DateOutput) => void;
|
|
746
|
+
}
|
|
747
|
+
declare const TripleInputDate: ({ label, required, disabled, error, showDay, showMonth, showYear, lang, value, minYear, maxYear, onChange, }: TripleInputDateProps) => React__default.JSX.Element;
|
|
748
|
+
|
|
748
749
|
interface AddressSuggestion {
|
|
749
750
|
country?: string;
|
|
750
751
|
city?: string;
|
|
@@ -1785,6 +1786,7 @@ type Post$1 = {
|
|
|
1785
1786
|
linkPreview?: unknown;
|
|
1786
1787
|
visibility?: string;
|
|
1787
1788
|
sharedPost: Post$1;
|
|
1789
|
+
currentUserReaction?: string;
|
|
1788
1790
|
title?: string;
|
|
1789
1791
|
stats?: {
|
|
1790
1792
|
reactionCount?: number;
|
|
@@ -2018,6 +2020,64 @@ declare const useJobTriggerStore: zustand.UseBoundStore<Omit<zustand.StoreApi<Jo
|
|
|
2018
2020
|
};
|
|
2019
2021
|
}>;
|
|
2020
2022
|
|
|
2023
|
+
type TLocale = "pt" | "en" | "fr";
|
|
2024
|
+
type ToastVariant = "error" | "warning" | "info";
|
|
2025
|
+
interface IMirantesErrorHandlerConfig {
|
|
2026
|
+
onRedirect?: (path: string) => void;
|
|
2027
|
+
onLogout?: () => void;
|
|
2028
|
+
onRetry?: () => void;
|
|
2029
|
+
onCriticalError?: (title: string, message: string) => void;
|
|
2030
|
+
locale?: TLocale;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
interface MirantesErrorBoundaryProps {
|
|
2034
|
+
children: React__default.ReactNode;
|
|
2035
|
+
locale?: TLocale;
|
|
2036
|
+
fallback?: React__default.ReactNode | ((error: Error, reset: () => void) => React__default.ReactNode);
|
|
2037
|
+
onError?: (error: Error, info: React__default.ErrorInfo) => void;
|
|
2038
|
+
}
|
|
2039
|
+
interface MirantesErrorBoundaryState {
|
|
2040
|
+
hasError: boolean;
|
|
2041
|
+
error: Error | null;
|
|
2042
|
+
}
|
|
2043
|
+
declare class MirantesErrorBoundary extends React__default.Component<MirantesErrorBoundaryProps, MirantesErrorBoundaryState> {
|
|
2044
|
+
constructor(props: MirantesErrorBoundaryProps);
|
|
2045
|
+
static getDerivedStateFromError(error: Error): MirantesErrorBoundaryState;
|
|
2046
|
+
componentDidCatch(error: Error, info: React__default.ErrorInfo): void;
|
|
2047
|
+
handleReset(): void;
|
|
2048
|
+
render(): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | React__default.JSX.Element | null | undefined;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
declare function setErrorConfig(newConfig: IMirantesErrorHandlerConfig): void;
|
|
2052
|
+
declare function getErrorConfig(): IMirantesErrorHandlerConfig | null;
|
|
2053
|
+
declare function clearErrorConfig(): void;
|
|
2054
|
+
|
|
2055
|
+
declare function handleError(error: unknown, toastFunctions?: {
|
|
2056
|
+
errorToast: (props: {
|
|
2057
|
+
title: string;
|
|
2058
|
+
message?: string;
|
|
2059
|
+
actionLabel?: string;
|
|
2060
|
+
onAction?: () => void;
|
|
2061
|
+
}) => void;
|
|
2062
|
+
warningToast: (props: {
|
|
2063
|
+
title: string;
|
|
2064
|
+
message?: string;
|
|
2065
|
+
}) => void;
|
|
2066
|
+
infoToast: (props: {
|
|
2067
|
+
title: string;
|
|
2068
|
+
message?: string;
|
|
2069
|
+
}) => void;
|
|
2070
|
+
}): void;
|
|
2071
|
+
declare function handleAxiosError(error: any, toastFunctions?: any): void;
|
|
2072
|
+
declare function handleGraphQLError(error: any, toastFunctions?: any): void;
|
|
2073
|
+
|
|
2074
|
+
declare function useErrorHandler(): {
|
|
2075
|
+
handleError: (error: unknown) => void;
|
|
2076
|
+
handleAxiosError: (error: any) => void;
|
|
2077
|
+
handleGraphQLError: (error: any) => void;
|
|
2078
|
+
};
|
|
2079
|
+
declare function useAxiosErrorInterceptor(axiosInstance?: AxiosInstance): void;
|
|
2080
|
+
|
|
2021
2081
|
interface MirantesChatButtonProps {
|
|
2022
2082
|
forMobile?: boolean;
|
|
2023
2083
|
chatForPage?: boolean;
|
|
@@ -2567,4 +2627,4 @@ declare function MobileWorkspaceBar({ onCreateJob, }: MobileWorkspaceBarProps):
|
|
|
2567
2627
|
|
|
2568
2628
|
declare function WorkspacePanel(): React__default.JSX.Element;
|
|
2569
2629
|
|
|
2570
|
-
export { ActivateAccountModal, AddRating, AddressAutocompleteInput, AnimatedModal, ArticleContent, ArticleViewer, AutoComponent, AutoDownloadBanner, AvatarRatingBadge, BaseInput, Button, ChatContacts, ChatListWrapper, ChatView, ChatViewDesktopPage, CheckBoxInput, closeLogoutChannel as CloseLogoutChannel, ContactsModal, ControlButtons, CountryDisplay, CountryInput, CreateCompany, CreatePostCard, CreatePostContent, CreatePostForm, CreatePostModal, CreatePostModalFilters, CreatePostReelForm, CreatePostScheduleStep, CreatePostToolbar, CustomDateInput, CustomDrawer, CustomDropdown, MirantesModal as CustomMirantesModal, CustomSelectInput, DateInput, DownloadMobileVersionBanner, DownloadModalTrigger, EmojiPickerButton, GradientModal, Header, MentionableTextarea, MessageButton, MessagesButtonFromPage, MirantesButton, Index as MirantesChatApp, MirantesChatButton, MirantesFoundationProvider, MirantesPDFViewer, ResponsiveDrawer as MirantesResponsiveDrawer, MirantesSheets, MobileWorkspaceBar, NoRecruitmentResponsiveIlustration, onLogout as Onlogout, OpenClipsButton, PageChatContent, PageChatContentHeader, PageChatInput, PageChatList, PageChatListWrapper, PageChatUserSuggestions, PageFloatFooter, PageMessageWrapper, PagesFeedTrigger, PdfFooter, PdfFullscreenView, PdfReader, PdfReaderHeader, PostBackgroundManager, PostCardArticle, PostTrigger, PostTriggerModal, ProgressBar, RadioButtonInput, RatingReviewsList, RatingUserCard, RatingsCard, RatingsSummary, RattingSuggestionCard, ReactPostButton, ResponsiveDrawer$1 as ResponsiveDrawer, SalaryInputWithButton, Calendar as ScheduleCalendar, SharePostModal, ShareProfile, ShareProfileButton, ShareProfileModal, Spinner, TripleInputDate, PostBackgroundManager as UploadProgressManager, WorkspacePanel, broadcastLogout, clearSettingsCookie, clearUserSession, closeLogoutChannel, createPersistentState, dispatchLogoutEvent, getInitials, getSettingsFromCookie, injectMentionUIDs, joinUrlWithPathAndQuery, onLogout, stringToObj, useApiCheckRater, useApiGetContacts, useApiGetPage, useApiLogout, useArticleNavigation, useArticleStore, useAssetVersions, useAutoDisplay, useBestAssetVersion, useCandidaciesTriggerStore, useCommunityTriggerStore, useCreatePostFormStore, useCreatePostStore, useJobTriggerStore, useLoadSettings, useLogout, useMessageAppStore, useMirantesFoundation, useMirantesToast, useModalArticleStore, useModalStore, useOpenChat, useOportunitiesStore, usePeriodicDownloadBanner, usePersistentUIState, useRegisterTracking, useRestorePendingChat, useSavedItemsStore, useSetChatVisibility, useSignedUrl, useUploadAsset, useUploadAssetsBulk };
|
|
2630
|
+
export { ActivateAccountModal, AddRating, AddressAutocompleteInput, AnimatedModal, ArticleContent, ArticleViewer, AutoComponent, AutoDownloadBanner, AvatarRatingBadge, BaseInput, Button, ChatContacts, ChatListWrapper, ChatView, ChatViewDesktopPage, CheckBoxInput, closeLogoutChannel as CloseLogoutChannel, ContactsModal, ControlButtons, CountryDisplay, CountryInput, CreateCompany, CreatePostCard, CreatePostContent, CreatePostForm, CreatePostModal, CreatePostModalFilters, CreatePostReelForm, CreatePostScheduleStep, CreatePostToolbar, CustomDateInput, CustomDrawer, CustomDropdown, MirantesModal as CustomMirantesModal, CustomSelectInput, DateInput, DownloadMobileVersionBanner, DownloadModalTrigger, EmojiPickerButton, GradientModal, Header, type IMirantesErrorHandlerConfig, MentionableTextarea, MessageButton, MessagesButtonFromPage, MirantesButton, Index as MirantesChatApp, MirantesChatButton, MirantesErrorBoundary, MirantesFoundationProvider, MirantesPDFViewer, ResponsiveDrawer as MirantesResponsiveDrawer, MirantesSheets, MobileWorkspaceBar, NoRecruitmentResponsiveIlustration, onLogout as Onlogout, OpenClipsButton, PageChatContent, PageChatContentHeader, PageChatInput, PageChatList, PageChatListWrapper, PageChatUserSuggestions, PageFloatFooter, PageMessageWrapper, PagesFeedTrigger, PdfFooter, PdfFullscreenView, PdfReader, PdfReaderHeader, PostBackgroundManager, PostCardArticle, PostTrigger, PostTriggerModal, ProgressBar, RadioButtonInput, RatingReviewsList, RatingUserCard, RatingsCard, RatingsSummary, RattingSuggestionCard, ReactPostButton, ResponsiveDrawer$1 as ResponsiveDrawer, SalaryInputWithButton, Calendar as ScheduleCalendar, SharePostModal, ShareProfile, ShareProfileButton, ShareProfileModal, Spinner, type ToastVariant, TripleInputDate, PostBackgroundManager as UploadProgressManager, WorkspacePanel, broadcastLogout, clearErrorConfig, clearSettingsCookie, clearUserSession, closeLogoutChannel, createPersistentState, dispatchLogoutEvent, getErrorConfig, getInitials, getSettingsFromCookie, handleAxiosError, handleError, handleGraphQLError, injectMentionUIDs, joinUrlWithPathAndQuery, onLogout, setErrorConfig, stringToObj, useApiCheckRater, useApiGetContacts, useApiGetPage, useApiLogout, useArticleNavigation, useArticleStore, useAssetVersions, useAutoDisplay, useAxiosErrorInterceptor, useBestAssetVersion, useCandidaciesTriggerStore, useCommunityTriggerStore, useCreatePostFormStore, useCreatePostStore, useErrorHandler, useJobTriggerStore, useLoadSettings, useLogout, useMessageAppStore, useMirantesFoundation, useMirantesToast, useModalArticleStore, useModalStore, useOpenChat, useOportunitiesStore, usePeriodicDownloadBanner, usePersistentUIState, useRegisterTracking, useRestorePendingChat, useSavedItemsStore, useSetChatVisibility, useSignedUrl, useUploadAsset, useUploadAssetsBulk };
|