@join-x5/react-data-grid 1.3.1-alpha-0 → 1.4.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.
Files changed (49) hide show
  1. package/dist/DataGrid.es.js +81 -59
  2. package/dist/DataGrid.es.js.map +1 -1
  3. package/dist/Table/index.es.js +34 -34
  4. package/dist/Table/index.es.js.map +1 -1
  5. package/dist/TableBody/DataGridTableBody.d.ts +12 -0
  6. package/dist/TableBody/DataGridTableBody.es.js +41 -0
  7. package/dist/TableBody/DataGridTableBody.es.js.map +1 -0
  8. package/dist/TableBody/DataGridTableBodyVirtual.d.ts +2 -0
  9. package/dist/TableBody/DataGridTableBodyVirtual.es.js +18 -0
  10. package/dist/TableBody/DataGridTableBodyVirtual.es.js.map +1 -0
  11. package/dist/TableBody/hook.d.ts +839 -0
  12. package/dist/TableBody/hook.es.js +49 -0
  13. package/dist/TableBody/hook.es.js.map +1 -0
  14. package/dist/TableBody/index.d.ts +3 -11
  15. package/dist/TableBody/types.d.ts +2 -0
  16. package/dist/TableCell/hook.es.js +8 -9
  17. package/dist/TableCell/hook.es.js.map +1 -1
  18. package/dist/TableCell/index.es.js +120 -133
  19. package/dist/TableCell/index.es.js.map +1 -1
  20. package/dist/TableHead/index.d.ts +4 -2
  21. package/dist/TableHead/index.es.js +16 -13
  22. package/dist/TableHead/index.es.js.map +1 -1
  23. package/dist/TableHeadCell/index.es.js +71 -74
  24. package/dist/TableHeadCell/index.es.js.map +1 -1
  25. package/dist/TableInputCell/date.es.js +29 -32
  26. package/dist/TableInputCell/date.es.js.map +1 -1
  27. package/dist/TableInputCell/dropdown.es.js +29 -32
  28. package/dist/TableInputCell/dropdown.es.js.map +1 -1
  29. package/dist/TableInputCell/hook.d.ts +30 -30
  30. package/dist/TableInputCell/hook.es.js +30 -33
  31. package/dist/TableInputCell/hook.es.js.map +1 -1
  32. package/dist/TableInputCell/text.es.js +39 -41
  33. package/dist/TableInputCell/text.es.js.map +1 -1
  34. package/dist/TableInputCell/textarea.es.js +38 -40
  35. package/dist/TableInputCell/textarea.es.js.map +1 -1
  36. package/dist/TableRow/index.d.ts +2 -3
  37. package/dist/TableRow/index.es.js +16 -17
  38. package/dist/TableRow/index.es.js.map +1 -1
  39. package/dist/hook.es.js +14 -17
  40. package/dist/hook.es.js.map +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.es.js +61 -60
  44. package/dist/index.es.js.map +1 -1
  45. package/dist/types.d.ts +36 -2
  46. package/package.json +13 -12
  47. package/dist/TableBody/index.es.js +0 -26
  48. package/dist/TableBody/index.es.js.map +0 -1
  49. package/dist/TableRow/types.d.ts +0 -2
@@ -1,40 +1,37 @@
1
1
  "use client";
2
- import { jsx as a } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as C } from "@join-x5/react-theme";
4
- import { Datepicker as f } from "@join-x5/react";
5
- import { TableCell as v } from "../TableCell/index.es.js";
6
- import { useDataGridInputCell as b } from "./hook.es.js";
7
- const o = C(({
8
- inputProps: c,
2
+ import { jsx as s } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as r } from "@join-x5/react-theme";
4
+ import { Datepicker as D } from "@join-x5/react";
5
+ import { TableCell as u } from "../TableCell/index.es.js";
6
+ import { useDataGridInputCell as m } from "./hook.es.js";
7
+ const C = r(({
8
+ inputProps: i,
9
9
  ...e
10
- }, l) => {
11
- const d = (i) => {
12
- var t;
13
- (t = e.setIsActive) == null || t.call(e, i);
10
+ }, n) => {
11
+ const c = (t) => {
12
+ e.setIsActive?.(t);
14
13
  };
15
- return /* @__PURE__ */ a(v, { ref: l, padding: 0, ...e, onKeyDown: (i) => {
16
- var n, m;
17
- (n = e.onKeyDown) == null || n.call(e, i);
18
- const t = i.code === "Enter" || i.code === "NumpadEnter";
19
- !e.isDisabled && !e.isActive && t && ((m = e.setIsActive) == null || m.call(e, !0));
20
- }, onClick: (i) => {
21
- var t, n;
22
- (t = e.onClick) == null || t.call(e, i), !e.isDisabled && !e.isActive && ((n = e.setIsActive) == null || n.call(e, !0));
23
- }, children: /* @__PURE__ */ a(f, { isTable: !0, size: e.size, disabled: e.isDisabled, isOpen: e.isActive, setIsOpen: d, ...c }) });
24
- }), s = C((c, e) => {
14
+ return /* @__PURE__ */ s(u, { ref: n, padding: 0, ...e, onKeyDown: (t) => {
15
+ e.onKeyDown?.(t);
16
+ const o = t.code === "Enter" || t.code === "NumpadEnter";
17
+ !e.isDisabled && !e.isActive && o && e.setIsActive?.(!0);
18
+ }, onClick: (t) => {
19
+ e.onClick?.(t), !e.isDisabled && !e.isActive && e.setIsActive?.(!0);
20
+ }, children: /* @__PURE__ */ s(D, { isTable: !0, size: e.size, disabled: e.isDisabled, isOpen: e.isActive, setIsOpen: c, ...i }) });
21
+ }), f = r((i, e) => {
25
22
  const {
26
- cell: l,
27
- getValue: d,
28
- onChange: D,
29
- ...u
30
- } = c, i = b(l), t = u;
31
- return t.value = d(l), t.onChange = (n) => D(l, n), /* @__PURE__ */ a(o, { ref: e, ...i, inputProps: t });
32
- }), h = (c) => ({
23
+ cell: n,
24
+ getValue: c,
25
+ onChange: l,
26
+ ...a
27
+ } = i, t = m(n), o = a;
28
+ return o.value = c(n), o.onChange = (d) => l(n, d), /* @__PURE__ */ s(C, { ref: e, ...t, inputProps: o });
29
+ }), k = (i) => ({
33
30
  cell: e
34
- }) => /* @__PURE__ */ a(s, { cell: e, ...c }, e.id);
31
+ }) => /* @__PURE__ */ s(f, { cell: e, ...i }, e.id);
35
32
  export {
36
- s as DataGridDateCell,
37
- o as DateCell,
38
- h as getDataGridDateCell
33
+ f as DataGridDateCell,
34
+ C as DateCell,
35
+ k as getDataGridDateCell
39
36
  };
40
37
  //# sourceMappingURL=date.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.es.js","sources":["../../src/TableInputCell/date.tsx"],"sourcesContent":["'use client';\n\nimport {forwardRef} from '@join-x5/react-theme';\nimport {Datepicker} from '@join-x5/react';\n\nimport {TableCell} from '../TableCell';\n\nimport {useDataGridInputCell} from './hook';\n\nimport type {KeyboardEventHandler, MouseEventHandler} from 'react';\nimport type {Cell as ReactTableCell} from '@tanstack/react-table';\nimport type {FRC} from '@join-x5/react-theme';\nimport type {DataGridTableCellProps, TableCellProps} from '../TableCell';\nimport type {ColumnDefTemplate} from './types';\nimport type {CalendarValue, DatepickerProps} from '@join-x5/react';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype DefaultAny = any;\n\ntype TDateCell = FRC<\n HTMLTableCellElement,\n {\n inputProps: DatepickerProps;\n } & Omit<TableCellProps, 'value' | 'onChange'>\n>;\n\nexport const DateCell: TDateCell = forwardRef(({inputProps, ...props}, ref) => {\n const setIsOpen: DatepickerProps['setIsOpen'] = newIsOpen => {\n props.setIsActive?.(newIsOpen);\n };\n\n const onClick: MouseEventHandler<HTMLTableCellElement> = e => {\n props.onClick?.(e);\n\n if (!props.isDisabled && !props.isActive) {\n props.setIsActive?.(true);\n }\n };\n\n const onKeyDown: KeyboardEventHandler<HTMLTableCellElement> = e => {\n props.onKeyDown?.(e);\n\n const isEnterCode = e.code === 'Enter' || e.code === 'NumpadEnter';\n\n if (!props.isDisabled && !props.isActive && isEnterCode) {\n props.setIsActive?.(true);\n }\n };\n\n return (\n <TableCell ref={ref} padding={0} {...props} onKeyDown={onKeyDown} onClick={onClick}>\n <Datepicker\n isTable\n size={props.size}\n disabled={props.isDisabled}\n isOpen={props.isActive}\n setIsOpen={setIsOpen}\n {...inputProps}\n />\n </TableCell>\n );\n});\n\nexport type DataGridDateCellProps<T = DefaultAny, V = DefaultAny> = {\n getValue: (cell: ReactTableCell<T, V>) => CalendarValue;\n onChange: (cell: ReactTableCell<T, V>, newValue: CalendarValue) => void;\n} & Omit<DatepickerProps, 'value' | 'onChange'> &\n DataGridTableCellProps<T, V>;\n\nexport const DataGridDateCell: FRC<HTMLTableCellElement, DataGridDateCellProps> = forwardRef((props, ref) => {\n const {cell, getValue, onChange, ...rest} = props;\n\n const cellProps = useDataGridInputCell(cell);\n\n const inputProps = rest as DatepickerProps;\n inputProps.value = getValue(cell);\n inputProps.onChange = newValue => onChange(cell, newValue);\n\n return <DateCell ref={ref} {...cellProps} inputProps={inputProps} />;\n});\n\nexport type GetDataGridDateCellArgs<T = DefaultAny, V = DefaultAny> = Omit<DataGridDateCellProps<T, V>, 'cell'>;\n\nexport const getDataGridDateCell = <T, V>(args: GetDataGridDateCellArgs<T, V>): ColumnDefTemplate<T, V> => {\n return ({cell}) => <DataGridDateCell key={cell.id} cell={cell} {...args} />;\n};\n"],"names":["inputProps","props","newIsOpen","cell","getValue","onChange","rest"],"mappings":";;;;;;AA0BO;AAAwC;AAACA;AAAoB;AAClE;;AACEC;AAAoBC;AAqBtB;;AATED;AAEA;AAEA;AACsB;;AAbtBA;AAGsB;AA0B1B;AASE;AAAM;AAACE;AAAMC;AAAUC;AAAaC;AAKpCN;AAIF;AAKU;AAACG;;;;;;"}
1
+ {"version":3,"file":"date.es.js","sources":["../../src/TableInputCell/date.tsx"],"sourcesContent":["'use client';\n\nimport {forwardRef} from '@join-x5/react-theme';\nimport {Datepicker} from '@join-x5/react';\n\nimport {TableCell} from '../TableCell';\n\nimport {useDataGridInputCell} from './hook';\n\nimport type {KeyboardEventHandler, MouseEventHandler} from 'react';\nimport type {Cell as ReactTableCell} from '@tanstack/react-table';\nimport type {FRC} from '@join-x5/react-theme';\nimport type {DataGridTableCellProps, TableCellProps} from '../TableCell';\nimport type {ColumnDefTemplate} from './types';\nimport type {CalendarValue, DatepickerProps} from '@join-x5/react';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype DefaultAny = any;\n\ntype TDateCell = FRC<\n HTMLTableCellElement,\n {\n inputProps: DatepickerProps;\n } & Omit<TableCellProps, 'value' | 'onChange'>\n>;\n\nexport const DateCell: TDateCell = forwardRef(({inputProps, ...props}, ref) => {\n const setIsOpen: DatepickerProps['setIsOpen'] = newIsOpen => {\n props.setIsActive?.(newIsOpen);\n };\n\n const onClick: MouseEventHandler<HTMLTableCellElement> = e => {\n props.onClick?.(e);\n\n if (!props.isDisabled && !props.isActive) {\n props.setIsActive?.(true);\n }\n };\n\n const onKeyDown: KeyboardEventHandler<HTMLTableCellElement> = e => {\n props.onKeyDown?.(e);\n\n const isEnterCode = e.code === 'Enter' || e.code === 'NumpadEnter';\n\n if (!props.isDisabled && !props.isActive && isEnterCode) {\n props.setIsActive?.(true);\n }\n };\n\n return (\n <TableCell ref={ref} padding={0} {...props} onKeyDown={onKeyDown} onClick={onClick}>\n <Datepicker\n isTable\n size={props.size}\n disabled={props.isDisabled}\n isOpen={props.isActive}\n setIsOpen={setIsOpen}\n {...inputProps}\n />\n </TableCell>\n );\n});\n\nexport type DataGridDateCellProps<T = DefaultAny, V = DefaultAny> = {\n getValue: (cell: ReactTableCell<T, V>) => CalendarValue;\n onChange: (cell: ReactTableCell<T, V>, newValue: CalendarValue) => void;\n} & Omit<DatepickerProps, 'value' | 'onChange'> &\n DataGridTableCellProps<T, V>;\n\nexport const DataGridDateCell: FRC<HTMLTableCellElement, DataGridDateCellProps> = forwardRef((props, ref) => {\n const {cell, getValue, onChange, ...rest} = props;\n\n const cellProps = useDataGridInputCell(cell);\n\n const inputProps = rest as DatepickerProps;\n inputProps.value = getValue(cell);\n inputProps.onChange = newValue => onChange(cell, newValue);\n\n return <DateCell ref={ref} {...cellProps} inputProps={inputProps} />;\n});\n\nexport type GetDataGridDateCellArgs<T = DefaultAny, V = DefaultAny> = Omit<DataGridDateCellProps<T, V>, 'cell'>;\n\nexport const getDataGridDateCell = <T, V>(args: GetDataGridDateCellArgs<T, V>): ColumnDefTemplate<T, V> => {\n return ({cell}) => <DataGridDateCell key={cell.id} cell={cell} {...args} />;\n};\n"],"names":["inputProps","props","cell","getValue","onChange","rest"],"mappings":";;;;;;AA0BO;AAAwC;AAACA;AAAoB;AAClE;AACEC;AAA6B;AAqB/B;AATEA;AAEA;AAEA;AAC0B;AAb1BA;AAG0B;AA0B9B;AASE;AAAM;AAACC;AAAMC;AAAUC;AAAaC;AAKpCL;AAIF;AAKU;AAACE;;;;;;"}
@@ -1,40 +1,37 @@
1
1
  "use client";
2
- import { jsx as d } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as m } from "@join-x5/react-theme";
4
- import { Select as C } from "@join-x5/react";
5
- import { TableCell as f } from "../TableCell/index.es.js";
6
- import { useDataGridInputCell as v } from "./hook.es.js";
7
- const w = m(({
8
- inputProps: l,
2
+ import { jsx as s } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as d } from "@join-x5/react-theme";
4
+ import { Select as u } from "@join-x5/react";
5
+ import { TableCell as D } from "../TableCell/index.es.js";
6
+ import { useDataGridInputCell as m } from "./hook.es.js";
7
+ const C = d(({
8
+ inputProps: i,
9
9
  ...e
10
- }, c) => {
11
- const a = (i) => {
12
- var t;
13
- (t = e.setIsActive) == null || t.call(e, i);
10
+ }, n) => {
11
+ const l = (t) => {
12
+ e.setIsActive?.(t);
14
13
  };
15
- return /* @__PURE__ */ d(f, { ref: c, padding: 0, ...e, onKeyDown: (i) => {
16
- var n, D;
17
- (n = e.onKeyDown) == null || n.call(e, i);
18
- const t = i.code === "Enter" || i.code === "NumpadEnter";
19
- !e.isDisabled && !e.isActive && t && ((D = e.setIsActive) == null || D.call(e, !0));
20
- }, onClick: (i) => {
21
- var t, n;
22
- (t = e.onClick) == null || t.call(e, i), !e.isDisabled && !e.isActive && ((n = e.setIsActive) == null || n.call(e, !0));
23
- }, children: /* @__PURE__ */ d(C, { isTable: !0, size: e.size, disabled: e.isDisabled, isOpen: e.isActive, setIsOpen: a, ...l }) });
24
- }), b = m((l, e) => {
14
+ return /* @__PURE__ */ s(D, { ref: n, padding: 0, ...e, onKeyDown: (t) => {
15
+ e.onKeyDown?.(t);
16
+ const o = t.code === "Enter" || t.code === "NumpadEnter";
17
+ !e.isDisabled && !e.isActive && o && e.setIsActive?.(!0);
18
+ }, onClick: (t) => {
19
+ e.onClick?.(t), !e.isDisabled && !e.isActive && e.setIsActive?.(!0);
20
+ }, children: /* @__PURE__ */ s(u, { isTable: !0, size: e.size, disabled: e.isDisabled, isOpen: e.isActive, setIsOpen: l, ...i }) });
21
+ }), f = d((i, e) => {
25
22
  const {
26
- cell: c,
27
- getValue: a,
28
- onChange: o,
29
- ...u
30
- } = l, i = v(c), t = u;
31
- return t.value = a(c), t.onChange = (...n) => o(c, ...n), /* @__PURE__ */ d(w, { ref: e, ...i, inputProps: t });
32
- }), k = (l) => ({
23
+ cell: n,
24
+ getValue: l,
25
+ onChange: c,
26
+ ...r
27
+ } = i, t = m(n), o = r;
28
+ return o.value = l(n), o.onChange = (...a) => c(n, ...a), /* @__PURE__ */ s(C, { ref: e, ...t, inputProps: o });
29
+ }), I = (i) => ({
33
30
  cell: e
34
- }) => /* @__PURE__ */ d(b, { cell: e, ...l }, e.id);
31
+ }) => /* @__PURE__ */ s(f, { cell: e, ...i }, e.id);
35
32
  export {
36
- b as DataGridDropdownCell,
37
- w as DropdownCell,
38
- k as getDataGridDropdownCell
33
+ f as DataGridDropdownCell,
34
+ C as DropdownCell,
35
+ I as getDataGridDropdownCell
39
36
  };
40
37
  //# sourceMappingURL=dropdown.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.es.js","sources":["../../src/TableInputCell/dropdown.tsx"],"sourcesContent":["'use client';\n\nimport {forwardRef} from '@join-x5/react-theme';\nimport {Select} from '@join-x5/react';\n\nimport {TableCell} from '../TableCell';\n\nimport {useDataGridInputCell} from './hook';\n\nimport type {ChangeEvent, KeyboardEventHandler, MouseEventHandler} from 'react';\nimport type {Cell as ReactTableCell} from '@tanstack/react-table';\nimport type {FRC} from '@join-x5/react-theme';\nimport type {DatepickerProps, SelectOption, SelectProps} from '@join-x5/react';\nimport type {DataGridTableCellProps, TableCellProps} from '../TableCell';\nimport type {ColumnDefTemplate} from './types';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype DefaultAny = any;\n\ntype TDropdownCell = FRC<\n HTMLTableCellElement,\n {\n inputProps: SelectProps;\n } & Omit<TableCellProps, 'value' | 'onChange'>\n>;\n\nexport const DropdownCell: TDropdownCell = forwardRef(({inputProps, ...props}, ref) => {\n const setIsOpen: DatepickerProps['setIsOpen'] = newIsOpen => {\n props.setIsActive?.(newIsOpen);\n };\n\n const onClick: MouseEventHandler<HTMLTableCellElement> = e => {\n props.onClick?.(e);\n\n if (!props.isDisabled && !props.isActive) {\n props.setIsActive?.(true);\n }\n };\n\n const onKeyDown: KeyboardEventHandler<HTMLTableCellElement> = e => {\n props.onKeyDown?.(e);\n\n const isEnterCode = e.code === 'Enter' || e.code === 'NumpadEnter';\n\n if (!props.isDisabled && !props.isActive && isEnterCode) {\n props.setIsActive?.(true);\n }\n };\n\n return (\n <TableCell ref={ref} padding={0} {...props} onKeyDown={onKeyDown} onClick={onClick}>\n <Select\n isTable\n size={props.size}\n disabled={props.isDisabled}\n isOpen={props.isActive}\n setIsOpen={setIsOpen}\n {...inputProps}\n />\n </TableCell>\n );\n});\n\nexport type DataGridDropdownCellProps<T = DefaultAny, V = DefaultAny, O = unknown> = {\n getValue: (cell: ReactTableCell<T, V>) => SelectProps['value'];\n onChange: (\n cell: ReactTableCell<T, V>,\n newValue: SelectProps['value'],\n option?: SelectOption<O>,\n event?: ChangeEvent<HTMLInputElement>\n ) => void;\n} & Omit<SelectProps, 'value' | 'onChange'> &\n DataGridTableCellProps<T, V>;\n\nexport const DataGridDropdownCell: FRC<HTMLTableCellElement, DataGridDropdownCellProps> = forwardRef((props, ref) => {\n const {cell, getValue, onChange, ...rest} = props;\n\n const cellProps = useDataGridInputCell(cell);\n\n const inputProps = rest as SelectProps;\n inputProps.value = getValue(cell);\n inputProps.onChange = (...args) => onChange(cell, ...args);\n\n return <DropdownCell ref={ref} {...cellProps} inputProps={inputProps} />;\n});\n\nexport type GetDataGridDropdownCellArgs<T = DefaultAny, V = DefaultAny> = Omit<DataGridDropdownCellProps<T, V>, 'cell'>;\n\nexport const getDataGridDropdownCell = <T, V>(args: GetDataGridDropdownCellArgs<T, V>): ColumnDefTemplate<T, V> => {\n return ({cell}) => <DataGridDropdownCell key={cell.id} cell={cell} {...args} />;\n};\n"],"names":["inputProps","props","newIsOpen","cell","getValue","onChange","rest"],"mappings":";;;;;;AA0BO;AAAgD;AAACA;AAAoB;AAC1E;;AACEC;AAAoBC;AAqBtB;;AATED;AAEA;AAEA;AACsB;;AAbtBA;AAGsB;AA0B1B;AAcE;AAAM;AAACE;AAAMC;AAAUC;AAAaC;AAKpCN;AAIF;AAKU;AAACG;;;;;;"}
1
+ {"version":3,"file":"dropdown.es.js","sources":["../../src/TableInputCell/dropdown.tsx"],"sourcesContent":["'use client';\n\nimport {forwardRef} from '@join-x5/react-theme';\nimport {Select} from '@join-x5/react';\n\nimport {TableCell} from '../TableCell';\n\nimport {useDataGridInputCell} from './hook';\n\nimport type {ChangeEvent, KeyboardEventHandler, MouseEventHandler} from 'react';\nimport type {Cell as ReactTableCell} from '@tanstack/react-table';\nimport type {FRC} from '@join-x5/react-theme';\nimport type {DatepickerProps, SelectOption, SelectProps} from '@join-x5/react';\nimport type {DataGridTableCellProps, TableCellProps} from '../TableCell';\nimport type {ColumnDefTemplate} from './types';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype DefaultAny = any;\n\ntype TDropdownCell = FRC<\n HTMLTableCellElement,\n {\n inputProps: SelectProps;\n } & Omit<TableCellProps, 'value' | 'onChange'>\n>;\n\nexport const DropdownCell: TDropdownCell = forwardRef(({inputProps, ...props}, ref) => {\n const setIsOpen: DatepickerProps['setIsOpen'] = newIsOpen => {\n props.setIsActive?.(newIsOpen);\n };\n\n const onClick: MouseEventHandler<HTMLTableCellElement> = e => {\n props.onClick?.(e);\n\n if (!props.isDisabled && !props.isActive) {\n props.setIsActive?.(true);\n }\n };\n\n const onKeyDown: KeyboardEventHandler<HTMLTableCellElement> = e => {\n props.onKeyDown?.(e);\n\n const isEnterCode = e.code === 'Enter' || e.code === 'NumpadEnter';\n\n if (!props.isDisabled && !props.isActive && isEnterCode) {\n props.setIsActive?.(true);\n }\n };\n\n return (\n <TableCell ref={ref} padding={0} {...props} onKeyDown={onKeyDown} onClick={onClick}>\n <Select\n isTable\n size={props.size}\n disabled={props.isDisabled}\n isOpen={props.isActive}\n setIsOpen={setIsOpen}\n {...inputProps}\n />\n </TableCell>\n );\n});\n\nexport type DataGridDropdownCellProps<T = DefaultAny, V = DefaultAny, O = unknown> = {\n getValue: (cell: ReactTableCell<T, V>) => SelectProps['value'];\n onChange: (\n cell: ReactTableCell<T, V>,\n newValue: SelectProps['value'],\n option?: SelectOption<O>,\n event?: ChangeEvent<HTMLInputElement>\n ) => void;\n} & Omit<SelectProps, 'value' | 'onChange'> &\n DataGridTableCellProps<T, V>;\n\nexport const DataGridDropdownCell: FRC<HTMLTableCellElement, DataGridDropdownCellProps> = forwardRef((props, ref) => {\n const {cell, getValue, onChange, ...rest} = props;\n\n const cellProps = useDataGridInputCell(cell);\n\n const inputProps = rest as SelectProps;\n inputProps.value = getValue(cell);\n inputProps.onChange = (...args) => onChange(cell, ...args);\n\n return <DropdownCell ref={ref} {...cellProps} inputProps={inputProps} />;\n});\n\nexport type GetDataGridDropdownCellArgs<T = DefaultAny, V = DefaultAny> = Omit<DataGridDropdownCellProps<T, V>, 'cell'>;\n\nexport const getDataGridDropdownCell = <T, V>(args: GetDataGridDropdownCellArgs<T, V>): ColumnDefTemplate<T, V> => {\n return ({cell}) => <DataGridDropdownCell key={cell.id} cell={cell} {...args} />;\n};\n"],"names":["inputProps","props","cell","getValue","onChange","rest"],"mappings":";;;;;;AA0BO;AAAgD;AAACA;AAAoB;AAC1E;AACEC;AAA6B;AAqB/B;AATEA;AAEA;AAEA;AAC0B;AAb1BA;AAG0B;AA0B9B;AAcE;AAAM;AAACC;AAAMC;AAAUC;AAAaC;AAKpCL;AAIF;AAKU;AAACE;;;;;;"}
@@ -49,17 +49,17 @@ export declare const useTableCellTextInput: <T extends HTMLInputElement | HTMLTe
49
49
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
50
50
  autoFocus?: boolean | undefined;
51
51
  className?: string | undefined;
52
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
52
+ contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
53
53
  contextMenu?: string | undefined;
54
54
  dir?: string | undefined;
55
- draggable?: (boolean | "true" | "false") | undefined;
55
+ draggable?: (boolean | "false" | "true") | undefined;
56
56
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
57
57
  hidden?: boolean | undefined;
58
58
  id?: string | undefined;
59
59
  lang?: string | undefined;
60
60
  nonce?: string | undefined;
61
61
  slot?: string | undefined;
62
- spellCheck?: (boolean | "true" | "false") | undefined;
62
+ spellCheck?: (boolean | "false" | "true") | undefined;
63
63
  style?: import('react').CSSProperties | undefined;
64
64
  tabIndex?: number | undefined;
65
65
  title?: string | undefined;
@@ -93,11 +93,11 @@ export declare const useTableCellTextInput: <T extends HTMLInputElement | HTMLTe
93
93
  exportparts?: string | undefined;
94
94
  part?: string | undefined;
95
95
  "aria-activedescendant"?: string | undefined;
96
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
96
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
97
97
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
98
98
  "aria-braillelabel"?: string | undefined;
99
99
  "aria-brailleroledescription"?: string | undefined;
100
- "aria-busy"?: (boolean | "true" | "false") | undefined;
100
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
101
101
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
102
102
  "aria-colcount"?: number | undefined;
103
103
  "aria-colindex"?: number | undefined;
@@ -108,37 +108,37 @@ export declare const useTableCellTextInput: <T extends HTMLInputElement | HTMLTe
108
108
  "aria-describedby"?: string | undefined;
109
109
  "aria-description"?: string | undefined;
110
110
  "aria-details"?: string | undefined;
111
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
111
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
112
112
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
113
113
  "aria-errormessage"?: string | undefined;
114
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
114
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
115
115
  "aria-flowto"?: string | undefined;
116
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
116
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
117
117
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
118
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
118
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
119
119
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
120
120
  "aria-keyshortcuts"?: string | undefined;
121
121
  "aria-label"?: string | undefined;
122
122
  "aria-labelledby"?: string | undefined;
123
123
  "aria-level"?: number | undefined;
124
124
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
125
- "aria-modal"?: (boolean | "true" | "false") | undefined;
126
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
127
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
125
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
126
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
127
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
128
128
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
129
129
  "aria-owns"?: string | undefined;
130
130
  "aria-placeholder"?: string | undefined;
131
131
  "aria-posinset"?: number | undefined;
132
132
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
133
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
133
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
134
134
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
135
- "aria-required"?: (boolean | "true" | "false") | undefined;
135
+ "aria-required"?: (boolean | "false" | "true") | undefined;
136
136
  "aria-roledescription"?: string | undefined;
137
137
  "aria-rowcount"?: number | undefined;
138
138
  "aria-rowindex"?: number | undefined;
139
139
  "aria-rowindextext"?: string | undefined;
140
140
  "aria-rowspan"?: number | undefined;
141
- "aria-selected"?: (boolean | "true" | "false") | undefined;
141
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
142
142
  "aria-setsize"?: number | undefined;
143
143
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
144
144
  "aria-valuemax"?: number | undefined;
@@ -350,17 +350,17 @@ export declare const useDataGridInputCell: (cell: ReactTableCell<unknown, unknow
350
350
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
351
351
  autoFocus?: boolean | undefined;
352
352
  className?: string | undefined;
353
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
353
+ contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
354
354
  contextMenu?: string | undefined;
355
355
  dir?: string | undefined;
356
- draggable?: (boolean | "true" | "false") | undefined;
356
+ draggable?: (boolean | "false" | "true") | undefined;
357
357
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
358
358
  hidden?: boolean | undefined;
359
359
  id?: string | undefined;
360
360
  lang?: string | undefined;
361
361
  nonce?: string | undefined;
362
362
  slot?: string | undefined;
363
- spellCheck?: (boolean | "true" | "false") | undefined;
363
+ spellCheck?: (boolean | "false" | "true") | undefined;
364
364
  style?: import('react').CSSProperties | undefined;
365
365
  tabIndex?: number | undefined;
366
366
  title?: string | undefined;
@@ -394,11 +394,11 @@ export declare const useDataGridInputCell: (cell: ReactTableCell<unknown, unknow
394
394
  exportparts?: string | undefined;
395
395
  part?: string | undefined;
396
396
  "aria-activedescendant"?: string | undefined;
397
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
397
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
398
398
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
399
399
  "aria-braillelabel"?: string | undefined;
400
400
  "aria-brailleroledescription"?: string | undefined;
401
- "aria-busy"?: (boolean | "true" | "false") | undefined;
401
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
402
402
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
403
403
  "aria-colcount"?: number | undefined;
404
404
  "aria-colindex"?: number | undefined;
@@ -409,37 +409,37 @@ export declare const useDataGridInputCell: (cell: ReactTableCell<unknown, unknow
409
409
  "aria-describedby"?: string | undefined;
410
410
  "aria-description"?: string | undefined;
411
411
  "aria-details"?: string | undefined;
412
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
412
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
413
413
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
414
414
  "aria-errormessage"?: string | undefined;
415
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
415
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
416
416
  "aria-flowto"?: string | undefined;
417
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
417
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
418
418
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
419
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
419
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
420
420
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
421
421
  "aria-keyshortcuts"?: string | undefined;
422
422
  "aria-label"?: string | undefined;
423
423
  "aria-labelledby"?: string | undefined;
424
424
  "aria-level"?: number | undefined;
425
425
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
426
- "aria-modal"?: (boolean | "true" | "false") | undefined;
427
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
428
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
426
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
427
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
428
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
429
429
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
430
430
  "aria-owns"?: string | undefined;
431
431
  "aria-placeholder"?: string | undefined;
432
432
  "aria-posinset"?: number | undefined;
433
433
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
434
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
434
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
435
435
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
436
- "aria-required"?: (boolean | "true" | "false") | undefined;
436
+ "aria-required"?: (boolean | "false" | "true") | undefined;
437
437
  "aria-roledescription"?: string | undefined;
438
438
  "aria-rowcount"?: number | undefined;
439
439
  "aria-rowindex"?: number | undefined;
440
440
  "aria-rowindextext"?: string | undefined;
441
441
  "aria-rowspan"?: number | undefined;
442
- "aria-selected"?: (boolean | "true" | "false") | undefined;
442
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
443
443
  "aria-setsize"?: number | undefined;
444
444
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
445
445
  "aria-valuemax"?: number | undefined;
@@ -1,52 +1,49 @@
1
1
  "use client";
2
- import { useContext as d, useRef as C } from "react";
3
- import { useRefMerge as f } from "@join-x5/react-theme";
4
- import { DataGridContext as m } from "../DataGridContext.es.js";
5
- import { useDataGridTableCell as D } from "../TableCell/hook.es.js";
6
- const w = (t, u) => {
2
+ import { useContext as a, useRef as d } from "react";
3
+ import { useRefMerge as C } from "@join-x5/react-theme";
4
+ import { DataGridContext as f } from "../DataGridContext.es.js";
5
+ import { useDataGridTableCell as m } from "../TableCell/hook.es.js";
6
+ const T = (e, i) => {
7
7
  const {
8
8
  isDisabled: o,
9
- isActive: c,
10
- setIsActive: i
11
- } = t, l = f(u), s = C(null), r = () => {
12
- const e = s.current;
13
- o || !e || (i == null || i(!0), setTimeout(() => {
14
- e.selectionStart = e.value.length, e.focus();
9
+ isActive: n,
10
+ setIsActive: s
11
+ } = e, c = C(i), l = d(null), r = () => {
12
+ const t = l.current;
13
+ o || !t || (s?.(!0), setTimeout(() => {
14
+ t.selectionStart = t.value.length, t.focus();
15
15
  }));
16
16
  };
17
17
  return {
18
18
  cellProps: {
19
- ...t,
20
- ref: l,
21
- onClick: (e) => {
22
- var n;
23
- c || e.currentTarget.focus(), (n = t.onClick) == null || n.call(t, e);
19
+ ...e,
20
+ ref: c,
21
+ onClick: (t) => {
22
+ n || t.currentTarget.focus(), e.onClick?.(t);
24
23
  },
25
- onDoubleClick: (e) => {
26
- var n;
27
- r(), (n = t.onDoubleClick) == null || n.call(t, e);
24
+ onDoubleClick: (t) => {
25
+ r(), e.onDoubleClick?.(t);
28
26
  },
29
- onKeyDown: (e) => {
30
- var a;
31
- (a = t.onKeyDown) == null || a.call(t, e);
32
- const n = e.code === "Enter" || e.code === "NumpadEnter";
33
- !c && n && r();
27
+ onKeyDown: (t) => {
28
+ e.onKeyDown?.(t);
29
+ const u = t.code === "Enter" || t.code === "NumpadEnter";
30
+ !n && u && r();
34
31
  },
35
32
  "data-editable": o ? void 0 : !0
36
33
  },
37
- ref: l,
38
- inputRef: s
34
+ ref: c,
35
+ inputRef: l
39
36
  };
40
- }, y = (t) => {
41
- const u = D(t), o = d(m), c = t.id === o.activeCell;
37
+ }, E = (e) => {
38
+ const i = m(e), o = a(f), n = e.id === o.activeCell;
42
39
  return {
43
- ...u,
44
- isActive: c,
45
- setIsActive: (l) => o.setActiveCell(l ? t.id : null)
40
+ ...i,
41
+ isActive: n,
42
+ setIsActive: (c) => o.setActiveCell(c ? e.id : null)
46
43
  };
47
44
  };
48
45
  export {
49
- y as useDataGridInputCell,
50
- w as useTableCellTextInput
46
+ E as useDataGridInputCell,
47
+ T as useTableCellTextInput
51
48
  };
52
49
  //# sourceMappingURL=hook.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hook.es.js","sources":["../../src/TableInputCell/hook.ts"],"sourcesContent":["'use client';\n\nimport {useContext, useRef} from 'react';\nimport {useRefMerge} from '@join-x5/react-theme';\n\nimport {DataGridContext} from '../DataGridContext';\nimport {useDataGridTableCell} from '../TableCell/hook';\n\nimport type {KeyboardEventHandler, MouseEventHandler, Ref} from 'react';\nimport type {Cell as ReactTableCell} from '@tanstack/react-table';\nimport type {TableCellProps} from 'TableCell';\n\nexport const useTableCellTextInput = <T extends HTMLInputElement | HTMLTextAreaElement>(\n props: TableCellProps,\n baseRef: Ref<HTMLTableCellElement>\n) => {\n const {isDisabled, isActive, setIsActive} = props;\n\n const ref = useRefMerge(baseRef);\n const inputRef = useRef<T>(null);\n\n const onEdit = () => {\n const input = inputRef.current;\n if (isDisabled || !input) {\n return;\n }\n\n setIsActive?.(true);\n\n setTimeout(() => {\n input.selectionStart = input.value.length;\n input.focus();\n });\n };\n\n const onClick: MouseEventHandler<HTMLTableCellElement> = e => {\n if (!isActive) {\n e.currentTarget.focus();\n }\n\n props.onClick?.(e);\n };\n\n const onDoubleClick: MouseEventHandler<HTMLTableCellElement> = e => {\n onEdit();\n\n props.onDoubleClick?.(e);\n };\n\n const onKeyDown: KeyboardEventHandler<HTMLTableCellElement> = e => {\n props.onKeyDown?.(e);\n\n const isEnterCode = e.code === 'Enter' || e.code === 'NumpadEnter';\n\n if (!isActive && isEnterCode) {\n onEdit();\n }\n };\n\n const cellProps = {\n ...props,\n\n ref,\n onClick,\n onDoubleClick,\n onKeyDown,\n\n 'data-editable': !isDisabled ? true : undefined,\n };\n\n return {cellProps, ref, inputRef};\n};\n\nexport const useDataGridInputCell = (cell: ReactTableCell<unknown, unknown>) => {\n const props = useDataGridTableCell(cell);\n const context = useContext(DataGridContext);\n\n const isActive = cell.id === context.activeCell;\n const setIsActive = newIsActive => context.setActiveCell(newIsActive ? cell.id : null);\n\n return {...props, isActive, setIsActive};\n};\n"],"names":["isDisabled","isActive","setIsActive","input","focus","props","ref","e","onEdit","undefined","inputRef"],"mappings":";;;;;AAYO;AAIL;AAAM;AAACA;AAAYC;AAAUC;AAM3B;AACA;AAOEC;AACMC;AACP;AAsCH;AAAO;AAXW;AACbC;AAEHC;;AA1BA;AAIgBC;AAClB;;AAGEC;AAEsBD;AACxB;;AAGEF;AAEA;AAEA;AACEG;AAEJ;AAUiC;AAAOC;AAGrBH;AAAKI;AAC1B;AAGE;AAMA;AAAO;AAAIL;AAAOJ;AAFmE;AAGvF;;;;;"}
1
+ {"version":3,"file":"hook.es.js","sources":["../../src/TableInputCell/hook.ts"],"sourcesContent":["'use client';\n\nimport {useContext, useRef} from 'react';\nimport {useRefMerge} from '@join-x5/react-theme';\n\nimport {DataGridContext} from '../DataGridContext';\nimport {useDataGridTableCell} from '../TableCell/hook';\n\nimport type {KeyboardEventHandler, MouseEventHandler, Ref} from 'react';\nimport type {Cell as ReactTableCell} from '@tanstack/react-table';\nimport type {TableCellProps} from 'TableCell';\n\nexport const useTableCellTextInput = <T extends HTMLInputElement | HTMLTextAreaElement>(\n props: TableCellProps,\n baseRef: Ref<HTMLTableCellElement>\n) => {\n const {isDisabled, isActive, setIsActive} = props;\n\n const ref = useRefMerge(baseRef);\n const inputRef = useRef<T>(null);\n\n const onEdit = () => {\n const input = inputRef.current;\n if (isDisabled || !input) {\n return;\n }\n\n setIsActive?.(true);\n\n setTimeout(() => {\n input.selectionStart = input.value.length;\n input.focus();\n });\n };\n\n const onClick: MouseEventHandler<HTMLTableCellElement> = e => {\n if (!isActive) {\n e.currentTarget.focus();\n }\n\n props.onClick?.(e);\n };\n\n const onDoubleClick: MouseEventHandler<HTMLTableCellElement> = e => {\n onEdit();\n\n props.onDoubleClick?.(e);\n };\n\n const onKeyDown: KeyboardEventHandler<HTMLTableCellElement> = e => {\n props.onKeyDown?.(e);\n\n const isEnterCode = e.code === 'Enter' || e.code === 'NumpadEnter';\n\n if (!isActive && isEnterCode) {\n onEdit();\n }\n };\n\n const cellProps = {\n ...props,\n\n ref,\n onClick,\n onDoubleClick,\n onKeyDown,\n\n 'data-editable': !isDisabled ? true : undefined,\n };\n\n return {cellProps, ref, inputRef};\n};\n\nexport const useDataGridInputCell = (cell: ReactTableCell<unknown, unknown>) => {\n const props = useDataGridTableCell(cell);\n const context = useContext(DataGridContext);\n\n const isActive = cell.id === context.activeCell;\n const setIsActive = newIsActive => context.setActiveCell(newIsActive ? cell.id : null);\n\n return {...props, isActive, setIsActive};\n};\n"],"names":["isDisabled","isActive","setIsActive","input","focus","props","ref","onEdit","undefined","inputRef"],"mappings":";;;;;AAYO;AAIL;AAAM;AAACA;AAAYC;AAAUC;AAM3B;AACA;AAOEC;AACMC;AACP;AAsCH;AAAO;AAXW;AACbC;AAEHC;AA1BA;AAIiB;AACnB;AAGEC;AAEuB;AACzB;AAGEF;AAEA;AAEA;AACEE;AAEJ;AAUiC;AAAOC;AAGrBF;AAAKG;AAC1B;AAGE;AAMA;AAAO;AAAIJ;AAAOJ;AAFmE;AAGvF;;;;;"}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { jsx as g, jsxs as e } from "@emotion/react/jsx-runtime";
3
- import m from "@emotion/styled/base";
4
- import { useState as h, useEffect as A } from "react";
2
+ import { jsx as Z, jsxs as x } from "@emotion/react/jsx-runtime";
3
+ import W from "@emotion/styled/base";
4
+ import { useState as H, useEffect as e } from "react";
5
5
  import { forwardRef as t } from "@join-x5/react-theme";
6
- import { TableCell as a, TableCellContent as F } from "../TableCell/index.es.js";
7
- import { useTableCellTextInput as J, useDataGridInputCell as Y } from "./hook.es.js";
8
- function X() {
6
+ import { TableCell as h, TableCellContent as A } from "../TableCell/index.es.js";
7
+ import { useTableCellTextInput as a, useDataGridInputCell as F } from "./hook.es.js";
8
+ function C() {
9
9
  return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
10
10
  }
11
- const U = /* @__PURE__ */ m("div", process.env.NODE_ENV === "production" ? {
11
+ const J = /* @__PURE__ */ W("div", process.env.NODE_ENV === "production" ? {
12
12
  target: "ewl8o3j1"
13
13
  } : {
14
14
  target: "ewl8o3j1",
@@ -19,8 +19,8 @@ const U = /* @__PURE__ */ m("div", process.env.NODE_ENV === "production" ? {
19
19
  } : {
20
20
  name: "1juk05q",
21
21
  styles: "&[data-hidden]{visibility:hidden;pointer-events:none;}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3NhZHlrb3ZzZC9qb2luLXg1L3BhY2thZ2VzL2RhdGEtZ3JpZC9zcmMvVGFibGVJbnB1dENlbGwvdGV4dC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0IrQiIsImZpbGUiOiIvaG9tZS9zYWR5a292c2Qvam9pbi14NS9wYWNrYWdlcy9kYXRhLWdyaWQvc3JjL1RhYmxlSW5wdXRDZWxsL3RleHQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBjbGllbnQnO1xuXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7dXNlRWZmZWN0LCB1c2VTdGF0ZX0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHtmb3J3YXJkUmVmfSBmcm9tICdAam9pbi14NS9yZWFjdC10aGVtZSc7XG5cbmltcG9ydCB7VGFibGVDZWxsLCBUYWJsZUNlbGxDb250ZW50fSBmcm9tICcuLi9UYWJsZUNlbGwnO1xuXG5pbXBvcnQge3VzZURhdGFHcmlkSW5wdXRDZWxsLCB1c2VUYWJsZUNlbGxUZXh0SW5wdXR9IGZyb20gJy4vaG9vayc7XG5cbmltcG9ydCB0eXBlIHtcbiAgQ2hhbmdlRXZlbnRIYW5kbGVyLFxuICBGb2N1c0V2ZW50LF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iAgICBjb25zdCBjb250ZW50ID0gKGNlbGwuZ2V0VmFsdWUoKSA/PyBudWxsKSBhcyBSZWFjdE5vZGU7XG5cbiAgICByZXR1cm4gKFxuICAgICAgPERhdGFHcmlkVGV4dElucHV0Q2VsbCBrZXk9e2NlbGwuaWR9IGNlbGw9e2NlbGx9IHsuLi5hcmdzfT5cbiAgICAgICAge2NvbnRlbnR9XG4gICAgICA8L0RhdGFHcmlkVGV4dElucHV0Q2VsbD5cbiAgICApO1xuICB9O1xufTtcbiJdfQ== */",
22
- toString: X
23
- }), N = /* @__PURE__ */ m("input", process.env.NODE_ENV === "production" ? {
22
+ toString: C
23
+ }), Y = /* @__PURE__ */ W("input", process.env.NODE_ENV === "production" ? {
24
24
  target: "ewl8o3j0"
25
25
  } : {
26
26
  target: "ewl8o3j0",
@@ -31,61 +31,59 @@ const U = /* @__PURE__ */ m("div", process.env.NODE_ENV === "production" ? {
31
31
  } : {
32
32
  name: "kvz3z7",
33
33
  styles: "position:absolute;top:0;left:0;width:100%;min-width:10px;padding:0;background-color:transparent;border:none;outline:none;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;&[data-hidden]{visibility:hidden;pointer-events:none;}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3NhZHlrb3ZzZC9qb2luLXg1L3BhY2thZ2VzL2RhdGEtZ3JpZC9zcmMvVGFibGVJbnB1dENlbGwvdGV4dC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBK0IwQiIsImZpbGUiOiIvaG9tZS9zYWR5a292c2Qvam9pbi14NS9wYWNrYWdlcy9kYXRhLWdyaWQvc3JjL1RhYmxlSW5wdXRDZWxsL3RleHQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBjbGllbnQnO1xuXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7dXNl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UdyaWRUZXh0SW5wdXRDZWxsQXJnczxUID0gRGVmYXVsdEFueSwgViA9IERlZmF1bHRBbnk+ID0gT21pdDxcbiAgRGF0YUdyaWRUZXh0SW5wdXRDZWxsUHJvcHM8VCwgVj4sXG4gICdjZWxsJyB8ICdjaGlsZHJlbidcbj47XG5cbmV4cG9ydCBjb25zdCBnZXREYXRhR3JpZFRleHRJbnB1dENlbGwgPSA8VCwgVj4oYXJnczogR2V0RGF0YUdyaWRUZXh0SW5wdXRDZWxsQXJnczxULCBWPik6IENvbHVtbkRlZlRlbXBsYXRlPFQsIFY+ID0+IHtcbiAgcmV0dXJuICh7Y2VsbH0pID0+IHtcbiAgICBjb25zdCBjb250ZW50ID0gKGNlbGwuZ2V0VmFsdWUoKSA/PyBudWxsKSBhcyBSZWFjdE5vZGU7XG5cbiAgICByZXR1cm4gKFxuICAgICAgPERhdGFHcmlkVGV4dElucHV0Q2VsbCBrZXk9e2NlbGwuaWR9IGNlbGw9e2NlbGx9IHsuLi5hcmdzfT5cbiAgICAgICAge2NvbnRlbnR9XG4gICAgICA8L0RhdGFHcmlkVGV4dElucHV0Q2VsbD5cbiAgICApO1xuICB9O1xufTtcbiJdfQ== */",
34
- toString: X
34
+ toString: C
35
35
  }), o = t(({
36
36
  inputProps: c,
37
37
  ...b
38
38
  }, G) => {
39
39
  const {
40
40
  cellProps: I,
41
- ref: n,
42
- inputRef: i
43
- } = J(b, G), [u, V] = h(c.value ?? ""), d = (l) => {
44
- V(l.target.value);
45
- }, W = (l) => {
46
- var Z;
47
- const B = l.code === "Enter" || l.code === "NumpadEnter";
48
- (l.code === "Escape" || B) && ((Z = b.setIsActive) == null || Z.call(b, !1), l.currentTarget.blur());
49
- }, C = (l) => {
50
- var B, Z, R;
51
- (B = b.setIsActive) == null || B.call(b, !1), c.onChange(u, l), (Z = c.onBlur) == null || Z.call(c, l), (R = n.current) == null || R.blur();
52
- }, x = b.isActive ? !0 : void 0, s = {
41
+ ref: V,
42
+ inputRef: B
43
+ } = a(b, G), [g, u] = H(c.value ?? ""), d = (l) => {
44
+ u(l.target.value);
45
+ }, n = (l) => {
46
+ const s = l.code === "Enter" || l.code === "NumpadEnter";
47
+ (l.code === "Escape" || s) && (b.setIsActive?.(!1), l.currentTarget.blur());
48
+ }, i = (l) => {
49
+ b.setIsActive?.(!1), c.onChange(g, l), c.onBlur?.(l), V.current?.blur();
50
+ }, R = b.isActive ? !0 : void 0, m = {
53
51
  ...c,
54
- value: u,
52
+ value: g,
55
53
  onChange: d,
56
- onKeyDown: W,
57
- onBlur: C,
54
+ onKeyDown: n,
55
+ onBlur: i,
58
56
  size: 0,
59
57
  "data-hidden": b.isActive ? void 0 : !0
60
- }, H = {
58
+ }, X = {
61
59
  isMultiline: I.isMultiline,
62
60
  whiteSpace: I.whiteSpace,
63
61
  wordBreak: I.wordBreak
64
62
  };
65
- return A(() => {
66
- V(c.value);
67
- }, [c.value]), /* @__PURE__ */ g(a, { ...I, children: /* @__PURE__ */ e(F, { ...H, children: [
68
- /* @__PURE__ */ g(U, { "data-hidden": x, children: b.children }),
69
- /* @__PURE__ */ g(N, { ref: i, ...s })
63
+ return e(() => {
64
+ u(c.value);
65
+ }, [c.value]), /* @__PURE__ */ Z(h, { ...I, children: /* @__PURE__ */ x(A, { ...X, children: [
66
+ /* @__PURE__ */ Z(J, { "data-hidden": R, children: b.children }),
67
+ /* @__PURE__ */ Z(Y, { ref: B, ...m })
70
68
  ] }) });
71
- }), y = t((c, b) => {
69
+ }), U = t((c, b) => {
72
70
  const {
73
71
  cell: G,
74
72
  getValue: I,
75
- onChange: n,
76
- children: i,
77
- ...u
78
- } = c, V = Y(G), d = u;
79
- return d.value = I(G), d.onChange = (W, C) => n(G, W, C), /* @__PURE__ */ g(o, { ref: b, ...V, inputProps: d, children: i });
80
- }), D = (c) => ({
73
+ onChange: V,
74
+ children: B,
75
+ ...g
76
+ } = c, u = F(G), d = g;
77
+ return d.value = I(G), d.onChange = (n, i) => V(G, n, i), /* @__PURE__ */ Z(o, { ref: b, ...u, inputProps: d, children: B });
78
+ }), L = (c) => ({
81
79
  cell: b
82
80
  }) => {
83
81
  const G = b.getValue() ?? null;
84
- return /* @__PURE__ */ g(y, { cell: b, ...c, children: G }, b.id);
82
+ return /* @__PURE__ */ Z(U, { cell: b, ...c, children: G }, b.id);
85
83
  };
86
84
  export {
87
- y as DataGridTextInputCell,
85
+ U as DataGridTextInputCell,
88
86
  o as TextInputCell,
89
- D as getDataGridTextInputCell
87
+ L as getDataGridTextInputCell
90
88
  };
91
89
  //# sourceMappingURL=text.es.js.map