@qoretechnologies/reqraft 0.10.13-pr.74.gccefa54 → 0.10.13

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.
Files changed (125) hide show
  1. package/.claude/CLAUDE.md +8 -11
  2. package/dist/components/form/engine/FormEngine.d.ts +1 -1
  3. package/dist/helpers/common.d.ts +0 -5
  4. package/dist/helpers/common.d.ts.map +1 -1
  5. package/dist/helpers/common.js +1 -20
  6. package/dist/helpers/common.js.map +1 -1
  7. package/dist/index.d.ts +0 -5
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1 -7
  10. package/dist/index.js.map +1 -1
  11. package/dist/providers/StorageProvider.d.ts +13 -0
  12. package/dist/providers/StorageProvider.d.ts.map +1 -1
  13. package/dist/providers/StorageProvider.js +29 -5
  14. package/dist/providers/StorageProvider.js.map +1 -1
  15. package/package.json +3 -3
  16. package/src/helpers/common.ts +0 -19
  17. package/src/hooks/useStorage/useStorage.stories.tsx +52 -0
  18. package/src/index.tsx +0 -5
  19. package/src/providers/StorageProvider.tsx +30 -4
  20. package/dist/components/composer/Composer.d.ts +0 -108
  21. package/dist/components/composer/Composer.d.ts.map +0 -1
  22. package/dist/components/composer/Composer.js +0 -238
  23. package/dist/components/composer/Composer.js.map +0 -1
  24. package/dist/components/composer/helpers.d.ts +0 -21
  25. package/dist/components/composer/helpers.d.ts.map +0 -1
  26. package/dist/components/composer/helpers.js +0 -75
  27. package/dist/components/composer/helpers.js.map +0 -1
  28. package/dist/components/composer/index.d.ts +0 -3
  29. package/dist/components/composer/index.d.ts.map +0 -1
  30. package/dist/components/composer/index.js +0 -19
  31. package/dist/components/composer/index.js.map +0 -1
  32. package/dist/components/imageLightbox/ImageLightbox.d.ts +0 -17
  33. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +0 -1
  34. package/dist/components/imageLightbox/ImageLightbox.js +0 -129
  35. package/dist/components/imageLightbox/ImageLightbox.js.map +0 -1
  36. package/dist/components/imageLightbox/index.d.ts +0 -2
  37. package/dist/components/imageLightbox/index.d.ts.map +0 -1
  38. package/dist/components/imageLightbox/index.js +0 -18
  39. package/dist/components/imageLightbox/index.js.map +0 -1
  40. package/dist/components/supportTicket/AttachmentChips.d.ts +0 -10
  41. package/dist/components/supportTicket/AttachmentChips.d.ts.map +0 -1
  42. package/dist/components/supportTicket/AttachmentChips.js +0 -119
  43. package/dist/components/supportTicket/AttachmentChips.js.map +0 -1
  44. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +0 -35
  45. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +0 -1
  46. package/dist/components/supportTicket/InterfaceReferenceTags.js +0 -31
  47. package/dist/components/supportTicket/InterfaceReferenceTags.js.map +0 -1
  48. package/dist/components/supportTicket/ReferencePicker.d.ts +0 -41
  49. package/dist/components/supportTicket/ReferencePicker.d.ts.map +0 -1
  50. package/dist/components/supportTicket/ReferencePicker.js +0 -86
  51. package/dist/components/supportTicket/ReferencePicker.js.map +0 -1
  52. package/dist/components/supportTicket/TicketHeader.d.ts +0 -86
  53. package/dist/components/supportTicket/TicketHeader.d.ts.map +0 -1
  54. package/dist/components/supportTicket/TicketHeader.js +0 -149
  55. package/dist/components/supportTicket/TicketHeader.js.map +0 -1
  56. package/dist/components/supportTicket/TicketMetaTags.d.ts +0 -32
  57. package/dist/components/supportTicket/TicketMetaTags.d.ts.map +0 -1
  58. package/dist/components/supportTicket/TicketMetaTags.js +0 -21
  59. package/dist/components/supportTicket/TicketMetaTags.js.map +0 -1
  60. package/dist/components/supportTicket/TicketReplyBox.d.ts +0 -63
  61. package/dist/components/supportTicket/TicketReplyBox.d.ts.map +0 -1
  62. package/dist/components/supportTicket/TicketReplyBox.js +0 -115
  63. package/dist/components/supportTicket/TicketReplyBox.js.map +0 -1
  64. package/dist/components/supportTicket/fileToAttachment.d.ts +0 -9
  65. package/dist/components/supportTicket/fileToAttachment.d.ts.map +0 -1
  66. package/dist/components/supportTicket/fileToAttachment.js +0 -28
  67. package/dist/components/supportTicket/fileToAttachment.js.map +0 -1
  68. package/dist/components/supportTicket/index.d.ts +0 -9
  69. package/dist/components/supportTicket/index.d.ts.map +0 -1
  70. package/dist/components/supportTicket/index.js +0 -25
  71. package/dist/components/supportTicket/index.js.map +0 -1
  72. package/dist/components/supportTicket/meta.d.ts +0 -63
  73. package/dist/components/supportTicket/meta.d.ts.map +0 -1
  74. package/dist/components/supportTicket/meta.js +0 -79
  75. package/dist/components/supportTicket/meta.js.map +0 -1
  76. package/dist/components/ticketReferences/TicketReferences.d.ts +0 -52
  77. package/dist/components/ticketReferences/TicketReferences.d.ts.map +0 -1
  78. package/dist/components/ticketReferences/TicketReferences.js +0 -453
  79. package/dist/components/ticketReferences/TicketReferences.js.map +0 -1
  80. package/dist/components/ticketReferences/index.d.ts +0 -3
  81. package/dist/components/ticketReferences/index.d.ts.map +0 -1
  82. package/dist/components/ticketReferences/index.js +0 -6
  83. package/dist/components/ticketReferences/index.js.map +0 -1
  84. package/dist/components/ticketThread/TicketThread.d.ts +0 -52
  85. package/dist/components/ticketThread/TicketThread.d.ts.map +0 -1
  86. package/dist/components/ticketThread/TicketThread.js +0 -248
  87. package/dist/components/ticketThread/TicketThread.js.map +0 -1
  88. package/dist/components/ticketThread/index.d.ts +0 -3
  89. package/dist/components/ticketThread/index.d.ts.map +0 -1
  90. package/dist/components/ticketThread/index.js +0 -7
  91. package/dist/components/ticketThread/index.js.map +0 -1
  92. package/dist/helpers/scrollbar.d.ts +0 -2
  93. package/dist/helpers/scrollbar.d.ts.map +0 -1
  94. package/dist/helpers/scrollbar.js +0 -25
  95. package/dist/helpers/scrollbar.js.map +0 -1
  96. package/src/components/composer/Composer.stories.tsx +0 -238
  97. package/src/components/composer/Composer.tsx +0 -545
  98. package/src/components/composer/helpers.ts +0 -74
  99. package/src/components/composer/index.ts +0 -2
  100. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -156
  101. package/src/components/imageLightbox/ImageLightbox.tsx +0 -169
  102. package/src/components/imageLightbox/index.ts +0 -1
  103. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -122
  104. package/src/components/supportTicket/AttachmentChips.tsx +0 -142
  105. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -134
  106. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -85
  107. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -296
  108. package/src/components/supportTicket/ReferencePicker.tsx +0 -237
  109. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -122
  110. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  111. package/src/components/supportTicket/TicketHeader.tsx +0 -247
  112. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  113. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  114. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -355
  115. package/src/components/supportTicket/TicketReplyBox.tsx +0 -146
  116. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  117. package/src/components/supportTicket/index.ts +0 -8
  118. package/src/components/supportTicket/meta.ts +0 -145
  119. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -301
  120. package/src/components/ticketReferences/TicketReferences.tsx +0 -899
  121. package/src/components/ticketReferences/index.ts +0 -2
  122. package/src/components/ticketThread/TicketThread.stories.tsx +0 -751
  123. package/src/components/ticketThread/TicketThread.tsx +0 -650
  124. package/src/components/ticketThread/index.ts +0 -6
  125. package/src/helpers/scrollbar.ts +0 -32
@@ -1,86 +0,0 @@
1
- import { TReqoreBadge } from '@qoretechnologies/reqore/dist/components/Button';
2
- import { TReqoreEffectColor } from '@qoretechnologies/reqore/dist/components/Effect';
3
- import { ReactNode } from 'react';
4
- /**
5
- * The height a tab item needs to sit on the rail's rhythm.
6
- *
7
- * Exported because the tab strip below the header has to match it and there is no
8
- * Reqore prop for a tab's height: `size` sets it, and `padded` governs the items'
9
- * horizontal edges, not the strip's. The height must go on the ITEM, never on the
10
- * list — both of a tab's own surfaces are keyed to the item's box (the active marker
11
- * is an inset shadow on its bottom edge, the hover wash fills it), so padding the
12
- * list leaves the item floating in a taller strip: the marker lifts off the hairline
13
- * and reads as a doubled line, and the wash reads as a floating box.
14
- *
15
- * This belongs in Reqore as a tab-height option rather than as a CSS rule each
16
- * consumer re-applies. Until it exists, `TicketTabsFrame` is the single copy.
17
- */
18
- export declare const TICKET_RAIL_ROW_HEIGHT: number;
19
- /** The ticket number, set in mono so it reads as an identifier, not a heading. Exported
20
- * so the staff drawer (which puts the number in the drawer's own title, not the rail)
21
- * renders it identically rather than re-declaring the same span. */
22
- export declare const TicketMonoId: any;
23
- /**
24
- * A person: initials disc, then the name, on one baseline.
25
- *
26
- * One wrapper for every person in the rail — the assignee, the customer, the author.
27
- * They were visibly different before: one went through a nested control group inside
28
- * a button (its own gap and alignment) while another used a plain flex row, so the
29
- * two drifted apart every time either was touched. The only difference left is that
30
- * some of them are pressable.
31
- */
32
- export declare const TicketPersonValue: any;
33
- /** Initials disc for a person. */
34
- export declare const TicketAvatar: any;
35
- /**
36
- * Up to two initials from a handle ("nick.m@acme.io" → "NM"). Falls back to "?" so a
37
- * handle made entirely of separators still renders a disc rather than an empty circle.
38
- */
39
- export declare const ticketInitials: (name: string) => string;
40
- /**
41
- * Wraps a ticket surface's tab strip so it joins the header rail's rhythm.
42
- *
43
- * See `TICKET_RAIL_ROW_HEIGHT` for why the height goes on the item and not the list.
44
- */
45
- export declare const TicketTabsFrame: any;
46
- export declare const TICKET_TAB_ALIGN: {
47
- readonly textAlign: "center";
48
- readonly iconsAlign: "center";
49
- };
50
- /**
51
- * A tab's count pill. The active tab's carries the accent; the rest stay neutral, so
52
- * the strip reads as one selected item rather than several competing chips. Returns
53
- * `undefined` for an empty count — a tab with nothing in it shows no badge at all.
54
- */
55
- export declare const ticketTabBadge: (count: number, isActive: boolean, accent?: {
56
- color: TReqoreEffectColor;
57
- glow: TReqoreEffectColor;
58
- }) => TReqoreBadge | undefined;
59
- export interface ITicketHeaderProperty {
60
- label: string;
61
- /** plain text, a chip row, or a control — the row aligns all three the same way */
62
- value: ReactNode;
63
- /** Drop the row. Lets a caller keep one list and vary it by viewer role, rather
64
- * than building a different array per branch. Defaults to shown. */
65
- when?: boolean;
66
- }
67
- export interface ITicketHeaderProps {
68
- /** Omit when the surrounding dialog already carries the subject — the staff drawer
69
- * puts it in the drawer's own label, the customer's modal puts it here. */
70
- subject?: string;
71
- /** the ticket's number, e.g. `#1001` */
72
- reference?: string;
73
- properties: ITicketHeaderProperty[];
74
- /** padding around the rail, matching the surface's own pane padding */
75
- padding?: number;
76
- className?: string;
77
- }
78
- export declare const TicketHeader: ({ subject, reference, properties, padding, className, }: ITicketHeaderProps) => import("react/jsx-runtime").JSX.Element;
79
- /** A rail value that is plain text rather than a control — sized to match the rest. */
80
- export declare const TicketHeaderText: ({ children, muted, tooltip, }: {
81
- children: ReactNode;
82
- /** for an absent value ("Unassigned", "None") */
83
- muted?: boolean;
84
- tooltip?: string;
85
- }) => import("react/jsx-runtime").JSX.Element;
86
- //# sourceMappingURL=TicketHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TicketHeader.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketHeader.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAsBlC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,QAA0C,CAAC;AAE9E;;qEAEqE;AACrE,eAAO,MAAM,YAAY,KAIxB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,KAY7B,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,YAAY,KAaxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,MAM1B,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,eAAe,KAc3B,CAAC;AAWF,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,cAAc,UAClB,MAAM,YACH,OAAO,WACR;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,KAC/D,YAAY,GAAG,SAQjB,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,SAAS,CAAC;IACjB;yEACqE;IACrE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC;gFAC4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,4DAMtB,kBAAkB,4CA2CpB,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,kCAI1B;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,4CAIA,CAAC"}
@@ -1,149 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.TicketHeaderText = exports.TicketHeader = exports.ticketTabBadge = exports.TICKET_TAB_ALIGN = exports.TicketTabsFrame = exports.ticketInitials = exports.TicketAvatar = exports.TicketPersonValue = exports.TicketMonoId = exports.TICKET_RAIL_ROW_HEIGHT = void 0;
11
- var jsx_runtime_1 = require("react/jsx-runtime");
12
- var reqore_1 = require("@qoretechnologies/reqore");
13
- var sizes_1 = require("@qoretechnologies/reqore/dist/constants/sizes");
14
- var styled_components_1 = __importDefault(require("styled-components"));
15
- /*
16
- * The header every ticket surface puts above its tabs: the subject, the ticket's
17
- * number, and a rail of labelled properties.
18
- *
19
- * Shared because it had already drifted. The staff drawer's header was redesigned
20
- * into this definition-list rail while the customer's kept a heading, a tag row and
21
- * a muted meta line — the same information, two layouts, and no way to change one
22
- * without hand-copying it into the other. What each surface shows differs (staff
23
- * edit the assignee; a customer reads who opened the ticket), so the rows are the
24
- * caller's; the frame, the rhythm and the alignment rules are not.
25
- */
26
- /** How wide the label column is. Fits "References" — the longest label in use. */
27
- var LABEL_WIDTH = '84px';
28
- /** Everything in the rail runs at one scale. */
29
- var RAIL_SIZE = 'small';
30
- /** Breathing room above and below each row's control — the rail's vertical rhythm. */
31
- var ROW_PADDING = 4;
32
- /**
33
- * The height a tab item needs to sit on the rail's rhythm.
34
- *
35
- * Exported because the tab strip below the header has to match it and there is no
36
- * Reqore prop for a tab's height: `size` sets it, and `padded` governs the items'
37
- * horizontal edges, not the strip's. The height must go on the ITEM, never on the
38
- * list — both of a tab's own surfaces are keyed to the item's box (the active marker
39
- * is an inset shadow on its bottom edge, the hover wash fills it), so padding the
40
- * list leaves the item floating in a taller strip: the marker lifts off the hairline
41
- * and reads as a doubled line, and the wash reads as a floating box.
42
- *
43
- * This belongs in Reqore as a tab-height option rather than as a CSS rule each
44
- * consumer re-applies. Until it exists, `TicketTabsFrame` is the single copy.
45
- */
46
- exports.TICKET_RAIL_ROW_HEIGHT = sizes_1.SIZE_TO_PX[RAIL_SIZE] + ROW_PADDING * 2;
47
- /** The ticket number, set in mono so it reads as an identifier, not a heading. Exported
48
- * so the staff drawer (which puts the number in the drawer's own title, not the rail)
49
- * renders it identically rather than re-declaring the same span. */
50
- exports.TicketMonoId = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;\n font-size: 11.5px;\n color: rgba(255, 255, 255, 0.45);\n"], ["\n font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;\n font-size: 11.5px;\n color: rgba(255, 255, 255, 0.45);\n"])));
51
- /**
52
- * A person: initials disc, then the name, on one baseline.
53
- *
54
- * One wrapper for every person in the rail — the assignee, the customer, the author.
55
- * They were visibly different before: one went through a nested control group inside
56
- * a button (its own gap and alignment) while another used a plain flex row, so the
57
- * two drifted apart every time either was touched. The only difference left is that
58
- * some of them are pressable.
59
- */
60
- exports.TicketPersonValue = styled_components_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n\n /* the name yields before the disc does */\n > span:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n\n /* the name yields before the disc does */\n > span:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"])));
61
- /** Initials disc for a person. */
62
- exports.TicketAvatar = styled_components_1.default.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 18px;\n height: 18px;\n border-radius: 999px;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 8px;\n font-weight: 650;\n color: #fff;\n background: linear-gradient(150deg, #8a4fe6, #2c1140);\n border: 1px solid rgba(255, 255, 255, 0.14);\n"], ["\n width: 18px;\n height: 18px;\n border-radius: 999px;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 8px;\n font-weight: 650;\n color: #fff;\n background: linear-gradient(150deg, #8a4fe6, #2c1140);\n border: 1px solid rgba(255, 255, 255, 0.14);\n"])));
63
- /**
64
- * Up to two initials from a handle ("nick.m@acme.io" → "NM"). Falls back to "?" so a
65
- * handle made entirely of separators still renders a disc rather than an empty circle.
66
- */
67
- var ticketInitials = function (name) {
68
- return name
69
- .split(/[\s._@-]+/)
70
- .filter(Boolean)
71
- .slice(0, 2)
72
- .map(function (part) { var _a, _b; return (_b = (_a = part[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : ''; })
73
- .join('') || '?';
74
- };
75
- exports.ticketInitials = ticketInitials;
76
- /**
77
- * Wraps a ticket surface's tab strip so it joins the header rail's rhythm.
78
- *
79
- * See `TICKET_RAIL_ROW_HEIGHT` for why the height goes on the item and not the list.
80
- */
81
- exports.TicketTabsFrame = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n\n .reqore-tabs-list {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .reqore-tabs-list-item {\n min-height: ", "px;\n }\n"], ["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n\n .reqore-tabs-list {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .reqore-tabs-list-item {\n min-height: ", "px;\n }\n"])), exports.TICKET_RAIL_ROW_HEIGHT);
82
- /*
83
- * Centre each tab's icon + label + count.
84
- *
85
- * With `fill`, every tab is far wider than its content, and ReqoreButton defaults
86
- * `textAlign` to 'left' for non-square buttons — which also hands the leading icon a
87
- * `margin-right: auto`, pinning the group against the left edge of its tab. Setting
88
- * both alignments centres the group as a unit, so the strip reads as evenly spaced
89
- * segments rather than left-huddled labels.
90
- */
91
- exports.TICKET_TAB_ALIGN = {
92
- textAlign: 'center',
93
- iconsAlign: 'center',
94
- };
95
- /**
96
- * A tab's count pill. The active tab's carries the accent; the rest stay neutral, so
97
- * the strip reads as one selected item rather than several competing chips. Returns
98
- * `undefined` for an empty count — a tab with nothing in it shows no badge at all.
99
- */
100
- var ticketTabBadge = function (count, isActive, accent) {
101
- if (!count) {
102
- return undefined;
103
- }
104
- if (!isActive || !accent) {
105
- return count;
106
- }
107
- return { label: count, color: accent.glow, effect: { color: accent.color } };
108
- };
109
- exports.ticketTabBadge = ticketTabBadge;
110
- var TicketHeader = function (_a) {
111
- var subject = _a.subject, reference = _a.reference, properties = _a.properties, _b = _a.padding, padding = _b === void 0 ? 14 : _b, className = _a.className;
112
- return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreDescriptionList
113
- /* The rail IS a description list — Reqore's, not a private copy. `contentSize`
114
- is what makes it tabular with controls in it: it reserves a control's height on
115
- every row and insets the values that aren't controls, so a dropdown row and a
116
- plain-text row share both a height and a left edge. */
117
- , {
118
- /* The rail IS a description list — Reqore's, not a private copy. `contentSize`
119
- is what makes it tabular with controls in it: it reserves a control's height on
120
- every row and insets the values that aren't controls, so a dropdown row and a
121
- plain-text row share both a height and a left edge. */
122
- contentSize: RAIL_SIZE, size: RAIL_SIZE,
123
- /* Labels are reference furniture, quieter and smaller than the values they name —
124
- and "References" has to fit LABEL_WIDTH on one line at this scale. */
125
- labelTextSize: 'tiny',
126
- /* The rail's rhythm, which the tab strip below is measured against — see
127
- TICKET_RAIL_ROW_HEIGHT. Reqore's comfortable default would make the rows 52px
128
- and the strip would no longer line up with them. */
129
- rowPadding: 'tiny', labelWidth: LABEL_WIDTH, uppercaseLabels: true, flat: true, transparent: true, padded: false, contentStyle: { padding: "".concat(padding - 4, "px ").concat(padding, "px ").concat(padding - 6, "px") }, className: "".concat(className || '', " ticket-header"), label: subject ? (
130
- /* The label is the panel's heading, which `padded={false}` leaves flush against
131
- the edge — `contentStyle` only pads the rows. Pad the subject here so it lines
132
- up with the values below it, using the same horizontal `padding` as the rows. */
133
- (0, jsx_runtime_1.jsx)("div", { style: { padding: "".concat(padding, "px ").concat(padding, "px ").concat(padding - 8, "px"), minWidth: 0 }, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { verticalAlign: 'center', gapSize: 'small', children: [(0, jsx_runtime_1.jsx)("span", { children: subject }), reference ? (0, jsx_runtime_1.jsx)(exports.TicketMonoId, { children: reference }) : null] }) })) : undefined, items: properties
134
- .filter(function (property) { return property.when !== false; })
135
- .map(function (property) { return ({
136
- key: property.label,
137
- label: property.label,
138
- content: property.value,
139
- }); }) }));
140
- };
141
- exports.TicketHeader = TicketHeader;
142
- /** A rail value that is plain text rather than a control — sized to match the rest. */
143
- var TicketHeaderText = function (_a) {
144
- var children = _a.children, muted = _a.muted, tooltip = _a.tooltip;
145
- return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreSpan, { size: RAIL_SIZE, tooltip: tooltip, effect: muted ? { opacity: 0.5 } : undefined, children: children }));
146
- };
147
- exports.TicketHeaderText = TicketHeaderText;
148
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
149
- //# sourceMappingURL=TicketHeader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TicketHeader.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAIkC;AAGlC,uEAA2E;AAE3E,wEAAuC;AAEvC;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,IAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,gDAAgD;AAChD,IAAM,SAAS,GAAG,OAAgB,CAAC;AACnC,sFAAsF;AACtF,IAAM,WAAW,GAAG,CAAC,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACU,QAAA,sBAAsB,GAAG,kBAAU,CAAC,SAAS,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC;AAE9E;;qEAEqE;AACxD,QAAA,YAAY,GAAG,2BAAM,CAAC,IAAI,+LAAA,4HAItC,KAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,iBAAiB,GAAG,2BAAM,CAAC,IAAI,iTAAA,8OAY3C,KAAC;AAEF,kCAAkC;AACrB,QAAA,YAAY,GAAG,2BAAM,CAAC,I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,GAAG,UAAC,EAShC;QARC,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,OAAO,aAAA;IAMH,OAAA,CACJ,uBAAC,mBAAU,IAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,YACxF,QAAQ,GACE,CACd;AAJK,CAIL,CAAC;AAbW,QAAA,gBAAgB,oBAa3B"}
@@ -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,CAAC;AAE3C,gFAAgF;AAChF,KAAK,gBAAgB,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAEpF,MAAM,WAAW,oBAAoB;IACnC;0DACsD;IACtD,MAAM,EAAE,CACN,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAA;KAAE,KAC9D,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9D,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;8DAC0D;IAC1D,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC;IACvD;;8CAE0C;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC;IACrD;8DAC0D;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;qEAEiE;IACjE,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,gBAAgB,CAAC;IAC1E;uCACmC;IACnC,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;yEACqE;IACrE,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iDAAsF;AACtF,uDAAiF;AAkDjF;;;;;;;;;;GAUG;AACI,IAAM,cAAc,GAAG,UAAC,EAgBR;QAfrB,MAAM,YAAA,EACN,wBAA0C,EAA1C,gBAAgB,mBAAG,mCAAuB,KAAA,EAC1C,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,sBAAyF,EAAzF,cAAc,mBAAG,wEAAwE,KAAA,EACzF,mBAA8B,EAA9B,WAAW,mBAAG,gBAAgB,KAAA,EAC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,wBAAY;oBAC5B,qBAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAA;;oBAA9C,KAAA,SAA8C,CAAA;;;oBAC9C,KAAA,SAAS,CAAA;;;oBAFP,WAAW,KAEJ;oBACb,qBAAM,MAAM,CAAC,IAAI,EAAE,EAAE,QAAQ,UAAA,EAAE,WAAW,aAAA,EAAE,CAAC,EAAA;;oBAA7C,SAA6C,CAAC;;;;SAC/C,CAAC;IAEF,OAAO,CACL,uBAAC,mBAAQ,IACP,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,mBAAmB,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,EAC1B,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAC,kBAAkB,EACpC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;AACJ,CAAC,CAAC;AAjFW,QAAA,cAAc,kBAiFzB"}
@@ -1,9 +0,0 @@
1
- import { IAttachmentUpload } from './meta';
2
- /**
3
- * Read a picked `File` into the inline base64 upload shape the support API expects
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"}