@flamingo-stack/openframe-frontend-core 0.0.264 → 0.0.265
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/{chunk-JOUI6TQY.js → chunk-266DUZ6D.js} +2 -2
- package/dist/{chunk-SIYHXLFH.cjs → chunk-2P6V2EWZ.cjs} +38 -3
- package/dist/chunk-2P6V2EWZ.cjs.map +1 -0
- package/dist/{chunk-SSUUMPAQ.js → chunk-6A2YQ5CY.js} +2 -2
- package/dist/{chunk-3LWUHLPK.cjs → chunk-D4TWJNO5.cjs} +25 -25
- package/dist/{chunk-3LWUHLPK.cjs.map → chunk-D4TWJNO5.cjs.map} +1 -1
- package/dist/{chunk-VYTU7JZR.js → chunk-EXU5N5RM.js} +37 -2
- package/dist/chunk-EXU5N5RM.js.map +1 -0
- package/dist/{chunk-P67D545X.cjs → chunk-HMHMK6U6.cjs} +11 -11
- package/dist/{chunk-P67D545X.cjs.map → chunk-HMHMK6U6.cjs.map} +1 -1
- package/dist/{chunk-ZOOTBYZO.cjs → chunk-J5BBBDNA.cjs} +30 -30
- package/dist/{chunk-ZOOTBYZO.cjs.map → chunk-J5BBBDNA.cjs.map} +1 -1
- package/dist/{chunk-6ZEKKAAL.js → chunk-Z5YEQWLC.js} +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/board/types.d.ts +1 -0
- package/dist/components/features/board/types.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/index.cjs +48 -48
- package/dist/components/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +55 -55
- package/dist/components/tickets/index.js +3 -3
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/utils/date-utils.d.ts +9 -0
- package/dist/utils/date-utils.d.ts.map +1 -1
- package/dist/utils/index.cjs +29 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +28 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/features/board/ticket-card.tsx +15 -0
- package/src/components/features/board/types.ts +1 -0
- package/src/utils/date-utils.ts +36 -0
- package/src/utils/index.ts +2 -0
- package/dist/chunk-SIYHXLFH.cjs.map +0 -1
- package/dist/chunk-VYTU7JZR.js.map +0 -1
- /package/dist/{chunk-JOUI6TQY.js.map → chunk-266DUZ6D.js.map} +0 -0
- /package/dist/{chunk-SSUUMPAQ.js.map → chunk-6A2YQ5CY.js.map} +0 -0
- /package/dist/{chunk-6ZEKKAAL.js.map → chunk-Z5YEQWLC.js.map} +0 -0
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
* Unified Date Utilities for OpenMSP Platform
|
|
3
3
|
* Provides consistent date formatting across all components
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* Relative display label for a ticket timestamp (ISO string).
|
|
7
|
+
* < 1 min → "Just now" | 1-59 min → "X min ago" | 1-23 h → "X hour(s) ago" | 24+ h → "MM/DD/YYYY"
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatTicketRelativeTime(iso: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Full tooltip timestamp in "MM/DD/YYYY, H:MM AM/PM" format.
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatTicketFullTimestamp(iso: string): string;
|
|
5
14
|
/**
|
|
6
15
|
* Format relative time from ISO timestamp
|
|
7
16
|
* This is the single source of truth for all relative time formatting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/utils/date-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CA4CnE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,GAAE,IAAI,CAAC,qBAA0B,GACvC,MAAM,CAgBR;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,GAAE,IAAI,CAAC,qBAA0B,GACvC,MAAM,CAkBR;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAwB1E;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAOlF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
|
1
|
+
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/utils/date-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAc5D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAW7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CA4CnE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,GAAE,IAAI,CAAC,qBAA0B,GACvC,MAAM,CAgBR;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,GAAE,IAAI,CAAC,qBAA0B,GACvC,MAAM,CAkBR;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAwB1E;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAOlF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
package/dist/utils/index.cjs
CHANGED
|
@@ -2378,6 +2378,33 @@ function generateImageSizes(_url) {
|
|
|
2378
2378
|
}
|
|
2379
2379
|
|
|
2380
2380
|
// src/utils/date-utils.ts
|
|
2381
|
+
function formatTicketRelativeTime(iso) {
|
|
2382
|
+
const now = /* @__PURE__ */ new Date();
|
|
2383
|
+
const date = new Date(iso);
|
|
2384
|
+
if (Number.isNaN(date.getTime())) return "";
|
|
2385
|
+
const diffMs = now.getTime() - date.getTime();
|
|
2386
|
+
const diffMin = Math.floor(diffMs / 6e4);
|
|
2387
|
+
if (diffMin < 1) return "Just now";
|
|
2388
|
+
if (diffMin < 60) return `${diffMin} min ago`;
|
|
2389
|
+
const diffHours = Math.floor(diffMin / 60);
|
|
2390
|
+
if (diffHours < 24) return diffHours === 1 ? "1 hour ago" : `${diffHours} hours ago`;
|
|
2391
|
+
const mm = String(date.getMonth() + 1).padStart(2, "0");
|
|
2392
|
+
const dd = String(date.getDate()).padStart(2, "0");
|
|
2393
|
+
const yyyy = date.getFullYear();
|
|
2394
|
+
return `${mm}/${dd}/${yyyy}`;
|
|
2395
|
+
}
|
|
2396
|
+
function formatTicketFullTimestamp(iso) {
|
|
2397
|
+
const date = new Date(iso);
|
|
2398
|
+
if (Number.isNaN(date.getTime())) return "";
|
|
2399
|
+
const mm = String(date.getMonth() + 1).padStart(2, "0");
|
|
2400
|
+
const dd = String(date.getDate()).padStart(2, "0");
|
|
2401
|
+
const yyyy = date.getFullYear();
|
|
2402
|
+
let hours = date.getHours();
|
|
2403
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
2404
|
+
const ampm = hours >= 12 ? "PM" : "AM";
|
|
2405
|
+
hours = hours % 12 || 12;
|
|
2406
|
+
return `${mm}/${dd}/${yyyy}, ${hours}:${minutes} ${ampm}`;
|
|
2407
|
+
}
|
|
2381
2408
|
function formatRelativeTime(timestamp) {
|
|
2382
2409
|
const now = /* @__PURE__ */ new Date();
|
|
2383
2410
|
const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
|
|
@@ -3542,6 +3569,8 @@ exports.formatPricingModel = formatPricingModel;
|
|
|
3542
3569
|
exports.formatRelativeTime = formatRelativeTime;
|
|
3543
3570
|
exports.formatReleaseDate = formatReleaseDate;
|
|
3544
3571
|
exports.formatSingularLookupInvocation = formatSingularLookupInvocation;
|
|
3572
|
+
exports.formatTicketFullTimestamp = formatTicketFullTimestamp;
|
|
3573
|
+
exports.formatTicketRelativeTime = formatTicketRelativeTime;
|
|
3545
3574
|
exports.formatTimeWithTimezone = formatTimeWithTimezone;
|
|
3546
3575
|
exports.formatUnderscoreText = formatUnderscoreText;
|
|
3547
3576
|
exports.formatWholeDollars = formatWholeDollars;
|