@memberjunction/ng-dashboards 6.2.0-edge.2 → 6.2.0-edge.4

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 (229) hide show
  1. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts +4 -3
  2. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts.map +1 -1
  3. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js +8 -5
  4. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js.map +1 -1
  5. package/dist/AI/components/duplicates/compare-value.component.d.ts +67 -0
  6. package/dist/AI/components/duplicates/compare-value.component.d.ts.map +1 -0
  7. package/dist/AI/components/duplicates/compare-value.component.js +168 -0
  8. package/dist/AI/components/duplicates/compare-value.component.js.map +1 -0
  9. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +49 -3
  10. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  11. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +287 -169
  12. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  13. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +77 -0
  14. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -0
  15. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +116 -0
  16. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -0
  17. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
  18. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  19. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +16 -4
  20. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  21. package/dist/AI/components/tags/tags-resource.component.d.ts +2 -0
  22. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  23. package/dist/AI/components/tags/tags-resource.component.js +12 -6
  24. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  25. package/dist/AI/components/vectors/vector-index-auto.d.ts +29 -0
  26. package/dist/AI/components/vectors/vector-index-auto.d.ts.map +1 -0
  27. package/dist/AI/components/vectors/vector-index-auto.js +59 -0
  28. package/dist/AI/components/vectors/vector-index-auto.js.map +1 -0
  29. package/dist/AI/components/vectors/vector-management-resource.component.d.ts +9 -0
  30. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  31. package/dist/AI/components/vectors/vector-management-resource.component.js +65 -20
  32. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  33. package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
  34. package/dist/Actions/components/actions-overview.component.js +7 -3
  35. package/dist/Actions/components/actions-overview.component.js.map +1 -1
  36. package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
  37. package/dist/Actions/components/categories-list-view.component.js +3 -2
  38. package/dist/Actions/components/categories-list-view.component.js.map +1 -1
  39. package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
  40. package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
  41. package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
  42. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts +0 -3
  43. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts.map +1 -1
  44. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js +5 -14
  45. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js.map +1 -1
  46. package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
  47. package/dist/ComponentStudio/components/artifact-load-dialog.component.js +1 -0
  48. package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
  49. package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
  50. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +1 -0
  51. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
  52. package/dist/ComponentStudio/components/form-override-dialog.component.d.ts +12 -1
  53. package/dist/ComponentStudio/components/form-override-dialog.component.d.ts.map +1 -1
  54. package/dist/ComponentStudio/components/form-override-dialog.component.js +128 -81
  55. package/dist/ComponentStudio/components/form-override-dialog.component.js.map +1 -1
  56. package/dist/Credentials/components/credentials-list-resource.component.d.ts +2 -0
  57. package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
  58. package/dist/Credentials/components/credentials-list-resource.component.js +12 -10
  59. package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
  60. package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts +14 -43
  61. package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts.map +1 -1
  62. package/dist/DashboardBrowser/dashboard-browser-agent-context.js +6 -29
  63. package/dist/DashboardBrowser/dashboard-browser-agent-context.js.map +1 -1
  64. package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts +174 -321
  65. package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts.map +1 -1
  66. package/dist/DashboardBrowser/dashboard-browser-resource.component.js +522 -1195
  67. package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
  68. package/dist/DashboardBrowser/dashboard-library-filter.d.ts +116 -0
  69. package/dist/DashboardBrowser/dashboard-library-filter.d.ts.map +1 -0
  70. package/dist/DashboardBrowser/dashboard-library-filter.js +277 -0
  71. package/dist/DashboardBrowser/dashboard-library-filter.js.map +1 -0
  72. package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts +1 -1
  73. package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
  74. package/dist/DashboardBrowser/dashboards-agent-tools.d.ts +26 -0
  75. package/dist/DashboardBrowser/dashboards-agent-tools.d.ts.map +1 -0
  76. package/dist/DashboardBrowser/dashboards-agent-tools.js +32 -0
  77. package/dist/DashboardBrowser/dashboards-agent-tools.js.map +1 -0
  78. package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts +58 -0
  79. package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts.map +1 -0
  80. package/dist/DashboardBrowser/dashboards-categories-resource.component.js +391 -0
  81. package/dist/DashboardBrowser/dashboards-categories-resource.component.js.map +1 -0
  82. package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts +37 -0
  83. package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts.map +1 -0
  84. package/dist/DashboardBrowser/dashboards-categories.helpers.js +68 -0
  85. package/dist/DashboardBrowser/dashboards-categories.helpers.js.map +1 -0
  86. package/dist/DashboardEditor/dashboard-editor.component.d.ts +295 -0
  87. package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -0
  88. package/dist/DashboardEditor/dashboard-editor.component.js +1022 -0
  89. package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -0
  90. package/dist/DashboardEditor/dashboard-editor.types.d.ts +23 -0
  91. package/dist/DashboardEditor/dashboard-editor.types.d.ts.map +1 -0
  92. package/dist/DashboardEditor/dashboard-editor.types.js +3 -0
  93. package/dist/DashboardEditor/dashboard-editor.types.js.map +1 -0
  94. package/dist/DashboardEditor/dashboard-viewer-factory.d.ts +11 -0
  95. package/dist/DashboardEditor/dashboard-viewer-factory.d.ts.map +1 -0
  96. package/dist/DashboardEditor/dashboard-viewer-factory.js +17 -0
  97. package/dist/DashboardEditor/dashboard-viewer-factory.js.map +1 -0
  98. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +30 -0
  99. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  100. package/dist/DataExplorer/data-explorer-dashboard.component.js +349 -232
  101. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  102. package/dist/DataExplorer/services/explorer-state.service.d.ts +1 -1
  103. package/dist/DataExplorer/services/explorer-state.service.js +2 -5
  104. package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
  105. package/dist/FormBuilder/form-builder-resource.component.d.ts +0 -14
  106. package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
  107. package/dist/FormBuilder/form-builder-resource.component.js +7 -29
  108. package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
  109. package/dist/Home/home-agent-context.d.ts +29 -10
  110. package/dist/Home/home-agent-context.d.ts.map +1 -1
  111. package/dist/Home/home-agent-context.js +50 -24
  112. package/dist/Home/home-agent-context.js.map +1 -1
  113. package/dist/Home/home-dashboard-switcher.component.d.ts +95 -0
  114. package/dist/Home/home-dashboard-switcher.component.d.ts.map +1 -0
  115. package/dist/Home/home-dashboard-switcher.component.js +442 -0
  116. package/dist/Home/home-dashboard-switcher.component.js.map +1 -0
  117. package/dist/Home/home-dashboard.component.d.ts +330 -17
  118. package/dist/Home/home-dashboard.component.d.ts.map +1 -1
  119. package/dist/Home/home-dashboard.component.js +1702 -1014
  120. package/dist/Home/home-dashboard.component.js.map +1 -1
  121. package/dist/Home/home-menus.d.ts +38 -0
  122. package/dist/Home/home-menus.d.ts.map +1 -0
  123. package/dist/Home/home-menus.js +53 -0
  124. package/dist/Home/home-menus.js.map +1 -0
  125. package/dist/Home/home-pinned-dashboards.d.ts +33 -0
  126. package/dist/Home/home-pinned-dashboards.d.ts.map +1 -0
  127. package/dist/Home/home-pinned-dashboards.js +76 -0
  128. package/dist/Home/home-pinned-dashboards.js.map +1 -0
  129. package/dist/PredictiveStudio/components/ps-production.component.d.ts +5 -1
  130. package/dist/PredictiveStudio/components/ps-production.component.d.ts.map +1 -1
  131. package/dist/PredictiveStudio/components/ps-production.component.js +64 -41
  132. package/dist/PredictiveStudio/components/ps-production.component.js.map +1 -1
  133. package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
  134. package/dist/QueryBrowser/query-browser-resource.component.js +3 -2
  135. package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
  136. package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js +2 -2
  137. package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js.map +1 -1
  138. package/dist/TelephonyOperations/telephony-operations-agent-context.d.ts +107 -0
  139. package/dist/TelephonyOperations/telephony-operations-agent-context.d.ts.map +1 -0
  140. package/dist/TelephonyOperations/telephony-operations-agent-context.js +216 -0
  141. package/dist/TelephonyOperations/telephony-operations-agent-context.js.map +1 -0
  142. package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts +58 -0
  143. package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts.map +1 -0
  144. package/dist/TelephonyOperations/telephony-operations-dashboard.component.js +812 -0
  145. package/dist/TelephonyOperations/telephony-operations-dashboard.component.js.map +1 -0
  146. package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
  147. package/dist/Testing/components/testing-explorer.component.js +7 -7
  148. package/dist/Testing/components/testing-explorer.component.js.map +1 -1
  149. package/dist/WorkQueue/components/work-queue-bindings.component.d.ts +37 -0
  150. package/dist/WorkQueue/components/work-queue-bindings.component.d.ts.map +1 -0
  151. package/dist/WorkQueue/components/work-queue-bindings.component.js +210 -0
  152. package/dist/WorkQueue/components/work-queue-bindings.component.js.map +1 -0
  153. package/dist/WorkQueue/components/work-queue-dead-letters.component.d.ts +70 -0
  154. package/dist/WorkQueue/components/work-queue-dead-letters.component.d.ts.map +1 -0
  155. package/dist/WorkQueue/components/work-queue-dead-letters.component.js +496 -0
  156. package/dist/WorkQueue/components/work-queue-dead-letters.component.js.map +1 -0
  157. package/dist/WorkQueue/components/work-queue-discard-dialog.component.d.ts +22 -0
  158. package/dist/WorkQueue/components/work-queue-discard-dialog.component.d.ts.map +1 -0
  159. package/dist/WorkQueue/components/work-queue-discard-dialog.component.js +99 -0
  160. package/dist/WorkQueue/components/work-queue-discard-dialog.component.js.map +1 -0
  161. package/dist/WorkQueue/components/work-queue-overview.component.d.ts +29 -0
  162. package/dist/WorkQueue/components/work-queue-overview.component.d.ts.map +1 -0
  163. package/dist/WorkQueue/components/work-queue-overview.component.js +278 -0
  164. package/dist/WorkQueue/components/work-queue-overview.component.js.map +1 -0
  165. package/dist/WorkQueue/components/work-queue-partitions.component.d.ts +59 -0
  166. package/dist/WorkQueue/components/work-queue-partitions.component.d.ts.map +1 -0
  167. package/dist/WorkQueue/components/work-queue-partitions.component.js +359 -0
  168. package/dist/WorkQueue/components/work-queue-partitions.component.js.map +1 -0
  169. package/dist/WorkQueue/services/work-queue-operator.service.d.ts +22 -0
  170. package/dist/WorkQueue/services/work-queue-operator.service.d.ts.map +1 -0
  171. package/dist/WorkQueue/services/work-queue-operator.service.js +44 -0
  172. package/dist/WorkQueue/services/work-queue-operator.service.js.map +1 -0
  173. package/dist/WorkQueue/work-queue-agent-context.d.ts +67 -0
  174. package/dist/WorkQueue/work-queue-agent-context.d.ts.map +1 -0
  175. package/dist/WorkQueue/work-queue-agent-context.js +119 -0
  176. package/dist/WorkQueue/work-queue-agent-context.js.map +1 -0
  177. package/dist/WorkQueue/work-queue-dashboard.component.d.ts +94 -0
  178. package/dist/WorkQueue/work-queue-dashboard.component.d.ts.map +1 -0
  179. package/dist/WorkQueue/work-queue-dashboard.component.js +545 -0
  180. package/dist/WorkQueue/work-queue-dashboard.component.js.map +1 -0
  181. package/dist/WorkQueue/work-queue-types.d.ts +40 -0
  182. package/dist/WorkQueue/work-queue-types.d.ts.map +1 -0
  183. package/dist/WorkQueue/work-queue-types.js +2 -0
  184. package/dist/WorkQueue/work-queue-types.js.map +1 -0
  185. package/dist/ai-dashboards.module.d.ts +21 -20
  186. package/dist/ai-dashboards.module.d.ts.map +1 -1
  187. package/dist/ai-dashboards.module.js +4 -1
  188. package/dist/ai-dashboards.module.js.map +1 -1
  189. package/dist/core-dashboards.module.d.ts +69 -61
  190. package/dist/core-dashboards.module.d.ts.map +1 -1
  191. package/dist/core-dashboards.module.js +29 -2
  192. package/dist/core-dashboards.module.js.map +1 -1
  193. package/dist/data-explorer-dashboards.module.d.ts +1 -1
  194. package/dist/data-explorer-dashboards.module.d.ts.map +1 -1
  195. package/dist/data-explorer-dashboards.module.js +3 -1
  196. package/dist/data-explorer-dashboards.module.js.map +1 -1
  197. package/dist/module.d.ts +14 -13
  198. package/dist/module.d.ts.map +1 -1
  199. package/dist/module.js +7 -0
  200. package/dist/module.js.map +1 -1
  201. package/dist/public-api.d.ts +6 -0
  202. package/dist/public-api.d.ts.map +1 -1
  203. package/dist/public-api.js +9 -0
  204. package/dist/public-api.js.map +1 -1
  205. package/dist/shared/dashboard-library-changes.d.ts +23 -0
  206. package/dist/shared/dashboard-library-changes.d.ts.map +1 -0
  207. package/dist/shared/dashboard-library-changes.js +26 -0
  208. package/dist/shared/dashboard-library-changes.js.map +1 -0
  209. package/dist/shared/dashboard-owner-names.d.ts +17 -0
  210. package/dist/shared/dashboard-owner-names.d.ts.map +1 -0
  211. package/dist/shared/dashboard-owner-names.js +65 -0
  212. package/dist/shared/dashboard-owner-names.js.map +1 -0
  213. package/dist/shared/dashboard-recents.d.ts +34 -0
  214. package/dist/shared/dashboard-recents.d.ts.map +1 -0
  215. package/dist/shared/dashboard-recents.js +87 -0
  216. package/dist/shared/dashboard-recents.js.map +1 -0
  217. package/dist/shared/dashboards-app-install.d.ts +59 -0
  218. package/dist/shared/dashboards-app-install.d.ts.map +1 -0
  219. package/dist/shared/dashboards-app-install.js +97 -0
  220. package/dist/shared/dashboards-app-install.js.map +1 -0
  221. package/dist/shared/dashboards-app.helpers.d.ts +42 -0
  222. package/dist/shared/dashboards-app.helpers.d.ts.map +1 -0
  223. package/dist/shared/dashboards-app.helpers.js +143 -0
  224. package/dist/shared/dashboards-app.helpers.js.map +1 -0
  225. package/dist/work-queue-dashboards.module.d.ts +23 -0
  226. package/dist/work-queue-dashboards.module.d.ts.map +1 -0
  227. package/dist/work-queue-dashboards.module.js +92 -0
  228. package/dist/work-queue-dashboards.module.js.map +1 -0
  229. package/package.json +73 -66
@@ -10,17 +10,23 @@
10
10
  *
11
11
  * Deep ("hardcore", Data-Explorer depth) enrichment: bounded name lists (cap
12
12
  * {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP} with a companion `*Count` flag when
13
- * truncated) for apps, pins, pin groups, notifications, and recents; structured
14
- * recent-item summaries; and a tolerant name resolver so the agent can open a
15
- * pin / app / recent the way the user named it (exact name → partial contains).
13
+ * truncated) for apps, pins, pin groups, notifications, recents and pinned
14
+ * dashboards; structured recent-item summaries; whether the Pinned section is
15
+ * collapsed; the Home view (the overview, or a dashboard by name and id and
16
+ * whether it is being edited); and a tolerant name resolver so the agent can
17
+ * open a pin / app / recent / pinned dashboard the way the user named it (exact
18
+ * name → partial contains).
16
19
  *
17
20
  * 🔒 SAFETY BOUNDARY: the Home dashboard exposes ONLY navigation / discovery /
18
- * panel-toggle operations. No helper here describes — and no tool may perform —
19
- * pin create / delete / rename, group mutation, or reordering.
21
+ * panel-toggle operations; showing a pinned dashboard in Home is navigation. No
22
+ * helper here describes — and no tool may perform — pin create / delete /
23
+ * rename, group mutation, reordering, or dashboard create / rename / edit /
24
+ * save / delete.
20
25
  */
21
26
  /**
22
27
  * Upper bound on how many names we publish in a name-list context field
23
- * (AvailableApps, PinnedItems, PinGroupNames, NotificationTitles, RecentItems).
28
+ * (AvailableApps, PinnedItems, PinGroupNames, NotificationTitles, RecentItems,
29
+ * PinnedDashboardNames).
24
30
  * Keeping the streamed note bounded avoids flooding the co-agent with hundreds of
25
31
  * names; when the underlying list is larger we surface a companion total-count
26
32
  * field instead.
@@ -98,16 +104,29 @@ export interface HomeAgentContextInput {
98
104
  SidebarOpen: boolean;
99
105
  /** Current search query inside the Add Pin panel (empty when not searching). */
100
106
  AddPanelSearchQuery: string;
107
+ /** Whether the Pinned section is collapsed. */
108
+ PinnedCollapsed: boolean;
109
+ /** The dashboard Home shows in place of its overview: its name, or null on the overview. */
110
+ CurrentDashboardName: string | null;
111
+ /** ID of that dashboard, or null. */
112
+ CurrentDashboardID: string | null;
113
+ /** True while that dashboard is in edit mode. */
114
+ IsEditingDashboard: boolean;
115
+ /** Names of the pinned dashboards the Dashboards switcher lists, in pin order. */
116
+ PinnedDashboardNames: string[];
101
117
  }
102
118
  /**
103
119
  * Build the agent-visible context object for the Home dashboard.
104
120
  *
105
121
  * Reports the app launcher state (app counts + names), the pin board state (pin
106
122
  * counts + names + groups + edit mode), the notifications (count + bounded titles),
107
- * the recents (count + bounded structured summaries), the Add Pin panel state, and
108
- * the sidebar state. Each name list is bounded with a companion total-count when
109
- * truncated. Keeping this a pure function (no `this`) makes the context shape
110
- * unit-testable and decouples it from change-detection timing.
123
+ * the recents (count + bounded structured summaries), the Add Pin panel state, the
124
+ * sidebar state, whether the Pinned section is collapsed, the Home view (the
125
+ * overview, or the dashboard Home shows by name and id and whether it is being
126
+ * edited) and the pinned dashboards' names. Each name list is bounded with a
127
+ * companion total-count when truncated. Keeping this a pure function (no `this`)
128
+ * makes the context shape unit-testable and decouples it from change-detection
129
+ * timing.
111
130
  *
112
131
  * @param input - the component's current state snapshot
113
132
  * @returns a flat key-value object suitable for `SetAgentContext`
@@ -1 +1 @@
1
- {"version":3,"file":"home-agent-context.d.ts","sourceRoot":"","sources":["../../src/Home/home-agent-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAUnD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAW3G;AAED,kDAAkD;AAClD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAE3G;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,WAAW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AAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,mFAAmF;IACnF,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,0DAA0D;IAC1D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oDAAoD;IACpD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,2FAA2F;IAC3F,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,gFAAgF;IAChF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,4FAA4F;IAC5F,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,qCAAqC;IACrC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iDAAiD;IACjD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kFAAkF;IAClF,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAClC;AA6BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA+C3F;AAED,qDAAqD;AACrD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE3F"}
@@ -10,17 +10,23 @@
10
10
  *
11
11
  * Deep ("hardcore", Data-Explorer depth) enrichment: bounded name lists (cap
12
12
  * {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP} with a companion `*Count` flag when
13
- * truncated) for apps, pins, pin groups, notifications, and recents; structured
14
- * recent-item summaries; and a tolerant name resolver so the agent can open a
15
- * pin / app / recent the way the user named it (exact name → partial contains).
13
+ * truncated) for apps, pins, pin groups, notifications, recents and pinned
14
+ * dashboards; structured recent-item summaries; whether the Pinned section is
15
+ * collapsed; the Home view (the overview, or a dashboard by name and id and
16
+ * whether it is being edited); and a tolerant name resolver so the agent can
17
+ * open a pin / app / recent / pinned dashboard the way the user named it (exact
18
+ * name → partial contains).
16
19
  *
17
20
  * 🔒 SAFETY BOUNDARY: the Home dashboard exposes ONLY navigation / discovery /
18
- * panel-toggle operations. No helper here describes — and no tool may perform —
19
- * pin create / delete / rename, group mutation, or reordering.
21
+ * panel-toggle operations; showing a pinned dashboard in Home is navigation. No
22
+ * helper here describes — and no tool may perform — pin create / delete /
23
+ * rename, group mutation, reordering, or dashboard create / rename / edit /
24
+ * save / delete.
20
25
  */
21
26
  /**
22
27
  * Upper bound on how many names we publish in a name-list context field
23
- * (AvailableApps, PinnedItems, PinGroupNames, NotificationTitles, RecentItems).
28
+ * (AvailableApps, PinnedItems, PinGroupNames, NotificationTitles, RecentItems,
29
+ * PinnedDashboardNames).
24
30
  * Keeping the streamed note bounded avoids flooding the co-agent with hundreds of
25
31
  * names; when the underlying list is larger we surface a companion total-count
26
32
  * field instead.
@@ -74,15 +80,43 @@ export function BuildHomeNotFoundError(input, kind, candidates) {
74
80
  export function buildHomeNotFoundError(input, kind, candidates) {
75
81
  return BuildHomeNotFoundError(input, kind, candidates);
76
82
  }
83
+ /**
84
+ * Add a bounded name list under `key` when it is not empty, plus `countKey` with the true total
85
+ * when the list is longer than {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP}.
86
+ */
87
+ function addBoundedNames(context, key, countKey, names) {
88
+ if (names.length === 0) {
89
+ return;
90
+ }
91
+ context[key] = capNames(names);
92
+ if (names.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {
93
+ context[countKey] = names.length;
94
+ }
95
+ }
96
+ /** Add the Home view (overview or a dashboard), the open dashboard and the pinned dashboards to the context. */
97
+ function addDashboardViewContext(context, input) {
98
+ context['HomeView'] = input.CurrentDashboardName ? 'Dashboard' : 'Overview';
99
+ if (input.CurrentDashboardName) {
100
+ context['CurrentDashboardName'] = input.CurrentDashboardName;
101
+ context['IsEditingDashboard'] = input.IsEditingDashboard;
102
+ if (input.CurrentDashboardID) {
103
+ context['CurrentDashboardID'] = input.CurrentDashboardID;
104
+ }
105
+ }
106
+ addBoundedNames(context, 'PinnedDashboardNames', 'PinnedDashboardNameCount', input.PinnedDashboardNames);
107
+ }
77
108
  /**
78
109
  * Build the agent-visible context object for the Home dashboard.
79
110
  *
80
111
  * Reports the app launcher state (app counts + names), the pin board state (pin
81
112
  * counts + names + groups + edit mode), the notifications (count + bounded titles),
82
- * the recents (count + bounded structured summaries), the Add Pin panel state, and
83
- * the sidebar state. Each name list is bounded with a companion total-count when
84
- * truncated. Keeping this a pure function (no `this`) makes the context shape
85
- * unit-testable and decouples it from change-detection timing.
113
+ * the recents (count + bounded structured summaries), the Add Pin panel state, the
114
+ * sidebar state, whether the Pinned section is collapsed, the Home view (the
115
+ * overview, or the dashboard Home shows by name and id and whether it is being
116
+ * edited) and the pinned dashboards' names. Each name list is bounded with a
117
+ * companion total-count when truncated. Keeping this a pure function (no `this`)
118
+ * makes the context shape unit-testable and decouples it from change-detection
119
+ * timing.
86
120
  *
87
121
  * @param input - the component's current state snapshot
88
122
  * @returns a flat key-value object suitable for `SetAgentContext`
@@ -100,6 +134,7 @@ export function BuildHomeAgentContext(input) {
100
134
  EditMode: input.EditMode,
101
135
  AddPanelOpen: input.AddPanelOpen,
102
136
  SidebarOpen: input.SidebarOpen,
137
+ PinnedCollapsed: input.PinnedCollapsed,
103
138
  };
104
139
  // When the lists are longer than we publish names for, tell the co-agent the
105
140
  // true totals so it knows the name lists are truncated.
@@ -109,20 +144,10 @@ export function BuildHomeAgentContext(input) {
109
144
  if (input.PinNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {
110
145
  context['PinnedItemNameCount'] = input.PinNames.length;
111
146
  }
112
- // Pin group names — bounded; companion count when over the cap.
113
- if (input.PinGroupNames.length > 0) {
114
- context['PinGroupNames'] = capNames(input.PinGroupNames);
115
- if (input.PinGroupNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {
116
- context['PinGroupNameCount'] = input.PinGroupNames.length;
117
- }
118
- }
119
- // Notification titles — bounded; only surfaced when there are unread notifications.
120
- if (input.NotificationTitles.length > 0) {
121
- context['NotificationTitles'] = capNames(input.NotificationTitles);
122
- if (input.NotificationTitles.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {
123
- context['NotificationTitleCount'] = input.NotificationTitles.length;
124
- }
125
- }
147
+ // Pin group names and unread notification titles — bounded; only surfaced when
148
+ // there are some, with a companion count when over the cap.
149
+ addBoundedNames(context, 'PinGroupNames', 'PinGroupNameCount', input.PinGroupNames);
150
+ addBoundedNames(context, 'NotificationTitles', 'NotificationTitleCount', input.NotificationTitles);
126
151
  // Recent items — bounded structured summaries (name + resource type).
127
152
  if (input.RecentItems.length > 0) {
128
153
  context['RecentItems'] = input.RecentItems.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP);
@@ -135,6 +160,7 @@ export function BuildHomeAgentContext(input) {
135
160
  if (input.AddPanelOpen && input.AddPanelSearchQuery) {
136
161
  context['AddPanelSearchQuery'] = input.AddPanelSearchQuery;
137
162
  }
163
+ addDashboardViewContext(context, input);
138
164
  return context;
139
165
  }
140
166
  /** @deprecated Use {@link BuildHomeAgentContext}. */
@@ -1 +1 @@
1
- {"version":3,"file":"home-agent-context.js","sourceRoot":"","sources":["../../src/Home/home-agent-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAEnD;;;GAGG;AACH,SAAS,QAAQ,CAAC,KAAwB;IACtC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,gCAAgC,CAAC,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,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;QAC9D,CAAC;IACL,CAAC;IAED,oFAAoF;IACpF,IAAI,KAAK,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACnE,IAAI,KAAK,CAAC,kBAAkB,CAAC,MAAM,GAAG,gCAAgC,EAAE,CAAC;YACrE,OAAO,CAAC,wBAAwB,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC;QACxE,CAAC;IACL,CAAC;IAED,sEAAsE;IACtE,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;QACtF,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,gCAAgC,EAAE,CAAC;YAC9D,OAAO,CAAC,qBAAqB,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;QAC9D,CAAC;IACL,CAAC;IAED,kFAAkF;IAClF,mDAAmD;IACnD,IAAI,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC;QAClD,OAAO,CAAC,qBAAqB,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC;IAC/D,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,qBAAqB,CAAC,KAA4B;IAC9D,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC","sourcesContent":["/**\n * @fileoverview Pure helpers for the Home dashboard's AI-agent integration.\n *\n * These functions are intentionally free of Angular / component dependencies so\n * they can be unit-tested in isolation. The component\n * ({@link HomeDashboardComponent}) supplies a plain snapshot of its current\n * state and these helpers shape it into the key-value `AgentContext` object that\n * flows to the async chat agent and the realtime co-agent via\n * `NavigationService.SetAgentContext`.\n *\n * Deep (\"hardcore\", Data-Explorer depth) enrichment: bounded name lists (cap\n * {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP} with a companion `*Count` flag when\n * truncated) for apps, pins, pin groups, notifications, and recents; structured\n * recent-item summaries; and a tolerant name resolver so the agent can open a\n * pin / app / recent the way the user named it (exact name → partial contains).\n *\n * 🔒 SAFETY BOUNDARY: the Home dashboard exposes ONLY navigation / discovery /\n * panel-toggle operations. No helper here describes — and no tool may perform —\n * pin create / delete / rename, group mutation, or reordering.\n */\n\n/**\n * Upper bound on how many names we publish in a name-list context field\n * (AvailableApps, PinnedItems, PinGroupNames, NotificationTitles, RecentItems).\n * Keeping the streamed note bounded avoids flooding the co-agent with hundreds of\n * names; when the underlying list is larger we surface a companion total-count\n * field instead.\n */\nexport const HOME_AGENT_CONTEXT_NAME_LIST_CAP = 25;\n\n/**\n * Cap an array of names to {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP} entries.\n * Pure + deterministic so the context shape stays unit-testable.\n */\nfunction capNames(names: readonly string[]): string[] {\n return names.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP);\n}\n\n/**\n * A minimal name-bearing record the agent can refer to (an app, pin, or recent).\n */\nexport interface NamedRecord {\n Name: string;\n}\n\n/**\n * Resolve an agent-supplied reference to one of the available named records,\n * matching the way a user names things. Tries, in order:\n * 1. exact name (case-insensitive, trimmed)\n * 2. partial (contains) match (case-insensitive)\n *\n * Pure + deterministic over the supplied candidate list, so it's unit-testable in\n * isolation.\n *\n * @param input - whatever the agent passed (typically the on-screen display name)\n * @param candidates - the records available on the Home screen\n * @returns the matched candidate, or null on a miss\n */\nexport function ResolveNamedRecord<T extends NamedRecord>(input: string, candidates: readonly T[]): T | null {\n const needle = input.trim().toLowerCase();\n if (!needle) {\n return null;\n }\n const exact = candidates.find(c => c.Name.trim().toLowerCase() === needle);\n if (exact) {\n return exact;\n }\n const contains = candidates.find(c => c.Name.toLowerCase().includes(needle));\n return contains ?? null;\n}\n\n/** @deprecated Use {@link ResolveNamedRecord}. */\nexport function resolveNamedRecord<T extends NamedRecord>(input: string, candidates: readonly T[]): T | null {\n return ResolveNamedRecord(input, candidates);\n}\n\n/**\n * Build a tolerant \"not found\" error listing a bounded sample of available names so\n * the agent can correct itself.\n */\nexport function BuildHomeNotFoundError(input: string, kind: string, candidates: readonly NamedRecord[]): string {\n const sample = candidates.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP).map(c => c.Name).join(', ');\n return `No ${kind} named \"${input}\". Available ${kind}s: ${sample || '(none)'}.`;\n}\n\n/** @deprecated Use {@link BuildHomeNotFoundError}. */\nexport function buildHomeNotFoundError(input: string, kind: string, candidates: readonly NamedRecord[]): string {\n return BuildHomeNotFoundError(input, kind, candidates);\n}\n\n/**\n * A structured summary of one recent item the agent can navigate to — its display\n * name and the resource type (record / view / dashboard / artifact / report).\n */\nexport interface RecentItemSummary {\n Name: string;\n ResourceType: string;\n}\n\n/**\n * The plain, component-supplied snapshot used to build the Home agent context.\n * Mirrors the salient slice of the Home dashboard's state.\n */\nexport interface HomeAgentContextInput {\n /** Total apps available to the user (Home itself excluded). */\n AppCount: number;\n /** Apps currently visible after any display filtering (== AppCount today). */\n VisibleAppCount: number;\n /** Names of the available apps (the ones the agent can open via OpenApp). */\n AppNames: string[];\n /** Total pinned items on the Home screen. */\n PinnedItemCount: number;\n /** Number of distinct pin groups. */\n PinGroupCount: number;\n /** Names of the distinct pin groups (bounded). */\n PinGroupNames: string[];\n /** Display names of the pinned items (the ones the agent can open via OpenPin). */\n PinNames: string[];\n /** Count of unread notifications shown in the sidebar. */\n UnreadNotifications: number;\n /** Titles of the unread notifications (bounded). */\n NotificationTitles: string[];\n /** Count of recent items shown in the sidebar. */\n RecentItemsCount: number;\n /** Structured summaries of the recent items (bounded) — the ones OpenRecent can target. */\n RecentItems: RecentItemSummary[];\n /** Whether pin edit mode is active. */\n EditMode: boolean;\n /** Whether the Add Pin panel is open. */\n AddPanelOpen: boolean;\n /** Whether the sidebar (notifications / favorites / recents) is open. */\n SidebarOpen: boolean;\n /** Current search query inside the Add Pin panel (empty when not searching). */\n AddPanelSearchQuery: string;\n}\n\n/**\n * Build the agent-visible context object for the Home dashboard.\n *\n * Reports the app launcher state (app counts + names), the pin board state (pin\n * counts + names + groups + edit mode), the notifications (count + bounded titles),\n * the recents (count + bounded structured summaries), the Add Pin panel state, and\n * the sidebar state. Each name list is bounded with a companion total-count when\n * truncated. Keeping this a pure function (no `this`) makes the context shape\n * unit-testable and decouples it from change-detection timing.\n *\n * @param input - the component's current state snapshot\n * @returns a flat key-value object suitable for `SetAgentContext`\n */\nexport function BuildHomeAgentContext(input: HomeAgentContextInput): Record<string, unknown> {\n const context: Record<string, unknown> = {\n AppCount: input.AppCount,\n VisibleAppCount: input.VisibleAppCount,\n AvailableApps: capNames(input.AppNames),\n PinnedItemCount: input.PinnedItemCount,\n PinGroupCount: input.PinGroupCount,\n PinnedItems: capNames(input.PinNames),\n UnreadNotifications: input.UnreadNotifications,\n RecentItemsCount: input.RecentItemsCount,\n EditMode: input.EditMode,\n AddPanelOpen: input.AddPanelOpen,\n SidebarOpen: input.SidebarOpen,\n };\n\n // When the lists are longer than we publish names for, tell the co-agent the\n // true totals so it knows the name lists are truncated.\n if (input.AppNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['AvailableAppCount'] = input.AppNames.length;\n }\n if (input.PinNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['PinnedItemNameCount'] = input.PinNames.length;\n }\n\n // Pin group names — bounded; companion count when over the cap.\n if (input.PinGroupNames.length > 0) {\n context['PinGroupNames'] = capNames(input.PinGroupNames);\n if (input.PinGroupNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['PinGroupNameCount'] = input.PinGroupNames.length;\n }\n }\n\n // Notification titles — bounded; only surfaced when there are unread notifications.\n if (input.NotificationTitles.length > 0) {\n context['NotificationTitles'] = capNames(input.NotificationTitles);\n if (input.NotificationTitles.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['NotificationTitleCount'] = input.NotificationTitles.length;\n }\n }\n\n // Recent items — bounded structured summaries (name + resource type).\n if (input.RecentItems.length > 0) {\n context['RecentItems'] = input.RecentItems.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP);\n if (input.RecentItems.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['RecentItemNameCount'] = input.RecentItems.length;\n }\n }\n\n // Only surface the panel search text when the panel is open and there's a query —\n // keeps the context lean when the panel is closed.\n if (input.AddPanelOpen && input.AddPanelSearchQuery) {\n context['AddPanelSearchQuery'] = input.AddPanelSearchQuery;\n }\n\n return context;\n}\n\n/** @deprecated Use {@link BuildHomeAgentContext}. */\nexport function buildHomeAgentContext(input: HomeAgentContextInput): Record<string, unknown> {\n return BuildHomeAgentContext(input);\n}\n"]}
1
+ {"version":3,"file":"home-agent-context.js","sourceRoot":"","sources":["../../src/Home/home-agent-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAEnD;;;GAGG;AACH,SAAS,QAAQ,CAAC,KAAwB;IACtC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;AAC5D,CAAC;AASD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAwB,KAAa,EAAE,UAAwB;IAC7F,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,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,CAAC;AACnB,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,qBAAqB,CAAC,KAA4B;IAC9D,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC","sourcesContent":["/**\n * @fileoverview Pure helpers for the Home dashboard's AI-agent integration.\n *\n * These functions are intentionally free of Angular / component dependencies so\n * they can be unit-tested in isolation. The component\n * ({@link HomeDashboardComponent}) supplies a plain snapshot of its current\n * state and these helpers shape it into the key-value `AgentContext` object that\n * flows to the async chat agent and the realtime co-agent via\n * `NavigationService.SetAgentContext`.\n *\n * Deep (\"hardcore\", Data-Explorer depth) enrichment: bounded name lists (cap\n * {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP} with a companion `*Count` flag when\n * truncated) for apps, pins, pin groups, notifications, recents and pinned\n * dashboards; structured recent-item summaries; whether the Pinned section is\n * collapsed; the Home view (the overview, or a dashboard by name and id and\n * whether it is being edited); and a tolerant name resolver so the agent can\n * open a pin / app / recent / pinned dashboard the way the user named it (exact\n * name → partial contains).\n *\n * 🔒 SAFETY BOUNDARY: the Home dashboard exposes ONLY navigation / discovery /\n * panel-toggle operations; showing a pinned dashboard in Home is navigation. No\n * helper here describes — and no tool may perform — pin create / delete /\n * rename, group mutation, reordering, or dashboard create / rename / edit /\n * save / delete.\n */\n\n/**\n * Upper bound on how many names we publish in a name-list context field\n * (AvailableApps, PinnedItems, PinGroupNames, NotificationTitles, RecentItems,\n * PinnedDashboardNames).\n * Keeping the streamed note bounded avoids flooding the co-agent with hundreds of\n * names; when the underlying list is larger we surface a companion total-count\n * field instead.\n */\nexport const HOME_AGENT_CONTEXT_NAME_LIST_CAP = 25;\n\n/**\n * Cap an array of names to {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP} entries.\n * Pure + deterministic so the context shape stays unit-testable.\n */\nfunction capNames(names: readonly string[]): string[] {\n return names.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP);\n}\n\n/**\n * A minimal name-bearing record the agent can refer to (an app, pin, or recent).\n */\nexport interface NamedRecord {\n Name: string;\n}\n\n/**\n * Resolve an agent-supplied reference to one of the available named records,\n * matching the way a user names things. Tries, in order:\n * 1. exact name (case-insensitive, trimmed)\n * 2. partial (contains) match (case-insensitive)\n *\n * Pure + deterministic over the supplied candidate list, so it's unit-testable in\n * isolation.\n *\n * @param input - whatever the agent passed (typically the on-screen display name)\n * @param candidates - the records available on the Home screen\n * @returns the matched candidate, or null on a miss\n */\nexport function ResolveNamedRecord<T extends NamedRecord>(input: string, candidates: readonly T[]): T | null {\n const needle = input.trim().toLowerCase();\n if (!needle) {\n return null;\n }\n const exact = candidates.find(c => c.Name.trim().toLowerCase() === needle);\n if (exact) {\n return exact;\n }\n const contains = candidates.find(c => c.Name.toLowerCase().includes(needle));\n return contains ?? null;\n}\n\n/** @deprecated Use {@link ResolveNamedRecord}. */\nexport function resolveNamedRecord<T extends NamedRecord>(input: string, candidates: readonly T[]): T | null {\n return ResolveNamedRecord(input, candidates);\n}\n\n/**\n * Build a tolerant \"not found\" error listing a bounded sample of available names so\n * the agent can correct itself.\n */\nexport function BuildHomeNotFoundError(input: string, kind: string, candidates: readonly NamedRecord[]): string {\n const sample = candidates.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP).map(c => c.Name).join(', ');\n return `No ${kind} named \"${input}\". Available ${kind}s: ${sample || '(none)'}.`;\n}\n\n/** @deprecated Use {@link BuildHomeNotFoundError}. */\nexport function buildHomeNotFoundError(input: string, kind: string, candidates: readonly NamedRecord[]): string {\n return BuildHomeNotFoundError(input, kind, candidates);\n}\n\n/**\n * A structured summary of one recent item the agent can navigate to — its display\n * name and the resource type (record / view / dashboard / artifact / report).\n */\nexport interface RecentItemSummary {\n Name: string;\n ResourceType: string;\n}\n\n/**\n * The plain, component-supplied snapshot used to build the Home agent context.\n * Mirrors the salient slice of the Home dashboard's state.\n */\nexport interface HomeAgentContextInput {\n /** Total apps available to the user (Home itself excluded). */\n AppCount: number;\n /** Apps currently visible after any display filtering (== AppCount today). */\n VisibleAppCount: number;\n /** Names of the available apps (the ones the agent can open via OpenApp). */\n AppNames: string[];\n /** Total pinned items on the Home screen. */\n PinnedItemCount: number;\n /** Number of distinct pin groups. */\n PinGroupCount: number;\n /** Names of the distinct pin groups (bounded). */\n PinGroupNames: string[];\n /** Display names of the pinned items (the ones the agent can open via OpenPin). */\n PinNames: string[];\n /** Count of unread notifications shown in the sidebar. */\n UnreadNotifications: number;\n /** Titles of the unread notifications (bounded). */\n NotificationTitles: string[];\n /** Count of recent items shown in the sidebar. */\n RecentItemsCount: number;\n /** Structured summaries of the recent items (bounded) — the ones OpenRecent can target. */\n RecentItems: RecentItemSummary[];\n /** Whether pin edit mode is active. */\n EditMode: boolean;\n /** Whether the Add Pin panel is open. */\n AddPanelOpen: boolean;\n /** Whether the sidebar (notifications / favorites / recents) is open. */\n SidebarOpen: boolean;\n /** Current search query inside the Add Pin panel (empty when not searching). */\n AddPanelSearchQuery: string;\n /** Whether the Pinned section is collapsed. */\n PinnedCollapsed: boolean;\n /** The dashboard Home shows in place of its overview: its name, or null on the overview. */\n CurrentDashboardName: string | null;\n /** ID of that dashboard, or null. */\n CurrentDashboardID: string | null;\n /** True while that dashboard is in edit mode. */\n IsEditingDashboard: boolean;\n /** Names of the pinned dashboards the Dashboards switcher lists, in pin order. */\n PinnedDashboardNames: string[];\n}\n\n/**\n * Add a bounded name list under `key` when it is not empty, plus `countKey` with the true total\n * when the list is longer than {@link HOME_AGENT_CONTEXT_NAME_LIST_CAP}.\n */\nfunction addBoundedNames(context: Record<string, unknown>, key: string, countKey: string, names: readonly string[]): void {\n if (names.length === 0) {\n return;\n }\n context[key] = capNames(names);\n if (names.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context[countKey] = names.length;\n }\n}\n\n/** Add the Home view (overview or a dashboard), the open dashboard and the pinned dashboards to the context. */\nfunction addDashboardViewContext(context: Record<string, unknown>, input: HomeAgentContextInput): void {\n context['HomeView'] = input.CurrentDashboardName ? 'Dashboard' : 'Overview';\n if (input.CurrentDashboardName) {\n context['CurrentDashboardName'] = input.CurrentDashboardName;\n context['IsEditingDashboard'] = input.IsEditingDashboard;\n if (input.CurrentDashboardID) {\n context['CurrentDashboardID'] = input.CurrentDashboardID;\n }\n }\n addBoundedNames(context, 'PinnedDashboardNames', 'PinnedDashboardNameCount', input.PinnedDashboardNames);\n}\n\n/**\n * Build the agent-visible context object for the Home dashboard.\n *\n * Reports the app launcher state (app counts + names), the pin board state (pin\n * counts + names + groups + edit mode), the notifications (count + bounded titles),\n * the recents (count + bounded structured summaries), the Add Pin panel state, the\n * sidebar state, whether the Pinned section is collapsed, the Home view (the\n * overview, or the dashboard Home shows by name and id and whether it is being\n * edited) and the pinned dashboards' names. Each name list is bounded with a\n * companion total-count when truncated. Keeping this a pure function (no `this`)\n * makes the context shape unit-testable and decouples it from change-detection\n * timing.\n *\n * @param input - the component's current state snapshot\n * @returns a flat key-value object suitable for `SetAgentContext`\n */\nexport function BuildHomeAgentContext(input: HomeAgentContextInput): Record<string, unknown> {\n const context: Record<string, unknown> = {\n AppCount: input.AppCount,\n VisibleAppCount: input.VisibleAppCount,\n AvailableApps: capNames(input.AppNames),\n PinnedItemCount: input.PinnedItemCount,\n PinGroupCount: input.PinGroupCount,\n PinnedItems: capNames(input.PinNames),\n UnreadNotifications: input.UnreadNotifications,\n RecentItemsCount: input.RecentItemsCount,\n EditMode: input.EditMode,\n AddPanelOpen: input.AddPanelOpen,\n SidebarOpen: input.SidebarOpen,\n PinnedCollapsed: input.PinnedCollapsed,\n };\n\n // When the lists are longer than we publish names for, tell the co-agent the\n // true totals so it knows the name lists are truncated.\n if (input.AppNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['AvailableAppCount'] = input.AppNames.length;\n }\n if (input.PinNames.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['PinnedItemNameCount'] = input.PinNames.length;\n }\n\n // Pin group names and unread notification titles — bounded; only surfaced when\n // there are some, with a companion count when over the cap.\n addBoundedNames(context, 'PinGroupNames', 'PinGroupNameCount', input.PinGroupNames);\n addBoundedNames(context, 'NotificationTitles', 'NotificationTitleCount', input.NotificationTitles);\n\n // Recent items — bounded structured summaries (name + resource type).\n if (input.RecentItems.length > 0) {\n context['RecentItems'] = input.RecentItems.slice(0, HOME_AGENT_CONTEXT_NAME_LIST_CAP);\n if (input.RecentItems.length > HOME_AGENT_CONTEXT_NAME_LIST_CAP) {\n context['RecentItemNameCount'] = input.RecentItems.length;\n }\n }\n\n // Only surface the panel search text when the panel is open and there's a query —\n // keeps the context lean when the panel is closed.\n if (input.AddPanelOpen && input.AddPanelSearchQuery) {\n context['AddPanelSearchQuery'] = input.AddPanelSearchQuery;\n }\n\n addDashboardViewContext(context, input);\n\n return context;\n}\n\n/** @deprecated Use {@link BuildHomeAgentContext}. */\nexport function buildHomeAgentContext(input: HomeAgentContextInput): Record<string, unknown> {\n return BuildHomeAgentContext(input);\n}\n"]}
@@ -0,0 +1,95 @@
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import { HomeSwitcherDashboard } from './home-pinned-dashboards';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * The Dashboards switcher on Home: a trigger and a menu with a filter box, Home, the pinned dashboards, New dashboard
6
+ * and Manage pins. The Pinned header shows it as the "Dashboards" button (menu right-aligned); the dashboard view shows
7
+ * it as the dashboard title (menu left-aligned), whose trigger can be a heading (HeadingLevel). The menu is
8
+ * fixed-position under the trigger, so a collapsed accordion does not clip it. A click outside, Escape, focus moving
9
+ * out, a change of the window's width or a page scroll closes it. Home handles the picks.
10
+ */
11
+ export declare class HomeDashboardSwitcherComponent implements OnDestroy {
12
+ /** The pinned dashboards, in pin order. */
13
+ Dashboards: HomeSwitcherDashboard[];
14
+ /** The dashboard Home shows, or null on the overview. */
15
+ CurrentId: string | null;
16
+ /** 'button': the Pinned header button. 'title': the dashboard title in the dashboard view. */
17
+ Look: 'button' | 'title';
18
+ /** The trigger text: "Dashboards" for the button, the dashboard name for the title. */
19
+ Label: string;
20
+ /** 'right' lines the menu up with the trigger's right edge; 'left' with its left edge. */
21
+ Align: 'left' | 'right';
22
+ /**
23
+ * For the title look: 1 or 2 puts the trigger in an h1 or h2, with no margin or font of its own, and the menu stays
24
+ * outside the heading. Null puts it in no heading. The button look ignores it.
25
+ */
26
+ HeadingLevel: 1 | 2 | null;
27
+ /** Emits the dashboard the user picks, or null for Home. */
28
+ Pick: EventEmitter<string | null>;
29
+ /** Emits when the user picks New dashboard. */
30
+ New: EventEmitter<void>;
31
+ /** Emits when the user picks Manage pins. */
32
+ ManagePins: EventEmitter<void>;
33
+ /** True while the menu shows. */
34
+ IsOpen: boolean;
35
+ /** The text in the filter box. */
36
+ Query: string;
37
+ /** The menu's left edge, in viewport pixels. */
38
+ MenuLeft: number;
39
+ /** The menu's top edge, in viewport pixels. */
40
+ MenuTop: number;
41
+ /** The menu's max height in pixels: the room on its side of the trigger. Null while the menu is measured. */
42
+ MenuMaxHeight: number | null;
43
+ private trigger?;
44
+ private menu?;
45
+ private readonly host;
46
+ private readonly cdr;
47
+ /** The window's width when the menu opened. A resize that keeps it, such as an on-screen keyboard opening, keeps the menu open. */
48
+ private openWidth;
49
+ /**
50
+ * Closes the menu on a click outside the switcher. It listens in the capture phase, so a click whose target stops
51
+ * it still counts.
52
+ */
53
+ private readonly onDocumentClick;
54
+ /** Closes the menu when the page scrolls under it. A scroll inside the menu, such as its list, keeps it open. */
55
+ private readonly onScroll;
56
+ /** The pinned dashboards whose name matches the filter box. */
57
+ get FilteredDashboards(): HomeSwitcherDashboard[];
58
+ /** True for the dashboard Home shows. */
59
+ IsCurrent(dashboard: HomeSwitcherDashboard): boolean;
60
+ /** Opens the menu when it is closed, and closes it when it is open. */
61
+ Toggle(): void;
62
+ /** Opens the menu under the trigger, inside the viewport, with an empty filter box that has focus. */
63
+ Open(): void;
64
+ /** Closes the menu. `returnFocus` puts focus back on the trigger (Escape). */
65
+ Close(returnFocus?: boolean): void;
66
+ /** Closes the menu and emits the picked dashboard, or null for Home. */
67
+ Choose(dashboardId: string | null): void;
68
+ /** Closes the menu and emits New. */
69
+ ChooseNew(): void;
70
+ /** Closes the menu and emits ManagePins. */
71
+ ChooseManagePins(): void;
72
+ /**
73
+ * Keys in the menu: Escape closes it and puts focus back on the trigger. ArrowDown and ArrowUp move from the filter
74
+ * box to the first or last row and between the rows; Home and End move between the rows. Other keys do nothing here.
75
+ */
76
+ OnMenuKeydown(event: KeyboardEvent): void;
77
+ /** Closes the menu when focus moves to an element outside the switcher, as Tab does past the last row. */
78
+ OnFocusOut(event: FocusEvent): void;
79
+ /**
80
+ * Closes the menu when the window's width differs from its width at open. A resize of the height only, such as an
81
+ * on-screen keyboard opening for the filter box, keeps the menu open.
82
+ */
83
+ OnWindowResize(): void;
84
+ ngOnDestroy(): void;
85
+ /**
86
+ * Places the menu next to the trigger, lined up by Align, and limits its height to the room on that side. A height
87
+ * of 0 places it below the trigger.
88
+ */
89
+ private placeMenu;
90
+ /** Removes the page click and scroll listeners the open menu uses. */
91
+ private stopWatchingPage;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<HomeDashboardSwitcherComponent, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<HomeDashboardSwitcherComponent, "mj-home-dashboard-switcher", never, { "Dashboards": { "alias": "Dashboards"; "required": false; }; "CurrentId": { "alias": "CurrentId"; "required": false; }; "Look": { "alias": "Look"; "required": false; }; "Label": { "alias": "Label"; "required": false; }; "Align": { "alias": "Align"; "required": false; }; "HeadingLevel": { "alias": "HeadingLevel"; "required": false; }; }, { "Pick": "Pick"; "New": "New"; "ManagePins": "ManagePins"; }, never, never, false, never>;
94
+ }
95
+ //# sourceMappingURL=home-dashboard-switcher.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"home-dashboard-switcher.component.d.ts","sourceRoot":"","sources":["../../src/Home/home-dashboard-switcher.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EAGZ,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