@orchestrator-ui/orchestrator-ui-components 8.7.2 → 8.7.3
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 +1 -1
- package/.turbo/turbo-test.log +15 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +484 -2
- package/dist/index.js +276 -183
- package/dist/index.js.map +1 -1
- package/jest.config.cjs +9 -8
- package/package.json +1 -1
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +30 -3
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.spec.tsx +143 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.tsx +33 -11
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRestoreLoop.spec.tsx +130 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.spec.tsx +60 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.tsx +22 -4
- package/src/components/WfoTable/WfoStructuredSearchTable/utils.spec.ts +56 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/utils.ts +40 -1
- package/src/configuration/version.ts +1 -1
- package/src/hooks/usePathAutoComplete.spec.tsx +64 -0
- package/src/hooks/usePathAutoComplete.ts +98 -41
- package/src/pages/WfoSearchPocPage.tsx +18 -17
- package/src/rtk/endpoints/search.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/WfoAutoExpandableTextArea/WfoAutoExpandableTextArea.tsx
|
|
2
|
-
import { useCallback as useCallback5, useEffect as useEffect8, useRef as
|
|
2
|
+
import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef4 } from "react";
|
|
3
3
|
import { EuiTextArea as EuiTextArea2 } from "@elastic/eui";
|
|
4
4
|
|
|
5
5
|
// src/hooks/useCheckEngineStatus.ts
|
|
@@ -61,7 +61,7 @@ var PolicyResource = /* @__PURE__ */ ((PolicyResource2) => {
|
|
|
61
61
|
})(PolicyResource || {});
|
|
62
62
|
|
|
63
63
|
// src/configuration/version.ts
|
|
64
|
-
var ORCHESTRATOR_UI_LIBRARY_VERSION = "8.7.
|
|
64
|
+
var ORCHESTRATOR_UI_LIBRARY_VERSION = "8.7.3";
|
|
65
65
|
|
|
66
66
|
// src/types/types.ts
|
|
67
67
|
var EngineStatus = /* @__PURE__ */ ((EngineStatus2) => {
|
|
@@ -3117,6 +3117,7 @@ var {
|
|
|
3117
3117
|
useLazySearchQuery,
|
|
3118
3118
|
useSearchWithPaginationMutation,
|
|
3119
3119
|
useSearchPathsQuery,
|
|
3120
|
+
useLazySearchPathsQuery,
|
|
3120
3121
|
useSearchDefinitionsQuery
|
|
3121
3122
|
} = searchApi;
|
|
3122
3123
|
|
|
@@ -5348,7 +5349,7 @@ var useGetWorkflowNameById = (workflowId) => {
|
|
|
5348
5349
|
};
|
|
5349
5350
|
|
|
5350
5351
|
// src/hooks/usePathAutoComplete.ts
|
|
5351
|
-
import { useEffect as useEffect3, useState as useState9 } from "react";
|
|
5352
|
+
import { useEffect as useEffect3, useRef as useRef2, useState as useState9 } from "react";
|
|
5352
5353
|
|
|
5353
5354
|
// src/hooks/useDebounce.ts
|
|
5354
5355
|
import { useEffect as useEffect2, useState as useState8 } from "react";
|
|
@@ -5408,6 +5409,40 @@ var FALLBACK_DEFINITIONS = {
|
|
|
5408
5409
|
}
|
|
5409
5410
|
}
|
|
5410
5411
|
};
|
|
5412
|
+
var mapPathAutocompleteResponseToPathInfos = (pathData, definitions) => {
|
|
5413
|
+
const enrichedPaths = [];
|
|
5414
|
+
(pathData.leaves || []).forEach((leaf) => {
|
|
5415
|
+
const primaryType = leaf.ui_types[0] || "string";
|
|
5416
|
+
const typeDefinition = definitions[primaryType];
|
|
5417
|
+
enrichedPaths.push({
|
|
5418
|
+
path: leaf.name,
|
|
5419
|
+
type: primaryType,
|
|
5420
|
+
operators: typeDefinition?.operators || [],
|
|
5421
|
+
value_schema: typeDefinition?.value_schema || {},
|
|
5422
|
+
group: "leaf",
|
|
5423
|
+
displayLabel: leaf.name,
|
|
5424
|
+
ui_types: leaf.ui_types,
|
|
5425
|
+
availablePaths: leaf.paths || [],
|
|
5426
|
+
pathCount: leaf.paths ? leaf.paths?.length : 0
|
|
5427
|
+
});
|
|
5428
|
+
});
|
|
5429
|
+
(pathData.components || []).forEach((component) => {
|
|
5430
|
+
const primaryType = component.ui_types[0] || "string";
|
|
5431
|
+
const typeDefinition = definitions[primaryType];
|
|
5432
|
+
enrichedPaths.push({
|
|
5433
|
+
path: component.name,
|
|
5434
|
+
type: "component",
|
|
5435
|
+
operators: typeDefinition?.operators || [],
|
|
5436
|
+
value_schema: typeDefinition?.value_schema || {},
|
|
5437
|
+
group: "component",
|
|
5438
|
+
displayLabel: component.name,
|
|
5439
|
+
ui_types: component.ui_types,
|
|
5440
|
+
availablePaths: component.paths || [],
|
|
5441
|
+
pathCount: component.paths ? component.paths?.length : 0
|
|
5442
|
+
});
|
|
5443
|
+
});
|
|
5444
|
+
return enrichedPaths;
|
|
5445
|
+
};
|
|
5411
5446
|
var usePathAutocomplete = (prefix, entityType) => {
|
|
5412
5447
|
const [paths, setPaths] = useState9([]);
|
|
5413
5448
|
const debouncedPrefix = useDebounce(prefix, 300);
|
|
@@ -5425,42 +5460,39 @@ var usePathAutocomplete = (prefix, entityType) => {
|
|
|
5425
5460
|
if (!pathData) {
|
|
5426
5461
|
return;
|
|
5427
5462
|
}
|
|
5428
|
-
|
|
5429
|
-
(pathData.leaves || []).forEach((leaf) => {
|
|
5430
|
-
const primaryType = leaf.ui_types[0] || "string";
|
|
5431
|
-
const typeDefinition = definitions[primaryType];
|
|
5432
|
-
enrichedPaths.push({
|
|
5433
|
-
path: leaf.name,
|
|
5434
|
-
type: primaryType,
|
|
5435
|
-
operators: typeDefinition?.operators || [],
|
|
5436
|
-
value_schema: typeDefinition?.value_schema || {},
|
|
5437
|
-
group: "leaf",
|
|
5438
|
-
displayLabel: leaf.name,
|
|
5439
|
-
ui_types: leaf.ui_types,
|
|
5440
|
-
availablePaths: leaf.paths || [],
|
|
5441
|
-
pathCount: leaf.paths ? leaf.paths?.length : 0
|
|
5442
|
-
});
|
|
5443
|
-
});
|
|
5444
|
-
(pathData.components || []).forEach((component) => {
|
|
5445
|
-
const primaryType = component.ui_types[0] || "string";
|
|
5446
|
-
const typeDefinition = definitions[primaryType];
|
|
5447
|
-
enrichedPaths.push({
|
|
5448
|
-
path: component.name,
|
|
5449
|
-
type: "component",
|
|
5450
|
-
operators: typeDefinition?.operators || [],
|
|
5451
|
-
value_schema: typeDefinition?.value_schema || {},
|
|
5452
|
-
group: "component",
|
|
5453
|
-
displayLabel: component.name,
|
|
5454
|
-
ui_types: component.ui_types,
|
|
5455
|
-
availablePaths: component.paths || [],
|
|
5456
|
-
pathCount: component.paths ? component.paths?.length : 0
|
|
5457
|
-
});
|
|
5458
|
-
});
|
|
5459
|
-
setPaths(enrichedPaths);
|
|
5463
|
+
setPaths(mapPathAutocompleteResponseToPathInfos(pathData, definitions));
|
|
5460
5464
|
}, [pathData, definitions, debouncedPrefix?.length]);
|
|
5461
5465
|
const errorMessage = isError ? "Failed to load paths" : defError ? "Failed to load definitions" : null;
|
|
5462
5466
|
return { paths, loading: isLoading, error: errorMessage };
|
|
5463
5467
|
};
|
|
5468
|
+
var useFieldsPathInfo = (fields, entityType) => {
|
|
5469
|
+
const [fieldsPathInfo, setFieldsPathInfo] = useState9(/* @__PURE__ */ new Map());
|
|
5470
|
+
const requestedFieldsRef = useRef2(/* @__PURE__ */ new Set());
|
|
5471
|
+
const [fetchPaths] = useLazySearchPathsQuery();
|
|
5472
|
+
const { data: definitions, isError: definitionsFailed } = useSearchDefinitionsQuery();
|
|
5473
|
+
const settledDefinitions = definitions ?? (definitionsFailed ? FALLBACK_DEFINITIONS : void 0);
|
|
5474
|
+
useEffect3(() => {
|
|
5475
|
+
requestedFieldsRef.current = /* @__PURE__ */ new Set();
|
|
5476
|
+
setFieldsPathInfo(/* @__PURE__ */ new Map());
|
|
5477
|
+
}, [entityType]);
|
|
5478
|
+
useEffect3(() => {
|
|
5479
|
+
if (!settledDefinitions) {
|
|
5480
|
+
return;
|
|
5481
|
+
}
|
|
5482
|
+
const newFields = fields.filter((field) => field && !requestedFieldsRef.current.has(field));
|
|
5483
|
+
newFields.forEach((field) => {
|
|
5484
|
+
requestedFieldsRef.current.add(field);
|
|
5485
|
+
fetchPaths({ q: field, entity_type: entityType }, true).unwrap().then((pathData) => {
|
|
5486
|
+
const pathInfos = mapPathAutocompleteResponseToPathInfos(pathData, settledDefinitions);
|
|
5487
|
+
const match = pathInfos.find((pathInfo) => pathInfo.path === field) ?? pathInfos.find((pathInfo) => pathInfo.availablePaths?.includes(field));
|
|
5488
|
+
setFieldsPathInfo((previous) => new Map(previous).set(field, match ?? null));
|
|
5489
|
+
}).catch(() => {
|
|
5490
|
+
requestedFieldsRef.current.delete(field);
|
|
5491
|
+
});
|
|
5492
|
+
});
|
|
5493
|
+
}, [fields, entityType, fetchPaths, settledDefinitions]);
|
|
5494
|
+
return fieldsPathInfo;
|
|
5495
|
+
};
|
|
5464
5496
|
|
|
5465
5497
|
// src/hooks/useGetPydanticFormsConfig.tsx
|
|
5466
5498
|
import { useCallback as useCallback4 } from "react";
|
|
@@ -6341,7 +6373,7 @@ var WfoTimestampField = ({
|
|
|
6341
6373
|
};
|
|
6342
6374
|
|
|
6343
6375
|
// src/components/WfoPydanticForm/fields/WfoCron.tsx
|
|
6344
|
-
import React15, { useMemo as useMemo2, useRef as
|
|
6376
|
+
import React15, { useMemo as useMemo2, useRef as useRef3, useState as useState13 } from "react";
|
|
6345
6377
|
import { CronExpressionParser } from "cron-parser";
|
|
6346
6378
|
import cronstrue from "cronstrue/i18n";
|
|
6347
6379
|
import _3 from "lodash";
|
|
@@ -6415,7 +6447,7 @@ var WfoCron = ({ onChange, value, disabled, pydanticFormField }) => {
|
|
|
6415
6447
|
const t = useTranslations10("pydanticForms.widgets.cron");
|
|
6416
6448
|
const cronstrueLocale = useLanguageCode();
|
|
6417
6449
|
const [activeFieldIndex, setActiveFieldIndex] = useState13(null);
|
|
6418
|
-
const inputRef =
|
|
6450
|
+
const inputRef = useRef3(null);
|
|
6419
6451
|
const fieldName = getFormFieldIdWithPath3(pydanticFormField.id);
|
|
6420
6452
|
const fieldValue = _3.isObject(value) && _3.has(value, fieldName) ? _3.get(value, fieldName) : value;
|
|
6421
6453
|
const { description, parseError, nextOccurrences } = useMemo2(() => {
|
|
@@ -6786,7 +6818,7 @@ var getStyles2 = ({ theme, toSecondaryColor }) => {
|
|
|
6786
6818
|
import { jsx as jsx93 } from "@emotion/react/jsx-runtime";
|
|
6787
6819
|
var WfoAutoExpandableTextArea = ({ inputRef, onChange, ...restProps }) => {
|
|
6788
6820
|
const { autoExpandableTextAreaStyles } = useWithOrchestratorTheme(getStyles2);
|
|
6789
|
-
const textAreaRef =
|
|
6821
|
+
const textAreaRef = useRef4(null);
|
|
6790
6822
|
const adjustTextAreaHeight = (textArea) => {
|
|
6791
6823
|
if (!textArea) {
|
|
6792
6824
|
return;
|
|
@@ -7731,7 +7763,7 @@ var WfoValueOnlyTable = ({ values, showCopyToClipboardIcon = false }) => {
|
|
|
7731
7763
|
};
|
|
7732
7764
|
|
|
7733
7765
|
// src/components/WfoSearchBar/WfoSearchField.tsx
|
|
7734
|
-
import { useEffect as useEffect10, useRef as
|
|
7766
|
+
import { useEffect as useEffect10, useRef as useRef5, useState as useState14 } from "react";
|
|
7735
7767
|
import { useTranslations as useTranslations19 } from "next-intl";
|
|
7736
7768
|
import { EuiFieldSearch, EuiFormRow as EuiFormRow3 } from "@elastic/eui";
|
|
7737
7769
|
import { jsx as jsx120 } from "@emotion/react/jsx-runtime";
|
|
@@ -7739,7 +7771,7 @@ var WfoSearchField = ({ queryString, queryIsValid = true, onUpdateQueryString })
|
|
|
7739
7771
|
const t = useTranslations19("common");
|
|
7740
7772
|
const tError = useTranslations19("errors");
|
|
7741
7773
|
const { formFieldBaseStyle } = useWithOrchestratorTheme(getFormFieldsBaseStyle);
|
|
7742
|
-
const handleSearch =
|
|
7774
|
+
const handleSearch = useRef5((queryText) => onUpdateQueryString?.(queryText));
|
|
7743
7775
|
const [currentQuery, setCurrentQuery] = useState14(queryString ?? "");
|
|
7744
7776
|
useEffect10(() => {
|
|
7745
7777
|
setCurrentQuery(queryString ?? "");
|
|
@@ -8607,7 +8639,7 @@ var graphQlRelatedSubscriptionsTerminatedSubscriptionsFilterMapper = (data) => d
|
|
|
8607
8639
|
} : void 0;
|
|
8608
8640
|
|
|
8609
8641
|
// src/components/WfoTable/WfoTable/WfoTable.tsx
|
|
8610
|
-
import { useRef as
|
|
8642
|
+
import { useRef as useRef9, useState as useState18 } from "react";
|
|
8611
8643
|
import { useTranslations as useTranslations28 } from "next-intl";
|
|
8612
8644
|
import { EuiSpacer as EuiSpacer12, EuiTablePagination, useEuiScrollBar } from "@elastic/eui";
|
|
8613
8645
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -9082,15 +9114,15 @@ var WfoTableDataRows = ({
|
|
|
9082
9114
|
};
|
|
9083
9115
|
|
|
9084
9116
|
// src/components/WfoTable/WfoTable/WfoTableHeaderRow.tsx
|
|
9085
|
-
import { useRef as
|
|
9117
|
+
import { useRef as useRef8 } from "react";
|
|
9086
9118
|
|
|
9087
9119
|
// src/components/WfoTable/WfoTable/WfoDragHandler.tsx
|
|
9088
|
-
import { useRef as
|
|
9120
|
+
import { useRef as useRef6, useState as useState16 } from "react";
|
|
9089
9121
|
import Draggable from "react-draggable";
|
|
9090
9122
|
import { jsx as jsx135 } from "@emotion/react/jsx-runtime";
|
|
9091
9123
|
var MINIMUM_COLUMN_WIDTH = 50;
|
|
9092
9124
|
var WfoDragHandler = ({ headerRowRef, fieldName, onUpdateColumWidth }) => {
|
|
9093
|
-
const nodeRef =
|
|
9125
|
+
const nodeRef = useRef6(null);
|
|
9094
9126
|
const [position, setPosition] = useState16({ x: 0, y: 0 });
|
|
9095
9127
|
const [isDragging, setIsDragging] = useState16(false);
|
|
9096
9128
|
const { dragAndDropStyle } = useWithOrchestratorTheme(getWfoTableStyles);
|
|
@@ -9159,14 +9191,14 @@ import { useState as useState17 } from "react";
|
|
|
9159
9191
|
import { EuiHorizontalRule as EuiHorizontalRule3, EuiPopover as EuiPopover3, EuiText as EuiText10, useGeneratedHtmlId } from "@elastic/eui";
|
|
9160
9192
|
|
|
9161
9193
|
// src/components/WfoTable/WfoTable/WfoTableHeaderCell/WfoPopoverContent.tsx
|
|
9162
|
-
import { useRef as
|
|
9194
|
+
import { useRef as useRef7 } from "react";
|
|
9163
9195
|
import { useTranslations as useTranslations27 } from "next-intl";
|
|
9164
9196
|
import { EuiFieldSearch as EuiFieldSearch2, EuiForm, EuiFormRow as EuiFormRow4 } from "@elastic/eui";
|
|
9165
9197
|
import { jsx as jsx137 } from "@emotion/react/jsx-runtime";
|
|
9166
9198
|
var WfoPopoverContent = ({ onSearch, closePopover, fieldName }) => {
|
|
9167
9199
|
const { headerCellPopoverContentStyle } = useWithOrchestratorTheme(getWfoBasicTableStyles);
|
|
9168
9200
|
const t = useTranslations27("common");
|
|
9169
|
-
const inputRef =
|
|
9201
|
+
const inputRef = useRef7(null);
|
|
9170
9202
|
const handleSubmit = (e) => {
|
|
9171
9203
|
e.preventDefault();
|
|
9172
9204
|
const newValue = inputRef.current?.value || "";
|
|
@@ -9261,7 +9293,7 @@ var WfoTableHeaderRow = ({
|
|
|
9261
9293
|
}) => {
|
|
9262
9294
|
const { cellStyle, headerCellContainer, sortableHeaderCellStyle, rowStyle, setWidth } = useWithOrchestratorTheme(getWfoTableStyles);
|
|
9263
9295
|
const sortedVisibleColumns = getSortedVisibleColumns(columnConfig, columnOrder, hiddenColumns);
|
|
9264
|
-
const headerRowRef =
|
|
9296
|
+
const headerRowRef = useRef8(null);
|
|
9265
9297
|
return /* @__PURE__ */ jsx139("tr", { className, css: rowStyle, ref: headerRowRef, children: sortedVisibleColumns.map(([fieldName, columnConfig2], index) => {
|
|
9266
9298
|
const dataSortingConfiguration = dataSorting.find((dataSorting2) => dataSorting2.field === fieldName);
|
|
9267
9299
|
if (columnConfig2.columnType === "data" /* DATA */) {
|
|
@@ -9353,7 +9385,7 @@ var WfoTable = ({
|
|
|
9353
9385
|
);
|
|
9354
9386
|
const dataLength = data.length;
|
|
9355
9387
|
usePageIndexBoundsGuard({ dataLength, isLoading, pagination });
|
|
9356
|
-
const parentRef =
|
|
9388
|
+
const parentRef = useRef9(null);
|
|
9357
9389
|
const columnConfigWithFiller = appendFillerColumn ? {
|
|
9358
9390
|
...columnConfig,
|
|
9359
9391
|
filler: {
|
|
@@ -9494,7 +9526,7 @@ import { useTranslations as useTranslations30 } from "next-intl";
|
|
|
9494
9526
|
import { EuiButtonEmpty as EuiButtonEmpty4, EuiFlexGroup as EuiFlexGroup11, EuiSpacer as EuiSpacer13 } from "@elastic/eui";
|
|
9495
9527
|
|
|
9496
9528
|
// src/components/WfoTable/WfoTable/WfoGroupedTable/useGroupedTableConfig.tsx
|
|
9497
|
-
import { useEffect as useEffect13, useRef as
|
|
9529
|
+
import { useEffect as useEffect13, useRef as useRef10, useState as useState19 } from "react";
|
|
9498
9530
|
|
|
9499
9531
|
// src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandableRow.tsx
|
|
9500
9532
|
import { useTranslations as useTranslations29 } from "next-intl";
|
|
@@ -9667,7 +9699,7 @@ var useGroupedTableConfig = ({
|
|
|
9667
9699
|
nestingLevel = 0,
|
|
9668
9700
|
notifyParent
|
|
9669
9701
|
}) => {
|
|
9670
|
-
const groupReferences =
|
|
9702
|
+
const groupReferences = useRef10(/* @__PURE__ */ new Map());
|
|
9671
9703
|
const [expandedRowIds, setExpandedRowIds] = useState19([]);
|
|
9672
9704
|
const [isAllGroupsExpanded, setIsAllGroupsExpanded] = useState19(false);
|
|
9673
9705
|
const [isAllSubgroupsExpanded, setIsAllSubgroupsExpanded] = useState19([]);
|
|
@@ -9676,8 +9708,8 @@ var useGroupedTableConfig = ({
|
|
|
9676
9708
|
groupName: key.toString()
|
|
9677
9709
|
}));
|
|
9678
9710
|
const numberOfColumnsInnerTable = Object.keys(columnConfig).length;
|
|
9679
|
-
const notifyParentRef =
|
|
9680
|
-
const groupsRef =
|
|
9711
|
+
const notifyParentRef = useRef10(notifyParent);
|
|
9712
|
+
const groupsRef = useRef10(groups);
|
|
9681
9713
|
useEffect13(() => {
|
|
9682
9714
|
if (isExpanding) {
|
|
9683
9715
|
groupReferences.current.forEach((ref) => {
|
|
@@ -11742,12 +11774,12 @@ var WfoInlineJson = ({ data }) => {
|
|
|
11742
11774
|
};
|
|
11743
11775
|
|
|
11744
11776
|
// src/components/WfoTable/WfoRowContextMenu/WfoRowContextMenu.tsx
|
|
11745
|
-
import { useEffect as useEffect18, useRef as
|
|
11777
|
+
import { useEffect as useEffect18, useRef as useRef11, useState as useState29 } from "react";
|
|
11746
11778
|
import { EuiButtonIcon as EuiButtonIcon10, EuiContextMenu as EuiContextMenu2, EuiPopover as EuiPopover5 } from "@elastic/eui";
|
|
11747
11779
|
import { jsx as jsx176 } from "@emotion/react/jsx-runtime";
|
|
11748
11780
|
var WfoRowContextMenu = ({ items, onOpenContextMenu }) => {
|
|
11749
11781
|
const [isOpen, setIsOpen] = useState29(false);
|
|
11750
|
-
const onOpenContextMenuRef =
|
|
11782
|
+
const onOpenContextMenuRef = useRef11(onOpenContextMenu);
|
|
11751
11783
|
useEffect18(() => {
|
|
11752
11784
|
if (isOpen) {
|
|
11753
11785
|
onOpenContextMenuRef.current?.();
|
|
@@ -11926,12 +11958,12 @@ var WfoAdvancedTable = ({
|
|
|
11926
11958
|
};
|
|
11927
11959
|
|
|
11928
11960
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx
|
|
11929
|
-
import { useEffect as
|
|
11961
|
+
import { useEffect as useEffect25, useState as useState35 } from "react";
|
|
11930
11962
|
import { useTranslations as useTranslations49 } from "next-intl";
|
|
11931
11963
|
import { EuiButton as EuiButton11, EuiFlexGroup as EuiFlexGroup22, EuiFlexItem as EuiFlexItem23, EuiFormRow as EuiFormRow7, EuiSelect as EuiSelect3, EuiSpacer as EuiSpacer19, EuiText as EuiText18 } from "@elastic/eui";
|
|
11932
11964
|
|
|
11933
11965
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx
|
|
11934
|
-
import { useRef as
|
|
11966
|
+
import { useEffect as useEffect24, useMemo as useMemo4, useRef as useRef14, useState as useState34 } from "react";
|
|
11935
11967
|
import { QueryBuilder, generateID } from "react-querybuilder";
|
|
11936
11968
|
import "react-querybuilder/dist/query-builder.css";
|
|
11937
11969
|
import { useTranslations as useTranslations47 } from "next-intl";
|
|
@@ -12148,7 +12180,7 @@ var WfoCombinatorSelector = (props) => {
|
|
|
12148
12180
|
};
|
|
12149
12181
|
|
|
12150
12182
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoFieldSelector.tsx
|
|
12151
|
-
import { useEffect as useEffect20, useRef as
|
|
12183
|
+
import { useEffect as useEffect20, useRef as useRef12, useState as useState31 } from "react";
|
|
12152
12184
|
import { useTranslations as useTranslations41 } from "next-intl";
|
|
12153
12185
|
import { EuiComboBox } from "@elastic/eui";
|
|
12154
12186
|
import { jsx as jsx180 } from "@emotion/react/jsx-runtime";
|
|
@@ -12171,8 +12203,8 @@ var WfoFieldSelector = ({ handleOnChange, disabled, rule, context }) => {
|
|
|
12171
12203
|
const prefilledFieldOptions2 = context.prefilledFieldOptions;
|
|
12172
12204
|
const [selectedValue, setSelectedValue] = useState31(field);
|
|
12173
12205
|
const [searchInput, setSearchInput] = useState31(null);
|
|
12174
|
-
const optionsRef =
|
|
12175
|
-
const handleFieldSelectionRef =
|
|
12206
|
+
const optionsRef = useRef12([]);
|
|
12207
|
+
const handleFieldSelectionRef = useRef12(() => {
|
|
12176
12208
|
});
|
|
12177
12209
|
const t = useTranslations41("search.page");
|
|
12178
12210
|
const getOption = (path) => ({
|
|
@@ -12276,7 +12308,7 @@ var WfoInlineCombinator = (props) => {
|
|
|
12276
12308
|
};
|
|
12277
12309
|
|
|
12278
12310
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.tsx
|
|
12279
|
-
import { useEffect as useEffect21, useMemo as useMemo3, useRef as
|
|
12311
|
+
import { useEffect as useEffect21, useMemo as useMemo3, useRef as useRef13 } from "react";
|
|
12280
12312
|
import { defaultOperators } from "react-querybuilder";
|
|
12281
12313
|
import { EuiSelect as EuiSelect2 } from "@elastic/eui";
|
|
12282
12314
|
import { jsx as jsx182 } from "@emotion/react/jsx-runtime";
|
|
@@ -12285,26 +12317,36 @@ var FALLBACK_OPERATOR_LABELS = {
|
|
|
12285
12317
|
notNull: "\u2713 has component",
|
|
12286
12318
|
null: "\u2717 does not have component"
|
|
12287
12319
|
};
|
|
12320
|
+
var getDefaultOperator = (options) => (options.find((option) => option.arity !== "unary") ?? options[0]).name;
|
|
12288
12321
|
var WfoOperatorSelector = (props) => {
|
|
12289
12322
|
const { value, handleOnChange } = props;
|
|
12290
|
-
const flatOptions =
|
|
12291
|
-
(
|
|
12323
|
+
const flatOptions = useMemo3(
|
|
12324
|
+
() => props.options.flatMap(
|
|
12325
|
+
(option) => isOptionGroup(option) ? option.options : [option]
|
|
12326
|
+
),
|
|
12327
|
+
[props.options]
|
|
12292
12328
|
);
|
|
12293
12329
|
const selectOptions = useMemo3(
|
|
12294
12330
|
() => flatOptions.map((option) => ({ value: option.name, text: option.label })),
|
|
12295
12331
|
[flatOptions]
|
|
12296
12332
|
);
|
|
12297
12333
|
const optionsKey = selectOptions.map((option) => option.value).join("|");
|
|
12298
|
-
const previousOptionsKeyRef =
|
|
12334
|
+
const previousOptionsKeyRef = useRef13(optionsKey);
|
|
12299
12335
|
useEffect21(() => {
|
|
12300
12336
|
const optionsChanged = previousOptionsKeyRef.current !== optionsKey;
|
|
12301
12337
|
previousOptionsKeyRef.current = optionsKey;
|
|
12302
|
-
if (!optionsChanged
|
|
12338
|
+
if (!optionsChanged) return;
|
|
12339
|
+
if (flatOptions.length === 0) {
|
|
12340
|
+
if (value === "null" || value === "notNull") {
|
|
12341
|
+
handleOnChange("=");
|
|
12342
|
+
}
|
|
12343
|
+
return;
|
|
12344
|
+
}
|
|
12303
12345
|
const currentValueIsValid = selectOptions.some((option) => option.value === value);
|
|
12304
12346
|
if (!currentValueIsValid) {
|
|
12305
|
-
handleOnChange(
|
|
12347
|
+
handleOnChange(getDefaultOperator(flatOptions));
|
|
12306
12348
|
}
|
|
12307
|
-
}, [optionsKey, selectOptions, value, handleOnChange]);
|
|
12349
|
+
}, [optionsKey, flatOptions, selectOptions, value, handleOnChange]);
|
|
12308
12350
|
const currentValueIsListed = !value || selectOptions.some((option) => option.value === value);
|
|
12309
12351
|
const displayOptions = currentValueIsListed ? selectOptions : [
|
|
12310
12352
|
...selectOptions,
|
|
@@ -12488,10 +12530,16 @@ var WfoRangeEditor = ({ handleOnChange, InputElement, value: currentValue }) =>
|
|
|
12488
12530
|
|
|
12489
12531
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.tsx
|
|
12490
12532
|
import { jsx as jsx190 } from "@emotion/react/jsx-runtime";
|
|
12491
|
-
var BooleanEditor = ({
|
|
12492
|
-
|
|
12533
|
+
var BooleanEditor = ({
|
|
12534
|
+
handleOnChange,
|
|
12535
|
+
value: currentValue
|
|
12536
|
+
}) => {
|
|
12537
|
+
const initialValue = typeof currentValue === "boolean" ? currentValue : true;
|
|
12538
|
+
const [value, setValue] = useState33(initialValue.toString());
|
|
12493
12539
|
useEffect23(() => {
|
|
12494
|
-
|
|
12540
|
+
if (currentValue === void 0 || currentValue === "") {
|
|
12541
|
+
handleOnChange(initialValue);
|
|
12542
|
+
}
|
|
12495
12543
|
}, []);
|
|
12496
12544
|
const { buttonGroupStyles } = useWithOrchestratorTheme(getWfoStructuredSearchTableStyles);
|
|
12497
12545
|
const options = [
|
|
@@ -12617,6 +12665,61 @@ var WfoValueEditor = ({
|
|
|
12617
12665
|
return /* @__PURE__ */ jsx190("div", { className, style: { display: "contents" }, onKeyDown: handleWrapperKeyDown, children: getEditor() });
|
|
12618
12666
|
};
|
|
12619
12667
|
|
|
12668
|
+
// src/components/WfoTable/WfoStructuredSearchTable/utils.ts
|
|
12669
|
+
import { prepareRuleGroup } from "react-querybuilder";
|
|
12670
|
+
import { parseCEL } from "react-querybuilder/parseCEL";
|
|
12671
|
+
var collectRuleFields = (ruleGroup) => {
|
|
12672
|
+
const fields = ruleGroup.rules.flatMap((rule) => {
|
|
12673
|
+
if (typeof rule === "string") {
|
|
12674
|
+
return [];
|
|
12675
|
+
}
|
|
12676
|
+
if ("rules" in rule) {
|
|
12677
|
+
return collectRuleFields(rule);
|
|
12678
|
+
}
|
|
12679
|
+
return [rule.field];
|
|
12680
|
+
});
|
|
12681
|
+
return [...new Set(fields)];
|
|
12682
|
+
};
|
|
12683
|
+
var dropFieldValueSources = (ruleGroup) => ({
|
|
12684
|
+
...ruleGroup,
|
|
12685
|
+
rules: ruleGroup.rules.map((rule) => {
|
|
12686
|
+
if (typeof rule === "string" || "rules" in rule) {
|
|
12687
|
+
return typeof rule === "string" ? rule : dropFieldValueSources(rule);
|
|
12688
|
+
}
|
|
12689
|
+
if (rule.valueSource === "field") {
|
|
12690
|
+
const ruleWithoutValueSource = { ...rule };
|
|
12691
|
+
delete ruleWithoutValueSource.valueSource;
|
|
12692
|
+
return ruleWithoutValueSource;
|
|
12693
|
+
}
|
|
12694
|
+
return rule;
|
|
12695
|
+
})
|
|
12696
|
+
});
|
|
12697
|
+
var parseCelToRuleGroup = (celString) => {
|
|
12698
|
+
if (!celString) {
|
|
12699
|
+
return void 0;
|
|
12700
|
+
}
|
|
12701
|
+
try {
|
|
12702
|
+
const ruleGroup = parseCEL(celString);
|
|
12703
|
+
return ruleGroup?.rules?.length > 0 ? prepareRuleGroup(dropFieldValueSources(ruleGroup)) : void 0;
|
|
12704
|
+
} catch {
|
|
12705
|
+
return void 0;
|
|
12706
|
+
}
|
|
12707
|
+
};
|
|
12708
|
+
var buildColumnFilter = (field, searchText, currentFilter, getColumnSearchFieldName) => {
|
|
12709
|
+
if (!searchText || searchText.includes('"')) {
|
|
12710
|
+
return void 0;
|
|
12711
|
+
}
|
|
12712
|
+
const searchFieldName = getColumnSearchFieldName?.(field) ?? String(field);
|
|
12713
|
+
const columnFilterCondition = `${searchFieldName} == "${searchText}"`;
|
|
12714
|
+
const trimmedCurrentFilter = currentFilter?.trim();
|
|
12715
|
+
const filterString = trimmedCurrentFilter ? `(${trimmedCurrentFilter}) && ${columnFilterCondition}` : columnFilterCondition;
|
|
12716
|
+
const ruleGroup = parseCelToRuleGroup(filterString);
|
|
12717
|
+
if (!ruleGroup) {
|
|
12718
|
+
return void 0;
|
|
12719
|
+
}
|
|
12720
|
+
return { filterString, ruleGroup };
|
|
12721
|
+
};
|
|
12722
|
+
|
|
12620
12723
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx
|
|
12621
12724
|
import { jsx as jsx191, jsxs as jsxs96 } from "@emotion/react/jsx-runtime";
|
|
12622
12725
|
var SEARCH_OPERATOR_TO_RQB_OPERATOR_MAP = {
|
|
@@ -12679,7 +12782,7 @@ var WfoFilterBuilder = ({
|
|
|
12679
12782
|
const { queryBuilderContainerStyles } = useWithOrchestratorTheme(getWfoStructuredSearchTableStyles);
|
|
12680
12783
|
const [fieldToOperatorMap, setFieldToOperatorMap] = useState34(prefilledFieldOptions2);
|
|
12681
12784
|
const [fieldPathInfoMap, setFieldPathInfoMap] = useState34(/* @__PURE__ */ new Map());
|
|
12682
|
-
const latestRuleGroupRef =
|
|
12785
|
+
const latestRuleGroupRef = useRef14(queryBuilderRuleGroup);
|
|
12683
12786
|
latestRuleGroupRef.current = queryBuilderRuleGroup;
|
|
12684
12787
|
const handleValueEditorEnter = () => {
|
|
12685
12788
|
handleSearch({ ruleGroup: latestRuleGroupRef.current });
|
|
@@ -12694,6 +12797,20 @@ var WfoFilterBuilder = ({
|
|
|
12694
12797
|
});
|
|
12695
12798
|
}
|
|
12696
12799
|
};
|
|
12800
|
+
const unresolvedFields = useMemo4(
|
|
12801
|
+
() => collectRuleFields(queryBuilderRuleGroup).filter(
|
|
12802
|
+
(field) => field && field !== "~" && !fieldPathInfoMap.has(field)
|
|
12803
|
+
),
|
|
12804
|
+
[queryBuilderRuleGroup, fieldPathInfoMap]
|
|
12805
|
+
);
|
|
12806
|
+
const resolvedFieldsPathInfo = useFieldsPathInfo(unresolvedFields, "SUBSCRIPTION" /* SUBSCRIPTION */);
|
|
12807
|
+
useEffect24(() => {
|
|
12808
|
+
resolvedFieldsPathInfo.forEach((pathInfo, field) => {
|
|
12809
|
+
if (pathInfo && !fieldPathInfoMap.has(field)) {
|
|
12810
|
+
handleFieldSelected(field, pathInfo.operators, pathInfo);
|
|
12811
|
+
}
|
|
12812
|
+
});
|
|
12813
|
+
}, [fieldPathInfoMap, resolvedFieldsPathInfo]);
|
|
12697
12814
|
return /* @__PURE__ */ jsx191(EuiFlexGroup21, { css: queryBuilderContainerStyles, children: /* @__PURE__ */ jsxs96(EuiFlexGroup21, { direction: "column", children: [
|
|
12698
12815
|
/* @__PURE__ */ jsx191(EuiFlexItem21, { children: /* @__PURE__ */ jsx191(
|
|
12699
12816
|
QueryBuilder,
|
|
@@ -12725,7 +12842,12 @@ var WfoFilterBuilder = ({
|
|
|
12725
12842
|
addRuleAction: null,
|
|
12726
12843
|
addGroupAction: null,
|
|
12727
12844
|
removeGroupAction: null,
|
|
12728
|
-
removeRuleAction: WfoRemoveRuleAction
|
|
12845
|
+
removeRuleAction: WfoRemoveRuleAction,
|
|
12846
|
+
// Field-to-field comparisons are not supported, but a rule can briefly hold
|
|
12847
|
+
// valueSource 'field' while a CEL literal is being typed in the textarea
|
|
12848
|
+
// ('lldp == fals' parses 'fals' as an identifier) — without this override
|
|
12849
|
+
// react-querybuilder's default value source selector flashes into the rule.
|
|
12850
|
+
valueSourceSelector: null
|
|
12729
12851
|
},
|
|
12730
12852
|
addRuleToNewGroups: true,
|
|
12731
12853
|
onAddGroup: onAddGroupHandler,
|
|
@@ -12822,34 +12944,6 @@ var WfoSearchFieldWithActions = ({
|
|
|
12822
12944
|
] });
|
|
12823
12945
|
};
|
|
12824
12946
|
|
|
12825
|
-
// src/components/WfoTable/WfoStructuredSearchTable/utils.ts
|
|
12826
|
-
import { parseCEL } from "react-querybuilder/parseCEL";
|
|
12827
|
-
var parseCelToRuleGroup = (celString) => {
|
|
12828
|
-
if (!celString) {
|
|
12829
|
-
return void 0;
|
|
12830
|
-
}
|
|
12831
|
-
try {
|
|
12832
|
-
const ruleGroup = parseCEL(celString);
|
|
12833
|
-
return ruleGroup?.rules?.length > 0 ? ruleGroup : void 0;
|
|
12834
|
-
} catch {
|
|
12835
|
-
return void 0;
|
|
12836
|
-
}
|
|
12837
|
-
};
|
|
12838
|
-
var buildColumnFilter = (field, searchText, currentFilter, getColumnSearchFieldName) => {
|
|
12839
|
-
if (!searchText || searchText.includes('"')) {
|
|
12840
|
-
return void 0;
|
|
12841
|
-
}
|
|
12842
|
-
const searchFieldName = getColumnSearchFieldName?.(field) ?? String(field);
|
|
12843
|
-
const columnFilterCondition = `${searchFieldName} == "${searchText}"`;
|
|
12844
|
-
const trimmedCurrentFilter = currentFilter?.trim();
|
|
12845
|
-
const filterString = trimmedCurrentFilter ? `(${trimmedCurrentFilter}) && ${columnFilterCondition}` : columnFilterCondition;
|
|
12846
|
-
const ruleGroup = parseCelToRuleGroup(filterString);
|
|
12847
|
-
if (!ruleGroup) {
|
|
12848
|
-
return void 0;
|
|
12849
|
-
}
|
|
12850
|
-
return { filterString, ruleGroup };
|
|
12851
|
-
};
|
|
12852
|
-
|
|
12853
12947
|
// src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx
|
|
12854
12948
|
import { Fragment as Fragment38, jsx as jsx193, jsxs as jsxs98 } from "@emotion/react/jsx-runtime";
|
|
12855
12949
|
var WfoStructuredSearchTable = ({
|
|
@@ -12892,12 +12986,12 @@ var WfoStructuredSearchTable = ({
|
|
|
12892
12986
|
const [rowDetailModalData, setRowDetailModalData] = useState35(void 0);
|
|
12893
12987
|
const [showInformationModal, setShowInformationModal] = useState35(false);
|
|
12894
12988
|
const t = useTranslations49("common");
|
|
12895
|
-
|
|
12989
|
+
useEffect25(() => {
|
|
12896
12990
|
if (defaultHiddenColumns) {
|
|
12897
12991
|
setHiddenColumns(defaultHiddenColumns);
|
|
12898
12992
|
}
|
|
12899
12993
|
}, [defaultHiddenColumns]);
|
|
12900
|
-
|
|
12994
|
+
useEffect25(() => {
|
|
12901
12995
|
if (filterString) {
|
|
12902
12996
|
setIsFilterBuilderVisible(true);
|
|
12903
12997
|
}
|
|
@@ -13043,7 +13137,7 @@ var WfoStructuredSearchTable = ({
|
|
|
13043
13137
|
};
|
|
13044
13138
|
|
|
13045
13139
|
// src/components/WfoSearchPage/WfoSearchResults/WfoHighlightedText.tsx
|
|
13046
|
-
import { useMemo as
|
|
13140
|
+
import { useMemo as useMemo5 } from "react";
|
|
13047
13141
|
import { css as css32 } from "@emotion/react";
|
|
13048
13142
|
import { Fragment as Fragment39, jsx as jsx194 } from "@emotion/react/jsx-runtime";
|
|
13049
13143
|
var WfoHighlightedText = ({ text, highlight_indices }) => {
|
|
@@ -13056,7 +13150,7 @@ var WfoHighlightedText = ({ text, highlight_indices }) => {
|
|
|
13056
13150
|
font-weight: ${theme.font.weight.bold};
|
|
13057
13151
|
border-radius: ${theme.size.xs};
|
|
13058
13152
|
`;
|
|
13059
|
-
const highlightedParts =
|
|
13153
|
+
const highlightedParts = useMemo5(() => {
|
|
13060
13154
|
if (!highlight_indices || highlight_indices.length === 0) {
|
|
13061
13155
|
return text;
|
|
13062
13156
|
}
|
|
@@ -13448,7 +13542,7 @@ import Link14 from "next/link";
|
|
|
13448
13542
|
import { useRouter as useRouter17 } from "next/router";
|
|
13449
13543
|
|
|
13450
13544
|
// src/pages/metadata/WfoProductBlocksPage.tsx
|
|
13451
|
-
import { useEffect as
|
|
13545
|
+
import { useEffect as useEffect26, useState as useState37 } from "react";
|
|
13452
13546
|
import { useTranslations as useTranslations52 } from "next-intl";
|
|
13453
13547
|
import { EuiBadgeGroup as EuiBadgeGroup2 } from "@elastic/eui";
|
|
13454
13548
|
|
|
@@ -13519,7 +13613,7 @@ var WfoProductBlocksPage = () => {
|
|
|
13519
13613
|
METADATA_PRODUCT_BLOCKS_TABLE_LOCAL_STORAGE_KEY
|
|
13520
13614
|
);
|
|
13521
13615
|
const [updateProductBlock] = useUpdateProductBlockMutation();
|
|
13522
|
-
|
|
13616
|
+
useEffect26(() => {
|
|
13523
13617
|
const storedConfig = getStoredTableConfig();
|
|
13524
13618
|
if (storedConfig) {
|
|
13525
13619
|
setTableDefaults(storedConfig);
|
|
@@ -13704,7 +13798,7 @@ var WfoProductBlocksPage = () => {
|
|
|
13704
13798
|
};
|
|
13705
13799
|
|
|
13706
13800
|
// src/pages/metadata/WfoResourceTypesPage.tsx
|
|
13707
|
-
import { useEffect as
|
|
13801
|
+
import { useEffect as useEffect27, useState as useState38 } from "react";
|
|
13708
13802
|
import { useTranslations as useTranslations53 } from "next-intl";
|
|
13709
13803
|
import { EuiBadgeGroup as EuiBadgeGroup3 } from "@elastic/eui";
|
|
13710
13804
|
import { Fragment as Fragment44, jsx as jsx208, jsxs as jsxs102 } from "@emotion/react/jsx-runtime";
|
|
@@ -13718,7 +13812,7 @@ var WfoResourceTypesPage = () => {
|
|
|
13718
13812
|
METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY
|
|
13719
13813
|
);
|
|
13720
13814
|
const [updateResourceType] = useUpdateResourceTypeMutation();
|
|
13721
|
-
|
|
13815
|
+
useEffect27(() => {
|
|
13722
13816
|
const storedConfig = getStoredTableConfig();
|
|
13723
13817
|
if (storedConfig) {
|
|
13724
13818
|
setTableDefaults(storedConfig);
|
|
@@ -13854,7 +13948,7 @@ var WfoResourceTypesPage = () => {
|
|
|
13854
13948
|
};
|
|
13855
13949
|
|
|
13856
13950
|
// src/pages/metadata/WfoProductsPage.tsx
|
|
13857
|
-
import { useEffect as
|
|
13951
|
+
import { useEffect as useEffect28, useState as useState40 } from "react";
|
|
13858
13952
|
import { useTranslations as useTranslations54 } from "next-intl";
|
|
13859
13953
|
|
|
13860
13954
|
// src/components/WfoMetadata/WfoMetadataStatusField.tsx
|
|
@@ -13930,7 +14024,7 @@ var WfoProductsPage = () => {
|
|
|
13930
14024
|
const getStoredTableConfig = useStoredTableConfig(METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY);
|
|
13931
14025
|
const [updateProductDescription] = useUpdateProductDescriptionMutation();
|
|
13932
14026
|
const [updateProductStatus] = useUpdateProductStatusMutation();
|
|
13933
|
-
|
|
14027
|
+
useEffect28(() => {
|
|
13934
14028
|
const storedConfig = getStoredTableConfig();
|
|
13935
14029
|
if (storedConfig) {
|
|
13936
14030
|
setTableDefaults(storedConfig);
|
|
@@ -14108,7 +14202,7 @@ var WfoProductsPage = () => {
|
|
|
14108
14202
|
};
|
|
14109
14203
|
|
|
14110
14204
|
// src/pages/metadata/WfoWorkflowsPage.tsx
|
|
14111
|
-
import { useEffect as
|
|
14205
|
+
import { useEffect as useEffect29, useState as useState41 } from "react";
|
|
14112
14206
|
import { useTranslations as useTranslations55 } from "next-intl";
|
|
14113
14207
|
import { EuiBadgeGroup as EuiBadgeGroup4 } from "@elastic/eui";
|
|
14114
14208
|
|
|
@@ -14147,7 +14241,7 @@ var WfoWorkflowsPage = () => {
|
|
|
14147
14241
|
const [tableDefaults, setTableDefaults] = useState41();
|
|
14148
14242
|
const getStoredTableConfig = useStoredTableConfig(METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY);
|
|
14149
14243
|
const [updateWorkflow] = useUpdateWorkflowMutation();
|
|
14150
|
-
|
|
14244
|
+
useEffect29(() => {
|
|
14151
14245
|
const storedConfig = getStoredTableConfig();
|
|
14152
14246
|
if (storedConfig) {
|
|
14153
14247
|
setTableDefaults(storedConfig);
|
|
@@ -14302,7 +14396,7 @@ var WfoWorkflowsPage = () => {
|
|
|
14302
14396
|
};
|
|
14303
14397
|
|
|
14304
14398
|
// src/pages/metadata/WfoTasksPage.tsx
|
|
14305
|
-
import { useEffect as
|
|
14399
|
+
import { useEffect as useEffect30, useState as useState42 } from "react";
|
|
14306
14400
|
import { useTranslations as useTranslations56 } from "next-intl";
|
|
14307
14401
|
import { useRouter as useRouter8 } from "next/router";
|
|
14308
14402
|
import { EuiBadgeGroup as EuiBadgeGroup5, EuiButtonIcon as EuiButtonIcon13, EuiContextMenuItem as EuiContextMenuItem3 } from "@elastic/eui";
|
|
@@ -14386,7 +14480,7 @@ var WfoTasksPage = () => {
|
|
|
14386
14480
|
const [tableDefaults, setTableDefaults] = useState42();
|
|
14387
14481
|
const getStoredTableConfig = useStoredTableConfig(METADATA_TASKS_TABLE_LOCAL_STORAGE_KEY);
|
|
14388
14482
|
const [updateWorkflow] = useUpdateWorkflowMutation();
|
|
14389
|
-
|
|
14483
|
+
useEffect30(() => {
|
|
14390
14484
|
const storedConfig = getStoredTableConfig();
|
|
14391
14485
|
if (storedConfig) {
|
|
14392
14486
|
setTableDefaults(storedConfig);
|
|
@@ -14555,7 +14649,7 @@ var WfoTasksPage = () => {
|
|
|
14555
14649
|
};
|
|
14556
14650
|
|
|
14557
14651
|
// src/pages/metadata/WfoScheduledTasksPage.tsx
|
|
14558
|
-
import { useEffect as
|
|
14652
|
+
import { useEffect as useEffect31, useState as useState43 } from "react";
|
|
14559
14653
|
import { useTranslations as useTranslations57 } from "next-intl";
|
|
14560
14654
|
import { useRouter as useRouter9 } from "next/router";
|
|
14561
14655
|
import { EuiButton as EuiButton12, EuiFlexGroup as EuiFlexGroup23, EuiFlexItem as EuiFlexItem24 } from "@elastic/eui";
|
|
@@ -14577,7 +14671,7 @@ var WfoScheduledTasksPage = () => {
|
|
|
14577
14671
|
showToastMessage("ERROR" /* ERROR */, "", tError("failedDeletingScheduledTask"));
|
|
14578
14672
|
console.error("Failed to delete scheduled task.", mutationState.error);
|
|
14579
14673
|
}
|
|
14580
|
-
|
|
14674
|
+
useEffect31(() => {
|
|
14581
14675
|
const storedConfig = getStoredTableConfig();
|
|
14582
14676
|
if (storedConfig) {
|
|
14583
14677
|
setTableDefaults(storedConfig);
|
|
@@ -14708,13 +14802,13 @@ var WfoScheduledTasksPage = () => {
|
|
|
14708
14802
|
};
|
|
14709
14803
|
|
|
14710
14804
|
// src/pages/metadata/WfoScheduleTaskFormPage.tsx
|
|
14711
|
-
import { useCallback as useCallback8, useMemo as
|
|
14805
|
+
import { useCallback as useCallback8, useMemo as useMemo6 } from "react";
|
|
14712
14806
|
import _5 from "lodash";
|
|
14713
14807
|
import { useRouter as useRouter10 } from "next/router";
|
|
14714
14808
|
import { PydanticForm as PydanticForm2 } from "pydantic-forms";
|
|
14715
14809
|
|
|
14716
14810
|
// src/components/WfoPydanticForm/Footer.tsx
|
|
14717
|
-
import { useCallback as useCallback7, useContext as useContext8, useEffect as
|
|
14811
|
+
import { useCallback as useCallback7, useContext as useContext8, useEffect as useEffect32 } from "react";
|
|
14718
14812
|
import { useTranslations as useTranslations59 } from "next-intl";
|
|
14719
14813
|
import { EuiButton as EuiButton13, EuiFlexGroup as EuiFlexGroup24, EuiHorizontalRule as EuiHorizontalRule5 } from "@elastic/eui";
|
|
14720
14814
|
|
|
@@ -14758,7 +14852,7 @@ var Footer = ({ onCancel, onPrevious, hasNext, hasPrevious, isTask = false, butt
|
|
|
14758
14852
|
}
|
|
14759
14853
|
}, [onCancel, showConfirmDialog, t]);
|
|
14760
14854
|
const { next, previous } = buttons || {};
|
|
14761
|
-
|
|
14855
|
+
useEffect32(() => {
|
|
14762
14856
|
const handleKeyDown = (event) => {
|
|
14763
14857
|
const isPrimary = event.metaKey || event.ctrlKey;
|
|
14764
14858
|
if (isPrimary && event.key === "ArrowLeft") {
|
|
@@ -14862,7 +14956,7 @@ import { jsx as jsx217 } from "@emotion/react/jsx-runtime";
|
|
|
14862
14956
|
var START_SCHEDULE_PAYLOAD = {};
|
|
14863
14957
|
var WfoScheduleTaskFormPage = () => {
|
|
14864
14958
|
const { showToastMessage } = useShowToastMessage();
|
|
14865
|
-
const generateFormId =
|
|
14959
|
+
const generateFormId = useMemo6(() => {
|
|
14866
14960
|
return `${JSON.stringify(START_SCHEDULE_PAYLOAD)}`;
|
|
14867
14961
|
}, []);
|
|
14868
14962
|
const [startForm] = useStartFormMutation();
|
|
@@ -15004,10 +15098,10 @@ var WfoProcessListSubscriptionsCell = ({
|
|
|
15004
15098
|
};
|
|
15005
15099
|
|
|
15006
15100
|
// src/pages/processes/WfoProcessDetailPage.tsx
|
|
15007
|
-
import { useRef as
|
|
15101
|
+
import { useRef as useRef16 } from "react";
|
|
15008
15102
|
|
|
15009
15103
|
// src/pages/processes/WfoProcessDetail.tsx
|
|
15010
|
-
import { useContext as useContext9, useEffect as
|
|
15104
|
+
import { useContext as useContext9, useEffect as useEffect33, useRef as useRef15 } from "react";
|
|
15011
15105
|
import { useTranslations as useTranslations61 } from "next-intl";
|
|
15012
15106
|
import { useRouter as useRouter11 } from "next/router";
|
|
15013
15107
|
import { EuiButton as EuiButton14, EuiFlexGroup as EuiFlexGroup26, EuiPanel as EuiPanel3, EuiSpacer as EuiSpacer21, EuiText as EuiText19 } from "@elastic/eui";
|
|
@@ -15110,8 +15204,8 @@ var ProcessHeaderValue = ({ translationKey, value = "" }) => {
|
|
|
15110
15204
|
);
|
|
15111
15205
|
};
|
|
15112
15206
|
function useHasPreviousRoute() {
|
|
15113
|
-
const hasPrev =
|
|
15114
|
-
|
|
15207
|
+
const hasPrev = useRef15(false);
|
|
15208
|
+
useEffect33(() => {
|
|
15115
15209
|
if (document.referrer && document.referrer !== window.location.href) {
|
|
15116
15210
|
hasPrev.current = true;
|
|
15117
15211
|
}
|
|
@@ -15310,7 +15404,7 @@ var WfoProcessDetail = ({
|
|
|
15310
15404
|
// src/pages/processes/WfoProcessDetailPage.tsx
|
|
15311
15405
|
import { jsx as jsx220 } from "@emotion/react/jsx-runtime";
|
|
15312
15406
|
var WfoProcessDetailPage = ({ processId }) => {
|
|
15313
|
-
const stepListRef =
|
|
15407
|
+
const stepListRef = useRef16(null);
|
|
15314
15408
|
const { data, isLoading, isError } = useGetProcessDetailQuery({
|
|
15315
15409
|
processId
|
|
15316
15410
|
});
|
|
@@ -15360,20 +15454,20 @@ var WfoProcessDetailPage = ({ processId }) => {
|
|
|
15360
15454
|
};
|
|
15361
15455
|
|
|
15362
15456
|
// src/pages/processes/WfoStartProcessPage.tsx
|
|
15363
|
-
import { useMemo as
|
|
15457
|
+
import { useMemo as useMemo10, useState as useState49 } from "react";
|
|
15364
15458
|
import { useTranslations as useTranslations70 } from "next-intl";
|
|
15365
15459
|
import { useRouter as useRouter13 } from "next/router";
|
|
15366
15460
|
import { EuiFlexGroup as EuiFlexGroup30, EuiFlexItem as EuiFlexItem29, EuiHorizontalRule as EuiHorizontalRule7, EuiPanel as EuiPanel5, EuiText as EuiText25 } from "@elastic/eui";
|
|
15367
15461
|
|
|
15368
15462
|
// src/components/WfoPydanticForm/WfoPydanticForm.tsx
|
|
15369
|
-
import { useCallback as useCallback9, useMemo as
|
|
15463
|
+
import { useCallback as useCallback9, useMemo as useMemo7 } from "react";
|
|
15370
15464
|
import _6 from "lodash";
|
|
15371
15465
|
import { useTranslations as useTranslations62 } from "next-intl";
|
|
15372
15466
|
import { useRouter as useRouter12 } from "next/router";
|
|
15373
15467
|
import { PydanticForm as PydanticForm3 } from "pydantic-forms";
|
|
15374
15468
|
import { jsx as jsx221 } from "@emotion/react/jsx-runtime";
|
|
15375
15469
|
var WfoPydanticForm = ({ processName, startProcessPayload, isTask }) => {
|
|
15376
|
-
const generateFormId =
|
|
15470
|
+
const generateFormId = useMemo7(() => {
|
|
15377
15471
|
return `${JSON.stringify(startProcessPayload)}`;
|
|
15378
15472
|
}, [startProcessPayload]);
|
|
15379
15473
|
const [startProcess] = useStartProcessMutation();
|
|
@@ -15714,7 +15808,7 @@ var WfoCodeViewSelector = ({ codeView, handleCodeViewChange }) => {
|
|
|
15714
15808
|
};
|
|
15715
15809
|
|
|
15716
15810
|
// src/components/WfoWorkflowSteps/WfoStep/WfoStepForm.tsx
|
|
15717
|
-
import { useCallback as useCallback11, useMemo as
|
|
15811
|
+
import { useCallback as useCallback11, useMemo as useMemo8 } from "react";
|
|
15718
15812
|
import { PydanticForm as PydanticForm4 } from "pydantic-forms";
|
|
15719
15813
|
import { EuiFlexItem as EuiFlexItem26 } from "@elastic/eui";
|
|
15720
15814
|
|
|
@@ -15755,7 +15849,7 @@ import { jsx as jsx225 } from "@emotion/react/jsx-runtime";
|
|
|
15755
15849
|
var WfoStepForm = ({ userInputForm, isTask, processId, userPermissions }) => {
|
|
15756
15850
|
const { theme } = useOrchestratorTheme();
|
|
15757
15851
|
const [resumeProcess] = useResumeProcessMutation();
|
|
15758
|
-
const getInitialStepInput =
|
|
15852
|
+
const getInitialStepInput = useMemo8(() => userInputForm, [userInputForm]);
|
|
15759
15853
|
const getStepFormProvider = useCallback11(
|
|
15760
15854
|
() => async ({ requestBody = [] }) => {
|
|
15761
15855
|
if (requestBody.length === 0) {
|
|
@@ -15904,7 +15998,7 @@ var WfoStep = React72.forwardRef(
|
|
|
15904
15998
|
WfoStep.displayName = "WfoStep";
|
|
15905
15999
|
|
|
15906
16000
|
// src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx
|
|
15907
|
-
import React73, { useImperativeHandle as useImperativeHandle2, useRef as
|
|
16001
|
+
import React73, { useImperativeHandle as useImperativeHandle2, useRef as useRef17 } from "react";
|
|
15908
16002
|
import { Fragment as Fragment52, jsx as jsx227, jsxs as jsxs114 } from "@emotion/react/jsx-runtime";
|
|
15909
16003
|
var WfoStepList = React73.forwardRef(
|
|
15910
16004
|
({
|
|
@@ -15921,7 +16015,7 @@ var WfoStepList = React73.forwardRef(
|
|
|
15921
16015
|
const { TIMELINE_HEIGHT, TIMELINE_OUTLINE_WIDTH } = useWithOrchestratorTheme(getTimelineStyles);
|
|
15922
16016
|
const { SPACE_BETWEEN_STEPS, stepSpacerStyle } = useWithOrchestratorTheme(getWorkflowStepsStyles);
|
|
15923
16017
|
const scrollOffset = NAVIGATION_HEIGHT + TIMELINE_HEIGHT + TIMELINE_OUTLINE_WIDTH + SPACE_BETWEEN_STEPS;
|
|
15924
|
-
const stepReferences =
|
|
16018
|
+
const stepReferences = useRef17(/* @__PURE__ */ new Map());
|
|
15925
16019
|
const { contentRef } = useContentRef();
|
|
15926
16020
|
useImperativeHandle2(reference, () => ({
|
|
15927
16021
|
scrollToStep: async (stepId) => {
|
|
@@ -15977,11 +16071,11 @@ var WfoStepList = React73.forwardRef(
|
|
|
15977
16071
|
WfoStepList.displayName = "WfoStepList";
|
|
15978
16072
|
|
|
15979
16073
|
// src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx
|
|
15980
|
-
import React75, { useEffect as
|
|
16074
|
+
import React75, { useEffect as useEffect35, useState as useState47 } from "react";
|
|
15981
16075
|
import { useTranslations as useTranslations68 } from "next-intl";
|
|
15982
16076
|
|
|
15983
16077
|
// src/components/WfoDiff/WfoDiff.tsx
|
|
15984
|
-
import { useCallback as useCallback13, useEffect as
|
|
16078
|
+
import { useCallback as useCallback13, useEffect as useEffect34, useMemo as useMemo9, useState as useState46 } from "react";
|
|
15985
16079
|
import { Diff, Hunk, parseDiff, tokenize } from "react-diff-view";
|
|
15986
16080
|
import "react-diff-view/style/index.css";
|
|
15987
16081
|
import { useTranslations as useTranslations66 } from "next-intl";
|
|
@@ -16054,7 +16148,7 @@ var WfoDiff = ({ oldText, newText, syntax }) => {
|
|
|
16054
16148
|
const [diff] = parseDiff(diffText, { nearbySequences: "zip" });
|
|
16055
16149
|
setDiff(diff);
|
|
16056
16150
|
}, [oldText, newText, setDiff, showFull]);
|
|
16057
|
-
const tokens =
|
|
16151
|
+
const tokens = useMemo9(() => {
|
|
16058
16152
|
if (!hunks) {
|
|
16059
16153
|
return void 0;
|
|
16060
16154
|
}
|
|
@@ -16069,7 +16163,7 @@ var WfoDiff = ({ oldText, newText, syntax }) => {
|
|
|
16069
16163
|
return void 0;
|
|
16070
16164
|
}
|
|
16071
16165
|
}, [hunks, syntax]);
|
|
16072
|
-
|
|
16166
|
+
useEffect34(() => {
|
|
16073
16167
|
updateDiffText();
|
|
16074
16168
|
}, [updateDiffText, showFull]);
|
|
16075
16169
|
return /* @__PURE__ */ jsxs115("div", { children: [
|
|
@@ -16184,7 +16278,7 @@ var WfoWorkflowStepList = React75.forwardRef(
|
|
|
16184
16278
|
};
|
|
16185
16279
|
});
|
|
16186
16280
|
};
|
|
16187
|
-
|
|
16281
|
+
useEffect35(() => {
|
|
16188
16282
|
setStepListItems(
|
|
16189
16283
|
(previousStepListItems) => persistStepListItemState(previousStepListItems, steps, userInputForm)
|
|
16190
16284
|
);
|
|
@@ -16399,7 +16493,7 @@ var WfoStartProcessPage = ({ processName, isTask = false }) => {
|
|
|
16399
16493
|
const { data: workflowMetadata, isError: isErrorWorkflowDescription } = useGetDescriptionForWorkflowNameQuery({
|
|
16400
16494
|
workflowName: processName
|
|
16401
16495
|
});
|
|
16402
|
-
const startProcessPayload =
|
|
16496
|
+
const startProcessPayload = useMemo10(
|
|
16403
16497
|
() => getInitialProcessPayload({
|
|
16404
16498
|
productId,
|
|
16405
16499
|
subscriptionId
|
|
@@ -16476,7 +16570,7 @@ var WfoProductInformationWithLink = ({ workflowName, productNames }) => {
|
|
|
16476
16570
|
};
|
|
16477
16571
|
|
|
16478
16572
|
// src/pages/settings/WfoSettingsPage.tsx
|
|
16479
|
-
import { useMemo as
|
|
16573
|
+
import { useMemo as useMemo11 } from "react";
|
|
16480
16574
|
import { useTranslations as useTranslations73 } from "next-intl";
|
|
16481
16575
|
import { StringParam as StringParam3, useQueryParam as useQueryParam2, withDefault as withDefault3 } from "use-query-params";
|
|
16482
16576
|
import { EuiCodeBlock as EuiCodeBlock2, EuiFlexItem as EuiFlexItem31, EuiPanel as EuiPanel7, EuiSpacer as EuiSpacer24, EuiTab as EuiTab3, EuiTabs as EuiTabs3, EuiText as EuiText28 } from "@elastic/eui";
|
|
@@ -16589,7 +16683,7 @@ var WfoSettingsPage = () => {
|
|
|
16589
16683
|
"activeTab",
|
|
16590
16684
|
withDefault3(StringParam3, "ACTIONS" /* ACTIONS */)
|
|
16591
16685
|
);
|
|
16592
|
-
const selectedTabContent =
|
|
16686
|
+
const selectedTabContent = useMemo11(() => {
|
|
16593
16687
|
return settingsTabs.find((obj) => obj.id === selectedTabId)?.content;
|
|
16594
16688
|
}, [selectedTabId]);
|
|
16595
16689
|
const onSelectedTabChanged = (id) => {
|
|
@@ -16677,7 +16771,7 @@ var WfoSubscriptionDetailPage = () => {
|
|
|
16677
16771
|
};
|
|
16678
16772
|
|
|
16679
16773
|
// src/pages/subscriptions/WfoSubscriptionsListPage.tsx
|
|
16680
|
-
import { useEffect as
|
|
16774
|
+
import { useEffect as useEffect36, useState as useState50 } from "react";
|
|
16681
16775
|
import { useTranslations as useTranslations75 } from "next-intl";
|
|
16682
16776
|
import { StringParam as StringParam4, useQueryParam as useQueryParam3, withDefault as withDefault4 } from "use-query-params";
|
|
16683
16777
|
import { EuiSpacer as EuiSpacer25 } from "@elastic/eui";
|
|
@@ -16686,7 +16780,7 @@ var WfoSubscriptionsListPage = () => {
|
|
|
16686
16780
|
const t = useTranslations75("subscriptions.detail");
|
|
16687
16781
|
const [tableDefaults, setTableDefaults] = useState50();
|
|
16688
16782
|
const getStoredTableConfig = useStoredTableConfig(SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY);
|
|
16689
|
-
|
|
16783
|
+
useEffect36(() => {
|
|
16690
16784
|
const storedConfig = getStoredTableConfig();
|
|
16691
16785
|
if (storedConfig) {
|
|
16692
16786
|
setTableDefaults(storedConfig);
|
|
@@ -16737,7 +16831,7 @@ var WfoSubscriptionsListPage = () => {
|
|
|
16737
16831
|
};
|
|
16738
16832
|
|
|
16739
16833
|
// src/pages/tasks/WfoTasksListPage.tsx
|
|
16740
|
-
import { useContext as useContext10, useEffect as
|
|
16834
|
+
import { useContext as useContext10, useEffect as useEffect37, useState as useState51 } from "react";
|
|
16741
16835
|
import { useTranslations as useTranslations76 } from "next-intl";
|
|
16742
16836
|
import Link12 from "next/link";
|
|
16743
16837
|
import { useRouter as useRouter15 } from "next/router";
|
|
@@ -16820,7 +16914,7 @@ var WfoTasksListPage = () => {
|
|
|
16820
16914
|
const { showConfirmDialog } = useContext10(ConfirmationDialogContext);
|
|
16821
16915
|
const [retryAllProcesses] = useRetryAllProcessesMutation();
|
|
16822
16916
|
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
16823
|
-
|
|
16917
|
+
useEffect37(() => {
|
|
16824
16918
|
const storedConfig = getStoredTableConfig();
|
|
16825
16919
|
if (storedConfig) {
|
|
16826
16920
|
setTableDefaults(storedConfig);
|
|
@@ -16913,7 +17007,7 @@ var WfoTasksListPage = () => {
|
|
|
16913
17007
|
};
|
|
16914
17008
|
|
|
16915
17009
|
// src/pages/workflows/WfoWorkflowsListPage.tsx
|
|
16916
|
-
import { useEffect as
|
|
17010
|
+
import { useEffect as useEffect38, useState as useState52 } from "react";
|
|
16917
17011
|
import { useTranslations as useTranslations77 } from "next-intl";
|
|
16918
17012
|
import { useRouter as useRouter16 } from "next/router";
|
|
16919
17013
|
import { StringParam as StringParam6, useQueryParam as useQueryParam5, withDefault as withDefault6 } from "use-query-params";
|
|
@@ -16994,7 +17088,7 @@ var WfoWorkflowsListPage = () => {
|
|
|
16994
17088
|
const selectedWorkflowsListTab = getWorkflowsListTabTypeFromString(activeTab);
|
|
16995
17089
|
const localStorageKey = selectedWorkflowsListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY;
|
|
16996
17090
|
const getStoredTableConfig = useStoredTableConfig(localStorageKey);
|
|
16997
|
-
|
|
17091
|
+
useEffect38(() => {
|
|
16998
17092
|
const storedConfig = getStoredTableConfig();
|
|
16999
17093
|
if (storedConfig) {
|
|
17000
17094
|
setTableDefaults(storedConfig);
|
|
@@ -17044,9 +17138,8 @@ var WfoWorkflowsListPage = () => {
|
|
|
17044
17138
|
};
|
|
17045
17139
|
|
|
17046
17140
|
// src/pages/WfoSearchPocPage.tsx
|
|
17047
|
-
import { useCallback as useCallback14, useEffect as
|
|
17141
|
+
import { useCallback as useCallback14, useEffect as useEffect39, useMemo as useMemo12, useRef as useRef18, useState as useState53 } from "react";
|
|
17048
17142
|
import { formatQuery as formatQuery2 } from "react-querybuilder/formatQuery";
|
|
17049
|
-
import { parseCEL as parseCEL2 } from "react-querybuilder/parseCEL";
|
|
17050
17143
|
import { useTranslations as useTranslations78 } from "next-intl";
|
|
17051
17144
|
import Link13 from "next/link";
|
|
17052
17145
|
import { StringParam as StringParam7, useQueryParam as useQueryParam6, withDefault as withDefault7 } from "use-query-params";
|
|
@@ -17139,19 +17232,19 @@ var WfoSearchPocPage = () => {
|
|
|
17139
17232
|
const [queryText, setQueryText] = useState53("");
|
|
17140
17233
|
const [committedSearchQuery, setCommittedSearchQuery] = useQueryParam6("queryString", withDefault7(StringParam7, ""));
|
|
17141
17234
|
const [committedFilterString, setCommittedFilterString] = useQueryParam6("filterString", withDefault7(StringParam7, ""));
|
|
17142
|
-
const lastSelfCommittedFilter =
|
|
17235
|
+
const lastSelfCommittedFilter = useRef18("");
|
|
17143
17236
|
const commitFilterString = (celString) => {
|
|
17144
17237
|
lastSelfCommittedFilter.current = celString;
|
|
17145
17238
|
setCommittedFilterString(celString || void 0);
|
|
17146
17239
|
};
|
|
17147
|
-
const lastSelfCommittedQuery =
|
|
17240
|
+
const lastSelfCommittedQuery = useRef18("");
|
|
17148
17241
|
const commitSearchQuery = (queryText2) => {
|
|
17149
17242
|
lastSelfCommittedQuery.current = queryText2;
|
|
17150
17243
|
setCommittedSearchQuery(queryText2 || void 0);
|
|
17151
17244
|
};
|
|
17152
17245
|
const [filterString, setFilterString] = useState53("");
|
|
17153
17246
|
const [queryBuilderRuleGroup, setQueryBuilderRuleGroup] = useState53();
|
|
17154
|
-
const committedRuleGroup =
|
|
17247
|
+
const committedRuleGroup = useMemo12(
|
|
17155
17248
|
() => parseCelToRuleGroup(committedFilterString),
|
|
17156
17249
|
[committedFilterString]
|
|
17157
17250
|
);
|
|
@@ -17172,7 +17265,7 @@ var WfoSearchPocPage = () => {
|
|
|
17172
17265
|
dataSorting
|
|
17173
17266
|
]);
|
|
17174
17267
|
const cursor = pageCursor?.searchKey === committedSearchKey ? pageCursor.cursor : void 0;
|
|
17175
|
-
const searchPayload =
|
|
17268
|
+
const searchPayload = useMemo12(() => {
|
|
17176
17269
|
const filters = addStatusFilterFromTab(committedRuleGroup, selectedTab);
|
|
17177
17270
|
const order_by = {
|
|
17178
17271
|
element: getKeyByValueFromMap(resultColumToPropertyMap, dataSorting.field),
|
|
@@ -17192,7 +17285,7 @@ var WfoSearchPocPage = () => {
|
|
|
17192
17285
|
const { data, isFetching } = useSearchQuery(searchPayload);
|
|
17193
17286
|
const [getSubscriptionListTrigger] = useLazySearchQuery();
|
|
17194
17287
|
const getSubscriptionListForExport = () => getSubscriptionListTrigger(searchPayload).unwrap();
|
|
17195
|
-
|
|
17288
|
+
useEffect39(() => {
|
|
17196
17289
|
const storedConfig = getStoredTableConfig();
|
|
17197
17290
|
if (storedConfig) {
|
|
17198
17291
|
setTableDefaults(storedConfig);
|
|
@@ -17336,28 +17429,26 @@ var WfoSearchPocPage = () => {
|
|
|
17336
17429
|
setPageCursor(void 0);
|
|
17337
17430
|
};
|
|
17338
17431
|
const safeCelParse = useCallback14((celString) => {
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17344
|
-
|
|
17345
|
-
|
|
17346
|
-
|
|
17347
|
-
|
|
17348
|
-
}
|
|
17349
|
-
} catch {
|
|
17432
|
+
if (celString === "") {
|
|
17433
|
+
setIsValidFilterString(true);
|
|
17434
|
+
return;
|
|
17435
|
+
}
|
|
17436
|
+
const ruleGroup = parseCelToRuleGroup(celString);
|
|
17437
|
+
if (ruleGroup) {
|
|
17438
|
+
setIsValidFilterString(true);
|
|
17439
|
+
setQueryBuilderRuleGroup(ruleGroup);
|
|
17440
|
+
} else {
|
|
17350
17441
|
setIsValidFilterString(false);
|
|
17351
17442
|
}
|
|
17352
17443
|
}, []);
|
|
17353
|
-
|
|
17444
|
+
useEffect39(() => {
|
|
17354
17445
|
if (committedSearchQuery === lastSelfCommittedQuery.current) {
|
|
17355
17446
|
return;
|
|
17356
17447
|
}
|
|
17357
17448
|
lastSelfCommittedQuery.current = committedSearchQuery;
|
|
17358
17449
|
setQueryText(committedSearchQuery);
|
|
17359
17450
|
}, [committedSearchQuery]);
|
|
17360
|
-
|
|
17451
|
+
useEffect39(() => {
|
|
17361
17452
|
if (committedFilterString === lastSelfCommittedFilter.current) {
|
|
17362
17453
|
return;
|
|
17363
17454
|
}
|
|
@@ -17383,7 +17474,7 @@ var WfoSearchPocPage = () => {
|
|
|
17383
17474
|
setIsValidFilterString(true);
|
|
17384
17475
|
} else {
|
|
17385
17476
|
setFilterString(celQuery);
|
|
17386
|
-
setIsValidFilterString(
|
|
17477
|
+
setIsValidFilterString(!!parseCelToRuleGroup(celQuery));
|
|
17387
17478
|
}
|
|
17388
17479
|
}
|
|
17389
17480
|
};
|
|
@@ -19154,12 +19245,12 @@ var WfoSubscriptionDetailNoteEdit = ({
|
|
|
19154
19245
|
};
|
|
19155
19246
|
|
|
19156
19247
|
// src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.tsx
|
|
19157
|
-
import { useEffect as
|
|
19248
|
+
import { useEffect as useEffect40, useState as useState57 } from "react";
|
|
19158
19249
|
import { jsx as jsx273 } from "@emotion/react/jsx-runtime";
|
|
19159
19250
|
var WfoProcessListNoteEdit = ({ processId, note }) => {
|
|
19160
19251
|
const [patchProcess] = usePatchProcessMutation();
|
|
19161
19252
|
const [noteValue, setNoteValue] = useState57(note);
|
|
19162
|
-
|
|
19253
|
+
useEffect40(() => {
|
|
19163
19254
|
if (note !== noteValue) {
|
|
19164
19255
|
setNoteValue(note);
|
|
19165
19256
|
}
|
|
@@ -19205,7 +19296,7 @@ var WfoTableCodeBlock = ({ stepState: data }) => {
|
|
|
19205
19296
|
};
|
|
19206
19297
|
|
|
19207
19298
|
// src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
|
|
19208
|
-
import { useEffect as
|
|
19299
|
+
import { useEffect as useEffect43, useState as useState61 } from "react";
|
|
19209
19300
|
import { useTranslations as useTranslations95 } from "next-intl";
|
|
19210
19301
|
import {
|
|
19211
19302
|
EuiButton as EuiButton23,
|
|
@@ -19222,7 +19313,7 @@ import {
|
|
|
19222
19313
|
} from "@elastic/eui";
|
|
19223
19314
|
|
|
19224
19315
|
// src/hooks/useSearch.ts
|
|
19225
|
-
import { useEffect as
|
|
19316
|
+
import { useEffect as useEffect41, useState as useState58 } from "react";
|
|
19226
19317
|
var emptyResult = {
|
|
19227
19318
|
data: [],
|
|
19228
19319
|
page_info: { has_next_page: false, next_page_cursor: null },
|
|
@@ -19236,7 +19327,7 @@ var emptyResult = {
|
|
|
19236
19327
|
var useSearch = (query, entityType, filterGroup, limit, retriever = "auto" /* Auto */) => {
|
|
19237
19328
|
const [results, setResults] = useState58({ ...emptyResult });
|
|
19238
19329
|
const [triggerSearch, { isLoading, isError }] = useLazySearchQuery();
|
|
19239
|
-
|
|
19330
|
+
useEffect41(() => {
|
|
19240
19331
|
const queryText = typeof query === "string" ? query : query.text?.trim() || "";
|
|
19241
19332
|
const hasFilters = filterGroup && filterGroup.children.length > 0;
|
|
19242
19333
|
if (queryText.length < 2 && !hasFilters) {
|
|
@@ -19385,7 +19476,7 @@ var useSearchPagination = (debouncedQuery, selectedEntityTab, filterGroup, pageS
|
|
|
19385
19476
|
};
|
|
19386
19477
|
|
|
19387
19478
|
// src/hooks/useUrlParams.ts
|
|
19388
|
-
import { useCallback as useCallback16, useEffect as
|
|
19479
|
+
import { useCallback as useCallback16, useEffect as useEffect42, useState as useState60 } from "react";
|
|
19389
19480
|
var useUrlParams = () => {
|
|
19390
19481
|
const [urlParams, setUrlParams] = useState60(() => {
|
|
19391
19482
|
if (typeof window !== "undefined") {
|
|
@@ -19433,7 +19524,7 @@ var useUrlParams = () => {
|
|
|
19433
19524
|
window.history.replaceState({}, "", newUrl);
|
|
19434
19525
|
setUrlParams(newParams);
|
|
19435
19526
|
}, [query, selectedEntityTab, showFilters, selectedRecordIndex, selectedRecordId]);
|
|
19436
|
-
|
|
19527
|
+
useEffect42(() => {
|
|
19437
19528
|
updateUrl();
|
|
19438
19529
|
}, [updateUrl]);
|
|
19439
19530
|
return {
|
|
@@ -19494,7 +19585,7 @@ var WfoSearch = () => {
|
|
|
19494
19585
|
retrieverType
|
|
19495
19586
|
);
|
|
19496
19587
|
const [hasSearchBeenAttempted, setHasSearchBeenAttempted] = useState61(false);
|
|
19497
|
-
|
|
19588
|
+
useEffect43(() => {
|
|
19498
19589
|
const queryText = typeof debouncedQuery === "string" ? debouncedQuery : debouncedQuery?.text?.trim() || "";
|
|
19499
19590
|
const hasFilters = filterGroup && filterGroup.children.length > 0;
|
|
19500
19591
|
if (queryText.length >= 2 || hasFilters) {
|
|
@@ -19542,7 +19633,7 @@ var WfoSearch = () => {
|
|
|
19542
19633
|
setSearchValue(searchText);
|
|
19543
19634
|
setQuery(searchText);
|
|
19544
19635
|
};
|
|
19545
|
-
|
|
19636
|
+
useEffect43(() => {
|
|
19546
19637
|
if (typeof query === "string") {
|
|
19547
19638
|
if (query !== searchValue) {
|
|
19548
19639
|
setSearchValue(query);
|
|
@@ -19559,7 +19650,7 @@ var WfoSearch = () => {
|
|
|
19559
19650
|
const shouldShowNoResults = (() => {
|
|
19560
19651
|
return hasSearchBeenAttempted && !loading && results.data.length === 0;
|
|
19561
19652
|
})();
|
|
19562
|
-
|
|
19653
|
+
useEffect43(() => {
|
|
19563
19654
|
if (results.data.length > 0) {
|
|
19564
19655
|
if (selectedRecordId) {
|
|
19565
19656
|
const foundIndex = results.data.findIndex((result) => result.entity_id === selectedRecordId);
|
|
@@ -19577,10 +19668,10 @@ var WfoSearch = () => {
|
|
|
19577
19668
|
}
|
|
19578
19669
|
}
|
|
19579
19670
|
}, [results.data, selectedRecordId, setSelectedRecordId, setSelectedRecordIndex, urlParams]);
|
|
19580
|
-
|
|
19671
|
+
useEffect43(() => {
|
|
19581
19672
|
setShowDetailPanel(results?.data?.length > 0 && selectedRecordIndex >= 0 && selectedEntityTab === "SUBSCRIPTION");
|
|
19582
19673
|
}, [results?.data?.length, selectedRecordIndex, selectedEntityTab]);
|
|
19583
|
-
|
|
19674
|
+
useEffect43(() => {
|
|
19584
19675
|
resetPagination();
|
|
19585
19676
|
}, [debouncedQuery, selectedEntityTab, filterGroup, resetPagination]);
|
|
19586
19677
|
const { RESULTS_GROW, DETAIL_GROW } = LAYOUT_RATIOS;
|
|
@@ -19741,7 +19832,7 @@ var WfoSearchLoadingState = () => {
|
|
|
19741
19832
|
};
|
|
19742
19833
|
|
|
19743
19834
|
// src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx
|
|
19744
|
-
import { useEffect as
|
|
19835
|
+
import { useEffect as useEffect44, useRef as useRef19 } from "react";
|
|
19745
19836
|
import { useTranslations as useTranslations98 } from "next-intl";
|
|
19746
19837
|
import { EuiButtonIcon as EuiButtonIcon17, EuiFlexGroup as EuiFlexGroup43, EuiFlexItem as EuiFlexItem45, EuiPanel as EuiPanel18, EuiSpacer as EuiSpacer34, EuiText as EuiText37 } from "@elastic/eui";
|
|
19747
19838
|
|
|
@@ -19788,8 +19879,8 @@ var WfoSearchResultItem = ({
|
|
|
19788
19879
|
const { theme } = useOrchestratorTheme();
|
|
19789
19880
|
const baseUrl = `${window.location.protocol}//${window.location.host}`;
|
|
19790
19881
|
const detailUrl = getDetailUrl(result, baseUrl);
|
|
19791
|
-
const itemRef =
|
|
19792
|
-
|
|
19882
|
+
const itemRef = useRef19(null);
|
|
19883
|
+
useEffect44(() => {
|
|
19793
19884
|
if (isSelected && onPositionChange && itemRef.current) {
|
|
19794
19885
|
onPositionChange(index, itemRef.current);
|
|
19795
19886
|
}
|
|
@@ -21107,7 +21198,7 @@ var WfoPageWithUserGuide = ({ workflowName, children }) => {
|
|
|
21107
21198
|
};
|
|
21108
21199
|
|
|
21109
21200
|
// src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx
|
|
21110
|
-
import { useCallback as useCallback17, useEffect as
|
|
21201
|
+
import { useCallback as useCallback17, useEffect as useEffect45, useState as useState64 } from "react";
|
|
21111
21202
|
import { EuiFlexItem as EuiFlexItem55 } from "@elastic/eui";
|
|
21112
21203
|
import Editor from "@monaco-editor/react";
|
|
21113
21204
|
|
|
@@ -21151,7 +21242,7 @@ var WfoMonacoCodeBlock = ({ data }) => {
|
|
|
21151
21242
|
},
|
|
21152
21243
|
[theme, isDarkModeActive]
|
|
21153
21244
|
);
|
|
21154
|
-
|
|
21245
|
+
useEffect45(() => {
|
|
21155
21246
|
if (monacoInstance) {
|
|
21156
21247
|
addThemeToEditor(monacoInstance);
|
|
21157
21248
|
}
|
|
@@ -23018,6 +23109,7 @@ export {
|
|
|
23018
23109
|
useDataDisplayParams,
|
|
23019
23110
|
useDeleteProcessMutation,
|
|
23020
23111
|
useDeleteScheduledTaskMutation,
|
|
23112
|
+
useFieldsPathInfo,
|
|
23021
23113
|
useGetCacheNamesQuery,
|
|
23022
23114
|
useGetCustomerQuery,
|
|
23023
23115
|
useGetCustomersQuery,
|
|
@@ -23063,6 +23155,7 @@ export {
|
|
|
23063
23155
|
useLazyGetSubscriptionListQuery,
|
|
23064
23156
|
useLazyGetTasksQuery,
|
|
23065
23157
|
useLazyGetWorkflowsQuery,
|
|
23158
|
+
useLazySearchPathsQuery,
|
|
23066
23159
|
useLazySearchQuery,
|
|
23067
23160
|
useLazyStreamMessagesQuery,
|
|
23068
23161
|
useOrchestratorConfig,
|