@iblai/iblai-js 2.66.1 → 2.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-layer/playwright/evaluation-tab-helpers.d.ts +3 -3
- package/dist/data-layer/playwright/tasks-tab-helpers.d.ts +1 -1
- package/dist/playwright/index.cjs +4 -4
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +4 -4
- package/dist/playwright/index.esm.js +4 -4
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/evaluation-tab-helpers.d.ts +3 -3
- package/dist/playwright/playwright/tasks-tab-helpers.d.ts +1 -1
- package/dist/security/playwright/evaluation-tab-helpers.d.ts +3 -3
- package/dist/security/playwright/tasks-tab-helpers.d.ts +1 -1
- package/dist/web-containers/playwright/evaluation-tab-helpers.d.ts +3 -3
- package/dist/web-containers/playwright/tasks-tab-helpers.d.ts +1 -1
- package/dist/web-containers/source/activity-empty-state.js +14 -0
- package/dist/web-containers/source/activity-empty-state.js.map +1 -0
- package/dist/web-containers/source/activity-layout.js +63 -0
- package/dist/web-containers/source/activity-layout.js.map +1 -0
- package/dist/web-containers/source/activity-pager.js +23 -0
- package/dist/web-containers/source/activity-pager.js.map +1 -0
- package/dist/web-containers/source/activity-phone.js +92 -0
- package/dist/web-containers/source/activity-phone.js.map +1 -0
- package/dist/web-containers/source/activity-status-icon.js +21 -0
- package/dist/web-containers/source/activity-status-icon.js.map +1 -0
- package/dist/web-containers/source/activity-tab/activity-empty-state.js +14 -0
- package/dist/web-containers/source/activity-tab/activity-empty-state.js.map +1 -0
- package/dist/web-containers/source/activity-tab/activity-layout.js +63 -0
- package/dist/web-containers/source/activity-tab/activity-layout.js.map +1 -0
- package/dist/web-containers/source/activity-tab/activity-pager.js +23 -0
- package/dist/web-containers/source/activity-tab/activity-pager.js.map +1 -0
- package/dist/web-containers/source/activity-tab/activity-phone.js +92 -0
- package/dist/web-containers/source/activity-tab/activity-phone.js.map +1 -0
- package/dist/web-containers/source/activity-tab/activity-status-icon.js +21 -0
- package/dist/web-containers/source/activity-tab/activity-status-icon.js.map +1 -0
- package/dist/web-containers/source/activity-tab/use-fit-rows.js +74 -0
- package/dist/web-containers/source/activity-tab/use-fit-rows.js.map +1 -0
- package/dist/web-containers/source/benchmark-combobox.js +19 -12
- package/dist/web-containers/source/benchmark-combobox.js.map +1 -1
- package/dist/web-containers/source/components/activity-tab/activity-empty-state.js +14 -0
- package/dist/web-containers/source/components/activity-tab/activity-empty-state.js.map +1 -0
- package/dist/web-containers/source/components/activity-tab/activity-layout.js +63 -0
- package/dist/web-containers/source/components/activity-tab/activity-layout.js.map +1 -0
- package/dist/web-containers/source/components/activity-tab/activity-pager.js +23 -0
- package/dist/web-containers/source/components/activity-tab/activity-pager.js.map +1 -0
- package/dist/web-containers/source/components/activity-tab/activity-phone.js +92 -0
- package/dist/web-containers/source/components/activity-tab/activity-phone.js.map +1 -0
- package/dist/web-containers/source/components/activity-tab/activity-status-icon.js +21 -0
- package/dist/web-containers/source/components/activity-tab/activity-status-icon.js.map +1 -0
- package/dist/web-containers/source/components/activity-tab/use-fit-rows.js +74 -0
- package/dist/web-containers/source/components/activity-tab/use-fit-rows.js.map +1 -0
- package/dist/web-containers/source/components/ibl-pagination.js +6 -6
- package/dist/web-containers/source/components/ibl-pagination.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.js +19 -12
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/index.js +134 -55
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/index.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/labels.js +13 -3
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab/labels.js +10 -0
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js +15 -2
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab.js +110 -58
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/labels.js +7 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/task-list.js +40 -21
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/task-list.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/task-logs-panel.js +29 -16
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/task-logs-panel.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/task-metrics-cards.js +11 -9
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/task-metrics-cards.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js +23 -4
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js +21 -7
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab.js +40 -6
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.js +19 -12
- package/dist/web-containers/source/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/evaluation-tab/index.js +134 -55
- package/dist/web-containers/source/edit-mentor-modal/tabs/evaluation-tab/index.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/evaluation-tab/labels.js +13 -3
- package/dist/web-containers/source/edit-mentor-modal/tabs/evaluation-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab/labels.js +10 -0
- package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js +15 -2
- package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab.js +110 -58
- package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/labels.js +7 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/task-list.js +40 -21
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/task-list.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/task-logs-panel.js +29 -16
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/task-logs-panel.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/task-metrics-cards.js +11 -9
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/task-metrics-cards.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js +23 -4
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js +21 -7
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab.js +40 -6
- package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab.js.map +1 -1
- package/dist/web-containers/source/en.json.js +33 -11
- package/dist/web-containers/source/en.json.js.map +1 -1
- package/dist/web-containers/source/es.json.js +29 -7
- package/dist/web-containers/source/es.json.js.map +1 -1
- package/dist/web-containers/source/evaluation-tab/benchmark-combobox.js +19 -12
- package/dist/web-containers/source/evaluation-tab/benchmark-combobox.js.map +1 -1
- package/dist/web-containers/source/evaluation-tab/index.js +134 -55
- package/dist/web-containers/source/evaluation-tab/index.js.map +1 -1
- package/dist/web-containers/source/evaluation-tab/labels.js +13 -3
- package/dist/web-containers/source/evaluation-tab/labels.js.map +1 -1
- package/dist/web-containers/source/fr.json.js +29 -7
- package/dist/web-containers/source/fr.json.js.map +1 -1
- package/dist/web-containers/source/human-support-tab/labels.js +10 -0
- package/dist/web-containers/source/human-support-tab/labels.js.map +1 -1
- package/dist/web-containers/source/human-support-tab/use-support-tickets-with-pagination.js +15 -2
- package/dist/web-containers/source/human-support-tab/use-support-tickets-with-pagination.js.map +1 -1
- package/dist/web-containers/source/human-support-tab.js +110 -58
- package/dist/web-containers/source/human-support-tab.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/en.json.js +33 -11
- package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/es.json.js +29 -7
- package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/fr.json.js +29 -7
- package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/zh.json.js +29 -7
- package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/ibl-pagination.js +6 -6
- package/dist/web-containers/source/ibl-pagination.js.map +1 -1
- package/dist/web-containers/source/messages/en.json.js +33 -11
- package/dist/web-containers/source/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/messages/es.json.js +29 -7
- package/dist/web-containers/source/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/messages/fr.json.js +29 -7
- package/dist/web-containers/source/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/messages/zh.json.js +29 -7
- package/dist/web-containers/source/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.js +19 -12
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/evaluation-tab/index.js +134 -55
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/evaluation-tab/index.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/evaluation-tab/labels.js +13 -3
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/evaluation-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab/labels.js +10 -0
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js +15 -2
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab.js +110 -58
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/labels.js +7 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/task-list.js +40 -21
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/task-list.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/task-logs-panel.js +29 -16
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/task-logs-panel.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/task-metrics-cards.js +11 -9
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/task-metrics-cards.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js +23 -4
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js +21 -7
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab.js +40 -6
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/evaluation-tab/benchmark-combobox.js +19 -12
- package/dist/web-containers/source/tabs/evaluation-tab/benchmark-combobox.js.map +1 -1
- package/dist/web-containers/source/tabs/evaluation-tab/index.js +134 -55
- package/dist/web-containers/source/tabs/evaluation-tab/index.js.map +1 -1
- package/dist/web-containers/source/tabs/evaluation-tab/labels.js +13 -3
- package/dist/web-containers/source/tabs/evaluation-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/human-support-tab/labels.js +10 -0
- package/dist/web-containers/source/tabs/human-support-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/human-support-tab/use-support-tickets-with-pagination.js +15 -2
- package/dist/web-containers/source/tabs/human-support-tab/use-support-tickets-with-pagination.js.map +1 -1
- package/dist/web-containers/source/tabs/human-support-tab.js +110 -58
- package/dist/web-containers/source/tabs/human-support-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab/labels.js +7 -1
- package/dist/web-containers/source/tabs/tasks-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab/task-list.js +40 -21
- package/dist/web-containers/source/tabs/tasks-tab/task-list.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab/task-logs-panel.js +29 -16
- package/dist/web-containers/source/tabs/tasks-tab/task-logs-panel.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab/task-metrics-cards.js +11 -9
- package/dist/web-containers/source/tabs/tasks-tab/task-metrics-cards.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab/tasks-tab-content.js +23 -4
- package/dist/web-containers/source/tabs/tasks-tab/tasks-tab-content.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab/tasks-tab-toolbar.js +21 -7
- package/dist/web-containers/source/tabs/tasks-tab/tasks-tab-toolbar.js.map +1 -1
- package/dist/web-containers/source/tabs/tasks-tab.js +40 -6
- package/dist/web-containers/source/tabs/tasks-tab.js.map +1 -1
- package/dist/web-containers/source/task-list.js +40 -21
- package/dist/web-containers/source/task-list.js.map +1 -1
- package/dist/web-containers/source/task-logs-panel.js +29 -16
- package/dist/web-containers/source/task-logs-panel.js.map +1 -1
- package/dist/web-containers/source/task-metrics-cards.js +11 -9
- package/dist/web-containers/source/task-metrics-cards.js.map +1 -1
- package/dist/web-containers/source/tasks-tab/labels.js +7 -1
- package/dist/web-containers/source/tasks-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tasks-tab/task-list.js +40 -21
- package/dist/web-containers/source/tasks-tab/task-list.js.map +1 -1
- package/dist/web-containers/source/tasks-tab/task-logs-panel.js +29 -16
- package/dist/web-containers/source/tasks-tab/task-logs-panel.js.map +1 -1
- package/dist/web-containers/source/tasks-tab/task-metrics-cards.js +11 -9
- package/dist/web-containers/source/tasks-tab/task-metrics-cards.js.map +1 -1
- package/dist/web-containers/source/tasks-tab/tasks-tab-content.js +23 -4
- package/dist/web-containers/source/tasks-tab/tasks-tab-content.js.map +1 -1
- package/dist/web-containers/source/tasks-tab/tasks-tab-toolbar.js +21 -7
- package/dist/web-containers/source/tasks-tab/tasks-tab-toolbar.js.map +1 -1
- package/dist/web-containers/source/tasks-tab-content.js +23 -4
- package/dist/web-containers/source/tasks-tab-content.js.map +1 -1
- package/dist/web-containers/source/tasks-tab-toolbar.js +21 -7
- package/dist/web-containers/source/tasks-tab-toolbar.js.map +1 -1
- package/dist/web-containers/source/tasks-tab.js +40 -6
- package/dist/web-containers/source/tasks-tab.js.map +1 -1
- package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/use-fit-rows.js +74 -0
- package/dist/web-containers/source/use-fit-rows.js.map +1 -0
- package/dist/web-containers/source/use-support-tickets-with-pagination.js +15 -2
- package/dist/web-containers/source/use-support-tickets-with-pagination.js.map +1 -1
- package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/zh.json.js +29 -7
- package/dist/web-containers/source/zh.json.js.map +1 -1
- package/dist/web-utils/playwright/evaluation-tab-helpers.d.ts +3 -3
- package/dist/web-utils/playwright/tasks-tab-helpers.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-status-icon.js","sources":["../../../../../../../src/components/activity-tab/activity-status-icon.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;AASA,MAAM,IAAI,GAAG,0CAA0C;AAEvD,MAAM,YAAY,GAAwC;IACxD,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,aAAA,CAAe;IAC7B,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,WAAA,CAAa;IAC3B,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,kBAAA,CAAoB;IAClC,GAAG,EAAE,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,EAAE,cAAc,EAAA,CAAQ,CAAA,EAAA,CAC5C,EAAA,CACQ,EACjBA,GAAA,CAAC,cAAc,EAAA,EACb,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,CAAC,EACb,SAAS,EAAC,mDAAmD,EAAA,QAAA,EAE5D,KAAK,EAAA,CACS,CAAA,EAAA,CACT;AAEd;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Between these widths the Edit Agent dialog scrolls as one column, so its
|
|
5
|
+
* height says nothing about how many rows belong on a page. Phones fill the
|
|
6
|
+
* screen and page their cards, so they are measured like desktops.
|
|
7
|
+
*/
|
|
8
|
+
const COLUMN_MIN_VIEWPORT_WIDTH = 768;
|
|
9
|
+
const COLUMN_MAX_VIEWPORT_WIDTH = 1023;
|
|
10
|
+
const RESIZE_SETTLE_MS = 150;
|
|
11
|
+
function rowsThatFit(height, { rowHeight, gap = 0, reserved = 0 }) {
|
|
12
|
+
return Math.max(1, Math.floor((height - reserved + gap) / (rowHeight + gap)));
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Rows of a paged list that fit the space it has, so the list never scrolls.
|
|
16
|
+
* Resizes settle before `rows` changes, which keeps a dragged window from
|
|
17
|
+
* sending one request per pixel.
|
|
18
|
+
*/
|
|
19
|
+
function useFitRows({ rowHeight, gap = 0, reserved = 0, fallback, }) {
|
|
20
|
+
const [height, setHeight] = React.useState(null);
|
|
21
|
+
const [ready, setReady] = React.useState(false);
|
|
22
|
+
const cleanupRef = React.useRef(null);
|
|
23
|
+
const ref = React.useCallback((element) => {
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = cleanupRef.current) === null || _a === void 0 ? void 0 : _a.call(cleanupRef);
|
|
26
|
+
cleanupRef.current = null;
|
|
27
|
+
if (!element)
|
|
28
|
+
return;
|
|
29
|
+
const measure = () => {
|
|
30
|
+
const measured = element.getBoundingClientRect().height;
|
|
31
|
+
const inColumn = window.innerWidth >= COLUMN_MIN_VIEWPORT_WIDTH &&
|
|
32
|
+
window.innerWidth <= COLUMN_MAX_VIEWPORT_WIDTH;
|
|
33
|
+
setHeight(measured > 0 && !inColumn ? measured : null);
|
|
34
|
+
setReady(true);
|
|
35
|
+
};
|
|
36
|
+
measure();
|
|
37
|
+
if (typeof ResizeObserver === 'undefined')
|
|
38
|
+
return;
|
|
39
|
+
let timer;
|
|
40
|
+
const observer = new ResizeObserver(() => {
|
|
41
|
+
clearTimeout(timer);
|
|
42
|
+
timer = setTimeout(measure, RESIZE_SETTLE_MS);
|
|
43
|
+
});
|
|
44
|
+
observer.observe(element);
|
|
45
|
+
cleanupRef.current = () => {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
observer.disconnect();
|
|
48
|
+
};
|
|
49
|
+
}, []);
|
|
50
|
+
return {
|
|
51
|
+
ref,
|
|
52
|
+
rows: height === null ? fallback : rowsThatFit(height, { rowHeight, gap, reserved }),
|
|
53
|
+
height,
|
|
54
|
+
ready,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** The page that still shows the first row of `page` once the page size changes. */
|
|
58
|
+
function pageForRows(page, previousRows, rows) {
|
|
59
|
+
return Math.floor(((page - 1) * previousRows) / rows) + 1;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Keeps the person on the same rows when the page size changes. Adjusts during
|
|
63
|
+
* render, so a query reading `page` and `rows` never runs with a stale pair.
|
|
64
|
+
*/
|
|
65
|
+
function usePageFollowsRows(rows, page, setPage) {
|
|
66
|
+
const [seenRows, setSeenRows] = React.useState(rows);
|
|
67
|
+
if (rows !== seenRows) {
|
|
68
|
+
setSeenRows(rows);
|
|
69
|
+
setPage(pageForRows(page, seenRows, rows));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { pageForRows, rowsThatFit, useFitRows, usePageFollowsRows };
|
|
74
|
+
//# sourceMappingURL=use-fit-rows.js.map
|
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GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AACpD,IAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,WAAW,CAAC,IAAI,CAAC;QACjB,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC5C;AACF;;;;"}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Pagination, PaginationContent, PaginationItem, PaginationPrevious, PaginationEllipsis, PaginationLink, PaginationNext } from './ui/pagination.js';
|
|
3
3
|
import { cn } from '../lib/utils.js';
|
|
4
4
|
|
|
5
|
-
const IblPagination = ({ currentPage, totalPages, onPageChange, disabled = false, disableNumberedButtons = false, }) => {
|
|
5
|
+
const IblPagination = ({ currentPage, totalPages, onPageChange, disabled = false, disableNumberedButtons = false, compact = false, }) => {
|
|
6
6
|
const getPageNumbers = () => {
|
|
7
7
|
const pages = [];
|
|
8
8
|
pages.push(1);
|
|
@@ -33,23 +33,23 @@ const IblPagination = ({ currentPage, totalPages, onPageChange, disabled = false
|
|
|
33
33
|
if (totalPages <= 1) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
|
-
return (jsx(Pagination, { children: jsxs(PaginationContent, { children: [jsx(PaginationItem, { children: jsx(PaginationPrevious, { size: "sm", onClick: (e) => {
|
|
36
|
+
return (jsx(Pagination, { children: jsxs(PaginationContent, { className: cn(compact && 'gap-0.5'), children: [jsx(PaginationItem, { children: jsx(PaginationPrevious, { size: "sm", onClick: (e) => {
|
|
37
37
|
e.preventDefault();
|
|
38
38
|
if (!disabled && currentPage > 1) {
|
|
39
39
|
onPageChange(currentPage - 1);
|
|
40
40
|
}
|
|
41
|
-
}, "aria-disabled": currentPage === 1 || disabled, className: cn('cursor-pointer', (currentPage === 1 || disabled) && 'pointer-events-none opacity-50') }) }), !disableNumberedButtons &&
|
|
42
|
-
getPageNumbers().map((page, index) => (jsx(PaginationItem, { children: page === 'ellipsis-start' || page === 'ellipsis-end' ? (jsx(PaginationEllipsis, {})) : (jsx(PaginationLink, { size: "sm", onClick: (e) => {
|
|
41
|
+
}, "aria-disabled": currentPage === 1 || disabled, className: cn('cursor-pointer', compact && 'pr-2 pl-1', (currentPage === 1 || disabled) && 'pointer-events-none opacity-50') }) }), !disableNumberedButtons &&
|
|
42
|
+
getPageNumbers().map((page, index) => (jsx(PaginationItem, { children: page === 'ellipsis-start' || page === 'ellipsis-end' ? (jsx(PaginationEllipsis, { className: cn(compact && 'w-[30px]') })) : (jsx(PaginationLink, { size: "sm", onClick: (e) => {
|
|
43
43
|
e.preventDefault();
|
|
44
44
|
if (!disabled && typeof page === 'number') {
|
|
45
45
|
onPageChange(page);
|
|
46
46
|
}
|
|
47
|
-
}, isActive: page === currentPage, className: cn('cursor-pointer', disabled && 'pointer-events-none opacity-50'), children: page })) }, index))), jsx(PaginationItem, { children: jsx(PaginationNext, { size: "sm", onClick: (e) => {
|
|
47
|
+
}, isActive: page === currentPage, className: cn('cursor-pointer', compact && 'min-w-[30px] px-2', disabled && 'pointer-events-none opacity-50'), children: page })) }, index))), jsx(PaginationItem, { children: jsx(PaginationNext, { size: "sm", onClick: (e) => {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
if (!disabled && currentPage < totalPages) {
|
|
50
50
|
onPageChange(currentPage + 1);
|
|
51
51
|
}
|
|
52
|
-
}, "aria-disabled": currentPage === totalPages || disabled, className: cn('cursor-pointer', (currentPage === totalPages || disabled) && 'pointer-events-none opacity-50') }) })] }) }));
|
|
52
|
+
}, "aria-disabled": currentPage === totalPages || disabled, className: cn('cursor-pointer', compact && 'pr-1 pl-2', (currentPage === totalPages || disabled) && 'pointer-events-none opacity-50') }) })] }) }));
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
export { IblPagination, IblPagination as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibl-pagination.js","sources":["../../../../../../src/components/ibl-pagination.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ibl-pagination.js","sources":["../../../../../../src/components/ibl-pagination.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;AAuBO,MAAM,aAAa,GAAiC,CAAC,EAC1D,WAAW,EACX,UAAU,EACV,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,sBAAsB,GAAG,KAAK,EAC9B,OAAO,GAAG,KAAK,GAChB,KAAI;IACH,MAAM,cAAc,GAAG,MAAK;QAC1B,MAAM,KAAK,GAAwB,EAAE;AAErC,QAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAEb,QAAA,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC;AAC5C,QAAA,IAAI,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC;AAEvD,QAAA,IAAI,WAAW,IAAI,CAAC,EAAE;YACpB,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC,CAAC;QACvC;AAAO,aAAA,IAAI,WAAW,IAAI,UAAU,GAAG,CAAC,EAAE;YACxC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC;QACzC;AAEA,QAAA,IAAI,SAAS,GAAG,CAAC,EAAE;AACjB,YAAA,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC;QAC9B;AAEA,QAAA,KAAK,IAAI,CAAC,GAAG,SAAS,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE;AAC/B,gBAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YACf;QACF;AAEA,QAAA,IAAI,OAAO,GAAG,UAAU,GAAG,CA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b,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,CAAC,CAAC,KAAI;gCACb,CAAC,CAAC,cAAc,EAAE;gCAClB,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;oCACzC,YAAY,CAAC,IAAI,CAAC;gCACpB;4BACF,CAAC,EACD,QAAQ,EAAE,IAAI,KAAK,WAAW,EAC9B,SAAS,EAAE,EAAE,CACX,gBAAgB,EAChB,OAAO,IAAI,mBAAmB,EAC9B,QAAQ,IAAI,gCAAgC,CAC7C,EAAA,QAAA,EAEA,IAAI,GACU,CAClB,EAAA,EArBkB,KAAK,CAsBT,CAClB,CAAC,EAEJA,GAAA,CAAC,cAAc,EAAA,EAAA,QAAA,EACbA,GAAA,CAAC,cAAc,EAAA,EACb,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,CAAC,CAAC,KAAI;4BACb,CAAC,CAAC,cAAc,EAAE;AAClB,4BAAA,IAAI,CAAC,QAAQ,IAAI,WAAW,GAAG,UAAU,EAAE;AACzC,gCAAA,YAAY,CAAC,WAAW,GAAG,CAAC,CAAC;4BAC/B;AACF,wBAAA,CAAC,EAAA,eAAA,EACc,WAAW,KAAK,UAAU,IAAI,QAAQ,EACrD,SAAS,EAAE,EAAE,CACX,gBAAgB,EAChB,OAAO,IAAI,WAAW,EACtB,CAAC,WAAW,KAAK,UAAU,IAAI,QAAQ,KAAK,gCAAgC,CAC7E,EAAA,CACD,EAAA,CACa,CAAA,EAAA,CACC,EAAA,CACT;AAEjB;;;;"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
+
import '../../../../activity-tab/activity-layout.js';
|
|
3
4
|
import { cn } from '../../../../../lib/utils.js';
|
|
4
|
-
import
|
|
5
|
+
import { useActivityPhone, ActivitySheet } from '../../../../activity-tab/activity-phone.js';
|
|
6
|
+
import '../../../../ui/pagination.js';
|
|
5
7
|
import Search from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/search.js';
|
|
6
8
|
import Check from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/check.js';
|
|
9
|
+
import ChevronsUpDown from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js';
|
|
7
10
|
|
|
8
11
|
function BenchmarkCombobox({ benchmarks, value, onChange, placeholder, searchPlaceholder, emptyMessage, disabled, }) {
|
|
12
|
+
const phone = useActivityPhone();
|
|
9
13
|
const [open, setOpen] = React__default.useState(false);
|
|
10
14
|
const [search, setSearch] = React__default.useState('');
|
|
11
15
|
const containerRef = React__default.useRef(null);
|
|
12
16
|
const inputRef = React__default.useRef(null);
|
|
13
17
|
React__default.useEffect(() => {
|
|
14
|
-
if (!open)
|
|
18
|
+
if (!open || phone)
|
|
15
19
|
return;
|
|
16
20
|
const handleOutside = (event) => {
|
|
17
21
|
const target = event.target;
|
|
@@ -21,28 +25,31 @@ function BenchmarkCombobox({ benchmarks, value, onChange, placeholder, searchPla
|
|
|
21
25
|
};
|
|
22
26
|
document.addEventListener('mousedown', handleOutside);
|
|
23
27
|
return () => document.removeEventListener('mousedown', handleOutside);
|
|
24
|
-
}, [open]);
|
|
28
|
+
}, [open, phone]);
|
|
25
29
|
React__default.useEffect(() => {
|
|
26
30
|
if (open) {
|
|
27
31
|
setSearch('');
|
|
32
|
+
if (phone)
|
|
33
|
+
return undefined;
|
|
28
34
|
const id = window.setTimeout(() => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 0);
|
|
29
35
|
return () => window.clearTimeout(id);
|
|
30
36
|
}
|
|
31
37
|
return undefined;
|
|
32
|
-
}, [open]);
|
|
38
|
+
}, [open, phone]);
|
|
33
39
|
const filtered = React__default.useMemo(() => {
|
|
34
40
|
const query = search.trim().toLowerCase();
|
|
35
41
|
if (!query)
|
|
36
42
|
return benchmarks;
|
|
37
43
|
return benchmarks.filter((name) => name.toLowerCase().includes(query));
|
|
38
44
|
}, [benchmarks, search]);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
const searchAndList = (jsxs(Fragment, { children: [jsxs("div", { className: "flex items-center border-b border-gray-200 px-3", children: [jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsx("input", { ref: inputRef, type: "text", value: search, onChange: (event) => setSearch(event.target.value), placeholder: searchPlaceholder, className: "flex h-11 w-full bg-transparent py-3 text-base placeholder:text-muted-foreground focus:outline-none md:h-9 md:text-sm" })] }), jsx("div", { className: "max-h-60 overflow-y-auto py-1", children: filtered.length === 0 ? (jsx("p", { className: "py-6 text-center text-sm text-gray-500", children: emptyMessage })) : (filtered.map((name) => {
|
|
46
|
+
const selected = name === value;
|
|
47
|
+
return (jsxs("button", { type: "button", onClick: () => {
|
|
48
|
+
onChange(name);
|
|
49
|
+
setOpen(false);
|
|
50
|
+
}, className: "relative flex min-h-11 w-full cursor-pointer items-center px-2 py-1.5 text-sm text-gray-800 hover:bg-blue-50 md:min-h-0", children: [jsx(Check, { className: cn('mr-2 h-4 w-4', selected ? 'opacity-100' : 'opacity-0') }), jsx("span", { className: "truncate", children: name })] }, name));
|
|
51
|
+
})) })] }));
|
|
52
|
+
return (jsxs("div", { ref: containerRef, className: "relative w-full flex-none md:w-64", children: [jsxs("button", { type: "button", role: "combobox", "data-testid": "benchmark-combobox", "aria-expanded": open, disabled: disabled, onClick: () => setOpen((prev) => !prev), className: "flex h-11 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-1 text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:h-9", children: [jsx("span", { className: cn('truncate font-normal', !value && 'text-muted-foreground'), children: value || placeholder }), jsx(ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })] }), phone ? (jsx(ActivitySheet, { open: open, onClose: () => setOpen(false), title: placeholder, children: jsx("div", { "data-testid": "benchmark-combobox-dropdown", children: searchAndList }) })) : (open && (jsx("div", { "data-testid": "benchmark-combobox-dropdown", className: "absolute top-full left-0 z-50 mt-1 w-full overflow-hidden rounded-md border border-gray-200 bg-white shadow-md", children: searchAndList })))] }));
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
export { BenchmarkCombobox };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchmark-combobox.js","sources":["../../../../../../../../../../src/components/modals/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"benchmark-combobox.js","sources":["../../../../../../../../../../src/components/modals/edit-mentor-modal/tabs/evaluation-tab/benchmark-combobox.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;SAkBgB,iBAAiB,CAAC,EAChC,UAAU,EACV,KAAK,EACL,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,QAAQ,GACF,EAAA;AACN,IAAA,MAAM,KAAK,GAAG,gBAAgB,EAAE;AAChC,IAAA,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAGA,cAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC7C,IAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGA,cAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC9C,MAAM,YAAY,GAAGA,cAAK,CAAC,MAAM,CAAiB,IAAI,CAAC;IACvD,MAAM,QAAQ,GAAGA,cAAK,CAAC,MAAM,CAAmB,IAAI,CAAC;AAErD,IAAAA,cAAK,CAAC,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gBAAA,CAAC,CAAC,CACH,EAAA,CACG,CAAA,EAAA,CACL,CACJ;AAED,IAAA,QACED,IAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAAA,CACnEA,IAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,EAAA,aAAA,EACH,oBAAoB,EAAA,eAAA,EACjB,IAAI,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,EACvC,SAAS,EAAC,mTAAmT,EAAA,QAAA,EAAA,CAE7TC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,CAAC,KAAK,IAAI,uBAAuB,CAAC,EAAA,QAAA,EAC3E,KAAK,IAAI,WAAW,EAAA,CAChB,EACPA,GAAA,CAAC,cAAc,EAAA,EAAC,SAAS,EAAC,6BAA6B,EAAA,CAAG,CAAA,EAAA,CACnD,EAER,KAAK,IACJA,GAAA,CAAC,aAAa,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,WAAW,EAAA,QAAA,EAC1EA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,6BAA6B,EAAA,QAAA,EAAE,aAAa,EAAA,CAAO,EAAA,CACtD,KAEhB,IAAI,KACFA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACc,6BAA6B,EACzC,SAAS,EAAC,gHAAgH,EAAA,QAAA,EAEzH,aAAa,EAAA,CACV,CACP,CACF,CAAA,EAAA,CACG;AAEV;;;;"}
|
package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/evaluation-tab/index.js
CHANGED
|
@@ -4,11 +4,16 @@ import { formatDistanceToNow } from 'date-fns';
|
|
|
4
4
|
import { toast } from 'sonner';
|
|
5
5
|
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from '../../../../ui/table.js';
|
|
6
6
|
import { Button } from '../../../../ui/button.js';
|
|
7
|
-
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent,
|
|
7
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem } from '../../../../ui/dropdown-menu.js';
|
|
8
8
|
import { Spinner } from '../../../../spinner/index.js';
|
|
9
9
|
import { AdvancedPagination } from '../../../../advance-pagination.js';
|
|
10
|
+
import { ActivityTabBody, ActivityControlRow, ActivityControlActions, ACTIVITY_CONTROL, ActivityFitArea, ACTIVITY_METRICS } from '../../../../activity-tab/activity-layout.js';
|
|
11
|
+
import { ActivityEmptyState } from '../../../../activity-tab/activity-empty-state.js';
|
|
12
|
+
import { useActivityPhone, ActivityIntro, ActivityCard, ActivitySheet, ActivitySheetOption } from '../../../../activity-tab/activity-phone.js';
|
|
13
|
+
import { ActivityPager } from '../../../../activity-tab/activity-pager.js';
|
|
14
|
+
import { ActivityStatusIcon } from '../../../../activity-tab/activity-status-icon.js';
|
|
15
|
+
import { useFitRows, usePageFollowsRows } from '../../../../activity-tab/use-fit-rows.js';
|
|
10
16
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '../../../../ui/dialog.js';
|
|
11
|
-
import { cn } from '../../../../../lib/utils.js';
|
|
12
17
|
import { BenchmarkCombobox } from './benchmark-combobox.js';
|
|
13
18
|
import BenchmarksTab from '../../../../profile/benchmarks/index.js';
|
|
14
19
|
import { useDispatch } from 'react-redux';
|
|
@@ -24,6 +29,7 @@ import '../../../../../packages/i18n/dist/index.esm.js';
|
|
|
24
29
|
import { resolveEvaluationTabLabels } from './labels.js';
|
|
25
30
|
export { AGENT_EVALUATION_TAB_LABELS } from './labels.js';
|
|
26
31
|
import Plus from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js';
|
|
32
|
+
import FlaskConical from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/flask-conical.js';
|
|
27
33
|
import Ellipsis from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/ellipsis.js';
|
|
28
34
|
import ChartColumn from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/chart-column.js';
|
|
29
35
|
import Sparkles from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/sparkles.js';
|
|
@@ -32,17 +38,24 @@ import Activity from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_rea
|
|
|
32
38
|
import Download from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/download.js';
|
|
33
39
|
import Trash2 from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/trash-2.js';
|
|
34
40
|
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
const DEFAULT_RUNS_PER_PAGE = 10;
|
|
42
|
+
const EVAL_ROW_HEIGHT = 57;
|
|
43
|
+
const EVAL_CARD_HEIGHT = 106;
|
|
44
|
+
const STATUS_SHAPE = {
|
|
45
|
+
completed: 'check',
|
|
46
|
+
failed: 'cross',
|
|
47
|
+
pending: 'clock',
|
|
48
|
+
in_progress: 'spin',
|
|
49
|
+
};
|
|
50
|
+
function statusWord(status) {
|
|
51
|
+
const words = status.replace(/_/g, ' ');
|
|
52
|
+
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
53
|
+
}
|
|
54
|
+
function StatusIcon({ status }) {
|
|
55
|
+
var _a;
|
|
56
|
+
if (!status)
|
|
57
|
+
return jsx("span", { className: "text-gray-500", children: "\u2014" });
|
|
58
|
+
return (jsx(ActivityStatusIcon, { shape: (_a = STATUS_SHAPE[status]) !== null && _a !== void 0 ? _a : 'dot', label: statusWord(status), accessibleName: status.toUpperCase(), side: "right" }));
|
|
46
59
|
}
|
|
47
60
|
function AgentEvaluationTab({ userIsStudent: userIsStudentProp, ...props }) {
|
|
48
61
|
var _a;
|
|
@@ -67,6 +80,17 @@ function AgentEvaluationTabContent({ labels: labelsOverride, PaginationComponent
|
|
|
67
80
|
const [exportingRun, setExportingRun] = React__default.useState(null);
|
|
68
81
|
const [selectedBenchmark, setSelectedBenchmark] = React__default.useState('');
|
|
69
82
|
const [page, setPage] = React__default.useState(1);
|
|
83
|
+
const [menuRunName, setMenuRunName] = React__default.useState(null);
|
|
84
|
+
const phone = useActivityPhone();
|
|
85
|
+
const fit = useFitRows({
|
|
86
|
+
rowHeight: phone ? EVAL_CARD_HEIGHT : EVAL_ROW_HEIGHT,
|
|
87
|
+
gap: phone ? ACTIVITY_METRICS.phoneCardGap : 0,
|
|
88
|
+
reserved: phone
|
|
89
|
+
? ACTIVITY_METRICS.phonePager
|
|
90
|
+
: ACTIVITY_METRICS.tableChrome + ACTIVITY_METRICS.pagerBelow,
|
|
91
|
+
fallback: DEFAULT_RUNS_PER_PAGE,
|
|
92
|
+
});
|
|
93
|
+
usePageFollowsRows(fit.rows, page, setPage);
|
|
70
94
|
const [exportRun] = useExportEvalRunMutation();
|
|
71
95
|
const { data: datasetsData, isLoading: isDatasetsLoading } = useListEvalDatasetsQuery({
|
|
72
96
|
org: tenantKey,
|
|
@@ -85,8 +109,8 @@ function AgentEvaluationTabContent({ labels: labelsOverride, PaginationComponent
|
|
|
85
109
|
userId: username,
|
|
86
110
|
datasetName: selectedBenchmark,
|
|
87
111
|
page,
|
|
88
|
-
limit:
|
|
89
|
-
}, { skip: !selectedBenchmark });
|
|
112
|
+
limit: fit.rows,
|
|
113
|
+
}, { skip: !selectedBenchmark || !fit.ready });
|
|
90
114
|
// Runs are benchmark-scoped server-side, but a benchmark can be evaluated
|
|
91
115
|
// against multiple agents. Filter client-side to the agent we're editing:
|
|
92
116
|
// - completed runs carry `metadata.mentor_unique_id` → strict match
|
|
@@ -101,7 +125,7 @@ function AgentEvaluationTabContent({ labels: labelsOverride, PaginationComponent
|
|
|
101
125
|
return runMentor === mentorId;
|
|
102
126
|
return !!username && run.username === username;
|
|
103
127
|
}), [allRuns, mentorId, username]);
|
|
104
|
-
const totalPages = evalTotalPages(runsData === null || runsData === void 0 ? void 0 : runsData.count,
|
|
128
|
+
const totalPages = evalTotalPages(runsData === null || runsData === void 0 ? void 0 : runsData.count, fit.rows);
|
|
105
129
|
const [fetchRunDetail] = useLazyGetEvalRunQuery();
|
|
106
130
|
const handleCheckStatus = async (runName) => {
|
|
107
131
|
setCheckingRun(runName);
|
|
@@ -163,47 +187,102 @@ function AgentEvaluationTabContent({ labels: labelsOverride, PaginationComponent
|
|
|
163
187
|
setExportingRun(null);
|
|
164
188
|
}
|
|
165
189
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
190
|
+
const initiatedByOf = (run) => {
|
|
191
|
+
const meta = run.metadata;
|
|
192
|
+
return (run.user_email ||
|
|
193
|
+
run.username ||
|
|
194
|
+
(typeof (meta === null || meta === void 0 ? void 0 : meta.initiated_by) === 'string' ? meta.initiated_by : '—'));
|
|
195
|
+
};
|
|
196
|
+
const createdOf = (run) => {
|
|
197
|
+
const created = parseEvalDate(run.created_at);
|
|
198
|
+
return created ? formatDistanceToNow(created, { addSuffix: true }) : '—';
|
|
199
|
+
};
|
|
200
|
+
const runActions = (run) => {
|
|
201
|
+
const isCompleted = run.status === 'completed';
|
|
202
|
+
const isChecking = checkingRun === run.name;
|
|
203
|
+
const target = { datasetName: selectedBenchmark, runName: run.name };
|
|
204
|
+
const notReady = isCompleted ? undefined : labels.actions.notReadyHint;
|
|
205
|
+
return [
|
|
206
|
+
{
|
|
207
|
+
key: 'view',
|
|
208
|
+
icon: ChartColumn,
|
|
209
|
+
label: labels.actions.viewResults,
|
|
210
|
+
disabled: !isCompleted,
|
|
211
|
+
hint: notReady,
|
|
212
|
+
run: () => setSelectedRun(target),
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
key: 'evaluate',
|
|
216
|
+
icon: Sparkles,
|
|
217
|
+
label: labels.actions.evaluate,
|
|
218
|
+
disabled: !isCompleted,
|
|
219
|
+
hint: notReady,
|
|
220
|
+
run: () => setJudgeRun(target),
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
key: 'check',
|
|
224
|
+
icon: isChecking ? LoaderCircle : Activity,
|
|
225
|
+
iconClassName: isChecking ? 'animate-spin' : undefined,
|
|
226
|
+
label: isChecking ? labels.actions.checkingStatus : labels.actions.checkStatus,
|
|
227
|
+
disabled: isChecking,
|
|
228
|
+
keepOpen: true,
|
|
229
|
+
run: () => handleCheckStatus(run.name),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
key: 'export',
|
|
233
|
+
icon: Download,
|
|
234
|
+
label: exportingRun === run.name ? labels.actions.exporting : labels.actions.exportCsv,
|
|
235
|
+
disabled: !isCompleted || exportingRun === run.name,
|
|
236
|
+
hint: notReady,
|
|
237
|
+
run: () => handleExport(run.name),
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
key: 'delete',
|
|
241
|
+
icon: Trash2,
|
|
242
|
+
label: labels.actions.delete,
|
|
243
|
+
destructive: true,
|
|
244
|
+
run: () => setDeleteRun(target),
|
|
245
|
+
},
|
|
246
|
+
];
|
|
247
|
+
};
|
|
248
|
+
const menuRun = runs.find((run) => run.name === menuRunName);
|
|
249
|
+
return (jsxs(Fragment, { children: [jsx("div", { className: "hidden lg:block flex-shrink-0 p-4 border-b border-gray-200 bg-white h-[73px] flex items-center", children: jsxs("div", { children: [jsx("h3", { className: "text-base font-medium text-gray-900 mb-1", children: labels.header.title }), jsx("p", { className: "text-gray-700 text-xs", children: labels.header.description })] }) }), jsxs(ActivityTabBody, { className: "overflow-x-hidden", children: [jsx(ActivityIntro, { title: labels.header.title, text: labels.header.infoBox, children: jsx("div", { className: "flex-none rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "evaluation-info-box", children: labels.header.infoBox }) }), jsxs(ActivityControlRow, { children: [jsx(BenchmarkCombobox, { benchmarks: benchmarks.map((benchmark) => benchmark.name), value: selectedBenchmark, onChange: (next) => {
|
|
170
250
|
setSelectedBenchmark(next);
|
|
171
251
|
setPage(1);
|
|
172
|
-
}, placeholder: labels.benchmarkPicker.placeholder, searchPlaceholder: labels.benchmarkPicker.searchPlaceholder, emptyMessage: labels.benchmarkPicker.empty, disabled: isDatasetsLoading || benchmarks.length === 0 }), jsxs(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
(PaginationComponent ? (jsx(PaginationComponent, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isRunsLoading })) : (jsx(AdvancedPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage }))), showManageBenchmarks && (jsx(Dialog, { open: showManageBenchmarks, onOpenChange: setShowManageBenchmarks, children: jsxs(DialogContent, { "aria-label": "manage-benchmarks", className: "max-w-4xl max-h-[85vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: labels.manageBenchmarksModal.title }), jsx(DialogDescription, { children: labels.manageBenchmarksModal.description })] }), jsx(BenchmarksTab, { tenantKey: tenantKey, username: username })] }) })), showStart && (jsx(StartExperimentModal, { isOpen: showStart, onClose: () => setShowStart(false), tenantKey: tenantKey, username: username, mentorUniqueId: mentorId, datasetName: selectedBenchmark, onStarted: () => setPage(1), labels: labels.startExperimentModal })), selectedRun && (jsx(ExperimentDetailModal, { isOpen: !!selectedRun, onClose: () => setSelectedRun(null), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: selectedRun.datasetName, runName: selectedRun.runName, labels: labels })), judgeRun && (jsx(LlmJudgeModal, { isOpen: !!judgeRun, onClose: () => setJudgeRun(null), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: judgeRun.datasetName, runName: judgeRun.runName, labels: labels.evaluateModal })), deleteRun && (jsx(DeleteExperimentModal, { isOpen: !!deleteRun, onClose: () => setDeleteRun(null), tenantKey: tenantKey, username: username, datasetName: deleteRun.datasetName, runName: deleteRun.runName, labels: labels.deleteModal }))] })] }));
|
|
252
|
+
}, placeholder: labels.benchmarkPicker.placeholder, searchPlaceholder: labels.benchmarkPicker.searchPlaceholder, emptyMessage: labels.benchmarkPicker.empty, disabled: isDatasetsLoading || benchmarks.length === 0 }), jsxs(ActivityControlActions, { children: [jsx(Button, { variant: "outline", onClick: () => setShowManageBenchmarks(true), className: `cursor-pointer max-md:flex-1 ${ACTIVITY_CONTROL.outlineButton}`, children: labels.actions.manageBenchmarks }), jsxs(Button, { onClick: () => setShowStart(true), disabled: !selectedBenchmark, className: `cursor-pointer max-md:flex-1 ${ACTIVITY_CONTROL.primaryButton}`, children: [jsx(Plus, { className: "h-4 w-4" }), labels.actions.newExperiment] })] })] }), jsxs(ActivityFitArea, { ref: fit.ref, children: [benchmarks.length === 0 && !isDatasetsLoading && (jsx(ActivityEmptyState, { icon: FlaskConical, children: labels.emptyBenchmarks })), selectedBenchmark && !isRunsLoading && fit.ready && runs.length === 0 && (jsx(ActivityEmptyState, { icon: FlaskConical, children: labels.table.emptyState.replace('{dataset}', selectedBenchmark) })), selectedBenchmark && (isRunsLoading || !fit.ready) && (jsx("div", { className: "flex w-full flex-1 items-center justify-center py-10", children: jsx(Spinner, {}) })), selectedBenchmark && !isRunsLoading && fit.ready && runs.length > 0 && phone && (jsx("div", { className: "flex flex-col gap-2", children: runs.map((run) => {
|
|
253
|
+
var _a, _b;
|
|
254
|
+
return (jsx(ActivityCard, { title: run.name, aside: jsx(Ellipsis, { className: "h-4 w-4 text-gray-600", "aria-hidden": "true" }), onClick: () => setMenuRunName(run.name), facts: [
|
|
255
|
+
{ label: labels.card.status, value: jsx(StatusIcon, { status: run.status }) },
|
|
256
|
+
{
|
|
257
|
+
label: labels.card.initiatedBy,
|
|
258
|
+
value: jsx("span", { className: "truncate", children: initiatedByOf(run) }),
|
|
259
|
+
},
|
|
260
|
+
{ label: labels.card.created, value: createdOf(run) },
|
|
261
|
+
] }, (_b = (_a = run.task_record_id) !== null && _a !== void 0 ? _a : run.id) !== null && _b !== void 0 ? _b : run.name));
|
|
262
|
+
}) })), selectedBenchmark && !isRunsLoading && fit.ready && runs.length > 0 && !phone && (jsx("div", { className: "flex-none overflow-hidden rounded-md border", children: jsx("div", { className: "overflow-x-auto sm:mx-0", children: jsxs(Table, { className: "min-w-[720px] table-fixed", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 h-[45px] border-b", children: [jsx(TableHead, { className: "w-[180px] p-3 min-[1440px]:w-[225px] text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.experimentColumn }), jsx(TableHead, { className: "w-24 px-0 min-[1440px]:w-[196px] py-3 text-left text-sm whitespace-nowrap text-[#646464]", children: jsx("span", { className: "inline-block w-20 text-center", children: labels.table.statusColumn }) }), jsx(TableHead, { className: "w-[200px] p-3 min-[1440px]:w-[322px] text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.initiatedByColumn }), jsx(TableHead, { className: "w-[140px] p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.createdColumn }), jsx(TableHead, { className: "w-[104px] p-3 text-right text-sm whitespace-nowrap text-[#646464]", children: labels.table.actionsColumn })] }) }), jsx(TableBody, { children: runs.map((run) => {
|
|
263
|
+
var _a, _b;
|
|
264
|
+
return (jsxs(TableRow, { className: "text-sm hover:bg-blue-50", children: [jsx(TableCell, { className: "truncate p-3 font-medium text-gray-700", children: run.name }), jsx(TableCell, { className: "px-0 py-3", children: jsx("div", { className: "flex w-20 justify-center", children: jsx(StatusIcon, { status: run.status }) }) }), jsx(TableCell, { className: "truncate p-3 text-gray-700", children: initiatedByOf(run) }), jsx(TableCell, { className: "truncate p-3 text-gray-700", children: createdOf(run) }), jsx(TableCell, { className: "p-3 text-right", children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button, { variant: "ghost", size: "icon", className: "-mr-2 h-8 w-8", "aria-label": labels.actions.rowMenuAriaLabel.replace('{name}', run.name), children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsx(DropdownMenuContent, { align: "end", children: runActions(run).map((action) => {
|
|
265
|
+
var _a;
|
|
266
|
+
return (jsxs(React__default.Fragment, { children: [action.destructive && jsx(DropdownMenuSeparator, {}), jsxs(DropdownMenuItem, { className: action.destructive
|
|
267
|
+
? 'cursor-pointer text-red-500 focus:text-red-500'
|
|
268
|
+
: 'cursor-pointer', disabled: action.disabled, title: action.hint, ...(action.keepOpen
|
|
269
|
+
? {
|
|
270
|
+
onSelect: (event) => {
|
|
271
|
+
event.preventDefault();
|
|
272
|
+
action.run();
|
|
273
|
+
},
|
|
274
|
+
}
|
|
275
|
+
: { onClick: action.run }), children: [jsx(action.icon, { className: `mr-2 h-4 w-4 ${(_a = action.iconClassName) !== null && _a !== void 0 ? _a : ''}` }), action.label] })] }, action.key));
|
|
276
|
+
}) })] }) })] }, (_b = (_a = run.task_record_id) !== null && _a !== void 0 ? _a : run.id) !== null && _b !== void 0 ? _b : run.name));
|
|
277
|
+
}) })] }) }) })), selectedBenchmark &&
|
|
278
|
+
(PaginationComponent || phone ? (jsx("div", { className: "max-md:mt-auto", children: jsx(ActivityPager, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isRunsLoading, PaginationComponent: PaginationComponent }) })) : (totalPages > 1 && (jsx(AdvancedPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage }))))] }), menuRun && (jsx(ActivitySheet, { open: true, onClose: () => setMenuRunName(null), title: menuRun.name, description: menuRun.status ? `${labels.card.status}: ${statusWord(menuRun.status)}` : undefined, children: runActions(menuRun).map((action) => {
|
|
279
|
+
var _a;
|
|
280
|
+
return (jsxs(ActivitySheetOption, { destructive: action.destructive, disabled: action.disabled, onClick: () => {
|
|
281
|
+
action.run();
|
|
282
|
+
if (!action.keepOpen)
|
|
283
|
+
setMenuRunName(null);
|
|
284
|
+
}, children: [jsx(action.icon, { className: `h-4 w-4 ${(_a = action.iconClassName) !== null && _a !== void 0 ? _a : ''}` }), action.label] }, action.key));
|
|
285
|
+
}) })), showManageBenchmarks && (jsx(Dialog, { open: showManageBenchmarks, onOpenChange: setShowManageBenchmarks, children: jsxs(DialogContent, { "aria-label": "manage-benchmarks", className: "max-w-4xl max-h-[85vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: labels.manageBenchmarksModal.title }), jsx(DialogDescription, { children: labels.manageBenchmarksModal.description })] }), jsx(BenchmarksTab, { tenantKey: tenantKey, username: username })] }) })), showStart && (jsx(StartExperimentModal, { isOpen: showStart, onClose: () => setShowStart(false), tenantKey: tenantKey, username: username, mentorUniqueId: mentorId, datasetName: selectedBenchmark, onStarted: () => setPage(1), labels: labels.startExperimentModal })), selectedRun && (jsx(ExperimentDetailModal, { isOpen: !!selectedRun, onClose: () => setSelectedRun(null), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: selectedRun.datasetName, runName: selectedRun.runName, labels: labels })), judgeRun && (jsx(LlmJudgeModal, { isOpen: !!judgeRun, onClose: () => setJudgeRun(null), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: judgeRun.datasetName, runName: judgeRun.runName, labels: labels.evaluateModal })), deleteRun && (jsx(DeleteExperimentModal, { isOpen: !!deleteRun, onClose: () => setDeleteRun(null), tenantKey: tenantKey, username: username, datasetName: deleteRun.datasetName, runName: deleteRun.runName, labels: labels.deleteModal }))] })] }));
|
|
207
286
|
}
|
|
208
287
|
|
|
209
288
|
export { AgentEvaluationTab };
|