@memberjunction/codegen-lib 5.0.0 → 5.2.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/dist/Angular/angular-codegen.d.ts +12 -0
- package/dist/Angular/angular-codegen.d.ts.map +1 -1
- package/dist/Angular/angular-codegen.js +63 -0
- package/dist/Angular/angular-codegen.js.map +1 -1
- package/dist/Database/manage-metadata.d.ts +2 -2
- package/dist/Database/manage-metadata.js +2 -2
- package/dist/Database/sql_codegen.d.ts +10 -3
- package/dist/Database/sql_codegen.d.ts.map +1 -1
- package/dist/Database/sql_codegen.js +73 -9
- package/dist/Database/sql_codegen.js.map +1 -1
- package/dist/EntityNameScanner/EntityNameScanner.d.ts +29 -11
- package/dist/EntityNameScanner/EntityNameScanner.d.ts.map +1 -1
- package/dist/EntityNameScanner/EntityNameScanner.js +46 -14
- package/dist/EntityNameScanner/EntityNameScanner.js.map +1 -1
- package/dist/EntityNameScanner/subclass-rename-map.d.ts +20 -0
- package/dist/EntityNameScanner/subclass-rename-map.d.ts.map +1 -0
- package/dist/EntityNameScanner/subclass-rename-map.js +345 -0
- package/dist/EntityNameScanner/subclass-rename-map.js.map +1 -0
- package/dist/Misc/action_subclasses_codegen.d.ts +3 -3
- package/dist/Misc/action_subclasses_codegen.d.ts.map +1 -1
- package/dist/Misc/action_subclasses_codegen.js.map +1 -1
- package/dist/runCodeGen.d.ts.map +1 -1
- package/dist/runCodeGen.js +24 -3
- package/dist/runCodeGen.js.map +1 -1
- package/package.json +15 -15
- package/dist/Angular/user-view-grid-related-entity-component.d.ts +0 -43
- package/dist/Angular/user-view-grid-related-entity-component.d.ts.map +0 -1
- package/dist/Angular/user-view-grid-related-entity-component.js +0 -85
- package/dist/Angular/user-view-grid-related-entity-component.js.map +0 -1
- package/dist/__tests__/metadataConfig.test.d.ts +0 -12
- package/dist/__tests__/metadataConfig.test.d.ts.map +0 -1
- package/dist/__tests__/metadataConfig.test.js +0 -604
- package/dist/__tests__/metadataConfig.test.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/codegen-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.2.0",
|
|
5
5
|
"description": "Library used by the CodeGen executable to generate code for the MemberJunction platform. Contains a reusable object model that can be called by any other server-side application/library.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"vitest": "^3.1.1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@memberjunction/actions": "5.
|
|
26
|
-
"@memberjunction/actions-base": "5.
|
|
27
|
-
"@memberjunction/ai": "5.
|
|
28
|
-
"@memberjunction/ai-core-plus": "5.
|
|
29
|
-
"@memberjunction/ai-prompts": "5.
|
|
30
|
-
"@memberjunction/ai-provider-bundle": "5.
|
|
31
|
-
"@memberjunction/aiengine": "5.
|
|
32
|
-
"@memberjunction/config": "5.
|
|
33
|
-
"@memberjunction/core": "5.
|
|
34
|
-
"@memberjunction/core-entities": "5.
|
|
35
|
-
"@memberjunction/core-entities-server": "5.
|
|
36
|
-
"@memberjunction/global": "5.
|
|
37
|
-
"@memberjunction/server-bootstrap-lite": "5.
|
|
38
|
-
"@memberjunction/sqlserver-dataprovider": "5.
|
|
25
|
+
"@memberjunction/actions": "5.2.0",
|
|
26
|
+
"@memberjunction/actions-base": "5.2.0",
|
|
27
|
+
"@memberjunction/ai": "5.2.0",
|
|
28
|
+
"@memberjunction/ai-core-plus": "5.2.0",
|
|
29
|
+
"@memberjunction/ai-prompts": "5.2.0",
|
|
30
|
+
"@memberjunction/ai-provider-bundle": "5.2.0",
|
|
31
|
+
"@memberjunction/aiengine": "5.2.0",
|
|
32
|
+
"@memberjunction/config": "5.2.0",
|
|
33
|
+
"@memberjunction/core": "5.2.0",
|
|
34
|
+
"@memberjunction/core-entities": "5.2.0",
|
|
35
|
+
"@memberjunction/core-entities-server": "5.2.0",
|
|
36
|
+
"@memberjunction/global": "5.2.0",
|
|
37
|
+
"@memberjunction/server-bootstrap-lite": "5.2.0",
|
|
38
|
+
"@memberjunction/sqlserver-dataprovider": "5.2.0",
|
|
39
39
|
"cosmiconfig": "9.0.0",
|
|
40
40
|
"fs-extra": "^11.3.3",
|
|
41
41
|
"glob": "^13.0.1",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { AngularComponentInfo, ComponentConfigBase, GenerationInput, GenerationResult, RelatedEntityDisplayComponentGeneratorBase } from "./related-entity-components.js";
|
|
2
|
-
/**
|
|
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
|
|
15
|
-
*/
|
|
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
|
-
*/
|
|
21
|
-
get ImportPath(): string;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the Angular component information needed for imports and module declarations
|
|
24
|
-
* @returns Empty array since UserViewGrid uses module-level imports, not component imports
|
|
25
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
41
|
-
get ConfigType(): typeof ComponentConfigBase;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=user-view-grid-related-entity-component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAE/C;IACD;;;;;;OAMG;IACU,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA0BxE;;;;;OAKG;IACH,IAAW,UAAU,IAAI,OAAO,mBAAmB,CAElD;CACJ"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.UserViewGridRelatedEntityGenerator = void 0;
|
|
10
|
-
const global_1 = require("@memberjunction/global");
|
|
11
|
-
const related_entity_components_1 = require("./related-entity-components.js");
|
|
12
|
-
/**
|
|
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
|
|
25
|
-
*/
|
|
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
|
-
*/
|
|
31
|
-
get ImportPath() {
|
|
32
|
-
return "@memberjunction/ng-user-view-grid";
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Returns the Angular component information needed for imports and module declarations
|
|
36
|
-
* @returns Empty array since UserViewGrid uses module-level imports, not component imports
|
|
37
|
-
*/
|
|
38
|
-
get ImportItems() {
|
|
39
|
-
return [];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Generates the Angular template for a UserViewGrid component that displays related entity data.
|
|
43
|
-
* The generated template includes proper parameter binding for relationships, deferred loading,
|
|
44
|
-
* and integration with the parent form's edit mode and styling.
|
|
45
|
-
* @param input The generation input containing entity and relationship information
|
|
46
|
-
* @returns Promise resolving to the generation result with the Angular grid template
|
|
47
|
-
*/
|
|
48
|
-
async Generate(input) {
|
|
49
|
-
// Use IsSectionExpanded for new collapsible section-based forms, IsCurrentTab for legacy tab-based forms
|
|
50
|
-
const allowLoadCheck = input.SectionKey && input.SectionKey.length > 0
|
|
51
|
-
? `IsSectionExpanded('${input.SectionKey.trim()}')`
|
|
52
|
-
: `IsCurrentTab('${input.TabName.trim()}')`;
|
|
53
|
-
// Add dataLoaded event binding to capture row count
|
|
54
|
-
const dataLoadedEvent = input.SectionKey && input.SectionKey.length > 0
|
|
55
|
-
? `(dataLoaded)="SetSectionRowCount('${input.SectionKey.trim()}', $event.totalRowCount)"`
|
|
56
|
-
: '';
|
|
57
|
-
const template = `<mj-user-view-grid
|
|
58
|
-
[Params]="BuildRelationshipViewParamsByEntityName('${input.RelationshipInfo.RelatedEntity.trim()}','${input.RelationshipInfo.RelatedEntityJoinField.trim()}')"
|
|
59
|
-
[NewRecordValues]="NewRecordValues('${input.RelationshipInfo.RelatedEntity.trim()}')"
|
|
60
|
-
[AllowLoad]="${allowLoadCheck}"
|
|
61
|
-
[EditMode]="GridEditMode()"${dataLoadedEvent ? `\n ${dataLoadedEvent}` : ''}
|
|
62
|
-
>
|
|
63
|
-
</mj-user-view-grid>`;
|
|
64
|
-
return {
|
|
65
|
-
Success: true,
|
|
66
|
-
TemplateOutput: template,
|
|
67
|
-
CodeOutput: "",
|
|
68
|
-
Component: this
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Returns the configuration type for this component. UserViewGrid uses the base
|
|
73
|
-
* ComponentConfigBase since it doesn't require additional configuration beyond
|
|
74
|
-
* the standard relationship metadata.
|
|
75
|
-
* @returns null since no additional configuration is required
|
|
76
|
-
*/
|
|
77
|
-
get ConfigType() {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
exports.UserViewGridRelatedEntityGenerator = UserViewGridRelatedEntityGenerator;
|
|
82
|
-
exports.UserViewGridRelatedEntityGenerator = UserViewGridRelatedEntityGenerator = __decorate([
|
|
83
|
-
(0, global_1.RegisterClass)(related_entity_components_1.RelatedEntityDisplayComponentGeneratorBase, "UserViewGrid")
|
|
84
|
-
], UserViewGridRelatedEntityGenerator);
|
|
85
|
-
//# sourceMappingURL=user-view-grid-related-entity-component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EAAE,CAAC;IACd,CAAC;IACD;;;;;;OAMG;IACI,KAAK,CAAC,QAAQ,CAAC,KAAsB;QACxC,yGAAyG;QACzG,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;YAClE,CAAC,CAAC,sBAAsB,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI;YACnD,CAAC,CAAC,iBAAiB,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;QAEhD,oDAAoD;QACpD,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;YACnE,CAAC,CAAC,qCAAqC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,2BAA2B;YACzF,CAAC,CAAC,EAAE,CAAC;QAET,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;mBACnE,cAAc;iCACA,eAAe,CAAC,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE;;qBAE7D,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;AAzDY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,sBAAa,EAAC,sEAA0C,EAAE,cAAc,CAAC;GAC7D,kCAAkC,CAyD9C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for database-metadata-config.json parsing logic.
|
|
3
|
-
*
|
|
4
|
-
* Tests the three extraction methods on ManageMetadataBase:
|
|
5
|
-
* - extractTablesFromConfig (soft PK/FK for regular tables)
|
|
6
|
-
* - extractVirtualEntitiesFromConfig (virtual entity definitions)
|
|
7
|
-
* - extractISARelationshipsFromConfig (IS-A parent-child declarations)
|
|
8
|
-
*
|
|
9
|
-
* Also tests deriveEntityNameFromView and the interaction between sections.
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=metadataConfig.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadataConfig.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/metadataConfig.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|