@trackunit/react-table-helpers 0.0.619 → 0.0.622

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
@@ -75,6 +75,7 @@ const customFieldToCell = (customField, unitTranslation, unitPreference, languag
75
75
  const date = customField.dateValue;
76
76
  return date ? jsxRuntime.jsx(reactTableBaseComponents.PlainDateCell, { date: polyfill.Temporal.PlainDate.from(date), locale: language }) : null;
77
77
  }
78
+ case "STRING_LIST":
78
79
  case "DROPDOWN": {
79
80
  const tags = (_e = customField.stringArrayValue) !== null && _e !== void 0 ? _e : [];
80
81
  return jsxRuntime.jsx(reactTableBaseComponents.TagsCell, { tags: tags });
package/index.esm.js CHANGED
@@ -73,6 +73,7 @@ const customFieldToCell = (customField, unitTranslation, unitPreference, languag
73
73
  const date = customField.dateValue;
74
74
  return date ? jsx(PlainDateCell, { date: Temporal.PlainDate.from(date), locale: language }) : null;
75
75
  }
76
+ case "STRING_LIST":
76
77
  case "DROPDOWN": {
77
78
  const tags = (_e = customField.stringArrayValue) !== null && _e !== void 0 ? _e : [];
78
79
  return jsx(TagsCell, { tags: tags });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-helpers",
3
- "version": "0.0.619",
3
+ "version": "0.0.622",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -3,7 +3,7 @@ import { UnitOfMeasurementType } from "@trackunit/iris-app-runtime-core-api";
3
3
  * The different types of custom fields that are available.
4
4
  * Hardcoded to match the GraphQL API, to keep the lib independent of the API.
5
5
  */
6
- export type CustomFieldType = "BOOLEAN" | "DATE" | "DROPDOWN" | "EMAIL" | "NUMBER" | "PHONE_NUMBER" | "STRING" | "WEB_ADDRESS" | "JSON" | "MONETARY";
6
+ export type CustomFieldType = "BOOLEAN" | "DATE" | "DROPDOWN" | "STRING_LIST" | "EMAIL" | "NUMBER" | "PHONE_NUMBER" | "STRING" | "WEB_ADDRESS" | "JSON" | "MONETARY";
7
7
  /**
8
8
  * The type for the CustomFieldDefinition object from the GraphQL API.
9
9
  * This is manually created to match the GraphQL API, to keep the lib independent of the API.
@@ -44,6 +44,15 @@ export type CustomFieldData = {
44
44
  id?: string | null;
45
45
  };
46
46
  stringArrayValue?: string[] | null;
47
+ } | {
48
+ valueId?: string | null;
49
+ type: "STRING_LIST";
50
+ definition: {
51
+ title?: string | null;
52
+ key?: string | null;
53
+ id?: string | null;
54
+ };
55
+ stringArrayValue?: string[] | null;
47
56
  } | {
48
57
  valueId?: string | null;
49
58
  stringValue?: string | null;