@airtable/blocks 0.0.0-experimental-4f3134f8c-20251016 → 0.0.0-experimental-28533a19d-20251016
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/dist/esm/interface/ui/use_custom_properties.js +1 -1
- package/dist/esm/shared/sdk_core.js +1 -1
- package/dist/types/src/base/ui/cell_renderer.d.ts +22 -3
- package/dist/types/src/base/ui/cell_renderer.d.ts.map +1 -1
- package/dist/types/src/interface/ui/cell_renderer.d.ts +22 -3
- package/dist/types/src/interface/ui/cell_renderer.d.ts.map +1 -1
- package/dist/types/src/interface/ui/use_custom_properties.d.ts +1 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ import { spawnUnknownSwitchCaseError } from '../../shared/error_utils';
|
|
|
26
26
|
* | {
|
|
27
27
|
* type: 'field';
|
|
28
28
|
* table: Table;
|
|
29
|
-
*
|
|
29
|
+
* shouldFieldBeAllowed?: (field: {id: FieldId; config: FieldConfig}) => boolean; // If not provided, all fields in the table will be shown in the dropdown.
|
|
30
30
|
* defaultValue?: Field;
|
|
31
31
|
* }
|
|
32
32
|
* | {
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type Record from '../models/record';
|
|
3
|
+
import type Field from '../models/field';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the {@link CellRenderer} component.
|
|
6
6
|
*
|
|
7
7
|
* @docsPath UI/components/CellRenderer
|
|
8
8
|
* @noInheritDoc
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
interface CellRendererProps {
|
|
11
|
+
/** The {@link Record} from which to render a cell. Either `record` or `cellValue` must be provided to the CellRenderer. If both are provided, `record` will be used. */
|
|
12
|
+
record?: Record | null | undefined;
|
|
13
|
+
/** The cell value to render. Either `record` or `cellValue` must be provided to the CellRenderer. If both are provided, `record` will be used. */
|
|
14
|
+
cellValue?: unknown;
|
|
15
|
+
/** The {@link Field} for a given {@link Record} being rendered as a cell. */
|
|
16
|
+
field: Field;
|
|
17
|
+
/** Whether to wrap cell contents. Defaults to true. */
|
|
18
|
+
shouldWrap?: boolean;
|
|
19
|
+
/** Additional class names to apply to the cell renderer container, separated by spaces. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Additional styles to apply to the cell renderer container. */
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
/** Additional class names to apply to the cell itself, separated by spaces. */
|
|
24
|
+
cellClassName?: string;
|
|
25
|
+
/** Additional styles to apply to the cell itself. */
|
|
26
|
+
cellStyle?: React.CSSProperties;
|
|
27
|
+
/** Render function if provided and validation fails. */
|
|
28
|
+
renderInvalidCellValue?: (cellValue: unknown, field: Field) => React.ReactElement;
|
|
29
|
+
}
|
|
11
30
|
/**
|
|
12
31
|
* Displays the contents of a cell given a field and record.
|
|
13
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_renderer.d.ts","sourceRoot":"","sources":["../../../../../src/base/ui/cell_renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"cell_renderer.d.ts","sourceRoot":"","sources":["../../../../../src/base/ui/cell_renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AAEzC;;;;;GAKG;AACH,UAAU,iBAAiB;IACvB,wKAAwK;IACxK,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,kJAAkJ;IAClJ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,KAAK,EAAE,KAAK,CAAC;IACb,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAG5B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,wDAAwD;IACxD,sBAAsB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,YAAY,CAAC;CACrF;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAE5D"}
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
2
|
+
import { type Record } from '../models/record';
|
|
3
|
+
import { type Field } from '../models/field';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the {@link CellRenderer} component.
|
|
6
6
|
*
|
|
7
7
|
* @docsPath UI/components/CellRenderer
|
|
8
8
|
* @noInheritDoc
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
interface CellRendererProps {
|
|
11
|
+
/** The {@link Record} from which to render a cell. Either `record` or `cellValue` must be provided to the CellRenderer. If both are provided, `record` will be used. */
|
|
12
|
+
record?: Record | null | undefined;
|
|
13
|
+
/** The cell value to render. Either `record` or `cellValue` must be provided to the CellRenderer. If both are provided, `record` will be used. */
|
|
14
|
+
cellValue?: unknown;
|
|
15
|
+
/** The {@link Field} for a given {@link Record} being rendered as a cell. */
|
|
16
|
+
field: Field;
|
|
17
|
+
/** Whether to wrap cell contents. Defaults to true. */
|
|
18
|
+
shouldWrap?: boolean;
|
|
19
|
+
/** Additional class names to apply to the cell renderer container, separated by spaces. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Additional styles to apply to the cell renderer container. */
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
/** Additional class names to apply to the cell itself, separated by spaces. */
|
|
24
|
+
cellClassName?: string;
|
|
25
|
+
/** Additional styles to apply to the cell itself. */
|
|
26
|
+
cellStyle?: React.CSSProperties;
|
|
27
|
+
/** Render function if provided and validation fails. */
|
|
28
|
+
renderInvalidCellValue?: (cellValue: unknown, field: Field) => React.ReactElement;
|
|
29
|
+
}
|
|
11
30
|
/**
|
|
12
31
|
* Displays the contents of a cell given a field and record.
|
|
13
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_renderer.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/cell_renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"cell_renderer.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/cell_renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAC,KAAK,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAE3C;;;;;GAKG;AACH,UAAU,iBAAiB;IACvB,wKAAwK;IACxK,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,kJAAkJ;IAClJ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,KAAK,EAAE,KAAK,CAAC;IACb,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAG5B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,wDAAwD;IACxD,sBAAsB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,YAAY,CAAC;CACrF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAEpD"}
|
|
@@ -18,7 +18,7 @@ import { type FieldId } from '../../shared/types/hyper_ids';
|
|
|
18
18
|
* | {
|
|
19
19
|
* type: 'field';
|
|
20
20
|
* table: Table;
|
|
21
|
-
*
|
|
21
|
+
* shouldFieldBeAllowed?: (field: {id: FieldId; config: FieldConfig}) => boolean; // If not provided, all fields in the table will be shown in the dropdown.
|
|
22
22
|
* defaultValue?: Field;
|
|
23
23
|
* }
|
|
24
24
|
* | {
|