qt-ui-kit 1.0.31 → 1.0.33
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +63 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -65,7 +65,11 @@ type TicketComment = {
|
|
|
65
65
|
|
|
66
66
|
type Props$6 = {
|
|
67
67
|
onRead?: () => void;
|
|
68
|
+
read?: boolean;
|
|
68
69
|
onSelected?: () => void;
|
|
70
|
+
selected?: boolean;
|
|
71
|
+
onChecked?: () => void;
|
|
72
|
+
checked?: boolean;
|
|
69
73
|
service?: IntegrationService;
|
|
70
74
|
subjectLine?: string;
|
|
71
75
|
body?: string;
|
|
@@ -77,7 +81,7 @@ type Props$6 = {
|
|
|
77
81
|
urgencyLevel?: UrgencyLevel;
|
|
78
82
|
alert?: boolean;
|
|
79
83
|
};
|
|
80
|
-
declare function PreviewCard({ onRead, onSelected, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, }: Props$6): react_jsx_runtime.JSX.Element;
|
|
84
|
+
declare function PreviewCard({ onRead, read, onSelected, selected, onChecked, checked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, }: Props$6): react_jsx_runtime.JSX.Element;
|
|
81
85
|
|
|
82
86
|
type NavButtonKey = "queue" | "account" | "logout";
|
|
83
87
|
type NavButtonConfig = {
|
package/dist/index.d.ts
CHANGED
|
@@ -65,7 +65,11 @@ type TicketComment = {
|
|
|
65
65
|
|
|
66
66
|
type Props$6 = {
|
|
67
67
|
onRead?: () => void;
|
|
68
|
+
read?: boolean;
|
|
68
69
|
onSelected?: () => void;
|
|
70
|
+
selected?: boolean;
|
|
71
|
+
onChecked?: () => void;
|
|
72
|
+
checked?: boolean;
|
|
69
73
|
service?: IntegrationService;
|
|
70
74
|
subjectLine?: string;
|
|
71
75
|
body?: string;
|
|
@@ -77,7 +81,7 @@ type Props$6 = {
|
|
|
77
81
|
urgencyLevel?: UrgencyLevel;
|
|
78
82
|
alert?: boolean;
|
|
79
83
|
};
|
|
80
|
-
declare function PreviewCard({ onRead, onSelected, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, }: Props$6): react_jsx_runtime.JSX.Element;
|
|
84
|
+
declare function PreviewCard({ onRead, read, onSelected, selected, onChecked, checked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, }: Props$6): react_jsx_runtime.JSX.Element;
|
|
81
85
|
|
|
82
86
|
type NavButtonKey = "queue" | "account" | "logout";
|
|
83
87
|
type NavButtonConfig = {
|
package/dist/index.js
CHANGED
|
@@ -11195,9 +11195,6 @@ __export(index_exports, {
|
|
|
11195
11195
|
});
|
|
11196
11196
|
module.exports = __toCommonJS(index_exports);
|
|
11197
11197
|
|
|
11198
|
-
// src/components/organisms/preview_card/preview_card.tsx
|
|
11199
|
-
var import_react = require("react");
|
|
11200
|
-
|
|
11201
11198
|
// src/types/global.ts
|
|
11202
11199
|
var IntegrationService = /* @__PURE__ */ ((IntegrationService5) => {
|
|
11203
11200
|
IntegrationService5["SLACK"] = "slack";
|
|
@@ -13138,22 +13135,58 @@ function ExternalLink({
|
|
|
13138
13135
|
case 16:
|
|
13139
13136
|
return {
|
|
13140
13137
|
viewBox: "0 0 16 16",
|
|
13141
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13138
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13139
|
+
"path",
|
|
13140
|
+
{
|
|
13141
|
+
d: "M6.66699 3.99996H4.00033C3.26395 3.99996 2.66699 4.59691 2.66699 5.33329V12C2.66699 12.7363 3.26395 13.3333 4.00033 13.3333H10.667C11.4034 13.3333 12.0003 12.7363 12.0003 12V9.33329M9.33366 2.66663H13.3337M13.3337 2.66663V6.66663M13.3337 2.66663L6.66699 9.33329",
|
|
13142
|
+
stroke: color,
|
|
13143
|
+
strokeWidth: "1.25",
|
|
13144
|
+
strokeLinecap: "round",
|
|
13145
|
+
strokeLinejoin: "round"
|
|
13146
|
+
}
|
|
13147
|
+
)
|
|
13142
13148
|
};
|
|
13143
13149
|
case 20:
|
|
13144
13150
|
return {
|
|
13145
13151
|
viewBox: "0 0 20 20",
|
|
13146
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13152
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13153
|
+
"path",
|
|
13154
|
+
{
|
|
13155
|
+
d: "M8.33301 5.00004H4.99967C4.0792 5.00004 3.33301 5.74623 3.33301 6.66671V15C3.33301 15.9205 4.0792 16.6667 4.99967 16.6667H13.333C14.2535 16.6667 14.9997 15.9205 14.9997 15V11.6667M11.6663 3.33337H16.6663M16.6663 3.33337V8.33337M16.6663 3.33337L8.33301 11.6667",
|
|
13156
|
+
stroke: color,
|
|
13157
|
+
strokeWidth: "1.5",
|
|
13158
|
+
strokeLinecap: "round",
|
|
13159
|
+
strokeLinejoin: "round"
|
|
13160
|
+
}
|
|
13161
|
+
)
|
|
13147
13162
|
};
|
|
13148
13163
|
case 24:
|
|
13149
13164
|
return {
|
|
13150
13165
|
viewBox: "0 0 24 24",
|
|
13151
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13166
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13167
|
+
"path",
|
|
13168
|
+
{
|
|
13169
|
+
d: "M10 6H6C4.89543 6 4 6.89543 4 8V18C4 19.1046 4.89543 20 6 20H16C17.1046 20 18 19.1046 18 18V14M14 4H20M20 4V10M20 4L10 14",
|
|
13170
|
+
stroke: color,
|
|
13171
|
+
strokeWidth: "2",
|
|
13172
|
+
strokeLinecap: "round",
|
|
13173
|
+
strokeLinejoin: "round"
|
|
13174
|
+
}
|
|
13175
|
+
)
|
|
13152
13176
|
};
|
|
13153
13177
|
case 36:
|
|
13154
13178
|
return {
|
|
13155
13179
|
viewBox: "0 0 36 36",
|
|
13156
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13180
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13181
|
+
"path",
|
|
13182
|
+
{
|
|
13183
|
+
d: "M15 9H9C7.34315 9 6 10.3431 6 12V27C6 28.6569 7.34315 30 9 30H24C25.6569 30 27 28.6569 27 27V21M21 6H30M30 6V15M30 6L15 21",
|
|
13184
|
+
stroke: color,
|
|
13185
|
+
strokeWidth: "2.25",
|
|
13186
|
+
strokeLinecap: "round",
|
|
13187
|
+
strokeLinejoin: "round"
|
|
13188
|
+
}
|
|
13189
|
+
)
|
|
13157
13190
|
};
|
|
13158
13191
|
}
|
|
13159
13192
|
};
|
|
@@ -15118,7 +15151,11 @@ function CategoryIconButton({ icon, label, active }) {
|
|
|
15118
15151
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
15119
15152
|
function PreviewCard({
|
|
15120
15153
|
onRead,
|
|
15154
|
+
read,
|
|
15121
15155
|
onSelected,
|
|
15156
|
+
selected,
|
|
15157
|
+
onChecked,
|
|
15158
|
+
checked,
|
|
15122
15159
|
service,
|
|
15123
15160
|
subjectLine,
|
|
15124
15161
|
body,
|
|
@@ -15130,33 +15167,6 @@ function PreviewCard({
|
|
|
15130
15167
|
urgencyLevel,
|
|
15131
15168
|
alert
|
|
15132
15169
|
}) {
|
|
15133
|
-
const [selected, setSelected] = (0, import_react.useState)(false);
|
|
15134
|
-
const [checked, setChecked] = (0, import_react.useState)(false);
|
|
15135
|
-
const [read, setRead] = (0, import_react.useState)(false);
|
|
15136
|
-
function intializeState() {
|
|
15137
|
-
}
|
|
15138
|
-
function toggleRead() {
|
|
15139
|
-
if (onRead) {
|
|
15140
|
-
try {
|
|
15141
|
-
onRead();
|
|
15142
|
-
} catch (e) {
|
|
15143
|
-
console.log(`Failed to execute: onRead() | [${e}]`);
|
|
15144
|
-
return;
|
|
15145
|
-
}
|
|
15146
|
-
}
|
|
15147
|
-
setRead(!read);
|
|
15148
|
-
}
|
|
15149
|
-
function toggleSelected() {
|
|
15150
|
-
if (onSelected) {
|
|
15151
|
-
try {
|
|
15152
|
-
onSelected();
|
|
15153
|
-
} catch (e) {
|
|
15154
|
-
console.log(`Failed to execute: onSelected() | [${e}]`);
|
|
15155
|
-
return;
|
|
15156
|
-
}
|
|
15157
|
-
}
|
|
15158
|
-
setSelected(!selected);
|
|
15159
|
-
}
|
|
15160
15170
|
function getColorVariant(urgency) {
|
|
15161
15171
|
switch (urgency) {
|
|
15162
15172
|
case "high" /* HIGH */:
|
|
@@ -15179,20 +15189,12 @@ function PreviewCard({
|
|
|
15179
15189
|
),
|
|
15180
15190
|
onClick: (e) => {
|
|
15181
15191
|
e.stopPropagation();
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
toggleRead();
|
|
15185
|
-
}
|
|
15192
|
+
onRead && !read && onRead();
|
|
15193
|
+
onSelected && onSelected();
|
|
15186
15194
|
},
|
|
15187
15195
|
children: [
|
|
15188
15196
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-4 place-items-center", children: [
|
|
15189
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
15190
|
-
SecondaryCheckBox,
|
|
15191
|
-
{
|
|
15192
|
-
active: checked,
|
|
15193
|
-
onClick: () => setChecked(!checked)
|
|
15194
|
-
}
|
|
15195
|
-
),
|
|
15197
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SecondaryCheckBox, { active: checked, onClick: onChecked }),
|
|
15196
15198
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BrandIcon, { service, size: 24 }),
|
|
15197
15199
|
urgencyLevel && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
15198
15200
|
CategoryIconButton,
|
|
@@ -15679,7 +15681,7 @@ function MainNavButton({ icon, label, active, onClick }) {
|
|
|
15679
15681
|
children: icon
|
|
15680
15682
|
}
|
|
15681
15683
|
),
|
|
15682
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "label-3-bold text-qtpurple-500", children: label })
|
|
15684
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "label-3-bold text-qtpurple-500 select-none", children: label })
|
|
15683
15685
|
]
|
|
15684
15686
|
}
|
|
15685
15687
|
);
|
|
@@ -15738,7 +15740,7 @@ function CategoryIcon({ size = 24, icon, variant }) {
|
|
|
15738
15740
|
}
|
|
15739
15741
|
|
|
15740
15742
|
// src/components/organisms/emails/single_event.tsx
|
|
15741
|
-
var
|
|
15743
|
+
var import_react = require("react");
|
|
15742
15744
|
|
|
15743
15745
|
// src/components/organisms/intel_card/intel_card.tsx
|
|
15744
15746
|
var import_clsx6 = __toESM(require("clsx"));
|
|
@@ -15809,9 +15811,9 @@ function SingleEvent({
|
|
|
15809
15811
|
body,
|
|
15810
15812
|
startExpanded
|
|
15811
15813
|
}) {
|
|
15812
|
-
const [selected, setSelected] = (0,
|
|
15813
|
-
const [expanded, setExpanded] = (0,
|
|
15814
|
-
(0,
|
|
15814
|
+
const [selected, setSelected] = (0, import_react.useState)(false);
|
|
15815
|
+
const [expanded, setExpanded] = (0, import_react.useState)(false);
|
|
15816
|
+
(0, import_react.useEffect)(() => {
|
|
15815
15817
|
if (startExpanded) {
|
|
15816
15818
|
setExpanded(true);
|
|
15817
15819
|
}
|
|
@@ -15953,7 +15955,7 @@ function EmailBody({
|
|
|
15953
15955
|
|
|
15954
15956
|
// src/components/organisms/chat_messages/chat_bubble/chat_bubble.tsx
|
|
15955
15957
|
var import_clsx9 = __toESM(require("clsx"));
|
|
15956
|
-
var
|
|
15958
|
+
var import_react2 = require("react");
|
|
15957
15959
|
|
|
15958
15960
|
// src/components/atoms/emoji_pill/emoji_pill.tsx
|
|
15959
15961
|
var import_emoji_dictionary = __toESM(require_lib7());
|
|
@@ -15985,18 +15987,18 @@ function ChatBubble({
|
|
|
15985
15987
|
timestamp,
|
|
15986
15988
|
emojis
|
|
15987
15989
|
}) {
|
|
15988
|
-
const [expanded, setExpanded] = (0,
|
|
15989
|
-
const [truncatedText, setTruncatedText] = (0,
|
|
15990
|
-
const [uniqueEmojis, setUniqueEmojis] = (0,
|
|
15990
|
+
const [expanded, setExpanded] = (0, import_react2.useState)(false);
|
|
15991
|
+
const [truncatedText, setTruncatedText] = (0, import_react2.useState)(false);
|
|
15992
|
+
const [uniqueEmojis, setUniqueEmojis] = (0, import_react2.useState)(
|
|
15991
15993
|
/* @__PURE__ */ new Map()
|
|
15992
15994
|
);
|
|
15993
15995
|
const textLen = text?.length;
|
|
15994
|
-
(0,
|
|
15996
|
+
(0, import_react2.useEffect)(() => {
|
|
15995
15997
|
if (textLen && textLen > 450) {
|
|
15996
15998
|
setTruncatedText(true);
|
|
15997
15999
|
}
|
|
15998
16000
|
}, [text]);
|
|
15999
|
-
(0,
|
|
16001
|
+
(0, import_react2.useEffect)(() => {
|
|
16000
16002
|
if (emojis) {
|
|
16001
16003
|
const ue = emojis.reduce((acc, str) => {
|
|
16002
16004
|
acc.set(str, (acc.get(str) || 0) + 1);
|
|
@@ -16434,13 +16436,13 @@ function Search({
|
|
|
16434
16436
|
}
|
|
16435
16437
|
|
|
16436
16438
|
// src/components/organisms/search_bar/search_bar.tsx
|
|
16437
|
-
var
|
|
16439
|
+
var import_react3 = require("react");
|
|
16438
16440
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
16439
16441
|
function SearchBar() {
|
|
16440
|
-
const [query, setQuery] = (0,
|
|
16441
|
-
const [state, setState] = (0,
|
|
16442
|
-
const [results, setResults] = (0,
|
|
16443
|
-
(0,
|
|
16442
|
+
const [query, setQuery] = (0, import_react3.useState)("");
|
|
16443
|
+
const [state, setState] = (0, import_react3.useState)("inactive");
|
|
16444
|
+
const [results, setResults] = (0, import_react3.useState)([]);
|
|
16445
|
+
(0, import_react3.useEffect)(() => {
|
|
16444
16446
|
if (query === "") {
|
|
16445
16447
|
setState("inactive");
|
|
16446
16448
|
setResults([]);
|