@decaf-ts/ui-decorators 0.17.1 → 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 (127) hide show
  1. package/dist/ui-decorators.cjs +1 -1
  2. package/dist/ui-decorators.cjs.map +1 -1
  3. package/dist/ui-decorators.js.map +1 -1
  4. package/lib/cjs/graph/constants.cjs +1 -1
  5. package/lib/cjs/graph/constants.cjs.map +1 -1
  6. package/lib/cjs/graph/decorators.cjs +3 -3
  7. package/lib/cjs/graph/decorators.cjs.map +1 -1
  8. package/lib/cjs/graph/index.cjs +1 -1
  9. package/lib/cjs/graph/index.cjs.map +1 -1
  10. package/lib/cjs/graph/overrides/Rendering.cjs +1 -1
  11. package/lib/cjs/graph/overrides/Rendering.cjs.map +1 -1
  12. package/lib/cjs/graph/overrides/index.cjs +1 -1
  13. package/lib/cjs/graph/overrides/index.cjs.map +1 -1
  14. package/lib/cjs/graph/overrides/overrides.cjs +1 -1
  15. package/lib/cjs/graph/overrides/overrides.cjs.map +1 -1
  16. package/lib/cjs/graph/reader.cjs +89 -6
  17. package/lib/cjs/graph/reader.cjs.map +1 -1
  18. package/lib/cjs/graph/snapshot.cjs +1 -1
  19. package/lib/cjs/graph/snapshot.cjs.map +1 -1
  20. package/lib/cjs/graph/types.cjs +1 -1
  21. package/lib/cjs/graph/types.cjs.map +1 -1
  22. package/lib/cjs/index.cjs +4 -4
  23. package/lib/cjs/index.cjs.map +1 -1
  24. package/lib/cjs/model/Renderable.cjs +1 -1
  25. package/lib/cjs/model/Renderable.cjs.map +1 -1
  26. package/lib/cjs/model/decorators.cjs +1 -1
  27. package/lib/cjs/model/decorators.cjs.map +1 -1
  28. package/lib/cjs/model/index.cjs +1 -1
  29. package/lib/cjs/model/index.cjs.map +1 -1
  30. package/lib/cjs/model/model.cjs +1 -1
  31. package/lib/cjs/model/model.cjs.map +1 -1
  32. package/lib/cjs/model/overrides.cjs +1 -1
  33. package/lib/cjs/model/overrides.cjs.map +1 -1
  34. package/lib/cjs/overrides/ModelBuilderExtensions.cjs +1 -1
  35. package/lib/cjs/overrides/ModelBuilderExtensions.cjs.map +1 -1
  36. package/lib/cjs/overrides/index.cjs +1 -1
  37. package/lib/cjs/overrides/index.cjs.map +1 -1
  38. package/lib/cjs/ui/DecafComponent.cjs +1 -1
  39. package/lib/cjs/ui/DecafComponent.cjs.map +1 -1
  40. package/lib/cjs/ui/DecafEventHandler.cjs +1 -1
  41. package/lib/cjs/ui/DecafEventHandler.cjs.map +1 -1
  42. package/lib/cjs/ui/DecafTranslateService.cjs +1 -1
  43. package/lib/cjs/ui/DecafTranslateService.cjs.map +1 -1
  44. package/lib/cjs/ui/Rendering.cjs +1 -1
  45. package/lib/cjs/ui/Rendering.cjs.map +1 -1
  46. package/lib/cjs/ui/UIValidator.cjs +1 -1
  47. package/lib/cjs/ui/UIValidator.cjs.map +1 -1
  48. package/lib/cjs/ui/constants.cjs +1 -1
  49. package/lib/cjs/ui/constants.cjs.map +1 -1
  50. package/lib/cjs/ui/decorators.cjs +3 -22
  51. package/lib/cjs/ui/decorators.cjs.map +1 -1
  52. package/lib/cjs/ui/errors.cjs +1 -1
  53. package/lib/cjs/ui/errors.cjs.map +1 -1
  54. package/lib/cjs/ui/index.cjs +2 -2
  55. package/lib/cjs/ui/index.cjs.map +1 -1
  56. package/lib/cjs/ui/interfaces/IDecafModal.cjs +4 -0
  57. package/lib/cjs/ui/interfaces/IDecafModal.cjs.map +1 -0
  58. package/lib/cjs/ui/interfaces/IDecafRouter.cjs +4 -0
  59. package/lib/cjs/ui/interfaces/IDecafRouter.cjs.map +1 -0
  60. package/lib/cjs/ui/interfaces/IDecafSpinner.cjs +4 -0
  61. package/lib/cjs/ui/interfaces/IDecafSpinner.cjs.map +1 -0
  62. package/lib/cjs/ui/interfaces/IDecafToast.cjs +4 -0
  63. package/lib/cjs/ui/interfaces/IDecafToast.cjs.map +1 -0
  64. package/lib/cjs/ui/interfaces/index.cjs +22 -0
  65. package/lib/cjs/ui/interfaces/index.cjs.map +1 -0
  66. package/lib/cjs/ui/overrides.cjs +1 -1
  67. package/lib/cjs/ui/overrides.cjs.map +1 -1
  68. package/lib/cjs/ui/types.cjs +1 -1
  69. package/lib/cjs/ui/types.cjs.map +1 -1
  70. package/lib/cjs/ui/utils.cjs +1 -1
  71. package/lib/cjs/ui/utils.cjs.map +1 -1
  72. package/lib/cjs/ui/validator.cjs +1 -1
  73. package/lib/cjs/ui/validator.cjs.map +1 -1
  74. package/lib/esm/graph/decorators.js +2 -2
  75. package/lib/esm/graph/decorators.js.map +1 -1
  76. package/lib/esm/graph/reader.js +88 -5
  77. package/lib/esm/graph/reader.js.map +1 -1
  78. package/lib/esm/index.js +3 -3
  79. package/lib/esm/index.js.map +1 -1
  80. package/lib/esm/model/decorators.js.map +1 -1
  81. package/lib/esm/ui/DecafComponent.js.map +1 -1
  82. package/lib/esm/ui/Rendering.js.map +1 -1
  83. package/lib/esm/ui/decorators.js +2 -21
  84. package/lib/esm/ui/decorators.js.map +1 -1
  85. package/lib/esm/ui/index.js +1 -1
  86. package/lib/esm/ui/index.js.map +1 -1
  87. package/lib/esm/ui/interfaces/IDecafModal.js +10 -0
  88. package/lib/esm/ui/interfaces/IDecafModal.js.map +1 -0
  89. package/lib/esm/ui/interfaces/IDecafRouter.js +2 -0
  90. package/lib/esm/ui/interfaces/IDecafRouter.js.map +1 -0
  91. package/lib/esm/ui/interfaces/IDecafSpinner.js +2 -0
  92. package/lib/esm/ui/interfaces/IDecafSpinner.js.map +1 -0
  93. package/lib/esm/ui/interfaces/IDecafToast.js +2 -0
  94. package/lib/esm/ui/interfaces/IDecafToast.js.map +1 -0
  95. package/lib/esm/ui/interfaces/index.js +5 -0
  96. package/lib/esm/ui/interfaces/index.js.map +1 -0
  97. package/lib/types/graph/constants.d.cts +47 -0
  98. package/lib/types/graph/constants.d.mts +47 -0
  99. package/lib/types/index.d.cts +3 -3
  100. package/lib/types/index.d.mts +3 -3
  101. package/lib/types/model/decorators.d.cts +1 -1
  102. package/lib/types/model/decorators.d.mts +1 -1
  103. package/lib/types/ui/Rendering.d.cts +10 -1
  104. package/lib/types/ui/Rendering.d.mts +10 -1
  105. package/lib/types/ui/decorators.d.cts +7 -6
  106. package/lib/types/ui/decorators.d.mts +7 -6
  107. package/lib/types/ui/index.d.cts +1 -1
  108. package/lib/types/ui/index.d.mts +1 -1
  109. package/lib/types/ui/interfaces/IDecafModal.d.cts +186 -0
  110. package/lib/types/ui/interfaces/IDecafModal.d.mts +186 -0
  111. package/lib/types/ui/interfaces/IDecafRouter.d.cts +108 -0
  112. package/lib/types/ui/interfaces/IDecafRouter.d.mts +108 -0
  113. package/lib/types/ui/interfaces/IDecafSpinner.d.cts +69 -0
  114. package/lib/types/ui/interfaces/IDecafSpinner.d.mts +69 -0
  115. package/lib/types/ui/interfaces/IDecafToast.d.cts +63 -0
  116. package/lib/types/ui/interfaces/IDecafToast.d.mts +63 -0
  117. package/lib/types/ui/interfaces/index.d.cts +4 -0
  118. package/lib/types/ui/interfaces/index.d.mts +4 -0
  119. package/lib/types/ui/types.d.cts +94 -0
  120. package/lib/types/ui/types.d.mts +94 -0
  121. package/package.json +1 -1
  122. package/lib/cjs/ui/interfaces.cjs +0 -4
  123. package/lib/cjs/ui/interfaces.cjs.map +0 -1
  124. package/lib/esm/ui/interfaces.js +0 -10
  125. package/lib/esm/ui/interfaces.js.map +0 -1
  126. package/lib/types/ui/interfaces.d.cts +0 -64
  127. package/lib/types/ui/interfaces.d.mts +0 -64
@@ -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[];
@@ -15,19 +15,19 @@ export * from "./ui/index.d.cts";
15
15
  * @const VERSION
16
16
  * @memberOf module:ui-decorators
17
17
  */
18
- export declare const VERSION = "0.17.0";
18
+ export declare const VERSION = "0.17.3";
19
19
  /**
20
20
  * @description Represents the current commit hash of the module build.
21
21
  * @summary Stores the current git commit hash for the package. The build replaces
22
22
  * the placeholder with the actual commit hash at publish time.
23
23
  * @const COMMIT
24
24
  */
25
- export declare const COMMIT = "1c6464a";
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.0-1c6464a";
32
+ export declare const FULL_VERSION = "0.17.3-ff23f4a";
33
33
  export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
@@ -15,19 +15,19 @@ export * from "./ui/index.d.mts";
15
15
  * @const VERSION
16
16
  * @memberOf module:ui-decorators
17
17
  */
18
- export declare const VERSION = "0.17.0";
18
+ export declare const VERSION = "0.17.3";
19
19
  /**
20
20
  * @description Represents the current commit hash of the module build.
21
21
  * @summary Stores the current git commit hash for the package. The build replaces
22
22
  * the placeholder with the actual commit hash at publish time.
23
23
  * @const COMMIT
24
24
  */
25
- export declare const COMMIT = "1c6464a";
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.0-1c6464a";
32
+ export declare const FULL_VERSION = "0.17.3-ff23f4a";
33
33
  export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
@@ -1,4 +1,4 @@
1
- import { IPagedComponentProperties } from "../ui/interfaces.d.cts";
1
+ import { IPagedComponentProperties } from "../ui/types.d.cts";
2
2
  /**
3
3
  * @description Decorator that tags a class as a UI model
4
4
  * @summary Adds rendering capabilities to a model class by providing a render method
@@ -1,4 +1,4 @@
1
- import { IPagedComponentProperties } from "../ui/interfaces.d.mts";
1
+ import { IPagedComponentProperties } from "../ui/types.d.mts";
2
2
  /**
3
3
  * @description Decorator that tags a class as a UI model
4
4
  * @summary Adds rendering capabilities to a model class by providing a render method
@@ -1,5 +1,10 @@
1
- import { FieldDefinition } from "./types.d.cts";
1
+ import { DecafSpinnerOptions, DecafToastOptions, FieldDefinition } from "./types.d.cts";
2
2
  import { Model, ValidationMetadata } from "@decaf-ts/decorator-validation";
3
+ import { IDecafModal } from "./interfaces/IDecafModal.d.cts";
4
+ import { DecafComponent } from "./DecafComponent.d.cts";
5
+ import { IDecafSpinner } from "./interfaces/IDecafSpinner.d.cts";
6
+ import { IDecafRouter } from "./interfaces/IDecafRouter.d.cts";
7
+ import { IDecafToast } from "./interfaces/IDecafToast.d.cts";
3
8
  /**
4
9
  * @description Abstract class for rendering UI components based on model metadata.
5
10
  * @summary The RenderingEngine class provides a framework for converting model metadata into UI field definitions.
@@ -38,6 +43,10 @@ export declare abstract class RenderingEngine<T = void, R = FieldDefinition<T>>
38
43
  */
39
44
  protected initialized: boolean;
40
45
  protected constructor(flavour: string);
46
+ abstract getModal<C extends DecafComponent<Model>>(component: Partial<C>, ...args: any[]): Promise<IDecafModal>;
47
+ abstract getToast(options: DecafToastOptions): Promise<IDecafToast>;
48
+ abstract getSpinner(options: DecafSpinnerOptions): Promise<IDecafSpinner>;
49
+ abstract router(): IDecafRouter;
41
50
  /**
42
51
  * @description Initializes the rendering engine.
43
52
  * @summary Abstract method to be implemented by subclasses for specific initialization logic.
@@ -1,5 +1,10 @@
1
- import { FieldDefinition } from "./types.d.mts";
1
+ import { DecafSpinnerOptions, DecafToastOptions, FieldDefinition } from "./types.d.mts";
2
2
  import { Model, ValidationMetadata } from "@decaf-ts/decorator-validation";
3
+ import { IDecafModal } from "./interfaces/IDecafModal.d.mts";
4
+ import { DecafComponent } from "./DecafComponent.d.mts";
5
+ import { IDecafSpinner } from "./interfaces/IDecafSpinner.d.mts";
6
+ import { IDecafRouter } from "./interfaces/IDecafRouter.d.mts";
7
+ import { IDecafToast } from "./interfaces/IDecafToast.d.mts";
3
8
  /**
4
9
  * @description Abstract class for rendering UI components based on model metadata.
5
10
  * @summary The RenderingEngine class provides a framework for converting model metadata into UI field definitions.
@@ -38,6 +43,10 @@ export declare abstract class RenderingEngine<T = void, R = FieldDefinition<T>>
38
43
  */
39
44
  protected initialized: boolean;
40
45
  protected constructor(flavour: string);
46
+ abstract getModal<C extends DecafComponent<Model>>(component: Partial<C>, ...args: any[]): Promise<IDecafModal>;
47
+ abstract getToast(options: DecafToastOptions): Promise<IDecafToast>;
48
+ abstract getSpinner(options: DecafSpinnerOptions): Promise<IDecafSpinner>;
49
+ abstract router(): IDecafRouter;
41
50
  /**
42
51
  * @description Initializes the rendering engine.
43
52
  * @summary Abstract method to be implemented by subclasses for specific initialization logic.
@@ -1,5 +1,5 @@
1
1
  import { UIKeys } from "./constants.d.cts";
2
- import { CrudOperationKeys, UIEventName, UIFunctionLike, UILayoutCol } from "./types.d.cts";
2
+ import { CrudOperationKeys, UIEventHandler, UIEventName, UIFunctionLike, UILayoutCol } from "./types.d.cts";
3
3
  /**
4
4
  * @description Decorator that hides a property during specific CRUD operations
5
5
  * @summary Controls property visibility based on operation type
@@ -425,23 +425,24 @@ export declare function uipageprop(page?: number): (original: any, propertyKey?:
425
425
  * }
426
426
  * ```
427
427
  */
428
- export declare function uion(event: UIEventName | Record<string, UIFunctionLike>, handler: UIFunctionLike): (original: object, propertyKey?: string) => void;
428
+ export declare function uion(event: UIEventName, handler: UIEventHandler): (original: object, propertyKey?: string) => void;
429
+ export declare function uion(events: Record<string, UIEventHandler>): (original: object, propertyKey?: string) => void;
429
430
  /**
430
431
  * A decorator function that associates a UI click handler with the 'handleClick' event.
431
432
  *
432
- * @param handler - A function that conforms to the `UIFunctionLike` type, which will be executed
433
+ * @param handler - A function that conforms to the `UIEventHandler` type, which will be executed
433
434
  * when the 'handleClick' event is triggered.
434
435
  * @returns A decorated function that binds the handler to the 'handleClick' event.
435
436
  */
436
- export declare function uionclick(handler: UIFunctionLike): (original: object, propertyKey?: string) => void;
437
+ export declare function uionclick(handler: UIEventHandler): (original: object, propertyKey?: string) => void;
437
438
  /**
438
439
  * A decorator function that associates a UI rendering handler with the 'render' event.
439
440
  *
440
- * @param handler - A function that conforms to the `UIFunctionLike` type, which will be executed
441
+ * @param handler - A function that conforms to the `UIEventHandler ` type, which will be executed
441
442
  * when the 'render' event is triggered.
442
443
  * @returns A decorated function that binds the handler to the 'render' event.
443
444
  */
444
- export declare function uionrender(handler: UIFunctionLike): (original: object, propertyKey?: string) => void;
445
+ export declare function uionrender(handler: UIEventHandler): (original: object, propertyKey?: string) => void;
445
446
  /**
446
447
  * @description Decorator that marks a property as a column in a UI table
447
448
  * @summary Controls column ordering and optional value parsing for table props
@@ -1,5 +1,5 @@
1
1
  import { UIKeys } from "./constants.d.mts";
2
- import { CrudOperationKeys, UIEventName, UIFunctionLike, UILayoutCol } from "./types.d.mts";
2
+ import { CrudOperationKeys, UIEventHandler, UIEventName, UIFunctionLike, UILayoutCol } from "./types.d.mts";
3
3
  /**
4
4
  * @description Decorator that hides a property during specific CRUD operations
5
5
  * @summary Controls property visibility based on operation type
@@ -425,23 +425,24 @@ export declare function uipageprop(page?: number): (original: any, propertyKey?:
425
425
  * }
426
426
  * ```
427
427
  */
428
- export declare function uion(event: UIEventName | Record<string, UIFunctionLike>, handler: UIFunctionLike): (original: object, propertyKey?: string) => void;
428
+ export declare function uion(event: UIEventName, handler: UIEventHandler): (original: object, propertyKey?: string) => void;
429
+ export declare function uion(events: Record<string, UIEventHandler>): (original: object, propertyKey?: string) => void;
429
430
  /**
430
431
  * A decorator function that associates a UI click handler with the 'handleClick' event.
431
432
  *
432
- * @param handler - A function that conforms to the `UIFunctionLike` type, which will be executed
433
+ * @param handler - A function that conforms to the `UIEventHandler` type, which will be executed
433
434
  * when the 'handleClick' event is triggered.
434
435
  * @returns A decorated function that binds the handler to the 'handleClick' event.
435
436
  */
436
- export declare function uionclick(handler: UIFunctionLike): (original: object, propertyKey?: string) => void;
437
+ export declare function uionclick(handler: UIEventHandler): (original: object, propertyKey?: string) => void;
437
438
  /**
438
439
  * A decorator function that associates a UI rendering handler with the 'render' event.
439
440
  *
440
- * @param handler - A function that conforms to the `UIFunctionLike` type, which will be executed
441
+ * @param handler - A function that conforms to the `UIEventHandler ` type, which will be executed
441
442
  * when the 'render' event is triggered.
442
443
  * @returns A decorated function that binds the handler to the 'render' event.
443
444
  */
444
- export declare function uionrender(handler: UIFunctionLike): (original: object, propertyKey?: string) => void;
445
+ export declare function uionrender(handler: UIEventHandler): (original: object, propertyKey?: string) => void;
445
446
  /**
446
447
  * @description Decorator that marks a property as a column in a UI table
447
448
  * @summary Controls column ordering and optional value parsing for table props
@@ -1,7 +1,6 @@
1
1
  export * from "./constants.d.cts";
2
2
  export * from "./decorators.d.cts";
3
3
  export * from "./errors.d.cts";
4
- export * from "./interfaces.d.cts";
5
4
  export * from "./Rendering.d.cts";
6
5
  export * from "./types.d.cts";
7
6
  export * from "./utils.d.cts";
@@ -9,3 +8,4 @@ export * from "./UIValidator.d.cts";
9
8
  export * from "./DecafComponent.d.cts";
10
9
  export * from "./DecafEventHandler.d.cts";
11
10
  export * from "./DecafTranslateService.d.cts";
11
+ export * from "./interfaces/index.d.cts";
@@ -1,7 +1,6 @@
1
1
  export * from "./constants.d.mts";
2
2
  export * from "./decorators.d.mts";
3
3
  export * from "./errors.d.mts";
4
- export * from "./interfaces.d.mts";
5
4
  export * from "./Rendering.d.mts";
6
5
  export * from "./types.d.mts";
7
6
  export * from "./utils.d.mts";
@@ -9,3 +8,4 @@ export * from "./UIValidator.d.mts";
9
8
  export * from "./DecafComponent.d.mts";
10
9
  export * from "./DecafEventHandler.d.mts";
11
10
  export * from "./DecafTranslateService.d.mts";
11
+ export * from "./interfaces/index.d.mts";
@@ -0,0 +1,186 @@
1
+ /**
2
+ * @description Interface for modal presentation and lifecycle control in Decaf UI.
3
+ * @summary Describes the public contract for modal configuration, presentation,
4
+ * dismissal, and event handling used by the modal component layer.
5
+ *
6
+ * @module ui/interfaces/IDecafModal
7
+ * @memberOf module:ui-decorators
8
+ */
9
+ import { Model } from "@decaf-ts/decorator-validation";
10
+ import { DecafComponent } from "../DecafComponent.d.cts";
11
+ export interface IDecafModal extends DecafComponent<Model> {
12
+ /**
13
+ * @description Reference to the modal instance controller.
14
+ * @summary Exposes the dismiss capability used to close the modal programmatically.
15
+ */
16
+ modal?: any;
17
+ /**
18
+ * @description Title displayed in the modal header.
19
+ * @summary Optional header text rendered above the modal content.
20
+ */
21
+ title?: string;
22
+ /**
23
+ * @description Controls whether the modal is open.
24
+ * @summary Signals the current presentation state of the modal.
25
+ */
26
+ isOpen: boolean;
27
+ /**
28
+ * @description Optional tag used to identify the modal instance.
29
+ * @summary Provides a stable identifier that can be used by rendering and lookup logic.
30
+ */
31
+ tag?: string;
32
+ /**
33
+ * @description Additional modal configuration options.
34
+ * @summary Stores custom configuration passed into modal creation and presentation.
35
+ */
36
+ options?: Record<string, unknown>;
37
+ /**
38
+ * @description Global configuration values available to the modal.
39
+ * @summary Holds shared runtime data that can be consumed by modal content and handlers.
40
+ */
41
+ globals?: Record<string, unknown>;
42
+ /**
43
+ * @description Inline content rendered inside the modal body.
44
+ * @summary Accepts HTML text or DOM content to be sanitized and displayed.
45
+ */
46
+ inlineContent?: string | any;
47
+ /**
48
+ * @description Position of the inline content within the modal.
49
+ * @summary Determines whether inline content appears before or after the main body.
50
+ */
51
+ inlineContentPosition: "top" | "bottom";
52
+ /**
53
+ * @description Enables fullscreen presentation for the modal.
54
+ * @summary Controls whether the modal occupies the entire viewport.
55
+ */
56
+ fullscreen: boolean;
57
+ /**
58
+ * @description Enables expandable presentation for the modal.
59
+ * @summary Signals whether the modal can be expanded by the user.
60
+ */
61
+ expandable: boolean;
62
+ /**
63
+ * @description Controls border rendering for the modal content.
64
+ * @summary Enables or disables visual borders according to the component styling rules.
65
+ */
66
+ borders: boolean;
67
+ /**
68
+ * @description Enables lightbox presentation for the modal.
69
+ * @summary Controls whether the modal is displayed with a lightbox-style overlay.
70
+ */
71
+ lightBox: boolean;
72
+ /**
73
+ * @description Controls the transparency of the modal header.
74
+ * @summary Indicates whether the modal header should be rendered with a transparent background.
75
+ */
76
+ headerTransparent: boolean;
77
+ /**
78
+ * @description Sets the background color of the modal header.
79
+ * @summary Stores the header color token used to style the modal header region.
80
+ */
81
+ headerBackground: string;
82
+ /**
83
+ * @description Controls the visibility of the modal header.
84
+ * @summary Indicates whether the header section should be rendered.
85
+ */
86
+ showHeader: boolean;
87
+ /**
88
+ * @description Controls the visibility of the modal close button.
89
+ * @summary Indicates whether the close action should be shown in the header.
90
+ */
91
+ showCloseButton: boolean;
92
+ /**
93
+ * @description Emits modal dismiss details.
94
+ * @summary Notifies consumers when the modal is about to be dismissed.
95
+ */
96
+ willDismissEvent: {
97
+ emit(value: unknown): void;
98
+ };
99
+ /**
100
+ * @description Indicates whether the modal content is expanded.
101
+ * @summary Tracks the current expanded or collapsed state of the modal body.
102
+ */
103
+ expanded: boolean;
104
+ /**
105
+ * @description Defines the icon color used by the modal.
106
+ * @summary Stores the color token used for modal icons and actions.
107
+ */
108
+ iconColor: string;
109
+ /**
110
+ * @description Initializes the modal component state.
111
+ * @summary Prepares the modal before presentation and applies inline content sanitization.
112
+ *
113
+ * @return {Promise<void>} Resolves when initialization completes.
114
+ */
115
+ ngOnInit(): Promise<void>;
116
+ /**
117
+ * @description Prepares the modal with the provided options.
118
+ * @summary Merges defaults, applies global runtime settings, and registers custom handlers.
119
+ *
120
+ * @param {Record<string, unknown>} [options={}] Additional modal initialization options.
121
+ * @return {Promise<void>} Resolves when preparation completes.
122
+ */
123
+ prepare(options?: Record<string, unknown>): Promise<void>;
124
+ /**
125
+ * @description Sanitizes and normalizes inline content.
126
+ * @summary Converts DOM content to HTML text when needed and prepares it for safe rendering.
127
+ *
128
+ * @return {void} Does not return a value.
129
+ */
130
+ parseInlineContent(): void;
131
+ /**
132
+ * @description Creates and presents the modal.
133
+ * @summary Prepares the modal, presents it, and returns the active modal instance contract.
134
+ *
135
+ * @param {Record<string, unknown>} [props={}] Modal properties used during creation.
136
+ * @return {Promise<any>} Resolves with the modal instance contract.
137
+ */
138
+ create(props?: Record<string, unknown>): Promise<any>;
139
+ /**
140
+ * @description Presents the modal.
141
+ * @summary Sets the modal as visible and triggers any presentation-time updates.
142
+ *
143
+ * @return {Promise<void>} Resolves when the modal is visible.
144
+ */
145
+ present(): Promise<void>;
146
+ /**
147
+ * @description Handles a custom event triggered by the modal.
148
+ * @summary Stops event propagation when needed and routes the event to confirm or cancel actions.
149
+ *
150
+ * @param {any} event Event payload emitted by the modal.
151
+ * @return {Promise<void>} Resolves when event handling completes.
152
+ */
153
+ handleEvent(event: any): Promise<void>;
154
+ /**
155
+ * @description Handles the modal dismiss event.
156
+ * @summary Emits the dismiss payload and returns the overlay detail object to callers.
157
+ *
158
+ * @param {any} event Dismiss event emitted by the modal.
159
+ * @return {Promise<{ data?: unknown }>} Resolves with the dismiss event details.
160
+ */
161
+ handleWillDismiss(event: any): Promise<{
162
+ data?: unknown;
163
+ }>;
164
+ /**
165
+ * @description Toggles the expanded state of the modal.
166
+ * @summary Switches between expanded and collapsed presentation modes.
167
+ *
168
+ * @return {void} Does not return a value.
169
+ */
170
+ handleExpandToggle(): void;
171
+ /**
172
+ * @description Cancels the modal.
173
+ * @summary Dismisses the modal using the cancel role.
174
+ *
175
+ * @return {Promise<void>} Resolves when the modal has been dismissed.
176
+ */
177
+ cancel(): Promise<void>;
178
+ /**
179
+ * @description Confirms the modal.
180
+ * @summary Dismisses the modal using the confirm role and optional event data.
181
+ *
182
+ * @param {any} [event] Optional event payload forwarded to the dismiss action.
183
+ * @return {Promise<void>} Resolves when the modal has been dismissed.
184
+ */
185
+ confirm(event?: any): Promise<void>;
186
+ }