@mosaicoo/form-angular 0.1.0 → 0.3.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/README.md +37 -0
- package/fesm2022/mosaicoo-form-angular-designer.mjs +1206 -0
- package/fesm2022/mosaicoo-form-angular-designer.mjs.map +1 -0
- package/fesm2022/mosaicoo-form-angular.mjs +224 -38
- package/fesm2022/mosaicoo-form-angular.mjs.map +1 -1
- package/package.json +6 -2
- package/types/mosaicoo-form-angular-designer.d.ts +148 -0
- package/types/mosaicoo-form-angular.d.ts +76 -2
package/README.md
CHANGED
|
@@ -39,6 +39,43 @@ export class MyPage {}
|
|
|
39
39
|
the form adopts your design system; override `[labels]` and `[messages]`
|
|
40
40
|
to localize.
|
|
41
41
|
|
|
42
|
+
## Designer
|
|
43
|
+
|
|
44
|
+
Visual authoring ships as a **separate entry point** — apps that only render
|
|
45
|
+
never load it:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { FormDesignerComponent } from '@mosaicoo/form-angular/designer';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<mform-designer [source]="definition" (schemaChanged)="save($event)" />
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Palette, canvas with selection, structure tree, property inspector,
|
|
56
|
+
undo/redo (Ctrl+Z/Y), duplicate/delete/move, live schema diagnostics,
|
|
57
|
+
import/export and a Preview mode with test data. The host owns persistence:
|
|
58
|
+
`schemaChanged` hands you the versioned schema document.
|
|
59
|
+
|
|
60
|
+
## Extending
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
// Register custom field components and your HTTP transport once:
|
|
64
|
+
bootstrapApplication(App, {
|
|
65
|
+
providers: [
|
|
66
|
+
provideMosaicooForm({
|
|
67
|
+
components: { signature: SignatureFieldComponent }, // new or overridden types
|
|
68
|
+
remoteFetcher: (url) => api.get(url), // auth/caching stay yours
|
|
69
|
+
}),
|
|
70
|
+
],
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
A registered component receives `field`, `engine`, `path` and `tick` as signal
|
|
75
|
+
inputs and talks to the form exclusively through the engine
|
|
76
|
+
(`engine.getValue/setValue/markTouched`) — validation, conditional visibility
|
|
77
|
+
and events keep working with no extra wiring.
|
|
78
|
+
|
|
42
79
|
## Theming example
|
|
43
80
|
|
|
44
81
|
```css
|