@memberjunction/core-entities 2.90.0 → 2.91.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/engines/component-metadata.d.ts +20 -0
- package/dist/engines/component-metadata.d.ts.map +1 -0
- package/dist/engines/component-metadata.js +46 -0
- package/dist/engines/component-metadata.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +17 -0
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +29 -0
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseEngine, IMetadataProvider, UserInfo } from "@memberjunction/core";
|
|
2
|
+
import { ComponentEntityExtended } from "../custom/ComponentEntityExtended";
|
|
3
|
+
import { ComponentLibraryEntity, ComponentLibraryLinkEntity } from "../generated/entity_subclasses";
|
|
4
|
+
/**
|
|
5
|
+
* Caching of metadata for components and related data
|
|
6
|
+
*/
|
|
7
|
+
export declare class ComponentMetadataEngine extends BaseEngine<ComponentMetadataEngine> {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the global instance of the class. This is a singleton class, so there is only one instance of it in the application. Do not directly create new instances of it, always use this method to get the instance.
|
|
10
|
+
*/
|
|
11
|
+
static get Instance(): ComponentMetadataEngine;
|
|
12
|
+
private _components;
|
|
13
|
+
private _componentLibraries;
|
|
14
|
+
private _componentLibraryLinks;
|
|
15
|
+
Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
|
|
16
|
+
get Components(): ComponentEntityExtended[];
|
|
17
|
+
get ComponentLibraries(): ComponentLibraryEntity[];
|
|
18
|
+
get ComponentLibraryLinks(): ComponentLibraryLinkEntity[];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=component-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-metadata.d.ts","sourceRoot":"","sources":["../../src/engines/component-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,iBAAiB,EAAY,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEpG;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IAC5E;;OAEG;IACH,WAAkB,QAAQ,IAAI,uBAAuB,CAEpD;IAED,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,mBAAmB,CAA2B;IACtD,OAAO,CAAC,sBAAsB,CAA+B;IAEhD,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,iBAAiB;IAqBhG,IAAW,UAAU,IAAI,uBAAuB,EAAE,CAEjD;IAED,IAAW,kBAAkB,IAAI,sBAAsB,EAAE,CAExD;IAED,IAAW,qBAAqB,IAAI,0BAA0B,EAAE,CAE/D;CACJ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComponentMetadataEngine = void 0;
|
|
4
|
+
const core_1 = require("@memberjunction/core");
|
|
5
|
+
/**
|
|
6
|
+
* Caching of metadata for components and related data
|
|
7
|
+
*/
|
|
8
|
+
class ComponentMetadataEngine extends core_1.BaseEngine {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the global instance of the class. This is a singleton class, so there is only one instance of it in the application. Do not directly create new instances of it, always use this method to get the instance.
|
|
11
|
+
*/
|
|
12
|
+
static get Instance() {
|
|
13
|
+
return super.getInstance();
|
|
14
|
+
}
|
|
15
|
+
async Config(forceRefresh, contextUser, provider) {
|
|
16
|
+
const c = [
|
|
17
|
+
{
|
|
18
|
+
Type: 'entity',
|
|
19
|
+
EntityName: 'MJ: Components',
|
|
20
|
+
PropertyName: "_components"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
Type: 'entity',
|
|
24
|
+
EntityName: 'MJ: Component Libraries',
|
|
25
|
+
PropertyName: "_componentLibraries"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
Type: 'entity',
|
|
29
|
+
EntityName: 'MJ: Component Library Links',
|
|
30
|
+
PropertyName: "_componentLibraryLinks"
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
await this.Load(c, provider, forceRefresh, contextUser);
|
|
34
|
+
}
|
|
35
|
+
get Components() {
|
|
36
|
+
return this._components;
|
|
37
|
+
}
|
|
38
|
+
get ComponentLibraries() {
|
|
39
|
+
return this._componentLibraries;
|
|
40
|
+
}
|
|
41
|
+
get ComponentLibraryLinks() {
|
|
42
|
+
return this._componentLibraryLinks;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.ComponentMetadataEngine = ComponentMetadataEngine;
|
|
46
|
+
//# sourceMappingURL=component-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-metadata.js","sourceRoot":"","sources":["../../src/engines/component-metadata.ts"],"names":[],"mappings":";;;AAAA,+CAAmH;AAInH;;GAEG;AACH,MAAa,uBAAwB,SAAQ,iBAAmC;IAC5E;;OAEG;IACI,MAAM,KAAK,QAAQ;QACvB,OAAO,KAAK,CAAC,WAAW,EAA2B,CAAC;IACvD,CAAC;IAMM,KAAK,CAAC,MAAM,CAAC,YAAsB,EAAE,WAAsB,EAAE,QAA4B;QAC5F,MAAM,CAAC,GAAwC;YAC3C;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,gBAAgB;gBAC5B,YAAY,EAAE,aAAa;aAC9B;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,yBAAyB;gBACrC,YAAY,EAAE,qBAAqB;aACtC;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,6BAA6B;gBACzC,YAAY,EAAE,wBAAwB;aACzC;SACJ,CAAA;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAED,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAW,kBAAkB;QACzB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;IAED,IAAW,qBAAqB;QAC5B,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACvC,CAAC;CACJ;AA5CD,0DA4CC"}
|
|
@@ -5850,12 +5850,14 @@ export declare const ComponentLibrarySchema: z.ZodObject<{
|
|
|
5850
5850
|
Description: z.ZodNullable<z.ZodString>;
|
|
5851
5851
|
__mj_CreatedAt: z.ZodDate;
|
|
5852
5852
|
__mj_UpdatedAt: z.ZodDate;
|
|
5853
|
+
Status: z.ZodUnion<[z.ZodLiteral<"Active">, z.ZodLiteral<"Deprecated">, z.ZodLiteral<"Disabled">]>;
|
|
5853
5854
|
}, "strip", z.ZodTypeAny, {
|
|
5854
5855
|
ID?: string;
|
|
5855
5856
|
__mj_CreatedAt?: Date;
|
|
5856
5857
|
__mj_UpdatedAt?: Date;
|
|
5857
5858
|
Name?: string;
|
|
5858
5859
|
Description?: string;
|
|
5860
|
+
Status?: "Disabled" | "Active" | "Deprecated";
|
|
5859
5861
|
Category?: "Other" | "Core" | "Runtime" | "UI" | "Charting" | "Utility";
|
|
5860
5862
|
DisplayName?: string;
|
|
5861
5863
|
Version?: string;
|
|
@@ -5868,6 +5870,7 @@ export declare const ComponentLibrarySchema: z.ZodObject<{
|
|
|
5868
5870
|
__mj_UpdatedAt?: Date;
|
|
5869
5871
|
Name?: string;
|
|
5870
5872
|
Description?: string;
|
|
5873
|
+
Status?: "Disabled" | "Active" | "Deprecated";
|
|
5871
5874
|
Category?: "Other" | "Core" | "Runtime" | "UI" | "Charting" | "Utility";
|
|
5872
5875
|
DisplayName?: string;
|
|
5873
5876
|
Version?: string;
|
|
@@ -25325,6 +25328,20 @@ export declare class ComponentLibraryEntity extends BaseEntity<ComponentLibraryE
|
|
|
25325
25328
|
* * Default Value: getutcdate()
|
|
25326
25329
|
*/
|
|
25327
25330
|
get __mj_UpdatedAt(): Date;
|
|
25331
|
+
/**
|
|
25332
|
+
* * Field Name: Status
|
|
25333
|
+
* * Display Name: Status
|
|
25334
|
+
* * SQL Data Type: nvarchar(20)
|
|
25335
|
+
* * Default Value: Active
|
|
25336
|
+
* * Value List Type: List
|
|
25337
|
+
* * Possible Values
|
|
25338
|
+
* * Active
|
|
25339
|
+
* * Deprecated
|
|
25340
|
+
* * Disabled
|
|
25341
|
+
* * Description: Status of the component library. Active: fully supported; Deprecated: works but shows console warning; Disabled: throws error if used
|
|
25342
|
+
*/
|
|
25343
|
+
get Status(): 'Active' | 'Deprecated' | 'Disabled';
|
|
25344
|
+
set Status(value: 'Active' | 'Deprecated' | 'Disabled');
|
|
25328
25345
|
}
|
|
25329
25346
|
/**
|
|
25330
25347
|
* MJ: Component Library Links - strongly typed entity sub-class
|