@dxs-ts/eveli-ide 0.0.430 → 0.0.431

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.
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { TaskApi } from '../api-task';
3
- import { TaskCardStyleDefinition } from './cardThemeConfig';
4
- export declare const TaskNotes: React.FC<{
3
+ import { TaskCardStyleDefinition } from '../eveli-task-composer-v2/cardThemeConfig';
4
+ export declare const EveliTaskNotes: React.FC<{
5
5
  task: TaskApi.Task;
6
6
  style: TaskCardStyleDefinition;
7
7
  }>;
@@ -0,0 +1 @@
1
+ export * from './EveliTaskNotes';
package/build/index.js CHANGED
@@ -57044,7 +57044,7 @@ function UK(e) {
57044
57044
  })
57045
57045
  };
57046
57046
  }
57047
- const DS = { tag: "eveli-ide-0.0.430", built: "22/07/2025" }, wx = we("worker/rest/api/version.GET")({
57047
+ const DS = { tag: "eveli-ide-0.0.431", built: "22/07/2025" }, wx = we("worker/rest/api/version.GET")({
57048
57048
  hook: $K
57049
57049
  });
57050
57050
  function $K(e) {
@@ -69955,49 +69955,8 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
69955
69955
  /* @__PURE__ */ i(Vi, { value: e, label: "Card Style", onChange: (a) => {
69956
69956
  t(a.target.value);
69957
69957
  }, children: Object.entries(jre).map(([a, r]) => /* @__PURE__ */ i(lt, { value: a, children: r }, a)) })
69958
- ] }), eie = (e) => e ? (e instanceof Date ? Pe.fromJSDate(e) : Pe.fromISO(e)).setLocale("fi").toLocaleString(Pe.DATE_SHORT) : "--", tie = ({ task: e, style: t }) => {
69959
- var s;
69960
- const n = aie(), a = ((s = e.comments) == null ? void 0 : s.filter((o) => !o.external)) || [];
69961
- if (!a || a.length === 0)
69962
- return /* @__PURE__ */ i(W, { children: "No notes" });
69963
- const r = (o, l) => o.length <= l ? o : o.slice(0, l) + "…";
69964
- return /* @__PURE__ */ E(nie, { className: n.notesContainer, children: [
69965
- a.slice(0, 3).map((o) => /* @__PURE__ */ i(R, { children: /* @__PURE__ */ E(W, { children: [
69966
- /* @__PURE__ */ E(R, { display: "flex", alignItems: "center", children: [
69967
- /* @__PURE__ */ i(Pf, { sx: { fontSize: "7pt", mr: 1, color: "primary.main" } }),
69968
- /* @__PURE__ */ i(F, { component: "div", sx: { ...t.bodyTypography }, className: n.noteBody, children: `${r(o.commentText, 200)}` })
69969
- ] }),
69970
- /* @__PURE__ */ i(rt, {}),
69971
- /* @__PURE__ */ i(R, { display: "flex", alignItems: "center", justifyContent: "flex-end", children: /* @__PURE__ */ i(F, { component: "div", sx: { ...t.bodyTypographySmall }, className: n.noteAuthor, children: `${o.userName} noted on ${eie(o.created)}` }) })
69972
- ] }) }, o.id)),
69973
- a.length > 3 && /* @__PURE__ */ E(F, { sx: { ...t.bodyTypography }, children: [
69974
- "...",
69975
- a.length - 3,
69976
- " more..."
69977
- ] })
69978
- ] });
69979
- }, HN = "TaskNotes", nie = fe("div", {
69980
- name: HN,
69981
- slot: "Notes",
69982
- overridesResolver: (e, t) => [
69983
- t.notesContainer
69984
- ]
69985
- })(({ theme: e }) => ({
69986
- "& .TaskNotes-noteBody": {
69987
- fontWeight: 400,
69988
- marginLeft: 1
69989
- },
69990
- "& .TaskNotes-noteAuthor": {
69991
- textAlign: "right",
69992
- color: e.palette.text.disabled
69993
- }
69994
- })), aie = () => He({
69995
- notesContainer: ["notesContainer"],
69996
- noteBody: ["noteBody"],
69997
- noteAuthor: ["noteAuthor"],
69998
- noteBackground: ["noteBackground"]
69999
- }, (n) => Ue(HN, n), {}), rie = ({ task: e }) => {
70000
- const t = iie();
69958
+ ] }), eie = ({ task: e }) => {
69959
+ const t = tie();
70001
69960
  if (!e.assignedUser || typeof name != "string")
70002
69961
  return /* @__PURE__ */ i(Ek, { children: /* @__PURE__ */ i(F, { children: "--" }) });
70003
69962
  const n = e.assignedUser.substring(0, e.assignedUser.indexOf(" ")), a = e.assignedUser.substring(e.assignedUser.indexOf(" ") + 1), r = n.substring(0, 1), s = a.substring(0, 1);
@@ -70011,8 +69970,8 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70011
69970
  /* @__PURE__ */ i(F, { variant: "caption", children: "user@gmail.com" })
70012
69971
  ] })
70013
69972
  ] });
70014
- }, VN = "TaskAssigneeClassName", Ek = fe("div", {
70015
- name: VN,
69973
+ }, HN = "TaskAssigneeClassName", Ek = fe("div", {
69974
+ name: HN,
70016
69975
  slot: "Root",
70017
69976
  overridesResolver: (e, t) => [
70018
69977
  t.root
@@ -70028,13 +69987,13 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70028
69987
  width: "35px",
70029
69988
  boxShadow: "0 4px 12px rgba(0, 0, 0, 0.2)"
70030
69989
  }
70031
- })), iie = () => He({
69990
+ })), tie = () => He({
70032
69991
  root: ["root"]
70033
- }, (n) => Ue(VN, n), {}), sie = ({ task: e }) => {
70034
- const t = oie();
69992
+ }, (n) => Ue(HN, n), {}), nie = ({ task: e }) => {
69993
+ const t = aie();
70035
69994
  return !e.assignedRoles || e.assignedRoles.length === 0 ? /* @__PURE__ */ i(yk, { children: /* @__PURE__ */ i(F, { children: "--" }) }) : /* @__PURE__ */ i(yk, { className: t.root, children: e.assignedRoles.map((n, a) => /* @__PURE__ */ i(Qt, { label: n, variant: "filled" }, a)) });
70036
- }, zN = "TaskRolesRootClassName", yk = fe("div", {
70037
- name: zN,
69995
+ }, VN = "TaskRolesRootClassName", yk = fe("div", {
69996
+ name: VN,
70038
69997
  slot: "Root",
70039
69998
  overridesResolver: (e, t) => [
70040
69999
  t.root
@@ -70050,15 +70009,15 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70050
70009
  color: e.palette.background.default,
70051
70010
  boxShadow: "0 4px 12px rgba(0, 0, 0, 0.2)"
70052
70011
  }
70053
- })), oie = () => He({
70012
+ })), aie = () => He({
70054
70013
  root: ["root"]
70055
- }, (n) => Ue(zN, n), {}), lie = ({ task: e, style: t }) => {
70056
- const { getOneFeedback: n } = ei(), [a, r] = C.useState(), s = uie();
70014
+ }, (n) => Ue(VN, n), {}), rie = ({ task: e, style: t }) => {
70015
+ const { getOneFeedback: n } = ei(), [a, r] = C.useState(), s = sie();
70057
70016
  return C.useEffect(() => {
70058
70017
  n(e.taskRef).then((o) => {
70059
70018
  r(o), console.log("Setting feedback:", o);
70060
70019
  });
70061
- }, [e.taskRef]), !a || !a.content ? /* @__PURE__ */ i(F, { sx: { ...t.bodyTypography }, children: "No feedback" }) : /* @__PURE__ */ E(cie, { className: s.root, children: [
70020
+ }, [e.taskRef]), !a || !a.content ? /* @__PURE__ */ i(F, { sx: { ...t.bodyTypography }, children: "No feedback" }) : /* @__PURE__ */ E(iie, { className: s.root, children: [
70062
70021
  /* @__PURE__ */ E(R, { display: "flex", flexDirection: "row", justifyContent: "space-between", children: [
70063
70022
  /* @__PURE__ */ E(R, { flexDirection: "column", alignItems: "center", children: [
70064
70023
  /* @__PURE__ */ i(F, { className: s.feedbackCategories, sx: { ...t.bodyTypography }, children: a.content.main }),
@@ -70079,8 +70038,8 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70079
70038
  a.content.question
70080
70039
  ] })
70081
70040
  ] });
70082
- }, GN = "CustomerFeedback", cie = fe("div", {
70083
- name: GN,
70041
+ }, zN = "CustomerFeedback", iie = fe("div", {
70042
+ name: zN,
70084
70043
  slot: "Message",
70085
70044
  overridesResolver: (e, t) => [
70086
70045
  t.root
@@ -70105,20 +70064,20 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70105
70064
  "& .CustomerFeedback-feedbackCategories": {
70106
70065
  fontWeight: 500
70107
70066
  }
70108
- })), uie = () => He({
70067
+ })), sie = () => He({
70109
70068
  root: ["root"],
70110
70069
  publishedNotifier: ["publishedNotifier"],
70111
70070
  feedbackCategories: ["feedbackCategories"]
70112
- }, (n) => Ue(GN, n), {}), die = ({ task: e, style: t }) => {
70113
- const n = fie();
70114
- return /* @__PURE__ */ i(pie, { className: n.root, style: t, children: /* @__PURE__ */ E(R, { className: n.file, children: [
70071
+ }, (n) => Ue(zN, n), {}), oie = ({ task: e, style: t }) => {
70072
+ const n = cie();
70073
+ return /* @__PURE__ */ i(lie, { className: n.root, style: t, children: /* @__PURE__ */ E(R, { className: n.file, children: [
70115
70074
  /* @__PURE__ */ i($O, { className: n.fileIcon }),
70116
70075
  /* @__PURE__ */ i(F, { sx: { ...t }, children: "file-name.jpg" }),
70117
70076
  /* @__PURE__ */ i(R, { flexGrow: 1 }),
70118
70077
  /* @__PURE__ */ i(_e, { color: "error", children: /* @__PURE__ */ i(zc, { className: n.deleteIcon }) })
70119
70078
  ] }) });
70120
- }, WN = "TaskFiles", pie = fe("div", {
70121
- name: WN,
70079
+ }, GN = "TaskFiles", lie = fe("div", {
70080
+ name: GN,
70122
70081
  slot: "Root",
70123
70082
  overridesResolver: (e, t) => [
70124
70083
  t.root
@@ -70148,21 +70107,21 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70148
70107
  "& .TaskFiles-deleteIcon": {
70149
70108
  color: e.palette.error.main
70150
70109
  }
70151
- })), fie = () => He({
70110
+ })), cie = () => He({
70152
70111
  root: ["root"],
70153
70112
  file: ["file"],
70154
70113
  fileIcon: ["fileIcon"],
70155
70114
  deleteIcon: ["deleteIcon"]
70156
- }, (n) => Ue(WN, n), {}), mie = ({ task: e, style: t }) => {
70115
+ }, (n) => Ue(GN, n), {}), uie = ({ task: e, style: t }) => {
70157
70116
  var l;
70158
- const n = gie(), a = ((l = e.comments) == null ? void 0 : l.filter((c) => c.external).sort((c, u) => Pe.fromISO(u.created).toMillis() - Pe.fromISO(c.created).toMillis())) || [], r = a.slice(0, 3), s = (c) => {
70117
+ const n = pie(), a = ((l = e.comments) == null ? void 0 : l.filter((c) => c.external).sort((c, u) => Pe.fromISO(u.created).toMillis() - Pe.fromISO(c.created).toMillis())) || [], r = a.slice(0, 3), s = (c) => {
70159
70118
  try {
70160
70119
  return Pe.fromISO(c).setLocale("fi").toLocaleString(Pe.DATETIME_SHORT);
70161
70120
  } catch {
70162
70121
  return c;
70163
70122
  }
70164
70123
  }, o = (c, u) => c.length <= u ? c : c.slice(0, u) + "…";
70165
- return /* @__PURE__ */ E(hie, { className: n.container, children: [
70124
+ return /* @__PURE__ */ E(die, { className: n.container, children: [
70166
70125
  r.length === 0 && /* @__PURE__ */ i(F, { sx: { ...t }, children: "No messages" }),
70167
70126
  r.slice(0, 3).map((c) => /* @__PURE__ */ E(R, { className: n.messageRow, children: [
70168
70127
  /* @__PURE__ */ i(Hn, { className: c.source === "FRONTDESK" ? n.frontdeskAvatar : n.customerAvatar }),
@@ -70181,8 +70140,8 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70181
70140
  " more..."
70182
70141
  ] })
70183
70142
  ] });
70184
- }, jN = "CustomerMessagesReadOnly", hie = fe("div", {
70185
- name: jN,
70143
+ }, WN = "CustomerMessagesReadOnly", die = fe("div", {
70144
+ name: WN,
70186
70145
  slot: "Message",
70187
70146
  overridesResolver: (e, t) => [
70188
70147
  t.container
@@ -70232,7 +70191,7 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70232
70191
  marginRight: e.spacing(1),
70233
70192
  marginLeft: e.spacing(1)
70234
70193
  }
70235
- })), gie = () => He({
70194
+ })), pie = () => He({
70236
70195
  container: ["container"],
70237
70196
  messageRow: ["messageRow"],
70238
70197
  senderInfo: ["senderInfo"],
@@ -70240,9 +70199,9 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70240
70199
  customerAvatar: ["customerAvatar"],
70241
70200
  frontdeskMessageBody: ["frontdeskMessageBody"],
70242
70201
  customerMessageBody: ["customerMessageBody"]
70243
- }, (n) => Ue(jN, n), {}), bie = ({ task: e }) => {
70202
+ }, (n) => Ue(WN, n), {}), fie = ({ task: e }) => {
70244
70203
  var c;
70245
- const t = Tie(), n = ie(), [a, r] = C.useState(""), s = ((c = e.comments) == null ? void 0 : c.filter((u) => u.external).sort((u, d) => Pe.fromISO(d.created).toMillis() - Pe.fromISO(u.created).toMillis())) || [], o = (u) => {
70204
+ const t = gie(), n = ie(), [a, r] = C.useState(""), s = ((c = e.comments) == null ? void 0 : c.filter((u) => u.external).sort((u, d) => Pe.fromISO(d.created).toMillis() - Pe.fromISO(u.created).toMillis())) || [], o = (u) => {
70246
70205
  try {
70247
70206
  return Pe.fromISO(u).setLocale("fi").toLocaleString(Pe.DATETIME_SHORT);
70248
70207
  } catch {
@@ -70252,7 +70211,7 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70252
70211
  function l(u) {
70253
70212
  r(u), console.log("message:", u);
70254
70213
  }
70255
- return /* @__PURE__ */ E(Eie, { className: t.container, children: [
70214
+ return /* @__PURE__ */ E(mie, { className: t.container, children: [
70256
70215
  /* @__PURE__ */ i(R, { className: t.messagesContainer, children: s.length === 0 ? /* @__PURE__ */ i(bo, { severity: "info", children: "No messages yet" }) : s.map((u) => /* @__PURE__ */ E(R, { className: t.messageRow, children: [
70257
70216
  /* @__PURE__ */ i(Hn, { className: u.source === "FRONTDESK" ? t.frontdeskAvatar : t.customerAvatar }),
70258
70217
  /* @__PURE__ */ E(R, { className: u.source === "FRONTDESK" ? t.frontdeskMessageBody : t.customerMessageBody, children: [
@@ -70271,7 +70230,7 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70271
70230
  /* @__PURE__ */ i(F, { className: t.messageBoxLabel, children: n.formatMessage({ id: "task.customerMessages.newMessageTitle", defaultMessage: "Write a new message" }) })
70272
70231
  ] }),
70273
70232
  /* @__PURE__ */ i(
70274
- yie,
70233
+ hie,
70275
70234
  {
70276
70235
  value: a,
70277
70236
  fullWidth: !0,
@@ -70283,8 +70242,8 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70283
70242
  )
70284
70243
  ] })
70285
70244
  ] });
70286
- }, qN = "CustomerMessagesEdit", Eie = fe("div", {
70287
- name: qN,
70245
+ }, jN = "CustomerMessagesEdit", mie = fe("div", {
70246
+ name: jN,
70288
70247
  slot: "Message",
70289
70248
  overridesResolver: (e, t) => [
70290
70249
  t.container
@@ -70357,13 +70316,13 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70357
70316
  marginRight: e.spacing(1),
70358
70317
  marginLeft: e.spacing(1)
70359
70318
  }
70360
- })), yie = fe(Fe)(({ theme: e }) => ({
70319
+ })), hie = fe(Fe)(({ theme: e }) => ({
70361
70320
  width: "100%",
70362
70321
  "& .MuiInputBase-input": {
70363
70322
  height: "2.5rem",
70364
70323
  padding: "0 12px"
70365
70324
  }
70366
- })), Tie = () => He({
70325
+ })), gie = () => He({
70367
70326
  container: ["container"],
70368
70327
  messageRow: ["messageRow"],
70369
70328
  messageBoxLabel: ["messageBoxLabel"],
@@ -70374,22 +70333,22 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70374
70333
  customerAvatar: ["customerAvatar"],
70375
70334
  frontdeskMessageBody: ["frontdeskMessageBody"],
70376
70335
  customerMessageBody: ["customerMessageBody"]
70377
- }, (n) => Ue(qN, n), {}), vie = ({ task: e, open: t, onClose: n }) => {
70378
- const a = kie(), r = ie();
70379
- return /* @__PURE__ */ E(Sie, { className: a.editCustomerMessages, open: t, onClose: n, fullWidth: !0, maxWidth: "lg", slots: { transition: Uk }, children: [
70336
+ }, (n) => Ue(jN, n), {}), bie = ({ task: e, open: t, onClose: n }) => {
70337
+ const a = yie(), r = ie();
70338
+ return /* @__PURE__ */ E(Eie, { className: a.editCustomerMessages, open: t, onClose: n, fullWidth: !0, maxWidth: "lg", slots: { transition: Uk }, children: [
70380
70339
  /* @__PURE__ */ E(Ce, { children: [
70381
70340
  r.formatMessage({ id: "task.customerMessages" }),
70382
70341
  r.formatMessage({ id: "eveli.textSeparatorColon" }),
70383
70342
  e.taskRef ?? "no task reference id"
70384
70343
  ] }),
70385
- /* @__PURE__ */ i(ke, { children: /* @__PURE__ */ i(bie, { task: e }) }),
70344
+ /* @__PURE__ */ i(ke, { children: /* @__PURE__ */ i(fie, { task: e }) }),
70386
70345
  /* @__PURE__ */ E(Ae, { children: [
70387
70346
  /* @__PURE__ */ i(K, { variant: "outlined", onClick: n, children: r.formatMessage({ id: "button.cancel" }) }),
70388
70347
  /* @__PURE__ */ i(K, { children: r.formatMessage({ id: "button.sendMessage", defaultMessage: "Send message now" }) })
70389
70348
  ] })
70390
70349
  ] });
70391
- }, YN = "EditCustomerMessagesDialog", Sie = fe(Se, {
70392
- name: YN,
70350
+ }, qN = "EditCustomerMessagesDialog", Eie = fe(Se, {
70351
+ name: qN,
70393
70352
  slot: "Messages",
70394
70353
  overridesResolver: (e, t) => [
70395
70354
  t.EditCustomerMessages
@@ -70402,17 +70361,17 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70402
70361
  padding: 0,
70403
70362
  overflow: "hidden"
70404
70363
  }
70405
- })), kie = () => He({
70364
+ })), yie = () => He({
70406
70365
  editCustomerMessages: ["editCustomerMessages"]
70407
- }, (n) => Ue(YN, n), {}), KN = ({ task: e }) => {
70366
+ }, (n) => Ue(qN, n), {}), YN = ({ task: e }) => {
70408
70367
  if (e.keyWords)
70409
70368
  return /* @__PURE__ */ i(R, { gap: 1, display: "flex", mt: 1, children: e.keyWords.map((t) => /* @__PURE__ */ i(Qt, { label: t, variant: "filled", color: "primary", sx: {
70410
70369
  boxShadow: "0 4px 12px rgba(0, 0, 0, 0.2)"
70411
70370
  } }, t)) });
70412
- }, wie = ({ task: e, open: t, onClose: n }) => {
70371
+ }, Tie = ({ task: e, open: t, onClose: n }) => {
70413
70372
  var s;
70414
- const a = Aie(), r = ie();
70415
- return /* @__PURE__ */ E(Cie, { className: a.editDialog, open: t, onClose: n, maxWidth: "md", slots: { transition: Uk }, children: [
70373
+ const a = Sie(), r = ie();
70374
+ return /* @__PURE__ */ E(vie, { className: a.editDialog, open: t, onClose: n, maxWidth: "md", slots: { transition: Uk }, children: [
70416
70375
  /* @__PURE__ */ E(Ce, { children: [
70417
70376
  r.formatMessage({ id: "task.edit" }),
70418
70377
  r.formatMessage({ id: "eveli.textSeparatorColon" }),
@@ -70428,7 +70387,7 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70428
70387
  /* @__PURE__ */ i(oe, { size: { md: 3, lg: 3, xl: 3 }, children: /* @__PURE__ */ i(F, { fontWeight: "bold", children: r.formatMessage({ id: "task.additionalInfo" }) }) }),
70429
70388
  /* @__PURE__ */ i(oe, { size: { md: 9, lg: 9, xl: 9 }, children: /* @__PURE__ */ i($l, { rows: 3, multiline: !0, value: e.additionalInfo }) }),
70430
70389
  /* @__PURE__ */ i(oe, { size: { md: 3, lg: 3, xl: 3 }, children: /* @__PURE__ */ i(F, { fontWeight: "bold", children: r.formatMessage({ id: "task.metaData" }) }) }),
70431
- /* @__PURE__ */ i(oe, { size: { md: 9, lg: 9, xl: 9 }, children: /* @__PURE__ */ i(KN, { task: e }) })
70390
+ /* @__PURE__ */ i(oe, { size: { md: 9, lg: 9, xl: 9 }, children: /* @__PURE__ */ i(YN, { task: e }) })
70432
70391
  ] }) }),
70433
70392
  /* @__PURE__ */ E(Ae, { children: [
70434
70393
  /* @__PURE__ */ i(K, { variant: "outlined", onClick: n, children: r.formatMessage({ id: "button.cancel" }) }),
@@ -70441,16 +70400,16 @@ const Wre = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3
70441
70400
  height: "2.5rem",
70442
70401
  padding: "0 12px"
70443
70402
  }
70444
- })), XN = "EditTaskDialog", Cie = fe(Se, {
70445
- name: XN,
70403
+ })), KN = "EditTaskDialog", vie = fe(Se, {
70404
+ name: KN,
70446
70405
  slot: "EditDialog",
70447
70406
  overridesResolver: (e, t) => [
70448
70407
  t.editDialog
70449
70408
  ]
70450
- })(({ theme: e }) => ({})), Aie = () => He({
70409
+ })(({ theme: e }) => ({})), Sie = () => He({
70451
70410
  editDialog: ["editDialog"]
70452
- }, (n) => Ue(XN, n), {});
70453
- function _ie(e) {
70411
+ }, (n) => Ue(KN, n), {});
70412
+ function kie(e) {
70454
70413
  if (!e.dueDate)
70455
70414
  return;
70456
70415
  const t = Pe.local().startOf("day"), n = Pe.fromJSDate(e.dueDate).startOf("day"), a = Math.floor(t.diff(n, "days").days);
@@ -70472,8 +70431,8 @@ function _ie(e) {
70472
70431
  status: "upcomingDue"
70473
70432
  };
70474
70433
  }
70475
- const Iie = ({ ...e }) => {
70476
- const t = xie(), n = _ie(e.task);
70434
+ const wie = ({ ...e }) => {
70435
+ const t = Cie(), n = kie(e.task);
70477
70436
  if (n)
70478
70437
  switch (n == null ? void 0 : n.status) {
70479
70438
  case "upcomingDue":
@@ -70510,8 +70469,8 @@ const Iie = ({ ...e }) => {
70510
70469
  default:
70511
70470
  return /* @__PURE__ */ i(W, {});
70512
70471
  }
70513
- }, ZN = "TaskOverrdueWarningClassName", Hl = fe("div", {
70514
- name: ZN,
70472
+ }, XN = "TaskOverrdueWarningClassName", Hl = fe("div", {
70473
+ name: XN,
70515
70474
  slot: "Priority",
70516
70475
  overridesResolver: (e, t) => [
70517
70476
  t.root
@@ -70543,15 +70502,15 @@ const Iie = ({ ...e }) => {
70543
70502
  default:
70544
70503
  return e.palette.background.paper;
70545
70504
  }
70546
- }, xie = () => He({
70505
+ }, Cie = () => He({
70547
70506
  root: ["root"]
70548
- }, (n) => Ue(ZN, n), {}), Nie = ({ style: e }) => {
70549
- const t = Die(), [n, a] = tt("LOW"), r = [
70507
+ }, (n) => Ue(XN, n), {}), Aie = ({ style: e }) => {
70508
+ const t = Iie(), [n, a] = tt("LOW"), r = [
70550
70509
  { level: "LOW", color: "#45a048" },
70551
70510
  { level: "MEDIUM", color: "#2196f3" },
70552
70511
  { level: "HIGH", color: "#f44336" }
70553
70512
  ];
70554
- return /* @__PURE__ */ i(Rie, { className: t.root, style: e, children: /* @__PURE__ */ E(Rt, { direction: "column", width: "100%", children: [
70513
+ return /* @__PURE__ */ i(_ie, { className: t.root, style: e, children: /* @__PURE__ */ E(Rt, { direction: "column", width: "100%", children: [
70555
70514
  /* @__PURE__ */ E(F, { fontWeight: 500, mb: 1, sx: { ...e.bodyTypography, fontWeight: 500 }, children: [
70556
70515
  "Priority: ",
70557
70516
  n
@@ -70579,8 +70538,8 @@ const Iie = ({ ...e }) => {
70579
70538
  );
70580
70539
  }) })
70581
70540
  ] }) });
70582
- }, QN = "TaskPriority", Rie = fe("div", {
70583
- name: QN,
70541
+ }, ZN = "TaskPriority", _ie = fe("div", {
70542
+ name: ZN,
70584
70543
  slot: "Root",
70585
70544
  overridesResolver: (e, t) => [
70586
70545
  t.root
@@ -70606,11 +70565,11 @@ const Iie = ({ ...e }) => {
70606
70565
  borderBottomRightRadius: e.spacing(1)
70607
70566
  }
70608
70567
  }
70609
- })), Die = () => He({
70568
+ })), Iie = () => He({
70610
70569
  root: ["root"],
70611
70570
  prioritySelect: ["prioritySelect"]
70612
- }, (n) => Ue(QN, n), {}), Oie = ({ status: e, style: t }) => {
70613
- const n = eR(), a = () => {
70571
+ }, (n) => Ue(ZN, n), {}), xie = ({ status: e, style: t }) => {
70572
+ const n = JN(), a = () => {
70614
70573
  switch (e) {
70615
70574
  case "NEW":
70616
70575
  return 25;
@@ -70661,12 +70620,12 @@ const Iie = ({ ...e }) => {
70661
70620
  "% complete"
70662
70621
  ] })
70663
70622
  ] });
70664
- }, Lie = ({ style: e }) => {
70665
- const t = eR(), [n, a] = C.useState("NEW"), r = (s) => {
70623
+ }, Nie = ({ style: e }) => {
70624
+ const t = JN(), [n, a] = C.useState("NEW"), r = (s) => {
70666
70625
  a(s.target.value);
70667
70626
  };
70668
- return /* @__PURE__ */ E(Fie, { className: t.root, children: [
70669
- /* @__PURE__ */ i(Oie, { status: n, style: e }),
70627
+ return /* @__PURE__ */ E(Rie, { className: t.root, children: [
70628
+ /* @__PURE__ */ i(xie, { status: n, style: e }),
70670
70629
  /* @__PURE__ */ E(
70671
70630
  Vi,
70672
70631
  {
@@ -70687,8 +70646,8 @@ const Iie = ({ ...e }) => {
70687
70646
  }
70688
70647
  )
70689
70648
  ] });
70690
- }, JN = "TaskStatus", Fie = fe("div", {
70691
- name: JN,
70649
+ }, QN = "TaskStatus", Rie = fe("div", {
70650
+ name: QN,
70692
70651
  slot: "Root",
70693
70652
  overridesResolver: (e, t) => [
70694
70653
  t.root
@@ -70713,13 +70672,54 @@ const Iie = ({ ...e }) => {
70713
70672
  textAlign: "right",
70714
70673
  ...e.typography.caption
70715
70674
  }
70716
- })), eR = () => He({
70675
+ })), JN = () => He({
70717
70676
  root: ["root"],
70718
70677
  progressBar: ["progressBar"],
70719
70678
  backgroundTrack: ["backgroundTrack"],
70720
70679
  progressIndicator: ["progressIndicator"],
70721
70680
  progressDesc: ["progressDesc"]
70722
- }, (n) => Ue(JN, n), {}), Mie = (e) => {
70681
+ }, (n) => Ue(QN, n), {}), Die = (e) => e ? (e instanceof Date ? Pe.fromJSDate(e) : Pe.fromISO(e)).setLocale("fi").toLocaleString(Pe.DATE_SHORT) : "--", Oie = ({ task: e, style: t }) => {
70682
+ var s;
70683
+ const n = Fie(), a = ((s = e.comments) == null ? void 0 : s.filter((o) => !o.external)) || [];
70684
+ if (!a || a.length === 0)
70685
+ return /* @__PURE__ */ i(W, { children: "No notes" });
70686
+ const r = (o, l) => o.length <= l ? o : o.slice(0, l) + "…";
70687
+ return /* @__PURE__ */ E(Lie, { className: n.notesContainer, children: [
70688
+ a.slice(0, 3).map((o) => /* @__PURE__ */ i(R, { children: /* @__PURE__ */ E(W, { children: [
70689
+ /* @__PURE__ */ E(R, { display: "flex", alignItems: "center", children: [
70690
+ /* @__PURE__ */ i(Pf, { sx: { fontSize: "7pt", mr: 1, color: "primary.main" } }),
70691
+ /* @__PURE__ */ i(F, { component: "div", sx: { ...t.bodyTypography }, className: n.noteBody, children: `${r(o.commentText, 200)}` })
70692
+ ] }),
70693
+ /* @__PURE__ */ i(rt, {}),
70694
+ /* @__PURE__ */ i(R, { display: "flex", alignItems: "center", justifyContent: "flex-end", children: /* @__PURE__ */ i(F, { component: "div", sx: { ...t.bodyTypographySmall }, className: n.noteAuthor, children: `${o.userName} noted on ${Die(o.created)}` }) })
70695
+ ] }) }, o.id)),
70696
+ a.length > 3 && /* @__PURE__ */ E(F, { sx: { ...t.bodyTypography }, children: [
70697
+ "...",
70698
+ a.length - 3,
70699
+ " more..."
70700
+ ] })
70701
+ ] });
70702
+ }, eR = "TaskNotes", Lie = fe("div", {
70703
+ name: eR,
70704
+ slot: "Notes",
70705
+ overridesResolver: (e, t) => [
70706
+ t.notesContainer
70707
+ ]
70708
+ })(({ theme: e }) => ({
70709
+ "& .TaskNotes-noteBody": {
70710
+ fontWeight: 400,
70711
+ marginLeft: 1
70712
+ },
70713
+ "& .TaskNotes-noteAuthor": {
70714
+ textAlign: "right",
70715
+ color: e.palette.text.disabled
70716
+ }
70717
+ })), Fie = () => He({
70718
+ notesContainer: ["notesContainer"],
70719
+ noteBody: ["noteBody"],
70720
+ noteAuthor: ["noteAuthor"],
70721
+ noteBackground: ["noteBackground"]
70722
+ }, (n) => Ue(eR, n), {}), Mie = (e) => {
70723
70723
  const [t, n] = C.useState(), { getTask: a } = ve("worker/rest/api/tasks/$taskId.GET", {}), [r, s] = C.useState(!1), [o, l] = C.useState({}), [c, u] = C.useState(), [d, p] = C.useState("default"), m = BN(r)[d], h = (k) => {
70724
70724
  l((w) => ({
70725
70725
  ...w,
@@ -70758,7 +70758,7 @@ const Iie = ({ ...e }) => {
70758
70758
  Sa,
70759
70759
  {
70760
70760
  id: "task_main",
70761
- editDialog: c === "task_main" && /* @__PURE__ */ i(wie, { task: t, open: !0, onClose: v }),
70761
+ editDialog: c === "task_main" && /* @__PURE__ */ i(Tie, { task: t, open: !0, onClose: v }),
70762
70762
  onDoubleClick: () => A("task_main"),
70763
70763
  isMenu: !0,
70764
70764
  title: `Task: ${t.taskRef}`,
@@ -70775,14 +70775,14 @@ const Iie = ({ ...e }) => {
70775
70775
  style: m,
70776
70776
  value: /* @__PURE__ */ E(R, { display: "flex", justifyContent: "space-between", children: [
70777
70777
  b(t.dueDate),
70778
- /* @__PURE__ */ i(Iie, { task: t, style: m })
70778
+ /* @__PURE__ */ i(wie, { task: t, style: m })
70779
70779
  ] })
70780
70780
  }
70781
70781
  ),
70782
70782
  /* @__PURE__ */ i(ka, { label: "Customer name", value: t.clientIdentificator ? t.clientIdentificator : "NONE", style: m }),
70783
70783
  /* @__PURE__ */ i(ka, { label: "Subject", value: t.subject, style: m }),
70784
70784
  /* @__PURE__ */ i(ka, { label: "Info", value: t.additionalInfo, style: m }),
70785
- /* @__PURE__ */ i(KN, { task: t }),
70785
+ /* @__PURE__ */ i(YN, { task: t }),
70786
70786
  /* @__PURE__ */ i(Se, { open: !1 })
70787
70787
  ]
70788
70788
  }
@@ -70822,9 +70822,9 @@ const Iie = ({ ...e }) => {
70822
70822
  flashy: g("status-priority"),
70823
70823
  onToggleFlashy: () => h("status-priority"),
70824
70824
  children: /* @__PURE__ */ E(Rt, { direction: "column", height: "100%", children: [
70825
- /* @__PURE__ */ i(Lie, { style: m }),
70825
+ /* @__PURE__ */ i(Nie, { style: m }),
70826
70826
  /* @__PURE__ */ i(rt, { sx: { my: 1 } }),
70827
- /* @__PURE__ */ i(Nie, { style: m })
70827
+ /* @__PURE__ */ i(Aie, { style: m })
70828
70828
  ] })
70829
70829
  }
70830
70830
  ) }),
@@ -70839,9 +70839,9 @@ const Iie = ({ ...e }) => {
70839
70839
  flashy: g("assignees-roles"),
70840
70840
  onToggleFlashy: () => h("assignees-roles"),
70841
70841
  children: [
70842
- /* @__PURE__ */ i(Ul, { label: "Roles", value: /* @__PURE__ */ i(sie, { task: t }), style: m }),
70842
+ /* @__PURE__ */ i(Ul, { label: "Roles", value: /* @__PURE__ */ i(nie, { task: t }), style: m }),
70843
70843
  /* @__PURE__ */ i(rt, { sx: { my: 1 } }),
70844
- /* @__PURE__ */ i(Ul, { label: "Assigned to", value: /* @__PURE__ */ i(rie, { task: t }), style: m })
70844
+ /* @__PURE__ */ i(Ul, { label: "Assigned to", value: /* @__PURE__ */ i(eie, { task: t }), style: m })
70845
70845
  ]
70846
70846
  }
70847
70847
  ) }),
@@ -70850,14 +70850,14 @@ const Iie = ({ ...e }) => {
70850
70850
  {
70851
70851
  id: "customer_messages",
70852
70852
  title: "Customer messages",
70853
- editDialog: c === "customer_messages" && /* @__PURE__ */ i(vie, { task: t, open: !0, onClose: v }),
70853
+ editDialog: c === "customer_messages" && /* @__PURE__ */ i(bie, { task: t, open: !0, onClose: v }),
70854
70854
  onDoubleClick: () => A("customer_messages"),
70855
70855
  isMenu: !0,
70856
70856
  startAdornmentIcon: /* @__PURE__ */ i(Wa, { icon: MO }),
70857
70857
  styleVariant: d,
70858
70858
  flashy: g("customer_messages"),
70859
70859
  onToggleFlashy: () => h("customer_messages"),
70860
- children: /* @__PURE__ */ i(Rt, { direction: "column", children: /* @__PURE__ */ i(mie, { task: t, style: m }) })
70860
+ children: /* @__PURE__ */ i(Rt, { direction: "column", children: /* @__PURE__ */ i(uie, { task: t, style: m }) })
70861
70861
  }
70862
70862
  ) }),
70863
70863
  /* @__PURE__ */ i(oe, { size: r ? _t.singleCol : _t[d], children: /* @__PURE__ */ i(
@@ -70870,7 +70870,7 @@ const Iie = ({ ...e }) => {
70870
70870
  styleVariant: d,
70871
70871
  flashy: g("files"),
70872
70872
  onToggleFlashy: () => h("files"),
70873
- children: /* @__PURE__ */ i(die, { task: t, style: m })
70873
+ children: /* @__PURE__ */ i(oie, { task: t, style: m })
70874
70874
  }
70875
70875
  ) }),
70876
70876
  /* @__PURE__ */ i(oe, { size: r ? _t.singleCol : _t[d], children: /* @__PURE__ */ i(
@@ -70883,7 +70883,7 @@ const Iie = ({ ...e }) => {
70883
70883
  styleVariant: d,
70884
70884
  flashy: g("feedback"),
70885
70885
  onToggleFlashy: () => h("feedback"),
70886
- children: /* @__PURE__ */ i(lie, { task: t, style: m })
70886
+ children: /* @__PURE__ */ i(rie, { task: t, style: m })
70887
70887
  }
70888
70888
  ) }),
70889
70889
  /* @__PURE__ */ i(oe, { size: r ? _t.singleCol : _t[d], children: /* @__PURE__ */ i(
@@ -70896,7 +70896,7 @@ const Iie = ({ ...e }) => {
70896
70896
  styleVariant: d,
70897
70897
  flashy: g("notes"),
70898
70898
  onToggleFlashy: () => h("notes"),
70899
- children: /* @__PURE__ */ i(tie, { task: t, style: m })
70899
+ children: /* @__PURE__ */ i(Oie, { task: t, style: m })
70900
70900
  }
70901
70901
  ) }),
70902
70902
  /* @__PURE__ */ i(oe, { size: r ? _t.singleCol : _t[d], children: /* @__PURE__ */ E(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxs-ts/eveli-ide",
3
- "version": "0.0.430",
3
+ "version": "0.0.431",
4
4
  "homepage": "https://github.com/digiexpress-io/digiexpress-parent",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",