@trackunit/react-table-helpers 0.0.453 → 0.0.454

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,6 +7,7 @@ var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
7
7
  var customFieldComponents = require('@trackunit/custom-field-components');
8
8
  var reactTable = require('@trackunit/react-table');
9
9
  var react = require('react');
10
+ var polyfill = require('@js-temporal/polyfill');
10
11
  var irisAppRuntimeCore = require('@trackunit/iris-app-runtime-core');
11
12
  var reactTableBaseComponents = require('@trackunit/react-table-base-components');
12
13
 
@@ -74,7 +75,7 @@ const customFieldToCell = (customField, unitTranslation, unitPreference, languag
74
75
  }
75
76
  case "DATE": {
76
77
  const date = customField.dateValue;
77
- return date ? jsxRuntime.jsx(reactTableBaseComponents.DateTimeCell, { date: new Date(date) }) : null;
78
+ return date ? jsxRuntime.jsx(reactTableBaseComponents.PlainDateCell, { date: polyfill.Temporal.PlainDate.from(date), locale: language }) : null;
78
79
  }
79
80
  case "DROPDOWN": {
80
81
  const tags = (_e = customField.stringArrayValue) !== null && _e !== void 0 ? _e : [];
package/index.esm.js CHANGED
@@ -3,8 +3,9 @@ import { registerTranslations } from '@trackunit/i18n-library-translation';
3
3
  import { useUnitTranslation } from '@trackunit/custom-field-components';
4
4
  import { createColumnHelper } from '@trackunit/react-table';
5
5
  import { useMemo } from 'react';
6
+ import { Temporal } from '@js-temporal/polyfill';
6
7
  import { getCustomFieldValueForDisplayInUI } from '@trackunit/iris-app-runtime-core';
7
- import { NumberCell, TextCell, TagsCell, DateTimeCell, LinkCell, CheckboxCell } from '@trackunit/react-table-base-components';
8
+ import { NumberCell, TextCell, TagsCell, PlainDateCell, LinkCell, CheckboxCell } from '@trackunit/react-table-base-components';
8
9
 
9
10
  var defaultTranslations = {
10
11
 
@@ -70,7 +71,7 @@ const customFieldToCell = (customField, unitTranslation, unitPreference, languag
70
71
  }
71
72
  case "DATE": {
72
73
  const date = customField.dateValue;
73
- return date ? jsx(DateTimeCell, { date: new Date(date) }) : null;
74
+ return date ? jsx(PlainDateCell, { date: Temporal.PlainDate.from(date), locale: language }) : null;
74
75
  }
75
76
  case "DROPDOWN": {
76
77
  const tags = (_e = customField.stringArrayValue) !== null && _e !== void 0 ? _e : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-helpers",
3
- "version": "0.0.453",
3
+ "version": "0.0.454",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,7 +14,8 @@
14
14
  "@trackunit/i18n-library-translation": "*",
15
15
  "@trackunit/iris-app-runtime-core": "*",
16
16
  "@trackunit/react-table-base-components": "*",
17
- "@trackunit/custom-field-components": "*"
17
+ "@trackunit/custom-field-components": "*",
18
+ "@js-temporal/polyfill": "^0.4.4"
18
19
  },
19
20
  "module": "./index.esm.js",
20
21
  "main": "./index.cjs.js"