@terraware/web-components 5.2.7-rc.0 → 5.2.7-rc.1

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.
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { MRT_Cell, MRT_TableInstance } from 'material-react-table';
3
2
  import type { ColumnEditConfig } from '.';
4
3
  type Props<TData extends Record<string, any>> = {
@@ -6,6 +5,6 @@ type Props<TData extends Record<string, any>> = {
6
5
  table: MRT_TableInstance<TData>;
7
6
  config: ColumnEditConfig<TData>;
8
7
  };
9
- declare const CustomCellEditor: <TData extends Record<string, any>>({ cell, table, config }: Props<TData>) => React.JSX.Element | null;
8
+ declare const CustomCellEditor: <TData extends Record<string, any>>({ cell, table, config }: Props<TData>) => string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null;
10
9
  export default CustomCellEditor;
11
10
  //# sourceMappingURL=CustomCellEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomCellEditor.d.ts","sourceRoot":"","sources":["../../../src/components/EditableTable/CustomCellEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAE1C,KAAK,KAAK,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IAC9C,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtB,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,yBAAyB,KAAK,CAAC,KAAK,CAAC,6BAoDjG,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CustomCellEditor.d.ts","sourceRoot":"","sources":["../../../src/components/EditableTable/CustomCellEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAE1C,KAAK,KAAK,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IAC9C,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtB,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,yBAAyB,KAAK,CAAC,KAAK,CAAC,mZAmDjG,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,4 +1,3 @@
1
- import { jsx } from "react/jsx-runtime";
2
1
  import { useEffect, useRef, useState } from "react";
3
2
  const CustomCellEditor = ({ cell, table, config })=>{
4
3
  const [isSaving, setIsSaving] = useState(false);
@@ -30,16 +29,15 @@ const CustomCellEditor = ({ cell, table, config })=>{
30
29
  if (mounted.current) setIsSaving(false);
31
30
  }
32
31
  };
33
- const Component = config.customEditComponent;
34
- return Component ? /*#__PURE__*/ jsx(Component, {
35
- cell: cell,
32
+ return config.customEditComponent?.({
33
+ cell,
36
34
  row: cell.row,
37
35
  column: cell.column,
38
- table: table,
39
- save: save,
40
- cancel: cancel,
41
- isSaving: isSaving
42
- }) : null;
36
+ table,
37
+ save,
38
+ cancel,
39
+ isSaving
40
+ }) ?? null;
43
41
  };
44
42
  const EditableTable_CustomCellEditor = CustomCellEditor;
45
43
  export default EditableTable_CustomCellEditor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraware/web-components",
3
- "version": "5.2.7-rc.0",
3
+ "version": "5.2.7-rc.1",
4
4
  "author": "Terraformation Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {