@protobase/layout 0.21.12 → 0.22.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.
- package/dist/block-specs.js +4 -0
- package/dist/blocks.d.ts +3 -0
- package/dist/blocks.js +2 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/presets/users-page.d.ts +10 -0
- package/dist/presets/users-page.js +18 -0
- package/package.json +2 -2
package/dist/block-specs.js
CHANGED
package/dist/blocks.d.ts
CHANGED
|
@@ -156,6 +156,8 @@ export type LinkProps = ({
|
|
|
156
156
|
}) & {
|
|
157
157
|
children?: LayoutChildren;
|
|
158
158
|
};
|
|
159
|
+
/** Everyone who can sign in, for admins: inviting by email, adding accounts, changing roles and blocking. Takes no props. */
|
|
160
|
+
export type UsersProps = Record<string, never>;
|
|
159
161
|
export declare const Page: Block<PageProps>;
|
|
160
162
|
export declare const Grid: Block<GridProps>;
|
|
161
163
|
export declare const Card: Block<CardProps>;
|
|
@@ -171,4 +173,5 @@ export declare const ModalForm: Block<ModalFormProps>;
|
|
|
171
173
|
export declare const Action: Block<ActionProps>;
|
|
172
174
|
export declare const Show: Block<ShowProps>;
|
|
173
175
|
export declare const Link: Block<LinkProps>;
|
|
176
|
+
export declare const Users: Block<UsersProps>;
|
|
174
177
|
//#endregion
|
package/dist/blocks.js
CHANGED
|
@@ -15,5 +15,6 @@ const ModalForm = defineBlock("ModalForm", false);
|
|
|
15
15
|
const Action = defineBlock("Action", false);
|
|
16
16
|
const Show = defineBlock("Show", false);
|
|
17
17
|
const Link = defineBlock("Link", false);
|
|
18
|
+
const Users = defineBlock("Users", false);
|
|
18
19
|
//#endregion
|
|
19
|
-
export { Action, Card, CardRow, Chart, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table };
|
|
20
|
+
export { Action, Card, CardRow, Chart, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table, Users };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Block, LayoutChild, LayoutChildren, LayoutNode, LayoutValue, isLayoutNode } from "./node.js";
|
|
2
|
-
import { Action, ActionProps, ButtonVariant, Card, CardProps, CardRow, CardRowProps, Chart, ChartBucket, ChartProps, ChartType, 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";
|
|
2
|
+
import { Action, ActionProps, ButtonVariant, Card, CardProps, CardRow, CardRowProps, Chart, ChartBucket, ChartProps, ChartType, 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, Users, UsersProps } from "./blocks.js";
|
|
3
3
|
import { ComponentOptions, component } from "./component.js";
|
|
4
|
+
import { usersPage } from "./presets/users-page.js";
|
|
4
5
|
import { PageDefinition, PageModel, PageOptions, isPageDefinition, page } from "./page.js";
|
|
5
6
|
import { Location, walkTree } from "./walk.js";
|
|
6
7
|
import { checkPages } from "./check-page.js";
|
|
@@ -10,4 +11,4 @@ import { countedResource, evaluateCondition, parseCondition } from "./condition.
|
|
|
10
11
|
import { PathStep, resolveFieldPath } from "./field-path.js";
|
|
11
12
|
import { jsx_runtime_d_exports } from "./jsx-runtime.js";
|
|
12
13
|
import { FieldRefValue, fieldRef } from "@protobase/schema";
|
|
13
|
-
export { Action, type ActionProps, type Block, type ButtonVariant, Card, type CardProps, CardRow, type CardRowProps, Chart, type ChartBucket, type ChartProps, type ChartType, 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, type Location, 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, conditionProblems, conditionReadable, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_d_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath, walkTree };
|
|
14
|
+
export { Action, type ActionProps, type Block, type ButtonVariant, Card, type CardProps, CardRow, type CardRowProps, Chart, type ChartBucket, type ChartProps, type ChartType, 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, type Location, 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, Users, type UsersProps, checkPages, component, conditionProblems, conditionReadable, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_d_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath, usersPage, walkTree };
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { isLayoutNode } from "./node.js";
|
|
2
|
-
import { Action, Card, CardRow, Chart, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table } from "./blocks.js";
|
|
2
|
+
import { Action, Card, CardRow, Chart, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table, Users } from "./blocks.js";
|
|
3
3
|
import { component } from "./component.js";
|
|
4
4
|
import { countedResource, evaluateCondition, parseCondition } from "./condition.js";
|
|
5
5
|
import { walkTree } from "./walk.js";
|
|
6
6
|
import { isPageDefinition, page } from "./page.js";
|
|
7
|
+
import { usersPage } from "./presets/users-page.js";
|
|
7
8
|
import { resolveFieldPath } from "./field-path.js";
|
|
8
9
|
import { conditionProblems, conditionReadable } from "./check-condition.js";
|
|
9
10
|
import { checkPages } from "./check-page.js";
|
|
10
11
|
import { prunePage } from "./prune-page.js";
|
|
11
12
|
import { jsx_runtime_exports } from "./jsx-runtime.js";
|
|
12
13
|
import { fieldRef } from "@protobase/schema";
|
|
13
|
-
export { Action, Card, CardRow, Chart, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table, checkPages, component, conditionProblems, conditionReadable, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath, walkTree };
|
|
14
|
+
export { Action, Card, CardRow, Chart, Field, Grid, Link, ModalForm, Page, Progress, RecordCard, RecordRow, Show, Stat, Table, Users, checkPages, component, conditionProblems, conditionReadable, countedResource, evaluateCondition, fieldRef, isLayoutNode, isPageDefinition, jsx_runtime_exports as jsxRuntime, page, parseCondition, prunePage, resolveFieldPath, usersPage, walkTree };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PageDefinition } from "../page.js";
|
|
2
|
+
import "../index.js";
|
|
3
|
+
//#region src/presets/users-page.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The Users page, for admins at `/accounts`: everyone who can sign in. Export it from the config, and put it in the
|
|
6
|
+
* profile menu with `m.page('accounts', { label: 'Users', icon: 'users' })`; or make a page of your own around `<Users />`.
|
|
7
|
+
* Written as calls rather than JSX, which the CLI's Node loader would compile for React inside this package.
|
|
8
|
+
*/
|
|
9
|
+
export declare const usersPage: PageDefinition;
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Page, Users } from "../blocks.js";
|
|
2
|
+
import { page } from "../page.js";
|
|
3
|
+
//#region src/presets/users-page.ts
|
|
4
|
+
/**
|
|
5
|
+
* The Users page, for admins at `/accounts`: everyone who can sign in. Export it from the config, and put it in the
|
|
6
|
+
* profile menu with `m.page('accounts', { label: 'Users', icon: 'users' })`; or make a page of your own around `<Users />`.
|
|
7
|
+
* Written as calls rather than JSX, which the CLI's Node loader would compile for React inside this package.
|
|
8
|
+
*/
|
|
9
|
+
const usersPage = page("accounts", Page({
|
|
10
|
+
title: "Users",
|
|
11
|
+
description: "Everyone who can sign in: invite, add, change roles and block.",
|
|
12
|
+
children: Users({})
|
|
13
|
+
}), {
|
|
14
|
+
roles: ["admin"],
|
|
15
|
+
icon: "users"
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { usersPage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/layout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.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.
|
|
34
|
+
"@protobase/schema": "0.22.1",
|
|
35
35
|
"aip-parsers": "^1.0.0"
|
|
36
36
|
}
|
|
37
37
|
}
|