ngx-dynamic-entity-builder 1.0.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.
Files changed (36) hide show
  1. package/README.md +54 -0
  2. package/esm2022/lib/builder-store.service.mjs +923 -0
  3. package/esm2022/lib/clone.mjs +14 -0
  4. package/esm2022/lib/components/connection-source-config.component.mjs +121 -0
  5. package/esm2022/lib/components/entity-builder-canvas.component.mjs +83 -0
  6. package/esm2022/lib/components/entity-builder-tree-node.component.mjs +173 -0
  7. package/esm2022/lib/components/entity-reference-config.component.mjs +405 -0
  8. package/esm2022/lib/components/field-inspector.component.mjs +139 -0
  9. package/esm2022/lib/components/field-palette.component.mjs +57 -0
  10. package/esm2022/lib/components/field-rules-list.component.mjs +224 -0
  11. package/esm2022/lib/components/referenced-field-config.component.mjs +228 -0
  12. package/esm2022/lib/components/rule-form.component.mjs +201 -0
  13. package/esm2022/lib/components/tab-manager.component.mjs +341 -0
  14. package/esm2022/lib/entity-builder.component.mjs +153 -0
  15. package/esm2022/lib/field-catalog.mjs +6 -0
  16. package/esm2022/ngx-dynamic-entity-builder.mjs +5 -0
  17. package/esm2022/public-api.mjs +17 -0
  18. package/fesm2022/ngx-dynamic-entity-builder.mjs +2910 -0
  19. package/fesm2022/ngx-dynamic-entity-builder.mjs.map +1 -0
  20. package/index.d.ts +5 -0
  21. package/lib/builder-store.service.d.ts +165 -0
  22. package/lib/clone.d.ts +9 -0
  23. package/lib/components/connection-source-config.component.d.ts +16 -0
  24. package/lib/components/entity-builder-canvas.component.d.ts +9 -0
  25. package/lib/components/entity-builder-tree-node.component.d.ts +17 -0
  26. package/lib/components/entity-reference-config.component.d.ts +29 -0
  27. package/lib/components/field-inspector.component.d.ts +33 -0
  28. package/lib/components/field-palette.component.d.ts +13 -0
  29. package/lib/components/field-rules-list.component.d.ts +19 -0
  30. package/lib/components/referenced-field-config.component.d.ts +18 -0
  31. package/lib/components/rule-form.component.d.ts +16 -0
  32. package/lib/components/tab-manager.component.d.ts +19 -0
  33. package/lib/entity-builder.component.d.ts +42 -0
  34. package/lib/field-catalog.d.ts +5 -0
  35. package/package.json +42 -0
  36. package/public-api.d.ts +13 -0
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # ngx-dynamic-entity-builder
2
+
3
+ Visual drag-and-drop Angular form builder for `@dynamic-entity/core` and `ngx-dynamic-entity`.
4
+
5
+ ## Features
6
+ - **Visual palette & canvas** — drag-and-drop authoring for all 19 field type keys, from the
7
+ shared catalog in `@dynamic-entity/core` (so the builder can never drift from the renderer).
8
+ - **Inspector** — properties, validation, options, display flags, `showWhen` conditions,
9
+ `criticalField`, `showOnMinimize`, and `patchOnTrue`.
10
+ - **Entity reference config** — registry key, display fields, static filters, parent→child
11
+ cascade (`parentField` + `lookupFilter`/`lookupPath`), and `autoPatch` mappings.
12
+ - **Rules** — author a rule with `RuleFormComponent`, manage the set per field with
13
+ `FieldRulesListComponent` (reorder, enable/disable, edit, delete).
14
+ - **Tab & module manager** — primary and nested tab structures.
15
+ - **Live preview** — projected content slot; the builder does not depend on the renderer.
16
+
17
+ ## Installation
18
+ ```bash
19
+ npm install ngx-dynamic-entity-builder @dynamic-entity/core
20
+ ```
21
+
22
+ `ngx-dynamic-entity` is not required — pass a rendered preview in as projected content if you
23
+ want one.
24
+
25
+ ## Usage
26
+ ```html
27
+ <ngx-entity-builder
28
+ [config]="initialConfig"
29
+ [rules]="initialRules"
30
+ (configChange)="onConfigUpdated($event)"
31
+ />
32
+ ```
33
+
34
+ ## Rules are stored beside the config
35
+
36
+ `BuilderStore` keeps rules separate from `EntityFormConfig` — they are persisted per form, not
37
+ inside the config object. Load and export them explicitly:
38
+
39
+ ```ts
40
+ store.load(config);
41
+ store.loadRules(rules);
42
+ // …authoring…
43
+ const config = store.exportConfig();
44
+ const rules = store.exportRules();
45
+ ```
46
+
47
+ Reordering rules renumbers `priority` contiguously from 1.
48
+
49
+ ## Sub-components
50
+
51
+ Each panel is individually importable: `FieldPaletteComponent`, `FieldInspectorComponent`,
52
+ `TabManagerComponent`, `RuleFormComponent`, `FieldRulesListComponent`,
53
+ `EntityReferenceConfigComponent`. All read and write through the `BuilderStore` provided by
54
+ `EntityBuilderComponent`.