@evotecit/canopyx 0.3.15 → 0.3.16
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/CanopyX.Html/Assets/canopyx-flow-checks.css +2 -0
- package/CanopyX.Html/Assets/canopyx-flow-checks.js +5 -4
- package/CanopyX.Html/Assets/canopyx-flow-dialog.css +2 -0
- package/CanopyX.Html/Assets/canopyx-flow-dialog.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-entry.js +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-facts.js +2 -0
- package/CanopyX.Html/Assets/canopyx-flow-module.mjs +4 -4
- package/CanopyX.Html/Assets/canopyx-flow.js +8 -7
- package/CanopyX.Html/Assets/canopyx-grid-module.mjs +5 -5
- package/CanopyX.Html/Assets/canopyx-grid.js +5 -5
- package/CanopyX.Html/Assets/canopyx-interactive.js +1 -1
- package/CanopyX.Html/Assets/canopyx-live.js +19 -14
- package/CanopyX.Html/Assets/canopyx-module.mjs +1 -1
- package/CanopyX.Html/Assets/canopyx-record-panel.css +8 -0
- package/CanopyX.Html/Assets/canopyx-record-panel.js +12 -7
- package/CanopyX.Html/Assets/canopyx-reporting-module.mjs +5 -5
- package/CanopyX.Html/Assets/canopyx-reporting.js +5 -5
- package/CanopyX.Html/Assets/canopyx.js +1 -1
- package/JavaScript/flow.d.ts +6 -0
- package/JavaScript/grid.d.ts +3 -1
- package/JavaScript/live.d.ts +2 -0
- package/JavaScript/records.d.ts +18 -4
- package/README.md +2 -2
- package/package.json +1 -1
package/JavaScript/records.d.ts
CHANGED
|
@@ -110,11 +110,19 @@ export interface RecordSectionContext {
|
|
|
110
110
|
/** Draws a drawer section's content (a chart, for example) into element. */
|
|
111
111
|
export type RecordSectionRenderer = (record: Readonly<{ id: string; cells?: Readonly<Record<string, Cell>>; fields?: Readonly<Record<string, Cell>>; label?: string }>,
|
|
112
112
|
element: HTMLElement, context: RecordSectionContext) => void | PromiseLike<void>;
|
|
113
|
-
/**
|
|
113
|
+
/** A detached snapshot of the selected record and its loaded details. */
|
|
114
|
+
export interface RecordActionContext {
|
|
115
|
+
readonly record: Readonly<{ id: string; cells?: Readonly<Record<string, Cell>>; fields?: Readonly<Record<string, Cell>> }>;
|
|
116
|
+
readonly view: string; readonly api: unknown; readonly payload: GridRecord | null; readonly signal: AbortSignal;
|
|
117
|
+
}
|
|
118
|
+
/** An action of the record panel's actions menu. Hosts must enforce authorization again when executing it. */
|
|
114
119
|
export interface RecordAction {
|
|
120
|
+
/** Evaluated after each record paint, including loaded details. Hidden actions cannot run through a stale control. */
|
|
121
|
+
readonly visible?: boolean | ((context: RecordActionContext) => boolean);
|
|
122
|
+
/** Also renders this action as a visible footer button. Menu access is retained. */
|
|
123
|
+
readonly prominent?: boolean | ((context: RecordActionContext) => boolean);
|
|
115
124
|
readonly label: string;
|
|
116
|
-
run(context:
|
|
117
|
-
readonly payload: GridRecord | null; readonly signal: AbortSignal }): void | PromiseLike<void>;
|
|
125
|
+
run(context: RecordActionContext): void | PromiseLike<void>;
|
|
118
126
|
}
|
|
119
127
|
/** The canopyx:openAll event's detail (and onOpenAll's argument): cancel it to filter the target grid yourself. */
|
|
120
128
|
export interface RecordOpenAll {
|
|
@@ -122,9 +130,15 @@ export interface RecordOpenAll {
|
|
|
122
130
|
readonly filters: readonly { readonly column: string; readonly operator: string; readonly values: readonly CellValue[] }[] | null;
|
|
123
131
|
}
|
|
124
132
|
/** Options that open a record (openRecord). */
|
|
125
|
-
export interface OpenRecordOptions {
|
|
133
|
+
export interface OpenRecordOptions {
|
|
134
|
+
readonly returnFocus?: Element | null; readonly path?: readonly string[]; readonly tab?: string;
|
|
135
|
+
/** Read this record's details again after a host mutation, even when the grid's row/revision has not changed. */
|
|
136
|
+
readonly reload?: boolean;
|
|
137
|
+
}
|
|
126
138
|
/** Host options of the record panel, on grids and trees. */
|
|
127
139
|
export interface RecordPanelOptions {
|
|
140
|
+
/** Plain-text heading projection. The record is a detached read-only snapshot; title and subtitle are bounded. */
|
|
141
|
+
recordHeading?: (record: Readonly<{id:string; cells?:Readonly<Record<string,Cell>>; fields?:Readonly<Record<string,Cell>>}>) => {title:string;subtitle?:string};
|
|
128
142
|
/** Loads a record's details when its drawer opens; used whatever the declared source. */
|
|
129
143
|
loadRecord?: RecordLoader;
|
|
130
144
|
/** Section renderers by name, beside the plugins' drawerSections. */
|
package/README.md
CHANGED
|
@@ -24,13 +24,13 @@ Turn application data into searchable trees, sortable tables and standalone HTML
|
|
|
24
24
|
- **Change views**: a text diff (inline or side by side, word marks, folded regions, windowed rows), a change list with kind badges, folders, hashes and risk flags, and how a change reached its replicas ([docs/changes.md](docs/changes.md)).
|
|
25
25
|
- **Guided flows** for setup and edit tasks: steps with typed fields, conditions as data, validation, a review page with change links, secrets that never echo, and one proposal to the host ([docs/flow.md](docs/flow.md)).
|
|
26
26
|
|
|
27
|
-

|
|
28
28
|
|
|
29
29
|
The same explorer in the dark theme, alongside its script-free output for email and print:
|
|
30
30
|
|
|
31
31
|
| Dark theme | Static outline |
|
|
32
32
|
| --- | --- |
|
|
33
|
-
|  |  |
|
|
34
34
|
|
|
35
35
|
## Features
|
|
36
36
|
|