@antelopejs/interface-dms-builder 0.1.3 → 0.2.0
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/catalog.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface DynamicSlots {
|
|
|
13
13
|
idKey: string;
|
|
14
14
|
labelKey?: string;
|
|
15
15
|
}
|
|
16
|
-
export type OptionWidget = "text" | "textarea" | "number" | "range" | "switch" | "select" | "segmented" | "icon" | "color" | "url" | "resource" | "field" | "dataType" | "
|
|
16
|
+
export type OptionWidget = "text" | "textarea" | "number" | "range" | "switch" | "select" | "segmented" | "icon" | "color" | "url" | "resource" | "field" | "dataType" | "dataSource" | "permission" | "json" | "block";
|
|
17
17
|
export type FieldAspect = "listable" | "searchable" | "sortable" | "filterable";
|
|
18
18
|
export interface OptionUi {
|
|
19
19
|
label?: string;
|
package/dist/structure.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { BlockPath, CategoryRef, PageRef } from "./addressing";
|
|
|
2
2
|
import type { QueryStructure } from "./queries";
|
|
3
3
|
import type { ResourceRef } from "./resources";
|
|
4
4
|
export type PagePermission = Record<string, unknown>;
|
|
5
|
+
export type PageLive = Record<string, unknown>;
|
|
5
6
|
export interface PageMeta {
|
|
6
7
|
ref: PageRef;
|
|
7
8
|
id: string;
|
|
@@ -12,6 +13,7 @@ export interface PageMeta {
|
|
|
12
13
|
description?: string;
|
|
13
14
|
hidden?: boolean;
|
|
14
15
|
permission?: PagePermission;
|
|
16
|
+
live?: PageLive;
|
|
15
17
|
filepath: string;
|
|
16
18
|
}
|
|
17
19
|
export interface EditablePageMeta {
|
|
@@ -22,6 +24,7 @@ export interface EditablePageMeta {
|
|
|
22
24
|
description?: string;
|
|
23
25
|
hidden?: boolean;
|
|
24
26
|
permission?: PagePermission;
|
|
27
|
+
live?: PageLive;
|
|
25
28
|
}
|
|
26
29
|
export interface BlockNode {
|
|
27
30
|
path: BlockPath;
|
|
@@ -56,6 +59,8 @@ export interface CategorySummary {
|
|
|
56
59
|
ref: CategoryRef;
|
|
57
60
|
displayName: string;
|
|
58
61
|
parent?: CategoryRef;
|
|
62
|
+
icon?: string;
|
|
63
|
+
order?: number;
|
|
59
64
|
}
|
|
60
65
|
export interface EditableCategoryMeta {
|
|
61
66
|
displayName: string;
|
|
@@ -80,9 +80,10 @@ const category = await CreateCategory({
|
|
|
80
80
|
| `description` | `string` | The page's description. |
|
|
81
81
|
| `hidden` | `boolean` | Whether the page is hidden from the menu. |
|
|
82
82
|
| `permission` | `PagePermission` | The permission guarding the page. |
|
|
83
|
+
| `live` | `PageLive` | The page's Direct / Pause options, when it is live. |
|
|
83
84
|
| `filepath` | `string` | The file the page is declared in, resolved by the builder's source index rather than by the runtime registry. |
|
|
84
85
|
|
|
85
|
-
`hidden` and `
|
|
86
|
+
`hidden`, `permission` and `live` read back like any other field, as long as the page declares them literally. A `permission` built from a call or a reference — an `Action`, say — reads back as `undefined`: the builder reports only what it can also rewrite.
|
|
86
87
|
|
|
87
88
|
`PagePermission` mirrors the DMS `MenuOptions.permission`: a partial permission spec, whose fields are `id`, `title`, `icon`, `description`, `dependencies` and `defaultGranted`. A bare action id is *not* accepted — the DMS types the option as `Partial<Permission> | Action`, so a string would be written and then refused by the typecheck gate.
|
|
88
89
|
|
|
@@ -97,6 +98,8 @@ const permission: PagePermission = {
|
|
|
97
98
|
|
|
98
99
|
The DMS also accepts an `Action` there. That is a live object rather than data, so it has no encoding in the builder: a page declaring one reads its permission back as `undefined`.
|
|
99
100
|
|
|
101
|
+
`PageLive` mirrors the DMS `MenuOptions.live`: `maxRate`, `slowRateAfter`, `rememberKey`. Present, even empty (`{}`), the page is live — its blocks refetch through a Direct / Pause valve its `LiveToggle` switches; absent, they refetch on every event. Sent as `null` in a patch, it is taken off.
|
|
102
|
+
|
|
100
103
|
## Patch a Page's Metadata
|
|
101
104
|
|
|
102
105
|
`EditablePageMeta` is the subset of `PageMeta` that `ConfigurePage` accepts as a patch: `displayName`, `icon`, `category`, `order`, `description`, `hidden` and `permission`. `ref`, `id` and `filepath` are not patchable — they follow from where the page lives.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/interface-dms-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prepack": "pnpm run build"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@antelopejs/interface-core": ">=0.
|
|
40
|
+
"@antelopejs/interface-core": ">=0.2.0 <1.0.0",
|
|
41
41
|
"release-it": "^19.2.4",
|
|
42
42
|
"release-it-changelogen": "^0.1.0",
|
|
43
43
|
"rimraf": "^6.1.3",
|