@orchestrator-ui/orchestrator-ui-components 5.9.0 → 6.1.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 +10 -1
- package/.turbo/turbo-test.log +10 -10
- package/CHANGELOG.md +12 -0
- package/__mocks__/@copilotkit/react-core.js +9 -0
- package/__mocks__/@copilotkit/react-ui.js +11 -0
- package/dist/index.d.ts +1432 -2
- package/dist/index.js +3006 -28
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
- package/src/components/WfoAgent/FilterDisplay/FilterDisplay.tsx +182 -0
- package/src/components/WfoAgent/FilterDisplay/index.ts +1 -0
- package/src/components/WfoAgent/FilterDisplay/styles.ts +62 -0
- package/src/components/WfoAgent/WfoAgent/WfoAgent.tsx +100 -0
- package/src/components/WfoAgent/WfoAgent/index.ts +1 -0
- package/src/components/WfoAgent/index.ts +2 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoConditionRow.tsx +388 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoFieldSelector.tsx +43 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoOperatorSelector.tsx +100 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoPathChips.tsx +193 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoPathSelector.tsx +54 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoRenderFunctions.tsx +107 -0
- package/src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx +75 -0
- package/src/components/WfoSearchPage/WfoConditionRow/index.ts +11 -0
- package/src/components/WfoSearchPage/WfoConditionRow/types.ts +84 -0
- package/src/components/WfoSearchPage/WfoConditionRow/utils.ts +63 -0
- package/src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx +238 -0
- package/src/components/WfoSearchPage/WfoFilterGroup/index.ts +1 -0
- package/src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx +453 -0
- package/src/components/WfoSearchPage/WfoSearch/index.ts +1 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoHighlightedText.tsx +63 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoPathBreadcrumb.tsx +80 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchEmptyState.tsx +24 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchLoadingState.tsx +24 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchMetadataHeader.tsx +24 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchPaginationInfo.tsx +107 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx +157 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx +65 -0
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSubscriptionDetailModal.tsx +55 -0
- package/src/components/WfoSearchPage/WfoSearchResults/index.ts +10 -0
- package/src/components/WfoSearchPage/WfoValueControl/WfoValueControl.tsx +247 -0
- package/src/components/WfoSearchPage/WfoValueControl/index.ts +1 -0
- package/src/components/WfoSearchPage/constants.ts +17 -0
- package/src/components/WfoSearchPage/index.ts +6 -0
- package/src/components/WfoSearchPage/utils.ts +271 -0
- package/src/components/index.ts +2 -0
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useDebounce.ts +21 -0
- package/src/hooks/usePathAutoComplete.ts +133 -0
- package/src/hooks/useSearch.ts +83 -0
- package/src/hooks/useSearchPagination.ts +148 -0
- package/src/hooks/useUrlParams.ts +120 -0
- package/src/icons/WfoPencil.tsx +23 -4
- package/src/messages/en-GB.json +79 -1
- package/src/messages/nl-NL.json +2 -1
- package/src/rtk/endpoints/index.ts +1 -0
- package/src/rtk/endpoints/search.ts +90 -0
- package/src/types/index.ts +1 -0
- package/src/types/search.ts +215 -0
- package/src/utils/optionalArray.spec.ts +27 -0
- package/src/utils/optionalArray.ts +5 -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 = css54;
|
|
4926
|
+
css54.displayName = "css";
|
|
4927
|
+
css54.aliases = [];
|
|
4928
|
+
function css54(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 css54 = 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(css54);
|
|
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 = jsx292;
|
|
15308
|
+
jsx292.displayName = "jsx";
|
|
15309
|
+
jsx292.aliases = [];
|
|
15310
|
+
function jsx292(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 = "
|
|
26804
|
+
var ORCHESTRATOR_UI_LIBRARY_VERSION = "6.1.0";
|
|
26805
26805
|
|
|
26806
26806
|
// src/types/types.ts
|
|
26807
26807
|
var EngineStatus = /* @__PURE__ */ ((EngineStatus3) => {
|
|
@@ -27166,10 +27166,10 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une
|
|
|
27166
27166
|
function assertReducerShape(reducers) {
|
|
27167
27167
|
Object.keys(reducers).forEach((key) => {
|
|
27168
27168
|
const reducer = reducers[key];
|
|
27169
|
-
const
|
|
27169
|
+
const initialState4 = reducer(void 0, {
|
|
27170
27170
|
type: actionTypes_default.INIT
|
|
27171
27171
|
});
|
|
27172
|
-
if (typeof
|
|
27172
|
+
if (typeof initialState4 === "undefined") {
|
|
27173
27173
|
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : `The slice reducer for key "${key}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);
|
|
27174
27174
|
}
|
|
27175
27175
|
if (typeof reducer(void 0, {
|
|
@@ -29109,7 +29109,7 @@ function executeReducerBuilderCallback(builderCallback) {
|
|
|
29109
29109
|
function isStateFunction(x) {
|
|
29110
29110
|
return typeof x === "function";
|
|
29111
29111
|
}
|
|
29112
|
-
function createReducer(
|
|
29112
|
+
function createReducer(initialState4, mapOrBuilderCallback) {
|
|
29113
29113
|
if (process.env.NODE_ENV !== "production") {
|
|
29114
29114
|
if (typeof mapOrBuilderCallback === "object") {
|
|
29115
29115
|
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
|
|
@@ -29117,10 +29117,10 @@ function createReducer(initialState3, mapOrBuilderCallback) {
|
|
|
29117
29117
|
}
|
|
29118
29118
|
let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
|
|
29119
29119
|
let getInitialState;
|
|
29120
|
-
if (isStateFunction(
|
|
29121
|
-
getInitialState = () => freezeDraftable(
|
|
29120
|
+
if (isStateFunction(initialState4)) {
|
|
29121
|
+
getInitialState = () => freezeDraftable(initialState4());
|
|
29122
29122
|
} else {
|
|
29123
|
-
const frozenInitialState = freezeDraftable(
|
|
29123
|
+
const frozenInitialState = freezeDraftable(initialState4);
|
|
29124
29124
|
getInitialState = () => frozenInitialState;
|
|
29125
29125
|
}
|
|
29126
29126
|
function reducer(state = getInitialState(), action) {
|
|
@@ -35499,6 +35499,234 @@ var fileUploadApi = orchestratorApi.injectEndpoints({
|
|
|
35499
35499
|
});
|
|
35500
35500
|
var { useUploadFileMutation } = fileUploadApi;
|
|
35501
35501
|
|
|
35502
|
+
// src/components/WfoSearchPage/utils.ts
|
|
35503
|
+
function isSubscriptionSearchResult(item) {
|
|
35504
|
+
return "subscription" in item && typeof item.subscription === "object";
|
|
35505
|
+
}
|
|
35506
|
+
function isProcessSearchResult(item) {
|
|
35507
|
+
return "process" in item && typeof item.process === "object";
|
|
35508
|
+
}
|
|
35509
|
+
function isProductSearchResult(item) {
|
|
35510
|
+
return "product" in item && typeof item.product === "object";
|
|
35511
|
+
}
|
|
35512
|
+
function isWorkflowSearchResult(item) {
|
|
35513
|
+
return "workflow" in item && typeof item.workflow === "object";
|
|
35514
|
+
}
|
|
35515
|
+
var isCondition = (item) => {
|
|
35516
|
+
return "path" in item && "condition" in item;
|
|
35517
|
+
};
|
|
35518
|
+
var ENDPOINT_PATHS = {
|
|
35519
|
+
PROCESS: "processes",
|
|
35520
|
+
PRODUCT: "products",
|
|
35521
|
+
WORKFLOW: "workflows",
|
|
35522
|
+
SUBSCRIPTION: "subscriptions"
|
|
35523
|
+
};
|
|
35524
|
+
var getEndpointPath = (entityType) => {
|
|
35525
|
+
return ENDPOINT_PATHS[entityType] || ENDPOINT_PATHS.SUBSCRIPTION;
|
|
35526
|
+
};
|
|
35527
|
+
var getDisplayText = (item) => {
|
|
35528
|
+
if (isSubscriptionSearchResult(item)) {
|
|
35529
|
+
return item.subscription.description || "Subscription";
|
|
35530
|
+
}
|
|
35531
|
+
if (isProcessSearchResult(item)) {
|
|
35532
|
+
return item.process.workflowName;
|
|
35533
|
+
}
|
|
35534
|
+
if (isProductSearchResult(item)) {
|
|
35535
|
+
return item.product.name;
|
|
35536
|
+
}
|
|
35537
|
+
if (isWorkflowSearchResult(item)) {
|
|
35538
|
+
return item.workflow.name;
|
|
35539
|
+
}
|
|
35540
|
+
return "Unknown result type";
|
|
35541
|
+
};
|
|
35542
|
+
var getRecordId = (result) => {
|
|
35543
|
+
if (isSubscriptionSearchResult(result)) {
|
|
35544
|
+
return result.subscription.subscription_id;
|
|
35545
|
+
}
|
|
35546
|
+
if (isProductSearchResult(result)) {
|
|
35547
|
+
return result.product.product_id;
|
|
35548
|
+
}
|
|
35549
|
+
if (isProcessSearchResult(result)) {
|
|
35550
|
+
return result.process.processId;
|
|
35551
|
+
}
|
|
35552
|
+
if (isWorkflowSearchResult(result)) {
|
|
35553
|
+
return result.workflow.name;
|
|
35554
|
+
}
|
|
35555
|
+
return "";
|
|
35556
|
+
};
|
|
35557
|
+
var findResultIndexById = (results, recordId) => {
|
|
35558
|
+
return results.findIndex((result) => {
|
|
35559
|
+
if (isSubscriptionSearchResult(result)) {
|
|
35560
|
+
return result.subscription.subscription_id === recordId;
|
|
35561
|
+
}
|
|
35562
|
+
if (isProductSearchResult(result)) {
|
|
35563
|
+
return result.product.product_id === recordId;
|
|
35564
|
+
}
|
|
35565
|
+
if (isProcessSearchResult(result)) {
|
|
35566
|
+
return result.process.processId === recordId;
|
|
35567
|
+
}
|
|
35568
|
+
if (isWorkflowSearchResult(result)) {
|
|
35569
|
+
return result.workflow.name === recordId;
|
|
35570
|
+
}
|
|
35571
|
+
return false;
|
|
35572
|
+
});
|
|
35573
|
+
};
|
|
35574
|
+
var getDetailUrl = (result, baseUrl) => {
|
|
35575
|
+
if (isSubscriptionSearchResult(result)) {
|
|
35576
|
+
return `${baseUrl}/subscriptions/${result.subscription.subscription_id}`;
|
|
35577
|
+
}
|
|
35578
|
+
if (isProductSearchResult(result)) {
|
|
35579
|
+
return `${baseUrl}/products/${result.product.product_id}`;
|
|
35580
|
+
}
|
|
35581
|
+
if (isProcessSearchResult(result)) {
|
|
35582
|
+
return `${baseUrl}/processes/${result.process.processId}`;
|
|
35583
|
+
}
|
|
35584
|
+
if (isWorkflowSearchResult(result)) {
|
|
35585
|
+
return `${baseUrl}/workflows/${result.workflow.name}`;
|
|
35586
|
+
}
|
|
35587
|
+
return "#";
|
|
35588
|
+
};
|
|
35589
|
+
var getDescription = (result) => {
|
|
35590
|
+
if (isSubscriptionSearchResult(result)) {
|
|
35591
|
+
return result.subscription.description;
|
|
35592
|
+
}
|
|
35593
|
+
if (isProductSearchResult(result)) {
|
|
35594
|
+
return result.product.description || result.product.name;
|
|
35595
|
+
}
|
|
35596
|
+
if (isWorkflowSearchResult(result)) {
|
|
35597
|
+
return result.workflow.description || result.workflow.name;
|
|
35598
|
+
}
|
|
35599
|
+
if (isProcessSearchResult(result)) {
|
|
35600
|
+
return result.process.workflowName;
|
|
35601
|
+
}
|
|
35602
|
+
return "Unknown";
|
|
35603
|
+
};
|
|
35604
|
+
var ENTITY_TABS = [
|
|
35605
|
+
{ id: "SUBSCRIPTION", label: "Subscriptions" },
|
|
35606
|
+
{ id: "PRODUCT", label: "Products" },
|
|
35607
|
+
{ id: "WORKFLOW", label: "Workflows" },
|
|
35608
|
+
{ id: "PROCESS", label: "Processes" }
|
|
35609
|
+
];
|
|
35610
|
+
var TYPE_COLOR_MAP = {
|
|
35611
|
+
string: "success",
|
|
35612
|
+
number: "primary",
|
|
35613
|
+
boolean: "warning",
|
|
35614
|
+
datetime: "accent",
|
|
35615
|
+
component: "primary"
|
|
35616
|
+
};
|
|
35617
|
+
var getTypeColor = (type, theme) => {
|
|
35618
|
+
const colorKey = TYPE_COLOR_MAP[type.toLowerCase()];
|
|
35619
|
+
return colorKey ? theme.colors[colorKey] : theme.colors.textSubdued;
|
|
35620
|
+
};
|
|
35621
|
+
var OPERATOR_MAP = {
|
|
35622
|
+
eq: { symbol: "=", description: "equals" },
|
|
35623
|
+
neq: { symbol: "\u2260", description: "not equals" },
|
|
35624
|
+
lt: { symbol: "<", description: "less than" },
|
|
35625
|
+
lte: { symbol: "\u2264", description: "less than or equal to" },
|
|
35626
|
+
gt: { symbol: ">", description: "greater than" },
|
|
35627
|
+
gte: { symbol: "\u2265", description: "greater than or equal to" },
|
|
35628
|
+
between: { symbol: "\u27F7", description: "between (range)" },
|
|
35629
|
+
has_component: { symbol: "\u2713", description: "has component" },
|
|
35630
|
+
not_has_component: { symbol: "\u2717", description: "does not have component" }
|
|
35631
|
+
};
|
|
35632
|
+
var BOOLEAN_OPERATOR_MAP = {
|
|
35633
|
+
eq: { symbol: "\u2713", description: "is true" },
|
|
35634
|
+
neq: { symbol: "\u2717", description: "is false" }
|
|
35635
|
+
};
|
|
35636
|
+
var getOperatorDisplay = (op, selectedPathInfo) => {
|
|
35637
|
+
if (selectedPathInfo?.type === "boolean" && BOOLEAN_OPERATOR_MAP[op]) {
|
|
35638
|
+
return BOOLEAN_OPERATOR_MAP[op];
|
|
35639
|
+
}
|
|
35640
|
+
return OPERATOR_MAP[op] || { symbol: op, description: op };
|
|
35641
|
+
};
|
|
35642
|
+
var getButtonColor = (op, pathInfo, condition) => {
|
|
35643
|
+
if (pathInfo?.type === "boolean") {
|
|
35644
|
+
const isSelected = op === "eq" ? condition.condition.value === true : condition.condition.value === false;
|
|
35645
|
+
return isSelected ? "primary" : "text";
|
|
35646
|
+
}
|
|
35647
|
+
return condition.condition.op === op ? "primary" : "text";
|
|
35648
|
+
};
|
|
35649
|
+
var getButtonFill = (op, pathInfo, condition) => {
|
|
35650
|
+
if (pathInfo?.type === "boolean") {
|
|
35651
|
+
return op === "eq" ? condition.condition.value === true : condition.condition.value === false;
|
|
35652
|
+
}
|
|
35653
|
+
return condition.condition.op === op;
|
|
35654
|
+
};
|
|
35655
|
+
var isFilterValid = (group) => {
|
|
35656
|
+
return group.children.every((child) => {
|
|
35657
|
+
if (isCondition(child)) {
|
|
35658
|
+
return child.path && child.condition.op && child.condition.value !== void 0;
|
|
35659
|
+
}
|
|
35660
|
+
return isFilterValid(child);
|
|
35661
|
+
});
|
|
35662
|
+
};
|
|
35663
|
+
var buildSearchParams = (debouncedQuery, selectedEntityTab, filterGroup, pageSize) => {
|
|
35664
|
+
const queryText = typeof debouncedQuery === "string" ? debouncedQuery : debouncedQuery?.text?.trim() || "";
|
|
35665
|
+
return {
|
|
35666
|
+
action: "select",
|
|
35667
|
+
entity_type: selectedEntityTab,
|
|
35668
|
+
query: queryText || "",
|
|
35669
|
+
filters: filterGroup?.children.length > 0 ? filterGroup : void 0,
|
|
35670
|
+
limit: pageSize
|
|
35671
|
+
};
|
|
35672
|
+
};
|
|
35673
|
+
|
|
35674
|
+
// src/rtk/endpoints/search.ts
|
|
35675
|
+
var searchApi = orchestratorApi.injectEndpoints({
|
|
35676
|
+
endpoints: (build) => ({
|
|
35677
|
+
search: build.mutation({
|
|
35678
|
+
query: (payload) => ({
|
|
35679
|
+
url: `search/${getEndpointPath(payload.entity_type)}`,
|
|
35680
|
+
method: "POST",
|
|
35681
|
+
body: payload,
|
|
35682
|
+
headers: {
|
|
35683
|
+
"Content-Type": "application/json"
|
|
35684
|
+
}
|
|
35685
|
+
}),
|
|
35686
|
+
extraOptions: {
|
|
35687
|
+
baseQueryType: "fetch" /* fetch */
|
|
35688
|
+
}
|
|
35689
|
+
}),
|
|
35690
|
+
searchWithPagination: build.mutation({
|
|
35691
|
+
query: ({ cursor, ...payload }) => ({
|
|
35692
|
+
url: `search/${getEndpointPath(payload.entity_type)}?cursor=${cursor}`,
|
|
35693
|
+
method: "POST",
|
|
35694
|
+
body: payload,
|
|
35695
|
+
headers: {
|
|
35696
|
+
"Content-Type": "application/json"
|
|
35697
|
+
}
|
|
35698
|
+
}),
|
|
35699
|
+
extraOptions: {
|
|
35700
|
+
baseQueryType: "fetch" /* fetch */
|
|
35701
|
+
}
|
|
35702
|
+
}),
|
|
35703
|
+
searchPaths: build.query({
|
|
35704
|
+
query: ({ q, entity_type }) => ({
|
|
35705
|
+
url: `search/paths?q=${encodeURIComponent(q)}&entity_type=${entity_type}`,
|
|
35706
|
+
method: "GET"
|
|
35707
|
+
}),
|
|
35708
|
+
extraOptions: {
|
|
35709
|
+
baseQueryType: "fetch" /* fetch */
|
|
35710
|
+
}
|
|
35711
|
+
}),
|
|
35712
|
+
searchDefinitions: build.query({
|
|
35713
|
+
query: () => ({
|
|
35714
|
+
url: "search/definitions",
|
|
35715
|
+
method: "GET"
|
|
35716
|
+
}),
|
|
35717
|
+
extraOptions: {
|
|
35718
|
+
baseQueryType: "fetch" /* fetch */
|
|
35719
|
+
}
|
|
35720
|
+
})
|
|
35721
|
+
})
|
|
35722
|
+
});
|
|
35723
|
+
var {
|
|
35724
|
+
useSearchMutation,
|
|
35725
|
+
useSearchWithPaginationMutation,
|
|
35726
|
+
useSearchPathsQuery,
|
|
35727
|
+
useSearchDefinitionsQuery
|
|
35728
|
+
} = searchApi;
|
|
35729
|
+
|
|
35502
35730
|
// src/hooks/useCheckEngineStatus.ts
|
|
35503
35731
|
var useCheckEngineStatus = () => {
|
|
35504
35732
|
const { data, isLoading, refetch } = useGetEngineStatusQuery();
|
|
@@ -36897,6 +37125,13 @@ var WfoPencilAlt = ({
|
|
|
36897
37125
|
|
|
36898
37126
|
// src/icons/WfoPencil.tsx
|
|
36899
37127
|
import { jsx as jsx44 } from "@emotion/react/jsx-runtime";
|
|
37128
|
+
var Path = ({ color }) => /* @__PURE__ */ jsx44(
|
|
37129
|
+
"path",
|
|
37130
|
+
{
|
|
37131
|
+
fill: color,
|
|
37132
|
+
d: "M13.3787,7.7928875 L16.2071,10.6213175 L7.82842,18.9999975 L5,18.9999975 L5,16.1715975 L13.3787,7.7928875 Z M18.4142,5.5857875 C19.1953,6.3668275 19.1953,7.6331575 18.4142,8.4142075 L17.6213,9.2071075 L14.7929,6.3786775 L15.5858,5.5857875 C16.3668,4.8047375 17.6332,4.8047375 18.4142,5.5857875 Z"
|
|
37133
|
+
}
|
|
37134
|
+
);
|
|
36900
37135
|
var WfoPencil = ({
|
|
36901
37136
|
width = 24,
|
|
36902
37137
|
height = 24,
|
|
@@ -36908,13 +37143,21 @@ var WfoPencil = ({
|
|
|
36908
37143
|
width,
|
|
36909
37144
|
height,
|
|
36910
37145
|
viewBox: "0 0 24 24",
|
|
36911
|
-
children: /* @__PURE__ */ jsx44(
|
|
36912
|
-
|
|
36913
|
-
|
|
36914
|
-
|
|
36915
|
-
|
|
36916
|
-
|
|
36917
|
-
|
|
37146
|
+
children: /* @__PURE__ */ jsx44(Path, { color })
|
|
37147
|
+
}
|
|
37148
|
+
);
|
|
37149
|
+
var WfoPencilCompact = ({
|
|
37150
|
+
width = 24,
|
|
37151
|
+
height = 24,
|
|
37152
|
+
color = "#000000"
|
|
37153
|
+
}) => /* @__PURE__ */ jsx44(
|
|
37154
|
+
"svg",
|
|
37155
|
+
{
|
|
37156
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37157
|
+
width,
|
|
37158
|
+
height,
|
|
37159
|
+
viewBox: "5 5 14 14",
|
|
37160
|
+
children: /* @__PURE__ */ jsx44(Path, { color })
|
|
36918
37161
|
}
|
|
36919
37162
|
);
|
|
36920
37163
|
|
|
@@ -37704,6 +37947,7 @@ var onlyUnique = (value, index, array) => {
|
|
|
37704
37947
|
var toOptionalArrayEntry = (data, condition) => condition ? [data] : [];
|
|
37705
37948
|
var toOptionalArrayEntries = (data, condition) => condition ? Array.isArray(data) ? data : [data] : [];
|
|
37706
37949
|
var optionalArrayMapper = (data = [], mapper) => data.map(mapper);
|
|
37950
|
+
var toOptionalObjectProperty = (entries, condition) => condition ? entries : {};
|
|
37707
37951
|
|
|
37708
37952
|
// src/utils/resultFlattener.ts
|
|
37709
37953
|
var getConcatenatedPagedResult = (pagedResult, fields) => {
|
|
@@ -39108,7 +39352,7 @@ var WfoHeaderBadge = ({
|
|
|
39108
39352
|
children,
|
|
39109
39353
|
...restProps
|
|
39110
39354
|
}) => {
|
|
39111
|
-
const
|
|
39355
|
+
const css54 = restProps.iconType ? {
|
|
39112
39356
|
height: 24,
|
|
39113
39357
|
display: "flex",
|
|
39114
39358
|
paddingLeft: 0
|
|
@@ -39116,7 +39360,7 @@ var WfoHeaderBadge = ({
|
|
|
39116
39360
|
height: 24,
|
|
39117
39361
|
display: "flex"
|
|
39118
39362
|
};
|
|
39119
|
-
return /* @__PURE__ */ jsx73(WfoBadge, { ...restProps, css:
|
|
39363
|
+
return /* @__PURE__ */ jsx73(WfoBadge, { ...restProps, css: css54, children });
|
|
39120
39364
|
};
|
|
39121
39365
|
|
|
39122
39366
|
// src/components/WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.tsx
|
|
@@ -55961,6 +56205,2610 @@ var WfoTableCodeBlock = ({
|
|
|
55961
56205
|
) });
|
|
55962
56206
|
};
|
|
55963
56207
|
|
|
56208
|
+
// src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
|
|
56209
|
+
import { useEffect as useEffect43, useState as useState64 } from "react";
|
|
56210
|
+
import { useTranslations as useTranslations104 } from "next-intl";
|
|
56211
|
+
import {
|
|
56212
|
+
EuiButton as EuiButton24,
|
|
56213
|
+
EuiCallOut as EuiCallOut3,
|
|
56214
|
+
EuiFieldSearch as EuiFieldSearch3,
|
|
56215
|
+
EuiFlexGroup as EuiFlexGroup45,
|
|
56216
|
+
EuiFlexItem as EuiFlexItem52,
|
|
56217
|
+
EuiPanel as EuiPanel20,
|
|
56218
|
+
EuiSpacer as EuiSpacer32,
|
|
56219
|
+
EuiTab as EuiTab4,
|
|
56220
|
+
EuiTabs as EuiTabs4,
|
|
56221
|
+
EuiText as EuiText60
|
|
56222
|
+
} from "@elastic/eui";
|
|
56223
|
+
|
|
56224
|
+
// src/hooks/useDebounce.ts
|
|
56225
|
+
import { useEffect as useEffect38, useState as useState57 } from "react";
|
|
56226
|
+
function useDebounce(value, delay) {
|
|
56227
|
+
const [debouncedValue, setDebouncedValue] = useState57(value);
|
|
56228
|
+
useEffect38(() => {
|
|
56229
|
+
if (delay <= 0) {
|
|
56230
|
+
setDebouncedValue(value);
|
|
56231
|
+
return;
|
|
56232
|
+
}
|
|
56233
|
+
const handler = setTimeout(() => {
|
|
56234
|
+
setDebouncedValue(value);
|
|
56235
|
+
}, delay);
|
|
56236
|
+
return () => {
|
|
56237
|
+
clearTimeout(handler);
|
|
56238
|
+
};
|
|
56239
|
+
}, [value, delay]);
|
|
56240
|
+
return debouncedValue;
|
|
56241
|
+
}
|
|
56242
|
+
|
|
56243
|
+
// src/hooks/useSearch.ts
|
|
56244
|
+
import { useEffect as useEffect39, useState as useState58 } from "react";
|
|
56245
|
+
var useSearch = (query, entityType, filterGroup, limit) => {
|
|
56246
|
+
const [results, setResults] = useState58({
|
|
56247
|
+
data: [],
|
|
56248
|
+
page_info: { has_next_page: false, next_page_cursor: null },
|
|
56249
|
+
search_metadata: { search_type: null, description: null }
|
|
56250
|
+
});
|
|
56251
|
+
const [triggerSearch, { isLoading, isError: isError2 }] = useSearchMutation();
|
|
56252
|
+
useEffect39(() => {
|
|
56253
|
+
const queryText = typeof query === "string" ? query : query.text?.trim() || "";
|
|
56254
|
+
const hasFilters = filterGroup && filterGroup.children.length > 0;
|
|
56255
|
+
if (queryText.length < 2 && !hasFilters) {
|
|
56256
|
+
setResults({
|
|
56257
|
+
data: [],
|
|
56258
|
+
page_info: { has_next_page: false, next_page_cursor: null },
|
|
56259
|
+
search_metadata: { search_type: null, description: null }
|
|
56260
|
+
});
|
|
56261
|
+
return;
|
|
56262
|
+
}
|
|
56263
|
+
const performSearch = async () => {
|
|
56264
|
+
try {
|
|
56265
|
+
const result = await triggerSearch({
|
|
56266
|
+
action: "select",
|
|
56267
|
+
entity_type: entityType,
|
|
56268
|
+
query: queryText,
|
|
56269
|
+
filters: filterGroup && filterGroup.children.length > 0 ? filterGroup : void 0,
|
|
56270
|
+
limit
|
|
56271
|
+
}).unwrap();
|
|
56272
|
+
setResults({
|
|
56273
|
+
data: result.data || [],
|
|
56274
|
+
page_info: {
|
|
56275
|
+
has_next_page: result.page_info?.has_next_page || false,
|
|
56276
|
+
next_page_cursor: result.page_info?.next_page_cursor || null
|
|
56277
|
+
},
|
|
56278
|
+
search_metadata: {
|
|
56279
|
+
search_type: result.search_metadata?.search_type || null,
|
|
56280
|
+
description: result.search_metadata?.description || null
|
|
56281
|
+
}
|
|
56282
|
+
});
|
|
56283
|
+
} catch (error) {
|
|
56284
|
+
console.error("Search error:", error);
|
|
56285
|
+
setResults({
|
|
56286
|
+
data: [],
|
|
56287
|
+
page_info: { has_next_page: false, next_page_cursor: null },
|
|
56288
|
+
search_metadata: { search_type: null, description: null }
|
|
56289
|
+
});
|
|
56290
|
+
}
|
|
56291
|
+
};
|
|
56292
|
+
performSearch();
|
|
56293
|
+
}, [query, entityType, filterGroup, limit, triggerSearch]);
|
|
56294
|
+
return {
|
|
56295
|
+
results,
|
|
56296
|
+
loading: isLoading,
|
|
56297
|
+
error: isError2 ? "Search failed" : null,
|
|
56298
|
+
setResults
|
|
56299
|
+
};
|
|
56300
|
+
};
|
|
56301
|
+
|
|
56302
|
+
// src/hooks/useSearchPagination.ts
|
|
56303
|
+
import { useCallback as useCallback10, useState as useState59 } from "react";
|
|
56304
|
+
var useSearchPagination = (debouncedQuery, selectedEntityTab, filterGroup, pageSize, results, setResults) => {
|
|
56305
|
+
const [currentPage, setCurrentPage] = useState59(1);
|
|
56306
|
+
const [pageHistory, setPageHistory] = useState59([]);
|
|
56307
|
+
const [error, setError] = useState59(null);
|
|
56308
|
+
const [isLoadingMore, setIsLoadingMore] = useState59(false);
|
|
56309
|
+
const [triggerSearchPagination] = useSearchWithPaginationMutation();
|
|
56310
|
+
const handleNextPage = useCallback10(
|
|
56311
|
+
async (nextPageCursor) => {
|
|
56312
|
+
if (!nextPageCursor || isLoadingMore) return;
|
|
56313
|
+
setIsLoadingMore(true);
|
|
56314
|
+
setPageHistory((prev) => [
|
|
56315
|
+
...prev.filter((p) => p.page !== currentPage),
|
|
56316
|
+
{
|
|
56317
|
+
page: currentPage,
|
|
56318
|
+
results: results.data,
|
|
56319
|
+
cursor: results.page_info.next_page_cursor
|
|
56320
|
+
}
|
|
56321
|
+
]);
|
|
56322
|
+
try {
|
|
56323
|
+
setError(null);
|
|
56324
|
+
const searchParams = buildSearchParams(
|
|
56325
|
+
debouncedQuery,
|
|
56326
|
+
selectedEntityTab,
|
|
56327
|
+
filterGroup,
|
|
56328
|
+
pageSize
|
|
56329
|
+
);
|
|
56330
|
+
const res = await triggerSearchPagination({
|
|
56331
|
+
...searchParams,
|
|
56332
|
+
cursor: nextPageCursor
|
|
56333
|
+
}).unwrap();
|
|
56334
|
+
setResults({
|
|
56335
|
+
data: res.data || [],
|
|
56336
|
+
page_info: {
|
|
56337
|
+
has_next_page: res.page_info.has_next_page,
|
|
56338
|
+
next_page_cursor: res.page_info.next_page_cursor
|
|
56339
|
+
},
|
|
56340
|
+
search_metadata: {
|
|
56341
|
+
search_type: res.search_metadata.search_type,
|
|
56342
|
+
description: res.search_metadata.description
|
|
56343
|
+
}
|
|
56344
|
+
});
|
|
56345
|
+
setCurrentPage((prev) => prev + 1);
|
|
56346
|
+
} catch (error2) {
|
|
56347
|
+
const errorMessage = error2 instanceof Error ? error2.message : "An unexpected error occurred while loading the next page";
|
|
56348
|
+
setError(errorMessage);
|
|
56349
|
+
console.error("Load next page error:", error2);
|
|
56350
|
+
} finally {
|
|
56351
|
+
setIsLoadingMore(false);
|
|
56352
|
+
}
|
|
56353
|
+
},
|
|
56354
|
+
[
|
|
56355
|
+
currentPage,
|
|
56356
|
+
results.data,
|
|
56357
|
+
results.page_info.next_page_cursor,
|
|
56358
|
+
isLoadingMore,
|
|
56359
|
+
debouncedQuery,
|
|
56360
|
+
selectedEntityTab,
|
|
56361
|
+
filterGroup,
|
|
56362
|
+
pageSize,
|
|
56363
|
+
setResults,
|
|
56364
|
+
triggerSearchPagination
|
|
56365
|
+
]
|
|
56366
|
+
);
|
|
56367
|
+
const handlePrevPage = useCallback10(() => {
|
|
56368
|
+
const previousPage = pageHistory.find(
|
|
56369
|
+
(p) => p.page === currentPage - 1
|
|
56370
|
+
);
|
|
56371
|
+
if (previousPage) {
|
|
56372
|
+
setResults({
|
|
56373
|
+
data: previousPage.results,
|
|
56374
|
+
page_info: {
|
|
56375
|
+
has_next_page: true,
|
|
56376
|
+
next_page_cursor: previousPage.cursor
|
|
56377
|
+
},
|
|
56378
|
+
search_metadata: results.search_metadata
|
|
56379
|
+
});
|
|
56380
|
+
setCurrentPage((prev) => prev - 1);
|
|
56381
|
+
setPageHistory((prev) => prev.filter((p) => p.page < currentPage));
|
|
56382
|
+
}
|
|
56383
|
+
}, [currentPage, pageHistory, results.search_metadata, setResults]);
|
|
56384
|
+
const resetPagination = useCallback10(() => {
|
|
56385
|
+
setCurrentPage(1);
|
|
56386
|
+
setPageHistory([]);
|
|
56387
|
+
}, []);
|
|
56388
|
+
return {
|
|
56389
|
+
currentPage,
|
|
56390
|
+
pageHistory,
|
|
56391
|
+
error,
|
|
56392
|
+
isLoadingMore,
|
|
56393
|
+
handleNextPage,
|
|
56394
|
+
handlePrevPage,
|
|
56395
|
+
resetPagination,
|
|
56396
|
+
setError
|
|
56397
|
+
};
|
|
56398
|
+
};
|
|
56399
|
+
|
|
56400
|
+
// src/hooks/useUrlParams.ts
|
|
56401
|
+
import { useCallback as useCallback11, useEffect as useEffect40, useState as useState60 } from "react";
|
|
56402
|
+
|
|
56403
|
+
// src/components/WfoSearchPage/constants.ts
|
|
56404
|
+
var DEFAULT_PAGE_SIZE2 = 5;
|
|
56405
|
+
var DEFAULT_DEBOUNCE_DELAY = 300;
|
|
56406
|
+
var SMALL_RESULT_THRESHOLD = 10;
|
|
56407
|
+
var LAYOUT_RATIOS = {
|
|
56408
|
+
RESULTS_GROW: 2,
|
|
56409
|
+
DETAIL_GROW: 3
|
|
56410
|
+
};
|
|
56411
|
+
var VALID_ENTITY_TYPES = [
|
|
56412
|
+
"SUBSCRIPTION",
|
|
56413
|
+
"PRODUCT",
|
|
56414
|
+
"WORKFLOW",
|
|
56415
|
+
"PROCESS"
|
|
56416
|
+
];
|
|
56417
|
+
var DEFAULT_ENTITY_TAB = "SUBSCRIPTION";
|
|
56418
|
+
|
|
56419
|
+
// src/hooks/useUrlParams.ts
|
|
56420
|
+
var useUrlParams = () => {
|
|
56421
|
+
const [urlParams, setUrlParams] = useState60(() => {
|
|
56422
|
+
if (typeof window !== "undefined") {
|
|
56423
|
+
return new URLSearchParams(window.location.search);
|
|
56424
|
+
}
|
|
56425
|
+
return new URLSearchParams();
|
|
56426
|
+
});
|
|
56427
|
+
const [query, setQuery] = useState60(() => {
|
|
56428
|
+
const queryParam = urlParams.get("q");
|
|
56429
|
+
return queryParam || "";
|
|
56430
|
+
});
|
|
56431
|
+
const [selectedEntityTab, setSelectedEntityTab] = useState60(
|
|
56432
|
+
() => {
|
|
56433
|
+
const tabParam = urlParams.get("tab");
|
|
56434
|
+
return tabParam && VALID_ENTITY_TYPES.includes(tabParam) ? tabParam : DEFAULT_ENTITY_TAB;
|
|
56435
|
+
}
|
|
56436
|
+
);
|
|
56437
|
+
const [showFilters, setShowFilters] = useState60(() => {
|
|
56438
|
+
return urlParams.get("filters") === "true";
|
|
56439
|
+
});
|
|
56440
|
+
const [selectedRecordIndex, setSelectedRecordIndex] = useState60(
|
|
56441
|
+
() => {
|
|
56442
|
+
const indexParam = urlParams.get("selected");
|
|
56443
|
+
return indexParam ? parseInt(indexParam, 10) || 0 : 0;
|
|
56444
|
+
}
|
|
56445
|
+
);
|
|
56446
|
+
const [selectedRecordId, setSelectedRecordId] = useState60(
|
|
56447
|
+
() => {
|
|
56448
|
+
return urlParams.get("id") || null;
|
|
56449
|
+
}
|
|
56450
|
+
);
|
|
56451
|
+
const updateUrl = useCallback11(() => {
|
|
56452
|
+
const newParams = new URLSearchParams();
|
|
56453
|
+
const queryText = typeof query === "string" ? query : query.text || "";
|
|
56454
|
+
if (queryText && queryText !== "*") {
|
|
56455
|
+
newParams.set("q", queryText);
|
|
56456
|
+
}
|
|
56457
|
+
if (selectedEntityTab !== DEFAULT_ENTITY_TAB) {
|
|
56458
|
+
newParams.set("tab", selectedEntityTab);
|
|
56459
|
+
}
|
|
56460
|
+
if (showFilters) {
|
|
56461
|
+
newParams.set("filters", "true");
|
|
56462
|
+
}
|
|
56463
|
+
if (selectedRecordIndex > 0) {
|
|
56464
|
+
newParams.set("selected", selectedRecordIndex.toString());
|
|
56465
|
+
}
|
|
56466
|
+
if (selectedRecordId) {
|
|
56467
|
+
newParams.set("id", selectedRecordId);
|
|
56468
|
+
}
|
|
56469
|
+
const newUrl = newParams.toString() ? `${window.location.pathname}?${newParams.toString()}` : window.location.pathname;
|
|
56470
|
+
window.history.replaceState({}, "", newUrl);
|
|
56471
|
+
setUrlParams(newParams);
|
|
56472
|
+
}, [
|
|
56473
|
+
query,
|
|
56474
|
+
selectedEntityTab,
|
|
56475
|
+
showFilters,
|
|
56476
|
+
selectedRecordIndex,
|
|
56477
|
+
selectedRecordId
|
|
56478
|
+
]);
|
|
56479
|
+
useEffect40(() => {
|
|
56480
|
+
updateUrl();
|
|
56481
|
+
}, [updateUrl]);
|
|
56482
|
+
return {
|
|
56483
|
+
urlParams,
|
|
56484
|
+
query,
|
|
56485
|
+
selectedEntityTab,
|
|
56486
|
+
showFilters,
|
|
56487
|
+
selectedRecordIndex,
|
|
56488
|
+
selectedRecordId,
|
|
56489
|
+
setQuery,
|
|
56490
|
+
setSelectedEntityTab,
|
|
56491
|
+
setShowFilters,
|
|
56492
|
+
setSelectedRecordIndex,
|
|
56493
|
+
setSelectedRecordId
|
|
56494
|
+
};
|
|
56495
|
+
};
|
|
56496
|
+
|
|
56497
|
+
// src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx
|
|
56498
|
+
import { useTranslations as useTranslations98 } from "next-intl";
|
|
56499
|
+
import {
|
|
56500
|
+
EuiButton as EuiButton22,
|
|
56501
|
+
EuiButtonIcon as EuiButtonIcon16,
|
|
56502
|
+
EuiCallOut as EuiCallOut2,
|
|
56503
|
+
EuiCode,
|
|
56504
|
+
EuiFlexGroup as EuiFlexGroup38,
|
|
56505
|
+
EuiFlexItem as EuiFlexItem46,
|
|
56506
|
+
EuiPanel as EuiPanel15,
|
|
56507
|
+
EuiSpacer as EuiSpacer30,
|
|
56508
|
+
EuiText as EuiText55
|
|
56509
|
+
} from "@elastic/eui";
|
|
56510
|
+
|
|
56511
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoConditionRow.tsx
|
|
56512
|
+
import { useState as useState62 } from "react";
|
|
56513
|
+
import { useTranslations as useTranslations97 } from "next-intl";
|
|
56514
|
+
import {
|
|
56515
|
+
EuiButtonIcon as EuiButtonIcon15,
|
|
56516
|
+
EuiFlexGroup as EuiFlexGroup37,
|
|
56517
|
+
EuiFlexItem as EuiFlexItem45,
|
|
56518
|
+
EuiFormRow as EuiFormRow25,
|
|
56519
|
+
EuiPanel as EuiPanel14
|
|
56520
|
+
} from "@elastic/eui";
|
|
56521
|
+
|
|
56522
|
+
// src/hooks/usePathAutoComplete.ts
|
|
56523
|
+
import { useEffect as useEffect41, useState as useState61 } from "react";
|
|
56524
|
+
var FALLBACK_DEFINITIONS = {
|
|
56525
|
+
string: {
|
|
56526
|
+
operators: ["eq", "neq"],
|
|
56527
|
+
value_schema: {
|
|
56528
|
+
eq: { kind: "string" },
|
|
56529
|
+
neq: { kind: "string" }
|
|
56530
|
+
}
|
|
56531
|
+
},
|
|
56532
|
+
number: {
|
|
56533
|
+
operators: ["eq", "neq", "lt", "lte", "gt", "gte"],
|
|
56534
|
+
value_schema: {
|
|
56535
|
+
eq: { kind: "number" },
|
|
56536
|
+
neq: { kind: "number" },
|
|
56537
|
+
lt: { kind: "number" },
|
|
56538
|
+
lte: { kind: "number" },
|
|
56539
|
+
gt: { kind: "number" },
|
|
56540
|
+
gte: { kind: "number" }
|
|
56541
|
+
}
|
|
56542
|
+
},
|
|
56543
|
+
boolean: {
|
|
56544
|
+
operators: ["eq", "neq"],
|
|
56545
|
+
value_schema: {
|
|
56546
|
+
eq: { kind: "boolean" },
|
|
56547
|
+
neq: { kind: "boolean" }
|
|
56548
|
+
}
|
|
56549
|
+
},
|
|
56550
|
+
datetime: {
|
|
56551
|
+
operators: ["eq", "neq", "lt", "lte", "gt", "gte"],
|
|
56552
|
+
value_schema: {
|
|
56553
|
+
eq: { kind: "datetime" },
|
|
56554
|
+
neq: { kind: "datetime" },
|
|
56555
|
+
lt: { kind: "datetime" },
|
|
56556
|
+
lte: { kind: "datetime" },
|
|
56557
|
+
gt: { kind: "datetime" },
|
|
56558
|
+
gte: { kind: "datetime" }
|
|
56559
|
+
}
|
|
56560
|
+
}
|
|
56561
|
+
};
|
|
56562
|
+
var usePathAutocomplete = (prefix, entityType) => {
|
|
56563
|
+
const [paths, setPaths] = useState61([]);
|
|
56564
|
+
const debouncedPrefix = useDebounce(prefix, 300);
|
|
56565
|
+
const { data: definitions = FALLBACK_DEFINITIONS, isError: defError } = useSearchDefinitionsQuery();
|
|
56566
|
+
const {
|
|
56567
|
+
data: pathData,
|
|
56568
|
+
isLoading,
|
|
56569
|
+
isError: isError2
|
|
56570
|
+
} = useSearchPathsQuery(
|
|
56571
|
+
{ q: debouncedPrefix, entity_type: entityType },
|
|
56572
|
+
{ skip: debouncedPrefix.length < 1 }
|
|
56573
|
+
);
|
|
56574
|
+
useEffect41(() => {
|
|
56575
|
+
if (debouncedPrefix.length < 1) {
|
|
56576
|
+
setPaths([]);
|
|
56577
|
+
return;
|
|
56578
|
+
}
|
|
56579
|
+
if (!pathData) {
|
|
56580
|
+
return;
|
|
56581
|
+
}
|
|
56582
|
+
const enrichedPaths = [];
|
|
56583
|
+
(pathData.leaves || []).forEach((leaf) => {
|
|
56584
|
+
const primaryType = leaf.ui_types[0] || "string";
|
|
56585
|
+
const typeDefinition = definitions[primaryType];
|
|
56586
|
+
enrichedPaths.push({
|
|
56587
|
+
path: leaf.name,
|
|
56588
|
+
type: primaryType,
|
|
56589
|
+
operators: typeDefinition?.operators || [],
|
|
56590
|
+
value_schema: typeDefinition?.value_schema || {},
|
|
56591
|
+
group: "leaf",
|
|
56592
|
+
displayLabel: leaf.name,
|
|
56593
|
+
ui_types: leaf.ui_types,
|
|
56594
|
+
availablePaths: leaf.paths || [],
|
|
56595
|
+
pathCount: leaf.paths ? leaf.paths.length : 0
|
|
56596
|
+
});
|
|
56597
|
+
});
|
|
56598
|
+
(pathData.components || []).forEach((component) => {
|
|
56599
|
+
const primaryType = component.ui_types[0] || "string";
|
|
56600
|
+
const typeDefinition = definitions[primaryType];
|
|
56601
|
+
enrichedPaths.push({
|
|
56602
|
+
path: component.name,
|
|
56603
|
+
type: "component",
|
|
56604
|
+
operators: typeDefinition?.operators || [],
|
|
56605
|
+
value_schema: typeDefinition?.value_schema || {},
|
|
56606
|
+
group: "component",
|
|
56607
|
+
displayLabel: component.name,
|
|
56608
|
+
ui_types: component.ui_types,
|
|
56609
|
+
availablePaths: component.paths || [],
|
|
56610
|
+
pathCount: component.paths ? component.paths.length : 0
|
|
56611
|
+
});
|
|
56612
|
+
});
|
|
56613
|
+
setPaths(enrichedPaths);
|
|
56614
|
+
}, [pathData, definitions]);
|
|
56615
|
+
const errorMessage = isError2 ? "Failed to load paths" : defError ? "Failed to load definitions" : null;
|
|
56616
|
+
return { paths, loading: isLoading, error: errorMessage };
|
|
56617
|
+
};
|
|
56618
|
+
|
|
56619
|
+
// src/components/WfoSearchPage/WfoValueControl/WfoValueControl.tsx
|
|
56620
|
+
import moment2 from "moment";
|
|
56621
|
+
import { useTranslations as useTranslations92 } from "next-intl";
|
|
56622
|
+
import {
|
|
56623
|
+
EuiComboBox as EuiComboBox2,
|
|
56624
|
+
EuiDatePicker as EuiDatePicker2,
|
|
56625
|
+
EuiFieldNumber as EuiFieldNumber3,
|
|
56626
|
+
EuiFieldText as EuiFieldText5,
|
|
56627
|
+
EuiFlexGroup as EuiFlexGroup33,
|
|
56628
|
+
EuiFlexItem as EuiFlexItem41,
|
|
56629
|
+
EuiFormHelpText,
|
|
56630
|
+
EuiIcon as EuiIcon7,
|
|
56631
|
+
EuiText as EuiText51
|
|
56632
|
+
} from "@elastic/eui";
|
|
56633
|
+
import { Fragment as Fragment63, jsx as jsx271, jsxs as jsxs143 } from "@emotion/react/jsx-runtime";
|
|
56634
|
+
var ValueControl = ({
|
|
56635
|
+
pathInfo,
|
|
56636
|
+
operator,
|
|
56637
|
+
value,
|
|
56638
|
+
onChange
|
|
56639
|
+
}) => {
|
|
56640
|
+
const t = useTranslations92("search.page");
|
|
56641
|
+
const { theme } = useOrchestratorTheme();
|
|
56642
|
+
if (!pathInfo || !operator) return null;
|
|
56643
|
+
const schema = pathInfo.value_schema[operator];
|
|
56644
|
+
if (!schema || schema.kind === "none") return null;
|
|
56645
|
+
if (pathInfo.type === "string") {
|
|
56646
|
+
if (operator === "like") {
|
|
56647
|
+
const handleLikeChange = (newValue) => {
|
|
56648
|
+
onChange(newValue);
|
|
56649
|
+
};
|
|
56650
|
+
const ensureWildcards = (inputValue) => {
|
|
56651
|
+
if (!inputValue) return inputValue;
|
|
56652
|
+
if (!inputValue.includes("%") && !inputValue.includes("_")) {
|
|
56653
|
+
return `%${inputValue}%`;
|
|
56654
|
+
}
|
|
56655
|
+
return inputValue;
|
|
56656
|
+
};
|
|
56657
|
+
const currentValue = String(value || "");
|
|
56658
|
+
const hasWildcards = currentValue.includes("%") || currentValue.includes("_");
|
|
56659
|
+
return /* @__PURE__ */ jsxs143(Fragment63, { children: [
|
|
56660
|
+
/* @__PURE__ */ jsx271(
|
|
56661
|
+
EuiFieldText5,
|
|
56662
|
+
{
|
|
56663
|
+
placeholder: "Enter pattern (% = any chars, _ = single char)",
|
|
56664
|
+
value: currentValue,
|
|
56665
|
+
onChange: (event) => handleLikeChange(event.target.value),
|
|
56666
|
+
onBlur: (event) => {
|
|
56667
|
+
const finalValue = ensureWildcards(
|
|
56668
|
+
event.target.value
|
|
56669
|
+
);
|
|
56670
|
+
if (finalValue !== event.target.value) {
|
|
56671
|
+
handleLikeChange(finalValue);
|
|
56672
|
+
}
|
|
56673
|
+
},
|
|
56674
|
+
prepend: /* @__PURE__ */ jsx271(EuiIcon7, { type: "search" })
|
|
56675
|
+
}
|
|
56676
|
+
),
|
|
56677
|
+
/* @__PURE__ */ jsx271(EuiFormHelpText, { children: hasWildcards ? /* @__PURE__ */ jsxs143("span", { children: [
|
|
56678
|
+
/* @__PURE__ */ jsx271(
|
|
56679
|
+
EuiIcon7,
|
|
56680
|
+
{
|
|
56681
|
+
type: "checkInCircleFilled",
|
|
56682
|
+
color: "success",
|
|
56683
|
+
size: "s"
|
|
56684
|
+
}
|
|
56685
|
+
),
|
|
56686
|
+
" ",
|
|
56687
|
+
"Pattern with wildcards:",
|
|
56688
|
+
" ",
|
|
56689
|
+
/* @__PURE__ */ jsx271("strong", { children: currentValue })
|
|
56690
|
+
] }) : /* @__PURE__ */ jsxs143("span", { children: [
|
|
56691
|
+
"Will search for:",
|
|
56692
|
+
" ",
|
|
56693
|
+
/* @__PURE__ */ jsxs143("strong", { children: [
|
|
56694
|
+
"%",
|
|
56695
|
+
currentValue || "your-text",
|
|
56696
|
+
"%"
|
|
56697
|
+
] }),
|
|
56698
|
+
" ",
|
|
56699
|
+
"(auto-wrapped with wildcards)"
|
|
56700
|
+
] }) })
|
|
56701
|
+
] });
|
|
56702
|
+
}
|
|
56703
|
+
if (pathInfo.example_values && pathInfo.example_values.length > 0) {
|
|
56704
|
+
const options = pathInfo.example_values.map((val) => ({
|
|
56705
|
+
label: val,
|
|
56706
|
+
value: val
|
|
56707
|
+
}));
|
|
56708
|
+
return /* @__PURE__ */ jsx271(
|
|
56709
|
+
EuiComboBox2,
|
|
56710
|
+
{
|
|
56711
|
+
placeholder: t("selectOrEnterValue"),
|
|
56712
|
+
options,
|
|
56713
|
+
selectedOptions: value ? [{ label: String(value), value: String(value) }] : [],
|
|
56714
|
+
onChange: (selected) => onChange(selected[0]?.value || ""),
|
|
56715
|
+
singleSelection: { asPlainText: true },
|
|
56716
|
+
isClearable: true
|
|
56717
|
+
}
|
|
56718
|
+
);
|
|
56719
|
+
}
|
|
56720
|
+
return /* @__PURE__ */ jsx271(
|
|
56721
|
+
EuiFieldText5,
|
|
56722
|
+
{
|
|
56723
|
+
placeholder: t("enterValue"),
|
|
56724
|
+
value: String(value || ""),
|
|
56725
|
+
onChange: (event) => onChange(event.target.value)
|
|
56726
|
+
}
|
|
56727
|
+
);
|
|
56728
|
+
}
|
|
56729
|
+
if (pathInfo.type === "number") {
|
|
56730
|
+
if (operator === "between") {
|
|
56731
|
+
const betweenValue = value || { start: "", end: "" };
|
|
56732
|
+
return /* @__PURE__ */ jsxs143(EuiFlexGroup33, { gutterSize: "s", alignItems: "center", children: [
|
|
56733
|
+
/* @__PURE__ */ jsx271(EuiFlexItem41, { children: /* @__PURE__ */ jsx271(
|
|
56734
|
+
EuiFieldNumber3,
|
|
56735
|
+
{
|
|
56736
|
+
placeholder: t("fromNumber"),
|
|
56737
|
+
value: betweenValue.start,
|
|
56738
|
+
onChange: (event) => onChange({
|
|
56739
|
+
...betweenValue,
|
|
56740
|
+
start: parseFloat(event.target.value) || ""
|
|
56741
|
+
})
|
|
56742
|
+
}
|
|
56743
|
+
) }),
|
|
56744
|
+
/* @__PURE__ */ jsx271(EuiFlexItem41, { grow: false, children: /* @__PURE__ */ jsx271(EuiText51, { size: "s", color: theme.colors.textSubdued, children: "to" }) }),
|
|
56745
|
+
/* @__PURE__ */ jsx271(EuiFlexItem41, { children: /* @__PURE__ */ jsx271(
|
|
56746
|
+
EuiFieldNumber3,
|
|
56747
|
+
{
|
|
56748
|
+
placeholder: t("toNumber"),
|
|
56749
|
+
value: betweenValue.end,
|
|
56750
|
+
onChange: (event) => onChange({
|
|
56751
|
+
...betweenValue,
|
|
56752
|
+
end: parseFloat(event.target.value) || ""
|
|
56753
|
+
})
|
|
56754
|
+
}
|
|
56755
|
+
) })
|
|
56756
|
+
] });
|
|
56757
|
+
}
|
|
56758
|
+
return /* @__PURE__ */ jsx271(
|
|
56759
|
+
EuiFieldNumber3,
|
|
56760
|
+
{
|
|
56761
|
+
placeholder: t("enterNumber"),
|
|
56762
|
+
value: value !== void 0 && value !== null ? Number(value) : "",
|
|
56763
|
+
onChange: (event) => onChange(parseFloat(event.target.value) || "")
|
|
56764
|
+
}
|
|
56765
|
+
);
|
|
56766
|
+
}
|
|
56767
|
+
if (pathInfo.type === "datetime") {
|
|
56768
|
+
if (operator === "between") {
|
|
56769
|
+
const betweenValue = value || { start: null, end: null };
|
|
56770
|
+
return /* @__PURE__ */ jsxs143(EuiFlexGroup33, { gutterSize: "s", alignItems: "center", children: [
|
|
56771
|
+
/* @__PURE__ */ jsx271(EuiFlexItem41, { children: /* @__PURE__ */ jsx271(
|
|
56772
|
+
EuiDatePicker2,
|
|
56773
|
+
{
|
|
56774
|
+
selected: betweenValue.start ? moment2(betweenValue.start) : null,
|
|
56775
|
+
onChange: (date) => onChange({
|
|
56776
|
+
...betweenValue,
|
|
56777
|
+
start: date?.toISOString()
|
|
56778
|
+
}),
|
|
56779
|
+
showTimeSelect: true,
|
|
56780
|
+
dateFormat: "yyyy-MM-dd HH:mm",
|
|
56781
|
+
placeholderText: t("fromDate")
|
|
56782
|
+
}
|
|
56783
|
+
) }),
|
|
56784
|
+
/* @__PURE__ */ jsx271(EuiFlexItem41, { grow: false, children: /* @__PURE__ */ jsx271(EuiText51, { size: "s", color: theme.colors.textSubdued, children: t("valueControlTo") }) }),
|
|
56785
|
+
/* @__PURE__ */ jsx271(EuiFlexItem41, { children: /* @__PURE__ */ jsx271(
|
|
56786
|
+
EuiDatePicker2,
|
|
56787
|
+
{
|
|
56788
|
+
selected: betweenValue.end ? moment2(betweenValue.end) : null,
|
|
56789
|
+
onChange: (date) => onChange({
|
|
56790
|
+
...betweenValue,
|
|
56791
|
+
end: date?.toISOString()
|
|
56792
|
+
}),
|
|
56793
|
+
showTimeSelect: true,
|
|
56794
|
+
dateFormat: "yyyy-MM-dd HH:mm",
|
|
56795
|
+
placeholderText: t("toDate")
|
|
56796
|
+
}
|
|
56797
|
+
) })
|
|
56798
|
+
] });
|
|
56799
|
+
}
|
|
56800
|
+
return /* @__PURE__ */ jsx271(
|
|
56801
|
+
EuiDatePicker2,
|
|
56802
|
+
{
|
|
56803
|
+
selected: value ? moment2(String(value)) : null,
|
|
56804
|
+
onChange: (date) => onChange(date?.toISOString()),
|
|
56805
|
+
showTimeSelect: true,
|
|
56806
|
+
dateFormat: "yyyy-MM-dd HH:mm",
|
|
56807
|
+
placeholderText: t("selectDateAndTime")
|
|
56808
|
+
}
|
|
56809
|
+
);
|
|
56810
|
+
}
|
|
56811
|
+
return null;
|
|
56812
|
+
};
|
|
56813
|
+
|
|
56814
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoFieldSelector.tsx
|
|
56815
|
+
import { useTranslations as useTranslations93 } from "next-intl";
|
|
56816
|
+
import { EuiComboBox as EuiComboBox3 } from "@elastic/eui";
|
|
56817
|
+
import { jsx as jsx272 } from "@emotion/react/jsx-runtime";
|
|
56818
|
+
var WfoFieldSelector = ({
|
|
56819
|
+
pathOptions,
|
|
56820
|
+
loading,
|
|
56821
|
+
error,
|
|
56822
|
+
onFieldSelection,
|
|
56823
|
+
onSearchChange,
|
|
56824
|
+
onClear,
|
|
56825
|
+
renderPathOption
|
|
56826
|
+
}) => {
|
|
56827
|
+
const t = useTranslations93("search.page");
|
|
56828
|
+
const handleSelectionChange = (selected) => {
|
|
56829
|
+
if (selected[0]?.value) {
|
|
56830
|
+
onFieldSelection(selected[0].value);
|
|
56831
|
+
} else {
|
|
56832
|
+
onClear();
|
|
56833
|
+
}
|
|
56834
|
+
};
|
|
56835
|
+
return /* @__PURE__ */ jsx272(
|
|
56836
|
+
EuiComboBox3,
|
|
56837
|
+
{
|
|
56838
|
+
placeholder: t("searchFieldsPlaceholder"),
|
|
56839
|
+
options: pathOptions,
|
|
56840
|
+
selectedOptions: [],
|
|
56841
|
+
onChange: handleSelectionChange,
|
|
56842
|
+
onSearchChange,
|
|
56843
|
+
singleSelection: { asPlainText: true },
|
|
56844
|
+
isLoading: loading,
|
|
56845
|
+
isClearable: true,
|
|
56846
|
+
isInvalid: !!error,
|
|
56847
|
+
renderOption: renderPathOption,
|
|
56848
|
+
rowHeight: 30
|
|
56849
|
+
}
|
|
56850
|
+
);
|
|
56851
|
+
};
|
|
56852
|
+
|
|
56853
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoOperatorSelector.tsx
|
|
56854
|
+
import { useTranslations as useTranslations94 } from "next-intl";
|
|
56855
|
+
import {
|
|
56856
|
+
EuiButton as EuiButton21,
|
|
56857
|
+
EuiFlexGroup as EuiFlexGroup34,
|
|
56858
|
+
EuiFlexItem as EuiFlexItem42,
|
|
56859
|
+
EuiFormRow as EuiFormRow24,
|
|
56860
|
+
EuiText as EuiText52
|
|
56861
|
+
} from "@elastic/eui";
|
|
56862
|
+
import { jsx as jsx273, jsxs as jsxs144 } from "@emotion/react/jsx-runtime";
|
|
56863
|
+
var WfoOperatorSelector = ({
|
|
56864
|
+
selectedPathInfo,
|
|
56865
|
+
condition,
|
|
56866
|
+
onOperatorChange
|
|
56867
|
+
}) => {
|
|
56868
|
+
const t = useTranslations94("search.page");
|
|
56869
|
+
const { theme } = useOrchestratorTheme();
|
|
56870
|
+
return /* @__PURE__ */ jsx273(EuiFormRow24, { label: t("operatorLabel"), children: /* @__PURE__ */ jsxs144(EuiFlexGroup34, { gutterSize: "xs", wrap: true, children: [
|
|
56871
|
+
selectedPathInfo?.operators?.map((operator) => {
|
|
56872
|
+
const { symbol, description } = getOperatorDisplay(
|
|
56873
|
+
operator,
|
|
56874
|
+
selectedPathInfo
|
|
56875
|
+
);
|
|
56876
|
+
const tooltipContent = operator === "like" ? /* @__PURE__ */ jsxs144("div", { children: [
|
|
56877
|
+
/* @__PURE__ */ jsx273("strong", { children: description }),
|
|
56878
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56879
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56880
|
+
/* @__PURE__ */ jsx273("strong", { children: "Wildcards:" }),
|
|
56881
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56882
|
+
"\u2022 ",
|
|
56883
|
+
/* @__PURE__ */ jsx273("code", { children: "%" }),
|
|
56884
|
+
" matches any number of characters",
|
|
56885
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56886
|
+
"\u2022 ",
|
|
56887
|
+
/* @__PURE__ */ jsx273("code", { children: "_" }),
|
|
56888
|
+
" matches exactly one character",
|
|
56889
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56890
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56891
|
+
/* @__PURE__ */ jsx273("strong", { children: "Examples:" }),
|
|
56892
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56893
|
+
"\u2022 ",
|
|
56894
|
+
/* @__PURE__ */ jsx273("code", { children: "%test%" }),
|
|
56895
|
+
' finds anything containing "test"',
|
|
56896
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56897
|
+
"\u2022 ",
|
|
56898
|
+
/* @__PURE__ */ jsx273("code", { children: "test%" }),
|
|
56899
|
+
' finds anything starting with "test"',
|
|
56900
|
+
/* @__PURE__ */ jsx273("br", {}),
|
|
56901
|
+
"\u2022 ",
|
|
56902
|
+
/* @__PURE__ */ jsx273("code", { children: "test_" }),
|
|
56903
|
+
' finds "test" + one character'
|
|
56904
|
+
] }) : description;
|
|
56905
|
+
return /* @__PURE__ */ jsx273(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx273(WfoToolTip, { tooltipContent, children: /* @__PURE__ */ jsx273(
|
|
56906
|
+
EuiButton21,
|
|
56907
|
+
{
|
|
56908
|
+
size: "s",
|
|
56909
|
+
color: getButtonColor(
|
|
56910
|
+
operator,
|
|
56911
|
+
selectedPathInfo,
|
|
56912
|
+
condition
|
|
56913
|
+
),
|
|
56914
|
+
fill: getButtonFill(
|
|
56915
|
+
operator,
|
|
56916
|
+
selectedPathInfo,
|
|
56917
|
+
condition
|
|
56918
|
+
),
|
|
56919
|
+
onClick: () => onOperatorChange(operator),
|
|
56920
|
+
style: {
|
|
56921
|
+
minWidth: theme.size.xxl,
|
|
56922
|
+
fontSize: theme.size.base,
|
|
56923
|
+
fontWeight: theme.font.weight.bold
|
|
56924
|
+
},
|
|
56925
|
+
children: symbol
|
|
56926
|
+
}
|
|
56927
|
+
) }) }, operator);
|
|
56928
|
+
}),
|
|
56929
|
+
(!selectedPathInfo || selectedPathInfo.operators.length === 0) && /* @__PURE__ */ jsx273(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx273(EuiText52, { size: "s", color: theme.colors.textSubdued, children: t("selectFieldFirst") }) })
|
|
56930
|
+
] }) });
|
|
56931
|
+
};
|
|
56932
|
+
|
|
56933
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoPathChips.tsx
|
|
56934
|
+
import { EuiIcon as EuiIcon8 } from "@elastic/eui";
|
|
56935
|
+
import { jsx as jsx274, jsxs as jsxs145 } from "@emotion/react/jsx-runtime";
|
|
56936
|
+
var WfoPathChips = ({
|
|
56937
|
+
fullPath,
|
|
56938
|
+
label,
|
|
56939
|
+
fieldType,
|
|
56940
|
+
isAnyPath = false
|
|
56941
|
+
}) => {
|
|
56942
|
+
const { theme } = useOrchestratorTheme();
|
|
56943
|
+
if (isAnyPath) {
|
|
56944
|
+
return /* @__PURE__ */ jsx274(WfoToolTip, { tooltipContent: label, children: /* @__PURE__ */ jsxs145(
|
|
56945
|
+
"div",
|
|
56946
|
+
{
|
|
56947
|
+
style: {
|
|
56948
|
+
display: "flex",
|
|
56949
|
+
justifyContent: "space-between",
|
|
56950
|
+
alignItems: "center",
|
|
56951
|
+
padding: `${theme.size.xs} ${theme.size.s} ${theme.size.xs} 0`,
|
|
56952
|
+
textDecoration: "none",
|
|
56953
|
+
width: "100%",
|
|
56954
|
+
boxSizing: "border-box",
|
|
56955
|
+
minHeight: theme.size.xl
|
|
56956
|
+
},
|
|
56957
|
+
children: [
|
|
56958
|
+
/* @__PURE__ */ jsx274(
|
|
56959
|
+
"div",
|
|
56960
|
+
{
|
|
56961
|
+
style: {
|
|
56962
|
+
display: "flex",
|
|
56963
|
+
gap: theme.size.xs,
|
|
56964
|
+
alignItems: "center",
|
|
56965
|
+
flexWrap: "nowrap",
|
|
56966
|
+
textDecoration: "none",
|
|
56967
|
+
marginRight: theme.size.s,
|
|
56968
|
+
flex: 1,
|
|
56969
|
+
overflow: "visible"
|
|
56970
|
+
},
|
|
56971
|
+
children: /* @__PURE__ */ jsx274(
|
|
56972
|
+
"div",
|
|
56973
|
+
{
|
|
56974
|
+
style: {
|
|
56975
|
+
textDecoration: "none",
|
|
56976
|
+
borderBottom: "none"
|
|
56977
|
+
},
|
|
56978
|
+
children: /* @__PURE__ */ jsx274(
|
|
56979
|
+
WfoBadge,
|
|
56980
|
+
{
|
|
56981
|
+
color: "primary",
|
|
56982
|
+
textColor: theme.colors.ghost,
|
|
56983
|
+
size: "xs",
|
|
56984
|
+
children: /* @__PURE__ */ jsx274(
|
|
56985
|
+
"span",
|
|
56986
|
+
{
|
|
56987
|
+
style: {
|
|
56988
|
+
textDecoration: "none",
|
|
56989
|
+
borderBottom: "none",
|
|
56990
|
+
outline: "none",
|
|
56991
|
+
textDecorationLine: "none",
|
|
56992
|
+
textDecorationColor: "transparent"
|
|
56993
|
+
},
|
|
56994
|
+
children: label
|
|
56995
|
+
}
|
|
56996
|
+
)
|
|
56997
|
+
}
|
|
56998
|
+
)
|
|
56999
|
+
}
|
|
57000
|
+
)
|
|
57001
|
+
}
|
|
57002
|
+
),
|
|
57003
|
+
fieldType && /* @__PURE__ */ jsx274("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx274(
|
|
57004
|
+
WfoBadge,
|
|
57005
|
+
{
|
|
57006
|
+
color: getTypeColor(fieldType, theme),
|
|
57007
|
+
textColor: theme.colors.ink,
|
|
57008
|
+
size: "xs",
|
|
57009
|
+
children: /* @__PURE__ */ jsx274("span", { style: { textDecoration: "none" }, children: fieldType })
|
|
57010
|
+
}
|
|
57011
|
+
) })
|
|
57012
|
+
]
|
|
57013
|
+
}
|
|
57014
|
+
) });
|
|
57015
|
+
}
|
|
57016
|
+
const completePath = fullPath || label;
|
|
57017
|
+
const allSegments = completePath.split(".").filter(
|
|
57018
|
+
(segment) => segment && !segment.match(/^\d+$/) && !segment.includes("(")
|
|
57019
|
+
);
|
|
57020
|
+
const pathSegments = allSegments.slice(-2);
|
|
57021
|
+
return /* @__PURE__ */ jsx274(WfoToolTip, { tooltipContent: completePath, children: /* @__PURE__ */ jsxs145(
|
|
57022
|
+
"div",
|
|
57023
|
+
{
|
|
57024
|
+
style: {
|
|
57025
|
+
display: "flex",
|
|
57026
|
+
justifyContent: "space-between",
|
|
57027
|
+
alignItems: "center",
|
|
57028
|
+
padding: `${theme.size.xs} ${theme.size.s} ${theme.size.xs} 0`,
|
|
57029
|
+
textDecoration: "none",
|
|
57030
|
+
width: "100%",
|
|
57031
|
+
boxSizing: "border-box",
|
|
57032
|
+
minHeight: theme.size.xl
|
|
57033
|
+
},
|
|
57034
|
+
children: [
|
|
57035
|
+
/* @__PURE__ */ jsx274(
|
|
57036
|
+
"div",
|
|
57037
|
+
{
|
|
57038
|
+
style: {
|
|
57039
|
+
display: "flex",
|
|
57040
|
+
gap: theme.size.xs,
|
|
57041
|
+
alignItems: "center",
|
|
57042
|
+
flexWrap: "nowrap",
|
|
57043
|
+
textDecoration: "none",
|
|
57044
|
+
marginRight: theme.size.s,
|
|
57045
|
+
flex: 1,
|
|
57046
|
+
overflow: "visible"
|
|
57047
|
+
},
|
|
57048
|
+
children: pathSegments.map(
|
|
57049
|
+
(segment, index) => [
|
|
57050
|
+
/* @__PURE__ */ jsx274(
|
|
57051
|
+
"div",
|
|
57052
|
+
{
|
|
57053
|
+
style: {
|
|
57054
|
+
textDecoration: "none",
|
|
57055
|
+
borderBottom: "none"
|
|
57056
|
+
},
|
|
57057
|
+
children: /* @__PURE__ */ jsx274(
|
|
57058
|
+
WfoBadge,
|
|
57059
|
+
{
|
|
57060
|
+
color: "primary",
|
|
57061
|
+
textColor: theme.colors.ghost,
|
|
57062
|
+
size: "xs",
|
|
57063
|
+
children: /* @__PURE__ */ jsx274(
|
|
57064
|
+
"span",
|
|
57065
|
+
{
|
|
57066
|
+
style: {
|
|
57067
|
+
textDecoration: "none",
|
|
57068
|
+
borderBottom: "none",
|
|
57069
|
+
outline: "none",
|
|
57070
|
+
textDecorationLine: "none",
|
|
57071
|
+
textDecorationColor: "transparent"
|
|
57072
|
+
},
|
|
57073
|
+
children: segment
|
|
57074
|
+
}
|
|
57075
|
+
)
|
|
57076
|
+
}
|
|
57077
|
+
)
|
|
57078
|
+
},
|
|
57079
|
+
`segment-${index}`
|
|
57080
|
+
),
|
|
57081
|
+
index < pathSegments.length - 1 && /* @__PURE__ */ jsx274(
|
|
57082
|
+
EuiIcon8,
|
|
57083
|
+
{
|
|
57084
|
+
type: "arrowRight",
|
|
57085
|
+
size: "s",
|
|
57086
|
+
color: theme.colors.mediumShade,
|
|
57087
|
+
title: "",
|
|
57088
|
+
style: {
|
|
57089
|
+
flexShrink: 0,
|
|
57090
|
+
marginTop: "1px"
|
|
57091
|
+
}
|
|
57092
|
+
},
|
|
57093
|
+
`arrow-${index}`
|
|
57094
|
+
)
|
|
57095
|
+
].filter(Boolean)
|
|
57096
|
+
)
|
|
57097
|
+
}
|
|
57098
|
+
),
|
|
57099
|
+
fieldType && /* @__PURE__ */ jsx274("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx274(
|
|
57100
|
+
WfoBadge,
|
|
57101
|
+
{
|
|
57102
|
+
color: getTypeColor(fieldType, theme),
|
|
57103
|
+
textColor: theme.colors.ink,
|
|
57104
|
+
size: "xs",
|
|
57105
|
+
children: /* @__PURE__ */ jsx274("span", { style: { textDecoration: "none" }, children: fieldType })
|
|
57106
|
+
}
|
|
57107
|
+
) })
|
|
57108
|
+
]
|
|
57109
|
+
}
|
|
57110
|
+
) });
|
|
57111
|
+
};
|
|
57112
|
+
|
|
57113
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoPathSelector.tsx
|
|
57114
|
+
import { useTranslations as useTranslations95 } from "next-intl";
|
|
57115
|
+
import { EuiComboBox as EuiComboBox4 } from "@elastic/eui";
|
|
57116
|
+
import { jsx as jsx275 } from "@emotion/react/jsx-runtime";
|
|
57117
|
+
var WfoPathSelector = ({
|
|
57118
|
+
selectedFieldName,
|
|
57119
|
+
pathOptions,
|
|
57120
|
+
onPathSelection,
|
|
57121
|
+
onClear,
|
|
57122
|
+
renderOption
|
|
57123
|
+
}) => {
|
|
57124
|
+
const t = useTranslations95("search.page");
|
|
57125
|
+
return /* @__PURE__ */ jsx275(
|
|
57126
|
+
EuiComboBox4,
|
|
57127
|
+
{
|
|
57128
|
+
placeholder: t("selectSpecificPathPlaceholder"),
|
|
57129
|
+
options: pathOptions,
|
|
57130
|
+
selectedOptions: [
|
|
57131
|
+
{
|
|
57132
|
+
label: `${selectedFieldName}:`,
|
|
57133
|
+
value: selectedFieldName
|
|
57134
|
+
}
|
|
57135
|
+
],
|
|
57136
|
+
onChange: (selected) => {
|
|
57137
|
+
if (selected[0]?.value) {
|
|
57138
|
+
const selectedOption = pathOptions.find(
|
|
57139
|
+
(option) => option.value === selected[0].value
|
|
57140
|
+
);
|
|
57141
|
+
if (selectedOption) {
|
|
57142
|
+
onPathSelection(selectedOption);
|
|
57143
|
+
}
|
|
57144
|
+
} else if (selected.length === 0) {
|
|
57145
|
+
onClear();
|
|
57146
|
+
}
|
|
57147
|
+
},
|
|
57148
|
+
singleSelection: { asPlainText: true },
|
|
57149
|
+
isClearable: true,
|
|
57150
|
+
renderOption,
|
|
57151
|
+
rowHeight: 40,
|
|
57152
|
+
autoFocus: true,
|
|
57153
|
+
fullWidth: true,
|
|
57154
|
+
style: {
|
|
57155
|
+
minWidth: "500px",
|
|
57156
|
+
maxWidth: "100%",
|
|
57157
|
+
textDecoration: "none"
|
|
57158
|
+
},
|
|
57159
|
+
className: "wfo-path-selector"
|
|
57160
|
+
}
|
|
57161
|
+
);
|
|
57162
|
+
};
|
|
57163
|
+
|
|
57164
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoRenderFunctions.tsx
|
|
57165
|
+
import { useTranslations as useTranslations96 } from "next-intl";
|
|
57166
|
+
import { EuiFlexGroup as EuiFlexGroup35, EuiFlexItem as EuiFlexItem43, EuiText as EuiText53 } from "@elastic/eui";
|
|
57167
|
+
import { Fragment as Fragment64, jsx as jsx276, jsxs as jsxs146 } from "@emotion/react/jsx-runtime";
|
|
57168
|
+
var WfoRenderPathOption = ({
|
|
57169
|
+
option,
|
|
57170
|
+
contentClassName,
|
|
57171
|
+
paths
|
|
57172
|
+
}) => {
|
|
57173
|
+
const t = useTranslations96("search.page");
|
|
57174
|
+
const { theme } = useOrchestratorTheme();
|
|
57175
|
+
const pathInfo = option.value ? paths.find(({ path }) => path === option.value) : null;
|
|
57176
|
+
if (!pathInfo) return /* @__PURE__ */ jsx276(Fragment64, { children: option.label });
|
|
57177
|
+
return /* @__PURE__ */ jsxs146(
|
|
57178
|
+
EuiFlexGroup35,
|
|
57179
|
+
{
|
|
57180
|
+
alignItems: "center",
|
|
57181
|
+
gutterSize: "s",
|
|
57182
|
+
responsive: false,
|
|
57183
|
+
className: contentClassName,
|
|
57184
|
+
title: "",
|
|
57185
|
+
children: [
|
|
57186
|
+
/* @__PURE__ */ jsx276(EuiFlexItem43, { grow: true, children: /* @__PURE__ */ jsx276(EuiText53, { size: "s", children: pathInfo.displayLabel || pathInfo.path }) }),
|
|
57187
|
+
/* @__PURE__ */ jsx276(EuiFlexItem43, { grow: false, children: /* @__PURE__ */ jsxs146(
|
|
57188
|
+
EuiFlexGroup35,
|
|
57189
|
+
{
|
|
57190
|
+
gutterSize: "xs",
|
|
57191
|
+
alignItems: "center",
|
|
57192
|
+
responsive: false,
|
|
57193
|
+
children: [
|
|
57194
|
+
pathInfo.group === "leaf" && pathInfo.pathCount && pathInfo.pathCount > 1 && /* @__PURE__ */ jsx276(EuiFlexItem43, { grow: false, children: /* @__PURE__ */ jsx276(
|
|
57195
|
+
WfoBadge,
|
|
57196
|
+
{
|
|
57197
|
+
color: "default",
|
|
57198
|
+
textColor: theme.colors.ink,
|
|
57199
|
+
size: "xs",
|
|
57200
|
+
children: t("pathsCount", {
|
|
57201
|
+
count: pathInfo.pathCount
|
|
57202
|
+
})
|
|
57203
|
+
}
|
|
57204
|
+
) }),
|
|
57205
|
+
(!pathInfo.pathCount || pathInfo.pathCount <= 1) && pathInfo.ui_types?.map((type, index) => /* @__PURE__ */ jsx276(EuiFlexItem43, { grow: false, children: /* @__PURE__ */ jsx276(
|
|
57206
|
+
WfoBadge,
|
|
57207
|
+
{
|
|
57208
|
+
color: getTypeColor(type, theme),
|
|
57209
|
+
textColor: theme.colors.ink,
|
|
57210
|
+
size: "xs",
|
|
57211
|
+
children: type
|
|
57212
|
+
}
|
|
57213
|
+
) }, index))
|
|
57214
|
+
]
|
|
57215
|
+
}
|
|
57216
|
+
) })
|
|
57217
|
+
]
|
|
57218
|
+
}
|
|
57219
|
+
);
|
|
57220
|
+
};
|
|
57221
|
+
var WfoRenderPathSelectionOption = ({ option, contentClassName, fieldType }) => {
|
|
57222
|
+
const { theme } = useOrchestratorTheme();
|
|
57223
|
+
return /* @__PURE__ */ jsx276(WfoToolTip, { tooltipContent: option.fullPath || option.label, children: /* @__PURE__ */ jsxs146(
|
|
57224
|
+
EuiFlexGroup35,
|
|
57225
|
+
{
|
|
57226
|
+
alignItems: "center",
|
|
57227
|
+
gutterSize: "s",
|
|
57228
|
+
responsive: false,
|
|
57229
|
+
className: contentClassName,
|
|
57230
|
+
title: "",
|
|
57231
|
+
children: [
|
|
57232
|
+
/* @__PURE__ */ jsx276(EuiFlexItem43, { grow: true, children: /* @__PURE__ */ jsx276(EuiText53, { size: "s", children: option.label }) }),
|
|
57233
|
+
/* @__PURE__ */ jsx276(EuiFlexItem43, { grow: false, children: /* @__PURE__ */ jsx276(
|
|
57234
|
+
WfoBadge,
|
|
57235
|
+
{
|
|
57236
|
+
color: getTypeColor(fieldType, theme),
|
|
57237
|
+
textColor: theme.colors.ink,
|
|
57238
|
+
size: "xs",
|
|
57239
|
+
children: fieldType
|
|
57240
|
+
}
|
|
57241
|
+
) })
|
|
57242
|
+
]
|
|
57243
|
+
}
|
|
57244
|
+
) });
|
|
57245
|
+
};
|
|
57246
|
+
|
|
57247
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx
|
|
57248
|
+
import { EuiFlexGroup as EuiFlexGroup36, EuiFlexItem as EuiFlexItem44, EuiText as EuiText54 } from "@elastic/eui";
|
|
57249
|
+
|
|
57250
|
+
// src/components/WfoSearchPage/WfoConditionRow/utils.ts
|
|
57251
|
+
var createOptionsFromPaths = (paths, group) => paths.filter(({ group: pathGroup }) => pathGroup === group).map(({ displayLabel, path, type, operators }) => ({
|
|
57252
|
+
label: displayLabel || path,
|
|
57253
|
+
value: path,
|
|
57254
|
+
"data-type": type,
|
|
57255
|
+
"data-operators": operators?.join(", ") || ""
|
|
57256
|
+
}));
|
|
57257
|
+
var shouldHideValueInput = (selectedPathInfo, operatorSelected) => {
|
|
57258
|
+
if (!selectedPathInfo || !operatorSelected) return true;
|
|
57259
|
+
if (selectedPathInfo.group === "component") return true;
|
|
57260
|
+
if (selectedPathInfo.type === "boolean") return true;
|
|
57261
|
+
return false;
|
|
57262
|
+
};
|
|
57263
|
+
var isFullPathSelected = (path, selectedPathInfo) => {
|
|
57264
|
+
return !!(path && (path.includes(".") || selectedPathInfo && selectedPathInfo.group === "component" || !path.includes(".") && selectedPathInfo));
|
|
57265
|
+
};
|
|
57266
|
+
var getFieldNameFromPath = (path, isComponent) => {
|
|
57267
|
+
return isComponent ? path : path.split(".").pop() || path;
|
|
57268
|
+
};
|
|
57269
|
+
var getFieldNameFromFullPath = (fullPath) => {
|
|
57270
|
+
const parts = fullPath.split(".");
|
|
57271
|
+
return parts[parts.length - 1] || fullPath;
|
|
57272
|
+
};
|
|
57273
|
+
var getPathSelectionOptions = (selectedFieldName, paths) => {
|
|
57274
|
+
if (!selectedFieldName) return [];
|
|
57275
|
+
const fieldInfo = paths.find(({ path }) => path === selectedFieldName);
|
|
57276
|
+
if (!fieldInfo || !fieldInfo.availablePaths) return [];
|
|
57277
|
+
return fieldInfo.availablePaths.map((fullPath) => ({
|
|
57278
|
+
label: fullPath,
|
|
57279
|
+
value: fullPath,
|
|
57280
|
+
fullPath
|
|
57281
|
+
}));
|
|
57282
|
+
};
|
|
57283
|
+
|
|
57284
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx
|
|
57285
|
+
import { jsx as jsx277, jsxs as jsxs147 } from "@emotion/react/jsx-runtime";
|
|
57286
|
+
var WfoSelectedPathDisplay = ({
|
|
57287
|
+
condition,
|
|
57288
|
+
onEdit
|
|
57289
|
+
}) => {
|
|
57290
|
+
const { theme } = useOrchestratorTheme();
|
|
57291
|
+
const isFullPath = condition.path.includes(".");
|
|
57292
|
+
return /* @__PURE__ */ jsx277(
|
|
57293
|
+
"div",
|
|
57294
|
+
{
|
|
57295
|
+
onClick: onEdit,
|
|
57296
|
+
style: {
|
|
57297
|
+
cursor: "pointer",
|
|
57298
|
+
border: `1px solid ${theme.colors.lightShade}`,
|
|
57299
|
+
borderRadius: theme.border.radius.medium,
|
|
57300
|
+
padding: `${theme.size.s} ${theme.size.m}`,
|
|
57301
|
+
backgroundColor: theme.colors.emptyShade,
|
|
57302
|
+
minHeight: "40px",
|
|
57303
|
+
display: "flex",
|
|
57304
|
+
alignItems: "center"
|
|
57305
|
+
},
|
|
57306
|
+
children: /* @__PURE__ */ jsx277(
|
|
57307
|
+
EuiFlexGroup36,
|
|
57308
|
+
{
|
|
57309
|
+
alignItems: "center",
|
|
57310
|
+
gutterSize: "s",
|
|
57311
|
+
responsive: false,
|
|
57312
|
+
justifyContent: "spaceBetween",
|
|
57313
|
+
children: /* @__PURE__ */ jsx277(EuiFlexItem44, { grow: true, children: isFullPath ? /* @__PURE__ */ jsxs147(
|
|
57314
|
+
EuiFlexGroup36,
|
|
57315
|
+
{
|
|
57316
|
+
gutterSize: "none",
|
|
57317
|
+
alignItems: "center",
|
|
57318
|
+
responsive: false,
|
|
57319
|
+
children: [
|
|
57320
|
+
/* @__PURE__ */ jsx277(EuiFlexItem44, { grow: false, children: /* @__PURE__ */ jsxs147(EuiText54, { size: "s", color: theme.colors.text, children: [
|
|
57321
|
+
getFieldNameFromFullPath(condition.path),
|
|
57322
|
+
":"
|
|
57323
|
+
] }) }),
|
|
57324
|
+
/* @__PURE__ */ jsx277(EuiFlexItem44, { grow: false, children: /* @__PURE__ */ jsx277(
|
|
57325
|
+
EuiText54,
|
|
57326
|
+
{
|
|
57327
|
+
size: "s",
|
|
57328
|
+
style: {
|
|
57329
|
+
backgroundColor: theme.colors.lightestShade,
|
|
57330
|
+
color: theme.colors.primary,
|
|
57331
|
+
padding: `${theme.size.xxs} ${theme.size.xs}`,
|
|
57332
|
+
borderRadius: theme.border.radius.small,
|
|
57333
|
+
marginLeft: theme.size.xs
|
|
57334
|
+
},
|
|
57335
|
+
children: condition.path
|
|
57336
|
+
}
|
|
57337
|
+
) })
|
|
57338
|
+
]
|
|
57339
|
+
}
|
|
57340
|
+
) : /* @__PURE__ */ jsx277(EuiText54, { size: "s", color: theme.colors.text, children: condition.path }) })
|
|
57341
|
+
}
|
|
57342
|
+
)
|
|
57343
|
+
}
|
|
57344
|
+
);
|
|
57345
|
+
};
|
|
57346
|
+
|
|
57347
|
+
// src/components/WfoSearchPage/WfoConditionRow/WfoConditionRow.tsx
|
|
57348
|
+
import { jsx as jsx278, jsxs as jsxs148 } from "@emotion/react/jsx-runtime";
|
|
57349
|
+
var ConditionRow = ({
|
|
57350
|
+
condition,
|
|
57351
|
+
entityType,
|
|
57352
|
+
onChange,
|
|
57353
|
+
onRemove
|
|
57354
|
+
}) => {
|
|
57355
|
+
const t = useTranslations97("search.page");
|
|
57356
|
+
const { theme } = useOrchestratorTheme();
|
|
57357
|
+
const [searchValue, setSearchValue] = useState62(condition.path);
|
|
57358
|
+
const [showPathSelection, setShowPathSelection] = useState62(false);
|
|
57359
|
+
const [selectedFieldName, setSelectedFieldName] = useState62("");
|
|
57360
|
+
const { paths, loading, error } = usePathAutocomplete(
|
|
57361
|
+
searchValue,
|
|
57362
|
+
entityType
|
|
57363
|
+
);
|
|
57364
|
+
const selectedPathInfo = (() => {
|
|
57365
|
+
if (!condition.path) return null;
|
|
57366
|
+
const exactMatch = paths.find(
|
|
57367
|
+
({ path, fullPath }) => fullPath ? fullPath === condition.path : path === condition.path
|
|
57368
|
+
);
|
|
57369
|
+
if (exactMatch) return exactMatch;
|
|
57370
|
+
if (condition.path.includes(".")) {
|
|
57371
|
+
const fieldName = condition.path.split(".").pop();
|
|
57372
|
+
if (fieldName) {
|
|
57373
|
+
const fieldMatch = paths.find(
|
|
57374
|
+
({ path, availablePaths }) => path === fieldName && availablePaths && availablePaths.includes(condition.path)
|
|
57375
|
+
);
|
|
57376
|
+
if (fieldMatch) return fieldMatch;
|
|
57377
|
+
}
|
|
57378
|
+
} else {
|
|
57379
|
+
const fieldMatch = paths.find(
|
|
57380
|
+
({ path }) => path === condition.path
|
|
57381
|
+
);
|
|
57382
|
+
if (fieldMatch) return fieldMatch;
|
|
57383
|
+
}
|
|
57384
|
+
return null;
|
|
57385
|
+
})();
|
|
57386
|
+
const handleFieldSelection = (fieldName) => {
|
|
57387
|
+
const fieldInfo = paths.find(({ path }) => path === fieldName);
|
|
57388
|
+
if (fieldInfo && fieldInfo.group === "component") {
|
|
57389
|
+
onChange({
|
|
57390
|
+
path: fieldName,
|
|
57391
|
+
value_kind: fieldInfo.type,
|
|
57392
|
+
condition: { op: "", value: void 0 }
|
|
57393
|
+
});
|
|
57394
|
+
return;
|
|
57395
|
+
}
|
|
57396
|
+
if (fieldInfo && fieldInfo.availablePaths && fieldInfo.availablePaths.length === 1) {
|
|
57397
|
+
const singlePath = fieldInfo.availablePaths[0];
|
|
57398
|
+
onChange({
|
|
57399
|
+
path: singlePath,
|
|
57400
|
+
value_kind: fieldInfo.type,
|
|
57401
|
+
condition: { op: "", value: void 0 }
|
|
57402
|
+
});
|
|
57403
|
+
return;
|
|
57404
|
+
}
|
|
57405
|
+
setSelectedFieldName(fieldName);
|
|
57406
|
+
setShowPathSelection(true);
|
|
57407
|
+
};
|
|
57408
|
+
const handlePathSelection = (selectedOption) => {
|
|
57409
|
+
const fieldInfo = paths.find(({ path }) => path === selectedFieldName);
|
|
57410
|
+
if (fieldInfo) {
|
|
57411
|
+
if (selectedOption.isAnyPath) {
|
|
57412
|
+
onChange({
|
|
57413
|
+
path: selectedFieldName,
|
|
57414
|
+
value_kind: fieldInfo.type,
|
|
57415
|
+
condition: { op: "", value: void 0 }
|
|
57416
|
+
});
|
|
57417
|
+
} else {
|
|
57418
|
+
onChange({
|
|
57419
|
+
path: selectedOption.value,
|
|
57420
|
+
value_kind: fieldInfo.type,
|
|
57421
|
+
condition: { op: "", value: void 0 }
|
|
57422
|
+
});
|
|
57423
|
+
}
|
|
57424
|
+
}
|
|
57425
|
+
setShowPathSelection(false);
|
|
57426
|
+
setSelectedFieldName("");
|
|
57427
|
+
};
|
|
57428
|
+
const handleOperatorChange = (op) => {
|
|
57429
|
+
const value = void 0;
|
|
57430
|
+
if (selectedPathInfo?.type === "boolean") {
|
|
57431
|
+
const actualOp = "eq";
|
|
57432
|
+
const booleanValue = op === "eq" ? true : false;
|
|
57433
|
+
onChange({
|
|
57434
|
+
...condition,
|
|
57435
|
+
value_kind: selectedPathInfo?.type,
|
|
57436
|
+
condition: { op: actualOp, value: booleanValue }
|
|
57437
|
+
});
|
|
57438
|
+
return;
|
|
57439
|
+
}
|
|
57440
|
+
onChange({
|
|
57441
|
+
...condition,
|
|
57442
|
+
value_kind: selectedPathInfo?.type,
|
|
57443
|
+
condition: { op, value }
|
|
57444
|
+
});
|
|
57445
|
+
};
|
|
57446
|
+
const handleValueChange = (value) => {
|
|
57447
|
+
onChange({
|
|
57448
|
+
...condition,
|
|
57449
|
+
value_kind: selectedPathInfo?.type,
|
|
57450
|
+
condition: { ...condition.condition, value }
|
|
57451
|
+
});
|
|
57452
|
+
};
|
|
57453
|
+
const leavesOptions = createOptionsFromPaths(paths, "leaf");
|
|
57454
|
+
const componentsOptions = createOptionsFromPaths(paths, "component");
|
|
57455
|
+
const pathOptions = [
|
|
57456
|
+
...leavesOptions.length > 0 ? [
|
|
57457
|
+
{
|
|
57458
|
+
label: t("fieldsGroupLabel"),
|
|
57459
|
+
options: leavesOptions
|
|
57460
|
+
}
|
|
57461
|
+
] : [],
|
|
57462
|
+
...componentsOptions.length > 0 ? [
|
|
57463
|
+
{
|
|
57464
|
+
label: t("componentsGroupLabel"),
|
|
57465
|
+
options: componentsOptions
|
|
57466
|
+
}
|
|
57467
|
+
] : []
|
|
57468
|
+
];
|
|
57469
|
+
const hideValueInput = shouldHideValueInput(
|
|
57470
|
+
selectedPathInfo,
|
|
57471
|
+
!!condition.condition.op
|
|
57472
|
+
);
|
|
57473
|
+
const fullPathSelected = isFullPathSelected(
|
|
57474
|
+
condition.path,
|
|
57475
|
+
selectedPathInfo
|
|
57476
|
+
);
|
|
57477
|
+
const pathSelectionOptions = (() => {
|
|
57478
|
+
const baseOptions = getPathSelectionOptions(selectedFieldName, paths);
|
|
57479
|
+
const fieldInfo = paths.find(({ path }) => path === selectedFieldName);
|
|
57480
|
+
if (fieldInfo?.availablePaths && fieldInfo.availablePaths.length > 1) {
|
|
57481
|
+
return [
|
|
57482
|
+
{
|
|
57483
|
+
label: t("anyPathOption"),
|
|
57484
|
+
value: selectedFieldName,
|
|
57485
|
+
fullPath: selectedFieldName,
|
|
57486
|
+
isAnyPath: true
|
|
57487
|
+
},
|
|
57488
|
+
...baseOptions
|
|
57489
|
+
];
|
|
57490
|
+
}
|
|
57491
|
+
return baseOptions;
|
|
57492
|
+
})();
|
|
57493
|
+
const renderPathOption = (option, searchValue2, contentClassName) => /* @__PURE__ */ jsx278(
|
|
57494
|
+
WfoRenderPathOption,
|
|
57495
|
+
{
|
|
57496
|
+
option,
|
|
57497
|
+
searchValue: searchValue2,
|
|
57498
|
+
contentClassName,
|
|
57499
|
+
paths
|
|
57500
|
+
}
|
|
57501
|
+
);
|
|
57502
|
+
const renderPathSelectionOption = (option) => {
|
|
57503
|
+
const fieldInfo = paths.find(({ path }) => path === selectedFieldName);
|
|
57504
|
+
const fieldType = fieldInfo?.type || "string";
|
|
57505
|
+
return /* @__PURE__ */ jsx278(
|
|
57506
|
+
WfoPathChips,
|
|
57507
|
+
{
|
|
57508
|
+
fullPath: option.fullPath || "",
|
|
57509
|
+
label: option.label,
|
|
57510
|
+
fieldType,
|
|
57511
|
+
isAnyPath: option.isAnyPath
|
|
57512
|
+
}
|
|
57513
|
+
);
|
|
57514
|
+
};
|
|
57515
|
+
return /* @__PURE__ */ jsx278(EuiPanel14, { paddingSize: "m", color: "subdued", children: /* @__PURE__ */ jsxs148(EuiFlexGroup37, { direction: "column", gutterSize: "m", children: [
|
|
57516
|
+
/* @__PURE__ */ jsx278(EuiFlexItem45, { children: /* @__PURE__ */ jsx278(
|
|
57517
|
+
EuiFormRow25,
|
|
57518
|
+
{
|
|
57519
|
+
label: t("fieldLabel"),
|
|
57520
|
+
error,
|
|
57521
|
+
isInvalid: !!error,
|
|
57522
|
+
children: /* @__PURE__ */ jsxs148(EuiFlexGroup37, { gutterSize: "s", alignItems: "center", children: [
|
|
57523
|
+
/* @__PURE__ */ jsx278(EuiFlexItem45, { children: showPathSelection ? /* @__PURE__ */ jsx278(
|
|
57524
|
+
WfoPathSelector,
|
|
57525
|
+
{
|
|
57526
|
+
selectedFieldName,
|
|
57527
|
+
pathOptions: pathSelectionOptions,
|
|
57528
|
+
onPathSelection: handlePathSelection,
|
|
57529
|
+
onClear: () => {
|
|
57530
|
+
setShowPathSelection(false);
|
|
57531
|
+
setSelectedFieldName("");
|
|
57532
|
+
},
|
|
57533
|
+
renderOption: renderPathSelectionOption
|
|
57534
|
+
}
|
|
57535
|
+
) : condition.path && fullPathSelected ? /* @__PURE__ */ jsx278(
|
|
57536
|
+
WfoSelectedPathDisplay,
|
|
57537
|
+
{
|
|
57538
|
+
condition,
|
|
57539
|
+
selectedPathInfo,
|
|
57540
|
+
onEdit: () => {
|
|
57541
|
+
onChange({
|
|
57542
|
+
path: "",
|
|
57543
|
+
value_kind: void 0,
|
|
57544
|
+
condition: {
|
|
57545
|
+
op: "",
|
|
57546
|
+
value: void 0
|
|
57547
|
+
}
|
|
57548
|
+
});
|
|
57549
|
+
}
|
|
57550
|
+
}
|
|
57551
|
+
) : /* @__PURE__ */ jsx278(
|
|
57552
|
+
WfoFieldSelector,
|
|
57553
|
+
{
|
|
57554
|
+
pathOptions,
|
|
57555
|
+
loading,
|
|
57556
|
+
error,
|
|
57557
|
+
searchValue,
|
|
57558
|
+
onFieldSelection: handleFieldSelection,
|
|
57559
|
+
onSearchChange: setSearchValue,
|
|
57560
|
+
onClear: () => {
|
|
57561
|
+
onChange({
|
|
57562
|
+
path: "",
|
|
57563
|
+
value_kind: void 0,
|
|
57564
|
+
condition: {
|
|
57565
|
+
op: "",
|
|
57566
|
+
value: void 0
|
|
57567
|
+
}
|
|
57568
|
+
});
|
|
57569
|
+
},
|
|
57570
|
+
renderPathOption
|
|
57571
|
+
}
|
|
57572
|
+
) }),
|
|
57573
|
+
condition.path && selectedPathInfo?.ui_types && selectedPathInfo.ui_types.length > 0 && /* @__PURE__ */ jsx278(EuiFlexItem45, { grow: false, children: /* @__PURE__ */ jsx278(
|
|
57574
|
+
EuiFlexGroup37,
|
|
57575
|
+
{
|
|
57576
|
+
gutterSize: "xs",
|
|
57577
|
+
alignItems: "center",
|
|
57578
|
+
responsive: false,
|
|
57579
|
+
children: selectedPathInfo.ui_types.map(
|
|
57580
|
+
(type, index) => /* @__PURE__ */ jsx278(
|
|
57581
|
+
EuiFlexItem45,
|
|
57582
|
+
{
|
|
57583
|
+
grow: false,
|
|
57584
|
+
children: /* @__PURE__ */ jsx278(
|
|
57585
|
+
WfoBadge,
|
|
57586
|
+
{
|
|
57587
|
+
color: getTypeColor(
|
|
57588
|
+
type,
|
|
57589
|
+
theme
|
|
57590
|
+
),
|
|
57591
|
+
textColor: theme.colors.ink,
|
|
57592
|
+
size: "s",
|
|
57593
|
+
children: type
|
|
57594
|
+
}
|
|
57595
|
+
)
|
|
57596
|
+
},
|
|
57597
|
+
index
|
|
57598
|
+
)
|
|
57599
|
+
)
|
|
57600
|
+
}
|
|
57601
|
+
) })
|
|
57602
|
+
] })
|
|
57603
|
+
}
|
|
57604
|
+
) }),
|
|
57605
|
+
/* @__PURE__ */ jsx278(EuiFlexItem45, { children: /* @__PURE__ */ jsxs148(EuiFlexGroup37, { gutterSize: "s", alignItems: "flexEnd", children: [
|
|
57606
|
+
/* @__PURE__ */ jsx278(EuiFlexItem45, { children: /* @__PURE__ */ jsx278(
|
|
57607
|
+
WfoOperatorSelector,
|
|
57608
|
+
{
|
|
57609
|
+
selectedPathInfo,
|
|
57610
|
+
condition,
|
|
57611
|
+
onOperatorChange: handleOperatorChange
|
|
57612
|
+
}
|
|
57613
|
+
) }),
|
|
57614
|
+
!hideValueInput && /* @__PURE__ */ jsx278(EuiFlexItem45, { children: /* @__PURE__ */ jsx278(EuiFormRow25, { label: t("valueLabel"), children: /* @__PURE__ */ jsx278(
|
|
57615
|
+
ValueControl,
|
|
57616
|
+
{
|
|
57617
|
+
pathInfo: selectedPathInfo,
|
|
57618
|
+
operator: condition.condition.op,
|
|
57619
|
+
value: condition.condition.value,
|
|
57620
|
+
onChange: handleValueChange
|
|
57621
|
+
}
|
|
57622
|
+
) }) }),
|
|
57623
|
+
/* @__PURE__ */ jsx278(EuiFlexItem45, { grow: false, children: /* @__PURE__ */ jsx278(
|
|
57624
|
+
EuiButtonIcon15,
|
|
57625
|
+
{
|
|
57626
|
+
iconType: "trash",
|
|
57627
|
+
color: "danger",
|
|
57628
|
+
onClick: onRemove,
|
|
57629
|
+
"aria-label": t("removeConditionAriaLabel"),
|
|
57630
|
+
size: "m"
|
|
57631
|
+
}
|
|
57632
|
+
) })
|
|
57633
|
+
] }) })
|
|
57634
|
+
] }) });
|
|
57635
|
+
};
|
|
57636
|
+
|
|
57637
|
+
// src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx
|
|
57638
|
+
import { Fragment as Fragment65, jsx as jsx279, jsxs as jsxs149 } from "@emotion/react/jsx-runtime";
|
|
57639
|
+
var FilterGroup = ({
|
|
57640
|
+
group,
|
|
57641
|
+
entityType,
|
|
57642
|
+
onChange,
|
|
57643
|
+
onRemove,
|
|
57644
|
+
depth = 0,
|
|
57645
|
+
isRoot = false
|
|
57646
|
+
}) => {
|
|
57647
|
+
const t = useTranslations98("search.page");
|
|
57648
|
+
const { theme } = useOrchestratorTheme();
|
|
57649
|
+
const MAX_DEPTH = 5;
|
|
57650
|
+
const canAddGroup = depth < MAX_DEPTH;
|
|
57651
|
+
const addCondition = () => {
|
|
57652
|
+
const newCondition = {
|
|
57653
|
+
path: "",
|
|
57654
|
+
condition: { op: "", value: void 0 }
|
|
57655
|
+
};
|
|
57656
|
+
onChange({
|
|
57657
|
+
...group,
|
|
57658
|
+
children: [...group.children, newCondition]
|
|
57659
|
+
});
|
|
57660
|
+
};
|
|
57661
|
+
const addGroup = () => {
|
|
57662
|
+
if (!canAddGroup) return;
|
|
57663
|
+
const newGroup = {
|
|
57664
|
+
op: "AND",
|
|
57665
|
+
children: []
|
|
57666
|
+
};
|
|
57667
|
+
onChange({
|
|
57668
|
+
...group,
|
|
57669
|
+
children: [...group.children, newGroup]
|
|
57670
|
+
});
|
|
57671
|
+
};
|
|
57672
|
+
const updateChild = (index, child) => {
|
|
57673
|
+
const newChildren = [...group.children];
|
|
57674
|
+
newChildren[index] = child;
|
|
57675
|
+
onChange({
|
|
57676
|
+
...group,
|
|
57677
|
+
children: newChildren
|
|
57678
|
+
});
|
|
57679
|
+
};
|
|
57680
|
+
const removeChild = (index) => {
|
|
57681
|
+
onChange({
|
|
57682
|
+
...group,
|
|
57683
|
+
children: group.children.filter((_5, i) => i !== index)
|
|
57684
|
+
});
|
|
57685
|
+
};
|
|
57686
|
+
const toggleOperator = () => {
|
|
57687
|
+
onChange({
|
|
57688
|
+
...group,
|
|
57689
|
+
op: group.op === "AND" ? "OR" : "AND"
|
|
57690
|
+
});
|
|
57691
|
+
};
|
|
57692
|
+
return /* @__PURE__ */ jsxs149(
|
|
57693
|
+
EuiPanel15,
|
|
57694
|
+
{
|
|
57695
|
+
paddingSize: "m",
|
|
57696
|
+
color: depth % 2 === 0 ? "primary" : "plain",
|
|
57697
|
+
hasBorder: true,
|
|
57698
|
+
children: [
|
|
57699
|
+
/* @__PURE__ */ jsxs149(
|
|
57700
|
+
EuiFlexGroup38,
|
|
57701
|
+
{
|
|
57702
|
+
gutterSize: "s",
|
|
57703
|
+
alignItems: "center",
|
|
57704
|
+
justifyContent: "spaceBetween",
|
|
57705
|
+
children: [
|
|
57706
|
+
/* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsxs149(EuiFlexGroup38, { gutterSize: "s", alignItems: "center", children: [
|
|
57707
|
+
/* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsx279(EuiText55, { size: "s", children: /* @__PURE__ */ jsx279("strong", { children: t("groupLabel") }) }) }),
|
|
57708
|
+
/* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsx279(
|
|
57709
|
+
EuiButton22,
|
|
57710
|
+
{
|
|
57711
|
+
size: "s",
|
|
57712
|
+
fill: true,
|
|
57713
|
+
color: "primary",
|
|
57714
|
+
onClick: toggleOperator,
|
|
57715
|
+
children: group.op
|
|
57716
|
+
}
|
|
57717
|
+
) })
|
|
57718
|
+
] }) }),
|
|
57719
|
+
/* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsxs149(EuiFlexGroup38, { gutterSize: "s", alignItems: "center", children: [
|
|
57720
|
+
/* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsx279(
|
|
57721
|
+
EuiButton22,
|
|
57722
|
+
{
|
|
57723
|
+
size: "s",
|
|
57724
|
+
iconType: "plusInCircle",
|
|
57725
|
+
onClick: addCondition,
|
|
57726
|
+
children: t("addCondition")
|
|
57727
|
+
}
|
|
57728
|
+
) }),
|
|
57729
|
+
/* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsx279(
|
|
57730
|
+
WfoToolTip,
|
|
57731
|
+
{
|
|
57732
|
+
tooltipContent: !canAddGroup ? t("maxNestingDepth") : t("addNestedGroup"),
|
|
57733
|
+
children: /* @__PURE__ */ jsx279(
|
|
57734
|
+
EuiButton22,
|
|
57735
|
+
{
|
|
57736
|
+
size: "s",
|
|
57737
|
+
iconType: "nested",
|
|
57738
|
+
onClick: addGroup,
|
|
57739
|
+
disabled: !canAddGroup,
|
|
57740
|
+
children: t("addGroup")
|
|
57741
|
+
}
|
|
57742
|
+
)
|
|
57743
|
+
}
|
|
57744
|
+
) }),
|
|
57745
|
+
!isRoot && onRemove && /* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsx279(
|
|
57746
|
+
EuiButtonIcon16,
|
|
57747
|
+
{
|
|
57748
|
+
iconType: "trash",
|
|
57749
|
+
color: "danger",
|
|
57750
|
+
onClick: onRemove,
|
|
57751
|
+
"aria-label": t("removeGroup")
|
|
57752
|
+
}
|
|
57753
|
+
) })
|
|
57754
|
+
] }) })
|
|
57755
|
+
]
|
|
57756
|
+
}
|
|
57757
|
+
),
|
|
57758
|
+
group.children.length > 0 && /* @__PURE__ */ jsxs149(Fragment65, { children: [
|
|
57759
|
+
/* @__PURE__ */ jsx279(EuiSpacer30, { size: "m" }),
|
|
57760
|
+
/* @__PURE__ */ jsx279(
|
|
57761
|
+
EuiPanel15,
|
|
57762
|
+
{
|
|
57763
|
+
paddingSize: isRoot ? "none" : "s",
|
|
57764
|
+
color: "transparent",
|
|
57765
|
+
hasShadow: false,
|
|
57766
|
+
children: group.children.map((child, index) => /* @__PURE__ */ jsxs149("div", { children: [
|
|
57767
|
+
index > 0 && /* @__PURE__ */ jsx279(
|
|
57768
|
+
EuiFlexGroup38,
|
|
57769
|
+
{
|
|
57770
|
+
gutterSize: "none",
|
|
57771
|
+
alignItems: "center",
|
|
57772
|
+
justifyContent: "center",
|
|
57773
|
+
children: /* @__PURE__ */ jsx279(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsx279(
|
|
57774
|
+
EuiText55,
|
|
57775
|
+
{
|
|
57776
|
+
size: "s",
|
|
57777
|
+
color: theme.colors.textSubdued,
|
|
57778
|
+
textAlign: "center",
|
|
57779
|
+
children: /* @__PURE__ */ jsx279(EuiCode, { children: group.op })
|
|
57780
|
+
}
|
|
57781
|
+
) })
|
|
57782
|
+
}
|
|
57783
|
+
),
|
|
57784
|
+
/* @__PURE__ */ jsx279(EuiSpacer30, { size: "s" }),
|
|
57785
|
+
isCondition(child) ? /* @__PURE__ */ jsx279(
|
|
57786
|
+
ConditionRow,
|
|
57787
|
+
{
|
|
57788
|
+
condition: child,
|
|
57789
|
+
entityType,
|
|
57790
|
+
onChange: (newCondition) => updateChild(index, newCondition),
|
|
57791
|
+
onRemove: () => removeChild(index)
|
|
57792
|
+
}
|
|
57793
|
+
) : /* @__PURE__ */ jsx279(
|
|
57794
|
+
FilterGroup,
|
|
57795
|
+
{
|
|
57796
|
+
group: child,
|
|
57797
|
+
entityType,
|
|
57798
|
+
onChange: (newGroup) => updateChild(index, newGroup),
|
|
57799
|
+
onRemove: () => removeChild(index),
|
|
57800
|
+
depth: depth + 1
|
|
57801
|
+
}
|
|
57802
|
+
),
|
|
57803
|
+
/* @__PURE__ */ jsx279(EuiSpacer30, { size: "s" })
|
|
57804
|
+
] }, index))
|
|
57805
|
+
}
|
|
57806
|
+
)
|
|
57807
|
+
] }),
|
|
57808
|
+
group.children.length === 0 && /* @__PURE__ */ jsxs149(Fragment65, { children: [
|
|
57809
|
+
/* @__PURE__ */ jsx279(EuiSpacer30, { size: "s" }),
|
|
57810
|
+
/* @__PURE__ */ jsx279(
|
|
57811
|
+
EuiCallOut2,
|
|
57812
|
+
{
|
|
57813
|
+
title: t("emptyGroupTitle"),
|
|
57814
|
+
color: "primary",
|
|
57815
|
+
iconType: "iInCircle",
|
|
57816
|
+
size: "s",
|
|
57817
|
+
children: /* @__PURE__ */ jsx279("p", { children: t("emptyGroupDescription") })
|
|
57818
|
+
}
|
|
57819
|
+
)
|
|
57820
|
+
] })
|
|
57821
|
+
]
|
|
57822
|
+
}
|
|
57823
|
+
);
|
|
57824
|
+
};
|
|
57825
|
+
|
|
57826
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx
|
|
57827
|
+
import { useState as useState63 } from "react";
|
|
57828
|
+
import { EuiFlexGroup as EuiFlexGroup43, EuiPanel as EuiPanel19 } from "@elastic/eui";
|
|
57829
|
+
|
|
57830
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchEmptyState.tsx
|
|
57831
|
+
import { useTranslations as useTranslations99 } from "next-intl";
|
|
57832
|
+
import { EuiFlexGroup as EuiFlexGroup39, EuiFlexItem as EuiFlexItem47, EuiPanel as EuiPanel16, EuiText as EuiText56 } from "@elastic/eui";
|
|
57833
|
+
import { jsx as jsx280 } from "@emotion/react/jsx-runtime";
|
|
57834
|
+
var WfoSearchEmptyState = () => {
|
|
57835
|
+
const t = useTranslations99("search.page");
|
|
57836
|
+
const { theme } = useOrchestratorTheme();
|
|
57837
|
+
return /* @__PURE__ */ jsx280(EuiPanel16, { paddingSize: "l", color: "transparent", hasShadow: false, children: /* @__PURE__ */ jsx280(EuiFlexGroup39, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx280(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx280(EuiText56, { size: "m", color: theme.colors.textSubdued, children: t("noResultsFound") }) }) }) });
|
|
57838
|
+
};
|
|
57839
|
+
|
|
57840
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchLoadingState.tsx
|
|
57841
|
+
import { useTranslations as useTranslations100 } from "next-intl";
|
|
57842
|
+
import { EuiFlexGroup as EuiFlexGroup40, EuiFlexItem as EuiFlexItem48, EuiPanel as EuiPanel17, EuiText as EuiText57 } from "@elastic/eui";
|
|
57843
|
+
import { jsx as jsx281 } from "@emotion/react/jsx-runtime";
|
|
57844
|
+
var WfoSearchLoadingState = () => {
|
|
57845
|
+
const t = useTranslations100("search.page");
|
|
57846
|
+
const { theme } = useOrchestratorTheme();
|
|
57847
|
+
return /* @__PURE__ */ jsx281(EuiPanel17, { paddingSize: "l", color: "transparent", hasShadow: false, children: /* @__PURE__ */ jsx281(EuiFlexGroup40, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx281(EuiFlexItem48, { grow: false, children: /* @__PURE__ */ jsx281(EuiText57, { size: "m", color: theme.colors.textSubdued, children: t("loadingSearchResults") }) }) }) });
|
|
57848
|
+
};
|
|
57849
|
+
|
|
57850
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx
|
|
57851
|
+
import { useEffect as useEffect42, useRef as useRef13 } from "react";
|
|
57852
|
+
import { useTranslations as useTranslations101 } from "next-intl";
|
|
57853
|
+
import {
|
|
57854
|
+
EuiButtonIcon as EuiButtonIcon17,
|
|
57855
|
+
EuiFlexGroup as EuiFlexGroup42,
|
|
57856
|
+
EuiFlexItem as EuiFlexItem50,
|
|
57857
|
+
EuiPanel as EuiPanel18,
|
|
57858
|
+
EuiSpacer as EuiSpacer31,
|
|
57859
|
+
EuiText as EuiText58
|
|
57860
|
+
} from "@elastic/eui";
|
|
57861
|
+
|
|
57862
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoHighlightedText.tsx
|
|
57863
|
+
import { useMemo as useMemo9 } from "react";
|
|
57864
|
+
import { css as css52 } from "@emotion/react";
|
|
57865
|
+
import { Fragment as Fragment66, jsx as jsx282 } from "@emotion/react/jsx-runtime";
|
|
57866
|
+
var WfoHighlightedText = ({
|
|
57867
|
+
text,
|
|
57868
|
+
highlight_indices
|
|
57869
|
+
}) => {
|
|
57870
|
+
const { theme } = useOrchestratorTheme();
|
|
57871
|
+
const highlightStyles = css52`
|
|
57872
|
+
background-color: ${theme.colors.warning};
|
|
57873
|
+
color: ${theme.colors.plainDark};
|
|
57874
|
+
padding: 0 ${theme.size.xs};
|
|
57875
|
+
font-family: ${theme.font.family};
|
|
57876
|
+
font-weight: ${theme.font.weight.bold};
|
|
57877
|
+
border-radius: ${theme.size.xs};
|
|
57878
|
+
`;
|
|
57879
|
+
const highlightedParts = useMemo9(() => {
|
|
57880
|
+
if (!highlight_indices || highlight_indices.length === 0) {
|
|
57881
|
+
return text;
|
|
57882
|
+
}
|
|
57883
|
+
const sorted = [...highlight_indices].sort((a, b) => a[0] - b[0]);
|
|
57884
|
+
const parts = [];
|
|
57885
|
+
let lastIndex = 0;
|
|
57886
|
+
sorted.forEach(([start, end], idx) => {
|
|
57887
|
+
if (start > lastIndex) {
|
|
57888
|
+
parts.push(
|
|
57889
|
+
/* @__PURE__ */ jsx282("span", { children: text.slice(lastIndex, start) }, `plain-${idx}`)
|
|
57890
|
+
);
|
|
57891
|
+
}
|
|
57892
|
+
parts.push(
|
|
57893
|
+
/* @__PURE__ */ jsx282("span", { css: highlightStyles, children: text.slice(start, end) }, `hl-${idx}`)
|
|
57894
|
+
);
|
|
57895
|
+
lastIndex = end;
|
|
57896
|
+
});
|
|
57897
|
+
if (lastIndex < text.length) {
|
|
57898
|
+
parts.push(/* @__PURE__ */ jsx282("span", { children: text.slice(lastIndex) }, "plain-last"));
|
|
57899
|
+
}
|
|
57900
|
+
return parts;
|
|
57901
|
+
}, [text, highlight_indices, highlightStyles]);
|
|
57902
|
+
return /* @__PURE__ */ jsx282(Fragment66, { children: highlightedParts });
|
|
57903
|
+
};
|
|
57904
|
+
|
|
57905
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoPathBreadcrumb.tsx
|
|
57906
|
+
import { Fragment as Fragment67 } from "react";
|
|
57907
|
+
import { EuiFlexGroup as EuiFlexGroup41, EuiFlexItem as EuiFlexItem49, EuiIcon as EuiIcon9 } from "@elastic/eui";
|
|
57908
|
+
import { jsx as jsx283, jsxs as jsxs150 } from "@emotion/react/jsx-runtime";
|
|
57909
|
+
var WfoPathBreadcrumb = ({
|
|
57910
|
+
path,
|
|
57911
|
+
size = "m",
|
|
57912
|
+
maxSegments,
|
|
57913
|
+
showArrows = true,
|
|
57914
|
+
color,
|
|
57915
|
+
stripFirstSegment = false
|
|
57916
|
+
}) => {
|
|
57917
|
+
const { theme } = useOrchestratorTheme();
|
|
57918
|
+
if (!path) {
|
|
57919
|
+
return null;
|
|
57920
|
+
}
|
|
57921
|
+
let segments = path.split(".").filter((segment) => !/^\d+$/.test(segment));
|
|
57922
|
+
if (stripFirstSegment && segments.length > 1) {
|
|
57923
|
+
segments = segments.slice(1);
|
|
57924
|
+
}
|
|
57925
|
+
const displaySegments = maxSegments && segments.length > maxSegments ? [
|
|
57926
|
+
...segments.slice(0, maxSegments - 1),
|
|
57927
|
+
"...",
|
|
57928
|
+
segments[segments.length - 1]
|
|
57929
|
+
] : segments;
|
|
57930
|
+
const badgeColor = color || theme.colors.primary;
|
|
57931
|
+
return /* @__PURE__ */ jsx283(
|
|
57932
|
+
EuiFlexGroup41,
|
|
57933
|
+
{
|
|
57934
|
+
gutterSize: size,
|
|
57935
|
+
alignItems: "center",
|
|
57936
|
+
wrap: false,
|
|
57937
|
+
responsive: false,
|
|
57938
|
+
children: displaySegments.map((segment, index) => /* @__PURE__ */ jsxs150(Fragment67, { children: [
|
|
57939
|
+
/* @__PURE__ */ jsx283(EuiFlexItem49, { grow: false, children: /* @__PURE__ */ jsx283(
|
|
57940
|
+
WfoBadge,
|
|
57941
|
+
{
|
|
57942
|
+
color: badgeColor,
|
|
57943
|
+
textColor: theme.colors.ghost,
|
|
57944
|
+
size,
|
|
57945
|
+
children: segment
|
|
57946
|
+
}
|
|
57947
|
+
) }),
|
|
57948
|
+
showArrows && index < displaySegments.length - 1 && /* @__PURE__ */ jsx283(EuiFlexItem49, { grow: false, children: /* @__PURE__ */ jsx283(
|
|
57949
|
+
EuiIcon9,
|
|
57950
|
+
{
|
|
57951
|
+
type: "arrowRight",
|
|
57952
|
+
size,
|
|
57953
|
+
color: theme.colors.link
|
|
57954
|
+
}
|
|
57955
|
+
) })
|
|
57956
|
+
] }, index))
|
|
57957
|
+
}
|
|
57958
|
+
);
|
|
57959
|
+
};
|
|
57960
|
+
|
|
57961
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx
|
|
57962
|
+
import { Fragment as Fragment68, jsx as jsx284, jsxs as jsxs151 } from "@emotion/react/jsx-runtime";
|
|
57963
|
+
var WfoSearchResultItem = ({
|
|
57964
|
+
result,
|
|
57965
|
+
isSelected = false,
|
|
57966
|
+
onSelect,
|
|
57967
|
+
onPositionChange,
|
|
57968
|
+
index
|
|
57969
|
+
}) => {
|
|
57970
|
+
const t = useTranslations101("search.page");
|
|
57971
|
+
const matchingField = result.matching_field;
|
|
57972
|
+
const { theme } = useOrchestratorTheme();
|
|
57973
|
+
const baseUrl = `${window.location.protocol}//${window.location.host}`;
|
|
57974
|
+
const detailUrl = getDetailUrl(result, baseUrl);
|
|
57975
|
+
const itemRef = useRef13(null);
|
|
57976
|
+
useEffect42(() => {
|
|
57977
|
+
if (isSelected && onPositionChange && itemRef.current) {
|
|
57978
|
+
onPositionChange(index, itemRef.current);
|
|
57979
|
+
}
|
|
57980
|
+
}, [isSelected, index, onPositionChange]);
|
|
57981
|
+
return /* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsx284(
|
|
57982
|
+
EuiPanel18,
|
|
57983
|
+
{
|
|
57984
|
+
panelRef: itemRef,
|
|
57985
|
+
color: isSelected ? "primary" : "transparent",
|
|
57986
|
+
paddingSize: "m",
|
|
57987
|
+
"data-record-index": index,
|
|
57988
|
+
onClick: () => {
|
|
57989
|
+
onSelect?.();
|
|
57990
|
+
},
|
|
57991
|
+
style: isSelected ? {
|
|
57992
|
+
borderTop: theme.border.thick,
|
|
57993
|
+
borderBottom: theme.border.thick,
|
|
57994
|
+
borderLeft: "none",
|
|
57995
|
+
borderRight: "none",
|
|
57996
|
+
borderColor: theme.colors.primary
|
|
57997
|
+
} : void 0,
|
|
57998
|
+
children: /* @__PURE__ */ jsxs151(EuiFlexGroup42, { alignItems: "flexStart", gutterSize: "m", children: [
|
|
57999
|
+
/* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsxs151(EuiFlexGroup42, { direction: "column", gutterSize: "xs", children: [
|
|
58000
|
+
/* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsx284(
|
|
58001
|
+
EuiText58,
|
|
58002
|
+
{
|
|
58003
|
+
size: "m",
|
|
58004
|
+
style: {
|
|
58005
|
+
fontWeight: theme.font.weight.semiBold
|
|
58006
|
+
},
|
|
58007
|
+
children: getDescription(result)
|
|
58008
|
+
}
|
|
58009
|
+
) }),
|
|
58010
|
+
matchingField && /* @__PURE__ */ jsxs151(Fragment68, { children: [
|
|
58011
|
+
matchingField.path && /* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsx284(
|
|
58012
|
+
WfoPathBreadcrumb,
|
|
58013
|
+
{
|
|
58014
|
+
path: matchingField.path,
|
|
58015
|
+
size: "s",
|
|
58016
|
+
maxSegments: 4,
|
|
58017
|
+
color: theme.colors.primary
|
|
58018
|
+
}
|
|
58019
|
+
) }),
|
|
58020
|
+
/* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsx284(
|
|
58021
|
+
EuiText58,
|
|
58022
|
+
{
|
|
58023
|
+
style: {
|
|
58024
|
+
backgroundColor: "transparent",
|
|
58025
|
+
borderRadius: theme.border.radius.medium,
|
|
58026
|
+
fontSize: theme.size.base
|
|
58027
|
+
},
|
|
58028
|
+
children: /* @__PURE__ */ jsx284(
|
|
58029
|
+
WfoHighlightedText,
|
|
58030
|
+
{
|
|
58031
|
+
text: matchingField.text,
|
|
58032
|
+
highlight_indices: matchingField.highlight_indices
|
|
58033
|
+
}
|
|
58034
|
+
)
|
|
58035
|
+
}
|
|
58036
|
+
) }),
|
|
58037
|
+
/* @__PURE__ */ jsx284(EuiSpacer31, { size: "xs" })
|
|
58038
|
+
] })
|
|
58039
|
+
] }) }),
|
|
58040
|
+
/* @__PURE__ */ jsx284(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsxs151(
|
|
58041
|
+
EuiFlexGroup42,
|
|
58042
|
+
{
|
|
58043
|
+
direction: "column",
|
|
58044
|
+
alignItems: "flexEnd",
|
|
58045
|
+
gutterSize: "xs",
|
|
58046
|
+
children: [
|
|
58047
|
+
/* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsx284(
|
|
58048
|
+
WfoBadge,
|
|
58049
|
+
{
|
|
58050
|
+
color: theme.colors.primary,
|
|
58051
|
+
textColor: theme.colors.ghost,
|
|
58052
|
+
children: "score" in result && result.score ? result.score.toFixed(4) : "N/A"
|
|
58053
|
+
}
|
|
58054
|
+
) }),
|
|
58055
|
+
/* @__PURE__ */ jsx284(EuiFlexItem50, { children: /* @__PURE__ */ jsx284(
|
|
58056
|
+
EuiButtonIcon17,
|
|
58057
|
+
{
|
|
58058
|
+
iconType: "popout",
|
|
58059
|
+
"aria-label": t("viewDetails"),
|
|
58060
|
+
onClick: (e) => {
|
|
58061
|
+
e.stopPropagation();
|
|
58062
|
+
window.open(detailUrl, "_blank");
|
|
58063
|
+
},
|
|
58064
|
+
color: "text",
|
|
58065
|
+
size: "m"
|
|
58066
|
+
}
|
|
58067
|
+
) })
|
|
58068
|
+
]
|
|
58069
|
+
}
|
|
58070
|
+
) })
|
|
58071
|
+
] })
|
|
58072
|
+
}
|
|
58073
|
+
) });
|
|
58074
|
+
};
|
|
58075
|
+
|
|
58076
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSubscriptionDetailModal.tsx
|
|
58077
|
+
import { useTranslations as useTranslations102 } from "next-intl";
|
|
58078
|
+
import {
|
|
58079
|
+
EuiButton as EuiButton23,
|
|
58080
|
+
EuiModal as EuiModal5,
|
|
58081
|
+
EuiModalBody as EuiModalBody5,
|
|
58082
|
+
EuiModalFooter as EuiModalFooter5,
|
|
58083
|
+
EuiModalHeader as EuiModalHeader5,
|
|
58084
|
+
EuiModalHeaderTitle as EuiModalHeaderTitle5
|
|
58085
|
+
} from "@elastic/eui";
|
|
58086
|
+
import { jsx as jsx285, jsxs as jsxs152 } from "@emotion/react/jsx-runtime";
|
|
58087
|
+
var WfoSubscriptionDetailModal = ({ isVisible, onClose, subscriptionData }) => {
|
|
58088
|
+
const t = useTranslations102("search.page");
|
|
58089
|
+
if (!isVisible || !subscriptionData) return null;
|
|
58090
|
+
const subscriptionId = subscriptionData && subscriptionData.subscription_id;
|
|
58091
|
+
return /* @__PURE__ */ jsxs152(EuiModal5, { onClose, maxWidth: 800, children: [
|
|
58092
|
+
/* @__PURE__ */ jsx285(EuiModalHeader5, { children: /* @__PURE__ */ jsx285(EuiModalHeaderTitle5, { children: t("subscriptionDetails") }) }),
|
|
58093
|
+
/* @__PURE__ */ jsx285(EuiModalBody5, { children: /* @__PURE__ */ jsx285(TreeProvider, { children: /* @__PURE__ */ jsx285(WfoSubscription, { subscriptionId }) }) }),
|
|
58094
|
+
/* @__PURE__ */ jsx285(EuiModalFooter5, { children: /* @__PURE__ */ jsx285(EuiButton23, { onClick: onClose, fill: true, children: t("closeButton") }) })
|
|
58095
|
+
] });
|
|
58096
|
+
};
|
|
58097
|
+
|
|
58098
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx
|
|
58099
|
+
import { Fragment as Fragment69, jsx as jsx286, jsxs as jsxs153 } from "@emotion/react/jsx-runtime";
|
|
58100
|
+
var WfoSearchResults = ({
|
|
58101
|
+
results,
|
|
58102
|
+
loading,
|
|
58103
|
+
selectedRecordIndex = 0,
|
|
58104
|
+
onRecordSelect
|
|
58105
|
+
}) => {
|
|
58106
|
+
const [modalData, setModalData] = useState63(null);
|
|
58107
|
+
const handleCloseModal = () => {
|
|
58108
|
+
setModalData(null);
|
|
58109
|
+
};
|
|
58110
|
+
if (loading) {
|
|
58111
|
+
return /* @__PURE__ */ jsx286(WfoSearchLoadingState, {});
|
|
58112
|
+
}
|
|
58113
|
+
if (!results || results.length === 0) {
|
|
58114
|
+
return /* @__PURE__ */ jsx286(WfoSearchEmptyState, {});
|
|
58115
|
+
}
|
|
58116
|
+
return /* @__PURE__ */ jsxs153(Fragment69, { children: [
|
|
58117
|
+
/* @__PURE__ */ jsx286(EuiPanel19, { paddingSize: "m", hasShadow: false, children: /* @__PURE__ */ jsx286(EuiFlexGroup43, { direction: "column", gutterSize: "s", children: results.map((result, idx) => /* @__PURE__ */ jsx286(
|
|
58118
|
+
WfoSearchResultItem,
|
|
58119
|
+
{
|
|
58120
|
+
result,
|
|
58121
|
+
index: idx,
|
|
58122
|
+
isSelected: idx === selectedRecordIndex,
|
|
58123
|
+
onSelect: () => onRecordSelect?.(idx)
|
|
58124
|
+
},
|
|
58125
|
+
idx
|
|
58126
|
+
)) }) }),
|
|
58127
|
+
/* @__PURE__ */ jsx286(
|
|
58128
|
+
WfoSubscriptionDetailModal,
|
|
58129
|
+
{
|
|
58130
|
+
isVisible: !!modalData,
|
|
58131
|
+
onClose: handleCloseModal,
|
|
58132
|
+
subscriptionData: modalData?.subscription,
|
|
58133
|
+
matchingField: modalData?.matchingField
|
|
58134
|
+
}
|
|
58135
|
+
)
|
|
58136
|
+
] });
|
|
58137
|
+
};
|
|
58138
|
+
|
|
58139
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchMetadataHeader.tsx
|
|
58140
|
+
import { jsx as jsx287 } from "@emotion/react/jsx-runtime";
|
|
58141
|
+
var WfoSearchMetadataHeader = ({
|
|
58142
|
+
search_metadata
|
|
58143
|
+
}) => {
|
|
58144
|
+
if (!search_metadata.search_type) return null;
|
|
58145
|
+
return /* @__PURE__ */ jsx287(WfoToolTip, { tooltipContent: search_metadata.description || "", children: /* @__PURE__ */ jsx287(WfoBadge, { color: "hollow", iconType: "search", textColor: "default", children: search_metadata.search_type }) });
|
|
58146
|
+
};
|
|
58147
|
+
|
|
58148
|
+
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchPaginationInfo.tsx
|
|
58149
|
+
import { useTranslations as useTranslations103 } from "next-intl";
|
|
58150
|
+
import {
|
|
58151
|
+
EuiButtonIcon as EuiButtonIcon18,
|
|
58152
|
+
EuiFlexGroup as EuiFlexGroup44,
|
|
58153
|
+
EuiFlexItem as EuiFlexItem51,
|
|
58154
|
+
EuiText as EuiText59
|
|
58155
|
+
} from "@elastic/eui";
|
|
58156
|
+
import { jsx as jsx288, jsxs as jsxs154 } from "@emotion/react/jsx-runtime";
|
|
58157
|
+
var WfoSearchPaginationInfo = ({
|
|
58158
|
+
has_next_page,
|
|
58159
|
+
next_page_cursor,
|
|
58160
|
+
onNextPage,
|
|
58161
|
+
onPrevPage,
|
|
58162
|
+
isLoading = false,
|
|
58163
|
+
currentPage = 1,
|
|
58164
|
+
hasPrevPage = false,
|
|
58165
|
+
resultCount
|
|
58166
|
+
}) => {
|
|
58167
|
+
const t = useTranslations103("search.page");
|
|
58168
|
+
const { theme } = useOrchestratorTheme();
|
|
58169
|
+
const handleNextPage = () => {
|
|
58170
|
+
if (!isLoading && next_page_cursor && onNextPage)
|
|
58171
|
+
onNextPage(next_page_cursor);
|
|
58172
|
+
};
|
|
58173
|
+
const handlePrevPage = () => {
|
|
58174
|
+
if (!isLoading && onPrevPage) onPrevPage();
|
|
58175
|
+
};
|
|
58176
|
+
if (!has_next_page && !hasPrevPage) return null;
|
|
58177
|
+
return /* @__PURE__ */ jsxs154(
|
|
58178
|
+
EuiFlexGroup44,
|
|
58179
|
+
{
|
|
58180
|
+
justifyContent: "flexEnd",
|
|
58181
|
+
alignItems: "center",
|
|
58182
|
+
gutterSize: "xs",
|
|
58183
|
+
responsive: false,
|
|
58184
|
+
style: {
|
|
58185
|
+
whiteSpace: "nowrap",
|
|
58186
|
+
padding: 0,
|
|
58187
|
+
background: "transparent",
|
|
58188
|
+
border: "none"
|
|
58189
|
+
},
|
|
58190
|
+
role: "navigation",
|
|
58191
|
+
"aria-label": t("searchResultsPagination"),
|
|
58192
|
+
children: [
|
|
58193
|
+
/* @__PURE__ */ jsx288(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx288(
|
|
58194
|
+
EuiButtonIcon18,
|
|
58195
|
+
{
|
|
58196
|
+
iconType: "arrowLeft",
|
|
58197
|
+
"aria-label": t("previousPage"),
|
|
58198
|
+
onClick: handlePrevPage,
|
|
58199
|
+
disabled: !hasPrevPage || isLoading,
|
|
58200
|
+
color: "text",
|
|
58201
|
+
size: "s"
|
|
58202
|
+
}
|
|
58203
|
+
) }),
|
|
58204
|
+
/* @__PURE__ */ jsx288(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsxs154(EuiText59, { size: "xs", color: theme.colors.textSubdued, children: [
|
|
58205
|
+
t("page"),
|
|
58206
|
+
" ",
|
|
58207
|
+
currentPage
|
|
58208
|
+
] }) }),
|
|
58209
|
+
/* @__PURE__ */ jsx288(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx288(
|
|
58210
|
+
EuiButtonIcon18,
|
|
58211
|
+
{
|
|
58212
|
+
iconType: "arrowRight",
|
|
58213
|
+
"aria-label": t("nextPage"),
|
|
58214
|
+
onClick: handleNextPage,
|
|
58215
|
+
disabled: !has_next_page || isLoading,
|
|
58216
|
+
color: "text",
|
|
58217
|
+
size: "s",
|
|
58218
|
+
isLoading
|
|
58219
|
+
}
|
|
58220
|
+
) }),
|
|
58221
|
+
resultCount && resultCount > 0 && /* @__PURE__ */ jsx288(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx288(
|
|
58222
|
+
WfoBadge,
|
|
58223
|
+
{
|
|
58224
|
+
className: "wfoPagination__badge",
|
|
58225
|
+
color: "hollow",
|
|
58226
|
+
textColor: "default",
|
|
58227
|
+
children: t("resultsOnPage", { resultCount })
|
|
58228
|
+
}
|
|
58229
|
+
) })
|
|
58230
|
+
]
|
|
58231
|
+
}
|
|
58232
|
+
);
|
|
58233
|
+
};
|
|
58234
|
+
|
|
58235
|
+
// src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
|
|
58236
|
+
import { Fragment as Fragment70, jsx as jsx289, jsxs as jsxs155 } from "@emotion/react/jsx-runtime";
|
|
58237
|
+
var WfoSearch = () => {
|
|
58238
|
+
const t = useTranslations104("search.page");
|
|
58239
|
+
const { theme } = useOrchestratorTheme();
|
|
58240
|
+
const {
|
|
58241
|
+
urlParams,
|
|
58242
|
+
query,
|
|
58243
|
+
selectedEntityTab,
|
|
58244
|
+
showFilters,
|
|
58245
|
+
selectedRecordIndex,
|
|
58246
|
+
selectedRecordId,
|
|
58247
|
+
setQuery,
|
|
58248
|
+
setSelectedEntityTab,
|
|
58249
|
+
setShowFilters,
|
|
58250
|
+
setSelectedRecordIndex,
|
|
58251
|
+
setSelectedRecordId
|
|
58252
|
+
} = useUrlParams();
|
|
58253
|
+
const pageSize = DEFAULT_PAGE_SIZE2;
|
|
58254
|
+
const [filterGroup, setFilterGroup] = useState64({
|
|
58255
|
+
op: "AND",
|
|
58256
|
+
children: []
|
|
58257
|
+
});
|
|
58258
|
+
const [showDetailPanel, setShowDetailPanel] = useState64(false);
|
|
58259
|
+
const debouncedQuery = useDebounce(query, DEFAULT_DEBOUNCE_DELAY);
|
|
58260
|
+
const { results, loading, setResults } = useSearch(
|
|
58261
|
+
debouncedQuery,
|
|
58262
|
+
selectedEntityTab,
|
|
58263
|
+
filterGroup,
|
|
58264
|
+
pageSize
|
|
58265
|
+
);
|
|
58266
|
+
const [hasSearchBeenAttempted, setHasSearchBeenAttempted] = useState64(false);
|
|
58267
|
+
useEffect43(() => {
|
|
58268
|
+
const queryText = typeof debouncedQuery === "string" ? debouncedQuery : debouncedQuery?.text?.trim() || "";
|
|
58269
|
+
const hasFilters = filterGroup && filterGroup.children.length > 0;
|
|
58270
|
+
if (queryText.length >= 2 || hasFilters) {
|
|
58271
|
+
setHasSearchBeenAttempted(true);
|
|
58272
|
+
} else if (queryText === "" || queryText === "*") {
|
|
58273
|
+
setHasSearchBeenAttempted(false);
|
|
58274
|
+
}
|
|
58275
|
+
}, [debouncedQuery, filterGroup]);
|
|
58276
|
+
const {
|
|
58277
|
+
currentPage,
|
|
58278
|
+
error,
|
|
58279
|
+
isLoadingMore,
|
|
58280
|
+
handleNextPage,
|
|
58281
|
+
handlePrevPage,
|
|
58282
|
+
resetPagination,
|
|
58283
|
+
setError
|
|
58284
|
+
} = useSearchPagination(
|
|
58285
|
+
debouncedQuery,
|
|
58286
|
+
selectedEntityTab,
|
|
58287
|
+
filterGroup,
|
|
58288
|
+
pageSize,
|
|
58289
|
+
results,
|
|
58290
|
+
setResults
|
|
58291
|
+
);
|
|
58292
|
+
const [searchValue, setSearchValue] = useState64(() => {
|
|
58293
|
+
if (typeof query === "string") {
|
|
58294
|
+
return query;
|
|
58295
|
+
}
|
|
58296
|
+
const queryText = query.text || "";
|
|
58297
|
+
return queryText;
|
|
58298
|
+
});
|
|
58299
|
+
const handleTabChange = (tabId) => {
|
|
58300
|
+
setSelectedEntityTab(tabId);
|
|
58301
|
+
setQuery("");
|
|
58302
|
+
setSearchValue("");
|
|
58303
|
+
setFilterGroup({
|
|
58304
|
+
op: "AND",
|
|
58305
|
+
children: []
|
|
58306
|
+
});
|
|
58307
|
+
setResults({
|
|
58308
|
+
data: [],
|
|
58309
|
+
page_info: {
|
|
58310
|
+
has_next_page: false,
|
|
58311
|
+
next_page_cursor: null
|
|
58312
|
+
},
|
|
58313
|
+
search_metadata: {
|
|
58314
|
+
search_type: null,
|
|
58315
|
+
description: null
|
|
58316
|
+
}
|
|
58317
|
+
});
|
|
58318
|
+
setSelectedRecordIndex(0);
|
|
58319
|
+
setShowDetailPanel(false);
|
|
58320
|
+
resetPagination();
|
|
58321
|
+
};
|
|
58322
|
+
const onSearchChange = (searchText) => {
|
|
58323
|
+
const cleanedText = searchText.replace(/[=><[\]{}\\/#$%^&+]/g, "");
|
|
58324
|
+
setSearchValue(cleanedText);
|
|
58325
|
+
setQuery(cleanedText.trim() || "");
|
|
58326
|
+
};
|
|
58327
|
+
useEffect43(() => {
|
|
58328
|
+
if (typeof query === "string") {
|
|
58329
|
+
if (query !== searchValue) {
|
|
58330
|
+
setSearchValue(query);
|
|
58331
|
+
}
|
|
58332
|
+
} else {
|
|
58333
|
+
const queryText = query.text || "";
|
|
58334
|
+
if (queryText !== searchValue) {
|
|
58335
|
+
setSearchValue(queryText);
|
|
58336
|
+
}
|
|
58337
|
+
}
|
|
58338
|
+
}, [query, searchValue]);
|
|
58339
|
+
const currentTab = ENTITY_TABS.find((tab) => tab.id === selectedEntityTab);
|
|
58340
|
+
const isSearchActive = results.data.length > 0 || loading;
|
|
58341
|
+
const shouldShowNoResults = (() => {
|
|
58342
|
+
return hasSearchBeenAttempted && !loading && results.data.length === 0;
|
|
58343
|
+
})();
|
|
58344
|
+
useEffect43(() => {
|
|
58345
|
+
if (results.data.length > 0) {
|
|
58346
|
+
if (selectedRecordId) {
|
|
58347
|
+
const foundIndex = findResultIndexById(
|
|
58348
|
+
results.data,
|
|
58349
|
+
selectedRecordId
|
|
58350
|
+
);
|
|
58351
|
+
if (foundIndex !== -1) {
|
|
58352
|
+
setSelectedRecordIndex(foundIndex);
|
|
58353
|
+
} else if (results.data.length <= SMALL_RESULT_THRESHOLD) {
|
|
58354
|
+
setSelectedRecordIndex(0);
|
|
58355
|
+
setSelectedRecordId(null);
|
|
58356
|
+
}
|
|
58357
|
+
} else if (results.data.length <= SMALL_RESULT_THRESHOLD) {
|
|
58358
|
+
const indexFromUrl = urlParams.get("selected");
|
|
58359
|
+
if (!indexFromUrl) {
|
|
58360
|
+
setSelectedRecordIndex(0);
|
|
58361
|
+
}
|
|
58362
|
+
}
|
|
58363
|
+
}
|
|
58364
|
+
}, [results.data, selectedRecordId, urlParams]);
|
|
58365
|
+
useEffect43(() => {
|
|
58366
|
+
setShowDetailPanel(
|
|
58367
|
+
results?.data?.length > 0 && selectedRecordIndex >= 0
|
|
58368
|
+
);
|
|
58369
|
+
}, [results?.data?.length, selectedRecordIndex]);
|
|
58370
|
+
useEffect43(() => {
|
|
58371
|
+
resetPagination();
|
|
58372
|
+
}, [debouncedQuery, selectedEntityTab, filterGroup, resetPagination]);
|
|
58373
|
+
const { RESULTS_GROW, DETAIL_GROW } = LAYOUT_RATIOS;
|
|
58374
|
+
return /* @__PURE__ */ jsxs155(Fragment70, { children: [
|
|
58375
|
+
/* @__PURE__ */ jsx289(EuiTabs4, { children: ENTITY_TABS.map((tab) => /* @__PURE__ */ jsx289(
|
|
58376
|
+
EuiTab4,
|
|
58377
|
+
{
|
|
58378
|
+
onClick: () => handleTabChange(tab.id),
|
|
58379
|
+
isSelected: selectedEntityTab === tab.id,
|
|
58380
|
+
children: tab.label
|
|
58381
|
+
},
|
|
58382
|
+
tab.id
|
|
58383
|
+
)) }),
|
|
58384
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" }),
|
|
58385
|
+
/* @__PURE__ */ jsx289(
|
|
58386
|
+
EuiFieldSearch3,
|
|
58387
|
+
{
|
|
58388
|
+
placeholder: t("searchPlaceholder", {
|
|
58389
|
+
entityType: currentTab?.label.toLowerCase()
|
|
58390
|
+
}),
|
|
58391
|
+
value: searchValue || "",
|
|
58392
|
+
onChange: (event) => {
|
|
58393
|
+
onSearchChange(event.target.value);
|
|
58394
|
+
},
|
|
58395
|
+
onSearch: (value) => {
|
|
58396
|
+
onSearchChange(value);
|
|
58397
|
+
},
|
|
58398
|
+
incremental: true,
|
|
58399
|
+
fullWidth: true
|
|
58400
|
+
}
|
|
58401
|
+
),
|
|
58402
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "s" }),
|
|
58403
|
+
/* @__PURE__ */ jsx289(EuiFlexGroup45, { gutterSize: "s", alignItems: "center", children: /* @__PURE__ */ jsx289(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx289(
|
|
58404
|
+
EuiButton24,
|
|
58405
|
+
{
|
|
58406
|
+
iconType: showFilters ? "eyeClosed" : "eye",
|
|
58407
|
+
size: "s",
|
|
58408
|
+
onClick: () => setShowFilters(!showFilters),
|
|
58409
|
+
children: showFilters ? t("hideFilters") : t("showFilters")
|
|
58410
|
+
}
|
|
58411
|
+
) }) }),
|
|
58412
|
+
showFilters && /* @__PURE__ */ jsxs155(Fragment70, { children: [
|
|
58413
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" }),
|
|
58414
|
+
/* @__PURE__ */ jsxs155(EuiPanel20, { hasBorder: true, paddingSize: "m", children: [
|
|
58415
|
+
/* @__PURE__ */ jsx289(EuiText60, { children: /* @__PURE__ */ jsx289("h4", { children: t("structuredFilters") }) }),
|
|
58416
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "s" }),
|
|
58417
|
+
/* @__PURE__ */ jsx289(
|
|
58418
|
+
FilterGroup,
|
|
58419
|
+
{
|
|
58420
|
+
group: filterGroup,
|
|
58421
|
+
entityType: selectedEntityTab,
|
|
58422
|
+
onChange: setFilterGroup,
|
|
58423
|
+
isRoot: true
|
|
58424
|
+
}
|
|
58425
|
+
)
|
|
58426
|
+
] })
|
|
58427
|
+
] }),
|
|
58428
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" }),
|
|
58429
|
+
error && /* @__PURE__ */ jsxs155(Fragment70, { children: [
|
|
58430
|
+
/* @__PURE__ */ jsxs155(
|
|
58431
|
+
EuiCallOut3,
|
|
58432
|
+
{
|
|
58433
|
+
title: t("searchError"),
|
|
58434
|
+
color: "danger",
|
|
58435
|
+
iconType: "alert",
|
|
58436
|
+
size: "s",
|
|
58437
|
+
children: [
|
|
58438
|
+
/* @__PURE__ */ jsx289("p", { children: error }),
|
|
58439
|
+
/* @__PURE__ */ jsx289(
|
|
58440
|
+
EuiButton24,
|
|
58441
|
+
{
|
|
58442
|
+
size: "s",
|
|
58443
|
+
color: "danger",
|
|
58444
|
+
onClick: () => setError(null),
|
|
58445
|
+
children: t("dismiss")
|
|
58446
|
+
}
|
|
58447
|
+
)
|
|
58448
|
+
]
|
|
58449
|
+
}
|
|
58450
|
+
),
|
|
58451
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" })
|
|
58452
|
+
] }),
|
|
58453
|
+
shouldShowNoResults && /* @__PURE__ */ jsxs155(Fragment70, { children: [
|
|
58454
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "l" }),
|
|
58455
|
+
/* @__PURE__ */ jsxs155(
|
|
58456
|
+
EuiCallOut3,
|
|
58457
|
+
{
|
|
58458
|
+
title: t("noResults"),
|
|
58459
|
+
color: "primary",
|
|
58460
|
+
iconType: "search",
|
|
58461
|
+
size: "m",
|
|
58462
|
+
children: [
|
|
58463
|
+
/* @__PURE__ */ jsx289("p", { children: t("noResultsMessage", {
|
|
58464
|
+
entityType: currentTab?.label.toLowerCase()
|
|
58465
|
+
}) }),
|
|
58466
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "s" }),
|
|
58467
|
+
/* @__PURE__ */ jsx289(EuiText60, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx289("p", { children: t("noResultsSuggestions") }) })
|
|
58468
|
+
]
|
|
58469
|
+
}
|
|
58470
|
+
),
|
|
58471
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "l" })
|
|
58472
|
+
] }),
|
|
58473
|
+
isSearchActive && /* @__PURE__ */ jsxs155(Fragment70, { children: [
|
|
58474
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" }),
|
|
58475
|
+
/* @__PURE__ */ jsxs155(EuiFlexGroup45, { gutterSize: "s", alignItems: "center", children: [
|
|
58476
|
+
/* @__PURE__ */ jsx289(EuiFlexItem52, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsxs155(
|
|
58477
|
+
EuiFlexGroup45,
|
|
58478
|
+
{
|
|
58479
|
+
gutterSize: "s",
|
|
58480
|
+
alignItems: "center",
|
|
58481
|
+
justifyContent: "spaceBetween",
|
|
58482
|
+
responsive: false,
|
|
58483
|
+
style: { width: "100%" },
|
|
58484
|
+
children: [
|
|
58485
|
+
/* @__PURE__ */ jsx289(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx289(
|
|
58486
|
+
WfoSearchMetadataHeader,
|
|
58487
|
+
{
|
|
58488
|
+
search_metadata: results.search_metadata
|
|
58489
|
+
}
|
|
58490
|
+
) }),
|
|
58491
|
+
/* @__PURE__ */ jsx289(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx289(
|
|
58492
|
+
WfoSearchPaginationInfo,
|
|
58493
|
+
{
|
|
58494
|
+
has_next_page: results.page_info.has_next_page,
|
|
58495
|
+
next_page_cursor: results.page_info.next_page_cursor,
|
|
58496
|
+
onNextPage: handleNextPage,
|
|
58497
|
+
onPrevPage: handlePrevPage,
|
|
58498
|
+
isLoading: isLoadingMore,
|
|
58499
|
+
currentPage,
|
|
58500
|
+
hasPrevPage: currentPage > 1,
|
|
58501
|
+
resultCount: results?.data?.length || 0
|
|
58502
|
+
}
|
|
58503
|
+
) })
|
|
58504
|
+
]
|
|
58505
|
+
}
|
|
58506
|
+
) }),
|
|
58507
|
+
showDetailPanel && /* @__PURE__ */ jsx289(EuiFlexItem52, { grow: DETAIL_GROW })
|
|
58508
|
+
] }),
|
|
58509
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "s" }),
|
|
58510
|
+
/* @__PURE__ */ jsxs155(EuiFlexGroup45, { gutterSize: "s", alignItems: "flexStart", children: [
|
|
58511
|
+
/* @__PURE__ */ jsx289(EuiFlexItem52, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsx289(EuiPanel20, { paddingSize: "none", hasBorder: true, children: /* @__PURE__ */ jsx289(
|
|
58512
|
+
WfoSearchResults,
|
|
58513
|
+
{
|
|
58514
|
+
results: results.data,
|
|
58515
|
+
loading,
|
|
58516
|
+
selectedRecordIndex,
|
|
58517
|
+
onRecordSelect: (index) => {
|
|
58518
|
+
setSelectedRecordIndex(index);
|
|
58519
|
+
const record = results.data[index];
|
|
58520
|
+
if (record) {
|
|
58521
|
+
const recordId = getRecordId(record);
|
|
58522
|
+
setSelectedRecordId(recordId);
|
|
58523
|
+
}
|
|
58524
|
+
}
|
|
58525
|
+
}
|
|
58526
|
+
) }) }),
|
|
58527
|
+
showDetailPanel && /* @__PURE__ */ jsx289(EuiFlexItem52, { grow: DETAIL_GROW, children: /* @__PURE__ */ jsx289(
|
|
58528
|
+
EuiPanel20,
|
|
58529
|
+
{
|
|
58530
|
+
paddingSize: "m",
|
|
58531
|
+
hasBorder: true,
|
|
58532
|
+
hasShadow: false,
|
|
58533
|
+
color: "transparent",
|
|
58534
|
+
children: selectedEntityTab === "SUBSCRIPTION" && results.data[selectedRecordIndex] && isSubscriptionSearchResult(
|
|
58535
|
+
results.data[selectedRecordIndex]
|
|
58536
|
+
) ? /* @__PURE__ */ jsx289(TreeProvider, { children: /* @__PURE__ */ jsx289(
|
|
58537
|
+
WfoSubscription,
|
|
58538
|
+
{
|
|
58539
|
+
subscriptionId: results.data[selectedRecordIndex].subscription.subscription_id
|
|
58540
|
+
}
|
|
58541
|
+
) }) : /* @__PURE__ */ jsxs155(Fragment70, { children: [
|
|
58542
|
+
/* @__PURE__ */ jsx289(EuiText60, { children: /* @__PURE__ */ jsx289("h4", { children: t("details") }) }),
|
|
58543
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" }),
|
|
58544
|
+
/* @__PURE__ */ jsxs155(
|
|
58545
|
+
EuiText60,
|
|
58546
|
+
{
|
|
58547
|
+
color: theme.colors.textSubdued,
|
|
58548
|
+
children: [
|
|
58549
|
+
/* @__PURE__ */ jsx289("p", { children: t(
|
|
58550
|
+
"showingDetailsForResult",
|
|
58551
|
+
{
|
|
58552
|
+
resultNumber: selectedRecordIndex + 1
|
|
58553
|
+
}
|
|
58554
|
+
) }),
|
|
58555
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "s" }),
|
|
58556
|
+
/* @__PURE__ */ jsxs155(
|
|
58557
|
+
WfoBadge,
|
|
58558
|
+
{
|
|
58559
|
+
color: theme.colors.primary,
|
|
58560
|
+
textColor: theme.colors.ghost,
|
|
58561
|
+
children: [
|
|
58562
|
+
selectedEntityTab,
|
|
58563
|
+
" #",
|
|
58564
|
+
selectedRecordIndex + 1
|
|
58565
|
+
]
|
|
58566
|
+
}
|
|
58567
|
+
),
|
|
58568
|
+
/* @__PURE__ */ jsx289(EuiSpacer32, { size: "m" }),
|
|
58569
|
+
/* @__PURE__ */ jsx289("p", { children: /* @__PURE__ */ jsx289("em", { children: t(
|
|
58570
|
+
"selectResultInstruction"
|
|
58571
|
+
) }) })
|
|
58572
|
+
]
|
|
58573
|
+
}
|
|
58574
|
+
)
|
|
58575
|
+
] })
|
|
58576
|
+
}
|
|
58577
|
+
) })
|
|
58578
|
+
] })
|
|
58579
|
+
] })
|
|
58580
|
+
] });
|
|
58581
|
+
};
|
|
58582
|
+
|
|
58583
|
+
// src/components/WfoAgent/WfoAgent/WfoAgent.tsx
|
|
58584
|
+
import { useTranslations as useTranslations106 } from "next-intl";
|
|
58585
|
+
import { useCoAgent } from "@copilotkit/react-core";
|
|
58586
|
+
import { CopilotSidebar } from "@copilotkit/react-ui";
|
|
58587
|
+
import { EuiFlexGroup as EuiFlexGroup47, EuiFlexItem as EuiFlexItem54, EuiSpacer as EuiSpacer34, EuiText as EuiText62 } from "@elastic/eui";
|
|
58588
|
+
|
|
58589
|
+
// src/components/WfoAgent/FilterDisplay/FilterDisplay.tsx
|
|
58590
|
+
import { useTranslations as useTranslations105 } from "next-intl";
|
|
58591
|
+
import {
|
|
58592
|
+
EuiFlexGroup as EuiFlexGroup46,
|
|
58593
|
+
EuiFlexItem as EuiFlexItem53,
|
|
58594
|
+
EuiPanel as EuiPanel21,
|
|
58595
|
+
EuiSpacer as EuiSpacer33,
|
|
58596
|
+
EuiText as EuiText61
|
|
58597
|
+
} from "@elastic/eui";
|
|
58598
|
+
|
|
58599
|
+
// src/components/WfoAgent/FilterDisplay/styles.ts
|
|
58600
|
+
import { css as css53 } from "@emotion/react";
|
|
58601
|
+
var getFilterDisplayStyles = ({ theme }) => {
|
|
58602
|
+
const wrapStyle = css53({
|
|
58603
|
+
display: "flex",
|
|
58604
|
+
flexWrap: "wrap",
|
|
58605
|
+
gap: theme.size.s
|
|
58606
|
+
});
|
|
58607
|
+
const columnGroupWrapStyle = css53({
|
|
58608
|
+
display: "flex",
|
|
58609
|
+
flexDirection: "column",
|
|
58610
|
+
gap: theme.size.s,
|
|
58611
|
+
alignItems: "flex-start"
|
|
58612
|
+
});
|
|
58613
|
+
const chipStyle = css53({
|
|
58614
|
+
display: "inline-flex",
|
|
58615
|
+
alignItems: "center",
|
|
58616
|
+
borderRadius: theme.size.xl,
|
|
58617
|
+
border: `1px solid ${theme.border.color}`,
|
|
58618
|
+
backgroundColor: theme.colors.body,
|
|
58619
|
+
padding: `${theme.size.s} ${theme.size.m}`,
|
|
58620
|
+
lineHeight: 1.1,
|
|
58621
|
+
gap: theme.size.s
|
|
58622
|
+
});
|
|
58623
|
+
const groupStyle = css53({
|
|
58624
|
+
border: `1px solid ${theme.colors.lightShade}`,
|
|
58625
|
+
borderRadius: theme.border.radius.medium,
|
|
58626
|
+
padding: theme.size.s,
|
|
58627
|
+
margin: theme.size.xs,
|
|
58628
|
+
backgroundColor: theme.colors.body
|
|
58629
|
+
});
|
|
58630
|
+
const operatorStyle = css53({
|
|
58631
|
+
fontFamily: theme.font.familyCode,
|
|
58632
|
+
padding: `${theme.size.xs}px ${theme.size.s}px`,
|
|
58633
|
+
borderRadius: theme.size.s,
|
|
58634
|
+
backgroundColor: theme.colors.primary,
|
|
58635
|
+
color: theme.colors.ghost,
|
|
58636
|
+
fontSize: theme.size.m,
|
|
58637
|
+
fontWeight: theme.font.weight.bold,
|
|
58638
|
+
margin: `${theme.size.xs} 0`
|
|
58639
|
+
});
|
|
58640
|
+
const valueStyle = css53({
|
|
58641
|
+
fontWeight: theme.font.weight.semiBold,
|
|
58642
|
+
color: theme.colors.warning
|
|
58643
|
+
});
|
|
58644
|
+
return {
|
|
58645
|
+
wrapStyle,
|
|
58646
|
+
columnGroupWrapStyle,
|
|
58647
|
+
chipStyle,
|
|
58648
|
+
groupStyle,
|
|
58649
|
+
operatorStyle,
|
|
58650
|
+
valueStyle
|
|
58651
|
+
};
|
|
58652
|
+
};
|
|
58653
|
+
|
|
58654
|
+
// src/components/WfoAgent/FilterDisplay/FilterDisplay.tsx
|
|
58655
|
+
import { jsx as jsx290, jsxs as jsxs156 } from "@emotion/react/jsx-runtime";
|
|
58656
|
+
var DEPTH_INDENT = 16;
|
|
58657
|
+
function FilterDisplay({ parameters }) {
|
|
58658
|
+
const t = useTranslations105("agent.page");
|
|
58659
|
+
const {
|
|
58660
|
+
wrapStyle,
|
|
58661
|
+
columnGroupWrapStyle,
|
|
58662
|
+
chipStyle,
|
|
58663
|
+
groupStyle,
|
|
58664
|
+
operatorStyle,
|
|
58665
|
+
valueStyle
|
|
58666
|
+
} = useWithOrchestratorTheme(getFilterDisplayStyles);
|
|
58667
|
+
const { action, entity_type, filters, query } = parameters ?? {};
|
|
58668
|
+
if (!parameters || Object.keys(parameters).length === 0) return null;
|
|
58669
|
+
const sectionTitle = (text) => /* @__PURE__ */ jsx290(EuiText61, { size: "xs", color: "subdued", children: /* @__PURE__ */ jsx290("strong", { children: text }) });
|
|
58670
|
+
const formatFilterValue = (condition) => {
|
|
58671
|
+
if ("value" in condition && condition.value !== void 0) {
|
|
58672
|
+
if (condition.op === "between" && condition.value && typeof condition.value === "object") {
|
|
58673
|
+
const { start, end, from, to } = condition.value;
|
|
58674
|
+
const fromVal = start || from;
|
|
58675
|
+
const toVal = end || to;
|
|
58676
|
+
return `${fromVal} \u2026 ${toVal}`;
|
|
58677
|
+
}
|
|
58678
|
+
return String(condition.value);
|
|
58679
|
+
}
|
|
58680
|
+
return "\u2014";
|
|
58681
|
+
};
|
|
58682
|
+
const renderFilterGroup = (group, depth = 0) => {
|
|
58683
|
+
if (!group.children || group.children.length === 0) {
|
|
58684
|
+
return /* @__PURE__ */ jsx290(EuiText61, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx290("em", { children: t("emptyGroup") }) });
|
|
58685
|
+
}
|
|
58686
|
+
const areChildrenGroups = group.children.length > 0 && !isCondition(group.children[0]);
|
|
58687
|
+
return /* @__PURE__ */ jsxs156("div", { css: groupStyle, style: { marginLeft: depth * DEPTH_INDENT }, children: [
|
|
58688
|
+
/* @__PURE__ */ jsx290("div", { css: operatorStyle, children: group.op }),
|
|
58689
|
+
/* @__PURE__ */ jsx290("div", { css: areChildrenGroups ? columnGroupWrapStyle : wrapStyle, children: group.children.map((child, i) => /* @__PURE__ */ jsx290("div", { children: isCondition(child) ? /* @__PURE__ */ jsxs156("div", { css: chipStyle, children: [
|
|
58690
|
+
/* @__PURE__ */ jsx290(
|
|
58691
|
+
WfoPathBreadcrumb,
|
|
58692
|
+
{
|
|
58693
|
+
path: child.path,
|
|
58694
|
+
size: "s",
|
|
58695
|
+
showArrows: true
|
|
58696
|
+
}
|
|
58697
|
+
),
|
|
58698
|
+
/* @__PURE__ */ jsx290(
|
|
58699
|
+
WfoBadge,
|
|
58700
|
+
{
|
|
58701
|
+
textColor: "default",
|
|
58702
|
+
color: "hollow",
|
|
58703
|
+
children: getOperatorDisplay(
|
|
58704
|
+
child.condition.op,
|
|
58705
|
+
child.value_kind ? {
|
|
58706
|
+
path: child.path,
|
|
58707
|
+
type: child.value_kind,
|
|
58708
|
+
operators: [],
|
|
58709
|
+
value_schema: {},
|
|
58710
|
+
group: "leaf"
|
|
58711
|
+
} : void 0
|
|
58712
|
+
).symbol
|
|
58713
|
+
}
|
|
58714
|
+
),
|
|
58715
|
+
/* @__PURE__ */ jsx290("span", { css: valueStyle, children: formatFilterValue(child.condition) })
|
|
58716
|
+
] }) : renderFilterGroup(child, depth + 1) }, i)) })
|
|
58717
|
+
] });
|
|
58718
|
+
};
|
|
58719
|
+
return /* @__PURE__ */ jsxs156(EuiPanel21, { hasBorder: true, paddingSize: "m", children: [
|
|
58720
|
+
/* @__PURE__ */ jsxs156(EuiFlexGroup46, { gutterSize: "m", wrap: true, responsive: true, children: [
|
|
58721
|
+
/* @__PURE__ */ jsxs156(EuiFlexItem53, { grow: false, children: [
|
|
58722
|
+
sectionTitle(t("action")),
|
|
58723
|
+
/* @__PURE__ */ jsx290(EuiSpacer33, { size: "xs" }),
|
|
58724
|
+
/* @__PURE__ */ jsx290(WfoBadge, { textColor: "default", color: "hollow", children: action || "N/A" })
|
|
58725
|
+
] }),
|
|
58726
|
+
/* @__PURE__ */ jsxs156(EuiFlexItem53, { grow: false, children: [
|
|
58727
|
+
sectionTitle(t("entityType")),
|
|
58728
|
+
/* @__PURE__ */ jsx290(EuiSpacer33, { size: "xs" }),
|
|
58729
|
+
/* @__PURE__ */ jsx290(WfoBadge, { textColor: "default", color: "hollow", children: entity_type || "N/A" })
|
|
58730
|
+
] }),
|
|
58731
|
+
query ? /* @__PURE__ */ jsxs156(EuiFlexItem53, { grow: false, children: [
|
|
58732
|
+
sectionTitle(t("searchQuery")),
|
|
58733
|
+
/* @__PURE__ */ jsx290(EuiSpacer33, { size: "xs" }),
|
|
58734
|
+
/* @__PURE__ */ jsx290(EuiText61, { size: "s", children: /* @__PURE__ */ jsxs156("em", { children: [
|
|
58735
|
+
'"',
|
|
58736
|
+
query,
|
|
58737
|
+
'"'
|
|
58738
|
+
] }) })
|
|
58739
|
+
] }) : null
|
|
58740
|
+
] }),
|
|
58741
|
+
/* @__PURE__ */ jsx290(EuiSpacer33, { size: "m" }),
|
|
58742
|
+
sectionTitle(t("activeFilters")),
|
|
58743
|
+
/* @__PURE__ */ jsx290(EuiSpacer33, { size: "s" }),
|
|
58744
|
+
filters && filters.children && filters.children.length > 0 ? renderFilterGroup(filters) : /* @__PURE__ */ jsx290(EuiText61, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx290("em", { children: t("noFiltersApplied") }) })
|
|
58745
|
+
] });
|
|
58746
|
+
}
|
|
58747
|
+
|
|
58748
|
+
// src/components/WfoAgent/WfoAgent/WfoAgent.tsx
|
|
58749
|
+
import { jsx as jsx291, jsxs as jsxs157 } from "@emotion/react/jsx-runtime";
|
|
58750
|
+
var initialState3 = {
|
|
58751
|
+
parameters: {
|
|
58752
|
+
action: "select",
|
|
58753
|
+
entity_type: "SUBSCRIPTION",
|
|
58754
|
+
filters: [],
|
|
58755
|
+
query: null
|
|
58756
|
+
},
|
|
58757
|
+
results: []
|
|
58758
|
+
};
|
|
58759
|
+
function WfoAgent() {
|
|
58760
|
+
const t = useTranslations106("agent");
|
|
58761
|
+
const tPage = useTranslations106("agent.page");
|
|
58762
|
+
const { state } = useCoAgent({
|
|
58763
|
+
name: "query_agent",
|
|
58764
|
+
initialState: initialState3
|
|
58765
|
+
});
|
|
58766
|
+
const { parameters, results } = state;
|
|
58767
|
+
const hasStarted = !!(state.parameters && Array.isArray(state.parameters.filters) && state.parameters.filters.length > 0);
|
|
58768
|
+
const isLoadingResults = hasStarted && (!state.results || state.results.length === 0);
|
|
58769
|
+
const displayParameters = parameters && {
|
|
58770
|
+
...parameters,
|
|
58771
|
+
filters: Array.isArray(parameters.filters) ? { op: "AND", children: parameters.filters } : parameters.filters
|
|
58772
|
+
};
|
|
58773
|
+
return /* @__PURE__ */ jsxs157(EuiFlexGroup47, { gutterSize: "l", alignItems: "stretch", children: [
|
|
58774
|
+
/* @__PURE__ */ jsxs157(EuiFlexItem54, { grow: 2, children: [
|
|
58775
|
+
/* @__PURE__ */ jsx291(EuiText62, { children: /* @__PURE__ */ jsx291("h1", { children: t("title") }) }),
|
|
58776
|
+
/* @__PURE__ */ jsx291(EuiSpacer34, { size: "m" }),
|
|
58777
|
+
/* @__PURE__ */ jsx291(EuiText62, { size: "s", children: /* @__PURE__ */ jsx291("h2", { children: tPage("filledParameters") }) }),
|
|
58778
|
+
/* @__PURE__ */ jsx291(EuiSpacer34, { size: "s" }),
|
|
58779
|
+
displayParameters && /* @__PURE__ */ jsx291(FilterDisplay, { parameters: displayParameters }),
|
|
58780
|
+
/* @__PURE__ */ jsx291(EuiSpacer34, { size: "m" }),
|
|
58781
|
+
/* @__PURE__ */ jsx291(EuiText62, { size: "s", children: /* @__PURE__ */ jsxs157("h2", { children: [
|
|
58782
|
+
tPage("results"),
|
|
58783
|
+
" ",
|
|
58784
|
+
results ? `(${results.length})` : ""
|
|
58785
|
+
] }) }),
|
|
58786
|
+
/* @__PURE__ */ jsx291(EuiSpacer34, { size: "s" }),
|
|
58787
|
+
/* @__PURE__ */ jsx291(
|
|
58788
|
+
WfoSearchResults,
|
|
58789
|
+
{
|
|
58790
|
+
results: results ?? [],
|
|
58791
|
+
loading: isLoadingResults,
|
|
58792
|
+
selectedRecordIndex: -1,
|
|
58793
|
+
onRecordSelect: () => {
|
|
58794
|
+
}
|
|
58795
|
+
}
|
|
58796
|
+
)
|
|
58797
|
+
] }),
|
|
58798
|
+
/* @__PURE__ */ jsx291(EuiFlexItem54, { grow: 1, children: /* @__PURE__ */ jsx291(
|
|
58799
|
+
CopilotSidebar,
|
|
58800
|
+
{
|
|
58801
|
+
defaultOpen: true,
|
|
58802
|
+
clickOutsideToClose: false,
|
|
58803
|
+
labels: {
|
|
58804
|
+
title: tPage("copilot.title"),
|
|
58805
|
+
initial: tPage("copilot.initial")
|
|
58806
|
+
}
|
|
58807
|
+
}
|
|
58808
|
+
) })
|
|
58809
|
+
] });
|
|
58810
|
+
}
|
|
58811
|
+
|
|
55964
58812
|
// src/rtk/endpoints/translations.ts
|
|
55965
58813
|
var TRANSLATIONS_URL = "translations";
|
|
55966
58814
|
var translationsApi = orchestratorApi.injectEndpoints({
|
|
@@ -56275,7 +59123,8 @@ var en_GB_default = {
|
|
|
56275
59123
|
metadata: "Metadata",
|
|
56276
59124
|
note: "Note",
|
|
56277
59125
|
customerFullname: "Customer",
|
|
56278
|
-
customerShortcode: "Customer abbr"
|
|
59126
|
+
customerShortcode: "Customer abbr",
|
|
59127
|
+
actions: "Actions"
|
|
56279
59128
|
},
|
|
56280
59129
|
detail: {
|
|
56281
59130
|
title: "Subscriptions",
|
|
@@ -56449,6 +59298,83 @@ var en_GB_default = {
|
|
|
56449
59298
|
softwareVersions: "Software Versions",
|
|
56450
59299
|
logout: "Logout",
|
|
56451
59300
|
aoStatusPage: "A&O application status page"
|
|
59301
|
+
},
|
|
59302
|
+
agent: {
|
|
59303
|
+
title: "Search results",
|
|
59304
|
+
page: {
|
|
59305
|
+
filledParameters: "Filled parameters",
|
|
59306
|
+
results: "Results",
|
|
59307
|
+
emptyGroup: "Empty group",
|
|
59308
|
+
searchQuery: "Search query",
|
|
59309
|
+
activeFilters: "Active filters",
|
|
59310
|
+
noFiltersApplied: "No filters applied",
|
|
59311
|
+
entityType: "Entity type",
|
|
59312
|
+
action: "Action",
|
|
59313
|
+
copilot: {
|
|
59314
|
+
title: "Database assistant",
|
|
59315
|
+
initial: "Ask me things such as:\n\u2022 *Find active subscriptions for Surf*\n\u2022 *Show terminated workflows\u201D*\n\nThe filled template and results will appear on the left."
|
|
59316
|
+
}
|
|
59317
|
+
}
|
|
59318
|
+
},
|
|
59319
|
+
search: {
|
|
59320
|
+
page: {
|
|
59321
|
+
selectFieldFirst: "Select a field first",
|
|
59322
|
+
maxNestingDepth: "Maximum nesting depth reached",
|
|
59323
|
+
addNestedGroup: "Add nested group",
|
|
59324
|
+
addCondition: "Add condition",
|
|
59325
|
+
addGroup: "Add group",
|
|
59326
|
+
removeGroup: "Remove group",
|
|
59327
|
+
emptyGroupDescription: "Add conditions or nested groups to build your filter.",
|
|
59328
|
+
emptyGroupTitle: "Empty group",
|
|
59329
|
+
fieldSearchPlaceholder: "Type to search fields...",
|
|
59330
|
+
removeConditionAriaLabel: "Remove condition",
|
|
59331
|
+
groupLabel: "Group",
|
|
59332
|
+
hideFilters: "Hide filters",
|
|
59333
|
+
showFilters: "Show filters",
|
|
59334
|
+
structuredFilters: "Structured filters",
|
|
59335
|
+
searchError: "Error",
|
|
59336
|
+
selectResultInstruction: "Detail content will be implemented here...",
|
|
59337
|
+
showingDetailsForResult: "Showing details for result #{resultNumber}",
|
|
59338
|
+
details: "Details",
|
|
59339
|
+
dismiss: "Dismiss",
|
|
59340
|
+
searchPlaceholder: "Search for {entityType}\u2026",
|
|
59341
|
+
noResults: "No Results",
|
|
59342
|
+
noResultsMessage: "No {entityType} found matching your search criteria.",
|
|
59343
|
+
noResultsSuggestions: "Try adjusting your search terms, removing filters, or searching for different keywords.",
|
|
59344
|
+
noResultsFound: "No results found for your search.",
|
|
59345
|
+
loadingSearchResults: "Loading search results...",
|
|
59346
|
+
previousPage: "Previous page",
|
|
59347
|
+
page: "Page",
|
|
59348
|
+
nextPage: "Next page",
|
|
59349
|
+
resultsOnPage: "{resultCount} result(s) on this page",
|
|
59350
|
+
searchResultsPagination: "Search results pagination",
|
|
59351
|
+
viewDetails: "View details",
|
|
59352
|
+
closeButton: "Close",
|
|
59353
|
+
selectOrEnterValue: "Select or type value",
|
|
59354
|
+
enterValue: "Enter value",
|
|
59355
|
+
fromNumber: "From",
|
|
59356
|
+
toNumber: "To",
|
|
59357
|
+
fromDate: "From date",
|
|
59358
|
+
toDate: "To date",
|
|
59359
|
+
enterNumber: "Enter number",
|
|
59360
|
+
selectDateAndTime: "Select date",
|
|
59361
|
+
valueControlTo: "to",
|
|
59362
|
+
searchFieldsPlaceholder: "Search fields...",
|
|
59363
|
+
selectSpecificPathPlaceholder: "Select a specific path...",
|
|
59364
|
+
anyPathOption: "Any path",
|
|
59365
|
+
operatorLabel: "Operator",
|
|
59366
|
+
fieldLabel: "Field",
|
|
59367
|
+
valueLabel: "Value",
|
|
59368
|
+
fieldsGroupLabel: "Fields",
|
|
59369
|
+
componentsGroupLabel: "Components",
|
|
59370
|
+
pathsCount: "{count} paths"
|
|
59371
|
+
},
|
|
59372
|
+
tabs: {
|
|
59373
|
+
subscriptions: "Subscriptions",
|
|
59374
|
+
products: "Products",
|
|
59375
|
+
workflows: "Workflows",
|
|
59376
|
+
processes: "Processes"
|
|
59377
|
+
}
|
|
56452
59378
|
}
|
|
56453
59379
|
};
|
|
56454
59380
|
|
|
@@ -56743,7 +59669,8 @@ var nl_NL_default = {
|
|
|
56743
59669
|
note: "Notitie",
|
|
56744
59670
|
metadata: "Metadata",
|
|
56745
59671
|
customerFullname: "Klant",
|
|
56746
|
-
customerShortcode: "Klantafkorting"
|
|
59672
|
+
customerShortcode: "Klantafkorting",
|
|
59673
|
+
actions: "Acties"
|
|
56747
59674
|
},
|
|
56748
59675
|
detail: {
|
|
56749
59676
|
title: "Subscriptions",
|
|
@@ -56955,6 +59882,7 @@ export {
|
|
|
56955
59882
|
CacheTagType,
|
|
56956
59883
|
ColorModes,
|
|
56957
59884
|
ColumnType,
|
|
59885
|
+
ConditionRow,
|
|
56958
59886
|
ConfirmationDialogContext,
|
|
56959
59887
|
ConfirmationDialogContextWrapper,
|
|
56960
59888
|
ConfirmationDialogProvider,
|
|
@@ -56971,11 +59899,14 @@ export {
|
|
|
56971
59899
|
DEFAULT_PAGE_SIZES,
|
|
56972
59900
|
DateField,
|
|
56973
59901
|
DividerField,
|
|
59902
|
+
ENTITY_TABS,
|
|
56974
59903
|
EngineStatus,
|
|
56975
59904
|
Environment,
|
|
56976
59905
|
ErrorField,
|
|
56977
59906
|
ErrorsField,
|
|
56978
59907
|
FileUploadField,
|
|
59908
|
+
FilterDisplay,
|
|
59909
|
+
FilterGroup,
|
|
56979
59910
|
Footer,
|
|
56980
59911
|
HIDDEN_KEYS,
|
|
56981
59912
|
Header,
|
|
@@ -57083,12 +60014,14 @@ export {
|
|
|
57083
60014
|
UnconnectedSelectField,
|
|
57084
60015
|
UserInputFormWizard,
|
|
57085
60016
|
VALUE_CELL_CLASS_NAME,
|
|
60017
|
+
ValueControl,
|
|
57086
60018
|
VlanField,
|
|
57087
60019
|
WFO_STATUS_COLOR_FIELD,
|
|
57088
60020
|
WfoActionSettings,
|
|
57089
60021
|
WfoActiveWorkflowsSummaryCard,
|
|
57090
60022
|
WfoActualWork,
|
|
57091
60023
|
WfoAdvancedTable,
|
|
60024
|
+
WfoAgent,
|
|
57092
60025
|
WfoArrayField,
|
|
57093
60026
|
WfoArrowDown,
|
|
57094
60027
|
WfoArrowDownSvg,
|
|
@@ -57135,12 +60068,14 @@ export {
|
|
|
57135
60068
|
WfoEyeFill,
|
|
57136
60069
|
WfoFailedTasksBadge,
|
|
57137
60070
|
WfoFailedTasksSummaryCard,
|
|
60071
|
+
WfoFieldSelector,
|
|
57138
60072
|
WfoFilterTabs,
|
|
57139
60073
|
WfoFirstPartUUID,
|
|
57140
60074
|
WfoFlushSettings,
|
|
57141
60075
|
WfoGroupedTable,
|
|
57142
60076
|
WfoHeaderBadge,
|
|
57143
60077
|
WfoHeroIconsWrapper,
|
|
60078
|
+
WfoHighlightedText,
|
|
57144
60079
|
WfoInSyncField,
|
|
57145
60080
|
WfoInformationModal,
|
|
57146
60081
|
WfoInlineEdit,
|
|
@@ -57167,11 +60102,15 @@ export {
|
|
|
57167
60102
|
WfoMyWorkflowsSummaryCard,
|
|
57168
60103
|
WfoNoResults,
|
|
57169
60104
|
WfoObjectField,
|
|
60105
|
+
WfoOperatorSelector,
|
|
57170
60106
|
WfoPageHeader,
|
|
57171
60107
|
WfoPageTemplate,
|
|
57172
60108
|
WfoPageUnauthorized,
|
|
60109
|
+
WfoPathBreadcrumb,
|
|
60110
|
+
WfoPathSelector,
|
|
57173
60111
|
WfoPencil,
|
|
57174
60112
|
WfoPencilAlt,
|
|
60113
|
+
WfoPencilCompact,
|
|
57175
60114
|
WfoPlannedWork,
|
|
57176
60115
|
WfoPlayCircle,
|
|
57177
60116
|
WfoPlayFill,
|
|
@@ -57201,11 +60140,21 @@ export {
|
|
|
57201
60140
|
WfoRefresh,
|
|
57202
60141
|
WfoRelatedSubscriptions,
|
|
57203
60142
|
WfoRenderElementOrString,
|
|
60143
|
+
WfoRenderPathOption,
|
|
60144
|
+
WfoRenderPathSelectionOption,
|
|
57204
60145
|
WfoResetTextSearchIndexButton,
|
|
57205
60146
|
WfoResourceTypesPage,
|
|
57206
60147
|
WfoRowContextMenu,
|
|
60148
|
+
WfoSearch,
|
|
60149
|
+
WfoSearchEmptyState,
|
|
57207
60150
|
WfoSearchField,
|
|
60151
|
+
WfoSearchLoadingState,
|
|
60152
|
+
WfoSearchMetadataHeader,
|
|
60153
|
+
WfoSearchPaginationInfo,
|
|
60154
|
+
WfoSearchResultItem,
|
|
60155
|
+
WfoSearchResults,
|
|
57208
60156
|
WfoSearchStrikethrough,
|
|
60157
|
+
WfoSelectedPathDisplay,
|
|
57209
60158
|
WfoSettingsModal,
|
|
57210
60159
|
WfoSettingsPage,
|
|
57211
60160
|
WfoSettingsTab,
|
|
@@ -57232,6 +60181,7 @@ export {
|
|
|
57232
60181
|
WfoSubmitModal,
|
|
57233
60182
|
WfoSubscription,
|
|
57234
60183
|
WfoSubscriptionActions,
|
|
60184
|
+
WfoSubscriptionDetailModal,
|
|
57235
60185
|
WfoSubscriptionDetailNoteEdit,
|
|
57236
60186
|
WfoSubscriptionDetailPage,
|
|
57237
60187
|
WfoSubscriptionDetailSection,
|
|
@@ -57287,10 +60237,12 @@ export {
|
|
|
57287
60237
|
WorkerTypes,
|
|
57288
60238
|
WorkflowTarget,
|
|
57289
60239
|
addToastMessage,
|
|
60240
|
+
buildSearchParams,
|
|
57290
60241
|
calculateTimeDifference,
|
|
57291
60242
|
camelToHuman,
|
|
57292
60243
|
catchErrorResponse,
|
|
57293
60244
|
clearTableConfigFromLocalStorage,
|
|
60245
|
+
createOptionsFromPaths,
|
|
57294
60246
|
createSideNavDivider,
|
|
57295
60247
|
csvDownloadHandler,
|
|
57296
60248
|
defaultOrchestratorTheme,
|
|
@@ -57301,10 +60253,13 @@ export {
|
|
|
57301
60253
|
emptyOrchestratorConfig,
|
|
57302
60254
|
emptyWfoErrorMonitoring,
|
|
57303
60255
|
filterDataByCriteria,
|
|
60256
|
+
findResultIndexById,
|
|
57304
60257
|
flattenArrayProps,
|
|
57305
60258
|
formatDate,
|
|
57306
60259
|
formatDateCetWithUtc,
|
|
57307
60260
|
getAcceptFieldStyles,
|
|
60261
|
+
getButtonColor,
|
|
60262
|
+
getButtonFill,
|
|
57308
60263
|
getCacheTag,
|
|
57309
60264
|
getCommonFormFieldStyles,
|
|
57310
60265
|
getConcatenatedPagedResult,
|
|
@@ -57317,8 +60272,14 @@ export {
|
|
|
57317
60272
|
getDataTestId,
|
|
57318
60273
|
getDate,
|
|
57319
60274
|
getDefaultTableConfig,
|
|
60275
|
+
getDescription,
|
|
60276
|
+
getDetailUrl,
|
|
60277
|
+
getDisplayText,
|
|
60278
|
+
getEndpointPath,
|
|
57320
60279
|
getEnvironmentVariables,
|
|
57321
60280
|
getFieldFromProductBlockInstanceValues,
|
|
60281
|
+
getFieldNameFromFullPath,
|
|
60282
|
+
getFieldNameFromPath,
|
|
57322
60283
|
getFirstUuidPart,
|
|
57323
60284
|
getFormFieldsBaseStyle,
|
|
57324
60285
|
getLastUncompletedProcess,
|
|
@@ -57327,6 +60288,7 @@ export {
|
|
|
57327
60288
|
getNumberOfColumns,
|
|
57328
60289
|
getNumberValueFromEnvironmentVariable,
|
|
57329
60290
|
getObjectKeys,
|
|
60291
|
+
getOperatorDisplay,
|
|
57330
60292
|
getOrchestratorComponentOverrideSlice,
|
|
57331
60293
|
getOrchestratorConfigSlice,
|
|
57332
60294
|
getOrchestratorStore,
|
|
@@ -57334,11 +60296,13 @@ export {
|
|
|
57334
60296
|
getPageIndexChangeHandler,
|
|
57335
60297
|
getPageInfoForSyncExport,
|
|
57336
60298
|
getPageSizeChangeHandler,
|
|
60299
|
+
getPathSelectionOptions,
|
|
57337
60300
|
getProductBlockTitle,
|
|
57338
60301
|
getProductNamesFromProcess,
|
|
57339
60302
|
getQueryStringHandler,
|
|
57340
60303
|
getQueryUrl,
|
|
57341
60304
|
getQueryVariablesForExport,
|
|
60305
|
+
getRecordId,
|
|
57342
60306
|
getRowDetailData,
|
|
57343
60307
|
getSortDirectionFromString,
|
|
57344
60308
|
getStatusBadgeColor,
|
|
@@ -57346,6 +60310,7 @@ export {
|
|
|
57346
60310
|
getTableConfigFromLocalStorage,
|
|
57347
60311
|
getTasksListTabTypeFromString,
|
|
57348
60312
|
getTotalNumberOfRows,
|
|
60313
|
+
getTypeColor,
|
|
57349
60314
|
getTypedFieldFromObject,
|
|
57350
60315
|
getUrlWithQueryParams,
|
|
57351
60316
|
getUsedPrefixMin,
|
|
@@ -57369,12 +60334,19 @@ export {
|
|
|
57369
60334
|
ipPrefixTableFieldStyling,
|
|
57370
60335
|
ipamStates,
|
|
57371
60336
|
isAllUpperCase,
|
|
60337
|
+
isCondition,
|
|
57372
60338
|
isFetchBaseQueryError,
|
|
60339
|
+
isFilterValid,
|
|
60340
|
+
isFullPathSelected,
|
|
57373
60341
|
isNullOrEmpty,
|
|
60342
|
+
isProcessSearchResult,
|
|
60343
|
+
isProductSearchResult,
|
|
57374
60344
|
isRecord,
|
|
60345
|
+
isSubscriptionSearchResult,
|
|
57375
60346
|
isToday,
|
|
57376
60347
|
isUuid4,
|
|
57377
60348
|
isValidLocalStorageTableConfig,
|
|
60349
|
+
isWorkflowSearchResult,
|
|
57378
60350
|
localMomentToUtcTimestamp,
|
|
57379
60351
|
mapGraphQlSubscriptionsResultToPageInfo,
|
|
57380
60352
|
mapGraphQlSubscriptionsResultToSubscriptionListItems,
|
|
@@ -57410,6 +60382,7 @@ export {
|
|
|
57410
60382
|
selectOrchestratorConfig,
|
|
57411
60383
|
setTableConfigToLocalStorage,
|
|
57412
60384
|
settingsTabs,
|
|
60385
|
+
shouldHideValueInput,
|
|
57413
60386
|
snakeToHuman,
|
|
57414
60387
|
snakeToKebab,
|
|
57415
60388
|
sortProcessesByDate,
|
|
@@ -57429,6 +60402,7 @@ export {
|
|
|
57429
60402
|
toObjectWithSortedProperties,
|
|
57430
60403
|
toOptionalArrayEntries,
|
|
57431
60404
|
toOptionalArrayEntry,
|
|
60405
|
+
toOptionalObjectProperty,
|
|
57432
60406
|
toSortedTableColumnConfig,
|
|
57433
60407
|
toUrlParams,
|
|
57434
60408
|
toastMessagesReducer,
|
|
@@ -57494,6 +60468,10 @@ export {
|
|
|
57494
60468
|
useResumeProcessMutation,
|
|
57495
60469
|
useRetryAllProcessesMutation,
|
|
57496
60470
|
useRetryProcessMutation,
|
|
60471
|
+
useSearchDefinitionsQuery,
|
|
60472
|
+
useSearchMutation,
|
|
60473
|
+
useSearchPathsQuery,
|
|
60474
|
+
useSearchWithPaginationMutation,
|
|
57497
60475
|
useSetEngineStatusMutation,
|
|
57498
60476
|
useSetSubscriptionInSyncMutation,
|
|
57499
60477
|
useShowToastMessage,
|