qt-ui-kit 1.0.32 → 1.0.34

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 CHANGED
@@ -64,8 +64,9 @@ type TicketComment = {
64
64
  };
65
65
 
66
66
  type Props$6 = {
67
- onRead?: () => void;
68
- onSelected?: () => void;
67
+ eventID: string;
68
+ onSelected?: (eventID: string) => void;
69
+ onChecked?: (eventID: string) => void;
69
70
  service?: IntegrationService;
70
71
  subjectLine?: string;
71
72
  body?: string;
@@ -76,8 +77,9 @@ type Props$6 = {
76
77
  onClickGoToSource?: (() => void) | undefined;
77
78
  urgencyLevel?: UrgencyLevel;
78
79
  alert?: boolean;
80
+ read?: boolean;
79
81
  };
80
- declare function PreviewCard({ onRead, onSelected, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, }: Props$6): react_jsx_runtime.JSX.Element;
82
+ declare function PreviewCard({ eventID, onSelected, onChecked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, read, }: Props$6): react_jsx_runtime.JSX.Element;
81
83
 
82
84
  type NavButtonKey = "queue" | "account" | "logout";
83
85
  type NavButtonConfig = {
package/dist/index.d.ts CHANGED
@@ -64,8 +64,9 @@ type TicketComment = {
64
64
  };
65
65
 
66
66
  type Props$6 = {
67
- onRead?: () => void;
68
- onSelected?: () => void;
67
+ eventID: string;
68
+ onSelected?: (eventID: string) => void;
69
+ onChecked?: (eventID: string) => void;
69
70
  service?: IntegrationService;
70
71
  subjectLine?: string;
71
72
  body?: string;
@@ -76,8 +77,9 @@ type Props$6 = {
76
77
  onClickGoToSource?: (() => void) | undefined;
77
78
  urgencyLevel?: UrgencyLevel;
78
79
  alert?: boolean;
80
+ read?: boolean;
79
81
  };
80
- declare function PreviewCard({ onRead, onSelected, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, }: Props$6): react_jsx_runtime.JSX.Element;
82
+ declare function PreviewCard({ eventID, onSelected, onChecked, service, subjectLine, body, sender, source, metadata, date, onClickGoToSource, urgencyLevel, alert, read, }: Props$6): react_jsx_runtime.JSX.Element;
81
83
 
82
84
  type NavButtonKey = "queue" | "account" | "logout";
83
85
  type NavButtonConfig = {
package/dist/index.js CHANGED
@@ -15153,8 +15153,9 @@ function CategoryIconButton({ icon, label, active }) {
15153
15153
  // src/components/organisms/preview_card/preview_card.tsx
15154
15154
  var import_jsx_runtime17 = require("react/jsx-runtime");
15155
15155
  function PreviewCard({
15156
- onRead,
15156
+ eventID,
15157
15157
  onSelected,
15158
+ onChecked,
15158
15159
  service,
15159
15160
  subjectLine,
15160
15161
  body,
@@ -15164,35 +15165,11 @@ function PreviewCard({
15164
15165
  date,
15165
15166
  onClickGoToSource,
15166
15167
  urgencyLevel,
15167
- alert
15168
+ alert,
15169
+ read
15168
15170
  }) {
15169
15171
  const [selected, setSelected] = (0, import_react.useState)(false);
15170
15172
  const [checked, setChecked] = (0, import_react.useState)(false);
15171
- const [read, setRead] = (0, import_react.useState)(false);
15172
- function intializeState() {
15173
- }
15174
- function toggleRead() {
15175
- if (onRead) {
15176
- try {
15177
- onRead();
15178
- } catch (e) {
15179
- console.log(`Failed to execute: onRead() | [${e}]`);
15180
- return;
15181
- }
15182
- }
15183
- setRead(!read);
15184
- }
15185
- function toggleSelected() {
15186
- if (onSelected) {
15187
- try {
15188
- onSelected();
15189
- } catch (e) {
15190
- console.log(`Failed to execute: onSelected() | [${e}]`);
15191
- return;
15192
- }
15193
- }
15194
- setSelected(!selected);
15195
- }
15196
15173
  function getColorVariant(urgency) {
15197
15174
  switch (urgency) {
15198
15175
  case "high" /* HIGH */:
@@ -15205,6 +15182,18 @@ function PreviewCard({
15205
15182
  return void 0;
15206
15183
  }
15207
15184
  }
15185
+ function toggleSelected() {
15186
+ setSelected(!selected);
15187
+ if (onSelected) {
15188
+ onSelected(eventID);
15189
+ }
15190
+ }
15191
+ function toggleChecked() {
15192
+ setChecked(!checked);
15193
+ if (onChecked) {
15194
+ onChecked(eventID);
15195
+ }
15196
+ }
15208
15197
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15209
15198
  "div",
15210
15199
  {
@@ -15216,19 +15205,10 @@ function PreviewCard({
15216
15205
  onClick: (e) => {
15217
15206
  e.stopPropagation();
15218
15207
  toggleSelected();
15219
- if (!read) {
15220
- toggleRead();
15221
- }
15222
15208
  },
15223
15209
  children: [
15224
15210
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-4 place-items-center", children: [
15225
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15226
- SecondaryCheckBox,
15227
- {
15228
- active: checked,
15229
- onClick: () => setChecked(!checked)
15230
- }
15231
- ),
15211
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SecondaryCheckBox, { active: checked, onClick: toggleChecked }),
15232
15212
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BrandIcon, { service, size: 24 }),
15233
15213
  urgencyLevel && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15234
15214
  CategoryIconButton,