@flamingo-stack/openframe-frontend-core 0.0.537-snapshot.20260814102953 → 0.0.537
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/chat-protocol/events.d.ts +1 -15
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +0 -15
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +0 -15
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/{chunk-KUKHUECE.js → chunk-3GXMS4OP.js} +2 -2
- package/dist/{chunk-ZHW5VLHY.js → chunk-5JPSQOZQ.js} +2 -2
- package/dist/{chunk-RBBWKSRC.js → chunk-7EHGP4QK.js} +4367 -4638
- package/dist/chunk-7EHGP4QK.js.map +1 -0
- package/dist/{chunk-4BK5Z763.js → chunk-7FXZHI5D.js} +2 -2
- package/dist/{chunk-YO5BWF4L.cjs → chunk-7WNJ7RFO.cjs} +14 -14
- package/dist/{chunk-YO5BWF4L.cjs.map → chunk-7WNJ7RFO.cjs.map} +1 -1
- package/dist/{chunk-56QT3JBZ.js → chunk-C4LEH3VE.js} +2 -2
- package/dist/{chunk-BUKQ6B65.cjs → chunk-CATY4DVR.cjs} +87 -87
- package/dist/{chunk-BUKQ6B65.cjs.map → chunk-CATY4DVR.cjs.map} +1 -1
- package/dist/{chunk-UBEVU6LS.js → chunk-CQQXB25K.js} +2 -2
- package/dist/{chunk-73W4L656.js → chunk-CZHCXCWL.js} +2 -2
- package/dist/{chunk-LJW7B6GY.cjs → chunk-DHSVBGOX.cjs} +9 -9
- package/dist/{chunk-LJW7B6GY.cjs.map → chunk-DHSVBGOX.cjs.map} +1 -1
- package/dist/{chunk-EH6LNTOT.js → chunk-HRC56BQW.js} +5 -5
- package/dist/{chunk-C6776X43.cjs → chunk-KKZ2QMQD.cjs} +26 -26
- package/dist/{chunk-C6776X43.cjs.map → chunk-KKZ2QMQD.cjs.map} +1 -1
- package/dist/{chunk-67CKAX7Z.js → chunk-LFMIAPBP.js} +2 -2
- package/dist/{chunk-PFGRHRBO.cjs → chunk-MDP3YKFI.cjs} +5 -5
- package/dist/{chunk-PFGRHRBO.cjs.map → chunk-MDP3YKFI.cjs.map} +1 -1
- package/dist/{chunk-C6NKOHFW.js → chunk-MOIHWYSA.js} +2 -2
- package/dist/{chunk-NE67LT3B.cjs → chunk-OYTM3YXO.cjs} +7 -7
- package/dist/{chunk-NE67LT3B.cjs.map → chunk-OYTM3YXO.cjs.map} +1 -1
- package/dist/{chunk-QU6P2U2Q.cjs → chunk-QPPG3KHW.cjs} +3 -3
- package/dist/{chunk-QU6P2U2Q.cjs.map → chunk-QPPG3KHW.cjs.map} +1 -1
- package/dist/{chunk-QK4SQAYG.js → chunk-SGNWSUL3.js} +6 -6
- package/dist/{chunk-NUHDE7CB.cjs → chunk-SKIM263K.cjs} +37 -37
- package/dist/{chunk-NUHDE7CB.cjs.map → chunk-SKIM263K.cjs.map} +1 -1
- package/dist/{chunk-7CBQWZAH.js → chunk-TCSSYTDN.js} +4 -4
- package/dist/{chunk-R3XO2KO4.cjs → chunk-V4D5MPB7.cjs} +4 -4
- package/dist/{chunk-R3XO2KO4.cjs.map → chunk-V4D5MPB7.cjs.map} +1 -1
- package/dist/{chunk-TWVRCPWY.cjs → chunk-VSIHO7DJ.cjs} +61 -61
- package/dist/{chunk-TWVRCPWY.cjs.map → chunk-VSIHO7DJ.cjs.map} +1 -1
- package/dist/{chunk-ZBRKTF6S.js → chunk-WHUEUACV.js} +2 -2
- package/dist/{chunk-MGYNZ7SA.cjs → chunk-WJIBB3KT.cjs} +31 -31
- package/dist/{chunk-MGYNZ7SA.cjs.map → chunk-WJIBB3KT.cjs.map} +1 -1
- package/dist/{chunk-ZNWW4WAT.cjs → chunk-YEKXTTAC.cjs} +26 -26
- package/dist/{chunk-ZNWW4WAT.cjs.map → chunk-YEKXTTAC.cjs.map} +1 -1
- package/dist/{chunk-BNF6FZLP.js → chunk-YIDGB5KP.js} +4 -4
- package/dist/{chunk-QQ3HUSDJ.cjs → chunk-YMPRMZDD.cjs} +328 -599
- package/dist/chunk-YMPRMZDD.cjs.map +1 -0
- package/dist/{chunk-F4QOOHZL.cjs → chunk-YPI3JIR6.cjs} +11 -11
- package/dist/{chunk-F4QOOHZL.cjs.map → chunk-YPI3JIR6.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/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -8
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +0 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -7
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
- package/dist/components/chat/ticket-escalated-message.d.ts +8 -2
- package/dist/components/chat/ticket-escalated-message.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +2 -51
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts +1 -13
- package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.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/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +132 -144
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +11 -23
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.js +3 -3
- 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 +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -14
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -13
- package/dist/components/ui/take-over-ticket-modal.d.ts +0 -5
- package/dist/components/ui/take-over-ticket-modal.d.ts.map +1 -1
- package/dist/index.cjs +2 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -13
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/__snapshots__/nats-decoder-golden.test.ts.snap +0 -44
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +0 -32
- package/src/chat-protocol/events.ts +0 -16
- package/src/chat-protocol/nats-decoder.ts +0 -27
- package/src/components/chat/chat-message-enhanced.tsx +0 -3
- package/src/components/chat/index.ts +0 -2
- package/src/components/chat/stream/chat-stream-reducer.ts +0 -19
- package/src/components/chat/stream/message-mutations.ts +0 -5
- package/src/components/chat/ticket-escalated-message.tsx +32 -10
- package/src/components/chat/types/message.types.ts +1 -60
- package/src/components/chat/utils/message-segment-accumulator.ts +0 -41
- package/src/components/chat/utils/process-historical-messages.ts +0 -31
- package/src/components/ui/index.ts +0 -1
- package/src/components/ui/take-over-ticket-modal.tsx +4 -7
- package/dist/chunk-QQ3HUSDJ.cjs.map +0 -1
- package/dist/chunk-RBBWKSRC.js.map +0 -1
- package/dist/components/chat/ai-assistant-info.d.ts +0 -31
- package/dist/components/chat/ai-assistant-info.d.ts.map +0 -1
- package/dist/components/chat/ticket-event-message.d.ts +0 -24
- package/dist/components/chat/ticket-event-message.d.ts.map +0 -1
- package/dist/components/ui/reopen-ticket-modal.d.ts +0 -42
- package/dist/components/ui/reopen-ticket-modal.d.ts.map +0 -1
- package/src/components/chat/__tests__/ticket-event.test.ts +0 -194
- package/src/components/chat/ai-assistant-info.tsx +0 -71
- package/src/components/chat/ticket-event-message.tsx +0 -79
- package/src/components/ui/reopen-ticket-modal.tsx +0 -174
- package/src/stories/ReopenTicketModal.stories.tsx +0 -114
- package/src/stories/TicketEventMessage.stories.tsx +0 -100
- /package/dist/{chunk-KUKHUECE.js.map → chunk-3GXMS4OP.js.map} +0 -0
- /package/dist/{chunk-ZHW5VLHY.js.map → chunk-5JPSQOZQ.js.map} +0 -0
- /package/dist/{chunk-4BK5Z763.js.map → chunk-7FXZHI5D.js.map} +0 -0
- /package/dist/{chunk-56QT3JBZ.js.map → chunk-C4LEH3VE.js.map} +0 -0
- /package/dist/{chunk-UBEVU6LS.js.map → chunk-CQQXB25K.js.map} +0 -0
- /package/dist/{chunk-73W4L656.js.map → chunk-CZHCXCWL.js.map} +0 -0
- /package/dist/{chunk-EH6LNTOT.js.map → chunk-HRC56BQW.js.map} +0 -0
- /package/dist/{chunk-67CKAX7Z.js.map → chunk-LFMIAPBP.js.map} +0 -0
- /package/dist/{chunk-C6NKOHFW.js.map → chunk-MOIHWYSA.js.map} +0 -0
- /package/dist/{chunk-QK4SQAYG.js.map → chunk-SGNWSUL3.js.map} +0 -0
- /package/dist/{chunk-7CBQWZAH.js.map → chunk-TCSSYTDN.js.map} +0 -0
- /package/dist/{chunk-ZBRKTF6S.js.map → chunk-WHUEUACV.js.map} +0 -0
- /package/dist/{chunk-BNF6FZLP.js.map → chunk-YIDGB5KP.js.map} +0 -0
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { fn } from 'storybook/test';
|
|
4
|
-
import { Button } from '../components/ui/button';
|
|
5
|
-
import {
|
|
6
|
-
ReopenTicketModal,
|
|
7
|
-
type ReopenTicketModalProps,
|
|
8
|
-
type ReopenTicketSelection,
|
|
9
|
-
} from '../components/ui/reopen-ticket-modal';
|
|
10
|
-
|
|
11
|
-
const meta = {
|
|
12
|
-
title: 'UI/ReopenTicketModal',
|
|
13
|
-
component: ReopenTicketModal,
|
|
14
|
-
parameters: {
|
|
15
|
-
layout: 'centered',
|
|
16
|
-
docs: {
|
|
17
|
-
description: {
|
|
18
|
-
component:
|
|
19
|
-
'Reopen Ticket dialog (Figma openframe---tickets 8456-17581): shown when a technician reopens a ' +
|
|
20
|
-
'Resolved/Archived ticket. Same Status + Assigned pair as TakeOverTicketModal plus an optional free-text ' +
|
|
21
|
-
'reason. Unlike Take Over, the assignee is optional - a reopened ticket may stay unassigned. ' +
|
|
22
|
-
'Presentational - the consumer supplies option lists (design default pre-selects Tech Required), ' +
|
|
23
|
-
'default selections, and performs the actual reopen in onConfirm.',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
argTypes: {
|
|
28
|
-
isPending: { control: 'boolean' },
|
|
29
|
-
assigneesLoading: { control: 'boolean' },
|
|
30
|
-
},
|
|
31
|
-
} satisfies Meta<typeof ReopenTicketModal>;
|
|
32
|
-
|
|
33
|
-
export default meta;
|
|
34
|
-
type Story = StoryObj<typeof meta>;
|
|
35
|
-
|
|
36
|
-
const STATUS_OPTIONS = [
|
|
37
|
-
{ value: 'todo', label: 'Todo', color: '#2890fa' },
|
|
38
|
-
{ value: 'in-progress', label: 'In Progress', color: '#ffc008' },
|
|
39
|
-
{ value: 'tech-required', label: 'Technician Required', color: '#f36666' },
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
const ASSIGNEE_OPTIONS = [
|
|
43
|
-
{ value: 'u1', label: 'Roman Smith' },
|
|
44
|
-
{ value: 'u2', label: 'Olivia Carter' },
|
|
45
|
-
{ value: 'u3', label: 'James Wilson' },
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
function ControlledModal(props: Partial<ReopenTicketModalProps> & { pendingOnConfirm?: boolean }) {
|
|
49
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
50
|
-
const [isPending, setIsPending] = useState(false);
|
|
51
|
-
|
|
52
|
-
const handleConfirm = (selection: ReopenTicketSelection) => {
|
|
53
|
-
props.onConfirm?.(selection);
|
|
54
|
-
if (!props.pendingOnConfirm) {
|
|
55
|
-
setIsOpen(false);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
// Simulate the consumer's reopen mutation round-trip.
|
|
59
|
-
setIsPending(true);
|
|
60
|
-
setTimeout(() => {
|
|
61
|
-
setIsPending(false);
|
|
62
|
-
setIsOpen(false);
|
|
63
|
-
}, 1500);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<>
|
|
68
|
-
<Button variant="outline" onClick={() => setIsOpen(true)}>
|
|
69
|
-
Reopen Ticket
|
|
70
|
-
</Button>
|
|
71
|
-
<ReopenTicketModal
|
|
72
|
-
isOpen={isOpen}
|
|
73
|
-
onClose={() => setIsOpen(false)}
|
|
74
|
-
ticketRef="1003: Email client synchronization issues"
|
|
75
|
-
statusOptions={STATUS_OPTIONS}
|
|
76
|
-
assigneeOptions={ASSIGNEE_OPTIONS}
|
|
77
|
-
{...props}
|
|
78
|
-
isPending={props.isPending ?? isPending}
|
|
79
|
-
onConfirm={handleConfirm}
|
|
80
|
-
/>
|
|
81
|
-
</>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** Design default: Tech Required pre-selected (mock annotation), previous assignee restored. */
|
|
86
|
-
export const Default: Story = {
|
|
87
|
-
args: {
|
|
88
|
-
isOpen: true,
|
|
89
|
-
onClose: fn(),
|
|
90
|
-
onConfirm: fn(),
|
|
91
|
-
ticketRef: '1003: Email client synchronization issues',
|
|
92
|
-
statusOptions: STATUS_OPTIONS,
|
|
93
|
-
assigneeOptions: ASSIGNEE_OPTIONS,
|
|
94
|
-
initialStatusId: 'tech-required',
|
|
95
|
-
initialAssigneeId: 'u1',
|
|
96
|
-
},
|
|
97
|
-
render: args => <ControlledModal {...args} />,
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* No assignee - the reopen still confirms and the ticket stays unassigned
|
|
102
|
-
* (flagged for triage). This is the deliberate difference from Take Over,
|
|
103
|
-
* where the CTA locks until a technician is picked.
|
|
104
|
-
*/
|
|
105
|
-
export const NoAssignee: Story = {
|
|
106
|
-
args: { ...Default.args, initialAssigneeId: null },
|
|
107
|
-
render: args => <ControlledModal {...args} />,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/** Confirm shows the pending state (buttons lock, modal refuses to close). */
|
|
111
|
-
export const PendingOnConfirm: Story = {
|
|
112
|
-
args: { ...Default.args },
|
|
113
|
-
render: args => <ControlledModal {...args} pendingOnConfirm />,
|
|
114
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
|
|
4
|
-
import { TicketEventMessage } from "../components/chat/ticket-event-message";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* `ticket_event` message segment — the ticket lifecycle receipt (Figma:
|
|
8
|
-
* `ai-assistant-info`, types resolved-fae / resolved-tech / reopened-fae /
|
|
9
|
-
* reopened-tech / reopened-reason).
|
|
10
|
-
*
|
|
11
|
-
* Decoded from the standalone `TICKET_EVENT` chunk (live) or the persisted
|
|
12
|
-
* `TicketEventData` row (history). `kind` is an OPEN vocabulary: unknown
|
|
13
|
-
* kinds render as a neutral info line rather than being dropped, so the
|
|
14
|
-
* backend can add lifecycle kinds without a client release.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/** Fixed so the timestamp doesn't churn between snapshots. */
|
|
18
|
-
const TIMESTAMP = new Date("2026-08-07T14:47:00");
|
|
19
|
-
|
|
20
|
-
const plainDecorator = (Story: React.ComponentType) => (
|
|
21
|
-
<div style={{ maxWidth: 600, background: "var(--color-bg)" }} className="p-4">
|
|
22
|
-
<Story />
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const meta = {
|
|
27
|
-
title: "Chat/Client/TicketEventMessage",
|
|
28
|
-
component: TicketEventMessage,
|
|
29
|
-
tags: ["autodocs"],
|
|
30
|
-
parameters: {
|
|
31
|
-
docs: {
|
|
32
|
-
description: {
|
|
33
|
-
component:
|
|
34
|
-
"Renders a `TICKET_EVENT` block: a green check for RESOLVED, a pink info tile for REOPENED and for any kind this build doesn't know, with copy composed from the event's actor and reason fields.",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
decorators: [plainDecorator],
|
|
39
|
-
} satisfies Meta<typeof TicketEventMessage>;
|
|
40
|
-
|
|
41
|
-
export default meta;
|
|
42
|
-
type Story = StoryObj<typeof meta>;
|
|
43
|
-
|
|
44
|
-
/** Fae (the AI agent) resolved the ticket — Figma type=resolved-fae. */
|
|
45
|
-
export const ResolvedByFae: Story = {
|
|
46
|
-
args: {
|
|
47
|
-
data: { kind: "RESOLVED", actorId: "fae", actorName: "Fae", actorType: "AI" },
|
|
48
|
-
timestamp: TIMESTAMP,
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/** A human technician resolved the ticket — Figma type=resolved-tech. */
|
|
53
|
-
export const ResolvedByTechnician: Story = {
|
|
54
|
-
args: {
|
|
55
|
-
data: { kind: "RESOLVED", actorId: "u-42", actorName: "Roman Smith", actorType: "TECHNICIAN" },
|
|
56
|
-
timestamp: TIMESTAMP,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** Reopened with the user's stated reason — Figma type=reopened-reason. */
|
|
61
|
-
export const ReopenedWithReason: Story = {
|
|
62
|
-
args: {
|
|
63
|
-
data: {
|
|
64
|
-
kind: "REOPENED",
|
|
65
|
-
actorId: "u-7",
|
|
66
|
-
actorName: "John Smith",
|
|
67
|
-
actorType: "CLIENT",
|
|
68
|
-
reason: "The printer stopped working again",
|
|
69
|
-
},
|
|
70
|
-
timestamp: TIMESTAMP,
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/** Reopened, no reason, AI keeps assisting — Figma type=reopened-fae. */
|
|
75
|
-
export const ReopenedFaeContinues: Story = {
|
|
76
|
-
args: {
|
|
77
|
-
data: { kind: "REOPENED", actorId: "fae", actorName: "Fae", actorType: "AI" },
|
|
78
|
-
timestamp: TIMESTAMP,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/** Reopened, no reason, routed to a human — Figma type=reopened-tech. */
|
|
83
|
-
export const ReopenedTechnicianReplies: Story = {
|
|
84
|
-
args: {
|
|
85
|
-
data: { kind: "REOPENED", actorId: "u-42", actorName: "Roman Smith", actorType: "TECHNICIAN" },
|
|
86
|
-
timestamp: TIMESTAMP,
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* A kind the client has never seen. The open vocabulary means the backend can
|
|
92
|
-
* add lifecycle kinds without a client release — this story is the regression
|
|
93
|
-
* guard: neutral info line, humanized title, never dropped.
|
|
94
|
-
*/
|
|
95
|
-
export const UnknownKind: Story = {
|
|
96
|
-
args: {
|
|
97
|
-
data: { kind: "ON_HOLD", actorName: "Roman Smith", reason: "Waiting for replacement hardware" },
|
|
98
|
-
timestamp: TIMESTAMP,
|
|
99
|
-
},
|
|
100
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|