@memberjunction/ng-conversations 2.104.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 +197 -0
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +20 -0
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -0
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js +125 -0
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -0
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts +48 -0
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -0
- package/dist/lib/components/agent/active-agent-indicator.component.js +199 -0
- package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -0
- package/dist/lib/components/agent/agent-process-panel.component.d.ts +30 -0
- package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -0
- package/dist/lib/components/agent/agent-process-panel.component.js +333 -0
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-panel.component.d.ts +22 -0
- package/dist/lib/components/artifact/artifact-panel.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/artifact-panel.component.js +237 -0
- package/dist/lib/components/artifact/artifact-panel.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-upload-modal.component.d.ts +39 -0
- package/dist/lib/components/artifact/artifact-upload-modal.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/artifact-upload-modal.component.js +384 -0
- package/dist/lib/components/artifact/artifact-upload-modal.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-version-history.component.d.ts +28 -0
- package/dist/lib/components/artifact/artifact-version-history.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/artifact-version-history.component.js +280 -0
- package/dist/lib/components/artifact/artifact-version-history.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-viewer-panel.component.d.ts +22 -0
- package/dist/lib/components/artifact/artifact-viewer-panel.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/artifact-viewer-panel.component.js +182 -0
- package/dist/lib/components/artifact/artifact-viewer-panel.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-viewer.component.d.ts +27 -0
- package/dist/lib/components/artifact/artifact-viewer.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/artifact-viewer.component.js +266 -0
- package/dist/lib/components/artifact/artifact-viewer.component.js.map +1 -0
- package/dist/lib/components/artifact/inline-artifact.component.d.ts +46 -0
- package/dist/lib/components/artifact/inline-artifact.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/inline-artifact.component.js +447 -0
- package/dist/lib/components/artifact/inline-artifact.component.js.map +1 -0
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +18 -0
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -0
- package/dist/lib/components/collection/collection-artifact-card.component.js +147 -0
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -0
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +33 -0
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -0
- package/dist/lib/components/collection/collection-form-modal.component.js +245 -0
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -0
- package/dist/lib/components/collection/collection-tree.component.d.ts +42 -0
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -0
- package/dist/lib/components/collection/collection-tree.component.js +482 -0
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -0
- package/dist/lib/components/collection/collection-view.component.d.ts +31 -0
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -0
- package/dist/lib/components/collection/collection-view.component.js +254 -0
- package/dist/lib/components/collection/collection-view.component.js.map +1 -0
- package/dist/lib/components/collection/collections-full-view.component.d.ts +55 -0
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -0
- package/dist/lib/components/collection/collections-full-view.component.js +578 -0
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +160 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.js +891 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -0
- package/dist/lib/components/conversation/conversation-list.component.d.ts +29 -0
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -0
- package/dist/lib/components/conversation/conversation-list.component.js +255 -0
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -0
- package/dist/lib/components/dialogs/input-dialog.component.d.ts +17 -0
- package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -0
- package/dist/lib/components/dialogs/input-dialog.component.js +122 -0
- package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -0
- package/dist/lib/components/export/export-modal.component.d.ts +37 -0
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -0
- package/dist/lib/components/export/export-modal.component.js +414 -0
- package/dist/lib/components/export/export-modal.component.js.map +1 -0
- package/dist/lib/components/library/library-full-view.component.d.ts +36 -0
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-full-view.component.js +270 -0
- package/dist/lib/components/library/library-full-view.component.js.map +1 -0
- package/dist/lib/components/members/members-modal.component.d.ts +42 -0
- package/dist/lib/components/members/members-modal.component.d.ts.map +1 -0
- package/dist/lib/components/members/members-modal.component.js +352 -0
- package/dist/lib/components/members/members-modal.component.js.map +1 -0
- package/dist/lib/components/mention/mention-dropdown.component.d.ts +44 -0
- package/dist/lib/components/mention/mention-dropdown.component.d.ts.map +1 -0
- package/dist/lib/components/mention/mention-dropdown.component.js +194 -0
- package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -0
- package/dist/lib/components/message/message-input.component.d.ts +137 -0
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -0
- package/dist/lib/components/message/message-input.component.js +1159 -0
- package/dist/lib/components/message/message-input.component.js.map +1 -0
- package/dist/lib/components/message/message-item.component.d.ts +140 -0
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -0
- package/dist/lib/components/message/message-item.component.js +817 -0
- package/dist/lib/components/message/message-item.component.js.map +1 -0
- package/dist/lib/components/message/message-list.component.d.ts +77 -0
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -0
- package/dist/lib/components/message/message-list.component.js +316 -0
- package/dist/lib/components/message/message-list.component.js.map +1 -0
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +13 -0
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -0
- package/dist/lib/components/navigation/conversation-navigation.component.js +88 -0
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -0
- package/dist/lib/components/notification/activity-indicator.component.d.ts +11 -0
- package/dist/lib/components/notification/activity-indicator.component.d.ts.map +1 -0
- package/dist/lib/components/notification/activity-indicator.component.js +56 -0
- package/dist/lib/components/notification/activity-indicator.component.js.map +1 -0
- package/dist/lib/components/notification/notification-badge.component.d.ts +27 -0
- package/dist/lib/components/notification/notification-badge.component.d.ts.map +1 -0
- package/dist/lib/components/notification/notification-badge.component.js +160 -0
- package/dist/lib/components/notification/notification-badge.component.js.map +1 -0
- package/dist/lib/components/project/project-form-modal.component.d.ts +34 -0
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -0
- package/dist/lib/components/project/project-form-modal.component.js +357 -0
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -0
- package/dist/lib/components/project/project-selector.component.d.ts +36 -0
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -0
- package/dist/lib/components/project/project-selector.component.js +317 -0
- package/dist/lib/components/project/project-selector.component.js.map +1 -0
- package/dist/lib/components/search/search-panel.component.d.ts +120 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -0
- package/dist/lib/components/search/search-panel.component.js +714 -0
- package/dist/lib/components/search/search-panel.component.js.map +1 -0
- package/dist/lib/components/share/share-modal.component.d.ts +46 -0
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -0
- package/dist/lib/components/share/share-modal.component.js +431 -0
- package/dist/lib/components/share/share-modal.component.js.map +1 -0
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +18 -0
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -0
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +81 -0
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -0
- package/dist/lib/components/task/task-form-modal.component.d.ts +42 -0
- package/dist/lib/components/task/task-form-modal.component.d.ts.map +1 -0
- package/dist/lib/components/task/task-form-modal.component.js +329 -0
- package/dist/lib/components/task/task-form-modal.component.js.map +1 -0
- package/dist/lib/components/task/task-item.component.d.ts +22 -0
- package/dist/lib/components/task/task-item.component.d.ts.map +1 -0
- package/dist/lib/components/task/task-item.component.js +234 -0
- package/dist/lib/components/task/task-item.component.js.map +1 -0
- package/dist/lib/components/task/task-list.component.d.ts +32 -0
- package/dist/lib/components/task/task-list.component.d.ts.map +1 -0
- package/dist/lib/components/task/task-list.component.js +290 -0
- package/dist/lib/components/task/task-list.component.js.map +1 -0
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +27 -0
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -0
- package/dist/lib/components/tasks/tasks-dropdown.component.js +254 -0
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -0
- package/dist/lib/components/thread/thread-panel.component.d.ts +65 -0
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -0
- package/dist/lib/components/thread/thread-panel.component.js +325 -0
- package/dist/lib/components/thread/thread-panel.component.js.map +1 -0
- package/dist/lib/components/toast/toast.component.d.ts +26 -0
- package/dist/lib/components/toast/toast.component.d.ts.map +1 -0
- package/dist/lib/components/toast/toast.component.js +108 -0
- package/dist/lib/components/toast/toast.component.js.map +1 -0
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +75 -0
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -0
- package/dist/lib/components/workspace/conversation-workspace.component.js +299 -0
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -0
- package/dist/lib/conversations.module.d.ts +62 -0
- package/dist/lib/conversations.module.d.ts.map +1 -0
- package/dist/lib/conversations.module.js +248 -0
- package/dist/lib/conversations.module.js.map +1 -0
- package/dist/lib/directives/search-shortcut.directive.d.ts +17 -0
- package/dist/lib/directives/search-shortcut.directive.d.ts.map +1 -0
- package/dist/lib/directives/search-shortcut.directive.js +39 -0
- package/dist/lib/directives/search-shortcut.directive.js.map +1 -0
- package/dist/lib/models/conversation-state.model.d.ts +72 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -0
- package/dist/lib/models/conversation-state.model.js +2 -0
- package/dist/lib/models/conversation-state.model.js.map +1 -0
- package/dist/lib/models/notification.model.d.ts +89 -0
- package/dist/lib/models/notification.model.d.ts.map +1 -0
- package/dist/lib/models/notification.model.js +11 -0
- package/dist/lib/models/notification.model.js.map +1 -0
- package/dist/lib/services/active-tasks.service.d.ts +65 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -0
- package/dist/lib/services/active-tasks.service.js +95 -0
- package/dist/lib/services/active-tasks.service.js.map +1 -0
- package/dist/lib/services/agent-state.service.d.ts +78 -0
- package/dist/lib/services/agent-state.service.d.ts.map +1 -0
- package/dist/lib/services/agent-state.service.js +213 -0
- package/dist/lib/services/agent-state.service.js.map +1 -0
- package/dist/lib/services/artifact-state.service.d.ts +114 -0
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -0
- package/dist/lib/services/artifact-state.service.js +288 -0
- package/dist/lib/services/artifact-state.service.js.map +1 -0
- package/dist/lib/services/conversation-agent.service.d.ts +79 -0
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -0
- package/dist/lib/services/conversation-agent.service.js +259 -0
- package/dist/lib/services/conversation-agent.service.js.map +1 -0
- package/dist/lib/services/conversation-state.service.d.ts +122 -0
- package/dist/lib/services/conversation-state.service.d.ts.map +1 -0
- package/dist/lib/services/conversation-state.service.js +255 -0
- package/dist/lib/services/conversation-state.service.js.map +1 -0
- package/dist/lib/services/dialog.service.d.ts +54 -0
- package/dist/lib/services/dialog.service.d.ts.map +1 -0
- package/dist/lib/services/dialog.service.js +157 -0
- package/dist/lib/services/dialog.service.js.map +1 -0
- package/dist/lib/services/export.service.d.ts +25 -0
- package/dist/lib/services/export.service.d.ts.map +1 -0
- package/dist/lib/services/export.service.js +237 -0
- package/dist/lib/services/export.service.js.map +1 -0
- package/dist/lib/services/mention-autocomplete.service.d.ts +59 -0
- package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -0
- package/dist/lib/services/mention-autocomplete.service.js +160 -0
- package/dist/lib/services/mention-autocomplete.service.js.map +1 -0
- package/dist/lib/services/mention-parser.service.d.ts +46 -0
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -0
- package/dist/lib/services/mention-parser.service.js +156 -0
- package/dist/lib/services/mention-parser.service.js.map +1 -0
- package/dist/lib/services/notification.service.d.ts +108 -0
- package/dist/lib/services/notification.service.d.ts.map +1 -0
- package/dist/lib/services/notification.service.js +431 -0
- package/dist/lib/services/notification.service.js.map +1 -0
- package/dist/lib/services/search.service.d.ts +144 -0
- package/dist/lib/services/search.service.d.ts.map +1 -0
- package/dist/lib/services/search.service.js +370 -0
- package/dist/lib/services/search.service.js.map +1 -0
- package/dist/lib/services/toast.service.d.ts +46 -0
- package/dist/lib/services/toast.service.d.ts.map +1 -0
- package/dist/lib/services/toast.service.js +76 -0
- package/dist/lib/services/toast.service.js.map +1 -0
- package/dist/public-api.d.ts +42 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +49 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { RunView, Metadata } from '@memberjunction/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@progress/kendo-angular-dropdowns";
|
|
6
|
+
import * as i3 from "./collection-artifact-card.component";
|
|
7
|
+
function CollectionViewComponent_div_15_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
9
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
10
|
+
i0.ɵɵelement(1, "i", 15);
|
|
11
|
+
i0.ɵɵelementStart(2, "p");
|
|
12
|
+
i0.ɵɵtext(3, "This collection is empty");
|
|
13
|
+
i0.ɵɵelementEnd();
|
|
14
|
+
i0.ɵɵelementStart(4, "button", 16);
|
|
15
|
+
i0.ɵɵlistener("click", function CollectionViewComponent_div_15_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onAddArtifact()); });
|
|
16
|
+
i0.ɵɵelement(5, "i", 10);
|
|
17
|
+
i0.ɵɵtext(6, " Add Artifact ");
|
|
18
|
+
i0.ɵɵelementEnd()();
|
|
19
|
+
} }
|
|
20
|
+
function CollectionViewComponent_mj_collection_artifact_card_16_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
22
|
+
i0.ɵɵelementStart(0, "mj-collection-artifact-card", 17);
|
|
23
|
+
i0.ɵɵlistener("selected", function CollectionViewComponent_mj_collection_artifact_card_16_Template_mj_collection_artifact_card_selected_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onArtifactSelected($event)); })("viewed", function CollectionViewComponent_mj_collection_artifact_card_16_Template_mj_collection_artifact_card_viewed_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onViewArtifact($event)); })("edited", function CollectionViewComponent_mj_collection_artifact_card_16_Template_mj_collection_artifact_card_edited_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onEditArtifact($event)); })("removed", function CollectionViewComponent_mj_collection_artifact_card_16_Template_mj_collection_artifact_card_removed_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRemoveArtifact($event)); });
|
|
24
|
+
i0.ɵɵelementEnd();
|
|
25
|
+
} if (rf & 2) {
|
|
26
|
+
const artifact_r4 = ctx.$implicit;
|
|
27
|
+
i0.ɵɵproperty("artifact", artifact_r4);
|
|
28
|
+
} }
|
|
29
|
+
export class CollectionViewComponent {
|
|
30
|
+
collection;
|
|
31
|
+
currentUser;
|
|
32
|
+
artifacts = [];
|
|
33
|
+
viewMode = 'grid';
|
|
34
|
+
sortBy = 'date';
|
|
35
|
+
sortOptions = [
|
|
36
|
+
{ label: 'Name', value: 'name' },
|
|
37
|
+
{ label: 'Date Modified', value: 'date' },
|
|
38
|
+
{ label: 'Type', value: 'type' }
|
|
39
|
+
];
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
this.loadArtifacts();
|
|
42
|
+
}
|
|
43
|
+
ngOnChanges(changes) {
|
|
44
|
+
if (changes['collection'] && !changes['collection'].firstChange) {
|
|
45
|
+
this.loadArtifacts();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async loadArtifacts() {
|
|
49
|
+
if (!this.collection)
|
|
50
|
+
return;
|
|
51
|
+
try {
|
|
52
|
+
const rv = new RunView();
|
|
53
|
+
// Load artifacts through the CollectionArtifacts join table
|
|
54
|
+
const result = await rv.RunView({
|
|
55
|
+
EntityName: 'MJ: Artifacts',
|
|
56
|
+
ExtraFilter: `ID IN (SELECT ArtifactID FROM [__mj].[MJ: Collection Artifacts] WHERE CollectionID='${this.collection.ID}')`,
|
|
57
|
+
OrderBy: this.getOrderBy(),
|
|
58
|
+
ResultType: 'entity_object'
|
|
59
|
+
}, this.currentUser);
|
|
60
|
+
if (result.Success) {
|
|
61
|
+
this.artifacts = result.Results || [];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.error('Failed to load collection artifacts:', error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
getOrderBy() {
|
|
69
|
+
switch (this.sortBy) {
|
|
70
|
+
case 'name':
|
|
71
|
+
return 'Name ASC';
|
|
72
|
+
case 'type':
|
|
73
|
+
return 'Type ASC, Name ASC';
|
|
74
|
+
case 'date':
|
|
75
|
+
default:
|
|
76
|
+
return '__mj_UpdatedAt DESC';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
onSortChange() {
|
|
80
|
+
this.loadArtifacts();
|
|
81
|
+
}
|
|
82
|
+
onArtifactSelected(artifact) {
|
|
83
|
+
console.log('Artifact selected:', artifact.ID);
|
|
84
|
+
// TODO: Emit event or navigate to artifact detail view
|
|
85
|
+
}
|
|
86
|
+
onViewArtifact(artifact) {
|
|
87
|
+
console.log('View artifact:', artifact.ID);
|
|
88
|
+
// TODO: Open artifact viewer modal or panel
|
|
89
|
+
}
|
|
90
|
+
onEditArtifact(artifact) {
|
|
91
|
+
console.log('Edit artifact:', artifact.ID);
|
|
92
|
+
// TODO: Open artifact editor
|
|
93
|
+
}
|
|
94
|
+
async onRemoveArtifact(artifact) {
|
|
95
|
+
if (!confirm(`Remove "${artifact.Name}" from this collection?`))
|
|
96
|
+
return;
|
|
97
|
+
try {
|
|
98
|
+
// Find and delete the CollectionArtifact join record
|
|
99
|
+
const rv = new RunView();
|
|
100
|
+
const result = await rv.RunView({
|
|
101
|
+
EntityName: 'MJ: Collection Artifacts',
|
|
102
|
+
ExtraFilter: `CollectionID='${this.collection.ID}' AND ArtifactID='${artifact.ID}'`,
|
|
103
|
+
ResultType: 'entity_object'
|
|
104
|
+
}, this.currentUser);
|
|
105
|
+
if (result.Success && result.Results && result.Results.length > 0) {
|
|
106
|
+
const joinRecord = result.Results[0];
|
|
107
|
+
await joinRecord.Delete();
|
|
108
|
+
await this.loadArtifacts();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.error('Failed to remove artifact from collection:', error);
|
|
113
|
+
alert('Failed to remove artifact from collection');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async onAddArtifact() {
|
|
117
|
+
// TODO: Open artifact picker dialog
|
|
118
|
+
// For now, just show a simple prompt
|
|
119
|
+
const name = prompt('Enter artifact name:');
|
|
120
|
+
if (!name)
|
|
121
|
+
return;
|
|
122
|
+
try {
|
|
123
|
+
// Create new artifact
|
|
124
|
+
const md = new Metadata();
|
|
125
|
+
const artifact = await md.GetEntityObject('MJ: Artifacts', this.currentUser);
|
|
126
|
+
artifact.Name = name;
|
|
127
|
+
// Type is read-only, set via TypeID instead
|
|
128
|
+
// For now, skip setting type - it has a default
|
|
129
|
+
const saved = await artifact.Save();
|
|
130
|
+
if (saved) {
|
|
131
|
+
// Add to collection via join table
|
|
132
|
+
const joinRecord = await md.GetEntityObject('MJ: Collection Artifacts', this.currentUser);
|
|
133
|
+
joinRecord.CollectionID = this.collection.ID;
|
|
134
|
+
joinRecord.ArtifactID = artifact.ID;
|
|
135
|
+
await joinRecord.Save();
|
|
136
|
+
await this.loadArtifacts();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
console.error('Failed to add artifact:', error);
|
|
141
|
+
alert('Failed to add artifact');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
static ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(); };
|
|
145
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["mj-collection-view"]], inputs: { collection: "collection", currentUser: "currentUser" }, features: [i0.ɵɵNgOnChangesFeature], decls: 17, vars: 17, consts: [[1, "collection-view"], [1, "view-header"], [1, "header-actions"], [1, "view-mode-toggle"], ["title", "Grid View", 1, "mode-btn", 3, "click"], [1, "fas", "fa-grid"], ["title", "List View", 1, "mode-btn", 3, "click"], [1, "fas", "fa-list"], ["placeholder", "Sort by...", 3, "valueChange", "data", "textField", "valueField", "value"], ["title", "Add Artifact", 1, "btn-add", 3, "click"], [1, "fas", "fa-plus"], [1, "view-content"], ["class", "empty-state", 4, "ngIf"], [3, "artifact", "selected", "viewed", "edited", "removed", 4, "ngFor", "ngForOf"], [1, "empty-state"], [1, "fas", "fa-folder-open"], [1, "btn-add-primary", 3, "click"], [3, "selected", "viewed", "edited", "removed", "artifact"]], template: function CollectionViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
146
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2");
|
|
147
|
+
i0.ɵɵtext(3);
|
|
148
|
+
i0.ɵɵelementEnd();
|
|
149
|
+
i0.ɵɵelementStart(4, "div", 2)(5, "div", 3)(6, "button", 4);
|
|
150
|
+
i0.ɵɵlistener("click", function CollectionViewComponent_Template_button_click_6_listener() { return ctx.viewMode = "grid"; });
|
|
151
|
+
i0.ɵɵelement(7, "i", 5);
|
|
152
|
+
i0.ɵɵelementEnd();
|
|
153
|
+
i0.ɵɵelementStart(8, "button", 6);
|
|
154
|
+
i0.ɵɵlistener("click", function CollectionViewComponent_Template_button_click_8_listener() { return ctx.viewMode = "list"; });
|
|
155
|
+
i0.ɵɵelement(9, "i", 7);
|
|
156
|
+
i0.ɵɵelementEnd()();
|
|
157
|
+
i0.ɵɵelementStart(10, "kendo-dropdownlist", 8);
|
|
158
|
+
i0.ɵɵtwoWayListener("valueChange", function CollectionViewComponent_Template_kendo_dropdownlist_valueChange_10_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.sortBy, $event) || (ctx.sortBy = $event); return $event; });
|
|
159
|
+
i0.ɵɵlistener("valueChange", function CollectionViewComponent_Template_kendo_dropdownlist_valueChange_10_listener() { return ctx.onSortChange(); });
|
|
160
|
+
i0.ɵɵelementEnd();
|
|
161
|
+
i0.ɵɵelementStart(11, "button", 9);
|
|
162
|
+
i0.ɵɵlistener("click", function CollectionViewComponent_Template_button_click_11_listener() { return ctx.onAddArtifact(); });
|
|
163
|
+
i0.ɵɵelement(12, "i", 10);
|
|
164
|
+
i0.ɵɵtext(13, " Add ");
|
|
165
|
+
i0.ɵɵelementEnd()()();
|
|
166
|
+
i0.ɵɵelementStart(14, "div", 11);
|
|
167
|
+
i0.ɵɵtemplate(15, CollectionViewComponent_div_15_Template, 7, 0, "div", 12)(16, CollectionViewComponent_mj_collection_artifact_card_16_Template, 1, 1, "mj-collection-artifact-card", 13);
|
|
168
|
+
i0.ɵɵelementEnd()();
|
|
169
|
+
} if (rf & 2) {
|
|
170
|
+
i0.ɵɵadvance(3);
|
|
171
|
+
i0.ɵɵtextInterpolate(ctx.collection.Name || "Collection");
|
|
172
|
+
i0.ɵɵadvance(3);
|
|
173
|
+
i0.ɵɵclassProp("active", ctx.viewMode === "grid");
|
|
174
|
+
i0.ɵɵadvance(2);
|
|
175
|
+
i0.ɵɵclassProp("active", ctx.viewMode === "list");
|
|
176
|
+
i0.ɵɵadvance(2);
|
|
177
|
+
i0.ɵɵstyleProp("width", 150, "px");
|
|
178
|
+
i0.ɵɵproperty("data", ctx.sortOptions)("textField", "label")("valueField", "value");
|
|
179
|
+
i0.ɵɵtwoWayProperty("value", ctx.sortBy);
|
|
180
|
+
i0.ɵɵadvance(4);
|
|
181
|
+
i0.ɵɵclassProp("grid-mode", ctx.viewMode === "grid")("list-mode", ctx.viewMode === "list");
|
|
182
|
+
i0.ɵɵadvance();
|
|
183
|
+
i0.ɵɵproperty("ngIf", ctx.artifacts.length === 0);
|
|
184
|
+
i0.ɵɵadvance();
|
|
185
|
+
i0.ɵɵproperty("ngForOf", ctx.artifacts);
|
|
186
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.DropDownListComponent, i3.CollectionArtifactCardComponent], styles: [".collection-view[_ngcontent-%COMP%] { display: flex; flex-direction: column; height: 100%; background: white; }\n\n .view-header[_ngcontent-%COMP%] { padding: 20px 24px; border-bottom: 1px solid #D9D9D9; display: flex; justify-content: space-between; align-items: center; }\n .view-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] { margin: 0; font-size: 20px; flex: 1; }\n\n .header-actions[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 12px; }\n\n .view-mode-toggle[_ngcontent-%COMP%] { display: flex; border: 1px solid #D9D9D9; border-radius: 4px; overflow: hidden; }\n .mode-btn[_ngcontent-%COMP%] { padding: 8px 12px; background: white; border: none; border-right: 1px solid #D9D9D9; cursor: pointer; color: #666; transition: all 150ms ease; }\n .mode-btn[_ngcontent-%COMP%]:last-child { border-right: none; }\n .mode-btn[_ngcontent-%COMP%]:hover { background: #F4F4F4; }\n .mode-btn.active[_ngcontent-%COMP%] { background: #0076B6; color: white; }\n\n .btn-add[_ngcontent-%COMP%] { padding: 8px 16px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 6px; }\n .btn-add[_ngcontent-%COMP%]:hover { background: #005A8C; }\n\n .view-content[_ngcontent-%COMP%] { flex: 1; overflow-y: auto; padding: 24px; }\n .view-content.grid-mode[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }\n .view-content.list-mode[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 12px; }\n\n .empty-state[_ngcontent-%COMP%] { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; color: #999; }\n .empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 64px; margin-bottom: 24px; }\n .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 24px 0; font-size: 16px; }\n .btn-add-primary[_ngcontent-%COMP%] { padding: 12px 24px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; }\n .btn-add-primary[_ngcontent-%COMP%]:hover { background: #005A8C; }"] });
|
|
187
|
+
}
|
|
188
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewComponent, [{
|
|
189
|
+
type: Component,
|
|
190
|
+
args: [{ selector: 'mj-collection-view', template: `
|
|
191
|
+
<div class="collection-view">
|
|
192
|
+
<div class="view-header">
|
|
193
|
+
<h2>{{ collection.Name || 'Collection' }}</h2>
|
|
194
|
+
<div class="header-actions">
|
|
195
|
+
<div class="view-mode-toggle">
|
|
196
|
+
<button
|
|
197
|
+
class="mode-btn"
|
|
198
|
+
[class.active]="viewMode === 'grid'"
|
|
199
|
+
(click)="viewMode = 'grid'"
|
|
200
|
+
title="Grid View">
|
|
201
|
+
<i class="fas fa-grid"></i>
|
|
202
|
+
</button>
|
|
203
|
+
<button
|
|
204
|
+
class="mode-btn"
|
|
205
|
+
[class.active]="viewMode === 'list'"
|
|
206
|
+
(click)="viewMode = 'list'"
|
|
207
|
+
title="List View">
|
|
208
|
+
<i class="fas fa-list"></i>
|
|
209
|
+
</button>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<kendo-dropdownlist
|
|
213
|
+
[data]="sortOptions"
|
|
214
|
+
[textField]="'label'"
|
|
215
|
+
[valueField]="'value'"
|
|
216
|
+
[(value)]="sortBy"
|
|
217
|
+
(valueChange)="onSortChange()"
|
|
218
|
+
[style.width.px]="150"
|
|
219
|
+
placeholder="Sort by...">
|
|
220
|
+
</kendo-dropdownlist>
|
|
221
|
+
|
|
222
|
+
<button class="btn-add" (click)="onAddArtifact()" title="Add Artifact">
|
|
223
|
+
<i class="fas fa-plus"></i> Add
|
|
224
|
+
</button>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<div class="view-content" [class.grid-mode]="viewMode === 'grid'" [class.list-mode]="viewMode === 'list'">
|
|
229
|
+
<div *ngIf="artifacts.length === 0" class="empty-state">
|
|
230
|
+
<i class="fas fa-folder-open"></i>
|
|
231
|
+
<p>This collection is empty</p>
|
|
232
|
+
<button class="btn-add-primary" (click)="onAddArtifact()">
|
|
233
|
+
<i class="fas fa-plus"></i> Add Artifact
|
|
234
|
+
</button>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<mj-collection-artifact-card
|
|
238
|
+
*ngFor="let artifact of artifacts"
|
|
239
|
+
[artifact]="artifact"
|
|
240
|
+
(selected)="onArtifactSelected($event)"
|
|
241
|
+
(viewed)="onViewArtifact($event)"
|
|
242
|
+
(edited)="onEditArtifact($event)"
|
|
243
|
+
(removed)="onRemoveArtifact($event)">
|
|
244
|
+
</mj-collection-artifact-card>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
`, styles: ["\n .collection-view { display: flex; flex-direction: column; height: 100%; background: white; }\n\n .view-header { padding: 20px 24px; border-bottom: 1px solid #D9D9D9; display: flex; justify-content: space-between; align-items: center; }\n .view-header h2 { margin: 0; font-size: 20px; flex: 1; }\n\n .header-actions { display: flex; align-items: center; gap: 12px; }\n\n .view-mode-toggle { display: flex; border: 1px solid #D9D9D9; border-radius: 4px; overflow: hidden; }\n .mode-btn { padding: 8px 12px; background: white; border: none; border-right: 1px solid #D9D9D9; cursor: pointer; color: #666; transition: all 150ms ease; }\n .mode-btn:last-child { border-right: none; }\n .mode-btn:hover { background: #F4F4F4; }\n .mode-btn.active { background: #0076B6; color: white; }\n\n .btn-add { padding: 8px 16px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 6px; }\n .btn-add:hover { background: #005A8C; }\n\n .view-content { flex: 1; overflow-y: auto; padding: 24px; }\n .view-content.grid-mode { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }\n .view-content.list-mode { display: flex; flex-direction: column; gap: 12px; }\n\n .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; color: #999; }\n .empty-state i { font-size: 64px; margin-bottom: 24px; }\n .empty-state p { margin: 0 0 24px 0; font-size: 16px; }\n .btn-add-primary { padding: 12px 24px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; }\n .btn-add-primary:hover { background: #005A8C; }\n "] }]
|
|
248
|
+
}], null, { collection: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}], currentUser: [{
|
|
251
|
+
type: Input
|
|
252
|
+
}] }); })();
|
|
253
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionViewComponent, { className: "CollectionViewComponent", filePath: "src/lib/components/collection/collection-view.component.ts", lineNumber: 96 }); })();
|
|
254
|
+
//# sourceMappingURL=collection-view.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-view.component.js","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAoC,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAY,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;;;;;;IA8C3D,+BAAwD;IACtD,wBAAkC;IAClC,yBAAG;IAAA,wCAAwB;IAAA,iBAAI;IAC/B,kCAA0D;IAA1B,oLAAS,sBAAe,KAAC;IACvD,wBAA2B;IAAC,8BAC9B;IACF,AADE,iBAAS,EACL;;;;IAEN,uDAMuC;IAArC,AADA,AADA,AADA,6OAAY,iCAA0B,KAAC,4NAC7B,6BAAsB,KAAC,4NACvB,6BAAsB,KAAC,8NACtB,+BAAwB,KAAC;IACtC,iBAA8B;;;IAL5B,sCAAqB;;AAqC/B,MAAM,OAAO,uBAAuB;IACzB,UAAU,CAAoB;IAC9B,WAAW,CAAY;IAEzB,SAAS,GAAqB,EAAE,CAAC;IACjC,QAAQ,GAAa,MAAM,CAAC;IAC5B,MAAM,GAAW,MAAM,CAAC;IAExB,WAAW,GAAG;QACnB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAChC,EAAE,KAAK,EAAE,eAAe,EAA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lB,mHAAoB,MAAM,IAAC;YAE3B,uBAA2B;YAC7B,iBAAS;YACT,iCAIoB;YADlB,mHAAoB,MAAM,IAAC;YAE3B,uBAA2B;YAE/B,AADE,iBAAS,EACL;YAEN,8CAO2B;YAHzB,uNAAkB;YAClB,6HAAe,kBAAc,IAAC;YAGhC,iBAAqB;YAErB,kCAAuE;YAA/C,qGAAS,mBAAe,IAAC;YAC/C,yBAA2B;YAAC,sBAC9B;YAEJ,AADE,AADE,iBAAS,EACL,EACF;YAEN,gCAA0G;YASxG,AARA,2EAAwD,8GAcjB;YAG3C,AADE,iBAAM,EACF;;YArDE,eAAqC;YAArC,yDAAqC;YAKnC,eAAoC;YAApC,iDAAoC;YAOpC,eAAoC;YAApC,iDAAoC;YAatC,eAAsB;YAAtB,kCAAsB;YAHtB,AADA,AADA,sCAAoB,sBACC,uBACC;YACtB,wCAAkB;YAYE,eAAuC;YAAC,AAAxC,oDAAuC,sCAAwC;YACjG,cAA4B;YAA5B,iDAA4B;YASX,cAAY;YAAZ,uCAAY;;;iFAsC9B,uBAAuB;cAxFnC,SAAS;2BACE,oBAAoB,YACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDT;gBA8BQ,UAAU;kBAAlB,KAAK;YACG,WAAW;kBAAnB,KAAK;;kFAFK,uBAAuB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { UserInfo } from '@memberjunction/core';
|
|
3
|
+
import { CollectionEntity, ArtifactEntity } from '@memberjunction/core-entities';
|
|
4
|
+
import { DialogService } from '../../services/dialog.service';
|
|
5
|
+
import { ArtifactStateService } from '../../services/artifact-state.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Full-panel Collections view component
|
|
9
|
+
* Comprehensive collection management with artifacts display
|
|
10
|
+
*/
|
|
11
|
+
export declare class CollectionsFullViewComponent implements OnInit {
|
|
12
|
+
private dialogService;
|
|
13
|
+
private artifactState;
|
|
14
|
+
environmentId: string;
|
|
15
|
+
currentUser: UserInfo;
|
|
16
|
+
collections: CollectionEntity[];
|
|
17
|
+
artifacts: ArtifactEntity[];
|
|
18
|
+
filteredCollections: CollectionEntity[];
|
|
19
|
+
filteredArtifacts: ArtifactEntity[];
|
|
20
|
+
searchQuery: string;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
breadcrumbs: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
}>;
|
|
26
|
+
currentCollectionId: string | null;
|
|
27
|
+
currentCollection: CollectionEntity | null;
|
|
28
|
+
isFormModalOpen: boolean;
|
|
29
|
+
editingCollection?: CollectionEntity;
|
|
30
|
+
constructor(dialogService: DialogService, artifactState: ArtifactStateService);
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
loadData(): Promise<void>;
|
|
33
|
+
private loadCollections;
|
|
34
|
+
private loadArtifacts;
|
|
35
|
+
onSearchChange(query: string): void;
|
|
36
|
+
private applySearch;
|
|
37
|
+
openCollection(collection: CollectionEntity): Promise<void>;
|
|
38
|
+
navigateTo(crumb: {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
navigateToRoot(): Promise<void>;
|
|
43
|
+
refresh(): void;
|
|
44
|
+
createCollection(): void;
|
|
45
|
+
editCollection(collection: CollectionEntity): void;
|
|
46
|
+
deleteCollection(collection: CollectionEntity): Promise<void>;
|
|
47
|
+
onCollectionSaved(collection: CollectionEntity): Promise<void>;
|
|
48
|
+
onFormCancelled(): void;
|
|
49
|
+
addArtifact(): Promise<void>;
|
|
50
|
+
removeArtifact(artifact: ArtifactEntity): Promise<void>;
|
|
51
|
+
viewArtifact(artifact: ArtifactEntity): void;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionsFullViewComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CollectionsFullViewComponent, "mj-collections-full-view", never, { "environmentId": { "alias": "environmentId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; }, {}, never, never, false, never>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=collections-full-view.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections-full-view.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/collection/collections-full-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;;AAE7E;;;GAGG;AACH,qBAufa,4BAA6B,YAAW,MAAM;IAkBvD,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,aAAa;IAlBd,aAAa,EAAG,MAAM,CAAC;IACvB,WAAW,EAAG,QAAQ,CAAC;IAEzB,WAAW,EAAE,gBAAgB,EAAE,CAAM;IACrC,SAAS,EAAE,cAAc,EAAE,CAAM;IACjC,mBAAmB,EAAE,gBAAgB,EAAE,CAAM;IAC7C,iBAAiB,EAAE,cAAc,EAAE,CAAM;IACzC,WAAW,EAAE,MAAM,CAAM;IACzB,SAAS,EAAE,OAAO,CAAS;IAC3B,WAAW,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;IACtD,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1C,iBAAiB,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAElD,eAAe,EAAE,OAAO,CAAS;IACjC,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;gBAG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