@freedom-code-compliance/fcc-redesign 0.1.52 → 0.1.54
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.cjs +1 -1
- package/dist/index.js +1248 -773
- package/dist/styles.css +1 -1
- package/index.d.ts +181 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -139,6 +139,7 @@ export interface FCCChatDetailModel {
|
|
|
139
139
|
onMessageCopy?: (message: FCCChatMessage) => void
|
|
140
140
|
composerPlaceholder?: string
|
|
141
141
|
onSubmit?: (value: string) => void
|
|
142
|
+
composer?: FCCChatComposerProps
|
|
142
143
|
[key: string]: unknown
|
|
143
144
|
}
|
|
144
145
|
|
|
@@ -188,6 +189,19 @@ export interface FCCChatSidebarProps extends Omit<ComponentPropsWithoutRef<'sect
|
|
|
188
189
|
filters?: FCCChatFilterState
|
|
189
190
|
onFiltersChange?: (filters: FCCChatFilterState) => void
|
|
190
191
|
detail: FCCChatDetailModel | null
|
|
192
|
+
newTicket?: FCCChatNewTicketFormProps & {
|
|
193
|
+
onOpen?: () => void
|
|
194
|
+
onCreated?: (values: FCCChatNewTicketFormValues) => void
|
|
195
|
+
onError?: (error: unknown, values: FCCChatNewTicketFormValues) => void
|
|
196
|
+
}
|
|
197
|
+
newDM?: FCCChatNewDMModalProps & {
|
|
198
|
+
onOpen?: () => void
|
|
199
|
+
onCreated?: (users: FCCChatNewDMUser[], ids: string[]) => void
|
|
200
|
+
onError?: (error: unknown, users: FCCChatNewDMUser[], ids: string[]) => void
|
|
201
|
+
}
|
|
202
|
+
composer?: FCCChatComposerProps & {
|
|
203
|
+
onStartHubUpdate?: () => void
|
|
204
|
+
}
|
|
191
205
|
slots?: FCCChatSidebarSlots
|
|
192
206
|
mobilePortalTargetSelector?: string | null
|
|
193
207
|
}
|
|
@@ -216,6 +230,101 @@ export interface FCCChatComposerFrameProps {
|
|
|
216
230
|
children?: ReactNode
|
|
217
231
|
}
|
|
218
232
|
|
|
233
|
+
export interface FCCChatComposerSubmitMeta {
|
|
234
|
+
attachments?: FCCChatAttachment[]
|
|
235
|
+
quote?: FCCChatMessage | Record<string, unknown>
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface FCCChatComposerProps {
|
|
239
|
+
placeholder?: string
|
|
240
|
+
value?: string
|
|
241
|
+
onChange?: (value: string) => void
|
|
242
|
+
onSubmit?: (value: string, meta: FCCChatComposerSubmitMeta) => void | Promise<void>
|
|
243
|
+
disabled?: boolean
|
|
244
|
+
attachments?: FCCChatAttachment[]
|
|
245
|
+
onAttach?: (files: File[]) => void
|
|
246
|
+
onRemoveAttachment?: (attachment: FCCChatAttachment, index: number) => void
|
|
247
|
+
quote?: FCCChatMessage | Record<string, unknown>
|
|
248
|
+
onCancelQuote?: () => void
|
|
249
|
+
mentionSuggestions?: FCCChatAvatarGroupItem[]
|
|
250
|
+
departmentSuggestions?: FCCChatAvatarGroupItem[]
|
|
251
|
+
leadingAction?: ReactNode
|
|
252
|
+
sendLabel?: string
|
|
253
|
+
className?: string
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface FCCChatNewTicketFormValues {
|
|
257
|
+
projectId?: string
|
|
258
|
+
projectName?: ReactNode
|
|
259
|
+
departmentCode?: string
|
|
260
|
+
targetType?: string
|
|
261
|
+
title: string
|
|
262
|
+
message?: string
|
|
263
|
+
visibility?: 'internal' | 'public' | string
|
|
264
|
+
files?: File[]
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface FCCChatOption {
|
|
268
|
+
id?: string
|
|
269
|
+
value?: string
|
|
270
|
+
label?: ReactNode
|
|
271
|
+
name?: ReactNode
|
|
272
|
+
title?: ReactNode
|
|
273
|
+
[key: string]: unknown
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface FCCChatNewTicketFormProps {
|
|
277
|
+
title?: ReactNode
|
|
278
|
+
description?: ReactNode
|
|
279
|
+
projects?: FCCChatOption[]
|
|
280
|
+
departments?: FCCChatOption[]
|
|
281
|
+
targetTypes?: FCCChatOption[]
|
|
282
|
+
defaultProjectId?: string
|
|
283
|
+
defaultProjectName?: ReactNode
|
|
284
|
+
lockProject?: boolean
|
|
285
|
+
initialValues?: Partial<FCCChatNewTicketFormValues>
|
|
286
|
+
files?: File[]
|
|
287
|
+
onFilesChange?: (files: File[]) => void
|
|
288
|
+
onAttach?: (files: File[]) => void
|
|
289
|
+
onRemoveFile?: (file: File, index: number) => void
|
|
290
|
+
attachmentAccept?: string
|
|
291
|
+
attachLabel?: ReactNode
|
|
292
|
+
projectLabel?: ReactNode
|
|
293
|
+
departmentLabel?: ReactNode
|
|
294
|
+
targetLabel?: ReactNode
|
|
295
|
+
titleLabel?: ReactNode
|
|
296
|
+
messageLabel?: ReactNode
|
|
297
|
+
titlePlaceholder?: string
|
|
298
|
+
messagePlaceholder?: string
|
|
299
|
+
onSearchProjects?: (query: string) => void
|
|
300
|
+
onSubmit?: (values: FCCChatNewTicketFormValues) => void | Promise<void>
|
|
301
|
+
onClose?: () => void
|
|
302
|
+
isSubmitting?: boolean
|
|
303
|
+
submitLabel?: ReactNode
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface FCCChatNewDMUser extends FCCChatAvatarGroupItem {
|
|
307
|
+
value?: string
|
|
308
|
+
label?: ReactNode
|
|
309
|
+
email?: ReactNode
|
|
310
|
+
role?: ReactNode
|
|
311
|
+
subtitle?: ReactNode
|
|
312
|
+
[key: string]: unknown
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface FCCChatNewDMModalProps {
|
|
316
|
+
open?: boolean
|
|
317
|
+
title?: ReactNode
|
|
318
|
+
users?: FCCChatNewDMUser[]
|
|
319
|
+
selectedUserIds?: string[]
|
|
320
|
+
onSelectedUserIdsChange?: (ids: string[]) => void
|
|
321
|
+
onSearchUsers?: (query: string) => void
|
|
322
|
+
onCreateDM?: (users: FCCChatNewDMUser[], ids: string[]) => void | Promise<void>
|
|
323
|
+
onClose?: () => void
|
|
324
|
+
isSubmitting?: boolean
|
|
325
|
+
emptyLabel?: ReactNode
|
|
326
|
+
}
|
|
327
|
+
|
|
219
328
|
export interface FCCChatHubFeedProps {
|
|
220
329
|
updates?: FCCChatHubUpdate[]
|
|
221
330
|
onSelectUpdate?: (update: FCCChatHubUpdate) => void
|
|
@@ -231,7 +340,10 @@ export interface FCCChatTicketStatusTrackerProps {
|
|
|
231
340
|
|
|
232
341
|
export function FCCChatSidebar(props: FCCChatSidebarProps): JSX.Element
|
|
233
342
|
export function FCCChatMessageList(props: FCCChatMessageListProps): JSX.Element
|
|
343
|
+
export function FCCChatComposer(props: FCCChatComposerProps): JSX.Element
|
|
234
344
|
export function FCCChatComposerFrame(props: FCCChatComposerFrameProps): JSX.Element
|
|
345
|
+
export function FCCChatNewTicketForm(props: FCCChatNewTicketFormProps): JSX.Element
|
|
346
|
+
export function FCCChatNewDMModal(props: FCCChatNewDMModalProps): JSX.Element | null
|
|
235
347
|
export function FCCChatHubFeed(props: FCCChatHubFeedProps): JSX.Element
|
|
236
348
|
export function FCCChatTicketStatusTracker(props: FCCChatTicketStatusTrackerProps): JSX.Element
|
|
237
349
|
|
|
@@ -246,6 +358,16 @@ export const FCC_CHAT_BREAKPOINTS: {
|
|
|
246
358
|
mobile: number
|
|
247
359
|
smallDesktop: number
|
|
248
360
|
}
|
|
361
|
+
export interface FCCChatSidebarWidths {
|
|
362
|
+
viewport: FCCChatViewport
|
|
363
|
+
railWidth: number
|
|
364
|
+
detailWidth: number
|
|
365
|
+
collapsedWidth: number
|
|
366
|
+
expandedWidth: number
|
|
367
|
+
currentWidth: number
|
|
368
|
+
}
|
|
369
|
+
export function useFCCChatViewport(): FCCChatViewport
|
|
370
|
+
export function useFCCChatSidebarWidths(detailOpen?: boolean): FCCChatSidebarWidths
|
|
249
371
|
|
|
250
372
|
export type FCCCallsSidePanelTab = 'dial' | 'calls' | 'voicemail'
|
|
251
373
|
|
|
@@ -448,6 +570,65 @@ export const KPICard: FCCAnyComponent
|
|
|
448
570
|
export const StatCard: FCCAnyComponent
|
|
449
571
|
export const NotificationsPanel: FCCAnyComponent
|
|
450
572
|
|
|
573
|
+
export interface FCCNotificationSidePanelItem {
|
|
574
|
+
id: string
|
|
575
|
+
title?: ReactNode
|
|
576
|
+
body?: ReactNode
|
|
577
|
+
message?: ReactNode
|
|
578
|
+
text?: ReactNode
|
|
579
|
+
detail?: ReactNode
|
|
580
|
+
actorName?: string
|
|
581
|
+
userName?: string
|
|
582
|
+
user?: string
|
|
583
|
+
requesterName?: string
|
|
584
|
+
senderName?: string
|
|
585
|
+
avatarUrl?: string | null
|
|
586
|
+
actorAvatarUrl?: string | null
|
|
587
|
+
userAvatar?: string | null
|
|
588
|
+
imageUrl?: string | null
|
|
589
|
+
avatarInitials?: string
|
|
590
|
+
initials?: string
|
|
591
|
+
timestamp?: string | number | Date | null
|
|
592
|
+
createdAt?: string | number | Date | null
|
|
593
|
+
date?: string | number | Date | null
|
|
594
|
+
timeStamp?: string | number | Date | null
|
|
595
|
+
timeLabel?: ReactNode
|
|
596
|
+
time?: ReactNode
|
|
597
|
+
isRead?: boolean
|
|
598
|
+
read?: boolean
|
|
599
|
+
readAt?: string | null
|
|
600
|
+
groupKey?: 'today' | 'yesterday' | 'thisWeek' | 'older' | string
|
|
601
|
+
[key: string]: unknown
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export interface FCCNotificationSidePanelProps {
|
|
605
|
+
notifications?: FCCNotificationSidePanelItem[]
|
|
606
|
+
loading?: boolean
|
|
607
|
+
title?: ReactNode
|
|
608
|
+
statusLabel?: ReactNode
|
|
609
|
+
emptyTitle?: ReactNode
|
|
610
|
+
emptyUnreadTitle?: ReactNode
|
|
611
|
+
emptyDescription?: ReactNode
|
|
612
|
+
markAllReadLabel?: ReactNode
|
|
613
|
+
closeLabel?: string
|
|
614
|
+
activeFilter?: 'all' | 'unread' | string
|
|
615
|
+
defaultFilter?: 'all' | 'unread' | string
|
|
616
|
+
onFilterChange?: (filter: string) => void
|
|
617
|
+
onNotificationClick?: (notification: FCCNotificationSidePanelItem) => void
|
|
618
|
+
onMarkRead?: (id: string, notification: FCCNotificationSidePanelItem) => void
|
|
619
|
+
onMarkAllRead?: () => void
|
|
620
|
+
onClose?: () => void
|
|
621
|
+
renderNotification?: (
|
|
622
|
+
notification: FCCNotificationSidePanelItem,
|
|
623
|
+
helpers: { onClick: () => void; defaultNode: ReactNode },
|
|
624
|
+
) => ReactNode
|
|
625
|
+
showCloseButton?: boolean
|
|
626
|
+
showMarkAllRead?: boolean
|
|
627
|
+
className?: string
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
export const FCCNotificationSidePanel: ComponentType<FCCNotificationSidePanelProps>
|
|
631
|
+
|
|
451
632
|
export type FCCIconName =
|
|
452
633
|
| 'inbox'
|
|
453
634
|
| 'issues'
|
package/package.json
CHANGED