@consilioweb/payload-support 0.10.0 → 0.10.1

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.
@@ -5,7 +5,8 @@ var react = require('react');
5
5
  var navigation = require('next/navigation');
6
6
  var Link = require('next/link');
7
7
  var useTranslation = require('../../components/TicketConversation/hooks/useTranslation');
8
- var shared = require('../shared');
8
+ var StatusPill = require('../shared/StatusPill');
9
+ var sla = require('../shared/sla');
9
10
  var s = require('../../styles/TicketInbox.module.scss');
10
11
 
11
12
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -273,8 +274,8 @@ const TicketInboxClient = () => {
273
274
  const displayClient = clientName ? `${clientName}${clientCompany ? `, ${clientCompany}` : ""}` : "\u2014";
274
275
  const isUnread = tk.lastClientMessageAt && (!tk.lastAdminReadAt || new Date(tk.lastClientMessageAt) > new Date(tk.lastAdminReadAt));
275
276
  const priorityColor = PRIORITY_COLORS[tk.priority] || "transparent";
276
- const sla = shared.computeSlaState(tk);
277
- const isBreach = sla.state === "breach";
277
+ const sla$1 = sla.computeSlaState(tk);
278
+ const isBreach = sla$1.state === "breach";
278
279
  const statusVariant = STATUS_VARIANT[tk.status] || "open";
279
280
  return /* @__PURE__ */ jsxRuntime.jsxs(
280
281
  "a",
@@ -311,7 +312,7 @@ const TicketInboxClient = () => {
311
312
  title: `Priorit\xE9 ${tk.priority}`
312
313
  }
313
314
  ),
314
- /* @__PURE__ */ jsxRuntime.jsx(shared.StatusPill, { status: isBreach ? "sla-breach" : statusVariant }),
315
+ /* @__PURE__ */ jsxRuntime.jsx(StatusPill.StatusPill, { status: isBreach ? "sla-breach" : statusVariant }),
315
316
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.ticketNum, children: tk.ticketNumber }),
316
317
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.subject, children: tk.subject }),
317
318
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.client, children: displayClient }),
@@ -320,12 +321,12 @@ const TicketInboxClient = () => {
320
321
  {
321
322
  className: [
322
323
  s__default.default.slaCell,
323
- sla.state === "breach" ? s__default.default.slaBreach : "",
324
- sla.state === "warn" ? s__default.default.slaWarn : "",
325
- sla.state === "ok" ? s__default.default.slaOk : ""
324
+ sla$1.state === "breach" ? s__default.default.slaBreach : "",
325
+ sla$1.state === "warn" ? s__default.default.slaWarn : "",
326
+ sla$1.state === "ok" ? s__default.default.slaOk : ""
326
327
  ].filter(Boolean).join(" "),
327
- title: sla.due ? new Date(sla.due).toLocaleString("fr-FR") : "",
328
- children: shared.formatSlaRemaining(sla.remainingMs)
328
+ title: sla$1.due ? new Date(sla$1.due).toLocaleString("fr-FR") : "",
329
+ children: sla.formatSlaRemaining(sla$1.remainingMs)
329
330
  }
330
331
  ),
331
332
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.timeAgo, children: relativeTime(tk.updatedAt) }),
@@ -4,7 +4,8 @@ import { useState, useEffect, useCallback } from 'react';
4
4
  import { useSearchParams } from 'next/navigation';
5
5
  import Link from 'next/link';
6
6
  import { useTranslation } from '../../components/TicketConversation/hooks/useTranslation.js';
7
- import { computeSlaState, StatusPill, formatSlaRemaining } from '../shared.js';
7
+ import { StatusPill } from '../shared/StatusPill.js';
8
+ import { computeSlaState, formatSlaRemaining } from '../shared/sla.js';
8
9
  import s from '../../styles/TicketInbox.module.scss';
9
10
 
10
11
  const PRIORITY_COLORS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consilioweb/payload-support",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Payload CMS plugin — professional support & ticketing system with AI, SLA, time tracking, live chat, and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -4,7 +4,8 @@ import React, { useState, useEffect, useCallback } from 'react'
4
4
  import { useSearchParams } from 'next/navigation'
5
5
  import Link from 'next/link'
6
6
  import { useTranslation } from '../../components/TicketConversation/hooks/useTranslation'
7
- import { StatusPill, computeSlaState, formatSlaRemaining } from '../shared'
7
+ import { StatusPill } from '../shared/StatusPill'
8
+ import { computeSlaState, formatSlaRemaining } from '../shared/sla'
8
9
  import s from '../../styles/TicketInbox.module.scss'
9
10
 
10
11
  interface Ticket {