@memberjunction/ng-entity-viewer 0.0.1 → 2.122.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 +224 -43
- package/dist/lib/entity-cards/entity-cards.component.d.ts +163 -0
- package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -0
- package/dist/lib/entity-cards/entity-cards.component.js +797 -0
- package/dist/lib/entity-cards/entity-cards.component.js.map +1 -0
- package/dist/lib/entity-grid/entity-grid.component.d.ts +216 -0
- package/dist/lib/entity-grid/entity-grid.component.d.ts.map +1 -0
- package/dist/lib/entity-grid/entity-grid.component.js +676 -0
- package/dist/lib/entity-grid/entity-grid.component.js.map +1 -0
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts +182 -0
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts.map +1 -0
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +787 -0
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js.map +1 -0
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts +252 -0
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -0
- package/dist/lib/entity-viewer/entity-viewer.component.js +883 -0
- package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -0
- package/dist/lib/pagination/pagination.component.d.ts +60 -0
- package/dist/lib/pagination/pagination.component.d.ts.map +1 -0
- package/dist/lib/pagination/pagination.component.js +199 -0
- package/dist/lib/pagination/pagination.component.js.map +1 -0
- package/dist/lib/pill/pill.component.d.ts +58 -0
- package/dist/lib/pill/pill.component.d.ts.map +1 -0
- package/dist/lib/pill/pill.component.js +125 -0
- package/dist/lib/pill/pill.component.js.map +1 -0
- package/dist/lib/types.d.ts +316 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +30 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils/highlight.util.d.ts +69 -0
- package/dist/lib/utils/highlight.util.d.ts.map +1 -0
- package/dist/lib/utils/highlight.util.js +214 -0
- package/dist/lib/utils/highlight.util.js.map +1 -0
- package/dist/module.d.ts +38 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +83 -0
- package/dist/module.js.map +1 -0
- package/dist/public-api.d.ts +16 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +20 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +45 -6
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { EntityInfo, CompositeKey } from '@memberjunction/core';
|
|
2
|
+
import { BaseEntity } from '@memberjunction/core';
|
|
3
|
+
/**
|
|
4
|
+
* View modes supported by the EntityViewer component
|
|
5
|
+
*/
|
|
6
|
+
export type EntityViewMode = 'grid' | 'cards';
|
|
7
|
+
/**
|
|
8
|
+
* Behavior when a record is selected
|
|
9
|
+
*/
|
|
10
|
+
export type RecordSelectionBehavior = 'emit-only' | 'show-detail' | 'emit-and-detail';
|
|
11
|
+
/**
|
|
12
|
+
* Field display type for smart rendering in cards
|
|
13
|
+
*/
|
|
14
|
+
export type CardFieldType = 'number' | 'boolean' | 'text' | 'date';
|
|
15
|
+
/**
|
|
16
|
+
* Color categories for status pills based on semantic meaning
|
|
17
|
+
*/
|
|
18
|
+
export type PillColorType = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
19
|
+
/**
|
|
20
|
+
* Metadata for a field to display in a card
|
|
21
|
+
*/
|
|
22
|
+
export interface CardDisplayField {
|
|
23
|
+
/** Field name from the entity */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Display type for rendering */
|
|
26
|
+
type: CardFieldType;
|
|
27
|
+
/** Human-readable label */
|
|
28
|
+
label: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Auto-generated card template based on entity metadata
|
|
32
|
+
*/
|
|
33
|
+
export interface CardTemplate {
|
|
34
|
+
/** Primary title field name */
|
|
35
|
+
titleField: string;
|
|
36
|
+
/** Secondary subtitle field name */
|
|
37
|
+
subtitleField: string | null;
|
|
38
|
+
/** Description/notes field name */
|
|
39
|
+
descriptionField: string | null;
|
|
40
|
+
/** Display fields with type information for smart rendering */
|
|
41
|
+
displayFields: CardDisplayField[];
|
|
42
|
+
/**
|
|
43
|
+
* Array of thumbnail field names in priority order
|
|
44
|
+
* Per-record fallback: if the first field is empty, try the next, etc.
|
|
45
|
+
*/
|
|
46
|
+
thumbnailFields: string[];
|
|
47
|
+
/** Badge/priority field name */
|
|
48
|
+
badgeField: string | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Column definition for the grid view
|
|
52
|
+
*/
|
|
53
|
+
export interface GridColumnDef {
|
|
54
|
+
/** Field name from the entity */
|
|
55
|
+
field: string;
|
|
56
|
+
/** Column header text */
|
|
57
|
+
headerName: string;
|
|
58
|
+
/** Column width in pixels */
|
|
59
|
+
width?: number;
|
|
60
|
+
/** Minimum column width */
|
|
61
|
+
minWidth?: number;
|
|
62
|
+
/** Maximum column width */
|
|
63
|
+
maxWidth?: number;
|
|
64
|
+
/** Whether column is sortable */
|
|
65
|
+
sortable?: boolean;
|
|
66
|
+
/** Whether column is filterable */
|
|
67
|
+
filter?: boolean;
|
|
68
|
+
/** Whether column is resizable */
|
|
69
|
+
resizable?: boolean;
|
|
70
|
+
/** Whether to hide this column */
|
|
71
|
+
hide?: boolean;
|
|
72
|
+
/** Custom cell renderer type */
|
|
73
|
+
cellRenderer?: string;
|
|
74
|
+
/** Value formatter function name */
|
|
75
|
+
valueFormatter?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Event emitted when a record is selected (clicked)
|
|
79
|
+
*/
|
|
80
|
+
export interface RecordSelectedEvent {
|
|
81
|
+
/** The selected entity record */
|
|
82
|
+
record: BaseEntity;
|
|
83
|
+
/** The entity metadata */
|
|
84
|
+
entity: EntityInfo;
|
|
85
|
+
/** The composite key of the record */
|
|
86
|
+
compositeKey: CompositeKey;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Event emitted when a record should be opened (double-click or open button)
|
|
90
|
+
*/
|
|
91
|
+
export interface RecordOpenedEvent {
|
|
92
|
+
/** The entity record to open */
|
|
93
|
+
record: BaseEntity;
|
|
94
|
+
/** The entity metadata */
|
|
95
|
+
entity: EntityInfo;
|
|
96
|
+
/** The composite key of the record */
|
|
97
|
+
compositeKey: CompositeKey;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Event emitted when data is loaded
|
|
101
|
+
*/
|
|
102
|
+
export interface DataLoadedEvent {
|
|
103
|
+
/** Total number of records available */
|
|
104
|
+
totalRowCount: number;
|
|
105
|
+
/** Number of records currently loaded */
|
|
106
|
+
loadedRowCount: number;
|
|
107
|
+
/** Time taken to load in milliseconds */
|
|
108
|
+
loadTime: number;
|
|
109
|
+
/** The loaded records - allows parent to access records for state restoration */
|
|
110
|
+
records: BaseEntity[];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Event emitted when filtered count changes
|
|
114
|
+
*/
|
|
115
|
+
export interface FilteredCountChangedEvent {
|
|
116
|
+
/** Number of records after filtering */
|
|
117
|
+
filteredCount: number;
|
|
118
|
+
/** Total number of records before filtering */
|
|
119
|
+
totalCount: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Sort direction for server-side sorting
|
|
123
|
+
*/
|
|
124
|
+
export type SortDirection = 'asc' | 'desc' | null;
|
|
125
|
+
/**
|
|
126
|
+
* Sort state for a column
|
|
127
|
+
*/
|
|
128
|
+
export interface SortState {
|
|
129
|
+
/** Field name to sort by */
|
|
130
|
+
field: string;
|
|
131
|
+
/** Sort direction */
|
|
132
|
+
direction: SortDirection;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Event emitted when sort changes in the grid
|
|
136
|
+
*/
|
|
137
|
+
export interface SortChangedEvent {
|
|
138
|
+
/** The new sort state (null if no sorting) */
|
|
139
|
+
sort: SortState | null;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Pagination state for server-side paging
|
|
143
|
+
*/
|
|
144
|
+
export interface PaginationState {
|
|
145
|
+
/** Current page number (0-based) */
|
|
146
|
+
currentPage: number;
|
|
147
|
+
/** Number of records per page */
|
|
148
|
+
pageSize: number;
|
|
149
|
+
/** Total number of records available (from server) */
|
|
150
|
+
totalRecords: number;
|
|
151
|
+
/** Whether there are more records to load */
|
|
152
|
+
hasMore: boolean;
|
|
153
|
+
/** Whether data is currently being loaded */
|
|
154
|
+
isLoading: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Event emitted when pagination changes
|
|
158
|
+
*/
|
|
159
|
+
export interface PaginationChangedEvent {
|
|
160
|
+
/** The new pagination state */
|
|
161
|
+
pagination: PaginationState;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Event emitted when requesting to load more data
|
|
165
|
+
*/
|
|
166
|
+
export interface LoadMoreEvent {
|
|
167
|
+
/** Current page being requested (0-based) */
|
|
168
|
+
page: number;
|
|
169
|
+
/** Page size */
|
|
170
|
+
pageSize: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Column configuration from a User View's GridState
|
|
174
|
+
* Matches the format stored in UserView.GridState JSON
|
|
175
|
+
*/
|
|
176
|
+
export interface ViewColumnConfig {
|
|
177
|
+
/** Entity field ID */
|
|
178
|
+
ID?: string;
|
|
179
|
+
/** Field name */
|
|
180
|
+
Name: string;
|
|
181
|
+
/** Display name for column header */
|
|
182
|
+
DisplayName?: string;
|
|
183
|
+
/** Whether the column is hidden */
|
|
184
|
+
hidden?: boolean;
|
|
185
|
+
/** Column width in pixels */
|
|
186
|
+
width?: number;
|
|
187
|
+
/** Column order index */
|
|
188
|
+
orderIndex?: number;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Sort configuration from a User View's GridState
|
|
192
|
+
* Matches the format stored in UserView.GridState.sortSettings
|
|
193
|
+
*/
|
|
194
|
+
export interface ViewSortConfig {
|
|
195
|
+
/** Field name to sort by */
|
|
196
|
+
field: string;
|
|
197
|
+
/** Sort direction - 'asc' or 'desc' */
|
|
198
|
+
dir: 'asc' | 'desc';
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Grid state configuration from a User View
|
|
202
|
+
* Matches the JSON structure stored in UserView.GridState
|
|
203
|
+
*/
|
|
204
|
+
export interface ViewGridStateConfig {
|
|
205
|
+
/** Column visibility, width, and order settings */
|
|
206
|
+
columnSettings?: ViewColumnConfig[];
|
|
207
|
+
/** Sort settings */
|
|
208
|
+
sortSettings?: ViewSortConfig[];
|
|
209
|
+
/** Filter settings (Kendo format) */
|
|
210
|
+
filter?: object;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Event emitted when grid state changes (column resize, reorder, etc.)
|
|
214
|
+
*/
|
|
215
|
+
export interface GridStateChangedEvent {
|
|
216
|
+
/** The updated grid state */
|
|
217
|
+
gridState: ViewGridStateConfig;
|
|
218
|
+
/** What changed: 'columns', 'sort', 'filter' */
|
|
219
|
+
changeType: 'columns' | 'sort' | 'filter';
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Configuration options for the EntityViewer component
|
|
223
|
+
*/
|
|
224
|
+
export interface EntityViewerConfig {
|
|
225
|
+
/**
|
|
226
|
+
* Whether to show the filter input box
|
|
227
|
+
* @default true
|
|
228
|
+
*/
|
|
229
|
+
showFilter?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Whether to show the view mode toggle (grid/cards)
|
|
232
|
+
* @default true
|
|
233
|
+
*/
|
|
234
|
+
showViewModeToggle?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Behavior when a record is selected
|
|
237
|
+
* @default 'emit-only'
|
|
238
|
+
*/
|
|
239
|
+
selectionBehavior?: RecordSelectionBehavior;
|
|
240
|
+
/**
|
|
241
|
+
* Initial view mode
|
|
242
|
+
* @default 'grid'
|
|
243
|
+
*/
|
|
244
|
+
defaultViewMode?: EntityViewMode;
|
|
245
|
+
/**
|
|
246
|
+
* Whether to enable multi-select
|
|
247
|
+
* @default false
|
|
248
|
+
*/
|
|
249
|
+
enableMultiSelect?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Maximum number of records to load per page
|
|
252
|
+
* @default 100
|
|
253
|
+
*/
|
|
254
|
+
pageSize?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Whether to show record count in header
|
|
257
|
+
* @default true
|
|
258
|
+
*/
|
|
259
|
+
showRecordCount?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Placeholder text for the filter input
|
|
262
|
+
* @default 'Filter records...'
|
|
263
|
+
*/
|
|
264
|
+
filterPlaceholder?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Debounce time for filter input in milliseconds
|
|
267
|
+
* @default 250
|
|
268
|
+
*/
|
|
269
|
+
filterDebounceMs?: number;
|
|
270
|
+
/**
|
|
271
|
+
* Custom grid column definitions (optional - auto-generated if not provided)
|
|
272
|
+
*/
|
|
273
|
+
gridColumns?: GridColumnDef[];
|
|
274
|
+
/**
|
|
275
|
+
* Custom card template (optional - auto-generated if not provided)
|
|
276
|
+
*/
|
|
277
|
+
cardTemplate?: CardTemplate;
|
|
278
|
+
/**
|
|
279
|
+
* Height of the component (CSS value)
|
|
280
|
+
* @default '100%'
|
|
281
|
+
*/
|
|
282
|
+
height?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Whether to use server-side filtering via UserSearchString
|
|
285
|
+
* When true, filter text is sent to the server for SQL-based filtering
|
|
286
|
+
* When false, filtering is done client-side on loaded records
|
|
287
|
+
* @default true
|
|
288
|
+
*/
|
|
289
|
+
serverSideFiltering?: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Whether to use server-side sorting via OrderBy
|
|
292
|
+
* When true, sort changes trigger a new server request
|
|
293
|
+
* When false, sorting is done client-side by AG Grid
|
|
294
|
+
* @default true
|
|
295
|
+
*/
|
|
296
|
+
serverSideSorting?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Whether to show pagination controls
|
|
299
|
+
* @default true
|
|
300
|
+
*/
|
|
301
|
+
showPagination?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Default sort field when loading data
|
|
304
|
+
*/
|
|
305
|
+
defaultSortField?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Default sort direction when loading data
|
|
308
|
+
* @default 'asc'
|
|
309
|
+
*/
|
|
310
|
+
defaultSortDirection?: SortDirection;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Default configuration values
|
|
314
|
+
*/
|
|
315
|
+
export declare const DEFAULT_VIEWER_CONFIG: Required<EntityViewerConfig>;
|
|
316
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,aAAa,GACb,iBAAiB,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,U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H,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAE9B;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAC;CACtC;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,kBAAkB,CAyB9D,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default configuration values
|
|
3
|
+
*/
|
|
4
|
+
export const DEFAULT_VIEWER_CONFIG = {
|
|
5
|
+
showFilter: true,
|
|
6
|
+
showViewModeToggle: true,
|
|
7
|
+
selectionBehavior: 'emit-only',
|
|
8
|
+
defaultViewMode: 'grid',
|
|
9
|
+
enableMultiSelect: false,
|
|
10
|
+
pageSize: 100,
|
|
11
|
+
showRecordCount: true,
|
|
12
|
+
filterPlaceholder: 'Filter records...',
|
|
13
|
+
filterDebounceMs: 250,
|
|
14
|
+
gridColumns: [],
|
|
15
|
+
cardTemplate: {
|
|
16
|
+
titleField: '',
|
|
17
|
+
subtitleField: null,
|
|
18
|
+
descriptionField: null,
|
|
19
|
+
displayFields: [],
|
|
20
|
+
thumbnailFields: [],
|
|
21
|
+
badgeField: null
|
|
22
|
+
},
|
|
23
|
+
height: '100%',
|
|
24
|
+
serverSideFiltering: true,
|
|
25
|
+
serverSideSorting: true,
|
|
26
|
+
showPagination: true,
|
|
27
|
+
defaultSortField: '',
|
|
28
|
+
defaultSortDirection: 'asc'
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAiWA;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiC;IACjE,UAAU,EAAE,IAAI;IAChB,kBAAkB,EAAE,IAAI;IACxB,iBAAiB,EAAE,WAAW;IAC9B,eAAe,EAAE,MAAM;IACvB,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,GAAG;IACrB,WAAW,EAAE,EAAE;IACf,YAAY,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAI;QACnB,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,EAAE;QACjB,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,IAAI;KACjB;IACD,MAAM,EAAE,MAAM;IACd,mBAAmB,EAAE,IAAI;IACzB,iBAAiB,EAAE,IAAI;IACvB,cAAc,EAAE,IAAI;IACpB,gBAAgB,EAAE,EAAE;IACpB,oBAAoB,EAAE,KAAK;CAC5B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HighlightUtil - Utility class for highlighting search matches in text
|
|
3
|
+
*
|
|
4
|
+
* This class provides methods to:
|
|
5
|
+
* 1. Check if text matches a search term (with SQL-style % wildcard support)
|
|
6
|
+
* 2. Highlight matching portions of text with HTML markup
|
|
7
|
+
*
|
|
8
|
+
* The key distinction is that highlighting should only occur when the text
|
|
9
|
+
* actually matches the search pattern. For wildcard searches like "food%ass",
|
|
10
|
+
* the text must contain "food" followed by "ass" in order - we shouldn't
|
|
11
|
+
* highlight partial matches that don't satisfy the full pattern.
|
|
12
|
+
*/
|
|
13
|
+
export declare class HighlightUtil {
|
|
14
|
+
/**
|
|
15
|
+
* Check if a value matches the search term (supports SQL-style % wildcards)
|
|
16
|
+
* This is used for filtering records.
|
|
17
|
+
*
|
|
18
|
+
* @param value The text value to check
|
|
19
|
+
* @param searchTerm The search term (may include % wildcards)
|
|
20
|
+
* @returns true if the value matches the search pattern
|
|
21
|
+
*/
|
|
22
|
+
static matches(value: string, searchTerm: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Highlight matching text in a string based on the filter text.
|
|
25
|
+
* IMPORTANT: Only highlights if the text actually matches the pattern.
|
|
26
|
+
* For wildcard searches, all segments must be present in order.
|
|
27
|
+
*
|
|
28
|
+
* @param text The text to highlight
|
|
29
|
+
* @param searchTerm The search term (may include % wildcards)
|
|
30
|
+
* @param escapeHtml Whether to escape HTML characters (default: true)
|
|
31
|
+
* @returns HTML string with highlighted matches, or the original text if no match
|
|
32
|
+
*/
|
|
33
|
+
static highlight(text: string, searchTerm: string, escapeHtml?: boolean): string;
|
|
34
|
+
/**
|
|
35
|
+
* Highlight a simple (non-wildcard) search term
|
|
36
|
+
*/
|
|
37
|
+
private static highlightSimple;
|
|
38
|
+
/**
|
|
39
|
+
* Highlight a wildcard search term (segments separated by %)
|
|
40
|
+
* Only highlights segments that appear in the correct order
|
|
41
|
+
*/
|
|
42
|
+
private static highlightWildcard;
|
|
43
|
+
/**
|
|
44
|
+
* Find all positions of segments in text (for simple highlighting)
|
|
45
|
+
*/
|
|
46
|
+
private static findMatchPositions;
|
|
47
|
+
/**
|
|
48
|
+
* Find positions of segments that appear in order (for wildcard highlighting)
|
|
49
|
+
* This ensures we only highlight the segments that form the actual match
|
|
50
|
+
*/
|
|
51
|
+
private static findOrderedMatchPositions;
|
|
52
|
+
/**
|
|
53
|
+
* Merge overlapping or adjacent ranges
|
|
54
|
+
*/
|
|
55
|
+
private static mergeOverlappingRanges;
|
|
56
|
+
/**
|
|
57
|
+
* Build the final highlighted string from match ranges
|
|
58
|
+
*/
|
|
59
|
+
private static buildHighlightedString;
|
|
60
|
+
/**
|
|
61
|
+
* Escape special regex characters
|
|
62
|
+
*/
|
|
63
|
+
private static escapeRegex;
|
|
64
|
+
/**
|
|
65
|
+
* Escape HTML special characters to prevent XSS
|
|
66
|
+
*/
|
|
67
|
+
static escapeHtml(text: string): string;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=highlight.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.util.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/highlight.util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,qBAAa,aAAa;IACxB;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO;IAgC1D;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAE,OAAc,GAAG,MAAM;IAwBtF;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAa9B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgBhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAkBjC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAmBxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAmBrC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAyBrC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAcxC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HighlightUtil - Utility class for highlighting search matches in text
|
|
3
|
+
*
|
|
4
|
+
* This class provides methods to:
|
|
5
|
+
* 1. Check if text matches a search term (with SQL-style % wildcard support)
|
|
6
|
+
* 2. Highlight matching portions of text with HTML markup
|
|
7
|
+
*
|
|
8
|
+
* The key distinction is that highlighting should only occur when the text
|
|
9
|
+
* actually matches the search pattern. For wildcard searches like "food%ass",
|
|
10
|
+
* the text must contain "food" followed by "ass" in order - we shouldn't
|
|
11
|
+
* highlight partial matches that don't satisfy the full pattern.
|
|
12
|
+
*/
|
|
13
|
+
export class HighlightUtil {
|
|
14
|
+
/**
|
|
15
|
+
* Check if a value matches the search term (supports SQL-style % wildcards)
|
|
16
|
+
* This is used for filtering records.
|
|
17
|
+
*
|
|
18
|
+
* @param value The text value to check
|
|
19
|
+
* @param searchTerm The search term (may include % wildcards)
|
|
20
|
+
* @returns true if the value matches the search pattern
|
|
21
|
+
*/
|
|
22
|
+
static matches(value, searchTerm) {
|
|
23
|
+
if (!value || !searchTerm)
|
|
24
|
+
return false;
|
|
25
|
+
const lowerValue = value.toLowerCase();
|
|
26
|
+
const lowerTerm = searchTerm.toLowerCase().trim();
|
|
27
|
+
if (!lowerTerm.includes('%')) {
|
|
28
|
+
// No wildcards - simple substring match
|
|
29
|
+
return lowerValue.includes(lowerTerm);
|
|
30
|
+
}
|
|
31
|
+
// Split by % to get fragments that must appear in order
|
|
32
|
+
const fragments = lowerTerm.split('%').filter(s => s.length > 0);
|
|
33
|
+
if (fragments.length === 0) {
|
|
34
|
+
// Just wildcards, matches everything
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
// Each fragment must appear in the value, in order
|
|
38
|
+
let searchStartIndex = 0;
|
|
39
|
+
for (const fragment of fragments) {
|
|
40
|
+
const foundIndex = lowerValue.indexOf(fragment, searchStartIndex);
|
|
41
|
+
if (foundIndex === -1) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
searchStartIndex = foundIndex + fragment.length;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Highlight matching text in a string based on the filter text.
|
|
50
|
+
* IMPORTANT: Only highlights if the text actually matches the pattern.
|
|
51
|
+
* For wildcard searches, all segments must be present in order.
|
|
52
|
+
*
|
|
53
|
+
* @param text The text to highlight
|
|
54
|
+
* @param searchTerm The search term (may include % wildcards)
|
|
55
|
+
* @param escapeHtml Whether to escape HTML characters (default: true)
|
|
56
|
+
* @returns HTML string with highlighted matches, or the original text if no match
|
|
57
|
+
*/
|
|
58
|
+
static highlight(text, searchTerm, escapeHtml = true) {
|
|
59
|
+
if (!text)
|
|
60
|
+
return '';
|
|
61
|
+
if (!searchTerm || searchTerm.trim() === '') {
|
|
62
|
+
return escapeHtml ? this.escapeHtml(text) : text;
|
|
63
|
+
}
|
|
64
|
+
const trimmedSearch = searchTerm.trim();
|
|
65
|
+
// First check if this text actually matches the pattern
|
|
66
|
+
if (!this.matches(text, trimmedSearch)) {
|
|
67
|
+
// No match - return text without highlighting
|
|
68
|
+
return escapeHtml ? this.escapeHtml(text) : text;
|
|
69
|
+
}
|
|
70
|
+
// Text matches - now apply highlighting
|
|
71
|
+
if (!trimmedSearch.includes('%')) {
|
|
72
|
+
// Simple case: no wildcards, highlight the exact match
|
|
73
|
+
return this.highlightSimple(text, trimmedSearch, escapeHtml);
|
|
74
|
+
}
|
|
75
|
+
// Wildcard case: highlight each segment that appears in order
|
|
76
|
+
return this.highlightWildcard(text, trimmedSearch, escapeHtml);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Highlight a simple (non-wildcard) search term
|
|
80
|
+
*/
|
|
81
|
+
static highlightSimple(text, searchTerm, escapeHtml) {
|
|
82
|
+
const regex = new RegExp(`(${this.escapeRegex(searchTerm)})`, 'gi');
|
|
83
|
+
if (escapeHtml) {
|
|
84
|
+
// Need to escape HTML first, then apply highlighting
|
|
85
|
+
// Find all match positions first
|
|
86
|
+
const matches = this.findMatchPositions(text, [searchTerm]);
|
|
87
|
+
return this.buildHighlightedString(text, matches, true);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return text.replace(regex, '<span class="highlight-match">$1</span>');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Highlight a wildcard search term (segments separated by %)
|
|
95
|
+
* Only highlights segments that appear in the correct order
|
|
96
|
+
*/
|
|
97
|
+
static highlightWildcard(text, searchTerm, escapeHtml) {
|
|
98
|
+
const segments = searchTerm.split('%').filter(s => s.length > 0);
|
|
99
|
+
if (segments.length === 0) {
|
|
100
|
+
return escapeHtml ? this.escapeHtml(text) : text;
|
|
101
|
+
}
|
|
102
|
+
// Find positions of each segment in order (only the first occurrence that maintains order)
|
|
103
|
+
const matches = this.findOrderedMatchPositions(text, segments);
|
|
104
|
+
if (matches.length === 0) {
|
|
105
|
+
return escapeHtml ? this.escapeHtml(text) : text;
|
|
106
|
+
}
|
|
107
|
+
return this.buildHighlightedString(text, matches, escapeHtml);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Find all positions of segments in text (for simple highlighting)
|
|
111
|
+
*/
|
|
112
|
+
static findMatchPositions(text, segments) {
|
|
113
|
+
const matches = [];
|
|
114
|
+
const lowerText = text.toLowerCase();
|
|
115
|
+
for (const segment of segments) {
|
|
116
|
+
const lowerSegment = segment.toLowerCase();
|
|
117
|
+
let searchStart = 0;
|
|
118
|
+
while (searchStart < lowerText.length) {
|
|
119
|
+
const idx = lowerText.indexOf(lowerSegment, searchStart);
|
|
120
|
+
if (idx === -1)
|
|
121
|
+
break;
|
|
122
|
+
matches.push({ start: idx, end: idx + segment.length });
|
|
123
|
+
searchStart = idx + 1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return this.mergeOverlappingRanges(matches);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Find positions of segments that appear in order (for wildcard highlighting)
|
|
130
|
+
* This ensures we only highlight the segments that form the actual match
|
|
131
|
+
*/
|
|
132
|
+
static findOrderedMatchPositions(text, segments) {
|
|
133
|
+
const matches = [];
|
|
134
|
+
const lowerText = text.toLowerCase();
|
|
135
|
+
let searchStart = 0;
|
|
136
|
+
for (const segment of segments) {
|
|
137
|
+
const lowerSegment = segment.toLowerCase();
|
|
138
|
+
const idx = lowerText.indexOf(lowerSegment, searchStart);
|
|
139
|
+
if (idx === -1) {
|
|
140
|
+
// This shouldn't happen if matches() returned true, but be safe
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
matches.push({ start: idx, end: idx + segment.length });
|
|
144
|
+
searchStart = idx + segment.length;
|
|
145
|
+
}
|
|
146
|
+
return this.mergeOverlappingRanges(matches);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Merge overlapping or adjacent ranges
|
|
150
|
+
*/
|
|
151
|
+
static mergeOverlappingRanges(matches) {
|
|
152
|
+
if (matches.length === 0)
|
|
153
|
+
return [];
|
|
154
|
+
// Sort by start position
|
|
155
|
+
matches.sort((a, b) => a.start - b.start);
|
|
156
|
+
const merged = [];
|
|
157
|
+
for (const match of matches) {
|
|
158
|
+
if (merged.length === 0 || merged[merged.length - 1].end < match.start) {
|
|
159
|
+
merged.push({ ...match });
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
// Extend the previous range if overlapping
|
|
163
|
+
merged[merged.length - 1].end = Math.max(merged[merged.length - 1].end, match.end);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return merged;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Build the final highlighted string from match ranges
|
|
170
|
+
*/
|
|
171
|
+
static buildHighlightedString(text, ranges, escapeHtml) {
|
|
172
|
+
let result = '';
|
|
173
|
+
let lastEnd = 0;
|
|
174
|
+
for (const range of ranges) {
|
|
175
|
+
// Add text before this match
|
|
176
|
+
const before = text.substring(lastEnd, range.start);
|
|
177
|
+
result += escapeHtml ? this.escapeHtml(before) : before;
|
|
178
|
+
// Add highlighted match
|
|
179
|
+
const match = text.substring(range.start, range.end);
|
|
180
|
+
result += '<span class="highlight-match">';
|
|
181
|
+
result += escapeHtml ? this.escapeHtml(match) : match;
|
|
182
|
+
result += '</span>';
|
|
183
|
+
lastEnd = range.end;
|
|
184
|
+
}
|
|
185
|
+
// Add remaining text
|
|
186
|
+
const remaining = text.substring(lastEnd);
|
|
187
|
+
result += escapeHtml ? this.escapeHtml(remaining) : remaining;
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Escape special regex characters
|
|
192
|
+
*/
|
|
193
|
+
static escapeRegex(str) {
|
|
194
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Escape HTML special characters to prevent XSS
|
|
198
|
+
*/
|
|
199
|
+
static escapeHtml(text) {
|
|
200
|
+
if (typeof document !== 'undefined') {
|
|
201
|
+
const div = document.createElement('div');
|
|
202
|
+
div.textContent = text;
|
|
203
|
+
return div.innerHTML;
|
|
204
|
+
}
|
|
205
|
+
// Fallback for SSR
|
|
206
|
+
return text
|
|
207
|
+
.replace(/&/g, '&')
|
|
208
|
+
.replace(/</g, '<')
|
|
209
|
+
.replace(/>/g, '>')
|
|
210
|
+
.replace(/"/g, '"')
|
|
211
|
+
.replace(/'/g, ''');
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=highlight.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.util.js","sourceRoot":"","sources":["../../../src/lib/utils/highlight.util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,aAAa;IACxB;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,KAAa,EAAE,UAAkB;QAC9C,IAAI,CAAC,KAAK,IAAI,CAAC,UAAU;YAAE,OAAO,KAAK,CAAC;QAExC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,SAAS,G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