@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.
Files changed (138) hide show
  1. package/.claude/CLAUDE.md +8 -11
  2. package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
  3. package/dist/components/form/engine/CompactToolbar.js +2 -2
  4. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  5. package/dist/components/form/engine/FormEngine.d.ts +15 -3
  6. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  7. package/dist/components/form/engine/FormEngine.js +15 -20
  8. package/dist/components/form/engine/FormEngine.js.map +1 -1
  9. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  10. package/dist/components/form/engine/compactRowStyles.js +3 -8
  11. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  12. package/dist/helpers/common.d.ts +0 -5
  13. package/dist/helpers/common.d.ts.map +1 -1
  14. package/dist/helpers/common.js +1 -20
  15. package/dist/helpers/common.js.map +1 -1
  16. package/dist/index.d.ts +0 -5
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -7
  19. package/dist/index.js.map +1 -1
  20. package/dist/providers/StorageProvider.d.ts +13 -0
  21. package/dist/providers/StorageProvider.d.ts.map +1 -1
  22. package/dist/providers/StorageProvider.js +29 -5
  23. package/dist/providers/StorageProvider.js.map +1 -1
  24. package/package.json +2 -2
  25. package/src/components/form/engine/CompactToolbar.tsx +117 -110
  26. package/src/components/form/engine/FormEngine.stories.tsx +27 -0
  27. package/src/components/form/engine/FormEngine.tsx +44 -25
  28. package/src/components/form/engine/compactRowStyles.ts +3 -5
  29. package/src/helpers/common.ts +0 -19
  30. package/src/hooks/useStorage/useStorage.stories.tsx +52 -0
  31. package/src/index.tsx +0 -5
  32. package/src/providers/StorageProvider.tsx +30 -4
  33. package/dist/components/composer/Composer.d.ts +0 -108
  34. package/dist/components/composer/Composer.d.ts.map +0 -1
  35. package/dist/components/composer/Composer.js +0 -238
  36. package/dist/components/composer/Composer.js.map +0 -1
  37. package/dist/components/composer/helpers.d.ts +0 -21
  38. package/dist/components/composer/helpers.d.ts.map +0 -1
  39. package/dist/components/composer/helpers.js +0 -75
  40. package/dist/components/composer/helpers.js.map +0 -1
  41. package/dist/components/composer/index.d.ts +0 -3
  42. package/dist/components/composer/index.d.ts.map +0 -1
  43. package/dist/components/composer/index.js +0 -19
  44. package/dist/components/composer/index.js.map +0 -1
  45. package/dist/components/imageLightbox/ImageLightbox.d.ts +0 -17
  46. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +0 -1
  47. package/dist/components/imageLightbox/ImageLightbox.js +0 -129
  48. package/dist/components/imageLightbox/ImageLightbox.js.map +0 -1
  49. package/dist/components/imageLightbox/index.d.ts +0 -2
  50. package/dist/components/imageLightbox/index.d.ts.map +0 -1
  51. package/dist/components/imageLightbox/index.js +0 -18
  52. package/dist/components/imageLightbox/index.js.map +0 -1
  53. package/dist/components/supportTicket/AttachmentChips.d.ts +0 -10
  54. package/dist/components/supportTicket/AttachmentChips.d.ts.map +0 -1
  55. package/dist/components/supportTicket/AttachmentChips.js +0 -119
  56. package/dist/components/supportTicket/AttachmentChips.js.map +0 -1
  57. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +0 -35
  58. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +0 -1
  59. package/dist/components/supportTicket/InterfaceReferenceTags.js +0 -31
  60. package/dist/components/supportTicket/InterfaceReferenceTags.js.map +0 -1
  61. package/dist/components/supportTicket/ReferencePicker.d.ts +0 -41
  62. package/dist/components/supportTicket/ReferencePicker.d.ts.map +0 -1
  63. package/dist/components/supportTicket/ReferencePicker.js +0 -86
  64. package/dist/components/supportTicket/ReferencePicker.js.map +0 -1
  65. package/dist/components/supportTicket/TicketHeader.d.ts +0 -86
  66. package/dist/components/supportTicket/TicketHeader.d.ts.map +0 -1
  67. package/dist/components/supportTicket/TicketHeader.js +0 -149
  68. package/dist/components/supportTicket/TicketHeader.js.map +0 -1
  69. package/dist/components/supportTicket/TicketMetaTags.d.ts +0 -32
  70. package/dist/components/supportTicket/TicketMetaTags.d.ts.map +0 -1
  71. package/dist/components/supportTicket/TicketMetaTags.js +0 -21
  72. package/dist/components/supportTicket/TicketMetaTags.js.map +0 -1
  73. package/dist/components/supportTicket/TicketReplyBox.d.ts +0 -63
  74. package/dist/components/supportTicket/TicketReplyBox.d.ts.map +0 -1
  75. package/dist/components/supportTicket/TicketReplyBox.js +0 -115
  76. package/dist/components/supportTicket/TicketReplyBox.js.map +0 -1
  77. package/dist/components/supportTicket/fileToAttachment.d.ts +0 -9
  78. package/dist/components/supportTicket/fileToAttachment.d.ts.map +0 -1
  79. package/dist/components/supportTicket/fileToAttachment.js +0 -28
  80. package/dist/components/supportTicket/fileToAttachment.js.map +0 -1
  81. package/dist/components/supportTicket/index.d.ts +0 -9
  82. package/dist/components/supportTicket/index.d.ts.map +0 -1
  83. package/dist/components/supportTicket/index.js +0 -25
  84. package/dist/components/supportTicket/index.js.map +0 -1
  85. package/dist/components/supportTicket/meta.d.ts +0 -63
  86. package/dist/components/supportTicket/meta.d.ts.map +0 -1
  87. package/dist/components/supportTicket/meta.js +0 -79
  88. package/dist/components/supportTicket/meta.js.map +0 -1
  89. package/dist/components/ticketReferences/TicketReferences.d.ts +0 -52
  90. package/dist/components/ticketReferences/TicketReferences.d.ts.map +0 -1
  91. package/dist/components/ticketReferences/TicketReferences.js +0 -453
  92. package/dist/components/ticketReferences/TicketReferences.js.map +0 -1
  93. package/dist/components/ticketReferences/index.d.ts +0 -3
  94. package/dist/components/ticketReferences/index.d.ts.map +0 -1
  95. package/dist/components/ticketReferences/index.js +0 -6
  96. package/dist/components/ticketReferences/index.js.map +0 -1
  97. package/dist/components/ticketThread/TicketThread.d.ts +0 -52
  98. package/dist/components/ticketThread/TicketThread.d.ts.map +0 -1
  99. package/dist/components/ticketThread/TicketThread.js +0 -248
  100. package/dist/components/ticketThread/TicketThread.js.map +0 -1
  101. package/dist/components/ticketThread/index.d.ts +0 -3
  102. package/dist/components/ticketThread/index.d.ts.map +0 -1
  103. package/dist/components/ticketThread/index.js +0 -7
  104. package/dist/components/ticketThread/index.js.map +0 -1
  105. package/dist/helpers/scrollbar.d.ts +0 -2
  106. package/dist/helpers/scrollbar.d.ts.map +0 -1
  107. package/dist/helpers/scrollbar.js +0 -25
  108. package/dist/helpers/scrollbar.js.map +0 -1
  109. package/src/components/composer/Composer.stories.tsx +0 -238
  110. package/src/components/composer/Composer.tsx +0 -545
  111. package/src/components/composer/helpers.ts +0 -74
  112. package/src/components/composer/index.ts +0 -2
  113. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -156
  114. package/src/components/imageLightbox/ImageLightbox.tsx +0 -169
  115. package/src/components/imageLightbox/index.ts +0 -1
  116. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -122
  117. package/src/components/supportTicket/AttachmentChips.tsx +0 -142
  118. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -134
  119. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -85
  120. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -296
  121. package/src/components/supportTicket/ReferencePicker.tsx +0 -237
  122. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -122
  123. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  124. package/src/components/supportTicket/TicketHeader.tsx +0 -247
  125. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  126. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  127. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -355
  128. package/src/components/supportTicket/TicketReplyBox.tsx +0 -146
  129. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  130. package/src/components/supportTicket/index.ts +0 -8
  131. package/src/components/supportTicket/meta.ts +0 -145
  132. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -301
  133. package/src/components/ticketReferences/TicketReferences.tsx +0 -899
  134. package/src/components/ticketReferences/index.ts +0 -2
  135. package/src/components/ticketThread/TicketThread.stories.tsx +0 -751
  136. package/src/components/ticketThread/TicketThread.tsx +0 -650
  137. package/src/components/ticketThread/index.ts +0 -6
  138. package/src/helpers/scrollbar.ts +0 -32
@@ -1,119 +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.AttachmentChips = void 0;
40
- var jsx_runtime_1 = require("react/jsx-runtime");
41
- var reqore_1 = require("@qoretechnologies/reqore");
42
- var react_1 = require("react");
43
- var imageLightbox_1 = require("../imageLightbox");
44
- var AttachmentChips = function (_a) {
45
- var files = _a.files, onRemove = _a.onRemove, onRename = _a.onRename, disabled = _a.disabled;
46
- var _b = (0, react_1.useState)([]), thumbnails = _b[0], setThumbnails = _b[1];
47
- // index into the image subset that's open in the lightbox, or null when closed.
48
- var _c = (0, react_1.useState)(null), previewIndex = _c[0], setPreviewIndex = _c[1];
49
- // the file index currently being renamed inline, plus its working name.
50
- var _d = (0, react_1.useState)(null), editingIndex = _d[0], setEditingIndex = _d[1];
51
- var _e = (0, react_1.useState)(''), draftName = _e[0], setDraftName = _e[1];
52
- (0, react_1.useEffect)(function () {
53
- var urls = files.map(function (file) {
54
- return file.type.startsWith('image/') ? URL.createObjectURL(file) : '';
55
- });
56
- setThumbnails(urls);
57
- return function () { return urls.forEach(function (url) { return url && URL.revokeObjectURL(url); }); };
58
- }, [files]);
59
- if (!files.length) {
60
- return null;
61
- }
62
- // The staged images in order, each with its original file index + object URL — the set the
63
- // lightbox pages across. Non-image files are skipped.
64
- var imageEntries = files
65
- .map(function (file, index) { return ({ file: file, index: index, url: thumbnails[index] }); })
66
- .filter(function (entry) { return entry.url; });
67
- var startRename = function (index) {
68
- setDraftName(files[index].name);
69
- setEditingIndex(index);
70
- };
71
- var commitRename = function () {
72
- if (editingIndex === null) {
73
- return;
74
- }
75
- var name = draftName.trim();
76
- if (onRename && name && name !== files[editingIndex].name) {
77
- onRename(editingIndex, name);
78
- }
79
- setEditingIndex(null);
80
- };
81
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreControlGroup, { wrap: true, gapSize: 'small', verticalAlign: 'center', children: files.map(function (file, index) {
82
- if (editingIndex === index) {
83
- return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreInput, { value: draftName, onChange: function (event) {
84
- return setDraftName(event.target.value);
85
- }, onBlur: commitRename, onKeyDown: function (event) {
86
- if (event.key === 'Enter') {
87
- commitRename();
88
- }
89
- else if (event.key === 'Escape') {
90
- setEditingIndex(null);
91
- }
92
- }, size: 'small', fixed: true, autoFocus: true }, "edit-".concat(index)));
93
- }
94
- var thumbnail = thumbnails[index];
95
- var imageIndex = thumbnail
96
- ? imageEntries.findIndex(function (entry) { return entry.index === index; })
97
- : -1;
98
- var actions = onRename && !disabled
99
- ? [
100
- {
101
- icon: 'Edit2Line',
102
- tooltip: 'Rename',
103
- onClick: function (event) {
104
- event.stopPropagation();
105
- startRename(index);
106
- },
107
- },
108
- ]
109
- : undefined;
110
- return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { icon: thumbnail ? undefined : 'AttachmentLine', leftIconProps: thumbnail ? { image: thumbnail } : undefined, label: file.name, size: 'small', tooltip: thumbnail ? 'Click to preview' : undefined, actions: actions, onClick: thumbnail ? function () { return setPreviewIndex(imageIndex); } : undefined, onRemoveClick: disabled ? undefined : function () { return onRemove(index); } }, "".concat(file.name, "-").concat(index)));
111
- }) }), previewIndex !== null && imageEntries[previewIndex] ? ((0, jsx_runtime_1.jsx)(imageLightbox_1.ImageLightbox, { images: imageEntries.map(function (entry) { return ({
112
- attachment_id: String(entry.index),
113
- filename: entry.file.name,
114
- }); }), index: previewIndex, onIndex: setPreviewIndex, onClose: function () { return setPreviewIndex(null); }, fetchAttachmentUrl: function (id) { return __awaiter(void 0, void 0, void 0, function () { var _a, _b; return __generator(this, function (_c) {
115
- return [2 /*return*/, (_b = (_a = imageEntries.find(function (entry) { return String(entry.index) === id; })) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : ''];
116
- }); }); } })) : null] }));
117
- };
118
- exports.AttachmentChips = AttachmentChips;
119
- //# sourceMappingURL=AttachmentChips.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentChips.js","sourceRoot":"","sources":["../../../src/components/supportTicket/AttachmentChips.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsF;AACtF,+BAA4C;AAC5C,kDAAiD;AAuB1C,IAAM,eAAe,GAAG,UAAC,EAA8D;QAA5D,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,QAAQ,cAAA,EAAE,QAAQ,cAAA;IAC7D,IAAA,KAA8B,IAAA,gBAAQ,EAAW,EAAE,CAAC,EAAnD,UAAU,QAAA,EAAE,aAAa,QAA0B,CAAC;IAC3D,gFAAgF;IAC1E,IAAA,KAAkC,IAAA,gBAAQ,EAAgB,IAAI,CAAC,EAA9D,YAAY,QAAA,EAAE,eAAe,QAAiC,CAAC;IACtE,wEAAwE;IAClE,IAAA,KAAkC,IAAA,gBAAQ,EAAgB,IAAI,CAAC,EAA9D,YAAY,QAAA,EAAE,eAAe,QAAiC,CAAC;IAChE,IAAA,KAA4B,IAAA,gBAAQ,EAAS,EAAE,CAAC,EAA/C,SAAS,QAAA,EAAE,YAAY,QAAwB,CAAC;IAEvD,IAAA,iBAAS,EAAC;QACR,IAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI;YAC1B,OAAA,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CA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OAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,EAA1B,CAA0B,CAAC,0CAAE,GAAG,mCAAI,EAAE,EAAA;yBAAA,GAErE,CACH,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC,CAAC;AApHW,QAAA,eAAe,mBAoH1B"}
@@ -1,35 +0,0 @@
1
- import { ReqoreTag } from '@qoretechnologies/reqore';
2
- import { TSizes } from '@qoretechnologies/reqore/dist/constants/sizes';
3
- import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
4
- import { ComponentProps } from 'react';
5
- import { IInterfaceReference } from './meta';
6
- export interface IInterfaceReferenceTagsProps {
7
- references?: IInterfaceReference[];
8
- /** Optional leading label, e.g. "References" in a ticket header. Omitted (the
9
- * default) inside the thread, where the chips sit under a message. */
10
- label?: string;
11
- /** Resolve a per-kind icon. Consumers with their own icon vocabulary (the IDE)
12
- * pass one; when omitted the built-in per-kind default is used. */
13
- resolveInterfaceIcon?: (kind: string) => IReqoreIconName;
14
- /** Open a referenced interface; chips are static (informational) when omitted —
15
- * e.g. the staff view, which can't reach the customer's instance. */
16
- onInterfaceClick?: (reference: IInterfaceReference) => void;
17
- size?: TSizes;
18
- /** Chip styling — pass `intent`/`customTheme` (e.g. `{ main: 'custom1' }`) to tint
19
- * the reference chips to a surface's accent (the Qonsole/helpdesk composer does). */
20
- intent?: ComponentProps<typeof ReqoreTag>['intent'];
21
- customTheme?: ComponentProps<typeof ReqoreTag>['customTheme'];
22
- /** Resolve a per-reference image — e.g. a qog's trigger-app logo, the way the
23
- * qogs list does. When this (or the reference's own `logo`) returns a value, the
24
- * chip shows the image in place of the kind icon. */
25
- resolveInterfaceImage?: (reference: IInterfaceReference) => string | undefined;
26
- }
27
- /**
28
- * The chips for the Qorus interfaces a ticket or message references, as
29
- * `{kind, name}` snapshots. The single renderer for interface references across
30
- * every support surface — the ticket header (with a "References" label), the
31
- * thread (per message, no label), and the Qonsole card — so a reference looks
32
- * identical everywhere. Renders nothing when there are no references.
33
- */
34
- export declare const InterfaceReferenceTags: ({ references, label, resolveInterfaceIcon, onInterfaceClick, size, intent, customTheme, resolveInterfaceImage, }: IInterfaceReferenceTagsProps) => import("react/jsx-runtime").JSX.Element;
35
- //# sourceMappingURL=InterfaceReferenceTags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InterfaceReferenceTags.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/InterfaceReferenceTags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAwB,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAEnE,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC;2EACuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;wEACoE;IACpE,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,eAAe,CAAC;IACzD;0EACsE;IACtE,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;0FACsF;IACtF,MAAM,CAAC,EAAE,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,WAAW,CAAC,EAAE,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC;IAC9D;;0DAEsD;IACtD,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,MAAM,GAAG,SAAS,CAAC;CAChF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,qHAShC,4BAA4B,4CAwC9B,CAAC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InterfaceReferenceTags = 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 chips for the Qorus interfaces a ticket or message references, as
9
- * `{kind, name}` snapshots. The single renderer for interface references across
10
- * every support surface — the ticket header (with a "References" label), the
11
- * thread (per message, no label), and the Qonsole card — so a reference looks
12
- * identical everywhere. Renders nothing when there are no references.
13
- */
14
- var InterfaceReferenceTags = function (_a) {
15
- var references = _a.references, label = _a.label, resolveInterfaceIcon = _a.resolveInterfaceIcon, onInterfaceClick = _a.onInterfaceClick, _b = _a.size, size = _b === void 0 ? 'small' : _b, intent = _a.intent, customTheme = _a.customTheme, resolveInterfaceImage = _a.resolveInterfaceImage;
16
- if (!(references === null || references === void 0 ? void 0 : references.length)) {
17
- return null;
18
- }
19
- var resolveIcon = resolveInterfaceIcon !== null && resolveInterfaceIcon !== void 0 ? resolveInterfaceIcon : meta_1.defaultInterfaceIcon;
20
- return ((0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { verticalAlign: 'center', wrap: true, gapSize: 'small', children: [label ? ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { size: 'small', effect: { opacity: 0.6 }, children: label })) : null, references.map(function (reference) {
21
- var _a, _b;
22
- // an app-triggered qog shows the trigger app's logo (stored, or resolved by
23
- // a viewer with the app catalogue); everything else shows its kind glyph.
24
- var image = (_a = reference.logo) !== null && _a !== void 0 ? _a : resolveInterfaceImage === null || resolveInterfaceImage === void 0 ? void 0 : resolveInterfaceImage(reference);
25
- return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { icon: image ? undefined : resolveIcon(reference.interface_kind), leftIconProps: image ? { image: image } : undefined, labelKey: reference.interface_kind, label: reference.interface_name, size: size, intent: intent, customTheme: customTheme, tooltip: onInterfaceClick
26
- ? "Open ".concat(reference.interface_kind, " ").concat(reference.interface_name)
27
- : "".concat(reference.interface_kind, ": ").concat(reference.interface_name), onClick: onInterfaceClick ? function () { return onInterfaceClick(reference); } : undefined }, (_b = reference.reference_id) !== null && _b !== void 0 ? _b : "".concat(reference.interface_kind, ":").concat(reference.interface_name)));
28
- })] }));
29
- };
30
- exports.InterfaceReferenceTags = InterfaceReferenceTags;
31
- //# sourceMappingURL=InterfaceReferenceTags.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InterfaceReferenceTags.js","sourceRoot":"","sources":["../../../src/components/supportTicket/InterfaceReferenceTags.tsx"],"names":[],"mappings":";;;;AAAA,mDAAkF;AAIlF,+BAAmE;AAwBnE;;;;;;GAMG;AACI,IAAM,sBAAsB,GAAG,UAAC,EASR;QAR7B,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,oBAAoB,0BAAA,EACpB,gBAAgB,sBAAA,EAChB,YAAc,EAAd,IAAI,mBAAG,OAAO,KAAA,EACd,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,qBAAqB,2BAAA;IAErB,IAAI,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,CAAA,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAM,WAAW,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,2BAAoB,CAAC;IACjE,OAAO,CACL,wBAAC,2BAAkB,IAAC,aAAa,EAAC,QAAQ,EAAC,IAAI,QAAC,OAAO,EAAC,OAAO,aAC5D,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,gBAAO,IAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,YAC3C,KAAK,GACE,CACX,CAAC,CAAC,CAAC,IAAI,EACP,UAAU,CAAC,GAAG,CAAC,UAAC,SAAS;;gBACxB,4EAA4E;gBAC5E,0EAA0E;gBAC1E,IAAM,KAAK,GAAG,MAAA,SAAS,CAAC,IAAI,mCAAI,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAG,SAAS,CAAC,CAAC;gBACnE,OAAO,CACL,uBAAC,kBAAS,IAKR,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,EAC/D,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC,CAAC,SAAS,EAC5C,QAAQ,EAAE,SAAS,CAAC,cAAc,EAClC,KAAK,EAAE,SAAS,CAAC,cAAc,EAC/B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,OAAO,EACL,gBAAgB;wBACd,CAAC,CAAC,eAAQ,SAAS,CAAC,cAAc,cAAI,SAAS,CAAC,cAAc,CAAE;wBAChE,CAAC,CAAC,UAAG,SAAS,CAAC,cAAc,eAAK,SAAS,CAAC,cAAc,CAAE,EAEhE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,cAAM,OAAA,gBAAgB,CAAC,SAAS,CAAC,EAA3B,CAA2B,CAAC,CAAC,CAAC,SAAS,IAfvE,MAAA,SAAS,CAAC,YAAY,mCACtB,UAAG,SAAS,CAAC,cAAc,cAAI,SAAS,CAAC,cAAc,CAAE,CAe3D,CACH,CAAC;YACJ,CAAC,CAAC,IACiB,CACtB,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,sBAAsB,0BAiDjC"}
@@ -1,41 +0,0 @@
1
- import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
2
- import { ReactNode } from 'react';
3
- import { IInterfaceReference } from './meta';
4
- export interface IReferencePickerProps {
5
- /** the interface kinds listed down the left pane */
6
- kinds: string[];
7
- /** the kind whose interfaces `items` holds */
8
- kind: string;
9
- onKindChange: (kind: string) => void;
10
- /**
11
- * The selected kind's interfaces, by name. Fetching is the host's job — it knows
12
- * where they come from and how to cache them.
13
- */
14
- items: string[];
15
- /** `items` is still being fetched, so the right pane shows a spinner rather than
16
- * claiming the kind is empty */
17
- loading?: boolean;
18
- /**
19
- * The host's fetch for this kind failed. Shown in place of the list, because an
20
- * empty pane would otherwise read as "this instance has no workflows" — which is a
21
- * different and much more alarming statement than "we couldn't ask".
22
- */
23
- error?: string;
24
- /** Retry the failed fetch. The error state is pressable when given. */
25
- onRetry?: () => void;
26
- /** Already-picked references. Anything of the current kind that is already picked is
27
- * dropped from the right pane, so a reference can't be added twice. */
28
- picked?: IInterfaceReference[];
29
- onAdd: (reference: IInterfaceReference) => void;
30
- /** the whole picker is inert (e.g. a reply is in flight) */
31
- disabled?: boolean;
32
- /** Per-kind icon. Consumers with their own icon vocabulary (the IDE) pass one; the
33
- * built-in per-kind default is used when omitted. */
34
- resolveInterfaceIcon?: (kind: string) => IReqoreIconName;
35
- /** the underline / selected-kind colour. Defaults to the support surfaces' violet. */
36
- accent?: string;
37
- /** shown above the panes — the composer's picked-reference chips, typically */
38
- header?: ReactNode;
39
- }
40
- export declare const ReferencePicker: ({ kinds, kind, onKindChange, items, loading, error, onRetry, picked, onAdd, disabled, resolveInterfaceIcon, accent, header, }: IReferencePickerProps) => import("react/jsx-runtime").JSX.Element;
41
- //# sourceMappingURL=ReferencePicker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReferencePicker.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/ReferencePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAwB,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AA0EnE,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;qCACiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;4EACwE;IACxE,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC/B,KAAK,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;0DACsD;IACtD,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,eAAe,CAAC;IACzD,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,kIAczB,qBAAqB,4CA0GvB,CAAC"}
@@ -1,86 +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.ReferencePicker = void 0;
11
- var jsx_runtime_1 = require("react/jsx-runtime");
12
- var reqore_1 = require("@qoretechnologies/reqore");
13
- var react_1 = require("react");
14
- var styled_components_1 = __importDefault(require("styled-components"));
15
- var scrollbar_1 = require("../../helpers/scrollbar");
16
- var meta_1 = require("./meta");
17
- /*
18
- * The two-pane interface browser: kinds down the left, the selected kind's interfaces
19
- * on the right, and one search field that scopes both. Sits above a ticket composer,
20
- * toggled by the composer's "Reference interfaces" action.
21
- *
22
- * The host owns the data. Which kinds exist and what lives under one are questions only
23
- * the surrounding app can answer — the IDE lists them off the customer's live instance,
24
- * a story hands over fixtures — so this component takes `kinds` and the selected kind's
25
- * `items` and does the rest: selection, search, and turning a click into a reference.
26
- */
27
- /** How many interfaces the right pane shows before it scrolls. */
28
- var PANE_MAX_HEIGHT = 180;
29
- var KIND_PANE_WIDTH = 150;
30
- /*
31
- * A scroll pane with the thin, unobtrusive scrollbar the Qonsole surfaces use
32
- * (transparent track, translucent rounded thumb) rather than the raw browser one.
33
- * webkit-only, like those surfaces: setting `scrollbar-width` as well would let
34
- * Chromium override this custom 6px with its own, wider, "thin".
35
- */
36
- var Pane = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n max-height: ", "px;\n overflow-y: auto;\n padding: 4px;\n\n ", "\n"], ["\n ", "\n max-height: ", "px;\n overflow-y: auto;\n padding: 4px;\n\n ", "\n"])), function (_a) {
37
- var $right = _a.$right;
38
- return $right
39
- ? 'flex: 1; min-width: 0;'
40
- : "width: ".concat(KIND_PANE_WIDTH, "px; flex: none; border-right: 1px solid rgba(123, 104, 238, 0.25);");
41
- }, PANE_MAX_HEIGHT, scrollbar_1.thinScrollbar);
42
- var Frame = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid rgba(123, 104, 238, 0.25);\n border-radius: 8px;\n overflow: hidden;\n"], ["\n border: 1px solid rgba(123, 104, 238, 0.25);\n border-radius: 8px;\n overflow: hidden;\n"])));
43
- var Panes = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
44
- /*
45
- * An underline search field. The input itself is borderless (`flat transparent`) and
46
- * this wrapper carries the single bottom border, so the search reads as a line rather
47
- * than a full grey box — including on focus, where Reqore's default is a 2px outline
48
- * around the whole control. Suppressing that outline and brightening the underline
49
- * instead keeps a focus cue without the box. The selector is scoped under this wrapper,
50
- * so it outranks Reqore's without `!important`.
51
- */
52
- var Search = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 6px 4px 4px;\n border-bottom: 1px solid ", ";\n transition: border-color 0.15s ease-out;\n\n .reqore-control-wrapper:focus-within {\n outline: none;\n }\n &:focus-within {\n border-bottom-color: ", ";\n }\n"], ["\n padding: 6px 4px 4px;\n border-bottom: 1px solid ", ";\n transition: border-color 0.15s ease-out;\n\n .reqore-control-wrapper:focus-within {\n outline: none;\n }\n &:focus-within {\n border-bottom-color: ", ";\n }\n"])), function (_a) {
53
- var $accent = _a.$accent;
54
- return "".concat($accent, "80");
55
- }, function (_a) {
56
- var $accent = _a.$accent;
57
- return $accent;
58
- });
59
- var Note = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n opacity: 0.4;\n padding: 8px 6px;\n font-size: 12px;\n"], ["\n opacity: 0.4;\n padding: 8px 6px;\n font-size: 12px;\n"])));
60
- var DEFAULT_ACCENT = '#762f7e';
61
- var ReferencePicker = function (_a) {
62
- var kinds = _a.kinds, kind = _a.kind, onKindChange = _a.onKindChange, items = _a.items, loading = _a.loading, error = _a.error, onRetry = _a.onRetry, picked = _a.picked, onAdd = _a.onAdd, disabled = _a.disabled, _b = _a.resolveInterfaceIcon, resolveInterfaceIcon = _b === void 0 ? meta_1.defaultInterfaceIcon : _b, _c = _a.accent, accent = _c === void 0 ? DEFAULT_ACCENT : _c, header = _a.header;
63
- var _d = (0, react_1.useState)(''), query = _d[0], setQuery = _d[1];
64
- var needle = query.trim().toLowerCase();
65
- var visibleKinds = (0, react_1.useMemo)(function () { return (needle ? kinds.filter(function (k) { return k.toLowerCase().includes(needle); }) : kinds); }, [kinds, needle]);
66
- /*
67
- * The right pane drops what's already been picked and then applies the search. When
68
- * the KIND itself matches the search ("workflow"), its interfaces all stay — you
69
- * searched for the kind, so you want to see what's in it.
70
- */
71
- var visibleItems = (0, react_1.useMemo)(function () {
72
- var already = new Set((picked !== null && picked !== void 0 ? picked : [])
73
- .filter(function (reference) { return reference.interface_kind === kind; })
74
- .map(function (reference) { return reference.interface_name; }));
75
- var kindMatches = kind.toLowerCase().includes(needle);
76
- return items.filter(function (name) {
77
- return !already.has(name) && (!needle || kindMatches || name.toLowerCase().includes(needle));
78
- });
79
- }, [items, picked, kind, needle]);
80
- return ((0, jsx_runtime_1.jsxs)(Frame, { children: [header, (0, jsx_runtime_1.jsx)(Search, { "$accent": accent, children: (0, jsx_runtime_1.jsx)(reqore_1.ReqoreInput, { value: query, onChange: function (event) { return setQuery(event.target.value); }, placeholder: 'Search kinds and interfaces\u2026', icon: 'SearchLine', minimal: true, flat: true, transparent: true, fluid: true, disabled: disabled, onClearClick: query ? function () { return setQuery(''); } : undefined }) }), (0, jsx_runtime_1.jsxs)(Panes, { children: [(0, jsx_runtime_1.jsx)(Pane, { children: visibleKinds.length ? ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: visibleKinds.map(function (option) { return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenuItem, { icon: resolveInterfaceIcon(option), label: option, selected: option === kind, disabled: disabled, onClick: function () { return onKindChange(option); } }, option)); }) })) : ((0, jsx_runtime_1.jsx)(Note, { children: "No kinds" })) }), (0, jsx_runtime_1.jsx)(Pane, { "$right": true, children: error ? ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenuItem, { icon: 'ErrorWarningLine', rightIcon: onRetry ? 'RefreshLine' : undefined, intent: 'danger', label: "Couldn't load ".concat(kind, "s"),
81
- /* the specific failure is the tooltip — the pane states the outcome */
82
- tooltip: error, onClick: onRetry }) })) : loading ? ((0, jsx_runtime_1.jsxs)(reqore_1.ReqoreSpinner, { iconColor: 'info', size: 'small', centered: true, children: ["Loading ", kind, "s\u2026"] })) : visibleItems.length ? ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: visibleItems.map(function (name) { return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenuItem, { icon: resolveInterfaceIcon(kind), rightIcon: 'AddLine', label: name, disabled: disabled, tooltip: "Reference ".concat(kind, " ").concat(name), onClick: function () { return onAdd({ interface_kind: kind, interface_name: name }); } }, name)); }) })) : ((0, jsx_runtime_1.jsxs)(Note, { children: ["No matching ", kind] })) })] })] }));
83
- };
84
- exports.ReferencePicker = ReferencePicker;
85
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
86
- //# sourceMappingURL=ReferencePicker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReferencePicker.js","sourceRoot":"","sources":["../../../src/components/supportTicket/ReferencePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAAkG;AAElG,+BAAqD;AACrD,wEAAuC;AACvC,qDAAwD;AACxD,+BAAmE;AAEnE;;;;;;;;;GASG;AAEH,kEAAkE;AAClE,IAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,IAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;;;;GAKG;AACH,IAAM,IAAI,GAAG,2BAAM,CAAC,GAAG,sJAAsB,MACzC,EAGiG,kBACrF,EAAe,iDAI3B,EAAa,IAChB,KATG,UAAC,EAAU;QAAR,MAAM,YAAA;IACT,OAAA,MAAM;QACJ,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,iBAAU,eAAe,uEAAoE;AAFjG,CAEiG,EACrF,eAAe,EAI3B,yBAAa,CAChB,CAAC;AAEF,IAAM,KAAK,GAAG,2BAAM,CAAC,GAAG,mKAAA,gGAIvB,IAAA,CAAC;AAEF,IAAM,KAAK,GAAG,2BAAM,CAAC,GAAG,yFAAA,sBAEvB,IAAA,CAAC;AAEF;;;;;;;GAOG;AACH,IAAM,MAAM,GAAG,2BAAM,CAAC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AI,IAAK,OAAA,CAC1B,uBAAC,uBAAc,IAEb,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,EAChC,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,oBAAa,IAAI,cAAI,IAAI,CAAE,EACpC,OAAO,EAAE,cAAM,OAAA,KAAK,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,EAArD,CAAqD,IAN/D,IAAI,CAOT,CACH,EAV2B,CAU3B,CAAC,GACS,CACd,CAAC,CAAC,CAAC,CACF,wBAAC,IAAI,+BAAc,IAAI,IAAQ,CAChC,GACI,IACD,IACF,CACT,CAAC;AACJ,CAAC,CAAC;AAxHW,QAAA,eAAe,mBAwH1B"}
@@ -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,IAAI,+XAAA,4TAatC,KAAC;AAEF;;;GAGG;AACI,IAAM,cAAc,GAAG,UAAC,IAAY;IACzC,OAAA,IAAI;SACD,KAAK,CAAC,WAAW,CAAC;SAClB,MAAM,CAAC,OAAO,CAAC;SACf,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,UAAC,IAAI,gBAAK,OAAA,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,WAAW,EAAE,mCAAI,EAAE,CAAA,EAAA,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG;AALlB,CAKkB,CAAC;AANR,QAAA,cAAc,kBA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