@flamingo-stack/openframe-frontend-core 0.0.717 → 0.0.719
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-B5XU6KOA.js → chunk-2JLP2X2M.js} +4836 -5424
- package/dist/{chunk-47FISYO5.js → chunk-4D6NMPOO.js} +2 -2
- package/dist/{chunk-U3TP4UGA.cjs → chunk-4JIGEK7C.cjs} +8 -8
- package/dist/{chunk-2X2P3VHF.js → chunk-5U3KWQXP.js} +4 -4
- package/dist/{chunk-TYVS64YN.js → chunk-5YAGX5DY.js} +1 -1
- package/dist/{chunk-GEDY7HQI.cjs → chunk-6X3O67OL.cjs} +4 -0
- package/dist/{chunk-2EK7PA73.js → chunk-7BCY77W6.js} +5 -5
- package/dist/{chunk-X3RVDBXU.cjs → chunk-7BREFV7G.cjs} +19 -19
- package/dist/chunk-A6P6DHEZ.cjs +130 -0
- package/dist/{chunk-3MJPCKB6.js → chunk-AJHSQ5XK.js} +2 -2
- package/dist/{chunk-E6FLX4TX.js → chunk-CU6NWO2M.js} +6 -6
- package/dist/{chunk-6MZI5SQ4.js → chunk-D6PMVWDI.js} +3 -3
- package/dist/{chunk-2RKFMUNW.cjs → chunk-DFEPUYTF.cjs} +24 -21
- package/dist/{chunk-M2A5SC6H.cjs → chunk-E2V2EH2G.cjs} +2 -2
- package/dist/{chunk-WH5GJSID.js → chunk-EAHOB64X.js} +4 -4
- package/dist/{chunk-PD4W2VMH.js → chunk-FVQJBII6.js} +1 -1
- package/dist/{chunk-APJZBDQN.js → chunk-H5V7GRN5.js} +24 -21
- package/dist/{chunk-3RKBJT6K.cjs → chunk-H5VIMBRN.cjs} +2 -2
- package/dist/{chunk-NB6EWUDE.cjs → chunk-HCFNEKO3.cjs} +13 -13
- package/dist/{chunk-6T3BTD6Q.js → chunk-IWCPXJEE.js} +201 -327
- package/dist/{chunk-PPXR22YC.cjs → chunk-LCLDFMDF.cjs} +773 -61
- package/dist/{chunk-LANNTTKP.cjs → chunk-LOZLHG2U.cjs} +6 -6
- package/dist/{chunk-5MF3NMYC.cjs → chunk-NQVS4G7G.cjs} +581 -1169
- package/dist/{chunk-J3Q53TWW.cjs → chunk-NYWESHOQ.cjs} +22 -22
- package/dist/{chunk-FROXS52D.cjs → chunk-QBCDSTLE.cjs} +2 -2
- package/dist/{chunk-YBQQNDC7.js → chunk-RR6PY34K.js} +4 -0
- package/dist/{chunk-2AI2E3O2.cjs → chunk-SWAVO7BB.cjs} +27 -27
- package/dist/{chunk-3QAMMWV2.cjs → chunk-TDZ76NCB.cjs} +20 -20
- package/dist/{chunk-NQWJAOHO.js → chunk-TELAANY6.js} +1 -1
- package/dist/{chunk-FGKSAQR3.js → chunk-TTEFN6VO.js} +4 -4
- package/dist/{chunk-VYKFM2NB.cjs → chunk-WS7WRR5Z.cjs} +36 -36
- package/dist/{chunk-VZI5BA4L.js → chunk-XGHGGBM3.js} +1 -1
- package/dist/{chunk-NPAQSMRY.js → chunk-Y4MB25KW.js} +1103 -391
- package/dist/chunk-YYYVS7CX.js +130 -0
- package/dist/{chunk-OHLBO4LM.cjs → chunk-ZKNZ2CXW.cjs} +3 -3
- package/dist/{chunk-JO5TLJPM.cjs → chunk-ZXCZYMN4.cjs} +37 -163
- package/dist/{cloud-tenants-LNC26WY2.js → cloud-tenants-DNBPNQNP.js} +4 -3
- package/dist/{cloud-tenants-KDWTVHSI.cjs → cloud-tenants-FBUO66GW.cjs} +5 -4
- package/dist/components/case-studies/index.cjs +13 -12
- package/dist/components/case-studies/index.js +5 -4
- package/dist/components/contact/index.cjs +6 -5
- package/dist/components/contact/index.js +5 -4
- package/dist/components/docs/index.cjs +8 -7
- package/dist/components/docs/index.js +7 -6
- package/dist/components/embeds/index.cjs +6 -5
- package/dist/components/embeds/index.js +5 -4
- package/dist/components/faq/index.cjs +7 -6
- package/dist/components/faq/index.js +6 -5
- package/dist/components/features/index.cjs +9 -4
- package/dist/components/features/index.js +8 -3
- package/dist/components/features/remote-session/index.d.ts +2 -0
- package/dist/components/features/remote-session/index.d.ts.map +1 -1
- package/dist/components/features/remote-session/remote-desktop-view.d.ts +6 -2
- package/dist/components/features/remote-session/remote-desktop-view.d.ts.map +1 -1
- package/dist/components/features/remote-session/remote-session-keep-modals.d.ts +3 -3
- package/dist/components/features/remote-session/remote-session-keep-modals.d.ts.map +1 -1
- package/dist/components/features/remote-session/remote-session-ticket-modals.d.ts +29 -0
- package/dist/components/features/remote-session/remote-session-ticket-modals.d.ts.map +1 -0
- package/dist/components/help-center-pages/index.cjs +51 -50
- package/dist/components/help-center-pages/index.js +15 -14
- package/dist/components/index.cjs +33 -28
- package/dist/components/index.js +21 -16
- package/dist/components/meeting-scheduler/index.cjs +25 -24
- package/dist/components/meeting-scheduler/index.js +4 -3
- package/dist/components/navigation/index.cjs +6 -5
- package/dist/components/navigation/index.js +5 -4
- package/dist/components/onboarding-guides/index.cjs +9 -8
- package/dist/components/onboarding-guides/index.js +8 -7
- package/dist/components/product-demo/index.cjs +7 -7
- package/dist/components/product-demo/index.js +7 -7
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/related-content/related-content-section.d.ts +6 -6
- package/dist/components/related-content/related-content-section.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +8 -7
- package/dist/components/tickets/index.js +7 -6
- package/dist/components/ui/autocomplete.d.ts +6 -0
- package/dist/components/ui/autocomplete.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +7 -6
- package/dist/components/ui/index.js +6 -5
- package/dist/{devices-ATHYJUVQ.cjs → devices-5A5TY4JD.cjs} +6 -5
- package/dist/{devices-NYCRQ3PG.js → devices-PLDAEUSL.js} +4 -3
- package/dist/hooks/index.cjs +6 -4
- package/dist/hooks/index.js +5 -3
- package/dist/hooks/use-self-fetch.d.ts +3 -0
- package/dist/hooks/use-self-fetch.d.ts.map +1 -1
- package/dist/index.cjs +14 -8
- package/dist/index.js +15 -9
- package/dist/{knowledge-EHNRYT7U.cjs → knowledge-FKTJ723Z.cjs} +5 -4
- package/dist/{knowledge-DEKYJXBS.js → knowledge-G6Q5KRWV.js} +4 -3
- package/dist/{logs-3V765P7O.cjs → logs-CJCXUBU6.cjs} +13 -12
- package/dist/{logs-Q7YFIVYI.js → logs-QMV6XIC4.js} +4 -3
- package/dist/{policies-BTIENK5A.js → policies-G6D7AX6F.js} +4 -3
- package/dist/{policies-TXU5AIXS.cjs → policies-QMRTK3CY.cjs} +9 -8
- package/dist/{remote-session-R6VAFESR.cjs → remote-session-2JVI7RVA.cjs} +4 -3
- package/dist/{remote-session-GSGZOFDX.js → remote-session-DBD6OSTX.js} +2 -1
- package/dist/{software-update-SW2HOBHW.js → software-update-6BQM6BKH.js} +6 -4
- package/dist/{software-update-MINTICZY.cjs → software-update-PNZMRDBT.cjs} +11 -9
- package/package.json +1 -1
- package/src/components/features/remote-session/index.ts +2 -0
- package/src/components/features/remote-session/remote-desktop-view.tsx +86 -63
- package/src/components/features/remote-session/remote-session-keep-modals.tsx +4 -4
- package/src/components/features/remote-session/remote-session-ticket-modals.tsx +140 -0
- package/src/components/related-content/related-content-section.tsx +46 -47
- package/src/components/ui/autocomplete.tsx +18 -4
- package/src/hooks/use-self-fetch.ts +7 -0
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
var _chunkA6P6DHEZcjs = require('./chunk-A6P6DHEZ.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
|
|
@@ -51,6 +55,8 @@ var _chunkLLSUVPQCcjs = require('./chunk-LLSUVPQC.cjs');
|
|
|
51
55
|
|
|
52
56
|
|
|
53
57
|
|
|
58
|
+
|
|
59
|
+
|
|
54
60
|
|
|
55
61
|
|
|
56
62
|
|
|
@@ -82,8 +88,63 @@ var _chunkCPA2CKRZcjs = require('./chunk-CPA2CKRZ.cjs');
|
|
|
82
88
|
|
|
83
89
|
var _chunk3ATAYP36cjs = require('./chunk-3ATAYP36.cjs');
|
|
84
90
|
|
|
85
|
-
// src/components/ui/
|
|
91
|
+
// src/components/ui/hidden-tags-popup.tsx
|
|
92
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
86
93
|
var _jsxruntime = require('react/jsx-runtime');
|
|
94
|
+
var HiddenTagsPopup = _react.forwardRef.call(void 0, function HiddenTagsPopupImpl({ items, onRemove, disabled, className, style }, ref) {
|
|
95
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
style,
|
|
100
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
101
|
+
// Base positioning is neutral (left-anchored); consumers override via
|
|
102
|
+
// `style.left` (search-input, tag-search-input) or `className` (autocomplete).
|
|
103
|
+
"absolute left-0 top-full z-50 mt-1 min-w-[200px]",
|
|
104
|
+
"rounded-[6px] border border-ods-border bg-ods-card shadow-lg",
|
|
105
|
+
"duration-150 animate-in fade-in-0 zoom-in-95",
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
children: items.map((item) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
112
|
+
"flex h-11 items-center justify-between gap-3 px-3 md:h-12",
|
|
113
|
+
"border-b border-ods-border last:border-b-0"
|
|
114
|
+
),
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
117
|
+
"span",
|
|
118
|
+
{
|
|
119
|
+
className: "min-w-0 flex-1 truncate uppercase text-ods-text-primary text-h5",
|
|
120
|
+
title: typeof item.label === "string" ? item.label : void 0,
|
|
121
|
+
children: item.label
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
!disabled && onRemove && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
125
|
+
"button",
|
|
126
|
+
{
|
|
127
|
+
type: "button",
|
|
128
|
+
onClick: (e) => {
|
|
129
|
+
e.stopPropagation();
|
|
130
|
+
onRemove(item.value);
|
|
131
|
+
},
|
|
132
|
+
className: "shrink-0 text-ods-text-secondary transition-colors hover:text-ods-text-primary",
|
|
133
|
+
"aria-label": `Remove ${String(item.label)}`,
|
|
134
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.XmarkCircleIcon, { size: 20 })
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
String(item.value)
|
|
140
|
+
))
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
HiddenTagsPopup.displayName = "HiddenTagsPopup";
|
|
145
|
+
|
|
146
|
+
// src/components/ui/truncate-text.tsx
|
|
147
|
+
|
|
87
148
|
var VARIANT_CLASS = {
|
|
88
149
|
h1: "text-h1",
|
|
89
150
|
h2: "text-h2",
|
|
@@ -145,10 +206,555 @@ function TruncateText({
|
|
|
145
206
|
);
|
|
146
207
|
}
|
|
147
208
|
|
|
209
|
+
// src/components/ui/autocomplete.tsx
|
|
210
|
+
var _reactpopover = require('@radix-ui/react-popover'); var PopoverPrimitive = _interopRequireWildcard(_reactpopover);
|
|
211
|
+
var _reactscrollarea = require('@radix-ui/react-scroll-area'); var ScrollAreaPrimitive = _interopRequireWildcard(_reactscrollarea);
|
|
212
|
+
var _lucidereact = require('lucide-react');
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
var innerInputStyles = _chunk3ATAYP36cjs.cn.call(void 0,
|
|
223
|
+
"min-w-[60px] flex-1 border-none bg-transparent outline-none",
|
|
224
|
+
"text-h4",
|
|
225
|
+
"text-ods-text-primary placeholder:text-ods-text-secondary",
|
|
226
|
+
// Disabled - match Input exactly (value greys out, placeholder dims further)
|
|
227
|
+
"disabled:cursor-not-allowed disabled:text-ods-text-disabled disabled:placeholder:text-ods-border"
|
|
228
|
+
);
|
|
229
|
+
function AutocompleteInner(props, ref) {
|
|
230
|
+
const {
|
|
231
|
+
options,
|
|
232
|
+
disabled = false,
|
|
233
|
+
startAdornment,
|
|
234
|
+
showClearAll = true,
|
|
235
|
+
className,
|
|
236
|
+
dropdownClassName,
|
|
237
|
+
freeSolo = false,
|
|
238
|
+
label,
|
|
239
|
+
labelVariant,
|
|
240
|
+
error,
|
|
241
|
+
filterOptions,
|
|
242
|
+
renderOption,
|
|
243
|
+
invalid = false,
|
|
244
|
+
noOptionsText = "No options",
|
|
245
|
+
inputValue: inputValueProp,
|
|
246
|
+
onInputChange,
|
|
247
|
+
loading = false,
|
|
248
|
+
loadingText = "Loading...",
|
|
249
|
+
creatable = false,
|
|
250
|
+
onCreateOption,
|
|
251
|
+
maxCreateLength,
|
|
252
|
+
onDeleteOption,
|
|
253
|
+
isDeletingOption = false,
|
|
254
|
+
disableClientFilter = false,
|
|
255
|
+
showChevron = true,
|
|
256
|
+
clearOnOpen = true
|
|
257
|
+
} = props;
|
|
258
|
+
const multiple = _nullishCoalesce(props.multiple, () => ( false));
|
|
259
|
+
const placeholder = _nullishCoalesce(props.placeholder, () => ( (multiple ? "Add More..." : "Select...")));
|
|
260
|
+
const maxItems = multiple ? props.maxItems : void 0;
|
|
261
|
+
const renderTag = multiple ? props.renderTag : void 0;
|
|
262
|
+
const wrapTags = multiple && (_nullishCoalesce(props.wrapTags, () => ( false)));
|
|
263
|
+
const limitTagsProp = multiple ? _nullishCoalesce(props.limitTags, () => ( "auto")) : "auto";
|
|
264
|
+
const getLimitTagsText = multiple ? _nullishCoalesce(props.getLimitTagsText, () => ( ((more) => `+${more}`))) : (more) => `+${more}`;
|
|
265
|
+
const valueArray = _react.useMemo.call(void 0,
|
|
266
|
+
() => multiple ? props.value : props.value != null ? [props.value] : [],
|
|
267
|
+
[multiple, props.value]
|
|
268
|
+
);
|
|
269
|
+
const [internalInputValue, setInternalInputValue] = _react.useState.call(void 0, "");
|
|
270
|
+
const isInputControlled = inputValueProp !== void 0;
|
|
271
|
+
const inputValue = isInputControlled ? inputValueProp : internalInputValue;
|
|
272
|
+
const updateInputValue = (value, reason) => {
|
|
273
|
+
if (!isInputControlled) {
|
|
274
|
+
setInternalInputValue(value);
|
|
275
|
+
}
|
|
276
|
+
_optionalChain([onInputChange, 'optionalCall', _ => _(value, reason)]);
|
|
277
|
+
};
|
|
278
|
+
const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
|
|
279
|
+
const [highlightedIndex, setHighlightedIndex] = _react.useState.call(void 0, -1);
|
|
280
|
+
const keyboardPadding = _chunkA6P6DHEZcjs.useKeyboardCollisionPadding.call(void 0, );
|
|
281
|
+
const containerRef = _react.useRef.call(void 0, null);
|
|
282
|
+
const hiddenTagsPopupRef = _react.useRef.call(void 0, null);
|
|
283
|
+
const isInvalid = invalid || !!error;
|
|
284
|
+
_react.useImperativeHandle.call(void 0, ref, () => containerRef.current);
|
|
285
|
+
const selectedOptions = _react.useMemo.call(void 0, () => {
|
|
286
|
+
return valueArray.map((v) => _nullishCoalesce(options.find((opt) => opt.value === v), () => ( { label: String(v), value: v })));
|
|
287
|
+
}, [valueArray, options]);
|
|
288
|
+
const selectedOption = !multiple && selectedOptions.length > 0 ? selectedOptions[0] : null;
|
|
289
|
+
const resolvedStartAdornment = _nullishCoalesce(_nullishCoalesce(startAdornment, () => ( _optionalChain([selectedOption, 'optionalAccess', _2 => _2.icon]))), () => ( null));
|
|
290
|
+
const inputPlaceholder = multiple ? valueArray.length === 0 ? placeholder : "Add More..." : placeholder;
|
|
291
|
+
const {
|
|
292
|
+
visibleCount: autoVisibleCount,
|
|
293
|
+
middleRef,
|
|
294
|
+
measureRef,
|
|
295
|
+
textMeasureRef,
|
|
296
|
+
badgeRef,
|
|
297
|
+
inputRef
|
|
298
|
+
} = _chunkA6P6DHEZcjs.useAutoLimitTags.call(void 0, {
|
|
299
|
+
count: multiple ? selectedOptions.length : 0,
|
|
300
|
+
limitTags: multiple ? wrapTags ? selectedOptions.length : limitTagsProp : 0,
|
|
301
|
+
placeholder: inputPlaceholder
|
|
302
|
+
});
|
|
303
|
+
const visibleCount = multiple ? autoVisibleCount : 0;
|
|
304
|
+
const visibleTags = multiple ? selectedOptions.slice(0, visibleCount) : [];
|
|
305
|
+
const hiddenTags = multiple ? selectedOptions.slice(visibleCount) : [];
|
|
306
|
+
const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
|
|
307
|
+
const [showHiddenTags, setShowHiddenTags] = _react.useState.call(void 0, false);
|
|
308
|
+
const hiddenTagsRef = _react.useRef.call(void 0, null);
|
|
309
|
+
_react.useEffect.call(void 0, () => {
|
|
310
|
+
if (!showHiddenTags) return void 0;
|
|
311
|
+
const handleClick = (e) => {
|
|
312
|
+
const target = e.target;
|
|
313
|
+
const inButton = _optionalChain([hiddenTagsRef, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.contains, 'call', _5 => _5(target)]);
|
|
314
|
+
const inPopup = _optionalChain([hiddenTagsPopupRef, 'access', _6 => _6.current, 'optionalAccess', _7 => _7.contains, 'call', _8 => _8(target)]);
|
|
315
|
+
if (!inButton && !inPopup) {
|
|
316
|
+
setShowHiddenTags(false);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
document.addEventListener("mousedown", handleClick);
|
|
320
|
+
return () => document.removeEventListener("mousedown", handleClick);
|
|
321
|
+
}, [showHiddenTags]);
|
|
322
|
+
const openDropdown = () => {
|
|
323
|
+
if (!multiple && !clearOnOpen && selectedOption) {
|
|
324
|
+
updateInputValue(selectedOption.label, "reset");
|
|
325
|
+
}
|
|
326
|
+
setShowHiddenTags(false);
|
|
327
|
+
setIsOpen(true);
|
|
328
|
+
};
|
|
329
|
+
const inputDisplayValue = !multiple && !isOpen && selectedOption ? selectedOption.label : inputValue;
|
|
330
|
+
const filteredOptions = _react.useMemo.call(void 0, () => {
|
|
331
|
+
if (disableClientFilter) {
|
|
332
|
+
return options;
|
|
333
|
+
}
|
|
334
|
+
if (filterOptions) {
|
|
335
|
+
return filterOptions(options, inputValue);
|
|
336
|
+
}
|
|
337
|
+
if (!inputValue.trim()) {
|
|
338
|
+
return options;
|
|
339
|
+
}
|
|
340
|
+
const lowerInput = inputValue.toLowerCase();
|
|
341
|
+
return options.filter((opt) => opt.label.toLowerCase().includes(lowerInput));
|
|
342
|
+
}, [options, inputValue, filterOptions, disableClientFilter]);
|
|
343
|
+
const showCreateOption = creatable && inputValue.trim().length > 0 && filteredOptions.length === 0;
|
|
344
|
+
const isCreateTooLong = maxCreateLength != null && inputValue.trim().length > maxCreateLength;
|
|
345
|
+
const handleCreate = () => {
|
|
346
|
+
const trimmed = inputValue.trim();
|
|
347
|
+
if (!trimmed || maxCreateLength != null && trimmed.length > maxCreateLength) return;
|
|
348
|
+
const newValue = trimmed;
|
|
349
|
+
if (multiple) {
|
|
350
|
+
if (maxItems && valueArray.length >= maxItems) return;
|
|
351
|
+
props.onChange([...valueArray, newValue]);
|
|
352
|
+
} else {
|
|
353
|
+
props.onChange(newValue);
|
|
354
|
+
}
|
|
355
|
+
updateInputValue("", "reset");
|
|
356
|
+
setIsOpen(false);
|
|
357
|
+
_optionalChain([onCreateOption, 'optionalCall', _9 => _9(trimmed)]);
|
|
358
|
+
};
|
|
359
|
+
const [highlightedFor, setHighlightedFor] = _react.useState.call(void 0, filteredOptions.length);
|
|
360
|
+
if (highlightedFor !== filteredOptions.length) {
|
|
361
|
+
setHighlightedFor(filteredOptions.length);
|
|
362
|
+
setHighlightedIndex(-1);
|
|
363
|
+
}
|
|
364
|
+
const handleInputChange = (e) => {
|
|
365
|
+
updateInputValue(e.target.value, "input");
|
|
366
|
+
if (!isOpen) {
|
|
367
|
+
setIsOpen(true);
|
|
368
|
+
}
|
|
369
|
+
setHighlightedIndex(-1);
|
|
370
|
+
};
|
|
371
|
+
const handleSelect = (option) => {
|
|
372
|
+
if (multiple) {
|
|
373
|
+
const isSelected = valueArray.includes(option.value);
|
|
374
|
+
if (isSelected) {
|
|
375
|
+
props.onChange(valueArray.filter((v) => v !== option.value));
|
|
376
|
+
} else {
|
|
377
|
+
if (maxItems && valueArray.length >= maxItems) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
props.onChange([...valueArray, option.value]);
|
|
381
|
+
}
|
|
382
|
+
updateInputValue("", "reset");
|
|
383
|
+
_optionalChain([inputRef, 'access', _10 => _10.current, 'optionalAccess', _11 => _11.focus, 'call', _12 => _12()]);
|
|
384
|
+
} else {
|
|
385
|
+
props.onChange(option.value);
|
|
386
|
+
updateInputValue(clearOnOpen ? "" : option.label, "reset");
|
|
387
|
+
setIsOpen(false);
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
const handleClearAll = (e) => {
|
|
391
|
+
e.stopPropagation();
|
|
392
|
+
e.preventDefault();
|
|
393
|
+
if (multiple) {
|
|
394
|
+
props.onChange([]);
|
|
395
|
+
} else {
|
|
396
|
+
props.onChange(null);
|
|
397
|
+
}
|
|
398
|
+
if (!isInputControlled) {
|
|
399
|
+
setInternalInputValue("");
|
|
400
|
+
}
|
|
401
|
+
_optionalChain([onInputChange, 'optionalCall', _13 => _13("", "clear")]);
|
|
402
|
+
setIsOpen(false);
|
|
403
|
+
};
|
|
404
|
+
const handleKeyDown = (e) => {
|
|
405
|
+
switch (e.key) {
|
|
406
|
+
case "ArrowDown":
|
|
407
|
+
e.preventDefault();
|
|
408
|
+
if (!isOpen) {
|
|
409
|
+
openDropdown();
|
|
410
|
+
}
|
|
411
|
+
setHighlightedIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : 0);
|
|
412
|
+
break;
|
|
413
|
+
case "ArrowUp":
|
|
414
|
+
e.preventDefault();
|
|
415
|
+
setHighlightedIndex((prev) => prev > 0 ? prev - 1 : filteredOptions.length - 1);
|
|
416
|
+
break;
|
|
417
|
+
case "Enter":
|
|
418
|
+
e.preventDefault();
|
|
419
|
+
if (showCreateOption) {
|
|
420
|
+
handleCreate();
|
|
421
|
+
} else if (highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
|
|
422
|
+
handleSelect(filteredOptions[highlightedIndex]);
|
|
423
|
+
} else if (freeSolo && inputValue.trim()) {
|
|
424
|
+
const newOption = {
|
|
425
|
+
label: inputValue.trim(),
|
|
426
|
+
value: inputValue.trim()
|
|
427
|
+
};
|
|
428
|
+
handleSelect(newOption);
|
|
429
|
+
}
|
|
430
|
+
break;
|
|
431
|
+
case "Escape": {
|
|
432
|
+
const resetValue = !multiple && !clearOnOpen && selectedOption ? selectedOption.label : "";
|
|
433
|
+
updateInputValue(resetValue, "reset");
|
|
434
|
+
setIsOpen(false);
|
|
435
|
+
setHighlightedIndex(-1);
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
case "Backspace":
|
|
439
|
+
break;
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
const handleOpenChange = (open) => {
|
|
443
|
+
if (open) {
|
|
444
|
+
openDropdown();
|
|
445
|
+
} else {
|
|
446
|
+
const resetValue = !multiple && !clearOnOpen && selectedOption ? selectedOption.label : "";
|
|
447
|
+
updateInputValue(resetValue, "reset");
|
|
448
|
+
setIsOpen(false);
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
const canAddMore = multiple ? !maxItems || valueArray.length < maxItems : true;
|
|
452
|
+
const hasValue = valueArray.length > 0;
|
|
453
|
+
const popover = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverPrimitive.Root, { open: isOpen, onOpenChange: handleOpenChange, modal: false, children: [
|
|
454
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverPrimitive.Anchor, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
455
|
+
"div",
|
|
456
|
+
{
|
|
457
|
+
"data-invalid": isInvalid || void 0,
|
|
458
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
459
|
+
// Layout — single line, no wrapping
|
|
460
|
+
"flex min-h-11 cursor-text items-center rounded-[6px] border md:min-h-12",
|
|
461
|
+
"focus-within:outline-none",
|
|
462
|
+
"transition-colors duration-200",
|
|
463
|
+
"border-ods-border bg-ods-card",
|
|
464
|
+
"group",
|
|
465
|
+
!disabled && "hover:border-ods-border-hover hover:bg-ods-bg-hover active:border-ods-border-active active:bg-ods-bg-active",
|
|
466
|
+
disabled && "!cursor-not-allowed bg-ods-bg",
|
|
467
|
+
// Adornments / chevron carry their own colour — grey them with the
|
|
468
|
+
// value so a disabled field reads as one flat colour. Scoped to the
|
|
469
|
+
// DIRECT span child (the start adornment) on purpose: as a descendant
|
|
470
|
+
// rule it also hit the selected `Tag` chips in the middle zone, whose
|
|
471
|
+
// label is a span, and they went invisible against their own fill in
|
|
472
|
+
// the light theme. Anything nested inside the adornment that sets its
|
|
473
|
+
// own colour keeps it; anything that doesn't inherits the grey.
|
|
474
|
+
"has-[:disabled]:[&>span]:text-ods-text-disabled has-[:disabled]:[&_svg]:text-ods-text-disabled",
|
|
475
|
+
isOpen && !isInvalid && "border-ods-accent hover:border-ods-accent",
|
|
476
|
+
isInvalid && "border-ods-error hover:border-ods-error"
|
|
477
|
+
),
|
|
478
|
+
onClick: () => {
|
|
479
|
+
if (!disabled) {
|
|
480
|
+
_optionalChain([inputRef, 'access', _14 => _14.current, 'optionalAccess', _15 => _15.focus, 'call', _16 => _16()]);
|
|
481
|
+
openDropdown();
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
children: [
|
|
485
|
+
resolvedStartAdornment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
486
|
+
"span",
|
|
487
|
+
{
|
|
488
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
489
|
+
// Images are sized alongside svgs: an entity adornment is
|
|
490
|
+
// usually a flag or a crest, and an unconstrained <img> lays
|
|
491
|
+
// out at 0x0 inside this flex row.
|
|
492
|
+
"flex-shrink-0 pl-3 text-ods-text-secondary transition-colors duration-200",
|
|
493
|
+
"[&_img]:size-4 [&_img]:object-contain md:[&_img]:size-6 [&_svg]:size-4 md:[&_svg]:size-6",
|
|
494
|
+
isOpen && !isInvalid && "text-ods-accent",
|
|
495
|
+
isInvalid && "text-ods-error"
|
|
496
|
+
),
|
|
497
|
+
children: resolvedStartAdornment
|
|
498
|
+
}
|
|
499
|
+
),
|
|
500
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
501
|
+
"div",
|
|
502
|
+
{
|
|
503
|
+
ref: middleRef,
|
|
504
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
505
|
+
"flex min-w-0 flex-1 items-center gap-2 px-2",
|
|
506
|
+
wrapTags ? "flex-wrap py-[var(--spacing-system-xsf)]" : "overflow-hidden"
|
|
507
|
+
),
|
|
508
|
+
children: [
|
|
509
|
+
multiple && visibleTags.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
510
|
+
_chunkF5BPGWGTcjs.Tag,
|
|
511
|
+
{
|
|
512
|
+
variant: "outline",
|
|
513
|
+
className: wrapTags ? "max-w-full" : void 0,
|
|
514
|
+
labelClassName: wrapTags ? "truncate" : "max-w-[90px] truncate",
|
|
515
|
+
label: renderTag ? renderTag(option) : option.label,
|
|
516
|
+
onClose: !disabled ? () => {
|
|
517
|
+
props.onChange(valueArray.filter((v) => v !== option.value));
|
|
518
|
+
} : void 0
|
|
519
|
+
},
|
|
520
|
+
String(option.value)
|
|
521
|
+
)),
|
|
522
|
+
multiple && hiddenTagsCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: hiddenTagsRef, className: "shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
523
|
+
"button",
|
|
524
|
+
{
|
|
525
|
+
ref: badgeRef,
|
|
526
|
+
type: "button",
|
|
527
|
+
onClick: (e) => {
|
|
528
|
+
e.stopPropagation();
|
|
529
|
+
setShowHiddenTags((prev) => {
|
|
530
|
+
if (!prev) setIsOpen(false);
|
|
531
|
+
return !prev;
|
|
532
|
+
});
|
|
533
|
+
},
|
|
534
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
535
|
+
"flex h-8 items-center px-2",
|
|
536
|
+
"rounded-[6px] border border-ods-border bg-ods-card",
|
|
537
|
+
"text-ods-text-secondary text-h5",
|
|
538
|
+
"cursor-pointer transition-colors hover:bg-ods-bg-hover"
|
|
539
|
+
),
|
|
540
|
+
children: getLimitTagsText(hiddenTagsCount)
|
|
541
|
+
}
|
|
542
|
+
) }),
|
|
543
|
+
canAddMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
+
"input",
|
|
545
|
+
{
|
|
546
|
+
ref: inputRef,
|
|
547
|
+
type: "text",
|
|
548
|
+
value: inputDisplayValue,
|
|
549
|
+
onChange: handleInputChange,
|
|
550
|
+
onKeyDown: handleKeyDown,
|
|
551
|
+
onFocus: () => openDropdown(),
|
|
552
|
+
placeholder: inputPlaceholder,
|
|
553
|
+
disabled,
|
|
554
|
+
className: innerInputStyles
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
),
|
|
560
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex shrink-0 items-center gap-1 pr-3", children: [
|
|
561
|
+
showClearAll && (hasValue || inputValue.length > 0) && !disabled && isOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
562
|
+
"button",
|
|
563
|
+
{
|
|
564
|
+
type: "button",
|
|
565
|
+
onClick: handleClearAll,
|
|
566
|
+
className: "flex items-center justify-center transition-opacity hover:opacity-70",
|
|
567
|
+
"aria-label": "Clear all",
|
|
568
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.XmarkCircleIcon, { className: "size-4 text-ods-text-secondary md:size-6" })
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
572
|
+
_lucidereact.Loader2,
|
|
573
|
+
{
|
|
574
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
575
|
+
"size-4 animate-spin md:size-6",
|
|
576
|
+
isInvalid ? "text-ods-error" : isOpen ? "text-ods-accent" : "text-ods-text-secondary"
|
|
577
|
+
)
|
|
578
|
+
}
|
|
579
|
+
) : showChevron && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
580
|
+
_chunkVX4E6YSBcjs.Chevron02DownIcon,
|
|
581
|
+
{
|
|
582
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
583
|
+
"size-4 transition-all duration-200 md:size-6",
|
|
584
|
+
"text-ods-text-secondary",
|
|
585
|
+
isOpen && "rotate-180",
|
|
586
|
+
isOpen && !isInvalid && "text-ods-accent",
|
|
587
|
+
isInvalid && "text-ods-error"
|
|
588
|
+
)
|
|
589
|
+
}
|
|
590
|
+
)
|
|
591
|
+
] })
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
) }),
|
|
595
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
596
|
+
PopoverPrimitive.Content,
|
|
597
|
+
{
|
|
598
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
599
|
+
"z-50 mt-1 w-[var(--radix-popover-trigger-width)]",
|
|
600
|
+
"rounded-[4px] border border-ods-border bg-ods-card",
|
|
601
|
+
"flex max-h-[var(--radix-popper-available-height)] flex-col overflow-hidden",
|
|
602
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
603
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
604
|
+
dropdownClassName
|
|
605
|
+
),
|
|
606
|
+
sideOffset: 4,
|
|
607
|
+
align: "start",
|
|
608
|
+
collisionPadding: { bottom: keyboardPadding },
|
|
609
|
+
onOpenAutoFocus: (e) => {
|
|
610
|
+
e.preventDefault();
|
|
611
|
+
_optionalChain([inputRef, 'access', _17 => _17.current, 'optionalAccess', _18 => _18.focus, 'call', _19 => _19()]);
|
|
612
|
+
},
|
|
613
|
+
onInteractOutside: (e) => {
|
|
614
|
+
if (_optionalChain([containerRef, 'access', _20 => _20.current, 'optionalAccess', _21 => _21.contains, 'call', _22 => _22(e.target)])) {
|
|
615
|
+
e.preventDefault();
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ScrollAreaPrimitive.Root, { className: "flex min-h-0 flex-col overflow-hidden", children: [
|
|
619
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollAreaPrimitive.Viewport, { className: "max-h-[240px] min-h-0 w-full [&>div]:!block", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { role: "listbox", children: loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-3 py-2 text-ods-text-secondary text-h6", children: loadingText }) : filteredOptions.length === 0 ? showCreateOption ? isCreateTooLong ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-11 min-w-0 items-center px-[var(--spacing-system-mf)] text-ods-error text-h5 md:h-12", children: [
|
|
620
|
+
"Maximum ",
|
|
621
|
+
maxCreateLength,
|
|
622
|
+
" characters"
|
|
623
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
624
|
+
"div",
|
|
625
|
+
{
|
|
626
|
+
role: "option",
|
|
627
|
+
"aria-selected": false,
|
|
628
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
629
|
+
"flex h-11 min-w-0 cursor-pointer items-center px-[var(--spacing-system-mf)] transition-colors md:h-12",
|
|
630
|
+
"text-ods-accent text-h4",
|
|
631
|
+
"hover:bg-ods-bg-hover"
|
|
632
|
+
),
|
|
633
|
+
onClick: handleCreate,
|
|
634
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TruncateText, { className: "text-current", children: `+ Create "${inputValue.trim()}"` })
|
|
635
|
+
}
|
|
636
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-3 py-2 text-ods-text-secondary text-h6", children: freeSolo && inputValue.trim() ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
637
|
+
'Press Enter to add "',
|
|
638
|
+
inputValue,
|
|
639
|
+
'"'
|
|
640
|
+
] }) : noOptionsText }) : filteredOptions.map((option, index) => {
|
|
641
|
+
const isSelected = valueArray.includes(option.value);
|
|
642
|
+
const isHighlighted = index === highlightedIndex;
|
|
643
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
role: "option",
|
|
647
|
+
"aria-selected": isSelected,
|
|
648
|
+
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
649
|
+
// `min-h` rather than a fixed height: an option may carry
|
|
650
|
+
// a second line, and a clipped one is worse than a taller row.
|
|
651
|
+
"group/item flex min-h-11 cursor-pointer items-center border-b border-ods-border px-[var(--spacing-system-mf)] py-[var(--spacing-system-xsf)] transition-colors last:border-b-0 md:min-h-12",
|
|
652
|
+
"text-h4",
|
|
653
|
+
isHighlighted && "bg-ods-bg-surface",
|
|
654
|
+
isSelected ? "text-ods-accent" : "text-ods-text-primary",
|
|
655
|
+
!isHighlighted && "hover:bg-ods-bg-hover"
|
|
656
|
+
),
|
|
657
|
+
onClick: () => handleSelect(option),
|
|
658
|
+
onMouseEnter: () => setHighlightedIndex(index),
|
|
659
|
+
children: renderOption ? renderOption(option, isSelected) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full min-w-0 items-center justify-between gap-[var(--spacing-system-xsf)]", children: [
|
|
660
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 items-center gap-[var(--spacing-system-xsf)]", children: [
|
|
661
|
+
option.icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex size-5 shrink-0 items-center justify-center overflow-hidden [&_img]:size-full [&_img]:object-contain [&_svg]:size-full", children: option.icon }),
|
|
662
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
663
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TruncateText, { className: "text-current", children: option.label }),
|
|
664
|
+
typeof option.description === "string" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TruncateText, { tone: "secondary", variant: "h6", children: option.description }) : option.description
|
|
665
|
+
] })
|
|
666
|
+
] }),
|
|
667
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex shrink-0 items-center gap-[var(--spacing-system-xsf)]", children: [
|
|
668
|
+
isSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.CheckIcon, { className: "text-ods-accent", size: 20 }),
|
|
669
|
+
onDeleteOption && !isSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
670
|
+
"button",
|
|
671
|
+
{
|
|
672
|
+
type: "button",
|
|
673
|
+
"aria-label": `Delete ${option.label}`,
|
|
674
|
+
onClick: (e) => {
|
|
675
|
+
e.stopPropagation();
|
|
676
|
+
onDeleteOption(option.value);
|
|
677
|
+
},
|
|
678
|
+
disabled: isDeletingOption,
|
|
679
|
+
className: "opacity-0 transition-opacity focus-visible:opacity-100 disabled:pointer-events-none disabled:opacity-50 group-hover/item:opacity-100",
|
|
680
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.TrashIcon, { className: "size-4 text-ods-error" })
|
|
681
|
+
}
|
|
682
|
+
)
|
|
683
|
+
] })
|
|
684
|
+
] })
|
|
685
|
+
},
|
|
686
|
+
String(option.value)
|
|
687
|
+
);
|
|
688
|
+
}) }) }),
|
|
689
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollAreaPrimitive.Scrollbar, { className: "hidden", orientation: "vertical", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollAreaPrimitive.Thumb, {}) })
|
|
690
|
+
] })
|
|
691
|
+
}
|
|
692
|
+
)
|
|
693
|
+
] });
|
|
694
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
695
|
+
_chunkXXBLN4BPcjs.FieldWrapper,
|
|
696
|
+
{
|
|
697
|
+
label,
|
|
698
|
+
labelVariant,
|
|
699
|
+
error,
|
|
700
|
+
errorSlot: "error" in props,
|
|
701
|
+
className,
|
|
702
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative", ref: containerRef, children: [
|
|
703
|
+
popover,
|
|
704
|
+
multiple && showHiddenTags && hiddenTagsCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
705
|
+
HiddenTagsPopup,
|
|
706
|
+
{
|
|
707
|
+
ref: hiddenTagsPopupRef,
|
|
708
|
+
items: hiddenTags,
|
|
709
|
+
disabled,
|
|
710
|
+
className: "left-auto right-0 max-w-full",
|
|
711
|
+
onRemove: (value) => {
|
|
712
|
+
const newValue = valueArray.filter((v) => v !== value);
|
|
713
|
+
props.onChange(newValue);
|
|
714
|
+
if (typeof limitTagsProp === "number" && newValue.length <= limitTagsProp) setShowHiddenTags(false);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
multiple && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
719
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
720
|
+
"span",
|
|
721
|
+
{
|
|
722
|
+
ref: textMeasureRef,
|
|
723
|
+
"aria-hidden": "true",
|
|
724
|
+
className: "pointer-events-none invisible absolute left-0 top-0 -z-10 whitespace-nowrap text-h4",
|
|
725
|
+
children: inputPlaceholder
|
|
726
|
+
}
|
|
727
|
+
),
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
729
|
+
"div",
|
|
730
|
+
{
|
|
731
|
+
ref: measureRef,
|
|
732
|
+
"aria-hidden": "true",
|
|
733
|
+
className: "pointer-events-none invisible absolute left-0 top-0 -z-10 flex gap-2",
|
|
734
|
+
children: selectedOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
735
|
+
_chunkF5BPGWGTcjs.Tag,
|
|
736
|
+
{
|
|
737
|
+
variant: "outline",
|
|
738
|
+
labelClassName: "max-w-[90px] truncate",
|
|
739
|
+
label: renderTag ? renderTag(option) : option.label,
|
|
740
|
+
onClose: () => {
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
`m-${String(option.value)}`
|
|
744
|
+
))
|
|
745
|
+
}
|
|
746
|
+
)
|
|
747
|
+
] })
|
|
748
|
+
] })
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
var Autocomplete = _react.forwardRef.call(void 0, AutocompleteInner);
|
|
753
|
+
|
|
148
754
|
// src/components/ui/select.tsx
|
|
149
755
|
var _reactselect = require('@radix-ui/react-select'); var SelectPrimitive = _interopRequireWildcard(_reactselect);
|
|
150
|
-
|
|
151
|
-
|
|
756
|
+
|
|
757
|
+
|
|
152
758
|
|
|
153
759
|
var Select = SelectPrimitive.Root;
|
|
154
760
|
var SelectGroup = SelectPrimitive.Group;
|
|
@@ -507,7 +1113,7 @@ function IconButtonsVariant({
|
|
|
507
1113
|
}) {
|
|
508
1114
|
const desktopActions = actions.filter((a) => !a.showOnlyMobile);
|
|
509
1115
|
const hasMenuActions = !!menuActions && menuActions.some((g) => g.items.length > 0);
|
|
510
|
-
const isSingleAction = actions.length === 1 && !_optionalChain([actions, 'access',
|
|
1116
|
+
const isSingleAction = actions.length === 1 && !_optionalChain([actions, 'access', _23 => _23[0], 'access', _24 => _24.submenu, 'optionalAccess', _25 => _25.length]);
|
|
511
1117
|
const singleAction = isSingleAction ? actions[0] : null;
|
|
512
1118
|
const useSingleActionMobile = isSingleAction && !hasMenuActions;
|
|
513
1119
|
const mobileMenuGroups = [{ items: actions.flatMap(actionToMenuItems) }, ..._nullishCoalesce(menuActions, () => ( []))];
|
|
@@ -1052,7 +1658,7 @@ function RemoteAccessRequestCard({
|
|
|
1052
1658
|
}) {
|
|
1053
1659
|
const { organizationName } = party;
|
|
1054
1660
|
const siteUrl = _nullishCoalesce(party.organizationSiteUrl, () => ( void 0));
|
|
1055
|
-
const openableSite = _optionalChain([siteUrl, 'optionalAccess',
|
|
1661
|
+
const openableSite = _optionalChain([siteUrl, 'optionalAccess', _26 => _26.startsWith, 'call', _27 => _27("https://")]) ? siteUrl : void 0;
|
|
1056
1662
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-[var(--spacing-system-l)] rounded-md border border-ods-border bg-ods-card p-[var(--spacing-system-xl)]", children: [
|
|
1057
1663
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "w-full text-ods-text-primary text-h2", children: "Your IT support team is requesting remote access" }),
|
|
1058
1664
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-[var(--spacing-system-m)] rounded-md border border-ods-border bg-ods-bg p-[var(--spacing-system-m)]", children: [
|
|
@@ -1580,7 +2186,8 @@ function RemoteDesktopFullscreenToolbar({
|
|
|
1580
2186
|
// src/components/features/remote-session/remote-desktop-view.tsx
|
|
1581
2187
|
|
|
1582
2188
|
var PAGE_CLASS = "h-full overflow-hidden px-[var(--spacing-system-l)] pb-[var(--spacing-system-l)]";
|
|
1583
|
-
var CONTROLS_BAR_CLASS = "flex flex-shrink-0
|
|
2189
|
+
var CONTROLS_BAR_CLASS = "flex flex-shrink-0 flex-col overflow-hidden rounded-md border border-ods-border bg-ods-card";
|
|
2190
|
+
var CONTROLS_ROW_CLASS = "flex items-center justify-between gap-[var(--spacing-system-mf)] px-[var(--spacing-system-mf)] py-[var(--spacing-system-xs)]";
|
|
1584
2191
|
function RemoteDesktopView({
|
|
1585
2192
|
deviceName,
|
|
1586
2193
|
organizationName,
|
|
@@ -1599,59 +2206,74 @@ function RemoteDesktopView({
|
|
|
1599
2206
|
children
|
|
1600
2207
|
}) {
|
|
1601
2208
|
const controlsBar = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: CONTROLS_BAR_CLASS, children: [
|
|
1602
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className:
|
|
1603
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1604
|
-
|
|
1605
|
-
/* @__PURE__ */ _jsxruntime.
|
|
2209
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: CONTROLS_ROW_CLASS, children: [
|
|
2210
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 items-center gap-[var(--spacing-system-mf)]", children: [
|
|
2211
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 rounded-md border border-ods-border bg-ods-card p-[var(--spacing-system-xsf)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRDW5JAMEcjs.MonitorIcon, { className: "h-4 w-4 text-ods-text-primary" }) }),
|
|
2212
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col", children: [
|
|
2213
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TruncateText, { children: deviceName }),
|
|
2214
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2215
|
+
TruncateText,
|
|
2216
|
+
{
|
|
2217
|
+
variant: "h6",
|
|
2218
|
+
tone: "secondary",
|
|
2219
|
+
children: `Desktop \u2022 ${organizationName || "Unknown Customer"}`
|
|
2220
|
+
}
|
|
2221
|
+
)
|
|
2222
|
+
] })
|
|
2223
|
+
] }),
|
|
2224
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-shrink-0 items-center gap-[var(--spacing-system-xs)]", children: [
|
|
2225
|
+
onToggleChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2226
|
+
_chunkDFQYAYBHcjs.Button,
|
|
2227
|
+
{
|
|
2228
|
+
variant: "outline",
|
|
2229
|
+
onClick: onToggleChat,
|
|
2230
|
+
leftIcon: chatOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.ChatOffIcon, { className: "h-4 w-4 md:h-6 md:w-6" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.ChatTextIcon, { className: "h-4 w-4 md:h-6 md:w-6" }),
|
|
2231
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only content-md:not-sr-only", children: chatOpen ? "Close Chat" : "Open Chat" })
|
|
2232
|
+
}
|
|
2233
|
+
),
|
|
2234
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFFT56TYBcjs.ActionsMenuDropdown, { groups: actionsMenuGroups, triggerAriaLabel: "Actions" }),
|
|
1606
2235
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1607
|
-
|
|
2236
|
+
_chunkDFQYAYBHcjs.Button,
|
|
1608
2237
|
{
|
|
1609
|
-
variant: "
|
|
1610
|
-
|
|
1611
|
-
|
|
2238
|
+
variant: "outline",
|
|
2239
|
+
size: "icon",
|
|
2240
|
+
"aria-label": "Settings",
|
|
2241
|
+
onClick: onOpenSettings,
|
|
2242
|
+
leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Settings01Icon, {})
|
|
2243
|
+
}
|
|
2244
|
+
),
|
|
2245
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2246
|
+
_chunkDFQYAYBHcjs.Button,
|
|
2247
|
+
{
|
|
2248
|
+
variant: "outline",
|
|
2249
|
+
size: "icon",
|
|
2250
|
+
"aria-label": fullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
2251
|
+
onClick: fullscreen ? onExitFullscreen : onEnterFullscreen,
|
|
2252
|
+
leftIcon: fullscreen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Collapse02Icon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Expand02Icon, {})
|
|
1612
2253
|
}
|
|
1613
2254
|
)
|
|
1614
2255
|
] })
|
|
1615
2256
|
] }),
|
|
1616
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
{
|
|
1637
|
-
variant: "outline",
|
|
1638
|
-
size: "icon",
|
|
1639
|
-
"aria-label": "Settings",
|
|
1640
|
-
onClick: onOpenSettings,
|
|
1641
|
-
leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Settings01Icon, {})
|
|
1642
|
-
}
|
|
1643
|
-
),
|
|
1644
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1645
|
-
_chunkDFQYAYBHcjs.Button,
|
|
1646
|
-
{
|
|
1647
|
-
variant: "outline",
|
|
1648
|
-
size: "icon",
|
|
1649
|
-
"aria-label": fullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
1650
|
-
onClick: fullscreen ? onExitFullscreen : onEnterFullscreen,
|
|
1651
|
-
leftIcon: fullscreen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Collapse02Icon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Expand02Icon, {})
|
|
1652
|
-
}
|
|
1653
|
-
)
|
|
1654
|
-
] })
|
|
2257
|
+
displayMenuGroups.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2258
|
+
_chunkFFT56TYBcjs.ActionsMenuDropdown,
|
|
2259
|
+
{
|
|
2260
|
+
groups: displayMenuGroups,
|
|
2261
|
+
align: "start",
|
|
2262
|
+
customTrigger: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2263
|
+
"button",
|
|
2264
|
+
{
|
|
2265
|
+
type: "button",
|
|
2266
|
+
"aria-label": "Switch display",
|
|
2267
|
+
className: "flex w-full items-center gap-[var(--spacing-system-xs)] border-t border-ods-border p-[var(--spacing-system-sf)] text-left text-ods-text-primary outline-none transition-colors hover:bg-ods-bg-hover focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-focus",
|
|
2268
|
+
children: [
|
|
2269
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRDW5JAMEcjs.MonitorIcon, { className: "h-6 w-6 shrink-0" }),
|
|
2270
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-h4", children: currentDisplayLabel }),
|
|
2271
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.Chevron02DownIcon, { className: "h-6 w-6 shrink-0" })
|
|
2272
|
+
]
|
|
2273
|
+
}
|
|
2274
|
+
)
|
|
2275
|
+
}
|
|
2276
|
+
)
|
|
1655
2277
|
] });
|
|
1656
2278
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1657
2279
|
PageLayout,
|
|
@@ -1686,7 +2308,7 @@ function RemoteDesktopView({
|
|
|
1686
2308
|
}
|
|
1687
2309
|
function RemoteDesktopViewSkeleton({ onBack }) {
|
|
1688
2310
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PageLayout, { className: PAGE_CLASS, backButton: onBack ? { label: "Back", onClick: onBack } : void 0, children: [
|
|
1689
|
-
/* @__PURE__ */ _jsxruntime.
|
|
2311
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: CONTROLS_BAR_CLASS, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: CONTROLS_ROW_CLASS, children: [
|
|
1690
2312
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 items-center gap-[var(--spacing-system-mf)]", children: [
|
|
1691
2313
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCPA2CKRZcjs.Skeleton, { className: "h-9 w-9 flex-shrink-0 rounded-md" }),
|
|
1692
2314
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-[var(--spacing-system-xxs)]", children: [
|
|
@@ -1699,7 +2321,7 @@ function RemoteDesktopViewSkeleton({ onBack }) {
|
|
|
1699
2321
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCPA2CKRZcjs.Skeleton, { className: "h-11 w-11 rounded-lg md:h-12 md:w-12" }),
|
|
1700
2322
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCPA2CKRZcjs.Skeleton, { className: "h-11 w-11 rounded-lg md:h-12 md:w-12" })
|
|
1701
2323
|
] })
|
|
1702
|
-
] }),
|
|
2324
|
+
] }) }),
|
|
1703
2325
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-0 min-w-0 flex-1 rounded-lg bg-black" })
|
|
1704
2326
|
] });
|
|
1705
2327
|
}
|
|
@@ -1873,7 +2495,7 @@ function ReleaseKeepingModal({
|
|
|
1873
2495
|
keptBy,
|
|
1874
2496
|
keptOn,
|
|
1875
2497
|
reason,
|
|
1876
|
-
|
|
2498
|
+
tickets = [],
|
|
1877
2499
|
expiresOn,
|
|
1878
2500
|
dueOn,
|
|
1879
2501
|
isPending = false,
|
|
@@ -1892,9 +2514,9 @@ function ReleaseKeepingModal({
|
|
|
1892
2514
|
reason,
|
|
1893
2515
|
"."
|
|
1894
2516
|
] }),
|
|
1895
|
-
|
|
2517
|
+
tickets.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { children: [
|
|
1896
2518
|
"Ticket: ",
|
|
1897
|
-
|
|
2519
|
+
tickets.join(", ")
|
|
1898
2520
|
] })
|
|
1899
2521
|
] }),
|
|
1900
2522
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, KeepNotice, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.HourglassIcon, { size: 24, color: "currentColor" }), title: `It will expire on ${expiresOn}`, children: dueOn ? `It was due to expire on ${dueOn}. Releasing gives it 3 days' grace, and it shows amber until then. Whoever placed the Keep is reminded the day before it goes. Nothing is deleted now.` : "Nothing is deleted now." }),
|
|
@@ -1906,6 +2528,92 @@ function ReleaseKeepingModal({
|
|
|
1906
2528
|
] });
|
|
1907
2529
|
}
|
|
1908
2530
|
|
|
2531
|
+
// src/components/features/remote-session/remote-session-ticket-modals.tsx
|
|
2532
|
+
|
|
2533
|
+
|
|
2534
|
+
function AssignTicketModal({
|
|
2535
|
+
isOpen,
|
|
2536
|
+
onClose,
|
|
2537
|
+
options,
|
|
2538
|
+
onSearch,
|
|
2539
|
+
loading = false,
|
|
2540
|
+
isPending = false,
|
|
2541
|
+
onConfirm
|
|
2542
|
+
}) {
|
|
2543
|
+
const [ticketIds, setTicketIds] = _react.useState.call(void 0, []);
|
|
2544
|
+
const [titles, setTitles] = _react.useState.call(void 0, {});
|
|
2545
|
+
const [seededOpen, setSeededOpen] = _react.useState.call(void 0, isOpen);
|
|
2546
|
+
if (seededOpen !== isOpen) {
|
|
2547
|
+
setSeededOpen(isOpen);
|
|
2548
|
+
if (isOpen) {
|
|
2549
|
+
setTicketIds([]);
|
|
2550
|
+
setTitles({});
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
const handleChange = (ids) => {
|
|
2554
|
+
setTicketIds(ids);
|
|
2555
|
+
setTitles((prev) => {
|
|
2556
|
+
const next = {};
|
|
2557
|
+
for (const id of ids) next[id] = _nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'access', _28 => _28.find, 'call', _29 => _29((option) => option.value === id), 'optionalAccess', _30 => _30.label]), () => ( prev[id])), () => ( id));
|
|
2558
|
+
return next;
|
|
2559
|
+
});
|
|
2560
|
+
};
|
|
2561
|
+
const handleAssign = () => {
|
|
2562
|
+
if (ticketIds.length === 0 || isPending) return;
|
|
2563
|
+
onConfirm(ticketIds);
|
|
2564
|
+
};
|
|
2565
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDC4RTYWKcjs.Modal, { isOpen, onClose: isPending ? () => {
|
|
2566
|
+
} : onClose, className: "text-left md:max-w-[600px]", children: [
|
|
2567
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDC4RTYWKcjs.ModalHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDC4RTYWKcjs.ModalTitle, { children: "Assign Ticket" }) }),
|
|
2568
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2569
|
+
Autocomplete,
|
|
2570
|
+
{
|
|
2571
|
+
multiple: true,
|
|
2572
|
+
wrapTags: true,
|
|
2573
|
+
label: "Tickets",
|
|
2574
|
+
labelVariant: "large",
|
|
2575
|
+
options,
|
|
2576
|
+
value: ticketIds,
|
|
2577
|
+
onChange: handleChange,
|
|
2578
|
+
renderTag: (option) => _nullishCoalesce(titles[option.value], () => ( option.label)),
|
|
2579
|
+
onInputChange: onSearch ? (value, reason) => reason === "input" && onSearch(value) : void 0,
|
|
2580
|
+
disableClientFilter: Boolean(onSearch),
|
|
2581
|
+
loading,
|
|
2582
|
+
noOptionsText: "No tickets found",
|
|
2583
|
+
disabled: isPending
|
|
2584
|
+
}
|
|
2585
|
+
),
|
|
2586
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDC4RTYWKcjs.ModalFooter, { children: [
|
|
2587
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDFQYAYBHcjs.Button, { type: "button", variant: "outline", onClick: onClose, disabled: isPending, className: "flex-1 md:hidden", children: "Cancel" }),
|
|
2588
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden flex-1 md:block" }),
|
|
2589
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2590
|
+
_chunkDFQYAYBHcjs.Button,
|
|
2591
|
+
{
|
|
2592
|
+
type: "button",
|
|
2593
|
+
variant: "accent",
|
|
2594
|
+
onClick: handleAssign,
|
|
2595
|
+
loading: isPending,
|
|
2596
|
+
disabled: ticketIds.length === 0,
|
|
2597
|
+
className: "flex-1",
|
|
2598
|
+
children: "Assign"
|
|
2599
|
+
}
|
|
2600
|
+
)
|
|
2601
|
+
] })
|
|
2602
|
+
] });
|
|
2603
|
+
}
|
|
2604
|
+
function UnassignTicketModal({ isOpen, onClose, isPending = false, onConfirm }) {
|
|
2605
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDC4RTYWKcjs.Modal, { isOpen, onClose: isPending ? () => {
|
|
2606
|
+
} : onClose, className: "text-left md:max-w-[600px]", children: [
|
|
2607
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDC4RTYWKcjs.ModalHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDC4RTYWKcjs.ModalTitle, { children: "Unassign Ticket" }) }),
|
|
2608
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "w-full text-ods-text-primary text-h4", children: "This Ticket will no longer be linked to this remote session. The ticket itself stays as it is, and you can assign it again anytime." }),
|
|
2609
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDC4RTYWKcjs.ModalFooter, { children: [
|
|
2610
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDFQYAYBHcjs.Button, { type: "button", variant: "outline", onClick: onClose, disabled: isPending, className: "flex-1 md:hidden", children: "Cancel" }),
|
|
2611
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden flex-1 md:block" }),
|
|
2612
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDFQYAYBHcjs.Button, { type: "button", variant: "destructive", onClick: onConfirm, loading: isPending, className: "flex-1", children: "Unassign" })
|
|
2613
|
+
] })
|
|
2614
|
+
] });
|
|
2615
|
+
}
|
|
2616
|
+
|
|
1909
2617
|
// src/components/features/remote-session/remote-session-events.tsx
|
|
1910
2618
|
|
|
1911
2619
|
function formatRemoteSessionOffset(offsetMs) {
|
|
@@ -1923,7 +2631,7 @@ function RemoteSessionEventList({ events, activeEventId, onSelect, className })
|
|
|
1923
2631
|
{
|
|
1924
2632
|
type: "button",
|
|
1925
2633
|
"aria-current": event.id === activeEventId || void 0,
|
|
1926
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
2634
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _31 => _31(event)]),
|
|
1927
2635
|
className: _chunk3ATAYP36cjs.cn.call(void 0,
|
|
1928
2636
|
"flex w-full items-start gap-[var(--spacing-system-xxs)] rounded-md p-[var(--spacing-system-xxs)] text-left outline-none transition-colors",
|
|
1929
2637
|
"hover:bg-ods-bg-hover focus-visible:ring-2 focus-visible:ring-ods-focus",
|
|
@@ -1956,7 +2664,7 @@ function RemoteSessionTimelineMarkers({
|
|
|
1956
2664
|
type: "button",
|
|
1957
2665
|
"aria-label": label,
|
|
1958
2666
|
title: label,
|
|
1959
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
2667
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _32 => _32(event)]),
|
|
1960
2668
|
style: { left: `${share * 100}%` },
|
|
1961
2669
|
className: "absolute top-0 h-4 w-1 -translate-x-1/2 rounded-md bg-ods-text-secondary outline-none transition-colors hover:bg-ods-text-primary focus-visible:ring-2 focus-visible:ring-ods-focus"
|
|
1962
2670
|
},
|
|
@@ -2084,4 +2792,8 @@ function RemoteSessionStorageAlert({ scope, capacity, className }) {
|
|
|
2084
2792
|
|
|
2085
2793
|
|
|
2086
2794
|
|
|
2087
|
-
|
|
2795
|
+
|
|
2796
|
+
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
exports.HiddenTagsPopup = HiddenTagsPopup; exports.TruncateText = TruncateText; exports.Autocomplete = Autocomplete; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.BACK_BUTTON_SKELETON_CLASS = BACK_BUTTON_SKELETON_CLASS; exports.BackButton = BackButton; exports.PageActions = PageActions; exports.usePageActionsBottomPadding = usePageActionsBottomPadding; exports.EntityImage = EntityImage; exports.TITLE_BLOCK_MIN_HEIGHT = TITLE_BLOCK_MIN_HEIGHT; exports.TitleBlock = TitleBlock; exports.PageLayout = PageLayout; exports.RemoteSessionViewers = RemoteSessionViewers; exports.RemoteSessionScope = RemoteSessionScope; exports.RemoteSessionOrgLogo = RemoteSessionOrgLogo; exports.RemoteSessionRecordingTag = RemoteSessionRecordingTag; exports.REMOTE_SESSION_DRAG_HANDLE_CLASS = REMOTE_SESSION_DRAG_HANDLE_CLASS; exports.RemoteSessionDragger = RemoteSessionDragger; exports.formatRemoteSessionElapsed = formatRemoteSessionElapsed; exports.useRemoteSessionTimer = useRemoteSessionTimer; exports.RemoteAccessRequestCard = RemoteAccessRequestCard; exports.RemoteSessionBlockFrame = RemoteSessionBlockFrame; exports.RemoteSessionEndButton = RemoteSessionEndButton; exports.RemoteSessionSummary = RemoteSessionSummary; exports.RemoteSessionMinimizedChip = RemoteSessionMinimizedChip; exports.RemoteSessionChatPanel = RemoteSessionChatPanel; exports.RemoteDesktopChatMessageRow = RemoteDesktopChatMessageRow; exports.REMOTE_DESKTOP_CHAT_END_USER_NAME = REMOTE_DESKTOP_CHAT_END_USER_NAME; exports.RemoteDesktopChatPanel = RemoteDesktopChatPanel; exports.RemoteDesktopFullscreenToolbar = RemoteDesktopFullscreenToolbar; exports.RemoteDesktopView = RemoteDesktopView; exports.RemoteDesktopViewSkeleton = RemoteDesktopViewSkeleton; exports.RemoteSessionDialog = RemoteSessionDialog; exports.RemoteSessionBorder = RemoteSessionBorder; exports.RemoteSessionPill = RemoteSessionPill; exports.REMOTE_SESSION_KEEP_REASON_LABELS = REMOTE_SESSION_KEEP_REASON_LABELS; exports.KeepRecordingModal = KeepRecordingModal; exports.ReleaseKeepingModal = ReleaseKeepingModal; exports.AssignTicketModal = AssignTicketModal; exports.UnassignTicketModal = UnassignTicketModal; exports.formatRemoteSessionOffset = formatRemoteSessionOffset; exports.RemoteSessionEventList = RemoteSessionEventList; exports.RemoteSessionTimelineMarkers = RemoteSessionTimelineMarkers; exports.RemoteSessionStatusTag = RemoteSessionStatusTag; exports.RemoteSessionExpiry = RemoteSessionExpiry; exports.RemoteSessionStorageAlert = RemoteSessionStorageAlert;
|