@flamingo-stack/openframe-frontend-core 0.0.429-snapshot.20260715222543 → 0.0.429
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/{chunk-KDVGC6EG.cjs → chunk-2LJA3ABH.cjs} +37 -37
- package/dist/{chunk-KDVGC6EG.cjs.map → chunk-2LJA3ABH.cjs.map} +1 -1
- package/dist/{chunk-3XWBE3SM.js → chunk-2WJ25MTA.js} +4 -4
- package/dist/{chunk-3AWPRVFM.js → chunk-4VODJPTB.js} +2 -2
- package/dist/{chunk-TYANQCZA.js → chunk-62L7S7HQ.js} +166 -269
- package/dist/chunk-62L7S7HQ.js.map +1 -0
- package/dist/{chunk-FYMD7CCA.cjs → chunk-7MJTM6QT.cjs} +7 -7
- package/dist/{chunk-FYMD7CCA.cjs.map → chunk-7MJTM6QT.cjs.map} +1 -1
- package/dist/{chunk-A6JKKKIF.js → chunk-7PA4B6SD.js} +4 -4
- package/dist/{chunk-TDITU4KW.js → chunk-B3FBMRHQ.js} +2 -2
- package/dist/{chunk-CTY37UUO.cjs → chunk-B3Y47C2U.cjs} +59 -59
- package/dist/{chunk-CTY37UUO.cjs.map → chunk-B3Y47C2U.cjs.map} +1 -1
- package/dist/{chunk-WQN4B6CM.cjs → chunk-BN3V465H.cjs} +15 -15
- package/dist/{chunk-WQN4B6CM.cjs.map → chunk-BN3V465H.cjs.map} +1 -1
- package/dist/{chunk-WQR7H56P.cjs → chunk-CCL6JEMS.cjs} +62 -62
- package/dist/{chunk-WQR7H56P.cjs.map → chunk-CCL6JEMS.cjs.map} +1 -1
- package/dist/{chunk-CJOFXDTK.cjs → chunk-CRGH6TV6.cjs} +26 -26
- package/dist/{chunk-CJOFXDTK.cjs.map → chunk-CRGH6TV6.cjs.map} +1 -1
- package/dist/{chunk-Q7SYPXUX.cjs → chunk-E4PKZNR7.cjs} +11 -11
- package/dist/{chunk-Q7SYPXUX.cjs.map → chunk-E4PKZNR7.cjs.map} +1 -1
- package/dist/{chunk-ZUP2ZKS6.cjs → chunk-GGJUXN6Z.cjs} +9 -9
- package/dist/{chunk-ZUP2ZKS6.cjs.map → chunk-GGJUXN6Z.cjs.map} +1 -1
- package/dist/{chunk-2ELINEWQ.js → chunk-GMR5AA3C.js} +2 -2
- package/dist/{chunk-AY5TBDWZ.js → chunk-KHKB5RY2.js} +2 -2
- package/dist/{chunk-S7UXICHB.js → chunk-MAYEJ3NY.js} +2 -2
- package/dist/{chunk-NZBQGODM.js → chunk-NYISC4Z3.js} +2 -2
- package/dist/{chunk-D4K53CES.cjs → chunk-OLGFIDZY.cjs} +26 -26
- package/dist/{chunk-D4K53CES.cjs.map → chunk-OLGFIDZY.cjs.map} +1 -1
- package/dist/{chunk-3OKVH6FW.js → chunk-RTOVYU4D.js} +4 -4
- package/dist/{chunk-67LZDLIO.js → chunk-TJ4HJ3KX.js} +2 -2
- package/dist/{chunk-FL4IOCYH.cjs → chunk-WXKFFVGC.cjs} +5 -5
- package/dist/{chunk-FL4IOCYH.cjs.map → chunk-WXKFFVGC.cjs.map} +1 -1
- package/dist/{chunk-PP5KNHMK.cjs → chunk-XDBD6BJN.cjs} +215 -318
- package/dist/chunk-XDBD6BJN.cjs.map +1 -0
- package/dist/{chunk-IMOJWQDR.js → chunk-Y2TW664W.js} +4 -4
- package/dist/{chunk-374KFDET.cjs → chunk-YGITDP6O.cjs} +31 -31
- package/dist/{chunk-374KFDET.cjs.map → chunk-YGITDP6O.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/hooks/index.d.ts +0 -1
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +1 -10
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -12
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +1 -11
- package/dist/components/chat/utils/index.d.ts +0 -1
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/board/index.d.ts +2 -2
- package/dist/components/features/board/index.d.ts.map +1 -1
- package/dist/components/features/board/ticket-card.d.ts +2 -22
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -6
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +1 -5
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +128 -142
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +9 -23
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -12
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +1 -11
- package/dist/index.cjs +2 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -15
- package/package.json +1 -1
- package/src/components/chat/hooks/index.ts +0 -1
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +0 -23
- package/src/components/chat/utils/index.ts +0 -2
- package/src/components/features/board/index.ts +2 -2
- package/src/components/features/board/ticket-card.tsx +64 -108
- package/dist/chunk-PP5KNHMK.cjs.map +0 -1
- package/dist/chunk-TYANQCZA.js.map +0 -1
- package/dist/components/chat/hooks/use-scripted-stream.d.ts +0 -3
- package/dist/components/chat/hooks/use-scripted-stream.d.ts.map +0 -1
- package/dist/components/chat/utils/scripted-stream.d.ts +0 -38
- package/dist/components/chat/utils/scripted-stream.d.ts.map +0 -1
- package/src/components/chat/hooks/use-scripted-stream.ts +0 -69
- package/src/components/chat/utils/scripted-stream.ts +0 -111
- /package/dist/{chunk-3XWBE3SM.js.map → chunk-2WJ25MTA.js.map} +0 -0
- /package/dist/{chunk-3AWPRVFM.js.map → chunk-4VODJPTB.js.map} +0 -0
- /package/dist/{chunk-A6JKKKIF.js.map → chunk-7PA4B6SD.js.map} +0 -0
- /package/dist/{chunk-TDITU4KW.js.map → chunk-B3FBMRHQ.js.map} +0 -0
- /package/dist/{chunk-2ELINEWQ.js.map → chunk-GMR5AA3C.js.map} +0 -0
- /package/dist/{chunk-AY5TBDWZ.js.map → chunk-KHKB5RY2.js.map} +0 -0
- /package/dist/{chunk-S7UXICHB.js.map → chunk-MAYEJ3NY.js.map} +0 -0
- /package/dist/{chunk-NZBQGODM.js.map → chunk-NYISC4Z3.js.map} +0 -0
- /package/dist/{chunk-3OKVH6FW.js.map → chunk-RTOVYU4D.js.map} +0 -0
- /package/dist/{chunk-67LZDLIO.js.map → chunk-TJ4HJ3KX.js.map} +0 -0
- /package/dist/{chunk-IMOJWQDR.js.map → chunk-Y2TW664W.js.map} +0 -0
|
@@ -6,8 +6,8 @@ export { BoardColumn } from './board-column'
|
|
|
6
6
|
export type { BoardColumnProps } from './board-column'
|
|
7
7
|
export { BoardColumnHeader } from './board-column-header'
|
|
8
8
|
export type { BoardColumnHeaderProps } from './board-column-header'
|
|
9
|
-
export { TicketCard
|
|
10
|
-
export type { TicketCardProps
|
|
9
|
+
export { TicketCard } from './ticket-card'
|
|
10
|
+
export type { TicketCardProps } from './ticket-card'
|
|
11
11
|
export { BoardTicketApproval } from './board-ticket-approval'
|
|
12
12
|
export type { BoardTicketApprovalProps } from './board-ticket-approval'
|
|
13
13
|
export { TicketCardSkeleton } from './ticket-card-skeleton'
|
|
@@ -4,7 +4,7 @@ import { useSortable } from '@dnd-kit/sortable'
|
|
|
4
4
|
import { CSS } from '@dnd-kit/utilities'
|
|
5
5
|
import Link from '../../../embed-shims/next-link'
|
|
6
6
|
import * as React from 'react'
|
|
7
|
-
import { LaptopIcon, Flag02Icon, MessagesIcon } from '../../icons-v2-generated'
|
|
7
|
+
import { LaptopIcon, Flag02Icon, MessagesIcon, CheckCircleIcon } from '../../icons-v2-generated'
|
|
8
8
|
import { SquareAvatar } from '../../ui/square-avatar'
|
|
9
9
|
import { Tag } from '../../ui/tag'
|
|
10
10
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip'
|
|
@@ -24,36 +24,64 @@ const PRIORITY_COLOR_CLASS: Record<BoardPriority, string> = {
|
|
|
24
24
|
const MAX_VISIBLE_TAGS = 2
|
|
25
25
|
const MAX_VISIBLE_ASSIGNEES = 3
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
* board card and the static {@link TicketCardView}. */
|
|
29
|
-
const TICKET_CARD_SHELL =
|
|
30
|
-
'relative flex flex-col gap-[var(--spacing-system-sf)] rounded-md border border-ods-border bg-ods-bg p-[var(--spacing-system-sf)] select-none text-left'
|
|
31
|
-
|
|
32
|
-
// =============================================================================
|
|
33
|
-
// Presentational body — the ONE ticket-card design, no drag/link/board context.
|
|
34
|
-
// Reused by the draggable `TicketCard` AND the static `TicketCardView`.
|
|
35
|
-
// =============================================================================
|
|
36
|
-
|
|
37
|
-
export interface TicketCardBodyProps {
|
|
27
|
+
export interface TicketCardProps {
|
|
38
28
|
ticket: BoardTicket
|
|
29
|
+
columnId: string
|
|
39
30
|
columnColor?: string
|
|
31
|
+
href?: string
|
|
32
|
+
isOverlay?: boolean
|
|
33
|
+
dragDisabled?: boolean
|
|
34
|
+
approved?: boolean
|
|
40
35
|
renderAssignSlot?: (ticket: BoardTicket) => React.ReactNode
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
onApprove?: (requestId?: string) => void | Promise<void>
|
|
44
|
-
onReject?: (requestId?: string) => void | Promise<void>
|
|
36
|
+
onApprove?: (ticketId: string, requestId?: string) => void | Promise<void>
|
|
37
|
+
onReject?: (ticketId: string, requestId?: string) => void | Promise<void>
|
|
45
38
|
}
|
|
46
39
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
export function TicketCard({
|
|
41
|
+
ticket,
|
|
42
|
+
columnId,
|
|
43
|
+
columnColor,
|
|
44
|
+
href,
|
|
45
|
+
isOverlay = false,
|
|
46
|
+
dragDisabled,
|
|
47
|
+
approved = false,
|
|
48
|
+
renderAssignSlot,
|
|
49
|
+
onApprove,
|
|
50
|
+
onReject,
|
|
51
|
+
}: TicketCardProps) {
|
|
52
|
+
const sortableData = React.useMemo(
|
|
53
|
+
() => ({ columnId, type: 'ticket' as const }),
|
|
54
|
+
[columnId],
|
|
55
|
+
)
|
|
56
|
+
const sortable = useSortable({
|
|
57
|
+
id: ticket.id,
|
|
58
|
+
data: sortableData,
|
|
59
|
+
disabled: dragDisabled,
|
|
60
|
+
})
|
|
61
|
+
|
|
50
62
|
const showNewMessage = !!ticket.hasNewMessage && !!columnColor
|
|
51
63
|
const newMessageTextColor = columnColor ? getReadableTextColor(columnColor) : undefined
|
|
52
64
|
|
|
65
|
+
const style: React.CSSProperties = isOverlay
|
|
66
|
+
? {}
|
|
67
|
+
: {
|
|
68
|
+
transform: CSS.Transform.toString(sortable.transform),
|
|
69
|
+
transition: sortable.transition,
|
|
70
|
+
}
|
|
71
|
+
if (showNewMessage) style.borderColor = columnColor
|
|
72
|
+
|
|
53
73
|
const showDeviceRow = !!(ticket.deviceHostnames?.length || ticket.organizationName)
|
|
54
|
-
const deviceText = [
|
|
74
|
+
const deviceText = [
|
|
75
|
+
ticket.deviceHostnames?.join(', '),
|
|
76
|
+
ticket.organizationName,
|
|
77
|
+
].filter(Boolean).join(', ')
|
|
78
|
+
|
|
79
|
+
const handleClick = (e: React.MouseEvent) => {
|
|
80
|
+
if (sortable.isDragging) e.preventDefault()
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const hasRightSection = !!(approved || ticket.priority || ticket.assignees?.length || renderAssignSlot)
|
|
55
84
|
|
|
56
|
-
const hasRightSection = !!(ticket.priority || ticket.assignees?.length || renderAssignSlot)
|
|
57
85
|
const rightSection = hasRightSection ? (
|
|
58
86
|
<div className="pointer-events-auto flex shrink-0 items-center gap-[var(--spacing-system-xsf)]">
|
|
59
87
|
{ticket.priority && (
|
|
@@ -62,6 +90,14 @@ export function TicketCardBody({ ticket, columnColor, renderAssignSlot, onApprov
|
|
|
62
90
|
aria-label={`Priority: ${ticket.priority}`}
|
|
63
91
|
/>
|
|
64
92
|
)}
|
|
93
|
+
{approved && (
|
|
94
|
+
<CheckCircleIcon
|
|
95
|
+
size={20}
|
|
96
|
+
color="var(--ods-attention-green-success)"
|
|
97
|
+
className="shrink-0"
|
|
98
|
+
aria-label="Approved"
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
65
101
|
{renderAssignSlot ? (
|
|
66
102
|
renderAssignSlot(ticket)
|
|
67
103
|
) : ticket.assignees?.length ? (
|
|
@@ -89,7 +125,7 @@ export function TicketCardBody({ ticket, columnColor, renderAssignSlot, onApprov
|
|
|
89
125
|
const timestampLabel = ticket.createdAt ? formatTicketRelativeTime(ticket.createdAt) : null
|
|
90
126
|
const tooltipLabel = ticket.createdAt ? formatTicketFullTimestamp(ticket.createdAt) : null
|
|
91
127
|
|
|
92
|
-
|
|
128
|
+
const body = (
|
|
93
129
|
<>
|
|
94
130
|
<div className="flex items-start gap-[var(--spacing-system-sf)]">
|
|
95
131
|
<div className="flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-zero)]" title={ticket.title}>
|
|
@@ -123,97 +159,17 @@ export function TicketCardBody({ ticket, columnColor, renderAssignSlot, onApprov
|
|
|
123
159
|
/>
|
|
124
160
|
)}
|
|
125
161
|
{ticket.pendingApproval && (
|
|
126
|
-
<BoardTicketApproval
|
|
162
|
+
<BoardTicketApproval
|
|
163
|
+
pendingApproval={ticket.pendingApproval}
|
|
164
|
+
onApprove={onApprove ? requestId => onApprove(ticket.id, requestId) : undefined}
|
|
165
|
+
onReject={onReject ? requestId => onReject(ticket.id, requestId) : undefined}
|
|
166
|
+
/>
|
|
127
167
|
)}
|
|
128
168
|
</>
|
|
129
169
|
)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// =============================================================================
|
|
133
|
-
// Static card — the real board card design, rendered from props with NO
|
|
134
|
-
// drag-and-drop / board context (for embeds, marketing heroes, previews).
|
|
135
|
-
// =============================================================================
|
|
136
|
-
|
|
137
|
-
export interface TicketCardViewProps extends TicketCardBodyProps {
|
|
138
|
-
className?: string
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* The exact board `TicketCard` visual, standalone — same shell + `TicketCardBody`
|
|
143
|
-
* as the draggable card, but without the `useSortable` dnd-kit dependency, so it
|
|
144
|
-
* renders anywhere from static props. Use this outside a `<Board>`.
|
|
145
|
-
*/
|
|
146
|
-
export function TicketCardView({ className, ...bodyProps }: TicketCardViewProps) {
|
|
147
|
-
const { ticket, columnColor } = bodyProps
|
|
148
|
-
const showNewMessage = !!ticket.hasNewMessage && !!columnColor
|
|
149
|
-
return (
|
|
150
|
-
<div
|
|
151
|
-
className={cn(TICKET_CARD_SHELL, className)}
|
|
152
|
-
style={showNewMessage ? { borderColor: columnColor } : undefined}
|
|
153
|
-
>
|
|
154
|
-
<div className="relative z-10 flex flex-col gap-[var(--spacing-system-sf)]">
|
|
155
|
-
<TicketCardBody {...bodyProps} />
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// =============================================================================
|
|
162
|
-
// Draggable board card
|
|
163
|
-
// =============================================================================
|
|
164
|
-
|
|
165
|
-
export interface TicketCardProps {
|
|
166
|
-
ticket: BoardTicket
|
|
167
|
-
columnId: string
|
|
168
|
-
columnColor?: string
|
|
169
|
-
href?: string
|
|
170
|
-
isOverlay?: boolean
|
|
171
|
-
dragDisabled?: boolean
|
|
172
|
-
renderAssignSlot?: (ticket: BoardTicket) => React.ReactNode
|
|
173
|
-
onApprove?: (ticketId: string, requestId?: string) => void | Promise<void>
|
|
174
|
-
onReject?: (ticketId: string, requestId?: string) => void | Promise<void>
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export function TicketCard({
|
|
178
|
-
ticket,
|
|
179
|
-
columnId,
|
|
180
|
-
columnColor,
|
|
181
|
-
href,
|
|
182
|
-
isOverlay = false,
|
|
183
|
-
dragDisabled,
|
|
184
|
-
renderAssignSlot,
|
|
185
|
-
onApprove,
|
|
186
|
-
onReject,
|
|
187
|
-
}: TicketCardProps) {
|
|
188
|
-
const sortableData = React.useMemo(() => ({ columnId, type: 'ticket' as const }), [columnId])
|
|
189
|
-
const sortable = useSortable({ id: ticket.id, data: sortableData, disabled: dragDisabled })
|
|
190
|
-
|
|
191
|
-
const showNewMessage = !!ticket.hasNewMessage && !!columnColor
|
|
192
|
-
|
|
193
|
-
const style: React.CSSProperties = isOverlay
|
|
194
|
-
? {}
|
|
195
|
-
: {
|
|
196
|
-
transform: CSS.Transform.toString(sortable.transform),
|
|
197
|
-
transition: sortable.transition,
|
|
198
|
-
}
|
|
199
|
-
if (showNewMessage) style.borderColor = columnColor
|
|
200
|
-
|
|
201
|
-
const handleClick = (e: React.MouseEvent) => {
|
|
202
|
-
if (sortable.isDragging) e.preventDefault()
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const body = (
|
|
206
|
-
<TicketCardBody
|
|
207
|
-
ticket={ticket}
|
|
208
|
-
columnColor={columnColor}
|
|
209
|
-
renderAssignSlot={renderAssignSlot}
|
|
210
|
-
onApprove={onApprove ? requestId => onApprove(ticket.id, requestId) : undefined}
|
|
211
|
-
onReject={onReject ? requestId => onReject(ticket.id, requestId) : undefined}
|
|
212
|
-
/>
|
|
213
|
-
)
|
|
214
170
|
|
|
215
171
|
const cardClasses = cn(
|
|
216
|
-
|
|
172
|
+
'relative flex flex-col gap-[var(--spacing-system-sf)] rounded-md border border-ods-border bg-ods-bg p-[var(--spacing-system-sf)] select-none text-left',
|
|
217
173
|
!dragDisabled && 'cursor-pointer',
|
|
218
174
|
sortable.isDragging && !isOverlay && 'opacity-40',
|
|
219
175
|
isOverlay && 'rotate-1 shadow-card-hover',
|