qt-ui-kit 1.0.44 → 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 -15
- package/dist/index.d.ts +23 -15
- 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
|
@@ -10,7 +10,6 @@ declare enum IntegrationService {
|
|
|
10
10
|
MSCAL = "microsoft_calendar",
|
|
11
11
|
AJIRA = "atlassian_jira"
|
|
12
12
|
}
|
|
13
|
-
type FilterValues = IntegrationService | "done" | "new" | "fires";
|
|
14
13
|
declare enum BaseIconName {
|
|
15
14
|
SEARCH = "search",
|
|
16
15
|
EXTERNAL_LINK = "external_link",
|
|
@@ -63,7 +62,7 @@ type TicketComment = {
|
|
|
63
62
|
emojis?: string[];
|
|
64
63
|
};
|
|
65
64
|
|
|
66
|
-
type Props$
|
|
65
|
+
type Props$7 = {
|
|
67
66
|
eventID: string;
|
|
68
67
|
onSelected?: (eventID: string) => void;
|
|
69
68
|
selected?: boolean;
|
|
@@ -80,28 +79,28 @@ type Props$6 = {
|
|
|
80
79
|
alert?: boolean;
|
|
81
80
|
read?: boolean;
|
|
82
81
|
};
|
|
83
|
-
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;
|
|
84
83
|
|
|
85
84
|
type NavButtonKey = "queue" | "account" | "logout";
|
|
86
85
|
type NavButtonConfig$1 = {
|
|
87
86
|
active?: boolean;
|
|
88
87
|
onClick?: () => void;
|
|
89
88
|
};
|
|
90
|
-
type Props$
|
|
89
|
+
type Props$6 = {
|
|
91
90
|
buttons?: Partial<Record<NavButtonKey, NavButtonConfig$1>>;
|
|
92
91
|
};
|
|
93
|
-
declare function NavBar({ buttons }: Props$
|
|
92
|
+
declare function NavBar({ buttons }: Props$6): react_jsx_runtime.JSX.Element;
|
|
94
93
|
|
|
95
|
-
type Props$
|
|
94
|
+
type Props$5 = {
|
|
96
95
|
eventType?: EventType;
|
|
97
96
|
eventData?: EventGroup[];
|
|
98
97
|
groupUrgency?: UrgencyLevel;
|
|
99
98
|
groupUrgencyText?: string;
|
|
100
99
|
groupSummary?: string;
|
|
101
100
|
};
|
|
102
|
-
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;
|
|
103
102
|
|
|
104
|
-
type Props$
|
|
103
|
+
type Props$4 = {
|
|
105
104
|
subjectLine?: string;
|
|
106
105
|
to?: string;
|
|
107
106
|
date?: string;
|
|
@@ -111,9 +110,9 @@ type Props$3 = {
|
|
|
111
110
|
attachments?: string;
|
|
112
111
|
body?: string;
|
|
113
112
|
};
|
|
114
|
-
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;
|
|
115
114
|
|
|
116
|
-
type Props$
|
|
115
|
+
type Props$3 = {
|
|
117
116
|
messages?: ChatData[];
|
|
118
117
|
};
|
|
119
118
|
type ChatData = {
|
|
@@ -126,9 +125,9 @@ type ChatData = {
|
|
|
126
125
|
image?: string;
|
|
127
126
|
emojis?: string[];
|
|
128
127
|
};
|
|
129
|
-
declare function ChatBody({ messages }: Props$
|
|
128
|
+
declare function ChatBody({ messages }: Props$3): react_jsx_runtime.JSX.Element;
|
|
130
129
|
|
|
131
|
-
type Props$
|
|
130
|
+
type Props$2 = {
|
|
132
131
|
issueNumber?: string;
|
|
133
132
|
notification?: string;
|
|
134
133
|
project?: string;
|
|
@@ -143,9 +142,18 @@ type Props$1 = {
|
|
|
143
142
|
description?: string;
|
|
144
143
|
comments?: TicketComment[];
|
|
145
144
|
};
|
|
146
|
-
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;
|
|
147
146
|
|
|
148
|
-
|
|
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;
|
|
149
157
|
|
|
150
158
|
type FilterButtonKey = "fires" | "unread" | "incomplete" | "more" | IntegrationService;
|
|
151
159
|
type NavButtonConfig = {
|
|
@@ -247,4 +255,4 @@ type Event = {
|
|
|
247
255
|
|
|
248
256
|
declare const fakeMessages: ChatData[];
|
|
249
257
|
|
|
250
|
-
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
|
|
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
|
@@ -10,7 +10,6 @@ declare enum IntegrationService {
|
|
|
10
10
|
MSCAL = "microsoft_calendar",
|
|
11
11
|
AJIRA = "atlassian_jira"
|
|
12
12
|
}
|
|
13
|
-
type FilterValues = IntegrationService | "done" | "new" | "fires";
|
|
14
13
|
declare enum BaseIconName {
|
|
15
14
|
SEARCH = "search",
|
|
16
15
|
EXTERNAL_LINK = "external_link",
|
|
@@ -63,7 +62,7 @@ type TicketComment = {
|
|
|
63
62
|
emojis?: string[];
|
|
64
63
|
};
|
|
65
64
|
|
|
66
|
-
type Props$
|
|
65
|
+
type Props$7 = {
|
|
67
66
|
eventID: string;
|
|
68
67
|
onSelected?: (eventID: string) => void;
|
|
69
68
|
selected?: boolean;
|
|
@@ -80,28 +79,28 @@ type Props$6 = {
|
|
|
80
79
|
alert?: boolean;
|
|
81
80
|
read?: boolean;
|
|
82
81
|
};
|
|
83
|
-
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;
|
|
84
83
|
|
|
85
84
|
type NavButtonKey = "queue" | "account" | "logout";
|
|
86
85
|
type NavButtonConfig$1 = {
|
|
87
86
|
active?: boolean;
|
|
88
87
|
onClick?: () => void;
|
|
89
88
|
};
|
|
90
|
-
type Props$
|
|
89
|
+
type Props$6 = {
|
|
91
90
|
buttons?: Partial<Record<NavButtonKey, NavButtonConfig$1>>;
|
|
92
91
|
};
|
|
93
|
-
declare function NavBar({ buttons }: Props$
|
|
92
|
+
declare function NavBar({ buttons }: Props$6): react_jsx_runtime.JSX.Element;
|
|
94
93
|
|
|
95
|
-
type Props$
|
|
94
|
+
type Props$5 = {
|
|
96
95
|
eventType?: EventType;
|
|
97
96
|
eventData?: EventGroup[];
|
|
98
97
|
groupUrgency?: UrgencyLevel;
|
|
99
98
|
groupUrgencyText?: string;
|
|
100
99
|
groupSummary?: string;
|
|
101
100
|
};
|
|
102
|
-
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;
|
|
103
102
|
|
|
104
|
-
type Props$
|
|
103
|
+
type Props$4 = {
|
|
105
104
|
subjectLine?: string;
|
|
106
105
|
to?: string;
|
|
107
106
|
date?: string;
|
|
@@ -111,9 +110,9 @@ type Props$3 = {
|
|
|
111
110
|
attachments?: string;
|
|
112
111
|
body?: string;
|
|
113
112
|
};
|
|
114
|
-
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;
|
|
115
114
|
|
|
116
|
-
type Props$
|
|
115
|
+
type Props$3 = {
|
|
117
116
|
messages?: ChatData[];
|
|
118
117
|
};
|
|
119
118
|
type ChatData = {
|
|
@@ -126,9 +125,9 @@ type ChatData = {
|
|
|
126
125
|
image?: string;
|
|
127
126
|
emojis?: string[];
|
|
128
127
|
};
|
|
129
|
-
declare function ChatBody({ messages }: Props$
|
|
128
|
+
declare function ChatBody({ messages }: Props$3): react_jsx_runtime.JSX.Element;
|
|
130
129
|
|
|
131
|
-
type Props$
|
|
130
|
+
type Props$2 = {
|
|
132
131
|
issueNumber?: string;
|
|
133
132
|
notification?: string;
|
|
134
133
|
project?: string;
|
|
@@ -143,9 +142,18 @@ type Props$1 = {
|
|
|
143
142
|
description?: string;
|
|
144
143
|
comments?: TicketComment[];
|
|
145
144
|
};
|
|
146
|
-
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;
|
|
147
146
|
|
|
148
|
-
|
|
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;
|
|
149
157
|
|
|
150
158
|
type FilterButtonKey = "fires" | "unread" | "incomplete" | "more" | IntegrationService;
|
|
151
159
|
type NavButtonConfig = {
|
|
@@ -247,4 +255,4 @@ type Event = {
|
|
|
247
255
|
|
|
248
256
|
declare const fakeMessages: ChatData[];
|
|
249
257
|
|
|
250
|
-
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
|
|
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),
|