@itsyouagency/ui 1.46.0 → 1.48.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 (71) hide show
  1. package/README.md +93 -0
  2. package/dist/assets/css/design-system.css +4014 -0
  3. package/dist/assets/icons/archive.svg +3 -0
  4. package/dist/assets/icons/bell-01.svg +1 -1
  5. package/dist/components/base/Button.d.ts +6 -2
  6. package/dist/components/base/Icon.d.ts +1 -0
  7. package/dist/components/base/IconButton.d.ts +10 -10
  8. package/dist/components/base/Input.d.ts +2 -3
  9. package/dist/components/base/InputWrapper.d.ts +3 -1
  10. package/dist/components/base/Tabs.d.ts +8 -1
  11. package/dist/components/base/TextArea.d.ts +2 -2
  12. package/dist/components/chat/ChatConversationList.d.ts +11 -0
  13. package/dist/components/chat/ChatCreatePage.d.ts +9 -0
  14. package/dist/components/chat/ChatGroupDialog.d.ts +1 -0
  15. package/dist/components/chat/ChatGroupForm.d.ts +14 -0
  16. package/dist/components/chat/ChatMessageEditor.d.ts +11 -0
  17. package/dist/components/chat/ChatRequestPicker.d.ts +10 -0
  18. package/dist/components/chat/ChatThread.d.ts +21 -0
  19. package/dist/components/chat/ChatWorkspace.d.ts +12 -0
  20. package/dist/components/chat/RequestChat.d.ts +7 -0
  21. package/dist/components/chat/api.d.ts +44 -0
  22. package/dist/components/chat/grouping.d.ts +7 -0
  23. package/dist/components/chat/index.d.ts +6 -0
  24. package/dist/components/chat/labels.d.ts +195 -0
  25. package/dist/components/chat/types.d.ts +81 -0
  26. package/dist/components/chat/utils.d.ts +5 -0
  27. package/dist/components/notifications/Notifications.d.ts +12 -0
  28. package/dist/components/notifications/useNotificationFeed.d.ts +33 -0
  29. package/dist/components/request-files/FileDownloadButton.d.ts +5 -0
  30. package/dist/components/request-files/RequestContracts.d.ts +14 -0
  31. package/dist/components/request-files/RequestFileDialog.d.ts +11 -0
  32. package/dist/components/request-files/RequestResources.d.ts +15 -0
  33. package/dist/components/request-files/api.d.ts +8 -0
  34. package/dist/components/reviews/OrderReviews.d.ts +6 -0
  35. package/dist/components/reviews/StarRating.d.ts +8 -0
  36. package/dist/components/workspace/ActionDialog.d.ts +11 -0
  37. package/dist/components/workspace/ChoiceChips.d.ts +11 -0
  38. package/dist/components/workspace/CommandMenu.d.ts +8 -0
  39. package/dist/components/workspace/ContactDetails.d.ts +25 -0
  40. package/dist/components/workspace/ContractFields.d.ts +23 -0
  41. package/dist/components/workspace/DataRegion.d.ts +19 -0
  42. package/dist/components/workspace/DocumentEditor.d.ts +12 -0
  43. package/dist/components/workspace/DocumentPreview.d.ts +5 -0
  44. package/dist/components/workspace/FaqCenter.d.ts +46 -0
  45. package/dist/components/workspace/Feedback.d.ts +27 -0
  46. package/dist/components/workspace/FilterTabs.d.ts +17 -0
  47. package/dist/components/workspace/FormActions.d.ts +6 -0
  48. package/dist/components/workspace/FormField.d.ts +24 -0
  49. package/dist/components/workspace/MetricCard.d.ts +13 -0
  50. package/dist/components/workspace/NotificationMenu.d.ts +8 -0
  51. package/dist/components/workspace/PageHeader.d.ts +9 -0
  52. package/dist/components/workspace/Pagination.d.ts +14 -0
  53. package/dist/components/workspace/Panel.d.ts +12 -0
  54. package/dist/components/workspace/Progress.d.ts +5 -0
  55. package/dist/components/workspace/SearchMultiSelect.d.ts +14 -0
  56. package/dist/components/workspace/SearchSelect.d.ts +24 -0
  57. package/dist/components/workspace/SettingToggle.d.ts +12 -0
  58. package/dist/components/workspace/WorkspaceNav.d.ts +8 -0
  59. package/dist/components/workspace/index.d.ts +29 -0
  60. package/dist/components/workspace/navigation.d.ts +33 -0
  61. package/dist/components/workspace/search.d.ts +10 -0
  62. package/dist/index.d.ts +4 -0
  63. package/dist/index.js +1 -2
  64. package/dist/layouts/index.d.ts +2 -0
  65. package/dist/layouts/workspace.d.ts +31 -0
  66. package/dist/layouts/workspaceAuth.d.ts +13 -0
  67. package/dist/tailwind.workspace.config.d.ts +3 -0
  68. package/dist/tailwind.workspace.config.js +1 -0
  69. package/package.json +5 -3
  70. package/dist/assets/logos/mark.svg +0 -10
  71. package/dist/index.js.LICENSE.txt +0 -40
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4 8v11a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V8M9 12h6M3 4h18v4H3V4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
3
+ </svg>
@@ -1,3 +1,3 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M9.35419 21C10.0593 21.6224 10.9856 22 12 22C13.0145 22 13.9407 21.6224 14.6458 21M18 8C18 6.4087 17.3679 4.88258 16.2427 3.75736C15.1174 2.63214 13.5913 2 12 2C10.4087 2 8.8826 2.63214 7.75738 3.75736C6.63216 4.88258 6.00002 6.4087 6.00002 8C6.00002 11.0902 5.22049 13.206 4.34968 14.6054C3.61515 15.7859 3.24788 16.3761 3.26134 16.5408C3.27626 16.7231 3.31488 16.7926 3.46179 16.9016C3.59448 17 4.19261 17 5.38887 17H18.6112C19.8074 17 20.4056 17 20.5382 16.9016C20.6852 16.7926 20.7238 16.7231 20.7387 16.5408C20.7522 16.3761 20.3849 15.7859 19.6504 14.6054C18.7795 13.206 18 11.0902 18 8Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
3
  </svg>
@@ -3,11 +3,15 @@ import { IconType } from './Icon';
3
3
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  filled?: boolean;
5
5
  styleType?: 'dark' | 'light';
6
+ variant?: 'primary' | 'secondary' | 'ghost';
7
+ size?: 'sm' | 'md' | 'lg';
6
8
  href?: string;
9
+ target?: string;
10
+ rel?: string;
7
11
  icon?: IconType;
12
+ trailingIcon?: IconType;
8
13
  wrapperClassName?: string;
9
14
  iconClassName?: string;
10
15
  isLoading?: boolean;
11
16
  }
12
- declare const Button: ({ styleType, children, className, wrapperClassName, icon, href, isLoading, iconClassName, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
13
- export default Button;
17
+ export default function Button({ styleType, variant, size, children, className, wrapperClassName, icon, trailingIcon, href, isLoading, iconClassName, disabled, filled: _filled, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  declare const map: {
3
+ Archive: React.FC<React.SVGProps<SVGSVGElement>>;
3
4
  Upload: React.FC<React.SVGProps<SVGSVGElement>>;
4
5
  Download: React.FC<React.SVGProps<SVGSVGElement>>;
5
6
  User: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -1,15 +1,15 @@
1
- import { HTMLAttributeAnchorTarget, MouseEventHandler } from 'react';
1
+ import { ButtonHTMLAttributes, MouseEventHandler } from 'react';
2
2
  import { IconType } from './Icon';
3
- declare const IconButton: ({ onClick, icon, isLoading, href, target, disabled, className, size, iconClassName, loaderColor, }: {
4
- onClick?: MouseEventHandler<HTMLDivElement>;
5
- isLoading?: boolean;
3
+ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
4
+ onClick?: MouseEventHandler<any>;
6
5
  icon: IconType;
7
- href?: HTMLAttributeAnchorTarget;
6
+ isLoading?: boolean;
7
+ href?: string;
8
8
  target?: string;
9
- disabled?: boolean;
10
- className?: string;
9
+ rel?: string;
11
10
  iconClassName?: string;
12
11
  size?: number;
13
- loaderColor?: "light" | "dark";
14
- }) => import("react/jsx-runtime").JSX.Element;
15
- export default IconButton;
12
+ loaderColor?: 'light' | 'dark';
13
+ }
14
+ export default function IconButton({ onClick, icon, isLoading, href, target, rel, disabled, className, size, iconClassName, loaderColor, title, ...rest }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -4,9 +4,8 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
4
4
  icon?: IconType;
5
5
  wrapperClassName?: string;
6
6
  label?: string;
7
- placeholder?: string;
8
7
  error?: string;
9
8
  hideError?: boolean;
10
9
  }
11
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
12
- export default Input;
10
+ declare const _default: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
11
+ export default _default;
@@ -1,7 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
- declare const InputWrapper: ({ label, children, className, error, hideError, info, toolTipWrapperClassName, toolTipHeaderClassName, toolTipContentClassName, }: {
2
+ declare const InputWrapper: ({ label, htmlFor, errorId, children, className, error, hideError, info, toolTipWrapperClassName, toolTipHeaderClassName, toolTipContentClassName, }: {
3
3
  children: ReactNode;
4
4
  label?: string;
5
+ htmlFor?: string;
6
+ errorId?: string;
5
7
  className?: string;
6
8
  error?: string;
7
9
  hideError?: boolean;
@@ -3,12 +3,19 @@ interface Props {
3
3
  items: {
4
4
  name: string;
5
5
  panel: ReactNode;
6
+ count?: number;
6
7
  }[];
8
+ variant?: 'segmented' | 'underline';
9
+ label?: string;
10
+ selectedIndex?: number;
11
+ onChange?: (index: number) => void;
12
+ /** Preserve forms and drafts while switching between panels. */
13
+ keepMounted?: boolean;
7
14
  listClassName?: string;
8
15
  wrapperClassName?: string;
9
16
  listWrapperClassName?: string;
10
17
  buttonClassName?: string;
11
18
  selectedClassName?: string;
12
19
  }
13
- export default function Tabs({ items, listClassName, buttonClassName, listWrapperClassName, selectedClassName, wrapperClassName, }: Props): import("react/jsx-runtime").JSX.Element;
20
+ export default function Tabs({ items, listClassName, buttonClassName, listWrapperClassName, selectedClassName, wrapperClassName, variant, label, selectedIndex, onChange, keepMounted, }: Props): import("react/jsx-runtime").JSX.Element;
14
21
  export {};
@@ -1,5 +1,5 @@
1
- import React, { InputHTMLAttributes, PropsWithChildren } from 'react';
2
- export interface TextAreaProps extends PropsWithChildren<InputHTMLAttributes<HTMLTextAreaElement>> {
1
+ import React, { TextareaHTMLAttributes, PropsWithChildren } from 'react';
2
+ export interface TextAreaProps extends PropsWithChildren<TextareaHTMLAttributes<HTMLTextAreaElement>> {
3
3
  label?: string;
4
4
  error?: string;
5
5
  wrapperClassName?: string;
@@ -0,0 +1,11 @@
1
+ import type { ChatGrouping, ChatLocale, ChatSummary } from './types';
2
+ import type { ChatLabels } from './labels';
3
+ export default function ChatConversationList({ chats, grouping, selected, onSelect, locale, labels: t, search, }: {
4
+ chats: ChatSummary[];
5
+ grouping: ChatGrouping;
6
+ selected?: string;
7
+ onSelect: (id: string) => void;
8
+ locale: ChatLocale;
9
+ labels: ChatLabels;
10
+ search: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ChatDetail, ChatLocale } from './types';
2
+ /** Request-based creation uses the same form and validation as the chat editor. */
3
+ export default function ChatCreatePage({ apiBaseUrl, clientRequestId, locale, onCancel, onCreated, }: {
4
+ apiBaseUrl: string;
5
+ clientRequestId: string;
6
+ locale?: ChatLocale;
7
+ onCancel: () => void;
8
+ onCreated: (chat: ChatDetail) => void;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from './ChatGroupForm';
@@ -0,0 +1,14 @@
1
+ import type { ChatApi } from './api';
2
+ import type { ChatDetail, ChatGroupDefaults, ChatViewer } from './types';
3
+ import type { ChatLabels } from './labels';
4
+ export default function ChatGroupForm({ api, viewer, chat, initialValues, presentation, lockRequest, labels: t, onClose, onSaved, }: {
5
+ api: ChatApi;
6
+ viewer: ChatViewer;
7
+ chat?: ChatDetail;
8
+ initialValues?: ChatGroupDefaults;
9
+ presentation?: 'dialog' | 'page';
10
+ lockRequest?: boolean;
11
+ labels: ChatLabels;
12
+ onClose: () => void;
13
+ onSaved: (chat: ChatDetail) => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { type ChatApi } from './api';
2
+ import type { ChatMessage } from './types';
3
+ import type { ChatLabels } from './labels';
4
+ export default function ChatMessageEditor({ api, chatId, message, labels: t, onClose, onSaved, }: {
5
+ api: ChatApi;
6
+ chatId: string;
7
+ message: ChatMessage;
8
+ labels: ChatLabels;
9
+ onClose: () => void;
10
+ onSaved: (message: ChatMessage) => void;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ChatApi } from './api';
2
+ import type { ChatLabels } from './labels';
3
+ import type { ChatRequest } from './types';
4
+ export default function ChatRequestPicker({ api, value, onChange, disabled, labels: t, }: {
5
+ api: ChatApi;
6
+ value: ChatRequest | null;
7
+ onChange: (request: ChatRequest | null) => void;
8
+ disabled?: boolean;
9
+ labels: ChatLabels;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { type ChatApi } from './api';
2
+ import type { ChatDetail, ChatLocale, ChatMessage, ChatViewer } from './types';
3
+ import type { ChatLabels } from './labels';
4
+ export default function ChatThread({ api, id, viewer, canManage, locale, labels: t, draft, onDraft, onBack, onManage, onRead, sendDraft, sendingInBackground, refresh, onChanged, onArchived, }: {
5
+ api: ChatApi;
6
+ id: string;
7
+ viewer: ChatViewer;
8
+ canManage: boolean;
9
+ locale: ChatLocale;
10
+ labels: ChatLabels;
11
+ draft: string;
12
+ onDraft: (id: string, text: string) => void;
13
+ onBack: () => void;
14
+ onManage: (chat: ChatDetail) => void;
15
+ onRead: (id: string, sequence: number) => void;
16
+ sendDraft: (id: string, body: string) => Promise<ChatMessage>;
17
+ sendingInBackground: boolean;
18
+ refresh: number;
19
+ onChanged: () => void;
20
+ onArchived: (chat: ChatDetail) => void;
21
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ChatLocale, ChatGrouping } from './types';
2
+ /** Shared messaging feature. The API remains the authority for all permissions. */
3
+ export default function ChatWorkspace({ apiBaseUrl, locale, allowManagement, grouping, clientRequestId, embedded, selectedChatId, onSelectChat, }: {
4
+ apiBaseUrl: string;
5
+ locale?: ChatLocale;
6
+ allowManagement?: boolean;
7
+ grouping?: ChatGrouping;
8
+ clientRequestId?: string;
9
+ embedded?: boolean;
10
+ selectedChatId?: string;
11
+ onSelectChat?: (id: string | undefined) => void;
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { ChatLocale } from './types';
2
+ /** Embedded request conversations share the inbox, message history and composer. */
3
+ export default function RequestChat({ apiBaseUrl, clientRequestId, locale, }: {
4
+ apiBaseUrl: string;
5
+ clientRequestId: string;
6
+ locale?: ChatLocale;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import type { ChatDetail, ChatDraft, ChatMessage, ChatPerson, ChatRequest, ChatRequestDraft, ChatSummary, ChatViewer } from './types';
2
+ export declare class ChatApiError extends Error {
3
+ status: number;
4
+ constructor(message: string, status: number);
5
+ }
6
+ export declare function createChatApi(baseUrl: string): {
7
+ list: (q: string, cursor?: string, signal?: AbortSignal, clientRequestId?: string, archived?: boolean) => Promise<{
8
+ viewer: ChatViewer;
9
+ generalChat?: ChatSummary | null;
10
+ archivedCount?: number;
11
+ items: ChatSummary[];
12
+ nextCursor: string | null;
13
+ }>;
14
+ detail: (id: string, signal?: AbortSignal) => Promise<ChatDetail>;
15
+ directory: (q: string, role?: string, cursor?: string, signal?: AbortSignal) => Promise<{
16
+ items: ChatPerson[];
17
+ nextCursor: string | null;
18
+ }>;
19
+ requests: (q: string, cursor?: string, signal?: AbortSignal) => Promise<{
20
+ items: ChatRequest[];
21
+ nextCursor: string | null;
22
+ }>;
23
+ requestDraft: (clientRequestId: string, signal?: AbortSignal) => Promise<ChatRequestDraft>;
24
+ create: (draft: ChatDraft) => Promise<ChatDetail>;
25
+ update: (id: string, revision: number, draft: ChatDraft) => Promise<ChatDetail>;
26
+ messages: (chatId: string, position?: {
27
+ before?: number;
28
+ after?: number;
29
+ }, signal?: AbortSignal) => Promise<{
30
+ items: ChatMessage[];
31
+ hasMore: boolean;
32
+ }>;
33
+ send: (chatId: string, body: string, clientMessageId: string) => Promise<ChatMessage>;
34
+ read: (chatId: string, sequence: number) => Promise<{
35
+ ok: true;
36
+ }>;
37
+ archive: (chatId: string, archived: boolean) => Promise<ChatDetail>;
38
+ edit: (chatId: string, messageId: string, body: string, editSequence: number) => Promise<ChatMessage>;
39
+ edits: (chatId: string, after: number, signal?: AbortSignal) => Promise<{
40
+ items: ChatMessage[];
41
+ hasMore: boolean;
42
+ }>;
43
+ };
44
+ export type ChatApi = ReturnType<typeof createChatApi>;
@@ -0,0 +1,7 @@
1
+ import type { ChatRequest, ChatSummary } from './types';
2
+ export type ChatClientGroup = {
3
+ id: string;
4
+ client: ChatRequest['client'] | null;
5
+ chats: ChatSummary[];
6
+ };
7
+ export declare function groupConversations(chats: ChatSummary[]): ChatClientGroup[];
@@ -0,0 +1,6 @@
1
+ export { default as ChatWorkspace } from './ChatWorkspace';
2
+ export { createChatApi, ChatApiError } from './api';
3
+ export type { ChatApi } from './api';
4
+ export type { ChatDetail, ChatGroupDefaults, ChatRequestDraft, ChatDraft, ChatLocale, ChatMessage, ChatPerson, ChatRole, ChatRequest, ChatGrouping, ChatSummary, ChatViewer, } from './types';
5
+ export { default as ChatCreatePage } from './ChatCreatePage';
6
+ export { default as RequestChat } from './RequestChat';
@@ -0,0 +1,195 @@
1
+ export declare const chatLabels: {
2
+ en: {
3
+ subtitle: string;
4
+ newChat: string;
5
+ requestCreateHint: string;
6
+ missingClientAccount: string;
7
+ missingModelAccounts: string;
8
+ requestChatHint: string;
9
+ noRequestChats: string;
10
+ noRequestChatsHint: string;
11
+ chats: string;
12
+ search: string;
13
+ request: string;
14
+ general: string;
15
+ generalChat: string;
16
+ agencyTeam: string;
17
+ generalHint: string;
18
+ generalFirstMessage: string;
19
+ generalFirstMessageHint: string;
20
+ generalDetails: string;
21
+ generalPrivate: string;
22
+ staffInboxHint: string;
23
+ noRequest: string;
24
+ selectRequest: string;
25
+ changeRequest: string;
26
+ searchRequests: string;
27
+ noRequests: string;
28
+ requestHint: string;
29
+ all: string;
30
+ unread: string;
31
+ archived: string;
32
+ archive: string;
33
+ restore: string;
34
+ archiveHint: string;
35
+ archiveError: string;
36
+ noArchived: string;
37
+ noArchivedHint: string;
38
+ edited: string;
39
+ editMessage: string;
40
+ editHint: string;
41
+ editError: string;
42
+ editConflict: string;
43
+ noChats: string;
44
+ noChatsHint: string;
45
+ noChatsAdmin: string;
46
+ noResults: string;
47
+ noResultsHint: string;
48
+ choose: string;
49
+ chooseHint: string;
50
+ participants: string;
51
+ manage: string;
52
+ back: string;
53
+ send: string;
54
+ sending: string;
55
+ placeholder: string;
56
+ composer: string;
57
+ hint: string;
58
+ firstMessage: string;
59
+ firstMessageHint: string;
60
+ more: string;
61
+ older: string;
62
+ loading: string;
63
+ retry: string;
64
+ error: string;
65
+ reconnect: string;
66
+ sendError: string;
67
+ you: string;
68
+ today: string;
69
+ yesterday: string;
70
+ details: string;
71
+ groupName: string;
72
+ groupNamePlaceholder: string;
73
+ description: string;
74
+ descriptionPlaceholder: string;
75
+ searchPeople: string;
76
+ allRoles: string;
77
+ admin: string;
78
+ member: string;
79
+ client: string;
80
+ model: string;
81
+ removed: string;
82
+ selected: string;
83
+ create: string;
84
+ save: string;
85
+ cancel: string;
86
+ close: string;
87
+ createHint: string;
88
+ historyHint: string;
89
+ selfHint: string;
90
+ choosePeople: string;
91
+ noPeople: string;
92
+ remove: string;
93
+ private: string;
94
+ newMessages: string;
95
+ readOnly: string;
96
+ saved: string;
97
+ };
98
+ de: {
99
+ subtitle: string;
100
+ newChat: string;
101
+ requestCreateHint: string;
102
+ missingClientAccount: string;
103
+ missingModelAccounts: string;
104
+ requestChatHint: string;
105
+ noRequestChats: string;
106
+ noRequestChatsHint: string;
107
+ chats: string;
108
+ search: string;
109
+ request: string;
110
+ general: string;
111
+ generalChat: string;
112
+ agencyTeam: string;
113
+ generalHint: string;
114
+ generalFirstMessage: string;
115
+ generalFirstMessageHint: string;
116
+ generalDetails: string;
117
+ generalPrivate: string;
118
+ staffInboxHint: string;
119
+ noRequest: string;
120
+ selectRequest: string;
121
+ changeRequest: string;
122
+ searchRequests: string;
123
+ noRequests: string;
124
+ requestHint: string;
125
+ all: string;
126
+ unread: string;
127
+ archived: string;
128
+ archive: string;
129
+ restore: string;
130
+ archiveHint: string;
131
+ archiveError: string;
132
+ noArchived: string;
133
+ noArchivedHint: string;
134
+ edited: string;
135
+ editMessage: string;
136
+ editHint: string;
137
+ editError: string;
138
+ editConflict: string;
139
+ noChats: string;
140
+ noChatsHint: string;
141
+ noChatsAdmin: string;
142
+ noResults: string;
143
+ noResultsHint: string;
144
+ choose: string;
145
+ chooseHint: string;
146
+ participants: string;
147
+ manage: string;
148
+ back: string;
149
+ send: string;
150
+ sending: string;
151
+ placeholder: string;
152
+ composer: string;
153
+ hint: string;
154
+ firstMessage: string;
155
+ firstMessageHint: string;
156
+ more: string;
157
+ older: string;
158
+ loading: string;
159
+ retry: string;
160
+ error: string;
161
+ reconnect: string;
162
+ sendError: string;
163
+ you: string;
164
+ today: string;
165
+ yesterday: string;
166
+ details: string;
167
+ groupName: string;
168
+ groupNamePlaceholder: string;
169
+ description: string;
170
+ descriptionPlaceholder: string;
171
+ searchPeople: string;
172
+ allRoles: string;
173
+ admin: string;
174
+ member: string;
175
+ client: string;
176
+ model: string;
177
+ removed: string;
178
+ selected: string;
179
+ create: string;
180
+ save: string;
181
+ cancel: string;
182
+ close: string;
183
+ createHint: string;
184
+ historyHint: string;
185
+ selfHint: string;
186
+ choosePeople: string;
187
+ noPeople: string;
188
+ remove: string;
189
+ private: string;
190
+ newMessages: string;
191
+ readOnly: string;
192
+ saved: string;
193
+ };
194
+ };
195
+ export type ChatLabels = typeof chatLabels.en;
@@ -0,0 +1,81 @@
1
+ export type ChatRole = 'ADMIN' | 'MEMBER' | 'CLIENT' | 'USER' | 'REMOVED';
2
+ export type ChatPerson = {
3
+ id: string;
4
+ name: string;
5
+ role: ChatRole;
6
+ email?: string;
7
+ client?: {
8
+ id?: string;
9
+ name: string;
10
+ } | null;
11
+ };
12
+ export type ChatViewer = ChatPerson & {
13
+ canManage: boolean;
14
+ };
15
+ export type ChatSummary = {
16
+ kind?: 'GROUP' | 'GENERAL';
17
+ isUnstarted?: boolean;
18
+ archived?: boolean;
19
+ editSequence?: number;
20
+ owner?: ChatPerson | null;
21
+ request?: ChatRequest | null;
22
+ id: string;
23
+ title: string;
24
+ description: string;
25
+ revision: number;
26
+ participantCount: number;
27
+ unreadCount: number;
28
+ lastReadSequence: number;
29
+ messageSequence: number;
30
+ lastMessage: {
31
+ senderName: string;
32
+ body: string;
33
+ createdAt: string;
34
+ } | null;
35
+ createdAt: string | null;
36
+ updatedAt: string | null;
37
+ };
38
+ export type ChatDetail = ChatSummary & {
39
+ participants: ChatPerson[];
40
+ };
41
+ export type ChatMessage = {
42
+ id: string;
43
+ chatId: string;
44
+ senderId: string;
45
+ senderName: string;
46
+ senderRole: ChatRole;
47
+ body: string;
48
+ editSequence?: number;
49
+ editedAt?: string | null;
50
+ sequence: number;
51
+ clientMessageId: string;
52
+ createdAt: string;
53
+ };
54
+ export type ChatDraft = {
55
+ clientRequestId?: string | null;
56
+ title: string;
57
+ description: string;
58
+ participantIds: string[];
59
+ };
60
+ export type ChatLocale = 'en' | 'de';
61
+ export type ChatRequest = {
62
+ id: string;
63
+ project: string;
64
+ client: {
65
+ id: string;
66
+ name: string;
67
+ };
68
+ };
69
+ export type ChatGrouping = 'client' | 'none';
70
+ export type ChatGroupDefaults = {
71
+ title: string;
72
+ description: string;
73
+ request: ChatRequest | null;
74
+ participants: ChatPerson[];
75
+ };
76
+ export type ChatRequestDraft = {
77
+ viewer: ChatViewer;
78
+ draft: ChatGroupDefaults;
79
+ missingModelAccounts: number;
80
+ missingClientAccount: boolean;
81
+ };
@@ -0,0 +1,5 @@
1
+ import type { ChatMessage, ChatRole } from './types';
2
+ import type { ChatLabels } from './labels';
3
+ export declare function roleLabel(role: ChatRole, labels: ChatLabels): string;
4
+ export declare const initials: (name: string) => string;
5
+ export declare function mergeMessages(current: ChatMessage[], incoming: ChatMessage[]): ChatMessage[];
@@ -0,0 +1,12 @@
1
+ export type NotificationProps = {
2
+ apiBaseUrl: string;
3
+ audience: 'admin' | 'client' | 'model';
4
+ identity: string;
5
+ locale?: 'en' | 'de';
6
+ inboxHref?: string;
7
+ pitchUrl?: (id: string) => string;
8
+ /** Overrides the hint under the empty state, e.g. what will show up here. */
9
+ emptyHint?: string;
10
+ };
11
+ export declare function NotificationBell(props: NotificationProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function NotificationInbox(props: NotificationProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ export type NotificationItem = {
2
+ id: string;
3
+ kind: string;
4
+ title: string;
5
+ description: string;
6
+ createdAt: string;
7
+ read: boolean;
8
+ resolved: boolean;
9
+ href: string;
10
+ pitchId?: string | null;
11
+ };
12
+ type Feed = {
13
+ items: NotificationItem[];
14
+ unreadCount: number;
15
+ openCount: number;
16
+ nextCursor: string | null;
17
+ asOf: string;
18
+ };
19
+ export default function useNotificationFeed(url: string, identity: string, filter: string): {
20
+ feed: Feed;
21
+ error: boolean;
22
+ actionError: boolean;
23
+ busy: string;
24
+ loading: boolean;
25
+ refresh: () => void;
26
+ more: () => void;
27
+ act: (operation: "read" | "resolve", target: {
28
+ id: string;
29
+ } | {
30
+ before: string;
31
+ }) => Promise<void>;
32
+ };
33
+ export {};
@@ -0,0 +1,5 @@
1
+ export default function FileDownloadButton({ url, fileName, label, }: {
2
+ url: string;
3
+ fileName: string;
4
+ label?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export type RequestClientContract = {
2
+ id: string;
3
+ orderId: string;
4
+ project: string;
5
+ createdAt: string;
6
+ status: string;
7
+ signed: boolean;
8
+ canUpload: boolean;
9
+ };
10
+ export default function RequestContracts({ apiBaseUrl, clientRequestId, active, }: {
11
+ apiBaseUrl: string;
12
+ clientRequestId: string;
13
+ active?: boolean;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export default function RequestFileDialog({ url, fields, onClose, onSaved, resource, editing, }: {
2
+ url: string;
3
+ fields: Record<string, string>;
4
+ onClose: () => void;
5
+ onSaved: () => void;
6
+ resource?: boolean;
7
+ editing?: {
8
+ label: string;
9
+ description: string;
10
+ };
11
+ }): import("react/jsx-runtime").JSX.Element;