@qoretechnologies/reqraft 0.10.13-pr.74.gf718c08 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +8 -11
- package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
- package/dist/components/form/engine/CompactToolbar.js +2 -2
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +15 -3
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +15 -20
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +3 -8
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/helpers/common.d.ts +0 -5
- package/dist/helpers/common.d.ts.map +1 -1
- package/dist/helpers/common.js +1 -20
- package/dist/helpers/common.js.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/providers/StorageProvider.d.ts +13 -0
- package/dist/providers/StorageProvider.d.ts.map +1 -1
- package/dist/providers/StorageProvider.js +29 -5
- package/dist/providers/StorageProvider.js.map +1 -1
- package/package.json +2 -2
- package/src/components/form/engine/CompactToolbar.tsx +117 -110
- package/src/components/form/engine/FormEngine.stories.tsx +27 -0
- package/src/components/form/engine/FormEngine.tsx +44 -25
- package/src/components/form/engine/compactRowStyles.ts +3 -5
- package/src/helpers/common.ts +0 -19
- package/src/hooks/useStorage/useStorage.stories.tsx +52 -0
- package/src/index.tsx +0 -5
- package/src/providers/StorageProvider.tsx +30 -4
- package/dist/components/composer/Composer.d.ts +0 -108
- package/dist/components/composer/Composer.d.ts.map +0 -1
- package/dist/components/composer/Composer.js +0 -238
- package/dist/components/composer/Composer.js.map +0 -1
- package/dist/components/composer/helpers.d.ts +0 -21
- package/dist/components/composer/helpers.d.ts.map +0 -1
- package/dist/components/composer/helpers.js +0 -75
- package/dist/components/composer/helpers.js.map +0 -1
- package/dist/components/composer/index.d.ts +0 -3
- package/dist/components/composer/index.d.ts.map +0 -1
- package/dist/components/composer/index.js +0 -19
- package/dist/components/composer/index.js.map +0 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts +0 -17
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +0 -1
- package/dist/components/imageLightbox/ImageLightbox.js +0 -129
- package/dist/components/imageLightbox/ImageLightbox.js.map +0 -1
- package/dist/components/imageLightbox/index.d.ts +0 -2
- package/dist/components/imageLightbox/index.d.ts.map +0 -1
- package/dist/components/imageLightbox/index.js +0 -18
- package/dist/components/imageLightbox/index.js.map +0 -1
- package/dist/components/supportTicket/AttachmentChips.d.ts +0 -10
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +0 -1
- package/dist/components/supportTicket/AttachmentChips.js +0 -119
- package/dist/components/supportTicket/AttachmentChips.js.map +0 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +0 -35
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +0 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.js +0 -31
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +0 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +0 -41
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +0 -1
- package/dist/components/supportTicket/ReferencePicker.js +0 -86
- package/dist/components/supportTicket/ReferencePicker.js.map +0 -1
- package/dist/components/supportTicket/TicketHeader.d.ts +0 -86
- package/dist/components/supportTicket/TicketHeader.d.ts.map +0 -1
- package/dist/components/supportTicket/TicketHeader.js +0 -149
- package/dist/components/supportTicket/TicketHeader.js.map +0 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +0 -32
- package/dist/components/supportTicket/TicketMetaTags.d.ts.map +0 -1
- package/dist/components/supportTicket/TicketMetaTags.js +0 -21
- package/dist/components/supportTicket/TicketMetaTags.js.map +0 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts +0 -63
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +0 -1
- package/dist/components/supportTicket/TicketReplyBox.js +0 -115
- package/dist/components/supportTicket/TicketReplyBox.js.map +0 -1
- package/dist/components/supportTicket/fileToAttachment.d.ts +0 -9
- package/dist/components/supportTicket/fileToAttachment.d.ts.map +0 -1
- package/dist/components/supportTicket/fileToAttachment.js +0 -28
- package/dist/components/supportTicket/fileToAttachment.js.map +0 -1
- package/dist/components/supportTicket/index.d.ts +0 -9
- package/dist/components/supportTicket/index.d.ts.map +0 -1
- package/dist/components/supportTicket/index.js +0 -25
- package/dist/components/supportTicket/index.js.map +0 -1
- package/dist/components/supportTicket/meta.d.ts +0 -63
- package/dist/components/supportTicket/meta.d.ts.map +0 -1
- package/dist/components/supportTicket/meta.js +0 -79
- package/dist/components/supportTicket/meta.js.map +0 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts +0 -52
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +0 -1
- package/dist/components/ticketReferences/TicketReferences.js +0 -453
- package/dist/components/ticketReferences/TicketReferences.js.map +0 -1
- package/dist/components/ticketReferences/index.d.ts +0 -3
- package/dist/components/ticketReferences/index.d.ts.map +0 -1
- package/dist/components/ticketReferences/index.js +0 -6
- package/dist/components/ticketReferences/index.js.map +0 -1
- package/dist/components/ticketThread/TicketThread.d.ts +0 -52
- package/dist/components/ticketThread/TicketThread.d.ts.map +0 -1
- package/dist/components/ticketThread/TicketThread.js +0 -248
- package/dist/components/ticketThread/TicketThread.js.map +0 -1
- package/dist/components/ticketThread/index.d.ts +0 -3
- package/dist/components/ticketThread/index.d.ts.map +0 -1
- package/dist/components/ticketThread/index.js +0 -7
- package/dist/components/ticketThread/index.js.map +0 -1
- package/dist/helpers/scrollbar.d.ts +0 -2
- package/dist/helpers/scrollbar.d.ts.map +0 -1
- package/dist/helpers/scrollbar.js +0 -25
- package/dist/helpers/scrollbar.js.map +0 -1
- package/src/components/composer/Composer.stories.tsx +0 -238
- package/src/components/composer/Composer.tsx +0 -545
- package/src/components/composer/helpers.ts +0 -74
- package/src/components/composer/index.ts +0 -2
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -156
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -169
- package/src/components/imageLightbox/index.ts +0 -1
- package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -122
- package/src/components/supportTicket/AttachmentChips.tsx +0 -142
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -134
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -85
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -296
- package/src/components/supportTicket/ReferencePicker.tsx +0 -237
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -122
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -247
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
- package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -355
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -146
- package/src/components/supportTicket/fileToAttachment.ts +0 -24
- package/src/components/supportTicket/index.ts +0 -8
- package/src/components/supportTicket/meta.ts +0 -145
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -301
- package/src/components/ticketReferences/TicketReferences.tsx +0 -899
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -751
- package/src/components/ticketThread/TicketThread.tsx +0 -650
- package/src/components/ticketThread/index.ts +0 -6
- package/src/helpers/scrollbar.ts +0 -32
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { TSizes } from '@qoretechnologies/reqore/dist/constants/sizes';
|
|
2
|
-
import { TTicketCategory, TTicketPriority, TTicketStatus, TTicketViewerRole } from './meta';
|
|
3
|
-
export interface ITicketMetaTagsProps {
|
|
4
|
-
/** The three enum values to badge — a full ticket satisfies this structurally. */
|
|
5
|
-
ticket: {
|
|
6
|
-
status: TTicketStatus;
|
|
7
|
-
priority: TTicketPriority;
|
|
8
|
-
category: TTicketCategory;
|
|
9
|
-
};
|
|
10
|
-
/** Picks audience-specific labels (e.g. "Awaiting your reply" vs "Awaiting
|
|
11
|
-
* customer"). Omit for the staff / neutral wording. */
|
|
12
|
-
viewerRole?: TTicketViewerRole;
|
|
13
|
-
size?: TSizes;
|
|
14
|
-
/** Hide the category tag (e.g. in a dense list row). */
|
|
15
|
-
hideCategory?: boolean;
|
|
16
|
-
/** Reqore's subtle tag style — the intent colour as text on a faint wash,
|
|
17
|
-
* instead of a solid intent fill. Defaults to `true`; pass `false` for the
|
|
18
|
-
* old solid chips. */
|
|
19
|
-
minimal?: boolean;
|
|
20
|
-
/** Whether the tags are borderless (Reqore's `flat`). Defaults to `false` here,
|
|
21
|
-
* so tags carry a border — a shade lighter than the fill — which keeps the
|
|
22
|
-
* `minimal` tags legible. Pass `true` for no border. */
|
|
23
|
-
flat?: boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* The status / priority / category badge row for a ticket — the single place the
|
|
27
|
-
* three enum vocabularies (`../supportTicket/meta`) turn into Reqore tags, so the
|
|
28
|
-
* customer list, the staff queue, the detail header and the Qonsole card all read
|
|
29
|
-
* identically. Each tag's label, intent and icon come from the shared meta maps.
|
|
30
|
-
*/
|
|
31
|
-
export declare const TicketMetaTags: ({ ticket, viewerRole, size, hideCategory, minimal, flat, }: ITicketMetaTagsProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
//# sourceMappingURL=TicketMetaTags.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketMetaTags.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketMetaTags.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACvE,OAAO,EAKL,eAAe,EACf,eAAe,EACf,aAAa,EACb,iBAAiB,EAClB,MAAM,QAAQ,CAAC;AAEhB,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,MAAM,EAAE;QACN,MAAM,EAAE,aAAa,CAAC;QACtB,QAAQ,EAAE,eAAe,CAAC;QAC1B,QAAQ,EAAE,eAAe,CAAC;KAC3B,CAAC;IACF;4DACwD;IACxD,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;2BAEuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;6DAEyD;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,+DAOxB,oBAAoB,4CAmCtB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TicketMetaTags = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var reqore_1 = require("@qoretechnologies/reqore");
|
|
6
|
-
var meta_1 = require("./meta");
|
|
7
|
-
/**
|
|
8
|
-
* The status / priority / category badge row for a ticket — the single place the
|
|
9
|
-
* three enum vocabularies (`../supportTicket/meta`) turn into Reqore tags, so the
|
|
10
|
-
* customer list, the staff queue, the detail header and the Qonsole card all read
|
|
11
|
-
* identically. Each tag's label, intent and icon come from the shared meta maps.
|
|
12
|
-
*/
|
|
13
|
-
var TicketMetaTags = function (_a) {
|
|
14
|
-
var ticket = _a.ticket, viewerRole = _a.viewerRole, _b = _a.size, size = _b === void 0 ? 'small' : _b, hideCategory = _a.hideCategory, _c = _a.minimal, minimal = _c === void 0 ? true : _c, _d = _a.flat, flat = _d === void 0 ? false : _d;
|
|
15
|
-
var status = meta_1.TICKET_STATUS_META[ticket.status];
|
|
16
|
-
var priority = meta_1.TICKET_PRIORITY_META[ticket.priority];
|
|
17
|
-
var category = meta_1.TICKET_CATEGORY_META[ticket.category];
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { size: size, wrap: true, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { icon: status.icon, intent: status.intent, label: (0, meta_1.ticketStatusLabel)(ticket.status, viewerRole), size: size, minimal: minimal, flat: flat, effect: { weight: 'bold' } }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { icon: priority.icon, intent: priority.intent, label: priority.label, size: size, minimal: minimal, flat: flat }), !hideCategory && ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { icon: category.icon, label: category.label, size: size, minimal: minimal, flat: flat }))] }));
|
|
19
|
-
};
|
|
20
|
-
exports.TicketMetaTags = TicketMetaTags;
|
|
21
|
-
//# sourceMappingURL=TicketMetaTags.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketMetaTags.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketMetaTags.tsx"],"names":[],"mappings":";;;;AAAA,mDAAyE;AAEzE,+BASgB;AAyBhB;;;;;GAKG;AACI,IAAM,cAAc,GAAG,UAAC,EAOR;QANrB,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,YAAc,EAAd,IAAI,mBAAG,OAAO,KAAA,EACd,YAAY,kBAAA,EACZ,eAAc,EAAd,OAAO,mBAAG,IAAI,KAAA,EACd,YAAY,EAAZ,IAAI,mBAAG,KAAK,KAAA;IAEZ,IAAM,MAAM,GAAG,yBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjD,IAAM,QAAQ,GAAG,2BAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACvD,IAAM,QAAQ,GAAG,2BAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEvD,OAAO,CACL,wBAAC,2BAAkB,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,mBAClC,uBAAC,kBAAS,IACR,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,KAAK,EAAE,IAAA,wBAAiB,EAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACnD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAC1B,EACF,uBAAC,kBAAS,IACR,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,MAAM,EAAE,QAAQ,CAAC,MAAM,EACvB,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,GACV,EACD,CAAC,YAAY,IAAI,CAChB,uBAAC,kBAAS,IACR,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,GACV,CACH,IACkB,CACtB,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,cAAc,kBA0CzB"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ReqoreDropdown } from '@qoretechnologies/reqore';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import { TComposerEditor } from '../composer/Composer';
|
|
4
|
-
import { IAttachmentUpload } from './meta';
|
|
5
|
-
/** The exact `items` shape ReqoreDropdown accepts — no import-path guessing. */
|
|
6
|
-
type TAttachMenuItems = NonNullable<ComponentProps<typeof ReqoreDropdown>['items']>;
|
|
7
|
-
export interface ITicketReplyBoxProps {
|
|
8
|
-
/** Send the composed message. `internal` is only ever true when
|
|
9
|
-
* `allowInternalNote` is set (the staff surface). */
|
|
10
|
-
onSend: (body: string, options: {
|
|
11
|
-
internal: boolean;
|
|
12
|
-
attachments?: IAttachmentUpload[];
|
|
13
|
-
}) => void | Promise<void>;
|
|
14
|
-
/** File → base64 upload conversion; defaults to the shared `fileToAttachment`. */
|
|
15
|
-
fileToAttachment?: (file: File) => Promise<IAttachmentUpload>;
|
|
16
|
-
/** the send round-trip is in flight */
|
|
17
|
-
sending?: boolean;
|
|
18
|
-
/** the ticket can't be replied to (e.g. closed) — renders a notice instead */
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
disabledReason?: string;
|
|
21
|
-
/** placeholder text. (A function is called with `false` — the mode is chosen at
|
|
22
|
-
* send time, so there is no live internal-note mode.) */
|
|
23
|
-
placeholder?: string | ((internal: boolean) => string);
|
|
24
|
-
/** send labels; a function is called with `false` for the primary "Send reply"
|
|
25
|
-
* and `true` for the "Add internal note" split-menu item. Defaults to
|
|
26
|
-
* "Send reply" / "Add internal note". */
|
|
27
|
-
sendLabel?: string | ((internal: boolean) => string);
|
|
28
|
-
/** Staff surface: split the send button so it also offers "Add internal note"
|
|
29
|
-
* (customer composers omit it and just send a reply). */
|
|
30
|
-
allowInternalNote?: boolean;
|
|
31
|
-
/** Extra attach-menu entries beyond "Upload files" — e.g. the IDE's screenshot /
|
|
32
|
-
* region capture. Receives the composer's `addFiles`. With any entry the attach
|
|
33
|
-
* control becomes a dropdown; otherwise it's a plain button. */
|
|
34
|
-
attachMenuItems?: (addFiles: (files: File[]) => void) => TAttachMenuItems;
|
|
35
|
-
/** Extra footer controls left of the send button — e.g. the IDE's
|
|
36
|
-
* reference-interfaces toggle. */
|
|
37
|
-
footerActions?: ReactNode;
|
|
38
|
-
/** Rendered on top of the editor, inside the bar — e.g. reference chips. */
|
|
39
|
-
aboveInput?: ReactNode;
|
|
40
|
-
/** Rendered below the editor — e.g. the IDE's interface-reference picker. */
|
|
41
|
-
belowInput?: ReactNode;
|
|
42
|
-
/** Editor flavour. Helpdesk uses the rich, Qonsole-style editor by default; pass
|
|
43
|
-
* `plain` for a simple textarea (e.g. deterministic play tests). */
|
|
44
|
-
editor?: TComposerEditor;
|
|
45
|
-
/** Initial draft text to seed the editor with (e.g. a restored draft). */
|
|
46
|
-
defaultText?: string;
|
|
47
|
-
/** Initial staged files (e.g. a restored draft's attachments, or a demo). */
|
|
48
|
-
defaultFiles?: File[];
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* The shared ticket reply composer — now a thin adapter over the universal
|
|
52
|
-
* `<Composer>` (the input extracted from qorus-ide's Qonsole chat). It maps the
|
|
53
|
-
* ticket vocabulary onto the composer: the staff `allowInternalNote` becomes a
|
|
54
|
-
* split send (primary "Send reply" + a caret "Add internal note", mode chosen at
|
|
55
|
-
* send time), and staged files convert to `IAttachmentUpload[]` via
|
|
56
|
-
* `fileToAttachment` before `onSend`. App-specific affordances still arrive
|
|
57
|
-
* through slots (`attachMenuItems`, `footerActions`, `belowInput`), so the
|
|
58
|
-
* IDE-only bits (screenshot capture, the reference picker) stay in qorus-ide. A
|
|
59
|
-
* closed ticket renders a muted notice.
|
|
60
|
-
*/
|
|
61
|
-
export declare const TicketReplyBox: ({ onSend, fileToAttachment, sending, disabled, disabledReason, placeholder, sendLabel, allowInternalNote, attachMenuItems, footerActions, aboveInput, belowInput, editor, defaultText, defaultFiles, }: ITicketReplyBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=TicketReplyBox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketReplyBox.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketReplyBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAiC,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,C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MAAM,CAAC;IACrB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,2MAgBxB,oBAAoB,4CAiEtB,CAAC"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.TicketReplyBox = void 0;
|
|
40
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
-
var Composer_1 = require("../composer/Composer");
|
|
42
|
-
var fileToAttachment_1 = require("./fileToAttachment");
|
|
43
|
-
/**
|
|
44
|
-
* The shared ticket reply composer — now a thin adapter over the universal
|
|
45
|
-
* `<Composer>` (the input extracted from qorus-ide's Qonsole chat). It maps the
|
|
46
|
-
* ticket vocabulary onto the composer: the staff `allowInternalNote` becomes a
|
|
47
|
-
* split send (primary "Send reply" + a caret "Add internal note", mode chosen at
|
|
48
|
-
* send time), and staged files convert to `IAttachmentUpload[]` via
|
|
49
|
-
* `fileToAttachment` before `onSend`. App-specific affordances still arrive
|
|
50
|
-
* through slots (`attachMenuItems`, `footerActions`, `belowInput`), so the
|
|
51
|
-
* IDE-only bits (screenshot capture, the reference picker) stay in qorus-ide. A
|
|
52
|
-
* closed ticket renders a muted notice.
|
|
53
|
-
*/
|
|
54
|
-
var TicketReplyBox = function (_a) {
|
|
55
|
-
var onSend = _a.onSend, _b = _a.fileToAttachment, fileToAttachment = _b === void 0 ? fileToAttachment_1.fileToAttachment : _b, sending = _a.sending, disabled = _a.disabled, _c = _a.disabledReason, disabledReason = _c === void 0 ? 'This ticket is closed. Open a new ticket to continue the conversation.' : _c, _d = _a.placeholder, placeholder = _d === void 0 ? 'Write a reply…' : _d, sendLabel = _a.sendLabel, allowInternalNote = _a.allowInternalNote, attachMenuItems = _a.attachMenuItems, footerActions = _a.footerActions, aboveInput = _a.aboveInput, belowInput = _a.belowInput, _e = _a.editor, editor = _e === void 0 ? 'rich' : _e, defaultText = _a.defaultText, defaultFiles = _a.defaultFiles;
|
|
56
|
-
var resolvedPlaceholder = typeof placeholder === 'function' ? placeholder(false) : placeholder;
|
|
57
|
-
// Label for a given send mode: `false` = public reply, `true` = internal note.
|
|
58
|
-
var labelFor = function (note) {
|
|
59
|
-
return sendLabel !== undefined
|
|
60
|
-
? typeof sendLabel === 'function'
|
|
61
|
-
? sendLabel(note)
|
|
62
|
-
: sendLabel
|
|
63
|
-
: note
|
|
64
|
-
? 'Add internal note'
|
|
65
|
-
: 'Send reply';
|
|
66
|
-
};
|
|
67
|
-
// Staff surface splits the send button; customer surface is a single "Send reply".
|
|
68
|
-
// Both use the Qonsole-style minimal `custom1` accent (the Composer default); the
|
|
69
|
-
// internal note stays amber (`warning`) so it can't be mistaken for a public reply.
|
|
70
|
-
var sendActions = allowInternalNote
|
|
71
|
-
? [
|
|
72
|
-
{
|
|
73
|
-
id: 'reply',
|
|
74
|
-
label: labelFor(false),
|
|
75
|
-
icon: 'SendPlane2Line',
|
|
76
|
-
minimal: true,
|
|
77
|
-
customTheme: { main: 'custom1' },
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: 'internal',
|
|
81
|
-
label: labelFor(true),
|
|
82
|
-
icon: 'StickyNoteLine',
|
|
83
|
-
minimal: true,
|
|
84
|
-
intent: 'warning',
|
|
85
|
-
},
|
|
86
|
-
]
|
|
87
|
-
: undefined;
|
|
88
|
-
var handleSend = function (body_1, _a) { return __awaiter(void 0, [body_1, _a], void 0, function (body, _b) {
|
|
89
|
-
var internal, attachments, _c;
|
|
90
|
-
var files = _b.files, action = _b.action;
|
|
91
|
-
return __generator(this, function (_d) {
|
|
92
|
-
switch (_d.label) {
|
|
93
|
-
case 0:
|
|
94
|
-
internal = action === 'internal';
|
|
95
|
-
if (!files.length) return [3 /*break*/, 2];
|
|
96
|
-
return [4 /*yield*/, Promise.all(files.map(fileToAttachment))];
|
|
97
|
-
case 1:
|
|
98
|
-
_c = _d.sent();
|
|
99
|
-
return [3 /*break*/, 3];
|
|
100
|
-
case 2:
|
|
101
|
-
_c = undefined;
|
|
102
|
-
_d.label = 3;
|
|
103
|
-
case 3:
|
|
104
|
-
attachments = _c;
|
|
105
|
-
return [4 /*yield*/, onSend(body, { internal: internal, attachments: attachments })];
|
|
106
|
-
case 4:
|
|
107
|
-
_d.sent();
|
|
108
|
-
return [2 /*return*/];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}); };
|
|
112
|
-
return ((0, jsx_runtime_1.jsx)(Composer_1.Composer, { editor: editor, defaultText: defaultText, defaultFiles: defaultFiles, placeholder: resolvedPlaceholder, sending: sending, disabled: disabled, disabledReason: disabledReason, onSend: handleSend, sendLabel: labelFor(false), sendActions: sendActions, sendMenuClassName: 'ticket-send-more', attachMenuItems: attachMenuItems, footerActions: footerActions, aboveInput: aboveInput, belowInput: belowInput }));
|
|
113
|
-
};
|
|
114
|
-
exports.TicketReplyBox = TicketReplyBox;
|
|
115
|
-
//# sourceMappingURL=TicketReplyBox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketReplyBox.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketReplyBox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
|
4
|
-
* (the SaaS plane accepts attachments as base64 on the create/reply payload, with
|
|
5
|
-
* no separate multipart upload). Shared by every composer so the customer and
|
|
6
|
-
* staff surfaces encode files identically.
|
|
7
|
-
*/
|
|
8
|
-
export declare const fileToAttachment: (file: File) => Promise<IAttachmentUpload>;
|
|
9
|
-
//# sourceMappingURL=fileToAttachment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fileToAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/fileToAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,IAAI,KAAG,QAAQ,iBAAiB,CAenE,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fileToAttachment = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Read a picked `File` into the inline base64 upload shape the support API expects
|
|
6
|
-
* (the SaaS plane accepts attachments as base64 on the create/reply payload, with
|
|
7
|
-
* no separate multipart upload). Shared by every composer so the customer and
|
|
8
|
-
* staff surfaces encode files identically.
|
|
9
|
-
*/
|
|
10
|
-
var fileToAttachment = function (file) {
|
|
11
|
-
return new Promise(function (resolve, reject) {
|
|
12
|
-
var reader = new FileReader();
|
|
13
|
-
reader.onerror = function () { return reject(new Error("Could not read ".concat(file.name))); };
|
|
14
|
-
reader.onload = function () {
|
|
15
|
-
// reader.result is a data URL: "data:<type>;base64,<content>"
|
|
16
|
-
var result = String(reader.result);
|
|
17
|
-
var content = result.slice(result.indexOf(',') + 1);
|
|
18
|
-
resolve({
|
|
19
|
-
filename: file.name,
|
|
20
|
-
content_type: file.type || 'application/octet-stream',
|
|
21
|
-
content: content,
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
reader.readAsDataURL(file);
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
exports.fileToAttachment = fileToAttachment;
|
|
28
|
-
//# sourceMappingURL=fileToAttachment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fileToAttachment.js","sourceRoot":"","sources":["../../../src/components/supportTicket/fileToAttachment.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACI,IAAM,gBAAgB,GAAG,UAAC,IAAU;IACzC,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QAC1B,IAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,GAAG,cAAM,OAAA,MAAM,CAAC,IAAI,KAAK,CAAC,yBAAkB,IAAI,CAAC,IAAI,CAAE,CAAC,CAAC,EAAhD,CAAgD,CAAC;QACxE,MAAM,CAAC,MAAM,GAAG;YACd,8DAA8D;YAC9D,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACrC,IAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACtD,OAAO,CAAC;gBACN,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,YAAY,EAAE,IAAI,CAAC,IAAI,IAAI,0BAA0B;gBACrD,OAAO,SAAA;aACR,CAAC,CAAC;QACL,CAAC,CAAC;QACF,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;AAdF,CAcE,CAAC;AAfQ,QAAA,gBAAgB,oBAexB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './meta';
|
|
2
|
-
export * from './AttachmentChips';
|
|
3
|
-
export * from './TicketMetaTags';
|
|
4
|
-
export * from './TicketHeader';
|
|
5
|
-
export * from './InterfaceReferenceTags';
|
|
6
|
-
export * from './ReferencePicker';
|
|
7
|
-
export * from './fileToAttachment';
|
|
8
|
-
export * from './TicketReplyBox';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./meta"), exports);
|
|
18
|
-
__exportStar(require("./AttachmentChips"), exports);
|
|
19
|
-
__exportStar(require("./TicketMetaTags"), exports);
|
|
20
|
-
__exportStar(require("./TicketHeader"), exports);
|
|
21
|
-
__exportStar(require("./InterfaceReferenceTags"), exports);
|
|
22
|
-
__exportStar(require("./ReferencePicker"), exports);
|
|
23
|
-
__exportStar(require("./fileToAttachment"), exports);
|
|
24
|
-
__exportStar(require("./TicketReplyBox"), exports);
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/supportTicket/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,oDAAkC;AAClC,mDAAiC;AACjC,iDAA+B;AAC/B,2DAAyC;AACzC,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { TReqoreIntent } from '@qoretechnologies/reqore/dist/constants/theme';
|
|
2
|
-
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
|
|
3
|
-
export type TTicketStatus = 'new' | 'open' | 'awaiting_customer' | 'resolved' | 'closed';
|
|
4
|
-
export type TTicketPriority = 'low' | 'normal' | 'high' | 'urgent';
|
|
5
|
-
export type TTicketCategory = 'bug' | 'question' | 'billing' | 'feature' | 'other';
|
|
6
|
-
export type TTicketAuditAction = 'replied' | 'noted' | 'status_changed' | 'assigned' | 'updated';
|
|
7
|
-
/** A message author. Staff identities are masked from the customer by the backend. */
|
|
8
|
-
export type TTicketMessageAuthor = 'customer' | 'staff' | 'system';
|
|
9
|
-
/** Which side "you" sit on — decides self-alignment and audience-specific labels. */
|
|
10
|
-
export type TTicketViewerRole = 'customer' | 'staff';
|
|
11
|
-
export interface ITicketEnumMeta {
|
|
12
|
-
label: string;
|
|
13
|
-
intent: TReqoreIntent;
|
|
14
|
-
icon: IReqoreIconName;
|
|
15
|
-
/** Audience-specific label for the customer view; falls back to `label` (the
|
|
16
|
-
* staff / neutral wording). Only a few values differ by audience. */
|
|
17
|
-
customerLabel?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare const TICKET_STATUS_META: Record<TTicketStatus, ITicketEnumMeta>;
|
|
20
|
-
export declare const TICKET_PRIORITY_META: Record<TTicketPriority, ITicketEnumMeta>;
|
|
21
|
-
export declare const TICKET_CATEGORY_META: Record<TTicketCategory, ITicketEnumMeta>;
|
|
22
|
-
/** Staff-only audit trail vocabulary (used by the admin-portal staff surface).
|
|
23
|
-
* These are exactly the actions the backend writes (qorus-api
|
|
24
|
-
* `QorusSaasTicketStore::insertAudit`): a public reply, an internal note, a
|
|
25
|
-
* status change, an assignment, or `updated` (a priority/category change). */
|
|
26
|
-
export declare const TICKET_AUDIT_ACTION_META: Record<TTicketAuditAction, ITicketEnumMeta>;
|
|
27
|
-
/** The status label for a given viewer — the customer sees "Awaiting your reply"
|
|
28
|
-
* where staff see "Awaiting customer"; all other values are audience-neutral. */
|
|
29
|
-
export declare const ticketStatusLabel: (status: TTicketStatus, viewerRole?: TTicketViewerRole) => string;
|
|
30
|
-
/** A reply may be sent while a ticket is in any state except `closed`. */
|
|
31
|
-
export declare const REPLYABLE_STATUSES: TTicketStatus[];
|
|
32
|
-
/** Whether a ticket can still be replied to (closed ⇒ no). */
|
|
33
|
-
export declare const isTicketReplyable: (status: TTicketStatus) => boolean;
|
|
34
|
-
/** A file to upload with a ticket or reply — raw bytes as base64, inline on the
|
|
35
|
-
* create/reply payload (the SaaS plane has no separate multipart upload). */
|
|
36
|
-
export interface IAttachmentUpload {
|
|
37
|
-
filename: string;
|
|
38
|
-
content_type: string;
|
|
39
|
-
/** base64-encoded file content */
|
|
40
|
-
content: string;
|
|
41
|
-
}
|
|
42
|
-
/** A reference to a Qorus interface on the subscriber's instance, stored as a
|
|
43
|
-
* `{kind, name}` snapshot (the interface itself lives on the instance, not the
|
|
44
|
-
* SaaS plane). Attaches to a ticket (at creation) or a message (in a reply). */
|
|
45
|
-
export interface IInterfaceReference {
|
|
46
|
-
/** interface type: workflow / service / job / fsm / qog / connection / ... */
|
|
47
|
-
interface_kind: string;
|
|
48
|
-
/** interface name (may include a version) */
|
|
49
|
-
interface_name: string;
|
|
50
|
-
/** server-assigned reference UUID (present on read, absent when submitting) */
|
|
51
|
-
reference_id?: string;
|
|
52
|
-
/** For an app-triggered interface (a qog): the triggering app's name. A viewer
|
|
53
|
-
* with the app catalogue (the customer's IDE) resolves it to the app's logo the
|
|
54
|
-
* same way the qogs list does — see `resolveInterfaceImage` on the tags. */
|
|
55
|
-
trigger_app?: string;
|
|
56
|
-
/** A pre-resolved logo/image (data-URI or URL) for the chip, e.g. the trigger
|
|
57
|
-
* app's logo. Travels with the reference so a viewer without the app catalogue
|
|
58
|
-
* (staff triage, the Qonsole card) still shows it. */
|
|
59
|
-
logo?: string;
|
|
60
|
-
}
|
|
61
|
-
/** Default per-kind icon for a referenced interface, with a generic fallback. */
|
|
62
|
-
export declare const defaultInterfaceIcon: (kind: string) => IReqoreIconName;
|
|
63
|
-
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAW5E,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,mBAAmB,GAAG,UAAU,GAAG,QAAQ,CAAC;AACzF,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACnF,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,GAAG,gBAAgB,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjG,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnE,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;AAErD,MAA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
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultInterfaceIcon = exports.isTicketReplyable = exports.REPLYABLE_STATUSES = exports.ticketStatusLabel = exports.TICKET_AUDIT_ACTION_META = exports.TICKET_CATEGORY_META = exports.TICKET_PRIORITY_META = exports.TICKET_STATUS_META = void 0;
|
|
4
|
-
exports.TICKET_STATUS_META = {
|
|
5
|
-
new: { label: 'New', intent: 'info', icon: 'SparklingLine' },
|
|
6
|
-
open: { label: 'Open', intent: 'pending', icon: 'Chat3Line' },
|
|
7
|
-
awaiting_customer: {
|
|
8
|
-
label: 'Awaiting customer',
|
|
9
|
-
customerLabel: 'Awaiting your reply',
|
|
10
|
-
intent: 'warning',
|
|
11
|
-
icon: 'UserReceivedLine',
|
|
12
|
-
},
|
|
13
|
-
resolved: { label: 'Resolved', intent: 'success', icon: 'CheckLine' },
|
|
14
|
-
closed: { label: 'Closed', intent: 'muted', icon: 'CloseCircleLine' },
|
|
15
|
-
};
|
|
16
|
-
exports.TICKET_PRIORITY_META = {
|
|
17
|
-
low: { label: 'Low', intent: 'muted', icon: 'ArrowDownLine' },
|
|
18
|
-
normal: { label: 'Normal', intent: 'info', icon: 'SubtractLine' },
|
|
19
|
-
high: { label: 'High', intent: 'warning', icon: 'ArrowUpLine' },
|
|
20
|
-
urgent: { label: 'Urgent', intent: 'danger', icon: 'AlarmWarningLine' },
|
|
21
|
-
};
|
|
22
|
-
exports.TICKET_CATEGORY_META = {
|
|
23
|
-
bug: { label: 'Bug', intent: 'danger', icon: 'BugLine' },
|
|
24
|
-
question: { label: 'Question', intent: 'info', icon: 'QuestionLine' },
|
|
25
|
-
billing: { label: 'Billing', intent: 'warning', icon: 'BankCardLine' },
|
|
26
|
-
feature: { label: 'Feature request', intent: 'success', icon: 'LightbulbLine' },
|
|
27
|
-
other: { label: 'Other', intent: 'muted', icon: 'MoreLine' },
|
|
28
|
-
};
|
|
29
|
-
/** Staff-only audit trail vocabulary (used by the admin-portal staff surface).
|
|
30
|
-
* These are exactly the actions the backend writes (qorus-api
|
|
31
|
-
* `QorusSaasTicketStore::insertAudit`): a public reply, an internal note, a
|
|
32
|
-
* status change, an assignment, or `updated` (a priority/category change). */
|
|
33
|
-
exports.TICKET_AUDIT_ACTION_META = {
|
|
34
|
-
replied: { label: 'Replied', intent: 'success', icon: 'ReplyLine' },
|
|
35
|
-
noted: { label: 'Internal note', intent: 'info', icon: 'StickyNoteLine' },
|
|
36
|
-
status_changed: { label: 'Status changed', intent: 'warning', icon: 'ExchangeLine' },
|
|
37
|
-
assigned: { label: 'Assigned', intent: 'pending', icon: 'UserFollowLine' },
|
|
38
|
-
updated: { label: 'Updated', intent: 'muted', icon: 'Edit2Line' },
|
|
39
|
-
};
|
|
40
|
-
/** The status label for a given viewer — the customer sees "Awaiting your reply"
|
|
41
|
-
* where staff see "Awaiting customer"; all other values are audience-neutral. */
|
|
42
|
-
var ticketStatusLabel = function (status, viewerRole) {
|
|
43
|
-
var meta = exports.TICKET_STATUS_META[status];
|
|
44
|
-
return viewerRole === 'customer' && meta.customerLabel ? meta.customerLabel : meta.label;
|
|
45
|
-
};
|
|
46
|
-
exports.ticketStatusLabel = ticketStatusLabel;
|
|
47
|
-
/** A reply may be sent while a ticket is in any state except `closed`. */
|
|
48
|
-
exports.REPLYABLE_STATUSES = [
|
|
49
|
-
'new',
|
|
50
|
-
'open',
|
|
51
|
-
'awaiting_customer',
|
|
52
|
-
'resolved',
|
|
53
|
-
];
|
|
54
|
-
/** Whether a ticket can still be replied to (closed ⇒ no). */
|
|
55
|
-
var isTicketReplyable = function (status) { return status !== 'closed'; };
|
|
56
|
-
exports.isTicketReplyable = isTicketReplyable;
|
|
57
|
-
// Built-in per-kind icons for referenced interfaces, kept in step with the
|
|
58
|
-
// qorus-ide interface vocabulary. Used when a consumer doesn't pass its own
|
|
59
|
-
// `resolveInterfaceIcon`, so the staff view and the Qonsole renderer show the
|
|
60
|
-
// same chips as the customer view without each re-declaring the mapping.
|
|
61
|
-
var DEFAULT_INTERFACE_ICONS = {
|
|
62
|
-
workflow: 'GitBranchLine',
|
|
63
|
-
service: 'ServerLine',
|
|
64
|
-
job: 'CalendarLine',
|
|
65
|
-
fsm: 'DashboardLine',
|
|
66
|
-
// qog fallback glyph (used only when there's no trigger-app logo to show)
|
|
67
|
-
qog: 'FlowChart',
|
|
68
|
-
connection: 'Plug2Line',
|
|
69
|
-
mapper: 'MindMap',
|
|
70
|
-
class: 'CodeSLine',
|
|
71
|
-
'value-map': 'BringToFront',
|
|
72
|
-
'ai-collection': 'FileMarkedLine',
|
|
73
|
-
'ai-endpoint': 'RobotLine',
|
|
74
|
-
'ai-guardrail': 'ShieldLine',
|
|
75
|
-
};
|
|
76
|
-
/** Default per-kind icon for a referenced interface, with a generic fallback. */
|
|
77
|
-
var defaultInterfaceIcon = function (kind) { var _a; return (_a = DEFAULT_INTERFACE_ICONS[kind]) !== null && _a !== void 0 ? _a : 'CodeBoxLine'; };
|
|
78
|
-
exports.defaultInterfaceIcon = defaultInterfaceIcon;
|
|
79
|
-
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/supportTicket/meta.ts"],"names":[],"mappings":";;;AAgCa,QAAA,kBAAkB,GAA2C;IACxE,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE;IAC5D,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE;IAC7D,iBAAiB,EAAE;QACjB,KAAK,EAAE,mBAAmB;QAC1B,aAAa,EAAE,qBAAqB;QACpC,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,kBAAkB;KACzB;IACD,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,E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AE,WAAW;IACvB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,cAAc;IAC3B,eAAe,EAAE,gBAAgB;IACjC,aAAa,EAAE,WAAW;IAC1B,cAAc,EAAE,YAAY;CAC7B,CAAC;AAEF,iFAAiF;AAC1E,IAAM,oBAAoB,GAAG,UAAC,IAAY,YAC/C,OAAA,MAAA,uBAAuB,CAAC,IAAI,CAAC,mCAAI,aAAa,CAAA,EAAA,CAAC;AADpC,QAAA,oBAAoB,wBACgB"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
|
|
2
|
-
import { IInterfaceReference, TTicketViewerRole } from '../supportTicket/meta';
|
|
3
|
-
import type { ITicketThreadAttachment, ITicketThreadMessage } from '../ticketThread/TicketThread';
|
|
4
|
-
/** Attachment metadata as returned by the list endpoint — carries the provenance
|
|
5
|
-
* (uploader + timestamp + source message) the message-embedded metadata omits. */
|
|
6
|
-
export interface ITicketReferenceAttachment extends ITicketThreadAttachment {
|
|
7
|
-
/** the reply this file was attached to; null/absent = ticket-level */
|
|
8
|
-
message_id?: string | null;
|
|
9
|
-
/** the uploader, resolved + masked like the thread's message author (a staff
|
|
10
|
-
* uploader reads as "Qorus Support" on the customer plane, never the raw identity) */
|
|
11
|
-
uploaded_by?: string;
|
|
12
|
-
/** the kind of party that uploaded the file — lets the viewer label it */
|
|
13
|
-
uploader_type?: 'customer' | 'staff';
|
|
14
|
-
/** ISO timestamp the file was attached */
|
|
15
|
-
created?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ITicketReferencesProps {
|
|
18
|
-
/** ticket-level interface references (from `ticket.referenced_interfaces`) */
|
|
19
|
-
references?: IInterfaceReference[];
|
|
20
|
-
/** the thread — source of message-level references and, as a fallback, attachments */
|
|
21
|
-
messages?: ITicketThreadMessage[];
|
|
22
|
-
/** the ticket's attachments from the list endpoint; preferred over the message-embedded
|
|
23
|
-
* ones because it carries provenance and any ticket-level files. Falls back to `messages`. */
|
|
24
|
-
attachments?: ITicketReferenceAttachment[];
|
|
25
|
-
viewerRole?: TTicketViewerRole;
|
|
26
|
-
/** fetch an attachment's bytes as an object URL, for inline image preview + the lightbox.
|
|
27
|
-
* Omitted ⇒ screenshots show as download tiles instead of thumbnails. */
|
|
28
|
-
fetchAttachmentUrl?: (attachmentId: string) => Promise<string>;
|
|
29
|
-
/** trigger a browser download of an attachment */
|
|
30
|
-
onDownloadAttachment?: (attachmentId: string, filename: string) => void;
|
|
31
|
-
/** open a referenced interface; reference chips are static (informational) when omitted */
|
|
32
|
-
onInterfaceClick?: (reference: IInterfaceReference) => void;
|
|
33
|
-
/** Reveal the message a reference or file came from, in the conversation.
|
|
34
|
-
* Omitted ⇒ the action is not offered. It is also omitted per-row for anything filed
|
|
35
|
-
* against the ticket itself rather than a reply, which has no message to reveal. */
|
|
36
|
-
onShowInChat?: (messageId: string) => void;
|
|
37
|
-
/** resolve a per-kind icon for a referenced interface (the IDE passes its own vocabulary) */
|
|
38
|
-
resolveInterfaceIcon?: (kind: string) => IReqoreIconName;
|
|
39
|
-
loading?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* A reference plus where it was cited.
|
|
43
|
-
*
|
|
44
|
-
* `message_id` is absent for a ticket-level reference — those are filed against the
|
|
45
|
-
* ticket itself (`message_id IS NULL` server-side), so there is no message to reveal
|
|
46
|
-
* and "show in chat" must not be offered for them.
|
|
47
|
-
*/
|
|
48
|
-
export interface IResolvedInterfaceReference extends IInterfaceReference {
|
|
49
|
-
message_id?: string;
|
|
50
|
-
}
|
|
51
|
-
export declare const TicketReferences: ({ references, messages, attachments, viewerRole, fetchAttachmentUrl, onDownloadAttachment, onInterfaceClick, onShowInChat, resolveInterfaceIcon, loading, }: ITicketReferencesProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
//# sourceMappingURL=TicketReferences.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketReferences.d.ts","sourceRoot":"","sources":["../../../src/components/ticketReferences/TicketReferences.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAS5E,OAAO,EAEL,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAelG;mFACmF;AACnF,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;IACzE,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;2FACuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACrC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC;mGAC+F;IAC/F,WAAW,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;8EAC0E;IAC1E,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/D,kDAAkD;IAClD,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D;;yFAEqF;IACrF,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,6FAA6F;IAC7F,oB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