@flamingo-stack/openframe-frontend-core 0.0.691-snapshot.20261001154617 → 0.0.691
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-RLNNV46K.js → chunk-4HZXOQRM.js} +2 -2
- package/dist/{chunk-FTK3S57R.cjs → chunk-4N2JOPAQ.cjs} +13 -13
- package/dist/{chunk-FTK3S57R.cjs.map → chunk-4N2JOPAQ.cjs.map} +1 -1
- package/dist/{chunk-WTYQCT4A.cjs → chunk-5N2ZSB42.cjs} +10 -10
- package/dist/{chunk-WTYQCT4A.cjs.map → chunk-5N2ZSB42.cjs.map} +1 -1
- package/dist/{chunk-A5NHAHV6.js → chunk-6Z26ZMR4.js} +2 -2
- package/dist/{chunk-Z7QCNCBN.js → chunk-7WYWPELF.js} +5 -5
- package/dist/{chunk-RTKF5AYA.cjs → chunk-BXAGR3PO.cjs} +3 -3
- package/dist/{chunk-RTKF5AYA.cjs.map → chunk-BXAGR3PO.cjs.map} +1 -1
- package/dist/{chunk-KDCIYRZV.cjs → chunk-BXE2RZEV.cjs} +17 -17
- package/dist/{chunk-KDCIYRZV.cjs.map → chunk-BXE2RZEV.cjs.map} +1 -1
- package/dist/{chunk-X5XFKI6N.js → chunk-CMYDGVTZ.js} +2 -2
- package/dist/{chunk-EXWS2QSD.cjs → chunk-CWXRZVDI.cjs} +50 -588
- package/dist/chunk-CWXRZVDI.cjs.map +1 -0
- package/dist/{chunk-PKZGXRU2.js → chunk-DC3G4XGP.js} +3 -3
- package/dist/{chunk-CG7OWW7X.cjs → chunk-DDWLF2JV.cjs} +4 -4
- package/dist/{chunk-CG7OWW7X.cjs.map → chunk-DDWLF2JV.cjs.map} +1 -1
- package/dist/{chunk-ZAV2F4VX.js → chunk-DZMDG7PC.js} +2 -2
- package/dist/{chunk-KQZMM3QJ.cjs → chunk-ESFPY5FF.cjs} +51 -51
- package/dist/{chunk-KQZMM3QJ.cjs.map → chunk-ESFPY5FF.cjs.map} +1 -1
- package/dist/{chunk-AVAZ6BD6.js → chunk-FNMQ2J44.js} +2 -2
- package/dist/{chunk-DKJDO7YM.cjs → chunk-H54RDLVC.cjs} +18 -18
- package/dist/{chunk-DKJDO7YM.cjs.map → chunk-H54RDLVC.cjs.map} +1 -1
- package/dist/{chunk-RK47E3PP.js → chunk-JSG7WZKV.js} +2 -2
- package/dist/{chunk-CKO6NKNE.js → chunk-KMW2PXBU.js} +212 -750
- package/dist/chunk-KMW2PXBU.js.map +1 -0
- package/dist/{chunk-MCNQKS6I.js → chunk-KVDLL4LU.js} +2 -2
- package/dist/{chunk-5XPK2QGU.cjs → chunk-LCENRN2N.cjs} +3 -3
- package/dist/{chunk-5XPK2QGU.cjs.map → chunk-LCENRN2N.cjs.map} +1 -1
- package/dist/{chunk-IQTQIBZ3.js → chunk-MJI5GVT7.js} +4 -4
- package/dist/{chunk-DUURFYGS.cjs → chunk-N4S7RBUM.cjs} +3 -3
- package/dist/{chunk-DUURFYGS.cjs.map → chunk-N4S7RBUM.cjs.map} +1 -1
- package/dist/{chunk-7BNWMOPM.cjs → chunk-SA4KQCNB.cjs} +36 -36
- package/dist/{chunk-7BNWMOPM.cjs.map → chunk-SA4KQCNB.cjs.map} +1 -1
- package/dist/{chunk-LYQULSK4.js → chunk-TSNGVWQO.js} +5 -5
- package/dist/{chunk-F6LXGP6S.cjs → chunk-WZYIAKIH.cjs} +3 -3
- package/dist/{chunk-F6LXGP6S.cjs.map → chunk-WZYIAKIH.cjs.map} +1 -1
- package/dist/{chunk-TXFGG47A.js → chunk-XBYF4SGD.js} +2 -2
- package/dist/{chunk-Q25VYAEL.cjs → chunk-Y3BC7TOJ.cjs} +17 -17
- package/dist/{chunk-Q25VYAEL.cjs.map → chunk-Y3BC7TOJ.cjs.map} +1 -1
- package/dist/{chunk-ATREVNIN.cjs → chunk-Y3Q76RAA.cjs} +33 -33
- package/dist/{chunk-ATREVNIN.cjs.map → chunk-Y3Q76RAA.cjs.map} +1 -1
- package/dist/{chunk-LYJJH4D6.js → chunk-Y7ZQZOE6.js} +2 -2
- package/dist/{chunk-TEIHEFXP.js → chunk-Z5FHXCXF.js} +4 -4
- package/dist/{chunk-CKUPANVU.cjs → chunk-ZLYLHP64.cjs} +4 -4
- package/dist/{chunk-CKUPANVU.cjs.map → chunk-ZLYLHP64.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +11 -11
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- 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 -34
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.d.ts +0 -1
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/index.js +1 -33
- package/dist/components/help-center-pages/index.cjs +49 -49
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +32 -64
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +12 -44
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +22 -22
- package/dist/components/meeting-scheduler/index.js +1 -1
- package/dist/components/navigation/index.cjs +5 -5
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +6 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/features/index.ts +0 -1
- package/dist/chunk-CKO6NKNE.js.map +0 -1
- package/dist/chunk-EXWS2QSD.cjs.map +0 -1
- package/dist/components/features/remote-session/index.d.ts +0 -13
- package/dist/components/features/remote-session/index.d.ts.map +0 -1
- package/dist/components/features/remote-session/remote-access-request-card.d.ts +0 -19
- package/dist/components/features/remote-session/remote-access-request-card.d.ts.map +0 -1
- package/dist/components/features/remote-session/remote-session-block.d.ts +0 -41
- package/dist/components/features/remote-session/remote-session-block.d.ts.map +0 -1
- package/dist/components/features/remote-session/remote-session-chat-panel.d.ts +0 -23
- package/dist/components/features/remote-session/remote-session-chat-panel.d.ts.map +0 -1
- package/dist/components/features/remote-session/remote-session-dialog.d.ts +0 -15
- package/dist/components/features/remote-session/remote-session-dialog.d.ts.map +0 -1
- package/dist/components/features/remote-session/remote-session-overlay.d.ts +0 -12
- package/dist/components/features/remote-session/remote-session-overlay.d.ts.map +0 -1
- package/dist/components/features/remote-session/remote-session-parts.d.ts +0 -34
- package/dist/components/features/remote-session/remote-session-parts.d.ts.map +0 -1
- package/dist/components/features/remote-session/types.d.ts +0 -33
- package/dist/components/features/remote-session/types.d.ts.map +0 -1
- package/src/components/features/__tests__/remote-session.test.tsx +0 -97
- package/src/components/features/remote-session/index.ts +0 -36
- package/src/components/features/remote-session/remote-access-request-card.tsx +0 -102
- package/src/components/features/remote-session/remote-session-block.tsx +0 -182
- package/src/components/features/remote-session/remote-session-chat-panel.tsx +0 -178
- package/src/components/features/remote-session/remote-session-dialog.tsx +0 -77
- package/src/components/features/remote-session/remote-session-overlay.tsx +0 -33
- package/src/components/features/remote-session/remote-session-parts.tsx +0 -138
- package/src/components/features/remote-session/types.ts +0 -41
- package/src/stories/RemoteSessionAccessRequest.stories.tsx +0 -71
- package/src/stories/RemoteSessionBlock.stories.tsx +0 -164
- package/src/stories/RemoteSessionDialog.stories.tsx +0 -49
- package/src/stories/RemoteSessionIndicator.stories.tsx +0 -44
- /package/dist/{chunk-RLNNV46K.js.map → chunk-4HZXOQRM.js.map} +0 -0
- /package/dist/{chunk-A5NHAHV6.js.map → chunk-6Z26ZMR4.js.map} +0 -0
- /package/dist/{chunk-Z7QCNCBN.js.map → chunk-7WYWPELF.js.map} +0 -0
- /package/dist/{chunk-X5XFKI6N.js.map → chunk-CMYDGVTZ.js.map} +0 -0
- /package/dist/{chunk-PKZGXRU2.js.map → chunk-DC3G4XGP.js.map} +0 -0
- /package/dist/{chunk-ZAV2F4VX.js.map → chunk-DZMDG7PC.js.map} +0 -0
- /package/dist/{chunk-AVAZ6BD6.js.map → chunk-FNMQ2J44.js.map} +0 -0
- /package/dist/{chunk-RK47E3PP.js.map → chunk-JSG7WZKV.js.map} +0 -0
- /package/dist/{chunk-MCNQKS6I.js.map → chunk-KVDLL4LU.js.map} +0 -0
- /package/dist/{chunk-IQTQIBZ3.js.map → chunk-MJI5GVT7.js.map} +0 -0
- /package/dist/{chunk-LYQULSK4.js.map → chunk-TSNGVWQO.js.map} +0 -0
- /package/dist/{chunk-TXFGG47A.js.map → chunk-XBYF4SGD.js.map} +0 -0
- /package/dist/{chunk-LYJJH4D6.js.map → chunk-Y7ZQZOE6.js.map} +0 -0
- /package/dist/{chunk-TEIHEFXP.js.map → chunk-Z5FHXCXF.js.map} +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import { fn } from 'storybook/test';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
RemoteAccessRequestCard,
|
|
7
|
-
RemoteSessionScope,
|
|
8
|
-
type RemoteSessionParty,
|
|
9
|
-
} from '../components/features/remote-session';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The end user's consent dialog for a remote access request, shown by the
|
|
13
|
-
* desktop chat in a 600 px always-on-top window. The host owns the request,
|
|
14
|
-
* the delivery ack and the decision call; the card only renders and reports
|
|
15
|
-
* the click.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const party: RemoteSessionParty = {
|
|
19
|
-
organizationName: 'TechFlow Solutions',
|
|
20
|
-
organizationSiteUrl: 'https://www.techflow.com',
|
|
21
|
-
technicianName: 'Mike Rodriguez',
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
function WindowDecorator(Story: React.ComponentType) {
|
|
25
|
-
return (
|
|
26
|
-
<RemoteSessionScope className="w-[600px]">
|
|
27
|
-
<Story />
|
|
28
|
-
</RemoteSessionScope>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const meta = {
|
|
33
|
-
title: 'Remote Session/Client/Access Request',
|
|
34
|
-
component: RemoteAccessRequestCard,
|
|
35
|
-
tags: ['autodocs'],
|
|
36
|
-
decorators: [WindowDecorator],
|
|
37
|
-
args: { party, onDecide: fn(), onOpenSite: fn() },
|
|
38
|
-
} satisfies Meta<typeof RemoteAccessRequestCard>;
|
|
39
|
-
|
|
40
|
-
export default meta;
|
|
41
|
-
type Story = StoryObj<typeof meta>;
|
|
42
|
-
|
|
43
|
-
/** A recorded session: the recording notice above the consent line. */
|
|
44
|
-
export const Recorded: Story = {
|
|
45
|
-
args: { showRecordingNotice: true },
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** Not recorded: no notice. */
|
|
49
|
-
export const NotRecorded: Story = {
|
|
50
|
-
args: { showRecordingNotice: false },
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/** No site and no logo: the OpenFrame mark, no website button. */
|
|
54
|
-
export const WithoutSite: Story = {
|
|
55
|
-
args: { party: { organizationName: 'TechFlow Solutions' } },
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/** A non-https site is shown but never offered as a link. */
|
|
59
|
-
export const PlainHttpSite: Story = {
|
|
60
|
-
args: { party: { ...party, organizationSiteUrl: 'http://techflow.local' } },
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/** Allow Access sent: both buttons lock, the chosen one spins. */
|
|
64
|
-
export const Allowing: Story = {
|
|
65
|
-
args: { showRecordingNotice: true, deciding: 'APPROVED' },
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/** The decision could not be sent: the error replaces the closing line. */
|
|
69
|
-
export const DecisionFailed: Story = {
|
|
70
|
-
args: { showRecordingNotice: true, error: 'Could not reach the server. Try again.' },
|
|
71
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { fn } from 'storybook/test';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
RemoteSessionBlockFrame,
|
|
8
|
-
RemoteSessionChatPanel,
|
|
9
|
-
RemoteSessionMinimizedChip,
|
|
10
|
-
RemoteSessionScope,
|
|
11
|
-
RemoteSessionSummary,
|
|
12
|
-
type RemoteSessionChatMessage,
|
|
13
|
-
type RemoteSessionParty,
|
|
14
|
-
} from '../components/features/remote-session';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The session block the end user sees while a technician is connected: the
|
|
18
|
-
* summary, the chat with the technician, and the minimized chip. In the
|
|
19
|
-
* desktop chat it lives in its own 440 px window the user can drag around.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const organization: RemoteSessionParty = { organizationName: 'TechFlow Solutions' };
|
|
23
|
-
const technician: RemoteSessionParty = { ...organization, technicianName: 'Mike Rodriguez' };
|
|
24
|
-
|
|
25
|
-
const minutesAgo = (minutes: number) => new Date(Date.now() - minutes * 60_000);
|
|
26
|
-
|
|
27
|
-
const messages: RemoteSessionChatMessage[] = [
|
|
28
|
-
{ id: 'm1', author: 'system', text: 'Mike Rodriguez joined the session', at: minutesAgo(6) },
|
|
29
|
-
{ id: 'm2', author: 'technician', text: 'Hi! I can see your screen now.', at: minutesAgo(5) },
|
|
30
|
-
{ id: 'm3', author: 'user', text: 'Great, the printer is the one on the left.', at: minutesAgo(4) },
|
|
31
|
-
{ id: 'm4', author: 'technician', text: 'Got it - reinstalling the driver now.', at: minutesAgo(2) },
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
function WindowDecorator(Story: React.ComponentType) {
|
|
35
|
-
return (
|
|
36
|
-
<RemoteSessionScope>
|
|
37
|
-
<Story />
|
|
38
|
-
</RemoteSessionScope>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const meta = {
|
|
43
|
-
title: 'Remote Session/Client/Session Block',
|
|
44
|
-
component: RemoteSessionSummary,
|
|
45
|
-
tags: ['autodocs'],
|
|
46
|
-
decorators: [WindowDecorator],
|
|
47
|
-
args: {
|
|
48
|
-
party: technician,
|
|
49
|
-
elapsed: '5:23',
|
|
50
|
-
showRecordingTag: true,
|
|
51
|
-
onOpenChat: fn(),
|
|
52
|
-
onEndSession: fn(),
|
|
53
|
-
},
|
|
54
|
-
render: args => (
|
|
55
|
-
<RemoteSessionBlockFrame onHide={fn()}>
|
|
56
|
-
<RemoteSessionSummary {...args} dragHandlers={{ onPointerDown: fn() }} />
|
|
57
|
-
</RemoteSessionBlockFrame>
|
|
58
|
-
),
|
|
59
|
-
} satisfies Meta<typeof RemoteSessionSummary>;
|
|
60
|
-
|
|
61
|
-
export default meta;
|
|
62
|
-
type Story = StoryObj<typeof meta>;
|
|
63
|
-
|
|
64
|
-
/** A named technician: avatar and "<name> connected". */
|
|
65
|
-
export const Technician: Story = {};
|
|
66
|
-
|
|
67
|
-
/** No technician name on the session: the organization's logo and "IT support team is connected". */
|
|
68
|
-
export const Organization: Story = {
|
|
69
|
-
args: { party: organization },
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/** Not recorded: no SESSION RECORDING tag. */
|
|
73
|
-
export const NotRecorded: Story = {
|
|
74
|
-
args: { showRecordingTag: false },
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/** A long name truncates before the dragger in the corner. */
|
|
78
|
-
export const LongName: Story = {
|
|
79
|
-
args: { party: { ...technician, technicianName: 'Maximilian Alexander Rodriguez-Fernandez' } },
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/** The chat with the technician, opened from the block. */
|
|
83
|
-
export const Chat: Story = {
|
|
84
|
-
render: args => {
|
|
85
|
-
const [draft, setDraft] = useState('');
|
|
86
|
-
return (
|
|
87
|
-
<RemoteSessionBlockFrame expanded onHide={fn()}>
|
|
88
|
-
<RemoteSessionChatPanel
|
|
89
|
-
party={args.party}
|
|
90
|
-
elapsed={args.elapsed}
|
|
91
|
-
showRecordingTag={args.showRecordingTag}
|
|
92
|
-
messages={messages}
|
|
93
|
-
draft={draft}
|
|
94
|
-
onDraftChange={setDraft}
|
|
95
|
-
onSend={fn()}
|
|
96
|
-
onCloseChat={fn()}
|
|
97
|
-
onEndSession={args.onEndSession}
|
|
98
|
-
dragHandlers={{ onPointerDown: fn() }}
|
|
99
|
-
/>
|
|
100
|
-
</RemoteSessionBlockFrame>
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
/** The chat while it is still connecting: the composer is disabled. */
|
|
106
|
-
export const ChatConnecting: Story = {
|
|
107
|
-
render: args => (
|
|
108
|
-
<RemoteSessionBlockFrame expanded onHide={fn()}>
|
|
109
|
-
<RemoteSessionChatPanel
|
|
110
|
-
party={args.party}
|
|
111
|
-
elapsed={args.elapsed}
|
|
112
|
-
messages={[]}
|
|
113
|
-
ready={false}
|
|
114
|
-
draft=""
|
|
115
|
-
onDraftChange={fn()}
|
|
116
|
-
onSend={fn()}
|
|
117
|
-
onCloseChat={fn()}
|
|
118
|
-
onEndSession={args.onEndSession}
|
|
119
|
-
/>
|
|
120
|
-
</RemoteSessionBlockFrame>
|
|
121
|
-
),
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/** "Hide this Block": the technician's avatar and a chevron to bring the block back. */
|
|
125
|
-
export const MinimizedTechnician: Story = {
|
|
126
|
-
render: args => <RemoteSessionMinimizedChip party={args.party} onExpand={fn()} />,
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
/** The minimized chip of the organization variant. */
|
|
130
|
-
export const MinimizedOrganization: Story = {
|
|
131
|
-
render: () => <RemoteSessionMinimizedChip party={organization} onExpand={fn()} />,
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
/** The whole block, switching between summary, chat and the chip like the desktop window does. */
|
|
135
|
-
export const Interactive: Story = {
|
|
136
|
-
render: args => {
|
|
137
|
-
const [panel, setPanel] = useState<'summary' | 'chat'>('summary');
|
|
138
|
-
const [minimized, setMinimized] = useState(false);
|
|
139
|
-
const [draft, setDraft] = useState('');
|
|
140
|
-
const [thread, setThread] = useState(messages);
|
|
141
|
-
if (minimized) return <RemoteSessionMinimizedChip party={args.party} onExpand={() => setMinimized(false)} />;
|
|
142
|
-
return (
|
|
143
|
-
<RemoteSessionBlockFrame expanded={panel === 'chat'} onHide={() => setMinimized(true)}>
|
|
144
|
-
{panel === 'summary' ? (
|
|
145
|
-
<RemoteSessionSummary {...args} onOpenChat={() => setPanel('chat')} />
|
|
146
|
-
) : (
|
|
147
|
-
<RemoteSessionChatPanel
|
|
148
|
-
party={args.party}
|
|
149
|
-
elapsed={args.elapsed}
|
|
150
|
-
showRecordingTag={args.showRecordingTag}
|
|
151
|
-
messages={thread}
|
|
152
|
-
draft={draft}
|
|
153
|
-
onDraftChange={setDraft}
|
|
154
|
-
onSend={text =>
|
|
155
|
-
setThread(current => [...current, { id: `m${current.length + 1}`, author: 'user', text, at: new Date() }])
|
|
156
|
-
}
|
|
157
|
-
onCloseChat={() => setPanel('summary')}
|
|
158
|
-
onEndSession={args.onEndSession}
|
|
159
|
-
/>
|
|
160
|
-
)}
|
|
161
|
-
</RemoteSessionBlockFrame>
|
|
162
|
-
);
|
|
163
|
-
},
|
|
164
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import { fn } from 'storybook/test';
|
|
4
|
-
|
|
5
|
-
import { RemoteSessionDialog, RemoteSessionScope } from '../components/features/remote-session';
|
|
6
|
-
|
|
7
|
-
/** The session's terminal dialogs, each shown by the desktop chat in its own 600 px window. */
|
|
8
|
-
|
|
9
|
-
function WindowDecorator(Story: React.ComponentType) {
|
|
10
|
-
return (
|
|
11
|
-
<RemoteSessionScope className="w-[600px]">
|
|
12
|
-
<Story />
|
|
13
|
-
</RemoteSessionScope>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const meta = {
|
|
18
|
-
title: 'Remote Session/Client/Dialogs',
|
|
19
|
-
component: RemoteSessionDialog,
|
|
20
|
-
tags: ['autodocs'],
|
|
21
|
-
decorators: [WindowDecorator],
|
|
22
|
-
args: {
|
|
23
|
-
variant: 'end-confirm',
|
|
24
|
-
organizationName: 'TechFlow Solutions',
|
|
25
|
-
onEndSession: fn(),
|
|
26
|
-
onClose: fn(),
|
|
27
|
-
},
|
|
28
|
-
} satisfies Meta<typeof RemoteSessionDialog>;
|
|
29
|
-
|
|
30
|
-
export default meta;
|
|
31
|
-
type Story = StoryObj<typeof meta>;
|
|
32
|
-
|
|
33
|
-
/** End Session from the block or the pill asks first. */
|
|
34
|
-
export const EndConfirm: Story = {};
|
|
35
|
-
|
|
36
|
-
/** The end call is in flight. */
|
|
37
|
-
export const Ending: Story = {
|
|
38
|
-
args: { ending: true },
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/** The technician (or the user) ended the session. */
|
|
42
|
-
export const SessionEnded: Story = {
|
|
43
|
-
args: { variant: 'session-ended' },
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/** The relay dropped: the session is over, there is no rejoin. */
|
|
47
|
-
export const ConnectionLost: Story = {
|
|
48
|
-
args: { variant: 'connection-lost' },
|
|
49
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
-
import { fn } from 'storybook/test';
|
|
3
|
-
|
|
4
|
-
import { RemoteSessionBorder, RemoteSessionPill, RemoteSessionScope } from '../components/features/remote-session';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The always-visible "your screen is being controlled" indicator: the yellow
|
|
8
|
-
* border around every screen and the End Session pill hanging from its top
|
|
9
|
-
* edge. The desktop chat draws each in its own click-through window.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
const meta = {
|
|
13
|
-
title: 'Remote Session/Client/Screen Indicator',
|
|
14
|
-
component: RemoteSessionPill,
|
|
15
|
-
tags: ['autodocs'],
|
|
16
|
-
args: { onEndSession: fn() },
|
|
17
|
-
decorators: [
|
|
18
|
-
Story => (
|
|
19
|
-
<RemoteSessionScope>
|
|
20
|
-
<Story />
|
|
21
|
-
</RemoteSessionScope>
|
|
22
|
-
),
|
|
23
|
-
],
|
|
24
|
-
} satisfies Meta<typeof RemoteSessionPill>;
|
|
25
|
-
|
|
26
|
-
export default meta;
|
|
27
|
-
type Story = StoryObj<typeof meta>;
|
|
28
|
-
|
|
29
|
-
/** The pill on its own. */
|
|
30
|
-
export const Pill: Story = {};
|
|
31
|
-
|
|
32
|
-
/** Border and pill together, on a screen-sized stand-in. */
|
|
33
|
-
export const Screen: Story = {
|
|
34
|
-
render: args => (
|
|
35
|
-
<div className="relative h-[360px] w-[640px] bg-ods-bg">
|
|
36
|
-
<div className="absolute inset-0">
|
|
37
|
-
<RemoteSessionBorder />
|
|
38
|
-
</div>
|
|
39
|
-
<div className="absolute inset-x-0 top-0 flex justify-center">
|
|
40
|
-
<RemoteSessionPill {...args} />
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
),
|
|
44
|
-
};
|
|
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
|
|
File without changes
|