@memberjunction/ng-dashboards 5.35.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.
Files changed (159) hide show
  1. package/dist/AI/components/agents/agent-configuration.component.js +3 -3
  2. package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
  3. package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts +22 -1
  4. package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts.map +1 -1
  5. package/dist/AI/components/analytics/ai-analytics-resource.component.js +157 -137
  6. package/dist/AI/components/analytics/ai-analytics-resource.component.js.map +1 -1
  7. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +28 -0
  8. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  9. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +2075 -2068
  10. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  11. package/dist/AI/components/models/model-management.component.js +4 -4
  12. package/dist/AI/components/models/model-management.component.js.map +1 -1
  13. package/dist/AI/components/prompts/prompt-management.component.js +3 -3
  14. package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
  15. package/dist/AI/components/tags/tags-resource.component.d.ts +15 -0
  16. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  17. package/dist/AI/components/tags/tags-resource.component.js +1411 -1424
  18. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  19. package/dist/APIKeys/api-keys-resource.component.d.ts +12 -8
  20. package/dist/APIKeys/api-keys-resource.component.d.ts.map +1 -1
  21. package/dist/APIKeys/api-keys-resource.component.js +329 -371
  22. package/dist/APIKeys/api-keys-resource.component.js.map +1 -1
  23. package/dist/Actions/components/actions-overview.component.js +137 -142
  24. package/dist/Actions/components/actions-overview.component.js.map +1 -1
  25. package/dist/Actions/components/execution-monitoring.component.js +111 -116
  26. package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
  27. package/dist/Admin/admin-data-schema.component.js +13 -65
  28. package/dist/Admin/admin-data-schema.component.js.map +1 -1
  29. package/dist/Admin/admin-dev-tools-resource.component.js +13 -65
  30. package/dist/Admin/admin-dev-tools-resource.component.js.map +1 -1
  31. package/dist/Admin/admin-identity-access.component.js +13 -65
  32. package/dist/Admin/admin-identity-access.component.js.map +1 -1
  33. package/dist/Admin/admin-monitoring.component.js +13 -65
  34. package/dist/Admin/admin-monitoring.component.js.map +1 -1
  35. package/dist/Admin/base-admin-container.component.d.ts +9 -7
  36. package/dist/Admin/base-admin-container.component.d.ts.map +1 -1
  37. package/dist/Admin/base-admin-container.component.js +26 -17
  38. package/dist/Admin/base-admin-container.component.js.map +1 -1
  39. package/dist/ApplicationRoles/application-roles-resource.component.js +74 -67
  40. package/dist/ApplicationRoles/application-roles-resource.component.js.map +1 -1
  41. package/dist/Communication/communication-new-message-resource.component.d.ts +93 -0
  42. package/dist/Communication/communication-new-message-resource.component.d.ts.map +1 -0
  43. package/dist/Communication/communication-new-message-resource.component.js +661 -0
  44. package/dist/Communication/communication-new-message-resource.component.js.map +1 -0
  45. package/dist/Credentials/components/credentials-categories-resource.component.js +152 -159
  46. package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -1
  47. package/dist/Credentials/components/credentials-types-resource.component.js +151 -155
  48. package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -1
  49. package/dist/DatabaseDesigner/components/database-designer-dashboard.component.js +20 -21
  50. package/dist/DatabaseDesigner/components/database-designer-dashboard.component.js.map +1 -1
  51. package/dist/DatabaseDesigner/components/entity-list.component.d.ts +2 -0
  52. package/dist/DatabaseDesigner/components/entity-list.component.d.ts.map +1 -1
  53. package/dist/DatabaseDesigner/components/entity-list.component.js +131 -125
  54. package/dist/DatabaseDesigner/components/entity-list.component.js.map +1 -1
  55. package/dist/DatabaseDesigner/database-designer-dashboards.module.d.ts +1 -1
  56. package/dist/DatabaseDesigner/database-designer-dashboards.module.d.ts.map +1 -1
  57. package/dist/DatabaseDesigner/database-designer-dashboards.module.js +7 -1
  58. package/dist/DatabaseDesigner/database-designer-dashboards.module.js.map +1 -1
  59. package/dist/DevTools/app-state-inspector.component.d.ts +5 -0
  60. package/dist/DevTools/app-state-inspector.component.d.ts.map +1 -1
  61. package/dist/DevTools/app-state-inspector.component.js +46 -72
  62. package/dist/DevTools/app-state-inspector.component.js.map +1 -1
  63. package/dist/DevTools/class-registry.component.js +88 -100
  64. package/dist/DevTools/class-registry.component.js.map +1 -1
  65. package/dist/DevTools/event-monitor.component.js +158 -168
  66. package/dist/DevTools/event-monitor.component.js.map +1 -1
  67. package/dist/DevTools/graphql-console.component.js +257 -264
  68. package/dist/DevTools/graphql-console.component.js.map +1 -1
  69. package/dist/DevTools/layout-inspector.component.d.ts +5 -0
  70. package/dist/DevTools/layout-inspector.component.d.ts.map +1 -1
  71. package/dist/DevTools/layout-inspector.component.js +46 -64
  72. package/dist/DevTools/layout-inspector.component.js.map +1 -1
  73. package/dist/DevTools/lazy-module-status.component.js +75 -84
  74. package/dist/DevTools/lazy-module-status.component.js.map +1 -1
  75. package/dist/DevTools/settings-explorer.component.js +76 -85
  76. package/dist/DevTools/settings-explorer.component.js.map +1 -1
  77. package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts +2 -0
  78. package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts.map +1 -1
  79. package/dist/EntityAdmin/entity-admin-dashboard.component.js +7 -3
  80. package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
  81. package/dist/Integration/components/activity/activity.component.js +97 -99
  82. package/dist/Integration/components/activity/activity.component.js.map +1 -1
  83. package/dist/Integration/components/connections/connections.component.js +842 -855
  84. package/dist/Integration/components/connections/connections.component.js.map +1 -1
  85. package/dist/Integration/components/pipelines/pipelines.component.js +502 -517
  86. package/dist/Integration/components/pipelines/pipelines.component.js.map +1 -1
  87. package/dist/Integration/components/schedules/schedules.component.js +78 -89
  88. package/dist/Integration/components/schedules/schedules.component.js.map +1 -1
  89. package/dist/KnowledgeHub/components/analytics/analytics-resource.component.d.ts +5 -0
  90. package/dist/KnowledgeHub/components/analytics/analytics-resource.component.d.ts.map +1 -1
  91. package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js +1120 -1128
  92. package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js.map +1 -1
  93. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.d.ts +11 -0
  94. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.d.ts.map +1 -1
  95. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +606 -661
  96. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
  97. package/dist/Lists/components/lists-browse-resource.component.d.ts +102 -0
  98. package/dist/Lists/components/lists-browse-resource.component.d.ts.map +1 -1
  99. package/dist/Lists/components/lists-browse-resource.component.js +1179 -504
  100. package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
  101. package/dist/Lists/components/lists-operations-resource.component.d.ts +133 -3
  102. package/dist/Lists/components/lists-operations-resource.component.d.ts.map +1 -1
  103. package/dist/Lists/components/lists-operations-resource.component.js +1527 -327
  104. package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
  105. package/dist/Lists/components/lists-shared-with-me-resource.component.d.ts +29 -0
  106. package/dist/Lists/components/lists-shared-with-me-resource.component.d.ts.map +1 -0
  107. package/dist/Lists/components/lists-shared-with-me-resource.component.js +77 -0
  108. package/dist/Lists/components/lists-shared-with-me-resource.component.js.map +1 -0
  109. package/dist/Lists/components/venn-diagram/venn-diagram.component.d.ts +6 -0
  110. package/dist/Lists/components/venn-diagram/venn-diagram.component.d.ts.map +1 -1
  111. package/dist/Lists/components/venn-diagram/venn-diagram.component.js +35 -7
  112. package/dist/Lists/components/venn-diagram/venn-diagram.component.js.map +1 -1
  113. package/dist/Lists/index.d.ts +1 -0
  114. package/dist/Lists/index.d.ts.map +1 -1
  115. package/dist/Lists/index.js +1 -0
  116. package/dist/Lists/index.js.map +1 -1
  117. package/dist/Lists/services/list-set-operations.service.d.ts +93 -2
  118. package/dist/Lists/services/list-set-operations.service.d.ts.map +1 -1
  119. package/dist/Lists/services/list-set-operations.service.js +236 -10
  120. package/dist/Lists/services/list-set-operations.service.js.map +1 -1
  121. package/dist/MCP/mcp-dashboard.component.js +19 -19
  122. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  123. package/dist/Scheduling/scheduling-dashboard.component.js +58 -60
  124. package/dist/Scheduling/scheduling-dashboard.component.js.map +1 -1
  125. package/dist/SystemDiagnostics/system-diagnostics.component.d.ts +13 -3
  126. package/dist/SystemDiagnostics/system-diagnostics.component.d.ts.map +1 -1
  127. package/dist/SystemDiagnostics/system-diagnostics.component.js +1007 -1252
  128. package/dist/SystemDiagnostics/system-diagnostics.component.js.map +1 -1
  129. package/dist/Testing/components/testing-explorer.component.d.ts +31 -6
  130. package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
  131. package/dist/Testing/components/testing-explorer.component.js +543 -629
  132. package/dist/Testing/components/testing-explorer.component.js.map +1 -1
  133. package/dist/Testing/testing-dashboard.component.js +50 -49
  134. package/dist/Testing/testing-dashboard.component.js.map +1 -1
  135. package/dist/ai-dashboards.module.d.ts +1 -1
  136. package/dist/ai-dashboards.module.d.ts.map +1 -1
  137. package/dist/ai-dashboards.module.js +16 -1
  138. package/dist/ai-dashboards.module.js.map +1 -1
  139. package/dist/communication-dashboards.module.d.ts +9 -7
  140. package/dist/communication-dashboards.module.d.ts.map +1 -1
  141. package/dist/communication-dashboards.module.js +13 -4
  142. package/dist/communication-dashboards.module.js.map +1 -1
  143. package/dist/core-dashboards.module.d.ts +1 -1
  144. package/dist/core-dashboards.module.d.ts.map +1 -1
  145. package/dist/core-dashboards.module.js +16 -1
  146. package/dist/core-dashboards.module.js.map +1 -1
  147. package/dist/lists-dashboards.module.d.ts +10 -9
  148. package/dist/lists-dashboards.module.d.ts.map +1 -1
  149. package/dist/lists-dashboards.module.js +13 -2
  150. package/dist/lists-dashboards.module.js.map +1 -1
  151. package/dist/public-api.d.ts +1 -0
  152. package/dist/public-api.d.ts.map +1 -1
  153. package/dist/public-api.js +1 -0
  154. package/dist/public-api.js.map +1 -1
  155. package/dist/testing-dashboards.module.d.ts +1 -1
  156. package/dist/testing-dashboards.module.d.ts.map +1 -1
  157. package/dist/testing-dashboards.module.js +13 -1
  158. package/dist/testing-dashboards.module.js.map +1 -1
  159. package/package.json +53 -52
@@ -0,0 +1,29 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { BaseResourceComponent } from '@memberjunction/ng-shared';
3
+ import { ResourceData } from '@memberjunction/core-entities';
4
+ import { TabService } from '@memberjunction/ng-base-application';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * "Shared With Me" tab for the Lists app (mockup 17). Thin shell around
8
+ * the generic `mj-lists-shared-with-me` component — handles routing the
9
+ * `OpenList` event into the explorer's tab system. The generic component
10
+ * stays framework-agnostic by design (no Router import).
11
+ */
12
+ export declare class ListsSharedWithMeResource extends BaseResourceComponent {
13
+ private cdr;
14
+ private tabService;
15
+ constructor(cdr: ChangeDetectorRef, tabService: TabService);
16
+ ngOnInit(): Promise<void>;
17
+ ngOnDestroy(): void;
18
+ onOpenList(payload: {
19
+ ListID: string;
20
+ ListName: string;
21
+ }): void;
22
+ GetResourceDisplayName(_data: ResourceData): Promise<string>;
23
+ GetResourceIconClass(_data: ResourceData): Promise<string>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListsSharedWithMeResource, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListsSharedWithMeResource, "mj-lists-shared-with-me-resource", never, {}, {}, never, never, false, never>;
26
+ }
27
+ /** Tree-shaking prevention */
28
+ export declare function LoadListsSharedWithMeResource(): void;
29
+ //# sourceMappingURL=lists-shared-with-me-resource.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists-shared-with-me-resource.component.d.ts","sourceRoot":"","sources":["../../../src/Lists/components/lists-shared-with-me-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;;AAEjE;;;;;GAKG;AACH,qBAqDa,yBAA0B,SAAQ,qBAAqB;IAEhE,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,UAAU;gBADV,GAAG,EAAE,iBAAiB,EACtB,UAAU,EAAE,UAAU;IAK1B,QAAQ;IAKd,WAAW;IAIJ,UAAU,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAKhE,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAI5D,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCA1BrD,yBAAyB;2CAAzB,yBAAyB;CA6BrC;AAED,8BAA8B;AAC9B,wBAAgB,6BAA6B,SAAK"}
@@ -0,0 +1,77 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Component, ViewEncapsulation } from '@angular/core';
8
+ import { RegisterClass } from '@memberjunction/global';
9
+ import { BaseResourceComponent } from '@memberjunction/ng-shared';
10
+ import * as i0 from "@angular/core";
11
+ import * as i1 from "@memberjunction/ng-base-application";
12
+ import * as i2 from "@memberjunction/ng-list-management";
13
+ /**
14
+ * "Shared With Me" tab for the Lists app (mockup 17). Thin shell around
15
+ * the generic `mj-lists-shared-with-me` component — handles routing the
16
+ * `OpenList` event into the explorer's tab system. The generic component
17
+ * stays framework-agnostic by design (no Router import).
18
+ */
19
+ let ListsSharedWithMeResource = class ListsSharedWithMeResource extends BaseResourceComponent {
20
+ cdr;
21
+ tabService;
22
+ constructor(cdr, tabService) {
23
+ super();
24
+ this.cdr = cdr;
25
+ this.tabService = tabService;
26
+ }
27
+ async ngOnInit() {
28
+ super.ngOnInit();
29
+ this.NotifyLoadComplete();
30
+ }
31
+ ngOnDestroy() {
32
+ super.ngOnDestroy();
33
+ }
34
+ onOpenList(payload) {
35
+ const appId = this.Data?.Configuration?.applicationId || '';
36
+ this.tabService.OpenList(payload.ListID, payload.ListName, appId);
37
+ }
38
+ async GetResourceDisplayName(_data) {
39
+ return 'Shared With Me';
40
+ }
41
+ async GetResourceIconClass(_data) {
42
+ return 'fa-solid fa-share-nodes';
43
+ }
44
+ static ɵfac = function ListsSharedWithMeResource_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ListsSharedWithMeResource)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.TabService)); };
45
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListsSharedWithMeResource, selectors: [["mj-lists-shared-with-me-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 0, consts: [[1, "lists-shared-resource"], [1, "shared-header"], [1, "shared-header__titleblock"], [1, "fa-solid", "fa-share-nodes"], [3, "OpenList"]], template: function ListsSharedWithMeResource_Template(rf, ctx) { if (rf & 1) {
46
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
47
+ i0.ɵɵelement(3, "i", 3);
48
+ i0.ɵɵelementStart(4, "h2");
49
+ i0.ɵɵtext(5, "Shared With Me");
50
+ i0.ɵɵelementEnd()()();
51
+ i0.ɵɵelementStart(6, "mj-lists-shared-with-me", 4);
52
+ i0.ɵɵlistener("OpenList", function ListsSharedWithMeResource_Template_mj_lists_shared_with_me_OpenList_6_listener($event) { return ctx.onOpenList($event); });
53
+ i0.ɵɵelementEnd()();
54
+ } }, dependencies: [i2.ListsSharedWithMeComponent], styles: ["\n .lists-shared-resource {\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 16px 24px;\n gap: 16px;\n overflow: hidden;\n }\n .shared-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n .shared-header__titleblock {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n .shared-header__titleblock i {\n font-size: 20px;\n color: var(--mj-brand-primary);\n }\n .shared-header__titleblock h2 {\n font-size: 18px;\n font-weight: 600;\n margin: 0;\n color: var(--mj-text-primary);\n }\n mj-lists-shared-with-me {\n flex: 1;\n min-height: 0;\n overflow: auto;\n }\n "], encapsulation: 2 });
55
+ };
56
+ ListsSharedWithMeResource = __decorate([
57
+ RegisterClass(BaseResourceComponent, 'ListsSharedWithMeResource')
58
+ ], ListsSharedWithMeResource);
59
+ export { ListsSharedWithMeResource };
60
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListsSharedWithMeResource, [{
61
+ type: Component,
62
+ args: [{ standalone: false, selector: 'mj-lists-shared-with-me-resource', template: `
63
+ <div class="lists-shared-resource">
64
+ <div class="shared-header">
65
+ <div class="shared-header__titleblock">
66
+ <i class="fa-solid fa-share-nodes"></i>
67
+ <h2>Shared With Me</h2>
68
+ </div>
69
+ </div>
70
+ <mj-lists-shared-with-me (OpenList)="onOpenList($event)"></mj-lists-shared-with-me>
71
+ </div>
72
+ `, encapsulation: ViewEncapsulation.None, styles: ["\n .lists-shared-resource {\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 16px 24px;\n gap: 16px;\n overflow: hidden;\n }\n .shared-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n .shared-header__titleblock {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n .shared-header__titleblock i {\n font-size: 20px;\n color: var(--mj-brand-primary);\n }\n .shared-header__titleblock h2 {\n font-size: 18px;\n font-weight: 600;\n margin: 0;\n color: var(--mj-text-primary);\n }\n mj-lists-shared-with-me {\n flex: 1;\n min-height: 0;\n overflow: auto;\n }\n "] }]
73
+ }], () => [{ type: i0.ChangeDetectorRef }, { type: i1.TabService }], null); })();
74
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ListsSharedWithMeResource, { className: "ListsSharedWithMeResource", filePath: "src/Lists/components/lists-shared-with-me-resource.component.ts", lineNumber: 66 }); })();
75
+ /** Tree-shaking prevention */
76
+ export function LoadListsSharedWithMeResource() { }
77
+ //# sourceMappingURL=lists-shared-with-me-resource.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists-shared-with-me-resource.component.js","sourceRoot":"","sources":["../../../src/Lists/components/lists-shared-with-me-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAqB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;;;AAIlE;;;;;GAKG;AAsDI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,qBAAqB;IAExD;IACA;IAFV,YACU,GAAsB,EACtB,UAAsB;QAE9B,KAAK,EAAE,CAAC;QAHA,QAAG,GAAH,GAAG,CAAmB;QACtB,eAAU,GAAV,UAAU,CAAY;IAGhC,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAED,WAAW;QACT,KAAK,CAAC,WAAW,EAAE,CAAC;IACtB,CAAC;IAEM,UAAU,CAAC,OAA6C;QAC7D,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,IAAI,EAAE,CAAC;QAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,KAAmB;QAC9C,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,KAAmB;QAC5C,OAAO,yBAAyB,CAAC;IACnC,CAAC;mHA5BU,yBAAyB;6DAAzB,yBAAyB;YA9C9B,AADF,AADF,8BAAmC,aACN,aACc;YACrC,uBAAuC;YACvC,0BAAI;YAAA,8BAAc;YAEtB,AADE,AADoB,iBAAK,EACnB,EACF;YACN,kDAAyD;YAAhC,mIAAY,sBAAkB,IAAC;YAC1D,AAD2D,iBAA0B,EAC/E;;;AAwCG,yBAAyB;IArDrC,aAAa,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;GAqDrD,yBAAyB,CA6BrC;;iFA7BY,yBAAyB;cApDrC,SAAS;6BACI,KAAK,YACP,kCAAkC,YAClC;;;;;;;;;;GAUT,iBAqCc,iBAAiB,CAAC,IAAI;;kFAE1B,yBAAyB;AA+BtC,8BAA8B;AAC9B,MAAM,UAAU,6BAA6B,KAAI,CAAC","sourcesContent":["import { Component, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { TabService } from '@memberjunction/ng-base-application';\n\n/**\n * \"Shared With Me\" tab for the Lists app (mockup 17). Thin shell around\n * the generic `mj-lists-shared-with-me` component — handles routing the\n * `OpenList` event into the explorer's tab system. The generic component\n * stays framework-agnostic by design (no Router import).\n */\n@RegisterClass(BaseResourceComponent, 'ListsSharedWithMeResource')\n@Component({\n standalone: false,\n selector: 'mj-lists-shared-with-me-resource',\n template: `\n <div class=\"lists-shared-resource\">\n <div class=\"shared-header\">\n <div class=\"shared-header__titleblock\">\n <i class=\"fa-solid fa-share-nodes\"></i>\n <h2>Shared With Me</h2>\n </div>\n </div>\n <mj-lists-shared-with-me (OpenList)=\"onOpenList($event)\"></mj-lists-shared-with-me>\n </div>\n `,\n styles: [`\n .lists-shared-resource {\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 16px 24px;\n gap: 16px;\n overflow: hidden;\n }\n .shared-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n .shared-header__titleblock {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n .shared-header__titleblock i {\n font-size: 20px;\n color: var(--mj-brand-primary);\n }\n .shared-header__titleblock h2 {\n font-size: 18px;\n font-weight: 600;\n margin: 0;\n color: var(--mj-text-primary);\n }\n mj-lists-shared-with-me {\n flex: 1;\n min-height: 0;\n overflow: auto;\n }\n `],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ListsSharedWithMeResource extends BaseResourceComponent {\n constructor(\n private cdr: ChangeDetectorRef,\n private tabService: TabService,\n ) {\n super();\n }\n\n async ngOnInit() {\n super.ngOnInit();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n public onOpenList(payload: { ListID: string; ListName: string }): void {\n const appId = this.Data?.Configuration?.applicationId || '';\n this.tabService.OpenList(payload.ListID, payload.ListName, appId);\n }\n\n async GetResourceDisplayName(_data: ResourceData): Promise<string> {\n return 'Shared With Me';\n }\n\n async GetResourceIconClass(_data: ResourceData): Promise<string> {\n return 'fa-solid fa-share-nodes';\n }\n}\n\n/** Tree-shaking prevention */\nexport function LoadListsSharedWithMeResource() {}\n"]}
@@ -37,6 +37,12 @@ export declare class VennDiagramComponent implements AfterViewInit, OnChanges, O
37
37
  private width;
38
38
  private height;
39
39
  constructor(cdr: ChangeDetectorRef);
40
+ /**
41
+ * Apply the view-vs-list visual distinction to a circle selection: views
42
+ * get a dashed colored stroke; lists get nothing extra (fill-only).
43
+ * Centralized here so all 5 circle-drawing sites stay consistent.
44
+ */
45
+ private applyOperandStyle;
40
46
  ngAfterViewInit(): void;
41
47
  ngOnChanges(changes: SimpleChanges): void;
42
48
  ngOnDestroy(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"venn-diagram.component.d.ts","sourceRoot":"","sources":["../../../../src/Lists/components/venn-diagram/venn-diagram.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,UAAU,EAEV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAW,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;;AAEjG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,qBAkMa,oBAAqB,YAAW,aAAa,EAAE,SAAS,EAAE,SAAS;IAyBlE,OAAO,CAAC,GAAG;IAxBK,YAAY,EAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAChD,MAAM,EAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAC7B,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAE9C,WAAW,qCAA4C;IACvD,WAAW,wCAA+C;IAGpE,cAAc,UAAS;IACvB,QAAQ,SAAK;IACb,QAAQ,SAAK;IACb,YAAY,SAAM;IAClB,YAAY,SAAK;IAGjB,OAAO,CAAC,2BAA2B,CAAS;IAE5C,OAAO,CAAC,GAAG,CAAsE;IACjF,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,MAAM,CAAK;gBAEC,GAAG,EAAE,iBAAiB;IAE1C,eAAe,IAAI,IAAI;IAMvB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC,WAAW,IAAI,IAAI;IAMnB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,MAAM;IAqCd,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,aAAa;IAkErB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiEzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAMxB;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IAwDlC,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,4BAA4B;IA6CpC;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAkDtB;;OAEG;IACH,OAAO,CAAC,8BAA8B;IA4DtC,OAAO,CAAC,kBAAkB;IAgD1B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;IAenB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAkBxB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAWhC,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,mBAAmB;yCAnrBhB,oBAAoB;2CAApB,oBAAoB;CAyrBhC"}
1
+ {"version":3,"file":"venn-diagram.component.d.ts","sourceRoot":"","sources":["../../../../src/Lists/components/venn-diagram/venn-diagram.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,UAAU,EAEV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAW,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;;AAEjG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,gBAAgB,CAAC;I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C,kBAAkB;IAiD1B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;IAenB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAkBxB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAWhC,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,mBAAmB;yCArtBhB,oBAAoB;2CAApB,oBAAoB;CA2tBhC"}
@@ -70,6 +70,19 @@ export class VennDiagramComponent {
70
70
  constructor(cdr) {
71
71
  this.cdr = cdr;
72
72
  }
73
+ /**
74
+ * Apply the view-vs-list visual distinction to a circle selection: views
75
+ * get a dashed colored stroke; lists get nothing extra (fill-only).
76
+ * Centralized here so all 5 circle-drawing sites stay consistent.
77
+ */
78
+ applyOperandStyle(selection, set) {
79
+ if (set.kind === 'view') {
80
+ selection
81
+ .attr('stroke', set.color)
82
+ .attr('stroke-width', 3)
83
+ .attr('stroke-dasharray', '6 4');
84
+ }
85
+ }
73
86
  ngAfterViewInit() {
74
87
  this.initializeSvg();
75
88
  this.setupResizeObserver();
@@ -147,7 +160,7 @@ export class VennDiagramComponent {
147
160
  const cy = height / 2;
148
161
  const radius = Math.min(width, height) * 0.35;
149
162
  // Draw circle
150
- g.append('circle')
163
+ const circle = g.append('circle')
151
164
  .attr('class', 'venn-circle')
152
165
  .attr('cx', cx)
153
166
  .attr('cy', cy)
@@ -158,6 +171,7 @@ export class VennDiagramComponent {
158
171
  .on('mousemove', (event) => this.moveTooltip(event))
159
172
  .on('mouseleave', () => this.hideTooltip())
160
173
  .on('click', () => this.onCircleClick(set));
174
+ this.applyOperandStyle(circle, set);
161
175
  // Draw label
162
176
  g.append('text')
163
177
  .attr('class', 'venn-label')
@@ -171,16 +185,26 @@ export class VennDiagramComponent {
171
185
  const { radii, baseRadius } = this.calculateProportionalRadii(sets, width, height, 2);
172
186
  const r1 = radii[0];
173
187
  const r2 = radii[1];
174
- // Calculate overlap to ensure visual intersection
188
+ // Size the overlap by the **actual** intersection count, not a fixed
189
+ // fraction. Otherwise the diagram lies: it always draws the circles
190
+ // overlapping even when the lists share zero records, leading users
191
+ // to expect a non-zero intersection that the math correctly returns
192
+ // as 0. Math: as fraction of (r1+r2)/2, scale by share of records
193
+ // common to both sets vs. the smaller set's size. Clamped so even
194
+ // big intersections don't make one circle swallow the other.
195
+ const intersectionSize = this.data?.intersections.find(i => i.setIds.length === 2 && i.setIds.includes(sets[0].listId) && i.setIds.includes(sets[1].listId))?.size ?? 0;
196
+ const smallerSize = Math.min(sets[0].size, sets[1].size);
197
+ const overlapFraction = smallerSize > 0 ? Math.min(0.85, intersectionSize / smallerSize) : 0;
175
198
  const avgRadius = (r1 + r2) / 2;
176
- const overlap = avgRadius * 0.5;
199
+ // Visual gap when truly disjoint, so users can see "no overlap = no shared records".
200
+ const overlap = intersectionSize > 0 ? avgRadius * Math.max(0.1, overlapFraction * 0.7) : -avgRadius * 0.15;
177
201
  const positions = [
178
202
  { cx: width / 2 - r1 + overlap / 2, r: r1, set: sets[0] },
179
203
  { cx: width / 2 + r2 - overlap / 2, r: r2, set: sets[1] }
180
204
  ];
181
205
  // Draw circles
182
206
  for (const pos of positions) {
183
- g.append('circle')
207
+ const circle = g.append('circle')
184
208
  .attr('class', 'venn-circle')
185
209
  .attr('cx', pos.cx)
186
210
  .attr('cy', cy)
@@ -191,6 +215,7 @@ export class VennDiagramComponent {
191
215
  .on('mousemove', (event) => this.moveTooltip(event))
192
216
  .on('mouseleave', () => this.hideTooltip())
193
217
  .on('click', () => this.onCircleClick(pos.set));
218
+ this.applyOperandStyle(circle, pos.set);
194
219
  }
195
220
  // Find intersection data
196
221
  const intersection = this.data?.intersections.find(i => i.setIds.length === 2 && i.setIds.includes(sets[0].listId) && i.setIds.includes(sets[1].listId));
@@ -341,7 +366,7 @@ export class VennDiagramComponent {
341
366
  ];
342
367
  // Draw circles
343
368
  for (const pos of positions) {
344
- g.append('circle')
369
+ const circle = g.append('circle')
345
370
  .attr('class', 'venn-circle')
346
371
  .attr('cx', pos.cx)
347
372
  .attr('cy', pos.cy)
@@ -352,6 +377,7 @@ export class VennDiagramComponent {
352
377
  .on('mousemove', (event) => this.moveTooltip(event))
353
378
  .on('mouseleave', () => this.hideTooltip())
354
379
  .on('click', () => this.onCircleClick(pos.set));
380
+ this.applyOperandStyle(circle, pos.set);
355
381
  }
356
382
  // Draw clickable intersection labels
357
383
  for (const intersection of this.data?.intersections || []) {
@@ -419,7 +445,7 @@ export class VennDiagramComponent {
419
445
  ];
420
446
  // Draw ellipses
421
447
  for (const pos of positions) {
422
- g.append('ellipse')
448
+ const ellipse = g.append('ellipse')
423
449
  .attr('class', 'venn-circle')
424
450
  .attr('cx', pos.cx)
425
451
  .attr('cy', pos.cy)
@@ -432,6 +458,7 @@ export class VennDiagramComponent {
432
458
  .on('mousemove', (event) => this.moveTooltip(event))
433
459
  .on('mouseleave', () => this.hideTooltip())
434
460
  .on('click', () => this.onCircleClick(pos.set));
461
+ this.applyOperandStyle(ellipse, pos.set);
435
462
  }
436
463
  // Draw clickable intersection labels
437
464
  // For 4 sets, we need to calculate positions for all 15 regions
@@ -509,7 +536,7 @@ export class VennDiagramComponent {
509
536
  const row = Math.floor(i / cols);
510
537
  const cx = cellWidth * col + cellWidth / 2;
511
538
  const cy = cellHeight * row + cellHeight / 2;
512
- g.append('circle')
539
+ const circle = g.append('circle')
513
540
  .attr('class', 'venn-circle')
514
541
  .attr('cx', cx)
515
542
  .attr('cy', cy)
@@ -520,6 +547,7 @@ export class VennDiagramComponent {
520
547
  .on('mousemove', (event) => this.moveTooltip(event))
521
548
  .on('mouseleave', () => this.hideTooltip())
522
549
  .on('click', () => this.onCircleClick(set));
550
+ this.applyOperandStyle(circle, set);
523
551
  g.append('text')
524
552
  .attr('class', 'venn-label')
525
553
  .attr('x', cx)
@@ -1 +1 @@
1
- {"version":3,"file":"venn-diagram.component.js","sourceRoot":"","sources":["../../../../src/Lists/components/ven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,+DAYC;YAGD,cAKC;YALD,mEAKC;;;iFA+JM,oBAAoB;cAlMhC,SAAS;6BACI,KAAK,YACP,iBAAiB,YACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkCP;;kBA8JF,SAAS;mBAAC,eAAe;;kBACzB,SAAS;mBAAC,SAAS;;kBAEnB,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kFARI,oBAAoB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ViewChild,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n OnDestroy,\n ChangeDetectorRef\n} from '@angular/core';\nimport * as d3 from 'd3';\nimport { VennData, VennSet, VennIntersection } from '../../services/list-set-operations.service';\n\n/**\n * Event emitted when a Venn region is clicked\n */\nexport interface VennRegionClickEvent {\n intersection: VennIntersection;\n recordIds: string[];\n}\n\n/**\n * Interactive D3-based Venn diagram component for visualizing list overlaps.\n *\n * Features:\n * - Proportional circle sizing based on list size\n * - Animated transitions\n * - Hover highlighting\n * - Click to select regions\n * - Responsive sizing\n */\n@Component({\n standalone: false,\n selector: 'mj-venn-diagram',\n template: `\n <div class=\"venn-container\" #vennContainer>\n <svg #vennSvg class=\"venn-svg\"></svg>\n \n <!-- Tooltip -->\n <div class=\"venn-tooltip\" [class.visible]=\"tooltipVisible\"\n [style.left.px]=\"tooltipX\" [style.top.px]=\"tooltipY\">\n <div class=\"tooltip-title\">{{ tooltipTitle }}</div>\n <div class=\"tooltip-count\">{{ tooltipCount }} records</div>\n </div>\n \n <!-- Legend -->\n @if (data && data.sets.length > 0) {\n <div class=\"venn-legend\">\n @for (set of data.sets; track set) {\n <div class=\"legend-item\">\n <div class=\"legend-color\" [style.background-color]=\"set.color\"></div>\n <div class=\"legend-info\">\n <span class=\"legend-name\">{{ set.listName }}</span>\n <span class=\"legend-count\">{{ set.size }} items</span>\n </div>\n </div>\n }\n </div>\n }\n \n <!-- Empty state -->\n @if (!data || data.sets.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-diagram-project\"></i>\n <p>Add lists to visualize their overlaps</p>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .venn-container {\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 300px;\n background: linear-gradient(135deg, var(--mj-bg-surface-sunken) 0%, var(--mj-bg-surface-card) 100%);\n border-radius: 8px;\n overflow: hidden;\n }\n\n .venn-svg {\n width: 100%;\n height: 100%;\n }\n\n .venn-tooltip {\n position: absolute;\n background: rgba(0, 0, 0, 0.85);\n color: white;\n padding: 8px 12px;\n border-radius: 6px;\n font-size: 13px;\n pointer-events: none;\n opacity: 0;\n transform: translateY(8px);\n transition: opacity 0.15s, transform 0.15s;\n z-index: 100;\n white-space: nowrap;\n }\n\n .venn-tooltip.visible {\n opacity: 1;\n transform: translateY(0);\n }\n\n .tooltip-title {\n font-weight: 600;\n margin-bottom: 2px;\n }\n\n .tooltip-count {\n color: rgba(255, 255, 255, 0.8);\n font-size: 12px;\n }\n\n .venn-legend {\n position: absolute;\n bottom: 16px;\n left: 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--mj-bg-surface-card);\n padding: 12px;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n }\n\n .legend-item {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .legend-color {\n width: 16px;\n height: 16px;\n border-radius: 4px;\n flex-shrink: 0;\n }\n\n .legend-info {\n display: flex;\n flex-direction: column;\n }\n\n .legend-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .legend-count {\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n\n .empty-state {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n color: var(--mj-text-muted);\n }\n\n .empty-state i {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.5;\n }\n\n .empty-state p {\n font-size: 14px;\n margin: 0;\n }\n\n /* SVG styles */\n :host ::ng-deep .venn-circle {\n cursor: pointer;\n transition: opacity 0.2s;\n }\n\n :host ::ng-deep .venn-circle:hover {\n opacity: 0.9;\n }\n\n :host ::ng-deep .venn-label {\n font-size: 12px;\n font-weight: 600;\n fill: white;\n text-anchor: middle;\n pointer-events: none;\n }\n\n :host ::ng-deep .intersection-region {\n cursor: pointer;\n transition: all 0.2s;\n }\n\n :host ::ng-deep .intersection-region:hover {\n fill: rgba(0,0,0,0.75);\n }\n\n :host ::ng-deep .intersection-region.selected {\n fill: rgba(156, 39, 176, 0.9);\n stroke: #7B1FA2;\n stroke-width: 2;\n }\n\n :host ::ng-deep .intersection-label-group {\n transition: transform 0.15s ease;\n }\n\n :host ::ng-deep .intersection-label-group:hover {\n transform: scale(1.05);\n }\n `]\n})\nexport class VennDiagramComponent implements AfterViewInit, OnChanges, OnDestroy {\n @ViewChild('vennContainer') containerRef!: ElementRef<HTMLDivElement>;\n @ViewChild('vennSvg') svgRef!: ElementRef<SVGSVGElement>;\n\n @Input() data: VennData | null = null;\n @Input() selectedRegion: VennIntersection | null = null;\n\n @Output() regionClick = new EventEmitter<VennRegionClickEvent>();\n @Output() regionHover = new EventEmitter<VennIntersection | null>();\n\n // Tooltip state\n tooltipVisible = false;\n tooltipX = 0;\n tooltipY = 0;\n tooltipTitle = '';\n tooltipCount = 0;\n\n // Track if hovering an intersection label (to suppress circle tooltips)\n private isHoveringIntersectionLabel = false;\n\n private svg: d3.Selection<SVGSVGElement, unknown, null, undefined> | null = null;\n private resizeObserver: ResizeObserver | null = null;\n private width = 0;\n private height = 0;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngAfterViewInit(): void {\n this.initializeSvg();\n this.setupResizeObserver();\n this.render();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes['data'] || changes['selectedRegion']) && this.svg) {\n this.render();\n }\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n private initializeSvg(): void {\n if (!this.svgRef) return;\n\n this.svg = d3.select(this.svgRef.nativeElement);\n this.updateDimensions();\n }\n\n private setupResizeObserver(): void {\n if (!this.containerRef) return;\n\n this.resizeObserver = new ResizeObserver(() => {\n this.updateDimensions();\n this.render();\n });\n\n this.resizeObserver.observe(this.containerRef.nativeElement);\n }\n\n private updateDimensions(): void {\n if (!this.containerRef) return;\n\n const rect = this.containerRef.nativeElement.getBoundingClientRect();\n this.width = rect.width;\n this.height = rect.height;\n }\n\n private render(): void {\n if (!this.svg || !this.data || this.data.sets.length === 0) {\n if (this.svg) {\n this.svg.selectAll('*').remove();\n }\n return;\n }\n\n // Clear previous content\n this.svg.selectAll('*').remove();\n\n const margin = { top: 40, right: 40, bottom: 80, left: 40 };\n const drawWidth = this.width - margin.left - margin.right;\n const drawHeight = this.height - margin.top - margin.bottom;\n\n if (drawWidth <= 0 || drawHeight <= 0) return;\n\n const g = this.svg\n .append('g')\n .attr('transform', `translate(${margin.left}, ${margin.top})`);\n\n // Render based on number of sets\n const sets = this.data.sets;\n\n if (sets.length === 1) {\n this.renderSingleSet(g, sets[0], drawWidth, drawHeight);\n } else if (sets.length === 2) {\n this.renderTwoSets(g, sets, drawWidth, drawHeight);\n } else if (sets.length === 3) {\n this.renderThreeSets(g, sets, drawWidth, drawHeight);\n } else if (sets.length === 4) {\n this.renderFourSets(g, sets, drawWidth, drawHeight);\n } else {\n this.renderMultipleSets(g, sets, drawWidth, drawHeight);\n }\n }\n\n private renderSingleSet(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n set: VennSet,\n width: number,\n height: number\n ): void {\n const cx = width / 2;\n const cy = height / 2;\n const radius = Math.min(width, height) * 0.35;\n\n // Draw circle\n g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', cx)\n .attr('cy', cy)\n .attr('r', radius)\n .attr('fill', set.color)\n .attr('opacity', 0.6)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, set.listName, set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(set));\n\n // Draw label\n g.append('text')\n .attr('class', 'venn-label')\n .attr('x', cx)\n .attr('y', cy)\n .text(set.size.toString());\n }\n\n private renderTwoSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n const cy = height / 2;\n\n // Calculate proportional radii based on list sizes\n const { radii, baseRadius } = this.calculateProportionalRadii(sets, width, height, 2);\n const r1 = radii[0];\n const r2 = radii[1];\n\n // Calculate overlap to ensure visual intersection\n const avgRadius = (r1 + r2) / 2;\n const overlap = avgRadius * 0.5;\n\n const positions = [\n { cx: width / 2 - r1 + overlap / 2, r: r1, set: sets[0] },\n { cx: width / 2 + r2 - overlap / 2, r: r2, set: sets[1] }\n ];\n\n // Draw circles\n for (const pos of positions) {\n g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', pos.cx)\n .attr('cy', cy)\n .attr('r', pos.r)\n .attr('fill', pos.set.color)\n .attr('opacity', 0.5)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, pos.set.listName, pos.set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(pos.set));\n }\n\n // Find intersection data\n const intersection = this.data?.intersections.find(\n i => i.setIds.length === 2 && i.setIds.includes(sets[0].listId) && i.setIds.includes(sets[1].listId)\n );\n\n // Draw intersection labels\n const leftOnlyIntersection = this.data?.intersections.find(\n i => i.setIds.length === 1 && i.setIds[0] === sets[0].listId\n );\n const rightOnlyIntersection = this.data?.intersections.find(\n i => i.setIds.length === 1 && i.setIds[0] === sets[1].listId\n );\n\n // Left only - clickable region\n if (leftOnlyIntersection) {\n this.addClickableLabel(g, positions[0].cx - positions[0].r * 0.3, cy, leftOnlyIntersection);\n }\n\n // Right only - clickable region\n if (rightOnlyIntersection) {\n this.addClickableLabel(g, positions[1].cx + positions[1].r * 0.3, cy, rightOnlyIntersection);\n }\n\n // Intersection - clickable region (center between the two circles)\n if (intersection && intersection.size > 0) {\n this.addClickableLabel(g, width / 2, cy, intersection);\n }\n }\n\n /**\n * Add a clickable label with background for intersection regions\n */\n private addClickableLabel(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n x: number,\n y: number,\n intersection: VennIntersection\n ): void {\n const labelGroup = g.append('g')\n .attr('class', 'intersection-label-group')\n .style('cursor', 'pointer');\n\n // Add background circle/pill for better click target\n const text = intersection.size.toString();\n const padding = 8;\n const fontSize = intersection.setIds.length >= 3 ? 14 : 12;\n const rectWidth = Math.max(text.length * fontSize * 0.7 + padding * 2, 32);\n\n // The rect is the main hover/click target\n const rect = labelGroup.append('rect')\n .attr('x', x - rectWidth / 2)\n .attr('y', y - fontSize / 2 - padding / 2)\n .attr('width', rectWidth)\n .attr('height', fontSize + padding)\n .attr('rx', (fontSize + padding) / 2)\n .attr('ry', (fontSize + padding) / 2)\n .attr('fill', 'rgba(0,0,0,0.6)')\n .attr('class', this.isRegionSelected(intersection) ? 'intersection-region selected' : 'intersection-region');\n\n // Text has pointer-events: none to prevent hover flickering\n labelGroup.append('text')\n .attr('class', 'venn-label')\n .attr('x', x)\n .attr('y', y + fontSize * 0.35)\n .style('font-size', `${fontSize}px`)\n .style('pointer-events', 'none')\n .text(text);\n\n // Attach events to the rect (the main clickable area)\n // Show tooltip for intersection labels with proper event handling to prevent flickering\n rect\n .on('mouseenter', (event: MouseEvent) => {\n event.stopPropagation();\n // Set flag to suppress circle tooltips and prevent their mousemove from calling detectChanges\n this.isHoveringIntersectionLabel = true;\n // Hide any existing tooltip immediately without triggering detectChanges\n this.tooltipVisible = false;\n // Show the label's tooltip\n this.showLabelTooltip(event, intersection);\n })\n .on('mousemove', (event: MouseEvent) => {\n event.stopPropagation();\n // Update tooltip position without calling detectChanges (avoid flicker)\n this.moveLabelTooltipPosition(event);\n })\n .on('mouseleave', (event: MouseEvent) => {\n event.stopPropagation();\n this.isHoveringIntersectionLabel = false;\n this.tooltipVisible = false;\n this.cdr.detectChanges();\n })\n .on('click', (event: MouseEvent) => {\n event.stopPropagation();\n this.onIntersectionClick(intersection);\n });\n }\n\n /**\n * Check if a region is currently selected\n */\n private isRegionSelected(intersection: VennIntersection): boolean {\n if (!this.selectedRegion) return false;\n return this.selectedRegion.setIds.length === intersection.setIds.length &&\n this.selectedRegion.setIds.every(id => intersection.setIds.includes(id));\n }\n\n /**\n * Calculate proportional radii using a small/medium/large approach\n * This avoids extreme size differences (e.g., 1000 vs 10 items)\n */\n private calculateProportionalRadii(\n sets: VennSet[],\n width: number,\n height: number,\n numSets: number\n ): { radii: number[]; baseRadius: number } {\n // Determine base radius based on number of sets\n let baseRadius: number;\n if (numSets === 1) {\n baseRadius = Math.min(width, height) * 0.35;\n } else if (numSets === 2) {\n baseRadius = Math.min(width / 2.5, height / 2) * 0.8;\n } else if (numSets === 3) {\n baseRadius = Math.min(width, height) * 0.28;\n } else {\n const cols = Math.ceil(Math.sqrt(numSets));\n const cellSize = Math.min(width / cols, height / cols);\n baseRadius = cellSize * 0.35;\n }\n\n // Find the size range\n const sizes = sets.map(s => s.size);\n const maxSize = Math.max(...sizes, 1);\n const minSize = Math.min(...sizes, 1);\n\n // If all same size or very close, use same radius\n if (maxSize === minSize || maxSize / minSize < 1.5) {\n return {\n radii: sets.map(() => baseRadius),\n baseRadius\n };\n }\n\n // Use logarithmic scaling with bounds for visual balance\n // Scale factor ranges from 0.7 to 1.0 based on relative size\n const minScale = 0.7;\n const maxScale = 1.0;\n\n const radii = sets.map(set => {\n // Use log scale for smoother visual representation\n const logMin = Math.log(minSize + 1);\n const logMax = Math.log(maxSize + 1);\n const logSize = Math.log(set.size + 1);\n\n // Normalize to 0-1 range\n const normalized = (logSize - logMin) / (logMax - logMin);\n\n // Scale to minScale-maxScale range\n const scale = minScale + normalized * (maxScale - minScale);\n\n return baseRadius * scale;\n });\n\n return { radii, baseRadius };\n }\n\n private renderThreeSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n const cx = width / 2;\n const cy = height / 2;\n\n // Calculate proportional radii based on list sizes\n const { radii, baseRadius } = this.calculateProportionalRadii(sets, width, height, 3);\n const avgRadius = radii.reduce((a, b) => a + b, 0) / radii.length;\n const offset = avgRadius * 0.65; // Distance from center\n\n // Position circles in a triangle with individual radii\n const positions = [\n { cx: cx, cy: cy - offset * 0.8, r: radii[0], set: sets[0] }, // Top\n { cx: cx - offset * 0.9, cy: cy + offset * 0.5, r: radii[1], set: sets[1] }, // Bottom left\n { cx: cx + offset * 0.9, cy: cy + offset * 0.5, r: radii[2], set: sets[2] } // Bottom right\n ];\n\n // Draw circles\n for (const pos of positions) {\n g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', pos.cx)\n .attr('cy', pos.cy)\n .attr('r', pos.r)\n .attr('fill', pos.set.color)\n .attr('opacity', 0.5)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, pos.set.listName, pos.set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(pos.set));\n }\n\n // Draw clickable intersection labels\n for (const intersection of this.data?.intersections || []) {\n const labelPos = this.getIntersectionLabelPosition(intersection, positions, cx, cy, avgRadius);\n if (labelPos && intersection.size > 0) {\n this.addClickableLabel(g, labelPos.x, labelPos.y, intersection);\n }\n }\n }\n\n private getIntersectionLabelPosition(\n intersection: VennIntersection,\n positions: Array<{ cx: number; cy: number; r?: number; set: VennSet }>,\n cx: number,\n cy: number,\n radius: number\n ): { x: number; y: number } | null {\n const n = intersection.setIds.length;\n\n if (n === 1) {\n // Find the single set position\n const pos = positions.find(p => p.set.listId === intersection.setIds[0]);\n if (!pos) return null;\n\n // Use individual radius if available, otherwise use provided radius\n const r = pos.r || radius;\n\n // Move label towards the outer edge, away from center\n const dx = pos.cx - cx;\n const dy = pos.cy - cy;\n const dist = Math.sqrt(dx * dx + dy * dy);\n const offsetFactor = 0.6;\n\n return {\n x: pos.cx + (dx / dist) * r * offsetFactor,\n y: pos.cy + (dy / dist) * r * offsetFactor\n };\n } else if (n === 2) {\n // Average of two positions\n const pos1 = positions.find(p => p.set.listId === intersection.setIds[0]);\n const pos2 = positions.find(p => p.set.listId === intersection.setIds[1]);\n if (!pos1 || !pos2) return null;\n\n return {\n x: (pos1.cx + pos2.cx) / 2,\n y: (pos1.cy + pos2.cy) / 2\n };\n } else if (n === 3) {\n // Center of all three\n return { x: cx, y: cy };\n }\n\n return null;\n }\n\n /**\n * Render a 4-set Venn diagram using overlapping ellipses.\n * This is a simplified approach - true 4-set Venn diagrams use complex curves.\n * We use two pairs of rotated ellipses to create all 15 possible regions.\n */\n private renderFourSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n const cx = width / 2;\n const cy = height / 2;\n\n // Use ellipses for 4-set Venn\n const baseSize = Math.min(width, height) * 0.35;\n const rx = baseSize * 1.2; // Ellipse horizontal radius\n const ry = baseSize * 0.7; // Ellipse vertical radius\n\n // Position ellipses with rotations to create overlapping regions\n // Two ellipses rotated ~45 degrees and two rotated ~-45 degrees\n const positions = [\n { cx: cx - baseSize * 0.3, cy: cy - baseSize * 0.15, rx, ry, rotation: 45, set: sets[0] },\n { cx: cx + baseSize * 0.3, cy: cy - baseSize * 0.15, rx, ry, rotation: -45, set: sets[1] },\n { cx: cx - baseSize * 0.3, cy: cy + baseSize * 0.15, rx, ry, rotation: -45, set: sets[2] },\n { cx: cx + baseSize * 0.3, cy: cy + baseSize * 0.15, rx, ry, rotation: 45, set: sets[3] }\n ];\n\n // Draw ellipses\n for (const pos of positions) {\n g.append('ellipse')\n .attr('class', 'venn-circle')\n .attr('cx', pos.cx)\n .attr('cy', pos.cy)\n .attr('rx', pos.rx)\n .attr('ry', pos.ry)\n .attr('transform', `rotate(${pos.rotation}, ${pos.cx}, ${pos.cy})`)\n .attr('fill', pos.set.color)\n .attr('opacity', 0.4)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, pos.set.listName, pos.set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(pos.set));\n }\n\n // Draw clickable intersection labels\n // For 4 sets, we need to calculate positions for all 15 regions\n for (const intersection of this.data?.intersections || []) {\n const labelPos = this.getFourSetIntersectionPosition(intersection, positions, cx, cy, baseSize);\n if (labelPos && intersection.size > 0) {\n this.addClickableLabel(g, labelPos.x, labelPos.y, intersection);\n }\n }\n }\n\n /**\n * Calculate label position for 4-set Venn intersections\n */\n private getFourSetIntersectionPosition(\n intersection: VennIntersection,\n positions: Array<{ cx: number; cy: number; set: VennSet }>,\n cx: number,\n cy: number,\n baseSize: number\n ): { x: number; y: number } | null {\n const n = intersection.setIds.length;\n const setIndices = intersection.setIds.map(id =>\n positions.findIndex(p => p.set.listId === id)\n ).filter(i => i >= 0);\n\n if (setIndices.length !== n) return null;\n\n if (n === 1) {\n // Single set - position at outer edge\n const pos = positions[setIndices[0]];\n const dx = pos.cx - cx;\n const dy = pos.cy - cy;\n const dist = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: pos.cx + (dx / dist) * baseSize * 0.6,\n y: pos.cy + (dy / dist) * baseSize * 0.6\n };\n } else if (n === 2) {\n // Two sets - average position, offset from center\n const pos1 = positions[setIndices[0]];\n const pos2 = positions[setIndices[1]];\n const avgX = (pos1.cx + pos2.cx) / 2;\n const avgY = (pos1.cy + pos2.cy) / 2;\n // Offset slightly from the center\n const dx = avgX - cx;\n const dy = avgY - cy;\n const dist = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: avgX + (dx / dist) * baseSize * 0.2,\n y: avgY + (dy / dist) * baseSize * 0.2\n };\n } else if (n === 3) {\n // Three sets - find the set NOT in the intersection\n const missingIndex = [0, 1, 2, 3].find(i => !setIndices.includes(i));\n if (missingIndex === undefined) return { x: cx, y: cy };\n\n // Position opposite to the missing set\n const missingPos = positions[missingIndex];\n const dx = cx - missingPos.cx;\n const dy = cy - missingPos.cy;\n const dist = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: cx + (dx / dist) * baseSize * 0.25,\n y: cy + (dy / dist) * baseSize * 0.25\n };\n } else if (n === 4) {\n // All four sets - center\n return { x: cx, y: cy };\n }\n\n return null;\n }\n\n private renderMultipleSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n // For more than 3 sets, use a grid layout\n const cols = Math.ceil(Math.sqrt(sets.length));\n const rows = Math.ceil(sets.length / cols);\n const cellWidth = width / cols;\n const cellHeight = height / rows;\n const radius = Math.min(cellWidth, cellHeight) * 0.35;\n\n sets.forEach((set, i) => {\n const col = i % cols;\n const row = Math.floor(i / cols);\n const cx = cellWidth * col + cellWidth / 2;\n const cy = cellHeight * row + cellHeight / 2;\n\n g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', cx)\n .attr('cy', cy)\n .attr('r', radius)\n .attr('fill', set.color)\n .attr('opacity', 0.6)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, set.listName, set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(set));\n\n g.append('text')\n .attr('class', 'venn-label')\n .attr('x', cx)\n .attr('y', cy)\n .text(set.size.toString());\n\n // Add list name below\n g.append('text')\n .attr('x', cx)\n .attr('y', cy + radius + 16)\n .attr('text-anchor', 'middle')\n .attr('fill', 'var(--mj-text-secondary)')\n .attr('font-size', '11px')\n .text(set.listName.length > 15 ? set.listName.substring(0, 15) + '...' : set.listName);\n });\n }\n\n /**\n * Show tooltip for circle/ellipse elements.\n * This is suppressed when hovering an intersection label.\n */\n private showCircleTooltip(event: MouseEvent, title: string, count: number): void {\n // Don't show circle tooltip if hovering an intersection label\n if (this.isHoveringIntersectionLabel) {\n return;\n }\n this.showTooltip(event, title, count);\n }\n\n private showTooltip(event: MouseEvent, title: string, count: number): void {\n this.tooltipTitle = title;\n this.tooltipCount = count;\n this.tooltipVisible = true;\n this.moveTooltip(event);\n this.cdr.detectChanges();\n }\n\n private moveTooltip(event: MouseEvent): void {\n // Skip updating if hovering an intersection label (prevents flicker from circle mousemove events)\n if (this.isHoveringIntersectionLabel) {\n return;\n }\n\n const container = this.containerRef?.nativeElement;\n if (!container) return;\n\n const rect = container.getBoundingClientRect();\n this.tooltipX = event.clientX - rect.left + 10;\n this.tooltipY = event.clientY - rect.top - 30;\n this.cdr.detectChanges();\n }\n\n /**\n * Show tooltip for intersection label with proper intersection name\n */\n private showLabelTooltip(event: MouseEvent, intersection: VennIntersection): void {\n // Build the tooltip title from the intersection\n const setNames = intersection.setIds.map(id => {\n const set = this.data?.sets.find(s => s.listId === id);\n return set?.listName || 'Unknown';\n });\n\n if (intersection.setIds.length === 1) {\n this.tooltipTitle = `Only in ${setNames[0]}`;\n } else {\n this.tooltipTitle = setNames.join(' ∩ ');\n }\n this.tooltipCount = intersection.size;\n this.tooltipVisible = true;\n this.moveLabelTooltipPosition(event);\n this.cdr.detectChanges();\n }\n\n /**\n * Update tooltip position for label without triggering extra change detection\n */\n private moveLabelTooltipPosition(event: MouseEvent): void {\n const container = this.containerRef?.nativeElement;\n if (!container) return;\n\n const rect = container.getBoundingClientRect();\n this.tooltipX = event.clientX - rect.left + 10;\n this.tooltipY = event.clientY - rect.top - 30;\n // Don't call detectChanges here - we call it once in showLabelTooltip\n // and the Angular zone will handle the position updates\n }\n\n private hideTooltip(): void {\n // Don't hide tooltip if we're hovering an intersection label\n if (this.isHoveringIntersectionLabel) {\n return;\n }\n this.tooltipVisible = false;\n this.cdr.detectChanges();\n }\n\n private onCircleClick(set: VennSet): void {\n // Find the \"only in this set\" intersection\n const intersection = this.data?.intersections.find(\n i => i.setIds.length === 1 && i.setIds[0] === set.listId\n );\n\n if (intersection) {\n this.regionClick.emit({\n intersection,\n recordIds: intersection.recordIds\n });\n }\n }\n\n private onIntersectionClick(intersection: VennIntersection): void {\n this.regionClick.emit({\n intersection,\n recordIds: intersection.recordIds\n });\n }\n}\n"]}
1
+ {"version":3,"file":"venn-diagram.component.js","sourceRoot":"","sources":["../../../../src/Lists/components/venn-diagram/venn-diagram.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAEZ,SAAS,EAMV,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;;;;;IAuCb,8BAAyB;IACvB,0BAAqE;IAEnE,AADF,+BAAyB,eACG;IAAA,YAAkB;IAAA,iBAAO;IACnD,gCAA2B;IAAA,YAAoB;IAEnD,AADE,AADiD,iBAAO,EAClD,EACF;;;IALsB,cAAoC;IAApC,gDAAoC;IAElC,eAAkB;IAAlB,qCAAkB;IACjB,eAAoB;IAApB,gDAAoB;;;IANvD,8BAAyB;IACvB,uHAQC;IACH,iBAAM;;;IATJ,cAQC;IARD,+BAQC;;;IAMH,8BAAyB;IACvB,wBAA2C;IAC3C,yBAAG;IAAA,qDAAqC;IAC1C,AAD0C,iBAAI,EACxC;;AA5Cd;;;;;;;;;GASG;AAmMH,MAAM,OAAO,oBAAoB;IAyBX;IAxBQ,YAAY,CAA8B;IAChD,MAAM,CAA6B;IAEhD,IAAI,GAAoB,IAAI,CAAC;IAC7B,cAAc,GAA4B,IAAI,CAAC;IAE9C,WAAW,GAAG,IAAI,YAAY,EAAwB,CAAC;IACvD,WAAW,GAAG,IAAI,YAAY,EAA2B,CAAC;IAEpE,gBAAgB;IAChB,cAAc,GAAG,KAAK,CAAC;IACvB,QAAQ,GAAG,CAAC,CAAC;IACb,QAAQ,GAAG,CAAC,CAAC;IACb,YAAY,GAAG,EAAE,CAAC;IAClB,YAAY,GAAG,CAAC,CAAC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;YACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACpB,YAAY;gBACZ,SAAS,EAAE,YAAY,CAAC,SAAS;aAClC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEO,mBAAmB,CAAC,YAA8B;QACxD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YACpB,YAAY;YACZ,SAAS,EAAE,YAAY,CAAC,SAAS;SAClC,CAAC,CAAC;IACL,CAAC;8GA1tBU,oBAAoB;6DAApB,oBAAoB;;;;;;;YA9L7B,iCAA2C;;YACzC,4BAAqC;;YAKnC,AAFF,8BACuD,aAC1B;YAAA,YAAkB;YAAA,iBAAM;YACnD,8BAA2B;YAAA,YAA0B;YACvD,AADuD,iBAAM,EACvD;YAGN,sFAAoC;YAepC,wFAAuC;YAMzC,iBAAM;;YA3BF,eAA0B;YAAC,AAA3B,0CAA0B,2BAA0B;YAD5B,6CAAgC;YAE7B,eAAkB;YAAlB,sCAAkB;YAClB,eAA0B;YAA1B,uDAA0B;YAIvD,cAYC;YAZD,+DAYC;YAGD,cAKC;YALD,mEAKC;;;iFA+JM,oBAAoB;cAlMhC,SAAS;6BACI,KAAK,YACP,iBAAiB,YACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkCP;;kBA8JF,SAAS;mBAAC,eAAe;;kBACzB,SAAS;mBAAC,SAAS;;kBAEnB,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kFARI,oBAAoB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ViewChild,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n OnDestroy,\n ChangeDetectorRef\n} from '@angular/core';\nimport * as d3 from 'd3';\nimport { VennData, VennSet, VennIntersection } from '../../services/list-set-operations.service';\n\n/**\n * Event emitted when a Venn region is clicked\n */\nexport interface VennRegionClickEvent {\n intersection: VennIntersection;\n recordIds: string[];\n}\n\n/**\n * Interactive D3-based Venn diagram component for visualizing list overlaps.\n *\n * Features:\n * - Proportional circle sizing based on list size\n * - Animated transitions\n * - Hover highlighting\n * - Click to select regions\n * - Responsive sizing\n */\n@Component({\n standalone: false,\n selector: 'mj-venn-diagram',\n template: `\n <div class=\"venn-container\" #vennContainer>\n <svg #vennSvg class=\"venn-svg\"></svg>\n \n <!-- Tooltip -->\n <div class=\"venn-tooltip\" [class.visible]=\"tooltipVisible\"\n [style.left.px]=\"tooltipX\" [style.top.px]=\"tooltipY\">\n <div class=\"tooltip-title\">{{ tooltipTitle }}</div>\n <div class=\"tooltip-count\">{{ tooltipCount }} records</div>\n </div>\n \n <!-- Legend -->\n @if (data && data.sets.length > 0) {\n <div class=\"venn-legend\">\n @for (set of data.sets; track set) {\n <div class=\"legend-item\">\n <div class=\"legend-color\" [style.background-color]=\"set.color\"></div>\n <div class=\"legend-info\">\n <span class=\"legend-name\">{{ set.listName }}</span>\n <span class=\"legend-count\">{{ set.size }} items</span>\n </div>\n </div>\n }\n </div>\n }\n \n <!-- Empty state -->\n @if (!data || data.sets.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-diagram-project\"></i>\n <p>Add lists to visualize their overlaps</p>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .venn-container {\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 300px;\n background: linear-gradient(135deg, var(--mj-bg-surface-sunken) 0%, var(--mj-bg-surface-card) 100%);\n border-radius: 8px;\n overflow: hidden;\n }\n\n .venn-svg {\n width: 100%;\n height: 100%;\n }\n\n .venn-tooltip {\n position: absolute;\n background: rgba(0, 0, 0, 0.85);\n color: white;\n padding: 8px 12px;\n border-radius: 6px;\n font-size: 13px;\n pointer-events: none;\n opacity: 0;\n transform: translateY(8px);\n transition: opacity 0.15s, transform 0.15s;\n z-index: 100;\n white-space: nowrap;\n }\n\n .venn-tooltip.visible {\n opacity: 1;\n transform: translateY(0);\n }\n\n .tooltip-title {\n font-weight: 600;\n margin-bottom: 2px;\n }\n\n .tooltip-count {\n color: rgba(255, 255, 255, 0.8);\n font-size: 12px;\n }\n\n .venn-legend {\n position: absolute;\n bottom: 16px;\n left: 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--mj-bg-surface-card);\n padding: 12px;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n }\n\n .legend-item {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .legend-color {\n width: 16px;\n height: 16px;\n border-radius: 4px;\n flex-shrink: 0;\n }\n\n .legend-info {\n display: flex;\n flex-direction: column;\n }\n\n .legend-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .legend-count {\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n\n .empty-state {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n color: var(--mj-text-muted);\n }\n\n .empty-state i {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.5;\n }\n\n .empty-state p {\n font-size: 14px;\n margin: 0;\n }\n\n /* SVG styles */\n :host ::ng-deep .venn-circle {\n cursor: pointer;\n transition: opacity 0.2s;\n }\n\n :host ::ng-deep .venn-circle:hover {\n opacity: 0.9;\n }\n\n :host ::ng-deep .venn-label {\n font-size: 12px;\n font-weight: 600;\n fill: white;\n text-anchor: middle;\n pointer-events: none;\n }\n\n :host ::ng-deep .intersection-region {\n cursor: pointer;\n transition: all 0.2s;\n }\n\n :host ::ng-deep .intersection-region:hover {\n fill: rgba(0,0,0,0.75);\n }\n\n :host ::ng-deep .intersection-region.selected {\n fill: rgba(156, 39, 176, 0.9);\n stroke: #7B1FA2;\n stroke-width: 2;\n }\n\n :host ::ng-deep .intersection-label-group {\n transition: transform 0.15s ease;\n }\n\n :host ::ng-deep .intersection-label-group:hover {\n transform: scale(1.05);\n }\n `]\n})\nexport class VennDiagramComponent implements AfterViewInit, OnChanges, OnDestroy {\n @ViewChild('vennContainer') containerRef!: ElementRef<HTMLDivElement>;\n @ViewChild('vennSvg') svgRef!: ElementRef<SVGSVGElement>;\n\n @Input() data: VennData | null = null;\n @Input() selectedRegion: VennIntersection | null = null;\n\n @Output() regionClick = new EventEmitter<VennRegionClickEvent>();\n @Output() regionHover = new EventEmitter<VennIntersection | null>();\n\n // Tooltip state\n tooltipVisible = false;\n tooltipX = 0;\n tooltipY = 0;\n tooltipTitle = '';\n tooltipCount = 0;\n\n // Track if hovering an intersection label (to suppress circle tooltips)\n private isHoveringIntersectionLabel = false;\n\n private svg: d3.Selection<SVGSVGElement, unknown, null, undefined> | null = null;\n private resizeObserver: ResizeObserver | null = null;\n private width = 0;\n private height = 0;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n /**\n * Apply the view-vs-list visual distinction to a circle selection: views\n * get a dashed colored stroke; lists get nothing extra (fill-only).\n * Centralized here so all 5 circle-drawing sites stay consistent.\n */\n private applyOperandStyle<TElement extends SVGElement>(\n selection: d3.Selection<TElement, unknown, null, undefined>,\n set: VennSet,\n ): void {\n if (set.kind === 'view') {\n selection\n .attr('stroke', set.color)\n .attr('stroke-width', 3)\n .attr('stroke-dasharray', '6 4');\n }\n }\n\n ngAfterViewInit(): void {\n this.initializeSvg();\n this.setupResizeObserver();\n this.render();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes['data'] || changes['selectedRegion']) && this.svg) {\n this.render();\n }\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n private initializeSvg(): void {\n if (!this.svgRef) return;\n\n this.svg = d3.select(this.svgRef.nativeElement);\n this.updateDimensions();\n }\n\n private setupResizeObserver(): void {\n if (!this.containerRef) return;\n\n this.resizeObserver = new ResizeObserver(() => {\n this.updateDimensions();\n this.render();\n });\n\n this.resizeObserver.observe(this.containerRef.nativeElement);\n }\n\n private updateDimensions(): void {\n if (!this.containerRef) return;\n\n const rect = this.containerRef.nativeElement.getBoundingClientRect();\n this.width = rect.width;\n this.height = rect.height;\n }\n\n private render(): void {\n if (!this.svg || !this.data || this.data.sets.length === 0) {\n if (this.svg) {\n this.svg.selectAll('*').remove();\n }\n return;\n }\n\n // Clear previous content\n this.svg.selectAll('*').remove();\n\n const margin = { top: 40, right: 40, bottom: 80, left: 40 };\n const drawWidth = this.width - margin.left - margin.right;\n const drawHeight = this.height - margin.top - margin.bottom;\n\n if (drawWidth <= 0 || drawHeight <= 0) return;\n\n const g = this.svg\n .append('g')\n .attr('transform', `translate(${margin.left}, ${margin.top})`);\n\n // Render based on number of sets\n const sets = this.data.sets;\n\n if (sets.length === 1) {\n this.renderSingleSet(g, sets[0], drawWidth, drawHeight);\n } else if (sets.length === 2) {\n this.renderTwoSets(g, sets, drawWidth, drawHeight);\n } else if (sets.length === 3) {\n this.renderThreeSets(g, sets, drawWidth, drawHeight);\n } else if (sets.length === 4) {\n this.renderFourSets(g, sets, drawWidth, drawHeight);\n } else {\n this.renderMultipleSets(g, sets, drawWidth, drawHeight);\n }\n }\n\n private renderSingleSet(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n set: VennSet,\n width: number,\n height: number\n ): void {\n const cx = width / 2;\n const cy = height / 2;\n const radius = Math.min(width, height) * 0.35;\n\n // Draw circle\n const circle = g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', cx)\n .attr('cy', cy)\n .attr('r', radius)\n .attr('fill', set.color)\n .attr('opacity', 0.6)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, set.listName, set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(set));\n this.applyOperandStyle(circle, set);\n\n // Draw label\n g.append('text')\n .attr('class', 'venn-label')\n .attr('x', cx)\n .attr('y', cy)\n .text(set.size.toString());\n }\n\n private renderTwoSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n const cy = height / 2;\n\n // Calculate proportional radii based on list sizes\n const { radii, baseRadius } = this.calculateProportionalRadii(sets, width, height, 2);\n const r1 = radii[0];\n const r2 = radii[1];\n\n // Size the overlap by the **actual** intersection count, not a fixed\n // fraction. Otherwise the diagram lies: it always draws the circles\n // overlapping even when the lists share zero records, leading users\n // to expect a non-zero intersection that the math correctly returns\n // as 0. Math: as fraction of (r1+r2)/2, scale by share of records\n // common to both sets vs. the smaller set's size. Clamped so even\n // big intersections don't make one circle swallow the other.\n const intersectionSize = this.data?.intersections.find(\n i => i.setIds.length === 2 && i.setIds.includes(sets[0].listId) && i.setIds.includes(sets[1].listId)\n )?.size ?? 0;\n const smallerSize = Math.min(sets[0].size, sets[1].size);\n const overlapFraction = smallerSize > 0 ? Math.min(0.85, intersectionSize / smallerSize) : 0;\n const avgRadius = (r1 + r2) / 2;\n // Visual gap when truly disjoint, so users can see \"no overlap = no shared records\".\n const overlap = intersectionSize > 0 ? avgRadius * Math.max(0.1, overlapFraction * 0.7) : -avgRadius * 0.15;\n\n const positions = [\n { cx: width / 2 - r1 + overlap / 2, r: r1, set: sets[0] },\n { cx: width / 2 + r2 - overlap / 2, r: r2, set: sets[1] }\n ];\n\n // Draw circles\n for (const pos of positions) {\n const circle = g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', pos.cx)\n .attr('cy', cy)\n .attr('r', pos.r)\n .attr('fill', pos.set.color)\n .attr('opacity', 0.5)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, pos.set.listName, pos.set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(pos.set));\n this.applyOperandStyle(circle, pos.set);\n }\n\n // Find intersection data\n const intersection = this.data?.intersections.find(\n i => i.setIds.length === 2 && i.setIds.includes(sets[0].listId) && i.setIds.includes(sets[1].listId)\n );\n\n // Draw intersection labels\n const leftOnlyIntersection = this.data?.intersections.find(\n i => i.setIds.length === 1 && i.setIds[0] === sets[0].listId\n );\n const rightOnlyIntersection = this.data?.intersections.find(\n i => i.setIds.length === 1 && i.setIds[0] === sets[1].listId\n );\n\n // Left only - clickable region\n if (leftOnlyIntersection) {\n this.addClickableLabel(g, positions[0].cx - positions[0].r * 0.3, cy, leftOnlyIntersection);\n }\n\n // Right only - clickable region\n if (rightOnlyIntersection) {\n this.addClickableLabel(g, positions[1].cx + positions[1].r * 0.3, cy, rightOnlyIntersection);\n }\n\n // Intersection - clickable region (center between the two circles)\n if (intersection && intersection.size > 0) {\n this.addClickableLabel(g, width / 2, cy, intersection);\n }\n }\n\n /**\n * Add a clickable label with background for intersection regions\n */\n private addClickableLabel(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n x: number,\n y: number,\n intersection: VennIntersection\n ): void {\n const labelGroup = g.append('g')\n .attr('class', 'intersection-label-group')\n .style('cursor', 'pointer');\n\n // Add background circle/pill for better click target\n const text = intersection.size.toString();\n const padding = 8;\n const fontSize = intersection.setIds.length >= 3 ? 14 : 12;\n const rectWidth = Math.max(text.length * fontSize * 0.7 + padding * 2, 32);\n\n // The rect is the main hover/click target\n const rect = labelGroup.append('rect')\n .attr('x', x - rectWidth / 2)\n .attr('y', y - fontSize / 2 - padding / 2)\n .attr('width', rectWidth)\n .attr('height', fontSize + padding)\n .attr('rx', (fontSize + padding) / 2)\n .attr('ry', (fontSize + padding) / 2)\n .attr('fill', 'rgba(0,0,0,0.6)')\n .attr('class', this.isRegionSelected(intersection) ? 'intersection-region selected' : 'intersection-region');\n\n // Text has pointer-events: none to prevent hover flickering\n labelGroup.append('text')\n .attr('class', 'venn-label')\n .attr('x', x)\n .attr('y', y + fontSize * 0.35)\n .style('font-size', `${fontSize}px`)\n .style('pointer-events', 'none')\n .text(text);\n\n // Attach events to the rect (the main clickable area)\n // Show tooltip for intersection labels with proper event handling to prevent flickering\n rect\n .on('mouseenter', (event: MouseEvent) => {\n event.stopPropagation();\n // Set flag to suppress circle tooltips and prevent their mousemove from calling detectChanges\n this.isHoveringIntersectionLabel = true;\n // Hide any existing tooltip immediately without triggering detectChanges\n this.tooltipVisible = false;\n // Show the label's tooltip\n this.showLabelTooltip(event, intersection);\n })\n .on('mousemove', (event: MouseEvent) => {\n event.stopPropagation();\n // Update tooltip position without calling detectChanges (avoid flicker)\n this.moveLabelTooltipPosition(event);\n })\n .on('mouseleave', (event: MouseEvent) => {\n event.stopPropagation();\n this.isHoveringIntersectionLabel = false;\n this.tooltipVisible = false;\n this.cdr.detectChanges();\n })\n .on('click', (event: MouseEvent) => {\n event.stopPropagation();\n this.onIntersectionClick(intersection);\n });\n }\n\n /**\n * Check if a region is currently selected\n */\n private isRegionSelected(intersection: VennIntersection): boolean {\n if (!this.selectedRegion) return false;\n return this.selectedRegion.setIds.length === intersection.setIds.length &&\n this.selectedRegion.setIds.every(id => intersection.setIds.includes(id));\n }\n\n /**\n * Calculate proportional radii using a small/medium/large approach\n * This avoids extreme size differences (e.g., 1000 vs 10 items)\n */\n private calculateProportionalRadii(\n sets: VennSet[],\n width: number,\n height: number,\n numSets: number\n ): { radii: number[]; baseRadius: number } {\n // Determine base radius based on number of sets\n let baseRadius: number;\n if (numSets === 1) {\n baseRadius = Math.min(width, height) * 0.35;\n } else if (numSets === 2) {\n baseRadius = Math.min(width / 2.5, height / 2) * 0.8;\n } else if (numSets === 3) {\n baseRadius = Math.min(width, height) * 0.28;\n } else {\n const cols = Math.ceil(Math.sqrt(numSets));\n const cellSize = Math.min(width / cols, height / cols);\n baseRadius = cellSize * 0.35;\n }\n\n // Find the size range\n const sizes = sets.map(s => s.size);\n const maxSize = Math.max(...sizes, 1);\n const minSize = Math.min(...sizes, 1);\n\n // If all same size or very close, use same radius\n if (maxSize === minSize || maxSize / minSize < 1.5) {\n return {\n radii: sets.map(() => baseRadius),\n baseRadius\n };\n }\n\n // Use logarithmic scaling with bounds for visual balance\n // Scale factor ranges from 0.7 to 1.0 based on relative size\n const minScale = 0.7;\n const maxScale = 1.0;\n\n const radii = sets.map(set => {\n // Use log scale for smoother visual representation\n const logMin = Math.log(minSize + 1);\n const logMax = Math.log(maxSize + 1);\n const logSize = Math.log(set.size + 1);\n\n // Normalize to 0-1 range\n const normalized = (logSize - logMin) / (logMax - logMin);\n\n // Scale to minScale-maxScale range\n const scale = minScale + normalized * (maxScale - minScale);\n\n return baseRadius * scale;\n });\n\n return { radii, baseRadius };\n }\n\n private renderThreeSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n const cx = width / 2;\n const cy = height / 2;\n\n // Calculate proportional radii based on list sizes\n const { radii, baseRadius } = this.calculateProportionalRadii(sets, width, height, 3);\n const avgRadius = radii.reduce((a, b) => a + b, 0) / radii.length;\n const offset = avgRadius * 0.65; // Distance from center\n\n // Position circles in a triangle with individual radii\n const positions = [\n { cx: cx, cy: cy - offset * 0.8, r: radii[0], set: sets[0] }, // Top\n { cx: cx - offset * 0.9, cy: cy + offset * 0.5, r: radii[1], set: sets[1] }, // Bottom left\n { cx: cx + offset * 0.9, cy: cy + offset * 0.5, r: radii[2], set: sets[2] } // Bottom right\n ];\n\n // Draw circles\n for (const pos of positions) {\n const circle = g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', pos.cx)\n .attr('cy', pos.cy)\n .attr('r', pos.r)\n .attr('fill', pos.set.color)\n .attr('opacity', 0.5)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, pos.set.listName, pos.set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(pos.set));\n this.applyOperandStyle(circle, pos.set);\n }\n\n // Draw clickable intersection labels\n for (const intersection of this.data?.intersections || []) {\n const labelPos = this.getIntersectionLabelPosition(intersection, positions, cx, cy, avgRadius);\n if (labelPos && intersection.size > 0) {\n this.addClickableLabel(g, labelPos.x, labelPos.y, intersection);\n }\n }\n }\n\n private getIntersectionLabelPosition(\n intersection: VennIntersection,\n positions: Array<{ cx: number; cy: number; r?: number; set: VennSet }>,\n cx: number,\n cy: number,\n radius: number\n ): { x: number; y: number } | null {\n const n = intersection.setIds.length;\n\n if (n === 1) {\n // Find the single set position\n const pos = positions.find(p => p.set.listId === intersection.setIds[0]);\n if (!pos) return null;\n\n // Use individual radius if available, otherwise use provided radius\n const r = pos.r || radius;\n\n // Move label towards the outer edge, away from center\n const dx = pos.cx - cx;\n const dy = pos.cy - cy;\n const dist = Math.sqrt(dx * dx + dy * dy);\n const offsetFactor = 0.6;\n\n return {\n x: pos.cx + (dx / dist) * r * offsetFactor,\n y: pos.cy + (dy / dist) * r * offsetFactor\n };\n } else if (n === 2) {\n // Average of two positions\n const pos1 = positions.find(p => p.set.listId === intersection.setIds[0]);\n const pos2 = positions.find(p => p.set.listId === intersection.setIds[1]);\n if (!pos1 || !pos2) return null;\n\n return {\n x: (pos1.cx + pos2.cx) / 2,\n y: (pos1.cy + pos2.cy) / 2\n };\n } else if (n === 3) {\n // Center of all three\n return { x: cx, y: cy };\n }\n\n return null;\n }\n\n /**\n * Render a 4-set Venn diagram using overlapping ellipses.\n * This is a simplified approach - true 4-set Venn diagrams use complex curves.\n * We use two pairs of rotated ellipses to create all 15 possible regions.\n */\n private renderFourSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n const cx = width / 2;\n const cy = height / 2;\n\n // Use ellipses for 4-set Venn\n const baseSize = Math.min(width, height) * 0.35;\n const rx = baseSize * 1.2; // Ellipse horizontal radius\n const ry = baseSize * 0.7; // Ellipse vertical radius\n\n // Position ellipses with rotations to create overlapping regions\n // Two ellipses rotated ~45 degrees and two rotated ~-45 degrees\n const positions = [\n { cx: cx - baseSize * 0.3, cy: cy - baseSize * 0.15, rx, ry, rotation: 45, set: sets[0] },\n { cx: cx + baseSize * 0.3, cy: cy - baseSize * 0.15, rx, ry, rotation: -45, set: sets[1] },\n { cx: cx - baseSize * 0.3, cy: cy + baseSize * 0.15, rx, ry, rotation: -45, set: sets[2] },\n { cx: cx + baseSize * 0.3, cy: cy + baseSize * 0.15, rx, ry, rotation: 45, set: sets[3] }\n ];\n\n // Draw ellipses\n for (const pos of positions) {\n const ellipse = g.append('ellipse')\n .attr('class', 'venn-circle')\n .attr('cx', pos.cx)\n .attr('cy', pos.cy)\n .attr('rx', pos.rx)\n .attr('ry', pos.ry)\n .attr('transform', `rotate(${pos.rotation}, ${pos.cx}, ${pos.cy})`)\n .attr('fill', pos.set.color)\n .attr('opacity', 0.4)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, pos.set.listName, pos.set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(pos.set));\n this.applyOperandStyle(ellipse, pos.set);\n }\n\n // Draw clickable intersection labels\n // For 4 sets, we need to calculate positions for all 15 regions\n for (const intersection of this.data?.intersections || []) {\n const labelPos = this.getFourSetIntersectionPosition(intersection, positions, cx, cy, baseSize);\n if (labelPos && intersection.size > 0) {\n this.addClickableLabel(g, labelPos.x, labelPos.y, intersection);\n }\n }\n }\n\n /**\n * Calculate label position for 4-set Venn intersections\n */\n private getFourSetIntersectionPosition(\n intersection: VennIntersection,\n positions: Array<{ cx: number; cy: number; set: VennSet }>,\n cx: number,\n cy: number,\n baseSize: number\n ): { x: number; y: number } | null {\n const n = intersection.setIds.length;\n const setIndices = intersection.setIds.map(id =>\n positions.findIndex(p => p.set.listId === id)\n ).filter(i => i >= 0);\n\n if (setIndices.length !== n) return null;\n\n if (n === 1) {\n // Single set - position at outer edge\n const pos = positions[setIndices[0]];\n const dx = pos.cx - cx;\n const dy = pos.cy - cy;\n const dist = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: pos.cx + (dx / dist) * baseSize * 0.6,\n y: pos.cy + (dy / dist) * baseSize * 0.6\n };\n } else if (n === 2) {\n // Two sets - average position, offset from center\n const pos1 = positions[setIndices[0]];\n const pos2 = positions[setIndices[1]];\n const avgX = (pos1.cx + pos2.cx) / 2;\n const avgY = (pos1.cy + pos2.cy) / 2;\n // Offset slightly from the center\n const dx = avgX - cx;\n const dy = avgY - cy;\n const dist = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: avgX + (dx / dist) * baseSize * 0.2,\n y: avgY + (dy / dist) * baseSize * 0.2\n };\n } else if (n === 3) {\n // Three sets - find the set NOT in the intersection\n const missingIndex = [0, 1, 2, 3].find(i => !setIndices.includes(i));\n if (missingIndex === undefined) return { x: cx, y: cy };\n\n // Position opposite to the missing set\n const missingPos = positions[missingIndex];\n const dx = cx - missingPos.cx;\n const dy = cy - missingPos.cy;\n const dist = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: cx + (dx / dist) * baseSize * 0.25,\n y: cy + (dy / dist) * baseSize * 0.25\n };\n } else if (n === 4) {\n // All four sets - center\n return { x: cx, y: cy };\n }\n\n return null;\n }\n\n private renderMultipleSets(\n g: d3.Selection<SVGGElement, unknown, null, undefined>,\n sets: VennSet[],\n width: number,\n height: number\n ): void {\n // For more than 3 sets, use a grid layout\n const cols = Math.ceil(Math.sqrt(sets.length));\n const rows = Math.ceil(sets.length / cols);\n const cellWidth = width / cols;\n const cellHeight = height / rows;\n const radius = Math.min(cellWidth, cellHeight) * 0.35;\n\n sets.forEach((set, i) => {\n const col = i % cols;\n const row = Math.floor(i / cols);\n const cx = cellWidth * col + cellWidth / 2;\n const cy = cellHeight * row + cellHeight / 2;\n\n const circle = g.append('circle')\n .attr('class', 'venn-circle')\n .attr('cx', cx)\n .attr('cy', cy)\n .attr('r', radius)\n .attr('fill', set.color)\n .attr('opacity', 0.6)\n .on('mouseenter', (event: MouseEvent) => this.showCircleTooltip(event, set.listName, set.size))\n .on('mousemove', (event: MouseEvent) => this.moveTooltip(event))\n .on('mouseleave', () => this.hideTooltip())\n .on('click', () => this.onCircleClick(set));\n this.applyOperandStyle(circle, set);\n\n g.append('text')\n .attr('class', 'venn-label')\n .attr('x', cx)\n .attr('y', cy)\n .text(set.size.toString());\n\n // Add list name below\n g.append('text')\n .attr('x', cx)\n .attr('y', cy + radius + 16)\n .attr('text-anchor', 'middle')\n .attr('fill', 'var(--mj-text-secondary)')\n .attr('font-size', '11px')\n .text(set.listName.length > 15 ? set.listName.substring(0, 15) + '...' : set.listName);\n });\n }\n\n /**\n * Show tooltip for circle/ellipse elements.\n * This is suppressed when hovering an intersection label.\n */\n private showCircleTooltip(event: MouseEvent, title: string, count: number): void {\n // Don't show circle tooltip if hovering an intersection label\n if (this.isHoveringIntersectionLabel) {\n return;\n }\n this.showTooltip(event, title, count);\n }\n\n private showTooltip(event: MouseEvent, title: string, count: number): void {\n this.tooltipTitle = title;\n this.tooltipCount = count;\n this.tooltipVisible = true;\n this.moveTooltip(event);\n this.cdr.detectChanges();\n }\n\n private moveTooltip(event: MouseEvent): void {\n // Skip updating if hovering an intersection label (prevents flicker from circle mousemove events)\n if (this.isHoveringIntersectionLabel) {\n return;\n }\n\n const container = this.containerRef?.nativeElement;\n if (!container) return;\n\n const rect = container.getBoundingClientRect();\n this.tooltipX = event.clientX - rect.left + 10;\n this.tooltipY = event.clientY - rect.top - 30;\n this.cdr.detectChanges();\n }\n\n /**\n * Show tooltip for intersection label with proper intersection name\n */\n private showLabelTooltip(event: MouseEvent, intersection: VennIntersection): void {\n // Build the tooltip title from the intersection\n const setNames = intersection.setIds.map(id => {\n const set = this.data?.sets.find(s => s.listId === id);\n return set?.listName || 'Unknown';\n });\n\n if (intersection.setIds.length === 1) {\n this.tooltipTitle = `Only in ${setNames[0]}`;\n } else {\n this.tooltipTitle = setNames.join(' ∩ ');\n }\n this.tooltipCount = intersection.size;\n this.tooltipVisible = true;\n this.moveLabelTooltipPosition(event);\n this.cdr.detectChanges();\n }\n\n /**\n * Update tooltip position for label without triggering extra change detection\n */\n private moveLabelTooltipPosition(event: MouseEvent): void {\n const container = this.containerRef?.nativeElement;\n if (!container) return;\n\n const rect = container.getBoundingClientRect();\n this.tooltipX = event.clientX - rect.left + 10;\n this.tooltipY = event.clientY - rect.top - 30;\n // Don't call detectChanges here - we call it once in showLabelTooltip\n // and the Angular zone will handle the position updates\n }\n\n private hideTooltip(): void {\n // Don't hide tooltip if we're hovering an intersection label\n if (this.isHoveringIntersectionLabel) {\n return;\n }\n this.tooltipVisible = false;\n this.cdr.detectChanges();\n }\n\n private onCircleClick(set: VennSet): void {\n // Find the \"only in this set\" intersection\n const intersection = this.data?.intersections.find(\n i => i.setIds.length === 1 && i.setIds[0] === set.listId\n );\n\n if (intersection) {\n this.regionClick.emit({\n intersection,\n recordIds: intersection.recordIds\n });\n }\n }\n\n private onIntersectionClick(intersection: VennIntersection): void {\n this.regionClick.emit({\n intersection,\n recordIds: intersection.recordIds\n });\n }\n}\n"]}
@@ -2,6 +2,7 @@ export * from './components/lists-my-lists-resource.component';
2
2
  export * from './components/lists-browse-resource.component';
3
3
  export * from './components/lists-categories-resource.component';
4
4
  export * from './components/lists-operations-resource.component';
5
+ export * from './components/lists-shared-with-me-resource.component';
5
6
  export * from './components/venn-diagram/venn-diagram.component';
6
7
  export * from './services/list-set-operations.service';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Lists/index.ts"],"names":[],"mappings":"AACA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AAGjE,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Lists/index.ts"],"names":[],"mappings":"AACA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AAGjE,cAAc,wCAAwC,CAAC"}
@@ -3,6 +3,7 @@ export * from './components/lists-my-lists-resource.component';
3
3
  export * from './components/lists-browse-resource.component';
4
4
  export * from './components/lists-categories-resource.component';
5
5
  export * from './components/lists-operations-resource.component';
6
+ export * from './components/lists-shared-with-me-resource.component';
6
7
  export * from './components/venn-diagram/venn-diagram.component';
7
8
  // Services
8
9
  export * from './services/list-set-operations.service';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Lists/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AAEjE,WAAW;AACX,cAAc,wCAAwC,CAAC","sourcesContent":["// Lists Dashboard Components\nexport * from './components/lists-my-lists-resource.component';\nexport * from './components/lists-browse-resource.component';\nexport * from './components/lists-categories-resource.component';\nexport * from './components/lists-operations-resource.component';\nexport * from './components/venn-diagram/venn-diagram.component';\n\n// Services\nexport * from './services/list-set-operations.service';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Lists/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AAEjE,WAAW;AACX,cAAc,wCAAwC,CAAC","sourcesContent":["// Lists Dashboard Components\nexport * from './components/lists-my-lists-resource.component';\nexport * from './components/lists-browse-resource.component';\nexport * from './components/lists-categories-resource.component';\nexport * from './components/lists-operations-resource.component';\nexport * from './components/lists-shared-with-me-resource.component';\nexport * from './components/venn-diagram/venn-diagram.component';\n\n// Services\nexport * from './services/list-set-operations.service';\n"]}