@qoretechnologies/reqraft 0.10.20 → 0.10.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +11 -8
- package/dist/components/composer/Composer.d.ts +108 -0
- package/dist/components/composer/Composer.d.ts.map +1 -0
- package/dist/components/composer/Composer.js +238 -0
- package/dist/components/composer/Composer.js.map +1 -0
- package/dist/components/composer/helpers.d.ts +21 -0
- package/dist/components/composer/helpers.d.ts.map +1 -0
- package/dist/components/composer/helpers.js +75 -0
- package/dist/components/composer/helpers.js.map +1 -0
- package/dist/components/composer/index.d.ts +3 -0
- package/dist/components/composer/index.d.ts.map +1 -0
- package/dist/components/composer/index.js +19 -0
- package/dist/components/composer/index.js.map +1 -0
- package/dist/components/form/engine/FormEngine.d.ts +1 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts +21 -0
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -0
- package/dist/components/imageLightbox/ImageLightbox.js +169 -0
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -0
- package/dist/components/imageLightbox/index.d.ts +2 -0
- package/dist/components/imageLightbox/index.d.ts.map +1 -0
- package/dist/components/imageLightbox/index.js +18 -0
- package/dist/components/imageLightbox/index.js.map +1 -0
- package/dist/components/searchFilterBar/SearchFilterBar.d.ts +33 -0
- package/dist/components/searchFilterBar/SearchFilterBar.d.ts.map +1 -0
- package/dist/components/searchFilterBar/SearchFilterBar.js +76 -0
- package/dist/components/searchFilterBar/SearchFilterBar.js.map +1 -0
- package/dist/components/searchFilterBar/index.d.ts +2 -0
- package/dist/components/searchFilterBar/index.d.ts.map +1 -0
- package/dist/components/searchFilterBar/index.js +18 -0
- package/dist/components/searchFilterBar/index.js.map +1 -0
- package/dist/components/supportTicket/AttachmentChips.d.ts +10 -0
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -0
- package/dist/components/supportTicket/AttachmentChips.js +122 -0
- package/dist/components/supportTicket/AttachmentChips.js.map +1 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +43 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.js +31 -0
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -0
- package/dist/components/supportTicket/ReferencePicker.d.ts +87 -0
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -0
- package/dist/components/supportTicket/ReferencePicker.js +295 -0
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -0
- package/dist/components/supportTicket/TicketHeader.d.ts +86 -0
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -0
- package/dist/components/supportTicket/TicketHeader.js +149 -0
- package/dist/components/supportTicket/TicketHeader.js.map +1 -0
- package/dist/components/supportTicket/TicketMetaTags.d.ts +32 -0
- package/dist/components/supportTicket/TicketMetaTags.d.ts.map +1 -0
- package/dist/components/supportTicket/TicketMetaTags.js +21 -0
- package/dist/components/supportTicket/TicketMetaTags.js.map +1 -0
- package/dist/components/supportTicket/TicketReplyBox.d.ts +63 -0
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -0
- package/dist/components/supportTicket/TicketReplyBox.js +115 -0
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -0
- package/dist/components/supportTicket/attachmentAccess.d.ts +37 -0
- package/dist/components/supportTicket/attachmentAccess.d.ts.map +1 -0
- package/dist/components/supportTicket/attachmentAccess.js +132 -0
- package/dist/components/supportTicket/attachmentAccess.js.map +1 -0
- package/dist/components/supportTicket/fileToAttachment.d.ts +9 -0
- package/dist/components/supportTicket/fileToAttachment.d.ts.map +1 -0
- package/dist/components/supportTicket/fileToAttachment.js +28 -0
- package/dist/components/supportTicket/fileToAttachment.js.map +1 -0
- package/dist/components/supportTicket/index.d.ts +11 -0
- package/dist/components/supportTicket/index.d.ts.map +1 -0
- package/dist/components/supportTicket/index.js +27 -0
- package/dist/components/supportTicket/index.js.map +1 -0
- package/dist/components/supportTicket/meta.d.ts +71 -0
- package/dist/components/supportTicket/meta.d.ts.map +1 -0
- package/dist/components/supportTicket/meta.js +115 -0
- package/dist/components/supportTicket/meta.js.map +1 -0
- package/dist/components/supportTicket/ticketModel.d.ts +102 -0
- package/dist/components/supportTicket/ticketModel.d.ts.map +1 -0
- package/dist/components/supportTicket/ticketModel.js +3 -0
- package/dist/components/supportTicket/ticketModel.js.map +1 -0
- package/dist/components/ticketReferences/TicketReferences.d.ts +52 -0
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -0
- package/dist/components/ticketReferences/TicketReferences.js +492 -0
- package/dist/components/ticketReferences/TicketReferences.js.map +1 -0
- package/dist/components/ticketReferences/index.d.ts +3 -0
- package/dist/components/ticketReferences/index.d.ts.map +1 -0
- package/dist/components/ticketReferences/index.js +6 -0
- package/dist/components/ticketReferences/index.js.map +1 -0
- package/dist/components/ticketThread/TicketThread.d.ts +57 -0
- package/dist/components/ticketThread/TicketThread.d.ts.map +1 -0
- package/dist/components/ticketThread/TicketThread.js +299 -0
- package/dist/components/ticketThread/TicketThread.js.map +1 -0
- package/dist/components/ticketThread/index.d.ts +3 -0
- package/dist/components/ticketThread/index.d.ts.map +1 -0
- package/dist/components/ticketThread/index.js +7 -0
- package/dist/components/ticketThread/index.js.map +1 -0
- package/dist/helpers/common.d.ts +5 -0
- package/dist/helpers/common.d.ts.map +1 -1
- package/dist/helpers/common.js +20 -1
- package/dist/helpers/common.js.map +1 -1
- package/dist/helpers/scrollbar.d.ts +2 -0
- package/dist/helpers/scrollbar.d.ts.map +1 -0
- package/dist/helpers/scrollbar.js +25 -0
- package/dist/helpers/scrollbar.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/composer/Composer.stories.tsx +238 -0
- package/src/components/composer/Composer.tsx +545 -0
- package/src/components/composer/helpers.ts +74 -0
- package/src/components/composer/index.ts +2 -0
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +238 -0
- package/src/components/imageLightbox/ImageLightbox.tsx +236 -0
- package/src/components/imageLightbox/index.ts +1 -0
- package/src/components/searchFilterBar/SearchFilterBar.tsx +131 -0
- package/src/components/searchFilterBar/index.ts +1 -0
- package/src/components/supportTicket/AttachmentChips.stories.tsx +171 -0
- package/src/components/supportTicket/AttachmentChips.tsx +147 -0
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +171 -0
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +96 -0
- package/src/components/supportTicket/ReferencePicker.stories.tsx +519 -0
- package/src/components/supportTicket/ReferencePicker.tsx +563 -0
- package/src/components/supportTicket/TicketConversation.stories.tsx +121 -0
- package/src/components/supportTicket/TicketHeader.stories.tsx +183 -0
- package/src/components/supportTicket/TicketHeader.tsx +247 -0
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +103 -0
- package/src/components/supportTicket/TicketMetaTags.tsx +85 -0
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +351 -0
- package/src/components/supportTicket/TicketReplyBox.tsx +146 -0
- package/src/components/supportTicket/attachmentAccess.ts +97 -0
- package/src/components/supportTicket/fileToAttachment.ts +24 -0
- package/src/components/supportTicket/index.ts +10 -0
- package/src/components/supportTicket/meta.ts +185 -0
- package/src/components/supportTicket/ticketModel.ts +131 -0
- package/src/components/ticketReferences/TicketReferences.stories.tsx +315 -0
- package/src/components/ticketReferences/TicketReferences.tsx +886 -0
- package/src/components/ticketReferences/index.ts +2 -0
- package/src/components/ticketThread/TicketThread.stories.tsx +828 -0
- package/src/components/ticketThread/TicketThread.tsx +704 -0
- package/src/components/ticketThread/index.ts +6 -0
- package/src/helpers/common.ts +19 -0
- package/src/helpers/scrollbar.ts +32 -0
- package/src/index.tsx +8 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { TReqoreBadge } from '@qoretechnologies/reqore/dist/components/Button';
|
|
2
|
+
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { IInterfaceReference } from './meta';
|
|
5
|
+
/**
|
|
6
|
+
* One interface in the list. A bare string is the name and nothing else — the common
|
|
7
|
+
* case, and what a host that has only names can keep passing. The object form adds the
|
|
8
|
+
* two things a name alone can't disambiguate: a `description` second line (what the
|
|
9
|
+
* thing is for, an owning group, a path) and a `badge` (a version, a run count, a
|
|
10
|
+
* status tag). Search reads both the name and the description, since both are on screen.
|
|
11
|
+
*/
|
|
12
|
+
export interface IReferencePickerItem {
|
|
13
|
+
/** the interface name — this is what gets stored on the reference */
|
|
14
|
+
name: string;
|
|
15
|
+
/** a muted second line under the name */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** trailing badge, before the add/remove icon */
|
|
18
|
+
badge?: TReqoreBadge | TReqoreBadge[];
|
|
19
|
+
}
|
|
20
|
+
export type TReferencePickerItem = string | IReferencePickerItem;
|
|
21
|
+
/** `auto` picks `stacked` from the picker's own measured width. */
|
|
22
|
+
export type TReferencePickerLayout = 'auto' | 'columns' | 'stacked';
|
|
23
|
+
/** `auto` lifts into a modal on a phone-sized viewport, when `onClose` is given. */
|
|
24
|
+
export type TReferencePickerPresentation = 'auto' | 'inline' | 'modal';
|
|
25
|
+
export interface IReferencePickerProps {
|
|
26
|
+
/** the interface kinds listed down the left pane */
|
|
27
|
+
kinds: string[];
|
|
28
|
+
/** the kind whose interfaces `items` holds */
|
|
29
|
+
kind: string;
|
|
30
|
+
onKindChange: (kind: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* The selected kind's interfaces — bare names, or objects carrying a description
|
|
33
|
+
* and a badge. Fetching is the host's job; it knows where they come from and how
|
|
34
|
+
* to cache them.
|
|
35
|
+
*/
|
|
36
|
+
items: TReferencePickerItem[];
|
|
37
|
+
/** `items` is still being fetched, so the right pane shows a spinner rather than
|
|
38
|
+
* claiming the kind is empty */
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The host's fetch for this kind failed. Shown in place of the list, because an
|
|
42
|
+
* empty pane would otherwise read as "this instance has no workflows" — which is a
|
|
43
|
+
* different and much more alarming statement than "we couldn't ask".
|
|
44
|
+
*/
|
|
45
|
+
error?: string;
|
|
46
|
+
/** Retry the failed fetch. The error state is pressable when given. */
|
|
47
|
+
onRetry?: () => void;
|
|
48
|
+
/** Already-picked references. Anything of the current kind that is already picked
|
|
49
|
+
* renders selected in place — never removed from the list. */
|
|
50
|
+
picked?: IInterfaceReference[];
|
|
51
|
+
onAdd: (reference: IInterfaceReference) => void;
|
|
52
|
+
/** Un-pick a reference from inside the picker. Without it a picked row still shows
|
|
53
|
+
* as picked, it just can't be toggled back off here. */
|
|
54
|
+
onRemove?: (reference: IInterfaceReference) => void;
|
|
55
|
+
/** the whole picker is inert (e.g. a reply is in flight) */
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/** Per-kind icon. Consumers with their own icon vocabulary (the IDE) pass one; the
|
|
58
|
+
* built-in per-kind default is used when omitted. */
|
|
59
|
+
resolveInterfaceIcon?: (kind: string) => IReqoreIconName;
|
|
60
|
+
/**
|
|
61
|
+
* Per-kind reading name — "Value maps" for `value-map`. The kind id is a wire value
|
|
62
|
+
* and never reaches the user; this is what does. Search matches both, so typing
|
|
63
|
+
* either the id or the label finds the kind. Defaults to the built-in Qorus
|
|
64
|
+
* vocabulary.
|
|
65
|
+
*/
|
|
66
|
+
resolveKindLabel?: (kind: string) => string;
|
|
67
|
+
/** the underline / selected-kind colour. Defaults to the support surfaces' violet. */
|
|
68
|
+
accent?: string;
|
|
69
|
+
/** shown above the panes — the composer's picked-reference chips, typically */
|
|
70
|
+
header?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Dismiss the picker. Required for the modal presentation (a modal with no way out
|
|
73
|
+
* is a trap); the inline presentation ignores it, since the host's own toggle is
|
|
74
|
+
* what closes the picker there.
|
|
75
|
+
*/
|
|
76
|
+
onClose?: () => void;
|
|
77
|
+
/** Modal heading. */
|
|
78
|
+
title?: string;
|
|
79
|
+
/** How the panes arrange. `auto` (default) stacks below `STACK_BREAKPOINT` of the
|
|
80
|
+
* picker's own width; the explicit values are what stories pin. */
|
|
81
|
+
layout?: TReferencePickerLayout;
|
|
82
|
+
/** Where the picker renders. `auto` (default) goes to a modal on a phone-sized
|
|
83
|
+
* viewport when `onClose` is given, and stays inline otherwise. */
|
|
84
|
+
presentation?: TReferencePickerPresentation;
|
|
85
|
+
}
|
|
86
|
+
export declare const ReferencePicker: ({ kinds, kind, onKindChange, items, loading, error, onRetry, picked, onAdd, onRemove, disabled, resolveInterfaceIcon, resolveKindLabel, accent, header, onClose, title, layout, presentation, }: IReferencePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
//# sourceMappingURL=ReferencePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferencePicker.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/ReferencePicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAC;AAG7E,OAAO,EAGL,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AA6JhB;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CACvC;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,oBAAoB,CAAC;AAEjE,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AACpE,oFAAoF;AACpF,MAAM,MAAM,4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4CA0OvB,CAAC"}
|
|
@@ -0,0 +1,295 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ReferencePicker = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var reqore_1 = require("@qoretechnologies/reqore");
|
|
24
|
+
var react_1 = require("react");
|
|
25
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
26
|
+
var scrollbar_1 = require("../../helpers/scrollbar");
|
|
27
|
+
var meta_1 = require("./meta");
|
|
28
|
+
/*
|
|
29
|
+
* The interface browser: kinds on one side, the selected kind's interfaces on the
|
|
30
|
+
* other, and one search field that scopes both. Sits above a ticket composer, toggled
|
|
31
|
+
* by the composer's "Reference interfaces" action.
|
|
32
|
+
*
|
|
33
|
+
* The host owns the data. Which kinds exist and what lives under one are questions only
|
|
34
|
+
* the surrounding app can answer — the IDE lists them off the customer's live instance,
|
|
35
|
+
* a story hands over fixtures — so this component takes `kinds` and the selected kind's
|
|
36
|
+
* `items` and does the rest: selection, search, and turning a click into a reference.
|
|
37
|
+
* Nothing here fetches; `kind` is the only contract, and the host maps it onto whatever
|
|
38
|
+
* transport it has.
|
|
39
|
+
*
|
|
40
|
+
* Three rules the layout follows, in order of how often they bite:
|
|
41
|
+
*
|
|
42
|
+
* - Search filters the kind list down to what matches, and keeps ONE extra row: the
|
|
43
|
+
* selected kind, dimmed, when the query doesn't match it. That row is what stops the
|
|
44
|
+
* right-hand results outliving the kind they belong to — without it you'd see three
|
|
45
|
+
* interfaces and no way to tell what they were. Everything else goes, because a match
|
|
46
|
+
* that survives only by scrolling past nine dimmed rows isn't a match the user found.
|
|
47
|
+
* - A picked interface STAYS in the list, selected. Dropping it on pick was a
|
|
48
|
+
* disappearing act with no undo inside the picker; now the row toggles.
|
|
49
|
+
* - Below `STACK_BREAKPOINT` of its OWN width — not the viewport's, since this thing
|
|
50
|
+
* lives inside composers and drawers — the two panes collapse into one column and the
|
|
51
|
+
* selected kind's interfaces render directly beneath it. On a phone it goes further
|
|
52
|
+
* and lifts into a modal, because inline it would own the whole screen.
|
|
53
|
+
*/
|
|
54
|
+
/** How tall the panes get before they scroll: side by side, stacked, and in the modal. */
|
|
55
|
+
var COLUMNS_MAX_HEIGHT = '220px';
|
|
56
|
+
var STACKED_MAX_HEIGHT = '280px';
|
|
57
|
+
var MODAL_MAX_HEIGHT = '60vh';
|
|
58
|
+
var KIND_PANE_WIDTH = 150;
|
|
59
|
+
/** Container width (not viewport) below which the panes stack into one column. */
|
|
60
|
+
var STACK_BREAKPOINT = 420;
|
|
61
|
+
var BORDER = 'rgba(123, 104, 238, 0.25)';
|
|
62
|
+
/*
|
|
63
|
+
* Marks the selected kind when the search doesn't match it — it's only still on the
|
|
64
|
+
* list to say what the interfaces on the right are. Quiet, but pickable.
|
|
65
|
+
*/
|
|
66
|
+
var DIMMED_CLASS = 'reqore-reference-picker-dimmed';
|
|
67
|
+
/*
|
|
68
|
+
* Marks an already-referenced row. Reqore paints `selected` purely through styled
|
|
69
|
+
* props — no class, no aria state — so "is this row picked" is unobservable from the
|
|
70
|
+
* outside without a marker of our own. Stable, so a host can style on it too.
|
|
71
|
+
*/
|
|
72
|
+
var PICKED_CLASS = 'reqore-reference-picker-picked';
|
|
73
|
+
/*
|
|
74
|
+
* A scroll pane with the thin, unobtrusive scrollbar the Qonsole surfaces use
|
|
75
|
+
* (transparent track, translucent rounded thumb) rather than the raw browser one.
|
|
76
|
+
* webkit-only, like those surfaces: setting `scrollbar-width` as well would let
|
|
77
|
+
* Chromium override this custom 6px with its own, wider, "thin".
|
|
78
|
+
*/
|
|
79
|
+
var Pane = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n max-height: ", ";\n overflow-y: auto;\n padding: 4px;\n\n ", "\n"], ["\n ", "\n max-height: ", ";\n overflow-y: auto;\n padding: 4px;\n\n ", "\n"])), function (_a) {
|
|
80
|
+
var $right = _a.$right;
|
|
81
|
+
return $right
|
|
82
|
+
? 'flex: 1; min-width: 0;'
|
|
83
|
+
: "width: ".concat(KIND_PANE_WIDTH, "px; flex: none; border-right: 1px solid ").concat(BORDER, ";");
|
|
84
|
+
}, function (_a) {
|
|
85
|
+
var $maxHeight = _a.$maxHeight;
|
|
86
|
+
return $maxHeight;
|
|
87
|
+
}, scrollbar_1.thinScrollbar);
|
|
88
|
+
/** The stacked counterpart of `Pane` — one column, so one scroll region. */
|
|
89
|
+
var Stack = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-height: ", ";\n overflow-y: auto;\n padding: 4px;\n\n ", "\n"], ["\n max-height: ", ";\n overflow-y: auto;\n padding: 4px;\n\n ", "\n"])), function (_a) {
|
|
90
|
+
var $maxHeight = _a.$maxHeight;
|
|
91
|
+
return $maxHeight;
|
|
92
|
+
}, scrollbar_1.thinScrollbar);
|
|
93
|
+
/*
|
|
94
|
+
* The selected kind's interfaces once the panes have collapsed. The indent and the
|
|
95
|
+
* rule are the only things left saying "these belong to the row above" — in the
|
|
96
|
+
* two-pane layout the divider between the panes says it.
|
|
97
|
+
*/
|
|
98
|
+
var Nested = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 2px 0 4px 10px;\n padding-left: 8px;\n border-left: 1px solid ", ";\n"], ["\n margin: 2px 0 4px 10px;\n padding-left: 8px;\n border-left: 1px solid ", ";\n"])), BORDER);
|
|
99
|
+
var Frame = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n overflow: hidden;\n\n /* Rows the search doesn't match. Set here rather than per row so the rule is\n stated once, and on the row itself (not a wrapper) so it can't disturb the\n menu's own flex layout. */\n .", " {\n opacity: 0.35;\n }\n"], ["\n ", "\n overflow: hidden;\n\n /* Rows the search doesn't match. Set here rather than per row so the rule is\n stated once, and on the row itself (not a wrapper) so it can't disturb the\n menu's own flex layout. */\n .", " {\n opacity: 0.35;\n }\n"])), function (_a) {
|
|
100
|
+
var $bare = _a.$bare;
|
|
101
|
+
return ($bare ? '' : "border: 1px solid ".concat(BORDER, "; border-radius: 8px;"));
|
|
102
|
+
}, DIMMED_CLASS);
|
|
103
|
+
var Panes = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
104
|
+
/*
|
|
105
|
+
* An underline search field. The input itself is borderless (`flat transparent`) and
|
|
106
|
+
* this wrapper carries the single bottom border, so the search reads as a line rather
|
|
107
|
+
* than a full grey box — including on focus, where Reqore's default is a 2px outline
|
|
108
|
+
* around the whole control. Suppressing that outline and brightening the underline
|
|
109
|
+
* instead keeps a focus cue without the box. The selector is scoped under this wrapper,
|
|
110
|
+
* so it outranks Reqore's without `!important`.
|
|
111
|
+
*
|
|
112
|
+
* `$active` (the field has a query) holds the underline at full accent, so a filtered
|
|
113
|
+
* list is legible as filtered at a glance — the same signal `intent='info'` carries on
|
|
114
|
+
* a plain filter control, spoken in this surface's own accent.
|
|
115
|
+
*/
|
|
116
|
+
var Search = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: 6px 4px 4px;\n border-bottom: 1px solid\n ", ";\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 ", ";\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) {
|
|
117
|
+
var $accent = _a.$accent, $active = _a.$active;
|
|
118
|
+
return ($active ? $accent : "".concat($accent, "80"));
|
|
119
|
+
}, function (_a) {
|
|
120
|
+
var $accent = _a.$accent;
|
|
121
|
+
return $accent;
|
|
122
|
+
});
|
|
123
|
+
var Note = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __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"])));
|
|
124
|
+
var DEFAULT_ACCENT = '#762f7e';
|
|
125
|
+
/*
|
|
126
|
+
* How a picked row reads: `info`, tinted rather than filled.
|
|
127
|
+
*
|
|
128
|
+
* Two Reqore details make this less obvious than `selected` + `intent`:
|
|
129
|
+
*
|
|
130
|
+
* - `selected` becomes `active` on the button, and the active branch paints a solid
|
|
131
|
+
* background from the intent while ignoring `minimal` and `transparent` outright.
|
|
132
|
+
* So `selected` can't be softened — it has to go, and `minimal` carries the state.
|
|
133
|
+
* - `ReqoreMenuItem` sets `transparent` on every row, and `transparent` short-circuits
|
|
134
|
+
* `minimal`'s tint to nothing. Turning it off for picked rows is what lets the tint
|
|
135
|
+
* land, and it's only spread when the row IS picked — a `transparent: undefined` on
|
|
136
|
+
* the others would override the menu item's own default and flatten them all.
|
|
137
|
+
*
|
|
138
|
+
* The point of the tint: a solid blue bar is too much weight for "this one's already
|
|
139
|
+
* in your list". The rows still up for choosing are what the user is reading, and they
|
|
140
|
+
* should stay the loudest thing in the pane.
|
|
141
|
+
*/
|
|
142
|
+
var pickedItemProps = function (isPicked) {
|
|
143
|
+
return isPicked ? { intent: 'info', minimal: true, transparent: false } : {};
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Watches an element's own width, because the viewport's is the wrong question for
|
|
147
|
+
* anything that lives inside a composer, a drawer or a side panel — those stay narrow
|
|
148
|
+
* on a 2560px screen. A callback ref rather than `useRef` so the observer attaches the
|
|
149
|
+
* moment the node mounts; a ref that never gets attached silently reports "wide"
|
|
150
|
+
* forever, which is exactly the bug this is meant to catch.
|
|
151
|
+
*/
|
|
152
|
+
var useIsNarrow = function (enabled) {
|
|
153
|
+
var _a = (0, react_1.useState)(null), node = _a[0], setNode = _a[1];
|
|
154
|
+
var _b = (0, react_1.useState)(false), narrow = _b[0], setNarrow = _b[1];
|
|
155
|
+
(0, react_1.useEffect)(function () {
|
|
156
|
+
if (!enabled || !node || typeof ResizeObserver === 'undefined') {
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
var observer = new ResizeObserver(function (_a) {
|
|
160
|
+
var entry = _a[0];
|
|
161
|
+
setNarrow(entry.contentRect.width < STACK_BREAKPOINT);
|
|
162
|
+
});
|
|
163
|
+
observer.observe(node);
|
|
164
|
+
return function () { return observer.disconnect(); };
|
|
165
|
+
}, [enabled, node]);
|
|
166
|
+
return [setNode, narrow];
|
|
167
|
+
};
|
|
168
|
+
/** Phone-sized viewport. Its own media query rather than reqore's `isMobile`, which
|
|
169
|
+
* is pinned to `false` under NODE_ENV=test and so never fires in a story run. */
|
|
170
|
+
var usePhoneViewport = function (enabled) {
|
|
171
|
+
var _a = (0, react_1.useState)(false), phone = _a[0], setPhone = _a[1];
|
|
172
|
+
(0, react_1.useEffect)(function () {
|
|
173
|
+
if (!enabled || typeof window === 'undefined' || !window.matchMedia) {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
var query = window.matchMedia('(max-width: 480px)');
|
|
177
|
+
var sync = function () { return setPhone(query.matches); };
|
|
178
|
+
sync();
|
|
179
|
+
query.addEventListener('change', sync);
|
|
180
|
+
return function () { return query.removeEventListener('change', sync); };
|
|
181
|
+
}, [enabled]);
|
|
182
|
+
return phone;
|
|
183
|
+
};
|
|
184
|
+
var ReferencePicker = function (_a) {
|
|
185
|
+
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, onRemove = _a.onRemove, disabled = _a.disabled, _b = _a.resolveInterfaceIcon, resolveInterfaceIcon = _b === void 0 ? meta_1.defaultInterfaceIcon : _b, _c = _a.resolveKindLabel, resolveKindLabel = _c === void 0 ? meta_1.defaultInterfaceKindLabel : _c, _d = _a.accent, accent = _d === void 0 ? DEFAULT_ACCENT : _d, header = _a.header, onClose = _a.onClose, _e = _a.title, title = _e === void 0 ? 'Reference interfaces' : _e, _f = _a.layout, layout = _f === void 0 ? 'auto' : _f, _g = _a.presentation, presentation = _g === void 0 ? 'auto' : _g;
|
|
186
|
+
var _h = (0, react_1.useState)(''), query = _h[0], setQuery = _h[1];
|
|
187
|
+
var needle = query.trim().toLowerCase();
|
|
188
|
+
var _j = useIsNarrow(layout === 'auto'), frameRef = _j[0], narrow = _j[1];
|
|
189
|
+
var phone = usePhoneViewport(presentation === 'auto');
|
|
190
|
+
var asModal = presentation === 'modal' || (presentation === 'auto' && phone && !!onClose);
|
|
191
|
+
var stacked = layout === 'stacked' || (layout === 'auto' && narrow);
|
|
192
|
+
var label = resolveKindLabel(kind);
|
|
193
|
+
/* A kind matches on its id or its reading name, so "value map" and `value-map`
|
|
194
|
+
* both find it. */
|
|
195
|
+
var matchesKind = (0, react_1.useCallback)(function (candidate) {
|
|
196
|
+
return !needle ||
|
|
197
|
+
candidate.toLowerCase().includes(needle) ||
|
|
198
|
+
resolveKindLabel(candidate).toLowerCase().includes(needle);
|
|
199
|
+
}, [needle, resolveKindLabel]);
|
|
200
|
+
/* The matches, plus the selected kind whether or not it matched — it keeps its
|
|
201
|
+
* natural position rather than jumping to the top, so the list a user is reading
|
|
202
|
+
* doesn't reorder under them mid-keystroke. */
|
|
203
|
+
var visibleKinds = (0, react_1.useMemo)(function () { return kinds.filter(function (candidate) { return candidate === kind || matchesKind(candidate); }); }, [kinds, kind, matchesKind]);
|
|
204
|
+
var pickedNames = (0, react_1.useMemo)(function () {
|
|
205
|
+
return new Set((picked !== null && picked !== void 0 ? picked : [])
|
|
206
|
+
.filter(function (reference) { return reference.interface_kind === kind; })
|
|
207
|
+
.map(function (reference) { return reference.interface_name; }));
|
|
208
|
+
}, [picked, kind]);
|
|
209
|
+
/** One shape from here down, whichever of the two the host passed. */
|
|
210
|
+
var normalizedItems = (0, react_1.useMemo)(function () { return items.map(function (item) { return (typeof item === 'string' ? { name: item } : item); }); }, [items]);
|
|
211
|
+
/*
|
|
212
|
+
* The interfaces the search leaves standing. When the KIND itself matches
|
|
213
|
+
* ("workflow"), its interfaces all stay — you searched for the kind, so you want to
|
|
214
|
+
* see what's in it. Otherwise the name and the description are both fair game,
|
|
215
|
+
* because both are text the user can see.
|
|
216
|
+
*/
|
|
217
|
+
var visibleItems = (0, react_1.useMemo)(function () {
|
|
218
|
+
var kindMatches = matchesKind(kind);
|
|
219
|
+
return normalizedItems.filter(function (item) {
|
|
220
|
+
var _a;
|
|
221
|
+
return !needle ||
|
|
222
|
+
kindMatches ||
|
|
223
|
+
item.name.toLowerCase().includes(needle) ||
|
|
224
|
+
!!((_a = item.description) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(needle));
|
|
225
|
+
});
|
|
226
|
+
}, [normalizedItems, kind, needle, matchesKind]);
|
|
227
|
+
/* Drives the "…but other types do" hint: with the kind list now always on screen,
|
|
228
|
+
* an empty result is only puzzling when the answer is sitting in another row. */
|
|
229
|
+
var otherKindsMatch = (0, react_1.useMemo)(function () { return !!needle && kinds.some(function (candidate) { return candidate !== kind && matchesKind(candidate); }); }, [kinds, kind, needle, matchesKind]);
|
|
230
|
+
var toggle = function (name) {
|
|
231
|
+
var reference = { interface_kind: kind, interface_name: name };
|
|
232
|
+
if (pickedNames.has(name)) {
|
|
233
|
+
onRemove === null || onRemove === void 0 ? void 0 : onRemove(reference);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
onAdd(reference);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
var emptyNote = function () {
|
|
240
|
+
if (!needle) {
|
|
241
|
+
return "No ".concat(label.toLowerCase(), " on this instance");
|
|
242
|
+
}
|
|
243
|
+
return otherKindsMatch
|
|
244
|
+
? "No ".concat(label.toLowerCase(), " match \u201C").concat(query.trim(), "\u201D \u2014 other types do")
|
|
245
|
+
: "Nothing matches \u201C".concat(query.trim(), "\u201D");
|
|
246
|
+
};
|
|
247
|
+
/* Both panes are `ReqoreMenu`s of `ReqoreMenuItem`s — a vertical selectable list is
|
|
248
|
+
exactly what Menu is, so the selection (`selected`), the left-icon + right-icon,
|
|
249
|
+
and the item chrome come from reqore rather than hand-styled buttons. The wrappers
|
|
250
|
+
still own the scroll and the layout; the menus render transparent inside them.
|
|
251
|
+
Only menu items go inside a `ReqoreMenu`: it clones every child with its own props,
|
|
252
|
+
so a spinner or a note nested in one would be handed props it can't take. */
|
|
253
|
+
var kindItems = visibleKinds.map(function (option) { return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenuItem, { className: matchesKind(option) ? undefined : DIMMED_CLASS, icon: resolveInterfaceIcon(option), label: resolveKindLabel(option), selected: option === kind, disabled: disabled, onClick: function () { return onKindChange(option); } }, option)); });
|
|
254
|
+
var interfaces = (function () {
|
|
255
|
+
if (error) {
|
|
256
|
+
return ((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(label.toLowerCase()),
|
|
257
|
+
/* the specific failure is the tooltip — the pane states the outcome */
|
|
258
|
+
tooltip: error, onClick: onRetry }) }));
|
|
259
|
+
}
|
|
260
|
+
if (loading) {
|
|
261
|
+
return ((0, jsx_runtime_1.jsxs)(reqore_1.ReqoreSpinner, { iconColor: 'info', size: 'small', centered: true, children: ["Loading ", label.toLowerCase(), "\u2026"] }));
|
|
262
|
+
}
|
|
263
|
+
if (!visibleItems.length) {
|
|
264
|
+
return (0, jsx_runtime_1.jsx)(Note, { children: emptyNote() });
|
|
265
|
+
}
|
|
266
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: visibleItems.map(function (_a) {
|
|
267
|
+
var name = _a.name, description = _a.description, badge = _a.badge;
|
|
268
|
+
var isPicked = pickedNames.has(name);
|
|
269
|
+
var removable = isPicked && !!onRemove;
|
|
270
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenuItem, __assign({ className: isPicked ? PICKED_CLASS : undefined, icon: resolveInterfaceIcon(kind), rightIcon: isPicked ? 'CheckLine' : 'AddLine', label: name, description: description, badge: badge, disabled: disabled, tooltip: isPicked
|
|
271
|
+
? removable
|
|
272
|
+
? "Remove \u201C".concat(name, "\u201D")
|
|
273
|
+
: "\u201C".concat(name, "\u201D is already referenced")
|
|
274
|
+
: "Reference \u201C".concat(name, "\u201D"), onClick: !isPicked || removable ? function () { return toggle(name); } : undefined }, pickedItemProps(isPicked)), name));
|
|
275
|
+
}) }));
|
|
276
|
+
})();
|
|
277
|
+
var maxHeight = asModal
|
|
278
|
+
? MODAL_MAX_HEIGHT
|
|
279
|
+
: stacked
|
|
280
|
+
? STACKED_MAX_HEIGHT
|
|
281
|
+
: COLUMNS_MAX_HEIGHT;
|
|
282
|
+
/* Stacked: one column, with the selected kind's interfaces spliced in directly
|
|
283
|
+
under its row. A kind the host hasn't listed puts them at the end rather than
|
|
284
|
+
dropping them. */
|
|
285
|
+
var selectedIndex = visibleKinds.indexOf(kind);
|
|
286
|
+
var splitAt = selectedIndex === -1 ? visibleKinds.length : selectedIndex + 1;
|
|
287
|
+
var body = ((0, jsx_runtime_1.jsxs)(Frame, { ref: frameRef, "$bare": asModal, children: [header, (0, jsx_runtime_1.jsx)(Search, { "$accent": accent, "$active": !!needle, children: (0, jsx_runtime_1.jsx)(reqore_1.ReqoreInput, { value: query, onChange: function (event) { return setQuery(event.target.value); }, placeholder: 'Search types and interfaces\u2026', icon: 'SearchLine', minimal: true, flat: true, transparent: true, fluid: true, disabled: disabled, onClearClick: query ? function () { return setQuery(''); } : undefined }) }), stacked ? ((0, jsx_runtime_1.jsxs)(Stack, { "$maxHeight": maxHeight, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: kindItems.slice(0, splitAt) }), (0, jsx_runtime_1.jsx)(Nested, { children: interfaces }), splitAt < kindItems.length ? ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: kindItems.slice(splitAt) })) : null] })) : ((0, jsx_runtime_1.jsxs)(Panes, { children: [(0, jsx_runtime_1.jsx)(Pane, { "$maxHeight": maxHeight, children: (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMenu, { transparent: true, flat: true, padded: false, width: '100%', size: 'small', children: kindItems }) }), (0, jsx_runtime_1.jsx)(Pane, { "$right": true, "$maxHeight": maxHeight, children: interfaces })] }))] }));
|
|
288
|
+
if (!asModal) {
|
|
289
|
+
return body;
|
|
290
|
+
}
|
|
291
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreModal, { isOpen: true, icon: 'LinksLine', label: title, width: '100%', blur: 3, onClose: onClose, children: body }));
|
|
292
|
+
};
|
|
293
|
+
exports.ReferencePicker = ReferencePicker;
|
|
294
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
295
|
+
//# sourceMappingURL=ReferencePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferencePicker.js","sourceRoot":"","sources":["../../../src/components/supportTicket/ReferencePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAMkC;AAGlC,+BAA6E;AAC7E,wEAAuC;AACvC,qDAAwD;AACxD,+BAIgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,0FAA0F;AAC1F,IAAM,kBAAkB,GAAG,OAAO,CAAC;AACnC,IAAM,kBAAkB,GAAG,OAAO,CAAC;AACnC,IAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,IAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,kFAAkF;AAClF,IAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,IAAM,MAAM,GAAG,2BAA2B,CAAC;AAC3C;;;GAGG;AACH,IAAM,YAAY,GAAG,gCAAgC,CAAC;AACtD;;;;GAIG;AACH,IAAM,YAAY,GAAG,gCAAgC,CAAC;AAEtD;;;;;GAKG;AACH,IAAM,IAAI,GAAG,2BAAM,CAAC,GAAG,oJAA0C,MAC7D,EAGiF,kBACrE,EAA8B,+CAI1C,EAAa,IAChB,KATG,UAAC,EAAU;QAAR,MAAM,YAAA;IACT,OAAA,MAAM;QACJ,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,iBAAU,eAAe,qDAA2C,MAAM,MAAG;AAFjF,CAEiF,EACrE,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,OAAA,UAAU;AAAV,CAAU,EAI1C,yBAAa,CAChB,CAAC;AAEF,4EAA4E;AAC5E,IAAM,KAAK,GAAG,2BAAM,CAAC,GAAG,4IAAwB,kBAChC,EAA8B,+CAI1C,EAAa,IAChB,KALe,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,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AC,CAAC,CACT,wBAAC,KAAK,kBAAa,SAAS,aAC1B,uBAAC,mBAAU,IAAC,WAAW,QAAC,IAAI,QAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,YAClE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,GACjB,EACb,uBAAC,MAAM,cAAE,UAAU,GAAU,EAC5B,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAC5B,uBAAC,mBAAU,IAAC,WAAW,QAAC,IAAI,QAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,YAClE,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,GACd,CACd,CAAC,CAAC,CAAC,IAAI,IACF,CACT,CAAC,CAAC,CAAC,CACF,wBAAC,KAAK,eACJ,uBAAC,IAAI,kBAAa,SAAS,YACzB,uBAAC,mBAAU,IAAC,WAAW,QAAC,IAAI,QAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,YAClE,SAAS,GACC,GACR,EACP,uBAAC,IAAI,kCAAoB,SAAS,YAC/B,UAAU,GACN,IACD,CACT,IACK,CACT,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,uBAAC,oBAAW,IAAC,MAAM,QAAC,IAAI,EAAC,WAAW,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,EAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,YACtF,IAAI,GACO,CACf,CAAC;AACJ,CAAC,CAAC;AA9PW,QAAA,eAAe,mBA8P1B"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,K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