@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.
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts +4 -3
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js +8 -5
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js.map +1 -1
- package/dist/AI/components/duplicates/compare-value.component.d.ts +67 -0
- package/dist/AI/components/duplicates/compare-value.component.d.ts.map +1 -0
- package/dist/AI/components/duplicates/compare-value.component.js +168 -0
- package/dist/AI/components/duplicates/compare-value.component.js.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +49 -3
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +287 -169
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +77 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +116 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +16 -4
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts +2 -0
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +12 -6
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-index-auto.d.ts +29 -0
- package/dist/AI/components/vectors/vector-index-auto.d.ts.map +1 -0
- package/dist/AI/components/vectors/vector-index-auto.js +59 -0
- package/dist/AI/components/vectors/vector-index-auto.js.map +1 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +9 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +65 -20
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +7 -3
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/categories-list-view.component.js +3 -2
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts +0 -3
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js +5 -14
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js +1 -0
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +1 -0
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/form-override-dialog.component.d.ts +12 -1
- package/dist/ComponentStudio/components/form-override-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/form-override-dialog.component.js +128 -81
- package/dist/ComponentStudio/components/form-override-dialog.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +12 -10
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts +14 -43
- package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-agent-context.js +6 -29
- package/dist/DashboardBrowser/dashboard-browser-agent-context.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts +174 -321
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +522 -1195
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-library-filter.d.ts +116 -0
- package/dist/DashboardBrowser/dashboard-library-filter.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboard-library-filter.js +277 -0
- package/dist/DashboardBrowser/dashboard-library-filter.js.map +1 -0
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboards-agent-tools.d.ts +26 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.js +32 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.js.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts +58 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.js +391 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.js.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts +37 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.js +68 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.js.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.component.d.ts +295 -0
- package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.component.js +1022 -0
- package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.types.d.ts +23 -0
- package/dist/DashboardEditor/dashboard-editor.types.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.types.js +3 -0
- package/dist/DashboardEditor/dashboard-editor.types.js.map +1 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.d.ts +11 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.js +17 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.js.map +1 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +30 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +349 -232
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.d.ts +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +2 -5
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.d.ts +0 -14
- package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.js +7 -29
- package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
- package/dist/Home/home-agent-context.d.ts +29 -10
- package/dist/Home/home-agent-context.d.ts.map +1 -1
- package/dist/Home/home-agent-context.js +50 -24
- package/dist/Home/home-agent-context.js.map +1 -1
- package/dist/Home/home-dashboard-switcher.component.d.ts +95 -0
- package/dist/Home/home-dashboard-switcher.component.d.ts.map +1 -0
- package/dist/Home/home-dashboard-switcher.component.js +442 -0
- package/dist/Home/home-dashboard-switcher.component.js.map +1 -0
- package/dist/Home/home-dashboard.component.d.ts +330 -17
- package/dist/Home/home-dashboard.component.d.ts.map +1 -1
- package/dist/Home/home-dashboard.component.js +1702 -1014
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Home/home-menus.d.ts +38 -0
- package/dist/Home/home-menus.d.ts.map +1 -0
- package/dist/Home/home-menus.js +53 -0
- package/dist/Home/home-menus.js.map +1 -0
- package/dist/Home/home-pinned-dashboards.d.ts +33 -0
- package/dist/Home/home-pinned-dashboards.d.ts.map +1 -0
- package/dist/Home/home-pinned-dashboards.js +76 -0
- package/dist/Home/home-pinned-dashboards.js.map +1 -0
- package/dist/PredictiveStudio/components/ps-production.component.d.ts +5 -1
- package/dist/PredictiveStudio/components/ps-production.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-production.component.js +64 -41
- package/dist/PredictiveStudio/components/ps-production.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +3 -2
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js +2 -2
- package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js.map +1 -1
- package/dist/TelephonyOperations/telephony-operations-agent-context.d.ts +107 -0
- package/dist/TelephonyOperations/telephony-operations-agent-context.d.ts.map +1 -0
- package/dist/TelephonyOperations/telephony-operations-agent-context.js +216 -0
- package/dist/TelephonyOperations/telephony-operations-agent-context.js.map +1 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts +58 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts.map +1 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.js +812 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.js.map +1 -0
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +7 -7
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/WorkQueue/components/work-queue-bindings.component.d.ts +37 -0
- package/dist/WorkQueue/components/work-queue-bindings.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-bindings.component.js +210 -0
- package/dist/WorkQueue/components/work-queue-bindings.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.d.ts +70 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.js +496 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.d.ts +22 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.js +99 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-overview.component.d.ts +29 -0
- package/dist/WorkQueue/components/work-queue-overview.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-overview.component.js +278 -0
- package/dist/WorkQueue/components/work-queue-overview.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.d.ts +59 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.js +359 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.js.map +1 -0
- package/dist/WorkQueue/services/work-queue-operator.service.d.ts +22 -0
- package/dist/WorkQueue/services/work-queue-operator.service.d.ts.map +1 -0
- package/dist/WorkQueue/services/work-queue-operator.service.js +44 -0
- package/dist/WorkQueue/services/work-queue-operator.service.js.map +1 -0
- package/dist/WorkQueue/work-queue-agent-context.d.ts +67 -0
- package/dist/WorkQueue/work-queue-agent-context.d.ts.map +1 -0
- package/dist/WorkQueue/work-queue-agent-context.js +119 -0
- package/dist/WorkQueue/work-queue-agent-context.js.map +1 -0
- package/dist/WorkQueue/work-queue-dashboard.component.d.ts +94 -0
- package/dist/WorkQueue/work-queue-dashboard.component.d.ts.map +1 -0
- package/dist/WorkQueue/work-queue-dashboard.component.js +545 -0
- package/dist/WorkQueue/work-queue-dashboard.component.js.map +1 -0
- package/dist/WorkQueue/work-queue-types.d.ts +40 -0
- package/dist/WorkQueue/work-queue-types.d.ts.map +1 -0
- package/dist/WorkQueue/work-queue-types.js +2 -0
- package/dist/WorkQueue/work-queue-types.js.map +1 -0
- package/dist/ai-dashboards.module.d.ts +21 -20
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +4 -1
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +69 -61
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +29 -2
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/data-explorer-dashboards.module.d.ts +1 -1
- package/dist/data-explorer-dashboards.module.d.ts.map +1 -1
- package/dist/data-explorer-dashboards.module.js +3 -1
- package/dist/data-explorer-dashboards.module.js.map +1 -1
- package/dist/module.d.ts +14 -13
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +6 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +9 -0
- package/dist/public-api.js.map +1 -1
- package/dist/shared/dashboard-library-changes.d.ts +23 -0
- package/dist/shared/dashboard-library-changes.d.ts.map +1 -0
- package/dist/shared/dashboard-library-changes.js +26 -0
- package/dist/shared/dashboard-library-changes.js.map +1 -0
- package/dist/shared/dashboard-owner-names.d.ts +17 -0
- package/dist/shared/dashboard-owner-names.d.ts.map +1 -0
- package/dist/shared/dashboard-owner-names.js +65 -0
- package/dist/shared/dashboard-owner-names.js.map +1 -0
- package/dist/shared/dashboard-recents.d.ts +34 -0
- package/dist/shared/dashboard-recents.d.ts.map +1 -0
- package/dist/shared/dashboard-recents.js +87 -0
- package/dist/shared/dashboard-recents.js.map +1 -0
- package/dist/shared/dashboards-app-install.d.ts +59 -0
- package/dist/shared/dashboards-app-install.d.ts.map +1 -0
- package/dist/shared/dashboards-app-install.js +97 -0
- package/dist/shared/dashboards-app-install.js.map +1 -0
- package/dist/shared/dashboards-app.helpers.d.ts +42 -0
- package/dist/shared/dashboards-app.helpers.d.ts.map +1 -0
- package/dist/shared/dashboards-app.helpers.js +143 -0
- package/dist/shared/dashboards-app.helpers.js.map +1 -0
- package/dist/work-queue-dashboards.module.d.ts +23 -0
- package/dist/work-queue-dashboards.module.d.ts.map +1 -0
- package/dist/work-queue-dashboards.module.js +92 -0
- package/dist/work-queue-dashboards.module.js.map +1 -0
- package/package.json +73 -66
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Placement and keyboard helpers for Home's fixed-position menus: the pin options menu and the
|
|
3
|
+
* Dashboards switcher. Pure, so they are tested without a browser.
|
|
4
|
+
*/
|
|
5
|
+
/** The trigger's box in viewport pixels. */
|
|
6
|
+
export interface MenuAnchor {
|
|
7
|
+
Left: number;
|
|
8
|
+
Right: number;
|
|
9
|
+
Top: number;
|
|
10
|
+
Bottom: number;
|
|
11
|
+
}
|
|
12
|
+
/** The viewport size in pixels. */
|
|
13
|
+
export interface MenuViewport {
|
|
14
|
+
Width: number;
|
|
15
|
+
Height: number;
|
|
16
|
+
}
|
|
17
|
+
/** Where a fixed-position menu goes, in viewport pixels. */
|
|
18
|
+
export interface MenuPlacement {
|
|
19
|
+
Left: number;
|
|
20
|
+
Top: number;
|
|
21
|
+
/** The tallest the menu can be: the room on its side of the trigger, and never less than 120px. */
|
|
22
|
+
MaxHeight: number;
|
|
23
|
+
}
|
|
24
|
+
/** The box of an element, as a menu anchor. */
|
|
25
|
+
export declare function MenuAnchorOf(element: Element): MenuAnchor;
|
|
26
|
+
/**
|
|
27
|
+
* Places a menu under its trigger. 'right' lines up the right edges; when that passes the viewport's left margin, the
|
|
28
|
+
* menu lines up with the trigger's left edge instead. The menu stays inside the side margins. With a known height (the
|
|
29
|
+
* menu's full height), a menu that does not fit below opens above the trigger when it fits there. `MaxHeight` is the
|
|
30
|
+
* room on the side the menu opens to: down to the bottom margin, or up to the top margin.
|
|
31
|
+
*/
|
|
32
|
+
export declare function PlaceMenu(anchor: MenuAnchor, width: number, height: number, align: 'left' | 'right', viewport: MenuViewport): MenuPlacement;
|
|
33
|
+
/**
|
|
34
|
+
* The menu row to focus for ArrowDown, ArrowUp, Home or End. `current` is the focused row, or -1 when focus is outside
|
|
35
|
+
* the rows (the filter box). Home and End only act on a row, so they still move the caret in the filter box.
|
|
36
|
+
*/
|
|
37
|
+
export declare function NextMenuFocusIndex(key: string, current: number, count: number): number | null;
|
|
38
|
+
//# sourceMappingURL=home-menus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-menus.d.ts","sourceRoot":"","sources":["../../src/Home/home-menus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4CAA4C;AAC5C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;CACnB;AAOD,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAGzD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,QAAQ,EAAE,YAAY,GAAG,aAAa,CAW3I;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB7F"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Placement and keyboard helpers for Home's fixed-position menus: the pin options menu and the
|
|
3
|
+
* Dashboards switcher. Pure, so they are tested without a browser.
|
|
4
|
+
*/
|
|
5
|
+
const MENU_GAP = 4;
|
|
6
|
+
const VIEWPORT_MARGIN = 8;
|
|
7
|
+
/** The smallest max height a menu gets, so a menu with little room stays usable. */
|
|
8
|
+
const MENU_MIN_MAX_HEIGHT = 120;
|
|
9
|
+
/** The box of an element, as a menu anchor. */
|
|
10
|
+
export function MenuAnchorOf(element) {
|
|
11
|
+
const rect = element.getBoundingClientRect();
|
|
12
|
+
return { Left: rect.left, Right: rect.right, Top: rect.top, Bottom: rect.bottom };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Places a menu under its trigger. 'right' lines up the right edges; when that passes the viewport's left margin, the
|
|
16
|
+
* menu lines up with the trigger's left edge instead. The menu stays inside the side margins. With a known height (the
|
|
17
|
+
* menu's full height), a menu that does not fit below opens above the trigger when it fits there. `MaxHeight` is the
|
|
18
|
+
* room on the side the menu opens to: down to the bottom margin, or up to the top margin.
|
|
19
|
+
*/
|
|
20
|
+
export function PlaceMenu(anchor, width, height, align, viewport) {
|
|
21
|
+
let left = align === 'right' ? anchor.Right - width : anchor.Left;
|
|
22
|
+
if (align === 'right' && left < VIEWPORT_MARGIN) {
|
|
23
|
+
left = anchor.Left;
|
|
24
|
+
}
|
|
25
|
+
left = Math.max(VIEWPORT_MARGIN, Math.min(left, viewport.Width - width - VIEWPORT_MARGIN));
|
|
26
|
+
const below = anchor.Bottom + MENU_GAP;
|
|
27
|
+
const above = anchor.Top - MENU_GAP - height;
|
|
28
|
+
const opensAbove = height > 0 && below + height > viewport.Height - VIEWPORT_MARGIN && above >= VIEWPORT_MARGIN;
|
|
29
|
+
const room = opensAbove ? anchor.Top - MENU_GAP - VIEWPORT_MARGIN : viewport.Height - VIEWPORT_MARGIN - below;
|
|
30
|
+
return { Left: left, Top: opensAbove ? above : below, MaxHeight: Math.max(MENU_MIN_MAX_HEIGHT, room) };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The menu row to focus for ArrowDown, ArrowUp, Home or End. `current` is the focused row, or -1 when focus is outside
|
|
34
|
+
* the rows (the filter box). Home and End only act on a row, so they still move the caret in the filter box.
|
|
35
|
+
*/
|
|
36
|
+
export function NextMenuFocusIndex(key, current, count) {
|
|
37
|
+
if (count === 0) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
switch (key) {
|
|
41
|
+
case 'ArrowDown':
|
|
42
|
+
return current < 0 ? 0 : (current + 1) % count;
|
|
43
|
+
case 'ArrowUp':
|
|
44
|
+
return current < 0 ? count - 1 : (current - 1 + count) % count;
|
|
45
|
+
case 'Home':
|
|
46
|
+
return current < 0 ? null : 0;
|
|
47
|
+
case 'End':
|
|
48
|
+
return current < 0 ? null : count - 1;
|
|
49
|
+
default:
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=home-menus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-menus.js","sourceRoot":"","sources":["../../src/Home/home-menus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwBH,MAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,+CAA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AAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC;AACzG,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,OAAe,EAAE,KAAa;IAC5E,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,WAAW;YACd,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QACjD,KAAK,SAAS;YACZ,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;QACjE,KAAK,MAAM;YACT,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,KAAK,KAAK;YACR,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QACxC;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC","sourcesContent":["/**\n * @fileoverview Placement and keyboard helpers for Home's fixed-position menus: the pin options menu and the\n * Dashboards switcher. Pure, so they are tested without a browser.\n */\n\n/** The trigger's box in viewport pixels. */\nexport interface MenuAnchor {\n Left: number;\n Right: number;\n Top: number;\n Bottom: number;\n}\n\n/** The viewport size in pixels. */\nexport interface MenuViewport {\n Width: number;\n Height: number;\n}\n\n/** Where a fixed-position menu goes, in viewport pixels. */\nexport interface MenuPlacement {\n Left: number;\n Top: number;\n /** The tallest the menu can be: the room on its side of the trigger, and never less than 120px. */\n MaxHeight: number;\n}\n\nconst MENU_GAP = 4;\nconst VIEWPORT_MARGIN = 8;\n/** The smallest max height a menu gets, so a menu with little room stays usable. */\nconst MENU_MIN_MAX_HEIGHT = 120;\n\n/** The box of an element, as a menu anchor. */\nexport function MenuAnchorOf(element: Element): MenuAnchor {\n const rect = element.getBoundingClientRect();\n return { Left: rect.left, Right: rect.right, Top: rect.top, Bottom: rect.bottom };\n}\n\n/**\n * Places a menu under its trigger. 'right' lines up the right edges; when that passes the viewport's left margin, the\n * menu lines up with the trigger's left edge instead. The menu stays inside the side margins. With a known height (the\n * menu's full height), a menu that does not fit below opens above the trigger when it fits there. `MaxHeight` is the\n * room on the side the menu opens to: down to the bottom margin, or up to the top margin.\n */\nexport function PlaceMenu(anchor: MenuAnchor, width: number, height: number, align: 'left' | 'right', viewport: MenuViewport): MenuPlacement {\n let left = align === 'right' ? anchor.Right - width : anchor.Left;\n if (align === 'right' && left < VIEWPORT_MARGIN) {\n left = anchor.Left;\n }\n left = Math.max(VIEWPORT_MARGIN, Math.min(left, viewport.Width - width - VIEWPORT_MARGIN));\n const below = anchor.Bottom + MENU_GAP;\n const above = anchor.Top - MENU_GAP - height;\n const opensAbove = height > 0 && below + height > viewport.Height - VIEWPORT_MARGIN && above >= VIEWPORT_MARGIN;\n const room = opensAbove ? anchor.Top - MENU_GAP - VIEWPORT_MARGIN : viewport.Height - VIEWPORT_MARGIN - below;\n return { Left: left, Top: opensAbove ? above : below, MaxHeight: Math.max(MENU_MIN_MAX_HEIGHT, room) };\n}\n\n/**\n * The menu row to focus for ArrowDown, ArrowUp, Home or End. `current` is the focused row, or -1 when focus is outside\n * the rows (the filter box). Home and End only act on a row, so they still move the caret in the filter box.\n */\nexport function NextMenuFocusIndex(key: string, current: number, count: number): number | null {\n if (count === 0) {\n return null;\n }\n switch (key) {\n case 'ArrowDown':\n return current < 0 ? 0 : (current + 1) % count;\n case 'ArrowUp':\n return current < 0 ? count - 1 : (current - 1 + count) % count;\n case 'Home':\n return current < 0 ? null : 0;\n case 'End':\n return current < 0 ? null : count - 1;\n default:\n return null;\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Pure helpers for the dashboards pinned to Home: the type of a pin, the dashboard a pin opens, the
|
|
3
|
+
* names dashboard pins show, and the list, filter and lookup of the Dashboards switcher.
|
|
4
|
+
*/
|
|
5
|
+
import type { MJDashboardEntity } from '@memberjunction/core-entities';
|
|
6
|
+
import type { HomeAppPinnedItem } from '@memberjunction/ng-shared';
|
|
7
|
+
/** A dashboard the Dashboards switcher lists: a pinned Config dashboard the user can open. */
|
|
8
|
+
export interface HomeSwitcherDashboard {
|
|
9
|
+
ID: string;
|
|
10
|
+
Name: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A pin's resource type: its stored ResourceType when that is a known type, else its configuration's resourceType,
|
|
14
|
+
* else a type read from its configuration keys (legacy pins). Unknown pins keep what they stored.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ResolvePinResourceType(pin: HomeAppPinnedItem): string;
|
|
17
|
+
/** The dashboard a Dashboards pin opens: its dashboardId, else its recordId (a pin of an app's default dashboard tab). Null for other pins. */
|
|
18
|
+
export declare function DashboardIdOfPin(pin: HomeAppPinnedItem): string | null;
|
|
19
|
+
/** The dashboard with this id (any letter case), or null. */
|
|
20
|
+
export declare function FindDashboard<T extends {
|
|
21
|
+
ID: string;
|
|
22
|
+
}>(dashboards: readonly T[], dashboardId: string | null): T | null;
|
|
23
|
+
/** True for a dashboard Home shows in its dashboard view: a Config dashboard. Code dashboards open in a tab. */
|
|
24
|
+
export declare function CanShowInHome(dashboard: Pick<MJDashboardEntity, 'Type'>): boolean;
|
|
25
|
+
/** The names dashboard pins show, by pin id. A pin whose dashboard is not in `dashboards` is left out and shows its stored name. */
|
|
26
|
+
export declare function BuildPinDashboardNames(pins: readonly HomeAppPinnedItem[], dashboards: readonly MJDashboardEntity[]): Map<string, string>;
|
|
27
|
+
/** The pinned Config dashboards in pin order, each once. Pins whose dashboard is not in `dashboards` are left out. */
|
|
28
|
+
export declare function BuildPinnedDashboards(pins: readonly HomeAppPinnedItem[], dashboards: readonly MJDashboardEntity[]): HomeSwitcherDashboard[];
|
|
29
|
+
/** The dashboards whose name contains `query` (case-insensitive). An empty query keeps them all. */
|
|
30
|
+
export declare function FilterSwitcherDashboards(dashboards: readonly HomeSwitcherDashboard[], query: string): HomeSwitcherDashboard[];
|
|
31
|
+
/** A pinned dashboard by id (any letter case), else by name (exact, then partial). Null on a miss. */
|
|
32
|
+
export declare function ResolvePinnedDashboardReference(reference: string, dashboards: readonly HomeSwitcherDashboard[]): HomeSwitcherDashboard | null;
|
|
33
|
+
//# sourceMappingURL=home-pinned-dashboards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-pinned-dashboards.d.ts","sourceRoot":"","sources":["../../src/Home/home-pinned-dashboards.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,8FAA8F;AAC9F,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAarE;AAED,+IAA+I;AAC/I,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAItE;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAEtH;AAED,gHAAgH;AAChH,wBAAgB,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,GAAG,OAAO,CAEjF;AAED,oIAAoI;AACpI,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAAE,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxI;AAED,sHAAsH;AACtH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAAE,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,qBAAqB,EAAE,CAS3I;AAED,oGAAoG;AACpG,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,SAAS,qBAAqB,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAG7H;AAED,sGAAsG;AACtG,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAAG,qBAAqB,GAAG,IAAI,CAE7I"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
2
|
+
import { ResolveNamedRecord } from './home-agent-context';
|
|
3
|
+
const KNOWN_PIN_TYPES = ['Dashboards', 'User Views', 'Queries', 'Reports', 'Records', 'Custom', 'Actions'];
|
|
4
|
+
/**
|
|
5
|
+
* A pin's resource type: its stored ResourceType when that is a known type, else its configuration's resourceType,
|
|
6
|
+
* else a type read from its configuration keys (legacy pins). Unknown pins keep what they stored.
|
|
7
|
+
*/
|
|
8
|
+
export function ResolvePinResourceType(pin) {
|
|
9
|
+
const config = pin.Configuration;
|
|
10
|
+
if (KNOWN_PIN_TYPES.includes(pin.ResourceType))
|
|
11
|
+
return pin.ResourceType;
|
|
12
|
+
const configType = config['resourceType'];
|
|
13
|
+
if (typeof configType === 'string' && KNOWN_PIN_TYPES.includes(configType))
|
|
14
|
+
return configType;
|
|
15
|
+
if (config['dashboardId'])
|
|
16
|
+
return 'Dashboards';
|
|
17
|
+
if (config['viewId'])
|
|
18
|
+
return 'User Views';
|
|
19
|
+
if (config['queryId'])
|
|
20
|
+
return 'Queries';
|
|
21
|
+
if (config['reportId'])
|
|
22
|
+
return 'Reports';
|
|
23
|
+
if ((config['Entity'] || config['entity']) && config['recordId'])
|
|
24
|
+
return 'Records';
|
|
25
|
+
if (config['actionId'])
|
|
26
|
+
return 'Actions';
|
|
27
|
+
if (config['navItemName'])
|
|
28
|
+
return 'Custom';
|
|
29
|
+
return pin.ResourceType;
|
|
30
|
+
}
|
|
31
|
+
/** The dashboard a Dashboards pin opens: its dashboardId, else its recordId (a pin of an app's default dashboard tab). Null for other pins. */
|
|
32
|
+
export function DashboardIdOfPin(pin) {
|
|
33
|
+
if (ResolvePinResourceType(pin) !== 'Dashboards')
|
|
34
|
+
return null;
|
|
35
|
+
const id = pin.Configuration['dashboardId'] ?? pin.Configuration['recordId'];
|
|
36
|
+
return typeof id === 'string' && id.trim() ? id.trim() : null;
|
|
37
|
+
}
|
|
38
|
+
/** The dashboard with this id (any letter case), or null. */
|
|
39
|
+
export function FindDashboard(dashboards, dashboardId) {
|
|
40
|
+
return dashboardId ? dashboards.find(d => UUIDsEqual(d.ID, dashboardId)) ?? null : null;
|
|
41
|
+
}
|
|
42
|
+
/** True for a dashboard Home shows in its dashboard view: a Config dashboard. Code dashboards open in a tab. */
|
|
43
|
+
export function CanShowInHome(dashboard) {
|
|
44
|
+
return dashboard.Type === 'Config';
|
|
45
|
+
}
|
|
46
|
+
/** The names dashboard pins show, by pin id. A pin whose dashboard is not in `dashboards` is left out and shows its stored name. */
|
|
47
|
+
export function BuildPinDashboardNames(pins, dashboards) {
|
|
48
|
+
const names = new Map();
|
|
49
|
+
for (const pin of pins) {
|
|
50
|
+
const dashboard = FindDashboard(dashboards, DashboardIdOfPin(pin));
|
|
51
|
+
if (dashboard)
|
|
52
|
+
names.set(pin.Id, dashboard.Name);
|
|
53
|
+
}
|
|
54
|
+
return names;
|
|
55
|
+
}
|
|
56
|
+
/** The pinned Config dashboards in pin order, each once. Pins whose dashboard is not in `dashboards` are left out. */
|
|
57
|
+
export function BuildPinnedDashboards(pins, dashboards) {
|
|
58
|
+
const result = [];
|
|
59
|
+
for (const pin of pins) {
|
|
60
|
+
const dashboard = FindDashboard(dashboards, DashboardIdOfPin(pin));
|
|
61
|
+
if (dashboard && CanShowInHome(dashboard) && !FindDashboard(result, dashboard.ID)) {
|
|
62
|
+
result.push({ ID: dashboard.ID, Name: dashboard.Name });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
/** The dashboards whose name contains `query` (case-insensitive). An empty query keeps them all. */
|
|
68
|
+
export function FilterSwitcherDashboards(dashboards, query) {
|
|
69
|
+
const needle = query.trim().toLowerCase();
|
|
70
|
+
return needle ? dashboards.filter(d => d.Name.toLowerCase().includes(needle)) : [...dashboards];
|
|
71
|
+
}
|
|
72
|
+
/** A pinned dashboard by id (any letter case), else by name (exact, then partial). Null on a miss. */
|
|
73
|
+
export function ResolvePinnedDashboardReference(reference, dashboards) {
|
|
74
|
+
return FindDashboard(dashboards, reference.trim()) ?? ResolveNamedRecord(reference, dashboards);
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=home-pinned-dashboards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-pinned-dashboards.js","sourceRoot":"","sources":["../../src/Home/home-pinned-dashboards.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE3G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,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,wBAAwB,CAAC,UAA4C,EAAE,KAAa;IAClG,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1C,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;AAClG,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,+BAA+B,CAAC,SAAiB,EAAE,UAA4C;IAC7G,OAAO,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAClG,CAAC","sourcesContent":["/**\n * @fileoverview Pure helpers for the dashboards pinned to Home: the type of a pin, the dashboard a pin opens, the\n * names dashboard pins show, and the list, filter and lookup of the Dashboards switcher.\n */\nimport type { MJDashboardEntity } from '@memberjunction/core-entities';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport type { HomeAppPinnedItem } from '@memberjunction/ng-shared';\nimport { ResolveNamedRecord } from './home-agent-context';\n\n/** A dashboard the Dashboards switcher lists: a pinned Config dashboard the user can open. */\nexport interface HomeSwitcherDashboard {\n ID: string;\n Name: string;\n}\n\nconst KNOWN_PIN_TYPES = ['Dashboards', 'User Views', 'Queries', 'Reports', 'Records', 'Custom', 'Actions'];\n\n/**\n * A pin's resource type: its stored ResourceType when that is a known type, else its configuration's resourceType,\n * else a type read from its configuration keys (legacy pins). Unknown pins keep what they stored.\n */\nexport function ResolvePinResourceType(pin: HomeAppPinnedItem): string {\n const config = pin.Configuration;\n if (KNOWN_PIN_TYPES.includes(pin.ResourceType)) return pin.ResourceType;\n const configType = config['resourceType'];\n if (typeof configType === 'string' && KNOWN_PIN_TYPES.includes(configType)) return configType;\n if (config['dashboardId']) return 'Dashboards';\n if (config['viewId']) return 'User Views';\n if (config['queryId']) return 'Queries';\n if (config['reportId']) return 'Reports';\n if ((config['Entity'] || config['entity']) && config['recordId']) return 'Records';\n if (config['actionId']) return 'Actions';\n if (config['navItemName']) return 'Custom';\n return pin.ResourceType;\n}\n\n/** The dashboard a Dashboards pin opens: its dashboardId, else its recordId (a pin of an app's default dashboard tab). Null for other pins. */\nexport function DashboardIdOfPin(pin: HomeAppPinnedItem): string | null {\n if (ResolvePinResourceType(pin) !== 'Dashboards') return null;\n const id = pin.Configuration['dashboardId'] ?? pin.Configuration['recordId'];\n return typeof id === 'string' && id.trim() ? id.trim() : null;\n}\n\n/** The dashboard with this id (any letter case), or null. */\nexport function FindDashboard<T extends { ID: string }>(dashboards: readonly T[], dashboardId: string | null): T | null {\n return dashboardId ? dashboards.find(d => UUIDsEqual(d.ID, dashboardId)) ?? null : null;\n}\n\n/** True for a dashboard Home shows in its dashboard view: a Config dashboard. Code dashboards open in a tab. */\nexport function CanShowInHome(dashboard: Pick<MJDashboardEntity, 'Type'>): boolean {\n return dashboard.Type === 'Config';\n}\n\n/** The names dashboard pins show, by pin id. A pin whose dashboard is not in `dashboards` is left out and shows its stored name. */\nexport function BuildPinDashboardNames(pins: readonly HomeAppPinnedItem[], dashboards: readonly MJDashboardEntity[]): Map<string, string> {\n const names = new Map<string, string>();\n for (const pin of pins) {\n const dashboard = FindDashboard(dashboards, DashboardIdOfPin(pin));\n if (dashboard) names.set(pin.Id, dashboard.Name);\n }\n return names;\n}\n\n/** The pinned Config dashboards in pin order, each once. Pins whose dashboard is not in `dashboards` are left out. */\nexport function BuildPinnedDashboards(pins: readonly HomeAppPinnedItem[], dashboards: readonly MJDashboardEntity[]): HomeSwitcherDashboard[] {\n const result: HomeSwitcherDashboard[] = [];\n for (const pin of pins) {\n const dashboard = FindDashboard(dashboards, DashboardIdOfPin(pin));\n if (dashboard && CanShowInHome(dashboard) && !FindDashboard(result, dashboard.ID)) {\n result.push({ ID: dashboard.ID, Name: dashboard.Name });\n }\n }\n return result;\n}\n\n/** The dashboards whose name contains `query` (case-insensitive). An empty query keeps them all. */\nexport function FilterSwitcherDashboards(dashboards: readonly HomeSwitcherDashboard[], query: string): HomeSwitcherDashboard[] {\n const needle = query.trim().toLowerCase();\n return needle ? dashboards.filter(d => d.Name.toLowerCase().includes(needle)) : [...dashboards];\n}\n\n/** A pinned dashboard by id (any letter case), else by name (exact, then partial). Null on a miss. */\nexport function ResolvePinnedDashboardReference(reference: string, dashboards: readonly HomeSwitcherDashboard[]): HomeSwitcherDashboard | null {\n return FindDashboard(dashboards, reference.trim()) ?? ResolveNamedRecord(reference, dashboards);\n}\n"]}
|
|
@@ -5,7 +5,11 @@ import { PSProcessRunRow } from '../predictive-studio.view-models';
|
|
|
5
5
|
import { StatusVariant } from '../production-distribution';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/** A model's deployment state, derived purely from cached bindings + Record Processes. */
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* `needs-training` overrides the others: a model with no trained artifact can't score, so it is
|
|
10
|
+
* never shown as Bound/Scheduled (which would promise results a run can't deliver).
|
|
11
|
+
*/
|
|
12
|
+
type DeployState = 'needs-training' | 'bound' | 'scheduled' | 'idle';
|
|
9
13
|
/** One scoring binding shown in a model's deployment detail. */
|
|
10
14
|
interface BindingVM {
|
|
11
15
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ps-production.component.d.ts","sourceRoot":"","sources":["../../../src/PredictiveStudio/components/ps-production.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,SAAS,EAAE,MAAM,EAA6B,MAAM,eAAe,CAAC;AASlH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAoD,MAAM,kCAAkC,CAAC;AACrH,OAAO,EAAgB,aAAa,EAAE,MAAM,4BAA4B,CAAC;;AAIzE,0FAA0F;AAC1F,KAAK,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ps-production.component.d.ts","sourceRoot":"","sources":["../../../src/PredictiveStudio/components/ps-production.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,SAAS,EAAE,MAAM,EAA6B,MAAM,eAAe,CAAC;AASlH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAoD,MAAM,kCAAkC,CAAC;AACrH,OAAO,EAAgB,aAAa,EAAE,MAAM,4BAA4B,CAAC;;AAIzE,0FAA0F;AAC1F;;;GAGG;AACH,KAAK,WAAW,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAErE,gEAAgE;AAChE,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,sGAAsG;AACtG,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,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