@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.
@@ -26,7 +26,7 @@ import { spawnUnknownSwitchCaseError } from '../../shared/error_utils';
26
26
  * | {
27
27
  * type: 'field';
28
28
  * table: Table;
29
- * possibleValues?: Array<Field>; // If not provided, all visible fields in the table will be shown in the dropdown.
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
  * | {
@@ -24,7 +24,7 @@ export class BlockSdkCore {
24
24
  * @hidden
25
25
  */
26
26
  // @ts-ignore
27
- static VERSION = "0.0.0-experimental-4f3134f8c-20251016";
27
+ static VERSION = "0.0.0-experimental-28533a19d-20251016";
28
28
 
29
29
  /** Storage for this block installation's configuration. */
30
30
 
@@ -1,13 +1,32 @@
1
1
  import * as React from 'react';
2
- import { CellRenderer as CellRendererSharedImpl } from '../../shared/ui/cell_renderer';
3
- import { type BaseSdkMode } from '../../sdk_mode';
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
- type CellRendererProps = React.ComponentProps<typeof CellRendererSharedImpl<BaseSdkMode>>;
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;AAC/B,OAAO,EAAC,YAAY,IAAI,sBAAsB,EAAC,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD;;;;;GAKG;AACH,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAE5D"}
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 { CellRenderer as CellRendererSharedImpl } from '../../shared/ui/cell_renderer';
3
- import { type InterfaceSdkMode } from '../../sdk_mode';
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
- type CellRendererProps = React.ComponentProps<typeof CellRendererSharedImpl<InterfaceSdkMode>>;
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;AAC/B,OAAO,EAAC,YAAY,IAAI,sBAAsB,EAAC,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAErD;;;;;GAKG;AACH,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAE/F;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAEpD"}
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
- * possibleValues?: Array<Field>; // If not provided, all visible fields in the table will be shown in the dropdown.
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
  * | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airtable/blocks",
3
- "version": "0.0.0-experimental-4f3134f8c-20251016",
3
+ "version": "0.0.0-experimental-28533a19d-20251016",
4
4
  "description": "Airtable Blocks SDK",
5
5
  "type": "module",
6
6
  "repository": {