@memberjunction/codegen-lib 2.47.0 → 2.49.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 (88) hide show
  1. package/dist/Angular/angular-codegen.d.ts +164 -6
  2. package/dist/Angular/angular-codegen.d.ts.map +1 -1
  3. package/dist/Angular/angular-codegen.js +179 -25
  4. package/dist/Angular/angular-codegen.js.map +1 -1
  5. package/dist/Angular/join-grid-related-entity-component.d.ts +52 -3
  6. package/dist/Angular/join-grid-related-entity-component.d.ts.map +1 -1
  7. package/dist/Angular/join-grid-related-entity-component.js +58 -3
  8. package/dist/Angular/join-grid-related-entity-component.js.map +1 -1
  9. package/dist/Angular/related-entity-components.d.ts +99 -42
  10. package/dist/Angular/related-entity-components.d.ts.map +1 -1
  11. package/dist/Angular/related-entity-components.js +116 -26
  12. package/dist/Angular/related-entity-components.js.map +1 -1
  13. package/dist/Angular/timeline-related-entity-component.d.ts +46 -7
  14. package/dist/Angular/timeline-related-entity-component.d.ts.map +1 -1
  15. package/dist/Angular/timeline-related-entity-component.js +64 -7
  16. package/dist/Angular/timeline-related-entity-component.js.map +1 -1
  17. package/dist/Angular/user-view-grid-related-entity-component.d.ts +33 -1
  18. package/dist/Angular/user-view-grid-related-entity-component.d.ts.map +1 -1
  19. package/dist/Angular/user-view-grid-related-entity-component.js +33 -1
  20. package/dist/Angular/user-view-grid-related-entity-component.js.map +1 -1
  21. package/dist/Config/config.d.ts +369 -45
  22. package/dist/Config/config.d.ts.map +1 -1
  23. package/dist/Config/config.js +136 -2
  24. package/dist/Config/config.js.map +1 -1
  25. package/dist/Config/db-connection.d.ts +17 -3
  26. package/dist/Config/db-connection.d.ts.map +1 -1
  27. package/dist/Config/db-connection.js +31 -19
  28. package/dist/Config/db-connection.js.map +1 -1
  29. package/dist/Database/dbSchema.d.ts +44 -1
  30. package/dist/Database/dbSchema.d.ts.map +1 -1
  31. package/dist/Database/dbSchema.js +46 -13
  32. package/dist/Database/dbSchema.js.map +1 -1
  33. package/dist/Database/manage-metadata.d.ts +52 -46
  34. package/dist/Database/manage-metadata.d.ts.map +1 -1
  35. package/dist/Database/manage-metadata.js +235 -191
  36. package/dist/Database/manage-metadata.js.map +1 -1
  37. package/dist/Database/reorder-columns.d.ts +2 -2
  38. package/dist/Database/reorder-columns.d.ts.map +1 -1
  39. package/dist/Database/reorder-columns.js +23 -17
  40. package/dist/Database/reorder-columns.js.map +1 -1
  41. package/dist/Database/sql.d.ts +4 -4
  42. package/dist/Database/sql.d.ts.map +1 -1
  43. package/dist/Database/sql.js +5 -16
  44. package/dist/Database/sql.js.map +1 -1
  45. package/dist/Database/sql_codegen.d.ts +15 -15
  46. package/dist/Database/sql_codegen.d.ts.map +1 -1
  47. package/dist/Database/sql_codegen.js +186 -123
  48. package/dist/Database/sql_codegen.js.map +1 -1
  49. package/dist/Misc/action_subclasses_codegen.d.ts.map +1 -1
  50. package/dist/Misc/action_subclasses_codegen.js +2 -12
  51. package/dist/Misc/action_subclasses_codegen.js.map +1 -1
  52. package/dist/Misc/advanced_generation.d.ts.map +1 -1
  53. package/dist/Misc/advanced_generation.js +82 -92
  54. package/dist/Misc/advanced_generation.js.map +1 -1
  55. package/dist/Misc/createNewUser.d.ts.map +1 -1
  56. package/dist/Misc/createNewUser.js +2 -12
  57. package/dist/Misc/createNewUser.js.map +1 -1
  58. package/dist/Misc/entity_subclasses_codegen.d.ts +5 -5
  59. package/dist/Misc/entity_subclasses_codegen.d.ts.map +1 -1
  60. package/dist/Misc/entity_subclasses_codegen.js +12 -20
  61. package/dist/Misc/entity_subclasses_codegen.js.map +1 -1
  62. package/dist/Misc/graphql_server_codegen.d.ts.map +1 -1
  63. package/dist/Misc/graphql_server_codegen.js +35 -40
  64. package/dist/Misc/graphql_server_codegen.js.map +1 -1
  65. package/dist/Misc/runCommand.d.ts.map +1 -1
  66. package/dist/Misc/runCommand.js +2 -12
  67. package/dist/Misc/runCommand.js.map +1 -1
  68. package/dist/Misc/sql_logging.d.ts +2 -2
  69. package/dist/Misc/sql_logging.d.ts.map +1 -1
  70. package/dist/Misc/sql_logging.js +4 -3
  71. package/dist/Misc/sql_logging.js.map +1 -1
  72. package/dist/Misc/status_logging.d.ts +37 -0
  73. package/dist/Misc/status_logging.d.ts.map +1 -1
  74. package/dist/Misc/status_logging.js +147 -14
  75. package/dist/Misc/status_logging.js.map +1 -1
  76. package/dist/Misc/system_integrity.d.ts +9 -9
  77. package/dist/Misc/system_integrity.d.ts.map +1 -1
  78. package/dist/Misc/system_integrity.js +23 -21
  79. package/dist/Misc/system_integrity.js.map +1 -1
  80. package/dist/index.d.ts +45 -7
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +51 -7
  83. package/dist/index.js.map +1 -1
  84. package/dist/runCodeGen.d.ts +84 -6
  85. package/dist/runCodeGen.d.ts.map +1 -1
  86. package/dist/runCodeGen.js +244 -93
  87. package/dist/runCodeGen.js.map +1 -1
  88. package/package.json +14 -14
@@ -5,9 +5,27 @@ const core_1 = require("@memberjunction/core");
5
5
  const core_entities_1 = require("@memberjunction/core-entities");
6
6
  const global_1 = require("@memberjunction/global");
7
7
  /**
8
- * Represents info on an Angular class that is used in the generated code
8
+ * Represents metadata about an Angular component that is used in the generated code.
9
+ * This includes all the necessary information for importing and using the component
10
+ * in generated Angular modules and templates.
9
11
  */
10
12
  class AngularComponentInfo {
13
+ /**
14
+ * The TypeScript class name for the component
15
+ */
16
+ ClassName;
17
+ /**
18
+ * The name of the Angular module that exports this component,
19
+ * used for proper import statements in the generated module
20
+ */
21
+ ModuleName;
22
+ /**
23
+ * The Angular selector name for the component (e.g., 'mj-user-grid')
24
+ */
25
+ AngularSelectorName;
26
+ /**
27
+ * Constructs a new AngularComponentInfo with empty default values
28
+ */
11
29
  constructor() {
12
30
  this.ClassName = "";
13
31
  this.ModuleName = "";
@@ -16,9 +34,38 @@ class AngularComponentInfo {
16
34
  }
17
35
  exports.AngularComponentInfo = AngularComponentInfo;
18
36
  /**
19
- * Classes that generate Angular code must return this type
37
+ * Result object returned by Angular code generation classes.
38
+ * Contains the generated template, optional TypeScript code, and metadata
39
+ * about the generation process.
20
40
  */
21
41
  class GenerationResult {
42
+ /**
43
+ * Indicates whether the generation process completed successfully
44
+ */
45
+ Success;
46
+ /**
47
+ * If generation failed, contains the error message describing what went wrong
48
+ */
49
+ ErrorMessage;
50
+ /**
51
+ * The generated HTML/Angular template code that will be embedded
52
+ * in the final Angular component template
53
+ */
54
+ TemplateOutput;
55
+ /**
56
+ * Optional TypeScript code that will be injected into the class definition
57
+ * of the Angular component. Useful for adding additional methods, properties,
58
+ * or lifecycle hooks to the component.
59
+ */
60
+ CodeOutput;
61
+ /**
62
+ * Reference to the generator component that produced this output.
63
+ * Used for accessing component properties later for imports and module configuration.
64
+ */
65
+ Component;
66
+ /**
67
+ * Constructs a new GenerationResult with default failure state
68
+ */
22
69
  constructor() {
23
70
  this.Success = false;
24
71
  this.TemplateOutput = "";
@@ -27,9 +74,29 @@ class GenerationResult {
27
74
  }
28
75
  exports.GenerationResult = GenerationResult;
29
76
  /**
30
- * Properties needed for the Generate() method to execute
77
+ * Input parameters required for the Generate() method of component generators.
78
+ * Contains all the context needed to generate appropriate Angular templates
79
+ * for related entity components.
31
80
  */
32
81
  class GenerationInput {
82
+ /**
83
+ * The primary entity that owns the relationship
84
+ */
85
+ Entity;
86
+ /**
87
+ * Metadata about the relationship between the primary entity and related entity,
88
+ * including display configuration and join information
89
+ */
90
+ RelationshipInfo;
91
+ /**
92
+ * The name of the tab in a multi-tabbed interface. Optional but useful
93
+ * for deferred loading using the IsCurrentTab() method from BaseFormComponent.
94
+ * Allows components to optimize rendering by only loading data when the tab is active.
95
+ */
96
+ TabName;
97
+ /**
98
+ * Constructs a new GenerationInput with null/empty default values
99
+ */
33
100
  constructor() {
34
101
  this.Entity = null;
35
102
  this.RelationshipInfo = null;
@@ -38,42 +105,57 @@ class GenerationInput {
38
105
  }
39
106
  exports.GenerationInput = GenerationInput;
40
107
  /**
41
- * Base class that all sub-classes of RelatedEntityDisplayComponentConfigBase use to define a derived class that will defined the shape
42
- * of their configuration object.
108
+ * Base class for all component configuration classes. Subclasses extend this
109
+ * to define the shape and properties of their specific configuration objects.
110
+ * These configurations are typically stored as JSON in the database and
111
+ * deserialized into strongly-typed objects.
43
112
  */
44
113
  class ComponentConfigBase {
45
114
  }
46
115
  exports.ComponentConfigBase = ComponentConfigBase;
47
116
  /**
48
- * Base Class that is responsible for generating the Angular template code for the related entity display component.
117
+ * Abstract base class responsible for generating Angular template code for related entity display components.
118
+ * Each subclass handles a specific type of related entity display (e.g., UserViewGrid, JoinGrid, Timeline).
49
119
  *
50
- * The built-in functionality within the {@link BaseFormComponent} can be used in the Angular template without any changes since the generated code will be injected
51
- * into the Angular template of a sub-class of {@link BaseFormComponent}. If you need additional code to be added to the sub-class on the TypeScript side, you can
52
- * provide that in the optional `CodeOutput` property of the `GenerationResult` object that is returned by the `Generate` method.
120
+ * The generated templates are injected into Angular forms that extend BaseFormComponent, so all
121
+ * BaseFormComponent methods and properties are available in the generated templates:
53
122
  *
54
- * Some of the commonly used methods/properties of the {@link BaseFormComponent} that can be used in the Angular template are below. Check out the documentation in the `@memberjunction/ng-base-forms` package and the
55
- * {@link BaseFormComponent} class for more details.
123
+ * **Commonly used BaseFormComponent methods/properties:**
124
+ * - `BuildRelationshipViewParamsByEntityName()` - Creates view parameters for related entities
125
+ * - `NewRecordValues()` - Provides default values for new related records
126
+ * - `IsCurrentTab()` - Checks if the current tab is active (useful for deferred loading)
127
+ * - `GridEditMode()` - Determines if grids should be in edit mode
128
+ * - `GridBottomMargin()` - Provides consistent bottom margin for grids
56
129
  *
57
- * * {@link BaseFormComponent#BuildRelationshipViewParamsByEntityName BuildRelationshipViewParamsByEntityName}
58
- * * {@link BaseFormComponent#NewRecordValues NewRecordValues}
59
- * * {@link BaseFormComponent#IsCurrentTab IsCurrentTab}
60
- * * {@link BaseFormComponent#GridEditMode GridEditMode}
61
- * * {@link BaseFormComponent#GridBottomMargin GridBottomMargin}
130
+ * **Implementation Pattern:**
131
+ * 1. Extend this class
132
+ * 2. Register with `@RegisterClass(RelatedEntityDisplayComponentGeneratorBase, "YourComponentName")`
133
+ * 3. Implement all abstract methods
134
+ * 4. Define a configuration class extending ComponentConfigBase
135
+ * 5. Generate appropriate Angular templates in the Generate() method
62
136
  *
63
- * @see {@link BaseFormComponent}
137
+ * @see BaseFormComponent
64
138
  */
65
139
  class RelatedEntityDisplayComponentGeneratorBase {
66
140
  /**
67
- * Helper method that will return the name of the foreign key in the specified entity
68
- * that links to the related entity
141
+ * Helper method that returns the name of the foreign key field in the specified entity
142
+ * that links to the related entity. Useful for building relationship queries and joins.
143
+ * @param entityName The name of the entity containing the foreign key
144
+ * @param relatedEntityName The name of the entity being referenced
145
+ * @returns The name of the foreign key field
146
+ * @throws Error if the foreign key field cannot be found
69
147
  */
70
148
  GetForeignKeyName(entityName, relatedEntityName) {
71
149
  const f = this.GetForeignKey(entityName, relatedEntityName);
72
150
  return f.Name;
73
151
  }
74
152
  /**
75
- * Helper method that will return the EntityFieldInfo object for the foreign key in the specified entity
76
- * that links to the related entity
153
+ * Helper method that returns the EntityFieldInfo object for the foreign key field
154
+ * in the specified entity that links to the related entity. Provides full field metadata.
155
+ * @param entityName The name of the entity containing the foreign key
156
+ * @param relatedEntityName The name of the entity being referenced
157
+ * @returns The EntityFieldInfo object for the foreign key field
158
+ * @throws Error if the entity or foreign key field cannot be found
77
159
  */
78
160
  GetForeignKey(entityName, relatedEntityName) {
79
161
  // find a foreign key field that links the entity to the related entity
@@ -88,10 +170,14 @@ class RelatedEntityDisplayComponentGeneratorBase {
88
170
  return field;
89
171
  }
90
172
  /**
91
- * Use this method to dynamically instantiate the correct RelatedEntityDisplayComponentGeneratorBase subclass based on the relationshipInfo provided
92
- * @param relationshipInfo The relationship info that contains the info needed to get the right component
93
- * @param contextUser Context user for any needed database interaction
94
- * @param params Provide any number of additional parameters that should be passed along to the constructor of the component
173
+ * Factory method that dynamically instantiates the correct RelatedEntityDisplayComponentGeneratorBase
174
+ * subclass based on the relationship configuration. Uses the MemberJunction class factory
175
+ * to resolve and create the appropriate component generator.
176
+ * @param relationshipInfo The relationship metadata containing display component configuration
177
+ * @param contextUser User context for database interactions and permission checking
178
+ * @param params Additional parameters passed to the component constructor
179
+ * @returns Promise resolving to the appropriate component generator instance
180
+ * @throws Error if the specified display component cannot be found or instantiated
95
181
  */
96
182
  static async GetComponent(relationshipInfo, contextUser, ...params) {
97
183
  let key = "UserViewGrid"; // default key/name of component
@@ -122,7 +208,11 @@ class RelatedEntityDisplayComponentGeneratorBase {
122
208
  }
123
209
  }
124
210
  }
211
+ /**
212
+ * Internal cache map storing component instances by their key/name to avoid
213
+ * recreating the same component multiple times during code generation
214
+ */
215
+ static _componentInstanceMap = new Map();
125
216
  }
126
217
  exports.RelatedEntityDisplayComponentGeneratorBase = RelatedEntityDisplayComponentGeneratorBase;
127
- RelatedEntityDisplayComponentGeneratorBase._componentInstanceMap = new Map();
128
218
  //# sourceMappingURL=related-entity-components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"related-entity-components.js","sourceRoot":"","sources":["../../src/Angular/related-entity-components.ts"],"names":[],"mappings":";;;AAAA,+CAA+G;AAC/G,iEAAgE;AAChE,mDAAkD;AAElD;;GAEG;AACH,MAAa,oBAAoB;IAc7B;QACI,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC;IAClC,CAAC;CACJ;AAnBD,oDAmBC;AAED;;GAEG;AACH,MAAa,gBAAgB;IAsBzB;QACI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC;CACJ;AA3BD,4CA2BC;AAED;;GAEG;AACH,MAAa,eAAe;I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AAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxF,qDAAqD;YACrD,MAAM,+BAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YAC1D,MAAM,SAAS,GAAG,+BAAe,CAAC,QAAQ,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YACvI,IAAI,SAAS,EAAE,CAAC;gBACZ,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC;YACzB,CAAC;;gBAEG,MAAM,IAAI,KAAK,CAAC,+CAA+C,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAC;QAC9G,CAAC;QAED,oJAAoJ;QACpJ,IAAI,QAAQ,GAAG,0CAA0C,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzF,IAAG,QAAQ,EAAC,CAAC;YACT,OAAO,QAAQ,CAAC;QACpB,CAAC;aACI,CAAC;YACF,sFAAsF;YACtF,MAAM,SAAS,GAAG,iBAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAA6C,0CAA0C,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;YACrK,IAAG,SAAS,EAAC,CAAC;gBACV,0CAA0C,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACrF,OAAO,SAAS,CAAC;YACrB,CAAC;iBACG,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,EAAE,CAAC,CAAC;YACtE,CAAC;QACL,CAAC;IACL,CAAC;;AAjFL,gGAsFC;AAHkB,gEAAqB,GAA4D,IAAI,GAAG,EAAsD,CAAC"}
1
+ {"version":3,"file":"related-entity-components.js","sourceRoot":"","sources":["../../src/Angular/related-entity-components.ts"],"names":[],"mappings":";;;AAAA,+CAA+G;AAC/G,iEAAgE;AAChE,mD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C;YACzB,CAAC;;gBAEG,MAAM,IAAI,KAAK,CAAC,+CAA+C,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAC;QAC9G,CAAC;QAED,oJAAoJ;QACpJ,IAAI,QAAQ,GAAG,0CAA0C,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzF,IAAG,QAAQ,EAAC,CAAC;YACT,OAAO,QAAQ,CAAC;QACpB,CAAC;aACI,CAAC;YACF,sFAAsF;YACtF,MAAM,SAAS,GAAG,iBAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAA6C,0CAA0C,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;YACrK,IAAG,SAAS,EAAC,CAAC;gBACV,0CAA0C,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACrF,OAAO,SAAS,CAAC;YACrB,CAAC;iBACG,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,EAAE,CAAC,CAAC;YACtE,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,qBAAqB,GAA4D,IAAI,GAAG,EAAsD,CAAC;;AA3GlK,gGAmHC"}
@@ -1,37 +1,76 @@
1
1
  import { AngularComponentInfo, ComponentConfigBase, GenerationInput, GenerationResult, RelatedEntityDisplayComponentGeneratorBase } from "./related-entity-components";
2
2
  /**
3
- * Configuration settings for each instance's use of the timeline component
3
+ * Configuration settings for timeline component instances. Defines how related entity data
4
+ * should be displayed in a chronological timeline format, including which fields to use
5
+ * for dates, titles, and descriptions.
4
6
  */
5
7
  export declare class TimelineConfigInfo extends ComponentConfigBase {
6
8
  /**
7
- * The name of the field in the related entity that has the date that will be used for display on the timeline
9
+ * The name of the field in the related entity that contains the date/timestamp
10
+ * for positioning items on the timeline (e.g., 'CreatedAt', 'EventDate')
8
11
  */
9
12
  DateField: string;
10
13
  /**
11
- * The name of the field in the related entity that has the title that will be used for display on the timeline
14
+ * The name of the field in the related entity that contains the main title
15
+ * text to display for each timeline item (e.g., 'Title', 'Name', 'Subject')
12
16
  */
13
17
  TitleField: string;
14
18
  /**
15
- * Optional, the name of the field in the related entity that has the subtitle that will be used for display on the timeline
19
+ * Optional field name for subtitle text displayed below the main title.
20
+ * Useful for additional context or secondary information.
16
21
  */
17
22
  SubTitleField?: string;
18
23
  /**
19
- * Optional, the name of the field in the related entity that has the description that will be used for display on the timeline
24
+ * Optional field name for longer description text displayed in the timeline item.
25
+ * Typically contains detailed information about the timeline event.
20
26
  */
21
27
  DescriptionField?: string;
22
28
  /**
23
- * Optional, determines if the timeline will be displayed horizontally or vertically, defaults to vertical if not provided
29
+ * Controls the visual layout of the timeline. Vertical timelines stack items
30
+ * top-to-bottom, while horizontal timelines arrange items left-to-right.
31
+ * @default 'vertical'
24
32
  */
25
33
  DisplayOrientation?: 'horizontal' | 'vertical';
34
+ /**
35
+ * Constructs a new TimelineConfigInfo with required fields initialized to empty strings
36
+ */
26
37
  constructor();
27
38
  }
28
39
  /**
29
- * Implementation of the UserViewGridRelatedEntityGenerator class that generates the Angular component for a related entity in a UserViewGrid display component
40
+ * Generator class for creating timeline components that display related entity data
41
+ * in chronological order. This component is ideal for showing time-based relationships
42
+ * like activity logs, event histories, deal stages, or any date-sequenced data.
43
+ *
44
+ * The timeline component provides:
45
+ * - Chronological visualization of related records
46
+ * - Configurable horizontal or vertical layout
47
+ * - Flexible field mapping for dates, titles, and descriptions
48
+ * - Automatic filtering based on parent entity relationships
30
49
  */
31
50
  export declare class TimelineRelatedEntityGenerator extends RelatedEntityDisplayComponentGeneratorBase {
51
+ /**
52
+ * Returns the configuration type class used for this timeline generator
53
+ * @returns The TimelineConfigInfo class type
54
+ */
32
55
  get ConfigType(): typeof TimelineConfigInfo;
56
+ /**
57
+ * Returns the NPM package path for importing the Timeline Angular component
58
+ * @returns The import path for the ng-timeline module
59
+ */
33
60
  get ImportPath(): string;
61
+ /**
62
+ * Returns the Angular component information needed for imports and module declarations
63
+ * @returns Array containing the TimelineComponent import details
64
+ */
34
65
  get ImportItems(): AngularComponentInfo[];
66
+ /**
67
+ * Generates the Angular template for a Timeline component based on the relationship configuration.
68
+ * Creates a timeline that displays related entity records in chronological order using the
69
+ * configured date, title, and optional description fields.
70
+ * @param input The generation input containing entity and relationship information
71
+ * @returns Promise resolving to the generation result with the Angular timeline template
72
+ * @throws Error if the DisplayComponentConfiguration is invalid JSON
73
+ */
35
74
  Generate(input: GenerationInput): Promise<GenerationResult>;
36
75
  }
37
76
  //# sourceMappingURL=timeline-related-entity-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-related-entity-component.d.ts","sourceRoot":"","sources":["../../src/Angular/timeline-related-entity-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAGvK;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,kBAAkB,CAAC,EAAG,YAAY,GAAG,UAAU,CAAc;;CAOhE;AAED;;GAEG;AACH,qBACa,8BAA+B,SAAQ,0CAA0C;IAC1F,IAAW,UAAU,IAAI,OAAO,kBAAkB,CAEjD;IACD,IAAW,UAAU,IAAI,MAAM,CAE9B;IACD,IAAW,WAAW,IAAI,oBAAoB,EAAE,CAQ/C;IAGY,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAqB3E"}
1
+ {"version":3,"file":"timeline-related-entity-component.d.ts","sourceRoot":"","sources":["../../src/Angular/timeline-related-entity-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAGvK;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACvD;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,kBAAkB,CAAC,EAAG,YAAY,GAAG,UAAU,CAAc;IAE7D;;OAEG;;CAMN;AAED;;;;;;;;;;GAUG;AACH,qBACa,8BAA+B,SAAQ,0CAA0C;IAC1F;;;OAGG;IACH,IAAW,UAAU,IAAI,OAAO,kBAAkB,CAEjD;IACD;;;OAGG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IACD;;;OAGG;IACH,IAAW,WAAW,IAAI,oBAAoB,EAAE,CAQ/C;IAGD;;;;;;;OAOG;IACU,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAuB3E"}
@@ -10,30 +10,77 @@ exports.TimelineRelatedEntityGenerator = exports.TimelineConfigInfo = void 0;
10
10
  const global_1 = require("@memberjunction/global");
11
11
  const related_entity_components_1 = require("./related-entity-components");
12
12
  /**
13
- * Configuration settings for each instance's use of the timeline component
13
+ * Configuration settings for timeline component instances. Defines how related entity data
14
+ * should be displayed in a chronological timeline format, including which fields to use
15
+ * for dates, titles, and descriptions.
14
16
  */
15
17
  class TimelineConfigInfo extends related_entity_components_1.ComponentConfigBase {
18
+ /**
19
+ * The name of the field in the related entity that contains the date/timestamp
20
+ * for positioning items on the timeline (e.g., 'CreatedAt', 'EventDate')
21
+ */
22
+ DateField;
23
+ /**
24
+ * The name of the field in the related entity that contains the main title
25
+ * text to display for each timeline item (e.g., 'Title', 'Name', 'Subject')
26
+ */
27
+ TitleField;
28
+ /**
29
+ * Optional field name for subtitle text displayed below the main title.
30
+ * Useful for additional context or secondary information.
31
+ */
32
+ SubTitleField;
33
+ /**
34
+ * Optional field name for longer description text displayed in the timeline item.
35
+ * Typically contains detailed information about the timeline event.
36
+ */
37
+ DescriptionField;
38
+ /**
39
+ * Controls the visual layout of the timeline. Vertical timelines stack items
40
+ * top-to-bottom, while horizontal timelines arrange items left-to-right.
41
+ * @default 'vertical'
42
+ */
43
+ DisplayOrientation = 'vertical';
44
+ /**
45
+ * Constructs a new TimelineConfigInfo with required fields initialized to empty strings
46
+ */
16
47
  constructor() {
17
48
  super();
18
- /**
19
- * Optional, determines if the timeline will be displayed horizontally or vertically, defaults to vertical if not provided
20
- */
21
- this.DisplayOrientation = 'vertical';
22
49
  this.DateField = "";
23
50
  this.TitleField = "";
24
51
  }
25
52
  }
26
53
  exports.TimelineConfigInfo = TimelineConfigInfo;
27
54
  /**
28
- * Implementation of the UserViewGridRelatedEntityGenerator class that generates the Angular component for a related entity in a UserViewGrid display component
55
+ * Generator class for creating timeline components that display related entity data
56
+ * in chronological order. This component is ideal for showing time-based relationships
57
+ * like activity logs, event histories, deal stages, or any date-sequenced data.
58
+ *
59
+ * The timeline component provides:
60
+ * - Chronological visualization of related records
61
+ * - Configurable horizontal or vertical layout
62
+ * - Flexible field mapping for dates, titles, and descriptions
63
+ * - Automatic filtering based on parent entity relationships
29
64
  */
30
65
  let TimelineRelatedEntityGenerator = class TimelineRelatedEntityGenerator extends related_entity_components_1.RelatedEntityDisplayComponentGeneratorBase {
66
+ /**
67
+ * Returns the configuration type class used for this timeline generator
68
+ * @returns The TimelineConfigInfo class type
69
+ */
31
70
  get ConfigType() {
32
71
  return TimelineConfigInfo;
33
72
  }
73
+ /**
74
+ * Returns the NPM package path for importing the Timeline Angular component
75
+ * @returns The import path for the ng-timeline module
76
+ */
34
77
  get ImportPath() {
35
78
  return "@memberjunction/ng-timeline";
36
79
  }
80
+ /**
81
+ * Returns the Angular component information needed for imports and module declarations
82
+ * @returns Array containing the TimelineComponent import details
83
+ */
37
84
  get ImportItems() {
38
85
  return [
39
86
  {
@@ -43,17 +90,27 @@ let TimelineRelatedEntityGenerator = class TimelineRelatedEntityGenerator extend
43
90
  }
44
91
  ];
45
92
  }
93
+ /**
94
+ * Generates the Angular template for a Timeline component based on the relationship configuration.
95
+ * Creates a timeline that displays related entity records in chronological order using the
96
+ * configured date, title, and optional description fields.
97
+ * @param input The generation input containing entity and relationship information
98
+ * @returns Promise resolving to the generation result with the Angular timeline template
99
+ * @throws Error if the DisplayComponentConfiguration is invalid JSON
100
+ */
46
101
  async Generate(input) {
47
102
  const config = (0, global_1.SafeJSONParse)(input.RelationshipInfo.DisplayComponentConfiguration);
48
103
  if (!config)
49
104
  throw new Error("Invalid configuration for component for relationship " + input.RelationshipInfo.ID);
105
+ // Get the foreign key field that links the related entity back to the parent entity
50
106
  const fk = this.GetForeignKey(input.RelationshipInfo.RelatedEntity, input.Entity.Name);
107
+ // Build the filter expression to show only records related to the current parent record
51
108
  const filter = `'${fk.Name}=' + record.${input.Entity.FirstPrimaryKey.Name}`;
109
+ // Generate the Angular template with timeline configuration
52
110
  const template = `<mj-timeline
53
111
  DisplayOrientation="${config.DisplayOrientation}"
54
112
  [Groups]="[{EntityName: '${input.RelationshipInfo.RelatedEntity}', DataSourceType: 'entity', Filter: ${filter}, TitleFieldName: '${config.TitleField}', DateFieldName: '${config.DateField}'}]">
55
113
  </mj-timeline>`;
56
- //{EntityName: 'Deals', DataSourceType:'entity', Filter:'AccountID=' + record.ID, TitleFieldName:'Title', DateFieldName:'CloseDate'}
57
114
  return {
58
115
  Success: true,
59
116
  TemplateOutput: template,
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-related-entity-component.js","sourceRoot":"","sources":["../../src/Angular/timeline-related-entity-component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsE;AACtE,2EAAuK;AAGvK;;GAEG;AAC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OAAO;YACH,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,IAAI;SAClB,CAAA;IACL,CAAC;CACJ,CAAA;AAvCY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,sBAAa,EAAC,sEAA0C,EAAE,UAAU,CAAC;GACzD,8BAA8B,CAuC1C"}
1
+ {"version":3,"file":"timeline-related-entity-component.js","sourceRoot":"","sources":["../../src/Angular/timeline-related-entity-component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsE;AACtE,2EAAuK;AAGvK;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,+CAAmB;IACvD;;;OAGG;IACH,SAAS,CAAS;IAElB;;;OAGG;IACH,UAAU,CAAQ;IAElB;;;OAGG;IACH,aAAa,CAAU;IAEvB;;;OAGG;IACH,gBAAgB,CAAU;IAE1B;;;;OAIG;IACH,kBAAkB,GAAgC,UAAU,CAAC;IAE7D;;OAEG;IACH;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;IACzB,CAAC;CACJ;AAxCD,gDAwCC;AAED;;;;;;;;;;GAUG;AAEI,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,sEAA0C;IAC1F;;;OAGG;IACH,IAAW,UAAU;QACjB,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IACD;;;OAGG;IACH,IAAW,UAAU;QACjB,OAAO,6BAA6B,CAAC;IACzC,CAAC;IACD;;;OAGG;IACH,IAAW,WAAW;QAClB,OAAO;YACH;gBACI,SAAS,EAAE,mBAAmB;gBAC9B,mBAAmB,EAAE,aAAa;gBAClC,UAAU,EAAE,gBAAgB;aAC/B;SACJ,CAAC;IACN,CAAC;IAGD;;;;;;;OAOG;IACI,KAAK,CAAC,QAAQ,CAAC,KAAsB;QACxC,MAAM,MAAM,GAAG,IAAA,sBAAa,EAAqB,KAAK,CAAC,gBAAiB,CAAC,6BAA6B,CAAC,CAAC;QACxG,IAAI,CAAC,MAAM;YACP,MAAM,IAAI,KAAK,CAAC,uDAAuD,GAAG,KAAK,CAAC,gBAAiB,CAAC,EAAE,CAAC,CAAC;QAE1G,oFAAoF;QACpF,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,gBAAiB,CAAC,aAAa,EAAE,KAAK,CAAC,MAAO,CAAC,IAAI,CAAC,CAAC;QACzF,wFAAwF;QACxF,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC,IAAI,eAAe,KAAK,CAAC,MAAO,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAE9E,4DAA4D;QAC5D,MAAM,QAAQ,GAAG;0BACC,MAAM,CAAC,kBAAkB;+BACpB,KAAK,CAAC,gBAAiB,CAAC,aAAa,wCAAwC,MAAM,sBAAsB,MAAM,CAAC,UAAU,sBAAsB,MAAM,CAAC,SAAS;eAChL,CAAA;QAEP,OAAO;YACH,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,IAAI;SAClB,CAAA;IACL,CAAC;CACJ,CAAA;AA7DY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,sBAAa,EAAC,sEAA0C,EAAE,UAAU,CAAC;GACzD,8BAA8B,CA6D1C"}
@@ -1,11 +1,43 @@
1
1
  import { AngularComponentInfo, ComponentConfigBase, GenerationInput, GenerationResult, RelatedEntityDisplayComponentGeneratorBase } from "./related-entity-components";
2
2
  /**
3
- * Implementation of the UserViewGridRelatedEntityGenerator class that generates the Angular component for a related entity in a UserViewGrid display component
3
+ * Default generator class for creating UserViewGrid components that display related entity data
4
+ * in a standard data grid format. This is the most commonly used related entity display component,
5
+ * providing full CRUD capabilities, filtering, sorting, and pagination.
6
+ *
7
+ * The UserViewGrid component provides:
8
+ * - Tabular display of related entity records
9
+ * - In-line editing capabilities
10
+ * - Advanced filtering and search
11
+ * - Column sorting and customization
12
+ * - Pagination for large datasets
13
+ * - Integration with MemberJunction user views
14
+ * - Automatic relationship parameter binding
4
15
  */
5
16
  export declare class UserViewGridRelatedEntityGenerator extends RelatedEntityDisplayComponentGeneratorBase {
17
+ /**
18
+ * Returns the NPM package path for importing the UserViewGrid Angular component
19
+ * @returns The import path for the ng-user-view-grid module
20
+ */
6
21
  get ImportPath(): string;
22
+ /**
23
+ * Returns the Angular component information needed for imports and module declarations
24
+ * @returns Array containing the UserViewGridComponent import details
25
+ */
7
26
  get ImportItems(): AngularComponentInfo[];
27
+ /**
28
+ * Generates the Angular template for a UserViewGrid component that displays related entity data.
29
+ * The generated template includes proper parameter binding for relationships, deferred loading,
30
+ * and integration with the parent form's edit mode and styling.
31
+ * @param input The generation input containing entity and relationship information
32
+ * @returns Promise resolving to the generation result with the Angular grid template
33
+ */
8
34
  Generate(input: GenerationInput): Promise<GenerationResult>;
35
+ /**
36
+ * Returns the configuration type for this component. UserViewGrid uses the base
37
+ * ComponentConfigBase since it doesn't require additional configuration beyond
38
+ * the standard relationship metadata.
39
+ * @returns null since no additional configuration is required
40
+ */
9
41
  get ConfigType(): typeof ComponentConfigBase;
10
42
  }
11
43
  //# sourceMappingURL=user-view-grid-related-entity-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-view-grid-related-entity-component.d.ts","sourceRoot":"","sources":["../../src/Angular/user-view-grid-related-entity-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAEvK;;GAEG;AACH,qBACa,kCAAmC,SAAQ,0CAA0C;IAC9F,IAAW,UAAU,IAAI,MAAM,CAE9B;IACD,IAAW,WAAW,IAAI,oBAAoB,EAAE,CAQ/C;IACY,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgBxE,IAAW,UAAU,IAAI,OAAO,mBAAmB,CAElD;CACJ"}
1
+ {"version":3,"file":"user-view-grid-related-entity-component.d.ts","sourceRoot":"","sources":["../../src/Angular/user-view-grid-related-entity-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAEvK;;;;;;;;;;;;;GAaG;AACH,qBACa,kCAAmC,SAAQ,0CAA0C;IAC9F;;;OAGG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IACD;;;OAGG;IACH,IAAW,WAAW,IAAI,oBAAoB,EAAE,CAQ/C;IACD;;;;;;OAMG;IACU,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgBxE;;;;;OAKG;IACH,IAAW,UAAU,IAAI,OAAO,mBAAmB,CAElD;CACJ"}
@@ -10,12 +10,31 @@ exports.UserViewGridRelatedEntityGenerator = void 0;
10
10
  const global_1 = require("@memberjunction/global");
11
11
  const related_entity_components_1 = require("./related-entity-components");
12
12
  /**
13
- * Implementation of the UserViewGridRelatedEntityGenerator class that generates the Angular component for a related entity in a UserViewGrid display component
13
+ * Default generator class for creating UserViewGrid components that display related entity data
14
+ * in a standard data grid format. This is the most commonly used related entity display component,
15
+ * providing full CRUD capabilities, filtering, sorting, and pagination.
16
+ *
17
+ * The UserViewGrid component provides:
18
+ * - Tabular display of related entity records
19
+ * - In-line editing capabilities
20
+ * - Advanced filtering and search
21
+ * - Column sorting and customization
22
+ * - Pagination for large datasets
23
+ * - Integration with MemberJunction user views
24
+ * - Automatic relationship parameter binding
14
25
  */
15
26
  let UserViewGridRelatedEntityGenerator = class UserViewGridRelatedEntityGenerator extends related_entity_components_1.RelatedEntityDisplayComponentGeneratorBase {
27
+ /**
28
+ * Returns the NPM package path for importing the UserViewGrid Angular component
29
+ * @returns The import path for the ng-user-view-grid module
30
+ */
16
31
  get ImportPath() {
17
32
  return "@memberjunction/ng-user-view-grid";
18
33
  }
34
+ /**
35
+ * Returns the Angular component information needed for imports and module declarations
36
+ * @returns Array containing the UserViewGridComponent import details
37
+ */
19
38
  get ImportItems() {
20
39
  return [
21
40
  {
@@ -25,6 +44,13 @@ let UserViewGridRelatedEntityGenerator = class UserViewGridRelatedEntityGenerato
25
44
  }
26
45
  ];
27
46
  }
47
+ /**
48
+ * Generates the Angular template for a UserViewGrid component that displays related entity data.
49
+ * The generated template includes proper parameter binding for relationships, deferred loading,
50
+ * and integration with the parent form's edit mode and styling.
51
+ * @param input The generation input containing entity and relationship information
52
+ * @returns Promise resolving to the generation result with the Angular grid template
53
+ */
28
54
  async Generate(input) {
29
55
  const template = `<mj-user-view-grid
30
56
  [Params]="BuildRelationshipViewParamsByEntityName('${input.RelationshipInfo.RelatedEntity.trim()}','${input.RelationshipInfo.RelatedEntityJoinField.trim()}')"
@@ -40,6 +66,12 @@ let UserViewGridRelatedEntityGenerator = class UserViewGridRelatedEntityGenerato
40
66
  Component: this
41
67
  };
42
68
  }
69
+ /**
70
+ * Returns the configuration type for this component. UserViewGrid uses the base
71
+ * ComponentConfigBase since it doesn't require additional configuration beyond
72
+ * the standard relationship metadata.
73
+ * @returns null since no additional configuration is required
74
+ */
43
75
  get ConfigType() {
44
76
  return null;
45
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"user-view-grid-related-entity-component.js","sourceRoot":"","sources":["../../src/Angular/user-view-grid-related-entity-component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAuD;AACvD,2EAAuK;AAEvK;;GAEG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,sEAA0C;IAC9F,IAAW,UAAU;QACjB,OAAO,mCAAmC,CAAC;IAC/C,CAAC;IACD,IAAW,WAAW;QAClB,OAAO;YACH;gBACI,SAAS,EAAE,uBAAuB;gBAClC,mBAAmB,EAAE,mBAAmB;gBACxC,UAAU,EAAE,oBAAoB;aACnC;SACJ,CAAC;IACN,CAAC;IACM,KAAK,CAAC,QAAQ,CAAC,KAAsB;QACxC,MAAM,QAAQ,GAAG;yDACgC,KAAK,CAAC,gBAAiB,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,gBAAiB,CAAC,sBAAsB,CAAC,IAAI,EAAE;0CACtH,KAAK,CAAC,gBAAiB,CAAC,aAAa,CAAC,IAAI,EAAE;iCACrD,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE;;;qBAGhC,CAAA;QACb,OAAO;YACH,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,IAAI;SAClB,CAAA;IACL,CAAC;IAED,IAAW,UAAU;QACjB,OAAO,IAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AAhCY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,sBAAa,EAAC,sEAA0C,EAAE,cAAc,CAAC;GAC7D,kCAAkC,CAgC9C"}
1
+ {"version":3,"file":"user-view-grid-related-entity-component.js","sourceRoot":"","sources":["../../src/Angular/user-view-grid-related-entity-component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAuD;AACvD,2EAAuK;AAEvK;;;;;;;;;;;;;GAaG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,sEAA0C;IAC9F;;;OAGG;IACH,IAAW,UAAU;QACjB,OAAO,mCAAmC,CAAC;IAC/C,CAAC;IACD;;;OAGG;IACH,IAAW,WAAW;QAClB,OAAO;YACH;gBACI,SAAS,EAAE,uBAAuB;gBAClC,mBAAmB,EAAE,mBAAmB;gBACxC,UAAU,EAAE,oBAAoB;aACnC;SACJ,CAAC;IACN,CAAC;IACD;;;;;;OAMG;IACI,KAAK,CAAC,QAAQ,CAAC,KAAsB;QACxC,MAAM,QAAQ,GAAG;yDACgC,KAAK,CAAC,gBAAiB,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,gBAAiB,CAAC,sBAAsB,CAAC,IAAI,EAAE;0CACtH,KAAK,CAAC,gBAAiB,CAAC,aAAa,CAAC,IAAI,EAAE;iCACrD,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE;;;qBAGhC,CAAA;QACb,OAAO;YACH,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,IAAI;SAClB,CAAA;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAW,UAAU;QACjB,OAAO,IAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AArDY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,sBAAa,EAAC,sEAA0C,EAAE,cAAc,CAAC;GAC7D,kCAAkC,CAqD9C"}