@wemake4u/dmn-drd 1.0.0 → 1.0.2
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
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
# @wemake4u/dmn-drd
|
|
2
|
-
|
|
3
|
-
The DRD (Decision Requirements Diagram) components of the `@wemake4u` DMN editor, for Angular 22.
|
|
4
|
-
Most applications use the complete [`@wemake4u/dmn-editor`](https://www.npmjs.com/package/@wemake4u/dmn-editor);
|
|
5
|
-
this package is for building a different layout around the diagram.
|
|
6
|
-
|
|
7
|
-
- `DrdCanvas` (`dmn-drd-canvas`): SVG canvas with the DMN notation; selection and lasso, pan and
|
|
8
|
-
zoom, drag with grid snapping, connections checked against the DMN rules, orthogonal routing
|
|
9
|
-
with editable bends and docking sides, resize, context pad and menu, rename on the canvas,
|
|
10
|
-
validation badges, full keyboard use.
|
|
11
|
-
- `DrdPalette` (`dmn-drd-palette`), `DrdZoomControls` (`dmn-drd-zoom-controls`),
|
|
12
|
-
`DrdMinimap` (`dmn-drd-minimap`), `DrdPropertiesPanel` (`dmn-drd-properties-panel`).
|
|
13
|
-
- `DrdController`: the state they share (store, tool, selection, viewport, open editor,
|
|
14
|
-
validation issues).
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install @wemake4u/dmn-drd @wemake4u/dmn-core
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Peer dependencies: `@angular/core` and `@angular/common` 22.2.x, and `@wemake4u/dmn-core` 1.x.
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
Provide one `DrdController` in the component that hosts the diagram and give it a store:
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
import { Component, inject } from '@angular/core';
|
|
30
|
-
import { DmnStore } from '@wemake4u/dmn-core';
|
|
31
|
-
import {
|
|
32
|
-
DrdCanvas,
|
|
33
|
-
DrdController,
|
|
34
|
-
DrdMinimap,
|
|
35
|
-
DrdPalette,
|
|
36
|
-
DrdPropertiesPanel,
|
|
37
|
-
DrdZoomControls,
|
|
38
|
-
} from '@wemake4u/dmn-drd';
|
|
39
|
-
|
|
40
|
-
@Component({
|
|
41
|
-
selector: 'app-diagram',
|
|
42
|
-
imports: [DrdCanvas, DrdPalette, DrdZoomControls, DrdMinimap, DrdPropertiesPanel],
|
|
43
|
-
providers: [DrdController],
|
|
44
|
-
template: `
|
|
45
|
-
<dmn-drd-palette />
|
|
46
|
-
<div class="area">
|
|
47
|
-
<dmn-drd-canvas />
|
|
48
|
-
<dmn-drd-zoom-controls />
|
|
49
|
-
<dmn-drd-minimap />
|
|
50
|
-
</div>
|
|
51
|
-
<dmn-drd-properties-panel />
|
|
52
|
-
`,
|
|
53
|
-
})
|
|
54
|
-
export class Diagram {
|
|
55
|
-
private readonly controller = inject(DrdController);
|
|
56
|
-
|
|
57
|
-
async load(xml: string): Promise<void> {
|
|
58
|
-
this.controller.store.set(await DmnStore.open(xml));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
`controller.logicElementId()` is set when the user asks to open the logic of a decision, BKM or
|
|
64
|
-
decision service (Enter, double click in read-only mode, menu, properties panel): show the
|
|
65
|
-
editor of your choice, for example `ElementEditorShell` from
|
|
66
|
-
[`@wemake4u/dmn-boxed`](https://www.npmjs.com/package/@wemake4u/dmn-boxed).
|
|
67
|
-
|
|
68
|
-
The canvas follows the read-only mode of the store (`store.readOnly`): no palette tools,
|
|
69
|
-
handles, drag or editing keys.
|
|
70
|
-
|
|
71
|
-
The accent colors are CSS custom properties of the canvas: `--dmn-accent`,
|
|
72
|
-
`--dmn-accent-soft`, `--dmn-danger`, `--dmn-danger-soft`.
|
|
73
|
-
|
|
74
|
-
## License
|
|
75
|
-
|
|
76
|
-
MIT. The licenses of the dependencies are in
|
|
1
|
+
# @wemake4u/dmn-drd
|
|
2
|
+
|
|
3
|
+
The DRD (Decision Requirements Diagram) components of the `@wemake4u` DMN editor, for Angular 22.
|
|
4
|
+
Most applications use the complete [`@wemake4u/dmn-editor`](https://www.npmjs.com/package/@wemake4u/dmn-editor);
|
|
5
|
+
this package is for building a different layout around the diagram.
|
|
6
|
+
|
|
7
|
+
- `DrdCanvas` (`dmn-drd-canvas`): SVG canvas with the DMN notation; selection and lasso, pan and
|
|
8
|
+
zoom, drag with grid snapping, connections checked against the DMN rules, orthogonal routing
|
|
9
|
+
with editable bends and docking sides, resize, context pad and menu, rename on the canvas,
|
|
10
|
+
validation badges, full keyboard use.
|
|
11
|
+
- `DrdPalette` (`dmn-drd-palette`), `DrdZoomControls` (`dmn-drd-zoom-controls`),
|
|
12
|
+
`DrdMinimap` (`dmn-drd-minimap`), `DrdPropertiesPanel` (`dmn-drd-properties-panel`).
|
|
13
|
+
- `DrdController`: the state they share (store, tool, selection, viewport, open editor,
|
|
14
|
+
validation issues).
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @wemake4u/dmn-drd @wemake4u/dmn-core
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Peer dependencies: `@angular/core` and `@angular/common` 22.2.x, and `@wemake4u/dmn-core` 1.x.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
Provide one `DrdController` in the component that hosts the diagram and give it a store:
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { Component, inject } from '@angular/core';
|
|
30
|
+
import { DmnStore } from '@wemake4u/dmn-core';
|
|
31
|
+
import {
|
|
32
|
+
DrdCanvas,
|
|
33
|
+
DrdController,
|
|
34
|
+
DrdMinimap,
|
|
35
|
+
DrdPalette,
|
|
36
|
+
DrdPropertiesPanel,
|
|
37
|
+
DrdZoomControls,
|
|
38
|
+
} from '@wemake4u/dmn-drd';
|
|
39
|
+
|
|
40
|
+
@Component({
|
|
41
|
+
selector: 'app-diagram',
|
|
42
|
+
imports: [DrdCanvas, DrdPalette, DrdZoomControls, DrdMinimap, DrdPropertiesPanel],
|
|
43
|
+
providers: [DrdController],
|
|
44
|
+
template: `
|
|
45
|
+
<dmn-drd-palette />
|
|
46
|
+
<div class="area">
|
|
47
|
+
<dmn-drd-canvas />
|
|
48
|
+
<dmn-drd-zoom-controls />
|
|
49
|
+
<dmn-drd-minimap />
|
|
50
|
+
</div>
|
|
51
|
+
<dmn-drd-properties-panel />
|
|
52
|
+
`,
|
|
53
|
+
})
|
|
54
|
+
export class Diagram {
|
|
55
|
+
private readonly controller = inject(DrdController);
|
|
56
|
+
|
|
57
|
+
async load(xml: string): Promise<void> {
|
|
58
|
+
this.controller.store.set(await DmnStore.open(xml));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`controller.logicElementId()` is set when the user asks to open the logic of a decision, BKM or
|
|
64
|
+
decision service (Enter, double click in read-only mode, menu, properties panel): show the
|
|
65
|
+
editor of your choice, for example `ElementEditorShell` from
|
|
66
|
+
[`@wemake4u/dmn-boxed`](https://www.npmjs.com/package/@wemake4u/dmn-boxed).
|
|
67
|
+
|
|
68
|
+
The canvas follows the read-only mode of the store (`store.readOnly`): no palette tools,
|
|
69
|
+
handles, drag or editing keys.
|
|
70
|
+
|
|
71
|
+
The accent colors are CSS custom properties of the canvas: `--dmn-accent`,
|
|
72
|
+
`--dmn-accent-soft`, `--dmn-danger`, `--dmn-danger-soft`.
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT. The licenses of the dependencies are in THIRD_PARTY_NOTICES.txt.
|