@decaf-ts/ui-decorators 0.17.3 → 0.17.4

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 (81) hide show
  1. package/dist/ui-decorators.cjs +1 -1
  2. package/lib/cjs/graph/constants.cjs +1 -1
  3. package/lib/cjs/graph/constants.cjs.map +1 -1
  4. package/lib/cjs/graph/decorators.cjs +3 -3
  5. package/lib/cjs/graph/decorators.cjs.map +1 -1
  6. package/lib/cjs/graph/index.cjs +1 -1
  7. package/lib/cjs/graph/index.cjs.map +1 -1
  8. package/lib/cjs/graph/overrides/Rendering.cjs +1 -1
  9. package/lib/cjs/graph/overrides/Rendering.cjs.map +1 -1
  10. package/lib/cjs/graph/overrides/index.cjs +1 -1
  11. package/lib/cjs/graph/overrides/index.cjs.map +1 -1
  12. package/lib/cjs/graph/overrides/overrides.cjs +1 -1
  13. package/lib/cjs/graph/overrides/overrides.cjs.map +1 -1
  14. package/lib/cjs/graph/reader.cjs +89 -6
  15. package/lib/cjs/graph/reader.cjs.map +1 -1
  16. package/lib/cjs/graph/snapshot.cjs +1 -1
  17. package/lib/cjs/graph/snapshot.cjs.map +1 -1
  18. package/lib/cjs/graph/types.cjs +1 -1
  19. package/lib/cjs/graph/types.cjs.map +1 -1
  20. package/lib/cjs/index.cjs +3 -3
  21. package/lib/cjs/index.cjs.map +1 -1
  22. package/lib/cjs/model/Renderable.cjs +1 -1
  23. package/lib/cjs/model/Renderable.cjs.map +1 -1
  24. package/lib/cjs/model/decorators.cjs +1 -1
  25. package/lib/cjs/model/decorators.cjs.map +1 -1
  26. package/lib/cjs/model/index.cjs +1 -1
  27. package/lib/cjs/model/index.cjs.map +1 -1
  28. package/lib/cjs/model/model.cjs +1 -1
  29. package/lib/cjs/model/model.cjs.map +1 -1
  30. package/lib/cjs/model/overrides.cjs +1 -1
  31. package/lib/cjs/model/overrides.cjs.map +1 -1
  32. package/lib/cjs/overrides/ModelBuilderExtensions.cjs +1 -1
  33. package/lib/cjs/overrides/ModelBuilderExtensions.cjs.map +1 -1
  34. package/lib/cjs/overrides/index.cjs +1 -1
  35. package/lib/cjs/overrides/index.cjs.map +1 -1
  36. package/lib/cjs/ui/DecafComponent.cjs +1 -1
  37. package/lib/cjs/ui/DecafComponent.cjs.map +1 -1
  38. package/lib/cjs/ui/DecafEventHandler.cjs +1 -1
  39. package/lib/cjs/ui/DecafEventHandler.cjs.map +1 -1
  40. package/lib/cjs/ui/DecafTranslateService.cjs +1 -1
  41. package/lib/cjs/ui/DecafTranslateService.cjs.map +1 -1
  42. package/lib/cjs/ui/Rendering.cjs +1 -1
  43. package/lib/cjs/ui/Rendering.cjs.map +1 -1
  44. package/lib/cjs/ui/UIValidator.cjs +1 -1
  45. package/lib/cjs/ui/UIValidator.cjs.map +1 -1
  46. package/lib/cjs/ui/constants.cjs +1 -1
  47. package/lib/cjs/ui/constants.cjs.map +1 -1
  48. package/lib/cjs/ui/decorators.cjs +1 -1
  49. package/lib/cjs/ui/decorators.cjs.map +1 -1
  50. package/lib/cjs/ui/errors.cjs +1 -1
  51. package/lib/cjs/ui/errors.cjs.map +1 -1
  52. package/lib/cjs/ui/index.cjs +1 -1
  53. package/lib/cjs/ui/index.cjs.map +1 -1
  54. package/lib/cjs/ui/interfaces/IDecafModal.cjs +1 -1
  55. package/lib/cjs/ui/interfaces/IDecafModal.cjs.map +1 -1
  56. package/lib/cjs/ui/interfaces/IDecafRouter.cjs +1 -1
  57. package/lib/cjs/ui/interfaces/IDecafRouter.cjs.map +1 -1
  58. package/lib/cjs/ui/interfaces/IDecafSpinner.cjs +1 -1
  59. package/lib/cjs/ui/interfaces/IDecafSpinner.cjs.map +1 -1
  60. package/lib/cjs/ui/interfaces/IDecafToast.cjs +1 -1
  61. package/lib/cjs/ui/interfaces/IDecafToast.cjs.map +1 -1
  62. package/lib/cjs/ui/interfaces/index.cjs +1 -1
  63. package/lib/cjs/ui/interfaces/index.cjs.map +1 -1
  64. package/lib/cjs/ui/overrides.cjs +1 -1
  65. package/lib/cjs/ui/overrides.cjs.map +1 -1
  66. package/lib/cjs/ui/types.cjs +1 -1
  67. package/lib/cjs/ui/types.cjs.map +1 -1
  68. package/lib/cjs/ui/utils.cjs +1 -1
  69. package/lib/cjs/ui/utils.cjs.map +1 -1
  70. package/lib/cjs/ui/validator.cjs +1 -1
  71. package/lib/cjs/ui/validator.cjs.map +1 -1
  72. package/lib/esm/graph/decorators.js +2 -2
  73. package/lib/esm/graph/decorators.js.map +1 -1
  74. package/lib/esm/graph/reader.js +88 -5
  75. package/lib/esm/graph/reader.js.map +1 -1
  76. package/lib/esm/index.js +2 -2
  77. package/lib/types/graph/constants.d.cts +47 -0
  78. package/lib/types/graph/constants.d.mts +47 -0
  79. package/lib/types/index.d.cts +2 -2
  80. package/lib/types/index.d.mts +2 -2
  81. package/package.json +1 -1
@@ -31,6 +31,11 @@ export type GraphNodeMetadata = {
31
31
  width?: number;
32
32
  connectionRules?: GraphConnectionRule;
33
33
  metadata?: Record<string, unknown>;
34
+ /**
35
+ * Per-group rendering choice for Schema-typed `@input` / `@output` properties
36
+ * (the one-vs-all toggle). See {@link GraphPortGroupMetadata}.
37
+ */
38
+ portGroups?: GraphPortGroupMetadata[];
34
39
  };
35
40
  export type GraphWorkflowNodeMetadata = {
36
41
  id: string;
@@ -61,6 +66,41 @@ export type GraphPortMetadata = {
61
66
  handle?: string;
62
67
  expand?: boolean;
63
68
  metadata?: Record<string, unknown>;
69
+ /**
70
+ * Marks this port as a "Schema port" declared via `@input` / `@output`.
71
+ *
72
+ * When `true` AND the property type is a Decaf `Model` (a "Schema"), the
73
+ * reader flattens the Schema's own `@input` / `@output` properties into the
74
+ * parent node's port list (unprefixed — no `<schemaProp>.` prefix), instead
75
+ * of producing a composite port with prefixed children. A `@input` Schema
76
+ * contributes only the Schema's `@input` properties; a `@output` Schema
77
+ * contributes only the Schema's `@output` properties. The carrier property
78
+ * itself (e.g. `inputSchema`) is not emitted as a port — it is the group
79
+ * carrier.
80
+ *
81
+ * Set automatically by `@input` / `@output`; NOT set by `@port`, so
82
+ * `@port`-decorated Schema-typed properties keep the legacy composite
83
+ * expansion (prefixed children).
84
+ */
85
+ schema?: boolean;
86
+ };
87
+ /**
88
+ * Metadata for a Schema port group — the one-vs-all rendering choice for a
89
+ * `@input` / `@output` Schema-typed property.
90
+ *
91
+ * `toggle: "all"` (default) renders each Schema property as its own connectable
92
+ * port on the canvas. `toggle: "single"` renders one grouped port that receives
93
+ * the whole object and maps it to the right place. The per-instance
94
+ * manual-fill (hide a port because its value is supplied via the CRUD field)
95
+ * is NOT carried here — that is the editor's port-toggle state in `node.data`.
96
+ */
97
+ export type GraphPortGroupMetadata = {
98
+ /** The Schema-typed `@input` / `@output` property name that owns this group. */
99
+ property: string;
100
+ /** Render choice for this group. Defaults to `"all"`. */
101
+ toggle?: "single" | "all";
102
+ /** Optional label for the grouped port when `toggle === "single"`. */
103
+ label?: string;
64
104
  };
65
105
  export type GraphPortDefinition = {
66
106
  property: string;
@@ -98,6 +138,13 @@ export type GraphNodeDefinition = {
98
138
  ui?: Record<string, any>;
99
139
  graph?: GraphNodeMetadata;
100
140
  ports: GraphPortDefinition[];
141
+ /**
142
+ * Per-group rendering choice for Schema-typed `@input` / `@output` properties
143
+ * (the one-vs-all toggle). Derived from {@link GraphNodeMetadata.portGroups};
144
+ * every Schema-typed `@input` / `@output` property not listed defaults to
145
+ * `toggle: "all"`.
146
+ */
147
+ portGroups?: GraphPortGroupMetadata[];
101
148
  };
102
149
  export type GraphWorkflowDefinition = GraphNodeDefinition & {
103
150
  inputs: GraphPortDefinition[];
@@ -31,6 +31,11 @@ export type GraphNodeMetadata = {
31
31
  width?: number;
32
32
  connectionRules?: GraphConnectionRule;
33
33
  metadata?: Record<string, unknown>;
34
+ /**
35
+ * Per-group rendering choice for Schema-typed `@input` / `@output` properties
36
+ * (the one-vs-all toggle). See {@link GraphPortGroupMetadata}.
37
+ */
38
+ portGroups?: GraphPortGroupMetadata[];
34
39
  };
35
40
  export type GraphWorkflowNodeMetadata = {
36
41
  id: string;
@@ -61,6 +66,41 @@ export type GraphPortMetadata = {
61
66
  handle?: string;
62
67
  expand?: boolean;
63
68
  metadata?: Record<string, unknown>;
69
+ /**
70
+ * Marks this port as a "Schema port" declared via `@input` / `@output`.
71
+ *
72
+ * When `true` AND the property type is a Decaf `Model` (a "Schema"), the
73
+ * reader flattens the Schema's own `@input` / `@output` properties into the
74
+ * parent node's port list (unprefixed — no `<schemaProp>.` prefix), instead
75
+ * of producing a composite port with prefixed children. A `@input` Schema
76
+ * contributes only the Schema's `@input` properties; a `@output` Schema
77
+ * contributes only the Schema's `@output` properties. The carrier property
78
+ * itself (e.g. `inputSchema`) is not emitted as a port — it is the group
79
+ * carrier.
80
+ *
81
+ * Set automatically by `@input` / `@output`; NOT set by `@port`, so
82
+ * `@port`-decorated Schema-typed properties keep the legacy composite
83
+ * expansion (prefixed children).
84
+ */
85
+ schema?: boolean;
86
+ };
87
+ /**
88
+ * Metadata for a Schema port group — the one-vs-all rendering choice for a
89
+ * `@input` / `@output` Schema-typed property.
90
+ *
91
+ * `toggle: "all"` (default) renders each Schema property as its own connectable
92
+ * port on the canvas. `toggle: "single"` renders one grouped port that receives
93
+ * the whole object and maps it to the right place. The per-instance
94
+ * manual-fill (hide a port because its value is supplied via the CRUD field)
95
+ * is NOT carried here — that is the editor's port-toggle state in `node.data`.
96
+ */
97
+ export type GraphPortGroupMetadata = {
98
+ /** The Schema-typed `@input` / `@output` property name that owns this group. */
99
+ property: string;
100
+ /** Render choice for this group. Defaults to `"all"`. */
101
+ toggle?: "single" | "all";
102
+ /** Optional label for the grouped port when `toggle === "single"`. */
103
+ label?: string;
64
104
  };
65
105
  export type GraphPortDefinition = {
66
106
  property: string;
@@ -98,6 +138,13 @@ export type GraphNodeDefinition = {
98
138
  ui?: Record<string, any>;
99
139
  graph?: GraphNodeMetadata;
100
140
  ports: GraphPortDefinition[];
141
+ /**
142
+ * Per-group rendering choice for Schema-typed `@input` / `@output` properties
143
+ * (the one-vs-all toggle). Derived from {@link GraphNodeMetadata.portGroups};
144
+ * every Schema-typed `@input` / `@output` property not listed defaults to
145
+ * `toggle: "all"`.
146
+ */
147
+ portGroups?: GraphPortGroupMetadata[];
101
148
  };
102
149
  export type GraphWorkflowDefinition = GraphNodeDefinition & {
103
150
  inputs: GraphPortDefinition[];
@@ -22,12 +22,12 @@ export declare const VERSION = "0.17.3";
22
22
  * the placeholder with the actual commit hash at publish time.
23
23
  * @const COMMIT
24
24
  */
25
- export declare const COMMIT = "04f33f3";
25
+ export declare const COMMIT = "ff23f4a";
26
26
  /**
27
27
  * @description Represents the full version string of the module.
28
28
  * @summary Stores the semver version and commit hash for the package.
29
29
  * The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
30
30
  * @const FULL_VERSION
31
31
  */
32
- export declare const FULL_VERSION = "0.17.3-04f33f3";
32
+ export declare const FULL_VERSION = "0.17.3-ff23f4a";
33
33
  export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
@@ -22,12 +22,12 @@ export declare const VERSION = "0.17.3";
22
22
  * the placeholder with the actual commit hash at publish time.
23
23
  * @const COMMIT
24
24
  */
25
- export declare const COMMIT = "04f33f3";
25
+ export declare const COMMIT = "ff23f4a";
26
26
  /**
27
27
  * @description Represents the full version string of the module.
28
28
  * @summary Stores the semver version and commit hash for the package.
29
29
  * The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
30
30
  * @const FULL_VERSION
31
31
  */
32
- export declare const FULL_VERSION = "0.17.3-04f33f3";
32
+ export declare const FULL_VERSION = "0.17.3-ff23f4a";
33
33
  export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/ui-decorators",
3
- "version": "0.17.3",
3
+ "version": "0.17.4",
4
4
  "description": "Extension of decorator validation to ui elements to allow for web integration",
5
5
  "type": "module",
6
6
  "exports": {