aspnetzero-workflow-designer 1.0.0 → 1.0.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/README.md +40 -15
- package/dist/workflow-designer.js +25466 -29583
- package/dist/workflow-designer.js.map +1 -1
- package/dist/workflow-designer.umd.cjs +573 -573
- package/dist/workflow-designer.umd.cjs.map +1 -1
- package/package.json +41 -42
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# aspnetzero-workflow-designer
|
|
2
2
|
|
|
3
3
|
Framework-neutral custom elements for the ASP.NET Zero workflow & approval builder.
|
|
4
4
|
One implementation, wrapped by Angular, React and ASP.NET Core MVC — so the three UIs cannot drift apart.
|
|
@@ -13,7 +13,7 @@ One implementation, wrapped by Angular, React and ASP.NET Core MVC — so the th
|
|
|
13
13
|
Both are registered automatically on import.
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
import '
|
|
16
|
+
import 'aspnetzero-workflow-designer';
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## The host contract
|
|
@@ -137,7 +137,7 @@ Swapping the rendering library must never change the persisted JSON.
|
|
|
137
137
|
```html
|
|
138
138
|
<workflow-designer id="designer"></workflow-designer>
|
|
139
139
|
<script type="module">
|
|
140
|
-
import '
|
|
140
|
+
import 'aspnetzero-workflow-designer';
|
|
141
141
|
|
|
142
142
|
const designer = document.getElementById('designer');
|
|
143
143
|
|
|
@@ -159,27 +159,52 @@ npm install
|
|
|
159
159
|
npm run dev # demo page at demo/index.html
|
|
160
160
|
npm run typecheck
|
|
161
161
|
npm test # vitest suite under test/
|
|
162
|
-
npm run build # ESM + UMD + rolled-up .d.ts into dist
|
|
162
|
+
npm run build # ESM + UMD + rolled-up .d.ts into dist/
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
Rendering uses [AntV X6](https://x6.antv.antgroup.com/) — a vanilla-JS graph library, chosen precisely
|
|
166
166
|
because it carries no framework dependency and therefore works identically inside all three host UIs.
|
|
167
167
|
|
|
168
|
-
###
|
|
168
|
+
### How the hosts get the designer
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
The hosts never use this folder. All three install the published `aspnetzero-workflow-designer` package
|
|
171
|
+
from npm, so the three UIs run the same build:
|
|
172
172
|
|
|
173
173
|
| Host | How it gets the designer |
|
|
174
174
|
|---|---|
|
|
175
|
-
| Angular (`angular/`) | `
|
|
176
|
-
| React (`react/`) | `
|
|
177
|
-
| ASP.NET Core MVC (`Web.Mvc`) |
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
| Angular (`angular/`) | `aspnetzero-workflow-designer` dependency, imports the ESM build |
|
|
176
|
+
| React (`react/`) | `aspnetzero-workflow-designer` dependency, imports the ESM build |
|
|
177
|
+
| ASP.NET Core MVC (`Web.Mvc`) | `aspnetzero-workflow-designer` dependency; `bundles.json` turns `dist/workflow-designer.umd.cjs` into `_Bundles/workflow-designer.min.js` |
|
|
178
|
+
|
|
179
|
+
### Releasing a change
|
|
180
|
+
|
|
181
|
+
1. Change the package, then run `npm test` and `npm run build`.
|
|
182
|
+
2. Raise `version` in `package.json` (a new step kind or input is a minor version, a fix a patch).
|
|
183
|
+
3. Run `npm publish`. `prepublishOnly` runs the tests and the build again, so a broken package is not
|
|
184
|
+
published.
|
|
185
|
+
4. In `angular/`, `react/` and `aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/`, run
|
|
186
|
+
`pnpm update aspnetzero-workflow-designer` and commit the lockfiles with the server change that
|
|
187
|
+
needed the new version.
|
|
188
|
+
|
|
189
|
+
`WorkflowNodeTypeContract_Tests` and the other contract tests in the server test project read this
|
|
190
|
+
folder's `src/`, so the server and the designer can not drift apart unnoticed.
|
|
191
|
+
|
|
192
|
+
### Trying a change in a host before publishing
|
|
193
|
+
|
|
194
|
+
Point a host at this folder for the time being:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
cd angular # or react
|
|
198
|
+
pnpm link ../workflow-designer
|
|
199
|
+
|
|
200
|
+
cd aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc
|
|
201
|
+
pnpm link ../../../workflow-designer
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The host now reads this folder's `dist/`, so run `npm run build` here after each change (MVC also needs
|
|
205
|
+
`npm run create-bundles`). `pnpm link` adds a `link:` override to the host's `pnpm-workspace.yaml` and
|
|
206
|
+
changes its `pnpm-lock.yaml`; do not commit those. To go back to the published package, revert both files
|
|
207
|
+
and run `pnpm install`.
|
|
183
208
|
|
|
184
209
|
## Status
|
|
185
210
|
|