@trackunit/react-table-base-components 1.7.110 → 1.7.111
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/index.cjs.js +6 -2
- package/index.esm.js +6 -2
- package/package.json +7 -7
package/index.cjs.js
CHANGED
|
@@ -273,13 +273,17 @@ const PlainDateCell = ({ locale, date, withDaysSince = true, className, dataTest
|
|
|
273
273
|
return (jsxRuntime.jsxs("div", { className: cvaPlainDateCell({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("p", { className: cvaDateTime(), children: formattedDate }), withDaysSince ? jsxRuntime.jsx(DaysSince, { date: date, locale: locale }) : null] }));
|
|
274
274
|
};
|
|
275
275
|
const DaysSince = ({ date, locale }) => {
|
|
276
|
+
let timeSince = null;
|
|
276
277
|
try {
|
|
277
|
-
|
|
278
|
-
return jsxRuntime.jsx("p", { className: cvaDateTimeSince(), children: timeSince });
|
|
278
|
+
timeSince = dateAndTimeUtils.timeSinceInDays(date.toZonedDateTime("UTC"), polyfill.Temporal.Now.instant().toZonedDateTimeISO("UTC"), "UTC", locale);
|
|
279
279
|
}
|
|
280
280
|
catch {
|
|
281
|
+
timeSince = null;
|
|
282
|
+
}
|
|
283
|
+
if (timeSince === null) {
|
|
281
284
|
return null;
|
|
282
285
|
}
|
|
286
|
+
return jsxRuntime.jsx("p", { className: cvaDateTimeSince(), children: timeSince });
|
|
283
287
|
};
|
|
284
288
|
|
|
285
289
|
/**
|
package/index.esm.js
CHANGED
|
@@ -271,13 +271,17 @@ const PlainDateCell = ({ locale, date, withDaysSince = true, className, dataTest
|
|
|
271
271
|
return (jsxs("div", { className: cvaPlainDateCell({ className }), "data-testid": dataTestId, children: [jsx("p", { className: cvaDateTime(), children: formattedDate }), withDaysSince ? jsx(DaysSince, { date: date, locale: locale }) : null] }));
|
|
272
272
|
};
|
|
273
273
|
const DaysSince = ({ date, locale }) => {
|
|
274
|
+
let timeSince = null;
|
|
274
275
|
try {
|
|
275
|
-
|
|
276
|
-
return jsx("p", { className: cvaDateTimeSince(), children: timeSince });
|
|
276
|
+
timeSince = timeSinceInDays(date.toZonedDateTime("UTC"), Temporal.Now.instant().toZonedDateTimeISO("UTC"), "UTC", locale);
|
|
277
277
|
}
|
|
278
278
|
catch {
|
|
279
|
+
timeSince = null;
|
|
280
|
+
}
|
|
281
|
+
if (timeSince === null) {
|
|
279
282
|
return null;
|
|
280
283
|
}
|
|
284
|
+
return jsx("p", { className: cvaDateTimeSince(), children: timeSince });
|
|
281
285
|
};
|
|
282
286
|
|
|
283
287
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table-base-components",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.111",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/react-components": "1.10.
|
|
12
|
-
"@trackunit/ui-icons": "1.7.
|
|
13
|
-
"@trackunit/react-form-components": "1.8.
|
|
14
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
15
|
-
"@trackunit/date-and-time-utils": "1.7.
|
|
16
|
-
"@trackunit/shared-utils": "1.9.
|
|
11
|
+
"@trackunit/react-components": "1.10.43",
|
|
12
|
+
"@trackunit/ui-icons": "1.7.74",
|
|
13
|
+
"@trackunit/react-form-components": "1.8.109",
|
|
14
|
+
"@trackunit/css-class-variance-utilities": "1.7.73",
|
|
15
|
+
"@trackunit/date-and-time-utils": "1.7.73",
|
|
16
|
+
"@trackunit/shared-utils": "1.9.73",
|
|
17
17
|
"tailwind-merge": "^2.0.0",
|
|
18
18
|
"@js-temporal/polyfill": "^0.5.1"
|
|
19
19
|
},
|