@avament-pub/support-navbar-create 0.2.0 → 0.2.1
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/index.d.ts +3 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,9 +7,11 @@ type CreateTicketDialogProps = {
|
|
|
7
7
|
ticketId?: string | null;
|
|
8
8
|
allowKeepAdding?: boolean;
|
|
9
9
|
onSaved?: () => void;
|
|
10
|
+
/** Navbar / support report flow — overrides `ticket.create_dialog.title`. */
|
|
11
|
+
createDialogTitle?: string;
|
|
10
12
|
};
|
|
11
13
|
|
|
12
|
-
declare function CreateTicketDialog({ open, onOpenChange, ticketId, allowKeepAdding, onSaved, }: CreateTicketDialogProps): React.JSX.Element;
|
|
14
|
+
declare function CreateTicketDialog({ open, onOpenChange, ticketId, allowKeepAdding, onSaved, createDialogTitle, }: CreateTicketDialogProps): React.JSX.Element;
|
|
13
15
|
|
|
14
16
|
type SupportApiRuntime = {
|
|
15
17
|
apiBaseUrl: string;
|
package/dist/index.js
CHANGED
|
@@ -6655,7 +6655,8 @@ function CreateTicketDialog({
|
|
|
6655
6655
|
onOpenChange,
|
|
6656
6656
|
ticketId = null,
|
|
6657
6657
|
allowKeepAdding = true,
|
|
6658
|
-
onSaved
|
|
6658
|
+
onSaved,
|
|
6659
|
+
createDialogTitle
|
|
6659
6660
|
}) {
|
|
6660
6661
|
const isEdit = Boolean(ticketId);
|
|
6661
6662
|
const projectId = "support";
|
|
@@ -7500,7 +7501,7 @@ function CreateTicketDialog({
|
|
|
7500
7501
|
/* @__PURE__ */ jsx28(DialogHeader, { className: "shrink-0 border-b border-border px-6 py-4", children: /* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap items-center gap-2 pe-8", children: [
|
|
7501
7502
|
/* @__PURE__ */ jsx28(DialogTitle, { className: "text-theme-primary", children: isEdit ? t("ticket.edit_dialog.title", {
|
|
7502
7503
|
serial: ticketDetail?.serial ?? ""
|
|
7503
|
-
}) : t("ticket.create_dialog.title") }),
|
|
7504
|
+
}) : createDialogTitle ?? t("ticket.create_dialog.title") }),
|
|
7504
7505
|
!isEdit ? /* @__PURE__ */ jsxs16(
|
|
7505
7506
|
Popover,
|
|
7506
7507
|
{
|
|
@@ -7701,7 +7702,14 @@ function useSupportNavbarCreateTicket({
|
|
|
7701
7702
|
{
|
|
7702
7703
|
apiBaseUrl,
|
|
7703
7704
|
getAccessToken,
|
|
7704
|
-
children: /* @__PURE__ */ jsx30(
|
|
7705
|
+
children: /* @__PURE__ */ jsx30(
|
|
7706
|
+
CreateTicketDialog,
|
|
7707
|
+
{
|
|
7708
|
+
open: true,
|
|
7709
|
+
onOpenChange: setOpen,
|
|
7710
|
+
createDialogTitle: "Create Report"
|
|
7711
|
+
}
|
|
7712
|
+
)
|
|
7705
7713
|
}
|
|
7706
7714
|
) : null;
|
|
7707
7715
|
return { onSupportClick, dialog, open, setOpen };
|