@mirantes-micro/foundation-design-system 1.2.87 → 1.2.89

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, ChangeEvent, KeyboardEvent, FocusEvent, JSX } from 'react';
2
+ import React__default, { ReactNode, JSX, ChangeEvent, KeyboardEvent, FocusEvent } from 'react';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
5
  import { AxiosInstance } from 'axios';
@@ -21,6 +21,8 @@ interface IMirantesFoundationProviderProps {
21
21
  Notification?: ReactNode;
22
22
  queryClient?: QueryClient;
23
23
  onOpenCreatePostModal?: () => void;
24
+ commentComponents?: ReactNode | JSX.Element;
25
+ pageTriggerComponents?: ReactNode | JSX.Element;
24
26
  values?: {
25
27
  pageId?: string;
26
28
  page?: {
@@ -92,6 +94,8 @@ interface IMirantesFoundationContext {
92
94
  authApiUrl?: string;
93
95
  queryClient?: QueryClient;
94
96
  onOpenCreatePostModal?: (cb?: () => void) => void;
97
+ commentComponents?: ReactNode | JSX.Element;
98
+ pageTriggerComponents?: ReactNode | JSX.Element;
95
99
  }
96
100
  type CommonLinkProps = {
97
101
  to?: string;
@@ -124,7 +128,7 @@ type User$2 = {
124
128
  type LinkComponent = (props: CommonLinkProps) => any;
125
129
  type UsePathname = () => string;
126
130
 
127
- declare function MirantesFoundationProvider({ children, Notification, queryClient, onOpenCreatePostModal, values: { chatApiUrl, chatForPage, locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, searchApi, widgetsApi, hostUrl, assetsApiUrl, isDev, profileApiUrl, isGettingStats, openCageApiKey, pageId, authedApi, authApiUrl, socketApiUrl, uploadFilesApi, page, ocpSubscriptionKey, billingApiUrl, multicaixaExpressUrl, stripeKey }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
131
+ declare function MirantesFoundationProvider({ children, Notification, queryClient, onOpenCreatePostModal, commentComponents, pageTriggerComponents, values: { chatApiUrl, chatForPage, locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, searchApi, widgetsApi, hostUrl, assetsApiUrl, isDev, profileApiUrl, isGettingStats, openCageApiKey, pageId, authedApi, authApiUrl, socketApiUrl, uploadFilesApi, page, ocpSubscriptionKey, billingApiUrl, multicaixaExpressUrl, stripeKey, }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
128
132
 
129
133
  declare function WorkspacePanel(): React__default.JSX.Element;
130
134
 
@@ -1174,7 +1178,7 @@ type PostAttachmentProps = {
1174
1178
  };
1175
1179
  type Post = {
1176
1180
  user: User;
1177
- postType: "NORMAL" | "REEL";
1181
+ postType: "NORMAL" | "REEL" | "ARTICLE";
1178
1182
  id: string;
1179
1183
  createdAt: string;
1180
1184
  scheduledAt?: string;
@@ -1187,6 +1191,7 @@ type Post = {
1187
1191
  isFollowed?: boolean;
1188
1192
  isContact?: boolean;
1189
1193
  isArticle?: boolean;
1194
+ isDraft?: boolean;
1190
1195
  expiresAt?: string | null;
1191
1196
  link: {
1192
1197
  title: string;
@@ -1442,7 +1447,7 @@ interface PdfFullscreenViewProps {
1442
1447
  pdfUrl: string;
1443
1448
  pdfUrlWithPage: string;
1444
1449
  currentPage: number;
1445
- totalPages: number;
1450
+ numPages: number;
1446
1451
  pdfName: string;
1447
1452
  zoom: number;
1448
1453
  onClose: () => void;
@@ -1455,23 +1460,23 @@ interface PdfFullscreenViewProps {
1455
1460
  canGoPrevious: boolean;
1456
1461
  canGoNext: boolean;
1457
1462
  }
1458
- declare const PdfFullscreenView: ({ pdfUrl, pdfUrlWithPage, currentPage, totalPages, pdfName, zoom, onClose, onDownload, onOpenAccessibility, onZoomIn, onZoomOut, onPreviousPage, onNextPage, canGoPrevious, canGoNext, }: PdfFullscreenViewProps) => React__default.ReactPortal | null;
1463
+ declare const PdfFullscreenView: ({ pdfUrl, pdfUrlWithPage, currentPage, numPages, pdfName, zoom, onClose, onDownload, onOpenAccessibility, onZoomIn, onZoomOut, onPreviousPage, onNextPage, canGoPrevious, canGoNext, }: PdfFullscreenViewProps) => React__default.ReactPortal | null;
1459
1464
 
1460
1465
  interface PdfReaderHeaderProps {
1461
1466
  pdfName: string;
1462
1467
  currentPage: number;
1463
- totalPages: number;
1468
+ numPages: number;
1464
1469
  isHovered: boolean;
1465
1470
  variant?: 'default' | 'fullscreen';
1466
1471
  onOpenAccessibility?: () => void;
1467
1472
  onDownload?: () => void;
1468
1473
  onClose?: () => void;
1469
1474
  }
1470
- declare const PdfReaderHeader: ({ pdfName, currentPage, totalPages, isHovered, variant, onOpenAccessibility, onDownload, onClose }: PdfReaderHeaderProps) => React__default.JSX.Element;
1475
+ declare const PdfReaderHeader: ({ pdfName, currentPage, numPages, isHovered, variant, onOpenAccessibility, onDownload, onClose }: PdfReaderHeaderProps) => React__default.JSX.Element;
1471
1476
 
1472
1477
  interface PdfFooterProps {
1473
1478
  currentPage: number;
1474
- totalPages: number;
1479
+ numPages: number;
1475
1480
  pdfUrl: string;
1476
1481
  isHovered: boolean;
1477
1482
  onToggleFullscreen?: () => void;
@@ -1480,7 +1485,7 @@ interface PdfFooterProps {
1480
1485
  onZoomIn?: () => void;
1481
1486
  onZoomOut?: () => void;
1482
1487
  }
1483
- declare const PdfFooter: ({ currentPage, totalPages, pdfUrl, isHovered, onToggleFullscreen, variant, zoom, onZoomIn, onZoomOut }: PdfFooterProps) => React__default.JSX.Element;
1488
+ declare const PdfFooter: ({ currentPage, numPages, pdfUrl, isHovered, onToggleFullscreen, variant, zoom, onZoomIn, onZoomOut }: PdfFooterProps) => React__default.JSX.Element;
1484
1489
 
1485
1490
  interface ControlButtonsProps {
1486
1491
  onPrevious: () => void;
@@ -1496,4 +1501,82 @@ interface ProgressBarProps {
1496
1501
  }
1497
1502
  declare const ProgressBar: ({ currentPage, totalPages }: ProgressBarProps) => React__default.JSX.Element;
1498
1503
 
1499
- export { ActivateAccountModal, AddRating, AddressAutocompleteInput, AnimatedModal, AutoDownloadBanner, AvatarRatingBadge, BaseInput, Button, ChatContacts, ChatListWrapper, ChatView, ChatViewDesktopPage, CheckBoxInput, ContactsModal, ControlButtons, CountryDisplay, CountryInput, CustomDateInput, CustomDrawer, CustomDropdown, CustomSelectInput, DateInput, DownloadMobileVersionBanner, DownloadModalTrigger, GradientModal, Header, MessageButton, MessagesButtonFromPage, MirantesButton, MirantesFoundationProvider, NoRecruitmentResponsiveIlustration, PageFloatFooter, PagesFeedTrigger, PdfFooter, PdfFullscreenView, PdfReader, PdfReaderHeader, ProgressBar, RadioButtonInput, RatingsCard, RattingSuggestionCard, ReactPostButton, ResponsiveDrawer, SalaryInputWithButton, Calendar as ScheduleCalendar, SharePostModal, ShareProfile, ShareProfileButton, ShareProfileModal, Spinner, WorkspacePanel, clearSettingsCookie, closeLogoutChannel, getInitials, getSettingsFromCookie, joinUrlWithPathAndQuery, onLogout, stringToObj, useApiGetPage, useAssetVersions, useBestAssetVersion, useCandidaciesTriggerStore, useCommunityTriggerStore, useJobTriggerStore, useLoadSettings, useMessageAppStore, useMirantesFoundation, useModalStore, useOportunitiesStore, usePeriodicDownloadBanner, useRestorePendingChat, useSetChatVisibility, useSignedUrl, useUploadAsset, useUploadAssetsBulk };
1504
+ interface ArticleContentProps {
1505
+ isOpen: boolean;
1506
+ onClose: () => void;
1507
+ }
1508
+ declare const ArticleContent: ({ isOpen, onClose }: ArticleContentProps) => React__default.JSX.Element;
1509
+
1510
+ type Profile = {
1511
+ id: string;
1512
+ name: string;
1513
+ avatar: string;
1514
+ role?: string;
1515
+ isPage?: boolean;
1516
+ };
1517
+ type ArticleViewMode = "create" | "view";
1518
+ type ArticleStep = "create" | "preview" | "published";
1519
+ type ArticleMedia = {
1520
+ id: string;
1521
+ url: string;
1522
+ type: "image" | "video";
1523
+ file?: File;
1524
+ };
1525
+
1526
+ type ArticleState = {
1527
+ title: string;
1528
+ content: string;
1529
+ post: Post | null;
1530
+ selectedProfile: Profile | null;
1531
+ media: ArticleMedia[];
1532
+ uploadedMedia: string[];
1533
+ isUploading: boolean;
1534
+ selectedHashtags: string[];
1535
+ viewMode: ArticleViewMode;
1536
+ currentStep: ArticleStep;
1537
+ isModalOpen: boolean;
1538
+ isSaved: boolean;
1539
+ isDraft: boolean;
1540
+ isPublishing: boolean;
1541
+ lastSavedAt: Date | null;
1542
+ setTitle: (title: string) => void;
1543
+ setContent: (content: string) => void;
1544
+ setPost: (post: Post | null) => void;
1545
+ setSelectedProfile: (profile: Profile | null) => void;
1546
+ addMedia: (media: ArticleMedia) => void;
1547
+ removeMedia: (id: string) => void;
1548
+ setIsUploading: (isUploading: boolean) => void;
1549
+ toggleHashtag: (hashtagId: string) => void;
1550
+ setSelectedHashtags: (hashtags: string[]) => void;
1551
+ setViewMode: (mode: ArticleViewMode) => void;
1552
+ setCurrentStep: (step: ArticleStep) => void;
1553
+ openModal: () => void;
1554
+ closeModal: () => void;
1555
+ setIsSaved: (isSaved: boolean) => void;
1556
+ setIsPublishing: (isPublishing: boolean) => void;
1557
+ markAsSaved: () => void;
1558
+ resetArticle: () => void;
1559
+ };
1560
+ declare const useArticleStore: zustand.UseBoundStore<zustand.StoreApi<ArticleState>>;
1561
+
1562
+ declare const useArticleNavigation: () => {
1563
+ viewMode: ArticleViewMode;
1564
+ currentStep: ArticleStep;
1565
+ isModalOpen: boolean;
1566
+ goToCreate: () => void;
1567
+ goToPreview: () => void;
1568
+ goToPublished: () => void;
1569
+ openModal: () => void;
1570
+ closeModal: () => void;
1571
+ resetAndClose: () => void;
1572
+ };
1573
+
1574
+ declare function CreatePostCard(): React__default.JSX.Element;
1575
+
1576
+ declare const PostCardArticle: ({ src, title, content }: {
1577
+ src?: string;
1578
+ title?: string;
1579
+ content?: string;
1580
+ }) => React__default.JSX.Element;
1581
+
1582
+ export { ActivateAccountModal, AddRating, AddressAutocompleteInput, AnimatedModal, ArticleContent, AutoDownloadBanner, AvatarRatingBadge, BaseInput, Button, ChatContacts, ChatListWrapper, ChatView, ChatViewDesktopPage, CheckBoxInput, ContactsModal, ControlButtons, CountryDisplay, CountryInput, CreatePostCard, CustomDateInput, CustomDrawer, CustomDropdown, CustomSelectInput, DateInput, DownloadMobileVersionBanner, DownloadModalTrigger, GradientModal, Header, MessageButton, MessagesButtonFromPage, MirantesButton, MirantesFoundationProvider, NoRecruitmentResponsiveIlustration, PageFloatFooter, PagesFeedTrigger, PdfFooter, PdfFullscreenView, PdfReader, PdfReaderHeader, PostCardArticle, ProgressBar, RadioButtonInput, RatingsCard, RattingSuggestionCard, ReactPostButton, ResponsiveDrawer, SalaryInputWithButton, Calendar as ScheduleCalendar, SharePostModal, ShareProfile, ShareProfileButton, ShareProfileModal, Spinner, WorkspacePanel, clearSettingsCookie, closeLogoutChannel, getInitials, getSettingsFromCookie, joinUrlWithPathAndQuery, onLogout, stringToObj, useApiGetPage, useArticleNavigation, useArticleStore, useAssetVersions, useBestAssetVersion, useCandidaciesTriggerStore, useCommunityTriggerStore, useJobTriggerStore, useLoadSettings, useMessageAppStore, useMirantesFoundation, useModalStore, useOportunitiesStore, usePeriodicDownloadBanner, useRestorePendingChat, useSetChatVisibility, useSignedUrl, useUploadAsset, useUploadAssetsBulk };