@evotecit/canopyx 0.3.18 → 0.3.21
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-board.css +12 -12
- package/CanopyX.Html/Assets/canopyx-board.js +1 -1
- package/CanopyX.Html/Assets/canopyx-calendar.css +70 -57
- package/CanopyX.Html/Assets/canopyx-calendar.js +14 -14
- package/CanopyX.Html/Assets/canopyx-cell-range.css +4 -4
- package/CanopyX.Html/Assets/canopyx-cell-range.js +1 -1
- package/CanopyX.Html/Assets/canopyx-changes.css +55 -55
- package/CanopyX.Html/Assets/canopyx-changes.js +1 -1
- package/CanopyX.Html/Assets/canopyx-column-groups.css +5 -1
- package/CanopyX.Html/Assets/canopyx-column-groups.js +15 -9
- package/CanopyX.Html/Assets/canopyx-compare.css +4 -4
- package/CanopyX.Html/Assets/canopyx-compare.js +1 -1
- package/CanopyX.Html/Assets/canopyx-detail-rows.css +4 -4
- package/CanopyX.Html/Assets/canopyx-detail-rows.js +1 -1
- package/CanopyX.Html/Assets/canopyx-editing.css +3 -3
- package/CanopyX.Html/Assets/canopyx-editing.js +1 -1
- package/CanopyX.Html/Assets/canopyx-enhance.js +2 -2
- package/CanopyX.Html/Assets/canopyx-export.js +8 -8
- package/CanopyX.Html/Assets/canopyx-facets.css +19 -18
- package/CanopyX.Html/Assets/canopyx-facets.js +1 -1
- package/CanopyX.Html/Assets/canopyx-filter-editor.css +24 -24
- package/CanopyX.Html/Assets/canopyx-filter-editor.js +3 -3
- package/CanopyX.Html/Assets/canopyx-flow-checks.css +2 -2
- package/CanopyX.Html/Assets/canopyx-flow-checks.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-command.css +3 -3
- package/CanopyX.Html/Assets/canopyx-flow-command.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-dialog.css +2 -2
- package/CanopyX.Html/Assets/canopyx-flow-dialog.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-drafts.css +2 -2
- package/CanopyX.Html/Assets/canopyx-flow-drafts.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-entry.css +24 -23
- package/CanopyX.Html/Assets/canopyx-flow-entry.js +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-host.css +2 -2
- package/CanopyX.Html/Assets/canopyx-flow-host.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-module.mjs +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-pick.css +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-pick.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-preview.css +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-preview.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-records.css +2 -2
- package/CanopyX.Html/Assets/canopyx-flow-records.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-tasks.css +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-tasks.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow.css +41 -41
- package/CanopyX.Html/Assets/canopyx-flow.js +1 -1
- package/CanopyX.Html/Assets/canopyx-format-editor.css +9 -9
- package/CanopyX.Html/Assets/canopyx-format-editor.js +1 -1
- package/CanopyX.Html/Assets/canopyx-formatting.css +13 -13
- package/CanopyX.Html/Assets/canopyx-formatting.js +3 -3
- package/CanopyX.Html/Assets/canopyx-forms.css +3 -3
- package/CanopyX.Html/Assets/canopyx-forms.js +1 -1
- package/CanopyX.Html/Assets/canopyx-grid-module.mjs +56 -46
- package/CanopyX.Html/Assets/canopyx-grid-options.css +8 -8
- package/CanopyX.Html/Assets/canopyx-grid-options.js +9 -2
- package/CanopyX.Html/Assets/canopyx-grid.css +99 -96
- package/CanopyX.Html/Assets/canopyx-grid.js +55 -45
- package/CanopyX.Html/Assets/canopyx-grouping.css +7 -7
- package/CanopyX.Html/Assets/canopyx-grouping.js +1 -1
- package/CanopyX.Html/Assets/canopyx-highlight.css +10 -10
- package/CanopyX.Html/Assets/canopyx-highlight.js +1 -1
- package/CanopyX.Html/Assets/canopyx-interactive.css +50 -49
- package/CanopyX.Html/Assets/canopyx-interactive.js +12 -11
- package/CanopyX.Html/Assets/canopyx-labels-de.js +4 -0
- package/CanopyX.Html/Assets/canopyx-labels-es.js +4 -0
- package/CanopyX.Html/Assets/canopyx-labels-fr.js +4 -0
- package/CanopyX.Html/Assets/canopyx-labels-it.js +4 -0
- package/CanopyX.Html/Assets/canopyx-labels-pl.js +4 -0
- package/CanopyX.Html/Assets/canopyx-layouts.css +9 -9
- package/CanopyX.Html/Assets/canopyx-layouts.js +2 -2
- package/CanopyX.Html/Assets/canopyx-link.css +3 -3
- package/CanopyX.Html/Assets/canopyx-link.js +3 -3
- package/CanopyX.Html/Assets/canopyx-links.js +2 -2
- package/CanopyX.Html/Assets/canopyx-live.css +2 -2
- package/CanopyX.Html/Assets/canopyx-live.js +1 -1
- package/CanopyX.Html/Assets/canopyx-matrix.css +31 -31
- package/CanopyX.Html/Assets/canopyx-matrix.js +1 -1
- package/CanopyX.Html/Assets/canopyx-module.mjs +13 -12
- package/CanopyX.Html/Assets/canopyx-pager.css +1 -1
- package/CanopyX.Html/Assets/canopyx-pager.js +1 -1
- package/CanopyX.Html/Assets/canopyx-path.css +8 -8
- package/CanopyX.Html/Assets/canopyx-path.js +1 -1
- package/CanopyX.Html/Assets/canopyx-pivot.css +10 -10
- package/CanopyX.Html/Assets/canopyx-pivot.js +3 -3
- package/CanopyX.Html/Assets/canopyx-plan.css +24 -17
- package/CanopyX.Html/Assets/canopyx-plan.js +13 -9
- package/CanopyX.Html/Assets/canopyx-record-panel.css +47 -42
- package/CanopyX.Html/Assets/canopyx-record-panel.js +16 -9
- package/CanopyX.Html/Assets/canopyx-reporting-module.mjs +59 -56
- package/CanopyX.Html/Assets/canopyx-reporting.css +104 -101
- package/CanopyX.Html/Assets/canopyx-reporting.js +58 -55
- package/CanopyX.Html/Assets/canopyx-stack.css +6 -6
- package/CanopyX.Html/Assets/canopyx-stack.js +1 -1
- package/CanopyX.Html/Assets/canopyx-time-slider.css +5 -5
- package/CanopyX.Html/Assets/canopyx-time-slider.js +1 -1
- package/CanopyX.Html/Assets/canopyx-timeline.css +19 -19
- package/CanopyX.Html/Assets/canopyx-timeline.js +2 -2
- package/CanopyX.Html/Assets/canopyx-tree-tools.css +21 -21
- package/CanopyX.Html/Assets/canopyx-tree-tools.js +3 -3
- package/CanopyX.Html/Assets/canopyx-ui-accordion.css +119 -0
- package/CanopyX.Html/Assets/canopyx-ui-accordion.js +33 -0
- package/CanopyX.Html/Assets/canopyx-ui-menu.css +7 -7
- package/CanopyX.Html/Assets/canopyx-ui-menu.js +1 -1
- package/CanopyX.Html/Assets/canopyx-ui-module.mjs +39 -0
- package/CanopyX.Html/Assets/canopyx-ui-navigation.css +9 -9
- package/CanopyX.Html/Assets/canopyx-ui-navigation.js +5 -5
- package/CanopyX.Html/Assets/canopyx-ui-overlays.css +5 -5
- package/CanopyX.Html/Assets/canopyx-ui-overlays.js +5 -2
- package/CanopyX.Html/Assets/canopyx-ui-picker.css +2 -2
- package/CanopyX.Html/Assets/canopyx-ui-picker.js +1 -1
- package/CanopyX.Html/Assets/canopyx-ui-stepper.css +12 -12
- package/CanopyX.Html/Assets/canopyx-ui-stepper.js +1 -1
- package/CanopyX.Html/Assets/canopyx-ui-tabs.css +9 -8
- package/CanopyX.Html/Assets/canopyx-ui-tabs.js +7 -4
- package/CanopyX.Html/Assets/canopyx-ui.css +119 -0
- package/CanopyX.Html/Assets/canopyx-ui.js +37 -0
- package/CanopyX.Html/Assets/canopyx-view-intents.css +1 -1
- package/CanopyX.Html/Assets/canopyx-view-intents.js +1 -1
- package/CanopyX.Html/Assets/canopyx.css +47 -46
- package/CanopyX.Html/Assets/canopyx.js +12 -11
- package/JavaScript/column-groups.d.ts +24 -4
- package/JavaScript/grid.d.ts +11 -1
- package/JavaScript/hosts.d.ts +2 -0
- package/JavaScript/locales/de.mjs +4 -0
- package/JavaScript/locales/es.mjs +4 -0
- package/JavaScript/locales/fr.mjs +4 -0
- package/JavaScript/locales/it.mjs +4 -0
- package/JavaScript/locales/pl.mjs +4 -0
- package/JavaScript/protocol.d.ts +3 -0
- package/JavaScript/records.d.ts +2 -0
- package/JavaScript/ui.d.ts +70 -2
- package/README.md +76 -206
- package/README.nuget.md +63 -87
- package/package.json +14 -1
package/README.md
CHANGED
|
@@ -1,135 +1,46 @@
|
|
|
1
|
-
# CanopyX
|
|
1
|
+
# CanopyX
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive views of your own records for .NET and the browser: tree grids, data grids, pivots, boards, calendars, plans, status matrices, change reviews and guided flows. Write the view in C# and save a report that opens from disk, or mount the same runtime in your web app from npm.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[](https://www.nuget.org/packages/CanopyX.Html)
|
|
9
|
-
|
|
10
|
-
🌐 **JavaScript package**
|
|
11
|
-
|
|
12
|
-
[](https://www.npmjs.com/package/@evotecit/canopyx)
|
|
5
|
+
[](https://www.nuget.org/packages/CanopyX.Html)
|
|
6
|
+
[](https://www.nuget.org/packages/CanopyX)
|
|
7
|
+
[](https://www.npmjs.com/package/@evotecit/canopyx)
|
|
13
8
|
[](https://opensource.org/license/mit)
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **File and folder explorers** with expandable branches, lazy loading, search and multi-selection.
|
|
18
|
-
- **Inventory and results tables** with typed sorting, filters, column resizing and saved views.
|
|
19
|
-
- **Analytical reports** with calendar and numeric buckets, aggregate display modes and optional [pivot tables](docs/pivot.md), backed by inline records or one grouped hosted query. [Calculated columns](docs/calculated-columns.md) use the same bounded expression grammar in C# and the browser.
|
|
20
|
-
- **HTML reports** that include their own runtime and data and can be opened from disk or a file share.
|
|
21
|
-
- **Application views** backed by paged or cursor-based data sources, with selection and detail callbacks.
|
|
22
|
-
- **Email and print tables** rendered from the same .NET view without JavaScript.
|
|
23
|
-
- **Calendars and resource timelines** of the same records: month, week, day, agenda and year views, resources grouped as a tree with capacity per group, recurring events, drag to reschedule through the grid's editing, and iCalendar export.
|
|
24
|
-
- **Boards** with lanes from a column, swimlanes, WIP limits, virtual cards and host-governed moves, sharing the grid's search, facets, views and record panel ([docs/board.md](docs/board.md)).
|
|
25
|
-
- **Task plans** on the resource timeline, with dependencies, milestones, critical paths, baseline comparisons and conflict-marked proposals ([docs/plan.md](docs/plan.md)).
|
|
26
|
-
- **Status matrices**: a state for each pair of two sets of entities, with totals, sorting, filtering and grouping on both axes, sticky headers and both axes windowed ([docs/matrix.md](docs/matrix.md)).
|
|
27
|
-
- **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)).
|
|
28
|
-
- **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)).
|
|
29
|
-
|
|
30
|
-

|
|
10
|
+
**[Live demos](https://canopyx.dev/views/)** · **[Documentation](https://canopyx.dev/docs/)** · **[Getting started](https://canopyx.dev/docs/getting-started/)** · **[Discord](https://evo.yt/discord)**
|
|
31
11
|
|
|
32
|
-
|
|
12
|
+
<picture>
|
|
13
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/EvotecIT/CanopyX/main/docs/images/views/inventory-dark.png">
|
|
14
|
+
<img alt="A CanopyX data grid of 1,200 devices grouped by site, with health strips, patch-level bars, sign-in sparklines and a grand total" src="https://raw.githubusercontent.com/EvotecIT/CanopyX/main/docs/images/views/inventory-light.png">
|
|
15
|
+
</picture>
|
|
33
16
|
|
|
34
|
-
|
|
35
|
-
| --- | --- |
|
|
36
|
-
|  |  |
|
|
37
|
-
|
|
38
|
-
Path and stack views explain explicit host-supplied chains and ordered layers over existing records. Matrix and propagation views replay supplied snapshots with manual stepping, play/pause, and reduced-motion support. Each ships as an optional part with typed C# authoring and script-free static output. See [paths](docs/path.md), [stacks](docs/stack.md), and [snapshot playback](docs/time-slider.md).
|
|
39
|
-
|
|
40
|
-
## Features
|
|
41
|
-
|
|
42
|
-
| | Tree grid | Data grid |
|
|
43
|
-
| --- | --- | --- |
|
|
44
|
-
| Navigation | Expandable branches, path search and lazy children | Continuous or paged records, offset or cursor navigation |
|
|
45
|
-
| Querying | Search, sibling sorting and named filters | Search, multi-column sorting, typed filters and condition groups |
|
|
46
|
-
| Columns | Resize and hide | Resize, hide, reorder, pin, fit to content and group under multi-level headers |
|
|
47
|
-
| Selection | Single/multiple selection and hierarchical checkboxes | Single/multiple selection with stable record IDs, and cell ranges with copy, paste and a fill handle |
|
|
48
|
-
| Presentation | Badges, details, custom cells and light/dark themes | Links, progress, wrapped text, row highlighting, conditional formatting and light/dark themes |
|
|
49
|
-
| Grouping and details | Nested branches and detail rows | Multi-level row groups with labelled aggregates, and expandable detail rows holding a template, HTML or a nested grid or tree |
|
|
50
|
-
| Delivery | Single HTML file, sidecar bundle or hosted data | Single HTML file, row-chunk sidecar bundle or hosted data |
|
|
17
|
+
## Pick a view
|
|
51
18
|
|
|
52
|
-
|
|
19
|
+
Every view runs on the same records, search, filters, saved views and themes. Click a picture to try it live.
|
|
53
20
|
|
|
54
|
-
|
|
21
|
+
| | | |
|
|
22
|
+
| :-- | :-- | :-- |
|
|
23
|
+
| [](https://canopyx.dev/views/files/)<br>**[Tree grid](https://canopyx.dev/views/files/)**<br>Lazy branches, path search and checkboxes over 100,000 nodes. | [](https://canopyx.dev/views/inventory/)<br>**[Data grid](https://canopyx.dev/views/inventory/)**<br>Typed filters, facets, grouping with totals, editing and export. | [](https://canopyx.dev/views/pivot/)<br>**[Pivot](https://canopyx.dev/views/pivot/)**<br>Totals by row and column, with drill-through to the records. |
|
|
24
|
+
| [](https://canopyx.dev/views/board/)<br>**[Board](https://canopyx.dev/views/board/)**<br>Cards in status lanes, swimlanes and WIP limits. | [](https://canopyx.dev/views/calendar/)<br>**[Calendar](https://canopyx.dev/views/calendar/)**<br>Month to year, recurrence, time zones and iCalendar export. | [](https://canopyx.dev/views/plan/)<br>**[Plan](https://canopyx.dev/views/plan/)**<br>Tasks per team with a baseline, dependencies and conflicts. |
|
|
25
|
+
| [](https://canopyx.dev/views/timeline/)<br>**[Resource timeline](https://canopyx.dev/views/timeline/)**<br>Events on a resource tree with capacity per group. | [](https://canopyx.dev/views/matrix/)<br>**[Status matrix](https://canopyx.dev/views/matrix/)**<br>A state for every pair, with totals on both axes. | [](https://canopyx.dev/views/changes/)<br>**[Change review](https://canopyx.dev/views/changes/)**<br>Change lists, text diffs and how a change reached its replicas. |
|
|
26
|
+
| [](https://canopyx.dev/views/compare/)<br>**[Dataset compare](https://canopyx.dev/views/compare/)**<br>Added, removed and changed rows between two snapshots. | [](https://canopyx.dev/views/time/)<br>**[Time slider](https://canopyx.dev/views/time/)**<br>Replay snapshots of a view step by step. | [](https://canopyx.dev/views/flow/)<br>**[Guided flow](https://canopyx.dev/views/flow/)**<br>Setup and edit tasks with checks, review and one proposal. |
|
|
27
|
+
| [](https://canopyx.dev/views/path/)<br>**[Approval path](https://canopyx.dev/views/path/)**<br>The route a request takes over your records. | [](https://canopyx.dev/views/stack/)<br>**[Layer stack](https://canopyx.dev/views/stack/)**<br>Which configuration layer sets each value. | [](https://canopyx.dev/views/email/)<br>**[Script-free table](https://canopyx.dev/views/email/)**<br>The same view as an email, print or Word table. |
|
|
55
28
|
|
|
56
|
-
##
|
|
29
|
+
## Get started
|
|
57
30
|
|
|
58
|
-
### .NET
|
|
31
|
+
### From .NET: a report that opens from disk
|
|
59
32
|
|
|
60
33
|
```shell
|
|
61
34
|
dotnet add package CanopyX.Html
|
|
62
35
|
```
|
|
63
36
|
|
|
64
|
-
`CanopyX.Html` includes the browser assets and brings in `CanopyX` for the view definitions. Install `CanopyX` alone when you only need the model, tree bundle writer or script-free table renderer.
|
|
65
|
-
|
|
66
|
-
| Target | Support |
|
|
67
|
-
| --- | --- |
|
|
68
|
-
| .NET 8 and .NET 10 | Windows, Linux and macOS |
|
|
69
|
-
| .NET Standard 2.0 | Compatible .NET applications |
|
|
70
|
-
| .NET Framework 4.7.2 | Windows |
|
|
71
|
-
|
|
72
|
-
Neither .NET package adds third-party runtime dependencies. Generating a report from C# needs no Node.js, npm or JavaScript build step.
|
|
73
|
-
|
|
74
|
-
To serve a hosted grid from your own data, add `CanopyX.Data` (server-side paging, sorting, filtering, value lists, multi-level summaries, streamed export and commits of edited rows over `IQueryable<T>` or your own provider) and, in ASP.NET Core, `CanopyX.AspNetCore` for the endpoints. See [Server-side data for .NET](docs/remote-dotnet.md).
|
|
75
|
-
|
|
76
|
-
### JavaScript
|
|
77
|
-
|
|
78
|
-
```shell
|
|
79
|
-
npm install @evotecit/canopyx
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The package includes ES modules, classic scripts, stylesheets and TypeScript declarations, with no runtime package dependencies.
|
|
83
|
-
|
|
84
|
-
## Usage in .NET
|
|
85
|
-
|
|
86
|
-
### Create a file explorer
|
|
87
|
-
|
|
88
|
-
```csharp
|
|
89
|
-
using CanopyX;
|
|
90
|
-
using CanopyX.Html;
|
|
91
|
-
|
|
92
|
-
var files = new CanopyTreeView("files", "Project files");
|
|
93
|
-
files.Search = new CanopySearchOptions();
|
|
94
|
-
files.Columns.Add(new CanopyColumn("name", "Name") { Sortable = true });
|
|
95
|
-
files.Columns.Add(new CanopyColumn("size", "Size")
|
|
96
|
-
{
|
|
97
|
-
Kind = CanopyColumnKind.Number,
|
|
98
|
-
Sortable = true
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
var projects = new CanopyNode("projects", "Projects");
|
|
102
|
-
var report = new CanopyNode("quarterly-report", "Quarterly report.pdf");
|
|
103
|
-
report.Cells["size"] = new CanopyCell(2048L) { Text = "2 KiB" };
|
|
104
|
-
projects.Children.Add(report);
|
|
105
|
-
files.Roots.Add(projects);
|
|
106
|
-
|
|
107
|
-
files.SaveHtmlPage("files.html");
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Open `files.html` in a browser and expand Projects. The first column displays the node label; the Size column displays the matching cell. Numeric values control sorting while `Text` controls the displayed value.
|
|
111
|
-
|
|
112
|
-
For a larger tree, write a bundle that loads branches on demand:
|
|
113
|
-
|
|
114
|
-
```csharp
|
|
115
|
-
files.SaveHtmlBundle("file-report");
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Keep the generated page, assets and data files together. The bundle can be opened directly from disk or a file share.
|
|
119
|
-
|
|
120
|
-
### Create an inventory table
|
|
121
|
-
|
|
122
37
|
```csharp
|
|
123
38
|
using CanopyX;
|
|
124
39
|
using CanopyX.Html;
|
|
125
40
|
|
|
126
41
|
var inventory = new CanopyDataGridView("inventory", "Inventory");
|
|
127
42
|
inventory.Columns.Add(new CanopyColumn("name", "Name") { Sortable = true });
|
|
128
|
-
inventory.Columns.Add(new CanopyColumn("size", "Size")
|
|
129
|
-
{
|
|
130
|
-
Kind = CanopyColumnKind.Number,
|
|
131
|
-
Sortable = true
|
|
132
|
-
});
|
|
43
|
+
inventory.Columns.Add(new CanopyColumn("size", "Size") { Kind = CanopyColumnKind.Number, Sortable = true });
|
|
133
44
|
|
|
134
45
|
foreach (var (name, bytes) in new[] { ("Archive", 2048L), ("Documents", 512L) })
|
|
135
46
|
{
|
|
@@ -142,35 +53,20 @@ foreach (var (name, bytes) in new[] { ("Archive", 2048L), ("Documents", 512L) })
|
|
|
142
53
|
inventory.SaveHtmlPage("inventory.html");
|
|
143
54
|
```
|
|
144
55
|
|
|
145
|
-
Open `inventory.html`
|
|
146
|
-
|
|
147
|
-
Event snapshots without a key column opt in to `CanopyGridRowIdentity.Ordinal`; the typed grid assigns source positions and keeps sorting, filtering, export and drawers available. Saved selections, record deep links and keyed live updates require stable keys. Use `CanopySelectionMode.None` and leave reporting selection controls off for a read-only report with no selection consumer. See [row identity](docs/data-protocol.md#row-identity-order) and the generated `ordinal-grid.html` example.
|
|
148
|
-
|
|
149
|
-
Grid fitting reserves readable header and content minimums before preferred whitespace. Spare width restores headers first, then preferred widths, then ordinary column growth. Headers yield with a full-title tooltip only when their capped minimums cannot collectively fit; content that still needs more room scrolls horizontally. Auto height includes the actual horizontal scrollbar gutter. The [column-fitting algorithm](docs/column-fitting.md) and `report-grid-layout.html` example describe the policy.
|
|
150
|
-
|
|
151
|
-
Grids can show page totals and all-matching totals in declarative footer rows, including the script-free fallback. Columns support safe CSS classes, logical alignment, selector-based defaults, alternate sort keys and direction cycles. Plugins can add filter operators, sort comparators and custom aggregates. See [column options and footers](docs/data-protocol.md#column-defaults-ordering-hooks-and-footer-rows), and the generated `grid-footers.html`, `grid-footers-dark.html` and `grid-footers-static.html` examples.
|
|
56
|
+
Open `inventory.html` in any browser. The page carries its own runtime and data, so you can attach it to a ticket, archive it with a run or put it on a file share. Numeric values drive sorting; `Text` is what the reader sees.
|
|
152
57
|
|
|
153
|
-
|
|
58
|
+
For a tree, build `CanopyNode`s under a `CanopyTreeView`. For a large one, `SaveHtmlBundle("report")` writes a folder that loads branches on demand, still with no server. The [getting started guide](https://canopyx.dev/docs/getting-started/) builds both, step by step.
|
|
154
59
|
|
|
155
|
-
|
|
156
|
-
using CanopyX.Rendering;
|
|
60
|
+
### From JavaScript: mount a view in your page
|
|
157
61
|
|
|
158
|
-
|
|
159
|
-
|
|
62
|
+
```shell
|
|
63
|
+
npm install @evotecit/canopyx
|
|
160
64
|
```
|
|
161
65
|
|
|
162
|
-
These methods return HTML tables with no scripts. Insert the returned HTML into your email, print layout or document-generation workflow.
|
|
163
|
-
|
|
164
|
-
## Usage in JavaScript
|
|
165
|
-
|
|
166
|
-
Add a container to your page:
|
|
167
|
-
|
|
168
66
|
```html
|
|
169
67
|
<div id="files" style="height: 360px"></div>
|
|
170
68
|
```
|
|
171
69
|
|
|
172
|
-
Then mount a tree grid:
|
|
173
|
-
|
|
174
70
|
```javascript
|
|
175
71
|
import { createTreeGrid } from "@evotecit/canopyx";
|
|
176
72
|
import "@evotecit/canopyx/styles.css";
|
|
@@ -178,104 +74,78 @@ import "@evotecit/canopyx/styles.css";
|
|
|
178
74
|
const grid = createTreeGrid(document.getElementById("files"), {
|
|
179
75
|
view: {
|
|
180
76
|
protocol: "canopyx/2", type: "view", id: "files", label: "Project files",
|
|
181
|
-
|
|
182
|
-
search: { minLength: 1, maxResults: 50 },
|
|
77
|
+
search: { minLength: 1 },
|
|
183
78
|
columns: [{ id: "name", title: "Name", kind: "text", width: 320 }],
|
|
184
79
|
source: { kind: "inline" },
|
|
185
|
-
roots: [{
|
|
186
|
-
id: "projects", label: "Projects",
|
|
187
|
-
children: [{ id: "quarterly-report", label: "Quarterly report.pdf" }]
|
|
188
|
-
}]
|
|
80
|
+
roots: [{ id: "projects", label: "Projects", children: [{ id: "q3", label: "Quarterly report.pdf" }] }]
|
|
189
81
|
}
|
|
190
82
|
});
|
|
191
83
|
|
|
192
84
|
await grid.ready;
|
|
193
85
|
```
|
|
194
86
|
|
|
195
|
-
The stylesheet import uses your application's asset pipeline. For a page without a bundler, serve `classic.js` and `styles.css` from the installed package and load them with `<script>` and `<link>` elements; the script exposes `window.CanopyX`. Use one matching runtime and stylesheet per page.
|
|
196
|
-
|
|
197
|
-
### Choose a runtime
|
|
198
|
-
|
|
199
87
|
| Import | Use it for | Stylesheet |
|
|
200
88
|
| --- | --- | --- |
|
|
201
|
-
| `@evotecit/canopyx` |
|
|
89
|
+
| `@evotecit/canopyx` | Tree grids | `@evotecit/canopyx/styles.css` |
|
|
202
90
|
| `@evotecit/canopyx/grid` | Flat data grids | `@evotecit/canopyx/grid.css` |
|
|
203
|
-
| `@evotecit/canopyx/reporting` |
|
|
91
|
+
| `@evotecit/canopyx/reporting` | Data grids with grouping, aggregates and export | `@evotecit/canopyx/reporting.css` |
|
|
204
92
|
|
|
205
|
-
|
|
93
|
+
Already have an HTML table? `CanopyX.enhance("#servers")` turns it into a grid with search, filters, sorting, pages and export, and keeps the table as the fallback ([enhance](docs/enhance.md)). Without a bundler, load `classic.js` and `styles.css` from the package; the script exposes `window.CanopyX`. TypeScript declarations are included, and the package has no runtime dependencies. The [JavaScript guide](https://canopyx.dev/docs/javascript/) covers the rest.
|
|
206
94
|
|
|
207
|
-
###
|
|
95
|
+
### For email and print
|
|
208
96
|
|
|
209
|
-
|
|
97
|
+
```csharp
|
|
98
|
+
using CanopyX.Rendering;
|
|
210
99
|
|
|
211
|
-
|
|
212
|
-
<link rel="stylesheet" href="canopyx-grid.css">
|
|
213
|
-
<script src="canopyx-grid.js"></script>
|
|
214
|
-
<script>CanopyX.enhance("#servers", { pageLength: 10, stateSave: true });</script>
|
|
100
|
+
string table = CanopyStaticHtml.RenderGrid(inventory);
|
|
215
101
|
```
|
|
216
102
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
### Extend it with plugins
|
|
220
|
-
|
|
221
|
-
`CanopyX.use(plugin)` adds cell renderers that columns choose by name, toolbar buttons, menu entries, export formats and event handlers to every grid and tree on the page; the `plugins` option adds them to one view. Optional features load as separate parts only when a view needs them, so serve the `canopyx-*.js` files beside the runtime (the .NET writers do). See [docs/plugins.md](docs/plugins.md).
|
|
103
|
+
The result is an HTML table with inline styles and no scripts, ready for a mail body, a print layout or Word. See [email and print](https://canopyx.dev/docs/static-tables/).
|
|
222
104
|
|
|
223
|
-
|
|
105
|
+
## Choose a delivery
|
|
224
106
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
`
|
|
229
|
-
|
|
230
|
-
`CanopyStaticHtml.
|
|
231
|
-
|
|
232
|
-
With `viewIntents: true`, `await grid.applyViewIntent(state)` validates a versioned JSON proposal and previews it as
|
|
233
|
-
chips before the reader applies it. The host supplies the proposal and governs access; CanopyX makes no model calls.
|
|
234
|
-
See [view intents](docs/view-intents.md).
|
|
235
|
-
|
|
236
|
-
### Edit data in a grid
|
|
237
|
-
|
|
238
|
-
Mark flat-grid columns `editable` and give them typed editors (text, number, date and time, select, toggle, lookup) and validation. Readers edit in the cells (or in the record drawer on phones) with undo and redo; changes stay marked until your callbacks or data source save them through row or batch commits, which report each row's result. CanopyX never writes data itself. See [docs/editing.md](docs/editing.md).
|
|
239
|
-
|
|
240
|
-
### Format cells by rule
|
|
241
|
-
|
|
242
|
-
`formatRules` (in .NET, `CanopyDataGridView.FormatRules`) tints cells and rows, adds icons, badges and cues, and draws data bars, colour scales and threshold bands, with conditions from the filter builder. Readers can change the rules in a rule editor, and their rules are kept in saved views. See [docs/conditional-formatting.md](docs/conditional-formatting.md).
|
|
243
|
-
|
|
244
|
-
### Show records as a calendar
|
|
245
|
-
|
|
246
|
-
Give a grid a `calendar` (in .NET, `CanopyDataGridView.Calendar`, or `grid.Calendar().Start(x => x.Starts).End(x => x.Ends)` on a typed grid) and its records show as a month, week, day, N-day, agenda or year calendar, or, with resources, a resource timeline whose resources are a CanopyX tree. The grid's search, filters, facets, saved views, record panel, linked views, live data and editing keep working on the same records; recurring events, time zones with correct DST, iCalendar export and print come with it. See [docs/calendar.md](docs/calendar.md) and [docs/resource-timeline.md](docs/resource-timeline.md).
|
|
247
|
-
|
|
248
|
-
### Link views together
|
|
249
|
-
|
|
250
|
-
A chart, a list or another grid can filter a grid or tree (`setExternalFilter`, shown as a removable chip and sent to a host source in its query) or highlight its rows (`setHighlight`), and a view with `linkEvents` reports its selection and own conditions as neutral `canopyx:linkchange` payloads. See [docs/linked-views.md](docs/linked-views.md).
|
|
251
|
-
|
|
252
|
-
### Translate the controls
|
|
253
|
-
|
|
254
|
-
Import labels from `@evotecit/canopyx/locales/pl`, `/locales/de`, `/locales/es`, `/locales/fr` or `/locales/it` and pass them as `labels` in your view definition. In C#, set the view's `Labels` to `CanopyLabels.Polish()`, `German()`, `Spanish()`, `French()` or `Italian()` before writing the page.
|
|
255
|
-
|
|
256
|
-
### Strict security policies and accessibility
|
|
257
|
-
|
|
258
|
-
CanopyX runs under a Content Security Policy without `'unsafe-inline'` or `'unsafe-eval'`: set `CanopyHtmlOptions.Nonce` in C#, or give the runtime script a nonce, and the parts the runtime loads later carry it too. It also works with Trusted Types (`trusted-types canopyx`), writes host strings as text, and escapes CSV fields that could start a spreadsheet formula. See [docs/security.md](docs/security.md). The keyboard model, ARIA roles, forced colours, reduced motion, zoom reflow and target sizes, and what the tests check, are in [docs/accessibility.md](docs/accessibility.md).
|
|
259
|
-
|
|
260
|
-
## Working with larger datasets
|
|
261
|
-
|
|
262
|
-
Virtual rows keep the rendered DOM small. Tree bundles split data into sidecar files, and hosted sources let your application fetch records as the reader navigates. Flat-grid queries filter and sort the complete dataset before paging; loading one page does not mean the rest of the results are available in the browser.
|
|
263
|
-
|
|
264
|
-
`CanopyX.Data` answers a hosted grid's queries on the server, so a table over millions of database rows pages, sorts, filters, groups, counts value lists and exports without loading the result into the browser, and saves the rows readers edit through a writer the host controls ([docs/remote-dotnet.md](docs/remote-dotnet.md)).
|
|
107
|
+
| You want | Write | What you get |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| One file to attach or archive | `view.SaveHtmlPage("report.html")` | Data and runtime in a single page |
|
|
110
|
+
| A big tree or grid on a file share | `view.SaveHtmlBundle("report")` | A folder whose branches and rows load as the reader scrolls |
|
|
111
|
+
| Millions of database rows | `CanopyX.Data` + `CanopyX.AspNetCore` | Paging, filters, summaries, export and edits answered by your server |
|
|
112
|
+
| A table in an email | `CanopyStaticHtml.Render(view)` | A script-free table that survives mail clients |
|
|
265
113
|
|
|
266
|
-
|
|
114
|
+
More detail, with measured numbers, is in [delivery modes](https://canopyx.dev/docs/delivery/) and [large data](docs/large-data.md).
|
|
267
115
|
|
|
268
|
-
|
|
116
|
+
## Guides by task
|
|
269
117
|
|
|
270
|
-
|
|
118
|
+
| I want to… | Read |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| Group, filter, total and export records | [Reporting grids](https://canopyx.dev/docs/reporting/), [grouping](docs/grouping.md), [export formats](docs/authoring.md#export-formats) |
|
|
121
|
+
| Let readers edit cells and save through my code | [Editing](docs/editing.md) |
|
|
122
|
+
| Colour cells and rows by rule | [Conditional formatting](docs/conditional-formatting.md) |
|
|
123
|
+
| Show the same records as a calendar, board or plan | [Calendar](docs/calendar.md), [resource timeline](docs/resource-timeline.md), [board](docs/board.md), [plan](docs/plan.md) |
|
|
124
|
+
| Serve a grid from my database | [Server-side data for .NET](docs/remote-dotnet.md), [paging](docs/paging.md) |
|
|
125
|
+
| Open one record with all its details | [Record panel](docs/record-panel.md) |
|
|
126
|
+
| Filter one view from another | [Linked views](docs/linked-views.md) |
|
|
127
|
+
| Compare two snapshots | [Dataset comparison](docs/dataset-compare.md) |
|
|
128
|
+
| Build a setup or edit wizard | [Guided flows](docs/flow.md) |
|
|
129
|
+
| Translate the controls | [Label packs](docs/labels.md): Polish, German, Spanish, French and Italian are included |
|
|
130
|
+
| Add my own cell types, buttons or export formats | [Plugins](docs/plugins.md) |
|
|
131
|
+
| Run under a strict Content Security Policy | [Security](docs/security.md) |
|
|
132
|
+
| Match my site's colours and density | [Theming](docs/architecture.md#theming) |
|
|
133
|
+
| Know what keyboard and screen reader users get | [Accessibility](docs/accessibility.md) |
|
|
134
|
+
|
|
135
|
+
Everything else: [features](docs/features.md), [recipes](docs/recipes.md), the [authoring reference](docs/authoring.md) and the [canopyx/2 data protocol](docs/data-protocol.md).
|
|
136
|
+
|
|
137
|
+
## Packages
|
|
138
|
+
|
|
139
|
+
| Package | What it is |
|
|
140
|
+
| --- | --- |
|
|
141
|
+
| [`CanopyX.Html`](https://www.nuget.org/packages/CanopyX.Html) | Views, the browser runtime and the HTML writers. Start here. |
|
|
142
|
+
| [`CanopyX`](https://www.nuget.org/packages/CanopyX) | The model, bundle writer and script-free renderer, without the browser assets. |
|
|
143
|
+
| [`CanopyX.Data`](https://www.nuget.org/packages/CanopyX.Data) | Server-side paging, filters, summaries, export and edits over `IQueryable`. |
|
|
144
|
+
| [`CanopyX.AspNetCore`](https://www.nuget.org/packages/CanopyX.AspNetCore) | Minimal-API endpoints for a hosted grid. |
|
|
145
|
+
| [`@evotecit/canopyx`](https://www.npmjs.com/package/@evotecit/canopyx) | ES modules, classic scripts, styles and TypeScript types. |
|
|
271
146
|
|
|
272
|
-
|
|
273
|
-
- [Recipes](docs/recipes.md): short how-tos for server data, cell values, export, phones, grouping, saved views and translations.
|
|
274
|
-
- [Authoring reference](docs/authoring.md), [column layout](docs/column-layout.md), [label packs](docs/labels.md) and the [data protocol](docs/data-protocol.md).
|
|
275
|
-
- [Dataset comparison](docs/dataset-compare.md) and [validated view intents](docs/view-intents.md).
|
|
276
|
-
- [Planned work](TODO.md): remaining capabilities, consumers and acceptance gates.
|
|
277
|
-
- [Testing and benchmarks](docs/testing.md): the required correctness loop and explicit performance measurements.
|
|
147
|
+
The .NET packages target .NET 8, .NET 10, .NET Standard 2.0 and .NET Framework 4.7.2, and add no third-party runtime dependencies. Generating a report from C# needs no Node.js or build step.
|
|
278
148
|
|
|
279
149
|
## Community and license
|
|
280
150
|
|
|
281
|
-
CanopyX is an Evotec project, licensed under MIT. Questions and feedback are welcome in the [Evotec community on Discord](https://evo.yt/discord).
|
|
151
|
+
CanopyX is an Evotec project, licensed under MIT. Questions and feedback are welcome in the [Evotec community on Discord](https://evo.yt/discord). Planned work is in [TODO.md](TODO.md), and how changes are tested is in [docs/testing.md](docs/testing.md). More Evotec projects are at [evotec.xyz](https://evotec.xyz/hub).
|
package/README.nuget.md
CHANGED
|
@@ -1,88 +1,30 @@
|
|
|
1
|
-
# CanopyX
|
|
1
|
+
# CanopyX
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive views of your own records, written in C#: tree grids, data grids, pivots, boards, calendars, plans, status matrices, change reviews and guided flows. Save a report that opens from disk, serve the view from your app, or render it as a script-free table for email and print.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**[Live demos](https://canopyx.dev/views/)** · **[Documentation](https://canopyx.dev/docs/)** · **[Getting started](https://canopyx.dev/docs/getting-started/)** · **[GitHub](https://github.com/EvotecIT/CanopyX)**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](https://www.nuget.org/packages/CanopyX.Html)
|
|
7
|
+

|
|
9
8
|
|
|
9
|
+
## Pick a view
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
| | | |
|
|
12
|
+
| :-- | :-- | :-- |
|
|
13
|
+
| [](https://canopyx.dev/views/files/)<br>**Tree grid**<br>`CanopyTreeView` | [](https://canopyx.dev/views/inventory/)<br>**Data grid**<br>`CanopyDataGridView` | [](https://canopyx.dev/views/pivot/)<br>**Pivot**<br>`CanopyGridPivot` |
|
|
14
|
+
| [](https://canopyx.dev/views/board/)<br>**Board**<br>`CanopyBoard` | [](https://canopyx.dev/views/calendar/)<br>**Calendar**<br>`CanopyCalendar` | [](https://canopyx.dev/views/plan/)<br>**Plan**<br>`CanopyPlan` |
|
|
15
|
+
| [](https://canopyx.dev/views/timeline/)<br>**Resource timeline**<br>`CanopyCalendarResources` | [](https://canopyx.dev/views/matrix/)<br>**Status matrix**<br>`CanopyMatrix` | [](https://canopyx.dev/views/changes/)<br>**Change review**<br>`CanopyChangeList`, `CanopyTextDiff` |
|
|
16
|
+
| [](https://canopyx.dev/views/compare/)<br>**Dataset compare**<br>`CanopyDatasetComparer` | [](https://canopyx.dev/views/time/)<br>**Time slider**<br>`CanopyTimeSlider` | [](https://canopyx.dev/views/flow/)<br>**Guided flow**<br>`CanopyFlow` |
|
|
17
|
+
| [](https://canopyx.dev/views/path/)<br>**Approval path**<br>`CanopyPath` | [](https://canopyx.dev/views/stack/)<br>**Layer stack**<br>`CanopyStack` | [](https://canopyx.dev/views/email/)<br>**Script-free table**<br>`CanopyStaticHtml` |
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
- **Inventory and results tables** with typed sorting, filters, column resizing and saved views.
|
|
15
|
-
- **HTML reports** that include their own runtime and data and can be opened from disk or a file share.
|
|
16
|
-
- **Application views** backed by paged or cursor-based data sources, with selection and detail callbacks.
|
|
17
|
-
- **Email and print tables** rendered from the same .NET view without JavaScript.
|
|
18
|
-
|
|
19
|
-
## Features
|
|
20
|
-
|
|
21
|
-
| | Tree grid | Data grid |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| Navigation | Expandable branches, path search and lazy children | Continuous or paged records, offset or cursor navigation |
|
|
24
|
-
| Querying | Search, sibling sorting and named filters | Search, multi-column sorting, typed filters and condition groups |
|
|
25
|
-
| Columns | Resize and hide | Resize, hide, reorder, pin and fit to content |
|
|
26
|
-
| Selection | Single/multiple selection and hierarchical checkboxes | Single/multiple selection with stable record IDs |
|
|
27
|
-
| Presentation | Badges, details, custom cells and light/dark themes | Links, progress, wrapped text, row highlighting and light/dark themes |
|
|
28
|
-
| Delivery | Single HTML file, sidecar bundle or hosted data | Single HTML file or hosted data |
|
|
29
|
-
|
|
30
|
-
Both views use virtual rows and support keyboard navigation. Reporting grids also provide grouping, aggregates, saved views, CSV export and row copying. English labels are built in; Polish, German, Spanish, French and Italian packs are included.
|
|
31
|
-
|
|
32
|
-
## Installation
|
|
19
|
+
## Get started
|
|
33
20
|
|
|
34
21
|
```shell
|
|
35
22
|
dotnet add package CanopyX.Html
|
|
36
23
|
```
|
|
37
24
|
|
|
38
|
-
`CanopyX.Html`
|
|
39
|
-
|
|
40
|
-
| Target | Support |
|
|
41
|
-
| --- | --- |
|
|
42
|
-
| .NET 8 and .NET 10 | Windows, Linux and macOS |
|
|
43
|
-
| .NET Standard 2.0 | Compatible .NET applications |
|
|
44
|
-
| .NET Framework 4.7.2 | Windows |
|
|
45
|
-
|
|
46
|
-
Neither .NET package adds third-party runtime dependencies. Generating a report from C# needs no Node.js, npm or JavaScript build step.
|
|
25
|
+
`CanopyX.Html` brings in `CanopyX` and the browser assets. Install `CanopyX` alone when you only need the model, the bundle writer or the script-free renderer.
|
|
47
26
|
|
|
48
|
-
|
|
49
|
-
## Usage in .NET
|
|
50
|
-
|
|
51
|
-
### Create a file explorer
|
|
52
|
-
|
|
53
|
-
```csharp
|
|
54
|
-
using CanopyX;
|
|
55
|
-
using CanopyX.Html;
|
|
56
|
-
|
|
57
|
-
var files = new CanopyTreeView("files", "Project files");
|
|
58
|
-
files.Search = new CanopySearchOptions();
|
|
59
|
-
files.Columns.Add(new CanopyColumn("name", "Name") { Sortable = true });
|
|
60
|
-
files.Columns.Add(new CanopyColumn("size", "Size")
|
|
61
|
-
{
|
|
62
|
-
Kind = CanopyColumnKind.Number,
|
|
63
|
-
Sortable = true
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
var projects = new CanopyNode("projects", "Projects");
|
|
67
|
-
var report = new CanopyNode("quarterly-report", "Quarterly report.pdf");
|
|
68
|
-
report.Cells["size"] = new CanopyCell(2048L) { Text = "2 KiB" };
|
|
69
|
-
projects.Children.Add(report);
|
|
70
|
-
files.Roots.Add(projects);
|
|
71
|
-
|
|
72
|
-
files.SaveHtmlPage("files.html");
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Open `files.html` in a browser and expand Projects. The first column displays the node label; the Size column displays the matching cell. Numeric values control sorting while `Text` controls the displayed value.
|
|
76
|
-
|
|
77
|
-
For a larger tree, write a bundle that loads branches on demand:
|
|
78
|
-
|
|
79
|
-
```csharp
|
|
80
|
-
files.SaveHtmlBundle("file-report");
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Keep the generated page, assets and data files together. The bundle can be opened directly from disk or a file share.
|
|
84
|
-
|
|
85
|
-
### Create an inventory table
|
|
27
|
+
### A report that opens from disk
|
|
86
28
|
|
|
87
29
|
```csharp
|
|
88
30
|
using CanopyX;
|
|
@@ -90,11 +32,7 @@ using CanopyX.Html;
|
|
|
90
32
|
|
|
91
33
|
var inventory = new CanopyDataGridView("inventory", "Inventory");
|
|
92
34
|
inventory.Columns.Add(new CanopyColumn("name", "Name") { Sortable = true });
|
|
93
|
-
inventory.Columns.Add(new CanopyColumn("size", "Size")
|
|
94
|
-
{
|
|
95
|
-
Kind = CanopyColumnKind.Number,
|
|
96
|
-
Sortable = true
|
|
97
|
-
});
|
|
35
|
+
inventory.Columns.Add(new CanopyColumn("size", "Size") { Kind = CanopyColumnKind.Number, Sortable = true });
|
|
98
36
|
|
|
99
37
|
foreach (var (name, bytes) in new[] { ("Archive", 2048L), ("Documents", 512L) })
|
|
100
38
|
{
|
|
@@ -107,25 +45,63 @@ foreach (var (name, bytes) in new[] { ("Archive", 2048L), ("Documents", 512L) })
|
|
|
107
45
|
inventory.SaveHtmlPage("inventory.html");
|
|
108
46
|
```
|
|
109
47
|
|
|
110
|
-
Open `inventory.html`
|
|
48
|
+
Open `inventory.html` in any browser. It carries its own runtime and data, so you can attach it to a ticket or put it on a file share. Numeric values drive sorting; `Text` is what the reader sees.
|
|
111
49
|
|
|
112
|
-
###
|
|
50
|
+
### A file explorer
|
|
51
|
+
|
|
52
|
+
```csharp
|
|
53
|
+
var files = new CanopyTreeView("files", "Project files") { Search = new CanopySearchOptions() };
|
|
54
|
+
files.Columns.Add(new CanopyColumn("name", "Name") { Sortable = true });
|
|
55
|
+
files.Columns.Add(new CanopyColumn("size", "Size") { Kind = CanopyColumnKind.Number, Sortable = true });
|
|
56
|
+
|
|
57
|
+
var projects = new CanopyNode("projects", "Projects");
|
|
58
|
+
var report = new CanopyNode("quarterly-report", "Quarterly report.pdf");
|
|
59
|
+
report.Cells["size"] = new CanopyCell(2048L) { Text = "2 KiB" };
|
|
60
|
+
projects.Children.Add(report);
|
|
61
|
+
files.Roots.Add(projects);
|
|
62
|
+
|
|
63
|
+
files.SaveHtmlPage("files.html"); // one file
|
|
64
|
+
files.SaveHtmlBundle("file-report"); // or a folder that loads branches on demand
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### A table for email and print
|
|
113
68
|
|
|
114
69
|
```csharp
|
|
115
70
|
using CanopyX.Rendering;
|
|
116
71
|
|
|
117
|
-
string
|
|
118
|
-
string inventoryTable = CanopyStaticHtml.RenderGrid(inventory);
|
|
72
|
+
string table = CanopyStaticHtml.RenderGrid(inventory);
|
|
119
73
|
```
|
|
120
74
|
|
|
121
|
-
|
|
75
|
+
The result is an HTML table with inline styles and no scripts, ready for a mail body, a print layout or Word.
|
|
76
|
+
|
|
77
|
+
## Choose a delivery
|
|
78
|
+
|
|
79
|
+
| You want | Write | What you get |
|
|
80
|
+
| --- | --- | --- |
|
|
81
|
+
| One file to attach or archive | `view.SaveHtmlPage("report.html")` | Data and runtime in a single page |
|
|
82
|
+
| A big tree or grid on a file share | `view.SaveHtmlBundle("report")` | A folder whose branches and rows load as the reader scrolls |
|
|
83
|
+
| Millions of database rows | `CanopyX.Data` + `CanopyX.AspNetCore` | Paging, filters, summaries, export and edits answered by your server |
|
|
84
|
+
| A table in an email | `CanopyStaticHtml.Render(view)` | A script-free table that survives mail clients |
|
|
85
|
+
|
|
86
|
+
## Guides
|
|
87
|
+
|
|
88
|
+
- [Getting started](https://canopyx.dev/docs/getting-started/): a file explorer and an inventory table, step by step.
|
|
89
|
+
- [Reporting grids](https://canopyx.dev/docs/reporting/): grouping, filters, aggregates, presenters and export.
|
|
90
|
+
- [Email and print](https://canopyx.dev/docs/static-tables/) and [delivery modes](https://canopyx.dev/docs/delivery/).
|
|
91
|
+
- [Server-side data for .NET](https://github.com/EvotecIT/CanopyX/blob/main/docs/remote-dotnet.md): `CanopyX.Data` and `CanopyX.AspNetCore`.
|
|
92
|
+
- [Calendar](https://github.com/EvotecIT/CanopyX/blob/main/docs/calendar.md), [board](https://github.com/EvotecIT/CanopyX/blob/main/docs/board.md), [plan](https://github.com/EvotecIT/CanopyX/blob/main/docs/plan.md), [matrix](https://github.com/EvotecIT/CanopyX/blob/main/docs/matrix.md), [change views](https://github.com/EvotecIT/CanopyX/blob/main/docs/changes.md) and [guided flows](https://github.com/EvotecIT/CanopyX/blob/main/docs/flow.md).
|
|
93
|
+
- [Editing](https://github.com/EvotecIT/CanopyX/blob/main/docs/editing.md), [conditional formatting](https://github.com/EvotecIT/CanopyX/blob/main/docs/conditional-formatting.md), [label packs](https://github.com/EvotecIT/CanopyX/blob/main/docs/labels.md) and [security](https://github.com/EvotecIT/CanopyX/blob/main/docs/security.md).
|
|
122
94
|
|
|
123
|
-
##
|
|
95
|
+
## Requirements
|
|
124
96
|
|
|
125
|
-
|
|
97
|
+
| Target | Support |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| .NET 8 and .NET 10 | Windows, Linux and macOS |
|
|
100
|
+
| .NET Standard 2.0 | Compatible .NET applications |
|
|
101
|
+
| .NET Framework 4.7.2 | Windows |
|
|
126
102
|
|
|
127
|
-
|
|
103
|
+
The packages add no third-party runtime dependencies, and generating a report needs no Node.js, npm or build step.
|
|
128
104
|
|
|
129
105
|
## Community and license
|
|
130
106
|
|
|
131
|
-
CanopyX is an Evotec project, licensed under MIT. Questions and feedback are welcome in the [Evotec community on Discord](https://evo.yt/discord).
|
|
107
|
+
CanopyX is an Evotec project, licensed under MIT. Questions and feedback are welcome in the [Evotec community on Discord](https://evo.yt/discord). More Evotec projects are at [evotec.xyz](https://evotec.xyz/hub).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evotecit/canopyx",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"description": "Interactive tree grids and data tables with virtual rows, search, filters and offline HTML reports.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -116,6 +116,14 @@
|
|
|
116
116
|
"./ui-tabs.css": "./CanopyX.Html/Assets/canopyx-ui-tabs.css",
|
|
117
117
|
"./ui-stepper.js": "./CanopyX.Html/Assets/canopyx-ui-stepper.js",
|
|
118
118
|
"./ui-stepper.css": "./CanopyX.Html/Assets/canopyx-ui-stepper.css",
|
|
119
|
+
"./ui-accordion.js": "./CanopyX.Html/Assets/canopyx-ui-accordion.js",
|
|
120
|
+
"./ui-accordion.css": "./CanopyX.Html/Assets/canopyx-ui-accordion.css",
|
|
121
|
+
"./ui": {
|
|
122
|
+
"types": "./JavaScript/ui.d.ts",
|
|
123
|
+
"import": "./CanopyX.Html/Assets/canopyx-ui-module.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./ui.js": "./CanopyX.Html/Assets/canopyx-ui.js",
|
|
126
|
+
"./ui.css": "./CanopyX.Html/Assets/canopyx-ui.css",
|
|
119
127
|
"./locales/pl": {
|
|
120
128
|
"types": "./JavaScript/locales/pl.d.ts",
|
|
121
129
|
"import": "./JavaScript/locales/pl.mjs"
|
|
@@ -256,6 +264,11 @@
|
|
|
256
264
|
"CanopyX.Html/Assets/canopyx-ui-tabs.css",
|
|
257
265
|
"CanopyX.Html/Assets/canopyx-ui-stepper.js",
|
|
258
266
|
"CanopyX.Html/Assets/canopyx-ui-stepper.css",
|
|
267
|
+
"CanopyX.Html/Assets/canopyx-ui-accordion.js",
|
|
268
|
+
"CanopyX.Html/Assets/canopyx-ui-accordion.css",
|
|
269
|
+
"CanopyX.Html/Assets/canopyx-ui.js",
|
|
270
|
+
"CanopyX.Html/Assets/canopyx-ui.css",
|
|
271
|
+
"CanopyX.Html/Assets/canopyx-ui-module.mjs",
|
|
259
272
|
"CanopyX.Html/Assets/canopyx-board.js",
|
|
260
273
|
"CanopyX.Html/Assets/canopyx-board.css",
|
|
261
274
|
"CanopyX.Html/Assets/canopyx-plan.js",
|