@memberjunction/ng-explorer-core 5.36.0 → 5.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts +108 -0
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts.map +1 -0
- package/dist/lib/conversation-feedback/conversation-feedback.js +809 -0
- package/dist/lib/conversation-feedback/conversation-feedback.js.map +1 -0
- package/dist/lib/conversation-feedback/index.d.ts +2 -0
- package/dist/lib/conversation-feedback/index.d.ts.map +1 -0
- package/dist/lib/conversation-feedback/index.js +2 -0
- package/dist/lib/conversation-feedback/index.js.map +1 -0
- package/dist/module.d.ts +32 -30
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +15 -6
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +45 -44
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface FeedbackRow {
|
|
5
|
+
ratingID: string;
|
|
6
|
+
rating: number;
|
|
7
|
+
comments: string | null;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
raterName: string | null;
|
|
10
|
+
raterEmail: string | null;
|
|
11
|
+
conversationDetailID: string;
|
|
12
|
+
conversationID: string | null;
|
|
13
|
+
conversationName: string | null;
|
|
14
|
+
messageText: string | null;
|
|
15
|
+
messageSnippet: string | null;
|
|
16
|
+
messageRole: string | null;
|
|
17
|
+
agentID: string | null;
|
|
18
|
+
agentName: string | null;
|
|
19
|
+
}
|
|
20
|
+
export type RatingBand = 'all' | 'high' | 'mid' | 'low';
|
|
21
|
+
export type DateRange = 'all' | '1d' | '7d' | '30d' | '90d';
|
|
22
|
+
export declare class ConversationFeedbackResource extends BaseResourceComponent implements OnInit {
|
|
23
|
+
isInitializing: boolean;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
statsLoading: boolean;
|
|
26
|
+
error: string | null;
|
|
27
|
+
ratingBand: RatingBand;
|
|
28
|
+
dateRange: DateRange;
|
|
29
|
+
searchTerm: string;
|
|
30
|
+
rows: FeedbackRow[];
|
|
31
|
+
totalRowCount: number;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
currentPage: number;
|
|
34
|
+
readonly pageSizeOptions: number[];
|
|
35
|
+
stats: {
|
|
36
|
+
total: number;
|
|
37
|
+
avgRating: number;
|
|
38
|
+
percentPositive: number;
|
|
39
|
+
percentNegative: number;
|
|
40
|
+
};
|
|
41
|
+
selectedRow: FeedbackRow | null;
|
|
42
|
+
private searchDebounceTimer;
|
|
43
|
+
private cdr;
|
|
44
|
+
private appManager;
|
|
45
|
+
GetResourceDisplayName(): Promise<string>;
|
|
46
|
+
GetResourceIconClass(): Promise<string>;
|
|
47
|
+
ngOnInit(): Promise<void>;
|
|
48
|
+
/** Manual refresh from the page header — same path as a filter change. */
|
|
49
|
+
loadFeedback(): Promise<void>;
|
|
50
|
+
setBand(band: RatingBand): void;
|
|
51
|
+
setDateRange(range: DateRange): void;
|
|
52
|
+
/**
|
|
53
|
+
* Search input fires on every keystroke; debounce so we don't slam the
|
|
54
|
+
* server while the user is typing. 250ms is enough to feel responsive
|
|
55
|
+
* without firing on intermediate states.
|
|
56
|
+
*/
|
|
57
|
+
onSearchChange(): void;
|
|
58
|
+
onPageChange(event: {
|
|
59
|
+
PageNumber: number;
|
|
60
|
+
PageSize: number;
|
|
61
|
+
StartRow: number;
|
|
62
|
+
}): void;
|
|
63
|
+
onPageSizeChange(size: number): void;
|
|
64
|
+
openDrawer(row: FeedbackRow): void;
|
|
65
|
+
closeDrawer(): void;
|
|
66
|
+
openConversation(): Promise<void>;
|
|
67
|
+
onEscape(): void;
|
|
68
|
+
bandClassFor(rating: number): string;
|
|
69
|
+
trackByRatingID: (_: number, row: FeedbackRow) => string;
|
|
70
|
+
/** 1-based index of the first row on the current page (0 when empty). */
|
|
71
|
+
get rangeStart(): number;
|
|
72
|
+
/** 1-based index of the last row on the current page (clamped to total). */
|
|
73
|
+
get rangeEnd(): number;
|
|
74
|
+
/**
|
|
75
|
+
* True when the filtered set fits on a single page — in this case
|
|
76
|
+
* mj-pagination hides itself, so the footer renders a fallback summary
|
|
77
|
+
* line. When false we let mj-pagination own the bar (it has its own
|
|
78
|
+
* `1-N of M` summary on the left + nav controls on the right).
|
|
79
|
+
*/
|
|
80
|
+
get isSinglePage(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Run both the rows-query (paged) and the stats-query (aggregate) against
|
|
83
|
+
* the current filter state. Called when filters change or on initial load.
|
|
84
|
+
*/
|
|
85
|
+
private applyFilters;
|
|
86
|
+
/**
|
|
87
|
+
* Fetch the current page of rows from the server. The mj-pagination
|
|
88
|
+
* footer reads `totalRowCount` to derive the page count.
|
|
89
|
+
*/
|
|
90
|
+
private loadRows;
|
|
91
|
+
/**
|
|
92
|
+
* Aggregate counts over the same filter universe as `loadRows()`. Runs in
|
|
93
|
+
* parallel with the rows query so the stat cards and the table stay in
|
|
94
|
+
* sync after every filter change.
|
|
95
|
+
*/
|
|
96
|
+
private loadStats;
|
|
97
|
+
/**
|
|
98
|
+
* Build the Nunjucks-bound parameter set passed to both queries. Server-side
|
|
99
|
+
* filtering: emit only the keys that actually have a value so the SQL's
|
|
100
|
+
* `{% if X %}` blocks stay inert when filters are at their default.
|
|
101
|
+
*/
|
|
102
|
+
private buildQueryParameters;
|
|
103
|
+
private dateRangeCutoffIso;
|
|
104
|
+
private mapRow;
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationFeedbackResource, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConversationFeedbackResource, "mj-conversation-feedback", never, {}, {}, never, never, false, never>;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=conversation-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-feedback.d.ts","sourceRoot":"","sources":["../../../src/lib/conversation-feedback/conversation-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAA2C,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAIlE,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;AAE5D,qBAOa,4BAA6B,SAAQ,qBAAsB,YAAW,MAAM;IACvF,cAAc,UAAQ;IACtB,OAAO,UAAS;IAChB,YAAY,UAAS;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE5B,UAAU,EAAE,UAAU,CAAS;IAC/B,SAAS,EAAE,SAAS,CAAQ;IAC5B,UAA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