@memberjunction/ng-timeline 2.122.1 → 2.123.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/README.md +385 -245
- package/dist/lib/component/timeline.component.d.ts +404 -60
- package/dist/lib/component/timeline.component.d.ts.map +1 -1
- package/dist/lib/component/timeline.component.js +2029 -132
- package/dist/lib/component/timeline.component.js.map +1 -1
- package/dist/lib/events.d.ts +440 -0
- package/dist/lib/events.d.ts.map +1 -0
- package/dist/lib/events.js +11 -0
- package/dist/lib/events.js.map +1 -0
- package/dist/lib/module.d.ts +14 -6
- package/dist/lib/module.d.ts.map +1 -1
- package/dist/lib/module.js +24 -26
- package/dist/lib/module.js.map +1 -1
- package/dist/lib/timeline-group.d.ts +387 -0
- package/dist/lib/timeline-group.d.ts.map +1 -0
- package/dist/lib/timeline-group.js +523 -0
- package/dist/lib/timeline-group.js.map +1 -0
- package/dist/lib/types.d.ts +491 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +49 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/public-api.d.ts +12 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +15 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +19 -17
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Core type definitions for the MJ Timeline component.
|
|
3
|
+
*
|
|
4
|
+
* This module defines all interfaces, types, and classes used by the timeline.
|
|
5
|
+
* The types are designed to work with both MemberJunction BaseEntity objects
|
|
6
|
+
* and plain JavaScript objects, making the component usable in any Angular application.
|
|
7
|
+
*
|
|
8
|
+
* @module @memberjunction/ng-timeline/types
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Orientation options for the timeline display.
|
|
12
|
+
* - `vertical`: Events displayed top-to-bottom (default)
|
|
13
|
+
* - `horizontal`: Events displayed left-to-right with horizontal scrolling
|
|
14
|
+
*/
|
|
15
|
+
export type TimelineOrientation = 'vertical' | 'horizontal';
|
|
16
|
+
/**
|
|
17
|
+
* Layout options for vertical timeline.
|
|
18
|
+
* - `single`: All events on one side of the axis
|
|
19
|
+
* - `alternating`: Events alternate between left and right sides
|
|
20
|
+
*/
|
|
21
|
+
export type TimelineLayout = 'single' | 'alternating';
|
|
22
|
+
/**
|
|
23
|
+
* Sort order for timeline events.
|
|
24
|
+
* - `asc`: Oldest events first (ascending by date)
|
|
25
|
+
* - `desc`: Newest events first (descending by date)
|
|
26
|
+
*/
|
|
27
|
+
export type TimelineSortOrder = 'asc' | 'desc';
|
|
28
|
+
/**
|
|
29
|
+
* Grouping options for time segments.
|
|
30
|
+
* - `none`: No grouping, flat list of events
|
|
31
|
+
* - `day`: Group by day
|
|
32
|
+
* - `week`: Group by week
|
|
33
|
+
* - `month`: Group by month (default)
|
|
34
|
+
* - `quarter`: Group by quarter
|
|
35
|
+
* - `year`: Group by year
|
|
36
|
+
*/
|
|
37
|
+
export type TimeSegmentGrouping = 'none' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
38
|
+
/**
|
|
39
|
+
* Button style variants for action buttons.
|
|
40
|
+
*/
|
|
41
|
+
export type ActionVariant = 'primary' | 'secondary' | 'danger' | 'link';
|
|
42
|
+
/**
|
|
43
|
+
* Image position options within a card.
|
|
44
|
+
*/
|
|
45
|
+
export type ImagePosition = 'left' | 'top' | 'none';
|
|
46
|
+
/**
|
|
47
|
+
* Image size presets.
|
|
48
|
+
*/
|
|
49
|
+
export type ImageSize = 'small' | 'medium' | 'large';
|
|
50
|
+
/**
|
|
51
|
+
* Configuration for displaying a field within a timeline card.
|
|
52
|
+
* Used for both summary fields (always visible) and expanded fields (visible when expanded).
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* const field: TimelineDisplayField = {
|
|
57
|
+
* fieldName: 'AssignedTo',
|
|
58
|
+
* label: 'Assignee',
|
|
59
|
+
* icon: 'fa-solid fa-user',
|
|
60
|
+
* formatter: (value) => value?.toString().toUpperCase() ?? 'Unassigned'
|
|
61
|
+
* };
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export interface TimelineDisplayField {
|
|
65
|
+
/**
|
|
66
|
+
* The field name to extract from the record.
|
|
67
|
+
* For BaseEntity objects, this is passed to `.Get()`.
|
|
68
|
+
* For plain objects, this is used as a property key.
|
|
69
|
+
*/
|
|
70
|
+
fieldName: string;
|
|
71
|
+
/**
|
|
72
|
+
* Display label shown before the value.
|
|
73
|
+
* If not provided, defaults to the fieldName.
|
|
74
|
+
*/
|
|
75
|
+
label?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Font Awesome icon class to display before the label.
|
|
78
|
+
* @example 'fa-solid fa-user'
|
|
79
|
+
*/
|
|
80
|
+
icon?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Format string for dates/numbers.
|
|
83
|
+
* For dates, uses Angular DatePipe format strings.
|
|
84
|
+
* For numbers, uses Angular DecimalPipe format strings.
|
|
85
|
+
*/
|
|
86
|
+
format?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Custom formatter function for complex value transformations.
|
|
89
|
+
* Takes precedence over the `format` property.
|
|
90
|
+
*
|
|
91
|
+
* @param value - The raw field value
|
|
92
|
+
* @returns Formatted string to display
|
|
93
|
+
*/
|
|
94
|
+
formatter?: (value: unknown) => string;
|
|
95
|
+
/**
|
|
96
|
+
* If true, only shows the value without the label.
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
hideLabel?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Additional CSS class(es) to apply to this field's container.
|
|
102
|
+
*/
|
|
103
|
+
cssClass?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Configuration for an action button displayed on a timeline card.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* const viewAction: TimelineAction = {
|
|
111
|
+
* id: 'view',
|
|
112
|
+
* label: 'View Details',
|
|
113
|
+
* icon: 'fa-solid fa-eye',
|
|
114
|
+
* variant: 'primary',
|
|
115
|
+
* tooltip: 'Open the full details view'
|
|
116
|
+
* };
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export interface TimelineAction {
|
|
120
|
+
/**
|
|
121
|
+
* Unique identifier for this action.
|
|
122
|
+
* Used in event handlers to identify which action was clicked.
|
|
123
|
+
*/
|
|
124
|
+
id: string;
|
|
125
|
+
/**
|
|
126
|
+
* Display text for the button.
|
|
127
|
+
*/
|
|
128
|
+
label: string;
|
|
129
|
+
/**
|
|
130
|
+
* Font Awesome icon class to display in the button.
|
|
131
|
+
* @example 'fa-solid fa-edit'
|
|
132
|
+
*/
|
|
133
|
+
icon?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Visual style variant for the button.
|
|
136
|
+
* - `primary`: Prominent action (filled/solid)
|
|
137
|
+
* - `secondary`: Standard action (outlined)
|
|
138
|
+
* - `danger`: Destructive action (red)
|
|
139
|
+
* - `link`: Text-only button
|
|
140
|
+
* @default 'secondary'
|
|
141
|
+
*/
|
|
142
|
+
variant?: ActionVariant;
|
|
143
|
+
/**
|
|
144
|
+
* Tooltip text shown on hover.
|
|
145
|
+
*/
|
|
146
|
+
tooltip?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Whether the action is disabled.
|
|
149
|
+
* Disabled actions are visually muted and not clickable.
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
disabled?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS class(es) to apply to the button.
|
|
155
|
+
*/
|
|
156
|
+
cssClass?: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Configuration for how timeline cards are displayed.
|
|
160
|
+
* Can be set at the group level (applies to all events in group) or
|
|
161
|
+
* overridden per-event via `EventConfigFunction`.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* const cardConfig: TimelineCardConfig = {
|
|
166
|
+
* showIcon: true,
|
|
167
|
+
* showDate: true,
|
|
168
|
+
* dateFormat: 'MMM d, yyyy h:mm a',
|
|
169
|
+
* collapsible: true,
|
|
170
|
+
* defaultExpanded: false,
|
|
171
|
+
* descriptionMaxLines: 3,
|
|
172
|
+
* summaryFields: [
|
|
173
|
+
* { fieldName: 'Status', icon: 'fa-solid fa-circle' },
|
|
174
|
+
* { fieldName: 'Priority', icon: 'fa-solid fa-flag' }
|
|
175
|
+
* ],
|
|
176
|
+
* actions: [
|
|
177
|
+
* { id: 'view', label: 'View', variant: 'primary' },
|
|
178
|
+
* { id: 'edit', label: 'Edit', variant: 'secondary' }
|
|
179
|
+
* ]
|
|
180
|
+
* };
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
export interface TimelineCardConfig {
|
|
184
|
+
/**
|
|
185
|
+
* Whether to show the icon in the card header.
|
|
186
|
+
* @default true
|
|
187
|
+
*/
|
|
188
|
+
showIcon?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Whether to show the date in the card header.
|
|
191
|
+
* @default true
|
|
192
|
+
*/
|
|
193
|
+
showDate?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Whether to show the subtitle below the title.
|
|
196
|
+
* @default true
|
|
197
|
+
*/
|
|
198
|
+
showSubtitle?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Date format string (Angular DatePipe format).
|
|
201
|
+
* @default 'MMM d, yyyy'
|
|
202
|
+
* @example 'short', 'medium', 'MMM d, yyyy h:mm a'
|
|
203
|
+
*/
|
|
204
|
+
dateFormat?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Field name containing the image URL.
|
|
207
|
+
* If not set, no image is displayed.
|
|
208
|
+
*/
|
|
209
|
+
imageField?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Position of the image within the card.
|
|
212
|
+
* - `left`: Image on the left side of the header
|
|
213
|
+
* - `top`: Image above the content (full width)
|
|
214
|
+
* - `none`: No image displayed
|
|
215
|
+
* @default 'left'
|
|
216
|
+
*/
|
|
217
|
+
imagePosition?: ImagePosition;
|
|
218
|
+
/**
|
|
219
|
+
* Size preset for the image.
|
|
220
|
+
* - `small`: 48x48px
|
|
221
|
+
* - `medium`: 80x80px
|
|
222
|
+
* - `large`: 120x120px
|
|
223
|
+
* @default 'small'
|
|
224
|
+
*/
|
|
225
|
+
imageSize?: ImageSize;
|
|
226
|
+
/**
|
|
227
|
+
* Field name for the description/body text.
|
|
228
|
+
* If not set, uses the group's DescriptionFieldName.
|
|
229
|
+
*/
|
|
230
|
+
descriptionField?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Maximum number of lines to show before truncating.
|
|
233
|
+
* Set to 0 for no limit.
|
|
234
|
+
* @default 3
|
|
235
|
+
*/
|
|
236
|
+
descriptionMaxLines?: number;
|
|
237
|
+
/**
|
|
238
|
+
* Whether to render HTML in the description.
|
|
239
|
+
* WARNING: Only enable if content is trusted to prevent XSS.
|
|
240
|
+
* @default false
|
|
241
|
+
*/
|
|
242
|
+
allowHtmlDescription?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Whether this card can be expanded/collapsed.
|
|
245
|
+
* @default true
|
|
246
|
+
*/
|
|
247
|
+
collapsible?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Whether the card starts in expanded state.
|
|
250
|
+
* @default false
|
|
251
|
+
*/
|
|
252
|
+
defaultExpanded?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Fields to display only when the card is expanded.
|
|
255
|
+
* These appear in the detail section below the description.
|
|
256
|
+
*/
|
|
257
|
+
expandedFields?: TimelineDisplayField[];
|
|
258
|
+
/**
|
|
259
|
+
* Fields to always display (even when collapsed).
|
|
260
|
+
* These appear as compact field:value pairs.
|
|
261
|
+
*/
|
|
262
|
+
summaryFields?: TimelineDisplayField[];
|
|
263
|
+
/**
|
|
264
|
+
* Action buttons to display at the bottom of the card.
|
|
265
|
+
*/
|
|
266
|
+
actions?: TimelineAction[];
|
|
267
|
+
/**
|
|
268
|
+
* If true, actions are only visible on hover/focus.
|
|
269
|
+
* @default false
|
|
270
|
+
*/
|
|
271
|
+
actionsOnHover?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Additional CSS class(es) to apply to the card container.
|
|
274
|
+
*/
|
|
275
|
+
cssClass?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Minimum width for the card.
|
|
278
|
+
* @example '200px', '15rem'
|
|
279
|
+
*/
|
|
280
|
+
minWidth?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Maximum width for the card.
|
|
283
|
+
* @default '400px'
|
|
284
|
+
*/
|
|
285
|
+
maxWidth?: string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Per-event display configuration returned by `EventConfigFunction`.
|
|
289
|
+
* Allows customizing individual events within a group.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* group.EventConfigFunction = (record) => ({
|
|
294
|
+
* icon: record.Priority === 'High' ? 'fa-solid fa-exclamation' : undefined,
|
|
295
|
+
* color: record.Status === 'Overdue' ? '#f44336' : undefined,
|
|
296
|
+
* cssClass: record.IsImportant ? 'important-event' : ''
|
|
297
|
+
* });
|
|
298
|
+
* ```
|
|
299
|
+
*/
|
|
300
|
+
export interface TimelineEventConfig {
|
|
301
|
+
/**
|
|
302
|
+
* Override the icon for this specific event.
|
|
303
|
+
* Font Awesome class string.
|
|
304
|
+
*/
|
|
305
|
+
icon?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Override the marker/accent color for this event.
|
|
308
|
+
* Any valid CSS color value.
|
|
309
|
+
*/
|
|
310
|
+
color?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Additional CSS class(es) for this event's card.
|
|
313
|
+
*/
|
|
314
|
+
cssClass?: string;
|
|
315
|
+
/**
|
|
316
|
+
* Override the actions for this specific event.
|
|
317
|
+
*/
|
|
318
|
+
actions?: TimelineAction[];
|
|
319
|
+
/**
|
|
320
|
+
* Override whether this specific event is collapsible.
|
|
321
|
+
*/
|
|
322
|
+
collapsible?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Override whether this specific event starts expanded.
|
|
325
|
+
*/
|
|
326
|
+
defaultExpanded?: boolean;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Configuration for virtual scrolling behavior.
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* const scrollConfig: VirtualScrollConfig = {
|
|
334
|
+
* enabled: true,
|
|
335
|
+
* batchSize: 25,
|
|
336
|
+
* loadThreshold: 300,
|
|
337
|
+
* showLoadingIndicator: true,
|
|
338
|
+
* loadingMessage: 'Loading more events...'
|
|
339
|
+
* };
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
export interface VirtualScrollConfig {
|
|
343
|
+
/**
|
|
344
|
+
* Whether virtual scrolling is enabled.
|
|
345
|
+
* When disabled, all events load at once.
|
|
346
|
+
* @default true
|
|
347
|
+
*/
|
|
348
|
+
enabled: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Number of events to load per batch.
|
|
351
|
+
* @default 20
|
|
352
|
+
*/
|
|
353
|
+
batchSize: number;
|
|
354
|
+
/**
|
|
355
|
+
* Distance from bottom (in pixels) at which to trigger loading more.
|
|
356
|
+
* @default 200
|
|
357
|
+
*/
|
|
358
|
+
loadThreshold: number;
|
|
359
|
+
/**
|
|
360
|
+
* Whether to show a loading indicator while fetching.
|
|
361
|
+
* @default true
|
|
362
|
+
*/
|
|
363
|
+
showLoadingIndicator: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* Custom message to display while loading.
|
|
366
|
+
* @default 'Loading more events...'
|
|
367
|
+
*/
|
|
368
|
+
loadingMessage?: string;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Runtime state for virtual scrolling.
|
|
372
|
+
* Exposed as a public property on the component for monitoring.
|
|
373
|
+
*/
|
|
374
|
+
export interface VirtualScrollState {
|
|
375
|
+
/**
|
|
376
|
+
* Total number of events available (if known).
|
|
377
|
+
* May be undefined if total is unknown.
|
|
378
|
+
*/
|
|
379
|
+
totalCount?: number;
|
|
380
|
+
/**
|
|
381
|
+
* Number of events currently loaded and displayed.
|
|
382
|
+
*/
|
|
383
|
+
loadedCount: number;
|
|
384
|
+
/**
|
|
385
|
+
* Whether more events are available to load.
|
|
386
|
+
*/
|
|
387
|
+
hasMore: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Whether a load operation is currently in progress.
|
|
390
|
+
*/
|
|
391
|
+
isLoading: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Current scroll position offset.
|
|
394
|
+
*/
|
|
395
|
+
scrollOffset: number;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Internal representation of a timeline event.
|
|
399
|
+
* Created by mapping source records to this structure.
|
|
400
|
+
*
|
|
401
|
+
* @typeParam T - The type of the source record (defaults to `any`)
|
|
402
|
+
*/
|
|
403
|
+
export interface MJTimelineEvent<T = any> {
|
|
404
|
+
/**
|
|
405
|
+
* Unique identifier for this event.
|
|
406
|
+
* Extracted from the source record using IdFieldName.
|
|
407
|
+
*/
|
|
408
|
+
id: string;
|
|
409
|
+
/**
|
|
410
|
+
* Reference to the original source record.
|
|
411
|
+
* Can be a BaseEntity or plain object.
|
|
412
|
+
*/
|
|
413
|
+
entity: T;
|
|
414
|
+
/**
|
|
415
|
+
* Event title extracted from TitleFieldName.
|
|
416
|
+
*/
|
|
417
|
+
title: string;
|
|
418
|
+
/**
|
|
419
|
+
* Event date extracted from DateFieldName.
|
|
420
|
+
*/
|
|
421
|
+
date: Date;
|
|
422
|
+
/**
|
|
423
|
+
* Optional subtitle extracted from SubtitleFieldName.
|
|
424
|
+
*/
|
|
425
|
+
subtitle?: string;
|
|
426
|
+
/**
|
|
427
|
+
* Event description/body text.
|
|
428
|
+
*/
|
|
429
|
+
description?: string;
|
|
430
|
+
/**
|
|
431
|
+
* Image URL if configured.
|
|
432
|
+
*/
|
|
433
|
+
imageUrl?: string;
|
|
434
|
+
/**
|
|
435
|
+
* Display configuration for this event.
|
|
436
|
+
* Merged from group defaults and per-event overrides.
|
|
437
|
+
*/
|
|
438
|
+
config: TimelineEventConfig;
|
|
439
|
+
/**
|
|
440
|
+
* Index of the parent group in the groups array.
|
|
441
|
+
*/
|
|
442
|
+
groupIndex: number;
|
|
443
|
+
/**
|
|
444
|
+
* Current expansion state.
|
|
445
|
+
*/
|
|
446
|
+
isExpanded: boolean;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Represents a collapsible time segment (e.g., "December 2025").
|
|
450
|
+
* Contains a collection of events within the time period.
|
|
451
|
+
*/
|
|
452
|
+
export interface TimelineSegment {
|
|
453
|
+
/**
|
|
454
|
+
* Human-readable label for the segment.
|
|
455
|
+
* @example "December 2025", "Week of Nov 25", "Q4 2025"
|
|
456
|
+
*/
|
|
457
|
+
label: string;
|
|
458
|
+
/**
|
|
459
|
+
* Start date of this segment (inclusive).
|
|
460
|
+
*/
|
|
461
|
+
startDate: Date;
|
|
462
|
+
/**
|
|
463
|
+
* End date of this segment (exclusive).
|
|
464
|
+
*/
|
|
465
|
+
endDate: Date;
|
|
466
|
+
/**
|
|
467
|
+
* Events within this time segment.
|
|
468
|
+
*/
|
|
469
|
+
events: MJTimelineEvent[];
|
|
470
|
+
/**
|
|
471
|
+
* Current expansion state of the segment.
|
|
472
|
+
*/
|
|
473
|
+
isExpanded: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Total count of events (for display when collapsed).
|
|
476
|
+
*/
|
|
477
|
+
eventCount: number;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Default card configuration applied when not overridden.
|
|
481
|
+
*/
|
|
482
|
+
export declare const DEFAULT_CARD_CONFIG: TimelineCardConfig;
|
|
483
|
+
/**
|
|
484
|
+
* Default virtual scroll configuration.
|
|
485
|
+
*/
|
|
486
|
+
export declare const DEFAULT_VIRTUAL_SCROLL_CONFIG: VirtualScrollConfig;
|
|
487
|
+
/**
|
|
488
|
+
* Default virtual scroll state.
|
|
489
|
+
*/
|
|
490
|
+
export declare const DEFAULT_VIRTUAL_SCROLL_STATE: VirtualScrollState;
|
|
491
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAMrD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;IAEvC;;;OAGG;IACH,SAAS,CAA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;;;;;GAKG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,GAAG;IACtC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,EAAE,CAAC,CAAC;IAEV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAE5B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,IAAI,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,eAAe,EAAE,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAajC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,mBAM3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Core type definitions for the MJ Timeline component.
|
|
3
|
+
*
|
|
4
|
+
* This module defines all interfaces, types, and classes used by the timeline.
|
|
5
|
+
* The types are designed to work with both MemberJunction BaseEntity objects
|
|
6
|
+
* and plain JavaScript objects, making the component usable in any Angular application.
|
|
7
|
+
*
|
|
8
|
+
* @module @memberjunction/ng-timeline/types
|
|
9
|
+
*/
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// DEFAULT CONFIGURATIONS
|
|
12
|
+
// ============================================================================
|
|
13
|
+
/**
|
|
14
|
+
* Default card configuration applied when not overridden.
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_CARD_CONFIG = {
|
|
17
|
+
showIcon: true,
|
|
18
|
+
showDate: true,
|
|
19
|
+
showSubtitle: true,
|
|
20
|
+
dateFormat: 'MMM d, yyyy',
|
|
21
|
+
imagePosition: 'left',
|
|
22
|
+
imageSize: 'small',
|
|
23
|
+
descriptionMaxLines: 3,
|
|
24
|
+
allowHtmlDescription: false,
|
|
25
|
+
collapsible: true,
|
|
26
|
+
defaultExpanded: false,
|
|
27
|
+
actionsOnHover: false,
|
|
28
|
+
maxWidth: '400px'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Default virtual scroll configuration.
|
|
32
|
+
*/
|
|
33
|
+
export const DEFAULT_VIRTUAL_SCROLL_CONFIG = {
|
|
34
|
+
enabled: true,
|
|
35
|
+
batchSize: 20,
|
|
36
|
+
loadThreshold: 200,
|
|
37
|
+
showLoadingIndicator: true,
|
|
38
|
+
loadingMessage: 'Loading more events...'
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Default virtual scroll state.
|
|
42
|
+
*/
|
|
43
|
+
export const DEFAULT_VIRTUAL_SCROLL_STATE = {
|
|
44
|
+
loadedCount: 0,
|
|
45
|
+
hasMore: false,
|
|
46
|
+
isLoading: false,
|
|
47
|
+
scrollOffset: 0
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2kBH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAuB;IACrD,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,aAAa;IACzB,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,OAAO;IAClB,mBAAmB,EAAE,CAAC;IACtB,oBAAoB,EAAE,KAAK;IAC3B,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,QAAQ,EAAE,OAAO;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAwB;IAChE,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,EAAE;IACb,aAAa,EAAE,GAAG;IAClB,oBAAoB,EAAE,IAAI;IAC1B,cAAc,EAAE,wBAAwB;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAuB;IAC9D,WAAW,EAAE,CAAC;IACd,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,CAAC;CAChB,CAAC"}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Public API surface for @memberjunction/ng-timeline
|
|
3
|
+
*
|
|
4
|
+
* This module exports all public types, classes, and components for the
|
|
5
|
+
* MJ Timeline component. The component works with both MemberJunction
|
|
6
|
+
* BaseEntity objects and plain JavaScript objects.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export * from './lib/types';
|
|
11
|
+
export * from './lib/events';
|
|
12
|
+
export * from './lib/timeline-group';
|
|
1
13
|
export * from './lib/component/timeline.component';
|
|
2
14
|
export * from './lib/module';
|
|
3
15
|
//# sourceMappingURL=public-api.d.ts.map
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,aAAa,CAAC;AAG5B,cAAc,cAAc,CAAC;AAG7B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,cAAc,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
* Public API
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Public API surface for @memberjunction/ng-timeline
|
|
3
|
+
*
|
|
4
|
+
* This module exports all public types, classes, and components for the
|
|
5
|
+
* MJ Timeline component. The component works with both MemberJunction
|
|
6
|
+
* BaseEntity objects and plain JavaScript objects.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
3
9
|
*/
|
|
10
|
+
// Core types and interfaces
|
|
11
|
+
export * from './lib/types';
|
|
12
|
+
// Event interfaces (BeforeX/AfterX pattern)
|
|
13
|
+
export * from './lib/events';
|
|
14
|
+
// TimelineGroup class
|
|
15
|
+
export * from './lib/timeline-group';
|
|
16
|
+
// Component and Module
|
|
4
17
|
export * from './lib/component/timeline.component';
|
|
5
18
|
export * from './lib/module';
|
|
6
19
|
//# sourceMappingURL=public-api.js.map
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,4BAA4B;AAC5B,cAAc,aAAa,CAAC;AAE5B,4CAA4C;AAC5C,cAAc,cAAc,CAAC;AAE7B,sBAAsB;AACtB,cAAc,sBAAsB,CAAC;AAErC,uBAAuB;AACvB,cAAc,oCAAoC,CAAC;AACnD,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-timeline",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "MemberJunction:
|
|
3
|
+
"version": "2.123.0",
|
|
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",
|
|
7
7
|
"files": [
|
|
@@ -11,8 +11,15 @@
|
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"build": "ngc"
|
|
13
13
|
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
|
|
14
|
+
"keywords": [
|
|
15
|
+
"angular",
|
|
16
|
+
"timeline",
|
|
17
|
+
"memberjunction",
|
|
18
|
+
"component",
|
|
19
|
+
"responsive",
|
|
20
|
+
"chronological"
|
|
21
|
+
],
|
|
22
|
+
"author": "MemberJunction",
|
|
16
23
|
"license": "ISC",
|
|
17
24
|
"devDependencies": {
|
|
18
25
|
"@angular/compiler": "18.0.2",
|
|
@@ -20,21 +27,16 @@
|
|
|
20
27
|
},
|
|
21
28
|
"peerDependencies": {
|
|
22
29
|
"@angular/common": "18.0.2",
|
|
23
|
-
"@angular/core": "18.0.2"
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
"@angular/core": "18.0.2"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"@memberjunction/core": {
|
|
34
|
+
"optional": true
|
|
35
|
+
}
|
|
26
36
|
},
|
|
27
37
|
"dependencies": {
|
|
28
|
-
"@memberjunction/core
|
|
29
|
-
"
|
|
30
|
-
"@memberjunction/core": "2.122.1",
|
|
31
|
-
"@memberjunction/ng-container-directives": "2.122.1",
|
|
32
|
-
"@memberjunction/ng-entity-form-dialog": "2.122.1",
|
|
33
|
-
"@memberjunction/ng-shared": "2.122.1",
|
|
34
|
-
"@progress/kendo-angular-buttons": "16.2.0",
|
|
35
|
-
"@progress/kendo-angular-layout": "16.2.0",
|
|
36
|
-
"@progress/kendo-angular-indicators": "16.2.0",
|
|
37
|
-
"@progress/kendo-angular-scheduler": "16.2.0",
|
|
38
|
+
"@memberjunction/core": "2.123.0",
|
|
39
|
+
"rxjs": "~7.8.0",
|
|
38
40
|
"tslib": "^2.3.0"
|
|
39
41
|
},
|
|
40
42
|
"sideEffects": false,
|