qt-ui-kit 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +23 -14
- package/dist/index.d.ts +23 -14
- package/dist/index.js +5 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -62,7 +62,7 @@ type TicketComment = {
|
|
|
62
62
|
emojis?: string[];
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
type Props$
|
|
65
|
+
type Props$7 = {
|
|
66
66
|
eventID: string;
|
|
67
67
|
onSelected?: (eventID: string) => void;
|
|
68
68
|
selected?: boolean;
|
|
@@ -79,28 +79,28 @@ type Props$6 = {
|
|
|
79
79
|
alert?: boolean;
|
|
80
80
|
read?: boolean;
|
|
81
81
|
};
|
|
82
|
-
declare function PreviewCard({ eventID, onSelected, selected, onChecked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, read, }: Props$
|
|
82
|
+
declare function PreviewCard({ eventID, onSelected, selected, onChecked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, read, }: Props$7): react_jsx_runtime.JSX.Element;
|
|
83
83
|
|
|
84
84
|
type NavButtonKey = "queue" | "account" | "logout";
|
|
85
85
|
type NavButtonConfig$1 = {
|
|
86
86
|
active?: boolean;
|
|
87
87
|
onClick?: () => void;
|
|
88
88
|
};
|
|
89
|
-
type Props$
|
|
89
|
+
type Props$6 = {
|
|
90
90
|
buttons?: Partial<Record<NavButtonKey, NavButtonConfig$1>>;
|
|
91
91
|
};
|
|
92
|
-
declare function NavBar({ buttons }: Props$
|
|
92
|
+
declare function NavBar({ buttons }: Props$6): react_jsx_runtime.JSX.Element;
|
|
93
93
|
|
|
94
|
-
type Props$
|
|
94
|
+
type Props$5 = {
|
|
95
95
|
eventType?: EventType;
|
|
96
96
|
eventData?: EventGroup[];
|
|
97
97
|
groupUrgency?: UrgencyLevel;
|
|
98
98
|
groupUrgencyText?: string;
|
|
99
99
|
groupSummary?: string;
|
|
100
100
|
};
|
|
101
|
-
declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$
|
|
101
|
+
declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$5): react_jsx_runtime.JSX.Element;
|
|
102
102
|
|
|
103
|
-
type Props$
|
|
103
|
+
type Props$4 = {
|
|
104
104
|
subjectLine?: string;
|
|
105
105
|
to?: string;
|
|
106
106
|
date?: string;
|
|
@@ -110,9 +110,9 @@ type Props$3 = {
|
|
|
110
110
|
attachments?: string;
|
|
111
111
|
body?: string;
|
|
112
112
|
};
|
|
113
|
-
declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$
|
|
113
|
+
declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$4): react_jsx_runtime.JSX.Element;
|
|
114
114
|
|
|
115
|
-
type Props$
|
|
115
|
+
type Props$3 = {
|
|
116
116
|
messages?: ChatData[];
|
|
117
117
|
};
|
|
118
118
|
type ChatData = {
|
|
@@ -125,9 +125,9 @@ type ChatData = {
|
|
|
125
125
|
image?: string;
|
|
126
126
|
emojis?: string[];
|
|
127
127
|
};
|
|
128
|
-
declare function ChatBody({ messages }: Props$
|
|
128
|
+
declare function ChatBody({ messages }: Props$3): react_jsx_runtime.JSX.Element;
|
|
129
129
|
|
|
130
|
-
type Props$
|
|
130
|
+
type Props$2 = {
|
|
131
131
|
issueNumber?: string;
|
|
132
132
|
notification?: string;
|
|
133
133
|
project?: string;
|
|
@@ -142,9 +142,18 @@ type Props$1 = {
|
|
|
142
142
|
description?: string;
|
|
143
143
|
comments?: TicketComment[];
|
|
144
144
|
};
|
|
145
|
-
declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$
|
|
145
|
+
declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
type SearchResult = {
|
|
148
|
+
label: string;
|
|
149
|
+
count: number;
|
|
150
|
+
};
|
|
151
|
+
type Props$1 = {
|
|
152
|
+
loading?: boolean;
|
|
153
|
+
results?: SearchResult[];
|
|
154
|
+
onUpdate?: (query: string) => void;
|
|
155
|
+
};
|
|
156
|
+
declare function SearchBar({ loading, results, onUpdate }: Props$1): react_jsx_runtime.JSX.Element;
|
|
148
157
|
|
|
149
158
|
type FilterButtonKey = "fires" | "unread" | "incomplete" | "more" | IntegrationService;
|
|
150
159
|
type NavButtonConfig = {
|
|
@@ -246,4 +255,4 @@ type Event = {
|
|
|
246
255
|
|
|
247
256
|
declare const fakeMessages: ChatData[];
|
|
248
257
|
|
|
249
|
-
export { type Attachment, BaseIconName, type CalendarData, ChatBody, type ChatData, ColorVariants, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, NavBar, PreviewCard, SearchBar, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
|
|
258
|
+
export { type Attachment, BaseIconName, type CalendarData, ChatBody, type ChatData, ColorVariants, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, NavBar, PreviewCard, SearchBar, type SearchResult, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ type TicketComment = {
|
|
|
62
62
|
emojis?: string[];
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
type Props$
|
|
65
|
+
type Props$7 = {
|
|
66
66
|
eventID: string;
|
|
67
67
|
onSelected?: (eventID: string) => void;
|
|
68
68
|
selected?: boolean;
|
|
@@ -79,28 +79,28 @@ type Props$6 = {
|
|
|
79
79
|
alert?: boolean;
|
|
80
80
|
read?: boolean;
|
|
81
81
|
};
|
|
82
|
-
declare function PreviewCard({ eventID, onSelected, selected, onChecked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, read, }: Props$
|
|
82
|
+
declare function PreviewCard({ eventID, onSelected, selected, onChecked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, read, }: Props$7): react_jsx_runtime.JSX.Element;
|
|
83
83
|
|
|
84
84
|
type NavButtonKey = "queue" | "account" | "logout";
|
|
85
85
|
type NavButtonConfig$1 = {
|
|
86
86
|
active?: boolean;
|
|
87
87
|
onClick?: () => void;
|
|
88
88
|
};
|
|
89
|
-
type Props$
|
|
89
|
+
type Props$6 = {
|
|
90
90
|
buttons?: Partial<Record<NavButtonKey, NavButtonConfig$1>>;
|
|
91
91
|
};
|
|
92
|
-
declare function NavBar({ buttons }: Props$
|
|
92
|
+
declare function NavBar({ buttons }: Props$6): react_jsx_runtime.JSX.Element;
|
|
93
93
|
|
|
94
|
-
type Props$
|
|
94
|
+
type Props$5 = {
|
|
95
95
|
eventType?: EventType;
|
|
96
96
|
eventData?: EventGroup[];
|
|
97
97
|
groupUrgency?: UrgencyLevel;
|
|
98
98
|
groupUrgencyText?: string;
|
|
99
99
|
groupSummary?: string;
|
|
100
100
|
};
|
|
101
|
-
declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$
|
|
101
|
+
declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$5): react_jsx_runtime.JSX.Element;
|
|
102
102
|
|
|
103
|
-
type Props$
|
|
103
|
+
type Props$4 = {
|
|
104
104
|
subjectLine?: string;
|
|
105
105
|
to?: string;
|
|
106
106
|
date?: string;
|
|
@@ -110,9 +110,9 @@ type Props$3 = {
|
|
|
110
110
|
attachments?: string;
|
|
111
111
|
body?: string;
|
|
112
112
|
};
|
|
113
|
-
declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$
|
|
113
|
+
declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$4): react_jsx_runtime.JSX.Element;
|
|
114
114
|
|
|
115
|
-
type Props$
|
|
115
|
+
type Props$3 = {
|
|
116
116
|
messages?: ChatData[];
|
|
117
117
|
};
|
|
118
118
|
type ChatData = {
|
|
@@ -125,9 +125,9 @@ type ChatData = {
|
|
|
125
125
|
image?: string;
|
|
126
126
|
emojis?: string[];
|
|
127
127
|
};
|
|
128
|
-
declare function ChatBody({ messages }: Props$
|
|
128
|
+
declare function ChatBody({ messages }: Props$3): react_jsx_runtime.JSX.Element;
|
|
129
129
|
|
|
130
|
-
type Props$
|
|
130
|
+
type Props$2 = {
|
|
131
131
|
issueNumber?: string;
|
|
132
132
|
notification?: string;
|
|
133
133
|
project?: string;
|
|
@@ -142,9 +142,18 @@ type Props$1 = {
|
|
|
142
142
|
description?: string;
|
|
143
143
|
comments?: TicketComment[];
|
|
144
144
|
};
|
|
145
|
-
declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$
|
|
145
|
+
declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
type SearchResult = {
|
|
148
|
+
label: string;
|
|
149
|
+
count: number;
|
|
150
|
+
};
|
|
151
|
+
type Props$1 = {
|
|
152
|
+
loading?: boolean;
|
|
153
|
+
results?: SearchResult[];
|
|
154
|
+
onUpdate?: (query: string) => void;
|
|
155
|
+
};
|
|
156
|
+
declare function SearchBar({ loading, results, onUpdate }: Props$1): react_jsx_runtime.JSX.Element;
|
|
148
157
|
|
|
149
158
|
type FilterButtonKey = "fires" | "unread" | "incomplete" | "more" | IntegrationService;
|
|
150
159
|
type NavButtonConfig = {
|
|
@@ -246,4 +255,4 @@ type Event = {
|
|
|
246
255
|
|
|
247
256
|
declare const fakeMessages: ChatData[];
|
|
248
257
|
|
|
249
|
-
export { type Attachment, BaseIconName, type CalendarData, ChatBody, type ChatData, ColorVariants, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, NavBar, PreviewCard, SearchBar, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
|
|
258
|
+
export { type Attachment, BaseIconName, type CalendarData, ChatBody, type ChatData, ColorVariants, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, NavBar, PreviewCard, SearchBar, type SearchResult, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
|
package/dist/index.js
CHANGED
|
@@ -16453,38 +16453,20 @@ function Search({
|
|
|
16453
16453
|
// src/components/organisms/search_bar/search_bar.tsx
|
|
16454
16454
|
var import_react4 = require("react");
|
|
16455
16455
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
16456
|
-
function SearchBar() {
|
|
16456
|
+
function SearchBar({ loading, results, onUpdate }) {
|
|
16457
16457
|
const [query, setQuery] = (0, import_react4.useState)("");
|
|
16458
|
-
const [state, setState] = (0, import_react4.useState)("inactive");
|
|
16459
|
-
const [results, setResults] = (0, import_react4.useState)([]);
|
|
16460
16458
|
(0, import_react4.useEffect)(() => {
|
|
16461
|
-
if (
|
|
16462
|
-
setState("inactive");
|
|
16463
|
-
setResults([]);
|
|
16459
|
+
if (!onUpdate) {
|
|
16464
16460
|
return;
|
|
16465
16461
|
}
|
|
16466
|
-
|
|
16467
|
-
const timeout = setTimeout(() => {
|
|
16468
|
-
setState("loading");
|
|
16469
|
-
setTimeout(() => {
|
|
16470
|
-
setState("results");
|
|
16471
|
-
setResults([
|
|
16472
|
-
{ label: "Unread", count: 11 },
|
|
16473
|
-
{ label: "Fire", count: 11 },
|
|
16474
|
-
{ label: "Slack", count: 9 },
|
|
16475
|
-
{ label: "Jira", count: 2 }
|
|
16476
|
-
]);
|
|
16477
|
-
}, 1e3);
|
|
16478
|
-
}, 300);
|
|
16479
|
-
return () => clearTimeout(timeout);
|
|
16462
|
+
onUpdate(query);
|
|
16480
16463
|
}, [query]);
|
|
16481
16464
|
const clearQuery = () => {
|
|
16482
16465
|
setQuery("");
|
|
16483
|
-
setState("inactive");
|
|
16484
16466
|
};
|
|
16485
16467
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "w-full space-y-3", children: [
|
|
16486
16468
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center px-4 py-2 rounded-full bg-gray-100 gap-2 text-gray-900", children: [
|
|
16487
|
-
|
|
16469
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Loading, {}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Search, {}),
|
|
16488
16470
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
16489
16471
|
"input",
|
|
16490
16472
|
{
|
|
@@ -16497,7 +16479,7 @@ function SearchBar() {
|
|
|
16497
16479
|
),
|
|
16498
16480
|
query && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("button", { onClick: clearQuery, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CircleX, {}) })
|
|
16499
16481
|
] }),
|
|
16500
|
-
|
|
16482
|
+
results && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "text-sm", children: [
|
|
16501
16483
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: "text-gray-700 font-medium", children: [
|
|
16502
16484
|
"Search results (",
|
|
16503
16485
|
results.reduce((acc, r) => acc + r.count, 0),
|