@protobase/layout 0.16.0 → 0.16.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.
@@ -91,6 +91,17 @@ const blockSpecs = {
91
91
  span: optional("span")
92
92
  }
93
93
  },
94
+ RecordRow: {
95
+ children: false,
96
+ props: {
97
+ ...data,
98
+ ...heading,
99
+ limit: optional("integer"),
100
+ display: optional("text"),
101
+ empty: optional("text"),
102
+ span: optional("span")
103
+ }
104
+ },
94
105
  Progress: {
95
106
  children: false,
96
107
  props: {
package/dist/blocks.d.ts CHANGED
@@ -71,6 +71,18 @@ export type CardRowProps = DataProps & Heading & {
71
71
  span?: GridSpan;
72
72
  children?: LayoutChildren;
73
73
  };
74
+ /**
75
+ * What a filter finds, as the resource's list draws it: the filter's chips, how many records match, and the records as
76
+ * the cards of `display` in one row that scrolls sideways, loading more as it scrolls, with "View all".
77
+ */
78
+ export type RecordRowProps = DataProps & Heading & {
79
+ /** How many records it shows at most; every one that matches when omitted. */
80
+ limit?: number;
81
+ /** The cards display of the resource's view whose cards it draws; its first when omitted. */
82
+ display?: string;
83
+ empty?: string;
84
+ span?: GridSpan;
85
+ };
74
86
  export type ProgressProps = {
75
87
  /** A number, or a field of the record around it. */
76
88
  value: number | string;
@@ -124,6 +136,7 @@ export declare const RecordCard: Block<RecordCardProps>;
124
136
  export declare const Field: Block<FieldProps>;
125
137
  export declare const Table: Block<TableProps>;
126
138
  export declare const CardRow: Block<CardRowProps>;
139
+ export declare const RecordRow: Block<RecordRowProps>;
127
140
  export declare const Progress: Block<ProgressProps>;
128
141
  export declare const ModalForm: Block<ModalFormProps>;
129
142
  export declare const Action: Block<ActionProps>;
package/dist/blocks.js CHANGED
@@ -8,10 +8,11 @@ const RecordCard = defineBlock("RecordCard", false);
8
8
  const Field = defineBlock("Field", false);
9
9
  const Table = defineBlock("Table", false);
10
10
  const CardRow = defineBlock("CardRow", false);
11
+ const RecordRow = defineBlock("RecordRow", false);
11
12
  const Progress = defineBlock("Progress", false);
12
13
  const ModalForm = defineBlock("ModalForm", false);
13
14
  const Action = defineBlock("Action", false);
14
15
  const Show = defineBlock("Show", false);
15
16
  const Link = defineBlock("Link", false);
16
17
  //#endregion
17
- export { Action, Card, CardRow, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, Show, Stat, Table };
18
+ export { Action, Card, CardRow, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Block, LayoutChild, LayoutChildren, LayoutNode, LayoutValue, isLayoutNode } from "./node.js";
2
- import { Action, ActionProps, ButtonVariant, Card, CardProps, CardRow, CardRowProps, DataProps, Elements, Field, FieldProps, Grid, GridProps, GridSpan, Link, LinkProps, ModalForm, ModalFormProps, Page, PageProps, Progress, ProgressProps, RecordCard, RecordCardProps, Show, ShowProps, Stat, StatProps, Table, TableProps } from "./blocks.js";
2
+ import { Action, ActionProps, ButtonVariant, Card, CardProps, CardRow, CardRowProps, DataProps, Elements, Field, FieldProps, Grid, GridProps, GridSpan, Link, LinkProps, ModalForm, ModalFormProps, Page, PageProps, Progress, ProgressProps, RecordCard, RecordCardProps, RecordRow, RecordRowProps, Show, ShowProps, Stat, StatProps, Table, TableProps } from "./blocks.js";
3
3
  import { ComponentOptions, component } from "./component.js";
4
4
  import { PageDefinition, PageModel, PageOptions, isPageDefinition, page } from "./page.js";
5
5
  import { checkPages } from "./check-page.js";
@@ -8,4 +8,4 @@ import { countedResource, evaluateCondition, parseCondition } from "./condition.
8
8
  import { PathStep, resolveFieldPath } from "./field-path.js";
9
9
  import { jsx_runtime_d_exports } from "./jsx-runtime.js";
10
10
  import { FieldRefValue, fieldRef } from "@protobase/schema";
11
- export { Action, type ActionProps, type Block, type ButtonVariant, Card, type CardProps, CardRow, type CardRowProps, type ComponentOptions, type DataProps, type Elements, Field, type FieldProps, type FieldRefValue, Grid, type GridProps, type GridSpan, type LayoutChild, type LayoutChildren, type LayoutNode, type LayoutValue, Link, type LinkProps, ModalForm, type ModalFormProps, Page, type PageDefinition, type PageModel, type PageOptions, type PageProps, type PathStep, Progress, type ProgressProps, RecordCard, type RecordCardProps, Show, type ShowProps, Stat, type StatProps, Table, type TableProps, checkPages, component, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_d_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath };
11
+ export { Action, type ActionProps, type Block, type ButtonVariant, Card, type CardProps, CardRow, type CardRowProps, type ComponentOptions, type DataProps, type Elements, Field, type FieldProps, type FieldRefValue, Grid, type GridProps, type GridSpan, type LayoutChild, type LayoutChildren, type LayoutNode, type LayoutValue, Link, type LinkProps, ModalForm, type ModalFormProps, Page, type PageDefinition, type PageModel, type PageOptions, type PageProps, type PathStep, Progress, type ProgressProps, RecordCard, type RecordCardProps, RecordRow, type RecordRowProps, Show, type ShowProps, Stat, type StatProps, Table, type TableProps, checkPages, component, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_d_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isLayoutNode } from "./node.js";
2
- import { Action, Card, CardRow, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, Show, Stat, Table } from "./blocks.js";
2
+ import { Action, Card, CardRow, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table } from "./blocks.js";
3
3
  import { component } from "./component.js";
4
4
  import { countedResource, evaluateCondition, parseCondition } from "./condition.js";
5
5
  import { isPageDefinition, page } from "./page.js";
@@ -8,4 +8,4 @@ import { checkPages } from "./check-page.js";
8
8
  import { prunePage } from "./prune-page.js";
9
9
  import { jsx_runtime_exports } from "./jsx-runtime.js";
10
10
  import { fieldRef } from "@protobase/schema";
11
- export { Action, Card, CardRow, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, Show, Stat, Table, checkPages, component, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath };
11
+ export { Action, Card, CardRow, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table, checkPages, component, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/layout",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Composed pages for Protobase, written as JSX that compiles to plain data, with its JSX runtime.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@protobase/schema": "0.16.0",
34
+ "@protobase/schema": "0.16.1",
35
35
  "aip-parsers": "^1.0.0"
36
36
  }
37
37
  }