@memberjunction/core-entities 2.131.0 → 2.133.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/custom/ListDetailEntityExtended.d.ts +42 -0
- package/dist/custom/ListDetailEntityExtended.d.ts.map +1 -1
- package/dist/custom/ListDetailEntityExtended.js +124 -0
- package/dist/custom/ListDetailEntityExtended.js.map +1 -1
- package/dist/custom/UserViewEntity.d.ts +146 -9
- package/dist/custom/UserViewEntity.d.ts.map +1 -1
- package/dist/custom/UserViewEntity.js +71 -16
- package/dist/custom/UserViewEntity.js.map +1 -1
- package/dist/engines/UserInfoEngine.d.ts +26 -0
- package/dist/engines/UserInfoEngine.d.ts.map +1 -1
- package/dist/engines/UserInfoEngine.js +95 -0
- package/dist/engines/UserInfoEngine.js.map +1 -1
- package/dist/engines/UserViewEngine.d.ts +133 -0
- package/dist/engines/UserViewEngine.d.ts.map +1 -0
- package/dist/engines/UserViewEngine.js +244 -0
- package/dist/engines/UserViewEngine.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +317 -6
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +460 -7
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,47 @@
|
|
|
1
|
+
import { BaseEntity, CompositeKey, EntityInfo } from "@memberjunction/core";
|
|
1
2
|
import { ListDetailEntity } from "../generated/entity_subclasses";
|
|
2
3
|
export declare class ListDetailEntityExtended extends ListDetailEntity {
|
|
4
|
+
private _recordCompositeKey;
|
|
5
|
+
private _sourceEntityInfo;
|
|
6
|
+
/**
|
|
7
|
+
* Sets the RecordID from a source entity record.
|
|
8
|
+
* For single PK entities, stores just the raw PK value.
|
|
9
|
+
* For composite PK entities, stores the concatenated key format (Field1|Value1||Field2|Value2).
|
|
10
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
11
|
+
* @param record The source record (can be a BaseEntity or plain object with PK values)
|
|
12
|
+
*/
|
|
13
|
+
SetRecordIDFromEntity(entityInfo: EntityInfo, record: BaseEntity | Record<string, unknown>): void;
|
|
14
|
+
/**
|
|
15
|
+
* Gets a CompositeKey from the stored RecordID.
|
|
16
|
+
* Lazily builds and caches the CompositeKey.
|
|
17
|
+
* @param entityInfo Optional EntityInfo - required if not previously set via SetRecordIDFromEntity
|
|
18
|
+
* @returns CompositeKey representing the stored RecordID
|
|
19
|
+
*/
|
|
20
|
+
GetCompositeKey(entityInfo?: EntityInfo): CompositeKey;
|
|
21
|
+
/**
|
|
22
|
+
* Extracts the raw primary key value(s) from the RecordID.
|
|
23
|
+
* For single PK, returns the raw value directly.
|
|
24
|
+
* For composite PK, returns an object with field names and values.
|
|
25
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
26
|
+
* @returns The raw PK value (string) for single PK, or Record<string, unknown> for composite
|
|
27
|
+
*/
|
|
28
|
+
GetRawPrimaryKeyValue(entityInfo: EntityInfo): string | Record<string, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* Static utility to build the appropriate RecordID value from a source record.
|
|
31
|
+
* Use this when you need to build a RecordID without creating a ListDetailEntity.
|
|
32
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
33
|
+
* @param record The source record
|
|
34
|
+
* @returns The properly formatted RecordID string
|
|
35
|
+
*/
|
|
36
|
+
static BuildRecordID(entityInfo: EntityInfo, record: BaseEntity | Record<string, unknown>): string;
|
|
37
|
+
/**
|
|
38
|
+
* Static utility to extract raw PK value from a RecordID string.
|
|
39
|
+
* Handles both single PK (raw value) and composite PK (concatenated) formats.
|
|
40
|
+
* @param recordId The RecordID value from a ListDetail record
|
|
41
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
42
|
+
* @returns For single PK: the raw value. For composite PK: the full concatenated string.
|
|
43
|
+
*/
|
|
44
|
+
static ExtractPrimaryKeyValue(recordId: string, entityInfo: EntityInfo): string;
|
|
3
45
|
Save(): Promise<boolean>;
|
|
4
46
|
}
|
|
5
47
|
//# sourceMappingURL=ListDetailEntityExtended.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListDetailEntityExtended.d.ts","sourceRoot":"","sources":["../../src/custom/ListDetailEntityExtended.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListDetailEntityExtended.d.ts","sourceRoot":"","sources":["../../src/custom/ListDetailEntityExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoB,YAAY,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAExG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,qBACa,wBAAyB,SAAQ,gBAAgB;IAC1D,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,iBAAiB,CAA2B;IAEpD;;;;;;OAMG;IACI,qBAAqB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAoBxG;;;;;OAKG;IACI,eAAe,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY;IAmC7D;;;;;;OAMG;IACI,qBAAqB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAiBtF;;;;;;OAMG;WACW,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAgBzG;;;;;;OAMG;WACW,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM;IAOzE,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;CAkDxC"}
|
|
@@ -11,6 +11,130 @@ const core_1 = require("@memberjunction/core");
|
|
|
11
11
|
const global_1 = require("@memberjunction/global");
|
|
12
12
|
const entity_subclasses_1 = require("../generated/entity_subclasses");
|
|
13
13
|
let ListDetailEntityExtended = class ListDetailEntityExtended extends entity_subclasses_1.ListDetailEntity {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this._recordCompositeKey = null;
|
|
17
|
+
this._sourceEntityInfo = null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Sets the RecordID from a source entity record.
|
|
21
|
+
* For single PK entities, stores just the raw PK value.
|
|
22
|
+
* For composite PK entities, stores the concatenated key format (Field1|Value1||Field2|Value2).
|
|
23
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
24
|
+
* @param record The source record (can be a BaseEntity or plain object with PK values)
|
|
25
|
+
*/
|
|
26
|
+
SetRecordIDFromEntity(entityInfo, record) {
|
|
27
|
+
this._sourceEntityInfo = entityInfo;
|
|
28
|
+
const primaryKeys = entityInfo.PrimaryKeys;
|
|
29
|
+
if (primaryKeys.length === 1) {
|
|
30
|
+
// Single PK: store just the raw value
|
|
31
|
+
const pkField = primaryKeys[0].Name;
|
|
32
|
+
const value = record instanceof core_1.BaseEntity ? record.Get(pkField) : record[pkField];
|
|
33
|
+
this.RecordID = String(value);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// Composite PK: store concatenated format
|
|
37
|
+
const compositeKey = new core_1.CompositeKey();
|
|
38
|
+
compositeKey.LoadFromEntityInfoAndRecord(entityInfo, record);
|
|
39
|
+
this.RecordID = compositeKey.ToConcatenatedString();
|
|
40
|
+
}
|
|
41
|
+
// Clear cached composite key since RecordID changed
|
|
42
|
+
this._recordCompositeKey = null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Gets a CompositeKey from the stored RecordID.
|
|
46
|
+
* Lazily builds and caches the CompositeKey.
|
|
47
|
+
* @param entityInfo Optional EntityInfo - required if not previously set via SetRecordIDFromEntity
|
|
48
|
+
* @returns CompositeKey representing the stored RecordID
|
|
49
|
+
*/
|
|
50
|
+
GetCompositeKey(entityInfo) {
|
|
51
|
+
if (this._recordCompositeKey) {
|
|
52
|
+
return this._recordCompositeKey;
|
|
53
|
+
}
|
|
54
|
+
const effectiveEntityInfo = entityInfo || this._sourceEntityInfo;
|
|
55
|
+
if (!effectiveEntityInfo) {
|
|
56
|
+
// Try to get entity info from the List's EntityID
|
|
57
|
+
const md = new core_1.Metadata();
|
|
58
|
+
const list = md.Entities.find(e => e.Name === 'Lists');
|
|
59
|
+
if (!list) {
|
|
60
|
+
throw new Error('Cannot determine entity info. Provide entityInfo parameter or call SetRecordIDFromEntity first.');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
this._recordCompositeKey = new core_1.CompositeKey();
|
|
64
|
+
if (effectiveEntityInfo && effectiveEntityInfo.PrimaryKeys.length === 1) {
|
|
65
|
+
// Single PK: RecordID is just the raw value
|
|
66
|
+
const pkField = effectiveEntityInfo.PrimaryKeys[0].Name;
|
|
67
|
+
this._recordCompositeKey.KeyValuePairs = [{ FieldName: pkField, Value: this.RecordID }];
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
// Composite PK or unknown: try to parse as concatenated string
|
|
71
|
+
this._recordCompositeKey.LoadFromConcatenatedString(this.RecordID);
|
|
72
|
+
// If parsing failed (no delimiters found), treat as single value
|
|
73
|
+
if (this._recordCompositeKey.KeyValuePairs.length === 0) {
|
|
74
|
+
const pkField = effectiveEntityInfo?.PrimaryKeys[0]?.Name || 'ID';
|
|
75
|
+
this._recordCompositeKey.KeyValuePairs = [{ FieldName: pkField, Value: this.RecordID }];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return this._recordCompositeKey;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Extracts the raw primary key value(s) from the RecordID.
|
|
82
|
+
* For single PK, returns the raw value directly.
|
|
83
|
+
* For composite PK, returns an object with field names and values.
|
|
84
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
85
|
+
* @returns The raw PK value (string) for single PK, or Record<string, unknown> for composite
|
|
86
|
+
*/
|
|
87
|
+
GetRawPrimaryKeyValue(entityInfo) {
|
|
88
|
+
const primaryKeys = entityInfo.PrimaryKeys;
|
|
89
|
+
if (primaryKeys.length === 1) {
|
|
90
|
+
// Single PK: RecordID is the raw value
|
|
91
|
+
return this.RecordID;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
// Composite PK: parse and return as object
|
|
95
|
+
const compositeKey = this.GetCompositeKey(entityInfo);
|
|
96
|
+
const result = {};
|
|
97
|
+
for (const kvp of compositeKey.KeyValuePairs) {
|
|
98
|
+
result[kvp.FieldName] = kvp.Value;
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Static utility to build the appropriate RecordID value from a source record.
|
|
105
|
+
* Use this when you need to build a RecordID without creating a ListDetailEntity.
|
|
106
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
107
|
+
* @param record The source record
|
|
108
|
+
* @returns The properly formatted RecordID string
|
|
109
|
+
*/
|
|
110
|
+
static BuildRecordID(entityInfo, record) {
|
|
111
|
+
const primaryKeys = entityInfo.PrimaryKeys;
|
|
112
|
+
if (primaryKeys.length === 1) {
|
|
113
|
+
// Single PK: return just the raw value
|
|
114
|
+
const pkField = primaryKeys[0].Name;
|
|
115
|
+
const value = record instanceof core_1.BaseEntity ? record.Get(pkField) : record[pkField];
|
|
116
|
+
return String(value);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
// Composite PK: return concatenated format
|
|
120
|
+
const compositeKey = new core_1.CompositeKey();
|
|
121
|
+
compositeKey.LoadFromEntityInfoAndRecord(entityInfo, record);
|
|
122
|
+
return compositeKey.ToConcatenatedString();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Static utility to extract raw PK value from a RecordID string.
|
|
127
|
+
* Handles both single PK (raw value) and composite PK (concatenated) formats.
|
|
128
|
+
* @param recordId The RecordID value from a ListDetail record
|
|
129
|
+
* @param entityInfo The EntityInfo for the source entity
|
|
130
|
+
* @returns For single PK: the raw value. For composite PK: the full concatenated string.
|
|
131
|
+
*/
|
|
132
|
+
static ExtractPrimaryKeyValue(recordId, entityInfo) {
|
|
133
|
+
// For single PK entities, RecordID is stored as raw value, so return as-is
|
|
134
|
+
// For composite PK entities, RecordID is stored as concatenated string, return as-is
|
|
135
|
+
// The caller should use this value appropriately based on their context
|
|
136
|
+
return recordId;
|
|
137
|
+
}
|
|
14
138
|
async Save() {
|
|
15
139
|
const currentResultCount = this.ResultHistory.length;
|
|
16
140
|
const newResult = new core_1.BaseEntityResult();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListDetailEntityExtended.js","sourceRoot":"","sources":["../../src/custom/ListDetailEntityExtended.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"ListDetailEntityExtended.js","sourceRoot":"","sources":["../../src/custom/ListDetailEntityExtended.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAwG;AACxG,mDAAuD;AACvD,sEAAkE;AAG3D,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,oCAAgB;IAAvD;;QACK,wBAAmB,GAAwB,IAAI,CAAC;QAChD,sBAAiB,GAAsB,IAAI,CAAC;IAqLxD,CAAC;IAnLG;;;;;;OAMG;IACI,qBAAqB,CAAC,UAAsB,EAAE,MAA4C;QAC7F,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC;QACpC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAE3C,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,sCAAsC;YACtC,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACpC,MAAM,KAAK,GAAG,MAAM,YAAY,iBAAU,CAAC,CA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EAAE,CAAC,CAAC,QAAQ,EAAC,CAAA,CAAC,CAAC,CAAC,CAAC;gBACvG,SAAS,CAAC,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;gBAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvC,CAAC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ,CAAA;AAvLY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAa,EAAC,iBAAU,EAAE,cAAc,CAAC;GAC7B,wBAAwB,CAuLpC"}
|
|
@@ -206,35 +206,61 @@ export declare class ViewInfo {
|
|
|
206
206
|
*/
|
|
207
207
|
static GetViewID(viewName: string): Promise<string>;
|
|
208
208
|
/**
|
|
209
|
-
*
|
|
209
|
+
* Gets a User View entity from the UserViewEngine cache.
|
|
210
210
|
* @param viewId record ID for the view to load
|
|
211
|
-
* @param contextUser optional, the user
|
|
211
|
+
* @param contextUser optional, the user context for loading views
|
|
212
212
|
* @returns UserViewEntityBase (or a subclass of it)
|
|
213
|
-
* @throws Error if the view
|
|
213
|
+
* @throws Error if the view is not found in the engine cache
|
|
214
214
|
* @memberof ViewInfo
|
|
215
215
|
* @static
|
|
216
216
|
* @async
|
|
217
217
|
*/
|
|
218
218
|
static GetViewEntity(viewId: string, contextUser?: UserInfo): Promise<UserViewEntityExtended>;
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
220
|
+
* Gets a User View entity from the UserViewEngine cache by name.
|
|
221
221
|
* @param viewName name for the view to load
|
|
222
|
-
* @param contextUser optional, the user
|
|
222
|
+
* @param contextUser optional, the user context for loading views
|
|
223
223
|
* @returns UserViewEntityBase (or a subclass of it)
|
|
224
|
-
* @throws Error if the view
|
|
224
|
+
* @throws Error if the view is not found in the engine cache
|
|
225
225
|
* @memberof ViewInfo
|
|
226
226
|
* @static
|
|
227
227
|
* @async
|
|
228
228
|
*/
|
|
229
229
|
static GetViewEntityByName(viewName: string, contextUser?: UserInfo): Promise<UserViewEntityExtended>;
|
|
230
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Column pinning position for AG Grid
|
|
233
|
+
*/
|
|
234
|
+
export type ViewColumnPinned = 'left' | 'right' | null;
|
|
235
|
+
/**
|
|
236
|
+
* Column information for a saved view, including AG Grid-specific properties
|
|
237
|
+
*/
|
|
231
238
|
export declare class ViewColumnInfo extends BaseInfo {
|
|
239
|
+
/** Entity field ID */
|
|
232
240
|
ID: string;
|
|
241
|
+
/** Field name */
|
|
233
242
|
Name: string;
|
|
243
|
+
/** Display name for column header (from entity metadata) */
|
|
234
244
|
DisplayName: string;
|
|
245
|
+
/** User-defined display name override for column header */
|
|
246
|
+
userDisplayName?: string;
|
|
247
|
+
/** Whether column is hidden */
|
|
235
248
|
hidden: boolean;
|
|
249
|
+
/** Column width in pixels */
|
|
236
250
|
width?: number;
|
|
251
|
+
/** Column order index */
|
|
237
252
|
orderIndex?: number;
|
|
253
|
+
/** Column pinning position ('left', 'right', or null for not pinned) */
|
|
254
|
+
pinned?: ViewColumnPinned;
|
|
255
|
+
/** Flex grow factor (for auto-sizing columns) */
|
|
256
|
+
flex?: number;
|
|
257
|
+
/** Minimum column width */
|
|
258
|
+
minWidth?: number;
|
|
259
|
+
/** Maximum column width */
|
|
260
|
+
maxWidth?: number;
|
|
261
|
+
/** Column formatting configuration */
|
|
262
|
+
format?: ColumnFormat;
|
|
263
|
+
/** Reference to the entity field metadata (not persisted) */
|
|
238
264
|
EntityField: EntityFieldInfo;
|
|
239
265
|
constructor(initData?: any);
|
|
240
266
|
}
|
|
@@ -261,10 +287,121 @@ export declare class ViewSortInfo extends BaseInfo {
|
|
|
261
287
|
direction: ViewSortDirectionInfo;
|
|
262
288
|
constructor(initData?: any);
|
|
263
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Sort setting for a single column
|
|
292
|
+
*/
|
|
293
|
+
export interface ViewGridSortSetting {
|
|
294
|
+
/** Field name to sort by */
|
|
295
|
+
field: string;
|
|
296
|
+
/** Sort direction */
|
|
297
|
+
dir: 'asc' | 'desc';
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Column setting as persisted in GridState JSON
|
|
301
|
+
* This is the serializable form of ViewColumnInfo (without EntityField reference)
|
|
302
|
+
*/
|
|
303
|
+
export interface ViewGridColumnSetting {
|
|
304
|
+
/** Entity field ID */
|
|
305
|
+
ID?: string;
|
|
306
|
+
/** Field name */
|
|
307
|
+
Name: string;
|
|
308
|
+
/** Display name for column header (from entity metadata) */
|
|
309
|
+
DisplayName?: string;
|
|
310
|
+
/** User-defined display name override for column header */
|
|
311
|
+
userDisplayName?: string;
|
|
312
|
+
/** Whether column is hidden */
|
|
313
|
+
hidden?: boolean;
|
|
314
|
+
/** Column width in pixels */
|
|
315
|
+
width?: number;
|
|
316
|
+
/** Column order index */
|
|
317
|
+
orderIndex?: number;
|
|
318
|
+
/** Column pinning position */
|
|
319
|
+
pinned?: ViewColumnPinned;
|
|
320
|
+
/** Flex grow factor */
|
|
321
|
+
flex?: number;
|
|
322
|
+
/** Minimum column width */
|
|
323
|
+
minWidth?: number;
|
|
324
|
+
/** Maximum column width */
|
|
325
|
+
maxWidth?: number;
|
|
326
|
+
/** Column formatting configuration */
|
|
327
|
+
format?: ColumnFormat;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Text styling options for column headers and cells
|
|
331
|
+
*/
|
|
332
|
+
export interface ColumnTextStyle {
|
|
333
|
+
/** Bold text */
|
|
334
|
+
bold?: boolean;
|
|
335
|
+
/** Italic text */
|
|
336
|
+
italic?: boolean;
|
|
337
|
+
/** Underlined text */
|
|
338
|
+
underline?: boolean;
|
|
339
|
+
/** Text color (CSS color value) */
|
|
340
|
+
color?: string;
|
|
341
|
+
/** Background color (CSS color value) */
|
|
342
|
+
backgroundColor?: string;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Conditional formatting rule for dynamic cell styling
|
|
346
|
+
*/
|
|
347
|
+
export interface ColumnConditionalRule {
|
|
348
|
+
/** Condition type */
|
|
349
|
+
condition: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'between' | 'contains' | 'startsWith' | 'endsWith' | 'isEmpty' | 'isNotEmpty';
|
|
350
|
+
/** Value to compare against */
|
|
351
|
+
value?: string | number | boolean;
|
|
352
|
+
/** Second value for 'between' condition */
|
|
353
|
+
value2?: number;
|
|
354
|
+
/** Style to apply when condition is met */
|
|
355
|
+
style: ColumnTextStyle;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Column formatting configuration
|
|
359
|
+
* Supports value formatting, alignment, header/cell styling, and conditional formatting
|
|
360
|
+
*/
|
|
361
|
+
export interface ColumnFormat {
|
|
362
|
+
/**
|
|
363
|
+
* Format type - determines which formatter to use
|
|
364
|
+
* 'auto' uses smart defaults based on field metadata
|
|
365
|
+
*/
|
|
366
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'datetime' | 'boolean' | 'text';
|
|
367
|
+
/** Decimal places for number/currency/percent types */
|
|
368
|
+
decimals?: number;
|
|
369
|
+
/** Currency code (ISO 4217) for currency type, e.g., 'USD', 'EUR' */
|
|
370
|
+
currencyCode?: string;
|
|
371
|
+
/** Show thousands separator for number types */
|
|
372
|
+
thousandsSeparator?: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Date format preset or custom pattern
|
|
375
|
+
* Presets: 'short', 'medium', 'long'
|
|
376
|
+
* Custom: Any valid date format string
|
|
377
|
+
*/
|
|
378
|
+
dateFormat?: 'short' | 'medium' | 'long' | string;
|
|
379
|
+
/** Label to display for true values (boolean type) */
|
|
380
|
+
trueLabel?: string;
|
|
381
|
+
/** Label to display for false values (boolean type) */
|
|
382
|
+
falseLabel?: string;
|
|
383
|
+
/** How to display boolean values */
|
|
384
|
+
booleanDisplay?: 'text' | 'checkbox' | 'icon';
|
|
385
|
+
/** Text alignment */
|
|
386
|
+
align?: 'left' | 'center' | 'right';
|
|
387
|
+
/** Header styling (bold, italic, color, etc.) */
|
|
388
|
+
headerStyle?: ColumnTextStyle;
|
|
389
|
+
/** Cell styling (applies to all cells in the column) */
|
|
390
|
+
cellStyle?: ColumnTextStyle;
|
|
391
|
+
/** Conditional formatting rules (applied in order, first match wins) */
|
|
392
|
+
conditionalRules?: ColumnConditionalRule[];
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Grid state persisted in UserView.GridState column
|
|
396
|
+
* Contains column configuration, sort settings, and optional filter state
|
|
397
|
+
*/
|
|
264
398
|
export declare class ViewGridState {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
399
|
+
/** Sort settings - array of field/direction pairs */
|
|
400
|
+
sortSettings?: ViewGridSortSetting[];
|
|
401
|
+
/** Column settings - visibility, width, order, pinning, etc. */
|
|
402
|
+
columnSettings?: ViewGridColumnSetting[];
|
|
403
|
+
/** Filter state (Kendo-compatible format) */
|
|
404
|
+
filter?: ViewFilterInfo;
|
|
268
405
|
}
|
|
269
406
|
/**
|
|
270
407
|
* View display modes supported by the entity viewer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserViewEntity.d.ts","sourceRoot":"","sources":["../../src/custom/UserViewEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAU,QAAQ,EAAE,iBAAiB,EAAuE,MAAM,sBAAsB,CAAC;AAC7M,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIhE,qBACa,sBAAuB,SAAQ,cAAc;IACtD,OAAO,CAAC,eAAe,CAAmB;IAE1C;;;;;;;OAOG;IACH,IAAW,MAAM,IAAI,cAAc,EAAE,CAMpC;IAED;;;;OAIG;IACH,IAAW,OAAO,IAAI,cAAc,EAAE,CAwBrC;IAED;;;;;OAKG;IACH,IAAW,cAAc,IAAI,UAAU,CAEtC;IAED,IAAW,YAAY,IAAI,YAAY,EAAE,CAQxC;IAED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OAAO,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;CACpD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2DAA2D;IAC3D,WAAW,EAAE,eAAe,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,sCAAsC;IACtC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,kCAAkC;IAClC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,kCAAkC;IAClC,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
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
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.ViewGridState = exports.ViewSortInfo = exports.ViewSortDirectionInfo = exports.ViewFilterInfo = exports.ViewFilterLogicInfo = exports.ViewColumnInfo = exports.ViewInfo = exports.UserViewEntityExtended = void 0;
|
|
10
33
|
const global_1 = require("@memberjunction/global");
|
|
@@ -676,51 +699,79 @@ class ViewInfo {
|
|
|
676
699
|
}
|
|
677
700
|
}
|
|
678
701
|
/**
|
|
679
|
-
*
|
|
702
|
+
* Gets a User View entity from the UserViewEngine cache.
|
|
680
703
|
* @param viewId record ID for the view to load
|
|
681
|
-
* @param contextUser optional, the user
|
|
704
|
+
* @param contextUser optional, the user context for loading views
|
|
682
705
|
* @returns UserViewEntityBase (or a subclass of it)
|
|
683
|
-
* @throws Error if the view
|
|
706
|
+
* @throws Error if the view is not found in the engine cache
|
|
684
707
|
* @memberof ViewInfo
|
|
685
708
|
* @static
|
|
686
709
|
* @async
|
|
687
710
|
*/
|
|
688
711
|
static async GetViewEntity(viewId, contextUser) {
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
|
|
712
|
+
const { UserViewEngine } = await Promise.resolve().then(() => __importStar(require('../engines/UserViewEngine')));
|
|
713
|
+
// Ensure the engine is configured before use
|
|
714
|
+
await UserViewEngine.Instance.Config(false, contextUser);
|
|
715
|
+
const view = UserViewEngine.Instance.GetViewById(viewId);
|
|
716
|
+
if (view) {
|
|
692
717
|
return view;
|
|
693
|
-
|
|
694
|
-
|
|
718
|
+
}
|
|
719
|
+
throw new Error('Unable to find view with ID: ' + viewId);
|
|
695
720
|
}
|
|
696
721
|
/**
|
|
697
|
-
*
|
|
722
|
+
* Gets a User View entity from the UserViewEngine cache by name.
|
|
698
723
|
* @param viewName name for the view to load
|
|
699
|
-
* @param contextUser optional, the user
|
|
724
|
+
* @param contextUser optional, the user context for loading views
|
|
700
725
|
* @returns UserViewEntityBase (or a subclass of it)
|
|
701
|
-
* @throws Error if the view
|
|
726
|
+
* @throws Error if the view is not found in the engine cache
|
|
702
727
|
* @memberof ViewInfo
|
|
703
728
|
* @static
|
|
704
729
|
* @async
|
|
705
730
|
*/
|
|
706
731
|
static async GetViewEntityByName(viewName, contextUser) {
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
732
|
+
const { UserViewEngine } = await Promise.resolve().then(() => __importStar(require('../engines/UserViewEngine')));
|
|
733
|
+
// Ensure the engine is configured before use
|
|
734
|
+
await UserViewEngine.Instance.Config(false, contextUser);
|
|
735
|
+
const view = UserViewEngine.Instance.GetViewByName(viewName);
|
|
736
|
+
if (view) {
|
|
737
|
+
return view;
|
|
738
|
+
}
|
|
739
|
+
throw new Error('Unable to find view with name: ' + viewName);
|
|
712
740
|
}
|
|
713
741
|
}
|
|
714
742
|
exports.ViewInfo = ViewInfo;
|
|
743
|
+
/**
|
|
744
|
+
* Column information for a saved view, including AG Grid-specific properties
|
|
745
|
+
*/
|
|
715
746
|
class ViewColumnInfo extends core_1.BaseInfo {
|
|
716
747
|
constructor(initData = null) {
|
|
717
748
|
super();
|
|
749
|
+
/** Entity field ID */
|
|
718
750
|
this.ID = null;
|
|
751
|
+
/** Field name */
|
|
719
752
|
this.Name = null;
|
|
753
|
+
/** Display name for column header (from entity metadata) */
|
|
720
754
|
this.DisplayName = null;
|
|
755
|
+
/** User-defined display name override for column header */
|
|
756
|
+
this.userDisplayName = null;
|
|
757
|
+
/** Whether column is hidden */
|
|
721
758
|
this.hidden = null;
|
|
759
|
+
/** Column width in pixels */
|
|
722
760
|
this.width = null;
|
|
761
|
+
/** Column order index */
|
|
723
762
|
this.orderIndex = null;
|
|
763
|
+
// AG Grid-specific properties
|
|
764
|
+
/** Column pinning position ('left', 'right', or null for not pinned) */
|
|
765
|
+
this.pinned = null;
|
|
766
|
+
/** Flex grow factor (for auto-sizing columns) */
|
|
767
|
+
this.flex = null;
|
|
768
|
+
/** Minimum column width */
|
|
769
|
+
this.minWidth = null;
|
|
770
|
+
/** Maximum column width */
|
|
771
|
+
this.maxWidth = null;
|
|
772
|
+
/** Column formatting configuration */
|
|
773
|
+
this.format = null;
|
|
774
|
+
/** Reference to the entity field metadata (not persisted) */
|
|
724
775
|
this.EntityField = null;
|
|
725
776
|
this.copyInitData(initData);
|
|
726
777
|
}
|
|
@@ -764,6 +815,10 @@ class ViewSortInfo extends core_1.BaseInfo {
|
|
|
764
815
|
}
|
|
765
816
|
}
|
|
766
817
|
exports.ViewSortInfo = ViewSortInfo;
|
|
818
|
+
/**
|
|
819
|
+
* Grid state persisted in UserView.GridState column
|
|
820
|
+
* Contains column configuration, sort settings, and optional filter state
|
|
821
|
+
*/
|
|
767
822
|
class ViewGridState {
|
|
768
823
|
}
|
|
769
824
|
exports.ViewGridState = ViewGridState;
|