@flamingo-stack/openframe-frontend-core 0.0.806 → 0.0.808
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/build/export-map.json +1 -1
- package/dist/{chunk-RIRIA3FO.cjs → chunk-5MTYKS2Q.cjs} +4 -4
- package/dist/{chunk-DN5YBJGC.cjs → chunk-5UTJARDM.cjs} +2 -2
- package/dist/{chunk-FZSL4KSW.cjs → chunk-6B5BDFZ6.cjs} +3 -3
- package/dist/{chunk-URZOWIR3.cjs → chunk-6BYSVWIS.cjs} +11 -11
- package/dist/{chunk-XAG7ABPI.cjs → chunk-A5TMKZRQ.cjs} +32 -32
- package/dist/{chunk-SC4RKSMW.cjs → chunk-BSF7E5EZ.cjs} +61 -61
- package/dist/{chunk-PYZTG3T5.cjs → chunk-BT53NHR7.cjs} +25 -25
- package/dist/{chunk-7NCNJXMK.cjs → chunk-DRTXDPWM.cjs} +32 -32
- package/dist/{chunk-3B6PFUL3.cjs → chunk-FRS2VO22.cjs} +71 -19
- package/dist/{chunk-RTUSHW7S.cjs → chunk-H6U3K5EX.cjs} +18 -18
- package/dist/{chunk-IN6SPMCB.cjs → chunk-HKYGJVTA.cjs} +41 -41
- package/dist/{chunk-THY2XVGY.cjs → chunk-I3RJLXEL.cjs} +23 -17
- package/dist/{chunk-PCHNBV73.cjs → chunk-K6YBHFWX.cjs} +71 -71
- package/dist/{chunk-F2VN3UUB.cjs → chunk-KS5V55HN.cjs} +37 -37
- package/dist/{chunk-QE7H4Y3F.cjs → chunk-LF7B3LJE.cjs} +24 -24
- package/dist/{chunk-76NE67PK.cjs → chunk-ML3DG4SS.cjs} +2 -2
- package/dist/{chunk-IMDOKSEG.cjs → chunk-OAJ3AL4V.cjs} +4 -4
- package/dist/{chunk-FQ4LYYBI.cjs → chunk-PIKHEBG5.cjs} +48 -48
- package/dist/{chunk-OETG7KV6.cjs → chunk-R2S22LDL.cjs} +3 -3
- package/dist/{chunk-5OFEH673.cjs → chunk-RZNRKWG5.cjs} +13 -13
- package/dist/{chunk-CRBG5HXA.cjs → chunk-SPS7TL7Z.cjs} +799 -761
- package/dist/{chunk-MR3LQUOW.cjs → chunk-T64MG3HS.cjs} +6 -6
- package/dist/{chunk-MHH7CHNI.cjs → chunk-TOWVMBAP.cjs} +4 -4
- package/dist/{chunk-3WNCFZGN.cjs → chunk-TUZV2ZQY.cjs} +2 -2
- package/dist/{chunk-V3T5MDJV.cjs → chunk-VHX4A4SA.cjs} +2 -2
- package/dist/{chunk-DTKHEHIQ.cjs → chunk-ZAXGW4KT.cjs} +14 -14
- package/dist/{cloud-tenants-6E27I6AY.cjs → cloud-tenants-H5TMGGDF.cjs} +7 -7
- package/dist/components/case-studies/index.cjs +21 -21
- package/dist/components/chat/index.cjs +5 -5
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/docs/index.cjs +11 -11
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/faq/index.cjs +9 -9
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/features/scripts/schedule-form/schedule-offline-fields.d.ts.map +1 -1
- package/dist/components/features/scripts/schedule-form/schedule-offline-fields.js +16 -4
- package/dist/components/features/scripts/schedule-form/schedule-timing-fields.d.ts +1 -1
- package/dist/components/features/scripts/schedule-form/schedule-timing-fields.d.ts.map +1 -1
- package/dist/components/features/scripts/schedule-form/schedule-timing-fields.js +9 -2
- package/dist/components/help-center-pages/index.cjs +88 -88
- package/dist/components/index.cjs +55 -53
- package/dist/components/meeting-scheduler/index.cjs +46 -46
- package/dist/components/navigation/index.cjs +10 -10
- package/dist/components/onboarding-guides/index.cjs +10 -10
- package/dist/components/product-demo/index.cjs +17 -17
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/tickets/index.cjs +14 -14
- package/dist/components/ui/assignee-dropdown.d.ts +10 -0
- package/dist/components/ui/assignee-dropdown.d.ts.map +1 -1
- package/dist/components/ui/assignee-dropdown.js +14 -2
- package/dist/components/ui/autocomplete.d.ts +24 -0
- package/dist/components/ui/autocomplete.d.ts.map +1 -1
- package/dist/components/ui/autocomplete.js +26 -4
- package/dist/components/ui/index.cjs +9 -7
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/components/ui/modal.js +24 -18
- package/dist/components/ui/reopen-ticket-modal.d.ts +17 -1
- package/dist/components/ui/reopen-ticket-modal.d.ts.map +1 -1
- package/dist/components/ui/reopen-ticket-modal.js +8 -15
- package/dist/components/ui/searchable-select.d.ts +17 -0
- package/dist/components/ui/searchable-select.d.ts.map +1 -1
- package/dist/components/ui/searchable-select.js +24 -9
- package/dist/components/ui/server-search-options.d.ts +30 -0
- package/dist/components/ui/server-search-options.d.ts.map +1 -0
- package/dist/components/ui/server-search-options.js +30 -0
- package/dist/components/ui/take-over-ticket-modal.d.ts +25 -1
- package/dist/components/ui/take-over-ticket-modal.d.ts.map +1 -1
- package/dist/components/ui/take-over-ticket-modal.js +14 -14
- package/dist/components/ui/ticket-info-section.d.ts +2 -0
- package/dist/components/ui/ticket-info-section.d.ts.map +1 -1
- package/dist/components/ui/ticket-info-section.js +2 -1
- package/dist/{devices-HZVRGH3A.cjs → devices-4MF5B7WJ.cjs} +8 -8
- package/dist/{embeddable-chat-GHBCX2BY.cjs → embeddable-chat-XT6GMSBX.cjs} +62 -62
- package/dist/index.cjs +13 -11
- package/dist/{knowledge-EJG7YG7C.cjs → knowledge-MI7VMPRF.cjs} +8 -8
- package/dist/{logs-6N3ANKZK.cjs → logs-7TEU2UXV.cjs} +15 -15
- package/dist/{policies-CE7A66D7.cjs → policies-AR7B4LW5.cjs} +11 -11
- package/dist/{remote-session-HLGLKOGW.cjs → remote-session-LMUFV2RZ.cjs} +4 -4
- package/dist/{scripts-NREM2Y6Z.cjs → scripts-HTMYPV5Q.cjs} +14 -14
- package/dist/{software-update-CI4F3IRV.cjs → software-update-YMSYGYCM.cjs} +11 -11
- package/package.json +1 -1
- package/src/components/features/scripts/schedule-form/schedule-offline-fields.tsx +10 -1
- package/src/components/features/scripts/schedule-form/schedule-timing-fields.tsx +10 -4
- package/src/components/ui/assignee-dropdown.tsx +29 -1
- package/src/components/ui/autocomplete.tsx +68 -5
- package/src/components/ui/modal.tsx +14 -4
- package/src/components/ui/reopen-ticket-modal.tsx +22 -14
- package/src/components/ui/searchable-select.tsx +52 -8
- package/src/components/ui/server-search-options.ts +65 -0
- package/src/components/ui/take-over-ticket-modal.tsx +35 -13
- package/src/components/ui/ticket-info-section.tsx +3 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
4
|
-
import { forwardRef, useEffect } from "react";
|
|
4
|
+
import { forwardRef, useEffect, useLayoutEffect, useState } from "react";
|
|
5
|
+
import { createPortal } from "react-dom";
|
|
5
6
|
import { ViewportBreakpoints } from "../../hooks/ui/use-content-breakpoint.js";
|
|
6
7
|
import { cn } from "../../utils/cn.js";
|
|
7
8
|
const Modal = forwardRef(({ isOpen, onClose, children, className }, ref) => {
|
|
@@ -16,23 +17,28 @@ const Modal = forwardRef(({ isOpen, onClose, children, className }, ref) => {
|
|
|
16
17
|
document.addEventListener("keydown", handleKeyDown);
|
|
17
18
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
18
19
|
}, [isOpen, onClose]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
const [portalTarget, setPortalTarget] = useState(null);
|
|
21
|
+
useLayoutEffect(() => setPortalTarget(document.body), []);
|
|
22
|
+
if (!isOpen || !portalTarget) return null;
|
|
23
|
+
return createPortal(
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "ods-viewport-layer fixed inset-0 z-[1300] flex items-center justify-center", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-ods-overlay", onClick: onClose, "aria-hidden": "true" }),
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(
|
|
31
|
+
"relative z-10 mx-4 flex max-h-[90vh] w-full max-w-md flex-col overflow-hidden rounded-lg border border-ods-border bg-ods-card shadow-xl",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
role: "dialog",
|
|
35
|
+
"aria-modal": "true",
|
|
36
|
+
children: /* @__PURE__ */ jsx(ViewportBreakpoints, { children })
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] }),
|
|
40
|
+
portalTarget
|
|
41
|
+
);
|
|
36
42
|
});
|
|
37
43
|
Modal.displayName = "Modal";
|
|
38
44
|
const ModalContent = forwardRef(({ children, className }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-0 flex-1 overflow-y-auto", className), children }));
|
|
@@ -25,6 +25,22 @@ export interface ReopenTicketModalProps {
|
|
|
25
25
|
initialAssigneeId?: string | null;
|
|
26
26
|
/** Confirm in-flight: buttons lock and the modal refuses to close. */
|
|
27
27
|
isPending?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Server search for the Assigned picker. When set, `assigneeOptions` is the
|
|
30
|
+
* server's answer to the query reported here and is not filtered locally:
|
|
31
|
+
* called with the raw query on every keystroke (debounce in the caller) and
|
|
32
|
+
* with `''` when the picker resets (a pick, closing it, the clear button).
|
|
33
|
+
* While `assigneesLoading`, the previous rows stay listed, and the picked
|
|
34
|
+
* assignee keeps their name and avatar after leaving `assigneeOptions`.
|
|
35
|
+
*/
|
|
36
|
+
onAssigneeSearchChange?: (query: string) => void;
|
|
37
|
+
/**
|
|
38
|
+
* The pre-selected assignee as an option, for when `assigneeOptions` does
|
|
39
|
+
* not include them (a server search's first page) — the field would read
|
|
40
|
+
* the raw id otherwise. Only renders the selection; `initialAssigneeId`
|
|
41
|
+
* still decides it.
|
|
42
|
+
*/
|
|
43
|
+
initialAssigneeOption?: TakeOverAssigneeOption;
|
|
28
44
|
onConfirm: (selection: ReopenTicketSelection) => void;
|
|
29
45
|
}
|
|
30
46
|
/**
|
|
@@ -38,5 +54,5 @@ export interface ReopenTicketModalProps {
|
|
|
38
54
|
* Desktop footer shows only the accent Reopen button (X closes); mobile
|
|
39
55
|
* bottom-sheet adds a Cancel button, matching Take Over.
|
|
40
56
|
*/
|
|
41
|
-
export declare function ReopenTicketModal({ isOpen, onClose, ticketRef, statusOptions, assigneeOptions, assigneesLoading, initialStatusId, initialAssigneeId, isPending, onConfirm, }: ReopenTicketModalProps): import("react").JSX.Element;
|
|
57
|
+
export declare function ReopenTicketModal({ isOpen, onClose, ticketRef, statusOptions, assigneeOptions, assigneesLoading, initialStatusId, initialAssigneeId, isPending, onConfirm, onAssigneeSearchChange, initialAssigneeOption, }: ReopenTicketModalProps): import("react").JSX.Element;
|
|
42
58
|
//# sourceMappingURL=reopen-ticket-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reopen-ticket-modal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/reopen-ticket-modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reopen-ticket-modal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/reopen-ticket-modal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAE1B,MAAM,0BAA0B,CAAC;AAMlC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yGAAyG;IACzG,SAAS,EAAE,MAAM,CAAC;IAClB;;sEAEkE;IAClE,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,iGAAiG;IACjG,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;0EAEsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;IAC/C,SAAS,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACvD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,SAAS,EACT,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,SAAiB,EACjB,SAAS,EACT,sBAAsB,EACtB,qBAAqB,GACtB,EAAE,sBAAsB,+BAwGxB"}
|
|
@@ -5,10 +5,10 @@ import { Autocomplete } from "./autocomplete.js";
|
|
|
5
5
|
import { Button } from "./button/index.js";
|
|
6
6
|
import { ColorSwatch } from "./color-swatch.js";
|
|
7
7
|
import { ModalV2, ModalV2Footer, ModalV2Header, ModalV2Title } from "./modal-v2.js";
|
|
8
|
-
import { SquareAvatar } from "./square-avatar.js";
|
|
9
8
|
import {
|
|
10
9
|
renderTicketAssigneeOption,
|
|
11
|
-
renderTicketStatusOption
|
|
10
|
+
renderTicketStatusOption,
|
|
11
|
+
withTicketAssigneeAvatars
|
|
12
12
|
} from "./take-over-ticket-modal.js";
|
|
13
13
|
import { Textarea } from "./textarea.js";
|
|
14
14
|
const REASON_MAX_LENGTH = 1e3;
|
|
@@ -22,7 +22,9 @@ function ReopenTicketModal({
|
|
|
22
22
|
initialStatusId,
|
|
23
23
|
initialAssigneeId,
|
|
24
24
|
isPending = false,
|
|
25
|
-
onConfirm
|
|
25
|
+
onConfirm,
|
|
26
|
+
onAssigneeSearchChange,
|
|
27
|
+
initialAssigneeOption
|
|
26
28
|
}) {
|
|
27
29
|
const [statusId, setStatusId] = useState(initialStatusId ?? null);
|
|
28
30
|
const [assigneeId, setAssigneeId] = useState(initialAssigneeId ?? null);
|
|
@@ -38,7 +40,6 @@ function ReopenTicketModal({
|
|
|
38
40
|
}
|
|
39
41
|
const selectedStatusId = statusId ?? statusOptions[0]?.value ?? null;
|
|
40
42
|
const selectedStatus = statusOptions.find((o) => o.value === selectedStatusId);
|
|
41
|
-
const selectedAssignee = assigneeOptions.find((o) => o.value === assigneeId);
|
|
42
43
|
const handleConfirm = () => {
|
|
43
44
|
if (!selectedStatusId || !assigneeId || isPending) return;
|
|
44
45
|
const trimmedReason = reason.trim();
|
|
@@ -73,21 +74,13 @@ function ReopenTicketModal({
|
|
|
73
74
|
Autocomplete,
|
|
74
75
|
{
|
|
75
76
|
label: "Assigned",
|
|
76
|
-
options: assigneeOptions,
|
|
77
|
+
options: withTicketAssigneeAvatars(assigneeOptions),
|
|
77
78
|
value: assigneeId,
|
|
78
79
|
onChange: setAssigneeId,
|
|
79
80
|
placeholder: "Select Technician",
|
|
80
81
|
loading: assigneesLoading,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
src: selectedAssignee.imageUrl,
|
|
85
|
-
alt: selectedAssignee.label,
|
|
86
|
-
fallback: selectedAssignee.label,
|
|
87
|
-
size: "sm",
|
|
88
|
-
variant: "round"
|
|
89
|
-
}
|
|
90
|
-
) : void 0,
|
|
82
|
+
onSearchChange: onAssigneeSearchChange,
|
|
83
|
+
selectedOptions: initialAssigneeOption ? withTicketAssigneeAvatars([initialAssigneeOption]) : void 0,
|
|
91
84
|
renderOption: renderTicketAssigneeOption
|
|
92
85
|
}
|
|
93
86
|
) })
|
|
@@ -59,6 +59,23 @@ export interface SearchableSelectProps {
|
|
|
59
59
|
className?: string;
|
|
60
60
|
/** Classes for the popover content (e.g. a fixed width for icon triggers). */
|
|
61
61
|
contentClassName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Server search. When set, `options` is the server's answer to the query
|
|
64
|
+
* reported here, not a list to filter:
|
|
65
|
+
*
|
|
66
|
+
* - called with the raw query on every change of the search field (debounce
|
|
67
|
+
* in the caller), and with `''` when the dropdown closes on a non-empty
|
|
68
|
+
* query (a pick, Escape, a click outside) — the field clears on close, so
|
|
69
|
+
* the caller goes back to its unfiltered first page with it.
|
|
70
|
+
* - nothing is filtered locally (`keywords` are moot).
|
|
71
|
+
* - while `isLoading`, the options stay listed, and an `options` emptied
|
|
72
|
+
* mid-load falls back to the last list that settled; the loading rows show
|
|
73
|
+
* only with nothing to list yet.
|
|
74
|
+
* - the default trigger keeps the label and icon of the last option seen
|
|
75
|
+
* for `value` when the current answer does not include it. A custom
|
|
76
|
+
* `trigger` renders its own selection.
|
|
77
|
+
*/
|
|
78
|
+
onSearchChange?: (query: string) => void;
|
|
62
79
|
}
|
|
63
80
|
/**
|
|
64
81
|
* Select-style dropdown whose first item is a search field filtering the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/searchable-select.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/searchable-select.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAA4B,MAAM,OAAO,CAAC;AA0BjE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,K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nB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,+BAiP/D"}
|
|
@@ -13,6 +13,7 @@ import { FieldWrapper } from "./field-wrapper.js";
|
|
|
13
13
|
import { Input } from "./input.js";
|
|
14
14
|
import { LoadingItems } from "./loading-scope.js";
|
|
15
15
|
import { usePortalContainer } from "./portal-container.js";
|
|
16
|
+
import { useRememberedSelection, useSettledOptions } from "./server-search-options.js";
|
|
16
17
|
const SELECT_TILE_LAYOUT = "min-w-0 flex-col justify-center";
|
|
17
18
|
const SELECT_ROW_CLASS = BUTTON_KIND_CLASS.row;
|
|
18
19
|
const SELECT_TILE_CLASS = cn(BUTTON_KIND_CLASS.row, SELECT_TILE_LAYOUT);
|
|
@@ -39,8 +40,10 @@ function SearchableSelect(allProps) {
|
|
|
39
40
|
renderOption,
|
|
40
41
|
align = "start",
|
|
41
42
|
className,
|
|
42
|
-
contentClassName
|
|
43
|
+
contentClassName,
|
|
44
|
+
onSearchChange
|
|
43
45
|
} = allProps;
|
|
46
|
+
const serverSearch = onSearchChange !== void 0;
|
|
44
47
|
const errorSlot = "error" in allProps;
|
|
45
48
|
const isInvalid = !!error;
|
|
46
49
|
const isGrid = layout === "grid";
|
|
@@ -51,20 +54,32 @@ function SearchableSelect(allProps) {
|
|
|
51
54
|
const keyboardPadding = useKeyboardCollisionPadding();
|
|
52
55
|
const portalContainer = usePortalContainer();
|
|
53
56
|
if (!isOpen && search !== "") setSearch("");
|
|
57
|
+
const listedOptions = useSettledOptions(options, isLoading, serverSearch);
|
|
58
|
+
const rememberedSelection = useRememberedSelection(listedOptions, value != null ? [value] : [], serverSearch);
|
|
54
59
|
const filtered = useMemo(() => {
|
|
60
|
+
if (serverSearch) return listedOptions;
|
|
55
61
|
const q = search.trim().toLowerCase();
|
|
56
62
|
if (!q) return options;
|
|
57
63
|
return options.filter(
|
|
58
64
|
(o) => o.label.toLowerCase().includes(q) || (o.keywords ?? []).some((k) => k.toLowerCase().includes(q))
|
|
59
65
|
);
|
|
60
|
-
}, [options, search]);
|
|
66
|
+
}, [options, listedOptions, serverSearch, search]);
|
|
61
67
|
const selectedOption = useMemo(
|
|
62
|
-
() => value != null ?
|
|
63
|
-
[
|
|
68
|
+
() => value != null ? listedOptions.find((o) => o.value === value) ?? rememberedSelection.get(value) : void 0,
|
|
69
|
+
[listedOptions, rememberedSelection, value]
|
|
64
70
|
);
|
|
71
|
+
const showLoadingRows = isLoading && (!serverSearch || filtered.length === 0);
|
|
72
|
+
const handleSearchChange = (query) => {
|
|
73
|
+
setSearch(query);
|
|
74
|
+
onSearchChange?.(query);
|
|
75
|
+
};
|
|
76
|
+
const handleOpenChange = (open) => {
|
|
77
|
+
setIsOpen(open);
|
|
78
|
+
if (!open && search !== "") onSearchChange?.("");
|
|
79
|
+
};
|
|
65
80
|
const handleSelect = (optionValue) => {
|
|
66
81
|
onValueChange(optionValue);
|
|
67
|
-
|
|
82
|
+
handleOpenChange(false);
|
|
68
83
|
};
|
|
69
84
|
const defaultTrigger = /* @__PURE__ */ jsxs(
|
|
70
85
|
Button,
|
|
@@ -108,7 +123,7 @@ function SearchableSelect(allProps) {
|
|
|
108
123
|
"px-[var(--spacing-system-sf)] py-[var(--spacing-system-s)] text-ods-text-secondary text-h5",
|
|
109
124
|
isGrid && "col-span-full"
|
|
110
125
|
);
|
|
111
|
-
return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isOpen, onOpenChange: disabled ? void 0 :
|
|
126
|
+
return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isOpen, onOpenChange: disabled ? void 0 : handleOpenChange, modal: false, children: [
|
|
112
127
|
!trigger && (label !== void 0 || errorSlot) ? /* @__PURE__ */ jsx(FieldWrapper, { label, htmlFor: triggerId, labelVariant, error, errorSlot, children: triggerElement }) : triggerElement,
|
|
113
128
|
/* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsxs(
|
|
114
129
|
PopoverPrimitive.Content,
|
|
@@ -132,7 +147,7 @@ function SearchableSelect(allProps) {
|
|
|
132
147
|
userValue: true,
|
|
133
148
|
autoFocus: true,
|
|
134
149
|
value: search,
|
|
135
|
-
onChange: (e) =>
|
|
150
|
+
onChange: (e) => handleSearchChange(e.target.value),
|
|
136
151
|
placeholder: searchPlaceholder,
|
|
137
152
|
startAdornment: /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 text-ods-text-secondary" }),
|
|
138
153
|
className: "rounded-none border-0"
|
|
@@ -150,8 +165,8 @@ function SearchableSelect(allProps) {
|
|
|
150
165
|
// bottom/right rule, so the grid needs no gap.
|
|
151
166
|
isGrid ? "grid grid-cols-[repeat(auto-fill,minmax(7rem,1fr))]" : "py-[var(--spacing-system-xs)]"
|
|
152
167
|
),
|
|
153
|
-
role:
|
|
154
|
-
children:
|
|
168
|
+
role: showLoadingRows ? void 0 : "listbox",
|
|
169
|
+
children: showLoadingRows ? (
|
|
155
170
|
// The options while they are read: the list's own rows (or tiles), a label bar each; `loadingText` is
|
|
156
171
|
// what a screen reader hears.
|
|
157
172
|
/* @__PURE__ */ jsx(LoadingRegion, { label: loadingText, className: "contents", children: /* @__PURE__ */ jsx(LoadingItems, { count: loadingRows ?? (isGrid ? SELECT_SKELETON_TILES : SELECT_SKELETON_ROWS), children: () => /* @__PURE__ */ jsx("div", { "data-loading-item": true, className: isGrid ? SELECT_TILE_CLASS : SELECT_ROW_CLASS, "aria-hidden": true, children: /* @__PURE__ */ jsx(TextLineSkeleton, { type: isGrid ? "h6" : "h4", className: isGrid ? "w-full" : "w-2/3" }) }) }) })
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bookkeeping shared by the pickers that can search on the server
|
|
3
|
+
* (`Autocomplete` / `SearchableSelect` with `onSearchChange`). There the
|
|
4
|
+
* caller's `options` ARE the server's answer to the current query, so the
|
|
5
|
+
* picker filters nothing; what it still owes the user is a list that holds
|
|
6
|
+
* still between keystrokes and a selection that keeps its label.
|
|
7
|
+
*
|
|
8
|
+
* Both hooks take `enabled` and are inert without it, so a client-filtered
|
|
9
|
+
* picker pays nothing and behaves exactly as before.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The options to list. While the next answer is in flight (`isLoading`), a
|
|
13
|
+
* caller that already emptied `options` would blank the list — or flash its
|
|
14
|
+
* "no results" line — on every keystroke, so an empty list falls back to the
|
|
15
|
+
* last one that settled. A caller that keeps the previous answer through the
|
|
16
|
+
* load (a transition, a placeholder) passes through untouched, and an empty
|
|
17
|
+
* answer that has settled is shown as the empty state it is.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useSettledOptions<O>(options: O[], isLoading: boolean, enabled: boolean): O[];
|
|
20
|
+
/**
|
|
21
|
+
* The last option seen for each selected value. A server search replaces
|
|
22
|
+
* `options` on every query, and a selection the current answer does not
|
|
23
|
+
* include would otherwise lose its label and icon. Holds the selected values
|
|
24
|
+
* only — a value that is deselected is forgotten — so it never outgrows the
|
|
25
|
+
* selection.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useRememberedSelection<T, O extends {
|
|
28
|
+
value: T;
|
|
29
|
+
}>(options: readonly O[], selected: readonly T[], enabled: boolean): ReadonlyMap<T, O>;
|
|
30
|
+
//# sourceMappingURL=server-search-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-search-options.d.ts","sourceRoot":"","sources":["../../../src/components/ui/server-search-options.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,EAAE,CAO5F;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,CAAC,SAAS;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,EAC9D,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,OAAO,EAAE,OAAO,GACf,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAanB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
function useSettledOptions(options, isLoading, enabled) {
|
|
4
|
+
const [settled, setSettled] = useState(options);
|
|
5
|
+
if (enabled && !isLoading && settled !== options) setSettled(options);
|
|
6
|
+
return enabled && isLoading && options.length === 0 ? settled : options;
|
|
7
|
+
}
|
|
8
|
+
function useRememberedSelection(options, selected, enabled) {
|
|
9
|
+
const [remembered, setRemembered] = useState(() => /* @__PURE__ */ new Map());
|
|
10
|
+
if (enabled) {
|
|
11
|
+
const next = /* @__PURE__ */ new Map();
|
|
12
|
+
for (const value of selected) {
|
|
13
|
+
const option = options.find((o) => o.value === value) ?? remembered.get(value);
|
|
14
|
+
if (option) next.set(value, option);
|
|
15
|
+
}
|
|
16
|
+
if (!hasSameEntries(next, remembered)) setRemembered(next);
|
|
17
|
+
}
|
|
18
|
+
return remembered;
|
|
19
|
+
}
|
|
20
|
+
function hasSameEntries(a, b) {
|
|
21
|
+
if (a.size !== b.size) return false;
|
|
22
|
+
for (const [key, value] of a) {
|
|
23
|
+
if (b.get(key) !== value) return false;
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
useRememberedSelection,
|
|
29
|
+
useSettledOptions
|
|
30
|
+
};
|
|
@@ -27,6 +27,22 @@ export interface TakeOverTicketModalProps {
|
|
|
27
27
|
initialAssigneeId?: string | null;
|
|
28
28
|
/** Confirm in-flight: buttons lock and the modal refuses to close. */
|
|
29
29
|
isPending?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Server search for the Assigned picker. When set, `assigneeOptions` is the
|
|
32
|
+
* server's answer to the query reported here and is not filtered locally:
|
|
33
|
+
* called with the raw query on every keystroke (debounce in the caller) and
|
|
34
|
+
* with `''` when the picker resets (a pick, closing it, the clear button).
|
|
35
|
+
* While `assigneesLoading`, the previous rows stay listed, and the picked
|
|
36
|
+
* assignee keeps their name and avatar after leaving `assigneeOptions`.
|
|
37
|
+
*/
|
|
38
|
+
onAssigneeSearchChange?: (query: string) => void;
|
|
39
|
+
/**
|
|
40
|
+
* The pre-selected assignee as an option, for when `assigneeOptions` does
|
|
41
|
+
* not include them (a server search's first page) — the field would read
|
|
42
|
+
* the raw id otherwise. Only renders the selection; `initialAssigneeId`
|
|
43
|
+
* still decides it.
|
|
44
|
+
*/
|
|
45
|
+
initialAssigneeOption?: TakeOverAssigneeOption;
|
|
30
46
|
onConfirm: (selection: TakeOverTicketSelection) => void;
|
|
31
47
|
}
|
|
32
48
|
/** Status row with color swatch — shared by the ticket lifecycle modals
|
|
@@ -34,6 +50,14 @@ export interface TakeOverTicketModalProps {
|
|
|
34
50
|
export declare function renderTicketStatusOption(option: AutocompleteOption, isSelected: boolean): ReactNode;
|
|
35
51
|
/** Assignee row with round avatar — shared by the ticket lifecycle modals. */
|
|
36
52
|
export declare function renderTicketAssigneeOption(option: AutocompleteOption, isSelected: boolean): ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* The assignee options with each avatar as the option's `icon` — shared by the
|
|
55
|
+
* ticket lifecycle modals. The Assigned field leads with the SELECTED option's
|
|
56
|
+
* icon, which `Autocomplete` resolves even after a server search has dropped
|
|
57
|
+
* that option from `assigneeOptions`; an adornment looked up in the current
|
|
58
|
+
* options lost the avatar the moment that happened.
|
|
59
|
+
*/
|
|
60
|
+
export declare function withTicketAssigneeAvatars(options: TakeOverAssigneeOption[]): TakeOverAssigneeOption[];
|
|
37
61
|
/**
|
|
38
62
|
* Take Over Ticket confirmation dialog (Figma openframe---tickets 8482-112154 /
|
|
39
63
|
* 8482-112169): shown when a technician takes a ticket over from the AI
|
|
@@ -45,5 +69,5 @@ export declare function renderTicketAssigneeOption(option: AutocompleteOption, i
|
|
|
45
69
|
* Desktop footer shows only the accent Take Over button (X closes); mobile
|
|
46
70
|
* bottom-sheet adds a Cancel button, per design.
|
|
47
71
|
*/
|
|
48
|
-
export declare function TakeOverTicketModal({ isOpen, onClose, ticketRef, statusOptions, assigneeOptions, assigneesLoading, initialStatusId, initialAssigneeId, isPending, onConfirm, }: TakeOverTicketModalProps): import("react").JSX.Element;
|
|
72
|
+
export declare function TakeOverTicketModal({ isOpen, onClose, ticketRef, statusOptions, assigneeOptions, assigneesLoading, initialStatusId, initialAssigneeId, isPending, onConfirm, onAssigneeSearchChange, initialAssigneeOption, }: TakeOverTicketModalProps): import("react").JSX.Element;
|
|
49
73
|
//# sourceMappingURL=take-over-ticket-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"take-over-ticket-modal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/take-over-ticket-modal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAOvE,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yGAAyG;IACzG,SAAS,EAAE,MAAM,CAAC;IAClB,yGAAyG;IACzG,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,iGAAiG;IACjG,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,CAAC,SAAS,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACzD;AAED;2EAC2E;AAC3E,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,CAanG;AAED,8EAA8E;AAC9E,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,CAarG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,SAAS,EACT,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,SAAiB,EACjB,SAAS,
|
|
1
|
+
{"version":3,"file":"take-over-ticket-modal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/take-over-ticket-modal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAOvE,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EA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,GACtB,EAAE,wBAAwB,+BAuF1B"}
|
|
@@ -28,6 +28,12 @@ function renderTicketAssigneeOption(option, isSelected) {
|
|
|
28
28
|
isSelected && /* @__PURE__ */ jsx(CheckIcon, { className: "text-ods-accent", size: 20 })
|
|
29
29
|
] });
|
|
30
30
|
}
|
|
31
|
+
function withTicketAssigneeAvatars(options) {
|
|
32
|
+
return options.map((option) => ({
|
|
33
|
+
...option,
|
|
34
|
+
icon: /* @__PURE__ */ jsx(SquareAvatar, { src: option.imageUrl, alt: option.label, fallback: option.label, size: "sm", variant: "round" })
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
31
37
|
function TakeOverTicketModal({
|
|
32
38
|
isOpen,
|
|
33
39
|
onClose,
|
|
@@ -38,7 +44,9 @@ function TakeOverTicketModal({
|
|
|
38
44
|
initialStatusId,
|
|
39
45
|
initialAssigneeId,
|
|
40
46
|
isPending = false,
|
|
41
|
-
onConfirm
|
|
47
|
+
onConfirm,
|
|
48
|
+
onAssigneeSearchChange,
|
|
49
|
+
initialAssigneeOption
|
|
42
50
|
}) {
|
|
43
51
|
const [statusId, setStatusId] = useState(initialStatusId ?? null);
|
|
44
52
|
const [assigneeId, setAssigneeId] = useState(initialAssigneeId ?? null);
|
|
@@ -52,7 +60,6 @@ function TakeOverTicketModal({
|
|
|
52
60
|
}
|
|
53
61
|
const selectedStatusId = statusId ?? statusOptions[0]?.value ?? null;
|
|
54
62
|
const selectedStatus = statusOptions.find((o) => o.value === selectedStatusId);
|
|
55
|
-
const selectedAssignee = assigneeOptions.find((o) => o.value === assigneeId);
|
|
56
63
|
const handleConfirm = () => {
|
|
57
64
|
if (!selectedStatusId || !assigneeId || isPending) return;
|
|
58
65
|
onConfirm({ statusId: selectedStatusId, assigneeId });
|
|
@@ -82,21 +89,13 @@ function TakeOverTicketModal({
|
|
|
82
89
|
Autocomplete,
|
|
83
90
|
{
|
|
84
91
|
label: "Assigned",
|
|
85
|
-
options: assigneeOptions,
|
|
92
|
+
options: withTicketAssigneeAvatars(assigneeOptions),
|
|
86
93
|
value: assigneeId,
|
|
87
94
|
onChange: setAssigneeId,
|
|
88
95
|
placeholder: "Select Technician",
|
|
89
96
|
loading: assigneesLoading,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
src: selectedAssignee.imageUrl,
|
|
94
|
-
alt: selectedAssignee.label,
|
|
95
|
-
fallback: selectedAssignee.label,
|
|
96
|
-
size: "sm",
|
|
97
|
-
variant: "round"
|
|
98
|
-
}
|
|
99
|
-
) : void 0,
|
|
97
|
+
onSearchChange: onAssigneeSearchChange,
|
|
98
|
+
selectedOptions: initialAssigneeOption ? withTicketAssigneeAvatars([initialAssigneeOption]) : void 0,
|
|
100
99
|
renderOption: renderTicketAssigneeOption
|
|
101
100
|
}
|
|
102
101
|
) })
|
|
@@ -122,5 +121,6 @@ function TakeOverTicketModal({
|
|
|
122
121
|
export {
|
|
123
122
|
TakeOverTicketModal,
|
|
124
123
|
renderTicketAssigneeOption,
|
|
125
|
-
renderTicketStatusOption
|
|
124
|
+
renderTicketStatusOption,
|
|
125
|
+
withTicketAssigneeAvatars
|
|
126
126
|
};
|
|
@@ -52,6 +52,8 @@ export interface TicketInfoSectionProps {
|
|
|
52
52
|
isLoading?: boolean;
|
|
53
53
|
isPending?: boolean;
|
|
54
54
|
onAssign: (userId: string | null) => void;
|
|
55
|
+
/** Server search for the picker — see `AssigneeDropdownProps.onSearchChange`. */
|
|
56
|
+
onSearchChange?: (query: string) => void;
|
|
55
57
|
};
|
|
56
58
|
/** Created date string */
|
|
57
59
|
createdAt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-info-section.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ticket-info-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAKlF,OAAO,EA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MAAM,CAAC;YACb,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,gGAAgG;YAChG,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB,CAAC;QACF,OAAO,EAAE,oBAAoB,EAAE,CAAC;QAChC,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ticket-info-section.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ticket-info-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAKlF,OAAO,EAAE,KAAK,gBAAgB,EAAyB,MAAM,2BAA2B,CAAC;AAEzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAmB,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAElF,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,YAAY,CAAC,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,aAAa,CAAC,EAAE,qBAAqB,EAA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,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA6CD,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,MAAM,EACN,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,IAAI,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY,GACb,EAAE,sBAAsB,+BA4HxB"}
|
|
@@ -86,7 +86,8 @@ function TicketInfoSection({
|
|
|
86
86
|
options: assigned.options,
|
|
87
87
|
isLoading: assigned.isLoading,
|
|
88
88
|
isPending: assigned.isPending,
|
|
89
|
-
onAssign: assigned.onAssign
|
|
89
|
+
onAssign: assigned.onAssign,
|
|
90
|
+
onSearchChange: assigned.onSearchChange
|
|
90
91
|
}
|
|
91
92
|
) : /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
92
93
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-ods-text-secondary text-h4", children: [
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
var _chunkSMZWXY4Xcjs = require('./chunk-SMZWXY4X.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkR2S22LDLcjs = require('./chunk-R2S22LDL.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkLHV2R6QUcjs = require('./chunk-LHV2R6QU.cjs');
|
|
12
12
|
require('./chunk-FDZOE5TL.cjs');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-SPS7TL7Z.cjs');
|
|
14
14
|
require('./chunk-FLW2VL5W.cjs');
|
|
15
15
|
require('./chunk-NG3RKTQU.cjs');
|
|
16
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-FRS2VO22.cjs');
|
|
17
17
|
require('./chunk-HQQE74RO.cjs');
|
|
18
18
|
require('./chunk-DEY6XXGO.cjs');
|
|
19
19
|
require('./chunk-AZJYMTBS.cjs');
|
|
@@ -22,8 +22,8 @@ require('./chunk-24I6RFVU.cjs');
|
|
|
22
22
|
require('./chunk-7Z536SPR.cjs');
|
|
23
23
|
require('./chunk-MZ4KBSH7.cjs');
|
|
24
24
|
require('./chunk-YR74H7Z3.cjs');
|
|
25
|
-
require('./chunk-
|
|
26
|
-
require('./chunk-
|
|
25
|
+
require('./chunk-BT53NHR7.cjs');
|
|
26
|
+
require('./chunk-KS5V55HN.cjs');
|
|
27
27
|
require('./chunk-JLKGLPDC.cjs');
|
|
28
28
|
require('./chunk-ZD6SZLO2.cjs');
|
|
29
29
|
require('./chunk-KVJKKVB3.cjs');
|
|
@@ -1824,8 +1824,8 @@ require('./chunk-7DNL734S.cjs');
|
|
|
1824
1824
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1825
1825
|
require('./chunk-SKI6NKOE.cjs');
|
|
1826
1826
|
require('./chunk-EWPR7662.cjs');
|
|
1827
|
-
require('./chunk-
|
|
1828
|
-
require('./chunk-
|
|
1827
|
+
require('./chunk-TOWVMBAP.cjs');
|
|
1828
|
+
require('./chunk-I3RJLXEL.cjs');
|
|
1829
1829
|
require('./chunk-PRCGRDHV.cjs');
|
|
1830
1830
|
require('./chunk-4W77VLQV.cjs');
|
|
1831
1831
|
require('./chunk-P4B6PVSG.cjs');
|
|
@@ -1868,7 +1868,7 @@ function DevicesScreen({ compact = false }) {
|
|
|
1868
1868
|
const cast = _chunkLHV2R6QUcjs.useProductDemoCast.call(void 0, );
|
|
1869
1869
|
const fixture = _react.useMemo.call(void 0, () => _chunkSMZWXY4Xcjs.buildWindowsDevicesFixture.call(void 0, cast), [cast]);
|
|
1870
1870
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1871
|
-
|
|
1871
|
+
_chunkR2S22LDLcjs.DevicesScreenView,
|
|
1872
1872
|
{
|
|
1873
1873
|
compact,
|
|
1874
1874
|
devices: fixture.devices,
|