@memberjunction/ng-timeline 6.1.4 → 6.2.0-edge.1
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/lib/component/timeline.component.d.ts +312 -16
- package/dist/lib/component/timeline.component.d.ts.map +1 -1
- package/dist/lib/component/timeline.component.js +661 -195
- package/dist/lib/component/timeline.component.js.map +1 -1
- package/dist/lib/timeline-group.d.ts +22 -0
- package/dist/lib/timeline-group.d.ts.map +1 -1
- package/dist/lib/timeline-group.js +62 -18
- package/dist/lib/timeline-group.js.map +1 -1
- package/package.json +5 -5
|
@@ -30,6 +30,8 @@ import { TimelineCardConfig, TimelineEventConfig } from './types';
|
|
|
30
30
|
* const name = getFieldValue(obj, 'name'); // Uses obj['name']
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
+
export declare function GetFieldValue(record: any, fieldName: string): unknown;
|
|
34
|
+
/** @deprecated Use {@link GetFieldValue}. */
|
|
33
35
|
export declare function getFieldValue(record: any, fieldName: string): unknown;
|
|
34
36
|
/**
|
|
35
37
|
* Extracts an ID from a record, trying common ID field names.
|
|
@@ -38,6 +40,8 @@ export declare function getFieldValue(record: any, fieldName: string): unknown;
|
|
|
38
40
|
* @param idFieldName - Optional explicit ID field name
|
|
39
41
|
* @returns The record ID as a string, or a generated fallback ID
|
|
40
42
|
*/
|
|
43
|
+
export declare function GetRecordId(record: any, idFieldName?: string): string;
|
|
44
|
+
/** @deprecated Use {@link GetRecordId}. */
|
|
41
45
|
export declare function getRecordId(record: any, idFieldName?: string): string;
|
|
42
46
|
/**
|
|
43
47
|
* Configures a data source for the timeline component.
|
|
@@ -267,6 +271,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
267
271
|
*
|
|
268
272
|
* @returns The merged card configuration
|
|
269
273
|
*/
|
|
274
|
+
GetEffectiveCardConfig(): TimelineCardConfig;
|
|
275
|
+
/** @deprecated Use {@link GetEffectiveCardConfig}. */
|
|
270
276
|
getEffectiveCardConfig(): TimelineCardConfig;
|
|
271
277
|
/**
|
|
272
278
|
* Extracts a field value from a record in this group.
|
|
@@ -275,6 +281,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
275
281
|
* @param fieldName - The field name to extract
|
|
276
282
|
* @returns The field value
|
|
277
283
|
*/
|
|
284
|
+
GetValue(record: T, fieldName: string): unknown;
|
|
285
|
+
/** @deprecated Use {@link GetValue}. */
|
|
278
286
|
getValue(record: T, fieldName: string): unknown;
|
|
279
287
|
/**
|
|
280
288
|
* Gets the ID of a record in this group.
|
|
@@ -282,6 +290,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
282
290
|
* @param record - The source record
|
|
283
291
|
* @returns The record ID
|
|
284
292
|
*/
|
|
293
|
+
GetId(record: T): string;
|
|
294
|
+
/** @deprecated Use {@link GetId}. */
|
|
285
295
|
getId(record: T): string;
|
|
286
296
|
/**
|
|
287
297
|
* Gets the title from a record.
|
|
@@ -289,6 +299,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
289
299
|
* @param record - The source record
|
|
290
300
|
* @returns The title string
|
|
291
301
|
*/
|
|
302
|
+
GetTitle(record: T): string;
|
|
303
|
+
/** @deprecated Use {@link GetTitle}. */
|
|
292
304
|
getTitle(record: T): string;
|
|
293
305
|
/**
|
|
294
306
|
* Gets the date from a record.
|
|
@@ -296,6 +308,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
296
308
|
* @param record - The source record
|
|
297
309
|
* @returns The date object
|
|
298
310
|
*/
|
|
311
|
+
GetDate(record: T): Date;
|
|
312
|
+
/** @deprecated Use {@link GetDate}. */
|
|
299
313
|
getDate(record: T): Date;
|
|
300
314
|
/**
|
|
301
315
|
* Gets the subtitle from a record.
|
|
@@ -303,6 +317,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
303
317
|
* @param record - The source record
|
|
304
318
|
* @returns The subtitle string, or undefined
|
|
305
319
|
*/
|
|
320
|
+
GetSubtitle(record: T): string | undefined;
|
|
321
|
+
/** @deprecated Use {@link GetSubtitle}. */
|
|
306
322
|
getSubtitle(record: T): string | undefined;
|
|
307
323
|
/**
|
|
308
324
|
* Gets the description from a record.
|
|
@@ -310,6 +326,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
310
326
|
* @param record - The source record
|
|
311
327
|
* @returns The description string, or undefined
|
|
312
328
|
*/
|
|
329
|
+
GetDescription(record: T): string | undefined;
|
|
330
|
+
/** @deprecated Use {@link GetDescription}. */
|
|
313
331
|
getDescription(record: T): string | undefined;
|
|
314
332
|
/**
|
|
315
333
|
* Gets the image URL from a record.
|
|
@@ -317,6 +335,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
317
335
|
* @param record - The source record
|
|
318
336
|
* @returns The image URL, or undefined
|
|
319
337
|
*/
|
|
338
|
+
GetImageUrl(record: T): string | undefined;
|
|
339
|
+
/** @deprecated Use {@link GetImageUrl}. */
|
|
320
340
|
getImageUrl(record: T): string | undefined;
|
|
321
341
|
/**
|
|
322
342
|
* Gets the event configuration for a specific record.
|
|
@@ -324,6 +344,8 @@ export declare class TimelineGroup<T = any> {
|
|
|
324
344
|
* @param record - The source record
|
|
325
345
|
* @returns The event configuration (from EventConfigFunction or defaults)
|
|
326
346
|
*/
|
|
347
|
+
GetEventConfig(record: T): TimelineEventConfig;
|
|
348
|
+
/** @deprecated Use {@link GetEventConfig}. */
|
|
327
349
|
getEventConfig(record: T): TimelineEventConfig;
|
|
328
350
|
/**
|
|
329
351
|
* Creates a TimelineGroup from MemberJunction RunViewParams.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-group.d.ts","sourceRoot":"","sources":["../../src/lib/timeline-group.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAqB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAMjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,a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,aAAa,CAAC,CAAC,CAAC;CAyBpB"}
|
|
@@ -33,7 +33,7 @@ import { DEFAULT_CARD_CONFIG } from './types';
|
|
|
33
33
|
* const name = getFieldValue(obj, 'name'); // Uses obj['name']
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export function
|
|
36
|
+
export function GetFieldValue(record, fieldName) {
|
|
37
37
|
if (record == null) {
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
@@ -44,6 +44,10 @@ export function getFieldValue(record, fieldName) {
|
|
|
44
44
|
// Plain object - use bracket notation
|
|
45
45
|
return record[fieldName];
|
|
46
46
|
}
|
|
47
|
+
/** @deprecated Use {@link GetFieldValue}. */
|
|
48
|
+
export function getFieldValue(record, fieldName) {
|
|
49
|
+
return GetFieldValue(record, fieldName);
|
|
50
|
+
}
|
|
47
51
|
/**
|
|
48
52
|
* Extracts an ID from a record, trying common ID field names.
|
|
49
53
|
*
|
|
@@ -51,13 +55,13 @@ export function getFieldValue(record, fieldName) {
|
|
|
51
55
|
* @param idFieldName - Optional explicit ID field name
|
|
52
56
|
* @returns The record ID as a string, or a generated fallback ID
|
|
53
57
|
*/
|
|
54
|
-
export function
|
|
58
|
+
export function GetRecordId(record, idFieldName) {
|
|
55
59
|
if (record == null) {
|
|
56
60
|
return `generated-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
57
61
|
}
|
|
58
62
|
// Try explicit field name first
|
|
59
63
|
if (idFieldName) {
|
|
60
|
-
const id =
|
|
64
|
+
const id = GetFieldValue(record, idFieldName);
|
|
61
65
|
if (id != null) {
|
|
62
66
|
return String(id);
|
|
63
67
|
}
|
|
@@ -65,7 +69,7 @@ export function getRecordId(record, idFieldName) {
|
|
|
65
69
|
// Try common ID field names
|
|
66
70
|
const commonIdFields = ['ID', 'id', 'Id', '_id', 'uuid', 'UUID'];
|
|
67
71
|
for (const field of commonIdFields) {
|
|
68
|
-
const id =
|
|
72
|
+
const id = GetFieldValue(record, field);
|
|
69
73
|
if (id != null) {
|
|
70
74
|
return String(id);
|
|
71
75
|
}
|
|
@@ -73,6 +77,10 @@ export function getRecordId(record, idFieldName) {
|
|
|
73
77
|
// Fallback: generate a unique ID
|
|
74
78
|
return `generated-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
75
79
|
}
|
|
80
|
+
/** @deprecated Use {@link GetRecordId}. */
|
|
81
|
+
export function getRecordId(record, idFieldName) {
|
|
82
|
+
return GetRecordId(record, idFieldName);
|
|
83
|
+
}
|
|
76
84
|
// ============================================================================
|
|
77
85
|
// TIMELINE GROUP CLASS
|
|
78
86
|
// ============================================================================
|
|
@@ -322,12 +330,16 @@ export class TimelineGroup {
|
|
|
322
330
|
*
|
|
323
331
|
* @returns The merged card configuration
|
|
324
332
|
*/
|
|
325
|
-
|
|
333
|
+
GetEffectiveCardConfig() {
|
|
326
334
|
return {
|
|
327
335
|
...DEFAULT_CARD_CONFIG,
|
|
328
336
|
...this.CardConfig
|
|
329
337
|
};
|
|
330
338
|
}
|
|
339
|
+
/** @deprecated Use {@link GetEffectiveCardConfig}. */
|
|
340
|
+
getEffectiveCardConfig() {
|
|
341
|
+
return this.GetEffectiveCardConfig();
|
|
342
|
+
}
|
|
331
343
|
/**
|
|
332
344
|
* Extracts a field value from a record in this group.
|
|
333
345
|
*
|
|
@@ -335,8 +347,12 @@ export class TimelineGroup {
|
|
|
335
347
|
* @param fieldName - The field name to extract
|
|
336
348
|
* @returns The field value
|
|
337
349
|
*/
|
|
350
|
+
GetValue(record, fieldName) {
|
|
351
|
+
return GetFieldValue(record, fieldName);
|
|
352
|
+
}
|
|
353
|
+
/** @deprecated Use {@link GetValue}. */
|
|
338
354
|
getValue(record, fieldName) {
|
|
339
|
-
return
|
|
355
|
+
return this.GetValue(record, fieldName);
|
|
340
356
|
}
|
|
341
357
|
/**
|
|
342
358
|
* Gets the ID of a record in this group.
|
|
@@ -344,8 +360,12 @@ export class TimelineGroup {
|
|
|
344
360
|
* @param record - The source record
|
|
345
361
|
* @returns The record ID
|
|
346
362
|
*/
|
|
363
|
+
GetId(record) {
|
|
364
|
+
return GetRecordId(record, this.IdFieldName);
|
|
365
|
+
}
|
|
366
|
+
/** @deprecated Use {@link GetId}. */
|
|
347
367
|
getId(record) {
|
|
348
|
-
return
|
|
368
|
+
return this.GetId(record);
|
|
349
369
|
}
|
|
350
370
|
/**
|
|
351
371
|
* Gets the title from a record.
|
|
@@ -353,18 +373,22 @@ export class TimelineGroup {
|
|
|
353
373
|
* @param record - The source record
|
|
354
374
|
* @returns The title string
|
|
355
375
|
*/
|
|
356
|
-
|
|
357
|
-
const value = this.
|
|
376
|
+
GetTitle(record) {
|
|
377
|
+
const value = this.GetValue(record, this.TitleFieldName);
|
|
358
378
|
return value != null ? String(value) : '';
|
|
359
379
|
}
|
|
380
|
+
/** @deprecated Use {@link GetTitle}. */
|
|
381
|
+
getTitle(record) {
|
|
382
|
+
return this.GetTitle(record);
|
|
383
|
+
}
|
|
360
384
|
/**
|
|
361
385
|
* Gets the date from a record.
|
|
362
386
|
*
|
|
363
387
|
* @param record - The source record
|
|
364
388
|
* @returns The date object
|
|
365
389
|
*/
|
|
366
|
-
|
|
367
|
-
const value = this.
|
|
390
|
+
GetDate(record) {
|
|
391
|
+
const value = this.GetValue(record, this.DateFieldName);
|
|
368
392
|
if (value instanceof Date) {
|
|
369
393
|
return value;
|
|
370
394
|
}
|
|
@@ -373,63 +397,83 @@ export class TimelineGroup {
|
|
|
373
397
|
}
|
|
374
398
|
return new Date();
|
|
375
399
|
}
|
|
400
|
+
/** @deprecated Use {@link GetDate}. */
|
|
401
|
+
getDate(record) {
|
|
402
|
+
return this.GetDate(record);
|
|
403
|
+
}
|
|
376
404
|
/**
|
|
377
405
|
* Gets the subtitle from a record.
|
|
378
406
|
*
|
|
379
407
|
* @param record - The source record
|
|
380
408
|
* @returns The subtitle string, or undefined
|
|
381
409
|
*/
|
|
382
|
-
|
|
410
|
+
GetSubtitle(record) {
|
|
383
411
|
if (!this.SubtitleFieldName) {
|
|
384
412
|
return undefined;
|
|
385
413
|
}
|
|
386
|
-
const value = this.
|
|
414
|
+
const value = this.GetValue(record, this.SubtitleFieldName);
|
|
387
415
|
return value != null ? String(value) : undefined;
|
|
388
416
|
}
|
|
417
|
+
/** @deprecated Use {@link GetSubtitle}. */
|
|
418
|
+
getSubtitle(record) {
|
|
419
|
+
return this.GetSubtitle(record);
|
|
420
|
+
}
|
|
389
421
|
/**
|
|
390
422
|
* Gets the description from a record.
|
|
391
423
|
*
|
|
392
424
|
* @param record - The source record
|
|
393
425
|
* @returns The description string, or undefined
|
|
394
426
|
*/
|
|
395
|
-
|
|
427
|
+
GetDescription(record) {
|
|
396
428
|
// Use custom summary function if provided
|
|
397
429
|
if (this.SummaryFunction) {
|
|
398
430
|
return this.SummaryFunction(record);
|
|
399
431
|
}
|
|
400
432
|
// Use description field
|
|
401
433
|
if (this.DescriptionFieldName) {
|
|
402
|
-
const value = this.
|
|
434
|
+
const value = this.GetValue(record, this.DescriptionFieldName);
|
|
403
435
|
return value != null ? String(value) : undefined;
|
|
404
436
|
}
|
|
405
437
|
return undefined;
|
|
406
438
|
}
|
|
439
|
+
/** @deprecated Use {@link GetDescription}. */
|
|
440
|
+
getDescription(record) {
|
|
441
|
+
return this.GetDescription(record);
|
|
442
|
+
}
|
|
407
443
|
/**
|
|
408
444
|
* Gets the image URL from a record.
|
|
409
445
|
*
|
|
410
446
|
* @param record - The source record
|
|
411
447
|
* @returns The image URL, or undefined
|
|
412
448
|
*/
|
|
413
|
-
|
|
449
|
+
GetImageUrl(record) {
|
|
414
450
|
const fieldName = this.CardConfig?.imageField || this.ImageFieldName;
|
|
415
451
|
if (!fieldName) {
|
|
416
452
|
return undefined;
|
|
417
453
|
}
|
|
418
|
-
const value = this.
|
|
454
|
+
const value = this.GetValue(record, fieldName);
|
|
419
455
|
return value != null ? String(value) : undefined;
|
|
420
456
|
}
|
|
457
|
+
/** @deprecated Use {@link GetImageUrl}. */
|
|
458
|
+
getImageUrl(record) {
|
|
459
|
+
return this.GetImageUrl(record);
|
|
460
|
+
}
|
|
421
461
|
/**
|
|
422
462
|
* Gets the event configuration for a specific record.
|
|
423
463
|
*
|
|
424
464
|
* @param record - The source record
|
|
425
465
|
* @returns The event configuration (from EventConfigFunction or defaults)
|
|
426
466
|
*/
|
|
427
|
-
|
|
467
|
+
GetEventConfig(record) {
|
|
428
468
|
if (this.EventConfigFunction) {
|
|
429
469
|
return this.EventConfigFunction(record);
|
|
430
470
|
}
|
|
431
471
|
return {};
|
|
432
472
|
}
|
|
473
|
+
/** @deprecated Use {@link GetEventConfig}. */
|
|
474
|
+
getEventConfig(record) {
|
|
475
|
+
return this.GetEventConfig(record);
|
|
476
|
+
}
|
|
433
477
|
// ============================================================================
|
|
434
478
|
// STATIC FACTORY METHODS
|
|
435
479
|
// ============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-group.js","sourceRoot":"","sources":["../../src/lib/timeline-group.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAGL,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,aAAa,CAAC,MAAW,EAAE,SAAiB;IAC1D,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,oDAAoD;IACpD,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QACrC,OAAO,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED,sCAAsC;IACtC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,MAA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C,OAAO,CAAC;QACnC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAErC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAChB,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC;QAClC,CAAC;QAED,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACjB,KAAK,CAAC,gBAAgB,GAAG,QAAQ,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC;QACpC,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/**\n * @fileoverview TimelineGroup class for configuring timeline data sources.\n *\n * The TimelineGroup class defines how data is loaded and displayed in the timeline.\n * It supports both MemberJunction BaseEntity objects and plain JavaScript objects,\n * making it usable in any Angular application.\n *\n * @module @memberjunction/ng-timeline/timeline-group\n */\n\nimport { IMetadataProvider, Metadata, RunView } from '@memberjunction/core';\nimport {\n TimelineCardConfig,\n TimelineEventConfig,\n DEFAULT_CARD_CONFIG\n} from './types';\n\n// ============================================================================\n// HELPER FUNCTION - FIELD VALUE ACCESS\n// ============================================================================\n\n/**\n * Extracts a field value from a record, supporting both BaseEntity and plain objects.\n *\n * For BaseEntity objects (detected by presence of `.Get()` method), uses the `.Get()` method.\n * For plain JavaScript objects, uses standard bracket notation.\n *\n * @param record - The source record (BaseEntity or plain object)\n * @param fieldName - The name of the field to extract\n * @returns The field value, or undefined if not found\n *\n * @example\n * ```typescript\n * // Works with BaseEntity\n * const entity = await md.GetEntityObject<MJTaskEntity>('Tasks');\n * const name = getFieldValue(entity, 'Name'); // Uses entity.Get('Name')\n *\n * // Works with plain objects\n * const obj = { name: 'My Task', status: 'Open' };\n * const name = getFieldValue(obj, 'name'); // Uses obj['name']\n * ```\n */\nexport function getFieldValue(record: any, fieldName: string): unknown {\n if (record == null) {\n return undefined;\n }\n\n // Check if this is a BaseEntity (has .Get() method)\n if (typeof record.Get === 'function') {\n return record.Get(fieldName);\n }\n\n // Plain object - use bracket notation\n return record[fieldName];\n}\n\n/**\n * Extracts an ID from a record, trying common ID field names.\n *\n * @param record - The source record\n * @param idFieldName - Optional explicit ID field name\n * @returns The record ID as a string, or a generated fallback ID\n */\nexport function getRecordId(record: any, idFieldName?: string): string {\n if (record == null) {\n return `generated-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n // Try explicit field name first\n if (idFieldName) {\n const id = getFieldValue(record, idFieldName);\n if (id != null) {\n return String(id);\n }\n }\n\n // Try common ID field names\n const commonIdFields = ['ID', 'id', 'Id', '_id', 'uuid', 'UUID'];\n for (const field of commonIdFields) {\n const id = getFieldValue(record, field);\n if (id != null) {\n return String(id);\n }\n }\n\n // Fallback: generate a unique ID\n return `generated-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n}\n\n// ============================================================================\n// TIMELINE GROUP CLASS\n// ============================================================================\n\n/**\n * Configures a data source for the timeline component.\n *\n * TimelineGroup defines how records are loaded, which fields to display,\n * and how they should be styled. Multiple groups can be used to display\n * different types of events on the same timeline.\n *\n * @typeParam T - The type of the source records. Defaults to `any` for maximum\n * flexibility. MemberJunction users can specify BaseEntity subclasses\n * for full type safety.\n *\n * @example Basic usage with plain objects\n * ```typescript\n * interface MyEvent {\n * id: string;\n * title: string;\n * eventDate: Date;\n * description: string;\n * }\n *\n * const group = new TimelineGroup<MyEvent>();\n * group.DataSourceType = 'array';\n * group.EntityObjects = myEventsArray;\n * group.TitleFieldName = 'title';\n * group.DateFieldName = 'eventDate';\n * group.DescriptionFieldName = 'description';\n * ```\n *\n * @example MemberJunction usage with BaseEntity\n * ```typescript\n * import { MJTaskEntity } from '@memberjunction/core-entities';\n *\n * const group = new TimelineGroup<MJTaskEntity>();\n * group.EntityName = 'Tasks';\n * group.DataSourceType = 'entity';\n * group.Filter = \"Status = 'Open'\";\n * group.TitleFieldName = 'Name';\n * group.DateFieldName = 'DueDate';\n * ```\n *\n * @example With full configuration\n * ```typescript\n * const group = new TimelineGroup<MJTaskEntity>();\n * group.EntityName = 'Tasks';\n * group.TitleFieldName = 'Name';\n * group.DateFieldName = 'CompletedAt';\n * group.SubtitleFieldName = 'Category';\n * group.DescriptionFieldName = 'Description';\n * group.DisplayIcon = 'fa-solid fa-check-circle';\n * group.DisplayColor = '#4caf50';\n * group.GroupLabel = 'Completed Tasks';\n *\n * group.CardConfig = {\n * collapsible: true,\n * defaultExpanded: false,\n * summaryFields: [\n * { fieldName: 'AssignedTo', label: 'Assignee', icon: 'fa-solid fa-user' },\n * { fieldName: 'Priority', icon: 'fa-solid fa-flag' }\n * ],\n * actions: [\n * { id: 'view', label: 'View', variant: 'primary' },\n * { id: 'edit', label: 'Edit', variant: 'secondary' }\n * ]\n * };\n *\n * group.EventConfigFunction = (task) => ({\n * icon: task.Priority === 'High' ? 'fa-solid fa-exclamation' : undefined,\n * color: task.Status === 'Overdue' ? '#f44336' : undefined\n * });\n * ```\n */\nexport class TimelineGroup<T = any> {\n // ============================================================================\n // DATA SOURCE CONFIGURATION\n // ============================================================================\n\n /**\n * The MemberJunction entity name for this group.\n * Required when `DataSourceType` is `'entity'`.\n *\n * @example 'Tasks', 'MJ: AI Agents', 'Users'\n */\n EntityName?: string;\n\n /**\n * How data is provided to the timeline.\n * - `'array'`: Data is provided via the `EntityObjects` array (works with any object type)\n * - `'entity'`: Data is loaded using MemberJunction's RunView (requires MJ core)\n *\n * @default 'entity'\n */\n DataSourceType: 'array' | 'entity' = 'entity';\n\n /**\n * SQL WHERE clause filter for entity queries.\n * Only used when `DataSourceType` is `'entity'`.\n *\n * @example \"Status = 'Open' AND Priority = 'High'\"\n */\n Filter?: string;\n\n /**\n * Pre-loaded data array.\n * Used when `DataSourceType` is `'array'`, or populated after loading when using `'entity'`.\n */\n EntityObjects: T[] = [];\n\n /**\n * SQL ORDER BY clause for entity queries.\n * Only used when `DataSourceType` is `'entity'`.\n *\n * @example 'CreatedAt DESC', 'Priority ASC, DueDate DESC'\n */\n OrderBy?: string;\n\n /**\n * Maximum number of records to load per batch.\n * Used for virtual scrolling.\n *\n * @default undefined (uses component's virtualScroll.batchSize)\n */\n MaxRecords?: number;\n\n // ============================================================================\n // FIELD MAPPINGS\n // ============================================================================\n\n /**\n * Field name for the event title.\n * This is the primary text displayed on each timeline card.\n *\n * @required\n */\n TitleFieldName!: string;\n\n /**\n * Field name for the event date.\n * Used for chronological ordering and date display.\n *\n * @required\n */\n DateFieldName!: string;\n\n /**\n * Field name for the subtitle.\n * Displayed below the title in smaller text.\n */\n SubtitleFieldName?: string;\n\n /**\n * Field name for the description/body text.\n * Displayed in the card body when expanded.\n */\n DescriptionFieldName?: string;\n\n /**\n * Field name containing an image URL.\n * When set, displays an image in the card.\n */\n ImageFieldName?: string;\n\n /**\n * Field name for the unique record ID.\n * Defaults to 'ID' or 'id' if not specified.\n */\n IdFieldName?: string;\n\n // ============================================================================\n // GROUP-LEVEL DISPLAY\n // ============================================================================\n\n /**\n * Icon display mode.\n * - `'standard'`: Uses a default icon based on the group index\n * - `'custom'`: Uses the icon specified in `DisplayIcon`\n *\n * @default 'standard'\n */\n DisplayIconMode: 'standard' | 'custom' = 'standard';\n\n /**\n * Custom icon class (Font Awesome).\n * Only used when `DisplayIconMode` is `'custom'`.\n *\n * @example 'fa-solid fa-check', 'fa-regular fa-calendar'\n */\n DisplayIcon?: string;\n\n /**\n * Color assignment mode.\n * - `'auto'`: System assigns colors based on group index\n * - `'manual'`: Uses the color specified in `DisplayColor`\n *\n * @default 'auto'\n */\n DisplayColorMode: 'auto' | 'manual' = 'auto';\n\n /**\n * Custom color for this group's markers and accents.\n * Only used when `DisplayColorMode` is `'manual'`.\n * Any valid CSS color value.\n *\n * @example '#4caf50', 'rgb(66, 135, 245)', 'var(--primary-color)'\n */\n DisplayColor?: string;\n\n /**\n * Human-readable label for this group.\n * Used in legends, headers, or when distinguishing multiple groups.\n *\n * @example 'Completed Tasks', 'System Events', 'User Activities'\n */\n GroupLabel?: string;\n\n // ============================================================================\n // CARD CONFIGURATION\n // ============================================================================\n\n /**\n * Card display configuration for this group.\n * Defines how event cards are rendered.\n * If not set, uses the component's `defaultCardConfig`.\n */\n CardConfig?: TimelineCardConfig;\n\n // ============================================================================\n // CUSTOM FUNCTIONS\n // ============================================================================\n\n /**\n * Custom function to generate the event summary/description.\n * Takes precedence over `DescriptionFieldName`.\n *\n * @param record - The source record\n * @returns HTML string or plain text to display\n *\n * @example\n * ```typescript\n * group.SummaryFunction = (task) => {\n * return `<strong>${task.Status}</strong>: ${task.Description}`;\n * };\n * ```\n */\n SummaryFunction?: (record: T) => string;\n\n /**\n * Custom function to configure individual events.\n * Allows per-event customization of icons, colors, and actions.\n *\n * @param record - The source record\n * @returns Configuration overrides for this event\n *\n * @example\n * ```typescript\n * group.EventConfigFunction = (task) => ({\n * icon: task.Priority === 'High' ? 'fa-solid fa-exclamation' : undefined,\n * color: task.IsOverdue ? '#f44336' : undefined,\n * actions: task.CanEdit ? [{ id: 'edit', label: 'Edit' }] : []\n * });\n * ```\n */\n EventConfigFunction?: (record: T) => TimelineEventConfig;\n\n // ============================================================================\n // METHODS\n // ============================================================================\n\n /**\n * Gets the effective card configuration, merging with defaults.\n *\n * @returns The merged card configuration\n */\n getEffectiveCardConfig(): TimelineCardConfig {\n return {\n ...DEFAULT_CARD_CONFIG,\n ...this.CardConfig\n };\n }\n\n /**\n * Extracts a field value from a record in this group.\n *\n * @param record - The source record\n * @param fieldName - The field name to extract\n * @returns The field value\n */\n getValue(record: T, fieldName: string): unknown {\n return getFieldValue(record, fieldName);\n }\n\n /**\n * Gets the ID of a record in this group.\n *\n * @param record - The source record\n * @returns The record ID\n */\n getId(record: T): string {\n return getRecordId(record, this.IdFieldName);\n }\n\n /**\n * Gets the title from a record.\n *\n * @param record - The source record\n * @returns The title string\n */\n getTitle(record: T): string {\n const value = this.getValue(record, this.TitleFieldName);\n return value != null ? String(value) : '';\n }\n\n /**\n * Gets the date from a record.\n *\n * @param record - The source record\n * @returns The date object\n */\n getDate(record: T): Date {\n const value = this.getValue(record, this.DateFieldName);\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'string' || typeof value === 'number') {\n return new Date(value);\n }\n return new Date();\n }\n\n /**\n * Gets the subtitle from a record.\n *\n * @param record - The source record\n * @returns The subtitle string, or undefined\n */\n getSubtitle(record: T): string | undefined {\n if (!this.SubtitleFieldName) {\n return undefined;\n }\n const value = this.getValue(record, this.SubtitleFieldName);\n return value != null ? String(value) : undefined;\n }\n\n /**\n * Gets the description from a record.\n *\n * @param record - The source record\n * @returns The description string, or undefined\n */\n getDescription(record: T): string | undefined {\n // Use custom summary function if provided\n if (this.SummaryFunction) {\n return this.SummaryFunction(record);\n }\n\n // Use description field\n if (this.DescriptionFieldName) {\n const value = this.getValue(record, this.DescriptionFieldName);\n return value != null ? String(value) : undefined;\n }\n\n return undefined;\n }\n\n /**\n * Gets the image URL from a record.\n *\n * @param record - The source record\n * @returns The image URL, or undefined\n */\n getImageUrl(record: T): string | undefined {\n const fieldName = this.CardConfig?.imageField || this.ImageFieldName;\n if (!fieldName) {\n return undefined;\n }\n const value = this.getValue(record, fieldName);\n return value != null ? String(value) : undefined;\n }\n\n /**\n * Gets the event configuration for a specific record.\n *\n * @param record - The source record\n * @returns The event configuration (from EventConfigFunction or defaults)\n */\n getEventConfig(record: T): TimelineEventConfig {\n if (this.EventConfigFunction) {\n return this.EventConfigFunction(record);\n }\n return {};\n }\n\n // ============================================================================\n // STATIC FACTORY METHODS\n // ============================================================================\n\n /**\n * Creates a TimelineGroup from MemberJunction RunViewParams.\n *\n * This is a convenience method for MemberJunction applications.\n * It loads data immediately and returns a configured group.\n *\n * **Note**: This method requires `@memberjunction/core` to be available.\n * It will throw an error if used in non-MJ applications.\n *\n * @param params - RunView parameters for loading data\n * @returns A configured TimelineGroup with loaded data\n *\n * @example\n * ```typescript\n * const group = await TimelineGroup.FromView<MJTaskEntity>({\n * EntityName: 'Tasks',\n * ExtraFilter: \"Status = 'Open'\",\n * OrderBy: 'DueDate DESC'\n * });\n * group.TitleFieldName = 'Name';\n * group.DateFieldName = 'DueDate';\n * ```\n */\n public static async FromView<T = any>(params: {\n EntityName?: string;\n ExtraFilter?: string;\n OrderBy?: string;\n MaxRows?: number;\n /** The provider to read through. Omit to use the global default. */\n Provider?: IMetadataProvider;\n [key: string]: unknown;\n }): Promise<TimelineGroup<T>> {\n const group = new TimelineGroup<T>();\n\n try {\n // Provider-scoped, and a STATIC import: the dynamic form here hid the dependency from the\n // bundler and from readers while the package depends on @memberjunction/core regardless.\n const rv = RunView.FromMetadataProvider(params.Provider ?? Metadata.Provider);\n // `Provider` scopes the read; it is not a RunView parameter, so it must not be forwarded.\n const { Provider: _provider, ...viewFields } = params;\n const viewParams = {\n ...viewFields,\n ResultType: 'entity_object' as const\n };\n\n const result = await rv.RunView(viewParams);\n\n if (result?.Success) {\n group.EntityName = params.EntityName;\n group.EntityObjects = result.Results as T[];\n group.DataSourceType = 'array'; // Already loaded\n group.Filter = params.ExtraFilter;\n group.OrderBy = params.OrderBy;\n }\n } catch (error) {\n console.warn(\n 'TimelineGroup.FromView requires @memberjunction/core. ' +\n 'Use DataSourceType=\"array\" with EntityObjects for non-MJ applications.',\n error\n );\n }\n\n return group;\n }\n\n /**\n * Creates a TimelineGroup from a plain array of objects.\n *\n * This is a convenience method that sets up the group for array-based data.\n *\n * @param data - Array of objects to display\n * @param config - Configuration for field mappings\n * @returns A configured TimelineGroup\n *\n * @example\n * ```typescript\n * const group = TimelineGroup.FromArray(myEvents, {\n * titleField: 'name',\n * dateField: 'eventDate',\n * descriptionField: 'details'\n * });\n * ```\n */\n public static FromArray<T = any>(\n data: T[],\n config: {\n titleField: string;\n dateField: string;\n subtitleField?: string;\n descriptionField?: string;\n imageField?: string;\n idField?: string;\n groupLabel?: string;\n icon?: string;\n color?: string;\n }\n ): TimelineGroup<T> {\n const group = new TimelineGroup<T>();\n\n group.DataSourceType = 'array';\n group.EntityObjects = data;\n group.TitleFieldName = config.titleField;\n group.DateFieldName = config.dateField;\n group.SubtitleFieldName = config.subtitleField;\n group.DescriptionFieldName = config.descriptionField;\n group.ImageFieldName = config.imageField;\n group.IdFieldName = config.idField;\n group.GroupLabel = config.groupLabel;\n\n if (config.icon) {\n group.DisplayIconMode = 'custom';\n group.DisplayIcon = config.icon;\n }\n\n if (config.color) {\n group.DisplayColorMode = 'manual';\n group.DisplayColor = config.color;\n }\n\n return group;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"timeline-group.js","sourceRoot":"","sources":["../../src/lib/timeline-group.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAGL,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,aAAa,CAAC,MAAW,EAAE,SAAiB;IAC1D,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,oDAAoD;IACpD,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QACrC,OAAO,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED,sCAAsC;IACtC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,aAAa,CAAC,MAAW,EAAE,SAAiB;IAC1D,OAAO,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,MAAW,EAAE,WAAoB;IAC3D,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,OAAO,aAAa,IAAI,CAAC,GAAG,EAAE,IAAI,IA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;YACjB,KAAK,CAAC,gBAAgB,GAAG,QAAQ,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC;QACpC,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/**\n * @fileoverview TimelineGroup class for configuring timeline data sources.\n *\n * The TimelineGroup class defines how data is loaded and displayed in the timeline.\n * It supports both MemberJunction BaseEntity objects and plain JavaScript objects,\n * making it usable in any Angular application.\n *\n * @module @memberjunction/ng-timeline/timeline-group\n */\n\nimport { IMetadataProvider, Metadata, RunView } from '@memberjunction/core';\nimport {\n TimelineCardConfig,\n TimelineEventConfig,\n DEFAULT_CARD_CONFIG\n} from './types';\n\n// ============================================================================\n// HELPER FUNCTION - FIELD VALUE ACCESS\n// ============================================================================\n\n/**\n * Extracts a field value from a record, supporting both BaseEntity and plain objects.\n *\n * For BaseEntity objects (detected by presence of `.Get()` method), uses the `.Get()` method.\n * For plain JavaScript objects, uses standard bracket notation.\n *\n * @param record - The source record (BaseEntity or plain object)\n * @param fieldName - The name of the field to extract\n * @returns The field value, or undefined if not found\n *\n * @example\n * ```typescript\n * // Works with BaseEntity\n * const entity = await md.GetEntityObject<MJTaskEntity>('Tasks');\n * const name = getFieldValue(entity, 'Name'); // Uses entity.Get('Name')\n *\n * // Works with plain objects\n * const obj = { name: 'My Task', status: 'Open' };\n * const name = getFieldValue(obj, 'name'); // Uses obj['name']\n * ```\n */\nexport function GetFieldValue(record: any, fieldName: string): unknown {\n if (record == null) {\n return undefined;\n }\n\n // Check if this is a BaseEntity (has .Get() method)\n if (typeof record.Get === 'function') {\n return record.Get(fieldName);\n }\n\n // Plain object - use bracket notation\n return record[fieldName];\n}\n\n/** @deprecated Use {@link GetFieldValue}. */\nexport function getFieldValue(record: any, fieldName: string): unknown {\n return GetFieldValue(record, fieldName);\n}\n\n/**\n * Extracts an ID from a record, trying common ID field names.\n *\n * @param record - The source record\n * @param idFieldName - Optional explicit ID field name\n * @returns The record ID as a string, or a generated fallback ID\n */\nexport function GetRecordId(record: any, idFieldName?: string): string {\n if (record == null) {\n return `generated-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n // Try explicit field name first\n if (idFieldName) {\n const id = GetFieldValue(record, idFieldName);\n if (id != null) {\n return String(id);\n }\n }\n\n // Try common ID field names\n const commonIdFields = ['ID', 'id', 'Id', '_id', 'uuid', 'UUID'];\n for (const field of commonIdFields) {\n const id = GetFieldValue(record, field);\n if (id != null) {\n return String(id);\n }\n }\n\n // Fallback: generate a unique ID\n return `generated-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n}\n\n/** @deprecated Use {@link GetRecordId}. */\nexport function getRecordId(record: any, idFieldName?: string): string {\n return GetRecordId(record, idFieldName);\n}\n\n// ============================================================================\n// TIMELINE GROUP CLASS\n// ============================================================================\n\n/**\n * Configures a data source for the timeline component.\n *\n * TimelineGroup defines how records are loaded, which fields to display,\n * and how they should be styled. Multiple groups can be used to display\n * different types of events on the same timeline.\n *\n * @typeParam T - The type of the source records. Defaults to `any` for maximum\n * flexibility. MemberJunction users can specify BaseEntity subclasses\n * for full type safety.\n *\n * @example Basic usage with plain objects\n * ```typescript\n * interface MyEvent {\n * id: string;\n * title: string;\n * eventDate: Date;\n * description: string;\n * }\n *\n * const group = new TimelineGroup<MyEvent>();\n * group.DataSourceType = 'array';\n * group.EntityObjects = myEventsArray;\n * group.TitleFieldName = 'title';\n * group.DateFieldName = 'eventDate';\n * group.DescriptionFieldName = 'description';\n * ```\n *\n * @example MemberJunction usage with BaseEntity\n * ```typescript\n * import { MJTaskEntity } from '@memberjunction/core-entities';\n *\n * const group = new TimelineGroup<MJTaskEntity>();\n * group.EntityName = 'Tasks';\n * group.DataSourceType = 'entity';\n * group.Filter = \"Status = 'Open'\";\n * group.TitleFieldName = 'Name';\n * group.DateFieldName = 'DueDate';\n * ```\n *\n * @example With full configuration\n * ```typescript\n * const group = new TimelineGroup<MJTaskEntity>();\n * group.EntityName = 'Tasks';\n * group.TitleFieldName = 'Name';\n * group.DateFieldName = 'CompletedAt';\n * group.SubtitleFieldName = 'Category';\n * group.DescriptionFieldName = 'Description';\n * group.DisplayIcon = 'fa-solid fa-check-circle';\n * group.DisplayColor = '#4caf50';\n * group.GroupLabel = 'Completed Tasks';\n *\n * group.CardConfig = {\n * collapsible: true,\n * defaultExpanded: false,\n * summaryFields: [\n * { fieldName: 'AssignedTo', label: 'Assignee', icon: 'fa-solid fa-user' },\n * { fieldName: 'Priority', icon: 'fa-solid fa-flag' }\n * ],\n * actions: [\n * { id: 'view', label: 'View', variant: 'primary' },\n * { id: 'edit', label: 'Edit', variant: 'secondary' }\n * ]\n * };\n *\n * group.EventConfigFunction = (task) => ({\n * icon: task.Priority === 'High' ? 'fa-solid fa-exclamation' : undefined,\n * color: task.Status === 'Overdue' ? '#f44336' : undefined\n * });\n * ```\n */\nexport class TimelineGroup<T = any> {\n // ============================================================================\n // DATA SOURCE CONFIGURATION\n // ============================================================================\n\n /**\n * The MemberJunction entity name for this group.\n * Required when `DataSourceType` is `'entity'`.\n *\n * @example 'Tasks', 'MJ: AI Agents', 'Users'\n */\n EntityName?: string;\n\n /**\n * How data is provided to the timeline.\n * - `'array'`: Data is provided via the `EntityObjects` array (works with any object type)\n * - `'entity'`: Data is loaded using MemberJunction's RunView (requires MJ core)\n *\n * @default 'entity'\n */\n DataSourceType: 'array' | 'entity' = 'entity';\n\n /**\n * SQL WHERE clause filter for entity queries.\n * Only used when `DataSourceType` is `'entity'`.\n *\n * @example \"Status = 'Open' AND Priority = 'High'\"\n */\n Filter?: string;\n\n /**\n * Pre-loaded data array.\n * Used when `DataSourceType` is `'array'`, or populated after loading when using `'entity'`.\n */\n EntityObjects: T[] = [];\n\n /**\n * SQL ORDER BY clause for entity queries.\n * Only used when `DataSourceType` is `'entity'`.\n *\n * @example 'CreatedAt DESC', 'Priority ASC, DueDate DESC'\n */\n OrderBy?: string;\n\n /**\n * Maximum number of records to load per batch.\n * Used for virtual scrolling.\n *\n * @default undefined (uses component's virtualScroll.batchSize)\n */\n MaxRecords?: number;\n\n // ============================================================================\n // FIELD MAPPINGS\n // ============================================================================\n\n /**\n * Field name for the event title.\n * This is the primary text displayed on each timeline card.\n *\n * @required\n */\n TitleFieldName!: string;\n\n /**\n * Field name for the event date.\n * Used for chronological ordering and date display.\n *\n * @required\n */\n DateFieldName!: string;\n\n /**\n * Field name for the subtitle.\n * Displayed below the title in smaller text.\n */\n SubtitleFieldName?: string;\n\n /**\n * Field name for the description/body text.\n * Displayed in the card body when expanded.\n */\n DescriptionFieldName?: string;\n\n /**\n * Field name containing an image URL.\n * When set, displays an image in the card.\n */\n ImageFieldName?: string;\n\n /**\n * Field name for the unique record ID.\n * Defaults to 'ID' or 'id' if not specified.\n */\n IdFieldName?: string;\n\n // ============================================================================\n // GROUP-LEVEL DISPLAY\n // ============================================================================\n\n /**\n * Icon display mode.\n * - `'standard'`: Uses a default icon based on the group index\n * - `'custom'`: Uses the icon specified in `DisplayIcon`\n *\n * @default 'standard'\n */\n DisplayIconMode: 'standard' | 'custom' = 'standard';\n\n /**\n * Custom icon class (Font Awesome).\n * Only used when `DisplayIconMode` is `'custom'`.\n *\n * @example 'fa-solid fa-check', 'fa-regular fa-calendar'\n */\n DisplayIcon?: string;\n\n /**\n * Color assignment mode.\n * - `'auto'`: System assigns colors based on group index\n * - `'manual'`: Uses the color specified in `DisplayColor`\n *\n * @default 'auto'\n */\n DisplayColorMode: 'auto' | 'manual' = 'auto';\n\n /**\n * Custom color for this group's markers and accents.\n * Only used when `DisplayColorMode` is `'manual'`.\n * Any valid CSS color value.\n *\n * @example '#4caf50', 'rgb(66, 135, 245)', 'var(--primary-color)'\n */\n DisplayColor?: string;\n\n /**\n * Human-readable label for this group.\n * Used in legends, headers, or when distinguishing multiple groups.\n *\n * @example 'Completed Tasks', 'System Events', 'User Activities'\n */\n GroupLabel?: string;\n\n // ============================================================================\n // CARD CONFIGURATION\n // ============================================================================\n\n /**\n * Card display configuration for this group.\n * Defines how event cards are rendered.\n * If not set, uses the component's `defaultCardConfig`.\n */\n CardConfig?: TimelineCardConfig;\n\n // ============================================================================\n // CUSTOM FUNCTIONS\n // ============================================================================\n\n /**\n * Custom function to generate the event summary/description.\n * Takes precedence over `DescriptionFieldName`.\n *\n * @param record - The source record\n * @returns HTML string or plain text to display\n *\n * @example\n * ```typescript\n * group.SummaryFunction = (task) => {\n * return `<strong>${task.Status}</strong>: ${task.Description}`;\n * };\n * ```\n */\n SummaryFunction?: (record: T) => string;\n\n /**\n * Custom function to configure individual events.\n * Allows per-event customization of icons, colors, and actions.\n *\n * @param record - The source record\n * @returns Configuration overrides for this event\n *\n * @example\n * ```typescript\n * group.EventConfigFunction = (task) => ({\n * icon: task.Priority === 'High' ? 'fa-solid fa-exclamation' : undefined,\n * color: task.IsOverdue ? '#f44336' : undefined,\n * actions: task.CanEdit ? [{ id: 'edit', label: 'Edit' }] : []\n * });\n * ```\n */\n EventConfigFunction?: (record: T) => TimelineEventConfig;\n\n // ============================================================================\n // METHODS\n // ============================================================================\n\n /**\n * Gets the effective card configuration, merging with defaults.\n *\n * @returns The merged card configuration\n */\n GetEffectiveCardConfig(): TimelineCardConfig {\n return {\n ...DEFAULT_CARD_CONFIG,\n ...this.CardConfig\n };\n }\n\n /** @deprecated Use {@link GetEffectiveCardConfig}. */\n getEffectiveCardConfig(): TimelineCardConfig {\n return this.GetEffectiveCardConfig();\n }\n\n /**\n * Extracts a field value from a record in this group.\n *\n * @param record - The source record\n * @param fieldName - The field name to extract\n * @returns The field value\n */\n GetValue(record: T, fieldName: string): unknown {\n return GetFieldValue(record, fieldName);\n }\n\n /** @deprecated Use {@link GetValue}. */\n getValue(record: T, fieldName: string): unknown {\n return this.GetValue(record, fieldName);\n }\n\n /**\n * Gets the ID of a record in this group.\n *\n * @param record - The source record\n * @returns The record ID\n */\n GetId(record: T): string {\n return GetRecordId(record, this.IdFieldName);\n }\n\n /** @deprecated Use {@link GetId}. */\n getId(record: T): string {\n return this.GetId(record);\n }\n\n /**\n * Gets the title from a record.\n *\n * @param record - The source record\n * @returns The title string\n */\n GetTitle(record: T): string {\n const value = this.GetValue(record, this.TitleFieldName);\n return value != null ? String(value) : '';\n }\n\n /** @deprecated Use {@link GetTitle}. */\n getTitle(record: T): string {\n return this.GetTitle(record);\n }\n\n /**\n * Gets the date from a record.\n *\n * @param record - The source record\n * @returns The date object\n */\n GetDate(record: T): Date {\n const value = this.GetValue(record, this.DateFieldName);\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'string' || typeof value === 'number') {\n return new Date(value);\n }\n return new Date();\n }\n\n /** @deprecated Use {@link GetDate}. */\n getDate(record: T): Date {\n return this.GetDate(record);\n }\n\n /**\n * Gets the subtitle from a record.\n *\n * @param record - The source record\n * @returns The subtitle string, or undefined\n */\n GetSubtitle(record: T): string | undefined {\n if (!this.SubtitleFieldName) {\n return undefined;\n }\n const value = this.GetValue(record, this.SubtitleFieldName);\n return value != null ? String(value) : undefined;\n }\n\n /** @deprecated Use {@link GetSubtitle}. */\n getSubtitle(record: T): string | undefined {\n return this.GetSubtitle(record);\n }\n\n /**\n * Gets the description from a record.\n *\n * @param record - The source record\n * @returns The description string, or undefined\n */\n GetDescription(record: T): string | undefined {\n // Use custom summary function if provided\n if (this.SummaryFunction) {\n return this.SummaryFunction(record);\n }\n\n // Use description field\n if (this.DescriptionFieldName) {\n const value = this.GetValue(record, this.DescriptionFieldName);\n return value != null ? String(value) : undefined;\n }\n\n return undefined;\n }\n\n /** @deprecated Use {@link GetDescription}. */\n getDescription(record: T): string | undefined {\n return this.GetDescription(record);\n }\n\n /**\n * Gets the image URL from a record.\n *\n * @param record - The source record\n * @returns The image URL, or undefined\n */\n GetImageUrl(record: T): string | undefined {\n const fieldName = this.CardConfig?.imageField || this.ImageFieldName;\n if (!fieldName) {\n return undefined;\n }\n const value = this.GetValue(record, fieldName);\n return value != null ? String(value) : undefined;\n }\n\n /** @deprecated Use {@link GetImageUrl}. */\n getImageUrl(record: T): string | undefined {\n return this.GetImageUrl(record);\n }\n\n /**\n * Gets the event configuration for a specific record.\n *\n * @param record - The source record\n * @returns The event configuration (from EventConfigFunction or defaults)\n */\n GetEventConfig(record: T): TimelineEventConfig {\n if (this.EventConfigFunction) {\n return this.EventConfigFunction(record);\n }\n return {};\n }\n\n /** @deprecated Use {@link GetEventConfig}. */\n getEventConfig(record: T): TimelineEventConfig {\n return this.GetEventConfig(record);\n }\n\n // ============================================================================\n // STATIC FACTORY METHODS\n // ============================================================================\n\n /**\n * Creates a TimelineGroup from MemberJunction RunViewParams.\n *\n * This is a convenience method for MemberJunction applications.\n * It loads data immediately and returns a configured group.\n *\n * **Note**: This method requires `@memberjunction/core` to be available.\n * It will throw an error if used in non-MJ applications.\n *\n * @param params - RunView parameters for loading data\n * @returns A configured TimelineGroup with loaded data\n *\n * @example\n * ```typescript\n * const group = await TimelineGroup.FromView<MJTaskEntity>({\n * EntityName: 'Tasks',\n * ExtraFilter: \"Status = 'Open'\",\n * OrderBy: 'DueDate DESC'\n * });\n * group.TitleFieldName = 'Name';\n * group.DateFieldName = 'DueDate';\n * ```\n */\n public static async FromView<T = any>(params: {\n EntityName?: string;\n ExtraFilter?: string;\n OrderBy?: string;\n MaxRows?: number;\n /** The provider to read through. Omit to use the global default. */\n Provider?: IMetadataProvider;\n [key: string]: unknown;\n }): Promise<TimelineGroup<T>> {\n const group = new TimelineGroup<T>();\n\n try {\n // Provider-scoped, and a STATIC import: the dynamic form here hid the dependency from the\n // bundler and from readers while the package depends on @memberjunction/core regardless.\n const rv = RunView.FromMetadataProvider(params.Provider ?? Metadata.Provider);\n // `Provider` scopes the read; it is not a RunView parameter, so it must not be forwarded.\n const { Provider: _provider, ...viewFields } = params;\n const viewParams = {\n ...viewFields,\n ResultType: 'entity_object' as const\n };\n\n const result = await rv.RunView(viewParams);\n\n if (result?.Success) {\n group.EntityName = params.EntityName;\n group.EntityObjects = result.Results as T[];\n group.DataSourceType = 'array'; // Already loaded\n group.Filter = params.ExtraFilter;\n group.OrderBy = params.OrderBy;\n }\n } catch (error) {\n console.warn(\n 'TimelineGroup.FromView requires @memberjunction/core. ' +\n 'Use DataSourceType=\"array\" with EntityObjects for non-MJ applications.',\n error\n );\n }\n\n return group;\n }\n\n /**\n * Creates a TimelineGroup from a plain array of objects.\n *\n * This is a convenience method that sets up the group for array-based data.\n *\n * @param data - Array of objects to display\n * @param config - Configuration for field mappings\n * @returns A configured TimelineGroup\n *\n * @example\n * ```typescript\n * const group = TimelineGroup.FromArray(myEvents, {\n * titleField: 'name',\n * dateField: 'eventDate',\n * descriptionField: 'details'\n * });\n * ```\n */\n public static FromArray<T = any>(\n data: T[],\n config: {\n titleField: string;\n dateField: string;\n subtitleField?: string;\n descriptionField?: string;\n imageField?: string;\n idField?: string;\n groupLabel?: string;\n icon?: string;\n color?: string;\n }\n ): TimelineGroup<T> {\n const group = new TimelineGroup<T>();\n\n group.DataSourceType = 'array';\n group.EntityObjects = data;\n group.TitleFieldName = config.titleField;\n group.DateFieldName = config.dateField;\n group.SubtitleFieldName = config.subtitleField;\n group.DescriptionFieldName = config.descriptionField;\n group.ImageFieldName = config.imageField;\n group.IdFieldName = config.idField;\n group.GroupLabel = config.groupLabel;\n\n if (config.icon) {\n group.DisplayIconMode = 'custom';\n group.DisplayIcon = config.icon;\n }\n\n if (config.color) {\n group.DisplayColorMode = 'manual';\n group.DisplayColor = config.color;\n }\n\n return group;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-timeline",
|
|
3
|
-
"version": "6.1
|
|
3
|
+
"version": "6.2.0-edge.1",
|
|
4
4
|
"description": "MemberJunction: Responsive timeline component for Angular. Works with MemberJunction entities or plain JavaScript objects. No external dependencies.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@angular/compiler": "21.2.22",
|
|
22
22
|
"@angular/compiler-cli": "21.2.22",
|
|
23
|
-
"@memberjunction/ng-test-utils": "6.1
|
|
23
|
+
"@memberjunction/ng-test-utils": "6.2.0-edge.1",
|
|
24
24
|
"vitest": "^4.0.18"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@memberjunction/ng-base-types": "6.1
|
|
37
|
-
"@memberjunction/ng-ui-components": "6.1
|
|
38
|
-
"@memberjunction/core": "6.1
|
|
36
|
+
"@memberjunction/ng-base-types": "6.2.0-edge.1",
|
|
37
|
+
"@memberjunction/ng-ui-components": "6.2.0-edge.1",
|
|
38
|
+
"@memberjunction/core": "6.2.0-edge.1",
|
|
39
39
|
"rxjs": "~7.8.2",
|
|
40
40
|
"tslib": "^2.8.1"
|
|
41
41
|
},
|