@qoretechnologies/reqraft 0.10.20 → 0.10.26
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/.claude/CLAUDE.md +11 -8
- package/dist/components/composer/Composer.d.ts +108 -0
- package/dist/components/composer/Composer.d.ts.map +1 -0
- package/dist/components/composer/Composer.js +238 -0
- package/dist/components/composer/Composer.js.map +1 -0
- package/dist/components/composer/helpers.d.ts +21 -0
- package/dist/components/composer/helpers.d.ts.map +1 -0
- package/dist/components/composer/helpers.js +75 -0
- package/dist/components/composer/helpers.js.map +1 -0
- package/dist/components/composer/index.d.ts +3 -0
- package/dist/components/composer/index.d.ts.map +1 -0
- package/dist/components/composer/index.js +19 -0
- package/dist/components/composer/index.js.map +1 -0
- package/dist/components/form/engine/FormEngine.d.ts +1 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts +21 -0
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -0
- package/dist/components/imageLightbox/ImageLightbox.js +169 -0
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -0
- package/dist/components/imageLightbox/index.d.ts +2 -0
- package/dist/components/imageLightbox/index.d.ts.map +1 -0
- package/dist/components/imageLightbox/index.js +18 -0
- package/dist/components/imageLightbox/index.js.map +1 -0
- package/dist/components/searchFilterBar/SearchFilterBar.d.ts +33 -0
- package/dist/components/searchFilterBar/SearchFilterBar.d.ts.map +1 -0
- package/dist/components/searchFilterBar/SearchFilterBar.js +76 -0
- package/dist/components/searchFilterBar/SearchFilterBar.js.map +1 -0
- package/dist/components/searchFilterBar/index.d.ts +2 -0
- package/dist/components/searchFilterBar/index.d.ts.map +1 -0
- package/dist/components/searchFilterBar/index.js +18 -0
- package/dist/components/searchFilterBar/index.js.map +1 -0
- package/dist/components/supportTicket/AttachmentChips.d.ts +10 -0
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -0
- package/dist/components/supportTicket/AttachmentChips.js +122 -0
- package/dist/components/supportTicket/AttachmentChips.js.map +1 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +43 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.js +31 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -0
- package/dist/components/supportTicket/ReferencePicker.d.ts +87 -0
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -0
- package/dist/components/supportTicket/ReferencePicker.js +295 -0
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -0
- package/dist/components/supportTicket/TicketHeader.d.ts +86 -0
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -0
- package/dist/components/supportTicket/TicketHeader.js +149 -0
- package/dist/components/supportTicket/TicketHeader.js.map +1 -0
- package/dist/components/supportTicket/TicketMetaTags.d.ts +32 -0
- package/dist/components/supportTicket/TicketMetaTags.d.ts.map +1 -0
- package/dist/components/supportTicket/TicketMetaTags.js +21 -0
- package/dist/components/supportTicket/TicketMetaTags.js.map +1 -0
- package/dist/components/supportTicket/TicketReplyBox.d.ts +63 -0
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -0
- package/dist/components/supportTicket/TicketReplyBox.js +115 -0
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -0
- package/dist/components/supportTicket/attachmentAccess.d.ts +37 -0
- package/dist/components/supportTicket/attachmentAccess.d.ts.map +1 -0
- package/dist/components/supportTicket/attachmentAccess.js +132 -0
- package/dist/components/supportTicket/attachmentAccess.js.map +1 -0
- package/dist/components/supportTicket/fileToAttachment.d.ts +9 -0
- package/dist/components/supportTicket/fileToAttachment.d.ts.map +1 -0
- package/dist/components/supportTicket/fileToAttachment.js +28 -0
- package/dist/components/supportTicket/fileToAttachment.js.map +1 -0
- package/dist/components/supportTicket/index.d.ts +11 -0
- package/dist/components/supportTicket/index.d.ts.map +1 -0
- package/dist/components/supportTicket/index.js +27 -0
- package/dist/components/supportTicket/index.js.map +1 -0
- package/dist/components/supportTicket/meta.d.ts +71 -0
- package/dist/components/supportTicket/meta.d.ts.map +1 -0
- package/dist/components/supportTicket/meta.js +115 -0
- package/dist/components/supportTicket/meta.js.map +1 -0
- package/dist/components/supportTicket/ticketModel.d.ts +102 -0
- package/dist/components/supportTicket/ticketModel.d.ts.map +1 -0
- package/dist/components/supportTicket/ticketModel.js +3 -0
- package/dist/components/supportTicket/ticketModel.js.map +1 -0
- package/dist/components/ticketReferences/TicketReferences.d.ts +52 -0
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -0
- package/dist/components/ticketReferences/TicketReferences.js +492 -0
- package/dist/components/ticketReferences/TicketReferences.js.map +1 -0
- package/dist/components/ticketReferences/index.d.ts +3 -0
- package/dist/components/ticketReferences/index.d.ts.map +1 -0
- package/dist/components/ticketReferences/index.js +6 -0
- package/dist/components/ticketReferences/index.js.map +1 -0
- package/dist/components/ticketThread/TicketThread.d.ts +57 -0
- package/dist/components/ticketThread/TicketThread.d.ts.map +1 -0
- package/dist/components/ticketThread/TicketThread.js +299 -0
- package/dist/components/ticketThread/TicketThread.js.map +1 -0
- package/dist/components/ticketThread/index.d.ts +3 -0
- package/dist/components/ticketThread/index.d.ts.map +1 -0
- package/dist/components/ticketThread/index.js +7 -0
- package/dist/components/ticketThread/index.js.map +1 -0
- package/dist/helpers/common.d.ts +5 -0
- package/dist/helpers/common.d.ts.map +1 -1
- package/dist/helpers/common.js +20 -1
- package/dist/helpers/common.js.map +1 -1
- package/dist/helpers/scrollbar.d.ts +2 -0
- package/dist/helpers/scrollbar.d.ts.map +1 -0
- package/dist/helpers/scrollbar.js +25 -0
- package/dist/helpers/scrollbar.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/composer/Composer.stories.tsx +238 -0
- package/src/components/composer/Composer.tsx +545 -0
- package/src/components/composer/helpers.ts +74 -0
- package/src/components/composer/index.ts +2 -0
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +238 -0
- package/src/components/imageLightbox/ImageLightbox.tsx +236 -0
- package/src/components/imageLightbox/index.ts +1 -0
- package/src/components/searchFilterBar/SearchFilterBar.tsx +131 -0
- package/src/components/searchFilterBar/index.ts +1 -0
- package/src/components/supportTicket/AttachmentChips.stories.tsx +171 -0
- package/src/components/supportTicket/AttachmentChips.tsx +147 -0
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +171 -0
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +96 -0
- package/src/components/supportTicket/ReferencePicker.stories.tsx +519 -0
- package/src/components/supportTicket/ReferencePicker.tsx +563 -0
- package/src/components/supportTicket/TicketConversation.stories.tsx +121 -0
- package/src/components/supportTicket/TicketHeader.stories.tsx +183 -0
- package/src/components/supportTicket/TicketHeader.tsx +247 -0
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +103 -0
- package/src/components/supportTicket/TicketMetaTags.tsx +85 -0
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +351 -0
- package/src/components/supportTicket/TicketReplyBox.tsx +146 -0
- package/src/components/supportTicket/attachmentAccess.ts +97 -0
- package/src/components/supportTicket/fileToAttachment.ts +24 -0
- package/src/components/supportTicket/index.ts +10 -0
- package/src/components/supportTicket/meta.ts +185 -0
- package/src/components/supportTicket/ticketModel.ts +131 -0
- package/src/components/ticketReferences/TicketReferences.stories.tsx +315 -0
- package/src/components/ticketReferences/TicketReferences.tsx +886 -0
- package/src/components/ticketReferences/index.ts +2 -0
- package/src/components/ticketThread/TicketThread.stories.tsx +828 -0
- package/src/components/ticketThread/TicketThread.tsx +704 -0
- package/src/components/ticketThread/index.ts +6 -0
- package/src/helpers/common.ts +19 -0
- package/src/helpers/scrollbar.ts +32 -0
- package/src/index.tsx +8 -1
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReqoreInput,
|
|
3
|
+
ReqoreMenu,
|
|
4
|
+
ReqoreMenuItem,
|
|
5
|
+
ReqoreModal,
|
|
6
|
+
ReqoreSpinner,
|
|
7
|
+
} from '@qoretechnologies/reqore';
|
|
8
|
+
import { TReqoreBadge } from '@qoretechnologies/reqore/dist/components/Button';
|
|
9
|
+
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
|
|
10
|
+
import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
|
+
import styled from 'styled-components';
|
|
12
|
+
import { thinScrollbar } from '../../helpers/scrollbar';
|
|
13
|
+
import {
|
|
14
|
+
defaultInterfaceIcon,
|
|
15
|
+
defaultInterfaceKindLabel,
|
|
16
|
+
IInterfaceReference,
|
|
17
|
+
} from './meta';
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* The interface browser: kinds on one side, the selected kind's interfaces on the
|
|
21
|
+
* other, and one search field that scopes both. Sits above a ticket composer, toggled
|
|
22
|
+
* by the composer's "Reference interfaces" action.
|
|
23
|
+
*
|
|
24
|
+
* The host owns the data. Which kinds exist and what lives under one are questions only
|
|
25
|
+
* the surrounding app can answer — the IDE lists them off the customer's live instance,
|
|
26
|
+
* a story hands over fixtures — so this component takes `kinds` and the selected kind's
|
|
27
|
+
* `items` and does the rest: selection, search, and turning a click into a reference.
|
|
28
|
+
* Nothing here fetches; `kind` is the only contract, and the host maps it onto whatever
|
|
29
|
+
* transport it has.
|
|
30
|
+
*
|
|
31
|
+
* Three rules the layout follows, in order of how often they bite:
|
|
32
|
+
*
|
|
33
|
+
* - Search filters the kind list down to what matches, and keeps ONE extra row: the
|
|
34
|
+
* selected kind, dimmed, when the query doesn't match it. That row is what stops the
|
|
35
|
+
* right-hand results outliving the kind they belong to — without it you'd see three
|
|
36
|
+
* interfaces and no way to tell what they were. Everything else goes, because a match
|
|
37
|
+
* that survives only by scrolling past nine dimmed rows isn't a match the user found.
|
|
38
|
+
* - A picked interface STAYS in the list, selected. Dropping it on pick was a
|
|
39
|
+
* disappearing act with no undo inside the picker; now the row toggles.
|
|
40
|
+
* - Below `STACK_BREAKPOINT` of its OWN width — not the viewport's, since this thing
|
|
41
|
+
* lives inside composers and drawers — the two panes collapse into one column and the
|
|
42
|
+
* selected kind's interfaces render directly beneath it. On a phone it goes further
|
|
43
|
+
* and lifts into a modal, because inline it would own the whole screen.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/** How tall the panes get before they scroll: side by side, stacked, and in the modal. */
|
|
47
|
+
const COLUMNS_MAX_HEIGHT = '220px';
|
|
48
|
+
const STACKED_MAX_HEIGHT = '280px';
|
|
49
|
+
const MODAL_MAX_HEIGHT = '60vh';
|
|
50
|
+
const KIND_PANE_WIDTH = 150;
|
|
51
|
+
/** Container width (not viewport) below which the panes stack into one column. */
|
|
52
|
+
const STACK_BREAKPOINT = 420;
|
|
53
|
+
const BORDER = 'rgba(123, 104, 238, 0.25)';
|
|
54
|
+
/*
|
|
55
|
+
* Marks the selected kind when the search doesn't match it — it's only still on the
|
|
56
|
+
* list to say what the interfaces on the right are. Quiet, but pickable.
|
|
57
|
+
*/
|
|
58
|
+
const DIMMED_CLASS = 'reqore-reference-picker-dimmed';
|
|
59
|
+
/*
|
|
60
|
+
* Marks an already-referenced row. Reqore paints `selected` purely through styled
|
|
61
|
+
* props — no class, no aria state — so "is this row picked" is unobservable from the
|
|
62
|
+
* outside without a marker of our own. Stable, so a host can style on it too.
|
|
63
|
+
*/
|
|
64
|
+
const PICKED_CLASS = 'reqore-reference-picker-picked';
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* A scroll pane with the thin, unobtrusive scrollbar the Qonsole surfaces use
|
|
68
|
+
* (transparent track, translucent rounded thumb) rather than the raw browser one.
|
|
69
|
+
* webkit-only, like those surfaces: setting `scrollbar-width` as well would let
|
|
70
|
+
* Chromium override this custom 6px with its own, wider, "thin".
|
|
71
|
+
*/
|
|
72
|
+
const Pane = styled.div<{ $right?: boolean; $maxHeight: string }>`
|
|
73
|
+
${({ $right }) =>
|
|
74
|
+
$right
|
|
75
|
+
? 'flex: 1; min-width: 0;'
|
|
76
|
+
: `width: ${KIND_PANE_WIDTH}px; flex: none; border-right: 1px solid ${BORDER};`}
|
|
77
|
+
max-height: ${({ $maxHeight }) => $maxHeight};
|
|
78
|
+
overflow-y: auto;
|
|
79
|
+
padding: 4px;
|
|
80
|
+
|
|
81
|
+
${thinScrollbar}
|
|
82
|
+
`;
|
|
83
|
+
|
|
84
|
+
/** The stacked counterpart of `Pane` — one column, so one scroll region. */
|
|
85
|
+
const Stack = styled.div<{ $maxHeight: string }>`
|
|
86
|
+
max-height: ${({ $maxHeight }) => $maxHeight};
|
|
87
|
+
overflow-y: auto;
|
|
88
|
+
padding: 4px;
|
|
89
|
+
|
|
90
|
+
${thinScrollbar}
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
* The selected kind's interfaces once the panes have collapsed. The indent and the
|
|
95
|
+
* rule are the only things left saying "these belong to the row above" — in the
|
|
96
|
+
* two-pane layout the divider between the panes says it.
|
|
97
|
+
*/
|
|
98
|
+
const Nested = styled.div`
|
|
99
|
+
margin: 2px 0 4px 10px;
|
|
100
|
+
padding-left: 8px;
|
|
101
|
+
border-left: 1px solid ${BORDER};
|
|
102
|
+
`;
|
|
103
|
+
|
|
104
|
+
const Frame = styled.div<{ $bare?: boolean }>`
|
|
105
|
+
${({ $bare }) => ($bare ? '' : `border: 1px solid ${BORDER}; border-radius: 8px;`)}
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
|
|
108
|
+
/* Rows the search doesn't match. Set here rather than per row so the rule is
|
|
109
|
+
stated once, and on the row itself (not a wrapper) so it can't disturb the
|
|
110
|
+
menu's own flex layout. */
|
|
111
|
+
.${DIMMED_CLASS} {
|
|
112
|
+
opacity: 0.35;
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
const Panes = styled.div`
|
|
117
|
+
display: flex;
|
|
118
|
+
`;
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
* An underline search field. The input itself is borderless (`flat transparent`) and
|
|
122
|
+
* this wrapper carries the single bottom border, so the search reads as a line rather
|
|
123
|
+
* than a full grey box — including on focus, where Reqore's default is a 2px outline
|
|
124
|
+
* around the whole control. Suppressing that outline and brightening the underline
|
|
125
|
+
* instead keeps a focus cue without the box. The selector is scoped under this wrapper,
|
|
126
|
+
* so it outranks Reqore's without `!important`.
|
|
127
|
+
*
|
|
128
|
+
* `$active` (the field has a query) holds the underline at full accent, so a filtered
|
|
129
|
+
* list is legible as filtered at a glance — the same signal `intent='info'` carries on
|
|
130
|
+
* a plain filter control, spoken in this surface's own accent.
|
|
131
|
+
*/
|
|
132
|
+
const Search = styled.div<{ $accent: string; $active?: boolean }>`
|
|
133
|
+
padding: 6px 4px 4px;
|
|
134
|
+
border-bottom: 1px solid
|
|
135
|
+
${({ $accent, $active }) => ($active ? $accent : `${$accent}80`)};
|
|
136
|
+
transition: border-color 0.15s ease-out;
|
|
137
|
+
|
|
138
|
+
.reqore-control-wrapper:focus-within {
|
|
139
|
+
outline: none;
|
|
140
|
+
}
|
|
141
|
+
&:focus-within {
|
|
142
|
+
border-bottom-color: ${({ $accent }) => $accent};
|
|
143
|
+
}
|
|
144
|
+
`;
|
|
145
|
+
|
|
146
|
+
const Note = styled.div`
|
|
147
|
+
opacity: 0.4;
|
|
148
|
+
padding: 8px 6px;
|
|
149
|
+
font-size: 12px;
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
const DEFAULT_ACCENT = '#762f7e';
|
|
153
|
+
|
|
154
|
+
/*
|
|
155
|
+
* How a picked row reads: `info`, tinted rather than filled.
|
|
156
|
+
*
|
|
157
|
+
* Two Reqore details make this less obvious than `selected` + `intent`:
|
|
158
|
+
*
|
|
159
|
+
* - `selected` becomes `active` on the button, and the active branch paints a solid
|
|
160
|
+
* background from the intent while ignoring `minimal` and `transparent` outright.
|
|
161
|
+
* So `selected` can't be softened — it has to go, and `minimal` carries the state.
|
|
162
|
+
* - `ReqoreMenuItem` sets `transparent` on every row, and `transparent` short-circuits
|
|
163
|
+
* `minimal`'s tint to nothing. Turning it off for picked rows is what lets the tint
|
|
164
|
+
* land, and it's only spread when the row IS picked — a `transparent: undefined` on
|
|
165
|
+
* the others would override the menu item's own default and flatten them all.
|
|
166
|
+
*
|
|
167
|
+
* The point of the tint: a solid blue bar is too much weight for "this one's already
|
|
168
|
+
* in your list". The rows still up for choosing are what the user is reading, and they
|
|
169
|
+
* should stay the loudest thing in the pane.
|
|
170
|
+
*/
|
|
171
|
+
const pickedItemProps = (isPicked: boolean) =>
|
|
172
|
+
isPicked ? ({ intent: 'info', minimal: true, transparent: false } as const) : {};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* One interface in the list. A bare string is the name and nothing else — the common
|
|
176
|
+
* case, and what a host that has only names can keep passing. The object form adds the
|
|
177
|
+
* two things a name alone can't disambiguate: a `description` second line (what the
|
|
178
|
+
* thing is for, an owning group, a path) and a `badge` (a version, a run count, a
|
|
179
|
+
* status tag). Search reads both the name and the description, since both are on screen.
|
|
180
|
+
*/
|
|
181
|
+
export interface IReferencePickerItem {
|
|
182
|
+
/** the interface name — this is what gets stored on the reference */
|
|
183
|
+
name: string;
|
|
184
|
+
/** a muted second line under the name */
|
|
185
|
+
description?: string;
|
|
186
|
+
/** trailing badge, before the add/remove icon */
|
|
187
|
+
badge?: TReqoreBadge | TReqoreBadge[];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type TReferencePickerItem = string | IReferencePickerItem;
|
|
191
|
+
|
|
192
|
+
/** `auto` picks `stacked` from the picker's own measured width. */
|
|
193
|
+
export type TReferencePickerLayout = 'auto' | 'columns' | 'stacked';
|
|
194
|
+
/** `auto` lifts into a modal on a phone-sized viewport, when `onClose` is given. */
|
|
195
|
+
export type TReferencePickerPresentation = 'auto' | 'inline' | 'modal';
|
|
196
|
+
|
|
197
|
+
export interface IReferencePickerProps {
|
|
198
|
+
/** the interface kinds listed down the left pane */
|
|
199
|
+
kinds: string[];
|
|
200
|
+
/** the kind whose interfaces `items` holds */
|
|
201
|
+
kind: string;
|
|
202
|
+
onKindChange: (kind: string) => void;
|
|
203
|
+
/**
|
|
204
|
+
* The selected kind's interfaces — bare names, or objects carrying a description
|
|
205
|
+
* and a badge. Fetching is the host's job; it knows where they come from and how
|
|
206
|
+
* to cache them.
|
|
207
|
+
*/
|
|
208
|
+
items: TReferencePickerItem[];
|
|
209
|
+
/** `items` is still being fetched, so the right pane shows a spinner rather than
|
|
210
|
+
* claiming the kind is empty */
|
|
211
|
+
loading?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The host's fetch for this kind failed. Shown in place of the list, because an
|
|
214
|
+
* empty pane would otherwise read as "this instance has no workflows" — which is a
|
|
215
|
+
* different and much more alarming statement than "we couldn't ask".
|
|
216
|
+
*/
|
|
217
|
+
error?: string;
|
|
218
|
+
/** Retry the failed fetch. The error state is pressable when given. */
|
|
219
|
+
onRetry?: () => void;
|
|
220
|
+
/** Already-picked references. Anything of the current kind that is already picked
|
|
221
|
+
* renders selected in place — never removed from the list. */
|
|
222
|
+
picked?: IInterfaceReference[];
|
|
223
|
+
onAdd: (reference: IInterfaceReference) => void;
|
|
224
|
+
/** Un-pick a reference from inside the picker. Without it a picked row still shows
|
|
225
|
+
* as picked, it just can't be toggled back off here. */
|
|
226
|
+
onRemove?: (reference: IInterfaceReference) => void;
|
|
227
|
+
/** the whole picker is inert (e.g. a reply is in flight) */
|
|
228
|
+
disabled?: boolean;
|
|
229
|
+
/** Per-kind icon. Consumers with their own icon vocabulary (the IDE) pass one; the
|
|
230
|
+
* built-in per-kind default is used when omitted. */
|
|
231
|
+
resolveInterfaceIcon?: (kind: string) => IReqoreIconName;
|
|
232
|
+
/**
|
|
233
|
+
* Per-kind reading name — "Value maps" for `value-map`. The kind id is a wire value
|
|
234
|
+
* and never reaches the user; this is what does. Search matches both, so typing
|
|
235
|
+
* either the id or the label finds the kind. Defaults to the built-in Qorus
|
|
236
|
+
* vocabulary.
|
|
237
|
+
*/
|
|
238
|
+
resolveKindLabel?: (kind: string) => string;
|
|
239
|
+
/** the underline / selected-kind colour. Defaults to the support surfaces' violet. */
|
|
240
|
+
accent?: string;
|
|
241
|
+
/** shown above the panes — the composer's picked-reference chips, typically */
|
|
242
|
+
header?: ReactNode;
|
|
243
|
+
/**
|
|
244
|
+
* Dismiss the picker. Required for the modal presentation (a modal with no way out
|
|
245
|
+
* is a trap); the inline presentation ignores it, since the host's own toggle is
|
|
246
|
+
* what closes the picker there.
|
|
247
|
+
*/
|
|
248
|
+
onClose?: () => void;
|
|
249
|
+
/** Modal heading. */
|
|
250
|
+
title?: string;
|
|
251
|
+
/** How the panes arrange. `auto` (default) stacks below `STACK_BREAKPOINT` of the
|
|
252
|
+
* picker's own width; the explicit values are what stories pin. */
|
|
253
|
+
layout?: TReferencePickerLayout;
|
|
254
|
+
/** Where the picker renders. `auto` (default) goes to a modal on a phone-sized
|
|
255
|
+
* viewport when `onClose` is given, and stays inline otherwise. */
|
|
256
|
+
presentation?: TReferencePickerPresentation;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Watches an element's own width, because the viewport's is the wrong question for
|
|
261
|
+
* anything that lives inside a composer, a drawer or a side panel — those stay narrow
|
|
262
|
+
* on a 2560px screen. A callback ref rather than `useRef` so the observer attaches the
|
|
263
|
+
* moment the node mounts; a ref that never gets attached silently reports "wide"
|
|
264
|
+
* forever, which is exactly the bug this is meant to catch.
|
|
265
|
+
*/
|
|
266
|
+
const useIsNarrow = (enabled: boolean): [(node: HTMLDivElement | null) => void, boolean] => {
|
|
267
|
+
const [node, setNode] = useState<HTMLDivElement | null>(null);
|
|
268
|
+
const [narrow, setNarrow] = useState<boolean>(false);
|
|
269
|
+
|
|
270
|
+
useEffect(() => {
|
|
271
|
+
if (!enabled || !node || typeof ResizeObserver === 'undefined') {
|
|
272
|
+
return undefined;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
276
|
+
setNarrow(entry.contentRect.width < STACK_BREAKPOINT);
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
observer.observe(node);
|
|
280
|
+
|
|
281
|
+
return () => observer.disconnect();
|
|
282
|
+
}, [enabled, node]);
|
|
283
|
+
|
|
284
|
+
return [setNode, narrow];
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/** Phone-sized viewport. Its own media query rather than reqore's `isMobile`, which
|
|
288
|
+
* is pinned to `false` under NODE_ENV=test and so never fires in a story run. */
|
|
289
|
+
const usePhoneViewport = (enabled: boolean): boolean => {
|
|
290
|
+
const [phone, setPhone] = useState<boolean>(false);
|
|
291
|
+
|
|
292
|
+
useEffect(() => {
|
|
293
|
+
if (!enabled || typeof window === 'undefined' || !window.matchMedia) {
|
|
294
|
+
return undefined;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
const query = window.matchMedia('(max-width: 480px)');
|
|
298
|
+
const sync = () => setPhone(query.matches);
|
|
299
|
+
|
|
300
|
+
sync();
|
|
301
|
+
query.addEventListener('change', sync);
|
|
302
|
+
|
|
303
|
+
return () => query.removeEventListener('change', sync);
|
|
304
|
+
}, [enabled]);
|
|
305
|
+
|
|
306
|
+
return phone;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export const ReferencePicker = ({
|
|
310
|
+
kinds,
|
|
311
|
+
kind,
|
|
312
|
+
onKindChange,
|
|
313
|
+
items,
|
|
314
|
+
loading,
|
|
315
|
+
error,
|
|
316
|
+
onRetry,
|
|
317
|
+
picked,
|
|
318
|
+
onAdd,
|
|
319
|
+
onRemove,
|
|
320
|
+
disabled,
|
|
321
|
+
resolveInterfaceIcon = defaultInterfaceIcon,
|
|
322
|
+
resolveKindLabel = defaultInterfaceKindLabel,
|
|
323
|
+
accent = DEFAULT_ACCENT,
|
|
324
|
+
header,
|
|
325
|
+
onClose,
|
|
326
|
+
title = 'Reference interfaces',
|
|
327
|
+
layout = 'auto',
|
|
328
|
+
presentation = 'auto',
|
|
329
|
+
}: IReferencePickerProps) => {
|
|
330
|
+
const [query, setQuery] = useState<string>('');
|
|
331
|
+
const needle = query.trim().toLowerCase();
|
|
332
|
+
|
|
333
|
+
const [frameRef, narrow] = useIsNarrow(layout === 'auto');
|
|
334
|
+
const phone = usePhoneViewport(presentation === 'auto');
|
|
335
|
+
|
|
336
|
+
const asModal = presentation === 'modal' || (presentation === 'auto' && phone && !!onClose);
|
|
337
|
+
const stacked = layout === 'stacked' || (layout === 'auto' && narrow);
|
|
338
|
+
const label = resolveKindLabel(kind);
|
|
339
|
+
|
|
340
|
+
/* A kind matches on its id or its reading name, so "value map" and `value-map`
|
|
341
|
+
* both find it. */
|
|
342
|
+
const matchesKind = useCallback(
|
|
343
|
+
(candidate: string) =>
|
|
344
|
+
!needle ||
|
|
345
|
+
candidate.toLowerCase().includes(needle) ||
|
|
346
|
+
resolveKindLabel(candidate).toLowerCase().includes(needle),
|
|
347
|
+
[needle, resolveKindLabel]
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
/* The matches, plus the selected kind whether or not it matched — it keeps its
|
|
351
|
+
* natural position rather than jumping to the top, so the list a user is reading
|
|
352
|
+
* doesn't reorder under them mid-keystroke. */
|
|
353
|
+
const visibleKinds = useMemo(
|
|
354
|
+
() => kinds.filter((candidate) => candidate === kind || matchesKind(candidate)),
|
|
355
|
+
[kinds, kind, matchesKind]
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
const pickedNames = useMemo(
|
|
359
|
+
() =>
|
|
360
|
+
new Set(
|
|
361
|
+
(picked ?? [])
|
|
362
|
+
.filter((reference) => reference.interface_kind === kind)
|
|
363
|
+
.map((reference) => reference.interface_name)
|
|
364
|
+
),
|
|
365
|
+
[picked, kind]
|
|
366
|
+
);
|
|
367
|
+
|
|
368
|
+
/** One shape from here down, whichever of the two the host passed. */
|
|
369
|
+
const normalizedItems = useMemo(
|
|
370
|
+
() => items.map((item) => (typeof item === 'string' ? { name: item } : item)),
|
|
371
|
+
[items]
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
/*
|
|
375
|
+
* The interfaces the search leaves standing. When the KIND itself matches
|
|
376
|
+
* ("workflow"), its interfaces all stay — you searched for the kind, so you want to
|
|
377
|
+
* see what's in it. Otherwise the name and the description are both fair game,
|
|
378
|
+
* because both are text the user can see.
|
|
379
|
+
*/
|
|
380
|
+
const visibleItems = useMemo(() => {
|
|
381
|
+
const kindMatches = matchesKind(kind);
|
|
382
|
+
|
|
383
|
+
return normalizedItems.filter(
|
|
384
|
+
(item) =>
|
|
385
|
+
!needle ||
|
|
386
|
+
kindMatches ||
|
|
387
|
+
item.name.toLowerCase().includes(needle) ||
|
|
388
|
+
!!item.description?.toLowerCase().includes(needle)
|
|
389
|
+
);
|
|
390
|
+
}, [normalizedItems, kind, needle, matchesKind]);
|
|
391
|
+
|
|
392
|
+
/* Drives the "…but other types do" hint: with the kind list now always on screen,
|
|
393
|
+
* an empty result is only puzzling when the answer is sitting in another row. */
|
|
394
|
+
const otherKindsMatch = useMemo(
|
|
395
|
+
() => !!needle && kinds.some((candidate) => candidate !== kind && matchesKind(candidate)),
|
|
396
|
+
[kinds, kind, needle, matchesKind]
|
|
397
|
+
);
|
|
398
|
+
|
|
399
|
+
const toggle = (name: string) => {
|
|
400
|
+
const reference: IInterfaceReference = { interface_kind: kind, interface_name: name };
|
|
401
|
+
|
|
402
|
+
if (pickedNames.has(name)) {
|
|
403
|
+
onRemove?.(reference);
|
|
404
|
+
} else {
|
|
405
|
+
onAdd(reference);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const emptyNote = () => {
|
|
410
|
+
if (!needle) {
|
|
411
|
+
return `No ${label.toLowerCase()} on this instance`;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return otherKindsMatch
|
|
415
|
+
? `No ${label.toLowerCase()} match “${query.trim()}” — other types do`
|
|
416
|
+
: `Nothing matches “${query.trim()}”`;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
/* Both panes are `ReqoreMenu`s of `ReqoreMenuItem`s — a vertical selectable list is
|
|
420
|
+
exactly what Menu is, so the selection (`selected`), the left-icon + right-icon,
|
|
421
|
+
and the item chrome come from reqore rather than hand-styled buttons. The wrappers
|
|
422
|
+
still own the scroll and the layout; the menus render transparent inside them.
|
|
423
|
+
Only menu items go inside a `ReqoreMenu`: it clones every child with its own props,
|
|
424
|
+
so a spinner or a note nested in one would be handed props it can't take. */
|
|
425
|
+
const kindItems = visibleKinds.map((option) => (
|
|
426
|
+
<ReqoreMenuItem
|
|
427
|
+
key={option}
|
|
428
|
+
className={matchesKind(option) ? undefined : DIMMED_CLASS}
|
|
429
|
+
icon={resolveInterfaceIcon(option)}
|
|
430
|
+
label={resolveKindLabel(option)}
|
|
431
|
+
selected={option === kind}
|
|
432
|
+
disabled={disabled}
|
|
433
|
+
onClick={() => onKindChange(option)}
|
|
434
|
+
/>
|
|
435
|
+
));
|
|
436
|
+
|
|
437
|
+
const interfaces = (() => {
|
|
438
|
+
if (error) {
|
|
439
|
+
return (
|
|
440
|
+
<ReqoreMenu transparent flat padded={false} width='100%' size='small'>
|
|
441
|
+
<ReqoreMenuItem
|
|
442
|
+
icon='ErrorWarningLine'
|
|
443
|
+
rightIcon={onRetry ? 'RefreshLine' : undefined}
|
|
444
|
+
intent='danger'
|
|
445
|
+
label={`Couldn't load ${label.toLowerCase()}`}
|
|
446
|
+
/* the specific failure is the tooltip — the pane states the outcome */
|
|
447
|
+
tooltip={error}
|
|
448
|
+
onClick={onRetry}
|
|
449
|
+
/>
|
|
450
|
+
</ReqoreMenu>
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
if (loading) {
|
|
455
|
+
return (
|
|
456
|
+
<ReqoreSpinner iconColor='info' size='small' centered>
|
|
457
|
+
Loading {label.toLowerCase()}…
|
|
458
|
+
</ReqoreSpinner>
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (!visibleItems.length) {
|
|
463
|
+
return <Note>{emptyNote()}</Note>;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return (
|
|
467
|
+
<ReqoreMenu transparent flat padded={false} width='100%' size='small'>
|
|
468
|
+
{visibleItems.map(({ name, description, badge }) => {
|
|
469
|
+
const isPicked = pickedNames.has(name);
|
|
470
|
+
const removable = isPicked && !!onRemove;
|
|
471
|
+
|
|
472
|
+
return (
|
|
473
|
+
<ReqoreMenuItem
|
|
474
|
+
key={name}
|
|
475
|
+
className={isPicked ? PICKED_CLASS : undefined}
|
|
476
|
+
icon={resolveInterfaceIcon(kind)}
|
|
477
|
+
rightIcon={isPicked ? 'CheckLine' : 'AddLine'}
|
|
478
|
+
label={name}
|
|
479
|
+
description={description}
|
|
480
|
+
badge={badge}
|
|
481
|
+
disabled={disabled}
|
|
482
|
+
tooltip={
|
|
483
|
+
isPicked
|
|
484
|
+
? removable
|
|
485
|
+
? `Remove “${name}”`
|
|
486
|
+
: `“${name}” is already referenced`
|
|
487
|
+
: `Reference “${name}”`
|
|
488
|
+
}
|
|
489
|
+
onClick={!isPicked || removable ? () => toggle(name) : undefined}
|
|
490
|
+
{...pickedItemProps(isPicked)}
|
|
491
|
+
/>
|
|
492
|
+
);
|
|
493
|
+
})}
|
|
494
|
+
</ReqoreMenu>
|
|
495
|
+
);
|
|
496
|
+
})();
|
|
497
|
+
|
|
498
|
+
const maxHeight = asModal
|
|
499
|
+
? MODAL_MAX_HEIGHT
|
|
500
|
+
: stacked
|
|
501
|
+
? STACKED_MAX_HEIGHT
|
|
502
|
+
: COLUMNS_MAX_HEIGHT;
|
|
503
|
+
|
|
504
|
+
/* Stacked: one column, with the selected kind's interfaces spliced in directly
|
|
505
|
+
under its row. A kind the host hasn't listed puts them at the end rather than
|
|
506
|
+
dropping them. */
|
|
507
|
+
const selectedIndex = visibleKinds.indexOf(kind);
|
|
508
|
+
const splitAt = selectedIndex === -1 ? visibleKinds.length : selectedIndex + 1;
|
|
509
|
+
|
|
510
|
+
const body = (
|
|
511
|
+
<Frame ref={frameRef} $bare={asModal}>
|
|
512
|
+
{header}
|
|
513
|
+
<Search $accent={accent} $active={!!needle}>
|
|
514
|
+
<ReqoreInput
|
|
515
|
+
value={query}
|
|
516
|
+
onChange={(event) => setQuery((event.target as HTMLInputElement).value)}
|
|
517
|
+
placeholder='Search types and interfaces…'
|
|
518
|
+
icon='SearchLine'
|
|
519
|
+
minimal
|
|
520
|
+
flat
|
|
521
|
+
transparent
|
|
522
|
+
fluid
|
|
523
|
+
disabled={disabled}
|
|
524
|
+
onClearClick={query ? () => setQuery('') : undefined}
|
|
525
|
+
/>
|
|
526
|
+
</Search>
|
|
527
|
+
{stacked ? (
|
|
528
|
+
<Stack $maxHeight={maxHeight}>
|
|
529
|
+
<ReqoreMenu transparent flat padded={false} width='100%' size='small'>
|
|
530
|
+
{kindItems.slice(0, splitAt)}
|
|
531
|
+
</ReqoreMenu>
|
|
532
|
+
<Nested>{interfaces}</Nested>
|
|
533
|
+
{splitAt < kindItems.length ? (
|
|
534
|
+
<ReqoreMenu transparent flat padded={false} width='100%' size='small'>
|
|
535
|
+
{kindItems.slice(splitAt)}
|
|
536
|
+
</ReqoreMenu>
|
|
537
|
+
) : null}
|
|
538
|
+
</Stack>
|
|
539
|
+
) : (
|
|
540
|
+
<Panes>
|
|
541
|
+
<Pane $maxHeight={maxHeight}>
|
|
542
|
+
<ReqoreMenu transparent flat padded={false} width='100%' size='small'>
|
|
543
|
+
{kindItems}
|
|
544
|
+
</ReqoreMenu>
|
|
545
|
+
</Pane>
|
|
546
|
+
<Pane $right $maxHeight={maxHeight}>
|
|
547
|
+
{interfaces}
|
|
548
|
+
</Pane>
|
|
549
|
+
</Panes>
|
|
550
|
+
)}
|
|
551
|
+
</Frame>
|
|
552
|
+
);
|
|
553
|
+
|
|
554
|
+
if (!asModal) {
|
|
555
|
+
return body;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
return (
|
|
559
|
+
<ReqoreModal isOpen icon='LinksLine' label={title} width='100%' blur={3} onClose={onClose}>
|
|
560
|
+
{body}
|
|
561
|
+
</ReqoreModal>
|
|
562
|
+
);
|
|
563
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ReqoreUIProvider } from '@qoretechnologies/reqore';
|
|
2
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import { expect, fn } from 'storybook/test';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { StoryMeta } from '../../types';
|
|
6
|
+
import { ITicketThreadMessage, TicketThread } from '../ticketThread/TicketThread';
|
|
7
|
+
import { InterfaceReferenceTags } from './InterfaceReferenceTags';
|
|
8
|
+
import { TicketReplyBox } from './TicketReplyBox';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The full ticket surface — the shared `<TicketThread>` conversation above the
|
|
12
|
+
* `<TicketReplyBox>` composer, the way a ticket detail (customer) or the staff
|
|
13
|
+
* drawer stacks them. Shown under the Qorus theme so the `custom1` accent renders.
|
|
14
|
+
*/
|
|
15
|
+
const meta = {
|
|
16
|
+
component: TicketReplyBox,
|
|
17
|
+
title: 'Components/TicketConversation',
|
|
18
|
+
args: { onSend: fn() },
|
|
19
|
+
} as StoryMeta<typeof TicketReplyBox>;
|
|
20
|
+
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
|
|
24
|
+
const CUSTOMER: ITicketThreadMessage = {
|
|
25
|
+
message_id: 'm1',
|
|
26
|
+
author_type: 'customer',
|
|
27
|
+
author_id: 'ops@acme.io',
|
|
28
|
+
body: 'Since upgrading to 3.2 our nightly SFTP transfer to the partner endpoint times out after about 30 seconds. It ran fine on 3.1 with the same connection config.',
|
|
29
|
+
created: '2026-07-16T09:12:00Z',
|
|
30
|
+
referenced_interfaces: [{ interface_kind: 'connection', interface_name: 'sftp-partner' }],
|
|
31
|
+
};
|
|
32
|
+
const STAFF: ITicketThreadMessage = {
|
|
33
|
+
message_id: 'm2',
|
|
34
|
+
author_type: 'staff',
|
|
35
|
+
author_id: 'nick',
|
|
36
|
+
body: "Thanks for the detailed report — we've reproduced the timeout and a fix is in review. In the meantime, can you confirm the datasource pool size configured for the sftp-partner connection?",
|
|
37
|
+
created: '2026-07-16T10:03:00Z',
|
|
38
|
+
};
|
|
39
|
+
const INTERNAL: ITicketThreadMessage = {
|
|
40
|
+
message_id: 'm3',
|
|
41
|
+
author_type: 'staff',
|
|
42
|
+
author_id: 'nick',
|
|
43
|
+
internal: true,
|
|
44
|
+
body: 'Root cause: the connection-pool default silently dropped from 4 to 1 in the 3.2 migration. Patch is in review against develop.',
|
|
45
|
+
created: '2026-07-16T10:05:00Z',
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const themed = (node: ReactNode) => (
|
|
49
|
+
<ReqoreUIProvider theme={{ main: '#121212', intents: { custom1: '#762f7e' } }}>
|
|
50
|
+
<div style={{ padding: 20, background: '#121212', maxWidth: 780 }}>{node}</div>
|
|
51
|
+
</ReqoreUIProvider>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const refs = (
|
|
55
|
+
<InterfaceReferenceTags
|
|
56
|
+
customTheme={{ main: 'custom1' }}
|
|
57
|
+
references={[{ interface_kind: 'connection', interface_name: 'sftp-partner' }]}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Staff view — the thread with `viewerRole='staff'` (internal notes show, amber)
|
|
63
|
+
* above the staff composer with the split send.
|
|
64
|
+
*/
|
|
65
|
+
export const StaffConversation: Story = {
|
|
66
|
+
parameters: {
|
|
67
|
+
docs: {
|
|
68
|
+
description: {
|
|
69
|
+
story:
|
|
70
|
+
"Renders the staff view — the thread with viewerRole='staff' (internal notes visible, amber) stacked above the staff composer with its split send.",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
render: () =>
|
|
75
|
+
themed(
|
|
76
|
+
<>
|
|
77
|
+
<TicketThread viewerRole='staff' messages={[CUSTOMER, STAFF, INTERNAL]} />
|
|
78
|
+
<div style={{ marginTop: 16 }}>
|
|
79
|
+
<TicketReplyBox allowInternalNote onSend={fn()} aboveInput={refs} />
|
|
80
|
+
</div>
|
|
81
|
+
</>
|
|
82
|
+
),
|
|
83
|
+
async play({ canvasElement }) {
|
|
84
|
+
await expect(canvasElement.textContent).toContain('reproduced the timeout');
|
|
85
|
+
// the internal note is visible to staff
|
|
86
|
+
await expect(canvasElement.textContent).toContain('Root cause');
|
|
87
|
+
// the composer (rich editor) renders below the thread
|
|
88
|
+
await expect(canvasElement.querySelector('[contenteditable="true"]')).not.toBeNull();
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Customer view — the same thread as the customer sees it (`viewerRole='customer'`,
|
|
94
|
+
* staff shown as "Qorus Support", no internal notes) above their reply composer.
|
|
95
|
+
*/
|
|
96
|
+
export const CustomerConversation: Story = {
|
|
97
|
+
parameters: {
|
|
98
|
+
docs: {
|
|
99
|
+
description: {
|
|
100
|
+
story:
|
|
101
|
+
"Renders the customer view — the same thread with viewerRole='customer' (staff shown as 'Qorus Support', no internal notes) stacked above the customer's reply composer.",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
render: () =>
|
|
106
|
+
themed(
|
|
107
|
+
<>
|
|
108
|
+
<TicketThread viewerRole='customer' messages={[CUSTOMER, STAFF]} />
|
|
109
|
+
<div style={{ marginTop: 16 }}>
|
|
110
|
+
<TicketReplyBox onSend={fn()} aboveInput={refs} />
|
|
111
|
+
</div>
|
|
112
|
+
</>
|
|
113
|
+
),
|
|
114
|
+
async play({ canvasElement }) {
|
|
115
|
+
await expect(canvasElement.textContent).toContain('reproduced the timeout');
|
|
116
|
+
// the internal note is not in the customer's messages
|
|
117
|
+
await expect(canvasElement.textContent).not.toContain('Root cause');
|
|
118
|
+
// the composer (rich editor) renders below the thread
|
|
119
|
+
await expect(canvasElement.querySelector('[contenteditable="true"]')).not.toBeNull();
|
|
120
|
+
},
|
|
121
|
+
};
|