@orchestrator-ui/orchestrator-ui-components 6.4.0 → 6.5.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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-lint.log +2 -2
- package/.turbo/turbo-test.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +17 -93
- package/dist/index.js +603 -332
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoAgent/ExportButton/ExportButton.tsx +96 -0
- package/src/components/WfoAgent/ExportButton/index.ts +1 -0
- package/src/components/WfoAgent/ExportButton/styles.ts +69 -0
- package/src/components/WfoAgent/ToolProgress/DiscoverFilterPathsDisplay.tsx +114 -0
- package/src/components/WfoAgent/ToolProgress/RunSearchDisplay.tsx +34 -0
- package/src/components/WfoAgent/{FilterDisplay/FilterDisplay.tsx → ToolProgress/SetFilterTreeDisplay.tsx} +25 -72
- package/src/components/WfoAgent/ToolProgress/StartNewSearchDisplay.tsx +62 -0
- package/src/components/WfoAgent/ToolProgress/ToolProgress.tsx +138 -0
- package/src/components/WfoAgent/ToolProgress/index.ts +1 -0
- package/src/components/WfoAgent/ToolProgress/styles.ts +50 -0
- package/src/components/WfoAgent/WfoAgent/WfoAgent.tsx +78 -51
- package/src/components/WfoAgent/index.ts +0 -1
- package/src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx +6 -10
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx +4 -4
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx +18 -34
- package/src/components/WfoSearchPage/WfoSearchResults/index.ts +0 -1
- package/src/components/WfoSearchPage/utils.ts +12 -112
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useSearchPagination.ts +2 -2
- package/src/messages/en-GB.json +1 -3
- package/src/rtk/endpoints/agentExport.ts +23 -0
- package/src/types/search.ts +8 -70
- package/src/components/WfoAgent/FilterDisplay/index.ts +0 -1
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSubscriptionDetailModal.tsx +0 -55
- /package/src/components/WfoAgent/{FilterDisplay/styles.ts → ToolProgress/SetFilterTreeDisplay.styles.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -4922,10 +4922,10 @@ var require_markup = __commonJS({
|
|
|
4922
4922
|
var require_css = __commonJS({
|
|
4923
4923
|
"../../node_modules/refractor/lang/css.js"(exports, module) {
|
|
4924
4924
|
"use strict";
|
|
4925
|
-
module.exports =
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
function
|
|
4925
|
+
module.exports = css58;
|
|
4926
|
+
css58.displayName = "css";
|
|
4927
|
+
css58.aliases = [];
|
|
4928
|
+
function css58(Prism) {
|
|
4929
4929
|
;
|
|
4930
4930
|
(function(Prism2) {
|
|
4931
4931
|
var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
@@ -5192,7 +5192,7 @@ var require_core = __commonJS({
|
|
|
5192
5192
|
var decode = require_parse_entities();
|
|
5193
5193
|
var Prism = require_prism_core();
|
|
5194
5194
|
var markup = require_markup();
|
|
5195
|
-
var
|
|
5195
|
+
var css58 = require_css();
|
|
5196
5196
|
var clike = require_clike();
|
|
5197
5197
|
var js = require_javascript();
|
|
5198
5198
|
restore();
|
|
@@ -5208,7 +5208,7 @@ var require_core = __commonJS({
|
|
|
5208
5208
|
refract.registered = registered;
|
|
5209
5209
|
refract.listLanguages = listLanguages;
|
|
5210
5210
|
register(markup);
|
|
5211
|
-
register(
|
|
5211
|
+
register(css58);
|
|
5212
5212
|
register(clike);
|
|
5213
5213
|
register(js);
|
|
5214
5214
|
refract.util.encode = encode;
|
|
@@ -15304,10 +15304,10 @@ var require_jsstacktrace = __commonJS({
|
|
|
15304
15304
|
var require_jsx = __commonJS({
|
|
15305
15305
|
"../../node_modules/refractor/lang/jsx.js"(exports, module) {
|
|
15306
15306
|
"use strict";
|
|
15307
|
-
module.exports =
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
function
|
|
15307
|
+
module.exports = jsx304;
|
|
15308
|
+
jsx304.displayName = "jsx";
|
|
15309
|
+
jsx304.aliases = [];
|
|
15310
|
+
function jsx304(Prism) {
|
|
15311
15311
|
;
|
|
15312
15312
|
(function(Prism2) {
|
|
15313
15313
|
var javascript = Prism2.util.clone(Prism2.languages.javascript);
|
|
@@ -26801,7 +26801,7 @@ var PolicyResource = /* @__PURE__ */ ((PolicyResource2) => {
|
|
|
26801
26801
|
})(PolicyResource || {});
|
|
26802
26802
|
|
|
26803
26803
|
// src/configuration/version.ts
|
|
26804
|
-
var ORCHESTRATOR_UI_LIBRARY_VERSION = "6.
|
|
26804
|
+
var ORCHESTRATOR_UI_LIBRARY_VERSION = "6.5.0";
|
|
26805
26805
|
|
|
26806
26806
|
// src/types/types.ts
|
|
26807
26807
|
var EngineStatus = /* @__PURE__ */ ((EngineStatus3) => {
|
|
@@ -35502,16 +35502,16 @@ var { useUploadFileMutation } = fileUploadApi;
|
|
|
35502
35502
|
|
|
35503
35503
|
// src/components/WfoSearchPage/utils.ts
|
|
35504
35504
|
function isSubscriptionSearchResult(item) {
|
|
35505
|
-
return
|
|
35505
|
+
return item.entity_type === "SUBSCRIPTION";
|
|
35506
35506
|
}
|
|
35507
35507
|
function isProcessSearchResult(item) {
|
|
35508
|
-
return
|
|
35508
|
+
return item.entity_type === "PROCESS";
|
|
35509
35509
|
}
|
|
35510
35510
|
function isProductSearchResult(item) {
|
|
35511
|
-
return
|
|
35511
|
+
return item.entity_type === "PRODUCT";
|
|
35512
35512
|
}
|
|
35513
35513
|
function isWorkflowSearchResult(item) {
|
|
35514
|
-
return
|
|
35514
|
+
return item.entity_type === "WORKFLOW";
|
|
35515
35515
|
}
|
|
35516
35516
|
var isCondition = (item) => {
|
|
35517
35517
|
return "path" in item && "condition" in item;
|
|
@@ -35525,82 +35525,9 @@ var ENDPOINT_PATHS = {
|
|
|
35525
35525
|
var getEndpointPath = (entityType) => {
|
|
35526
35526
|
return ENDPOINT_PATHS[entityType] || ENDPOINT_PATHS.SUBSCRIPTION;
|
|
35527
35527
|
};
|
|
35528
|
-
var getDisplayText = (item) => {
|
|
35529
|
-
if (isSubscriptionSearchResult(item)) {
|
|
35530
|
-
return item.subscription.description || "Subscription";
|
|
35531
|
-
}
|
|
35532
|
-
if (isProcessSearchResult(item)) {
|
|
35533
|
-
return item.process.workflowName;
|
|
35534
|
-
}
|
|
35535
|
-
if (isProductSearchResult(item)) {
|
|
35536
|
-
return item.product.name;
|
|
35537
|
-
}
|
|
35538
|
-
if (isWorkflowSearchResult(item)) {
|
|
35539
|
-
return item.workflow.name;
|
|
35540
|
-
}
|
|
35541
|
-
return "Unknown result type";
|
|
35542
|
-
};
|
|
35543
|
-
var getRecordId = (result) => {
|
|
35544
|
-
if (isSubscriptionSearchResult(result)) {
|
|
35545
|
-
return result.subscription.subscription_id;
|
|
35546
|
-
}
|
|
35547
|
-
if (isProductSearchResult(result)) {
|
|
35548
|
-
return result.product.product_id;
|
|
35549
|
-
}
|
|
35550
|
-
if (isProcessSearchResult(result)) {
|
|
35551
|
-
return result.process.processId;
|
|
35552
|
-
}
|
|
35553
|
-
if (isWorkflowSearchResult(result)) {
|
|
35554
|
-
return result.workflow.name;
|
|
35555
|
-
}
|
|
35556
|
-
return "";
|
|
35557
|
-
};
|
|
35558
|
-
var findResultIndexById = (results, recordId) => {
|
|
35559
|
-
return results.findIndex((result) => {
|
|
35560
|
-
if (isSubscriptionSearchResult(result)) {
|
|
35561
|
-
return result.subscription.subscription_id === recordId;
|
|
35562
|
-
}
|
|
35563
|
-
if (isProductSearchResult(result)) {
|
|
35564
|
-
return result.product.product_id === recordId;
|
|
35565
|
-
}
|
|
35566
|
-
if (isProcessSearchResult(result)) {
|
|
35567
|
-
return result.process.processId === recordId;
|
|
35568
|
-
}
|
|
35569
|
-
if (isWorkflowSearchResult(result)) {
|
|
35570
|
-
return result.workflow.name === recordId;
|
|
35571
|
-
}
|
|
35572
|
-
return false;
|
|
35573
|
-
});
|
|
35574
|
-
};
|
|
35575
35528
|
var getDetailUrl = (result, baseUrl) => {
|
|
35576
|
-
|
|
35577
|
-
|
|
35578
|
-
}
|
|
35579
|
-
if (isProductSearchResult(result)) {
|
|
35580
|
-
return `${baseUrl}/products/${result.product.product_id}`;
|
|
35581
|
-
}
|
|
35582
|
-
if (isProcessSearchResult(result)) {
|
|
35583
|
-
return `${baseUrl}/processes/${result.process.processId}`;
|
|
35584
|
-
}
|
|
35585
|
-
if (isWorkflowSearchResult(result)) {
|
|
35586
|
-
return `${baseUrl}/workflows/${result.workflow.name}`;
|
|
35587
|
-
}
|
|
35588
|
-
return "#";
|
|
35589
|
-
};
|
|
35590
|
-
var getDescription = (result) => {
|
|
35591
|
-
if (isSubscriptionSearchResult(result)) {
|
|
35592
|
-
return result.subscription.description;
|
|
35593
|
-
}
|
|
35594
|
-
if (isProductSearchResult(result)) {
|
|
35595
|
-
return result.product.description || result.product.name;
|
|
35596
|
-
}
|
|
35597
|
-
if (isWorkflowSearchResult(result)) {
|
|
35598
|
-
return result.workflow.description || result.workflow.name;
|
|
35599
|
-
}
|
|
35600
|
-
if (isProcessSearchResult(result)) {
|
|
35601
|
-
return result.process.workflowName;
|
|
35602
|
-
}
|
|
35603
|
-
return "Unknown";
|
|
35529
|
+
const endpointPath = getEndpointPath(result.entity_type);
|
|
35530
|
+
return `${baseUrl}/${endpointPath}/${result.entity_id}`;
|
|
35604
35531
|
};
|
|
35605
35532
|
var ENTITY_TABS = [
|
|
35606
35533
|
{ id: "SUBSCRIPTION", label: "Subscriptions" },
|
|
@@ -35817,6 +35744,11 @@ var getOrchestratorCoreVersionIfNotCompatible = (orchestratorUiVersion, orchestr
|
|
|
35817
35744
|
|
|
35818
35745
|
// ../../version-compatibility.json
|
|
35819
35746
|
var version_compatibility_default = [
|
|
35747
|
+
{
|
|
35748
|
+
orchestratorUiVersion: "6.5.0",
|
|
35749
|
+
minimumOrchestratorCoreVersion: "4.6.0",
|
|
35750
|
+
changes: "To support new functionality in the FE for the Agent and LLM, the BE endpoints have changed."
|
|
35751
|
+
},
|
|
35820
35752
|
{
|
|
35821
35753
|
orchestratorUiVersion: "5.3.5",
|
|
35822
35754
|
minimumOrchestratorCoreVersion: "4.2.0",
|
|
@@ -39437,7 +39369,7 @@ var WfoHeaderBadge = ({
|
|
|
39437
39369
|
children,
|
|
39438
39370
|
...restProps
|
|
39439
39371
|
}) => {
|
|
39440
|
-
const
|
|
39372
|
+
const css58 = restProps.iconType ? {
|
|
39441
39373
|
height: 24,
|
|
39442
39374
|
display: "flex",
|
|
39443
39375
|
paddingLeft: 0
|
|
@@ -39445,7 +39377,7 @@ var WfoHeaderBadge = ({
|
|
|
39445
39377
|
height: 24,
|
|
39446
39378
|
display: "flex"
|
|
39447
39379
|
};
|
|
39448
|
-
return /* @__PURE__ */ jsx76(WfoBadge, { ...restProps, css:
|
|
39380
|
+
return /* @__PURE__ */ jsx76(WfoBadge, { ...restProps, css: css58, children });
|
|
39449
39381
|
};
|
|
39450
39382
|
|
|
39451
39383
|
// src/components/WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.tsx
|
|
@@ -56543,10 +56475,10 @@ var WfoTableCodeBlock = ({
|
|
|
56543
56475
|
};
|
|
56544
56476
|
|
|
56545
56477
|
// src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
|
|
56546
|
-
import { useEffect as useEffect44, useState as
|
|
56547
|
-
import { useTranslations as
|
|
56478
|
+
import { useEffect as useEffect44, useState as useState63 } from "react";
|
|
56479
|
+
import { useTranslations as useTranslations105 } from "next-intl";
|
|
56548
56480
|
import {
|
|
56549
|
-
EuiButton as
|
|
56481
|
+
EuiButton as EuiButton22,
|
|
56550
56482
|
EuiCallOut as EuiCallOut3,
|
|
56551
56483
|
EuiFieldSearch as EuiFieldSearch3,
|
|
56552
56484
|
EuiFlexGroup as EuiFlexGroup46,
|
|
@@ -58161,7 +58093,6 @@ var FilterGroup = ({
|
|
|
58161
58093
|
};
|
|
58162
58094
|
|
|
58163
58095
|
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx
|
|
58164
|
-
import { useState as useState63 } from "react";
|
|
58165
58096
|
import { EuiFlexGroup as EuiFlexGroup44, EuiPanel as EuiPanel19 } from "@elastic/eui";
|
|
58166
58097
|
|
|
58167
58098
|
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchEmptyState.tsx
|
|
@@ -58341,7 +58272,7 @@ var WfoSearchResultItem = ({
|
|
|
58341
58272
|
style: {
|
|
58342
58273
|
fontWeight: theme.font.weight.semiBold
|
|
58343
58274
|
},
|
|
58344
|
-
children:
|
|
58275
|
+
children: result.entity_title
|
|
58345
58276
|
}
|
|
58346
58277
|
) }),
|
|
58347
58278
|
matchingField && /* @__PURE__ */ jsxs153(Fragment68, { children: [
|
|
@@ -58410,87 +58341,52 @@ var WfoSearchResultItem = ({
|
|
|
58410
58341
|
) });
|
|
58411
58342
|
};
|
|
58412
58343
|
|
|
58413
|
-
// src/components/WfoSearchPage/WfoSearchResults/WfoSubscriptionDetailModal.tsx
|
|
58414
|
-
import { useTranslations as useTranslations104 } from "next-intl";
|
|
58415
|
-
import {
|
|
58416
|
-
EuiButton as EuiButton22,
|
|
58417
|
-
EuiModal as EuiModal5,
|
|
58418
|
-
EuiModalBody as EuiModalBody5,
|
|
58419
|
-
EuiModalFooter as EuiModalFooter5,
|
|
58420
|
-
EuiModalHeader as EuiModalHeader5,
|
|
58421
|
-
EuiModalHeaderTitle as EuiModalHeaderTitle5
|
|
58422
|
-
} from "@elastic/eui";
|
|
58423
|
-
import { jsx as jsx291, jsxs as jsxs154 } from "@emotion/react/jsx-runtime";
|
|
58424
|
-
var WfoSubscriptionDetailModal = ({ isVisible, onClose, subscriptionData }) => {
|
|
58425
|
-
const t = useTranslations104("search.page");
|
|
58426
|
-
if (!isVisible || !subscriptionData) return null;
|
|
58427
|
-
const subscriptionId = subscriptionData && subscriptionData.subscription_id;
|
|
58428
|
-
return /* @__PURE__ */ jsxs154(EuiModal5, { onClose, maxWidth: 800, children: [
|
|
58429
|
-
/* @__PURE__ */ jsx291(EuiModalHeader5, { children: /* @__PURE__ */ jsx291(EuiModalHeaderTitle5, { children: t("subscriptionDetails") }) }),
|
|
58430
|
-
/* @__PURE__ */ jsx291(EuiModalBody5, { children: /* @__PURE__ */ jsx291(TreeProvider, { children: /* @__PURE__ */ jsx291(WfoSubscription, { subscriptionId }) }) }),
|
|
58431
|
-
/* @__PURE__ */ jsx291(EuiModalFooter5, { children: /* @__PURE__ */ jsx291(EuiButton22, { onClick: onClose, fill: true, children: t("closeButton") }) })
|
|
58432
|
-
] });
|
|
58433
|
-
};
|
|
58434
|
-
|
|
58435
58344
|
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx
|
|
58436
|
-
import {
|
|
58345
|
+
import { jsx as jsx291 } from "@emotion/react/jsx-runtime";
|
|
58437
58346
|
var WfoSearchResults = ({
|
|
58438
58347
|
results,
|
|
58439
58348
|
loading,
|
|
58440
58349
|
selectedRecordIndex = 0,
|
|
58441
58350
|
onRecordSelect
|
|
58442
58351
|
}) => {
|
|
58443
|
-
const [modalData, setModalData] = useState63(null);
|
|
58444
|
-
const handleCloseModal = () => {
|
|
58445
|
-
setModalData(null);
|
|
58446
|
-
};
|
|
58447
58352
|
if (loading) {
|
|
58448
|
-
return /* @__PURE__ */
|
|
58353
|
+
return /* @__PURE__ */ jsx291(WfoSearchLoadingState, {});
|
|
58449
58354
|
}
|
|
58450
58355
|
if (!results || results.length === 0) {
|
|
58451
|
-
return /* @__PURE__ */
|
|
58356
|
+
return /* @__PURE__ */ jsx291(WfoSearchEmptyState, {});
|
|
58452
58357
|
}
|
|
58453
|
-
return /* @__PURE__ */
|
|
58454
|
-
|
|
58455
|
-
|
|
58456
|
-
|
|
58457
|
-
|
|
58458
|
-
|
|
58459
|
-
|
|
58460
|
-
|
|
58461
|
-
},
|
|
58462
|
-
idx
|
|
58463
|
-
)) }) }),
|
|
58464
|
-
/* @__PURE__ */ jsx292(
|
|
58465
|
-
WfoSubscriptionDetailModal,
|
|
58466
|
-
{
|
|
58467
|
-
isVisible: !!modalData,
|
|
58468
|
-
onClose: handleCloseModal,
|
|
58469
|
-
subscriptionData: modalData?.subscription,
|
|
58470
|
-
matchingField: modalData?.matchingField
|
|
58358
|
+
return /* @__PURE__ */ jsx291(EuiPanel19, { paddingSize: "m", hasShadow: false, children: /* @__PURE__ */ jsx291(EuiFlexGroup44, { direction: "column", gutterSize: "s", children: results.map((result, idx) => /* @__PURE__ */ jsx291(
|
|
58359
|
+
WfoSearchResultItem,
|
|
58360
|
+
{
|
|
58361
|
+
result,
|
|
58362
|
+
index: idx,
|
|
58363
|
+
isSelected: idx === selectedRecordIndex,
|
|
58364
|
+
onSelect: () => {
|
|
58365
|
+
onRecordSelect?.(idx);
|
|
58471
58366
|
}
|
|
58472
|
-
|
|
58473
|
-
|
|
58367
|
+
},
|
|
58368
|
+
idx
|
|
58369
|
+
)) }) });
|
|
58474
58370
|
};
|
|
58475
58371
|
|
|
58476
58372
|
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchMetadataHeader.tsx
|
|
58477
|
-
import { jsx as
|
|
58373
|
+
import { jsx as jsx292 } from "@emotion/react/jsx-runtime";
|
|
58478
58374
|
var WfoSearchMetadataHeader = ({
|
|
58479
58375
|
search_metadata
|
|
58480
58376
|
}) => {
|
|
58481
58377
|
if (!search_metadata.search_type) return null;
|
|
58482
|
-
return /* @__PURE__ */
|
|
58378
|
+
return /* @__PURE__ */ jsx292(WfoToolTip, { tooltipContent: search_metadata.description || "", children: /* @__PURE__ */ jsx292(WfoBadge, { color: "hollow", iconType: "search", textColor: "default", children: search_metadata.search_type }) });
|
|
58483
58379
|
};
|
|
58484
58380
|
|
|
58485
58381
|
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchPaginationInfo.tsx
|
|
58486
|
-
import { useTranslations as
|
|
58382
|
+
import { useTranslations as useTranslations104 } from "next-intl";
|
|
58487
58383
|
import {
|
|
58488
58384
|
EuiButtonIcon as EuiButtonIcon18,
|
|
58489
58385
|
EuiFlexGroup as EuiFlexGroup45,
|
|
58490
58386
|
EuiFlexItem as EuiFlexItem51,
|
|
58491
58387
|
EuiText as EuiText59
|
|
58492
58388
|
} from "@elastic/eui";
|
|
58493
|
-
import { jsx as
|
|
58389
|
+
import { jsx as jsx293, jsxs as jsxs154 } from "@emotion/react/jsx-runtime";
|
|
58494
58390
|
var WfoSearchPaginationInfo = ({
|
|
58495
58391
|
has_next_page,
|
|
58496
58392
|
next_page_cursor,
|
|
@@ -58501,7 +58397,7 @@ var WfoSearchPaginationInfo = ({
|
|
|
58501
58397
|
hasPrevPage = false,
|
|
58502
58398
|
resultCount
|
|
58503
58399
|
}) => {
|
|
58504
|
-
const t =
|
|
58400
|
+
const t = useTranslations104("search.page");
|
|
58505
58401
|
const { theme } = useOrchestratorTheme();
|
|
58506
58402
|
const handleNextPage = () => {
|
|
58507
58403
|
if (!isLoading && next_page_cursor && onNextPage)
|
|
@@ -58511,7 +58407,7 @@ var WfoSearchPaginationInfo = ({
|
|
|
58511
58407
|
if (!isLoading && onPrevPage) onPrevPage();
|
|
58512
58408
|
};
|
|
58513
58409
|
if (!has_next_page && !hasPrevPage) return null;
|
|
58514
|
-
return /* @__PURE__ */
|
|
58410
|
+
return /* @__PURE__ */ jsxs154(
|
|
58515
58411
|
EuiFlexGroup45,
|
|
58516
58412
|
{
|
|
58517
58413
|
justifyContent: "flexEnd",
|
|
@@ -58527,7 +58423,7 @@ var WfoSearchPaginationInfo = ({
|
|
|
58527
58423
|
role: "navigation",
|
|
58528
58424
|
"aria-label": t("searchResultsPagination"),
|
|
58529
58425
|
children: [
|
|
58530
|
-
/* @__PURE__ */
|
|
58426
|
+
/* @__PURE__ */ jsx293(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx293(
|
|
58531
58427
|
EuiButtonIcon18,
|
|
58532
58428
|
{
|
|
58533
58429
|
iconType: "arrowLeft",
|
|
@@ -58538,12 +58434,12 @@ var WfoSearchPaginationInfo = ({
|
|
|
58538
58434
|
size: "s"
|
|
58539
58435
|
}
|
|
58540
58436
|
) }),
|
|
58541
|
-
/* @__PURE__ */
|
|
58437
|
+
/* @__PURE__ */ jsx293(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsxs154(EuiText59, { size: "xs", color: theme.colors.textSubdued, children: [
|
|
58542
58438
|
t("page"),
|
|
58543
58439
|
" ",
|
|
58544
58440
|
currentPage
|
|
58545
58441
|
] }) }),
|
|
58546
|
-
/* @__PURE__ */
|
|
58442
|
+
/* @__PURE__ */ jsx293(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx293(
|
|
58547
58443
|
EuiButtonIcon18,
|
|
58548
58444
|
{
|
|
58549
58445
|
iconType: "arrowRight",
|
|
@@ -58555,7 +58451,7 @@ var WfoSearchPaginationInfo = ({
|
|
|
58555
58451
|
isLoading
|
|
58556
58452
|
}
|
|
58557
58453
|
) }),
|
|
58558
|
-
resultCount && resultCount > 0 && /* @__PURE__ */
|
|
58454
|
+
resultCount && resultCount > 0 && /* @__PURE__ */ jsx293(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx293(
|
|
58559
58455
|
WfoBadge,
|
|
58560
58456
|
{
|
|
58561
58457
|
className: "wfoPagination__badge",
|
|
@@ -58570,9 +58466,9 @@ var WfoSearchPaginationInfo = ({
|
|
|
58570
58466
|
};
|
|
58571
58467
|
|
|
58572
58468
|
// src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
|
|
58573
|
-
import { Fragment as
|
|
58469
|
+
import { Fragment as Fragment69, jsx as jsx294, jsxs as jsxs155 } from "@emotion/react/jsx-runtime";
|
|
58574
58470
|
var WfoSearch = () => {
|
|
58575
|
-
const t =
|
|
58471
|
+
const t = useTranslations105("search.page");
|
|
58576
58472
|
const { theme } = useOrchestratorTheme();
|
|
58577
58473
|
const {
|
|
58578
58474
|
urlParams,
|
|
@@ -58588,11 +58484,11 @@ var WfoSearch = () => {
|
|
|
58588
58484
|
setSelectedRecordId
|
|
58589
58485
|
} = useUrlParams();
|
|
58590
58486
|
const pageSize = DEFAULT_PAGE_SIZE2;
|
|
58591
|
-
const [filterGroup, setFilterGroup] =
|
|
58487
|
+
const [filterGroup, setFilterGroup] = useState63({
|
|
58592
58488
|
op: "AND",
|
|
58593
58489
|
children: []
|
|
58594
58490
|
});
|
|
58595
|
-
const [showDetailPanel, setShowDetailPanel] =
|
|
58491
|
+
const [showDetailPanel, setShowDetailPanel] = useState63(false);
|
|
58596
58492
|
const debouncedQuery = useDebounce(query, DEFAULT_DEBOUNCE_DELAY);
|
|
58597
58493
|
const { results, loading, setResults } = useSearch(
|
|
58598
58494
|
debouncedQuery,
|
|
@@ -58600,7 +58496,7 @@ var WfoSearch = () => {
|
|
|
58600
58496
|
filterGroup,
|
|
58601
58497
|
pageSize
|
|
58602
58498
|
);
|
|
58603
|
-
const [hasSearchBeenAttempted, setHasSearchBeenAttempted] =
|
|
58499
|
+
const [hasSearchBeenAttempted, setHasSearchBeenAttempted] = useState63(false);
|
|
58604
58500
|
useEffect44(() => {
|
|
58605
58501
|
const queryText = typeof debouncedQuery === "string" ? debouncedQuery : debouncedQuery?.text?.trim() || "";
|
|
58606
58502
|
const hasFilters = filterGroup && filterGroup.children.length > 0;
|
|
@@ -58626,7 +58522,7 @@ var WfoSearch = () => {
|
|
|
58626
58522
|
results,
|
|
58627
58523
|
setResults
|
|
58628
58524
|
);
|
|
58629
|
-
const [searchValue, setSearchValue] =
|
|
58525
|
+
const [searchValue, setSearchValue] = useState63(() => {
|
|
58630
58526
|
if (typeof query === "string") {
|
|
58631
58527
|
return query;
|
|
58632
58528
|
}
|
|
@@ -58680,9 +58576,8 @@ var WfoSearch = () => {
|
|
|
58680
58576
|
useEffect44(() => {
|
|
58681
58577
|
if (results.data.length > 0) {
|
|
58682
58578
|
if (selectedRecordId) {
|
|
58683
|
-
const foundIndex =
|
|
58684
|
-
|
|
58685
|
-
selectedRecordId
|
|
58579
|
+
const foundIndex = results.data.findIndex(
|
|
58580
|
+
(result) => result.entity_id === selectedRecordId
|
|
58686
58581
|
);
|
|
58687
58582
|
if (foundIndex !== -1) {
|
|
58688
58583
|
setSelectedRecordIndex(foundIndex);
|
|
@@ -58707,8 +58602,8 @@ var WfoSearch = () => {
|
|
|
58707
58602
|
resetPagination();
|
|
58708
58603
|
}, [debouncedQuery, selectedEntityTab, filterGroup, resetPagination]);
|
|
58709
58604
|
const { RESULTS_GROW, DETAIL_GROW } = LAYOUT_RATIOS;
|
|
58710
|
-
return /* @__PURE__ */
|
|
58711
|
-
/* @__PURE__ */
|
|
58605
|
+
return /* @__PURE__ */ jsxs155(Fragment69, { children: [
|
|
58606
|
+
/* @__PURE__ */ jsx294(EuiTabs4, { children: ENTITY_TABS.map((tab) => /* @__PURE__ */ jsx294(
|
|
58712
58607
|
EuiTab4,
|
|
58713
58608
|
{
|
|
58714
58609
|
onClick: () => handleTabChange(tab.id),
|
|
@@ -58717,8 +58612,8 @@ var WfoSearch = () => {
|
|
|
58717
58612
|
},
|
|
58718
58613
|
tab.id
|
|
58719
58614
|
)) }),
|
|
58720
|
-
/* @__PURE__ */
|
|
58721
|
-
/* @__PURE__ */
|
|
58615
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" }),
|
|
58616
|
+
/* @__PURE__ */ jsx294(
|
|
58722
58617
|
EuiFieldSearch3,
|
|
58723
58618
|
{
|
|
58724
58619
|
placeholder: t("searchPlaceholder", {
|
|
@@ -58735,9 +58630,9 @@ var WfoSearch = () => {
|
|
|
58735
58630
|
fullWidth: true
|
|
58736
58631
|
}
|
|
58737
58632
|
),
|
|
58738
|
-
/* @__PURE__ */
|
|
58739
|
-
/* @__PURE__ */
|
|
58740
|
-
|
|
58633
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "s" }),
|
|
58634
|
+
/* @__PURE__ */ jsx294(EuiFlexGroup46, { gutterSize: "s", alignItems: "center", children: /* @__PURE__ */ jsx294(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx294(
|
|
58635
|
+
EuiButton22,
|
|
58741
58636
|
{
|
|
58742
58637
|
iconType: showFilters ? "eyeClosed" : "eye",
|
|
58743
58638
|
size: "s",
|
|
@@ -58745,12 +58640,12 @@ var WfoSearch = () => {
|
|
|
58745
58640
|
children: showFilters ? t("hideFilters") : t("showFilters")
|
|
58746
58641
|
}
|
|
58747
58642
|
) }) }),
|
|
58748
|
-
showFilters && /* @__PURE__ */
|
|
58749
|
-
/* @__PURE__ */
|
|
58750
|
-
/* @__PURE__ */
|
|
58751
|
-
/* @__PURE__ */
|
|
58752
|
-
/* @__PURE__ */
|
|
58753
|
-
/* @__PURE__ */
|
|
58643
|
+
showFilters && /* @__PURE__ */ jsxs155(Fragment69, { children: [
|
|
58644
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" }),
|
|
58645
|
+
/* @__PURE__ */ jsxs155(EuiPanel20, { hasBorder: true, paddingSize: "m", children: [
|
|
58646
|
+
/* @__PURE__ */ jsx294(EuiText60, { children: /* @__PURE__ */ jsx294("h4", { children: t("structuredFilters") }) }),
|
|
58647
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "s" }),
|
|
58648
|
+
/* @__PURE__ */ jsx294(
|
|
58754
58649
|
FilterGroup,
|
|
58755
58650
|
{
|
|
58756
58651
|
group: filterGroup,
|
|
@@ -58761,9 +58656,9 @@ var WfoSearch = () => {
|
|
|
58761
58656
|
)
|
|
58762
58657
|
] })
|
|
58763
58658
|
] }),
|
|
58764
|
-
/* @__PURE__ */
|
|
58765
|
-
error && /* @__PURE__ */
|
|
58766
|
-
/* @__PURE__ */
|
|
58659
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" }),
|
|
58660
|
+
error && /* @__PURE__ */ jsxs155(Fragment69, { children: [
|
|
58661
|
+
/* @__PURE__ */ jsxs155(
|
|
58767
58662
|
EuiCallOut3,
|
|
58768
58663
|
{
|
|
58769
58664
|
title: t("searchError"),
|
|
@@ -58771,9 +58666,9 @@ var WfoSearch = () => {
|
|
|
58771
58666
|
iconType: "alert",
|
|
58772
58667
|
size: "s",
|
|
58773
58668
|
children: [
|
|
58774
|
-
/* @__PURE__ */
|
|
58775
|
-
/* @__PURE__ */
|
|
58776
|
-
|
|
58669
|
+
/* @__PURE__ */ jsx294("p", { children: error }),
|
|
58670
|
+
/* @__PURE__ */ jsx294(
|
|
58671
|
+
EuiButton22,
|
|
58777
58672
|
{
|
|
58778
58673
|
size: "s",
|
|
58779
58674
|
color: "danger",
|
|
@@ -58784,11 +58679,11 @@ var WfoSearch = () => {
|
|
|
58784
58679
|
]
|
|
58785
58680
|
}
|
|
58786
58681
|
),
|
|
58787
|
-
/* @__PURE__ */
|
|
58682
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" })
|
|
58788
58683
|
] }),
|
|
58789
|
-
shouldShowNoResults && /* @__PURE__ */
|
|
58790
|
-
/* @__PURE__ */
|
|
58791
|
-
/* @__PURE__ */
|
|
58684
|
+
shouldShowNoResults && /* @__PURE__ */ jsxs155(Fragment69, { children: [
|
|
58685
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "l" }),
|
|
58686
|
+
/* @__PURE__ */ jsxs155(
|
|
58792
58687
|
EuiCallOut3,
|
|
58793
58688
|
{
|
|
58794
58689
|
title: t("noResults"),
|
|
@@ -58796,20 +58691,20 @@ var WfoSearch = () => {
|
|
|
58796
58691
|
iconType: "search",
|
|
58797
58692
|
size: "m",
|
|
58798
58693
|
children: [
|
|
58799
|
-
/* @__PURE__ */
|
|
58694
|
+
/* @__PURE__ */ jsx294("p", { children: t("noResultsMessage", {
|
|
58800
58695
|
entityType: currentTab?.label.toLowerCase()
|
|
58801
58696
|
}) }),
|
|
58802
|
-
/* @__PURE__ */
|
|
58803
|
-
/* @__PURE__ */
|
|
58697
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "s" }),
|
|
58698
|
+
/* @__PURE__ */ jsx294(EuiText60, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx294("p", { children: t("noResultsSuggestions") }) })
|
|
58804
58699
|
]
|
|
58805
58700
|
}
|
|
58806
58701
|
),
|
|
58807
|
-
/* @__PURE__ */
|
|
58702
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "l" })
|
|
58808
58703
|
] }),
|
|
58809
|
-
isSearchActive && /* @__PURE__ */
|
|
58810
|
-
/* @__PURE__ */
|
|
58811
|
-
/* @__PURE__ */
|
|
58812
|
-
/* @__PURE__ */
|
|
58704
|
+
isSearchActive && /* @__PURE__ */ jsxs155(Fragment69, { children: [
|
|
58705
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" }),
|
|
58706
|
+
/* @__PURE__ */ jsxs155(EuiFlexGroup46, { gutterSize: "s", alignItems: "center", children: [
|
|
58707
|
+
/* @__PURE__ */ jsx294(EuiFlexItem52, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsxs155(
|
|
58813
58708
|
EuiFlexGroup46,
|
|
58814
58709
|
{
|
|
58815
58710
|
gutterSize: "s",
|
|
@@ -58818,13 +58713,13 @@ var WfoSearch = () => {
|
|
|
58818
58713
|
responsive: false,
|
|
58819
58714
|
style: { width: "100%" },
|
|
58820
58715
|
children: [
|
|
58821
|
-
/* @__PURE__ */
|
|
58716
|
+
/* @__PURE__ */ jsx294(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx294(
|
|
58822
58717
|
WfoSearchMetadataHeader,
|
|
58823
58718
|
{
|
|
58824
58719
|
search_metadata: results.search_metadata
|
|
58825
58720
|
}
|
|
58826
58721
|
) }),
|
|
58827
|
-
/* @__PURE__ */
|
|
58722
|
+
/* @__PURE__ */ jsx294(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx294(
|
|
58828
58723
|
WfoSearchPaginationInfo,
|
|
58829
58724
|
{
|
|
58830
58725
|
has_next_page: results.page_info.has_next_page,
|
|
@@ -58840,11 +58735,11 @@ var WfoSearch = () => {
|
|
|
58840
58735
|
]
|
|
58841
58736
|
}
|
|
58842
58737
|
) }),
|
|
58843
|
-
showDetailPanel && /* @__PURE__ */
|
|
58738
|
+
showDetailPanel && /* @__PURE__ */ jsx294(EuiFlexItem52, { grow: DETAIL_GROW })
|
|
58844
58739
|
] }),
|
|
58845
|
-
/* @__PURE__ */
|
|
58846
|
-
/* @__PURE__ */
|
|
58847
|
-
/* @__PURE__ */
|
|
58740
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "s" }),
|
|
58741
|
+
/* @__PURE__ */ jsxs155(EuiFlexGroup46, { gutterSize: "s", alignItems: "flexStart", children: [
|
|
58742
|
+
/* @__PURE__ */ jsx294(EuiFlexItem52, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsx294(EuiPanel20, { paddingSize: "none", hasBorder: true, children: /* @__PURE__ */ jsx294(
|
|
58848
58743
|
WfoSearchResults,
|
|
58849
58744
|
{
|
|
58850
58745
|
results: results.data,
|
|
@@ -58854,13 +58749,14 @@ var WfoSearch = () => {
|
|
|
58854
58749
|
setSelectedRecordIndex(index);
|
|
58855
58750
|
const record = results.data[index];
|
|
58856
58751
|
if (record) {
|
|
58857
|
-
|
|
58858
|
-
|
|
58752
|
+
setSelectedRecordId(
|
|
58753
|
+
record.entity_id
|
|
58754
|
+
);
|
|
58859
58755
|
}
|
|
58860
58756
|
}
|
|
58861
58757
|
}
|
|
58862
58758
|
) }) }),
|
|
58863
|
-
showDetailPanel && /* @__PURE__ */
|
|
58759
|
+
showDetailPanel && /* @__PURE__ */ jsx294(EuiFlexItem52, { grow: DETAIL_GROW, children: /* @__PURE__ */ jsx294(
|
|
58864
58760
|
EuiPanel20,
|
|
58865
58761
|
{
|
|
58866
58762
|
paddingSize: "m",
|
|
@@ -58869,27 +58765,27 @@ var WfoSearch = () => {
|
|
|
58869
58765
|
color: "transparent",
|
|
58870
58766
|
children: selectedEntityTab === "SUBSCRIPTION" && results.data[selectedRecordIndex] && isSubscriptionSearchResult(
|
|
58871
58767
|
results.data[selectedRecordIndex]
|
|
58872
|
-
) ? /* @__PURE__ */
|
|
58768
|
+
) ? /* @__PURE__ */ jsx294(TreeProvider, { children: /* @__PURE__ */ jsx294(
|
|
58873
58769
|
WfoSubscription,
|
|
58874
58770
|
{
|
|
58875
|
-
subscriptionId: results.data[selectedRecordIndex].
|
|
58771
|
+
subscriptionId: results.data[selectedRecordIndex].entity_id
|
|
58876
58772
|
}
|
|
58877
|
-
) }) : /* @__PURE__ */
|
|
58878
|
-
/* @__PURE__ */
|
|
58879
|
-
/* @__PURE__ */
|
|
58880
|
-
/* @__PURE__ */
|
|
58773
|
+
) }) : /* @__PURE__ */ jsxs155(Fragment69, { children: [
|
|
58774
|
+
/* @__PURE__ */ jsx294(EuiText60, { children: /* @__PURE__ */ jsx294("h4", { children: t("details") }) }),
|
|
58775
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" }),
|
|
58776
|
+
/* @__PURE__ */ jsxs155(
|
|
58881
58777
|
EuiText60,
|
|
58882
58778
|
{
|
|
58883
58779
|
color: theme.colors.textSubdued,
|
|
58884
58780
|
children: [
|
|
58885
|
-
/* @__PURE__ */
|
|
58781
|
+
/* @__PURE__ */ jsx294("p", { children: t(
|
|
58886
58782
|
"showingDetailsForResult",
|
|
58887
58783
|
{
|
|
58888
58784
|
resultNumber: selectedRecordIndex + 1
|
|
58889
58785
|
}
|
|
58890
58786
|
) }),
|
|
58891
|
-
/* @__PURE__ */
|
|
58892
|
-
/* @__PURE__ */
|
|
58787
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "s" }),
|
|
58788
|
+
/* @__PURE__ */ jsxs155(
|
|
58893
58789
|
WfoBadge,
|
|
58894
58790
|
{
|
|
58895
58791
|
color: theme.colors.primary,
|
|
@@ -58901,8 +58797,8 @@ var WfoSearch = () => {
|
|
|
58901
58797
|
]
|
|
58902
58798
|
}
|
|
58903
58799
|
),
|
|
58904
|
-
/* @__PURE__ */
|
|
58905
|
-
/* @__PURE__ */
|
|
58800
|
+
/* @__PURE__ */ jsx294(EuiSpacer32, { size: "m" }),
|
|
58801
|
+
/* @__PURE__ */ jsx294("p", { children: /* @__PURE__ */ jsx294("em", { children: t(
|
|
58906
58802
|
"selectResultInstruction"
|
|
58907
58803
|
) }) })
|
|
58908
58804
|
]
|
|
@@ -58918,35 +58814,245 @@ var WfoSearch = () => {
|
|
|
58918
58814
|
|
|
58919
58815
|
// src/components/WfoAgent/WfoAgent/WfoAgent.tsx
|
|
58920
58816
|
import { useTranslations as useTranslations108 } from "next-intl";
|
|
58921
|
-
import {
|
|
58817
|
+
import {
|
|
58818
|
+
useCoAgent,
|
|
58819
|
+
useCoAgentStateRender,
|
|
58820
|
+
useCopilotAction
|
|
58821
|
+
} from "@copilotkit/react-core";
|
|
58922
58822
|
import { CopilotSidebar } from "@copilotkit/react-ui";
|
|
58923
|
-
import { EuiFlexGroup as
|
|
58823
|
+
import { EuiFlexGroup as EuiFlexGroup50, EuiFlexItem as EuiFlexItem56, EuiSpacer as EuiSpacer35, EuiText as EuiText65 } from "@elastic/eui";
|
|
58924
58824
|
|
|
58925
|
-
// src/components/WfoAgent/
|
|
58926
|
-
import { useTranslations as
|
|
58927
|
-
import {
|
|
58928
|
-
EuiFlexGroup as EuiFlexGroup47,
|
|
58929
|
-
EuiFlexItem as EuiFlexItem53,
|
|
58930
|
-
EuiPanel as EuiPanel21,
|
|
58931
|
-
EuiSpacer as EuiSpacer33,
|
|
58932
|
-
EuiText as EuiText61
|
|
58933
|
-
} from "@elastic/eui";
|
|
58825
|
+
// src/components/WfoAgent/ExportButton/ExportButton.tsx
|
|
58826
|
+
import { useTranslations as useTranslations106 } from "next-intl";
|
|
58827
|
+
import { EuiIcon as EuiIcon10, EuiLoadingSpinner as EuiLoadingSpinner4 } from "@elastic/eui";
|
|
58934
58828
|
|
|
58935
|
-
// src/
|
|
58829
|
+
// src/rtk/endpoints/agentExport.ts
|
|
58830
|
+
var agentExportApi = orchestratorApi.injectEndpoints({
|
|
58831
|
+
endpoints: (builder) => ({
|
|
58832
|
+
getAgentExport: builder.query({
|
|
58833
|
+
query: (downloadUrl) => ({
|
|
58834
|
+
url: downloadUrl,
|
|
58835
|
+
method: "GET"
|
|
58836
|
+
}),
|
|
58837
|
+
extraOptions: {
|
|
58838
|
+
baseQueryType: "fetch" /* fetch */
|
|
58839
|
+
}
|
|
58840
|
+
})
|
|
58841
|
+
})
|
|
58842
|
+
});
|
|
58843
|
+
var { useLazyGetAgentExportQuery } = agentExportApi;
|
|
58844
|
+
|
|
58845
|
+
// src/components/WfoAgent/ExportButton/styles.ts
|
|
58936
58846
|
import { css as css53 } from "@emotion/react";
|
|
58847
|
+
var getExportButtonStyles = ({ theme }) => {
|
|
58848
|
+
const containerStyle = css53({
|
|
58849
|
+
marginTop: theme.size.xl,
|
|
58850
|
+
marginBottom: theme.size.xl,
|
|
58851
|
+
width: "100%"
|
|
58852
|
+
});
|
|
58853
|
+
const buttonWrapperStyle = css53({
|
|
58854
|
+
backgroundColor: theme.colors.lightestShade,
|
|
58855
|
+
padding: `${theme.size.xl} ${theme.size.xl}`,
|
|
58856
|
+
border: `${theme.border.width.thin} solid transparent`,
|
|
58857
|
+
display: "flex",
|
|
58858
|
+
flexDirection: "column",
|
|
58859
|
+
gap: theme.size.l
|
|
58860
|
+
});
|
|
58861
|
+
const titleStyle = css53({
|
|
58862
|
+
fontSize: theme.size.m,
|
|
58863
|
+
fontWeight: theme.font.weight.semiBold,
|
|
58864
|
+
color: theme.colors.darkestShade
|
|
58865
|
+
});
|
|
58866
|
+
const fileRowStyle = css53({
|
|
58867
|
+
display: "flex",
|
|
58868
|
+
alignItems: "center",
|
|
58869
|
+
justifyContent: "space-between",
|
|
58870
|
+
gap: theme.size.m,
|
|
58871
|
+
border: `${theme.border.width.thin} solid ${theme.colors.lightShade}`,
|
|
58872
|
+
borderRadius: theme.border.radius.medium,
|
|
58873
|
+
padding: `${theme.size.m} ${theme.size.l}`,
|
|
58874
|
+
backgroundColor: theme.colors.emptyShade,
|
|
58875
|
+
cursor: "pointer"
|
|
58876
|
+
});
|
|
58877
|
+
const fileInfoStyle = css53({
|
|
58878
|
+
display: "flex",
|
|
58879
|
+
alignItems: "center",
|
|
58880
|
+
gap: theme.size.m,
|
|
58881
|
+
flex: 1,
|
|
58882
|
+
color: theme.colors.darkestShade
|
|
58883
|
+
});
|
|
58884
|
+
const filenameStyle = css53({
|
|
58885
|
+
fontSize: theme.size.m,
|
|
58886
|
+
fontWeight: theme.font.weight.medium,
|
|
58887
|
+
color: theme.colors.darkestShade
|
|
58888
|
+
});
|
|
58889
|
+
const downloadButtonStyle = css53({
|
|
58890
|
+
display: "flex",
|
|
58891
|
+
alignItems: "center",
|
|
58892
|
+
justifyContent: "center",
|
|
58893
|
+
color: theme.colors.darkestShade
|
|
58894
|
+
});
|
|
58895
|
+
return {
|
|
58896
|
+
containerStyle,
|
|
58897
|
+
buttonWrapperStyle,
|
|
58898
|
+
titleStyle,
|
|
58899
|
+
fileRowStyle,
|
|
58900
|
+
fileInfoStyle,
|
|
58901
|
+
filenameStyle,
|
|
58902
|
+
downloadButtonStyle
|
|
58903
|
+
};
|
|
58904
|
+
};
|
|
58905
|
+
|
|
58906
|
+
// src/components/WfoAgent/ExportButton/ExportButton.tsx
|
|
58907
|
+
import { jsx as jsx295, jsxs as jsxs156 } from "@emotion/react/jsx-runtime";
|
|
58908
|
+
function ExportButton({ exportData }) {
|
|
58909
|
+
const { showToastMessage } = useShowToastMessage();
|
|
58910
|
+
const tError = useTranslations106("errors");
|
|
58911
|
+
const [triggerExport, { isFetching }] = useLazyGetAgentExportQuery();
|
|
58912
|
+
const {
|
|
58913
|
+
containerStyle,
|
|
58914
|
+
buttonWrapperStyle,
|
|
58915
|
+
titleStyle,
|
|
58916
|
+
fileRowStyle,
|
|
58917
|
+
fileInfoStyle,
|
|
58918
|
+
filenameStyle,
|
|
58919
|
+
downloadButtonStyle
|
|
58920
|
+
} = useWithOrchestratorTheme(getExportButtonStyles);
|
|
58921
|
+
const filename = getCsvFileNameWithDate("export");
|
|
58922
|
+
const onDownloadClick = async () => {
|
|
58923
|
+
const data = await triggerExport(exportData.download_url).unwrap();
|
|
58924
|
+
const keyOrder = data.page.length > 0 ? Object.keys(data.page[0]) : [];
|
|
58925
|
+
const handleExport = csvDownloadHandler(
|
|
58926
|
+
async () => data,
|
|
58927
|
+
(data2) => data2.page,
|
|
58928
|
+
(data2) => data2.pageInfo ?? {
|
|
58929
|
+
totalItems: data2.page.length,
|
|
58930
|
+
startCursor: 0,
|
|
58931
|
+
endCursor: data2.page.length - 1,
|
|
58932
|
+
hasNextPage: false,
|
|
58933
|
+
hasPreviousPage: false,
|
|
58934
|
+
sortFields: [],
|
|
58935
|
+
filterFields: []
|
|
58936
|
+
},
|
|
58937
|
+
keyOrder,
|
|
58938
|
+
filename,
|
|
58939
|
+
showToastMessage,
|
|
58940
|
+
tError
|
|
58941
|
+
);
|
|
58942
|
+
await handleExport();
|
|
58943
|
+
};
|
|
58944
|
+
return /* @__PURE__ */ jsx295("div", { css: containerStyle, children: /* @__PURE__ */ jsxs156("div", { css: buttonWrapperStyle, children: [
|
|
58945
|
+
exportData.message && /* @__PURE__ */ jsx295("div", { css: titleStyle, children: exportData.message }),
|
|
58946
|
+
/* @__PURE__ */ jsxs156("div", { css: fileRowStyle, onClick: onDownloadClick, children: [
|
|
58947
|
+
/* @__PURE__ */ jsxs156("div", { css: fileInfoStyle, children: [
|
|
58948
|
+
/* @__PURE__ */ jsx295(EuiIcon10, { type: "document", size: "m" }),
|
|
58949
|
+
/* @__PURE__ */ jsx295("span", { css: filenameStyle, children: filename })
|
|
58950
|
+
] }),
|
|
58951
|
+
/* @__PURE__ */ jsx295("div", { css: downloadButtonStyle, children: isFetching ? /* @__PURE__ */ jsx295(EuiLoadingSpinner4, { size: "m" }) : /* @__PURE__ */ jsx295(EuiIcon10, { type: "download", size: "m" }) })
|
|
58952
|
+
] })
|
|
58953
|
+
] }) });
|
|
58954
|
+
}
|
|
58955
|
+
|
|
58956
|
+
// src/components/WfoAgent/ToolProgress/ToolProgress.tsx
|
|
58957
|
+
import { useState as useState64 } from "react";
|
|
58958
|
+
import { EuiFlexGroup as EuiFlexGroup49, EuiFlexItem as EuiFlexItem55, EuiLoadingSpinner as EuiLoadingSpinner5 } from "@elastic/eui";
|
|
58959
|
+
|
|
58960
|
+
// src/components/WfoAgent/ToolProgress/DiscoverFilterPathsDisplay.tsx
|
|
58961
|
+
import React92 from "react";
|
|
58962
|
+
import { EuiSpacer as EuiSpacer33, EuiText as EuiText61 } from "@elastic/eui";
|
|
58963
|
+
import { Fragment as Fragment70, jsx as jsx296, jsxs as jsxs157 } from "@emotion/react/jsx-runtime";
|
|
58964
|
+
var DiscoverFilterPathsDisplay = ({
|
|
58965
|
+
parameters,
|
|
58966
|
+
result
|
|
58967
|
+
}) => {
|
|
58968
|
+
const { field_names = [] } = parameters;
|
|
58969
|
+
const foundFields = result ? Object.entries(
|
|
58970
|
+
result
|
|
58971
|
+
).filter(([, fieldResult]) => fieldResult.status !== "NOT_FOUND") : [];
|
|
58972
|
+
const totalPaths = foundFields.reduce((count, [, fieldResult]) => {
|
|
58973
|
+
const pathCount = fieldResult.leaves?.reduce((leafCount, leaf) => {
|
|
58974
|
+
return leafCount + (leaf.paths?.length || 1);
|
|
58975
|
+
}, 0) || 0;
|
|
58976
|
+
return count + pathCount;
|
|
58977
|
+
}, 0);
|
|
58978
|
+
return /* @__PURE__ */ jsxs157("div", { children: [
|
|
58979
|
+
field_names.length > 0 && /* @__PURE__ */ jsxs157(Fragment70, { children: [
|
|
58980
|
+
/* @__PURE__ */ jsxs157(EuiText61, { size: "xs", color: "subdued", children: [
|
|
58981
|
+
"Looking for",
|
|
58982
|
+
" ",
|
|
58983
|
+
field_names.map((name, idx) => /* @__PURE__ */ jsxs157(React92.Fragment, { children: [
|
|
58984
|
+
idx > 0 && ", ",
|
|
58985
|
+
/* @__PURE__ */ jsx296(WfoBadge, { color: "hollow", textColor: "default", children: name })
|
|
58986
|
+
] }, name))
|
|
58987
|
+
] }),
|
|
58988
|
+
/* @__PURE__ */ jsx296(EuiSpacer33, { size: "s" })
|
|
58989
|
+
] }),
|
|
58990
|
+
result && totalPaths > 0 && /* @__PURE__ */ jsxs157("div", { children: [
|
|
58991
|
+
/* @__PURE__ */ jsx296(EuiText61, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsxs157("strong", { children: [
|
|
58992
|
+
"Found ",
|
|
58993
|
+
totalPaths,
|
|
58994
|
+
" path",
|
|
58995
|
+
totalPaths > 1 ? "s" : "",
|
|
58996
|
+
":"
|
|
58997
|
+
] }) }),
|
|
58998
|
+
/* @__PURE__ */ jsx296(EuiSpacer33, { size: "xs" }),
|
|
58999
|
+
foundFields.map(([fieldName, fieldResult]) => /* @__PURE__ */ jsx296("div", { style: { marginBottom: "8px" }, children: fieldResult.leaves && fieldResult.leaves.length > 0 && fieldResult.leaves.map(
|
|
59000
|
+
(leaf, leafIdx) => {
|
|
59001
|
+
const paths = leaf.paths || (leaf.name ? [leaf.name] : []);
|
|
59002
|
+
return /* @__PURE__ */ jsx296(React92.Fragment, { children: paths.map(
|
|
59003
|
+
(path, pathIdx) => /* @__PURE__ */ jsx296(
|
|
59004
|
+
"div",
|
|
59005
|
+
{
|
|
59006
|
+
style: {
|
|
59007
|
+
marginBottom: "4px"
|
|
59008
|
+
},
|
|
59009
|
+
children: /* @__PURE__ */ jsx296(
|
|
59010
|
+
WfoPathBreadcrumb,
|
|
59011
|
+
{
|
|
59012
|
+
path,
|
|
59013
|
+
size: "s"
|
|
59014
|
+
}
|
|
59015
|
+
)
|
|
59016
|
+
},
|
|
59017
|
+
pathIdx
|
|
59018
|
+
)
|
|
59019
|
+
) }, leafIdx);
|
|
59020
|
+
}
|
|
59021
|
+
) }, fieldName))
|
|
59022
|
+
] })
|
|
59023
|
+
] });
|
|
59024
|
+
};
|
|
59025
|
+
|
|
59026
|
+
// src/components/WfoAgent/ToolProgress/RunSearchDisplay.tsx
|
|
59027
|
+
import { EuiFlexGroup as EuiFlexGroup47, EuiFlexItem as EuiFlexItem53, EuiText as EuiText62 } from "@elastic/eui";
|
|
59028
|
+
import { jsx as jsx297, jsxs as jsxs158 } from "@emotion/react/jsx-runtime";
|
|
59029
|
+
var RunSearchDisplay = ({ parameters }) => {
|
|
59030
|
+
const { limit = 10 } = parameters;
|
|
59031
|
+
return /* @__PURE__ */ jsx297("div", { children: /* @__PURE__ */ jsxs158(EuiFlexGroup47, { gutterSize: "s", alignItems: "center", children: [
|
|
59032
|
+
/* @__PURE__ */ jsx297(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx297(EuiText62, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsx297("strong", { children: "Results Limit" }) }) }),
|
|
59033
|
+
/* @__PURE__ */ jsx297(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx297(WfoBadge, { textColor: "default", color: "hollow", children: limit }) })
|
|
59034
|
+
] }) });
|
|
59035
|
+
};
|
|
59036
|
+
|
|
59037
|
+
// src/components/WfoAgent/ToolProgress/SetFilterTreeDisplay.tsx
|
|
59038
|
+
import { useTranslations as useTranslations107 } from "next-intl";
|
|
59039
|
+
import { EuiText as EuiText63 } from "@elastic/eui";
|
|
59040
|
+
|
|
59041
|
+
// src/components/WfoAgent/ToolProgress/SetFilterTreeDisplay.styles.ts
|
|
59042
|
+
import { css as css54 } from "@emotion/react";
|
|
58937
59043
|
var getFilterDisplayStyles = ({ theme }) => {
|
|
58938
|
-
const wrapStyle =
|
|
59044
|
+
const wrapStyle = css54({
|
|
58939
59045
|
display: "flex",
|
|
58940
59046
|
flexWrap: "wrap",
|
|
58941
59047
|
gap: theme.size.s
|
|
58942
59048
|
});
|
|
58943
|
-
const columnGroupWrapStyle =
|
|
59049
|
+
const columnGroupWrapStyle = css54({
|
|
58944
59050
|
display: "flex",
|
|
58945
59051
|
flexDirection: "column",
|
|
58946
59052
|
gap: theme.size.s,
|
|
58947
59053
|
alignItems: "flex-start"
|
|
58948
59054
|
});
|
|
58949
|
-
const chipStyle =
|
|
59055
|
+
const chipStyle = css54({
|
|
58950
59056
|
display: "inline-flex",
|
|
58951
59057
|
alignItems: "center",
|
|
58952
59058
|
borderRadius: theme.size.xl,
|
|
@@ -58956,14 +59062,14 @@ var getFilterDisplayStyles = ({ theme }) => {
|
|
|
58956
59062
|
lineHeight: 1.1,
|
|
58957
59063
|
gap: theme.size.s
|
|
58958
59064
|
});
|
|
58959
|
-
const groupStyle =
|
|
59065
|
+
const groupStyle = css54({
|
|
58960
59066
|
border: `1px solid ${theme.colors.lightShade}`,
|
|
58961
59067
|
borderRadius: theme.border.radius.medium,
|
|
58962
59068
|
padding: theme.size.s,
|
|
58963
59069
|
margin: theme.size.xs,
|
|
58964
59070
|
backgroundColor: theme.colors.body
|
|
58965
59071
|
});
|
|
58966
|
-
const operatorStyle =
|
|
59072
|
+
const operatorStyle = css54({
|
|
58967
59073
|
fontFamily: theme.font.familyCode,
|
|
58968
59074
|
padding: `${theme.size.xs}px ${theme.size.s}px`,
|
|
58969
59075
|
borderRadius: theme.size.s,
|
|
@@ -58973,7 +59079,7 @@ var getFilterDisplayStyles = ({ theme }) => {
|
|
|
58973
59079
|
fontWeight: theme.font.weight.bold,
|
|
58974
59080
|
margin: `${theme.size.xs} 0`
|
|
58975
59081
|
});
|
|
58976
|
-
const valueStyle =
|
|
59082
|
+
const valueStyle = css54({
|
|
58977
59083
|
fontWeight: theme.font.weight.semiBold,
|
|
58978
59084
|
color: theme.colors.warning
|
|
58979
59085
|
});
|
|
@@ -58987,10 +59093,12 @@ var getFilterDisplayStyles = ({ theme }) => {
|
|
|
58987
59093
|
};
|
|
58988
59094
|
};
|
|
58989
59095
|
|
|
58990
|
-
// src/components/WfoAgent/
|
|
58991
|
-
import { jsx as
|
|
59096
|
+
// src/components/WfoAgent/ToolProgress/SetFilterTreeDisplay.tsx
|
|
59097
|
+
import { jsx as jsx298, jsxs as jsxs159 } from "@emotion/react/jsx-runtime";
|
|
58992
59098
|
var DEPTH_INDENT = 16;
|
|
58993
|
-
|
|
59099
|
+
var SetFilterTreeDisplay = ({
|
|
59100
|
+
parameters
|
|
59101
|
+
}) => {
|
|
58994
59102
|
const t = useTranslations107("agent.page");
|
|
58995
59103
|
const {
|
|
58996
59104
|
wrapStyle,
|
|
@@ -59000,9 +59108,7 @@ function FilterDisplay({ parameters }) {
|
|
|
59000
59108
|
operatorStyle,
|
|
59001
59109
|
valueStyle
|
|
59002
59110
|
} = useWithOrchestratorTheme(getFilterDisplayStyles);
|
|
59003
|
-
const
|
|
59004
|
-
if (!parameters || Object.keys(parameters).length === 0) return null;
|
|
59005
|
-
const sectionTitle = (text) => /* @__PURE__ */ jsx296(EuiText61, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsx296("strong", { children: text }) });
|
|
59111
|
+
const filters = parameters?.filters || parameters;
|
|
59006
59112
|
const formatFilterValue = (condition) => {
|
|
59007
59113
|
if ("value" in condition && condition.value !== void 0) {
|
|
59008
59114
|
if (condition.op === "between" && condition.value && typeof condition.value === "object") {
|
|
@@ -59017,13 +59123,13 @@ function FilterDisplay({ parameters }) {
|
|
|
59017
59123
|
};
|
|
59018
59124
|
const renderFilterGroup = (group, depth = 0) => {
|
|
59019
59125
|
if (!group.children || group.children.length === 0) {
|
|
59020
|
-
return /* @__PURE__ */
|
|
59126
|
+
return /* @__PURE__ */ jsx298(EuiText63, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx298("em", { children: t("emptyGroup") }) });
|
|
59021
59127
|
}
|
|
59022
59128
|
const areChildrenGroups = group.children.length > 0 && !isCondition(group.children[0]);
|
|
59023
|
-
return /* @__PURE__ */
|
|
59024
|
-
/* @__PURE__ */
|
|
59025
|
-
/* @__PURE__ */
|
|
59026
|
-
/* @__PURE__ */
|
|
59129
|
+
return /* @__PURE__ */ jsxs159("div", { css: groupStyle, style: { marginLeft: depth * DEPTH_INDENT }, children: [
|
|
59130
|
+
/* @__PURE__ */ jsx298("div", { css: operatorStyle, children: group.op }),
|
|
59131
|
+
/* @__PURE__ */ jsx298("div", { css: areChildrenGroups ? columnGroupWrapStyle : wrapStyle, children: group.children.map((child, i) => /* @__PURE__ */ jsx298("div", { children: isCondition(child) ? /* @__PURE__ */ jsxs159("div", { css: chipStyle, children: [
|
|
59132
|
+
/* @__PURE__ */ jsx298(
|
|
59027
59133
|
WfoPathBreadcrumb,
|
|
59028
59134
|
{
|
|
59029
59135
|
path: child.path,
|
|
@@ -59031,7 +59137,7 @@ function FilterDisplay({ parameters }) {
|
|
|
59031
59137
|
showArrows: true
|
|
59032
59138
|
}
|
|
59033
59139
|
),
|
|
59034
|
-
/* @__PURE__ */
|
|
59140
|
+
/* @__PURE__ */ jsx298(
|
|
59035
59141
|
WfoBadge,
|
|
59036
59142
|
{
|
|
59037
59143
|
textColor: "default",
|
|
@@ -59048,49 +59154,204 @@ function FilterDisplay({ parameters }) {
|
|
|
59048
59154
|
).symbol
|
|
59049
59155
|
}
|
|
59050
59156
|
),
|
|
59051
|
-
/* @__PURE__ */
|
|
59157
|
+
/* @__PURE__ */ jsx298("span", { css: valueStyle, children: formatFilterValue(child.condition) })
|
|
59052
59158
|
] }) : renderFilterGroup(child, depth + 1) }, i)) })
|
|
59053
59159
|
] });
|
|
59054
59160
|
};
|
|
59055
|
-
|
|
59056
|
-
/* @__PURE__ */
|
|
59057
|
-
|
|
59058
|
-
|
|
59059
|
-
|
|
59060
|
-
|
|
59061
|
-
|
|
59062
|
-
|
|
59063
|
-
|
|
59064
|
-
|
|
59065
|
-
|
|
59161
|
+
if (!filters || !filters.children || filters.children.length === 0) {
|
|
59162
|
+
return /* @__PURE__ */ jsx298(EuiText63, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx298("em", { children: t("noFiltersApplied") }) });
|
|
59163
|
+
}
|
|
59164
|
+
return /* @__PURE__ */ jsx298("div", { children: renderFilterGroup(filters) });
|
|
59165
|
+
};
|
|
59166
|
+
|
|
59167
|
+
// src/components/WfoAgent/ToolProgress/StartNewSearchDisplay.tsx
|
|
59168
|
+
import { EuiFlexGroup as EuiFlexGroup48, EuiFlexItem as EuiFlexItem54, EuiSpacer as EuiSpacer34, EuiText as EuiText64 } from "@elastic/eui";
|
|
59169
|
+
import { Fragment as Fragment71, jsx as jsx299, jsxs as jsxs160 } from "@emotion/react/jsx-runtime";
|
|
59170
|
+
var StartNewSearchDisplay = ({
|
|
59171
|
+
parameters
|
|
59172
|
+
}) => {
|
|
59173
|
+
const { entity_type, action, query } = parameters;
|
|
59174
|
+
return /* @__PURE__ */ jsxs160("div", { children: [
|
|
59175
|
+
/* @__PURE__ */ jsxs160(EuiFlexGroup48, { gutterSize: "s", wrap: true, children: [
|
|
59176
|
+
entity_type && /* @__PURE__ */ jsxs160(EuiFlexItem54, { grow: false, children: [
|
|
59177
|
+
/* @__PURE__ */ jsx299(EuiText64, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsx299("strong", { children: "Entity Type" }) }),
|
|
59178
|
+
/* @__PURE__ */ jsx299(EuiSpacer34, { size: "xs" }),
|
|
59179
|
+
/* @__PURE__ */ jsx299(WfoBadge, { textColor: "default", color: "hollow", children: entity_type })
|
|
59066
59180
|
] }),
|
|
59067
|
-
|
|
59068
|
-
|
|
59069
|
-
/* @__PURE__ */
|
|
59070
|
-
/* @__PURE__ */
|
|
59071
|
-
|
|
59072
|
-
query,
|
|
59073
|
-
'"'
|
|
59074
|
-
] }) })
|
|
59075
|
-
] }) : null
|
|
59181
|
+
action && /* @__PURE__ */ jsxs160(EuiFlexItem54, { grow: false, children: [
|
|
59182
|
+
/* @__PURE__ */ jsx299(EuiText64, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsx299("strong", { children: "Action" }) }),
|
|
59183
|
+
/* @__PURE__ */ jsx299(EuiSpacer34, { size: "xs" }),
|
|
59184
|
+
/* @__PURE__ */ jsx299(WfoBadge, { textColor: "default", color: "hollow", children: action })
|
|
59185
|
+
] })
|
|
59076
59186
|
] }),
|
|
59077
|
-
/* @__PURE__ */
|
|
59078
|
-
|
|
59079
|
-
|
|
59080
|
-
|
|
59187
|
+
query && /* @__PURE__ */ jsxs160(Fragment71, { children: [
|
|
59188
|
+
/* @__PURE__ */ jsx299(EuiSpacer34, { size: "s" }),
|
|
59189
|
+
/* @__PURE__ */ jsx299(EuiText64, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsx299("strong", { children: "Query" }) }),
|
|
59190
|
+
/* @__PURE__ */ jsx299(EuiSpacer34, { size: "xs" }),
|
|
59191
|
+
/* @__PURE__ */ jsx299(EuiText64, { size: "s", children: /* @__PURE__ */ jsxs160("em", { children: [
|
|
59192
|
+
'"',
|
|
59193
|
+
query,
|
|
59194
|
+
'"'
|
|
59195
|
+
] }) })
|
|
59196
|
+
] })
|
|
59081
59197
|
] });
|
|
59082
|
-
}
|
|
59198
|
+
};
|
|
59199
|
+
|
|
59200
|
+
// src/components/WfoAgent/ToolProgress/styles.ts
|
|
59201
|
+
import { css as css55 } from "@emotion/react";
|
|
59202
|
+
var getToolProgressStyles = ({ theme }) => {
|
|
59203
|
+
const containerStyle = css55({
|
|
59204
|
+
border: `${theme.border.width.thin} solid ${theme.colors.lightShade}`,
|
|
59205
|
+
borderRadius: theme.border.radius.medium,
|
|
59206
|
+
backgroundColor: theme.colors.emptyShade,
|
|
59207
|
+
transition: `all ${theme.animation.normal} ease`
|
|
59208
|
+
});
|
|
59209
|
+
const containerClickableStyle = css55({
|
|
59210
|
+
cursor: "pointer",
|
|
59211
|
+
"&:hover": {
|
|
59212
|
+
borderColor: theme.colors.primary,
|
|
59213
|
+
backgroundColor: theme.colors.lightestShade
|
|
59214
|
+
}
|
|
59215
|
+
});
|
|
59216
|
+
const headerStyle = css55({
|
|
59217
|
+
padding: `${theme.size.base} ${theme.size.l}`
|
|
59218
|
+
});
|
|
59219
|
+
const nameStyle = css55({
|
|
59220
|
+
fontSize: theme.size.m,
|
|
59221
|
+
fontWeight: theme.font.weight.medium
|
|
59222
|
+
});
|
|
59223
|
+
const expandedContentStyle = css55({
|
|
59224
|
+
borderTop: `${theme.border.width.thin} solid ${theme.colors.lightShade}`,
|
|
59225
|
+
padding: `${theme.size.base} ${theme.size.l}`
|
|
59226
|
+
});
|
|
59227
|
+
const iconSize = 18;
|
|
59228
|
+
const iconStyle = css55({
|
|
59229
|
+
color: theme.colors.subduedText
|
|
59230
|
+
});
|
|
59231
|
+
return {
|
|
59232
|
+
containerStyle,
|
|
59233
|
+
containerClickableStyle,
|
|
59234
|
+
headerStyle,
|
|
59235
|
+
nameStyle,
|
|
59236
|
+
expandedContentStyle,
|
|
59237
|
+
iconSize,
|
|
59238
|
+
iconStyle
|
|
59239
|
+
};
|
|
59240
|
+
};
|
|
59241
|
+
|
|
59242
|
+
// src/components/WfoAgent/ToolProgress/ToolProgress.tsx
|
|
59243
|
+
import { jsx as jsx300, jsxs as jsxs161 } from "@emotion/react/jsx-runtime";
|
|
59244
|
+
var TOOL_DISPLAY_COMPONENTS = {
|
|
59245
|
+
set_filter_tree: SetFilterTreeDisplay,
|
|
59246
|
+
start_new_search: StartNewSearchDisplay,
|
|
59247
|
+
run_search: RunSearchDisplay,
|
|
59248
|
+
discover_filter_paths: DiscoverFilterPathsDisplay
|
|
59249
|
+
};
|
|
59250
|
+
var ToolProgress = ({
|
|
59251
|
+
name,
|
|
59252
|
+
status,
|
|
59253
|
+
args,
|
|
59254
|
+
result
|
|
59255
|
+
}) => {
|
|
59256
|
+
const [isExpanded, setIsExpanded] = useState64(false);
|
|
59257
|
+
const {
|
|
59258
|
+
containerStyle,
|
|
59259
|
+
containerClickableStyle,
|
|
59260
|
+
headerStyle,
|
|
59261
|
+
nameStyle,
|
|
59262
|
+
expandedContentStyle,
|
|
59263
|
+
iconSize,
|
|
59264
|
+
iconStyle
|
|
59265
|
+
} = useWithOrchestratorTheme(getToolProgressStyles);
|
|
59266
|
+
const { theme } = useOrchestratorTheme();
|
|
59267
|
+
const renderStatus = () => {
|
|
59268
|
+
if (status === "complete") {
|
|
59269
|
+
return /* @__PURE__ */ jsx300(
|
|
59270
|
+
WfoCheckmarkCircleFill,
|
|
59271
|
+
{
|
|
59272
|
+
color: theme.colors.success,
|
|
59273
|
+
width: iconSize,
|
|
59274
|
+
height: iconSize
|
|
59275
|
+
}
|
|
59276
|
+
);
|
|
59277
|
+
}
|
|
59278
|
+
if (status === "inProgress" || status === "executing") {
|
|
59279
|
+
return /* @__PURE__ */ jsx300(EuiLoadingSpinner5, { size: "s" });
|
|
59280
|
+
}
|
|
59281
|
+
if (status === "failed") {
|
|
59282
|
+
return /* @__PURE__ */ jsx300(
|
|
59283
|
+
WfoXCircleFill,
|
|
59284
|
+
{
|
|
59285
|
+
color: theme.colors.danger,
|
|
59286
|
+
width: iconSize,
|
|
59287
|
+
height: iconSize
|
|
59288
|
+
}
|
|
59289
|
+
);
|
|
59290
|
+
}
|
|
59291
|
+
return null;
|
|
59292
|
+
};
|
|
59293
|
+
const DisplayComponent = TOOL_DISPLAY_COMPONENTS[name];
|
|
59294
|
+
const hasArgs = DisplayComponent && args;
|
|
59295
|
+
return /* @__PURE__ */ jsxs161("div", { css: containerStyle, children: [
|
|
59296
|
+
/* @__PURE__ */ jsx300(
|
|
59297
|
+
"div",
|
|
59298
|
+
{
|
|
59299
|
+
css: hasArgs && containerClickableStyle,
|
|
59300
|
+
onClick: () => hasArgs && setIsExpanded(!isExpanded),
|
|
59301
|
+
children: /* @__PURE__ */ jsxs161(
|
|
59302
|
+
EuiFlexGroup49,
|
|
59303
|
+
{
|
|
59304
|
+
gutterSize: "m",
|
|
59305
|
+
alignItems: "center",
|
|
59306
|
+
css: headerStyle,
|
|
59307
|
+
children: [
|
|
59308
|
+
/* @__PURE__ */ jsx300(EuiFlexItem55, { grow: false, children: /* @__PURE__ */ jsx300("div", { css: iconStyle, children: /* @__PURE__ */ jsx300(WfoWrench, { width: iconSize, height: iconSize }) }) }),
|
|
59309
|
+
/* @__PURE__ */ jsx300(EuiFlexItem55, { grow: true, children: /* @__PURE__ */ jsx300("span", { css: nameStyle, children: name }) }),
|
|
59310
|
+
/* @__PURE__ */ jsx300(
|
|
59311
|
+
EuiFlexItem55,
|
|
59312
|
+
{
|
|
59313
|
+
grow: false,
|
|
59314
|
+
style: { minWidth: `${iconSize}px` },
|
|
59315
|
+
children: renderStatus()
|
|
59316
|
+
}
|
|
59317
|
+
),
|
|
59318
|
+
/* @__PURE__ */ jsx300(
|
|
59319
|
+
EuiFlexItem55,
|
|
59320
|
+
{
|
|
59321
|
+
grow: false,
|
|
59322
|
+
style: { minWidth: `${iconSize}px` },
|
|
59323
|
+
children: hasArgs && (isExpanded ? /* @__PURE__ */ jsx300(
|
|
59324
|
+
WfoChevronUp,
|
|
59325
|
+
{
|
|
59326
|
+
width: iconSize,
|
|
59327
|
+
height: iconSize
|
|
59328
|
+
}
|
|
59329
|
+
) : /* @__PURE__ */ jsx300(
|
|
59330
|
+
WfoChevronDown,
|
|
59331
|
+
{
|
|
59332
|
+
width: iconSize,
|
|
59333
|
+
height: iconSize
|
|
59334
|
+
}
|
|
59335
|
+
))
|
|
59336
|
+
}
|
|
59337
|
+
)
|
|
59338
|
+
]
|
|
59339
|
+
}
|
|
59340
|
+
)
|
|
59341
|
+
}
|
|
59342
|
+
),
|
|
59343
|
+
hasArgs && isExpanded && /* @__PURE__ */ jsx300("div", { css: expandedContentStyle, children: /* @__PURE__ */ jsx300(DisplayComponent, { parameters: args, result }) })
|
|
59344
|
+
] });
|
|
59345
|
+
};
|
|
59083
59346
|
|
|
59084
59347
|
// src/components/WfoAgent/WfoAgent/WfoAgent.tsx
|
|
59085
|
-
import { jsx as
|
|
59348
|
+
import { Fragment as Fragment72, jsx as jsx301, jsxs as jsxs162 } from "@emotion/react/jsx-runtime";
|
|
59086
59349
|
var initialState3 = {
|
|
59087
|
-
|
|
59088
|
-
|
|
59089
|
-
|
|
59090
|
-
|
|
59091
|
-
|
|
59092
|
-
},
|
|
59093
|
-
results: []
|
|
59350
|
+
run_id: null,
|
|
59351
|
+
query_id: null,
|
|
59352
|
+
parameters: null,
|
|
59353
|
+
results_data: null,
|
|
59354
|
+
export_data: null
|
|
59094
59355
|
};
|
|
59095
59356
|
function WfoAgent() {
|
|
59096
59357
|
const t = useTranslations108("agent");
|
|
@@ -59099,39 +59360,57 @@ function WfoAgent() {
|
|
|
59099
59360
|
name: "query_agent",
|
|
59100
59361
|
initialState: initialState3
|
|
59101
59362
|
});
|
|
59102
|
-
const {
|
|
59103
|
-
|
|
59104
|
-
|
|
59105
|
-
|
|
59106
|
-
|
|
59107
|
-
|
|
59108
|
-
|
|
59109
|
-
|
|
59110
|
-
|
|
59111
|
-
|
|
59112
|
-
|
|
59113
|
-
/* @__PURE__ */ jsx297(EuiText62, { size: "s", children: /* @__PURE__ */ jsx297("h2", { children: tPage("filledParameters") }) }),
|
|
59114
|
-
/* @__PURE__ */ jsx297(EuiSpacer34, { size: "s" }),
|
|
59115
|
-
displayParameters && /* @__PURE__ */ jsx297(FilterDisplay, { parameters: displayParameters }),
|
|
59116
|
-
/* @__PURE__ */ jsx297(EuiSpacer34, { size: "m" }),
|
|
59117
|
-
/* @__PURE__ */ jsx297(EuiText62, { size: "s", children: /* @__PURE__ */ jsxs159("h2", { children: [
|
|
59118
|
-
tPage("results"),
|
|
59119
|
-
" ",
|
|
59120
|
-
results ? `(${results.length})` : ""
|
|
59121
|
-
] }) }),
|
|
59122
|
-
/* @__PURE__ */ jsx297(EuiSpacer34, { size: "s" }),
|
|
59123
|
-
/* @__PURE__ */ jsx297(
|
|
59124
|
-
WfoSearchResults,
|
|
59363
|
+
const { results_data } = state;
|
|
59364
|
+
useCopilotAction({
|
|
59365
|
+
name: "*",
|
|
59366
|
+
render: ({
|
|
59367
|
+
name,
|
|
59368
|
+
status,
|
|
59369
|
+
args,
|
|
59370
|
+
result
|
|
59371
|
+
}) => {
|
|
59372
|
+
return /* @__PURE__ */ jsx301(
|
|
59373
|
+
ToolProgress,
|
|
59125
59374
|
{
|
|
59126
|
-
|
|
59127
|
-
|
|
59128
|
-
|
|
59129
|
-
|
|
59130
|
-
}
|
|
59375
|
+
name,
|
|
59376
|
+
status,
|
|
59377
|
+
args,
|
|
59378
|
+
result
|
|
59131
59379
|
}
|
|
59132
|
-
)
|
|
59380
|
+
);
|
|
59381
|
+
}
|
|
59382
|
+
});
|
|
59383
|
+
useCoAgentStateRender({
|
|
59384
|
+
name: "query_agent",
|
|
59385
|
+
render: ({ state: state2 }) => {
|
|
59386
|
+
if (!state2?.export_data || state2.export_data.action !== "export") {
|
|
59387
|
+
return null;
|
|
59388
|
+
}
|
|
59389
|
+
return /* @__PURE__ */ jsx301(ExportButton, { exportData: state2.export_data });
|
|
59390
|
+
}
|
|
59391
|
+
});
|
|
59392
|
+
return /* @__PURE__ */ jsxs162(EuiFlexGroup50, { gutterSize: "l", alignItems: "stretch", children: [
|
|
59393
|
+
/* @__PURE__ */ jsxs162(EuiFlexItem56, { grow: 2, children: [
|
|
59394
|
+
/* @__PURE__ */ jsx301(EuiText65, { children: /* @__PURE__ */ jsx301("h1", { children: t("title") }) }),
|
|
59395
|
+
/* @__PURE__ */ jsx301(EuiSpacer35, { size: "m" }),
|
|
59396
|
+
results_data && results_data.action === "view_results" && /* @__PURE__ */ jsxs162(Fragment72, { children: [
|
|
59397
|
+
results_data.message && /* @__PURE__ */ jsxs162(Fragment72, { children: [
|
|
59398
|
+
/* @__PURE__ */ jsx301(EuiText65, { size: "s", children: /* @__PURE__ */ jsx301("p", { children: results_data.message }) }),
|
|
59399
|
+
/* @__PURE__ */ jsx301(EuiSpacer35, { size: "s" })
|
|
59400
|
+
] }),
|
|
59401
|
+
/* @__PURE__ */ jsx301(
|
|
59402
|
+
WfoSearchResults,
|
|
59403
|
+
{
|
|
59404
|
+
results: results_data.results,
|
|
59405
|
+
loading: false,
|
|
59406
|
+
selectedRecordIndex: -1,
|
|
59407
|
+
onRecordSelect: () => {
|
|
59408
|
+
}
|
|
59409
|
+
}
|
|
59410
|
+
)
|
|
59411
|
+
] })
|
|
59133
59412
|
] }),
|
|
59134
|
-
/* @__PURE__ */
|
|
59413
|
+
/* @__PURE__ */ jsx301(EuiFlexItem56, { grow: 1, children: /* @__PURE__ */ jsx301(
|
|
59135
59414
|
CopilotSidebar,
|
|
59136
59415
|
{
|
|
59137
59416
|
defaultOpen: true,
|
|
@@ -59147,13 +59426,13 @@ function WfoAgent() {
|
|
|
59147
59426
|
|
|
59148
59427
|
// src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx
|
|
59149
59428
|
import { useCallback as useCallback14, useEffect as useEffect45, useState as useState65 } from "react";
|
|
59150
|
-
import { EuiFlexItem as
|
|
59429
|
+
import { EuiFlexItem as EuiFlexItem57 } from "@elastic/eui";
|
|
59151
59430
|
import Editor from "@monaco-editor/react";
|
|
59152
59431
|
|
|
59153
59432
|
// src/components/WfoMonacoCodeBlock/styles.ts
|
|
59154
|
-
import { css as
|
|
59433
|
+
import { css as css56 } from "@emotion/react";
|
|
59155
59434
|
var getStyles15 = ({ theme }) => {
|
|
59156
|
-
const monacoEditorStyle =
|
|
59435
|
+
const monacoEditorStyle = css56({
|
|
59157
59436
|
marginTop: 10,
|
|
59158
59437
|
padding: 10,
|
|
59159
59438
|
backgroundColor: theme.colors.body,
|
|
@@ -59165,7 +59444,7 @@ var getStyles15 = ({ theme }) => {
|
|
|
59165
59444
|
};
|
|
59166
59445
|
|
|
59167
59446
|
// src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx
|
|
59168
|
-
import { jsx as
|
|
59447
|
+
import { jsx as jsx302 } from "@emotion/react/jsx-runtime";
|
|
59169
59448
|
var MONACO_THEME = {
|
|
59170
59449
|
light: "vs",
|
|
59171
59450
|
dark: "hc-black"
|
|
@@ -59202,7 +59481,7 @@ var WfoMonacoCodeBlock = ({ data }) => {
|
|
|
59202
59481
|
setEditorHeight(Math.min(scrollHeight, 500));
|
|
59203
59482
|
setMonacoInstance(monaco);
|
|
59204
59483
|
}
|
|
59205
|
-
return /* @__PURE__ */
|
|
59484
|
+
return /* @__PURE__ */ jsx302(EuiFlexItem57, { css: monacoEditorStyle, children: /* @__PURE__ */ jsx302(
|
|
59206
59485
|
Editor,
|
|
59207
59486
|
{
|
|
59208
59487
|
height: editorHeight,
|
|
@@ -59226,16 +59505,16 @@ var WfoMonacoCodeBlock = ({ data }) => {
|
|
|
59226
59505
|
};
|
|
59227
59506
|
|
|
59228
59507
|
// src/components/WfoLogoSpinner/styles.ts
|
|
59229
|
-
import { css as
|
|
59508
|
+
import { css as css57 } from "@emotion/react";
|
|
59230
59509
|
var getWfoLogoSpinnerStyles = () => {
|
|
59231
|
-
const spinCenteringCss =
|
|
59510
|
+
const spinCenteringCss = css57({
|
|
59232
59511
|
width: "100vw",
|
|
59233
59512
|
height: "100vh",
|
|
59234
59513
|
display: "flex",
|
|
59235
59514
|
alignItems: "center",
|
|
59236
59515
|
justifyContent: "center"
|
|
59237
59516
|
});
|
|
59238
|
-
const spinContainerCss =
|
|
59517
|
+
const spinContainerCss = css57({
|
|
59239
59518
|
display: "flex",
|
|
59240
59519
|
alignItems: "center",
|
|
59241
59520
|
width: "80px",
|
|
@@ -59245,7 +59524,7 @@ var getWfoLogoSpinnerStyles = () => {
|
|
|
59245
59524
|
backgroundColor: "#04385F",
|
|
59246
59525
|
borderRadius: "8px"
|
|
59247
59526
|
});
|
|
59248
|
-
const spinPathCss =
|
|
59527
|
+
const spinPathCss = css57({
|
|
59249
59528
|
transformBox: "fill-box",
|
|
59250
59529
|
transformOrigin: "center",
|
|
59251
59530
|
animation: "spin 3s linear infinite",
|
|
@@ -59262,10 +59541,10 @@ var getWfoLogoSpinnerStyles = () => {
|
|
|
59262
59541
|
};
|
|
59263
59542
|
|
|
59264
59543
|
// src/components/WfoLogoSpinner/WfoLogoSpinner.tsx
|
|
59265
|
-
import { jsx as
|
|
59544
|
+
import { jsx as jsx303, jsxs as jsxs163 } from "@emotion/react/jsx-runtime";
|
|
59266
59545
|
var WfoLogoSpinner = () => {
|
|
59267
59546
|
const { spinContainerCss, spinCenteringCss, spinPathCss } = getWfoLogoSpinnerStyles();
|
|
59268
|
-
return /* @__PURE__ */
|
|
59547
|
+
return /* @__PURE__ */ jsx303("div", { css: spinCenteringCss, children: /* @__PURE__ */ jsx303("div", { css: spinContainerCss, children: /* @__PURE__ */ jsxs163(
|
|
59269
59548
|
"svg",
|
|
59270
59549
|
{
|
|
59271
59550
|
width: "64",
|
|
@@ -59274,7 +59553,7 @@ var WfoLogoSpinner = () => {
|
|
|
59274
59553
|
fill: "none",
|
|
59275
59554
|
xmlns: "http://www.w3.org/2000/svg",
|
|
59276
59555
|
children: [
|
|
59277
|
-
/* @__PURE__ */
|
|
59556
|
+
/* @__PURE__ */ jsx303(
|
|
59278
59557
|
"path",
|
|
59279
59558
|
{
|
|
59280
59559
|
css: spinPathCss,
|
|
@@ -59284,7 +59563,7 @@ var WfoLogoSpinner = () => {
|
|
|
59284
59563
|
fill: "#76B5E0"
|
|
59285
59564
|
}
|
|
59286
59565
|
),
|
|
59287
|
-
/* @__PURE__ */
|
|
59566
|
+
/* @__PURE__ */ jsx303(
|
|
59288
59567
|
"path",
|
|
59289
59568
|
{
|
|
59290
59569
|
fillRule: "evenodd",
|
|
@@ -59796,7 +60075,6 @@ var en_GB_default = {
|
|
|
59796
60075
|
title: "Search results",
|
|
59797
60076
|
page: {
|
|
59798
60077
|
filledParameters: "Filled parameters",
|
|
59799
|
-
results: "Results",
|
|
59800
60078
|
emptyGroup: "Empty group",
|
|
59801
60079
|
searchQuery: "Search query",
|
|
59802
60080
|
activeFilters: "Active filters",
|
|
@@ -59805,7 +60083,7 @@ var en_GB_default = {
|
|
|
59805
60083
|
action: "Action",
|
|
59806
60084
|
copilot: {
|
|
59807
60085
|
title: "Database assistant",
|
|
59808
|
-
initial: "Ask me things such as:\n\u2022 *Find active subscriptions
|
|
60086
|
+
initial: "Ask me things such as:\n\u2022 *Find active subscriptions*\n\u2022 *Show terminated workflows\u201D*\n\nThe filled template and results will appear on the left."
|
|
59809
60087
|
}
|
|
59810
60088
|
}
|
|
59811
60089
|
},
|
|
@@ -59842,7 +60120,6 @@ var en_GB_default = {
|
|
|
59842
60120
|
resultsOnPage: "{resultCount} result(s) on this page",
|
|
59843
60121
|
searchResultsPagination: "Search results pagination",
|
|
59844
60122
|
viewDetails: "View details",
|
|
59845
|
-
closeButton: "Close",
|
|
59846
60123
|
selectOrEnterValue: "Select or type value",
|
|
59847
60124
|
enterValue: "Enter value",
|
|
59848
60125
|
fromNumber: "From",
|
|
@@ -60402,7 +60679,6 @@ export {
|
|
|
60402
60679
|
ErrorField,
|
|
60403
60680
|
ErrorsField,
|
|
60404
60681
|
FileUploadField,
|
|
60405
|
-
FilterDisplay,
|
|
60406
60682
|
FilterGroup,
|
|
60407
60683
|
Footer,
|
|
60408
60684
|
HIDDEN_KEYS,
|
|
@@ -60684,7 +60960,6 @@ export {
|
|
|
60684
60960
|
WfoSubmitModal,
|
|
60685
60961
|
WfoSubscription,
|
|
60686
60962
|
WfoSubscriptionActions,
|
|
60687
|
-
WfoSubscriptionDetailModal,
|
|
60688
60963
|
WfoSubscriptionDetailNoteEdit,
|
|
60689
60964
|
WfoSubscriptionDetailPage,
|
|
60690
60965
|
WfoSubscriptionDetailSection,
|
|
@@ -60758,7 +61033,6 @@ export {
|
|
|
60758
61033
|
emptyOrchestratorConfig,
|
|
60759
61034
|
emptyWfoErrorMonitoring,
|
|
60760
61035
|
filterDataByCriteria,
|
|
60761
|
-
findResultIndexById,
|
|
60762
61036
|
flattenArrayProps,
|
|
60763
61037
|
formatDate,
|
|
60764
61038
|
formatDateCetWithUtc,
|
|
@@ -60777,9 +61051,7 @@ export {
|
|
|
60777
61051
|
getDataTestId,
|
|
60778
61052
|
getDate,
|
|
60779
61053
|
getDefaultTableConfig,
|
|
60780
|
-
getDescription,
|
|
60781
61054
|
getDetailUrl,
|
|
60782
|
-
getDisplayText,
|
|
60783
61055
|
getEndpointPath,
|
|
60784
61056
|
getEnvironmentVariables,
|
|
60785
61057
|
getFieldFromProductBlockInstanceValues,
|
|
@@ -60807,7 +61079,6 @@ export {
|
|
|
60807
61079
|
getQueryStringHandler,
|
|
60808
61080
|
getQueryUrl,
|
|
60809
61081
|
getQueryVariablesForExport,
|
|
60810
|
-
getRecordId,
|
|
60811
61082
|
getRowDetailData,
|
|
60812
61083
|
getSortDirectionFromString,
|
|
60813
61084
|
getStatusBadgeColor,
|