@medipha/feed 0.0.0-stage → 0.1.0

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.
Files changed (109) hide show
  1. package/dist/app/admin/newsfeed-admin-module.d.ts +3 -0
  2. package/dist/app/admin/newsfeed-admin-routes.d.ts +1 -0
  3. package/dist/app/header/feed-header.d.ts +1 -0
  4. package/dist/app/header/mentions-dropdown.d.ts +4 -0
  5. package/dist/app/newsfeed-module.d.ts +2 -0
  6. package/dist/app/newsfeed-module.types.d.ts +15 -0
  7. package/dist/app/newsfeed-routes.d.ts +1 -0
  8. package/dist/app/runtime/feed-runtime-context.d.ts +16 -0
  9. package/dist/app/runtime/feed-runtime-provider.d.ts +9 -0
  10. package/dist/app/runtime/feed-session.d.ts +11 -0
  11. package/dist/chunk-7ZGTUZFB-BT9LoQAb.cjs +1 -0
  12. package/dist/chunk-7ZGTUZFB-QFtA37kH.js +25972 -0
  13. package/dist/emojis-6L3GRBAP-Bdg3RGHz.js +5 -0
  14. package/dist/emojis-6L3GRBAP-DEEnjLJd.cjs +1 -0
  15. package/dist/features/comments/comment-composer.d.ts +10 -0
  16. package/dist/features/comments/comment-item.d.ts +12 -0
  17. package/dist/features/comments/comment-thread.d.ts +10 -0
  18. package/dist/features/comments/mention-box.d.ts +6 -0
  19. package/dist/features/comments/mention-filter.d.ts +8 -0
  20. package/dist/features/comments/mention-input.d.ts +4 -0
  21. package/dist/features/comments/mention-options.d.ts +3 -0
  22. package/dist/features/comments/post-comments-modal.d.ts +11 -0
  23. package/dist/features/comments/use-mention-search.d.ts +9 -0
  24. package/dist/features/composer/category-select.d.ts +8 -0
  25. package/dist/features/composer/composer-form.d.ts +19 -0
  26. package/dist/features/composer/create-post-button.d.ts +8 -0
  27. package/dist/features/composer/create-post-modal.d.ts +12 -0
  28. package/dist/features/composer/format-text.d.ts +26 -0
  29. package/dist/features/composer/format-toolbar.d.ts +21 -0
  30. package/dist/features/composer/media-picker.d.ts +18 -0
  31. package/dist/features/composer/post-preview-modal.d.ts +7 -0
  32. package/dist/features/feed/department-filter.d.ts +8 -0
  33. package/dist/features/feed/feed-page.d.ts +1 -0
  34. package/dist/features/feed/left-rail.d.ts +9 -0
  35. package/dist/features/feed/my-posts-page.d.ts +1 -0
  36. package/dist/features/feed/post-detail-page.d.ts +1 -0
  37. package/dist/features/feed/sidebar/category-nav.d.ts +9 -0
  38. package/dist/features/feed/sidebar/discussion-channels.d.ts +9 -0
  39. package/dist/features/feed/sidebar/feed-calendar.d.ts +12 -0
  40. package/dist/features/feed/sidebar/profile-card.d.ts +1 -0
  41. package/dist/features/feed/use-feed-filters.d.ts +15 -0
  42. package/dist/features/feed/widgets/birthdays-widget.d.ts +1 -0
  43. package/dist/features/feed/widgets/feed-footer.d.ts +1 -0
  44. package/dist/features/feed/widgets/mentions-widget.d.ts +1 -0
  45. package/dist/features/feed/widgets/post-detail-modal.d.ts +10 -0
  46. package/dist/features/feed/widgets/review-progress-widget.d.ts +3 -0
  47. package/dist/features/feed/widgets/top-contributors-widget.d.ts +1 -0
  48. package/dist/features/feed/widgets/trending-hashtags-widget.d.ts +8 -0
  49. package/dist/features/feed/widgets/weekly-highlight-widget.d.ts +1 -0
  50. package/dist/features/feed/widgets/widget-card.d.ts +9 -0
  51. package/dist/features/manage/categories/category-settings-page.d.ts +2 -0
  52. package/dist/features/manage/posts/author-select.d.ts +7 -0
  53. package/dist/features/manage/posts/manage-posts-page.d.ts +1 -0
  54. package/dist/features/manage/posts/post-summary-cell.d.ts +8 -0
  55. package/dist/features/manage/posts/review-drawer.d.ts +13 -0
  56. package/dist/features/manage/reports/overview-cards.d.ts +7 -0
  57. package/dist/features/manage/reports/period-switch.d.ts +8 -0
  58. package/dist/features/manage/reports/reports-page.d.ts +1 -0
  59. package/dist/features/manage/reports/top-posts-table.d.ts +8 -0
  60. package/dist/features/manage/reports/top-users-table.d.ts +5 -0
  61. package/dist/features/manage/reports/trend-chart.d.ts +4 -0
  62. package/dist/features/manage/settings/settings-page.d.ts +2 -0
  63. package/dist/features/post/card/confirm-delete-post.d.ts +2 -0
  64. package/dist/features/post/card/featured-tag.d.ts +2 -0
  65. package/dist/features/post/card/post-actions-menu.d.ts +7 -0
  66. package/dist/features/post/card/post-card.d.ts +15 -0
  67. package/dist/features/post/card/post-delete-button.d.ts +10 -0
  68. package/dist/features/post/card/post-header.d.ts +9 -0
  69. package/dist/features/post/card/post-status-tag.d.ts +5 -0
  70. package/dist/features/post/card/post-status.d.ts +13 -0
  71. package/dist/features/post/content/clamped-text.d.ts +11 -0
  72. package/dist/features/post/content/document-icon.d.ts +3 -0
  73. package/dist/features/post/content/document-preview-url.d.ts +7 -0
  74. package/dist/features/post/content/link-preview-card.d.ts +9 -0
  75. package/dist/features/post/content/mention-card.d.ts +8 -0
  76. package/dist/features/post/content/post-documents.d.ts +4 -0
  77. package/dist/features/post/content/post-images.d.ts +4 -0
  78. package/dist/features/post/content/post-videos.d.ts +4 -0
  79. package/dist/features/post/content/rich-content.d.ts +10 -0
  80. package/dist/features/post/content/use-link-preview.d.ts +15 -0
  81. package/dist/features/post/interactions/post-engagement-stats.d.ts +5 -0
  82. package/dist/features/post/interactions/post-reaction-bar.d.ts +11 -0
  83. package/dist/features/post/interactions/reaction-button.d.ts +11 -0
  84. package/dist/features/post/interactions/reaction-picker.d.ts +7 -0
  85. package/dist/features/post/interactions/reactors-modal.d.ts +8 -0
  86. package/dist/features/post/interactions/share-button.d.ts +11 -0
  87. package/dist/features/post/list/post-list.d.ts +10 -0
  88. package/dist/index.cjs +25 -0
  89. package/dist/index.d.ts +4 -0
  90. package/dist/index.js +11437 -0
  91. package/dist/shared/brand.d.ts +5 -0
  92. package/dist/shared/components/date-range-select.d.ts +8 -0
  93. package/dist/shared/components/emoji-picker.d.ts +6 -0
  94. package/dist/shared/components/page-header.d.ts +8 -0
  95. package/dist/shared/components/publisher-avatar.d.ts +3 -0
  96. package/dist/shared/components/typing-dots.d.ts +6 -0
  97. package/dist/shared/components/user-avatar.d.ts +7 -0
  98. package/dist/shared/hooks/use-async-data.d.ts +8 -0
  99. package/dist/shared/hooks/use-cursor-list.d.ts +18 -0
  100. package/dist/shared/hooks/use-in-view.d.ts +2 -0
  101. package/dist/shared/hooks/use-keyed-request.d.ts +8 -0
  102. package/dist/shared/hooks/use-optimistic-reaction.d.ts +10 -0
  103. package/dist/shared/utils/date-range.d.ts +7 -0
  104. package/dist/shared/utils/format.d.ts +7 -0
  105. package/dist/shared/utils/reactions.d.ts +8 -0
  106. package/dist/shared/utils/upload-error.d.ts +5 -0
  107. package/dist/styles.css +2 -0
  108. package/package.json +85 -3
  109. package/README.md +0 -3
@@ -0,0 +1,3 @@
1
+ import { NewsfeedAdminModuleProps } from '../newsfeed-module.types';
2
+ /** Admin side of the newsfeed: create posts, review/approve them and view reports. */
3
+ export declare function NewsfeedAdminModule(adminModuleProps: NewsfeedAdminModuleProps): import('react/jsx-runtime').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function NewsfeedAdminRoutes(): import('react/jsx-runtime').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FeedHeader(): import('react/jsx-runtime').JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ReactElement } from 'react';
2
+ export declare function MentionsDropdown({ children }: {
3
+ children: ReactElement;
4
+ }): import('react/jsx-runtime').JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { NewsfeedModuleProps } from './newsfeed-module.types';
2
+ export declare function NewsfeedModule(newsfeedModuleProps: NewsfeedModuleProps): import('react/jsx-runtime').JSX.Element;
@@ -0,0 +1,15 @@
1
+ export interface NewsfeedModuleProps {
2
+ accessToken: string;
3
+ apiUrl: string;
4
+ chatApiUrl: string;
5
+ basePath: string;
6
+ onUnauthorized?: () => void;
7
+ onRefreshToken?: () => Promise<string>;
8
+ onNavigateOutsideFeed?: (path: string) => void;
9
+ /**
10
+ * The feed never offers post creation (that lives in NewsfeedAdminModule).
11
+ * false also disables reactions, comments and the post actions menu. Defaults to true.
12
+ */
13
+ isPostFeed?: boolean;
14
+ }
15
+ export type NewsfeedAdminModuleProps = Omit<NewsfeedModuleProps, 'isPostFeed'>;
@@ -0,0 +1 @@
1
+ export declare function NewsfeedRoutes(): import('react/jsx-runtime').JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { FeedApi, FeedMe } from '@medipha/feed-core';
2
+ import { NewsfeedModuleProps } from '../newsfeed-module.types';
3
+ export interface FeedRuntime {
4
+ api: FeedApi;
5
+ me: FeedMe;
6
+ basePath: string;
7
+ chatApiUrl: string;
8
+ isPostFeed: boolean;
9
+ /** True inside NewsfeedAdminModule: enables admin-only actions such as deleting posts. */
10
+ isAdmin: boolean;
11
+ postUrl: (postId: string) => string;
12
+ postUrlPath: (postId: string) => string;
13
+ onNavigateOutsideFeed?: NewsfeedModuleProps['onNavigateOutsideFeed'];
14
+ }
15
+ export declare const FeedRuntimeContext: import('react').Context<FeedRuntime | undefined>;
16
+ export declare function useFeedRuntime(): FeedRuntime;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { NewsfeedModuleProps } from '../newsfeed-module.types';
3
+ interface FeedRuntimeProviderProps {
4
+ runtimeProps: NewsfeedModuleProps;
5
+ isAdmin?: boolean;
6
+ children: ReactNode;
7
+ }
8
+ export declare function FeedRuntimeProvider({ runtimeProps, isAdmin, children, }: FeedRuntimeProviderProps): import('react/jsx-runtime').JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FeedApi } from '@medipha/feed-core';
2
+ import { NewsfeedModuleProps } from '../newsfeed-module.types';
3
+ type SessionProps = Pick<NewsfeedModuleProps, 'accessToken' | 'onRefreshToken' | 'onUnauthorized'>;
4
+ export declare class FeedSession {
5
+ readonly api: FeedApi;
6
+ private props;
7
+ constructor(apiUrl: string);
8
+ update(props: SessionProps): void;
9
+ private refreshAccessToken;
10
+ }
11
+ export {};