@trackunit/react-table-base-components 1.14.6-alpha-f4553bb1b8c.0 → 1.14.7
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
CHANGED
|
@@ -7,7 +7,6 @@ var reactFormComponents = require('@trackunit/react-form-components');
|
|
|
7
7
|
var cssClassVarianceUtilities = require('@trackunit/css-class-variance-utilities');
|
|
8
8
|
var dateAndTimeUtils = require('@trackunit/date-and-time-utils');
|
|
9
9
|
var react = require('react');
|
|
10
|
-
var polyfill = require('@js-temporal/polyfill');
|
|
11
10
|
var sharedUtils = require('@trackunit/shared-utils');
|
|
12
11
|
|
|
13
12
|
/**
|
|
@@ -646,7 +645,7 @@ const cvaDateTimeSince = cssClassVarianceUtilities.cvaMerge(["slashed-zero", "te
|
|
|
646
645
|
* @example Date column with days-since indicator
|
|
647
646
|
* ```tsx
|
|
648
647
|
* import { PlainDateCell } from "@trackunit/react-table-base-components";
|
|
649
|
-
* import { Temporal } from "@
|
|
648
|
+
* import { Temporal } from "@trackunit/date-and-time-utils";
|
|
650
649
|
*
|
|
651
650
|
* const cell = ({ row }) => (
|
|
652
651
|
* <PlainDateCell date={Temporal.PlainDate.from(row.original.lastServiceDate)} />
|
|
@@ -665,7 +664,7 @@ const PlainDateCell = ({ locale, date, withDaysSince = true, className, "data-te
|
|
|
665
664
|
const DaysSince = ({ date, locale }) => {
|
|
666
665
|
let timeSince = null;
|
|
667
666
|
try {
|
|
668
|
-
timeSince = dateAndTimeUtils.timeSinceInDays(date.toZonedDateTime("UTC"),
|
|
667
|
+
timeSince = dateAndTimeUtils.timeSinceInDays(date.toZonedDateTime("UTC"), dateAndTimeUtils.Temporal.Now.instant().toZonedDateTimeISO("UTC"), "UTC", locale);
|
|
669
668
|
}
|
|
670
669
|
catch {
|
|
671
670
|
timeSince = null;
|
package/index.esm.js
CHANGED
|
@@ -3,9 +3,8 @@ import { Button, Icon, Highlight, Heading, ExternalLink, DetailsList, Indicator,
|
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { Checkbox } from '@trackunit/react-form-components';
|
|
5
5
|
import { cvaMerge } from '@trackunit/css-class-variance-utilities';
|
|
6
|
-
import { formatDateUtil, timeSinceAuto, timeSinceInDays } from '@trackunit/date-and-time-utils';
|
|
6
|
+
import { formatDateUtil, timeSinceAuto, timeSinceInDays, Temporal } from '@trackunit/date-and-time-utils';
|
|
7
7
|
import { useMemo, useState, useEffect, isValidElement, cloneElement } from 'react';
|
|
8
|
-
import { Temporal } from '@js-temporal/polyfill';
|
|
9
8
|
import { DateTimeFormat } from '@trackunit/shared-utils';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -644,7 +643,7 @@ const cvaDateTimeSince = cvaMerge(["slashed-zero", "text-neutral-500", "text-xs"
|
|
|
644
643
|
* @example Date column with days-since indicator
|
|
645
644
|
* ```tsx
|
|
646
645
|
* import { PlainDateCell } from "@trackunit/react-table-base-components";
|
|
647
|
-
* import { Temporal } from "@
|
|
646
|
+
* import { Temporal } from "@trackunit/date-and-time-utils";
|
|
648
647
|
*
|
|
649
648
|
* const cell = ({ row }) => (
|
|
650
649
|
* <PlainDateCell date={Temporal.PlainDate.from(row.original.lastServiceDate)} />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table-base-components",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.7",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,14 +8,13 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/react-components": "1.18.
|
|
12
|
-
"@trackunit/ui-icons": "1.11.
|
|
13
|
-
"@trackunit/react-form-components": "1.15.
|
|
14
|
-
"@trackunit/css-class-variance-utilities": "1.11.
|
|
15
|
-
"@trackunit/date-and-time-utils": "1.11.
|
|
16
|
-
"@trackunit/shared-utils": "1.13.
|
|
17
|
-
"tailwind-merge": "^2.0.0"
|
|
18
|
-
"@js-temporal/polyfill": "^0.5.1"
|
|
11
|
+
"@trackunit/react-components": "1.18.7",
|
|
12
|
+
"@trackunit/ui-icons": "1.11.65",
|
|
13
|
+
"@trackunit/react-form-components": "1.15.7",
|
|
14
|
+
"@trackunit/css-class-variance-utilities": "1.11.67",
|
|
15
|
+
"@trackunit/date-and-time-utils": "1.11.68",
|
|
16
|
+
"@trackunit/shared-utils": "1.13.67",
|
|
17
|
+
"tailwind-merge": "^2.0.0"
|
|
19
18
|
},
|
|
20
19
|
"module": "./index.esm.js",
|
|
21
20
|
"main": "./index.cjs.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Temporal } from "@
|
|
1
|
+
import { Temporal } from "@trackunit/date-and-time-utils";
|
|
2
2
|
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
3
3
|
export interface PlainDateCellProps extends CommonProps, Refable<HTMLDivElement> {
|
|
4
4
|
/**
|
|
@@ -34,7 +34,7 @@ export interface PlainDateCellProps extends CommonProps, Refable<HTMLDivElement>
|
|
|
34
34
|
* @example Date column with days-since indicator
|
|
35
35
|
* ```tsx
|
|
36
36
|
* import { PlainDateCell } from "@trackunit/react-table-base-components";
|
|
37
|
-
* import { Temporal } from "@
|
|
37
|
+
* import { Temporal } from "@trackunit/date-and-time-utils";
|
|
38
38
|
*
|
|
39
39
|
* const cell = ({ row }) => (
|
|
40
40
|
* <PlainDateCell date={Temporal.PlainDate.from(row.original.lastServiceDate)} />
|